@tet/tet-components 1.4.142-staging → 1.4.142-testing

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 (412) hide show
  1. package/dist/cjs/{http-codes-Dr-iFaJ9.js → http-codes-D7ffzpYW.js} +1 -1
  2. package/dist/cjs/{index-DRNSo5RU.js → index-BL_zVDFC.js} +1 -1
  3. package/dist/cjs/{index-BEOR8cIU.js → index-Dzs7Nkbj.js} +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{product-comparison-_8BsEWy8.js → product-comparison-DUzqZuWv.js} +1 -1
  6. package/dist/cjs/tet-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +3 -3
  8. package/dist/cjs/tet-address-offers-view.cjs.entry.js +3 -3
  9. package/dist/cjs/tet-address-offers_5.cjs.entry.js +4 -4
  10. package/dist/cjs/tet-assembler.cjs.entry.js +3 -3
  11. package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +1 -1
  12. package/dist/cjs/tet-autocomplete_2.cjs.entry.js +1 -1
  13. package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +3 -3
  14. package/dist/cjs/tet-b2b-configurator.cjs.entry.js +4 -4
  15. package/dist/cjs/tet-banner-nav.cjs.entry.js +3 -3
  16. package/dist/cjs/tet-bar-graph.cjs.entry.js +1 -1
  17. package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
  18. package/dist/cjs/tet-business-card.cjs.entry.js +1 -1
  19. package/dist/cjs/tet-business-compare-card.cjs.entry.js +1 -1
  20. package/dist/cjs/tet-business-round-stepper.cjs.entry.js +1 -1
  21. package/dist/cjs/tet-button.cjs.entry.js +1 -1
  22. package/dist/cjs/tet-card-list.cjs.entry.js +1 -1
  23. package/dist/cjs/tet-carousel.cjs.entry.js +3 -3
  24. package/dist/cjs/tet-checkbox_3.cjs.entry.js +1 -1
  25. package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +3 -3
  26. package/dist/cjs/tet-cloud-configurator.cjs.entry.js +3 -3
  27. package/dist/cjs/tet-colors.cjs.entry.js +1 -1
  28. package/dist/cjs/tet-compare-card-v2.cjs.entry.js +3 -3
  29. package/dist/cjs/tet-compare-card-v3.cjs.entry.js +3 -3
  30. package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
  31. package/dist/cjs/tet-compare-cards_2.cjs.entry.js +3 -3
  32. package/dist/cjs/tet-components.cjs.js +1 -1
  33. package/dist/cjs/tet-container_2.cjs.entry.js +1 -1
  34. package/dist/cjs/tet-countdown.cjs.entry.js +1 -1
  35. package/dist/cjs/tet-counter.cjs.entry.js +1 -1
  36. package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +1 -1
  37. package/dist/cjs/tet-datepicker.cjs.entry.js +1 -1
  38. package/dist/cjs/tet-dialog.cjs.entry.js +3 -3
  39. package/dist/cjs/tet-display.cjs.entry.js +1 -1
  40. package/dist/cjs/tet-divider.cjs.entry.js +1 -1
  41. package/dist/cjs/tet-dynamic-card.cjs.entry.js +1 -1
  42. package/dist/cjs/tet-expandable-input.cjs.entry.js +1 -1
  43. package/dist/cjs/tet-expansion-panel.cjs.entry.js +1 -1
  44. package/dist/cjs/tet-feedback-form.cjs.entry.js +3 -3
  45. package/dist/cjs/tet-filter.cjs.entry.js +1 -1
  46. package/dist/cjs/tet-floating-block.cjs.entry.js +1 -1
  47. package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
  48. package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
  49. package/dist/cjs/tet-grid.cjs.entry.js +1 -1
  50. package/dist/cjs/tet-icon.cjs.entry.js +2 -2
  51. package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
  52. package/dist/cjs/tet-input.cjs.entry.js +3 -3
  53. package/dist/cjs/tet-layout.cjs.entry.js +1 -1
  54. package/dist/cjs/tet-link-card-list.cjs.entry.js +1 -1
  55. package/dist/cjs/tet-link.cjs.entry.js +1 -1
  56. package/dist/cjs/tet-menu-mobile.cjs.entry.js +1 -1
  57. package/dist/cjs/tet-menu.cjs.entry.js +1 -1
  58. package/dist/cjs/tet-mini-compare-card.cjs.entry.js +1 -1
  59. package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +3 -3
  60. package/dist/cjs/tet-navigation-mobile.cjs.entry.js +3 -3
  61. package/dist/cjs/tet-news-card-list.cjs.entry.js +1 -1
  62. package/dist/cjs/tet-notification.cjs.entry.js +1 -1
  63. package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
  64. package/dist/cjs/tet-placeholder.cjs.entry.js +1 -1
  65. package/dist/cjs/tet-position.cjs.entry.js +1 -1
  66. package/dist/cjs/tet-price-view.cjs.entry.js +1 -1
  67. package/dist/cjs/tet-radio-blocks.cjs.entry.js +1 -1
  68. package/dist/cjs/tet-radio_2.cjs.entry.js +1 -1
  69. package/dist/cjs/tet-range-slider.cjs.entry.js +1 -1
  70. package/dist/cjs/tet-round-stepper.cjs.entry.js +1 -1
  71. package/dist/cjs/tet-snicker-card-group.cjs.entry.js +1 -1
  72. package/dist/cjs/tet-snicker-card.cjs.entry.js +3 -3
  73. package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
  74. package/dist/cjs/tet-spinner.cjs.entry.js +1 -1
  75. package/dist/cjs/tet-stepper-input.cjs.entry.js +3 -3
  76. package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
  77. package/dist/cjs/tet-sticky-offer.cjs.entry.js +1 -1
  78. package/dist/cjs/tet-support-search.cjs.entry.js +1 -1
  79. package/dist/cjs/tet-switch.cjs.entry.js +1 -1
  80. package/dist/cjs/tet-table.cjs.entry.js +1 -1
  81. package/dist/cjs/tet-tag_2.cjs.entry.js +3 -3
  82. package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
  83. package/dist/cjs/tet-text.cjs.entry.js +1 -1
  84. package/dist/cjs/tet-textarea.cjs.entry.js +1 -1
  85. package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +3 -3
  86. package/dist/cjs/{translations-Dgrvj2-A.js → translations-Uvcq4kv8.js} +1 -1
  87. package/dist/components/index.js +1 -1
  88. package/dist/components/{p-CSHiKkxK.js → p-2to7kTJv.js} +1 -1
  89. package/dist/components/{p-D9H54BhC.js → p-B0w6XutH.js} +1 -1
  90. package/dist/components/{p-B1XYlnsO.js → p-B5shOn6R.js} +1 -1
  91. package/dist/components/{p-CAGzjYiF.js → p-B6N7YxHC.js} +1 -1
  92. package/dist/components/{p-DZ6ri3Ez.js → p-B9bE6qY-.js} +1 -1
  93. package/dist/components/{p-DsIzsdJ8.js → p-BEdFA6DZ.js} +1 -1
  94. package/dist/components/{p-D9OY10TQ.js → p-BErbUM3q.js} +1 -1
  95. package/dist/components/{p-CpLfddvj.js → p-BGrd_jXc.js} +1 -1
  96. package/dist/components/{p-CDFYJWVh.js → p-BSgeKEN8.js} +1 -1
  97. package/dist/components/{p-DupIaie7.js → p-BY4VWk_A.js} +1 -1
  98. package/dist/components/{p-e-eXFSPT.js → p-BnUO3ALz.js} +1 -1
  99. package/dist/components/{p-dg7EpwKx.js → p-Br4jWI9B.js} +1 -1
  100. package/dist/components/{p-CS1cYeFO.js → p-ByCLz3GA.js} +1 -1
  101. package/dist/components/{p-hddOTT87.js → p-C31HYpo5.js} +1 -1
  102. package/dist/components/{p-Dp-2og5G.js → p-CFt58WeT.js} +1 -1
  103. package/dist/components/{p-CP4sqVXo.js → p-CLtgu35N.js} +1 -1
  104. package/dist/components/{p-D4pVUZud.js → p-CNsxz-TF.js} +1 -1
  105. package/dist/components/{p-CIkdXj6f.js → p-CP4Q_3_h.js} +1 -1
  106. package/dist/components/{p-BB6m7KcH.js → p-CQ-_aIdN.js} +1 -1
  107. package/dist/components/{p-EuuHQDow.js → p-CVyQHN69.js} +1 -1
  108. package/dist/components/{p-DQvcXOji.js → p-CY5_Sn7v.js} +1 -1
  109. package/dist/components/{p-_vjwjrM9.js → p-CbuDhMUw.js} +1 -1
  110. package/dist/components/{p-DLPhWYRd.js → p-CcnTBalD.js} +1 -1
  111. package/dist/components/{p-DIyhqSTP.js → p-Cdi7KDBd.js} +1 -1
  112. package/dist/components/{p-DhZEc679.js → p-Cek9urn4.js} +1 -1
  113. package/dist/components/{p-DqodZ4ND.js → p-CpCN--VD.js} +1 -1
  114. package/dist/components/{p-C0Mqt63Q.js → p-Cql4nxEu.js} +1 -1
  115. package/dist/components/{p-Dip_Lp8M.js → p-CzkbN2A4.js} +1 -1
  116. package/dist/components/{p-3yD-8Tmz.js → p-DBn7uzX0.js} +1 -1
  117. package/dist/components/{p-DiwdCJxz.js → p-DEfWYlih.js} +1 -1
  118. package/dist/components/{p-t1QSVn3y.js → p-DFvEQaqr.js} +1 -1
  119. package/dist/components/{p-DAoJRuQX.js → p-DMlV_4q1.js} +1 -1
  120. package/dist/components/{p-By3ljsXC.js → p-DQoNkrhH.js} +1 -1
  121. package/dist/components/{p-BXOKIT0e.js → p-DeyD67la.js} +1 -1
  122. package/dist/components/{p-AjTuAw1s.js → p-DkX91KH7.js} +1 -1
  123. package/dist/components/{p-B73TDo-k.js → p-Dkfa3jIg.js} +1 -1
  124. package/dist/components/{p-CtuAONCB.js → p-DnHbFZeP.js} +1 -1
  125. package/dist/components/{p-CwGM5Ts-.js → p-DqUryTE4.js} +1 -1
  126. package/dist/components/{p-CFBQ-_AF.js → p-DsTbwBba.js} +1 -1
  127. package/dist/components/{p-BkzR7Tya.js → p-DtSYb0rr.js} +1 -1
  128. package/dist/components/{p-B7f6XRIi.js → p-JZAHJ9gF.js} +1 -1
  129. package/dist/components/{p-1p6NLY3L.js → p-KagFBuv9.js} +1 -1
  130. package/dist/components/{p-CAXkylRm.js → p-L-hJhf1X.js} +1 -1
  131. package/dist/components/{p-DTa9ZfrF.js → p-NAR5FXDl.js} +1 -1
  132. package/dist/components/{p-BHahEQ8o.js → p-PYYBcx0f.js} +1 -1
  133. package/dist/components/{p-CfgD6-zK.js → p-SrRg0ryN.js} +1 -1
  134. package/dist/components/{p-C3SV5T_q.js → p-duyqedmS.js} +1 -1
  135. package/dist/components/{p-CYa2HlYX.js → p-ifvlH4_q.js} +1 -1
  136. package/dist/components/{p-BSQL7K3K.js → p-iksDLWwk.js} +1 -1
  137. package/dist/components/{p-CXP2jsSO.js → p-lEX8wezw.js} +1 -1
  138. package/dist/components/{p-DzPdEZHf.js → p-qGcwFuUf.js} +1 -1
  139. package/dist/components/{p-sKlTv2j2.js → p-v-CAD7qh.js} +1 -1
  140. package/dist/components/tet-accordion.js +1 -1
  141. package/dist/components/tet-address-offers-filters-products.js +1 -1
  142. package/dist/components/tet-address-offers-filters.js +1 -1
  143. package/dist/components/tet-address-offers-view.js +1 -1
  144. package/dist/components/tet-address-offers.js +1 -1
  145. package/dist/components/tet-address-search.js +1 -1
  146. package/dist/components/tet-assembler.js +1 -1
  147. package/dist/components/tet-asset-availability-addresses.js +1 -1
  148. package/dist/components/tet-autocomplete-dropdown.js +1 -1
  149. package/dist/components/tet-autocomplete.js +1 -1
  150. package/dist/components/tet-availability-contact-form.js +1 -1
  151. package/dist/components/tet-b2b-check-out-form.js +1 -1
  152. package/dist/components/tet-b2b-compare-card.js +1 -1
  153. package/dist/components/tet-b2b-configurator-cart.js +1 -1
  154. package/dist/components/tet-b2b-configurator.js +1 -1
  155. package/dist/components/tet-banner-nav.js +1 -1
  156. package/dist/components/tet-bar-graph.js +1 -1
  157. package/dist/components/tet-border-radius.js +1 -1
  158. package/dist/components/tet-business-card.js +1 -1
  159. package/dist/components/tet-business-compare-card.js +1 -1
  160. package/dist/components/tet-business-navigation.js +1 -1
  161. package/dist/components/tet-business-round-stepper.js +1 -1
  162. package/dist/components/tet-business-summary-card.js +1 -1
  163. package/dist/components/tet-button.js +1 -1
  164. package/dist/components/tet-card-list.js +1 -1
  165. package/dist/components/tet-carousel.js +1 -1
  166. package/dist/components/tet-checkbox.js +1 -1
  167. package/dist/components/tet-cloud-application-form-dialog.js +1 -1
  168. package/dist/components/tet-cloud-configurator.js +1 -1
  169. package/dist/components/tet-colors.js +1 -1
  170. package/dist/components/tet-compare-card-v2.js +1 -1
  171. package/dist/components/tet-compare-card-v3.js +1 -1
  172. package/dist/components/tet-compare-card.js +1 -1
  173. package/dist/components/tet-compare-cards-tab.js +1 -1
  174. package/dist/components/tet-compare-cards.js +1 -1
  175. package/dist/components/tet-container.js +1 -1
  176. package/dist/components/tet-countdown.js +1 -1
  177. package/dist/components/tet-counter.js +1 -1
  178. package/dist/components/tet-datepicker-header.js +1 -1
  179. package/dist/components/tet-datepicker-month-view.js +1 -1
  180. package/dist/components/tet-datepicker-multi-year-view.js +1 -1
  181. package/dist/components/tet-datepicker-year-view.js +1 -1
  182. package/dist/components/tet-datepicker.js +1 -1
  183. package/dist/components/tet-dialog.js +1 -1
  184. package/dist/components/tet-display.js +1 -1
  185. package/dist/components/tet-divider.js +1 -1
  186. package/dist/components/tet-dropdown.js +1 -1
  187. package/dist/components/tet-dynamic-card.js +1 -1
  188. package/dist/components/tet-expandable-input.js +1 -1
  189. package/dist/components/tet-expansion-panel.js +1 -1
  190. package/dist/components/tet-feedback-form.js +1 -1
  191. package/dist/components/tet-filter.js +1 -1
  192. package/dist/components/tet-floating-block.js +1 -1
  193. package/dist/components/tet-font-weight.js +1 -1
  194. package/dist/components/tet-fonts.js +1 -1
  195. package/dist/components/tet-grid.js +1 -1
  196. package/dist/components/tet-icon.js +1 -1
  197. package/dist/components/tet-inline-message.js +1 -1
  198. package/dist/components/tet-input.js +1 -1
  199. package/dist/components/tet-layout.js +1 -1
  200. package/dist/components/tet-link-card-list.js +1 -1
  201. package/dist/components/tet-link.js +1 -1
  202. package/dist/components/tet-loader.js +1 -1
  203. package/dist/components/tet-menu-mobile.js +1 -1
  204. package/dist/components/tet-menu.js +1 -1
  205. package/dist/components/tet-mini-compare-card.js +1 -1
  206. package/dist/components/tet-multi-step-dialog.js +1 -1
  207. package/dist/components/tet-navigation-mobile.js +1 -1
  208. package/dist/components/tet-news-card-list.js +1 -1
  209. package/dist/components/tet-notification.js +1 -1
  210. package/dist/components/tet-number-input.js +1 -1
  211. package/dist/components/tet-placeholder.js +1 -1
  212. package/dist/components/tet-position.js +1 -1
  213. package/dist/components/tet-price-view.js +1 -1
  214. package/dist/components/tet-radio-blocks.js +1 -1
  215. package/dist/components/tet-radio.js +1 -1
  216. package/dist/components/tet-range-slider.js +1 -1
  217. package/dist/components/tet-round-stepper.js +1 -1
  218. package/dist/components/tet-selection-list.js +1 -1
  219. package/dist/components/tet-snicker-card-group.js +1 -1
  220. package/dist/components/tet-snicker-card.js +1 -1
  221. package/dist/components/tet-spacing.js +1 -1
  222. package/dist/components/tet-spinner.js +1 -1
  223. package/dist/components/tet-stepper-input.js +1 -1
  224. package/dist/components/tet-stepper-v3.js +1 -1
  225. package/dist/components/tet-sticky-offer.js +1 -1
  226. package/dist/components/tet-support-search.js +1 -1
  227. package/dist/components/tet-switch.js +1 -1
  228. package/dist/components/tet-tab-content.js +1 -1
  229. package/dist/components/tet-tab-header.js +1 -1
  230. package/dist/components/tet-table.js +1 -1
  231. package/dist/components/tet-tag-group.js +1 -1
  232. package/dist/components/tet-tag.js +1 -1
  233. package/dist/components/tet-text-list.js +1 -1
  234. package/dist/components/tet-text.js +1 -1
  235. package/dist/components/tet-textarea.js +1 -1
  236. package/dist/components/tet-thank-you-view-v3.js +1 -1
  237. package/dist/components/tet-tooltip.js +1 -1
  238. package/dist/esm/{http-codes-DP6cQyLI.js → http-codes-BQGPgOl6.js} +1 -1
  239. package/dist/esm/{index-BWP8psSS.js → index-BGB6gNkz.js} +1 -1
  240. package/dist/esm/{index-BTdj-C2n.js → index-DScZlZas.js} +1 -1
  241. package/dist/esm/loader.js +2 -2
  242. package/dist/esm/{product-comparison-CBuVYKp-.js → product-comparison-DUVV7BFR.js} +1 -1
  243. package/dist/esm/tet-accordion.entry.js +1 -1
  244. package/dist/esm/tet-address-offers-filters-products_2.entry.js +3 -3
  245. package/dist/esm/tet-address-offers-view.entry.js +3 -3
  246. package/dist/esm/tet-address-offers_5.entry.js +4 -4
  247. package/dist/esm/tet-assembler.entry.js +3 -3
  248. package/dist/esm/tet-autocomplete-dropdown.entry.js +1 -1
  249. package/dist/esm/tet-autocomplete_2.entry.js +1 -1
  250. package/dist/esm/tet-b2b-check-out-form_5.entry.js +3 -3
  251. package/dist/esm/tet-b2b-configurator.entry.js +4 -4
  252. package/dist/esm/tet-banner-nav.entry.js +3 -3
  253. package/dist/esm/tet-bar-graph.entry.js +1 -1
  254. package/dist/esm/tet-border-radius.entry.js +1 -1
  255. package/dist/esm/tet-business-card.entry.js +1 -1
  256. package/dist/esm/tet-business-compare-card.entry.js +1 -1
  257. package/dist/esm/tet-business-round-stepper.entry.js +1 -1
  258. package/dist/esm/tet-button.entry.js +1 -1
  259. package/dist/esm/tet-card-list.entry.js +1 -1
  260. package/dist/esm/tet-carousel.entry.js +3 -3
  261. package/dist/esm/tet-checkbox_3.entry.js +1 -1
  262. package/dist/esm/tet-cloud-application-form-dialog.entry.js +3 -3
  263. package/dist/esm/tet-cloud-configurator.entry.js +3 -3
  264. package/dist/esm/tet-colors.entry.js +1 -1
  265. package/dist/esm/tet-compare-card-v2.entry.js +3 -3
  266. package/dist/esm/tet-compare-card-v3.entry.js +3 -3
  267. package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
  268. package/dist/esm/tet-compare-cards_2.entry.js +3 -3
  269. package/dist/esm/tet-components.js +2 -2
  270. package/dist/esm/tet-container_2.entry.js +1 -1
  271. package/dist/esm/tet-countdown.entry.js +1 -1
  272. package/dist/esm/tet-counter.entry.js +1 -1
  273. package/dist/esm/tet-datepicker-header_4.entry.js +1 -1
  274. package/dist/esm/tet-datepicker.entry.js +1 -1
  275. package/dist/esm/tet-dialog.entry.js +3 -3
  276. package/dist/esm/tet-display.entry.js +1 -1
  277. package/dist/esm/tet-divider.entry.js +1 -1
  278. package/dist/esm/tet-dynamic-card.entry.js +1 -1
  279. package/dist/esm/tet-expandable-input.entry.js +1 -1
  280. package/dist/esm/tet-expansion-panel.entry.js +1 -1
  281. package/dist/esm/tet-feedback-form.entry.js +3 -3
  282. package/dist/esm/tet-filter.entry.js +1 -1
  283. package/dist/esm/tet-floating-block.entry.js +1 -1
  284. package/dist/esm/tet-font-weight.entry.js +1 -1
  285. package/dist/esm/tet-fonts.entry.js +1 -1
  286. package/dist/esm/tet-grid.entry.js +1 -1
  287. package/dist/esm/tet-icon.entry.js +2 -2
  288. package/dist/esm/tet-inline-message.entry.js +1 -1
  289. package/dist/esm/tet-input.entry.js +3 -3
  290. package/dist/esm/tet-layout.entry.js +1 -1
  291. package/dist/esm/tet-link-card-list.entry.js +1 -1
  292. package/dist/esm/tet-link.entry.js +1 -1
  293. package/dist/esm/tet-menu-mobile.entry.js +1 -1
  294. package/dist/esm/tet-menu.entry.js +1 -1
  295. package/dist/esm/tet-mini-compare-card.entry.js +1 -1
  296. package/dist/esm/tet-multi-step-dialog.entry.js +3 -3
  297. package/dist/esm/tet-navigation-mobile.entry.js +3 -3
  298. package/dist/esm/tet-news-card-list.entry.js +1 -1
  299. package/dist/esm/tet-notification.entry.js +1 -1
  300. package/dist/esm/tet-number-input.entry.js +1 -1
  301. package/dist/esm/tet-placeholder.entry.js +1 -1
  302. package/dist/esm/tet-position.entry.js +1 -1
  303. package/dist/esm/tet-price-view.entry.js +1 -1
  304. package/dist/esm/tet-radio-blocks.entry.js +1 -1
  305. package/dist/esm/tet-radio_2.entry.js +1 -1
  306. package/dist/esm/tet-range-slider.entry.js +1 -1
  307. package/dist/esm/tet-round-stepper.entry.js +1 -1
  308. package/dist/esm/tet-snicker-card-group.entry.js +1 -1
  309. package/dist/esm/tet-snicker-card.entry.js +3 -3
  310. package/dist/esm/tet-spacing.entry.js +1 -1
  311. package/dist/esm/tet-spinner.entry.js +1 -1
  312. package/dist/esm/tet-stepper-input.entry.js +3 -3
  313. package/dist/esm/tet-stepper-v3.entry.js +1 -1
  314. package/dist/esm/tet-sticky-offer.entry.js +1 -1
  315. package/dist/esm/tet-support-search.entry.js +1 -1
  316. package/dist/esm/tet-switch.entry.js +1 -1
  317. package/dist/esm/tet-table.entry.js +1 -1
  318. package/dist/esm/tet-tag_2.entry.js +3 -3
  319. package/dist/esm/tet-text-list.entry.js +1 -1
  320. package/dist/esm/tet-text.entry.js +1 -1
  321. package/dist/esm/tet-textarea.entry.js +1 -1
  322. package/dist/esm/tet-thank-you-view-v3.entry.js +3 -3
  323. package/dist/esm/{translations-BxuQY6H_.js → translations-Dc2OQnbI.js} +1 -1
  324. package/dist/tet-components/{p-5883cc02.entry.js → p-01336e7a.entry.js} +1 -1
  325. package/dist/tet-components/{p-b1839d78.entry.js → p-06d237de.entry.js} +1 -1
  326. package/dist/tet-components/{p-63238349.entry.js → p-085ec974.entry.js} +1 -1
  327. package/dist/tet-components/{p-32492c9c.entry.js → p-19525e17.entry.js} +1 -1
  328. package/dist/tet-components/{p-35d587d8.entry.js → p-1be85243.entry.js} +1 -1
  329. package/dist/tet-components/{p-b7538f5c.entry.js → p-1be8a5bc.entry.js} +1 -1
  330. package/dist/tet-components/{p-8148aabf.entry.js → p-20f6ad3e.entry.js} +1 -1
  331. package/dist/tet-components/{p-f6d3abd5.entry.js → p-24058988.entry.js} +1 -1
  332. package/dist/tet-components/{p-f12f4f25.entry.js → p-27f233a6.entry.js} +1 -1
  333. package/dist/tet-components/{p-aad1b69d.entry.js → p-2cfcf7df.entry.js} +1 -1
  334. package/dist/tet-components/{p-4dd02c45.entry.js → p-304026be.entry.js} +1 -1
  335. package/dist/tet-components/{p-98161671.entry.js → p-3473e773.entry.js} +1 -1
  336. package/dist/tet-components/{p-5f5c3f8e.entry.js → p-35e3a3ec.entry.js} +1 -1
  337. package/dist/tet-components/{p-4fb578db.entry.js → p-3698d8ff.entry.js} +1 -1
  338. package/dist/tet-components/{p-0bb47e76.entry.js → p-37c83d33.entry.js} +1 -1
  339. package/dist/tet-components/{p-0e9ae429.entry.js → p-3996e0b7.entry.js} +1 -1
  340. package/dist/tet-components/{p-52cc694d.entry.js → p-3af65955.entry.js} +1 -1
  341. package/dist/tet-components/p-3bf29f89.entry.js +1 -0
  342. package/dist/tet-components/{p-27213d06.entry.js → p-3ce7cda9.entry.js} +1 -1
  343. package/dist/tet-components/{p-c97b0d44.entry.js → p-3d845492.entry.js} +1 -1
  344. package/dist/tet-components/{p-eda71185.entry.js → p-3f533c77.entry.js} +1 -1
  345. package/dist/tet-components/{p-8a7a46f5.entry.js → p-4215dec8.entry.js} +1 -1
  346. package/dist/tet-components/{p-ad89b9d6.entry.js → p-499bf719.entry.js} +1 -1
  347. package/dist/tet-components/{p-cfa89a0a.entry.js → p-4e018c17.entry.js} +1 -1
  348. package/dist/tet-components/{p-12326ed2.entry.js → p-56f99297.entry.js} +1 -1
  349. package/dist/tet-components/{p-3791cf26.entry.js → p-588a8b4c.entry.js} +1 -1
  350. package/dist/tet-components/{p-77a8a330.entry.js → p-597ccbc1.entry.js} +1 -1
  351. package/dist/tet-components/{p-c503fd7a.entry.js → p-5bac849e.entry.js} +1 -1
  352. package/dist/tet-components/{p-cfa1ad4d.entry.js → p-5e458bfa.entry.js} +1 -1
  353. package/dist/tet-components/{p-b64f4147.entry.js → p-632d382c.entry.js} +1 -1
  354. package/dist/tet-components/{p-933a6d56.entry.js → p-67bb4d53.entry.js} +1 -1
  355. package/dist/tet-components/{p-defc34c9.entry.js → p-6946ba58.entry.js} +1 -1
  356. package/dist/tet-components/{p-ce34b837.entry.js → p-6c28d6ac.entry.js} +1 -1
  357. package/dist/tet-components/{p-c1a67216.entry.js → p-6eb089d0.entry.js} +1 -1
  358. package/dist/tet-components/{p-d1488a3a.entry.js → p-71fa80d7.entry.js} +1 -1
  359. package/dist/tet-components/{p-d82cac78.entry.js → p-7ac2babd.entry.js} +1 -1
  360. package/dist/tet-components/{p-d6058854.entry.js → p-7bccaeee.entry.js} +1 -1
  361. package/dist/tet-components/{p-5aa46cbe.entry.js → p-7e2fa50e.entry.js} +1 -1
  362. package/dist/tet-components/{p-6bc0444a.entry.js → p-830d6a1b.entry.js} +1 -1
  363. package/dist/tet-components/{p-571d6428.entry.js → p-83be5dad.entry.js} +1 -1
  364. package/dist/tet-components/{p-5dff0e20.entry.js → p-8ab2df2d.entry.js} +1 -1
  365. package/dist/tet-components/{p-1a00251e.entry.js → p-8eed24d3.entry.js} +1 -1
  366. package/dist/tet-components/{p-62e35581.entry.js → p-915b2507.entry.js} +1 -1
  367. package/dist/tet-components/{p-fa9dfca2.entry.js → p-9183aa09.entry.js} +1 -1
  368. package/dist/tet-components/{p-ba69de46.entry.js → p-96438761.entry.js} +1 -1
  369. package/dist/tet-components/{p-edcd3af7.entry.js → p-973193d0.entry.js} +1 -1
  370. package/dist/tet-components/{p-b362a81e.entry.js → p-9761bc72.entry.js} +1 -1
  371. package/dist/tet-components/{p-ad206225.entry.js → p-97ce6978.entry.js} +1 -1
  372. package/dist/tet-components/{p-d056d09b.entry.js → p-9ae4f442.entry.js} +1 -1
  373. package/dist/tet-components/{p-261a3dcf.entry.js → p-9d7fbd42.entry.js} +1 -1
  374. package/dist/tet-components/{p-BWP8psSS.js → p-BGB6gNkz.js} +1 -1
  375. package/dist/tet-components/p-BzLFf73g.js +1 -0
  376. package/dist/tet-components/p-C1XJmhDH.js +1 -0
  377. package/dist/tet-components/{p-CEkiSmjX.js → p-DX1IQAn5.js} +1 -1
  378. package/dist/tet-components/{p-Ojgt8vhK.js → p-DbJll7nz.js} +1 -1
  379. package/dist/tet-components/{p-76e598e5.entry.js → p-a2aedef8.entry.js} +1 -1
  380. package/dist/tet-components/{p-2554725a.entry.js → p-a74562c2.entry.js} +1 -1
  381. package/dist/tet-components/{p-bb961658.entry.js → p-aae1bc5a.entry.js} +1 -1
  382. package/dist/tet-components/{p-e068d247.entry.js → p-b4f3985e.entry.js} +1 -1
  383. package/dist/tet-components/{p-b8a9e613.entry.js → p-b5e665c7.entry.js} +1 -1
  384. package/dist/tet-components/{p-461b9623.entry.js → p-b7263345.entry.js} +1 -1
  385. package/dist/tet-components/{p-8ae75070.entry.js → p-b86022d7.entry.js} +1 -1
  386. package/dist/tet-components/{p-0564a3a7.entry.js → p-be2a472c.entry.js} +1 -1
  387. package/dist/tet-components/{p-156bb292.entry.js → p-c0c302fe.entry.js} +1 -1
  388. package/dist/tet-components/{p-0f616426.entry.js → p-c27be82c.entry.js} +1 -1
  389. package/dist/tet-components/{p-a2104cad.entry.js → p-c37ccaaa.entry.js} +1 -1
  390. package/dist/tet-components/{p-8fec40e7.entry.js → p-c44052cb.entry.js} +1 -1
  391. package/dist/tet-components/{p-854d09d1.entry.js → p-c541b10f.entry.js} +1 -1
  392. package/dist/tet-components/{p-e5d1e096.entry.js → p-c9e434c1.entry.js} +1 -1
  393. package/dist/tet-components/{p-72306953.entry.js → p-c9f14568.entry.js} +1 -1
  394. package/dist/tet-components/{p-d2179734.entry.js → p-cd7efc99.entry.js} +1 -1
  395. package/dist/tet-components/{p-3f0547b8.entry.js → p-cdb8c877.entry.js} +1 -1
  396. package/dist/tet-components/{p-3556eb79.entry.js → p-cfdad238.entry.js} +1 -1
  397. package/dist/tet-components/{p-2e5144eb.entry.js → p-d2bb410e.entry.js} +1 -1
  398. package/dist/tet-components/{p-908713dc.entry.js → p-d8b4261d.entry.js} +1 -1
  399. package/dist/tet-components/{p-c31ded4f.entry.js → p-df68eb4e.entry.js} +1 -1
  400. package/dist/tet-components/{p-4f339642.entry.js → p-e2d4e5c3.entry.js} +1 -1
  401. package/dist/tet-components/{p-ce5b5cc5.entry.js → p-e564d494.entry.js} +1 -1
  402. package/dist/tet-components/{p-eb219b3a.entry.js → p-e7e18cc4.entry.js} +1 -1
  403. package/dist/tet-components/{p-e153ba4f.entry.js → p-ec4710dd.entry.js} +1 -1
  404. package/dist/tet-components/{p-28456488.entry.js → p-ee489b61.entry.js} +1 -1
  405. package/dist/tet-components/{p-35f0994e.entry.js → p-f21e5e14.entry.js} +1 -1
  406. package/dist/tet-components/{p-ddc1d183.entry.js → p-f5d610ea.entry.js} +1 -1
  407. package/dist/tet-components/{p-bbfe168a.entry.js → p-fcfc7424.entry.js} +1 -1
  408. package/dist/tet-components/tet-components.esm.js +1 -1
  409. package/package.json +1 -1
  410. package/dist/tet-components/p-717cdd65.entry.js +0 -1
  411. package/dist/tet-components/p-Bi5WA4Eb.js +0 -1
  412. package/dist/tet-components/p-D5A3ic42.js +0 -1
