aptechka 0.83.1 → 0.84.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.
Files changed (285) hide show
  1. package/lib/Animation-BAiM6_n1.js +111 -0
  2. package/lib/Animation-DMWabSR0.cjs +1 -0
  3. package/lib/Composed-B0fvCtZz.cjs +1 -0
  4. package/lib/Composed-CgA9lLWA.js +75 -0
  5. package/lib/Damped-BLo-OAVb.cjs +1 -0
  6. package/lib/Damped-Dcz5UdMH.js +57 -0
  7. package/lib/DerivedArray-DFhxap_z.js +63 -0
  8. package/lib/DerivedArray-DYtWMW0n.cjs +1 -0
  9. package/lib/DragControls-BPHsDeH6.cjs +1 -0
  10. package/lib/DragControls-D2a1Cifp.js +234 -0
  11. package/lib/LocalLinks-BWFJYhGX.cjs +1 -0
  12. package/lib/LocalLinks-Dwgf3No6.js +65 -0
  13. package/lib/PageAnnouncerElement-DPMlVJZG.cjs +1 -0
  14. package/lib/PageAnnouncerElement-DV9pm_od.js +28 -0
  15. package/lib/PageScroll-BAatKJx6.cjs +1 -0
  16. package/lib/PageScroll-m3TsHnzR.js +65 -0
  17. package/lib/SourceElement-941MrYpq.js +265 -0
  18. package/lib/SourceElement-DBLZ7b5k.cjs +5 -0
  19. package/lib/Store-BCW70G3Z.cjs +1 -0
  20. package/lib/Store-uLDYY9ed.js +158 -0
  21. package/lib/Tweened-BvtjLCa3.js +48 -0
  22. package/lib/Tweened-DdXm1dbF.cjs +1 -0
  23. package/lib/Viewport-BiDoiU8M.js +113 -0
  24. package/lib/Viewport-CXGKUyDy.cjs +1 -0
  25. package/lib/accordion/index.cjs +1 -1
  26. package/lib/accordion/index.js +97 -93
  27. package/lib/animation/index.cjs +1 -1
  28. package/lib/animation/index.js +6 -6
  29. package/lib/api-fetcher/index.cjs +1 -1
  30. package/lib/api-fetcher/index.js +67 -66
  31. package/lib/attribute/index.cjs +1 -1
  32. package/lib/attribute/index.js +37 -34
  33. package/lib/attributes-BADnRZpK.cjs +1 -0
  34. package/lib/attributes-FObgMNCf.js +36 -0
  35. package/lib/billboard/index.cjs +1 -1
  36. package/lib/billboard/index.js +240 -232
  37. package/lib/cache/index.cjs +1 -1
  38. package/lib/cache/index.js +26 -23
  39. package/lib/canvas/index.cjs +1 -1
  40. package/lib/canvas/index.js +62 -59
  41. package/lib/canvas-BP1ceie3.cjs +1 -0
  42. package/lib/canvas-DsglKco1.js +40 -0
  43. package/lib/connector/index.cjs +1 -1
  44. package/lib/connector/index.js +44 -41
  45. package/lib/controls/index.cjs +1 -1
  46. package/lib/controls/index.js +6 -6
  47. package/lib/coordinates--JG1U6kQ.js +29 -0
  48. package/lib/coordinates-DQ9XV9M1.cjs +1 -0
  49. package/lib/css-property/index.cjs +1 -1
  50. package/lib/css-property/index.d.ts +1 -1
  51. package/lib/css-property/index.js +40 -37
  52. package/lib/css-unit-parser/index.cjs +2 -2
  53. package/lib/css-unit-parser/index.js +22 -19
  54. package/lib/css-value-parser/index.cjs +1 -1
  55. package/lib/css-value-parser/index.js +13 -11
  56. package/lib/custom-elements-BfZCJde6.cjs +1 -0
  57. package/lib/custom-elements-HEMuF7yH.js +27 -0
  58. package/lib/dev/index.cjs +2 -1
  59. package/lib/dev/index.d.ts +1 -0
  60. package/lib/dev/index.js +25 -10
  61. package/lib/device/index.cjs +1 -1
  62. package/lib/device/index.js +5 -5
  63. package/lib/dom-B40i6NXw.cjs +1 -0
  64. package/lib/dom-D8D-_9ty.js +108 -0
  65. package/lib/easings-BSGJFMAo.js +40 -0
  66. package/lib/easings-BWq0pPLq.cjs +1 -0
  67. package/lib/element-CqD0jqBJ.cjs +1 -0
  68. package/lib/element-DKw5H-Tu.js +10 -0
  69. package/lib/element-linked-store/index.cjs +1 -1
  70. package/lib/element-linked-store/index.js +53 -52
  71. package/lib/element-resizer/index.cjs +1 -1
  72. package/lib/element-resizer/index.js +47 -44
  73. package/lib/en3/index.cjs +4 -4
  74. package/lib/en3/index.js +192 -185
  75. package/lib/events-Ds-TuvYW.js +9 -0
  76. package/lib/events-UlGk63iC.cjs +1 -0
  77. package/lib/file-DwQs6bB6.js +28 -0
  78. package/lib/file-RHfA3OS-.cjs +1 -0
  79. package/lib/function-H4b_gTg6.cjs +1 -0
  80. package/lib/function-UmbPrOHm.js +19 -0
  81. package/lib/gestures-DmKKNnh4.js +14 -0
  82. package/lib/gestures-DtYbQr49.cjs +1 -0
  83. package/lib/history/index.cjs +1 -1
  84. package/lib/history/index.js +24 -21
  85. package/lib/iframe/index.cjs +1 -1
  86. package/lib/iframe/index.js +27 -24
  87. package/lib/image/index.cjs +1 -1
  88. package/lib/image/index.js +17 -13
  89. package/lib/index-BpO2RJ__.cjs +1 -0
  90. package/lib/index-DpKsHe97.js +68 -0
  91. package/lib/intersector/index.cjs +1 -1
  92. package/lib/intersector/index.js +3 -3
  93. package/lib/jsx/ComponentElement.d.ts +4 -0
  94. package/lib/jsx/h.d.ts +7 -16
  95. package/lib/jsx/hooks/component/useStylesheet.d.ts +1 -1
  96. package/lib/jsx/hooks/cssProperty.d.ts +6 -0
  97. package/lib/jsx/hooks/resize.d.ts +4 -0
  98. package/lib/jsx/hooks/store.d.ts +1 -2
  99. package/lib/jsx/hooks/ticker.d.ts +5 -0
  100. package/lib/jsx/index.cjs +1 -1
  101. package/lib/jsx/index.d.ts +4 -4
  102. package/lib/jsx/index.js +171 -349
  103. package/lib/jsx/plugins/vite/index.cjs +49 -0
  104. package/lib/jsx/plugins/vite/index.d.ts +38 -0
  105. package/lib/jsx/plugins/vite/index.js +104 -0
  106. package/lib/jsx/render.d.ts +2 -0
  107. package/lib/jsx/type.d.ts +228 -190
  108. package/lib/ladder/index.cjs +1 -1
  109. package/lib/ladder/index.js +86 -84
  110. package/lib/layout-C26zkY7D.js +35 -0
  111. package/lib/layout-CnGLl7oe.cjs +1 -0
  112. package/lib/layout-box/index.cjs +1 -1
  113. package/lib/layout-box/index.js +221 -217
  114. package/lib/loading/index.cjs +1 -1
  115. package/lib/loading/index.js +48 -45
  116. package/lib/local-links/index.cjs +1 -1
  117. package/lib/local-links/index.js +2 -2
  118. package/lib/masonry-layout/index.cjs +1 -1
  119. package/lib/masonry-layout/index.js +48 -45
  120. package/lib/math-C-knY2TL.cjs +1 -0
  121. package/lib/math-r8V23YFe.js +57 -0
  122. package/lib/media/index.cjs +1 -1
  123. package/lib/media/index.js +28 -25
  124. package/lib/metadata-BNdkmeeD.js +15 -0
  125. package/lib/metadata-BrHUfpV9.cjs +1 -0
  126. package/lib/morph/index.cjs +1 -1
  127. package/lib/morph/index.js +561 -556
  128. package/lib/morph-BtgB1YQP.js +256 -0
  129. package/lib/morph-Buhxq-X0.cjs +1 -0
  130. package/lib/need_redo_tweaker/index.cjs +4 -4
  131. package/lib/need_redo_tweaker/index.js +862 -834
  132. package/lib/notifier/index.cjs +1 -1
  133. package/lib/notifier/index.js +29 -26
  134. package/lib/number-Bu4sGvW7.cjs +1 -0
  135. package/lib/number-DiVt2xnh.js +47 -0
  136. package/lib/object-CiIdEmJx.js +98 -0
  137. package/lib/object-DTY_W6xG.cjs +1 -0
  138. package/lib/order/index.cjs +1 -1
  139. package/lib/order/index.js +3 -3
  140. package/lib/page-announcer/index.cjs +1 -1
  141. package/lib/page-announcer/index.js +2 -2
  142. package/lib/page-scroll/index.cjs +1 -1
  143. package/lib/page-scroll/index.js +2 -2
  144. package/lib/pixel-perfect/index.cjs +4 -4
  145. package/lib/pixel-perfect/index.js +43 -40
  146. package/lib/pointer/index.cjs +1 -1
  147. package/lib/pointer/index.js +125 -122
  148. package/lib/polyfills-CG1XJNia.js +28 -0
  149. package/lib/polyfills-DZCuDBkA.cjs +1 -0
  150. package/lib/popover/index.cjs +1 -1
  151. package/lib/popover/index.js +249 -245
  152. package/lib/radio/index.cjs +1 -1
  153. package/lib/radio/index.js +58 -55
  154. package/lib/render-DLcWVnuH.js +355 -0
  155. package/lib/render-DdomypCo.cjs +1 -0
  156. package/lib/router/index.cjs +1 -1
  157. package/lib/router/index.js +196 -194
  158. package/lib/scroll/index.cjs +1 -1
  159. package/lib/scroll/index.js +890 -877
  160. package/lib/scroll-BvIWh1xB.js +41 -0
  161. package/lib/scroll-CT0lpyRZ.cjs +1 -0
  162. package/lib/scroll-entries/index.cjs +1 -1
  163. package/lib/scroll-entries/index.js +37 -34
  164. package/lib/scroll-kit/index.cjs +1 -1
  165. package/lib/scroll-kit/index.js +214 -209
  166. package/lib/sequence/index.cjs +1 -1
  167. package/lib/sequence/index.js +102 -98
  168. package/lib/size-element/index.cjs +1 -1
  169. package/lib/size-element/index.js +29 -26
  170. package/lib/slicer/index.cjs +1 -1
  171. package/lib/slicer/index.js +118 -113
  172. package/lib/source/index.cjs +1 -1
  173. package/lib/source/index.js +5 -5
  174. package/lib/spa/index.cjs +1 -1
  175. package/lib/spa/index.js +94 -94
  176. package/lib/store/index.cjs +1 -1
  177. package/lib/store/index.d.ts +2 -2
  178. package/lib/store/index.js +10 -8
  179. package/lib/string-B3lm2b7v.js +84 -0
  180. package/lib/string-CbRNzmd9.cjs +1 -0
  181. package/lib/style-DBoQWK0d.js +14 -0
  182. package/lib/style-IDJ6db6n.cjs +1 -0
  183. package/lib/stylesheet-CHvuef16.js +28 -0
  184. package/lib/stylesheet-CQdBaIAA.cjs +1 -0
  185. package/lib/ticker/index.cjs +1 -1
  186. package/lib/ticker/index.js +96 -92
  187. package/lib/url-CPCO10Sy.cjs +1 -0
  188. package/lib/url-CWCY_qe_.js +124 -0
  189. package/lib/utils/attributes.d.ts +2 -0
  190. package/lib/utils/dom.d.ts +1 -0
  191. package/lib/utils/index.cjs +1 -1
  192. package/lib/utils/index.js +245 -226
  193. package/lib/utils/polyfills.d.ts +1 -1
  194. package/lib/video/index.cjs +1 -1
  195. package/lib/video/index.js +36 -33
  196. package/lib/window-resizer/index.cjs +1 -1
  197. package/lib/window-resizer/index.js +27 -24
  198. package/lib/youtube/index.cjs +1 -1
  199. package/lib/youtube/index.js +56 -54
  200. package/package.json +11 -24
  201. package/lib/Animation-BzTjZIE-.js +0 -108
  202. package/lib/Animation-C39Ah-LM.cjs +0 -1
  203. package/lib/Composed-C-TV9te3.cjs +0 -1
  204. package/lib/Composed-DyAWjEXE.js +0 -121
  205. package/lib/Damped-CRusiRIV.js +0 -56
  206. package/lib/Damped-Prr0iKu1.cjs +0 -1
  207. package/lib/DragControls-8rNZwQrs.cjs +0 -1
  208. package/lib/DragControls-DBNdMBA4.js +0 -228
  209. package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
  210. package/lib/LocalLinks-DFZFpbjs.js +0 -62
  211. package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
  212. package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
  213. package/lib/PageScroll-0LxFblry.js +0 -62
  214. package/lib/PageScroll-BXJUQwG7.cjs +0 -1
  215. package/lib/SourceElement-BHqPFbna.cjs +0 -5
  216. package/lib/SourceElement-DjbHjynf.js +0 -260
  217. package/lib/Store-Blf4msDz.cjs +0 -1
  218. package/lib/Store-ZThXYBQd.js +0 -152
  219. package/lib/Tweened-Bw1Cn1PJ.js +0 -47
  220. package/lib/Tweened-DWtk9E-O.cjs +0 -1
  221. package/lib/Viewport-BxCr0GlB.cjs +0 -1
  222. package/lib/Viewport-Dt-d9DPi.js +0 -109
  223. package/lib/attributes-69we3byR.js +0 -10
  224. package/lib/attributes-Bf2svn4j.cjs +0 -1
  225. package/lib/canvas-CU5Xjahf.cjs +0 -1
  226. package/lib/canvas-DeZ0SLUJ.js +0 -34
  227. package/lib/coordinates-CgdGoSYs.js +0 -24
  228. package/lib/coordinates-D8Np3cPD.cjs +0 -1
  229. package/lib/custom-elements-DBnCK7Zx.js +0 -24
  230. package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
  231. package/lib/dom-BETkVSSZ.js +0 -82
  232. package/lib/dom-CBLlqORw.cjs +0 -1
  233. package/lib/easings-BEmRlrDd.js +0 -38
  234. package/lib/easings-GegIwET5.cjs +0 -1
  235. package/lib/element-CGVl1jA-.js +0 -7
  236. package/lib/element-yhcBhsho.cjs +0 -1
  237. package/lib/events-CsVF98U6.js +0 -6
  238. package/lib/events-KVanG9sR.cjs +0 -1
  239. package/lib/file-DSpfWdd9.cjs +0 -1
  240. package/lib/file-GHShUlue.js +0 -24
  241. package/lib/function-C10DGppn.js +0 -17
  242. package/lib/function-MthRj-GJ.cjs +0 -1
  243. package/lib/gestures-C7gbKx11.cjs +0 -1
  244. package/lib/gestures-CcXV6fCp.js +0 -11
  245. package/lib/index-OE2INULi.cjs +0 -1
  246. package/lib/index-e9eDuagL.js +0 -65
  247. package/lib/jsx/hydrate.d.ts +0 -1
  248. package/lib/jsx/integrations/astro/client.cjs +0 -1
  249. package/lib/jsx/integrations/astro/client.d.ts +0 -2
  250. package/lib/jsx/integrations/astro/client.js +0 -50
  251. package/lib/jsx/integrations/astro/index.cjs +0 -1
  252. package/lib/jsx/integrations/astro/index.d.ts +0 -2
  253. package/lib/jsx/integrations/astro/index.js +0 -54
  254. package/lib/jsx/integrations/astro/server.cjs +0 -1
  255. package/lib/jsx/integrations/astro/server.d.ts +0 -3
  256. package/lib/jsx/integrations/astro/server.js +0 -35
  257. package/lib/jsx/plugins/vite.d.ts +0 -21
  258. package/lib/layout-BSMtwCga.js +0 -29
  259. package/lib/layout-Ctc2p3uz.cjs +0 -1
  260. package/lib/math-BOBiC4TN.js +0 -45
  261. package/lib/math-GDWEqu7y.cjs +0 -1
  262. package/lib/metadata-BcYZ5w3T.cjs +0 -1
  263. package/lib/metadata-jfowcCyz.js +0 -12
  264. package/lib/morph-B6sGhLCi.cjs +0 -1
  265. package/lib/morph-BQErz7qP.js +0 -242
  266. package/lib/number-ChAm68cm.cjs +0 -1
  267. package/lib/number-CumqY64S.js +0 -40
  268. package/lib/object-CcMK4y_r.js +0 -87
  269. package/lib/object-baN9pgbU.cjs +0 -1
  270. package/lib/polyfills-DJrTJQky.js +0 -24
  271. package/lib/polyfills-Df4r-ETT.cjs +0 -1
  272. package/lib/render-DQs7rIoN.cjs +0 -1
  273. package/lib/render-D_0FCWEu.js +0 -18
  274. package/lib/scroll-BA2WnUrb.cjs +0 -1
  275. package/lib/scroll-DY5senkF.js +0 -37
  276. package/lib/string-BlMQbe8b.js +0 -70
  277. package/lib/string-DUXXtU8v.cjs +0 -1
  278. package/lib/style-At6aDoqG.cjs +0 -1
  279. package/lib/style-j2TwriJ_.js +0 -10
  280. package/lib/stylesheet-5_o7PFzM.cjs +0 -1
  281. package/lib/stylesheet-DdBzowZY.js +0 -24
  282. package/lib/url-CHgcNwJ1.cjs +0 -1
  283. package/lib/url-CYgo5vrG.js +0 -113
  284. package/lib/vite-C-i3hVDL.js +0 -75
  285. package/lib/vite-DzanPumM.cjs +0 -44