@@ -1,4 +1,4 @@
1
- import{E as t}from"./p-BWP8psSS.js";class e{url;options;data;errorFallbackValue;defaultOptions={mode:"cors"};setUrl(t){return this.url=t,this}setOptions(t){return this.options=t,this}setData(t){return this.data=t,this}setErrorFallbackValue(t){return this.errorFallbackValue=t,this}execute(t=!1){return fetch(this.url,{...this.defaultOptions,...this.options,body:JSON.stringify(this.data)}).then((async e=>t?e:(await e.json())?.data)).catch((t=>{if(void 0!==this.errorFallbackValue)return this.errorFallbackValue;throw t}))}}var n={endpoints:{operations:"/operations/",address:"/addresses/",addressSearch:"/addresses/search/",translations:"/translations/",queryCustomer:"/customer/data/",customerAssets:"/customer/assets/",productComparison:"/v2/sac/product-data",catalogOffers:"/catalog/offers/",createCallCenterTask:"/tasks/create-callcenter-task/",componentData:"/web-components/data/",tvPlatformChannels:"/tv/channels/platform/",tvPackages:"/tv/packages/",metastoreProducts:"/metastore/products",cloudConfigurator:"/metastore/cloud-calculator-fields",serviceAvailabilityServices:"/sac/available-services",b2bConfigurator:"/metastore/b2b/configurator",assemblerScenario:"/sac/assembler"},testing:{baseUrl:"https://tst-gateway.tet.lv/api"},staging:{baseUrl:"https://uat-gateway.tet.lv/api"},production:{baseUrl:"https://gateway.tet.lv/api"}};const i=n.endpoints,s=n[t.environment]??{},r=Object.keys(i??[]).reduce(((t,e)=>({...t,[e]:`${s.baseUrl}${i[e]}`})),{})??{};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},c.apply(this,arguments)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=l(t);if(e){var s=l(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}var v=function(){function t(){h(this,t)}return u(t,[{key:"listenForWhisper",value:function(t,e){return this.listen(".client-"+t,e)}},{key:"notification",value:function(t){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",t)}},{key:"stopListeningForWhisper",value:function(t,e){return this.stopListening(".client-"+t,e)}}]),t}(),p=function(){function t(e){h(this,t),this.namespace=e}return u(t,[{key:"format",value:function(t){return[".","\\"].includes(t.charAt(0))?t.substring(1):(this.namespace&&(t=this.namespace+"."+t),t.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(t){this.namespace=t}}]),t}(),w=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).name=i,r.pusher=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"listenToAll",value:function(t){var e=this;return this.subscription.bind_global((function(n,i){if(!n.startsWith("pusher:")){var s=e.options.namespace.replace(/\./g,"\\"),r=n.startsWith(s)?n.substring(s.length+1):"."+n;t(r,i)}})),this}},{key:"stopListening",value:function(t,e){return e?this.subscription.unbind(this.eventFormatter.format(t),e):this.subscription.unbind(this.eventFormatter.format(t)),this}},{key:"stopListeningToAll",value:function(t){return t?this.subscription.unbind_global(t):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(t){return this.on("pusher:subscription_succeeded",(function(){t()})),this}},{key:"error",value:function(t){return this.on("pusher:subscription_error",(function(e){t(e)})),this}},{key:"on",value:function(t,e){return this.subscription.bind(t,e),this}}]),e}(),b=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),y=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),g=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("pusher:subscription_succeeded",(function(e){t(Object.keys(e.members).map((function(t){return e.members[t]})))})),this}},{key:"joining",value:function(t){return this.on("pusher:member_added",(function(e){t(e.info)})),this}},{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}},{key:"leaving",value:function(t){return this.on("pusher:member_removed",(function(e){t(e.info)})),this}}]),e}(),k=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).events={},r.listeners={},r.name=i,r.socket=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t,e){return this.unbindEvent(this.eventFormatter.format(t),e),this}},{key:"subscribed",value:function(t){return this.on("connect",(function(e){t(e)})),this}},{key:"error",value:function(){return this}},{key:"on",value:function(t,e){var n=this;return this.listeners[t]=this.listeners[t]||[],this.events[t]||(this.events[t]=function(e,i){n.name===e&&n.listeners[t]&&n.listeners[t].forEach((function(t){return t(i)}))},this.socket.on(t,this.events[t])),this.listeners[t].push(e),this}},{key:"unbind",value:function(){var t=this;Object.keys(this.events).forEach((function(e){t.unbindEvent(e)}))}},{key:"unbindEvent",value:function(t,e){this.listeners[t]=this.listeners[t]||[],e&&(this.listeners[t]=this.listeners[t].filter((function(t){return t!==e}))),e&&0!==this.listeners[t].length||(this.events[t]&&(this.socket.removeListener(t,this.events[t]),delete this.events[t]),delete this.listeners[t])}}]),e}(),m=function(){a(e,k);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}}]),e}(),S=function(){a(e,m);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("presence:subscribed",(function(e){t(e.map((function(t){return t.user_info})))})),this}},{key:"joining",value:function(t){return this.on("presence:joining",(function(e){return t(e.user_info)})),this}},{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}},{key:"leaving",value:function(t){return this.on("presence:leaving",(function(e){return t(e.user_info)})),this}}]),e}(),_=function(){a(e,v);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(){return this}},{key:"listenToAll",value:function(){return this}},{key:"stopListening",value:function(){return this}},{key:"subscribed",value:function(){return this}},{key:"error",value:function(){return this}},{key:"on",value:function(){return this}}]),e}(),j=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(){return this}}]),e}(),C=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(){return this}},{key:"joining",value:function(){return this}},{key:"whisper",value:function(){return this}},{key:"leaving",value:function(){return this}}]),e}(),O=function(){function t(e){h(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(e),this.connect()}return u(t,[{key:"setOptions",value:function(t){this.options=c(this._defaultOptions,t);var e=this.csrfToken();return e&&(this.options.auth.headers["X-CSRF-TOKEN"]=e,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=e),(e=this.options.bearerToken)&&(this.options.auth.headers.Authorization="Bearer "+e,this.options.userAuthentication.headers.Authorization="Bearer "+e),t}},{key:"csrfToken",value:function(){var t;return"undefined"!=typeof window&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:"undefined"!=typeof document&&"function"==typeof document.querySelector&&(t=document.querySelector('meta[name="csrf-token"]'))?t.getAttribute("content"):null}}]),t}(),E=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){this.pusher=void 0!==this.options.client?this.options.client:this.options.Pusher?new this.options.Pusher(this.options.key,this.options):new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new w(this.pusher,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new b(this.pusher,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"encryptedPrivateChannel",value:function(t){return this.channels["private-encrypted-"+t]||(this.channels["private-encrypted-"+t]=new y(this.pusher,"private-encrypted-"+t,this.options)),this.channels["private-encrypted-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new g(this.pusher,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"private-encrypted-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),e}(),T=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){var t=this,e=this.getSocketIO();return this.socket=e(this.options.host,this.options),this.socket.on("reconnect",(function(){Object.values(t.channels).forEach((function(t){t.subscribe()}))})),this.socket}},{key:"getSocketIO",value:function(){if(void 0!==this.options.client)return this.options.client;if("undefined"!=typeof io)return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new k(this.socket,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new m(this.socket,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new S(this.socket,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),e}(),x=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){}},{key:"listen",value:function(){return new _}},{key:"channel",value:function(){return new _}},{key:"privateChannel",value:function(){return new j}},{key:"encryptedPrivateChannel",value:function(){return new j}},{key:"presenceChannel",value:function(){return new C}},{key:"leave",value:function(){}},{key:"leaveChannel",value:function(){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),e}(),P=function(){function t(e){h(this,t),this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return u(t,[{key:"channel",value:function(t){return this.connector.channel(t)}},{key:"connect",value:function(){if("reverb"==this.options.broadcaster)this.connector=new E(c(c({},this.options),{cluster:""}));else if("pusher"==this.options.broadcaster)this.connector=new E(this.options);else if("socket.io"==this.options.broadcaster)this.connector=new T(this.options);else if("null"==this.options.broadcaster)this.connector=new x(this.options);else{if("function"!=typeof this.options.broadcaster)throw new Error("Broadcaster ".concat(o(this.options.broadcaster)," ").concat(this.options.broadcaster," is not supported."));this.connector=new this.options.broadcaster(this.options)}}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(t){return this.connector.presenceChannel(t)}},{key:"leave",value:function(t){this.connector.leave(t)}},{key:"leaveChannel",value:function(t){this.connector.leaveChannel(t)}},{key:"leaveAllChannels",value:function(){for(var t in this.connector.channels)this.leaveChannel(t)}},{key:"listen",value:function(t,e,n){return this.connector.listen(t,e,n)}},{key:"private",value:function(t){return this.connector.privateChannel(t)}},{key:"encryptedPrivate",value:function(t){return this.connector.encryptedPrivateChannel(t)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){"function"==typeof Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup(),"object"===("undefined"==typeof Turbo?"undefined":o(Turbo))&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var t=this;Vue.http.interceptors.push((function(e,n){t.socketId()&&e.headers.set("X-Socket-ID",t.socketId()),n()}))}},{key:"registerAxiosRequestInterceptor",value:function(){var t=this;axios.interceptors.request.use((function(e){return t.socketId()&&(e.headers["X-Socket-Id"]=t.socketId()),e}))}},{key:"registerjQueryAjaxSetup",value:function(){var t=this;void 0!==jQuery.ajax&&jQuery.ajaxPrefilter((function(e,n,i){t.socketId()&&i.setRequestHeader("X-Socket-Id",t.socketId())}))}},{key:"registerTurboRequestInterceptor",value:function(){var t=this;document.addEventListener("turbo:before-fetch-request",(function(e){e.detail.fetchOptions.headers["X-Socket-Id"]=t.socketId()}))}}]),t}();function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I,A,N={exports:{}},L=I?N.exports:(I=1,window,A=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},n(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var s=256,r=function(){function t(t){void 0===t&&(t="="),this._paddingCharacter=t}return t.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(8*t+5)/6|0},t.prototype.encode=function(t){for(var e="",n=0;n<t.length-2;n+=3)e+=this._encodeByte((i=t[n]<<16|t[n+1]<<8|t[n+2])>>>18&63),e+=this._encodeByte(i>>>12&63),e+=this._encodeByte(i>>>6&63),e+=this._encodeByte(i>>>0&63);var i,s=t.length-n;return s>0&&(e+=this._encodeByte((i=t[n]<<16|(2===s?t[n+1]<<8:0))>>>18&63),e+=this._encodeByte(i>>>12&63),e+=2===s?this._encodeByte(i>>>6&63):this._paddingCharacter||"",e+=this._paddingCharacter||""),e},t.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(6*t+7)/8|0},t.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},t.prototype.decode=function(t){if(0===t.length)return new Uint8Array(0);for(var e=this._getPaddingLength(t),n=t.length-e,i=new Uint8Array(this.maxDecodedLength(n)),r=0,o=0,h=0,u=0,c=0,a=0,l=0;o<n-4;o+=4)u=this._decodeChar(t.charCodeAt(o+0)),c=this._decodeChar(t.charCodeAt(o+1)),a=this._decodeChar(t.charCodeAt(o+2)),l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=u<<2|c>>>4,i[r++]=c<<4|a>>>2,i[r++]=a<<6|l,h|=u&s,h|=c&s,h|=a&s,h|=l&s;if(o<n-1&&(u=this._decodeChar(t.charCodeAt(o)),c=this._decodeChar(t.charCodeAt(o+1)),i[r++]=u<<2|c>>>4,h|=u&s,h|=c&s),o<n-2&&(a=this._decodeChar(t.charCodeAt(o+2)),i[r++]=c<<4|a>>>2,h|=a&s),o<n-3&&(l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=a<<6|l,h|=l&s),0!==h)throw new Error("Base64Coder: incorrect characters for decoding");return i},t.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-15,e+=62-t>>>8&3,String.fromCharCode(e)},t.prototype._decodeChar=function(t){var e=s;return e+=(42-t&t-44)>>>8&-256+t-43+62,e+=(46-t&t-48)>>>8&-256+t-47+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},t.prototype._getPaddingLength=function(t){var e=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)e++;if(t.length<4||e>2)throw new Error("Base64Coder: incorrect padding")}return e},t}();e.Coder=r;var o=new r;e.encode=function(t){return o.encode(t)},e.decode=function(t){return o.decode(t)};var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-13,e+=62-t>>>8&49,String.fromCharCode(e)},e.prototype._decodeChar=function(t){var e=s;return e+=(44-t&t-46)>>>8&-256+t-45+62,e+=(94-t&t-96)>>>8&-256+t-95+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},e}(r);e.URLSafeCoder=h;var u=new h;e.encodeURLSafe=function(t){return u.encode(t)},e.decodeURLSafe=function(t){return u.decode(t)},e.encodedLength=function(t){return o.encodedLength(t)},e.maxDecodedLength=function(t){return o.maxDecodedLength(t)},e.decodedLength=function(t){return o.decodedLength(t)}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="utf8: invalid string",i="utf8: invalid source encoding";function s(t){for(var e=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);if(s<128)e+=1;else if(s<2048)e+=2;else if(s<55296)e+=3;else{if(!(s<=57343))throw new Error(n);if(i>=t.length-1)throw new Error(n);i++,e+=4}}return e}e.encode=function(t){for(var e=new Uint8Array(s(t)),n=0,i=0;i<t.length;i++){var r=t.charCodeAt(i);r<128?e[n++]=r:r<2048?(e[n++]=192|r>>6,e[n++]=128|63&r):r<55296?(e[n++]=224|r>>12,e[n++]=128|r>>6&63,e[n++]=128|63&r):(i++,r=(1023&r)<<10,r|=1023&t.charCodeAt(i),e[n++]=240|(r+=65536)>>18,e[n++]=128|r>>12&63,e[n++]=128|r>>6&63,e[n++]=128|63&r)}return e},e.encodedLength=s,e.decode=function(t){for(var e=[],n=0;n<t.length;n++){var s=t[n];if(128&s){var r=void 0;if(s<224){if(n>=t.length)throw new Error(i);if(128!=(192&(o=t[++n])))throw new Error(i);s=(31&s)<<6|63&o,r=128}else if(s<240){if(n>=t.length-1)throw new Error(i);var o=t[++n],h=t[++n];if(128!=(192&o)||128!=(192&h))throw new Error(i);s=(15&s)<<12|(63&o)<<6|63&h,r=2048}else{if(!(s<248))throw new Error(i);if(n>=t.length-2)throw new Error(i);o=t[++n],h=t[++n];var u=t[++n];if(128!=(192&o)||128!=(192&h)||128!=(192&u))throw new Error(i);s=(15&s)<<18|(63&o)<<12|(63&h)<<6|63&u,r=65536}if(s<r||s>=55296&&s<=57343)throw new Error(i);if(s>=65536){if(s>1114111)throw new Error(i);s-=65536,e.push(String.fromCharCode(55296|s>>10)),s=56320|1023&s}}e.push(String.fromCharCode(s))}return e.join("")}},function(t,e,n){t.exports=n(3).default},function(t,e,n){n.r(e);class i{constructor(t,e){this.lastId=0,this.prefix=t,this.name=e}create(t){this.lastId++;var e=this.lastId,n=this.prefix+e,i=this.name+"["+e+"]",s=!1,r=function(){s||(t.apply(null,arguments),s=!0)};return this[e]=r,{number:e,id:n,name:i,callback:r}}remove(t){delete this[t.number]}}var s=new i("_pusher_script_","Pusher.ScriptReceivers"),r="8.3.0",o=7,h=80,u=443,c="",a="sockjs.pusher.com",l=80,f=443,d="/pusher",v="stats.pusher.com",p="/pusher/auth",w="ajax",b=12e4,y=3e4,g=1e4,k={endpoint:"/pusher/user-auth",transport:"ajax"},m={endpoint:"/pusher/auth",transport:"ajax"},S="http://js.pusher.com",_="https://js.pusher.com",j="",C=new i("_pusher_dependencies","Pusher.DependenciesReceivers"),O=new class{constructor(t){this.options=t,this.receivers=t.receivers||s,this.loading={}}load(t,e,n){var i=this;if(i.loading[t]&&i.loading[t].length>0)i.loading[t].push(n);else{i.loading[t]=[n];var s=_e.createScriptRequest(i.getPath(t,e)),r=i.receivers.create((function(e){if(i.receivers.remove(r),i.loading[t]){var n=i.loading[t];delete i.loading[t];for(var o=function(t){t||s.cleanup()},h=0;h<n.length;h++)n[h](e,o)}}));s.send(r)}}getRoot(t){var e=_e.getDocument().location.protocol;return(t&&t.useTLS||"https:"===e?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version}getPath(t,e){return this.getRoot(e)+"/"+t+this.options.suffix+".js"}}({cdn_http:S,cdn_https:_,version:r,suffix:j,receivers:C});const E={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var T,x=function(t){const e=E.urls[t];if(!e)return"";let n;return e.fullUrl?n=e.fullUrl:e.path&&(n=E.baseUrl+e.path),n?`See: ${n}`:""};!function(t){t.UserAuthentication="user-authentication",t.ChannelAuthorization="channel-authorization"}(T||(T={}));class P extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class I extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class A extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class N extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class L extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class U extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class M extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class $ extends Error{constructor(t,e){super(e),this.status=t,Object.setPrototypeOf(this,new.target.prototype)}}var D=function(t,e,n,i,s){const r=_e.createXHR();for(var o in r.open("POST",n.endpoint,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.headers)r.setRequestHeader(o,n.headers[o]);if(null!=n.headersProvider){let t=n.headersProvider();for(var o in t)r.setRequestHeader(o,t[o])}return r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){let t,e=!1;try{t=JSON.parse(r.responseText),e=!0}catch(t){s(new $(200,`JSON returned from ${i.toString()} endpoint was invalid, yet status code was 200. Data was: ${r.responseText}`),null)}e&&s(null,t)}else{let t="";switch(i){case T.UserAuthentication:t=x("authenticationEndpoint");break;case T.ChannelAuthorization:t=`Clients must be authorized to join private or presence channels. ${x("authorizationEndpoint")}`}s(new $(r.status,`Unable to retrieve auth string from ${i.toString()} endpoint - received status: ${r.status} from ${n.endpoint}. ${t}`),null)}},r.send(e),r},z=String.fromCharCode,B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?z(192|e>>>6)+z(128|63&e):z(224|e>>>12&15)+z(128|e>>>6&63)+z(128|63&e)},J=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[B.charAt(n>>>18),B.charAt(n>>>12&63),e>=2?"=":B.charAt(n>>>6&63),e>=1?"=":B.charAt(63&n)].join("")},F=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,J)},q=class{constructor(t,e,n,i){this.clear=e,this.timer=t((()=>{this.timer&&(this.timer=i(this.timer))}),n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function X(t){window.clearTimeout(t)}function W(t){window.clearInterval(t)}class V extends q{constructor(t,e){super(setTimeout,X,t,(function(){return e(),null}))}}class Q extends q{constructor(t,e){super(setInterval,W,t,(function(t){return e(),t}))}}var G={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:t=>new V(0,t),method(t,...e){var n=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,n.concat(arguments))}}},Y=G;function K(t,...e){for(var n=0;n<e.length;n++){var i=e[n];for(var s in i)t[s]=i[s]&&i[s].constructor&&i[s].constructor===Object?K(t[s]||{},i[s]):i[s]}return t}function Z(){for(var t=["Pusher"],e=0;e<arguments.length;e++)t.push("string"==typeof arguments[e]?arguments[e]:ct(arguments[e]));return t.join(" : ")}function tt(t,e){var n=Array.prototype.indexOf;if(null===t)return-1;if(n&&t.indexOf===n)return t.indexOf(e);for(var i=0,s=t.length;i<s;i++)if(t[i]===e)return i;return-1}function et(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n,t)}function nt(t){var e=[];return et(t,(function(t,n){e.push(n)})),e}function it(t,e,n){for(var i=0;i<t.length;i++)e.call(n||window,t[i],i,t)}function st(t,e){for(var n=[],i=0;i<t.length;i++)n.push(e(t[i],i,t,n));return n}function rt(t,e){e=e||function(t){return!!t};for(var n=[],i=0;i<t.length;i++)e(t[i],i,t,n)&&n.push(t[i]);return n}function ot(t,e){var n={};return et(t,(function(i,s){(e&&e(i,s,t,n)||Boolean(i))&&(n[s]=i)})),n}function ht(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1}function ut(t){return e=function(t){return"object"==typeof t&&(t=ct(t)),encodeURIComponent((e=t.toString(),F(e.replace(/[^\x00-\x7F]/g,H))));var e},n={},et(t,(function(t,i){n[i]=e(t)})),n;var e,n}function ct(t){try{return JSON.stringify(t)}catch(i){return JSON.stringify((e=[],n=[],function t(i,s){var r,o,h;switch(typeof i){case"object":if(!i)return null;for(r=0;r<e.length;r+=1)if(e[r]===i)return{$ref:n[r]};if(e.push(i),n.push(s),"[object Array]"===Object.prototype.toString.apply(i))for(h=[],r=0;r<i.length;r+=1)h[r]=t(i[r],s+"["+r+"]");else for(o in h={},i)Object.prototype.hasOwnProperty.call(i,o)&&(h[o]=t(i[o],s+"["+JSON.stringify(o)+"]"));return h;case"number":case"string":case"boolean":return i}}(t,"$")))}var e,n}var at=new class{constructor(){this.globalLog=t=>{window.console&&window.console.log&&window.console.log(t)}}debug(...t){this.log(this.globalLog,t)}warn(...t){this.log(this.globalLogWarn,t)}error(...t){this.log(this.globalLogError,t)}globalLogWarn(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)}globalLogError(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)}log(t,...e){var n=Z.apply(this,arguments);ze.log?ze.log(n):ze.logToConsole&&t.bind(this)(n)}},lt=function(t,e,n,i,s){void 0===n.headers&&null==n.headersProvider||at.warn(`To send headers with the ${i.toString()} request, you must use AJAX, rather than JSONP.`);var r=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var o=t.getDocument(),h=o.createElement("script");t.auth_callbacks[r]=function(t){s(null,t)},h.src=n.endpoint+"?callback="+encodeURIComponent("Pusher.auth_callbacks['"+r+"']")+"&"+e;var u=o.getElementsByTagName("head")[0]||o.documentElement;u.insertBefore(h,u.firstChild)};class ft{constructor(t){this.src=t}send(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var i=document.getElementsByTagName("head")[0];i.insertBefore(e.script,i.firstChild),e.errorScript&&i.insertBefore(e.errorScript,e.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class dt{constructor(t,e){this.url=t,this.data=e}send(t){if(!this.request){var e=st((n=ut(ot(this.data,(function(t){return void 0!==t}))),i=[],et(n,(function(t,e){i.push([e,t])})),i),Y.method("join","=")).join("&");this.request=_e.createScriptRequest(this.url+"/"+t.number+"?"+e),this.request.send(t)}var n,i}cleanup(){this.request&&this.request.cleanup()}}var vt={name:"jsonp",getAgent:function(t,e){return function(n,i){var r=_e.createJSONPRequest("http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,n),o=_e.ScriptReceivers.create((function(e,n){s.remove(o),r.cleanup(),n&&n.host&&(t.host=n.host),i&&i(e,n)}));r.send(o)}}};function pt(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function wt(t,e){return"/app/"+t+"?protocol="+o+"&client=js&version="+r+(e?"&"+e:"")}var bt={getInitial:function(t,e){return pt("ws",e,(e.httpPath||"")+wt(t,"flash=false"))}},yt={getInitial:function(t,e){return pt("http",e,(e.httpPath||"/pusher")+wt(t))}},gt={getInitial:function(t,e){return pt("http",e,e.httpPath||"/pusher")},getPath:function(t){return wt(t)}};class kt{constructor(){this._callbacks={}}get(t){return this._callbacks[mt(t)]}add(t,e,n){var i=mt(t);this._callbacks[i]=this._callbacks[i]||[],this._callbacks[i].push({fn:e,context:n})}remove(t,e,n){if(t||e||n){var i=t?[mt(t)]:nt(this._callbacks);e||n?this.removeCallback(i,e,n):this.removeAllCallbacks(i)}else this._callbacks={}}removeCallback(t,e,n){it(t,(function(t){this._callbacks[t]=rt(this._callbacks[t]||[],(function(t){return e&&e!==t.fn||n&&n!==t.context})),0===this._callbacks[t].length&&delete this._callbacks[t]}),this)}removeAllCallbacks(t){it(t,(function(t){delete this._callbacks[t]}),this)}}function mt(t){return"_"+t}class St{constructor(t){this.callbacks=new kt,this.global_callbacks=[],this.failThrough=t}bind(t,e,n){return this.callbacks.add(t,e,n),this}bind_global(t){return this.global_callbacks.push(t),this}unbind(t,e,n){return this.callbacks.remove(t,e,n),this}unbind_global(t){return t?(this.global_callbacks=rt(this.global_callbacks||[],(e=>e!==t)),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(t,e,n){for(var i=0;i<this.global_callbacks.length;i++)this.global_callbacks[i](t,e);var s=this.callbacks.get(t),r=[];if(n?r.push(e,n):e&&r.push(e),s&&s.length>0)for(i=0;i<s.length;i++)s[i].fn.apply(s[i].context||window,r);else this.failThrough&&this.failThrough(t,e);return this}}class _t extends St{constructor(t,e,n,i,s){super(),this.initialize=_e.transportConnectionInitializer,this.hooks=t,this.name=e,this.priority=n,this.key=i,this.options=s,this.state="new",this.timeline=s.timeline,this.activityTimeout=s.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return Boolean(this.hooks.handlesActivityChecks)}supportsPing(){return Boolean(this.hooks.supportsPing)}connect(){if(this.socket||"initialized"!==this.state)return!1;var t=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(t,this.options)}catch(t){return Y.defer((()=>{this.onError(t),this.changeState("closed")})),!1}return this.bindListeners(),at.debug("Connecting",{transport:this.name,url:t}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(t){return"open"===this.state&&(Y.defer((()=>{this.socket&&this.socket.send(t)})),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))}onClose(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(t){this.emit("message",t)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=t=>{this.onError(t)},this.socket.onclose=t=>{this.onClose(t)},this.socket.onmessage=t=>{this.onMessage(t)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)}buildTimelineMessage(t){return K({cid:this.id},t)}}class jt{constructor(t){this.hooks=t}isSupported(t){return this.hooks.isSupported(t)}createConnection(t,e,n,i){return new _t(this.hooks,t,e,n,i)}}var Ct=new jt({urls:bt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(_e.getWebSocketAPI())},isSupported:function(){return Boolean(_e.getWebSocketAPI())},getSocket:function(t){return _e.createWebSocket(t)}}),Ot={urls:yt,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Et=K({getSocket:function(t){return _e.HTTPFactory.createStreamingSocket(t)}},Ot),Tt=K({getSocket:function(t){return _e.HTTPFactory.createPollingSocket(t)}},Ot),xt={isSupported:function(){return _e.isXHRSupported()}},Pt={ws:Ct,xhr_streaming:new jt(K({},Et,xt)),xhr_polling:new jt(K({},Tt,xt))},Rt=new jt({file:"sockjs",urls:gt,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:O.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),It={isSupported:function(t){return _e.isXDRSupported(t.useTLS)}},At=new jt(K({},Et,It)),Nt=new jt(K({},Tt,It));Pt.xdr_streaming=At,Pt.xdr_polling=Nt,Pt.sockjs=Rt;var Lt=Pt,Ut=new class extends St{constructor(){super();var t=this;void 0!==window.addEventListener&&(window.addEventListener("online",(function(){t.emit("online")}),!1),window.addEventListener("offline",(function(){t.emit("offline")}),!1))}isOnline(){return void 0===window.navigator.onLine||window.navigator.onLine}};class Mt{constructor(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(t,e,n,i){i=K({},i,{activityTimeout:this.pingDelay});var s=this.transport.createConnection(t,e,n,i),r=null,o=function(){s.unbind("open",o),s.bind("closed",h),r=Y.now()},h=t=>{if(s.unbind("closed",h),1002===t.code||1003===t.code)this.manager.reportDeath();else if(!t.wasClean&&r){var e=Y.now()-r;e<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(e/2,this.minPingDelay))}};return s.bind("open",o),s}isSupported(t){return this.manager.isAlive()&&this.transport.isSupported(t)}}const $t={decodeMessage:function(t){try{var e=JSON.parse(t.data),n=e.data;if("string"==typeof n)try{n=JSON.parse(e.data)}catch(t){}var i={event:e.event,channel:e.channel,data:n};return e.user_id&&(i.user_id=e.user_id),i}catch(e){throw{type:"MessageParseError",error:e,data:t.data}}},encodeMessage:function(t){return JSON.stringify(t)},processHandshake:function(t){var e=$t.decodeMessage(t);if("pusher:connection_established"===e.event){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:1e3*e.data.activity_timeout}}if("pusher:error"===e.event)return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"},getCloseAction:function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?"backoff":null:4e3===t.code?"tls_only":t.code<4100?"refused":t.code<4200?"backoff":t.code<4300?"retry":"refused"},getCloseError:function(t){return 1e3!==t.code&&1001!==t.code?{type:"PusherError",data:{code:t.code,message:t.reason||t.message}}:null}};var Dt=$t;class zt extends St{constructor(t,e){super(),this.id=t,this.transport=e,this.activityTimeout=e.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(t){return this.transport.send(t)}send_event(t,e,n){var i={event:t,data:e};return n&&(i.channel=n),at.debug("Event sent",i),this.send(Dt.encodeMessage(i))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var t={message:t=>{var e;try{e=Dt.decodeMessage(t)}catch(e){this.emit("error",{type:"MessageParseError",error:e,data:t.data})}if(void 0!==e){switch(at.debug("Event recd",e),e.event){case"pusher:error":this.emit("error",{type:"PusherError",data:e.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong")}this.emit("message",e)}},activity:()=>{this.emit("activity")},error:t=>{this.emit("error",t)},closed:t=>{e(),t&&t.code&&this.handleCloseEvent(t),this.transport=null,this.emit("closed")}},e=()=>{et(t,((t,e)=>{this.transport.unbind(e,t)}))};et(t,((t,e)=>{this.transport.bind(e,t)}))}handleCloseEvent(t){var e=Dt.getCloseAction(t),n=Dt.getCloseError(t);n&&this.emit("error",n),e&&this.emit(e,{action:e,error:n})}}class Bt{constructor(t,e){this.transport=t,this.callback=e,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=t=>{var e;this.unbindListeners();try{e=Dt.processHandshake(t)}catch(t){return this.finish("error",{error:t}),void this.transport.close()}"connected"===e.action?this.finish("connected",{connection:new zt(e.id,this.transport),activityTimeout:e.activityTimeout}):(this.finish(e.action,{error:e.error}),this.transport.close())},this.onClosed=t=>{this.unbindListeners();var e=Dt.getCloseAction(t)||"backoff",n=Dt.getCloseError(t);this.finish(e,{error:n})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(t,e){this.callback(K({transport:this.transport,action:t},e))}}class Ht{constructor(t,e){this.timeline=t,this.options=e||{}}send(t,e){this.timeline.isEmpty()||this.timeline.send(_e.TimelineTransport.getAgent(this,t),e)}}class Jt extends St{constructor(t,e){super((function(e){at.debug("No callbacks on "+t+" for "+e)})),this.name=t,this.pusher=e,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(t,e){return e(null,{auth:""})}trigger(t,e){if(0!==t.indexOf("client-"))throw new P("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var n=x("triggeringClientEvents");at.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(t,e,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(t){var e=t.event,n=t.data;"pusher_internal:subscription_succeeded"===e?this.handleSubscriptionSucceededEvent(t):"pusher_internal:subscription_count"===e?this.handleSubscriptionCountEvent(t):0!==e.indexOf("pusher_internal:")&&this.emit(e,n,{})}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)}handleSubscriptionCountEvent(t){t.data.subscription_count&&(this.subscriptionCount=t.data.subscription_count),this.emit("pusher:subscription_count",t.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,((t,e)=>{t?(this.subscriptionPending=!1,at.error(t.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:t.message},t instanceof $?{status:t.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:e.auth,channel_data:e.channel_data,channel:this.name})})))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Ft extends Jt{authorize(t,e){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:t},e)}}class qt{constructor(){this.reset()}get(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null}each(t){et(this.members,((e,n)=>{t(this.get(n))}))}setMyID(t){this.myID=t}onSubscription(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)}addMember(t){return null===this.get(t.user_id)&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)}removeMember(t){var e=this.get(t.user_id);return e&&(delete this.members[t.user_id],this.count--),e}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}class Xt extends Ft{constructor(t,e){super(t,e),this.members=new qt}authorize(t,e){super.authorize(t,((t,n)=>{return i=this,s=void 0,o=function*(){if(!t)if(null!=n.channel_data){var i=JSON.parse(n.channel_data);this.members.setMyID(i.user_id)}else{if(yield this.pusher.user.signinDonePromise,null==this.pusher.user.user_data){let t=x("authorizationEndpoint");return at.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${t}, or the user should be signed in.`),void e("Invalid auth response")}this.members.setMyID(this.pusher.user.user_data.id)}e(t,n)},new((r=void 0)||(r=Promise))((function(t,e){function n(t){try{u(o.next(t))}catch(t){e(t)}}function h(t){try{u(o.throw(t))}catch(t){e(t)}}function u(e){var i;e.done?t(e.value):(i=e.value,i instanceof r?i:new r((function(t){t(i)}))).then(n,h)}u((o=o.apply(i,s||[])).next())}));var i,s,r,o}))}handleEvent(t){var e=t.event;if(0===e.indexOf("pusher_internal:"))this.handleInternalEvent(t);else{var n=t.data,i={};t.user_id&&(i.user_id=t.user_id),this.emit(e,n,i)}}handleInternalEvent(t){var e=t.data;switch(t.event){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(t);break;case"pusher_internal:member_added":var n=this.members.addMember(e);this.emit("pusher:member_added",n);break;case"pusher_internal:member_removed":var i=this.members.removeMember(e);i&&this.emit("pusher:member_removed",i)}}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Wt=n(1),Vt=n(0);class Qt extends Ft{constructor(t,e,n){super(t,e),this.key=null,this.nacl=n}authorize(t,e){super.authorize(t,((t,n)=>{if(t)return void e(t,n);let i=n.shared_secret;i?(this.key=Object(Vt.decode)(i),delete n.shared_secret,e(null,n)):e(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null)}))}trigger(t,e){throw new L("Client events are not currently supported for encrypted channels")}handleEvent(t){var e=t.event,n=t.data;0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")?this.handleEncryptedEvent(e,n):super.handleEvent(t)}handleEncryptedEvent(t,e){if(!this.key)return void at.debug("Received encrypted event before key has been retrieved from the authEndpoint");if(!e.ciphertext||!e.nonce)return void at.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+e);let n=Object(Vt.decode)(e.ciphertext);if(n.length<this.nacl.secretbox.overheadLength)return void at.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);let i=Object(Vt.decode)(e.nonce);if(i.length<this.nacl.secretbox.nonceLength)return void at.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${i.length}`);let s=this.nacl.secretbox.open(n,i,this.key);if(null===s)return at.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),void this.authorize(this.pusher.connection.socket_id,((e,r)=>{e?at.error(`Failed to make a request to the authEndpoint: ${r}. Unable to fetch new key, so dropping encrypted event`):(s=this.nacl.secretbox.open(n,i,this.key),null!==s?this.emit(t,this.getDataToEmit(s)):at.error("Failed to decrypt event with new key. Dropping encrypted event"))}));this.emit(t,this.getDataToEmit(s))}getDataToEmit(t){let e=Object(Wt.decode)(t);try{return JSON.parse(e)}catch(t){return e}}}class Gt extends St{constructor(t,e){super(),this.state="initialized",this.connection=null,this.key=t,this.options=e,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=_e.getNetwork();n.bind("online",(()=>{this.timeline.info({netinfo:"online"}),"connecting"!==this.state&&"unavailable"!==this.state||this.retryIn(0)})),n.bind("offline",(()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()})),this.updateStrategy()}connect(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))}send(t){return!!this.connection&&this.connection.send(t)}send_event(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var t=(e,n)=>{e?this.runner=this.strategy.connect(0,t):"error"===n.action?(this.emit("error",{type:"HandshakeError",error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,t)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(t){this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new V(t||0,(()=>{this.disconnectInternally(),this.connect()}))}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new V(this.options.unavailableTimeout,(()=>{this.updateState("unavailable")}))}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new V(this.options.pongTimeout,(()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)}))}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new V(this.activityTimeout,(()=>{this.sendActivityCheck()})))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(t){return K({},t,{message:t=>{this.resetActivityCheck(),this.emit("message",t)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:t=>{this.emit("error",t)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(t){return K({},t,{connected:t=>{this.activityTimeout=Math.min(this.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(t.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let t=t=>e=>{e.error&&this.emit("error",{type:"WebSocketError",error:e.error}),t(e)};return{tls_only:t((()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)})),refused:t((()=>{this.disconnect()})),backoff:t((()=>{this.retryIn(1e3)})),retry:t((()=>{this.retryIn(0)}))}}setConnection(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}}updateState(t,e){var n=this.state;if(this.state=t,n!==t){var i=t;"connected"===i&&(i+=" with new socket ID "+e.socket_id),at.debug("State changed",n+" -> "+i),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}}shouldRetry(){return"connecting"===this.state||"connected"===this.state}}class Yt{constructor(){this.channels={}}add(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if(e.config.nacl)return Zt.createEncryptedChannel(t,e,e.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",i=x("encryptedChannelSupport");throw new L(`${n}. ${i}`)}if(0===t.indexOf("private-"))return Zt.createPrivateChannel(t,e);if(0===t.indexOf("presence-"))return Zt.createPresenceChannel(t,e);if(0===t.indexOf("#"))throw new R('Cannot create a channel with name "'+t+'".');return Zt.createChannel(t,e)}(t,e)),this.channels[t]}all(){return t=[],et(this.channels,(function(e){t.push(e)})),t;var t}find(t){return this.channels[t]}remove(t){var e=this.channels[t];return delete this.channels[t],e}disconnect(){et(this.channels,(function(t){t.disconnect()}))}}var Kt={createChannels:()=>new Yt,createConnectionManager:(t,e)=>new Gt(t,e),createChannel:(t,e)=>new Jt(t,e),createPrivateChannel:(t,e)=>new Ft(t,e),createPresenceChannel:(t,e)=>new Xt(t,e),createEncryptedChannel:(t,e,n)=>new Qt(t,e,n),createTimelineSender:(t,e)=>new Ht(t,e),createHandshake:(t,e)=>new Bt(t,e),createAssistantToTheTransportManager:(t,e,n)=>new Mt(t,e,n)},Zt=Kt;class te{constructor(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}getAssistant(t){return Zt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class ee{constructor(t,e){this.strategies=t,this.loop=Boolean(e.loop),this.failFast=Boolean(e.failFast),this.timeout=e.timeout,this.timeoutLimit=e.timeoutLimit}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){var n=this.strategies,i=0,s=this.timeout,r=null,o=(h,u)=>{u?e(null,u):(i+=1,this.loop&&(i%=n.length),i<n.length?(s&&(s*=2,this.timeoutLimit&&(s=Math.min(s,this.timeoutLimit))),r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o)):e(!0))};return r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o),{abort:function(){r.abort()},forceMinPriority:function(e){t=e,r&&r.forceMinPriority(e)}}}tryStrategy(t,e,n,i){var s=null,r=null;return n.timeout>0&&(s=new V(n.timeout,(function(){r.abort(),i(!0)}))),r=t.connect(e,(function(t,e){t&&s&&s.isRunning()&&!n.failFast||(s&&s.ensureAborted(),i(t,e))})),{abort:function(){s&&s.ensureAborted(),r.abort()},forceMinPriority:function(t){r.forceMinPriority(t)}}}}class ne{constructor(t){this.strategies=t}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){return function(t,n){var i=st(t,(function(t,i,s,r){return t.connect(n,function(t,n){return function(i,s){n[t].error=i,i?function(t){return function(t,e){for(var n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0}(t,(function(t){return Boolean(t.error)}))}(n)&&e(!0):(it(n,(function(t){t.forceMinPriority(s.transport.priority)})),e(null,s))}}(i,r))}));return{abort:function(){it(i,ie)},forceMinPriority:function(t){it(i,(function(e){e.forceMinPriority(t)}))}}}(this.strategies,t)}}function ie(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}class se{constructor(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.usingTLS,i=function(t){var e=_e.getLocalStorage();if(e)try{var n=e[re(t)];if(n)return JSON.parse(n)}catch(e){oe(t)}return null}(n),s=i&&i.cacheSkipCount?i.cacheSkipCount:0,r=[this.strategy];if(i&&i.timestamp+this.ttl>=Y.now()){var o=this.transports[i.transport];o&&(["ws","wss"].includes(i.transport)||s>3?(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),r.push(new ee([o],{timeout:2*i.latency+1e3,failFast:!0}))):s++)}var h=Y.now(),u=r.pop().connect(t,(function i(o,c){o?(oe(n),r.length>0?(h=Y.now(),u=r.pop().connect(t,i)):e(o)):(function(t,e,n,i){var s=_e.getLocalStorage();if(s)try{s[re(t)]=ct({timestamp:Y.now(),transport:e,latency:n,cacheSkipCount:i})}catch(t){}}(n,c.transport.name,Y.now()-h,s),e(null,c))}));return{abort:function(){u.abort()},forceMinPriority:function(e){t=e,u&&u.forceMinPriority(e)}}}}function re(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function oe(t){var e=_e.getLocalStorage();if(e)try{delete e[re(t)]}catch(t){}}class he{constructor(t,{delay:e}){this.strategy=t,this.options={delay:e}}isSupported(){return this.strategy.isSupported()}connect(t,e){var n,i=this.strategy,s=new V(this.options.delay,(function(){n=i.connect(t,e)}));return{abort:function(){s.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}}}class ue{constructor(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)}}class ce{constructor(t){this.strategy=t}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.strategy.connect(t,(function(t,i){i&&n.abort(),e(t,i)}));return n}}function ae(t){return function(){return t.isSupported()}}var le,fe={getRequest:function(t){var e=new window.XDomainRequest;return e.ontimeout=function(){t.emit("error",new I),t.close()},e.onerror=function(e){t.emit("error",e),t.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}};class de extends St{constructor(t,e,n){super(),this.hooks=t,this.method=e,this.url=n}start(t){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},_e.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)}close(){this.unloader&&(_e.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")}advanceBuffer(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null}isBufferTooLong(t){return this.position===t.length&&t.length>262144}}!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSED=3]="CLOSED"}(le||(le={}));var ve=le,pe=1;function we(t){var e=-1===t.indexOf("?")?"?":"&";return t+e+"t="+ +new Date+"&n="+pe++}function be(t){return _e.randomInt(t)}var ye,ge=class{constructor(t,e){this.hooks=t,this.session=be(1e3)+"/"+function(){for(var t=[],e=0;e<8;e++)t.push(be(32).toString(32));return t.join("")}(),this.location=function(t){var e=/([^\?]*)\/*(\??.*)/.exec(t);return{base:e[1],queryString:e[2]}}(e),this.readyState=ve.CONNECTING,this.openStream()}send(t){return this.sendRaw(JSON.stringify([t]))}ping(){this.hooks.sendHeartbeat(this)}close(t,e){this.onClose(t,e,!0)}sendRaw(t){if(this.readyState!==ve.OPEN)return!1;try{return _e.createSocketRequest("POST",we((e=this.location,n=this.session,e.base+"/"+n+"/xhr_send"))).start(t),!0}catch(t){return!1}var e,n}reconnect(){this.closeStream(),this.openStream()}onClose(t,e,n){this.closeStream(),this.readyState=ve.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})}onChunk(t){var e;if(200===t.status)switch(this.readyState===ve.OPEN&&this.onActivity(),t.data.slice(0,1)){case"o":e=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(e);break;case"a":e=JSON.parse(t.data.slice(1)||"[]");for(var n=0;n<e.length;n++)this.onEvent(e[n]);break;case"m":e=JSON.parse(t.data.slice(1)||"null"),this.onEvent(e);break;case"h":this.hooks.onHeartbeat(this);break;case"c":e=JSON.parse(t.data.slice(1)||"[]"),this.onClose(e[0],e[1],!0)}}onOpen(t){var e,n;this.readyState===ve.CONNECTING?(t&&t.hostname&&(this.location.base=(e=t.hostname,(n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(this.location.base))[1]+e+n[3])),this.readyState=ve.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(t){this.readyState===ve.OPEN&&this.onmessage&&this.onmessage({data:t})}onActivity(){this.onactivity&&this.onactivity()}onError(t){this.onerror&&this.onerror(t)}openStream(){this.stream=_e.createSocketRequest("POST",we(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",(t=>{this.onChunk(t)})),this.stream.bind("finished",(t=>{this.hooks.onFinished(this,t)})),this.stream.bind("buffer_too_long",(()=>{this.reconnect()}));try{this.stream.start()}catch(t){Y.defer((()=>{this.onError(t),this.onClose(1006,"Could not start streaming",!1)}))}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}},ke={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr_streaming"+t.queryString},onHeartbeat:function(t){t.sendRaw("[]")},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){t.onClose(1006,"Connection interrupted ("+e+")",!1)}},me={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr"+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Se={getRequest:function(t){var e=new(_e.getXHRAPI());return e.onreadystatechange=e.onprogress=function(){switch(e.readyState){case 3:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},abortRequest:function(t){t.onreadystatechange=null,t.abort()}},_e={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:s,DependenciesReceivers:C,getDefaultStrategy:function(t,e,n){var i={};function s(e,s,r,o,h){var u=n(t,e,s,r,o,h);return i[e]=u,u}var r,o=Object.assign({},e,{hostNonTLS:t.wsHost+":"+t.wsPort,hostTLS:t.wsHost+":"+t.wssPort,httpPath:t.wsPath}),h=Object.assign({},o,{useTLS:!0}),u=Object.assign({},e,{hostNonTLS:t.httpHost+":"+t.httpPort,hostTLS:t.httpHost+":"+t.httpsPort,httpPath:t.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},a=new te({minPingDelay:1e4,maxPingDelay:t.activityTimeout}),l=new te({lives:2,minPingDelay:1e4,maxPingDelay:t.activityTimeout}),f=s("ws","ws",3,o,a),d=s("wss","ws",3,h,a),v=s("sockjs","sockjs",1,u),p=s("xhr_streaming","xhr_streaming",1,u,l),w=s("xdr_streaming","xdr_streaming",1,u,l),b=s("xhr_polling","xhr_polling",1,u),y=s("xdr_polling","xdr_polling",1,u),g=new ee([f],c),k=new ee([d],c),m=new ee([v],c),S=new ee([new ue(ae(p),p,w)],c),_=new ee([new ue(ae(b),b,y)],c),j=new ee([new ue(ae(S),new ne([S,new he(_,{delay:4e3})]),_)],c),C=new ue(ae(j),j,m);return r=new ne(e.useTLS?[g,new he(C,{delay:2e3})]:[g,new he(k,{delay:2e3}),new he(C,{delay:5e3})]),new se(new ce(new ue(ae(f),r,C)),i,{ttl:18e5,timeline:e.timeline,useTLS:e.useTLS})},Transports:Lt,transportConnectionInitializer:function(){var t=this;t.timeline.info(t.buildTimelineMessage({transport:t.name+(t.options.useTLS?"s":"")})),t.hooks.isInitialized()?t.changeState("initialized"):t.hooks.file?(t.changeState("initializing"),O.load(t.hooks.file,{useTLS:t.options.useTLS},(function(e,n){t.hooks.isInitialized()?(t.changeState("initialized"),n(!0)):(e&&t.onError(e),t.onClose(),n(!1))}))):t.onClose()},HTTPFactory:{createStreamingSocket(t){return this.createSocket(ke,t)},createPollingSocket(t){return this.createSocket(me,t)},createSocket:(t,e)=>new ge(t,e),createXHR(t,e){return this.createRequest(Se,t,e)},createRequest:(t,e,n)=>new de(t,e,n),createXDR:function(t,e){return this.createRequest(fe,t,e)}},TimelineTransport:vt,getXHRAPI:()=>window.XMLHttpRequest,getWebSocketAPI:()=>window.WebSocket||window.MozWebSocket,setup(t){window.Pusher=t;var e=()=>{this.onDocumentBody(t.ready)};window.JSON?e():O.load("json2",{},e)},getDocument:()=>document,getProtocol(){return this.getDocument().location.protocol},getAuthorizers:()=>({ajax:D,jsonp:lt}),onDocumentBody(t){document.body?t():setTimeout((()=>{this.onDocumentBody(t)}),0)},createJSONPRequest:(t,e)=>new dt(t,e),createScriptRequest:t=>new ft(t),getLocalStorage(){try{return window.localStorage}catch(t){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR:()=>new ActiveXObject("Microsoft.XMLHTTP"),getNetwork:()=>Ut,createWebSocket(t){return new(this.getWebSocketAPI())(t)},createSocketRequest(t,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(t,e);if(this.isXDRSupported(0===e.indexOf("https:")))return this.HTTPFactory.createXDR(t,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var t=this.getXHRAPI();return Boolean(t)&&void 0!==(new t).withCredentials},isXDRSupported(t){var e=t?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===e},addUnloadListener(t){void 0!==window.addEventListener?window.addEventListener("unload",t,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",t)},removeUnloadListener(t){void 0!==window.addEventListener?window.removeEventListener("unload",t,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",t)},randomInt:t=>Math.floor((window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)*t)};!function(t){t[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(ye||(ye={}));var je=ye;class Ce{constructor(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(t,e){t<=this.options.level&&(this.events.push(K({},e,{timestamp:Y.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(t){this.log(je.ERROR,t)}info(t){this.log(je.INFO,t)}debug(t){this.log(je.DEBUG,t)}isEmpty(){return 0===this.events.length}send(t,e){var n=K({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(n,((t,n)=>{t||this.sent++,e&&e(t,n)})),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Oe{constructor(t,e,n,i){this.name=t,this.priority=e,this.transport=n,this.options=i||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(t,e){if(!this.isSupported())return Ee(new M,e);if(this.priority<t)return Ee(new A,e);var n=!1,i=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),s=null,r=function(){i.unbind("initialized",r),i.connect()},o=function(){s=Zt.createHandshake(i,(function(t){n=!0,c(),e(null,t)}))},h=function(t){c(),e(t)},u=function(){var t;c(),t=ct(i),e(new N(t))},c=function(){i.unbind("initialized",r),i.unbind("open",o),i.unbind("error",h),i.unbind("closed",u)};return i.bind("initialized",r),i.bind("open",o),i.bind("error",h),i.bind("closed",u),i.initialize(),{abort:()=>{n||(c(),s?s.close():i.close())},forceMinPriority:t=>{n||this.priority<t&&(s?s.close():i.close())}}}}function Ee(t,e){return Y.defer((function(){e(t)})),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Te}=_e;var xe=function(t,e,n,i,s,r){var o,h=Te[n];if(!h)throw new U(n);return t.enabledTransports&&-1===tt(t.enabledTransports,e)||t.disabledTransports&&-1!==tt(t.disabledTransports,e)?o=Pe:(s=Object.assign({ignoreNullOrigin:t.ignoreNullOrigin},s),o=new Oe(e,i,r?r.getAssistant(h):h,s)),o},Pe={isSupported:function(){return!1},connect:function(t,e){var n=Y.defer((function(){e(new M)}));return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Re(t){return t.httpHost?t.httpHost:t.cluster?`sockjs-${t.cluster}.pusher.com`:a}function Ie(t){return t.wsHost?t.wsHost:`ws-${t.cluster}.pusher.com`}function Ae(t){return"https:"===_e.getProtocol()||!1!==t.forceTLS}function Ne(t){return"enableStats"in t?t.enableStats:"disableStats"in t&&!t.disableStats}function Le(t){const e=Object.assign(Object.assign({},k),t.userAuthentication);return"customHandler"in e&&null!=e.customHandler?e.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.UserAuthentication,n)}})(e)}function Ue(t,e){const n=function(t,e){let n;return"channelAuthorization"in t?n=Object.assign(Object.assign({},m),t.channelAuthorization):(n={transport:t.authTransport||w,endpoint:t.authEndpoint||p},"auth"in t&&("params"in t.auth&&(n.params=t.auth.params),"headers"in t.auth&&(n.headers=t.auth.headers)),"authorizer"in t&&(n.customHandler=((t,e,n)=>{const i={authTransport:e.transport,authEndpoint:e.endpoint,auth:{params:e.params,headers:e.headers}};return(e,s)=>{const r=t.channel(e.channelName);n(r,i).authorize(e.socketId,s)}})(e,n,t.authorizer))),n}(t,e);return"customHandler"in n&&null!=n.customHandler?n.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in n+="&channel_name="+encodeURIComponent(t.channelName),e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.ChannelAuthorization,n)}})(n)}class Me extends St{constructor(t){super((function(t){at.debug(`No callbacks on watchlist events for ${t}`)})),this.pusher=t,this.bindWatchlistInternalEvent()}handleEvent(t){t.data.events.forEach((t=>{this.emit(t.name,t)}))}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",(t=>{"pusher_internal:watchlist_events"===t.event&&this.handleEvent(t)}))}}class $e extends St{constructor(t){super((function(t){at.debug("No callbacks on user for "+t)})),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(t,e)=>{if(t)return at.warn(`Error during signin: ${t}`),void this._cleanup();this.pusher.send_event("pusher:signin",{auth:e.auth,user_data:e.user_data})},this.pusher=t,this.pusher.connection.bind("state_change",(({previous:t,current:e})=>{"connected"!==t&&"connected"===e&&this._signin(),"connected"===t&&"connected"!==e&&(this._cleanup(),this._newSigninPromiseIfNeeded())})),this.watchlist=new Me(t),this.pusher.connection.bind("message",(t=>{"pusher:signin_success"===t.event&&this._onSigninSuccess(t.data),this.serverToUserChannel&&this.serverToUserChannel.name===t.channel&&this.serverToUserChannel.handleEvent(t)}))}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),"connected"===this.pusher.connection.state&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(t){try{this.user_data=JSON.parse(t.user_data)}catch(e){return at.error(`Failed parsing user data after signin: ${t.user_data}`),void this._cleanup()}if("string"!=typeof this.user_data.id||""===this.user_data.id)return at.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),void this._cleanup();this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){this.serverToUserChannel=new Jt(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global(((t,e)=>{0!==t.indexOf("pusher_internal:")&&0!==t.indexOf("pusher:")&&this.emit(t,e)})),(t=>{t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():t.subscriptionPending||"connected"!==this.pusher.connection.state||t.subscribe()})(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested)return;if(this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:t,resolve:e}=function(){let t,e;return{promise:new Promise(((n,i)=>{t=n,e=i})),resolve:t,reject:e}}();t.done=!1;const n=()=>{t.done=!0};t.then(n).catch(n),this.signinDonePromise=t,this._signinDoneResolve=e}}class De{static ready(){De.isReady=!0;for(var t=0,e=De.instances.length;t<e;t++)De.instances[t].connect()}static getClientFeatures(){return nt(ot({ws:_e.Transports.ws},(function(t){return t.isSupported({})})))}constructor(t,e){!function(t){if(null==t)throw"You must pass your app key when you instantiate Pusher."}(t),function(t){if(null==t)throw"You must pass an options object";if(null==t.cluster)throw"Options object must provide a cluster";"disableStats"in t&&at.warn("The disableStats option is deprecated in favor of enableStats")}(e),this.key=t,this.config=function(t,e){let n={activityTimeout:t.activityTimeout||b,cluster:t.cluster,httpPath:t.httpPath||d,httpPort:t.httpPort||l,httpsPort:t.httpsPort||f,pongTimeout:t.pongTimeout||y,statsHost:t.statsHost||v,unavailableTimeout:t.unavailableTimeout||g,wsPath:t.wsPath||c,wsPort:t.wsPort||h,wssPort:t.wssPort||u,enableStats:Ne(t),httpHost:Re(t),useTLS:Ae(t),wsHost:Ie(t),userAuthenticator:Le(t),channelAuthorizer:Ue(t,e)};return"disabledTransports"in t&&(n.disabledTransports=t.disabledTransports),"enabledTransports"in t&&(n.enabledTransports=t.enabledTransports),"ignoreNullOrigin"in t&&(n.ignoreNullOrigin=t.ignoreNullOrigin),"timelineParams"in t&&(n.timelineParams=t.timelineParams),"nacl"in t&&(n.nacl=t.nacl),n}(e,this),this.channels=Zt.createChannels(),this.global_emitter=new St,this.sessionID=_e.randomInt(1e9),this.timeline=new Ce(this.key,this.sessionID,{cluster:this.config.cluster,features:De.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:je.INFO,version:r}),this.config.enableStats&&(this.timelineSender=Zt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+_e.TimelineTransport.name})),this.connection=Zt.createConnectionManager(this.key,{getStrategy:t=>_e.getDefaultStrategy(this.config,t,xe),timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",(()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())})),this.connection.bind("message",(t=>{var e=0===t.event.indexOf("pusher_internal:");if(t.channel){var n=this.channel(t.channel);n&&n.handleEvent(t)}e||this.global_emitter.emit(t.event,t.data)})),this.connection.bind("connecting",(()=>{this.channels.disconnect()})),this.connection.bind("disconnected",(()=>{this.channels.disconnect()})),this.connection.bind("error",(t=>{at.warn(t)})),De.instances.push(this),this.timeline.info({instances:De.instances.length}),this.user=new $e(this),De.isReady&&this.connect()}channel(t){return this.channels.find(t)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),e=this.timelineSender;this.timelineSenderTimer=new Q(6e4,(function(){e.send(t)}))}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(t,e,n){return this.global_emitter.bind(t,e,n),this}unbind(t,e,n){return this.global_emitter.unbind(t,e,n),this}bind_global(t){return this.global_emitter.bind_global(t),this}unbind_global(t){return this.global_emitter.unbind_global(t),this}unbind_all(t){return this.global_emitter.unbind_all(),this}subscribeAll(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)}subscribe(t){var e=this.channels.add(t,this);return e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.connection.state||e.subscribe(),e}unsubscribe(t){var e=this.channels.find(t);e&&e.subscriptionPending?e.cancelSubscription():(e=this.channels.remove(t))&&e.subscribed&&e.unsubscribe()}send_event(t,e,n){return this.connection.send_event(t,e,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}De.instances=[],De.isReady=!1,De.logToConsole=!1,De.Runtime=_e,De.ScriptReceivers=_e.ScriptReceivers,De.DependenciesReceivers=_e.DependenciesReceivers,De.auth_callbacks=_e.auth_callbacks;var ze=e.default=De;_e.setup(De)}])},N.exports=A());
1
+ import{E as t}from"./p-BGB6gNkz.js";class e{url;options;data;errorFallbackValue;defaultOptions={mode:"cors"};setUrl(t){return this.url=t,this}setOptions(t){return this.options=t,this}setData(t){return this.data=t,this}setErrorFallbackValue(t){return this.errorFallbackValue=t,this}execute(t=!1){return fetch(this.url,{...this.defaultOptions,...this.options,body:JSON.stringify(this.data)}).then((async e=>t?e:(await e.json())?.data)).catch((t=>{if(void 0!==this.errorFallbackValue)return this.errorFallbackValue;throw t}))}}var n={endpoints:{operations:"/operations/",address:"/addresses/",addressSearch:"/addresses/search/",translations:"/translations/",queryCustomer:"/customer/data/",customerAssets:"/customer/assets/",productComparison:"/v2/sac/product-data",catalogOffers:"/catalog/offers/",createCallCenterTask:"/tasks/create-callcenter-task/",componentData:"/web-components/data/",tvPlatformChannels:"/tv/channels/platform/",tvPackages:"/tv/packages/",metastoreProducts:"/metastore/products",cloudConfigurator:"/metastore/cloud-calculator-fields",serviceAvailabilityServices:"/sac/available-services",b2bConfigurator:"/metastore/b2b/configurator",assemblerScenario:"/sac/assembler"},testing:{baseUrl:"https://tst-gateway.tet.lv/api"},staging:{baseUrl:"https://uat-gateway.tet.lv/api"},production:{baseUrl:"https://gateway.tet.lv/api"}};const i=n.endpoints,s=n[t.environment]??{},r=Object.keys(i??[]).reduce(((t,e)=>({...t,[e]:`${s.baseUrl}${i[e]}`})),{})??{};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},c.apply(this,arguments)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=l(t);if(e){var s=l(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}var v=function(){function t(){h(this,t)}return u(t,[{key:"listenForWhisper",value:function(t,e){return this.listen(".client-"+t,e)}},{key:"notification",value:function(t){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",t)}},{key:"stopListeningForWhisper",value:function(t,e){return this.stopListening(".client-"+t,e)}}]),t}(),p=function(){function t(e){h(this,t),this.namespace=e}return u(t,[{key:"format",value:function(t){return[".","\\"].includes(t.charAt(0))?t.substring(1):(this.namespace&&(t=this.namespace+"."+t),t.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(t){this.namespace=t}}]),t}(),w=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).name=i,r.pusher=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"listenToAll",value:function(t){var e=this;return this.subscription.bind_global((function(n,i){if(!n.startsWith("pusher:")){var s=e.options.namespace.replace(/\./g,"\\"),r=n.startsWith(s)?n.substring(s.length+1):"."+n;t(r,i)}})),this}},{key:"stopListening",value:function(t,e){return e?this.subscription.unbind(this.eventFormatter.format(t),e):this.subscription.unbind(this.eventFormatter.format(t)),this}},{key:"stopListeningToAll",value:function(t){return t?this.subscription.unbind_global(t):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(t){return this.on("pusher:subscription_succeeded",(function(){t()})),this}},{key:"error",value:function(t){return this.on("pusher:subscription_error",(function(e){t(e)})),this}},{key:"on",value:function(t,e){return this.subscription.bind(t,e),this}}]),e}(),b=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),y=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),g=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("pusher:subscription_succeeded",(function(e){t(Object.keys(e.members).map((function(t){return e.members[t]})))})),this}},{key:"joining",value:function(t){return this.on("pusher:member_added",(function(e){t(e.info)})),this}},{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}},{key:"leaving",value:function(t){return this.on("pusher:member_removed",(function(e){t(e.info)})),this}}]),e}(),k=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).events={},r.listeners={},r.name=i,r.socket=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t,e){return this.unbindEvent(this.eventFormatter.format(t),e),this}},{key:"subscribed",value:function(t){return this.on("connect",(function(e){t(e)})),this}},{key:"error",value:function(){return this}},{key:"on",value:function(t,e){var n=this;return this.listeners[t]=this.listeners[t]||[],this.events[t]||(this.events[t]=function(e,i){n.name===e&&n.listeners[t]&&n.listeners[t].forEach((function(t){return t(i)}))},this.socket.on(t,this.events[t])),this.listeners[t].push(e),this}},{key:"unbind",value:function(){var t=this;Object.keys(this.events).forEach((function(e){t.unbindEvent(e)}))}},{key:"unbindEvent",value:function(t,e){this.listeners[t]=this.listeners[t]||[],e&&(this.listeners[t]=this.listeners[t].filter((function(t){return t!==e}))),e&&0!==this.listeners[t].length||(this.events[t]&&(this.socket.removeListener(t,this.events[t]),delete this.events[t]),delete this.listeners[t])}}]),e}(),m=function(){a(e,k);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}}]),e}(),S=function(){a(e,m);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("presence:subscribed",(function(e){t(e.map((function(t){return t.user_info})))})),this}},{key:"joining",value:function(t){return this.on("presence:joining",(function(e){return t(e.user_info)})),this}},{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}},{key:"leaving",value:function(t){return this.on("presence:leaving",(function(e){return t(e.user_info)})),this}}]),e}(),_=function(){a(e,v);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(){return this}},{key:"listenToAll",value:function(){return this}},{key:"stopListening",value:function(){return this}},{key:"subscribed",value:function(){return this}},{key:"error",value:function(){return this}},{key:"on",value:function(){return this}}]),e}(),j=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(){return this}}]),e}(),C=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(){return this}},{key:"joining",value:function(){return this}},{key:"whisper",value:function(){return this}},{key:"leaving",value:function(){return this}}]),e}(),O=function(){function t(e){h(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(e),this.connect()}return u(t,[{key:"setOptions",value:function(t){this.options=c(this._defaultOptions,t);var e=this.csrfToken();return e&&(this.options.auth.headers["X-CSRF-TOKEN"]=e,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=e),(e=this.options.bearerToken)&&(this.options.auth.headers.Authorization="Bearer "+e,this.options.userAuthentication.headers.Authorization="Bearer "+e),t}},{key:"csrfToken",value:function(){var t;return"undefined"!=typeof window&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:"undefined"!=typeof document&&"function"==typeof document.querySelector&&(t=document.querySelector('meta[name="csrf-token"]'))?t.getAttribute("content"):null}}]),t}(),E=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){this.pusher=void 0!==this.options.client?this.options.client:this.options.Pusher?new this.options.Pusher(this.options.key,this.options):new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new w(this.pusher,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new b(this.pusher,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"encryptedPrivateChannel",value:function(t){return this.channels["private-encrypted-"+t]||(this.channels["private-encrypted-"+t]=new y(this.pusher,"private-encrypted-"+t,this.options)),this.channels["private-encrypted-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new g(this.pusher,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"private-encrypted-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),e}(),T=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){var t=this,e=this.getSocketIO();return this.socket=e(this.options.host,this.options),this.socket.on("reconnect",(function(){Object.values(t.channels).forEach((function(t){t.subscribe()}))})),this.socket}},{key:"getSocketIO",value:function(){if(void 0!==this.options.client)return this.options.client;if("undefined"!=typeof io)return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new k(this.socket,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new m(this.socket,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new S(this.socket,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),e}(),x=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){}},{key:"listen",value:function(){return new _}},{key:"channel",value:function(){return new _}},{key:"privateChannel",value:function(){return new j}},{key:"encryptedPrivateChannel",value:function(){return new j}},{key:"presenceChannel",value:function(){return new C}},{key:"leave",value:function(){}},{key:"leaveChannel",value:function(){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),e}(),P=function(){function t(e){h(this,t),this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return u(t,[{key:"channel",value:function(t){return this.connector.channel(t)}},{key:"connect",value:function(){if("reverb"==this.options.broadcaster)this.connector=new E(c(c({},this.options),{cluster:""}));else if("pusher"==this.options.broadcaster)this.connector=new E(this.options);else if("socket.io"==this.options.broadcaster)this.connector=new T(this.options);else if("null"==this.options.broadcaster)this.connector=new x(this.options);else{if("function"!=typeof this.options.broadcaster)throw new Error("Broadcaster ".concat(o(this.options.broadcaster)," ").concat(this.options.broadcaster," is not supported."));this.connector=new this.options.broadcaster(this.options)}}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(t){return this.connector.presenceChannel(t)}},{key:"leave",value:function(t){this.connector.leave(t)}},{key:"leaveChannel",value:function(t){this.connector.leaveChannel(t)}},{key:"leaveAllChannels",value:function(){for(var t in this.connector.channels)this.leaveChannel(t)}},{key:"listen",value:function(t,e,n){return this.connector.listen(t,e,n)}},{key:"private",value:function(t){return this.connector.privateChannel(t)}},{key:"encryptedPrivate",value:function(t){return this.connector.encryptedPrivateChannel(t)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){"function"==typeof Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup(),"object"===("undefined"==typeof Turbo?"undefined":o(Turbo))&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var t=this;Vue.http.interceptors.push((function(e,n){t.socketId()&&e.headers.set("X-Socket-ID",t.socketId()),n()}))}},{key:"registerAxiosRequestInterceptor",value:function(){var t=this;axios.interceptors.request.use((function(e){return t.socketId()&&(e.headers["X-Socket-Id"]=t.socketId()),e}))}},{key:"registerjQueryAjaxSetup",value:function(){var t=this;void 0!==jQuery.ajax&&jQuery.ajaxPrefilter((function(e,n,i){t.socketId()&&i.setRequestHeader("X-Socket-Id",t.socketId())}))}},{key:"registerTurboRequestInterceptor",value:function(){var t=this;document.addEventListener("turbo:before-fetch-request",(function(e){e.detail.fetchOptions.headers["X-Socket-Id"]=t.socketId()}))}}]),t}();function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I,A,N={exports:{}},L=I?N.exports:(I=1,window,A=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},n(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var s=256,r=function(){function t(t){void 0===t&&(t="="),this._paddingCharacter=t}return t.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(8*t+5)/6|0},t.prototype.encode=function(t){for(var e="",n=0;n<t.length-2;n+=3)e+=this._encodeByte((i=t[n]<<16|t[n+1]<<8|t[n+2])>>>18&63),e+=this._encodeByte(i>>>12&63),e+=this._encodeByte(i>>>6&63),e+=this._encodeByte(i>>>0&63);var i,s=t.length-n;return s>0&&(e+=this._encodeByte((i=t[n]<<16|(2===s?t[n+1]<<8:0))>>>18&63),e+=this._encodeByte(i>>>12&63),e+=2===s?this._encodeByte(i>>>6&63):this._paddingCharacter||"",e+=this._paddingCharacter||""),e},t.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(6*t+7)/8|0},t.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},t.prototype.decode=function(t){if(0===t.length)return new Uint8Array(0);for(var e=this._getPaddingLength(t),n=t.length-e,i=new Uint8Array(this.maxDecodedLength(n)),r=0,o=0,h=0,u=0,c=0,a=0,l=0;o<n-4;o+=4)u=this._decodeChar(t.charCodeAt(o+0)),c=this._decodeChar(t.charCodeAt(o+1)),a=this._decodeChar(t.charCodeAt(o+2)),l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=u<<2|c>>>4,i[r++]=c<<4|a>>>2,i[r++]=a<<6|l,h|=u&s,h|=c&s,h|=a&s,h|=l&s;if(o<n-1&&(u=this._decodeChar(t.charCodeAt(o)),c=this._decodeChar(t.charCodeAt(o+1)),i[r++]=u<<2|c>>>4,h|=u&s,h|=c&s),o<n-2&&(a=this._decodeChar(t.charCodeAt(o+2)),i[r++]=c<<4|a>>>2,h|=a&s),o<n-3&&(l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=a<<6|l,h|=l&s),0!==h)throw new Error("Base64Coder: incorrect characters for decoding");return i},t.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-15,e+=62-t>>>8&3,String.fromCharCode(e)},t.prototype._decodeChar=function(t){var e=s;return e+=(42-t&t-44)>>>8&-256+t-43+62,e+=(46-t&t-48)>>>8&-256+t-47+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},t.prototype._getPaddingLength=function(t){var e=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)e++;if(t.length<4||e>2)throw new Error("Base64Coder: incorrect padding")}return e},t}();e.Coder=r;var o=new r;e.encode=function(t){return o.encode(t)},e.decode=function(t){return o.decode(t)};var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-13,e+=62-t>>>8&49,String.fromCharCode(e)},e.prototype._decodeChar=function(t){var e=s;return e+=(44-t&t-46)>>>8&-256+t-45+62,e+=(94-t&t-96)>>>8&-256+t-95+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},e}(r);e.URLSafeCoder=h;var u=new h;e.encodeURLSafe=function(t){return u.encode(t)},e.decodeURLSafe=function(t){return u.decode(t)},e.encodedLength=function(t){return o.encodedLength(t)},e.maxDecodedLength=function(t){return o.maxDecodedLength(t)},e.decodedLength=function(t){return o.decodedLength(t)}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="utf8: invalid string",i="utf8: invalid source encoding";function s(t){for(var e=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);if(s<128)e+=1;else if(s<2048)e+=2;else if(s<55296)e+=3;else{if(!(s<=57343))throw new Error(n);if(i>=t.length-1)throw new Error(n);i++,e+=4}}return e}e.encode=function(t){for(var e=new Uint8Array(s(t)),n=0,i=0;i<t.length;i++){var r=t.charCodeAt(i);r<128?e[n++]=r:r<2048?(e[n++]=192|r>>6,e[n++]=128|63&r):r<55296?(e[n++]=224|r>>12,e[n++]=128|r>>6&63,e[n++]=128|63&r):(i++,r=(1023&r)<<10,r|=1023&t.charCodeAt(i),e[n++]=240|(r+=65536)>>18,e[n++]=128|r>>12&63,e[n++]=128|r>>6&63,e[n++]=128|63&r)}return e},e.encodedLength=s,e.decode=function(t){for(var e=[],n=0;n<t.length;n++){var s=t[n];if(128&s){var r=void 0;if(s<224){if(n>=t.length)throw new Error(i);if(128!=(192&(o=t[++n])))throw new Error(i);s=(31&s)<<6|63&o,r=128}else if(s<240){if(n>=t.length-1)throw new Error(i);var o=t[++n],h=t[++n];if(128!=(192&o)||128!=(192&h))throw new Error(i);s=(15&s)<<12|(63&o)<<6|63&h,r=2048}else{if(!(s<248))throw new Error(i);if(n>=t.length-2)throw new Error(i);o=t[++n],h=t[++n];var u=t[++n];if(128!=(192&o)||128!=(192&h)||128!=(192&u))throw new Error(i);s=(15&s)<<18|(63&o)<<12|(63&h)<<6|63&u,r=65536}if(s<r||s>=55296&&s<=57343)throw new Error(i);if(s>=65536){if(s>1114111)throw new Error(i);s-=65536,e.push(String.fromCharCode(55296|s>>10)),s=56320|1023&s}}e.push(String.fromCharCode(s))}return e.join("")}},function(t,e,n){t.exports=n(3).default},function(t,e,n){n.r(e);class i{constructor(t,e){this.lastId=0,this.prefix=t,this.name=e}create(t){this.lastId++;var e=this.lastId,n=this.prefix+e,i=this.name+"["+e+"]",s=!1,r=function(){s||(t.apply(null,arguments),s=!0)};return this[e]=r,{number:e,id:n,name:i,callback:r}}remove(t){delete this[t.number]}}var s=new i("_pusher_script_","Pusher.ScriptReceivers"),r="8.3.0",o=7,h=80,u=443,c="",a="sockjs.pusher.com",l=80,f=443,d="/pusher",v="stats.pusher.com",p="/pusher/auth",w="ajax",b=12e4,y=3e4,g=1e4,k={endpoint:"/pusher/user-auth",transport:"ajax"},m={endpoint:"/pusher/auth",transport:"ajax"},S="http://js.pusher.com",_="https://js.pusher.com",j="",C=new i("_pusher_dependencies","Pusher.DependenciesReceivers"),O=new class{constructor(t){this.options=t,this.receivers=t.receivers||s,this.loading={}}load(t,e,n){var i=this;if(i.loading[t]&&i.loading[t].length>0)i.loading[t].push(n);else{i.loading[t]=[n];var s=_e.createScriptRequest(i.getPath(t,e)),r=i.receivers.create((function(e){if(i.receivers.remove(r),i.loading[t]){var n=i.loading[t];delete i.loading[t];for(var o=function(t){t||s.cleanup()},h=0;h<n.length;h++)n[h](e,o)}}));s.send(r)}}getRoot(t){var e=_e.getDocument().location.protocol;return(t&&t.useTLS||"https:"===e?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version}getPath(t,e){return this.getRoot(e)+"/"+t+this.options.suffix+".js"}}({cdn_http:S,cdn_https:_,version:r,suffix:j,receivers:C});const E={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var T,x=function(t){const e=E.urls[t];if(!e)return"";let n;return e.fullUrl?n=e.fullUrl:e.path&&(n=E.baseUrl+e.path),n?`See: ${n}`:""};!function(t){t.UserAuthentication="user-authentication",t.ChannelAuthorization="channel-authorization"}(T||(T={}));class P extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class I extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class A extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class N extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class L extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class U extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class M extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class $ extends Error{constructor(t,e){super(e),this.status=t,Object.setPrototypeOf(this,new.target.prototype)}}var D=function(t,e,n,i,s){const r=_e.createXHR();for(var o in r.open("POST",n.endpoint,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.headers)r.setRequestHeader(o,n.headers[o]);if(null!=n.headersProvider){let t=n.headersProvider();for(var o in t)r.setRequestHeader(o,t[o])}return r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){let t,e=!1;try{t=JSON.parse(r.responseText),e=!0}catch(t){s(new $(200,`JSON returned from ${i.toString()} endpoint was invalid, yet status code was 200. Data was: ${r.responseText}`),null)}e&&s(null,t)}else{let t="";switch(i){case T.UserAuthentication:t=x("authenticationEndpoint");break;case T.ChannelAuthorization:t=`Clients must be authorized to join private or presence channels. ${x("authorizationEndpoint")}`}s(new $(r.status,`Unable to retrieve auth string from ${i.toString()} endpoint - received status: ${r.status} from ${n.endpoint}. ${t}`),null)}},r.send(e),r},z=String.fromCharCode,B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?z(192|e>>>6)+z(128|63&e):z(224|e>>>12&15)+z(128|e>>>6&63)+z(128|63&e)},J=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[B.charAt(n>>>18),B.charAt(n>>>12&63),e>=2?"=":B.charAt(n>>>6&63),e>=1?"=":B.charAt(63&n)].join("")},F=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,J)},q=class{constructor(t,e,n,i){this.clear=e,this.timer=t((()=>{this.timer&&(this.timer=i(this.timer))}),n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function X(t){window.clearTimeout(t)}function W(t){window.clearInterval(t)}class V extends q{constructor(t,e){super(setTimeout,X,t,(function(){return e(),null}))}}class Q extends q{constructor(t,e){super(setInterval,W,t,(function(t){return e(),t}))}}var G={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:t=>new V(0,t),method(t,...e){var n=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,n.concat(arguments))}}},Y=G;function K(t,...e){for(var n=0;n<e.length;n++){var i=e[n];for(var s in i)t[s]=i[s]&&i[s].constructor&&i[s].constructor===Object?K(t[s]||{},i[s]):i[s]}return t}function Z(){for(var t=["Pusher"],e=0;e<arguments.length;e++)t.push("string"==typeof arguments[e]?arguments[e]:ct(arguments[e]));return t.join(" : ")}function tt(t,e){var n=Array.prototype.indexOf;if(null===t)return-1;if(n&&t.indexOf===n)return t.indexOf(e);for(var i=0,s=t.length;i<s;i++)if(t[i]===e)return i;return-1}function et(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n,t)}function nt(t){var e=[];return et(t,(function(t,n){e.push(n)})),e}function it(t,e,n){for(var i=0;i<t.length;i++)e.call(n||window,t[i],i,t)}function st(t,e){for(var n=[],i=0;i<t.length;i++)n.push(e(t[i],i,t,n));return n}function rt(t,e){e=e||function(t){return!!t};for(var n=[],i=0;i<t.length;i++)e(t[i],i,t,n)&&n.push(t[i]);return n}function ot(t,e){var n={};return et(t,(function(i,s){(e&&e(i,s,t,n)||Boolean(i))&&(n[s]=i)})),n}function ht(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1}function ut(t){return e=function(t){return"object"==typeof t&&(t=ct(t)),encodeURIComponent((e=t.toString(),F(e.replace(/[^\x00-\x7F]/g,H))));var e},n={},et(t,(function(t,i){n[i]=e(t)})),n;var e,n}function ct(t){try{return JSON.stringify(t)}catch(i){return JSON.stringify((e=[],n=[],function t(i,s){var r,o,h;switch(typeof i){case"object":if(!i)return null;for(r=0;r<e.length;r+=1)if(e[r]===i)return{$ref:n[r]};if(e.push(i),n.push(s),"[object Array]"===Object.prototype.toString.apply(i))for(h=[],r=0;r<i.length;r+=1)h[r]=t(i[r],s+"["+r+"]");else for(o in h={},i)Object.prototype.hasOwnProperty.call(i,o)&&(h[o]=t(i[o],s+"["+JSON.stringify(o)+"]"));return h;case"number":case"string":case"boolean":return i}}(t,"$")))}var e,n}var at=new class{constructor(){this.globalLog=t=>{window.console&&window.console.log&&window.console.log(t)}}debug(...t){this.log(this.globalLog,t)}warn(...t){this.log(this.globalLogWarn,t)}error(...t){this.log(this.globalLogError,t)}globalLogWarn(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)}globalLogError(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)}log(t,...e){var n=Z.apply(this,arguments);ze.log?ze.log(n):ze.logToConsole&&t.bind(this)(n)}},lt=function(t,e,n,i,s){void 0===n.headers&&null==n.headersProvider||at.warn(`To send headers with the ${i.toString()} request, you must use AJAX, rather than JSONP.`);var r=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var o=t.getDocument(),h=o.createElement("script");t.auth_callbacks[r]=function(t){s(null,t)},h.src=n.endpoint+"?callback="+encodeURIComponent("Pusher.auth_callbacks['"+r+"']")+"&"+e;var u=o.getElementsByTagName("head")[0]||o.documentElement;u.insertBefore(h,u.firstChild)};class ft{constructor(t){this.src=t}send(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var i=document.getElementsByTagName("head")[0];i.insertBefore(e.script,i.firstChild),e.errorScript&&i.insertBefore(e.errorScript,e.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class dt{constructor(t,e){this.url=t,this.data=e}send(t){if(!this.request){var e=st((n=ut(ot(this.data,(function(t){return void 0!==t}))),i=[],et(n,(function(t,e){i.push([e,t])})),i),Y.method("join","=")).join("&");this.request=_e.createScriptRequest(this.url+"/"+t.number+"?"+e),this.request.send(t)}var n,i}cleanup(){this.request&&this.request.cleanup()}}var vt={name:"jsonp",getAgent:function(t,e){return function(n,i){var r=_e.createJSONPRequest("http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,n),o=_e.ScriptReceivers.create((function(e,n){s.remove(o),r.cleanup(),n&&n.host&&(t.host=n.host),i&&i(e,n)}));r.send(o)}}};function pt(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function wt(t,e){return"/app/"+t+"?protocol="+o+"&client=js&version="+r+(e?"&"+e:"")}var bt={getInitial:function(t,e){return pt("ws",e,(e.httpPath||"")+wt(t,"flash=false"))}},yt={getInitial:function(t,e){return pt("http",e,(e.httpPath||"/pusher")+wt(t))}},gt={getInitial:function(t,e){return pt("http",e,e.httpPath||"/pusher")},getPath:function(t){return wt(t)}};class kt{constructor(){this._callbacks={}}get(t){return this._callbacks[mt(t)]}add(t,e,n){var i=mt(t);this._callbacks[i]=this._callbacks[i]||[],this._callbacks[i].push({fn:e,context:n})}remove(t,e,n){if(t||e||n){var i=t?[mt(t)]:nt(this._callbacks);e||n?this.removeCallback(i,e,n):this.removeAllCallbacks(i)}else this._callbacks={}}removeCallback(t,e,n){it(t,(function(t){this._callbacks[t]=rt(this._callbacks[t]||[],(function(t){return e&&e!==t.fn||n&&n!==t.context})),0===this._callbacks[t].length&&delete this._callbacks[t]}),this)}removeAllCallbacks(t){it(t,(function(t){delete this._callbacks[t]}),this)}}function mt(t){return"_"+t}class St{constructor(t){this.callbacks=new kt,this.global_callbacks=[],this.failThrough=t}bind(t,e,n){return this.callbacks.add(t,e,n),this}bind_global(t){return this.global_callbacks.push(t),this}unbind(t,e,n){return this.callbacks.remove(t,e,n),this}unbind_global(t){return t?(this.global_callbacks=rt(this.global_callbacks||[],(e=>e!==t)),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(t,e,n){for(var i=0;i<this.global_callbacks.length;i++)this.global_callbacks[i](t,e);var s=this.callbacks.get(t),r=[];if(n?r.push(e,n):e&&r.push(e),s&&s.length>0)for(i=0;i<s.length;i++)s[i].fn.apply(s[i].context||window,r);else this.failThrough&&this.failThrough(t,e);return this}}class _t extends St{constructor(t,e,n,i,s){super(),this.initialize=_e.transportConnectionInitializer,this.hooks=t,this.name=e,this.priority=n,this.key=i,this.options=s,this.state="new",this.timeline=s.timeline,this.activityTimeout=s.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return Boolean(this.hooks.handlesActivityChecks)}supportsPing(){return Boolean(this.hooks.supportsPing)}connect(){if(this.socket||"initialized"!==this.state)return!1;var t=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(t,this.options)}catch(t){return Y.defer((()=>{this.onError(t),this.changeState("closed")})),!1}return this.bindListeners(),at.debug("Connecting",{transport:this.name,url:t}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(t){return"open"===this.state&&(Y.defer((()=>{this.socket&&this.socket.send(t)})),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))}onClose(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(t){this.emit("message",t)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=t=>{this.onError(t)},this.socket.onclose=t=>{this.onClose(t)},this.socket.onmessage=t=>{this.onMessage(t)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)}buildTimelineMessage(t){return K({cid:this.id},t)}}class jt{constructor(t){this.hooks=t}isSupported(t){return this.hooks.isSupported(t)}createConnection(t,e,n,i){return new _t(this.hooks,t,e,n,i)}}var Ct=new jt({urls:bt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(_e.getWebSocketAPI())},isSupported:function(){return Boolean(_e.getWebSocketAPI())},getSocket:function(t){return _e.createWebSocket(t)}}),Ot={urls:yt,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Et=K({getSocket:function(t){return _e.HTTPFactory.createStreamingSocket(t)}},Ot),Tt=K({getSocket:function(t){return _e.HTTPFactory.createPollingSocket(t)}},Ot),xt={isSupported:function(){return _e.isXHRSupported()}},Pt={ws:Ct,xhr_streaming:new jt(K({},Et,xt)),xhr_polling:new jt(K({},Tt,xt))},Rt=new jt({file:"sockjs",urls:gt,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:O.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),It={isSupported:function(t){return _e.isXDRSupported(t.useTLS)}},At=new jt(K({},Et,It)),Nt=new jt(K({},Tt,It));Pt.xdr_streaming=At,Pt.xdr_polling=Nt,Pt.sockjs=Rt;var Lt=Pt,Ut=new class extends St{constructor(){super();var t=this;void 0!==window.addEventListener&&(window.addEventListener("online",(function(){t.emit("online")}),!1),window.addEventListener("offline",(function(){t.emit("offline")}),!1))}isOnline(){return void 0===window.navigator.onLine||window.navigator.onLine}};class Mt{constructor(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(t,e,n,i){i=K({},i,{activityTimeout:this.pingDelay});var s=this.transport.createConnection(t,e,n,i),r=null,o=function(){s.unbind("open",o),s.bind("closed",h),r=Y.now()},h=t=>{if(s.unbind("closed",h),1002===t.code||1003===t.code)this.manager.reportDeath();else if(!t.wasClean&&r){var e=Y.now()-r;e<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(e/2,this.minPingDelay))}};return s.bind("open",o),s}isSupported(t){return this.manager.isAlive()&&this.transport.isSupported(t)}}const $t={decodeMessage:function(t){try{var e=JSON.parse(t.data),n=e.data;if("string"==typeof n)try{n=JSON.parse(e.data)}catch(t){}var i={event:e.event,channel:e.channel,data:n};return e.user_id&&(i.user_id=e.user_id),i}catch(e){throw{type:"MessageParseError",error:e,data:t.data}}},encodeMessage:function(t){return JSON.stringify(t)},processHandshake:function(t){var e=$t.decodeMessage(t);if("pusher:connection_established"===e.event){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:1e3*e.data.activity_timeout}}if("pusher:error"===e.event)return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"},getCloseAction:function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?"backoff":null:4e3===t.code?"tls_only":t.code<4100?"refused":t.code<4200?"backoff":t.code<4300?"retry":"refused"},getCloseError:function(t){return 1e3!==t.code&&1001!==t.code?{type:"PusherError",data:{code:t.code,message:t.reason||t.message}}:null}};var Dt=$t;class zt extends St{constructor(t,e){super(),this.id=t,this.transport=e,this.activityTimeout=e.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(t){return this.transport.send(t)}send_event(t,e,n){var i={event:t,data:e};return n&&(i.channel=n),at.debug("Event sent",i),this.send(Dt.encodeMessage(i))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var t={message:t=>{var e;try{e=Dt.decodeMessage(t)}catch(e){this.emit("error",{type:"MessageParseError",error:e,data:t.data})}if(void 0!==e){switch(at.debug("Event recd",e),e.event){case"pusher:error":this.emit("error",{type:"PusherError",data:e.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong")}this.emit("message",e)}},activity:()=>{this.emit("activity")},error:t=>{this.emit("error",t)},closed:t=>{e(),t&&t.code&&this.handleCloseEvent(t),this.transport=null,this.emit("closed")}},e=()=>{et(t,((t,e)=>{this.transport.unbind(e,t)}))};et(t,((t,e)=>{this.transport.bind(e,t)}))}handleCloseEvent(t){var e=Dt.getCloseAction(t),n=Dt.getCloseError(t);n&&this.emit("error",n),e&&this.emit(e,{action:e,error:n})}}class Bt{constructor(t,e){this.transport=t,this.callback=e,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=t=>{var e;this.unbindListeners();try{e=Dt.processHandshake(t)}catch(t){return this.finish("error",{error:t}),void this.transport.close()}"connected"===e.action?this.finish("connected",{connection:new zt(e.id,this.transport),activityTimeout:e.activityTimeout}):(this.finish(e.action,{error:e.error}),this.transport.close())},this.onClosed=t=>{this.unbindListeners();var e=Dt.getCloseAction(t)||"backoff",n=Dt.getCloseError(t);this.finish(e,{error:n})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(t,e){this.callback(K({transport:this.transport,action:t},e))}}class Ht{constructor(t,e){this.timeline=t,this.options=e||{}}send(t,e){this.timeline.isEmpty()||this.timeline.send(_e.TimelineTransport.getAgent(this,t),e)}}class Jt extends St{constructor(t,e){super((function(e){at.debug("No callbacks on "+t+" for "+e)})),this.name=t,this.pusher=e,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(t,e){return e(null,{auth:""})}trigger(t,e){if(0!==t.indexOf("client-"))throw new P("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var n=x("triggeringClientEvents");at.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(t,e,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(t){var e=t.event,n=t.data;"pusher_internal:subscription_succeeded"===e?this.handleSubscriptionSucceededEvent(t):"pusher_internal:subscription_count"===e?this.handleSubscriptionCountEvent(t):0!==e.indexOf("pusher_internal:")&&this.emit(e,n,{})}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)}handleSubscriptionCountEvent(t){t.data.subscription_count&&(this.subscriptionCount=t.data.subscription_count),this.emit("pusher:subscription_count",t.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,((t,e)=>{t?(this.subscriptionPending=!1,at.error(t.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:t.message},t instanceof $?{status:t.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:e.auth,channel_data:e.channel_data,channel:this.name})})))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Ft extends Jt{authorize(t,e){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:t},e)}}class qt{constructor(){this.reset()}get(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null}each(t){et(this.members,((e,n)=>{t(this.get(n))}))}setMyID(t){this.myID=t}onSubscription(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)}addMember(t){return null===this.get(t.user_id)&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)}removeMember(t){var e=this.get(t.user_id);return e&&(delete this.members[t.user_id],this.count--),e}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}class Xt extends Ft{constructor(t,e){super(t,e),this.members=new qt}authorize(t,e){super.authorize(t,((t,n)=>{return i=this,s=void 0,o=function*(){if(!t)if(null!=n.channel_data){var i=JSON.parse(n.channel_data);this.members.setMyID(i.user_id)}else{if(yield this.pusher.user.signinDonePromise,null==this.pusher.user.user_data){let t=x("authorizationEndpoint");return at.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${t}, or the user should be signed in.`),void e("Invalid auth response")}this.members.setMyID(this.pusher.user.user_data.id)}e(t,n)},new((r=void 0)||(r=Promise))((function(t,e){function n(t){try{u(o.next(t))}catch(t){e(t)}}function h(t){try{u(o.throw(t))}catch(t){e(t)}}function u(e){var i;e.done?t(e.value):(i=e.value,i instanceof r?i:new r((function(t){t(i)}))).then(n,h)}u((o=o.apply(i,s||[])).next())}));var i,s,r,o}))}handleEvent(t){var e=t.event;if(0===e.indexOf("pusher_internal:"))this.handleInternalEvent(t);else{var n=t.data,i={};t.user_id&&(i.user_id=t.user_id),this.emit(e,n,i)}}handleInternalEvent(t){var e=t.data;switch(t.event){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(t);break;case"pusher_internal:member_added":var n=this.members.addMember(e);this.emit("pusher:member_added",n);break;case"pusher_internal:member_removed":var i=this.members.removeMember(e);i&&this.emit("pusher:member_removed",i)}}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Wt=n(1),Vt=n(0);class Qt extends Ft{constructor(t,e,n){super(t,e),this.key=null,this.nacl=n}authorize(t,e){super.authorize(t,((t,n)=>{if(t)return void e(t,n);let i=n.shared_secret;i?(this.key=Object(Vt.decode)(i),delete n.shared_secret,e(null,n)):e(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null)}))}trigger(t,e){throw new L("Client events are not currently supported for encrypted channels")}handleEvent(t){var e=t.event,n=t.data;0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")?this.handleEncryptedEvent(e,n):super.handleEvent(t)}handleEncryptedEvent(t,e){if(!this.key)return void at.debug("Received encrypted event before key has been retrieved from the authEndpoint");if(!e.ciphertext||!e.nonce)return void at.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+e);let n=Object(Vt.decode)(e.ciphertext);if(n.length<this.nacl.secretbox.overheadLength)return void at.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);let i=Object(Vt.decode)(e.nonce);if(i.length<this.nacl.secretbox.nonceLength)return void at.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${i.length}`);let s=this.nacl.secretbox.open(n,i,this.key);if(null===s)return at.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),void this.authorize(this.pusher.connection.socket_id,((e,r)=>{e?at.error(`Failed to make a request to the authEndpoint: ${r}. Unable to fetch new key, so dropping encrypted event`):(s=this.nacl.secretbox.open(n,i,this.key),null!==s?this.emit(t,this.getDataToEmit(s)):at.error("Failed to decrypt event with new key. Dropping encrypted event"))}));this.emit(t,this.getDataToEmit(s))}getDataToEmit(t){let e=Object(Wt.decode)(t);try{return JSON.parse(e)}catch(t){return e}}}class Gt extends St{constructor(t,e){super(),this.state="initialized",this.connection=null,this.key=t,this.options=e,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=_e.getNetwork();n.bind("online",(()=>{this.timeline.info({netinfo:"online"}),"connecting"!==this.state&&"unavailable"!==this.state||this.retryIn(0)})),n.bind("offline",(()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()})),this.updateStrategy()}connect(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))}send(t){return!!this.connection&&this.connection.send(t)}send_event(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var t=(e,n)=>{e?this.runner=this.strategy.connect(0,t):"error"===n.action?(this.emit("error",{type:"HandshakeError",error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,t)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(t){this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new V(t||0,(()=>{this.disconnectInternally(),this.connect()}))}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new V(this.options.unavailableTimeout,(()=>{this.updateState("unavailable")}))}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new V(this.options.pongTimeout,(()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)}))}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new V(this.activityTimeout,(()=>{this.sendActivityCheck()})))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(t){return K({},t,{message:t=>{this.resetActivityCheck(),this.emit("message",t)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:t=>{this.emit("error",t)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(t){return K({},t,{connected:t=>{this.activityTimeout=Math.min(this.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(t.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let t=t=>e=>{e.error&&this.emit("error",{type:"WebSocketError",error:e.error}),t(e)};return{tls_only:t((()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)})),refused:t((()=>{this.disconnect()})),backoff:t((()=>{this.retryIn(1e3)})),retry:t((()=>{this.retryIn(0)}))}}setConnection(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}}updateState(t,e){var n=this.state;if(this.state=t,n!==t){var i=t;"connected"===i&&(i+=" with new socket ID "+e.socket_id),at.debug("State changed",n+" -> "+i),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}}shouldRetry(){return"connecting"===this.state||"connected"===this.state}}class Yt{constructor(){this.channels={}}add(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if(e.config.nacl)return Zt.createEncryptedChannel(t,e,e.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",i=x("encryptedChannelSupport");throw new L(`${n}. ${i}`)}if(0===t.indexOf("private-"))return Zt.createPrivateChannel(t,e);if(0===t.indexOf("presence-"))return Zt.createPresenceChannel(t,e);if(0===t.indexOf("#"))throw new R('Cannot create a channel with name "'+t+'".');return Zt.createChannel(t,e)}(t,e)),this.channels[t]}all(){return t=[],et(this.channels,(function(e){t.push(e)})),t;var t}find(t){return this.channels[t]}remove(t){var e=this.channels[t];return delete this.channels[t],e}disconnect(){et(this.channels,(function(t){t.disconnect()}))}}var Kt={createChannels:()=>new Yt,createConnectionManager:(t,e)=>new Gt(t,e),createChannel:(t,e)=>new Jt(t,e),createPrivateChannel:(t,e)=>new Ft(t,e),createPresenceChannel:(t,e)=>new Xt(t,e),createEncryptedChannel:(t,e,n)=>new Qt(t,e,n),createTimelineSender:(t,e)=>new Ht(t,e),createHandshake:(t,e)=>new Bt(t,e),createAssistantToTheTransportManager:(t,e,n)=>new Mt(t,e,n)},Zt=Kt;class te{constructor(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}getAssistant(t){return Zt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class ee{constructor(t,e){this.strategies=t,this.loop=Boolean(e.loop),this.failFast=Boolean(e.failFast),this.timeout=e.timeout,this.timeoutLimit=e.timeoutLimit}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){var n=this.strategies,i=0,s=this.timeout,r=null,o=(h,u)=>{u?e(null,u):(i+=1,this.loop&&(i%=n.length),i<n.length?(s&&(s*=2,this.timeoutLimit&&(s=Math.min(s,this.timeoutLimit))),r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o)):e(!0))};return r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o),{abort:function(){r.abort()},forceMinPriority:function(e){t=e,r&&r.forceMinPriority(e)}}}tryStrategy(t,e,n,i){var s=null,r=null;return n.timeout>0&&(s=new V(n.timeout,(function(){r.abort(),i(!0)}))),r=t.connect(e,(function(t,e){t&&s&&s.isRunning()&&!n.failFast||(s&&s.ensureAborted(),i(t,e))})),{abort:function(){s&&s.ensureAborted(),r.abort()},forceMinPriority:function(t){r.forceMinPriority(t)}}}}class ne{constructor(t){this.strategies=t}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){return function(t,n){var i=st(t,(function(t,i,s,r){return t.connect(n,function(t,n){return function(i,s){n[t].error=i,i?function(t){return function(t,e){for(var n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0}(t,(function(t){return Boolean(t.error)}))}(n)&&e(!0):(it(n,(function(t){t.forceMinPriority(s.transport.priority)})),e(null,s))}}(i,r))}));return{abort:function(){it(i,ie)},forceMinPriority:function(t){it(i,(function(e){e.forceMinPriority(t)}))}}}(this.strategies,t)}}function ie(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}class se{constructor(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.usingTLS,i=function(t){var e=_e.getLocalStorage();if(e)try{var n=e[re(t)];if(n)return JSON.parse(n)}catch(e){oe(t)}return null}(n),s=i&&i.cacheSkipCount?i.cacheSkipCount:0,r=[this.strategy];if(i&&i.timestamp+this.ttl>=Y.now()){var o=this.transports[i.transport];o&&(["ws","wss"].includes(i.transport)||s>3?(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),r.push(new ee([o],{timeout:2*i.latency+1e3,failFast:!0}))):s++)}var h=Y.now(),u=r.pop().connect(t,(function i(o,c){o?(oe(n),r.length>0?(h=Y.now(),u=r.pop().connect(t,i)):e(o)):(function(t,e,n,i){var s=_e.getLocalStorage();if(s)try{s[re(t)]=ct({timestamp:Y.now(),transport:e,latency:n,cacheSkipCount:i})}catch(t){}}(n,c.transport.name,Y.now()-h,s),e(null,c))}));return{abort:function(){u.abort()},forceMinPriority:function(e){t=e,u&&u.forceMinPriority(e)}}}}function re(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function oe(t){var e=_e.getLocalStorage();if(e)try{delete e[re(t)]}catch(t){}}class he{constructor(t,{delay:e}){this.strategy=t,this.options={delay:e}}isSupported(){return this.strategy.isSupported()}connect(t,e){var n,i=this.strategy,s=new V(this.options.delay,(function(){n=i.connect(t,e)}));return{abort:function(){s.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}}}class ue{constructor(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)}}class ce{constructor(t){this.strategy=t}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.strategy.connect(t,(function(t,i){i&&n.abort(),e(t,i)}));return n}}function ae(t){return function(){return t.isSupported()}}var le,fe={getRequest:function(t){var e=new window.XDomainRequest;return e.ontimeout=function(){t.emit("error",new I),t.close()},e.onerror=function(e){t.emit("error",e),t.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}};class de extends St{constructor(t,e,n){super(),this.hooks=t,this.method=e,this.url=n}start(t){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},_e.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)}close(){this.unloader&&(_e.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")}advanceBuffer(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null}isBufferTooLong(t){return this.position===t.length&&t.length>262144}}!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSED=3]="CLOSED"}(le||(le={}));var ve=le,pe=1;function we(t){var e=-1===t.indexOf("?")?"?":"&";return t+e+"t="+ +new Date+"&n="+pe++}function be(t){return _e.randomInt(t)}var ye,ge=class{constructor(t,e){this.hooks=t,this.session=be(1e3)+"/"+function(){for(var t=[],e=0;e<8;e++)t.push(be(32).toString(32));return t.join("")}(),this.location=function(t){var e=/([^\?]*)\/*(\??.*)/.exec(t);return{base:e[1],queryString:e[2]}}(e),this.readyState=ve.CONNECTING,this.openStream()}send(t){return this.sendRaw(JSON.stringify([t]))}ping(){this.hooks.sendHeartbeat(this)}close(t,e){this.onClose(t,e,!0)}sendRaw(t){if(this.readyState!==ve.OPEN)return!1;try{return _e.createSocketRequest("POST",we((e=this.location,n=this.session,e.base+"/"+n+"/xhr_send"))).start(t),!0}catch(t){return!1}var e,n}reconnect(){this.closeStream(),this.openStream()}onClose(t,e,n){this.closeStream(),this.readyState=ve.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})}onChunk(t){var e;if(200===t.status)switch(this.readyState===ve.OPEN&&this.onActivity(),t.data.slice(0,1)){case"o":e=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(e);break;case"a":e=JSON.parse(t.data.slice(1)||"[]");for(var n=0;n<e.length;n++)this.onEvent(e[n]);break;case"m":e=JSON.parse(t.data.slice(1)||"null"),this.onEvent(e);break;case"h":this.hooks.onHeartbeat(this);break;case"c":e=JSON.parse(t.data.slice(1)||"[]"),this.onClose(e[0],e[1],!0)}}onOpen(t){var e,n;this.readyState===ve.CONNECTING?(t&&t.hostname&&(this.location.base=(e=t.hostname,(n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(this.location.base))[1]+e+n[3])),this.readyState=ve.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(t){this.readyState===ve.OPEN&&this.onmessage&&this.onmessage({data:t})}onActivity(){this.onactivity&&this.onactivity()}onError(t){this.onerror&&this.onerror(t)}openStream(){this.stream=_e.createSocketRequest("POST",we(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",(t=>{this.onChunk(t)})),this.stream.bind("finished",(t=>{this.hooks.onFinished(this,t)})),this.stream.bind("buffer_too_long",(()=>{this.reconnect()}));try{this.stream.start()}catch(t){Y.defer((()=>{this.onError(t),this.onClose(1006,"Could not start streaming",!1)}))}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}},ke={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr_streaming"+t.queryString},onHeartbeat:function(t){t.sendRaw("[]")},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){t.onClose(1006,"Connection interrupted ("+e+")",!1)}},me={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr"+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Se={getRequest:function(t){var e=new(_e.getXHRAPI());return e.onreadystatechange=e.onprogress=function(){switch(e.readyState){case 3:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},abortRequest:function(t){t.onreadystatechange=null,t.abort()}},_e={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:s,DependenciesReceivers:C,getDefaultStrategy:function(t,e,n){var i={};function s(e,s,r,o,h){var u=n(t,e,s,r,o,h);return i[e]=u,u}var r,o=Object.assign({},e,{hostNonTLS:t.wsHost+":"+t.wsPort,hostTLS:t.wsHost+":"+t.wssPort,httpPath:t.wsPath}),h=Object.assign({},o,{useTLS:!0}),u=Object.assign({},e,{hostNonTLS:t.httpHost+":"+t.httpPort,hostTLS:t.httpHost+":"+t.httpsPort,httpPath:t.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},a=new te({minPingDelay:1e4,maxPingDelay:t.activityTimeout}),l=new te({lives:2,minPingDelay:1e4,maxPingDelay:t.activityTimeout}),f=s("ws","ws",3,o,a),d=s("wss","ws",3,h,a),v=s("sockjs","sockjs",1,u),p=s("xhr_streaming","xhr_streaming",1,u,l),w=s("xdr_streaming","xdr_streaming",1,u,l),b=s("xhr_polling","xhr_polling",1,u),y=s("xdr_polling","xdr_polling",1,u),g=new ee([f],c),k=new ee([d],c),m=new ee([v],c),S=new ee([new ue(ae(p),p,w)],c),_=new ee([new ue(ae(b),b,y)],c),j=new ee([new ue(ae(S),new ne([S,new he(_,{delay:4e3})]),_)],c),C=new ue(ae(j),j,m);return r=new ne(e.useTLS?[g,new he(C,{delay:2e3})]:[g,new he(k,{delay:2e3}),new he(C,{delay:5e3})]),new se(new ce(new ue(ae(f),r,C)),i,{ttl:18e5,timeline:e.timeline,useTLS:e.useTLS})},Transports:Lt,transportConnectionInitializer:function(){var t=this;t.timeline.info(t.buildTimelineMessage({transport:t.name+(t.options.useTLS?"s":"")})),t.hooks.isInitialized()?t.changeState("initialized"):t.hooks.file?(t.changeState("initializing"),O.load(t.hooks.file,{useTLS:t.options.useTLS},(function(e,n){t.hooks.isInitialized()?(t.changeState("initialized"),n(!0)):(e&&t.onError(e),t.onClose(),n(!1))}))):t.onClose()},HTTPFactory:{createStreamingSocket(t){return this.createSocket(ke,t)},createPollingSocket(t){return this.createSocket(me,t)},createSocket:(t,e)=>new ge(t,e),createXHR(t,e){return this.createRequest(Se,t,e)},createRequest:(t,e,n)=>new de(t,e,n),createXDR:function(t,e){return this.createRequest(fe,t,e)}},TimelineTransport:vt,getXHRAPI:()=>window.XMLHttpRequest,getWebSocketAPI:()=>window.WebSocket||window.MozWebSocket,setup(t){window.Pusher=t;var e=()=>{this.onDocumentBody(t.ready)};window.JSON?e():O.load("json2",{},e)},getDocument:()=>document,getProtocol(){return this.getDocument().location.protocol},getAuthorizers:()=>({ajax:D,jsonp:lt}),onDocumentBody(t){document.body?t():setTimeout((()=>{this.onDocumentBody(t)}),0)},createJSONPRequest:(t,e)=>new dt(t,e),createScriptRequest:t=>new ft(t),getLocalStorage(){try{return window.localStorage}catch(t){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR:()=>new ActiveXObject("Microsoft.XMLHTTP"),getNetwork:()=>Ut,createWebSocket(t){return new(this.getWebSocketAPI())(t)},createSocketRequest(t,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(t,e);if(this.isXDRSupported(0===e.indexOf("https:")))return this.HTTPFactory.createXDR(t,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var t=this.getXHRAPI();return Boolean(t)&&void 0!==(new t).withCredentials},isXDRSupported(t){var e=t?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===e},addUnloadListener(t){void 0!==window.addEventListener?window.addEventListener("unload",t,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",t)},removeUnloadListener(t){void 0!==window.addEventListener?window.removeEventListener("unload",t,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",t)},randomInt:t=>Math.floor((window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)*t)};!function(t){t[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(ye||(ye={}));var je=ye;class Ce{constructor(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(t,e){t<=this.options.level&&(this.events.push(K({},e,{timestamp:Y.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(t){this.log(je.ERROR,t)}info(t){this.log(je.INFO,t)}debug(t){this.log(je.DEBUG,t)}isEmpty(){return 0===this.events.length}send(t,e){var n=K({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(n,((t,n)=>{t||this.sent++,e&&e(t,n)})),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Oe{constructor(t,e,n,i){this.name=t,this.priority=e,this.transport=n,this.options=i||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(t,e){if(!this.isSupported())return Ee(new M,e);if(this.priority<t)return Ee(new A,e);var n=!1,i=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),s=null,r=function(){i.unbind("initialized",r),i.connect()},o=function(){s=Zt.createHandshake(i,(function(t){n=!0,c(),e(null,t)}))},h=function(t){c(),e(t)},u=function(){var t;c(),t=ct(i),e(new N(t))},c=function(){i.unbind("initialized",r),i.unbind("open",o),i.unbind("error",h),i.unbind("closed",u)};return i.bind("initialized",r),i.bind("open",o),i.bind("error",h),i.bind("closed",u),i.initialize(),{abort:()=>{n||(c(),s?s.close():i.close())},forceMinPriority:t=>{n||this.priority<t&&(s?s.close():i.close())}}}}function Ee(t,e){return Y.defer((function(){e(t)})),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Te}=_e;var xe=function(t,e,n,i,s,r){var o,h=Te[n];if(!h)throw new U(n);return t.enabledTransports&&-1===tt(t.enabledTransports,e)||t.disabledTransports&&-1!==tt(t.disabledTransports,e)?o=Pe:(s=Object.assign({ignoreNullOrigin:t.ignoreNullOrigin},s),o=new Oe(e,i,r?r.getAssistant(h):h,s)),o},Pe={isSupported:function(){return!1},connect:function(t,e){var n=Y.defer((function(){e(new M)}));return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Re(t){return t.httpHost?t.httpHost:t.cluster?`sockjs-${t.cluster}.pusher.com`:a}function Ie(t){return t.wsHost?t.wsHost:`ws-${t.cluster}.pusher.com`}function Ae(t){return"https:"===_e.getProtocol()||!1!==t.forceTLS}function Ne(t){return"enableStats"in t?t.enableStats:"disableStats"in t&&!t.disableStats}function Le(t){const e=Object.assign(Object.assign({},k),t.userAuthentication);return"customHandler"in e&&null!=e.customHandler?e.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.UserAuthentication,n)}})(e)}function Ue(t,e){const n=function(t,e){let n;return"channelAuthorization"in t?n=Object.assign(Object.assign({},m),t.channelAuthorization):(n={transport:t.authTransport||w,endpoint:t.authEndpoint||p},"auth"in t&&("params"in t.auth&&(n.params=t.auth.params),"headers"in t.auth&&(n.headers=t.auth.headers)),"authorizer"in t&&(n.customHandler=((t,e,n)=>{const i={authTransport:e.transport,authEndpoint:e.endpoint,auth:{params:e.params,headers:e.headers}};return(e,s)=>{const r=t.channel(e.channelName);n(r,i).authorize(e.socketId,s)}})(e,n,t.authorizer))),n}(t,e);return"customHandler"in n&&null!=n.customHandler?n.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in n+="&channel_name="+encodeURIComponent(t.channelName),e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.ChannelAuthorization,n)}})(n)}class Me extends St{constructor(t){super((function(t){at.debug(`No callbacks on watchlist events for ${t}`)})),this.pusher=t,this.bindWatchlistInternalEvent()}handleEvent(t){t.data.events.forEach((t=>{this.emit(t.name,t)}))}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",(t=>{"pusher_internal:watchlist_events"===t.event&&this.handleEvent(t)}))}}class $e extends St{constructor(t){super((function(t){at.debug("No callbacks on user for "+t)})),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(t,e)=>{if(t)return at.warn(`Error during signin: ${t}`),void this._cleanup();this.pusher.send_event("pusher:signin",{auth:e.auth,user_data:e.user_data})},this.pusher=t,this.pusher.connection.bind("state_change",(({previous:t,current:e})=>{"connected"!==t&&"connected"===e&&this._signin(),"connected"===t&&"connected"!==e&&(this._cleanup(),this._newSigninPromiseIfNeeded())})),this.watchlist=new Me(t),this.pusher.connection.bind("message",(t=>{"pusher:signin_success"===t.event&&this._onSigninSuccess(t.data),this.serverToUserChannel&&this.serverToUserChannel.name===t.channel&&this.serverToUserChannel.handleEvent(t)}))}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),"connected"===this.pusher.connection.state&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(t){try{this.user_data=JSON.parse(t.user_data)}catch(e){return at.error(`Failed parsing user data after signin: ${t.user_data}`),void this._cleanup()}if("string"!=typeof this.user_data.id||""===this.user_data.id)return at.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),void this._cleanup();this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){this.serverToUserChannel=new Jt(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global(((t,e)=>{0!==t.indexOf("pusher_internal:")&&0!==t.indexOf("pusher:")&&this.emit(t,e)})),(t=>{t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():t.subscriptionPending||"connected"!==this.pusher.connection.state||t.subscribe()})(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested)return;if(this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:t,resolve:e}=function(){let t,e;return{promise:new Promise(((n,i)=>{t=n,e=i})),resolve:t,reject:e}}();t.done=!1;const n=()=>{t.done=!0};t.then(n).catch(n),this.signinDonePromise=t,this._signinDoneResolve=e}}class De{static ready(){De.isReady=!0;for(var t=0,e=De.instances.length;t<e;t++)De.instances[t].connect()}static getClientFeatures(){return nt(ot({ws:_e.Transports.ws},(function(t){return t.isSupported({})})))}constructor(t,e){!function(t){if(null==t)throw"You must pass your app key when you instantiate Pusher."}(t),function(t){if(null==t)throw"You must pass an options object";if(null==t.cluster)throw"Options object must provide a cluster";"disableStats"in t&&at.warn("The disableStats option is deprecated in favor of enableStats")}(e),this.key=t,this.config=function(t,e){let n={activityTimeout:t.activityTimeout||b,cluster:t.cluster,httpPath:t.httpPath||d,httpPort:t.httpPort||l,httpsPort:t.httpsPort||f,pongTimeout:t.pongTimeout||y,statsHost:t.statsHost||v,unavailableTimeout:t.unavailableTimeout||g,wsPath:t.wsPath||c,wsPort:t.wsPort||h,wssPort:t.wssPort||u,enableStats:Ne(t),httpHost:Re(t),useTLS:Ae(t),wsHost:Ie(t),userAuthenticator:Le(t),channelAuthorizer:Ue(t,e)};return"disabledTransports"in t&&(n.disabledTransports=t.disabledTransports),"enabledTransports"in t&&(n.enabledTransports=t.enabledTransports),"ignoreNullOrigin"in t&&(n.ignoreNullOrigin=t.ignoreNullOrigin),"timelineParams"in t&&(n.timelineParams=t.timelineParams),"nacl"in t&&(n.nacl=t.nacl),n}(e,this),this.channels=Zt.createChannels(),this.global_emitter=new St,this.sessionID=_e.randomInt(1e9),this.timeline=new Ce(this.key,this.sessionID,{cluster:this.config.cluster,features:De.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:je.INFO,version:r}),this.config.enableStats&&(this.timelineSender=Zt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+_e.TimelineTransport.name})),this.connection=Zt.createConnectionManager(this.key,{getStrategy:t=>_e.getDefaultStrategy(this.config,t,xe),timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",(()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())})),this.connection.bind("message",(t=>{var e=0===t.event.indexOf("pusher_internal:");if(t.channel){var n=this.channel(t.channel);n&&n.handleEvent(t)}e||this.global_emitter.emit(t.event,t.data)})),this.connection.bind("connecting",(()=>{this.channels.disconnect()})),this.connection.bind("disconnected",(()=>{this.channels.disconnect()})),this.connection.bind("error",(t=>{at.warn(t)})),De.instances.push(this),this.timeline.info({instances:De.instances.length}),this.user=new $e(this),De.isReady&&this.connect()}channel(t){return this.channels.find(t)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),e=this.timelineSender;this.timelineSenderTimer=new Q(6e4,(function(){e.send(t)}))}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(t,e,n){return this.global_emitter.bind(t,e,n),this}unbind(t,e,n){return this.global_emitter.unbind(t,e,n),this}bind_global(t){return this.global_emitter.bind_global(t),this}unbind_global(t){return this.global_emitter.unbind_global(t),this}unbind_all(t){return this.global_emitter.unbind_all(),this}subscribeAll(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)}subscribe(t){var e=this.channels.add(t,this);return e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.connection.state||e.subscribe(),e}unsubscribe(t){var e=this.channels.find(t);e&&e.subscriptionPending?e.cancelSubscription():(e=this.channels.remove(t))&&e.subscribed&&e.unsubscribe()}send_event(t,e,n){return this.connection.send_event(t,e,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}De.instances=[],De.isReady=!1,De.logToConsole=!1,De.Runtime=_e,De.ScriptReceivers=_e.ScriptReceivers,De.DependenciesReceivers=_e.DependenciesReceivers,De.auth_callbacks=_e.auth_callbacks;var ze=e.default=De;_e.setup(De)}])},N.exports=A());
2
2
  /*!
3
3
  * Pusher JavaScript Library v8.3.0
4
4
  * https://pusher.com/
@@ -1 +1 @@
1
- import{r as t,f as e,h as o,H as i}from"./p-BWP8psSS.js";import{p as n,t as s}from"./p-Bi5WA4Eb.js";import"./p-Ojgt8vhK.js";import"./p-Bvqcvhjw.js";const r=class{constructor(e){t(this,e)}static NUDGE_DISTANCE_PX=16;static NUDGE_IDLE_THRESHOLD_MS=1500;static GRADIENT_VISIBILITY_THRESHOLD_PX=1;static GRADIENT_WIDTH_FALLBACK_PX=100;static EDGE_DRAG_MAX_PX=32;static EDGE_DRAG_RESISTANCE=.95;static MOUSE_DRAG_SMOOTHING_MS=60;static MOBILE_BREAKPOINT_PX=450;static UNIFIED_BUTTONS_MOBILE_MAX_DOTS=4;focusableSelector='a[href], [tabindex]:not([tabindex="-1"])';handleResize=()=>{this.getDotCount();const t=this.getSlotElements();if(!t?.length)return;const e=Math.max(0,Math.min(this.activeItem,t.length-1));this.moveToItem(t[e],e),this.checkGradient()};handleSlotChangeListener=()=>this.handleSlotChange();managedFocusableElements=[];managedSlideFocusWithinListeners=[];draggedAnchor=null;dragMoved=!1;dragPointerStartX=0;dragStartX=0;dragStartActiveItem=0;dragPointerType="";nudgeTimeoutId;nudgeGradientRafId;lastInteractionAt=0;trackElement=null;trackContentElement=null;mobileBackButtonWrapper=null;container;leftGradientRef;rightGradientRef;slotObserver;activeDotIndex=0;dotCount=1;totalItems=0;activeItem=0;isDragging=!1;dragOffset=0;isNudgeAnimating=!1;theme="light";showDots=!0;showGradient=!1;showButtons=!0;transitionDuration=500;swipeThreshold=32;transitionTiming="ease-out";buttonIconLeft="arrow-left";buttonIconRight="arrow-right";maxDots=8;label;nudgeAnimationInterval=0;unifiedButtons=!1;language="lv";safeForceUpdate(){try{e(this)}catch{}}async onLanguageChange(t){await n("tet-components",t),this.safeForceUpdate()}onActiveItemChange(){this.updateSlideFocusableTabIndexes()}checkGradient(){const t=this.leftGradientRef,e=this.rightGradientRef;if(!t||!e)return;if(!this.showGradient)return t.style.opacity="0",void(e.style.opacity="0");const o=this.getViewportWidth(),i=this.getSlotClientWidth(),n=Math.max(0,i-o),s=-this.getRealDragOffset(),a=Math.max(0,Math.min(n,s)),l=n-a<r.GRADIENT_VISIBILITY_THRESHOLD_PX;a<r.GRADIENT_VISIBILITY_THRESHOLD_PX?(t.style.opacity="0",e.style.opacity="1"):l?(t.style.opacity="1",e.style.opacity="0"):(t.style.opacity="1",e.style.opacity="1")}onNudgeAnimIntervalChange(){this.syncNudgeSchedule()}onNudgeAnimationStateChange(){this.syncNudgeGradientLoop(),this.checkGradient()}async componentWillLoad(){await n("tet-components",this.language)}getSlotElements(){const t=this.container?.querySelector("slot");if(!t)return;let e=t.assignedElements?t.assignedElements():[];return 0!==e.length?(e[0].className.includes("carousel-wrapper")&&(e=Array.from(e[0].children)),e):void 0}getViewportWidth(){return this.container?.offsetWidth||window.innerWidth}getSlotClientWidth(){return this.trackElement?.querySelector("slot")?.offsetWidth||window.innerWidth}getMaxScrollableOffset(){return Math.max(0,this.getSlotClientWidth()-this.getViewportWidth())}afterLayout(t){requestAnimationFrame((()=>requestAnimationFrame(t)))}getDotScreenLength(){return this.getSlotClientWidth()/this.dotCount}isLast(t,e){return this.getSlotClientWidth()-e<=t}isLastViewport(t){const e=this.getViewportWidth();return this.isLast(e,t)}isLastDotScreen(t,e){const o=this.getViewportWidth(),i=Math.max(e,o);return this.isLast(i,t)}getItemLayoutMetrics(){const t=this.getSlotElements();return t&&0!==t.length?t.map(((t,e)=>{const o=t.offsetLeft;return{item:t,index:e,left:o,right:o+t.offsetWidth}})):[]}getFullyVisibleItemCount(){const t=this.getItemLayoutMetrics();if(!t.length)return 0;const e=this.getViewportWidth(),o=this.getClampedViewportLeft(),i=o+e;let n=0;for(const{left:e,right:s}of t)e>=o&&s<=i&&n++;return n}getClampedViewportLeft(){const t=Math.abs(this.dragOffset),e=this.getMaxScrollableOffset();return Math.max(0,Math.min(e,t))}getVisibleItemCountFromIndex(t){const e=this.getItemLayoutMetrics();if(!e.length)return 1;const o=Math.max(0,Math.min(t,e.length-1)),i=this.getViewportWidth(),n=e[o].left+i+.5;let s=0;for(let t=o;t<e.length&&e[t].right<=n;t++)s++;return Math.max(1,s)}getFirstVisibleItemInViewport(){const t=this.getItemLayoutMetrics();if(!t.length)return null;const e=this.getClampedViewportLeft(),o=.5,i=t.find((t=>t.left<=e+o&&t.right>e+o));if(i){if(i.right-e>=(i.right-i.left)/2||i.index===t.length-1)return{item:i.item,index:i.index};const o=t[i.index+1];if(o)return{item:o.item,index:o.index}}if(e<=t[0].left+o)return{item:t[0].item,index:t[0].index};const n=t.find((t=>t.left>e+o));if(n)return{item:n.item,index:n.index};const s=t.at(-1);return{item:s.item,index:s.index}}getEdgeSnapTarget(t){const e=this.getItemLayoutMetrics();if(!e.length)return null;const o=this.getClampedViewportLeft(),i=o+this.getViewportWidth(),n=e[0],s=e.at(-1);if(t<0){const t=Math.min(n.right,i)-Math.max(n.left,o);if(t>0&&t>=(n.right-n.left)/2)return{item:n.item,index:n.index}}if(t>0){const t=Math.min(s.right,i)-Math.max(s.left,o);if(t>0&&t>=(s.right-s.left)/2)return{item:s.item,index:s.index}}return null}getSwipeTarget(t){const e=this.getSlotElements();if(!e||0===e.length)return null;const o=this.getEdgeSnapTarget(t);if(o)return o;const i=this.getFirstVisibleItemInViewport();let n=i?.index??this.dragStartActiveItem;t>0&&n<=this.dragStartActiveItem&&(n=this.dragStartActiveItem+1),t<0&&n>=this.dragStartActiveItem&&(n=this.dragStartActiveItem-1),n=Math.max(0,Math.min(e.length-1,n));const s=e[n];return s?{item:s,index:n}:null}getRealDragOffset(){return this.dragOffset+this.getCurrentNudgeTranslateX()}applyEdgeDragResistance(t,e){return t>0?Math.min(r.EDGE_DRAG_MAX_PX,t*r.EDGE_DRAG_RESISTANCE):t<e?e+Math.max(-r.EDGE_DRAG_MAX_PX,(t-e)*r.EDGE_DRAG_RESISTANCE):t}getCurrentNudgeTranslateX(){if(!this.isNudgeAnimating||!this.trackContentElement)return 0;const t=getComputedStyle(this.trackContentElement).transform;if(!t||"none"===t)return 0;try{return new DOMMatrixReadOnly(t).m41||0}catch{return 0}}getDotCount(){const t=this.getSlotElements();if(!t)return this.dotCount=1,this.totalItems=0,void(this.activeDotIndex=0);this.totalItems=t.length;const e=this.getViewportWidth(),o=this.getSlotClientWidth(),i=Math.ceil(o/Math.max(1,e)),n=Number.isFinite(this.maxDots)?this.maxDots:i;let s=n;this.unifiedButtons&&e<r.MOBILE_BREAKPOINT_PX&&(s=Math.min(n,r.UNIFIED_BUTTONS_MOBILE_MAX_DOTS)),this.dotCount=Math.max(1,Math.min(s,i)),this.activeDotIndex=this.clampDotIndex(this.activeDotIndex)}handleMove=()=>{const t=this.getSlotElements();if(!t)return;const e=t[this.activeItem];e&&this.moveToItem(e)};navigateByStep(t){this.registerUserInteraction();const e=this.getSlotElements();if(!e||0===e.length)return;const o=this.activeDotIndex,i=this.getFirstVisibleItemInViewport(),n=i?.index??this.activeItem,s=this.getClampedViewportLeft()>0;if(t<0&&0===n&&s){const t=e[0];return void(t&&this.moveToItem(t,0))}const r=this.getVisibleItemCountFromIndex(n),a=Math.max(0,Math.min(e.length-1,n+t*r));if(a===n)return;const l=e[a];l&&(this.moveToItem(l,a),Math.abs(this.activeDotIndex-o)>1&&this.moveToDotIndex(o+t))}handlePrev=()=>{this.navigateByStep(-1)};handleNext=()=>{this.navigateByStep(1)};moveToLastScreen=()=>{this.dragOffset=-this.getMaxScrollableOffset()};getGradientWidth(){if(!this.showGradient)return 0;const t=this.leftGradientRef?.offsetWidth;return t&&t>0?t:r.GRADIENT_WIDTH_FALLBACK_PX}calculateGradient(t,e){const o=this.getSlotClientWidth();let i=this.showGradient?160:0;return i=e<160?e:i,i=o-e-t.offsetWidth<160?0:i,i}calcLastScreenElement=t=>{const e=this.getSlotElements();if(!e)return null;const o=this.trackElement.getBoundingClientRect(),i=this.getFirstItemOffset();for(const[n,s]of e.entries()){let e=s.getBoundingClientRect().left-o.left-i;const r=this.calculateGradient(s,e);if(e>=t-this.swipeThreshold+r)return{item:s,index:n}}return{item:e[0],index:0}};moveToDotIndex(t){this.activeDotIndex=this.clampDotIndex(t);const e=this.getMaxScrollableOffset(),o=this.dotCount-1!==this.activeDotIndex||this.isDragging?this.activeDotIndex*this.getDotScreenLength():e,i=Math.max(0,Math.min(o,e)),n=this.calcLastScreenElement(i);if(!n)return this.activeItem=0,void(this.dragOffset=0);const{index:s}=n;this.activeItem=s,this.dragOffset=-i}handleDotClick=t=>{this.registerUserInteraction(),this.moveToDotIndex(t)};focusDot=t=>{if(!this.container)return;const e=Array.from(this.container.querySelectorAll(".tet-carousel__dot"));e[t]?.focus()};getKeyboardTargetIndex(t,e,o){if(o<1)return null;switch(t){case"ArrowRight":case"ArrowDown":return Math.min(o,e+1);case"ArrowLeft":case"ArrowUp":return Math.max(0,e-1);case"Home":return 0;case"End":return o;default:return null}}handleNavigationKeyDown(t,e,o,i,n){const s=this.getKeyboardTargetIndex(t.key,e,o);null!==s&&(t.preventDefault(),t.stopPropagation(),i(s)&&this.afterLayout((()=>n(s))))}handleDotKeyDown=(t,e)=>{if("Tab"===t.key&&t.shiftKey){if(this.hasVisibleMobileBackButtonTarget())return;if(!this.hasFocusableTargetInSlide(this.activeItem))return;return this.registerUserInteraction(),t.preventDefault(),t.stopPropagation(),void this.afterLayout((()=>this.focusSlideByIndex(this.activeItem)))}this.handleNavigationKeyDown(t,e,this.dotCount-1,(t=>(this.handleDotClick(t),!0)),(t=>this.focusDot(t)))};isElementVisible(t){if(!t.isConnected)return!1;if(t.hidden||t.hasAttribute("hidden"))return!1;if(0===t.getClientRects().length)return!1;const e=getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility}hasVisibleMobileBackButtonTarget(){if(this.isLeftNavigationDisabled())return!1;const t=this.mobileBackButtonWrapper;return!!t&&this.isElementVisible(t)}hasFocusableTargetInSlide(t){return this.managedFocusableElements.some((({slideIndex:e,element:o})=>e===t&&this.isElementVisible(o)))}onPointerDown=t=>{this.registerUserInteraction(),this.dragPointerType=t.pointerType||"mouse",t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.isDragging=!0,this.dragStartX=t.screenX,this.dragMoved=!1,this.dragPointerStartX=t.screenX,this.dragStartActiveItem=this.activeItem,document.body.style.userSelect="none",document.addEventListener("pointermove",this.onPointerMove),document.addEventListener("pointerup",this.onPointerUp),document.addEventListener("pointercancel",this.onPointerUp);let e=t.target;for(this.draggedAnchor=null;e;){if("A"===e.tagName||e.getAttribute("tabindex")){this.draggedAnchor=e;break}e=e.parentElement}};onPointerMove=t=>{if(!this.isDragging)return;const e=Math.abs(t.screenX-this.dragPointerStartX);if(!this.dragMoved&&e>5&&(this.dragMoved=!0,this.trackElement))try{this.trackElement.setPointerCapture?.(t.pointerId)}catch{}let o=this.dragOffset;o+=t.screenX-this.dragStartX,this.dragStartX=t.screenX;const i=this.getMinDragOffset();this.dragOffset=this.applyEdgeDragResistance(o,i);const n=this.getFirstVisibleItemInViewport();n&&this.activeItem!==n.index&&(this.activeItem=n.index)};releaseTrackPointerCapture(t){try{this.trackElement?.releasePointerCapture?.(t)}catch{}}getMinDragOffset(){return-this.getMaxScrollableOffset()}snapToEdge(t){if(0===t)return void(this.dragOffset=0);const e=this.dragOffset>0;this.activeItem=e?0:Math.max(0,this.totalItems-1),this.activeDotIndex=e?0:Math.max(0,this.dotCount-1),this.dragOffset=e?0:t}moveBySwipeDelta(t){if(Math.abs(t)<=this.swipeThreshold)return this.activeItem=this.dragStartActiveItem,void this.afterLayout((()=>this.handleMove()));const e=this.getSwipeTarget(t<0?1:-1);e&&this.moveToItem(e.item,e.index)}finalizePointerDrag(){document.body.style.userSelect="",document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp),document.removeEventListener("pointercancel",this.onPointerUp),this.dragPointerType=""}preventClickAfterDrag(){if(!this.draggedAnchor||!this.dragMoved)return;const t=e=>{e.preventDefault(),e.stopPropagation(),this.draggedAnchor?.removeEventListener("click",t,!0)};this.draggedAnchor.addEventListener("click",t,!0)}onPointerUp=t=>{if(!this.isDragging)return;this.registerUserInteraction(),this.releaseTrackPointerCapture(t.pointerId),this.isDragging=!1;const e=this.getMinDragOffset(),o=t.screenX-this.dragPointerStartX;this.dragOffset>0||this.dragOffset<e?this.snapToEdge(e):this.moveBySwipeDelta(o),this.finalizePointerDrag(),this.preventClickAfterDrag()};_showButtons(t=this.getFullyVisibleItemCount()){return!(!this.showButtons||t>=this.totalItems)}_showDots(t=this.getFullyVisibleItemCount()){return!!this.showDots&&!(this.totalItems<=0||t>=this.totalItems)}componentDidLoad(){this.getDotCount(),window.addEventListener("resize",this.handleResize),this.checkGradient(),this.initSlotListeners(),this.syncNudgeSchedule(),this.refreshSlideFocusableElements()}handleSlotChange(){this.getDotCount();const t=Math.max(0,this.totalItems-1);this.activeItem=Math.max(0,Math.min(this.activeItem,t)),this.refreshSlideFocusableElements(),this.checkGradient(),this.safeForceUpdate()}initSlotListeners(){const t=this.container?.querySelector("slot");if(!t)return;if(t.addEventListener("slotchange",this.handleSlotChangeListener),"function"!=typeof t.assignedElements)return;const e=t.assignedElements();if(1!==e.length)return;const o=e[0];this.slotObserver=new MutationObserver((()=>this.handleSlotChange())),this.slotObserver.observe(o,{childList:!0,subtree:!1})}isTabbableElement(t){if("A"===t.tagName)return t.hasAttribute("href");const e=t.getAttribute("tabindex");return null!==e&&"-1"!==e.trim()}getSlideFocusableElements(t){const e=new Set;return this.isTabbableElement(t)&&e.add(t),Array.from(t.querySelectorAll(this.focusableSelector)).forEach((t=>{this.isTabbableElement(t)&&e.add(t)})),t.shadowRoot&&Array.from(t.shadowRoot.querySelectorAll(this.focusableSelector)).forEach((t=>{this.isTabbableElement(t)&&e.add(t)})),Array.from(e)}clearManagedSlideFocusableElements(){this.managedSlideFocusWithinListeners.forEach((({slide:t,onFocusWithin:e})=>{t.removeEventListener("focusin",e)})),this.managedSlideFocusWithinListeners=[],this.managedFocusableElements.forEach((({element:t,originalTabIndex:e,onKeyDown:o})=>{t.removeEventListener("keydown",o),null===e?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e)})),this.managedFocusableElements=[]}updateSlideFocusableTabIndexes(){this.managedFocusableElements.length&&this.managedFocusableElements.forEach((({element:t,slideIndex:e})=>{t.setAttribute("tabindex",e===this.activeItem?"0":"-1")}))}focusSlideByIndex(t){const e=this.managedFocusableElements.find((e=>e.slideIndex===t)),o=e?.element;if(o)try{o.focus({preventScroll:!0})}catch{}}handleSlideKeyDown(t,e){this.handleNavigationKeyDown(t,e,this.totalItems-1,(t=>{const e=this.getSlotElements();return!!e?.[t]&&(this.registerUserInteraction(),this.moveToItem(e[t],t,0),!0)}),(t=>this.focusSlideByIndex(t)))}refreshSlideFocusableElements(){this.clearManagedSlideFocusableElements();const t=this.getSlotElements();t?.length&&(t.forEach(((e,o)=>{const i=()=>{this.registerUserInteraction();const i=o===t.length-1?0:this.getGradientWidth();this.moveToItem(e,o,i)};this.managedSlideFocusWithinListeners.push({slide:e,onFocusWithin:i}),e.addEventListener("focusin",i),this.getSlideFocusableElements(e).forEach((t=>{const e=t=>this.handleSlideKeyDown(t,o);this.managedFocusableElements.push({element:t,slideIndex:o,originalTabIndex:t.getAttribute("tabindex"),onKeyDown:e}),t.addEventListener("keydown",e)}))})),this.updateSlideFocusableTabIndexes())}startNudgeGradientLoop(){if(this.nudgeGradientRafId)return;const t=()=>{this.checkGradient(),this.nudgeGradientRafId=this.isNudgeAnimating?requestAnimationFrame(t):void 0};this.nudgeGradientRafId=requestAnimationFrame(t)}stopNudgeGradientLoop(){this.nudgeGradientRafId&&(cancelAnimationFrame(this.nudgeGradientRafId),this.nudgeGradientRafId=void 0)}syncNudgeGradientLoop(){this.isNudgeAnimating?this.startNudgeGradientLoop():this.stopNudgeGradientLoop()}registerUserInteraction(){this.lastInteractionAt=Date.now(),this.stopNudgeAnimation()&&this.scheduleNextNudge()}hasRecentInteraction(){return!!this.lastInteractionAt&&Date.now()-this.lastInteractionAt<r.NUDGE_IDLE_THRESHOLD_MS}isRightNavigationDisabled(){return this.dotCount<=1||this.activeItem===this.totalItems-1||this.isLastViewport(-this.dragOffset)}isLeftNavigationDisabled(){return this.dotCount<=1||0===this.activeItem}isNudgeEligible(){return!(!this.trackElement||this.isDragging||this.isNudgeAnimating||this.hasRecentInteraction()||this.isRightNavigationDisabled()||0!==this.dragOffset)}scheduleNextNudge(){this.nudgeAnimationInterval<=0||(this.clearNudgeTimeout(),this.nudgeTimeoutId=setTimeout((()=>{this.nudgeTimeoutId=void 0,this.isNudgeEligible()?this.isNudgeAnimating=!0:this.scheduleNextNudge()}),this.nudgeAnimationInterval))}onNudgeAnimationEnd=t=>{"tet-carousel-nudge"===t.animationName&&(this.stopNudgeAnimation(),this.scheduleNextNudge())};stopNudgeAnimation(){const t=this.isNudgeAnimating;return t&&(this.isNudgeAnimating=!1),t}clearNudgeTimeout(){this.nudgeTimeoutId&&(clearTimeout(this.nudgeTimeoutId),this.nudgeTimeoutId=void 0)}stopNudgeSchedule(){this.clearNudgeTimeout(),this.stopNudgeAnimation()}syncNudgeSchedule(){this.stopNudgeSchedule(),this.scheduleNextNudge()}clampDotIndex(t){return Math.max(0,Math.min(t,this.dotCount-1))}setDotIndex(t,e){let o=0;const i=this.getDotScreenLength();o=this.isLastDotScreen(t,i)?this.dotCount-1:Math.round((t+e)/i),this.activeDotIndex=this.clampDotIndex(o)}getFirstItemOffset(){const t=this.getSlotElements();if(!t?.length)return 0;const e=this.trackElement.getBoundingClientRect();return t[0].getBoundingClientRect().left-e.left}moveToItem(t,e,o=0){(e||0===e)&&(this.activeItem=e);const i=t.getBoundingClientRect(),n=this.trackElement.getBoundingClientRect();let s=i.left-n.left-this.getFirstItemOffset();const r=this.calculateGradient(t,s);this.setDotIndex(s,r);const a=Math.max(0,s-Math.max(0,o));this.isLastViewport(s)?this.moveToLastScreen():this.dragOffset=-a}disconnectedCallback(){this.stopNudgeSchedule(),this.stopNudgeGradientLoop(),window.removeEventListener("resize",this.handleResize),this.clearManagedSlideFocusableElements();const t=this.container?.querySelector("slot");t&&t.removeEventListener("slotchange",this.handleSlotChangeListener),this.slotObserver&&(this.slotObserver.disconnect(),this.slotObserver=null),document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp),document.removeEventListener("pointercancel",this.onPointerUp)}render(){const t=this.getFullyVisibleItemCount(),e=this._showButtons(t),n=this._showDots(t),a=e||n;let l=`transform ${this.transitionDuration}ms ${this.transitionTiming}`;return this.isDragging&&(l="mouse"===this.dragPointerType?`transform ${r.MOUSE_DRAG_SMOOTHING_MS}ms linear`:"none"),o(i,{key:"c00151ad646479209955e83631a0775c30980f55"},o("div",{key:"f7b6aeb2c358551709b4f0f4c0db8c79cc3b21c9",class:{"tet-carousel":!0,[`${this.theme}`]:!0,"tet-carousel--unified-buttons":this.unifiedButtons},ref:t=>this.container=t,part:"carousel"},o("div",{key:"80364e4e2248506d51a0e30f0fdc9a78218c792a",class:"tet-carousel__container"},o("div",{key:"6ff9e3d86953b92fbbdcb3877aa1e970e8d28f32",class:"tet-carousel__gradient-left",ref:t=>{this.leftGradientRef=t}}),o("div",{key:"ab770b3d0093488227de23b5d2455d84450f694a",class:"tet-carousel__gradient-right",ref:t=>{this.rightGradientRef=t}}),o("div",{key:"9cfe43e672167e9afa671931ff2754e2464e8a3e",class:"tet-carousel__track "+(a?"":"tet-carousel__track--center"),ref:t=>this.trackElement=t,style:{transform:`translate3d(${this.dragOffset}px, 0, 0)`,transition:l,willChange:"transform"},onPointerDown:this.onPointerDown,onPointerUp:this.onPointerUp},o("div",{key:"39ac47f9a3815ab8056f346a2aea0c026ac8229f",class:{"tet-carousel__track-content":!0,"tet-carousel__track-content--nudge":this.isNudgeAnimating},ref:t=>this.trackContentElement=t,style:{"--tet-carousel-nudge-distance":`${r.NUDGE_DISTANCE_PX}px`},onAnimationEnd:this.onNudgeAnimationEnd},o("slot",{key:"48ce41090fb1ad3673f13913dc73be36060924c1"})))),!!this.label&&o("div",{key:"f27fdba5eb711a6833821277226848f91cca7e5a",class:"tet-carousel__label"},this.label),a&&o("div",{key:"3edfa76406c3471d09cafd992ddda8fd6c6c3d8d",class:"tet-carousel__controls"},e&&o("div",{key:"498780b6324c6dbb2b2e73d7ea8a7688211adda2",class:"tet-carousel__buttons tet-carousel__buttons--mobile",ref:t=>this.mobileBackButtonWrapper=t},o("tet-button",{key:"6093bd37958602ac5ab591ef0ec7c2d4f2d7d98d",theme:this.theme,type:"secondary",size:"medium","icon-name":this.buttonIconLeft,"icon-mode":!0,onPointerDown:t=>t.stopPropagation(),onClick:()=>this.handlePrev(),accessibilityLabel:s("components-carousel-previous"),disabled:this.isLeftNavigationDisabled()})),n&&o("div",{key:"017b042cd6af5daa30cbfdc2fa3fae9571a5a140",class:"tet-carousel__dots"},Array.from({length:this.dotCount}).map(((t,e)=>o("button",{type:"button",tabIndex:e===this.activeDotIndex?0:-1,class:"tet-carousel__dot"+(e===this.activeDotIndex?" active":""),key:e,"aria-label":`${s(e===this.activeDotIndex?"components-carousel-indicator-button-active":"components-carousel-indicator-button")} ${e+1}/${this.dotCount}`,"aria-current":e===this.activeDotIndex?"true":void 0,onPointerDown:t=>t.stopPropagation(),onKeyDown:t=>this.handleDotKeyDown(t,e),onClick:()=>this.handleDotClick(e)})))),e&&o("div",{key:"5a590ec78c919cc08314f6ee2bdf1d3f9ae27033",class:"tet-carousel__buttons"},o("tet-button",{key:"c738b0f1c435f69b0b80773b0003dde962394fbc",class:"tet-carousel__buttons--desktop",theme:this.theme,type:"secondary",size:"medium","icon-name":this.buttonIconLeft,"icon-mode":!0,onPointerDown:t=>t.stopPropagation(),onClick:()=>this.handlePrev(),accessibilityLabel:s("components-carousel-previous"),disabled:this.isLeftNavigationDisabled()}),o("tet-button",{key:"5186fa23c40080f4b11652dfe2f57841852ab998",theme:this.theme,type:"secondary",size:"medium","icon-name":this.buttonIconRight,"icon-mode":!0,onPointerDown:t=>t.stopPropagation(),onClick:()=>this.handleNext(),accessibilityLabel:s("components-carousel-next"),disabled:this.isRightNavigationDisabled()})))))}static get watchers(){return{language:[{onLanguageChange:0}],activeItem:[{onActiveItemChange:0}],showGradient:[{checkGradient:0}],dragOffset:[{checkGradient:0}],nudgeAnimationInterval:[{onNudgeAnimIntervalChange:0}],isNudgeAnimating:[{onNudgeAnimationStateChange:0}]}}};r.style=':host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{--carousel-background:transparent;--carousel-dot-size:1rem;--carousel-buttons-bottom:-1rem;--carousel-dot-background:transparent;--carousel-dot-border:0.0625rem solid var(--tc-grey-70);--carousel-dot-margin:0;--carousel-dot-margin-mobile:1rem;--carousel-label-color:var(--tc-text-secondary);--carousel-dot-active-background:var(--tc-layer-inverse-primary);--carousel-dot-hover-background:var(--tc-button-secondary-outline-background-hover);--carousel-dot-active-hover-background:var(--tc-grey-80);--carousel-dots-gap:0.5rem;--carousel-buttons-gap:1rem;--carousel-track-gap:0;--carousel-track-height:100%;--carousel-item-width:100%;--carousel-item-height:100%;--carousel-buttons-right:2rem;--carousel-dots-bottom:-1rem;--carousel-nudge-animation-duration:1.5s;--carousel-gradient:var(--tc-background-primary);--carousel-button-icon-mode-padding:0.5rem;--carousel-button-icon-size:1.25rem;-webkit-tap-highlight-color:transparent;display:inline-block;width:100%}.tet-carousel{position:relative;width:100%;background:var(--carousel-background)}.tet-carousel.dark{--carousel-dot-active-background:var(--tc-layer-inverse-primary-dark);--carousel-dot-border:0.0625rem solid var(--tc-grey-70-dark);--carousel-dot-border:0.0625rem solid var(--tc-grey-70-dark);--carousel-dot-hover-background:var(--tc-button-secondary-outline-background-hover-dark);--carousel-dot-active-hover-background:var(--tc-grey-80-dark);--carousel-label-color:var(--tc-text-secondary-dark);--carousel-gradient:var(--tc-background-primary-dark)}.tet-carousel__container{width:var(--carousel-item-width);max-width:var(--carousel-item-width);height:var(--carousel-track-height);position:relative;margin-bottom:var(--carousel-dot-margin-mobile);contain:layout}.tet-carousel__controls{position:relative;display:flex;align-items:center;justify-content:center;height:fit-content;margin-bottom:var(--carousel-dot-margin-mobile);min-height:2.75rem;touch-action:manipulation}.tet-carousel__label{color:var(--carousel-label-color);margin-left:auto;margin-right:auto;margin-bottom:1rem;text-align:center;font-family:var(--font-family-content);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem;letter-spacing:-0.003125rem}.tet-carousel__track{touch-action:pan-y;display:flex;height:var(--carousel-track-height);will-change:transform}.tet-carousel__track--center{justify-content:center}.tet-carousel__track-content{display:flex;gap:var(--carousel-track-gap);will-change:transform}.tet-carousel__track-content--nudge{animation:tet-carousel-nudge var(--carousel-nudge-animation-duration) ease-in-out}@media (hover: hover) and (pointer: fine){.tet-carousel:hover .tet-carousel__track-content--nudge{animation-play-state:paused}}.tet-carousel__track-content>*{flex-shrink:0;display:flex;align-items:center;justify-content:center}.tet-carousel__buttons{position:absolute;right:0;bottom:50%;display:flex;transform:translateY(50%);gap:var(--carousel-buttons-gap);z-index:2}.tet-carousel__buttons tet-button{--button-icon-mode-padding:var(--carousel-button-icon-mode-padding);--button-icon-size:var(--carousel-button-icon-size)}.tet-carousel__buttons--mobile{display:flex;left:0}.tet-carousel__buttons--desktop{display:none !important}.tet-carousel__dots{display:flex;width:100%;gap:var(--carousel-dots-gap);justify-content:center;align-items:center}.tet-carousel__dot{width:var(--carousel-dot-size);height:var(--carousel-dot-size);border-radius:50%;background:var(--carousel-dot-background);cursor:pointer;transition:background 0.2s;border:var(--carousel-dot-border);z-index:2;touch-action:manipulation}.tet-carousel__dot:hover{background:var(--carousel-dot-hover-background)}.tet-carousel__dot.active{background:var(--carousel-dot-active-background);border:none}.tet-carousel__dot.active:hover{background:var(--carousel-dot-active-hover-background)}.tet-carousel__dot:focus-visible{outline:0.125rem solid var(--tc-blue-40-dark);outline-offset:0.125rem}.tet-carousel--unified-buttons .tet-carousel__buttons--mobile{display:none}.tet-carousel--unified-buttons .tet-carousel__buttons--desktop{display:flex !important}.tet-carousel--unified-buttons .tet-carousel__buttons{right:0.25rem}.tet-carousel__gradient-left,.tet-carousel__gradient-right{position:absolute;top:0;display:block;width:13.75rem;height:100%;transition:opacity 0.4s ease-out;pointer-events:none;z-index:20;opacity:0}.tet-carousel__gradient-left{background:linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, var(--carousel-gradient) 100%);left:0}.tet-carousel__gradient-right{background:linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--carousel-gradient) 100%);right:0}@keyframes tet-carousel-nudge{0%{transform:translateX(0)}50%{transform:translateX(calc(var(--tet-carousel-nudge-distance) * -1))}70%{transform:translateX(calc(var(--tet-carousel-nudge-distance) * -1))}100%{transform:translateX(0)}}@media all and (min-width: 46.25rem){.tet-carousel__controls{margin-bottom:var(--carousel-dot-margin)}.tet-carousel__label{font-size:1rem;line-height:1.5rem;letter-spacing:-0.00625rem}.tet-carousel__buttons{right:0.25rem}.tet-carousel__buttons--mobile{display:none}.tet-carousel__buttons--desktop{display:flex !important}}@media all and (min-width: 90rem){.tet-carousel__label{font-size:1.125rem;line-height:1.75rem}}';export{r as tet_carousel}
1
+ import{r as t,f as e,h as o,H as i}from"./p-BGB6gNkz.js";import{p as n,t as s}from"./p-BzLFf73g.js";import"./p-DbJll7nz.js";import"./p-Bvqcvhjw.js";const r=class{constructor(e){t(this,e)}static NUDGE_DISTANCE_PX=16;static NUDGE_IDLE_THRESHOLD_MS=1500;static GRADIENT_VISIBILITY_THRESHOLD_PX=1;static GRADIENT_WIDTH_FALLBACK_PX=100;static EDGE_DRAG_MAX_PX=32;static EDGE_DRAG_RESISTANCE=.95;static MOUSE_DRAG_SMOOTHING_MS=60;static MOBILE_BREAKPOINT_PX=450;static UNIFIED_BUTTONS_MOBILE_MAX_DOTS=4;focusableSelector='a[href], [tabindex]:not([tabindex="-1"])';handleResize=()=>{this.getDotCount();const t=this.getSlotElements();if(!t?.length)return;const e=Math.max(0,Math.min(this.activeItem,t.length-1));this.moveToItem(t[e],e),this.checkGradient()};handleSlotChangeListener=()=>this.handleSlotChange();managedFocusableElements=[];managedSlideFocusWithinListeners=[];draggedAnchor=null;dragMoved=!1;dragPointerStartX=0;dragStartX=0;dragStartActiveItem=0;dragPointerType="";nudgeTimeoutId;nudgeGradientRafId;lastInteractionAt=0;trackElement=null;trackContentElement=null;mobileBackButtonWrapper=null;container;leftGradientRef;rightGradientRef;slotObserver;activeDotIndex=0;dotCount=1;totalItems=0;activeItem=0;isDragging=!1;dragOffset=0;isNudgeAnimating=!1;theme="light";showDots=!0;showGradient=!1;showButtons=!0;transitionDuration=500;swipeThreshold=32;transitionTiming="ease-out";buttonIconLeft="arrow-left";buttonIconRight="arrow-right";maxDots=8;label;nudgeAnimationInterval=0;unifiedButtons=!1;language="lv";safeForceUpdate(){try{e(this)}catch{}}async onLanguageChange(t){await n("tet-components",t),this.safeForceUpdate()}onActiveItemChange(){this.updateSlideFocusableTabIndexes()}checkGradient(){const t=this.leftGradientRef,e=this.rightGradientRef;if(!t||!e)return;if(!this.showGradient)return t.style.opacity="0",void(e.style.opacity="0");const o=this.getViewportWidth(),i=this.getSlotClientWidth(),n=Math.max(0,i-o),s=-this.getRealDragOffset(),a=Math.max(0,Math.min(n,s)),l=n-a<r.GRADIENT_VISIBILITY_THRESHOLD_PX;a<r.GRADIENT_VISIBILITY_THRESHOLD_PX?(t.style.opacity="0",e.style.opacity="1"):l?(t.style.opacity="1",e.style.opacity="0"):(t.style.opacity="1",e.style.opacity="1")}onNudgeAnimIntervalChange(){this.syncNudgeSchedule()}onNudgeAnimationStateChange(){this.syncNudgeGradientLoop(),this.checkGradient()}async componentWillLoad(){await n("tet-components",this.language)}getSlotElements(){const t=this.container?.querySelector("slot");if(!t)return;let e=t.assignedElements?t.assignedElements():[];return 0!==e.length?(e[0].className.includes("carousel-wrapper")&&(e=Array.from(e[0].children)),e):void 0}getViewportWidth(){return this.container?.offsetWidth||window.innerWidth}getSlotClientWidth(){return this.trackElement?.querySelector("slot")?.offsetWidth||window.innerWidth}getMaxScrollableOffset(){return Math.max(0,this.getSlotClientWidth()-this.getViewportWidth())}afterLayout(t){requestAnimationFrame((()=>requestAnimationFrame(t)))}getDotScreenLength(){return this.getSlotClientWidth()/this.dotCount}isLast(t,e){return this.getSlotClientWidth()-e<=t}isLastViewport(t){const e=this.getViewportWidth();return this.isLast(e,t)}isLastDotScreen(t,e){const o=this.getViewportWidth(),i=Math.max(e,o);return this.isLast(i,t)}getItemLayoutMetrics(){const t=this.getSlotElements();return t&&0!==t.length?t.map(((t,e)=>{const o=t.offsetLeft;return{item:t,index:e,left:o,right:o+t.offsetWidth}})):[]}getFullyVisibleItemCount(){const t=this.getItemLayoutMetrics();if(!t.length)return 0;const e=this.getViewportWidth(),o=this.getClampedViewportLeft(),i=o+e;let n=0;for(const{left:e,right:s}of t)e>=o&&s<=i&&n++;return n}getClampedViewportLeft(){const t=Math.abs(this.dragOffset),e=this.getMaxScrollableOffset();return Math.max(0,Math.min(e,t))}getVisibleItemCountFromIndex(t){const e=this.getItemLayoutMetrics();if(!e.length)return 1;const o=Math.max(0,Math.min(t,e.length-1)),i=this.getViewportWidth(),n=e[o].left+i+.5;let s=0;for(let t=o;t<e.length&&e[t].right<=n;t++)s++;return Math.max(1,s)}getFirstVisibleItemInViewport(){const t=this.getItemLayoutMetrics();if(!t.length)return null;const e=this.getClampedViewportLeft(),o=.5,i=t.find((t=>t.left<=e+o&&t.right>e+o));if(i){if(i.right-e>=(i.right-i.left)/2||i.index===t.length-1)return{item:i.item,index:i.index};const o=t[i.index+1];if(o)return{item:o.item,index:o.index}}if(e<=t[0].left+o)return{item:t[0].item,index:t[0].index};const n=t.find((t=>t.left>e+o));if(n)return{item:n.item,index:n.index};const s=t.at(-1);return{item:s.item,index:s.index}}getEdgeSnapTarget(t){const e=this.getItemLayoutMetrics();if(!e.length)return null;const o=this.getClampedViewportLeft(),i=o+this.getViewportWidth(),n=e[0],s=e.at(-1);if(t<0){const t=Math.min(n.right,i)-Math.max(n.left,o);if(t>0&&t>=(n.right-n.left)/2)return{item:n.item,index:n.index}}if(t>0){const t=Math.min(s.right,i)-Math.max(s.left,o);if(t>0&&t>=(s.right-s.left)/2)return{item:s.item,index:s.index}}return null}getSwipeTarget(t){const e=this.getSlotElements();if(!e||0===e.length)return null;const o=this.getEdgeSnapTarget(t);if(o)return o;const i=this.getFirstVisibleItemInViewport();let n=i?.index??this.dragStartActiveItem;t>0&&n<=this.dragStartActiveItem&&(n=this.dragStartActiveItem+1),t<0&&n>=this.dragStartActiveItem&&(n=this.dragStartActiveItem-1),n=Math.max(0,Math.min(e.length-1,n));const s=e[n];return s?{item:s,index:n}:null}getRealDragOffset(){return this.dragOffset+this.getCurrentNudgeTranslateX()}applyEdgeDragResistance(t,e){return t>0?Math.min(r.EDGE_DRAG_MAX_PX,t*r.EDGE_DRAG_RESISTANCE):t<e?e+Math.max(-r.EDGE_DRAG_MAX_PX,(t-e)*r.EDGE_DRAG_RESISTANCE):t}getCurrentNudgeTranslateX(){if(!this.isNudgeAnimating||!this.trackContentElement)return 0;const t=getComputedStyle(this.trackContentElement).transform;if(!t||"none"===t)return 0;try{return new DOMMatrixReadOnly(t).m41||0}catch{return 0}}getDotCount(){const t=this.getSlotElements();if(!t)return this.dotCount=1,this.totalItems=0,void(this.activeDotIndex=0);this.totalItems=t.length;const e=this.getViewportWidth(),o=this.getSlotClientWidth(),i=Math.ceil(o/Math.max(1,e)),n=Number.isFinite(this.maxDots)?this.maxDots:i;let s=n;this.unifiedButtons&&e<r.MOBILE_BREAKPOINT_PX&&(s=Math.min(n,r.UNIFIED_BUTTONS_MOBILE_MAX_DOTS)),this.dotCount=Math.max(1,Math.min(s,i)),this.activeDotIndex=this.clampDotIndex(this.activeDotIndex)}handleMove=()=>{const t=this.getSlotElements();if(!t)return;const e=t[this.activeItem];e&&this.moveToItem(e)};navigateByStep(t){this.registerUserInteraction();const e=this.getSlotElements();if(!e||0===e.length)return;const o=this.activeDotIndex,i=this.getFirstVisibleItemInViewport(),n=i?.index??this.activeItem,s=this.getClampedViewportLeft()>0;if(t<0&&0===n&&s){const t=e[0];return void(t&&this.moveToItem(t,0))}const r=this.getVisibleItemCountFromIndex(n),a=Math.max(0,Math.min(e.length-1,n+t*r));if(a===n)return;const l=e[a];l&&(this.moveToItem(l,a),Math.abs(this.activeDotIndex-o)>1&&this.moveToDotIndex(o+t))}handlePrev=()=>{this.navigateByStep(-1)};handleNext=()=>{this.navigateByStep(1)};moveToLastScreen=()=>{this.dragOffset=-this.getMaxScrollableOffset()};getGradientWidth(){if(!this.showGradient)return 0;const t=this.leftGradientRef?.offsetWidth;return t&&t>0?t:r.GRADIENT_WIDTH_FALLBACK_PX}calculateGradient(t,e){const o=this.getSlotClientWidth();let i=this.showGradient?160:0;return i=e<160?e:i,i=o-e-t.offsetWidth<160?0:i,i}calcLastScreenElement=t=>{const e=this.getSlotElements();if(!e)return null;const o=this.trackElement.getBoundingClientRect(),i=this.getFirstItemOffset();for(const[n,s]of e.entries()){let e=s.getBoundingClientRect().left-o.left-i;const r=this.calculateGradient(s,e);if(e>=t-this.swipeThreshold+r)return{item:s,index:n}}return{item:e[0],index:0}};moveToDotIndex(t){this.activeDotIndex=this.clampDotIndex(t);const e=this.getMaxScrollableOffset(),o=this.dotCount-1!==this.activeDotIndex||this.isDragging?this.activeDotIndex*this.getDotScreenLength():e,i=Math.max(0,Math.min(o,e)),n=this.calcLastScreenElement(i);if(!n)return this.activeItem=0,void(this.dragOffset=0);const{index:s}=n;this.activeItem=s,this.dragOffset=-i}handleDotClick=t=>{this.registerUserInteraction(),this.moveToDotIndex(t)};focusDot=t=>{if(!this.container)return;const e=Array.from(this.container.querySelectorAll(".tet-carousel__dot"));e[t]?.focus()};getKeyboardTargetIndex(t,e,o){if(o<1)return null;switch(t){case"ArrowRight":case"ArrowDown":return Math.min(o,e+1);case"ArrowLeft":case"ArrowUp":return Math.max(0,e-1);case"Home":return 0;case"End":return o;default:return null}}handleNavigationKeyDown(t,e,o,i,n){const s=this.getKeyboardTargetIndex(t.key,e,o);null!==s&&(t.preventDefault(),t.stopPropagation(),i(s)&&this.afterLayout((()=>n(s))))}handleDotKeyDown=(t,e)=>{if("Tab"===t.key&&t.shiftKey){if(this.hasVisibleMobileBackButtonTarget())return;if(!this.hasFocusableTargetInSlide(this.activeItem))return;return this.registerUserInteraction(),t.preventDefault(),t.stopPropagation(),void this.afterLayout((()=>this.focusSlideByIndex(this.activeItem)))}this.handleNavigationKeyDown(t,e,this.dotCount-1,(t=>(this.handleDotClick(t),!0)),(t=>this.focusDot(t)))};isElementVisible(t){if(!t.isConnected)return!1;if(t.hidden||t.hasAttribute("hidden"))return!1;if(0===t.getClientRects().length)return!1;const e=getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility}hasVisibleMobileBackButtonTarget(){if(this.isLeftNavigationDisabled())return!1;const t=this.mobileBackButtonWrapper;return!!t&&this.isElementVisible(t)}hasFocusableTargetInSlide(t){return this.managedFocusableElements.some((({slideIndex:e,element:o})=>e===t&&this.isElementVisible(o)))}onPointerDown=t=>{this.registerUserInteraction(),this.dragPointerType=t.pointerType||"mouse",t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.isDragging=!0,this.dragStartX=t.screenX,this.dragMoved=!1,this.dragPointerStartX=t.screenX,this.dragStartActiveItem=this.activeItem,document.body.style.userSelect="none",document.addEventListener("pointermove",this.onPointerMove),document.addEventListener("pointerup",this.onPointerUp),document.addEventListener("pointercancel",this.onPointerUp);let e=t.target;for(this.draggedAnchor=null;e;){if("A"===e.tagName||e.getAttribute("tabindex")){this.draggedAnchor=e;break}e=e.parentElement}};onPointerMove=t=>{if(!this.isDragging)return;const e=Math.abs(t.screenX-this.dragPointerStartX);if(!this.dragMoved&&e>5&&(this.dragMoved=!0,this.trackElement))try{this.trackElement.setPointerCapture?.(t.pointerId)}catch{}let o=this.dragOffset;o+=t.screenX-this.dragStartX,this.dragStartX=t.screenX;const i=this.getMinDragOffset();this.dragOffset=this.applyEdgeDragResistance(o,i);const n=this.getFirstVisibleItemInViewport();n&&this.activeItem!==n.index&&(this.activeItem=n.index)};releaseTrackPointerCapture(t){try{this.trackElement?.releasePointerCapture?.(t)}catch{}}getMinDragOffset(){return-this.getMaxScrollableOffset()}snapToEdge(t){if(0===t)return void(this.dragOffset=0);const e=this.dragOffset>0;this.activeItem=e?0:Math.max(0,this.totalItems-1),this.activeDotIndex=e?0:Math.max(0,this.dotCount-1),this.dragOffset=e?0:t}moveBySwipeDelta(t){if(Math.abs(t)<=this.swipeThreshold)return this.activeItem=this.dragStartActiveItem,void this.afterLayout((()=>this.handleMove()));const e=this.getSwipeTarget(t<0?1:-1);e&&this.moveToItem(e.item,e.index)}finalizePointerDrag(){document.body.style.userSelect="",document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp),document.removeEventListener("pointercancel",this.onPointerUp),this.dragPointerType=""}preventClickAfterDrag(){if(!this.draggedAnchor||!this.dragMoved)return;const t=e=>{e.preventDefault(),e.stopPropagation(),this.draggedAnchor?.removeEventListener("click",t,!0)};this.draggedAnchor.addEventListener("click",t,!0)}onPointerUp=t=>{if(!this.isDragging)return;this.registerUserInteraction(),this.releaseTrackPointerCapture(t.pointerId),this.isDragging=!1;const e=this.getMinDragOffset(),o=t.screenX-this.dragPointerStartX;this.dragOffset>0||this.dragOffset<e?this.snapToEdge(e):this.moveBySwipeDelta(o),this.finalizePointerDrag(),this.preventClickAfterDrag()};_showButtons(t=this.getFullyVisibleItemCount()){return!(!this.showButtons||t>=this.totalItems)}_showDots(t=this.getFullyVisibleItemCount()){return!!this.showDots&&!(this.totalItems<=0||t>=this.totalItems)}componentDidLoad(){this.getDotCount(),window.addEventListener("resize",this.handleResize),this.checkGradient(),this.initSlotListeners(),this.syncNudgeSchedule(),this.refreshSlideFocusableElements()}handleSlotChange(){this.getDotCount();const t=Math.max(0,this.totalItems-1);this.activeItem=Math.max(0,Math.min(this.activeItem,t)),this.refreshSlideFocusableElements(),this.checkGradient(),this.safeForceUpdate()}initSlotListeners(){const t=this.container?.querySelector("slot");if(!t)return;if(t.addEventListener("slotchange",this.handleSlotChangeListener),"function"!=typeof t.assignedElements)return;const e=t.assignedElements();if(1!==e.length)return;const o=e[0];this.slotObserver=new MutationObserver((()=>this.handleSlotChange())),this.slotObserver.observe(o,{childList:!0,subtree:!1})}isTabbableElement(t){if("A"===t.tagName)return t.hasAttribute("href");const e=t.getAttribute("tabindex");return null!==e&&"-1"!==e.trim()}getSlideFocusableElements(t){const e=new Set;return this.isTabbableElement(t)&&e.add(t),Array.from(t.querySelectorAll(this.focusableSelector)).forEach((t=>{this.isTabbableElement(t)&&e.add(t)})),t.shadowRoot&&Array.from(t.shadowRoot.querySelectorAll(this.focusableSelector)).forEach((t=>{this.isTabbableElement(t)&&e.add(t)})),Array.from(e)}clearManagedSlideFocusableElements(){this.managedSlideFocusWithinListeners.forEach((({slide:t,onFocusWithin:e})=>{t.removeEventListener("focusin",e)})),this.managedSlideFocusWithinListeners=[],this.managedFocusableElements.forEach((({element:t,originalTabIndex:e,onKeyDown:o})=>{t.removeEventListener("keydown",o),null===e?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e)})),this.managedFocusableElements=[]}updateSlideFocusableTabIndexes(){this.managedFocusableElements.length&&this.managedFocusableElements.forEach((({element:t,slideIndex:e})=>{t.setAttribute("tabindex",e===this.activeItem?"0":"-1")}))}focusSlideByIndex(t){const e=this.managedFocusableElements.find((e=>e.slideIndex===t)),o=e?.element;if(o)try{o.focus({preventScroll:!0})}catch{}}handleSlideKeyDown(t,e){this.handleNavigationKeyDown(t,e,this.totalItems-1,(t=>{const e=this.getSlotElements();return!!e?.[t]&&(this.registerUserInteraction(),this.moveToItem(e[t],t,0),!0)}),(t=>this.focusSlideByIndex(t)))}refreshSlideFocusableElements(){this.clearManagedSlideFocusableElements();const t=this.getSlotElements();t?.length&&(t.forEach(((e,o)=>{const i=()=>{this.registerUserInteraction();const i=o===t.length-1?0:this.getGradientWidth();this.moveToItem(e,o,i)};this.managedSlideFocusWithinListeners.push({slide:e,onFocusWithin:i}),e.addEventListener("focusin",i),this.getSlideFocusableElements(e).forEach((t=>{const e=t=>this.handleSlideKeyDown(t,o);this.managedFocusableElements.push({element:t,slideIndex:o,originalTabIndex:t.getAttribute("tabindex"),onKeyDown:e}),t.addEventListener("keydown",e)}))})),this.updateSlideFocusableTabIndexes())}startNudgeGradientLoop(){if(this.nudgeGradientRafId)return;const t=()=>{this.checkGradient(),this.nudgeGradientRafId=this.isNudgeAnimating?requestAnimationFrame(t):void 0};this.nudgeGradientRafId=requestAnimationFrame(t)}stopNudgeGradientLoop(){this.nudgeGradientRafId&&(cancelAnimationFrame(this.nudgeGradientRafId),this.nudgeGradientRafId=void 0)}syncNudgeGradientLoop(){this.isNudgeAnimating?this.startNudgeGradientLoop():this.stopNudgeGradientLoop()}registerUserInteraction(){this.lastInteractionAt=Date.now(),this.stopNudgeAnimation()&&this.scheduleNextNudge()}hasRecentInteraction(){return!!this.lastInteractionAt&&Date.now()-this.lastInteractionAt<r.NUDGE_IDLE_THRESHOLD_MS}isRightNavigationDisabled(){return this.dotCount<=1||this.activeItem===this.totalItems-1||this.isLastViewport(-this.dragOffset)}isLeftNavigationDisabled(){return this.dotCount<=1||0===this.activeItem}isNudgeEligible(){return!(!this.trackElement||this.isDragging||this.isNudgeAnimating||this.hasRecentInteraction()||this.isRightNavigationDisabled()||0!==this.dragOffset)}scheduleNextNudge(){this.nudgeAnimationInterval<=0||(this.clearNudgeTimeout(),this.nudgeTimeoutId=setTimeout((()=>{this.nudgeTimeoutId=void 0,this.isNudgeEligible()?this.isNudgeAnimating=!0:this.scheduleNextNudge()}),this.nudgeAnimationInterval))}onNudgeAnimationEnd=t=>{"tet-carousel-nudge"===t.animationName&&(this.stopNudgeAnimation(),this.scheduleNextNudge())};stopNudgeAnimation(){const t=this.isNudgeAnimating;return t&&(this.isNudgeAnimating=!1),t}clearNudgeTimeout(){this.nudgeTimeoutId&&(clearTimeout(this.nudgeTimeoutId),this.nudgeTimeoutId=void 0)}stopNudgeSchedule(){this.clearNudgeTimeout(),this.stopNudgeAnimation()}syncNudgeSchedule(){this.stopNudgeSchedule(),this.scheduleNextNudge()}clampDotIndex(t){return Math.max(0,Math.min(t,this.dotCount-1))}setDotIndex(t,e){let o=0;const i=this.getDotScreenLength();o=this.isLastDotScreen(t,i)?this.dotCount-1:Math.round((t+e)/i),this.activeDotIndex=this.clampDotIndex(o)}getFirstItemOffset(){const t=this.getSlotElements();if(!t?.length)return 0;const e=this.trackElement.getBoundingClientRect();return t[0].getBoundingClientRect().left-e.left}moveToItem(t,e,o=0){(e||0===e)&&(this.activeItem=e);const i=t.getBoundingClientRect(),n=this.trackElement.getBoundingClientRect();let s=i.left-n.left-this.getFirstItemOffset();const r=this.calculateGradient(t,s);this.setDotIndex(s,r);const a=Math.max(0,s-Math.max(0,o));this.isLastViewport(s)?this.moveToLastScreen():this.dragOffset=-a}disconnectedCallback(){this.stopNudgeSchedule(),this.stopNudgeGradientLoop(),window.removeEventListener("resize",this.handleResize),this.clearManagedSlideFocusableElements();const t=this.container?.querySelector("slot");t&&t.removeEventListener("slotchange",this.handleSlotChangeListener),this.slotObserver&&(this.slotObserver.disconnect(),this.slotObserver=null),document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp),document.removeEventListener("pointercancel",this.onPointerUp)}render(){const t=this.getFullyVisibleItemCount(),e=this._showButtons(t),n=this._showDots(t),a=e||n;let l=`transform ${this.transitionDuration}ms ${this.transitionTiming}`;return this.isDragging&&(l="mouse"===this.dragPointerType?`transform ${r.MOUSE_DRAG_SMOOTHING_MS}ms linear`:"none"),o(i,{key:"c00151ad646479209955e83631a0775c30980f55"},o("div",{key:"f7b6aeb2c358551709b4f0f4c0db8c79cc3b21c9",class:{"tet-carousel":!0,[`${this.theme}`]:!0,"tet-carousel--unified-buttons":this.unifiedButtons},ref:t=>this.container=t,part:"carousel"},o("div",{key:"80364e4e2248506d51a0e30f0fdc9a78218c792a",class:"tet-carousel__container"},o("div",{key:"6ff9e3d86953b92fbbdcb3877aa1e970e8d28f32",class:"tet-carousel__gradient-left",ref:t=>{this.leftGradientRef=t}}),o("div",{key:"ab770b3d0093488227de23b5d2455d84450f694a",class:"tet-carousel__gradient-right",ref:t=>{this.rightGradientRef=t}}),o("div",{key:"9cfe43e672167e9afa671931ff2754e2464e8a3e",class:"tet-carousel__track "+(a?"":"tet-carousel__track--center"),ref:t=>this.trackElement=t,style:{transform:`translate3d(${this.dragOffset}px, 0, 0)`,transition:l,willChange:"transform"},onPointerDown:this.onPointerDown,onPointerUp:this.onPointerUp},o("div",{key:"39ac47f9a3815ab8056f346a2aea0c026ac8229f",class:{"tet-carousel__track-content":!0,"tet-carousel__track-content--nudge":this.isNudgeAnimating},ref:t=>this.trackContentElement=t,style:{"--tet-carousel-nudge-distance":`${r.NUDGE_DISTANCE_PX}px`},onAnimationEnd:this.onNudgeAnimationEnd},o("slot",{key:"48ce41090fb1ad3673f13913dc73be36060924c1"})))),!!this.label&&o("div",{key:"f27fdba5eb711a6833821277226848f91cca7e5a",class:"tet-carousel__label"},this.label),a&&o("div",{key:"3edfa76406c3471d09cafd992ddda8fd6c6c3d8d",class:"tet-carousel__controls"},e&&o("div",{key:"498780b6324c6dbb2b2e73d7ea8a7688211adda2",class:"tet-carousel__buttons tet-carousel__buttons--mobile",ref:t=>this.mobileBackButtonWrapper=t},o("tet-button",{key:"6093bd37958602ac5ab591ef0ec7c2d4f2d7d98d",theme:this.theme,type:"secondary",size:"medium","icon-name":this.buttonIconLeft,"icon-mode":!0,onPointerDown:t=>t.stopPropagation(),onClick:()=>this.handlePrev(),accessibilityLabel:s("components-carousel-previous"),disabled:this.isLeftNavigationDisabled()})),n&&o("div",{key:"017b042cd6af5daa30cbfdc2fa3fae9571a5a140",class:"tet-carousel__dots"},Array.from({length:this.dotCount}).map(((t,e)=>o("button",{type:"button",tabIndex:e===this.activeDotIndex?0:-1,class:"tet-carousel__dot"+(e===this.activeDotIndex?" active":""),key:e,"aria-label":`${s(e===this.activeDotIndex?"components-carousel-indicator-button-active":"components-carousel-indicator-button")} ${e+1}/${this.dotCount}`,"aria-current":e===this.activeDotIndex?"true":void 0,onPointerDown:t=>t.stopPropagation(),onKeyDown:t=>this.handleDotKeyDown(t,e),onClick:()=>this.handleDotClick(e)})))),e&&o("div",{key:"5a590ec78c919cc08314f6ee2bdf1d3f9ae27033",class:"tet-carousel__buttons"},o("tet-button",{key:"c738b0f1c435f69b0b80773b0003dde962394fbc",class:"tet-carousel__buttons--desktop",theme:this.theme,type:"secondary",size:"medium","icon-name":this.buttonIconLeft,"icon-mode":!0,onPointerDown:t=>t.stopPropagation(),onClick:()=>this.handlePrev(),accessibilityLabel:s("components-carousel-previous"),disabled:this.isLeftNavigationDisabled()}),o("tet-button",{key:"5186fa23c40080f4b11652dfe2f57841852ab998",theme:this.theme,type:"secondary",size:"medium","icon-name":this.buttonIconRight,"icon-mode":!0,onPointerDown:t=>t.stopPropagation(),onClick:()=>this.handleNext(),accessibilityLabel:s("components-carousel-next"),disabled:this.isRightNavigationDisabled()})))))}static get watchers(){return{language:[{onLanguageChange:0}],activeItem:[{onActiveItemChange:0}],showGradient:[{checkGradient:0}],dragOffset:[{checkGradient:0}],nudgeAnimationInterval:[{onNudgeAnimIntervalChange:0}],isNudgeAnimating:[{onNudgeAnimationStateChange:0}]}}};r.style=':host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{--carousel-background:transparent;--carousel-dot-size:1rem;--carousel-buttons-bottom:-1rem;--carousel-dot-background:transparent;--carousel-dot-border:0.0625rem solid var(--tc-grey-70);--carousel-dot-margin:0;--carousel-dot-margin-mobile:1rem;--carousel-label-color:var(--tc-text-secondary);--carousel-dot-active-background:var(--tc-layer-inverse-primary);--carousel-dot-hover-background:var(--tc-button-secondary-outline-background-hover);--carousel-dot-active-hover-background:var(--tc-grey-80);--carousel-dots-gap:0.5rem;--carousel-buttons-gap:1rem;--carousel-track-gap:0;--carousel-track-height:100%;--carousel-item-width:100%;--carousel-item-height:100%;--carousel-buttons-right:2rem;--carousel-dots-bottom:-1rem;--carousel-nudge-animation-duration:1.5s;--carousel-gradient:var(--tc-background-primary);--carousel-button-icon-mode-padding:0.5rem;--carousel-button-icon-size:1.25rem;-webkit-tap-highlight-color:transparent;display:inline-block;width:100%}.tet-carousel{position:relative;width:100%;background:var(--carousel-background)}.tet-carousel.dark{--carousel-dot-active-background:var(--tc-layer-inverse-primary-dark);--carousel-dot-border:0.0625rem solid var(--tc-grey-70-dark);--carousel-dot-border:0.0625rem solid var(--tc-grey-70-dark);--carousel-dot-hover-background:var(--tc-button-secondary-outline-background-hover-dark);--carousel-dot-active-hover-background:var(--tc-grey-80-dark);--carousel-label-color:var(--tc-text-secondary-dark);--carousel-gradient:var(--tc-background-primary-dark)}.tet-carousel__container{width:var(--carousel-item-width);max-width:var(--carousel-item-width);height:var(--carousel-track-height);position:relative;margin-bottom:var(--carousel-dot-margin-mobile);contain:layout}.tet-carousel__controls{position:relative;display:flex;align-items:center;justify-content:center;height:fit-content;margin-bottom:var(--carousel-dot-margin-mobile);min-height:2.75rem;touch-action:manipulation}.tet-carousel__label{color:var(--carousel-label-color);margin-left:auto;margin-right:auto;margin-bottom:1rem;text-align:center;font-family:var(--font-family-content);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem;letter-spacing:-0.003125rem}.tet-carousel__track{touch-action:pan-y;display:flex;height:var(--carousel-track-height);will-change:transform}.tet-carousel__track--center{justify-content:center}.tet-carousel__track-content{display:flex;gap:var(--carousel-track-gap);will-change:transform}.tet-carousel__track-content--nudge{animation:tet-carousel-nudge var(--carousel-nudge-animation-duration) ease-in-out}@media (hover: hover) and (pointer: fine){.tet-carousel:hover .tet-carousel__track-content--nudge{animation-play-state:paused}}.tet-carousel__track-content>*{flex-shrink:0;display:flex;align-items:center;justify-content:center}.tet-carousel__buttons{position:absolute;right:0;bottom:50%;display:flex;transform:translateY(50%);gap:var(--carousel-buttons-gap);z-index:2}.tet-carousel__buttons tet-button{--button-icon-mode-padding:var(--carousel-button-icon-mode-padding);--button-icon-size:var(--carousel-button-icon-size)}.tet-carousel__buttons--mobile{display:flex;left:0}.tet-carousel__buttons--desktop{display:none !important}.tet-carousel__dots{display:flex;width:100%;gap:var(--carousel-dots-gap);justify-content:center;align-items:center}.tet-carousel__dot{width:var(--carousel-dot-size);height:var(--carousel-dot-size);border-radius:50%;background:var(--carousel-dot-background);cursor:pointer;transition:background 0.2s;border:var(--carousel-dot-border);z-index:2;touch-action:manipulation}.tet-carousel__dot:hover{background:var(--carousel-dot-hover-background)}.tet-carousel__dot.active{background:var(--carousel-dot-active-background);border:none}.tet-carousel__dot.active:hover{background:var(--carousel-dot-active-hover-background)}.tet-carousel__dot:focus-visible{outline:0.125rem solid var(--tc-blue-40-dark);outline-offset:0.125rem}.tet-carousel--unified-buttons .tet-carousel__buttons--mobile{display:none}.tet-carousel--unified-buttons .tet-carousel__buttons--desktop{display:flex !important}.tet-carousel--unified-buttons .tet-carousel__buttons{right:0.25rem}.tet-carousel__gradient-left,.tet-carousel__gradient-right{position:absolute;top:0;display:block;width:13.75rem;height:100%;transition:opacity 0.4s ease-out;pointer-events:none;z-index:20;opacity:0}.tet-carousel__gradient-left{background:linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, var(--carousel-gradient) 100%);left:0}.tet-carousel__gradient-right{background:linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--carousel-gradient) 100%);right:0}@keyframes tet-carousel-nudge{0%{transform:translateX(0)}50%{transform:translateX(calc(var(--tet-carousel-nudge-distance) * -1))}70%{transform:translateX(calc(var(--tet-carousel-nudge-distance) * -1))}100%{transform:translateX(0)}}@media all and (min-width: 46.25rem){.tet-carousel__controls{margin-bottom:var(--carousel-dot-margin)}.tet-carousel__label{font-size:1rem;line-height:1.5rem;letter-spacing:-0.00625rem}.tet-carousel__buttons{right:0.25rem}.tet-carousel__buttons--mobile{display:none}.tet-carousel__buttons--desktop{display:flex !important}}@media all and (min-width: 90rem){.tet-carousel__label{font-size:1.125rem;line-height:1.75rem}}';export{r as tet_carousel}