@@ -1,59 +1,61 @@
1
- var lt = (h) => {
2
- throw TypeError(h);
1
+ var __defProp = Object.defineProperty;
2
+ var __typeError = (msg) => {
3
+ throw TypeError(msg);
3
4
  };
4
- var st = (h, n, e) => n.has(h) || lt("Cannot " + e);
5
- var t = (h, n, e) => (st(h, n, "read from private field"), e ? e.call(h) : n.get(h)), s = (h, n, e) => n.has(h) ? lt("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(h) : n.set(h, e), l = (h, n, e, i) => (st(h, n, "write to private field"), i ? i.call(h, e) : n.set(h, e), e), c = (h, n, e) => (st(h, n, "access private method"), e);
6
- var F = (h, n, e) => new Promise((i, r) => {
7
- var a = (I) => {
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
6
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
8
+ var __async = (__this, __arguments, generator) => new Promise((resolve, reject) => {
9
+ var fulfilled = (value) => {
8
10
  try {
9
- tt(e.next(I));
10
- } catch (et) {
11
- r(et);
11
+ step(generator.next(value));
12
+ } catch (e) {
13
+ reject(e);
12
14
  }
13
- }, y = (I) => {
15
+ }, rejected = (value) => {
14
16
  try {
15
- tt(e.throw(I));
16
- } catch (et) {
17
- r(et);
17
+ step(generator.throw(value));
18
+ } catch (e) {
19
+ reject(e);
18
20
  }
19
- }, tt = (I) => I.done ? i(I.value) : Promise.resolve(I.value).then(a, y);
20
- tt((e = e.apply(h, n)).next());
21
+ }, step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
22
+ step((generator = generator.apply(__this, __arguments)).next());
21
23
  });
22
- import { a as it, i as Z } from "../index-e9eDuagL.js";
23
- import { w as ht } from "../custom-elements-DBnCK7Zx.js";
24
- import { b as _ } from "../dom-BETkVSSZ.js";
24
+ import { a as intersector, i as isBrowser } from "../index-DpKsHe97.js";
25
+ import { w as whenDefined } from "../custom-elements-HEMuF7yH.js";
26
+ import { b as findParentElement } from "../dom-D8D-_9ty.js";
25
27
  import "construct-style-sheets-polyfill";
26
- import { CSSProperty as S } from "../css-property/index.js";
27
- import { d as bt } from "../events-CsVF98U6.js";
28
- import { s as mt } from "../gestures-CcXV6fCp.js";
29
- import { c as ft } from "../math-BOBiC4TN.js";
30
- import { l as at } from "../number-CumqY64S.js";
31
- var m, T, Q, f, ct, dt, ut, nt;
32
- class ot {
33
- constructor(n, e) {
34
- s(this, f);
35
- s(this, m);
36
- s(this, T, null);
37
- s(this, Q, !1);
38
- this.element = n, l(this, m, e);
28
+ import { CSSProperty } from "../css-property/index.js";
29
+ import { d as dispatchEvent } from "../events-Ds-TuvYW.js";
30
+ import { s as setupDrag } from "../gestures-DmKKNnh4.js";
31
+ import { c as clamp } from "../math-r8V23YFe.js";
32
+ import { l as loopNumber } from "../number-DiVt2xnh.js";
33
+ var _parent, _raf, _wasCurrent, _BillboardItem_instances, setCurrent_fn, setSiblingClasses_fn, clearClasses_fn, clearTimeout_fn;
34
+ const _BillboardItem = class _BillboardItem {
35
+ constructor(element, parent) {
36
+ __privateAdd(this, _BillboardItem_instances);
37
+ __privateAdd(this, _parent);
38
+ __privateAdd(this, _raf, null);
39
+ __privateAdd(this, _wasCurrent, !1);
40
+ this.element = element, __privateSet(this, _parent, parent);
39
41
  }
40
42
  destroy() {
41
- c(this, f, nt).call(this);
43
+ __privateMethod(this, _BillboardItem_instances, clearTimeout_fn).call(this);
42
44
  }
43
- updateClasses(n) {
44
- const e = n === t(this, m).counter;
45
- t(this, Q) && !e ? this.element.classList.add("was-current") : this.element.classList.remove("was-current");
46
- const i = this.element.classList.contains("current-active");
47
- c(this, f, ut).call(this), c(this, f, nt).call(this), i && this.element.classList.add("previous-active"), n === t(this, m).counter ? c(this, f, ct).call(this) : n < t(this, m).counter ? this.element.classList.add("previous") : this.element.classList.add("next"), c(this, f, dt).call(this, n);
45
+ updateClasses(index) {
46
+ const isCurrent = index === __privateGet(this, _parent).counter;
47
+ __privateGet(this, _wasCurrent) && !isCurrent ? this.element.classList.add("was-current") : this.element.classList.remove("was-current");
48
+ const isActive = this.element.classList.contains("current-active");
49
+ __privateMethod(this, _BillboardItem_instances, clearClasses_fn).call(this), __privateMethod(this, _BillboardItem_instances, clearTimeout_fn).call(this), isActive && this.element.classList.add("previous-active"), index === __privateGet(this, _parent).counter ? __privateMethod(this, _BillboardItem_instances, setCurrent_fn).call(this) : index < __privateGet(this, _parent).counter ? this.element.classList.add("previous") : this.element.classList.add("next"), __privateMethod(this, _BillboardItem_instances, setSiblingClasses_fn).call(this, index);
48
50
  }
49
- }
50
- m = new WeakMap(), T = new WeakMap(), Q = new WeakMap(), f = new WeakSet(), ct = function() {
51
- l(this, Q, !0), this.element.classList.add("current"), l(this, T, requestAnimationFrame(() => {
51
+ };
52
+ _parent = new WeakMap(), _raf = new WeakMap(), _wasCurrent = new WeakMap(), _BillboardItem_instances = new WeakSet(), setCurrent_fn = /* @__PURE__ */ __name(function() {
53
+ __privateSet(this, _wasCurrent, !0), this.element.classList.add("current"), __privateSet(this, _raf, requestAnimationFrame(() => {
52
54
  this.element.classList.add("current-active");
53
55
  }));
54
- }, dt = function(n) {
55
- n === at(t(this, m).counter - 1, t(this, m).length) ? this.element.classList.add("previous-sibling") : n === (t(this, m).counter + 1) % t(this, m).length && this.element.classList.add("next-sibling");
56
- }, ut = function() {
56
+ }, "#setCurrent"), setSiblingClasses_fn = /* @__PURE__ */ __name(function(index) {
57
+ index === loopNumber(__privateGet(this, _parent).counter - 1, __privateGet(this, _parent).length) ? this.element.classList.add("previous-sibling") : index === (__privateGet(this, _parent).counter + 1) % __privateGet(this, _parent).length && this.element.classList.add("next-sibling");
58
+ }, "#setSiblingClasses"), clearClasses_fn = /* @__PURE__ */ __name(function() {
57
59
  this.element.classList.remove(
58
60
  "current",
59
61
  "previous",
@@ -63,299 +65,305 @@ m = new WeakMap(), T = new WeakMap(), Q = new WeakMap(), f = new WeakSet(), ct =
63
65
  "current-active",
64
66
  "previous-active"
65
67
  );
66
- }, nt = function() {
67
- t(this, T) && (cancelAnimationFrame(t(this, T)), l(this, T, null));
68
- };
69
- var $, B, L, C, k, x, D, H, p, o, u, P, d, rt, V, q, W, K, X, Y;
70
- class U extends HTMLElement {
68
+ }, "#clearClasses"), clearTimeout_fn = /* @__PURE__ */ __name(function() {
69
+ __privateGet(this, _raf) && (cancelAnimationFrame(__privateGet(this, _raf)), __privateSet(this, _raf, null));
70
+ }, "#clearTimeout"), __name(_BillboardItem, "BillboardItem");
71
+ let BillboardItem = _BillboardItem;
72
+ var _resize, _loop, _autoplay, _swipe, _lengthOffset, _intervalId, _isIntersecting, _items, _groups, _counter, _length, _timeouts, _BillboardElement_instances, updateLength_fn, tryAutoplay_fn, _intersectionListener, _clearAndSpawnInterval, updateCounter_fn, _tick, _pointerDownListener;
73
+ const _BillboardElement = class _BillboardElement extends HTMLElement {
71
74
  constructor() {
72
75
  super(...arguments);
73
- s(this, d);
74
- s(this, $, new S(this, "--resize", !1));
75
- s(this, B, new S(this, "--loop", !0));
76
- s(this, L, new S(this, "--autoplay", !1));
77
- s(this, C, new S(this, "--swipe", "x"));
78
- s(this, k, new S(this, "--length-offset", 0));
79
- s(this, x);
80
- s(this, D, !1);
81
- s(this, H, []);
82
- s(this, p, /* @__PURE__ */ new Map());
83
- s(this, o, -1);
84
- s(this, u, 0);
85
- s(this, P, []);
86
- s(this, q, (e) => {
87
- l(this, D, e.isIntersecting), t(this, D) ? c(this, d, V).call(this) : clearInterval(t(this, x));
88
- });
89
- s(this, W, () => {
90
- clearInterval(t(this, x)), t(this, D) && l(this, x, setInterval(t(this, X), this.autoplayDuration));
91
- });
92
- s(this, X, () => {
93
- c(this, d, K).call(this, t(this, o) + 1);
94
- });
95
- s(this, Y, (e) => {
96
- if (!t(this, C).current)
76
+ __privateAdd(this, _BillboardElement_instances);
77
+ __privateAdd(this, _resize, new CSSProperty(this, "--resize", !1));
78
+ __privateAdd(this, _loop, new CSSProperty(this, "--loop", !0));
79
+ __privateAdd(this, _autoplay, new CSSProperty(this, "--autoplay", !1));
80
+ __privateAdd(this, _swipe, new CSSProperty(this, "--swipe", "x"));
81
+ __privateAdd(this, _lengthOffset, new CSSProperty(this, "--length-offset", 0));
82
+ __privateAdd(this, _intervalId);
83
+ __privateAdd(this, _isIntersecting, !1);
84
+ __privateAdd(this, _items, []);
85
+ __privateAdd(this, _groups, /* @__PURE__ */ new Map());
86
+ __privateAdd(this, _counter, -1);
87
+ __privateAdd(this, _length, 0);
88
+ __privateAdd(this, _timeouts, []);
89
+ __privateAdd(this, _intersectionListener, /* @__PURE__ */ __name((e) => {
90
+ __privateSet(this, _isIntersecting, e.isIntersecting), __privateGet(this, _isIntersecting) ? __privateMethod(this, _BillboardElement_instances, tryAutoplay_fn).call(this) : clearInterval(__privateGet(this, _intervalId));
91
+ }, "#intersectionListener"));
92
+ __privateAdd(this, _clearAndSpawnInterval, /* @__PURE__ */ __name(() => {
93
+ clearInterval(__privateGet(this, _intervalId)), __privateGet(this, _isIntersecting) && __privateSet(this, _intervalId, setInterval(__privateGet(this, _tick), this.autoplayDuration));
94
+ }, "#clearAndSpawnInterval"));
95
+ __privateAdd(this, _tick, /* @__PURE__ */ __name(() => {
96
+ __privateMethod(this, _BillboardElement_instances, updateCounter_fn).call(this, __privateGet(this, _counter) + 1);
97
+ }, "#tick"));
98
+ __privateAdd(this, _pointerDownListener, /* @__PURE__ */ __name((e) => {
99
+ if (!__privateGet(this, _swipe).current)
97
100
  return;
98
- let i = 0;
99
- mt(
100
- (r) => {
101
- const a = e.x - r.x, y = e.y - r.y;
102
- t(this, C).current === "x" ? Math.abs(a) > Math.abs(y) && Math.abs(a) > 10 && (i = Math.sign(a)) : t(this, C).current === "y" && Math.abs(y) > Math.abs(a) && Math.abs(y) > 10 && (i = Math.sign(y));
101
+ let dir = 0;
102
+ setupDrag(
103
+ (moveEvent) => {
104
+ const dx = e.x - moveEvent.x, dy = e.y - moveEvent.y;
105
+ __privateGet(this, _swipe).current === "x" ? Math.abs(dx) > Math.abs(dy) && Math.abs(dx) > 10 && (dir = Math.sign(dx)) : __privateGet(this, _swipe).current === "y" && Math.abs(dy) > Math.abs(dx) && Math.abs(dy) > 10 && (dir = Math.sign(dy));
103
106
  },
104
107
  () => {
105
- i && this.shift(i);
108
+ dir && this.shift(dir);
106
109
  }
107
110
  );
108
- });
111
+ }, "#pointerDownListener"));
109
112
  }
110
113
  get counter() {
111
- return t(this, o);
114
+ return __privateGet(this, _counter);
112
115
  }
113
116
  get loop() {
114
- return t(this, B);
117
+ return __privateGet(this, _loop);
115
118
  }
116
119
  get autoplay() {
117
- return t(this, L);
120
+ return __privateGet(this, _autoplay);
118
121
  }
119
122
  get autoplayDuration() {
120
- return parseFloat(t(this, L).current || "0") * 1e3;
123
+ return parseFloat(__privateGet(this, _autoplay).current || "0") * 1e3;
121
124
  }
122
125
  get swipe() {
123
- return t(this, C);
126
+ return __privateGet(this, _swipe);
124
127
  }
125
128
  get lengthOffset() {
126
- return t(this, k);
129
+ return __privateGet(this, _lengthOffset);
127
130
  }
128
131
  get items() {
129
- return t(this, H);
132
+ return __privateGet(this, _items);
130
133
  }
131
134
  get groups() {
132
- return t(this, p);
135
+ return __privateGet(this, _groups);
133
136
  }
134
137
  get length() {
135
- return t(this, u);
138
+ return __privateGet(this, _length);
136
139
  }
137
- addItem(e) {
138
- const i = new ot(e, this);
139
- t(this, H).push(i);
140
- const r = e.getAttribute("data-billboard-item-group") || "default";
141
- let a = t(this, p).get(r);
142
- a || (a = [], t(this, p).set(r, a)), a.push(i), c(this, d, rt).call(this);
140
+ addItem(element) {
141
+ const item = new BillboardItem(element, this);
142
+ __privateGet(this, _items).push(item);
143
+ const groupName = element.getAttribute("data-billboard-item-group") || "default";
144
+ let group = __privateGet(this, _groups).get(groupName);
145
+ group || (group = [], __privateGet(this, _groups).set(groupName, group)), group.push(item), __privateMethod(this, _BillboardElement_instances, updateLength_fn).call(this);
143
146
  }
144
- set(e) {
145
- (!this.handleSet || this.handleSet(e)) && (c(this, d, K).call(this, e), c(this, d, V).call(this));
147
+ set(value) {
148
+ (!this.handleSet || this.handleSet(value)) && (__privateMethod(this, _BillboardElement_instances, updateCounter_fn).call(this, value), __privateMethod(this, _BillboardElement_instances, tryAutoplay_fn).call(this));
146
149
  }
147
- shift(e) {
148
- this.set(t(this, o) + e);
150
+ shift(value) {
151
+ this.set(__privateGet(this, _counter) + value);
149
152
  }
150
153
  connectedCallback() {
151
154
  [
152
155
  ...this.querySelectorAll(
153
156
  `[data-billboard-item${this.id ? `="${this.id}"` : ""}]`
154
157
  )
155
- ].forEach((i) => {
156
- this.addItem(i);
157
- }), t(this, p).forEach((i) => {
158
- var r;
159
- (r = i[0]) == null || r.element.classList.add("current");
160
- }), t(this, L).subscribe((i) => {
161
- i.current ? (it.subscribe(this, t(this, q)), c(this, d, V).call(this)) : (l(this, D, !0), it.unsubscribe(t(this, q)), clearInterval(t(this, x)), c(this, d, K).call(this, 0));
162
- }), t(this, k).subscribe(() => {
163
- c(this, d, rt).call(this);
164
- }), t(this, L).observe(), t(this, C).observe(), t(this, k).observe(), t(this, B).observe(), t(this, $).observe(), c(this, d, K).call(this, 0), this.addEventListener("pointerdown", t(this, Y));
158
+ ].forEach((el) => {
159
+ this.addItem(el);
160
+ }), __privateGet(this, _groups).forEach((g) => {
161
+ var _a;
162
+ (_a = g[0]) == null || _a.element.classList.add("current");
163
+ }), __privateGet(this, _autoplay).subscribe((e) => {
164
+ e.current ? (intersector.subscribe(this, __privateGet(this, _intersectionListener)), __privateMethod(this, _BillboardElement_instances, tryAutoplay_fn).call(this)) : (__privateSet(this, _isIntersecting, !0), intersector.unsubscribe(__privateGet(this, _intersectionListener)), clearInterval(__privateGet(this, _intervalId)), __privateMethod(this, _BillboardElement_instances, updateCounter_fn).call(this, 0));
165
+ }), __privateGet(this, _lengthOffset).subscribe(() => {
166
+ __privateMethod(this, _BillboardElement_instances, updateLength_fn).call(this);
167
+ }), __privateGet(this, _autoplay).observe(), __privateGet(this, _swipe).observe(), __privateGet(this, _lengthOffset).observe(), __privateGet(this, _loop).observe(), __privateGet(this, _resize).observe(), __privateMethod(this, _BillboardElement_instances, updateCounter_fn).call(this, 0), this.addEventListener("pointerdown", __privateGet(this, _pointerDownListener));
165
168
  }
166
169
  disconnectedCallback() {
167
- t(this, L).unobserve(), t(this, C).unobserve(), t(this, k).unobserve(), t(this, B).unobserve(), t(this, $).unobserve(), t(this, H).forEach((e) => e.destroy()), l(this, H, []), t(this, p).clear(), it.unsubscribe(t(this, q)), clearInterval(t(this, x)), t(this, P).forEach((e) => {
168
- clearTimeout(e);
170
+ __privateGet(this, _autoplay).unobserve(), __privateGet(this, _swipe).unobserve(), __privateGet(this, _lengthOffset).unobserve(), __privateGet(this, _loop).unobserve(), __privateGet(this, _resize).unobserve(), __privateGet(this, _items).forEach((item) => item.destroy()), __privateSet(this, _items, []), __privateGet(this, _groups).clear(), intersector.unsubscribe(__privateGet(this, _intersectionListener)), clearInterval(__privateGet(this, _intervalId)), __privateGet(this, _timeouts).forEach((timeout) => {
171
+ clearTimeout(timeout);
169
172
  });
170
173
  }
171
- }
172
- $ = new WeakMap(), B = new WeakMap(), L = new WeakMap(), C = new WeakMap(), k = new WeakMap(), x = new WeakMap(), D = new WeakMap(), H = new WeakMap(), p = new WeakMap(), o = new WeakMap(), u = new WeakMap(), P = new WeakMap(), d = new WeakSet(), rt = function() {
173
- l(this, u, 0), t(this, p).forEach((e) => {
174
- e.length > t(this, u) && l(this, u, e.length);
175
- }), l(this, u, t(this, u) + t(this, k).current);
176
- }, V = function() {
177
- t(this, L).current !== !1 && t(this, W).call(this);
178
- }, q = new WeakMap(), W = new WeakMap(), K = function() {
179
- return F(this, arguments, function* (e = t(this, o)) {
180
- const i = t(this, o);
181
- t(this, B).current ? l(this, o, at(e, t(this, u))) : l(this, o, ft(e, 0, t(this, u) - 1)), i !== t(this, o) && (t(this, P).forEach((r) => {
182
- clearTimeout(r);
183
- }), this.classList.remove("forward", "backward", "next-round", "prev-round"), t(this, o) - i >= 0 ? this.classList.add("forward") : t(this, o) - i < 0 && this.classList.add("backward"), t(this, p).forEach((r) => {
184
- r.forEach((a, y) => {
185
- a.updateClasses(y);
174
+ };
175
+ _resize = new WeakMap(), _loop = new WeakMap(), _autoplay = new WeakMap(), _swipe = new WeakMap(), _lengthOffset = new WeakMap(), _intervalId = new WeakMap(), _isIntersecting = new WeakMap(), _items = new WeakMap(), _groups = new WeakMap(), _counter = new WeakMap(), _length = new WeakMap(), _timeouts = new WeakMap(), _BillboardElement_instances = new WeakSet(), updateLength_fn = /* @__PURE__ */ __name(function() {
176
+ __privateSet(this, _length, 0), __privateGet(this, _groups).forEach((g) => {
177
+ g.length > __privateGet(this, _length) && __privateSet(this, _length, g.length);
178
+ }), __privateSet(this, _length, __privateGet(this, _length) + __privateGet(this, _lengthOffset).current);
179
+ }, "#updateLength"), tryAutoplay_fn = /* @__PURE__ */ __name(function() {
180
+ __privateGet(this, _autoplay).current !== !1 && __privateGet(this, _clearAndSpawnInterval).call(this);
181
+ }, "#tryAutoplay"), _intersectionListener = new WeakMap(), _clearAndSpawnInterval = new WeakMap(), updateCounter_fn = /* @__PURE__ */ __name(function() {
182
+ return __async(this, arguments, function* (value = __privateGet(this, _counter)) {
183
+ const prev = __privateGet(this, _counter);
184
+ __privateGet(this, _loop).current ? __privateSet(this, _counter, loopNumber(value, __privateGet(this, _length))) : __privateSet(this, _counter, clamp(value, 0, __privateGet(this, _length) - 1)), prev !== __privateGet(this, _counter) && (__privateGet(this, _timeouts).forEach((timeout) => {
185
+ clearTimeout(timeout);
186
+ }), this.classList.remove("forward", "backward", "next-round", "prev-round"), __privateGet(this, _counter) - prev >= 0 ? this.classList.add("forward") : __privateGet(this, _counter) - prev < 0 && this.classList.add("backward"), __privateGet(this, _groups).forEach((group) => {
187
+ group.forEach((item, i) => {
188
+ item.updateClasses(i);
186
189
  });
187
- }), this.classList.toggle("has-length", t(this, u) > 1), this.classList.toggle("start", t(this, o) === 0), this.classList.toggle("end", t(this, o) === t(this, u) - 1), this.style.setProperty("--counter", t(this, o).toString()), this.style.setProperty("--sections", t(this, u).toString()), bt(this, "billboardChange", {
190
+ }), this.classList.toggle("has-length", __privateGet(this, _length) > 1), this.classList.toggle("start", __privateGet(this, _counter) === 0), this.classList.toggle("end", __privateGet(this, _counter) === __privateGet(this, _length) - 1), this.style.setProperty("--counter", __privateGet(this, _counter).toString()), this.style.setProperty("--sections", __privateGet(this, _length).toString()), dispatchEvent(this, "billboardChange", {
188
191
  detail: {
189
- counter: t(this, o)
192
+ counter: __privateGet(this, _counter)
190
193
  }
191
- }), t(this, $).current && t(this, P).push(
194
+ }), __privateGet(this, _resize).current && __privateGet(this, _timeouts).push(
192
195
  setTimeout(() => {
193
196
  window.dispatchEvent(new Event("resize"));
194
197
  }, 0)
195
- ), t(this, P).push(
198
+ ), __privateGet(this, _timeouts).push(
196
199
  setTimeout(() => {
197
200
  this.classList.remove("next-round", "prev-round");
198
201
  }, 10)
199
202
  ));
200
203
  });
201
- }, X = new WeakMap(), Y = new WeakMap();
202
- customElements.get("e-billboard") || customElements.define("e-billboard", U);
203
- var g, N, v, R, O;
204
- class pt extends HTMLElement {
204
+ }, "#updateCounter"), _tick = new WeakMap(), _pointerDownListener = new WeakMap(), __name(_BillboardElement, "BillboardElement");
205
+ let BillboardElement = _BillboardElement;
206
+ customElements.get("e-billboard") || customElements.define("e-billboard", BillboardElement);
207
+ var _billboardElement, _contentElement, _buttonElements, _clickListener, _billboardChangeListener;
208
+ const _BillboardBulletsElement = class _BillboardBulletsElement extends HTMLElement {
205
209
  constructor() {
206
210
  super(...arguments);
207
- s(this, g, null);
208
- s(this, N, null);
209
- s(this, v, []);
210
- s(this, R, (e) => {
211
- const i = e.currentTarget, r = t(this, v).findIndex((a) => a === i);
212
- r >= 0 && t(this, g).set(r);
213
- });
214
- s(this, O, () => {
215
- t(this, v).forEach((e, i) => {
216
- i === t(this, g).counter ? e.classList.add("current") : e.classList.remove("current");
211
+ __privateAdd(this, _billboardElement, null);
212
+ __privateAdd(this, _contentElement, null);
213
+ __privateAdd(this, _buttonElements, []);
214
+ __privateAdd(this, _clickListener, /* @__PURE__ */ __name((e) => {
215
+ const ct = e.currentTarget, index = __privateGet(this, _buttonElements).findIndex((el) => el === ct);
216
+ index >= 0 && __privateGet(this, _billboardElement).set(index);
217
+ }, "#clickListener"));
218
+ __privateAdd(this, _billboardChangeListener, /* @__PURE__ */ __name(() => {
219
+ __privateGet(this, _buttonElements).forEach((element, i) => {
220
+ i === __privateGet(this, _billboardElement).counter ? element.classList.add("current") : element.classList.remove("current");
217
221
  });
218
- });
222
+ }, "#billboardChangeListener"));
219
223
  }
220
224
  get buttonElements() {
221
- return t(this, v);
225
+ return __privateGet(this, _buttonElements);
222
226
  }
223
227
  connectedCallback() {
224
- return F(this, null, function* () {
225
- var e;
226
- if (yield ht("e-billboard"), l(this, g, _(this, U)), t(this, g) && this.isConnected) {
228
+ return __async(this, null, function* () {
229
+ var _a;
230
+ if (yield whenDefined("e-billboard"), __privateSet(this, _billboardElement, findParentElement(this, BillboardElement)), __privateGet(this, _billboardElement) && this.isConnected) {
227
231
  this.innerHTML = "";
228
- const i = t(this, g).length;
229
- l(this, N, document.createElement("div"));
230
- for (let r = 0; r < i; r++) {
231
- const a = document.createElement("button");
232
- a.setAttribute("aria-label", `Go to item ${r + 1}`), t(this, v).push(a), t(this, N).appendChild(a);
232
+ const length = __privateGet(this, _billboardElement).length;
233
+ __privateSet(this, _contentElement, document.createElement("div"));
234
+ for (let index = 0; index < length; index++) {
235
+ const button = document.createElement("button");
236
+ button.setAttribute("aria-label", `Go to item ${index + 1}`), __privateGet(this, _buttonElements).push(button), __privateGet(this, _contentElement).appendChild(button);
233
237
  }
234
- this.appendChild(t(this, N)), t(this, v).forEach((r) => {
235
- r.addEventListener("click", t(this, R));
236
- }), (e = t(this, g)) == null || e.addEventListener(
238
+ this.appendChild(__privateGet(this, _contentElement)), __privateGet(this, _buttonElements).forEach((element) => {
239
+ element.addEventListener("click", __privateGet(this, _clickListener));
240
+ }), (_a = __privateGet(this, _billboardElement)) == null || _a.addEventListener(
237
241
  "billboardChange",
238
- t(this, O)
239
- ), t(this, O).call(this);
242
+ __privateGet(this, _billboardChangeListener)
243
+ ), __privateGet(this, _billboardChangeListener).call(this);
240
244
  }
241
245
  });
242
246
  }
243
247
  disconnectedCallback() {
244
- var e;
245
- t(this, v).forEach((i) => {
246
- i.removeEventListener("click", t(this, R));
247
- }), (e = t(this, g)) == null || e.removeEventListener(
248
+ var _a;
249
+ __privateGet(this, _buttonElements).forEach((element) => {
250
+ element.removeEventListener("click", __privateGet(this, _clickListener));
251
+ }), (_a = __privateGet(this, _billboardElement)) == null || _a.removeEventListener(
248
252
  "billboardChange",
249
- t(this, O)
250
- ), this.innerHTML = "", l(this, v, []);
253
+ __privateGet(this, _billboardChangeListener)
254
+ ), this.innerHTML = "", __privateSet(this, _buttonElements, []);
251
255
  }
252
- }
253
- g = new WeakMap(), N = new WeakMap(), v = new WeakMap(), R = new WeakMap(), O = new WeakMap();
254
- Z && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", pt);
255
- var z, G;
256
- class gt extends HTMLElement {
256
+ };
257
+ _billboardElement = new WeakMap(), _contentElement = new WeakMap(), _buttonElements = new WeakMap(), _clickListener = new WeakMap(), _billboardChangeListener = new WeakMap(), __name(_BillboardBulletsElement, "BillboardBulletsElement");
258
+ let BillboardBulletsElement = _BillboardBulletsElement;
259
+ isBrowser && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", BillboardBulletsElement);
260
+ var _billboardElement2, _changeListener;
261
+ const _BillboardCounterElement = class _BillboardCounterElement extends HTMLElement {
257
262
  constructor() {
258
263
  super(...arguments);
259
- s(this, z, null);
260
- s(this, G, () => {
261
- var r;
262
- const e = (((r = t(this, z)) == null ? void 0 : r.counter) || 0) + 1, i = parseInt(this.getAttribute("pad") || "0");
263
- this.textContent = e.toString().padStart(i, "0");
264
- });
264
+ __privateAdd(this, _billboardElement2, null);
265
+ __privateAdd(this, _changeListener, /* @__PURE__ */ __name(() => {
266
+ var _a;
267
+ const value = (((_a = __privateGet(this, _billboardElement2)) == null ? void 0 : _a.counter) || 0) + 1, pad = parseInt(this.getAttribute("pad") || "0");
268
+ this.textContent = value.toString().padStart(pad, "0");
269
+ }, "#changeListener"));
265
270
  }
266
271
  connectedCallback() {
267
- return F(this, null, function* () {
268
- var e;
269
- yield ht("e-billboard"), l(this, z, _(this, U)), (e = t(this, z)) == null || e.addEventListener(
272
+ return __async(this, null, function* () {
273
+ var _a;
274
+ yield whenDefined("e-billboard"), __privateSet(this, _billboardElement2, findParentElement(this, BillboardElement)), (_a = __privateGet(this, _billboardElement2)) == null || _a.addEventListener(
270
275
  "billboardChange",
271
- t(this, G)
272
- ), t(this, G).call(this);
276
+ __privateGet(this, _changeListener)
277
+ ), __privateGet(this, _changeListener).call(this);
273
278
  });
274
279
  }
275
280
  disconnectedCallback() {
276
- var e;
277
- (e = t(this, z)) == null || e.removeEventListener(
281
+ var _a;
282
+ (_a = __privateGet(this, _billboardElement2)) == null || _a.removeEventListener(
278
283
  "billboardChange",
279
- t(this, G)
284
+ __privateGet(this, _changeListener)
280
285
  );
281
286
  }
282
- }
283
- z = new WeakMap(), G = new WeakMap();
284
- Z && !customElements.get("e-billboard-counter") && customElements.define("e-billboard-counter", gt);
285
- var j, w, E, A;
286
- class vt extends HTMLElement {
287
+ };
288
+ _billboardElement2 = new WeakMap(), _changeListener = new WeakMap(), __name(_BillboardCounterElement, "BillboardCounterElement");
289
+ let BillboardCounterElement = _BillboardCounterElement;
290
+ isBrowser && !customElements.get("e-billboard-counter") && customElements.define("e-billboard-counter", BillboardCounterElement);
291
+ var _item, _index, _billboardElement3, _changeListener2;
292
+ const _BillboardSetButtonElement = class _BillboardSetButtonElement extends HTMLElement {
287
293
  constructor() {
288
294
  super();
289
- s(this, j, null);
290
- s(this, w, new S(this, "--index", 0));
291
- s(this, E, null);
292
- s(this, A, () => {
293
- t(this, j).updateClasses(t(this, w).current);
294
- });
295
- this.addEventListener("click", (e) => {
296
- t(this, E) && (!this.handleClick || this.handleClick(e)) && t(this, E).set(t(this, w).current);
295
+ __privateAdd(this, _item, null);
296
+ __privateAdd(this, _index, new CSSProperty(this, "--index", 0));
297
+ __privateAdd(this, _billboardElement3, null);
298
+ __privateAdd(this, _changeListener2, /* @__PURE__ */ __name(() => {
299
+ __privateGet(this, _item).updateClasses(__privateGet(this, _index).current);
300
+ }, "#changeListener"));
301
+ this.addEventListener("click", (event) => {
302
+ __privateGet(this, _billboardElement3) && (!this.handleClick || this.handleClick(event)) && __privateGet(this, _billboardElement3).set(__privateGet(this, _index).current);
297
303
  }), this.addEventListener("keydown", (e) => {
298
304
  e.code === "Space" && !this.hasAttribute("keydown-disabled") && (e.preventDefault(), this.click());
299
305
  });
300
306
  }
301
307
  connectedCallback() {
302
- return F(this, null, function* () {
303
- yield ht("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), l(this, E, _(this, U)), t(this, E) && (l(this, j, new ot(this, t(this, E))), t(this, E).addEventListener(
308
+ return __async(this, null, function* () {
309
+ yield whenDefined("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), __privateSet(this, _billboardElement3, findParentElement(this, BillboardElement)), __privateGet(this, _billboardElement3) && (__privateSet(this, _item, new BillboardItem(this, __privateGet(this, _billboardElement3))), __privateGet(this, _billboardElement3).addEventListener(
304
310
  "billboardChange",
305
- t(this, A)
306
- ), t(this, A).call(this), t(this, w).subscribe(t(this, A)), t(this, w).observe());
311
+ __privateGet(this, _changeListener2)
312
+ ), __privateGet(this, _changeListener2).call(this), __privateGet(this, _index).subscribe(__privateGet(this, _changeListener2)), __privateGet(this, _index).observe());
307
313
  });
308
314
  }
309
315
  disconnectedCallback() {
310
- var e;
311
- this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, w).unsubscribe(t(this, A)), t(this, w).unobserve(), (e = t(this, E)) == null || e.removeEventListener(
316
+ var _a;
317
+ this.removeAttribute("tabindex"), this.removeAttribute("role"), __privateGet(this, _index).unsubscribe(__privateGet(this, _changeListener2)), __privateGet(this, _index).unobserve(), (_a = __privateGet(this, _billboardElement3)) == null || _a.removeEventListener(
312
318
  "billboardChange",
313
- t(this, A)
314
- ), t(this, j).destroy();
319
+ __privateGet(this, _changeListener2)
320
+ ), __privateGet(this, _item).destroy();
315
321
  }
316
- }
317
- j = new WeakMap(), w = new WeakMap(), E = new WeakMap(), A = new WeakMap();
318
- Z && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", vt);
319
- var M, b, J;
320
- class Et extends HTMLElement {
322
+ };
323
+ _item = new WeakMap(), _index = new WeakMap(), _billboardElement3 = new WeakMap(), _changeListener2 = new WeakMap(), __name(_BillboardSetButtonElement, "BillboardSetButtonElement");
324
+ let BillboardSetButtonElement = _BillboardSetButtonElement;
325
+ isBrowser && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", BillboardSetButtonElement);
326
+ var _step, _billboardElement4, _changeListener3;
327
+ const _BillboardStepButtonElement = class _BillboardStepButtonElement extends HTMLElement {
321
328
  constructor() {
322
329
  super();
323
- s(this, M, new S(this, "--step", 1));
324
- s(this, b, null);
325
- s(this, J, () => {
326
- t(this, b) && (!t(this, b).loop.current && (t(this, b).counter === 0 && t(this, M).current <= 0 || t(this, b).counter === t(this, b).length - 1 && t(this, M).current >= 0) ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"));
327
- });
328
- this.addEventListener("click", (e) => {
329
- t(this, b) && (!this.handleClick || this.handleClick(e)) && t(this, b).shift(t(this, M).current);
330
+ __privateAdd(this, _step, new CSSProperty(this, "--step", 1));
331
+ __privateAdd(this, _billboardElement4, null);
332
+ __privateAdd(this, _changeListener3, /* @__PURE__ */ __name(() => {
333
+ __privateGet(this, _billboardElement4) && (!__privateGet(this, _billboardElement4).loop.current && (__privateGet(this, _billboardElement4).counter === 0 && __privateGet(this, _step).current <= 0 || __privateGet(this, _billboardElement4).counter === __privateGet(this, _billboardElement4).length - 1 && __privateGet(this, _step).current >= 0) ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"));
334
+ }, "#changeListener"));
335
+ this.addEventListener("click", (event) => {
336
+ __privateGet(this, _billboardElement4) && (!this.handleClick || this.handleClick(event)) && __privateGet(this, _billboardElement4).shift(__privateGet(this, _step).current);
330
337
  }), this.addEventListener("keydown", (e) => {
331
338
  e.code === "Space" && !this.hasAttribute("keydown-disabled") && (e.preventDefault(), this.click());
332
339
  });
333
340
  }
334
341
  connectedCallback() {
335
- return F(this, null, function* () {
336
- var e;
337
- yield customElements.whenDefined("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, M).observe(), this.tabIndex = 0, l(this, b, _(this, U)), (e = t(this, b)) == null || e.addEventListener(
342
+ return __async(this, null, function* () {
343
+ var _a;
344
+ yield customElements.whenDefined("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), __privateGet(this, _step).observe(), this.tabIndex = 0, __privateSet(this, _billboardElement4, findParentElement(this, BillboardElement)), (_a = __privateGet(this, _billboardElement4)) == null || _a.addEventListener(
338
345
  "billboardChange",
339
- t(this, J)
346
+ __privateGet(this, _changeListener3)
340
347
  ), setTimeout(() => {
341
- t(this, J).call(this);
348
+ __privateGet(this, _changeListener3).call(this);
342
349
  }, 0);
343
350
  });
344
351
  }
345
352
  disconnectedCallback() {
346
- var e;
347
- this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, M).unobserve(), (e = t(this, b)) == null || e.removeEventListener(
353
+ var _a;
354
+ this.removeAttribute("tabindex"), this.removeAttribute("role"), __privateGet(this, _step).unobserve(), (_a = __privateGet(this, _billboardElement4)) == null || _a.removeEventListener(
348
355
  "billboardChange",
349
- t(this, J)
356
+ __privateGet(this, _changeListener3)
350
357
  );
351
358
  }
352
- }
353
- M = new WeakMap(), b = new WeakMap(), J = new WeakMap();
354
- Z && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", Et);
359
+ };
360
+ _step = new WeakMap(), _billboardElement4 = new WeakMap(), _changeListener3 = new WeakMap(), __name(_BillboardStepButtonElement, "BillboardStepButtonElement");
361
+ let BillboardStepButtonElement = _BillboardStepButtonElement;
362
+ isBrowser && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", BillboardStepButtonElement);
355
363
  export {
356
- pt as BillboardBulletsElement,
357
- gt as BillboardCounterElement,
358
- U as BillboardElement,
359
- vt as BillboardSetButtonElement,
360
- Et as BillboardStepButtonElement
364
+ BillboardBulletsElement,
365
+ BillboardCounterElement,
366
+ BillboardElement,
367
+ BillboardSetButtonElement,
368
+ BillboardStepButtonElement
361
369
  };