doclific 0.2.1 → 0.2.3

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 (584) hide show
  1. package/LICENSE +17 -0
  2. package/dist/bin/doclific.js +36 -8
  3. package/dist/public/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  4. package/dist/public/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  5. package/dist/public/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  6. package/dist/public/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  7. package/dist/public/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  8. package/dist/public/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  9. package/dist/public/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  10. package/dist/public/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  11. package/dist/public/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  12. package/dist/public/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  13. package/dist/public/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  14. package/dist/public/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  15. package/dist/public/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  16. package/dist/public/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  17. package/dist/public/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  18. package/dist/public/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  19. package/dist/public/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  20. package/dist/public/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  21. package/dist/public/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  22. package/dist/public/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  23. package/dist/public/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  24. package/dist/public/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  25. package/dist/public/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  26. package/dist/public/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  27. package/dist/public/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  28. package/dist/public/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  29. package/dist/public/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  30. package/dist/public/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  31. package/dist/public/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  32. package/dist/public/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  33. package/dist/public/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  34. package/dist/public/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  35. package/dist/public/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  36. package/dist/public/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  37. package/dist/public/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  38. package/dist/public/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  39. package/dist/public/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  40. package/dist/public/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  41. package/dist/public/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  42. package/dist/public/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  43. package/dist/public/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  44. package/dist/public/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  45. package/dist/public/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  46. package/dist/public/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  47. package/dist/public/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  48. package/dist/public/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  49. package/dist/public/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  50. package/dist/public/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  51. package/dist/public/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  52. package/dist/public/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  53. package/dist/public/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  54. package/dist/public/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  55. package/dist/public/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  56. package/dist/public/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  57. package/dist/public/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  58. package/dist/public/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  59. package/dist/public/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  60. package/dist/public/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  61. package/dist/public/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  62. package/dist/public/assets/Preview-NR2gYrSG.js +1 -0
  63. package/dist/public/assets/abap-BdImnpbu.js +1 -0
  64. package/dist/public/assets/actionscript-3-CfeIJUat.js +1 -0
  65. package/dist/public/assets/ada-bCR0ucgS.js +1 -0
  66. package/dist/public/assets/andromeeda-C-Jbm3Hp.js +1 -0
  67. package/dist/public/assets/angular-html-CU67Zn6k.js +1 -0
  68. package/dist/public/assets/angular-ts-BwZT4LLn.js +1 -0
  69. package/dist/public/assets/apache-Pmp26Uib.js +1 -0
  70. package/dist/public/assets/apex-DDbsPZ6N.js +1 -0
  71. package/dist/public/assets/apl-dKokRX4l.js +1 -0
  72. package/dist/public/assets/applescript-Co6uUVPk.js +1 -0
  73. package/dist/public/assets/ara-BRHolxvo.js +1 -0
  74. package/dist/public/assets/asciidoc-Dv7Oe6Be.js +1 -0
  75. package/dist/public/assets/asm-D_Q5rh1f.js +1 -0
  76. package/dist/public/assets/astro-CbQHKStN.js +1 -0
  77. package/dist/public/assets/aurora-x-D-2ljcwZ.js +1 -0
  78. package/dist/public/assets/awk-DMzUqQB5.js +1 -0
  79. package/dist/public/assets/ayu-dark-Cv9koXgw.js +1 -0
  80. package/dist/public/assets/ballerina-BFfxhgS-.js +1 -0
  81. package/dist/public/assets/bat-BkioyH1T.js +1 -0
  82. package/dist/public/assets/beancount-k_qm7-4y.js +1 -0
  83. package/dist/public/assets/berry-uYugtg8r.js +1 -0
  84. package/dist/public/assets/bibtex-CHM0blh-.js +1 -0
  85. package/dist/public/assets/bicep-Bmn6On1c.js +1 -0
  86. package/dist/public/assets/blade-DVc8C-J4.js +1 -0
  87. package/dist/public/assets/bsl-BO_Y6i37.js +1 -0
  88. package/dist/public/assets/c-BIGW1oBm.js +1 -0
  89. package/dist/public/assets/cadence-Bv_4Rxtq.js +1 -0
  90. package/dist/public/assets/cairo-KRGpt6FW.js +1 -0
  91. package/dist/public/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  92. package/dist/public/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  93. package/dist/public/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  94. package/dist/public/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  95. package/dist/public/assets/clarity-D53aC0YG.js +1 -0
  96. package/dist/public/assets/clojure-P80f7IUj.js +1 -0
  97. package/dist/public/assets/cmake-D1j8_8rp.js +1 -0
  98. package/dist/public/assets/cobol-nwyudZeR.js +1 -0
  99. package/dist/public/assets/codeowners-Bp6g37R7.js +1 -0
  100. package/dist/public/assets/codeql-DsOJ9woJ.js +1 -0
  101. package/dist/public/assets/coffee-Ch7k5sss.js +1 -0
  102. package/dist/public/assets/common-lisp-Cg-RD9OK.js +1 -0
  103. package/dist/public/assets/coq-DkFqJrB1.js +1 -0
  104. package/dist/public/assets/cpp-CofmeUqb.js +1 -0
  105. package/dist/public/assets/crystal-tKQVLTB8.js +1 -0
  106. package/dist/public/assets/csharp-K5feNrxe.js +1 -0
  107. package/dist/public/assets/css-DPfMkruS.js +1 -0
  108. package/dist/public/assets/csv-fuZLfV_i.js +1 -0
  109. package/dist/public/assets/cue-D82EKSYY.js +1 -0
  110. package/dist/public/assets/custom-media-element-Ce0vsE-t.js +43 -0
  111. package/dist/public/assets/cypher-COkxafJQ.js +1 -0
  112. package/dist/public/assets/d-85-TOEBH.js +1 -0
  113. package/dist/public/assets/dark-plus-C3mMm8J8.js +1 -0
  114. package/dist/public/assets/dart-CF10PKvl.js +1 -0
  115. package/dist/public/assets/dash.all.min-Oikk9St1.js +21 -0
  116. package/dist/public/assets/dax-CEL-wOlO.js +1 -0
  117. package/dist/public/assets/desktop-BmXAJ9_W.js +1 -0
  118. package/dist/public/assets/diff-D97Zzqfu.js +1 -0
  119. package/dist/public/assets/docker-BcOcwvcX.js +1 -0
  120. package/dist/public/assets/dotenv-Da5cRb03.js +1 -0
  121. package/dist/public/assets/dracula-BzJJZx-M.js +1 -0
  122. package/dist/public/assets/dracula-soft-BXkSAIEj.js +1 -0
  123. package/dist/public/assets/dream-maker-BtqSS_iP.js +1 -0
  124. package/dist/public/assets/edge-BkV0erSs.js +1 -0
  125. package/dist/public/assets/elixir-CDX3lj18.js +1 -0
  126. package/dist/public/assets/elm-DbKCFpqz.js +1 -0
  127. package/dist/public/assets/emacs-lisp-C9XAeP06.js +1 -0
  128. package/dist/public/assets/erb-BOJIQeun.js +1 -0
  129. package/dist/public/assets/erlang-DsQrWhSR.js +1 -0
  130. package/dist/public/assets/everforest-dark-BgDCqdQA.js +1 -0
  131. package/dist/public/assets/everforest-light-C8M2exoo.js +1 -0
  132. package/dist/public/assets/fennel-BYunw83y.js +1 -0
  133. package/dist/public/assets/fish-BvzEVeQv.js +1 -0
  134. package/dist/public/assets/fluent-C4IJs8-o.js +1 -0
  135. package/dist/public/assets/fortran-fixed-form-BZjJHVRy.js +1 -0
  136. package/dist/public/assets/fortran-free-form-D22FLkUw.js +1 -0
  137. package/dist/public/assets/fsharp-CXgrBDvD.js +1 -0
  138. package/dist/public/assets/gdresource-B7Tvp0Sc.js +1 -0
  139. package/dist/public/assets/gdscript-DTMYz4Jt.js +1 -0
  140. package/dist/public/assets/gdshader-DkwncUOv.js +1 -0
  141. package/dist/public/assets/genie-D0YGMca9.js +1 -0
  142. package/dist/public/assets/gherkin-DyxjwDmM.js +1 -0
  143. package/dist/public/assets/git-commit-F4YmCXRG.js +1 -0
  144. package/dist/public/assets/git-rebase-r7XF79zn.js +1 -0
  145. package/dist/public/assets/github-dark-DHJKELXO.js +1 -0
  146. package/dist/public/assets/github-dark-default-Cuk6v7N8.js +1 -0
  147. package/dist/public/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  148. package/dist/public/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  149. package/dist/public/assets/github-light-DAi9KRSo.js +1 -0
  150. package/dist/public/assets/github-light-default-D7oLnXFd.js +1 -0
  151. package/dist/public/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  152. package/dist/public/assets/gleam-BspZqrRM.js +1 -0
  153. package/dist/public/assets/glimmer-js-Rg0-pVw9.js +1 -0
  154. package/dist/public/assets/glimmer-ts-U6CK756n.js +1 -0
  155. package/dist/public/assets/glsl-DplSGwfg.js +1 -0
  156. package/dist/public/assets/gnuplot-DdkO51Og.js +1 -0
  157. package/dist/public/assets/go-Dn2_MT6a.js +1 -0
  158. package/dist/public/assets/graphql-ChdNCCLP.js +1 -0
  159. package/dist/public/assets/groovy-gcz8RCvz.js +1 -0
  160. package/dist/public/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  161. package/dist/public/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  162. package/dist/public/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  163. package/dist/public/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  164. package/dist/public/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  165. package/dist/public/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  166. package/dist/public/assets/hack-CaT9iCJl.js +1 -0
  167. package/dist/public/assets/haml-B8DHNrY2.js +1 -0
  168. package/dist/public/assets/handlebars-BL8al0AC.js +1 -0
  169. package/dist/public/assets/haskell-Df6bDoY_.js +1 -0
  170. package/dist/public/assets/haxe-CzTSHFRz.js +1 -0
  171. package/dist/public/assets/hcl-BWvSN4gD.js +1 -0
  172. package/dist/public/assets/hjson-D5-asLiD.js +1 -0
  173. package/dist/public/assets/hls-C_5si56p.js +40 -0
  174. package/dist/public/assets/hlsl-D3lLCCz7.js +1 -0
  175. package/dist/public/assets/houston-DnULxvSX.js +1 -0
  176. package/dist/public/assets/html-GMplVEZG.js +1 -0
  177. package/dist/public/assets/html-derivative-BFtXZ54Q.js +1 -0
  178. package/dist/public/assets/http-jrhK8wxY.js +1 -0
  179. package/dist/public/assets/hurl-irOxFIW8.js +1 -0
  180. package/dist/public/assets/hxml-Bvhsp5Yf.js +1 -0
  181. package/dist/public/assets/hy-DFXneXwc.js +1 -0
  182. package/dist/public/assets/imba-DGztddWO.js +1 -0
  183. package/dist/public/assets/index-7dkQZ452.js +3299 -0
  184. package/dist/public/assets/index-Ba4GJyLR.js +594 -0
  185. package/dist/public/assets/index-Cr3JJDAk.css +1 -0
  186. package/dist/public/assets/ini-BEwlwnbL.js +1 -0
  187. package/dist/public/assets/java-CylS5w8V.js +1 -0
  188. package/dist/public/assets/javascript-wDzz0qaB.js +1 -0
  189. package/dist/public/assets/jinja-4LBKfQ-Z.js +1 -0
  190. package/dist/public/assets/jison-wvAkD_A8.js +1 -0
  191. package/dist/public/assets/json-Cp-IABpG.js +1 -0
  192. package/dist/public/assets/json5-C9tS-k6U.js +1 -0
  193. package/dist/public/assets/jsonc-Des-eS-w.js +1 -0
  194. package/dist/public/assets/jsonl-DcaNXYhu.js +1 -0
  195. package/dist/public/assets/jsonnet-DFQXde-d.js +1 -0
  196. package/dist/public/assets/jssm-C2t-YnRu.js +1 -0
  197. package/dist/public/assets/jsx-g9-lgVsj.js +1 -0
  198. package/dist/public/assets/julia-C8NyazO9.js +1 -0
  199. package/dist/public/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  200. package/dist/public/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  201. package/dist/public/assets/kanagawa-wave-DWedfzmr.js +1 -0
  202. package/dist/public/assets/kdl-DV7GczEv.js +1 -0
  203. package/dist/public/assets/kotlin-BdnUsdx6.js +1 -0
  204. package/dist/public/assets/kusto-BvAqAH-y.js +1 -0
  205. package/dist/public/assets/laserwave-DUszq2jm.js +1 -0
  206. package/dist/public/assets/latex-BdAV_C_H.js +1 -0
  207. package/dist/public/assets/lean-Bc6EcWN3.js +1 -0
  208. package/dist/public/assets/less-B1dDrJ26.js +1 -0
  209. package/dist/public/assets/light-plus-B7mTdjB0.js +1 -0
  210. package/dist/public/assets/liquid-DYVedYrR.js +1 -0
  211. package/dist/public/assets/llvm-BtvRca6l.js +1 -0
  212. package/dist/public/assets/log-2UxHyX5q.js +1 -0
  213. package/dist/public/assets/logo-BtOb2qkB.js +1 -0
  214. package/dist/public/assets/lua-BbnMAYS6.js +1 -0
  215. package/dist/public/assets/luau-CXu1NL6O.js +1 -0
  216. package/dist/public/assets/make-CHLpvVh8.js +1 -0
  217. package/dist/public/assets/markdown-Cvjx9yec.js +1 -0
  218. package/dist/public/assets/marko-CPi9NSCl.js +1 -0
  219. package/dist/public/assets/material-theme-D5KoaKCx.js +1 -0
  220. package/dist/public/assets/material-theme-darker-BfHTSMKl.js +1 -0
  221. package/dist/public/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  222. package/dist/public/assets/material-theme-ocean-CyktbL80.js +1 -0
  223. package/dist/public/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  224. package/dist/public/assets/matlab-D7o27uSR.js +1 -0
  225. package/dist/public/assets/mdc-DUICxH0z.js +1 -0
  226. package/dist/public/assets/mdx-Cmh6b_Ma.js +1 -0
  227. package/dist/public/assets/mermaid-DKYwYmdq.js +1 -0
  228. package/dist/public/assets/min-dark-CafNBF8u.js +1 -0
  229. package/dist/public/assets/min-light-CTRr51gU.js +1 -0
  230. package/dist/public/assets/mipsasm-CKIfxQSi.js +1 -0
  231. package/dist/public/assets/mojo-1DNp92w6.js +1 -0
  232. package/dist/public/assets/monokai-D4h5O-jR.js +1 -0
  233. package/dist/public/assets/move-Bu9oaDYs.js +1 -0
  234. package/dist/public/assets/narrat-DRg8JJMk.js +1 -0
  235. package/dist/public/assets/nextflow-BrzmwbiE.js +1 -0
  236. package/dist/public/assets/nginx-DknmC5AR.js +1 -0
  237. package/dist/public/assets/night-owl-C39BiMTA.js +1 -0
  238. package/dist/public/assets/nim-CVrawwO9.js +1 -0
  239. package/dist/public/assets/nix-c8nO5XWb.js +1 -0
  240. package/dist/public/assets/nord-Ddv68eIx.js +1 -0
  241. package/dist/public/assets/nushell-C-sUppwS.js +1 -0
  242. package/dist/public/assets/objective-c-DXmwc3jG.js +1 -0
  243. package/dist/public/assets/objective-cpp-CLxacb5B.js +1 -0
  244. package/dist/public/assets/ocaml-C0hk2d4L.js +1 -0
  245. package/dist/public/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  246. package/dist/public/assets/one-light-PoHY5YXO.js +1 -0
  247. package/dist/public/assets/openscad-C4EeE6gA.js +1 -0
  248. package/dist/public/assets/pascal-D93ZcfNL.js +1 -0
  249. package/dist/public/assets/perl-C0TMdlhV.js +1 -0
  250. package/dist/public/assets/php-CDn_0X-4.js +1 -0
  251. package/dist/public/assets/pkl-u5AG7uiY.js +1 -0
  252. package/dist/public/assets/plastic-3e1v2bzS.js +1 -0
  253. package/dist/public/assets/plsql-ChMvpjG-.js +1 -0
  254. package/dist/public/assets/po-BTJTHyun.js +1 -0
  255. package/dist/public/assets/poimandres-CS3Unz2-.js +1 -0
  256. package/dist/public/assets/polar-C0HS_06l.js +1 -0
  257. package/dist/public/assets/postcss-CXtECtnM.js +1 -0
  258. package/dist/public/assets/powerquery-CEu0bR-o.js +1 -0
  259. package/dist/public/assets/powershell-Dpen1YoG.js +1 -0
  260. package/dist/public/assets/prisma-Dd19v3D-.js +1 -0
  261. package/dist/public/assets/prolog-CbFg5uaA.js +1 -0
  262. package/dist/public/assets/proto-DyJlTyXw.js +1 -0
  263. package/dist/public/assets/pug-CGlum2m_.js +1 -0
  264. package/dist/public/assets/puppet-BMWR74SV.js +1 -0
  265. package/dist/public/assets/purescript-CklMAg4u.js +1 -0
  266. package/dist/public/assets/python-B6aJPvgy.js +1 -0
  267. package/dist/public/assets/qml-3beO22l8.js +1 -0
  268. package/dist/public/assets/qmldir-C8lEn-DE.js +1 -0
  269. package/dist/public/assets/qss-IeuSbFQv.js +1 -0
  270. package/dist/public/assets/r-DiinP2Uv.js +1 -0
  271. package/dist/public/assets/racket-BqYA7rlc.js +1 -0
  272. package/dist/public/assets/raku-DXvB9xmW.js +1 -0
  273. package/dist/public/assets/razor-CE9lU5zL.js +1 -0
  274. package/dist/public/assets/react-5ZXevCLf.js +17 -0
  275. package/dist/public/assets/react-BEcdFE7q.js +22 -0
  276. package/dist/public/assets/react-D2EJnkVv.js +19 -0
  277. package/dist/public/assets/react-D7jI_eai.js +1 -0
  278. package/dist/public/assets/react-DJAU2yhQ.js +6 -0
  279. package/dist/public/assets/react-DOmflkoB.js +19 -0
  280. package/dist/public/assets/react-cRnw9P6y.js +21 -0
  281. package/dist/public/assets/react-juJrAyUY.js +34 -0
  282. package/dist/public/assets/red-bN70gL4F.js +1 -0
  283. package/dist/public/assets/reg-C-SQnVFl.js +1 -0
  284. package/dist/public/assets/regexp-CDVJQ6XC.js +1 -0
  285. package/dist/public/assets/rel-C3B-1QV4.js +1 -0
  286. package/dist/public/assets/riscv-BM1_JUlF.js +1 -0
  287. package/dist/public/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  288. package/dist/public/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  289. package/dist/public/assets/rose-pine-qdsjHGoJ.js +1 -0
  290. package/dist/public/assets/rosmsg-BJDFO7_C.js +1 -0
  291. package/dist/public/assets/rst-B0xPkSld.js +1 -0
  292. package/dist/public/assets/ruby-BvKwtOVI.js +1 -0
  293. package/dist/public/assets/rust-B1yitclQ.js +1 -0
  294. package/dist/public/assets/sas-cz2c8ADy.js +1 -0
  295. package/dist/public/assets/sass-Cj5Yp3dK.js +1 -0
  296. package/dist/public/assets/scala-C151Ov-r.js +1 -0
  297. package/dist/public/assets/scheme-C98Dy4si.js +1 -0
  298. package/dist/public/assets/scss-OYdSNvt2.js +1 -0
  299. package/dist/public/assets/sdbl-DVxCFoDh.js +1 -0
  300. package/dist/public/assets/shaderlab-Dg9Lc6iA.js +1 -0
  301. package/dist/public/assets/shellscript-Yzrsuije.js +1 -0
  302. package/dist/public/assets/shellsession-BADoaaVG.js +1 -0
  303. package/dist/public/assets/slack-dark-BthQWCQV.js +1 -0
  304. package/dist/public/assets/slack-ochin-DqwNpetd.js +1 -0
  305. package/dist/public/assets/smalltalk-BERRCDM3.js +1 -0
  306. package/dist/public/assets/snazzy-light-Bw305WKR.js +1 -0
  307. package/dist/public/assets/solarized-dark-DXbdFlpD.js +1 -0
  308. package/dist/public/assets/solarized-light-L9t79GZl.js +1 -0
  309. package/dist/public/assets/solidity-rGO070M0.js +1 -0
  310. package/dist/public/assets/soy-Brmx7dQM.js +1 -0
  311. package/dist/public/assets/sparql-rVzFXLq3.js +1 -0
  312. package/dist/public/assets/splunk-BtCnVYZw.js +1 -0
  313. package/dist/public/assets/sql-BLtJtn59.js +1 -0
  314. package/dist/public/assets/ssh-config-_ykCGR6B.js +1 -0
  315. package/dist/public/assets/stata-BH5u7GGu.js +1 -0
  316. package/dist/public/assets/stylus-BEDo0Tqx.js +1 -0
  317. package/dist/public/assets/svelte-3Dk4HxPD.js +1 -0
  318. package/dist/public/assets/swift-Dg5xB15N.js +1 -0
  319. package/dist/public/assets/synthwave-84-CbfX1IO0.js +1 -0
  320. package/dist/public/assets/system-verilog-CnnmHF94.js +1 -0
  321. package/dist/public/assets/systemd-4A_iFExJ.js +1 -0
  322. package/dist/public/assets/talonscript-CkByrt1z.js +1 -0
  323. package/dist/public/assets/tasl-QIJgUcNo.js +1 -0
  324. package/dist/public/assets/tcl-dwOrl1Do.js +1 -0
  325. package/dist/public/assets/templ-W15q3VgB.js +1 -0
  326. package/dist/public/assets/terraform-BETggiCN.js +1 -0
  327. package/dist/public/assets/tex-CxkMU7Pf.js +1 -0
  328. package/dist/public/assets/tokyo-night-hegEt444.js +1 -0
  329. package/dist/public/assets/toml-vGWfd6FD.js +1 -0
  330. package/dist/public/assets/ts-tags-zn1MmPIZ.js +1 -0
  331. package/dist/public/assets/tsv-B_m7g4N7.js +1 -0
  332. package/dist/public/assets/tsx-COt5Ahok.js +1 -0
  333. package/dist/public/assets/turtle-BsS91CYL.js +1 -0
  334. package/dist/public/assets/twig-CO9l9SDP.js +1 -0
  335. package/dist/public/assets/typescript-BPQ3VLAy.js +1 -0
  336. package/dist/public/assets/typespec-BGHnOYBU.js +1 -0
  337. package/dist/public/assets/typst-DHCkPAjA.js +1 -0
  338. package/dist/public/assets/v-BcVCzyr7.js +1 -0
  339. package/dist/public/assets/vala-CsfeWuGM.js +1 -0
  340. package/dist/public/assets/vb-D17OF-Vu.js +1 -0
  341. package/dist/public/assets/verilog-BQ8w6xss.js +1 -0
  342. package/dist/public/assets/vesper-DU1UobuO.js +1 -0
  343. package/dist/public/assets/vhdl-CeAyd5Ju.js +1 -0
  344. package/dist/public/assets/viml-CJc9bBzg.js +1 -0
  345. package/dist/public/assets/vitesse-black-Bkuqu6BP.js +1 -0
  346. package/dist/public/assets/vitesse-dark-D0r3Knsf.js +1 -0
  347. package/dist/public/assets/vitesse-light-CVO1_9PV.js +1 -0
  348. package/dist/public/assets/vue-DnHKYNfI.js +1 -0
  349. package/dist/public/assets/vue-html-CChd_i61.js +1 -0
  350. package/dist/public/assets/vue-vine-8moa0y9V.js +1 -0
  351. package/dist/public/assets/vyper-CDx5xZoG.js +1 -0
  352. package/dist/public/assets/wasm-CG6Dc4jp.js +1 -0
  353. package/dist/public/assets/wasm-MzD3tlZU.js +1 -0
  354. package/dist/public/assets/wenyan-BV7otONQ.js +1 -0
  355. package/dist/public/assets/wgsl-Dx-B1_4e.js +1 -0
  356. package/dist/public/assets/wikitext-BhOHFoWU.js +1 -0
  357. package/dist/public/assets/wit-5i3qLPDT.js +1 -0
  358. package/dist/public/assets/wolfram-lXgVvXCa.js +1 -0
  359. package/dist/public/assets/xml-sdJ4AIDG.js +1 -0
  360. package/dist/public/assets/xsl-CtQFsRM5.js +1 -0
  361. package/dist/public/assets/yaml-Buea-lGh.js +1 -0
  362. package/dist/public/assets/zenscript-DVFEvuxE.js +1 -0
  363. package/dist/public/assets/zig-VOosw3JB.js +1 -0
  364. package/{frontend → dist/public}/index.html +2 -1
  365. package/dist/server/index.js +1 -1
  366. package/package.json +10 -3
  367. package/readme.md +77 -0
  368. package/.gitattributes +0 -2
  369. package/.prettierignore +0 -5
  370. package/.prettierrc +0 -9
  371. package/.vscode/settings.json +0 -13
  372. package/frontend/README.md +0 -73
  373. package/frontend/components.json +0 -24
  374. package/frontend/eslint.config.js +0 -23
  375. package/frontend/package-lock.json +0 -15754
  376. package/frontend/package.json +0 -122
  377. package/frontend/src/App.tsx +0 -21
  378. package/frontend/src/components/app-sidebar.tsx +0 -393
  379. package/frontend/src/components/editor/editor-base-kit.tsx +0 -43
  380. package/frontend/src/components/editor/editor-kit.tsx +0 -93
  381. package/frontend/src/components/editor/plugins/align-base-kit.tsx +0 -16
  382. package/frontend/src/components/editor/plugins/align-kit.tsx +0 -18
  383. package/frontend/src/components/editor/plugins/autoformat-kit.tsx +0 -236
  384. package/frontend/src/components/editor/plugins/basic-blocks-base-kit.tsx +0 -35
  385. package/frontend/src/components/editor/plugins/basic-blocks-kit.tsx +0 -88
  386. package/frontend/src/components/editor/plugins/basic-marks-base-kit.tsx +0 -27
  387. package/frontend/src/components/editor/plugins/basic-marks-kit.tsx +0 -41
  388. package/frontend/src/components/editor/plugins/basic-nodes-kit.tsx +0 -6
  389. package/frontend/src/components/editor/plugins/block-menu-kit.tsx +0 -14
  390. package/frontend/src/components/editor/plugins/block-placeholder-kit.tsx +0 -17
  391. package/frontend/src/components/editor/plugins/block-selection-kit.tsx +0 -32
  392. package/frontend/src/components/editor/plugins/callout-base-kit.tsx +0 -7
  393. package/frontend/src/components/editor/plugins/callout-kit.tsx +0 -7
  394. package/frontend/src/components/editor/plugins/code-block-base-kit.tsx +0 -23
  395. package/frontend/src/components/editor/plugins/code-block-kit.tsx +0 -26
  396. package/frontend/src/components/editor/plugins/codebase-kit.tsx +0 -23
  397. package/frontend/src/components/editor/plugins/column-base-kit.tsx +0 -11
  398. package/frontend/src/components/editor/plugins/column-kit.tsx +0 -10
  399. package/frontend/src/components/editor/plugins/comment-base-kit.tsx +0 -7
  400. package/frontend/src/components/editor/plugins/comment-kit.tsx +0 -97
  401. package/frontend/src/components/editor/plugins/cursor-overlay-kit.tsx +0 -13
  402. package/frontend/src/components/editor/plugins/date-base-kit.tsx +0 -5
  403. package/frontend/src/components/editor/plugins/date-kit.tsx +0 -7
  404. package/frontend/src/components/editor/plugins/discussion-kit.tsx +0 -148
  405. package/frontend/src/components/editor/plugins/dnd-kit.tsx +0 -28
  406. package/frontend/src/components/editor/plugins/docx-kit.tsx +0 -6
  407. package/frontend/src/components/editor/plugins/emoji-kit.tsx +0 -13
  408. package/frontend/src/components/editor/plugins/excalidraw-kit.tsx +0 -9
  409. package/frontend/src/components/editor/plugins/exit-break-kit.tsx +0 -12
  410. package/frontend/src/components/editor/plugins/floating-toolbar-kit.tsx +0 -19
  411. package/frontend/src/components/editor/plugins/font-base-kit.tsx +0 -20
  412. package/frontend/src/components/editor/plugins/font-kit.tsx +0 -29
  413. package/frontend/src/components/editor/plugins/indent-base-kit.tsx +0 -19
  414. package/frontend/src/components/editor/plugins/indent-kit.tsx +0 -22
  415. package/frontend/src/components/editor/plugins/line-height-base-kit.tsx +0 -14
  416. package/frontend/src/components/editor/plugins/line-height-kit.tsx +0 -16
  417. package/frontend/src/components/editor/plugins/link-base-kit.tsx +0 -5
  418. package/frontend/src/components/editor/plugins/link-kit.tsx +0 -15
  419. package/frontend/src/components/editor/plugins/list-base-kit.tsx +0 -23
  420. package/frontend/src/components/editor/plugins/list-kit.tsx +0 -26
  421. package/frontend/src/components/editor/plugins/markdown-kit.tsx +0 -46
  422. package/frontend/src/components/editor/plugins/math-base-kit.tsx +0 -11
  423. package/frontend/src/components/editor/plugins/math-kit.tsx +0 -13
  424. package/frontend/src/components/editor/plugins/media-base-kit.tsx +0 -31
  425. package/frontend/src/components/editor/plugins/media-kit.tsx +0 -43
  426. package/frontend/src/components/editor/plugins/mention-base-kit.tsx +0 -7
  427. package/frontend/src/components/editor/plugins/mention-kit.tsx +0 -15
  428. package/frontend/src/components/editor/plugins/slash-kit.tsx +0 -18
  429. package/frontend/src/components/editor/plugins/suggestion-base-kit.tsx +0 -7
  430. package/frontend/src/components/editor/plugins/suggestion-kit.tsx +0 -90
  431. package/frontend/src/components/editor/plugins/table-base-kit.tsx +0 -20
  432. package/frontend/src/components/editor/plugins/table-kit.tsx +0 -22
  433. package/frontend/src/components/editor/plugins/toc-base-kit.tsx +0 -5
  434. package/frontend/src/components/editor/plugins/toc-kit.tsx +0 -14
  435. package/frontend/src/components/editor/plugins/toggle-base-kit.tsx +0 -7
  436. package/frontend/src/components/editor/plugins/toggle-kit.tsx +0 -11
  437. package/frontend/src/components/editor/transforms.ts +0 -194
  438. package/frontend/src/components/markdown-to-slate-demo.tsx +0 -50
  439. package/frontend/src/components/mode-toggle.tsx +0 -15
  440. package/frontend/src/components/theme-provider.tsx +0 -73
  441. package/frontend/src/components/ui/alert-dialog.tsx +0 -155
  442. package/frontend/src/components/ui/align-toolbar-button.tsx +0 -84
  443. package/frontend/src/components/ui/avatar.tsx +0 -51
  444. package/frontend/src/components/ui/block-context-menu.tsx +0 -199
  445. package/frontend/src/components/ui/block-discussion.tsx +0 -365
  446. package/frontend/src/components/ui/block-draggable.tsx +0 -512
  447. package/frontend/src/components/ui/block-list-static.tsx +0 -80
  448. package/frontend/src/components/ui/block-list.tsx +0 -87
  449. package/frontend/src/components/ui/block-selection.tsx +0 -42
  450. package/frontend/src/components/ui/block-suggestion.tsx +0 -473
  451. package/frontend/src/components/ui/blockquote-node-static.tsx +0 -11
  452. package/frontend/src/components/ui/blockquote-node.tsx +0 -13
  453. package/frontend/src/components/ui/button.tsx +0 -62
  454. package/frontend/src/components/ui/calendar.tsx +0 -218
  455. package/frontend/src/components/ui/callout-node-static.tsx +0 -36
  456. package/frontend/src/components/ui/callout-node.tsx +0 -63
  457. package/frontend/src/components/ui/caption.tsx +0 -63
  458. package/frontend/src/components/ui/checkbox.tsx +0 -30
  459. package/frontend/src/components/ui/code-block-node-static.tsx +0 -35
  460. package/frontend/src/components/ui/code-block-node.tsx +0 -287
  461. package/frontend/src/components/ui/code-node-static.tsx +0 -15
  462. package/frontend/src/components/ui/code-node.tsx +0 -17
  463. package/frontend/src/components/ui/codebase-snippet-node.tsx +0 -237
  464. package/frontend/src/components/ui/column-node-static.tsx +0 -29
  465. package/frontend/src/components/ui/column-node.tsx +0 -317
  466. package/frontend/src/components/ui/command.tsx +0 -182
  467. package/frontend/src/components/ui/comment-node-static.tsx +0 -15
  468. package/frontend/src/components/ui/comment-node.tsx +0 -45
  469. package/frontend/src/components/ui/comment-toolbar-button.tsx +0 -24
  470. package/frontend/src/components/ui/comment.tsx +0 -618
  471. package/frontend/src/components/ui/context-menu.tsx +0 -250
  472. package/frontend/src/components/ui/cursor-overlay.tsx +0 -66
  473. package/frontend/src/components/ui/date-node-static.tsx +0 -45
  474. package/frontend/src/components/ui/date-node.tsx +0 -93
  475. package/frontend/src/components/ui/dialog.tsx +0 -143
  476. package/frontend/src/components/ui/dropdown-menu.tsx +0 -255
  477. package/frontend/src/components/ui/dynamic-icon.tsx +0 -12
  478. package/frontend/src/components/ui/editor-static.tsx +0 -53
  479. package/frontend/src/components/ui/editor.tsx +0 -130
  480. package/frontend/src/components/ui/emoji-node.tsx +0 -69
  481. package/frontend/src/components/ui/emoji-toolbar-button.tsx +0 -628
  482. package/frontend/src/components/ui/equation-node-static.tsx +0 -98
  483. package/frontend/src/components/ui/equation-node.tsx +0 -235
  484. package/frontend/src/components/ui/equation-toolbar-button.tsx +0 -25
  485. package/frontend/src/components/ui/excalidraw-node.tsx +0 -36
  486. package/frontend/src/components/ui/export-toolbar-button.tsx +0 -174
  487. package/frontend/src/components/ui/file-selector.tsx +0 -339
  488. package/frontend/src/components/ui/floating-toolbar-buttons.tsx +0 -73
  489. package/frontend/src/components/ui/floating-toolbar.tsx +0 -85
  490. package/frontend/src/components/ui/font-color-toolbar-button.tsx +0 -831
  491. package/frontend/src/components/ui/font-size-toolbar-button.tsx +0 -152
  492. package/frontend/src/components/ui/heading-node-static.tsx +0 -68
  493. package/frontend/src/components/ui/heading-node.tsx +0 -58
  494. package/frontend/src/components/ui/highlight-node-static.tsx +0 -11
  495. package/frontend/src/components/ui/highlight-node.tsx +0 -13
  496. package/frontend/src/components/ui/history-toolbar-button.tsx +0 -50
  497. package/frontend/src/components/ui/hr-node-static.tsx +0 -20
  498. package/frontend/src/components/ui/hr-node.tsx +0 -33
  499. package/frontend/src/components/ui/import-toolbar-button.tsx +0 -97
  500. package/frontend/src/components/ui/indent-toolbar-button.tsx +0 -30
  501. package/frontend/src/components/ui/inline-combobox.tsx +0 -414
  502. package/frontend/src/components/ui/input.tsx +0 -21
  503. package/frontend/src/components/ui/insert-toolbar-button.tsx +0 -254
  504. package/frontend/src/components/ui/kbd-node-static.tsx +0 -15
  505. package/frontend/src/components/ui/kbd-node.tsx +0 -17
  506. package/frontend/src/components/ui/layout-header.tsx +0 -35
  507. package/frontend/src/components/ui/line-height-toolbar-button.tsx +0 -68
  508. package/frontend/src/components/ui/link-node-static.tsx +0 -21
  509. package/frontend/src/components/ui/link-node.tsx +0 -39
  510. package/frontend/src/components/ui/link-toolbar-button.tsx +0 -22
  511. package/frontend/src/components/ui/link-toolbar.tsx +0 -206
  512. package/frontend/src/components/ui/list-toolbar-button.tsx +0 -204
  513. package/frontend/src/components/ui/mark-toolbar-button.tsx +0 -19
  514. package/frontend/src/components/ui/media-audio-node-static.tsx +0 -17
  515. package/frontend/src/components/ui/media-audio-node.tsx +0 -39
  516. package/frontend/src/components/ui/media-embed-node.tsx +0 -136
  517. package/frontend/src/components/ui/media-file-node-static.tsx +0 -29
  518. package/frontend/src/components/ui/media-file-node.tsx +0 -47
  519. package/frontend/src/components/ui/media-image-node-static.tsx +0 -39
  520. package/frontend/src/components/ui/media-image-node.tsx +0 -80
  521. package/frontend/src/components/ui/media-placeholder-node.tsx +0 -249
  522. package/frontend/src/components/ui/media-preview-dialog.tsx +0 -152
  523. package/frontend/src/components/ui/media-toolbar-button.tsx +0 -225
  524. package/frontend/src/components/ui/media-toolbar.tsx +0 -115
  525. package/frontend/src/components/ui/media-upload-toast.tsx +0 -66
  526. package/frontend/src/components/ui/media-video-node-static.tsx +0 -30
  527. package/frontend/src/components/ui/media-video-node.tsx +0 -121
  528. package/frontend/src/components/ui/mention-node-static.tsx +0 -36
  529. package/frontend/src/components/ui/mention-node.tsx +0 -194
  530. package/frontend/src/components/ui/mode-toolbar-button.tsx +0 -123
  531. package/frontend/src/components/ui/more-toolbar-button.tsx +0 -80
  532. package/frontend/src/components/ui/paragraph-node-static.tsx +0 -13
  533. package/frontend/src/components/ui/paragraph-node.tsx +0 -15
  534. package/frontend/src/components/ui/popover.tsx +0 -46
  535. package/frontend/src/components/ui/resize-handle.tsx +0 -87
  536. package/frontend/src/components/ui/separator.tsx +0 -28
  537. package/frontend/src/components/ui/sheet.tsx +0 -139
  538. package/frontend/src/components/ui/sidebar.tsx +0 -726
  539. package/frontend/src/components/ui/skeleton.tsx +0 -13
  540. package/frontend/src/components/ui/slash-node.tsx +0 -233
  541. package/frontend/src/components/ui/sonner.tsx +0 -38
  542. package/frontend/src/components/ui/suggestion-node-static.tsx +0 -35
  543. package/frontend/src/components/ui/suggestion-node.tsx +0 -162
  544. package/frontend/src/components/ui/suggestion-toolbar-button.tsx +0 -25
  545. package/frontend/src/components/ui/table-icons.tsx +0 -862
  546. package/frontend/src/components/ui/table-node-static.tsx +0 -98
  547. package/frontend/src/components/ui/table-node.tsx +0 -656
  548. package/frontend/src/components/ui/table-toolbar-button.tsx +0 -264
  549. package/frontend/src/components/ui/toc-node-static.tsx +0 -92
  550. package/frontend/src/components/ui/toc-node.tsx +0 -55
  551. package/frontend/src/components/ui/toggle-node-static.tsx +0 -18
  552. package/frontend/src/components/ui/toggle-node.tsx +0 -36
  553. package/frontend/src/components/ui/toggle-toolbar-button.tsx +0 -22
  554. package/frontend/src/components/ui/toolbar.tsx +0 -387
  555. package/frontend/src/components/ui/tooltip.tsx +0 -59
  556. package/frontend/src/components/ui/turn-into-toolbar-button.tsx +0 -188
  557. package/frontend/src/hooks/use-debounce.ts +0 -18
  558. package/frontend/src/hooks/use-is-touch-device.ts +0 -24
  559. package/frontend/src/hooks/use-mobile.ts +0 -19
  560. package/frontend/src/hooks/use-mounted.ts +0 -11
  561. package/frontend/src/hooks/use-upload-file.ts +0 -128
  562. package/frontend/src/index.css +0 -128
  563. package/frontend/src/layout.tsx +0 -42
  564. package/frontend/src/lib/markdown-joiner-transform.ts +0 -239
  565. package/frontend/src/lib/orpc.ts +0 -13
  566. package/frontend/src/lib/uploadthing.ts +0 -19
  567. package/frontend/src/lib/utils.ts +0 -6
  568. package/frontend/src/main.tsx +0 -13
  569. package/frontend/src/pages/editor.tsx +0 -44
  570. package/frontend/src/types/docs.d.ts +0 -6
  571. package/frontend/src/types/global.d.ts +0 -9
  572. package/frontend/src/types/router.d.ts +0 -4
  573. package/frontend/tsconfig.app.json +0 -33
  574. package/frontend/tsconfig.json +0 -10
  575. package/frontend/tsconfig.node.json +0 -26
  576. package/frontend/vite.config.ts +0 -14
  577. package/src/bin/doclific.ts +0 -47
  578. package/src/core/codebase.ts +0 -39
  579. package/src/core/docs.ts +0 -90
  580. package/src/core/git.ts +0 -48
  581. package/src/server/index.ts +0 -55
  582. package/src/server/router.ts +0 -65
  583. package/tsconfig.json +0 -15
  584. /package/{frontend → dist}/public/logo.svg +0 -0
@@ -0,0 +1,3299 @@
1
+ import{R as en,r as tn}from"./index-Ba4GJyLR.js";import{H as df,M as uf}from"./hls-C_5si56p.js";import{C as Tn}from"./custom-media-element-Ce0vsE-t.js";var cf=Object.create,jh=Object.defineProperty,hf=Object.getOwnPropertyDescriptor,mf=Object.getOwnPropertyNames,pf=Object.getPrototypeOf,vf=Object.prototype.hasOwnProperty,Xh=function(t,e){return function(){return t&&(e=t(t=0)),e}},We=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},ff=function(t,e,i,a){if(e&&typeof e=="object"||typeof e=="function")for(var r=mf(e),n=0,s=r.length,o;n<s;n++)o=r[n],!vf.call(t,o)&&o!==i&&jh(t,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(a=hf(e,o))||a.enumerable});return t},Xe=function(t,e,i){return i=t!=null?cf(pf(t)):{},ff(!t||!t.__esModule?jh(i,"default",{value:t,enumerable:!0}):i,t)},yt=We(function(t,e){var i;typeof window<"u"?i=window:typeof global<"u"?i=global:typeof self<"u"?i=self:i={},e.exports=i});function aa(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):aa(t,e)}var ra=Xh(function(){ra()});function Jh(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var em=Xh(function(){}),tm=We(function(t,e){var i=Array.prototype.slice;e.exports=a;function a(r,n){for(("length"in r)||(r=[r]),r=i.call(r);r.length;){var s=r.shift(),o=n(s);if(o)return o;s.childNodes&&s.childNodes.length&&(r=i.call(s.childNodes).concat(r))}}}),Ef=We(function(t,e){ra(),e.exports=i;function i(a,r){if(!aa(this,i))return new i(a,r);this.data=a,this.nodeValue=a,this.length=a.length,this.ownerDocument=r||null}i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),_f=We(function(t,e){ra(),e.exports=i;function i(a,r){if(!aa(this,i))return new i(a);this.data=a||"",this.length=this.data.length,this.ownerDocument=r||null}i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(a,r,n){var s=this.data,o=s.substring(0,a),l=s.substring(a+r,s.length);this.data=o+n+l,this.length=this.data.length}}),im=We(function(t,e){e.exports=i;function i(a){var r=this,n=a.type;a.target||(a.target=r),r.listeners||(r.listeners={});var s=r.listeners[n];if(s)return s.forEach(function(o){a.currentTarget=r,typeof o=="function"?o(a):o.handleEvent(a)});r.parentNode&&r.parentNode.dispatchEvent(a)}}),am=We(function(t,e){e.exports=i;function i(a,r){var n=this;n.listeners||(n.listeners={}),n.listeners[a]||(n.listeners[a]=[]),n.listeners[a].indexOf(r)===-1&&n.listeners[a].push(r)}}),rm=We(function(t,e){e.exports=i;function i(a,r){var n=this;if(n.listeners&&n.listeners[a]){var s=n.listeners[a],o=s.indexOf(r);o!==-1&&s.splice(o,1)}}}),bf=We(function(t,e){em(),e.exports=a;var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function a(h){switch(h.nodeType){case 3:return m(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(h){var c=[],v=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(v=v.toLowerCase()),c.push("<"+v+d(h)+o(h)),i.indexOf(v)>-1?c.push(" />"):(c.push(">"),h.childNodes.length?c.push.apply(c,h.childNodes.map(a)):h.textContent||h.innerText?c.push(m(h.textContent||h.innerText)):h.innerHTML&&c.push(h.innerHTML),c.push("</"+v+">")),c.join("")}function n(h,c){var v=Jh(h[c]);return c==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(c)&&(v==="string"||v==="boolean"||v==="number")&&c!=="nodeName"&&c!=="className"&&c!=="tagName"&&c!=="textContent"&&c!=="innerText"&&c!=="namespaceURI"&&c!=="innerHTML"}function s(h){if(typeof h=="string")return h;var c="";return Object.keys(h).forEach(function(v){var E=h[v];v=v.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}),c+=v+":"+E+";"}),c}function o(h){var c=h.dataset,v=[];for(var E in c)v.push({name:"data-"+E,value:c[E]});return v.length?l(v):""}function l(h){var c=[];return h.forEach(function(v){var E=v.name,g=v.value;E==="style"&&(g=s(g)),c.push(E+'="'+p(g)+'"')}),c.length?" "+c.join(" "):""}function d(h){var c=[];for(var v in h)n(h,v)&&c.push({name:v,value:h[v]});for(var E in h._attributes)for(var g in h._attributes[E]){var y=h._attributes[E][g],T=(y.prefix?y.prefix+":":"")+g;c.push({name:T,value:y.value})}return h.className&&c.push({name:"class",value:h.className}),c.length?l(c):""}function m(h){var c="";return typeof h=="string"?c=h:h&&(c=h.toString()),c.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function p(h){return m(h).replace(/"/g,"&quot;")}}),nm=We(function(t,e){ra();var i=tm(),a=im(),r=am(),n=rm(),s=bf(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,m,p){if(!aa(this,l))return new l(d);var h=p===void 0?o:p||null;this.tagName=h===o?String(d).toUpperCase():d,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=m||null,this.namespaceURI=h,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(d){return d.parentNode&&d.parentNode.removeChild(d),this.childNodes.push(d),d.parentNode=this,d},l.prototype.replaceChild=function(d,m){d.parentNode&&d.parentNode.removeChild(d);var p=this.childNodes.indexOf(m);return m.parentNode=null,this.childNodes[p]=d,d.parentNode=this,m},l.prototype.removeChild=function(d){var m=this.childNodes.indexOf(d);return this.childNodes.splice(m,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,m){d.parentNode&&d.parentNode.removeChild(d);var p=m==null?-1:this.childNodes.indexOf(m);return p>-1?this.childNodes.splice(p,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,m,p){var h=null,c=m,v=m.indexOf(":");if(v>-1&&(h=m.substr(0,v),c=m.substr(v+1)),this.tagName==="INPUT"&&m==="type")this.type=p;else{var E=this._attributes[d]||(this._attributes[d]={});E[c]={value:p,prefix:h}}},l.prototype.getAttributeNS=function(d,m){var p=this._attributes[d],h=p&&p[m]&&p[m].value;return this.tagName==="INPUT"&&m==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,m){var p=this._attributes[d];p&&delete p[m]},l.prototype.hasAttributeNS=function(d,m){var p=this._attributes[d];return!!p&&m in p},l.prototype.setAttribute=function(d,m){return this.setAttributeNS(null,d,m)},l.prototype.getAttribute=function(d){return this.getAttributeNS(null,d)},l.prototype.removeAttribute=function(d){return this.removeAttributeNS(null,d)},l.prototype.hasAttribute=function(d){return this.hasAttributeNS(null,d)},l.prototype.removeEventListener=n,l.prototype.addEventListener=r,l.prototype.dispatchEvent=a,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(d){var m=d.split(" "),p=[];return i(this,function(h){if(h.nodeType===1){var c=h.className||"",v=c.split(" ");m.every(function(E){return v.indexOf(E)!==-1})&&p.push(h)}}),p},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var m=[];return i(this.childNodes,function(p){p.nodeType===1&&(d==="*"||p.tagName.toLowerCase()===d)&&m.push(p)}),m},l.prototype.contains=function(d){return i(this,function(m){return d===m})||!1}}),gf=We(function(t,e){ra();var i=nm();e.exports=a;function a(r){if(!aa(this,a))return new a;this.childNodes=[],this.parentNode=null,this.ownerDocument=r||null}a.prototype.type="DocumentFragment",a.prototype.nodeType=11,a.prototype.nodeName="#document-fragment",a.prototype.appendChild=i.prototype.appendChild,a.prototype.replaceChild=i.prototype.replaceChild,a.prototype.removeChild=i.prototype.removeChild,a.prototype.toString=function(){return this.childNodes.map(function(r){return String(r)}).join("")}}),yf=We(function(t,e){e.exports=i;function i(a){}i.prototype.initEvent=function(a,r,n){this.type=a,this.bubbles=r,this.cancelable=n},i.prototype.preventDefault=function(){}}),Tf=We(function(t,e){ra();var i=tm(),a=Ef(),r=_f(),n=nm(),s=gf(),o=yf(),l=im(),d=am(),m=rm();e.exports=p;function p(){if(!aa(this,p))return new p;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var h=p.prototype;h.createTextNode=function(c){return new r(c,this)},h.createElementNS=function(c,v){var E=c===null?null:String(c);return new n(v,this,E)},h.createElement=function(c){return new n(c,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(c){return new o(c)},h.createComment=function(c){return new a(c,this)},h.getElementById=function(c){c=String(c);var v=i(this.childNodes,function(E){if(String(E.id)===c)return E});return v||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=m,h.addEventListener=d,h.dispatchEvent=l}),Af=We(function(t,e){var i=Tf();e.exports=new i}),sm=We(function(t,e){var i=typeof global<"u"?global:typeof window<"u"?window:{},a=Af(),r;typeof document<"u"?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a)),e.exports=r});function kf(t){if(Array.isArray(t))return t}function Sf(t,e){var i=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a=[],r=!0,n=!1,s,o;try{for(i=i.call(t);!(r=(s=i.next()).done)&&(a.push(s.value),!(e&&a.length===e));r=!0);}catch(l){n=!0,o=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(n)throw o}}return a}}function wf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _l(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}function om(t,e){if(t){if(typeof t=="string")return _l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _l(t,e)}}function ai(t,e){return kf(t)||Sf(t,e)||om(t,e)||wf()}var Vr=Xe(yt()),Ec=Xe(yt()),If=Xe(yt()),Rf={now:function(){var t=If.default.performance,e=t&&t.timing,i=e&&e.navigationStart,a=typeof i=="number"&&typeof t.now=="function"?i+t.now():Date.now();return Math.round(a)}},be=Rf,an=function(){var t,e,i;if(typeof((t=Ec.default.crypto)===null||t===void 0?void 0:t.getRandomValues)=="function"){i=new Uint8Array(32),Ec.default.crypto.getRandomValues(i);for(var a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=Math.random()*16|0}var n=0;e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(l){var d=l==="x"?i[n]:i[n]&3|8;return n++,d.toString(16)});var s=be.now(),o=s?.toString(16).substring(3);return o?e.substring(0,28)+o:e},lm=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},ht=function(t){if(t&&typeof t.nodeName<"u")return t.muxId||(t.muxId=lm()),t.muxId;var e;try{e=document.querySelector(t)}catch{}return e&&!e.muxId&&(e.muxId=t),e?.muxId||t},Zs=function(t){var e;t&&typeof t.nodeName<"u"?(e=t,t=ht(e)):e=document.querySelector(t);var i=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,t,i]};function Cf(t){if(Array.isArray(t))return _l(t)}function Lf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Df(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mt(t){return Cf(t)||Lf(t)||om(t)||Df()}var Wi={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},Mf=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,i,a,r,n,s,o=[console,t],l=(i=console.trace).bind.apply(i,mt(o)),d=(a=console.info).bind.apply(a,mt(o)),m=(r=console.debug).bind.apply(r,mt(o)),p=(n=console.warn).bind.apply(n,mt(o)),h=(s=console.error).bind.apply(s,mt(o)),c=e;return{trace:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(c>Wi.TRACE))return l.apply(void 0,mt(E))},debug:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(c>Wi.DEBUG))return m.apply(void 0,mt(E))},info:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(c>Wi.INFO))return d.apply(void 0,mt(E))},warn:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(c>Wi.WARN))return p.apply(void 0,mt(E))},error:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(c>Wi.ERROR))return h.apply(void 0,mt(E))},get level(){return c},set level(v){v!==this.level&&(c=v??e)}}},ee=Mf("[mux]"),Qo=Xe(yt());function bl(){var t=Qo.default.doNotTrack||Qo.default.navigator&&Qo.default.navigator.doNotTrack;return t==="1"}function N(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}ra();function Re(t,e){if(!aa(t,e))throw new TypeError("Cannot call a class as a function")}function xf(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function Yt(t,e,i){return e&&xf(t.prototype,e),t}function w(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ja(t){return ja=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ja(t)}function Of(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=ja(t),t!==null););return t}function Fn(t,e,i){return typeof Reflect<"u"&&Reflect.get?Fn=Reflect.get:Fn=function(a,r,n){var s=Of(a,r);if(s){var o=Object.getOwnPropertyDescriptor(s,r);return o.get?o.get.call(n||a):o.value}},Fn(t,e,i||t)}function gl(t,e){return gl=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},gl(t,e)}function Nf(t,e){if(typeof e!="function"&&e!==null)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}}),e&&gl(t,e)}function Pf(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}em();function Uf(t,e){return e&&(Jh(e)==="object"||typeof e=="function")?e:N(t)}function $f(t){var e=Pf();return function(){var i=ja(t),a;if(e){var r=ja(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Uf(this,a)}}var _t=function(t){return rn(t)[0]},rn=function(t){if(typeof t!="string"||t==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,i=t.match(e)||[],a=i[4],r;return a&&(r=(a.match(/[^\.]+\.[^\.]+$/)||[])[0]),[a,r]},zo=Xe(yt()),Hf={exists:function(){var t=zo.default.performance,e=t&&t.timing;return e!==void 0},domContentLoadedEventEnd:function(){var t=zo.default.performance,e=t&&t.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var t=zo.default.performance,e=t&&t.timing;return e&&e.navigationStart}},js=Hf;function _e(t,e,i){i=i===void 0?1:i,t[e]=t[e]||0,t[e]+=i}function Xs(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},a=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(i).filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable}))),a.forEach(function(r){w(t,r,i[r])})}return t}function Bf(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);i.push.apply(i,a)}return i}function Nd(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Bf(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}var Wf=["x-cdn","content-type"],dm=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],Ff=Wf.concat(dm);function Pd(t){t=t||"";var e={},i=t.trim().split(/[\r\n]+/);return i.forEach(function(a){if(a){var r=a.split(": "),n=r.shift();n&&(Ff.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=r.join(": "))}}),e}function Js(t){if(t){var e=dm.find(function(i){return t[i]!==void 0});return e?t[e]:void 0}}var Kf=function(t){var e={};for(var i in t){var a=t[i],r=a["DATA-ID"].search("io.litix.data.");if(r!==-1){var n=a["DATA-ID"].replace("io.litix.data.","");e[n]=a.VALUE}}return e},um=Kf,An=function(t){if(!t)return{};var e=js.navigationStart(),i=t.loading,a=i?i.start:t.trequest,r=i?i.first:t.tfirst,n=i?i.end:t.tload;return{bytesLoaded:t.total,requestStart:Math.round(e+a),responseStart:Math.round(e+r),responseEnd:Math.round(e+n)}},ur=function(t){if(!(!t||typeof t.getAllResponseHeaders!="function"))return Pd(t.getAllResponseHeaders())},Vf=function(t,e,i){var a=arguments.length>4?arguments[4]:void 0,r=t.log,n=t.utils.secondsToMs,s=function(g){var y=parseInt(a.version),T;return y===1&&g.programDateTime!==null&&(T=g.programDateTime),y===0&&g.pdt!==null&&(T=g.pdt),T};if(!js.exists()){r.warn("performance timing not supported. Not tracking HLS.js.");return}var o=function(g,y){return t.emit(e,g,y)},l=function(g,y){var T=y.levels,_=y.audioTracks,S=y.url,C=y.stats,O=y.networkDetails,$=y.sessionData,Y={},J={};T.forEach(function(he,Pe){Y[Pe]={width:he.width,height:he.height,bitrate:he.bitrate,attrs:he.attrs}}),_.forEach(function(he,Pe){J[Pe]={name:he.name,language:he.lang,bitrate:he.bitrate}});var K=An(C),U=K.bytesLoaded,Me=K.requestStart,Fe=K.responseStart,Ke=K.responseEnd;o("requestcompleted",Nd(Xs({},um($)),{request_event_type:g,request_bytes_loaded:U,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_type:"manifest",request_hostname:_t(S),request_response_headers:ur(O),request_rendition_lists:{media:Y,audio:J,video:{}}}))};i.on(a.Events.MANIFEST_LOADED,l);var d=function(g,y){var T=y.details,_=y.level,S=y.networkDetails,C=y.stats,O=An(C),$=O.bytesLoaded,Y=O.requestStart,J=O.responseStart,K=O.responseEnd,U=T.fragments[T.fragments.length-1],Me=s(U)+n(U.duration);o("requestcompleted",{request_event_type:g,request_bytes_loaded:$,request_start:Y,request_response_start:J,request_response_end:K,request_current_level:_,request_type:"manifest",request_hostname:_t(T.url),request_response_headers:ur(S),video_holdback:T.holdBack&&n(T.holdBack),video_part_holdback:T.partHoldBack&&n(T.partHoldBack),video_part_target_duration:T.partTarget&&n(T.partTarget),video_target_duration:T.targetduration&&n(T.targetduration),video_source_is_live:T.live,player_manifest_newest_program_time:isNaN(Me)?void 0:Me})};i.on(a.Events.LEVEL_LOADED,d);var m=function(g,y){var T=y.details,_=y.networkDetails,S=y.stats,C=An(S),O=C.bytesLoaded,$=C.requestStart,Y=C.responseStart,J=C.responseEnd;o("requestcompleted",{request_event_type:g,request_bytes_loaded:O,request_start:$,request_response_start:Y,request_response_end:J,request_type:"manifest",request_hostname:_t(T.url),request_response_headers:ur(_)})};i.on(a.Events.AUDIO_TRACK_LOADED,m);var p=function(g,y){var T=y.stats,_=y.networkDetails,S=y.frag;T=T||S.stats;var C=An(T),O=C.bytesLoaded,$=C.requestStart,Y=C.responseStart,J=C.responseEnd,K=_?ur(_):void 0,U={request_event_type:g,request_bytes_loaded:O,request_start:$,request_response_start:Y,request_response_end:J,request_hostname:_?_t(_.responseURL):void 0,request_id:K?Js(K):void 0,request_response_headers:K,request_media_duration:S.duration,request_url:_?.responseURL};S.type==="main"?(U.request_type="media",U.request_current_level=S.level,U.request_video_width=(i.levels[S.level]||{}).width,U.request_video_height=(i.levels[S.level]||{}).height,U.request_labeled_bitrate=(i.levels[S.level]||{}).bitrate):U.request_type=S.type,o("requestcompleted",U)};i.on(a.Events.FRAG_LOADED,p);var h=function(g,y){var T=y.frag,_=T.start,S=s(T),C={currentFragmentPDT:S,currentFragmentStart:n(_)};o("fragmentchange",C)};i.on(a.Events.FRAG_CHANGED,h);var c=function(g,y){var T=y.type,_=y.details,S=y.response,C=y.fatal,O=y.frag,$=y.networkDetails,Y=O?.url||y.url||"",J=$?ur($):void 0;if((_===a.ErrorDetails.MANIFEST_LOAD_ERROR||_===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||_===a.ErrorDetails.FRAG_LOAD_ERROR||_===a.ErrorDetails.FRAG_LOAD_TIMEOUT||_===a.ErrorDetails.LEVEL_LOAD_ERROR||_===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||_===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||_===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||_===a.ErrorDetails.SUBTITLE_LOAD_ERROR||_===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||_===a.ErrorDetails.KEY_LOAD_ERROR||_===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:_,request_url:Y,request_hostname:_t(Y),request_id:J?Js(J):void 0,request_type:_===a.ErrorDetails.FRAG_LOAD_ERROR||_===a.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":_===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||_===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":_===a.ErrorDetails.SUBTITLE_LOAD_ERROR||_===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":_===a.ErrorDetails.KEY_LOAD_ERROR||_===a.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:S?.code,request_error_text:S?.text}),C){var K,U="".concat(Y?"url: ".concat(Y,`
4
+ `):"")+"".concat(S&&(S.code||S.text)?"response: ".concat(S.code,", ").concat(S.text,`
5
+ `):"")+"".concat(y.reason?"failure reason: ".concat(y.reason,`
6
+ `):"")+"".concat(y.level?"level: ".concat(y.level,`
7
+ `):"")+"".concat(y.parent?"parent stream controller: ".concat(y.parent,`
8
+ `):"")+"".concat(y.buffer?"buffer length: ".concat(y.buffer,`
9
+ `):"")+"".concat(y.error?"error: ".concat(y.error,`
10
+ `):"")+"".concat(y.event?"event: ".concat(y.event,`
11
+ `):"")+"".concat(y.err?"error message: ".concat((K=y.err)===null||K===void 0?void 0:K.message,`
12
+ `):"");o("error",{player_error_code:T,player_error_message:_,player_error_context:U})}};i.on(a.Events.ERROR,c);var v=function(g,y){var T=y.frag,_=T&&T._url||"";o("requestcanceled",{request_event_type:g,request_url:_,request_type:"media",request_hostname:_t(_)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v);var E=function(g,y){var T=y.level,_=i.levels[T];if(_&&_.attrs&&_.attrs.BANDWIDTH){var S=_.attrs.BANDWIDTH,C,O=parseFloat(_.attrs["FRAME-RATE"]);isNaN(O)||(C=O),S?o("renditionchange",{video_source_fps:C,video_source_bitrate:S,video_source_width:_.width,video_source_height:_.height,video_source_rendition_name:_.name,video_source_codec:_?.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(a.Events.LEVEL_SWITCHED,E),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,m),i.off(a.Events.FRAG_LOADED,p),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,c),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v),i.off(a.Events.LEVEL_SWITCHED,E),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},qf=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},_c=function(t,e){if(!t||!t.requestEndDate)return{};var i=_t(t.url),a=t.url,r=t.bytesLoaded,n=new Date(t.requestStartDate).getTime(),s=new Date(t.firstByteDate).getTime(),o=new Date(t.requestEndDate).getTime(),l=isNaN(t.duration)?0:t.duration,d=typeof e.getMetricsFor=="function"?e.getMetricsFor(t.mediaType).HttpList:e.getDashMetrics().getHttpRequests(t.mediaType),m;d.length>0&&(m=Pd(d[d.length-1]._responseHeaders||""));var p=m?Js(m):void 0;return{requestStart:n,requestResponseStart:s,requestResponseEnd:o,requestBytesLoaded:r,requestResponseHeaders:m,requestMediaDuration:l,requestHostname:i,requestUrl:a,requestId:p}},Yf=function(t,e){var i=e.getQualityFor(t),a=e.getCurrentTrackFor(t).bitrateList;return a?{currentLevel:i,renditionWidth:a[i].width||null,renditionHeight:a[i].height||null,renditionBitrate:a[i].bandwidth}:{}},Gf=function(t){var e;return(e=t.match(/.*codecs\*?="(.*)"/))===null||e===void 0?void 0:e[1]},Qf=function(t){try{var e,i,a=(i=t.getVersion)===null||i===void 0||(e=i.call(t))===null||e===void 0?void 0:e.split(".").map(function(r){return parseInt(r)})[0];return a}catch{return!1}},zf=function(t,e,i){var a=t.log;if(!i||!i.on){a.warn("Invalid dash.js player reference. Monitoring blocked.");return}var r=Qf(i),n=function(T,_){return t.emit(e,T,_)},s=function(T){var _=T.type,S=T.data,C=(S||{}).url;n("requestcompleted",{request_event_type:_,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:_t(C),request_url:C})};i.on("manifestLoaded",s);var o={},l=function(T){if(typeof T.getRequests!="function")return null;var _=T.getRequests({state:"executed"});return _.length===0?null:_[_.length-1]},d=function(T){var _=T.type,S=T.fragmentModel,C=T.chunk,O=l(S);m({type:_,request:O,chunk:C})},m=function(T){var _=T.type,S=T.chunk,C=T.request,O=(S||{}).mediaInfo,$=O||{},Y=$.type,J=$.bitrateList;J=J||[];var K={};J.forEach(function(Ve,ke){K[ke]={},K[ke].width=Ve.width,K[ke].height=Ve.height,K[ke].bitrate=Ve.bandwidth,K[ke].attrs={}}),Y==="video"?o.video=K:Y==="audio"?o.audio=K:o.media=K;var U=_c(C,i),Me=U.requestStart,Fe=U.requestResponseStart,Ke=U.requestResponseEnd,he=U.requestResponseHeaders,Pe=U.requestMediaDuration,Tt=U.requestHostname,Ue=U.requestUrl,lt=U.requestId;n("requestcompleted",{request_event_type:_,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_bytes_loaded:-1,request_type:Y+"_init",request_response_headers:he,request_hostname:Tt,request_id:lt,request_url:Ue,request_media_duration:Pe,request_rendition_lists:o})};r>=4?i.on("initFragmentLoaded",m):i.on("initFragmentLoaded",d);var p=function(T){var _=T.type,S=T.fragmentModel,C=T.chunk,O=l(S);h({type:_,request:O,chunk:C})},h=function(T){var _=T.type,S=T.chunk,C=T.request,O=S||{},$=O.mediaInfo,Y=O.start,J=$||{},K=J.type,U=_c(C,i),Me=U.requestStart,Fe=U.requestResponseStart,Ke=U.requestResponseEnd,he=U.requestBytesLoaded,Pe=U.requestResponseHeaders,Tt=U.requestMediaDuration,Ue=U.requestHostname,lt=U.requestUrl,Ve=U.requestId,ke=Yf(K,i),xe=ke.currentLevel,et=ke.renditionWidth,na=ke.renditionHeight,gn=ke.renditionBitrate;n("requestcompleted",{request_event_type:_,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_bytes_loaded:he,request_type:K,request_response_headers:Pe,request_hostname:Ue,request_id:Ve,request_url:lt,request_media_start_time:Y,request_media_duration:Tt,request_current_level:xe,request_labeled_bitrate:gn,request_video_width:et,request_video_height:na})};r>=4?i.on("mediaFragmentLoaded",h):i.on("mediaFragmentLoaded",p);var c={video:void 0,audio:void 0,totalBitrate:void 0},v=function(){if(c.video&&typeof c.video.bitrate=="number"){if(!(c.video.width&&c.video.height)){a.warn("have bitrate info for video but missing width/height");return}var T=c.video.bitrate;if(c.audio&&typeof c.audio.bitrate=="number"&&(T+=c.audio.bitrate),T!==c.totalBitrate)return c.totalBitrate=T,{video_source_bitrate:T,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:Gf(c.video.codec)}}},E=function(T,_,S){if(typeof T.newQuality!="number"){a.warn("missing evt.newQuality in qualityChangeRendered event",T);return}var C=T.mediaType;if(C==="audio"||C==="video"){var O=i.getBitrateInfoListFor(C).find(function(Y){var J=Y.qualityIndex;return J===T.newQuality});if(!(O&&typeof O.bitrate=="number")){a.warn("missing bitrate info for ".concat(C));return}c[C]=Nd(Xs({},O),{codec:i.getCurrentTrackFor(C).codec});var $=v();$&&n("renditionchange",$)}};i.on("qualityChangeRendered",E);var g=function(T){var _=T.request,S=T.mediaType;_=_||{},n("requestcanceled",{request_event_type:_.type+"_"+_.action,request_url:_.url,request_type:S,request_hostname:_t(_.url)})};i.on("fragmentLoadingAbandoned",g);var y=function(T){var _=T.error,S,C,O=(_==null||(S=_.data)===null||S===void 0?void 0:S.request)||{},$=(_==null||(C=_.data)===null||C===void 0?void 0:C.response)||{};_?.code===27&&n("requestfailed",{request_error:O.type+"_"+O.action,request_url:O.url,request_hostname:_t(O.url),request_type:O.mediaType,request_error_code:$.status,request_error_text:$.statusText});var Y="".concat(O!=null&&O.url?"url: ".concat(O.url,`
13
+ `):"")+"".concat($!=null&&$.status||$!=null&&$.statusText?"response: ".concat($?.status,", ").concat($?.statusText,`
14
+ `):"");n("error",{player_error_code:_?.code,player_error_message:_?.message,player_error_context:Y})};i.on("error",y),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",m),i.off("mediaFragmentLoaded",h),i.off("qualityChangeRendered",E),i.off("error",y),i.off("fragmentLoadingAbandoned",g),delete i._stopMuxMonitor}},Zf=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},bc=0,jf=(function(){function t(){Re(this,t),w(this,"_listeners",void 0)}return Yt(t,[{key:"on",value:function(e,i,a){return i._eventEmitterGuid=i._eventEmitterGuid||++bc,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],a&&(i=i.bind(a)),this._listeners[e].push(i),i}},{key:"off",value:function(e,i){var a=this._listeners&&this._listeners[e];a&&a.forEach(function(r,n){r._eventEmitterGuid===i._eventEmitterGuid&&a.splice(n,1)})}},{key:"one",value:function(e,i,a){var r=this;i._eventEmitterGuid=i._eventEmitterGuid||++bc;var n=function(){r.off(e,n),i.apply(a||this,arguments)};n._eventEmitterGuid=i._eventEmitterGuid,this.on(e,n)}},{key:"emit",value:function(e,i){var a=this;if(this._listeners){i=i||{};var r=this._listeners["before*"]||[],n=this._listeners[e]||[],s=this._listeners["after"+e]||[],o=function(l,d){l=l.slice(),l.forEach(function(m){m.call(a,{type:e},d)})};o(r,i),o(n,i),o(s,i)}}}]),t})(),Xf=jf,Zo=Xe(yt()),Jf=(function(){function t(e){var i=this;Re(this,t),w(this,"_playbackHeartbeatInterval",void 0),w(this,"_playheadShouldBeProgressing",void 0),w(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",function(){i._playheadShouldBeProgressing=!0}),e.on("play",this._startPlaybackHeartbeatInterval.bind(this)),e.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),e.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),e.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("seeked",function(){e.data.player_is_paused?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),e.on("timeupdate",function(){i._playbackHeartbeatInterval!==null&&e.emit("playbackheartbeat")}),e.on("devicesleep",function(a,r){i._playbackHeartbeatInterval!==null&&(Zo.default.clearInterval(i._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:r.viewer_time}),i._playbackHeartbeatInterval=null)})}return Yt(t,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Zo.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(Zo.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),t})(),eE=Jf,tE=function t(e){var i=this;Re(this,t),w(this,"viewErrored",void 0),e.on("viewinit",function(){i.viewErrored=!1}),e.on("error",function(a,r){try{var n=e.errorTranslator({player_error_code:r.player_error_code,player_error_message:r.player_error_message,player_error_context:r.player_error_context,player_error_severity:r.player_error_severity,player_error_business_exception:r.player_error_business_exception});n&&(e.data.player_error_code=n.player_error_code||r.player_error_code,e.data.player_error_message=n.player_error_message||r.player_error_message,e.data.player_error_context=n.player_error_context||r.player_error_context,e.data.player_error_severity=n.player_error_severity||r.player_error_severity,e.data.player_error_business_exception=n.player_error_business_exception||r.player_error_business_exception,i.viewErrored=!0)}catch(s){e.mux.log.warn("Exception in error translator callback.",s),i.viewErrored=!0}}),e.on("aftererror",function(){var a,r,n,s,o;(a=e.data)===null||a===void 0||delete a.player_error_code,(r=e.data)===null||r===void 0||delete r.player_error_message,(n=e.data)===null||n===void 0||delete n.player_error_context,(s=e.data)===null||s===void 0||delete s.player_error_severity,(o=e.data)===null||o===void 0||delete o.player_error_business_exception})},iE=tE,aE=(function(){function t(e){Re(this,t),w(this,"_watchTimeTrackerLastCheckedTime",void 0),w(this,"pm",void 0),this.pm=e,this._watchTimeTrackerLastCheckedTime=null,e.on("playbackheartbeat",this._updateWatchTime.bind(this)),e.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return Yt(t,[{key:"_updateWatchTime",value:function(e,i){var a=i.viewer_time;this._watchTimeTrackerLastCheckedTime===null&&(this._watchTimeTrackerLastCheckedTime=a),_e(this.pm.data,"view_watch_time",a-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=a}},{key:"_clearWatchTimeState",value:function(e,i){this._updateWatchTime(e,i),this._watchTimeTrackerLastCheckedTime=null}}]),t})(),rE=aE,nE=(function(){function t(e){var i=this;Re(this,t),w(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),w(this,"_lastTime",void 0),w(this,"_isAdPlaying",void 0),w(this,"_callbackUpdatePlaybackTime",void 0),w(this,"pm",void 0),this.pm=e,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=be.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null;var a=this._startPlaybackTimeTracking.bind(this);e.on("playing",a),e.on("adplaying",a),e.on("seeked",a);var r=this._stopPlaybackTimeTracking.bind(this);e.on("playbackheartbeatend",r),e.on("seeking",r),e.on("adplaying",function(){i._isAdPlaying=!0}),e.on("adended",function(){i._isAdPlaying=!1}),e.on("adpause",function(){i._isAdPlaying=!1}),e.on("adbreakstart",function(){i._isAdPlaying=!1}),e.on("adbreakend",function(){i._isAdPlaying=!1}),e.on("adplay",function(){i._isAdPlaying=!1}),e.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=be.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return Yt(t,[{key:"_startPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime===null&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time,i=be.now(),a=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?a=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(a=i-this._lastTime),a>0&&a<=1e3&&_e(this.pm.data,"view_content_playback_time",a),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=i}}]),t})(),sE=nE,oE=(function(){function t(e){Re(this,t),w(this,"pm",void 0),this.pm=e;var i=this._updatePlayheadTime.bind(this);e.on("playbackheartbeat",i),e.on("playbackheartbeatend",i),e.on("timeupdate",i),e.on("destroy",function(){e.off("timeupdate",i)})}return Yt(t,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=typeof this.pm.data.view_max_playhead_position>"u"?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,i){var a=this,r=function(){a.pm.currentFragmentPDT&&a.pm.currentFragmentStart&&(a.pm.data.player_program_time=a.pm.currentFragmentPDT+a.pm.data.player_playhead_time-a.pm.currentFragmentStart)};if(i&&i.player_playhead_time)this.pm.data.player_playhead_time=i.player_playhead_time,r(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var n=this.pm.getPlayheadTime();typeof n<"u"&&(this.pm.data.player_playhead_time=n,r(),this._updateMaxPlayheadPosition())}}}]),t})(),lE=oE,gc=300*1e3,dE=function t(e){if(Re(this,t),!e.disableRebufferTracking){var i,a=function(n,s){r(s),i=void 0},r=function(n){if(i){var s=n.viewer_time-i;_e(e.data,"view_rebuffer_duration",s),i=n.viewer_time,e.data.view_rebuffer_duration>gc&&(e.emit("viewend"),e.send("viewend"),e.mux.log.warn("Ending view after rebuffering for longer than ".concat(gc,"ms, future events will be ignored unless a programchange or videochange occurs.")))}e.data.view_watch_time>=0&&e.data.view_rebuffer_count>0&&(e.data.view_rebuffer_frequency=e.data.view_rebuffer_count/e.data.view_watch_time,e.data.view_rebuffer_percentage=e.data.view_rebuffer_duration/e.data.view_watch_time)};e.on("playbackheartbeat",function(n,s){return r(s)}),e.on("rebufferstart",function(n,s){i||(_e(e.data,"view_rebuffer_count",1),i=s.viewer_time,e.one("rebufferend",a))}),e.on("viewinit",function(){i=void 0,e.off("rebufferend",a)})}},uE=dE,cE=(function(){function t(e){var i=this;Re(this,t),w(this,"_lastCheckedTime",void 0),w(this,"_lastPlayheadTime",void 0),w(this,"_lastPlayheadTimeUpdatedTime",void 0),w(this,"_rebuffering",void 0),w(this,"pm",void 0),this.pm=e,!(e.disableRebufferTracking||e.disablePlayheadRebufferTracking)&&(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,e.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),e.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),e.on("seeking",function(){i._cleanupRebufferTracker(null,{viewer_time:be.now()})}))}return Yt(t,[{key:"_checkIfRebuffering",value:function(e,i){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing){this._cleanupRebufferTracker(e,i);return}if(this._lastCheckedTime===null){this._prepareRebufferTrackerState(i.viewer_time);return}if(this._lastPlayheadTime!==this.pm.data.player_playhead_time){this._cleanupRebufferTracker(e,i,!0);return}var a=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.sustainedRebufferThreshold=="number"&&a>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=i.viewer_time}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:i.viewer_time});else{if(this._lastCheckedTime===null)return;var r=this.pm.data.player_playhead_time-this._lastPlayheadTime,n=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.minimumRebufferDuration=="number"&&r>0&&n-r>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+n-r}))}a?this._prepareRebufferTrackerState(i.viewer_time):this._clearRebufferTrackerState()}}]),t})(),hE=cE,mE=(function(){function t(e){var i=this;Re(this,t),w(this,"NAVIGATION_START",void 0),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){var a=e.data,r=a.view_id;if(!a.view_program_changed){var n=function(s,o){var l=o.viewer_time;(s.type==="playing"&&typeof e.data.view_time_to_first_frame>"u"||s.type==="adplaying"&&(typeof e.data.view_time_to_first_frame>"u"||i._inPrerollPosition()))&&i.calculateTimeToFirstFrame(l||be.now(),r)};e.one("playing",n),e.one("adplaying",n),e.one("viewend",function(){e.off("playing",n),e.off("adplaying",n)})}})}return Yt(t,[{key:"_inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,i){i===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.NAVIGATION_START&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.NAVIGATION_START))}}]),t})(),pE=mE,vE=function t(e){var i=this;Re(this,t),w(this,"_lastPlayerHeight",void 0),w(this,"_lastPlayerWidth",void 0),w(this,"_lastPlayheadPosition",void 0),w(this,"_lastSourceHeight",void 0),w(this,"_lastSourceWidth",void 0),e.on("viewinit",function(){i._lastPlayheadPosition=-1});var a=["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend"],r=["playing","hb","renditionchange","orientationchange"];a.forEach(function(n){e.on(n,function(){if(i._lastPlayheadPosition>=0&&e.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var s=e.data.player_playhead_time-i._lastPlayheadPosition;if(s<0){i._lastPlayheadPosition=-1;return}var o=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),l=Math.max(0,o-1),d=Math.max(0,1-o);e.data.view_max_upscale_percentage=Math.max(e.data.view_max_upscale_percentage||0,l),e.data.view_max_downscale_percentage=Math.max(e.data.view_max_downscale_percentage||0,d),_e(e.data,"view_total_content_playback_time",s),_e(e.data,"view_total_upscaling",l*s),_e(e.data,"view_total_downscaling",d*s)}i._lastPlayheadPosition=-1})}),r.forEach(function(n){e.on(n,function(){i._lastPlayheadPosition=e.data.player_playhead_time,i._lastPlayerWidth=e.data.player_width,i._lastPlayerHeight=e.data.player_height,i._lastSourceWidth=e.data.video_source_width,i._lastSourceHeight=e.data.video_source_height})})},fE=vE,EE=2e3,_E=function t(e){var i=this;Re(this,t),w(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var n=be.now(),s=(e.data.viewer_time||n)-(a||n);_e(e.data,"view_seek_duration",s),e.data.view_max_seek_time=Math.max(e.data.view_max_seek_time||0,s),i.isSeeking=!1,a=-1};e.on("seeking",function(n,s){if(Object.assign(e.data,s),i.isSeeking&&s.viewer_time-a<=EE){a=s.viewer_time;return}i.isSeeking&&r(),i.isSeeking=!0,a=s.viewer_time,_e(e.data,"view_seek_count",1),e.send("seeking")}),e.on("seeked",function(){r()}),e.on("viewend",function(){i.isSeeking&&(r(),e.send("seeked")),i.isSeeking=!1,a=-1})},bE=_E,yc=function(t,e){t.push(e),t.sort(function(i,a){return i.viewer_time-a.viewer_time})},gE=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],yE=(function(){function t(e){var i=this;Re(this,t),w(this,"_adHasPlayed",void 0),w(this,"_adRequests",void 0),w(this,"_adResponses",void 0),w(this,"_currentAdRequestNumber",void 0),w(this,"_currentAdResponseNumber",void 0),w(this,"_prerollPlayTime",void 0),w(this,"_wouldBeNewAdPlay",void 0),w(this,"isAdBreak",void 0),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){i.isAdBreak=!1,i._currentAdRequestNumber=0,i._currentAdResponseNumber=0,i._adRequests=[],i._adResponses=[],i._adHasPlayed=!1,i._wouldBeNewAdPlay=!0,i._prerollPlayTime=void 0}),gE.forEach(function(r){return e.on(r,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};e.on("adbreakstart",function(){i.isAdBreak=!0}),e.on("play",a),e.on("playing",a),e.on("viewend",a),e.on("adrequest",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},n),yc(i._adRequests,n),_e(e.data,"view_ad_request_count"),i.inPrerollPosition()&&(e.data.view_preroll_requested=!0,i._adHasPlayed||_e(e.data,"view_preroll_request_count"))}),e.on("adresponse",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},n),yc(i._adResponses,n);var s=i.findAdRequest(n.ad_request_id);s&&_e(e.data,"view_ad_request_time",Math.max(0,n.viewer_time-s.viewer_time))}),e.on("adplay",function(r,n){i._adHasPlayed=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,_e(e.data,"view_ad_played_count")),i.inPrerollPosition()&&!e.data.view_preroll_played&&(e.data.view_preroll_played=!0,i._adRequests.length>0&&(e.data.view_preroll_request_time=Math.max(0,n.viewer_time-i._adRequests[0].viewer_time)),e.data.view_start&&(e.data.view_startup_preroll_request_time=Math.max(0,n.viewer_time-e.data.view_start)),i._prerollPlayTime=n.viewer_time)}),e.on("adplaying",function(r,n){i.inPrerollPosition()&&typeof e.data.view_preroll_load_time>"u"&&typeof i._prerollPlayTime<"u"&&(e.data.view_preroll_load_time=n.viewer_time-i._prerollPlayTime,e.data.view_startup_preroll_load_time=n.viewer_time-i._prerollPlayTime)}),e.on("adclicked",function(r,n){i._wouldBeNewAdPlay||_e(e.data,"view_ad_clicked_count")}),e.on("adskipped",function(r,n){i._wouldBeNewAdPlay||_e(e.data,"view_ad_skipped_count")}),e.on("adended",function(){i._wouldBeNewAdPlay=!0}),e.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return Yt(t,[{key:"inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var i=0;i<this._adRequests.length;i++)if(this._adRequests[i].ad_request_id===e)return this._adRequests[i]}},{key:"_updateAdData",value:function(e,i){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&i.ad_tag_url){var a=ai(rn(i.ad_tag_url),2),r=a[0],n=a[1];this.pm.data.view_preroll_ad_tag_domain=n,this.pm.data.view_preroll_ad_tag_hostname=r}if(!this.pm.data.view_preroll_ad_asset_hostname&&i.ad_asset_url){var s=ai(rn(i.ad_asset_url),2),o=s[0],l=s[1];this.pm.data.view_preroll_ad_asset_domain=l,this.pm.data.view_preroll_ad_asset_hostname=o}}this.pm.data.ad_asset_url=i?.ad_asset_url,this.pm.data.ad_tag_url=i?.ad_tag_url,this.pm.data.ad_creative_id=i?.ad_creative_id,this.pm.data.ad_id=i?.ad_id,this.pm.data.ad_universal_id=i?.ad_universal_id}}]),t})(),TE=yE,Tc=Xe(yt()),AE=function t(e){Re(this,t);var i,a,r=function(){e.disableRebufferTracking||(_e(e.data,"view_waiting_rebuffer_count",1),i=be.now(),a=Tc.default.setInterval(function(){if(i){var d=be.now();_e(e.data,"view_waiting_rebuffer_duration",d-i),i=d}},250))},n=function(){e.disableRebufferTracking||i&&(_e(e.data,"view_waiting_rebuffer_duration",be.now()-i),i=!1,Tc.default.clearInterval(a))},s=!1,o=function(){s=!0},l=function(){s=!1,n()};e.on("waiting",function(){s&&r()}),e.on("playing",function(){n(),o()}),e.on("pause",l),e.on("seeking",l)},kE=AE,SE=function t(e){var i=this;Re(this,t),w(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=be.now(),e.on("before*",r)},r=function(n){var s=be.now(),o=i.lastWallClockTime;i.lastWallClockTime=s,s-o>3e4&&(e.emit("devicesleep",{viewer_time:o}),Object.assign(e.data,{viewer_time:o}),e.send("devicesleep"),e.emit("devicewake",{viewer_time:s}),Object.assign(e.data,{viewer_time:s}),e.send("devicewake"))};e.one("playbackheartbeat",a),e.on("playbackheartbeatend",function(){e.off("before*",r),e.one("playbackheartbeat",a)})},wE=SE,jo=Xe(yt()),cm=(function(t){return t()})(function(){var t=function(){for(var i=0,a={};i<arguments.length;i++){var r=arguments[i];for(var n in r)a[n]=r[n]}return a};function e(i){function a(r,n,s){var o;if(typeof document<"u"){if(arguments.length>1){if(s=t({path:"/"},a.defaults,s),typeof s.expires=="number"){var l=new Date;l.setMilliseconds(l.getMilliseconds()+s.expires*864e5),s.expires=l}try{o=JSON.stringify(n),/^[\{\[]/.test(o)&&(n=o)}catch{}return i.write?n=i.write(n,r):n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),r=encodeURIComponent(String(r)),r=r.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),r=r.replace(/[\(\)]/g,escape),document.cookie=[r,"=",n,s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}r||(o={});for(var d=document.cookie?document.cookie.split("; "):[],m=/(%[0-9A-Z]{2})+/g,p=0;p<d.length;p++){var h=d[p].split("="),c=h.slice(1).join("=");c.charAt(0)==='"'&&(c=c.slice(1,-1));try{var v=h[0].replace(m,decodeURIComponent);if(c=i.read?i.read(c,v):i(c,v)||c.replace(m,decodeURIComponent),this.json)try{c=JSON.parse(c)}catch{}if(r===v){o=c;break}r||(o[v]=c)}catch{}}return o}}return a.set=a,a.get=function(r){return a.call(a,r)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(r,n){a(r,"",t(n,{expires:-1}))},a.withConverter=e,a}return e(function(){})}),hm="muxData",IE=function(t){return Object.entries(t).map(function(e){var i=ai(e,2),a=i[0],r=i[1];return"".concat(a,"=").concat(r)}).join("&")},RE=function(t){return t.split("&").reduce(function(e,i){var a=ai(i.split("="),2),r=a[0],n=a[1],s=+n,o=n&&s==n?s:n;return e[r]=o,e},{})},mm=function(){var t;try{t=RE(cm.get(hm)||"")}catch{t={}}return t},pm=function(t){try{cm.set(hm,IE(t),{expires:365})}catch{}},CE=function(){var t=mm();return t.mux_viewer_id=t.mux_viewer_id||an(),t.msn=t.msn||Math.random(),pm(t),{mux_viewer_id:t.mux_viewer_id,mux_sample_number:t.msn}},LE=function(){var t=mm(),e=be.now();return t.session_start&&(t.sst=t.session_start,delete t.session_start),t.session_id&&(t.sid=t.session_id,delete t.session_id),t.session_expires&&(t.sex=t.session_expires,delete t.session_expires),(!t.sex||t.sex<e)&&(t.sid=an(),t.sst=e),t.sex=e+1500*1e3,pm(t),{session_id:t.sid,session_start:t.sst,session_expires:t.sex}};function DE(t,e){var i=e.beaconCollectionDomain,a=e.beaconDomain;if(i)return"https://"+i;t=t||"inferred";var r=a||"litix.io";return t.match(/^[a-z0-9]+$/)?"https://"+t+"."+r:"https://img.litix.io/a.gif"}var ME=Xe(yt()),vm=function(){var t;switch(fm()){case"cellular":t="cellular";break;case"ethernet":t="wired";break;case"wifi":t="wifi";break;case void 0:break;default:t="other"}return t},fm=function(){var t=ME.default.navigator,e=t&&(t.connection||t.mozConnection||t.webkitConnection);return e&&e.type};vm.getConnectionFromAPI=fm;var xE=vm,OE={a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"},NE=Em(OE),PE={ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cx:"connection",cz:"context",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"},Ac=Em(PE);function Em(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}function yl(t){var e={},i={};return Object.keys(t).forEach(function(a){var r=!1;if(t.hasOwnProperty(a)&&t[a]!==void 0){var n=a.split("_"),s=n[0],o=NE[s];o||(ee.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(l){l==="url"&&(r=!0),Ac[l]?o+=Ac[l]:Number.isInteger(Number(l))?o+=l:(ee.info("Data key word `"+l+"` not expected in "+a),o+="_"+l+"_")}),r?i[o]=t[a]:e[o]=t[a]}}),Object.assign(e,i)}var Ki=Xe(yt()),UE=Xe(sm()),$E={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},HE=56*1024,BE=["hb","requestcompleted","requestfailed","requestcanceled"],WE="https://img.litix.io",ni=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._beaconUrl=t||WE,this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},$E,e)};ni.prototype.queueEvent=function(t,e){var i=Object.assign({},e);return this._eventQueue.length<=this._options.maxQueueLength||t==="eventrateexceeded"?(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength):!1};ni.prototype.flushEvents=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(t&&this._eventQueue.length===1){this._eventQueue.pop();return}this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending()};ni.prototype.destroy=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.destroyed=!0,t?this._clearBeaconQueue():this.flushEvents(),Ki.default.clearTimeout(this._sendTimeout)};ni.prototype._clearBeaconQueue=function(){var t=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,e=this._eventQueue.slice(t);t>0&&Object.assign(e[e.length-1],yl({mux_view_message:"event queue truncated"}));var i=this._createPayload(e);_m(this._beaconUrl,i,!0,function(){})};ni.prototype._sendBeaconQueue=function(){var t=this;if(this._postInFlight){this._resendAfterPost=!0;return}var e=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(e),a=be.now();_m(this._beaconUrl,i,!1,function(r,n){n?(t._eventQueue=e.concat(t._eventQueue),t._failureCount+=1,ee.info("Error sending beacon: "+n)):t._failureCount=0,t._roundTripTime=be.now()-a,t._postInFlight=!1,t._resendAfterPost&&(t._resendAfterPost=!1,t._eventQueue.length>0&&t._sendBeaconQueue())})};ni.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var t=Math.pow(2,this._failureCount-1);return t=t*Math.random(),(1+t)*this._options.baseTimeBetweenBeacons};ni.prototype._startBeaconSending=function(){var t=this;Ki.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=Ki.default.setTimeout(function(){t._eventQueue.length&&t._sendBeaconQueue(),t._startBeaconSending()},this._getNextBeaconTime()))};ni.prototype._createPayload=function(t){var e=this,i={transmission_timestamp:Math.round(be.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){a=JSON.stringify({metadata:i,events:r||t}),n=a.length/1024},o=function(){return n<=e._options.maxPayloadKBSize};return s(),o()||(ee.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=t.filter(function(l){return BE.indexOf(l.e)===-1}),s()),o()||(ee.info("Payload size still too big ("+n+" kb). Cropping fields.."),r.forEach(function(l){for(var d in l){var m=l[d],p=50*1024;typeof m=="string"&&m.length>p&&(l[d]=m.substring(0,p))}}),s()),a};var FE=typeof UE.default.exitPictureInPicture=="function"?function(t){return t.length<=HE}:function(t){return!1},_m=function(t,e,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(t,e)){a();return}if(Ki.default.fetch){Ki.default.fetch(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},keepalive:FE(e)}).then(function(n){return a(null,n.ok?null:"Error")}).catch(function(n){return a(null,n)});return}if(Ki.default.XMLHttpRequest){var r=new Ki.default.XMLHttpRequest;r.onreadystatechange=function(){if(r.readyState===4)return a(null,r.status!==200?"error":void 0)},r.open("POST",t),r.setRequestHeader("Content-Type","text/plain"),r.send(e);return}a()},KE=ni,VE=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception"],qE=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],YE=["ad_id","ad_creative_id","ad_universal_id"],GE=["viewstart","error","ended","viewend"],QE=600*1e3,zE=(function(){function t(e,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Re(this,t);var r,n,s,o,l,d,m,p,h,c,v,E;w(this,"mux",void 0),w(this,"envKey",void 0),w(this,"options",void 0),w(this,"eventQueue",void 0),w(this,"sampleRate",void 0),w(this,"disableCookies",void 0),w(this,"respectDoNotTrack",void 0),w(this,"previousBeaconData",void 0),w(this,"lastEventTime",void 0),w(this,"rateLimited",void 0),w(this,"pageLevelData",void 0),w(this,"viewerData",void 0),this.mux=e,this.envKey=i,this.options=a,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new KE(DE(this.envKey,this.options));var g;this.sampleRate=(g=this.options.sampleRate)!==null&&g!==void 0?g:1;var y;this.disableCookies=(y=this.options.disableCookies)!==null&&y!==void 0?y:!1;var T;this.respectDoNotTrack=(T=this.options.respectDoNotTrack)!==null&&T!==void 0?T:!1,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:(r=this.options.platform)===null||r===void 0?void 0:r.name,viewer_application_version:(n=this.options.platform)===null||n===void 0?void 0:n.version,viewer_application_engine:(s=this.options.platform)===null||s===void 0?void 0:s.layout,viewer_device_name:(o=this.options.platform)===null||o===void 0?void 0:o.product,viewer_device_category:"",viewer_device_manufacturer:(l=this.options.platform)===null||l===void 0?void 0:l.manufacturer,viewer_os_family:(m=this.options.platform)===null||m===void 0||(d=m.os)===null||d===void 0?void 0:d.family,viewer_os_architecture:(h=this.options.platform)===null||h===void 0||(p=h.os)===null||p===void 0?void 0:p.architecture,viewer_os_version:(v=this.options.platform)===null||v===void 0||(c=v.os)===null||c===void 0?void 0:c.version,viewer_connection_type:xE(),page_url:jo.default===null||jo.default===void 0||(E=jo.default.location)===null||E===void 0?void 0:E.href},this.viewerData=this.disableCookies?{}:CE()}return Yt(t,[{key:"send",value:function(e,i){if(!(!e||!(i!=null&&i.view_id))){if(this.respectDoNotTrack&&bl())return ee.info("Not sending `"+e+"` because Do Not Track is enabled");if(!i||typeof i!="object")return ee.error("A data object was expected in send() but was not provided");var a=this.disableCookies?{}:LE(),r=Nd(Xs({},this.pageLevelData,i,a,this.viewerData),{event:e,env_key:this.envKey});r.user_id&&(r.viewer_user_id=r.user_id,delete r.user_id);var n,s=((n=r.mux_sample_number)!==null&&n!==void 0?n:0)>=this.sampleRate,o=this._deduplicateBeaconData(e,r),l=yl(o);if(this.lastEventTime=this.mux.utils.now(),s)return ee.info("Not sending event due to sample rate restriction",e,r,l);if(this.envKey||ee.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,r,l),!this.rateLimited){if(ee.info("Sending event",e,r,l),this.rateLimited=!this.eventQueue.queueEvent(e,l),this.mux.WINDOW_UNLOADING&&e==="viewend")this.eventQueue.destroy(!0);else if(this.mux.WINDOW_HIDDEN&&e==="hb"?this.eventQueue.flushEvents(!0):GE.indexOf(e)>=0&&this.eventQueue.flushEvents(),this.rateLimited)return r.event="eventrateexceeded",l=yl(r),this.eventQueue.queueEvent(r.event,l),ee.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,i){var a=this,r={},n=i.view_id;if(n==="-1"||e==="viewstart"||e==="viewend"||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=QE)r=Xs({},i),n&&(this.previousBeaconData=r),n&&e==="viewend"&&(this.previousBeaconData=null);else{var s=e.indexOf("request")===0;Object.entries(i).forEach(function(o){var l=ai(o,2),d=l[0],m=l[1];a.previousBeaconData&&(m!==a.previousBeaconData[d]||VE.indexOf(d)>-1||a.objectHasChanged(s,d,m,a.previousBeaconData[d])||a.eventRequiresKey(e,d))&&(r[d]=m,a.previousBeaconData[d]=m)})}return r}},{key:"objectHasChanged",value:function(e,i,a,r){return!e||i.indexOf("request_")!==0?!1:i==="request_response_headers"||typeof a!="object"||typeof r!="object"?!0:Object.keys(a||{}).length!==Object.keys(r||{}).length}},{key:"eventRequiresKey",value:function(e,i){return!!(e==="renditionchange"&&i.indexOf("video_source_")===0||YE.includes(i)&&qE.includes(e))}}]),t})(),ZE=function t(e){Re(this,t);var i=0,a=0,r=0,n=0,s=0,o=0,l=0,d=function(h,c){var v=c.request_start,E=c.request_response_start,g=c.request_response_end,y=c.request_bytes_loaded;n++;var T,_;if(E?(T=E-(v??0),_=(g??0)-E):_=(g??0)-(v??0),_>0&&y&&y>0){var S=y/_*8e3;s++,a+=y,r+=_,e.data.view_min_request_throughput=Math.min(e.data.view_min_request_throughput||1/0,S),e.data.view_average_request_throughput=a/r*8e3,e.data.view_request_count=n,T>0&&(i+=T,e.data.view_max_request_latency=Math.max(e.data.view_max_request_latency||0,T),e.data.view_average_request_latency=i/s)}},m=function(h,c){n++,o++,e.data.view_request_count=n,e.data.view_request_failed_count=o},p=function(h,c){n++,l++,e.data.view_request_count=n,e.data.view_request_canceled_count=l};e.on("requestcompleted",d),e.on("requestfailed",m),e.on("requestcanceled",p)},jE=ZE,XE=3600*1e3,JE=function t(e){var i=this;Re(this,t),w(this,"_lastEventTime",void 0),e.on("before*",function(a,r){var n=r.viewer_time,s=be.now(),o=i._lastEventTime;if(i._lastEventTime=s,o&&s-o>XE){var l=Object.keys(e.data).reduce(function(m,p){return p.indexOf("video_")===0?Object.assign(m,w({},p,e.data[p])):m},{});e.mux.log.info("Received event after at least an hour inactivity, creating a new view");var d=e.playbackHeartbeat._playheadShouldBeProgressing;e._resetView(Object.assign({viewer_time:n},l)),e.playbackHeartbeat._playheadShouldBeProgressing=d,e.playbackHeartbeat._playheadShouldBeProgressing&&a.type!=="play"&&a.type!=="adbreakstart"&&(e.emit("play",{viewer_time:n}),a.type!=="playing"&&e.emit("playing",{viewer_time:n}))}})},e_=JE,t_=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange"],i_=new Set(["requestcompleted","requestfailed","requestcanceled"]),a_=(function(t){Nf(i,t);var e=$f(i);function i(a,r,n){Re(this,i);var s;s=e.call(this),w(N(s),"DOM_CONTENT_LOADED_EVENT_END",void 0),w(N(s),"NAVIGATION_START",void 0),w(N(s),"_destroyed",void 0),w(N(s),"_heartBeatTimeout",void 0),w(N(s),"adTracker",void 0),w(N(s),"dashjs",void 0),w(N(s),"data",void 0),w(N(s),"disablePlayheadRebufferTracking",void 0),w(N(s),"disableRebufferTracking",void 0),w(N(s),"errorTracker",void 0),w(N(s),"errorTranslator",void 0),w(N(s),"emitTranslator",void 0),w(N(s),"getAdData",void 0),w(N(s),"getPlayheadTime",void 0),w(N(s),"getStateData",void 0),w(N(s),"stateDataTranslator",void 0),w(N(s),"hlsjs",void 0),w(N(s),"id",void 0),w(N(s),"longResumeTracker",void 0),w(N(s),"minimumRebufferDuration",void 0),w(N(s),"mux",void 0),w(N(s),"playbackEventDispatcher",void 0),w(N(s),"playbackHeartbeat",void 0),w(N(s),"playbackHeartbeatTime",void 0),w(N(s),"playheadTime",void 0),w(N(s),"seekingTracker",void 0),w(N(s),"sustainedRebufferThreshold",void 0),w(N(s),"watchTimeTracker",void 0),w(N(s),"currentFragmentPDT",void 0),w(N(s),"currentFragmentStart",void 0),s.DOM_CONTENT_LOADED_EVENT_END=js.domContentLoadedEventEnd(),s.NAVIGATION_START=js.navigationStart();var o={debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(h){return h},emitTranslator:function(){for(var h=arguments.length,c=new Array(h),v=0;v<h;v++)c[v]=arguments[v];return c},stateDataTranslator:function(h){return h}};s.mux=a,s.id=r,n!=null&&n.beaconDomain&&s.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),n=Object.assign(o,n),n.data=n.data||{},n.data.property_key&&(n.data.env_key=n.data.property_key,delete n.data.property_key),ee.level=n.debug?Wi.DEBUG:Wi.WARN,s.getPlayheadTime=n.getPlayheadTime,s.getStateData=n.getStateData||function(){return{}},s.getAdData=n.getAdData||function(){},s.minimumRebufferDuration=n.minimumRebufferDuration,s.sustainedRebufferThreshold=n.sustainedRebufferThreshold,s.playbackHeartbeatTime=n.playbackHeartbeatTime,s.disableRebufferTracking=n.disableRebufferTracking,s.disableRebufferTracking&&s.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),s.disablePlayheadRebufferTracking=n.disablePlayheadRebufferTracking,s.errorTranslator=n.errorTranslator,s.emitTranslator=n.emitTranslator,s.stateDataTranslator=n.stateDataTranslator,s.playbackEventDispatcher=new zE(a,n.data.env_key,n),s.data={player_instance_id:an(),mux_sample_rate:n.sampleRate,beacon_domain:n.beaconCollectionDomain||n.beaconDomain},s.data.view_sequence_number=1,s.data.player_sequence_number=1;var l=(function(){typeof this.data.view_start>"u"&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"))}).bind(N(s));if(s.on("viewinit",function(h,c){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,c),this._initializeViewData(),this.one("play",l),this.one("adbreakstart",l)}),s.on("videochange",function(h,c){this._resetView(c)}),s.on("programchange",function(h,c){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(c,{view_program_changed:!0})),l(),this.emit("play"),this.emit("playing")}),s.on("fragmentchange",function(h,c){this.currentFragmentPDT=c.currentFragmentPDT,this.currentFragmentStart=c.currentFragmentStart}),s.on("destroy",s.destroy),typeof window<"u"&&typeof window.addEventListener=="function"&&typeof window.removeEventListener=="function"){var d=function(){var h=typeof s.data.view_start<"u";s.mux.WINDOW_HIDDEN=document.visibilityState==="hidden",h&&s.mux.WINDOW_HIDDEN&&(s.data.player_is_paused||s.emit("hb"))};window.addEventListener("visibilitychange",d,!1);var m=function(h){h.persisted||s.destroy()};window.addEventListener("pagehide",m,!1),s.on("destroy",function(){window.removeEventListener("visibilitychange",d),window.removeEventListener("pagehide",m)})}s.on("playerready",function(h,c){Object.assign(this.data,c)}),t_.forEach(function(h){s.on(h,function(c,v){h.indexOf("ad")!==0&&this._updateStateData(),Object.assign(this.data,v),this._sanitizeData()}),s.on("after"+h,function(){(h!=="error"||this.errorTracker.viewErrored)&&this.send(h)})}),s.on("viewend",function(h,c){Object.assign(s.data,c)});var p=function(h){var c=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=c-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time};return s.one("playerready",p),s.longResumeTracker=new e_(N(s)),s.errorTracker=new iE(N(s)),new wE(N(s)),s.seekingTracker=new bE(N(s)),s.playheadTime=new lE(N(s)),s.playbackHeartbeat=new eE(N(s)),new fE(N(s)),s.watchTimeTracker=new rE(N(s)),new sE(N(s)),s.adTracker=new TE(N(s)),new hE(N(s)),new uE(N(s)),new pE(N(s)),new kE(N(s)),new jE(N(s)),n.hlsjs&&s.addHLSJS(n),n.dashjs&&s.addDashJS(n),s.emit("viewinit",n.data),s}return Yt(i,[{key:"emit",value:function(a,r){var n,s=Object.assign({viewer_time:this.mux.utils.now()},r),o=[a,s];if(this.emitTranslator)try{o=this.emitTranslator(a,s)}catch(l){this.mux.log.warn("Exception in emit translator callback.",l)}o!=null&&o.length&&(n=Fn(ja(i.prototype),"emit",this)).call.apply(n,[this].concat(mt(o)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,typeof this.data.view_start<"u"&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(a){if(this.data.view_id){var r=Object.assign({},this.data),n=["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"];if(r.video_source_is_live===void 0&&(r.player_source_duration===1/0||r.video_source_duration===1/0?r.video_source_is_live=!0:(r.player_source_duration>0||r.video_source_duration>0)&&(r.video_source_is_live=!1)),r.video_source_is_live||n.forEach(function(d){r[d]=void 0}),r.video_source_url=r.video_source_url||r.player_source_url,r.video_source_url){var s=ai(rn(r.video_source_url),2),o=s[0],l=s[1];r.video_source_domain=l,r.video_source_hostname=o}delete r.ad_request_id,this.playbackEventDispatcher.send(a,r),this.data.view_sequence_number++,this.data.player_sequence_number++,i_.has(a)||this._restartHeartBeat(),a==="viewend"&&delete this.data.view_id}}},{key:"_resetView",value:function(a){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",a)}},{key:"_updateStateData",value:function(){var a=this.getStateData();if(typeof this.stateDataTranslator=="function")try{a=this.stateDataTranslator(a)}catch(r){this.mux.log.warn("Exception in stateDataTranslator translator callback.",r)}Object.assign(this.data,a),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var a=this,r=["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"];r.forEach(function(s){var o=parseInt(a.data[s],10);a.data[s]=isNaN(o)?void 0:o});var n=["player_source_url","video_source_url"];n.forEach(function(s){if(a.data[s]){var o=a.data[s].toLowerCase();(o.indexOf("data:")===0||o.indexOf("blob:")===0)&&(a.data[s]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("video_")===0&&delete a.data[r]})}},{key:"_resetViewData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("view_")===0&&delete a.data[r]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var a=this,r=this.data.view_id=an(),n=function(){r===a.data.view_id&&_e(a.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",n):n()}},{key:"_restartHeartBeat",value:function(){var a=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){a.data.player_is_paused||a.emit("hb")},1e4)}},{key:"addHLSJS",value:function(a){if(!a.hlsjs){this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.");return}if(this.hlsjs){this.mux.log.warn("An instance of HLS.js is already being monitored for this player.");return}this.hlsjs=a.hlsjs,Vf(this.mux,this.id,a.hlsjs,{},a.Hls||window.Hls)}},{key:"removeHLSJS",value:function(){this.hlsjs&&(qf(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(a){if(!a.dashjs){this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");return}if(this.dashjs){this.mux.log.warn("An instance of Dash.js is already being monitored for this player.");return}this.dashjs=a.dashjs,zf(this.mux,this.id,a.dashjs)}},{key:"removeDashJS",value:function(){this.dashjs&&(Zf(this.dashjs),this.dashjs=void 0)}}]),i})(Xf),r_=a_,cr=Xe(sm());function n_(){return cr.default&&!!(cr.default.fullscreenElement||cr.default.webkitFullscreenElement||cr.default.mozFullScreenElement||cr.default.msFullscreenElement)}var s_=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],o_={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};function l_(t,e,i){var a=ai(Zs(e),3),r=a[0],n=a[1],s=a[2],o=t.log,l=t.utils.getComputedStyle,d=t.utils.secondsToMs,m={automaticErrorTracking:!0};if(r){if(s!=="video"&&s!=="audio")return o.error("The element of `"+n+"` was not a media element.")}else return o.error("No element was found with the `"+n+"` query selector.");r.mux&&(r.mux.destroy(),delete r.mux,o.warn("Already monitoring this video element, replacing existing event listeners"));var p={getPlayheadTime:function(){return d(r.currentTime)},getStateData:function(){var c,v,E,g=((c=(v=this).getPlayheadTime)===null||c===void 0?void 0:c.call(v))||d(r.currentTime),y=this.hlsjs&&this.hlsjs.url,T=this.dashjs&&typeof this.dashjs.getSource=="function"&&this.dashjs.getSource(),_={player_is_paused:r.paused,player_width:parseInt(l(r,"width")),player_height:parseInt(l(r,"height")),player_autoplay_on:r.autoplay,player_preload_on:r.preload,player_language_code:r.lang,player_is_fullscreen:n_(),video_poster_url:r.poster,video_source_url:y||T||r.currentSrc,video_source_duration:d(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:r==null||(E=r.getVideoPlaybackQuality)===null||E===void 0?void 0:E.call(r).droppedVideoFrames};if(r.getStartDate&&g>0){var S=r.getStartDate();if(S&&typeof S.getTime=="function"&&S.getTime()){var C=S.getTime();if(_.player_program_time=C+g,r.seekable.length>0){var O=C+r.seekable.end(r.seekable.length-1);_.player_live_edge_program_time=O}}}return _}};i=Object.assign(m,i,p),i.data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:t.VERSION},i.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(c,v){t.emit(n,c,v)},r.mux.updateData=function(c){r.mux.emit("hb",c)};var h=function(){o.error("The monitor for this video element has already been destroyed.")};r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(c){r.removeEventListener(c,r.mux.listeners[c],!1)}),delete r.mux.listeners,r.mux.destroy=h,r.mux.swapElement=h,r.mux.emit=h,r.mux.addHLSJS=h,r.mux.addDashJS=h,r.mux.removeHLSJS=h,r.mux.removeDashJS=h,r.mux.updateData=h,r.mux.setEmitTranslator=h,r.mux.setStateDataTranslator=h,r.mux.setGetPlayheadTime=h,r.mux.deleted=!0,t.emit(n,"destroy")},r.mux.swapElement=function(c){var v=ai(Zs(c),3),E=v[0],g=v[1],y=v[2];if(E){if(y!=="video"&&y!=="audio")return t.log.error("The element of `"+g+"` was not a media element.")}else return t.log.error("No element was found with the `"+g+"` query selector.");E.muxId=r.muxId,delete r.muxId,E.mux=E.mux||{},E.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(E.mux.listeners).forEach(function(T){r.removeEventListener(T,E.mux.listeners[T],!1),E.addEventListener(T,E.mux.listeners[T],!1)}),E.mux.swapElement=r.mux.swapElement,E.mux.destroy=r.mux.destroy,delete r.mux,r=E},r.mux.addHLSJS=function(c){t.addHLSJS(n,c)},r.mux.addDashJS=function(c){t.addDashJS(n,c)},r.mux.removeHLSJS=function(){t.removeHLSJS(n)},r.mux.removeDashJS=function(){t.removeDashJS(n)},r.mux.setEmitTranslator=function(c){t.setEmitTranslator(n,c)},r.mux.setStateDataTranslator=function(c){t.setStateDataTranslator(n,c)},r.mux.setGetPlayheadTime=function(c){c||(c=i.getPlayheadTime),t.setGetPlayheadTime(n,c)},t.init(n,i),t.emit(n,"playerready"),r.paused||(t.emit(n,"play"),r.readyState>2&&t.emit(n,"playing")),r.mux.listeners={},s_.forEach(function(c){c==="error"&&!i.automaticErrorTracking||(r.mux.listeners[c]=function(){var v={};if(c==="error"){if(!r.error||r.error.code===1)return;v.player_error_code=r.error.code,v.player_error_message=o_[r.error.code]||r.error.message}t.emit(n,c,v)},r.addEventListener(c,r.mux.listeners[c],!1))})}function d_(t,e,i,a){var r=a;if(t&&typeof t[e]=="function")try{r=t[e].apply(t,i)}catch(n){ee.info("safeCall error",n)}return r}var qr=Xe(yt()),pa;qr.default&&qr.default.WeakMap&&(pa=new WeakMap);function u_(t,e){if(!t||!e||!qr.default||typeof qr.default.getComputedStyle!="function")return"";var i;return pa&&pa.has(t)&&(i=pa.get(t)),i||(i=qr.default.getComputedStyle(t,null),pa&&pa.set(t,i)),i.getPropertyValue(e)}function c_(t){return Math.floor(t*1e3)}var Ri={TARGET_DURATION:"#EXT-X-TARGETDURATION",PART_INF:"#EXT-X-PART-INF",SERVER_CONTROL:"#EXT-X-SERVER-CONTROL",INF:"#EXTINF",PROGRAM_DATE_TIME:"#EXT-X-PROGRAM-DATE-TIME",VERSION:"#EXT-X-VERSION",SESSION_DATA:"#EXT-X-SESSION-DATA"},Io=function(t){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(t),this.manifest};Io.prototype.process=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf(`
15
+ `);e>-1;e=this.buffer.indexOf(`
16
+ `))this.processLine(this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)};Io.prototype.processLine=function(t){var e=t.indexOf(":"),i=v_(t,e),a=i[0],r=i.length===2?Ud(i[1]):void 0;if(a[0]!=="#")this.currentUri.uri=a,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(a){case Ri.TARGET_DURATION:{if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break}case Ri.PART_INF:{Xo(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break}case Ri.SERVER_CONTROL:{Xo(this.manifest,i),this.setHoldBack();break}case Ri.INF:{r===0?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break}case Ri.PROGRAM_DATE_TIME:{var n=r,s=new Date(n);this.manifest.dateTimeString||(this.manifest.dateTimeString=n,this.manifest.dateTimeObject=s),this.currentUri.dateTimeString=n,this.currentUri.dateTimeObject=s;break}case Ri.VERSION:{Xo(this.manifest,i);break}case Ri.SESSION_DATA:{var o=f_(i[1]),l=um(o);Object.assign(this.manifest.sessionData,l)}}};Io.prototype.setHoldBack=function(){var t=this.manifest,e=t.serverControl,i=t.targetDuration,a=t.partTargetDuration;if(e){var r="holdBack",n="partHoldBack",s=i&&i*3,o=a&&a*2;i&&!e.hasOwnProperty(r)&&(e[r]=s),s&&e[r]<s&&(e[r]=s),a&&!e.hasOwnProperty(n)&&(e[n]=a*3),a&&e[n]<o&&(e[n]=o)}};var Xo=function(t,e){var i=bm(e[0].replace("#EXT-X-","")),a;p_(e[1])?(a={},a=Object.assign(m_(e[1]),a)):a=Ud(e[1]),t[i]=a},bm=function(t){return t.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},Ud=function(t){if(t.toLowerCase()==="yes"||t.toLowerCase()==="no")return t.toLowerCase()==="yes";var e=t.indexOf(":")!==-1?t:parseFloat(t);return isNaN(e)?t:e},h_=function(t){var e={},i=t.split("=");if(i.length>1){var a=bm(i[0]);e[a]=Ud(i[1])}return e},m_=function(t){for(var e=t.split(","),i={},a=0;e.length>a;a++){var r=e[a],n=h_(r);i=Object.assign(n,i)}return i},p_=function(t){return t.indexOf("=")>-1},v_=function(t,e){return e===-1?[t]:[t.substring(0,e),t.substring(e+1)]},f_=function(t){var e={};if(t){var i=t.search(","),a=t.slice(0,i),r=t.slice(i+1),n=[a,r];return n.forEach(function(s,o){for(var l=s.replace(/['"]+/g,"").split("="),d=0;d<l.length;d++)l[d]==="DATA-ID"&&(e["DATA-ID"]=l[1-d]),l[d]==="VALUE"&&(e.VALUE=l[1-d])}),{data:e}}},E_=Io,__={safeCall:d_,safeIncrement:_e,getComputedStyle:u_,secondsToMs:c_,assign:Object.assign,headersStringToObject:Pd,cdnHeadersToRequestId:Js,extractHostnameAndDomain:rn,extractHostname:_t,manifestParser:E_,generateShortID:lm,generateUUID:an,now:be.now,findMediaElement:Zs},b_=__,g_={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},y_=g_,T_="mux-embed",A_="5.9.0",k_="2.1",pe={},Ai=function(t){var e=arguments;typeof t=="string"?Ai.hasOwnProperty(t)?Vr.default.setTimeout(function(){e=Array.prototype.splice.call(e,1),Ai[t].apply(null,e)},0):ee.warn("`"+t+"` is an unknown task"):typeof t=="function"?Vr.default.setTimeout(function(){t(Ai)},0):ee.warn("`"+t+"` is invalid.")},S_={loaded:be.now(),NAME:T_,VERSION:A_,API_VERSION:k_,PLAYER_TRACKED:!1,monitor:function(t,e){return l_(Ai,t,e)},destroyMonitor:function(t){var e=ai(Zs(t),1),i=e[0];i&&i.mux&&typeof i.mux.destroy=="function"?i.mux.destroy():ee.error("A video element monitor for `"+t+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(t,e){var i=ht(t);pe[i]?pe[i].addHLSJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(t,e){var i=ht(t);pe[i]?pe[i].addDashJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(t){var e=ht(t);pe[e]?pe[e].removeHLSJS():ee.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(t){var e=ht(t);pe[e]?pe[e].removeDashJS():ee.error("A monitor for `"+e+"` has not been initialized.")},init:function(t,e){bl()&&e&&e.respectDoNotTrack&&ee.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=ht(t);pe[i]=new r_(Ai,i,e)},emit:function(t,e,i){var a=ht(t);pe[a]?(pe[a].emit(e,i),e==="destroy"&&delete pe[a]):ee.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(t,e){var i=ht(t);pe[i]?pe[i].emit("hb",e):ee.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(t,e){var i=ht(t);pe[i]?pe[i].emitTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(t,e){var i=ht(t);pe[i]?pe[i].stateDataTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(t,e){var i=ht(t);pe[i]?pe[i].getPlayheadTime=e:ee.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:bl,log:ee,utils:b_,events:y_,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(Ai,S_);typeof Vr.default<"u"&&typeof Vr.default.addEventListener=="function"&&Vr.default.addEventListener("pagehide",function(t){t.persisted||(Ai.WINDOW_UNLOADING=!0)},!1);var $d=Ai;var B=df,te={VIDEO:"video",THUMBNAIL:"thumbnail",STORYBOARD:"storyboard",DRM:"drm"},x={NOT_AN_ERROR:0,NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_NO_STATUS:2000001,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_GENERIC_SERVER_FAIL:25e5,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_KEY_SYSTEM:5000001,ENCRYPTED_GENERATE_REQUEST_FAILED:5000002,ENCRYPTED_UPDATE_LICENSE_FAILED:5000003,ENCRYPTED_UPDATE_SERVER_CERT_FAILED:5000004,ENCRYPTED_CDM_ERROR:5000005,ENCRYPTED_OUTPUT_RESTRICTED:5000006,ENCRYPTED_MISSING_TOKEN:5000002},Ro=t=>t===te.VIDEO?"playback":t,ci=class Tr extends Error{constructor(e,i=Tr.MEDIA_ERR_CUSTOM,a,r){var n;super(e),this.name="MediaError",this.code=i,this.context=r,this.fatal=a??(i>=Tr.MEDIA_ERR_NETWORK&&i<=Tr.MEDIA_ERR_ENCRYPTED),this.message||(this.message=(n=Tr.defaultMessages[this.code])!=null?n:"")}};ci.MEDIA_ERR_ABORTED=1,ci.MEDIA_ERR_NETWORK=2,ci.MEDIA_ERR_DECODE=3,ci.MEDIA_ERR_SRC_NOT_SUPPORTED=4,ci.MEDIA_ERR_ENCRYPTED=5,ci.MEDIA_ERR_CUSTOM=100,ci.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var R=ci,w_=t=>t==null,Hd=(t,e)=>w_(e)?!1:t in e,Tl={ANY:"any",MUTED:"muted"},Q={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},Wt={MSE:"mse",NATIVE:"native"},Ar={HEADER:"header",QUERY:"query",NONE:"none"},eo=Object.values(Ar),ti={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},kc={HLS:ti.M3U8};[...Object.values(ti)];var yA={upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"},TA={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},AA={DESCENDING:"desc"},I_="en",Al={code:I_},fe=(t,e,i,a,r=t)=>{r.addEventListener(e,i,a),t.addEventListener("teardown",()=>{r.removeEventListener(e,i)},{once:!0})};function R_(t,e,i){e&&i>e&&(i=e);for(let a=0;a<t.length;a++)if(t.start(a)<=i&&t.end(a)>=i)return!0;return!1}var Bd=t=>{let e=t.indexOf("?");if(e<0)return[t];let i=t.slice(0,e),a=t.slice(e);return[i,a]},Co=t=>{let{type:e}=t;if(e){let i=e.toUpperCase();return Hd(i,kc)?kc[i]:e}return C_(t)},gm=t=>t==="VOD"?Q.ON_DEMAND:Q.LIVE,ym=t=>t==="EVENT"?Number.POSITIVE_INFINITY:t==="VOD"?Number.NaN:0,C_=t=>{let{src:e}=t;if(!e)return"";let i="";try{i=new URL(e).pathname}catch{console.error("invalid url")}let a=i.lastIndexOf(".");if(a<0)return D_(t)?ti.M3U8:"";let r=i.slice(a+1).toUpperCase();return Hd(r,ti)?ti[r]:""},L_="mux.com",D_=({src:t,customDomain:e=L_})=>{let i;try{i=new URL(`${t}`)}catch{return!1}let a=i.protocol==="https:",r=i.hostname===`stream.${e}`.toLowerCase(),n=i.pathname.split("/"),s=n.length===2,o=!(n!=null&&n[1].includes("."));return a&&r&&s&&o},Fa=t=>{let e=(t??"").split(".")[1];if(e)try{let i=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(i).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}catch{return}},M_=({exp:t},e=Date.now())=>!t||t*1e3<e,x_=({sub:t},e)=>t!==e,O_=({aud:t},e)=>!t,N_=({aud:t},e)=>t!==e,Tm="en";function D(t,e=!0){var i,a;let r=e&&(a=(i=Al)==null?void 0:i[t])!=null?a:t,n=e?Al.code:Tm;return new P_(r,n)}var P_=class{constructor(t,e=(i=>(i=Al)!=null?i:Tm)()){this.message=t,this.locale=e}format(t){return this.message.replace(/\{(\w+)\}/g,(e,i)=>{var a;return(a=t[i])!=null?a:""})}toString(){return this.message}},U_=Object.values(Tl),Sc=t=>typeof t=="boolean"||typeof t=="string"&&U_.includes(t),$_=(t,e,i)=>{let{autoplay:a}=t,r=!1,n=!1,s=Sc(a)?a:!!a,o=()=>{r||fe(e,"playing",()=>{r=!0},{once:!0})};if(o(),fe(e,"loadstart",()=>{r=!1,o(),Jo(e,s)},{once:!0}),fe(e,"loadstart",()=>{i||(t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=!Number.isFinite(e.duration)),Jo(e,s)},{once:!0}),i&&i.once(B.Events.LEVEL_LOADED,(l,d)=>{var m;t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=(m=d.details.live)!=null?m:!1}),!s){let l=()=>{!n||Number.isFinite(t.startTime)||(i!=null&&i.liveSyncPosition?e.currentTime=i.liveSyncPosition:Number.isFinite(e.seekable.end(0))&&(e.currentTime=e.seekable.end(0)))};i&&fe(e,"play",()=>{e.preload==="metadata"?i.once(B.Events.LEVEL_UPDATED,l):l()},{once:!0})}return l=>{r||(s=Sc(l)?l:!!l,Jo(e,s))}},Jo=(t,e)=>{if(!e)return;let i=t.muted,a=()=>t.muted=i;switch(e){case Tl.ANY:t.play().catch(()=>{t.muted=!0,t.play().catch(a)});break;case Tl.MUTED:t.muted=!0,t.play().catch(a);break;default:t.play().catch(()=>{});break}},H_=({preload:t,src:e},i,a)=>{let r=p=>{p!=null&&["","none","metadata","auto"].includes(p)?i.setAttribute("preload",p):i.removeAttribute("preload")};if(!a)return r(t),r;let n=!1,s=!1,o=a.config.maxBufferLength,l=a.config.maxBufferSize,d=p=>{r(p);let h=p??i.preload;s||h==="none"||(h==="metadata"?(a.config.maxBufferLength=1,a.config.maxBufferSize=1):(a.config.maxBufferLength=o,a.config.maxBufferSize=l),m())},m=()=>{!n&&e&&(n=!0,a.loadSource(e))};return fe(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,m()},{once:!0}),d(t),d};function B_(t,e){var i;if(!("videoTracks"in t))return;let a=new WeakMap;e.on(B.Events.MANIFEST_PARSED,function(l,d){o();let m=t.addVideoTrack("main");m.selected=!0;for(let[p,h]of d.levels.entries()){let c=m.addRendition(h.url[0],h.width,h.height,h.videoCodec,h.bitrate);a.set(h,`${p}`),c.id=`${p}`}}),e.on(B.Events.AUDIO_TRACKS_UPDATED,function(l,d){s();for(let m of d.audioTracks){let p=m.default?"main":"alternative",h=t.addAudioTrack(p,m.name,m.lang);h.id=`${m.id}`,m.default&&(h.enabled=!0)}}),t.audioTracks.addEventListener("change",()=>{var l;let d=+((l=[...t.audioTracks].find(p=>p.enabled))==null?void 0:l.id),m=e.audioTracks.map(p=>p.id);d!=e.audioTrack&&m.includes(d)&&(e.audioTrack=d)}),e.on(B.Events.LEVELS_UPDATED,function(l,d){var m;let p=t.videoTracks[(m=t.videoTracks.selectedIndex)!=null?m:0];if(!p)return;let h=d.levels.map(c=>a.get(c));for(let c of t.videoRenditions)c.id&&!h.includes(c.id)&&p.removeRendition(c)});let r=l=>{let d=l.target.selectedIndex;d!=e.nextLevel&&(e.nextLevel=d)};(i=t.videoRenditions)==null||i.addEventListener("change",r);let n=()=>{for(let l of t.videoTracks)t.removeVideoTrack(l)},s=()=>{for(let l of t.audioTracks)t.removeAudioTrack(l)},o=()=>{n(),s()};e.once(B.Events.DESTROYING,o)}var el=t=>"time"in t?t.time:t.startTime;function W_(t,e){e.on(B.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(r,{tracks:n})=>{n.forEach(s=>{var o,l;let d=(o=s.subtitleTrack)!=null?o:s.closedCaptions,m=e.subtitleTracks.findIndex(({lang:h,name:c,type:v})=>h==d?.lang&&c===s.label&&v.toLowerCase()===s.kind),p=((l=s._id)!=null?l:s.default)?"default":`${s.kind}${m}`;Wd(t,s.kind,s.label,d?.lang,p,s.default)})});let i=()=>{if(!e.subtitleTracks.length)return;let r=Array.from(t.textTracks).find(o=>o.id&&o.mode==="showing"&&["subtitles","captions"].includes(o.kind));if(!r)return;let n=e.subtitleTracks[e.subtitleTrack],s=n?n.default?"default":`${e.subtitleTracks[e.subtitleTrack].type.toLowerCase()}${e.subtitleTrack}`:void 0;if(e.subtitleTrack<0||r?.id!==s){let o=e.subtitleTracks.findIndex(({lang:l,name:d,type:m,default:p})=>r.id==="default"&&p||l==r.language&&d===r.label&&m.toLowerCase()===r.kind);e.subtitleTrack=o}r?.id===s&&r.cues&&Array.from(r.cues).forEach(o=>{r.addCue(o)})};t.textTracks.addEventListener("change",i),e.on(B.Events.CUES_PARSED,(r,{track:n,cues:s})=>{let o=t.textTracks.getTrackById(n);if(!o)return;let l=o.mode==="disabled";l&&(o.mode="hidden"),s.forEach(d=>{var m;(m=o.cues)!=null&&m.getCueById(d.id)||o.addCue(d)}),l&&(o.mode="disabled")}),e.once(B.Events.DESTROYING,()=>{t.textTracks.removeEventListener("change",i),t.querySelectorAll("track[data-removeondestroy]").forEach(r=>{r.remove()})});let a=()=>{Array.from(t.textTracks).forEach(r=>{var n,s;if(!["subtitles","caption"].includes(r.kind)&&(r.label==="thumbnails"||r.kind==="chapters")){if(!((n=r.cues)!=null&&n.length)){let o="track";r.kind&&(o+=`[kind="${r.kind}"]`),r.label&&(o+=`[label="${r.label}"]`);let l=t.querySelector(o),d=(s=l?.getAttribute("src"))!=null?s:"";l?.removeAttribute("src"),setTimeout(()=>{l?.setAttribute("src",d)},0)}r.mode!=="hidden"&&(r.mode="hidden")}})};e.once(B.Events.MANIFEST_LOADED,a),e.once(B.Events.MEDIA_ATTACHED,a)}function Wd(t,e,i,a,r,n){let s=document.createElement("track");return s.kind=e,s.label=i,a&&(s.srclang=a),r&&(s.id=r),n&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(e)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),t.append(s),s.track}function F_(t,e){let i=Array.prototype.find.call(t.querySelectorAll("track"),a=>a.track===e);i?.remove()}function bn(t,e,i){var a;return(a=Array.from(t.querySelectorAll("track")).find(r=>r.track.label===e&&r.track.kind===i))==null?void 0:a.track}async function Am(t,e,i,a){let r=bn(t,i,a);return r||(r=Wd(t,a,i),r.mode="hidden",await new Promise(n=>setTimeout(()=>n(void 0),0))),r.mode!=="hidden"&&(r.mode="hidden"),[...e].sort((n,s)=>el(s)-el(n)).forEach(n=>{var s,o;let l=n.value,d=el(n);if("endTime"in n&&n.endTime!=null)r?.addCue(new VTTCue(d,n.endTime,a==="chapters"?l:JSON.stringify(l??null)));else{let m=Array.prototype.findIndex.call(r?.cues,v=>v.startTime>=d),p=(s=r?.cues)==null?void 0:s[m],h=p?p.startTime:Number.isFinite(t.duration)?t.duration:Number.MAX_SAFE_INTEGER,c=(o=r?.cues)==null?void 0:o[m-1];c&&(c.endTime=d),r?.addCue(new VTTCue(d,h,a==="chapters"?l:JSON.stringify(l??null)))}}),t.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r}var Fd="cuepoints",km=Object.freeze({label:Fd});async function Sm(t,e,i=km){return Am(t,e,i.label,"metadata")}var kl=t=>({time:t.startTime,value:JSON.parse(t.text)});function K_(t,e={label:Fd}){let i=bn(t,e.label,"metadata");return i!=null&&i.cues?Array.from(i.cues,a=>kl(a)):[]}function wm(t,e={label:Fd}){var i,a;let r=bn(t,e.label,"metadata");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return kl(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return kl(s||r.activeCues[0])}async function V_(t,e=km){return new Promise(i=>{fe(t,"loadstart",async()=>{let a=await Sm(t,[],e);fe(t,"cuechange",()=>{let r=wm(t);if(r){let n=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}var Kd="chapters",Im=Object.freeze({label:Kd}),Sl=t=>({startTime:t.startTime,endTime:t.endTime,value:t.text});async function Rm(t,e,i=Im){return Am(t,e,i.label,"chapters")}function q_(t,e={label:Kd}){var i;let a=bn(t,e.label,"chapters");return(i=a?.cues)!=null&&i.length?Array.from(a.cues,r=>Sl(r)):[]}function Cm(t,e={label:Kd}){var i,a;let r=bn(t,e.label,"chapters");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return Sl(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return Sl(s||r.activeCues[0])}async function Y_(t,e=Im){return new Promise(i=>{fe(t,"loadstart",async()=>{let a=await Rm(t,[],e);fe(t,"cuechange",()=>{let r=Cm(t);if(r){let n=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}function G_(t,e){if(e){let i=e.playingDate;if(i!=null)return new Date(i.getTime()-t.currentTime*1e3)}return typeof t.getStartDate=="function"?t.getStartDate():new Date(NaN)}function Q_(t,e){if(e&&e.playingDate)return e.playingDate;if(typeof t.getStartDate=="function"){let i=t.getStartDate();return new Date(i.getTime()+t.currentTime*1e3)}return new Date(NaN)}var Yr={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},z_=t=>{if(t===te.VIDEO)return Yr.VIDEO;if(t===te.DRM)return Yr.DRM},Z_=(t,e)=>{var i,a;let r=Ro(t),n=`${r}Token`;return(i=e.tokens)!=null&&i[r]?(a=e.tokens)==null?void 0:a[r]:Hd(n,e)?e[n]:void 0},to=(t,e,i,a,r=!1,n=!(s=>(s=globalThis.navigator)==null?void 0:s.onLine)())=>{var s,o;if(n){let y=D("Your device appears to be offline",r),T,_=R.MEDIA_ERR_NETWORK,S=new R(y,_,!1,T);return S.errorCategory=e,S.muxCode=x.NETWORK_OFFLINE,S.data=t,S}let l="status"in t?t.status:t.code,d=Date.now(),m=R.MEDIA_ERR_NETWORK;if(l===200)return;let p=Ro(e),h=Z_(e,i),c=z_(e),[v]=Bd((s=i.playbackId)!=null?s:"");if(!l||!v)return;let E=Fa(h);if(h&&!E){let y=D("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:p}),T=D("Compact JWT string: {token}",r).format({token:h}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_MALFORMED,_.data=t,_}if(l>=500){let y=new R("",m,a??!0);return y.errorCategory=e,y.muxCode=x.NETWORK_UNKNOWN_ERROR,y}if(l===403)if(E){if(M_(E,d)){let y={timeStyle:"medium",dateStyle:"medium"},T=D("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:p}),_=D("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",y).format((o=E.exp)!=null?o:0*1e3),currentDate:new Intl.DateTimeFormat("en",y).format(d)}),S=new R(T,m,!0,_);return S.errorCategory=e,S.muxCode=x.NETWORK_TOKEN_EXPIRED,S.data=t,S}if(x_(E,v)){let y=D("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p}),T=D("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:p,playbackId:v,tokenPlaybackId:E.sub}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_SUB_MISMATCH,_.data=t,_}if(O_(E)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:c}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_AUD_MISSING,_.data=t,_}if(N_(E,c)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:c,aud:E.aud}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_AUD_MISMATCH,_.data=t,_}}else{let y=D("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p,category:e}),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_MISSING,_.data=t,_}if(l===412){let y=D("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_NOT_READY,_.streamType=i.streamType===Q.LIVE?"live":i.streamType===Q.ON_DEMAND?"on-demand":"unknown",_.data=t,_}if(l===404){let y=D("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_NOT_FOUND,_.data=t,_}if(l===400){let y=D("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_INVALID_URL,_.data=t,_}let g=new R("",m,a??!0);return g.errorCategory=e,g.muxCode=x.NETWORK_UNKNOWN_ERROR,g.data=t,g},wc=B.DefaultConfig.capLevelController,j_={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400};function X_(t){let e=t.toLowerCase().trim();return j_[e]}var wl=class kr extends wc{constructor(e){super(e)}static setMaxAutoResolution(e,i){i?kr.maxAutoResolution.set(e,i):kr.maxAutoResolution.delete(e)}getMaxAutoResolution(){var e;let i=this.hls;return(e=kr.maxAutoResolution.get(i))!=null?e:void 0}get levels(){var e;return(e=this.hls.levels)!=null?e:[]}getValidLevels(e){return this.levels.filter((i,a)=>this.isLevelAllowed(i)&&a<=e)}getMaxLevelCapped(e){let i=this.getValidLevels(e),a=this.getMaxAutoResolution();if(!a)return super.getMaxLevel(e);let r=X_(a);if(!r)return super.getMaxLevel(e);let n=i.filter(l=>l.width*l.height<=r),s=n.findIndex(l=>l.width*l.height===r);if(s!==-1){let l=n[s];return i.findIndex(d=>d===l)}if(n.length===0)return 0;let o=n[n.length-1];return i.findIndex(l=>l===o)}getMaxLevel(e){if(this.getMaxAutoResolution()!==void 0)return this.getMaxLevelCapped(e);let i=super.getMaxLevel(e),a=this.getValidLevels(e);if(!a[i])return i;let r=Math.min(a[i].width,a[i].height),n=kr.minMaxResolution;return r>=n?i:wc.getMaxLevelByMediaSize(a,n*(16/9),n)}};wl.minMaxResolution=720,wl.maxAutoResolution=new WeakMap;var J_=wl,tl=J_,Kn={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},eb=t=>{if(t.includes("fps"))return Kn.FAIRPLAY;if(t.includes("playready"))return Kn.PLAYREADY;if(t.includes("widevine"))return Kn.WIDEVINE},tb=t=>{let e=t.split(`
17
+ `).find((i,a,r)=>a&&r[a-1].startsWith("#EXT-X-STREAM-INF"));return fetch(e).then(i=>i.status!==200?Promise.reject(i):i.text())},ib=t=>{let e=t.split(`
18
+ `).filter(a=>a.startsWith("#EXT-X-SESSION-DATA"));if(!e.length)return{};let i={};for(let a of e){let r=rb(a),n=r["DATA-ID"];n&&(i[n]={...r})}return{sessionData:i}},ab=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g;function rb(t){let e=[...t.matchAll(ab)];return Object.fromEntries(e.map(([,i,a])=>[i,a]))}var nb=t=>{var e,i,a;let r=t.split(`
19
+ `),n=(i=((e=r.find(d=>d.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:i.trim(),s=gm(n),o=ym(n),l;if(s===Q.LIVE){let d=r.find(m=>m.startsWith("#EXT-X-PART-INF"));if(d)l=+d.split(":")[1].split("=")[1]*2;else{let m=r.find(h=>h.startsWith("#EXT-X-TARGETDURATION")),p=(a=m?.split(":"))==null?void 0:a[1];l=+(p??6)*3}}return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}},sb=async(t,e)=>{if(e===ti.MP4)return{streamType:Q.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(e===ti.M3U8){let i=await fetch(t);if(!i.ok)return Promise.reject(i);let a=await i.text(),r=await tb(a);return{...ib(a),...nb(r)}}return console.error(`Media type ${e} is an unrecognized or unsupported type for src ${t}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}},ob=async(t,e,i=Co({src:t}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:m}=await sb(t,i),p=m?.["com.apple.hls.chapters"];(p!=null&&p.URI||p!=null&&p.VALUE.toLocaleLowerCase().startsWith("http"))&&Vd((a=p.URI)!=null?a:p.VALUE,e),((r=de.get(e))!=null?r:{}).liveEdgeStartOffset=d,((n=de.get(e))!=null?n:{}).targetLiveWindow=l,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((s=de.get(e))!=null?s:{}).streamType=o,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Vd=async(t,e)=>{var i,a;try{let r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch Mux metadata: ${r.status} ${r.statusText}`);let n=await r.json(),s={};if(!((i=n?.[0])!=null&&i.metadata))return;for(let l of n[0].metadata)l.key&&l.value&&(s[l.key]=l.value);((a=de.get(e))!=null?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");e.dispatchEvent(o)}catch(r){console.error(r)}},lb=t=>{var e;let i=t.type,a=gm(i),r=ym(i),n,s=!!((e=t.partList)!=null&&e.length);return a===Q.LIVE&&(n=s?t.partTarget*2:t.targetduration*3),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}},db=(t,e,i)=>{var a,r,n,s,o,l,d,m;let{streamType:p,targetLiveWindow:h,liveEdgeStartOffset:c,lowLatency:v}=lb(t);if(p===Q.LIVE){v?(i.config.backBufferLength=(a=i.userConfig.backBufferLength)!=null?a:4,i.config.maxFragLookUpTolerance=(r=i.userConfig.maxFragLookUpTolerance)!=null?r:.001,i.config.abrBandWidthUpFactor=(n=i.userConfig.abrBandWidthUpFactor)!=null?n:i.config.abrBandWidthFactor):i.config.backBufferLength=(s=i.userConfig.backBufferLength)!=null?s:8;let E=Object.freeze({get length(){return e.seekable.length},start(g){return e.seekable.start(g)},end(g){var y;return g>this.length||g<0||Number.isFinite(e.duration)?e.seekable.end(g):(y=i.liveSyncPosition)!=null?y:e.seekable.end(g)}});((o=de.get(e))!=null?o:{}).seekable=E}((l=de.get(e))!=null?l:{}).liveEdgeStartOffset=c,((d=de.get(e))!=null?d:{}).targetLiveWindow=h,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((m=de.get(e))!=null?m:{}).streamType=p,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Ic,Rc,Lm=(Rc=(Ic=globalThis?.navigator)==null?void 0:Ic.userAgent)!=null?Rc:"",Cc,Lc,Dc,ub=(Dc=(Lc=(Cc=globalThis?.navigator)==null?void 0:Cc.userAgentData)==null?void 0:Lc.platform)!=null?Dc:"",cb=Lm.toLowerCase().includes("android")||["x11","android"].some(t=>ub.toLowerCase().includes(t)),hb=t=>/^((?!chrome|android).)*safari/i.test(Lm)&&!!t.canPlayType("application/vnd.apple.mpegurl"),de=new WeakMap,ii="mux.com",Mc,xc,Dm=(xc=(Mc=B).isSupported)==null?void 0:xc.call(Mc),mb=t=>cb||!hb(t),qd=()=>$d.utils.now(),pb=$d.utils.generateUUID,Il=({playbackId:t,customDomain:e=ii,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:m=d}={},extraSourceParams:p={}}={})=>{if(!t)return;let[h,c=""]=Bd(t),v=new URL(`https://stream.${e}/${h}.m3u8${c}`);return m||v.searchParams.has("token")?(v.searchParams.forEach((E,g)=>{g!="token"&&v.searchParams.delete(g)}),m&&v.searchParams.set("token",m)):(i&&v.searchParams.set("max_resolution",i),a&&(v.searchParams.set("min_resolution",a),i&&+i.slice(0,-1)<+a.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",a,"maxResolution",i)),r&&v.searchParams.set("rendition_order",r),n&&v.searchParams.set("program_start_time",`${n}`),s&&v.searchParams.set("program_end_time",`${s}`),o&&v.searchParams.set("asset_start_time",`${o}`),l&&v.searchParams.set("asset_end_time",`${l}`),Object.entries(p).forEach(([E,g])=>{g!=null&&v.searchParams.set(E,g)})),v.toString()},Lo=t=>{if(!t)return;let[e]=t.split("?");return e||void 0},Yd=t=>{if(!t||!t.startsWith("https://stream."))return;let[e]=new URL(t).pathname.slice(1).split(/\.m3u8|\//);return e||void 0},vb=t=>{var e,i,a;return(e=t?.metadata)!=null&&e.video_id?t.metadata.video_id:Hm(t)&&(a=(i=Lo(t.playbackId))!=null?i:Yd(t.src))!=null?a:t.src},Mm=t=>{var e;return(e=de.get(t))==null?void 0:e.error},fb=t=>{var e;return(e=de.get(t))==null?void 0:e.metadata},Rl=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.streamType)!=null?i:Q.UNKNOWN},Eb=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.targetLiveWindow)!=null?i:Number.NaN},Gd=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.seekable)!=null?i:t.seekable},_b=t=>{var e;let i=(e=de.get(t))==null?void 0:e.liveEdgeStartOffset;if(typeof i!="number")return Number.NaN;let a=Gd(t);return a.length?a.end(a.length-1)-i:Number.NaN},Qd=.034,bb=(t,e,i=Qd)=>Math.abs(t-e)<=i,xm=(t,e,i=Qd)=>t>e||bb(t,e,i),gb=(t,e=Qd)=>t.paused&&xm(t.currentTime,t.duration,e),Om=(t,e)=>{var i,a,r;if(!e||!t.buffered.length)return;if(t.readyState>2)return!1;let n=e.currentLevel>=0?(a=(i=e.levels)==null?void 0:i[e.currentLevel])==null?void 0:a.details:(r=e.levels.find(p=>!!p.details))==null?void 0:r.details;if(!n||n.live)return;let{fragments:s}=n;if(!(s!=null&&s.length))return;if(t.currentTime<t.duration-(n.targetduration+.5))return!1;let o=s[s.length-1];if(t.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=t.buffered.start(t.buffered.length-1),m=t.buffered.end(t.buffered.length-1);return l>d&&l<m},Nm=(t,e)=>t.ended||t.loop?t.ended:e&&Om(t,e)?!0:gb(t),yb=(t,e,i)=>{Pm(e,i,t);let{metadata:a={}}=t,{view_session_id:r=pb()}=a,n=vb(t);a.view_session_id=r,a.video_id=n,t.metadata=a;let s=m=>{var p;(p=e.mux)==null||p.emit("hb",{view_drm_type:m})};t.drmTypeCb=s,de.set(e,{retryCount:0});let o=Tb(t,e),l=H_(t,e,o);t!=null&&t.muxDataKeepSession&&e!=null&&e.mux&&!e.mux.deleted?o&&e.mux.addHLSJS({hlsjs:o,Hls:o?B:void 0}):Rb(t,e,o),Cb(t,e,o),V_(e),Y_(e);let d=$_(t,e,o);return{engine:o,setAutoplay:d,setPreload:l}},Pm=(t,e,i)=>{let a=e?.engine;t!=null&&t.mux&&!t.mux.deleted&&(i!=null&&i.muxDataKeepSession?a&&t.mux.removeHLSJS():(t.mux.destroy(),delete t.mux)),a&&(a.detachMedia(),a.destroy()),t&&(t.hasAttribute("src")&&(t.removeAttribute("src"),t.load()),t.removeEventListener("error",Wm),t.removeEventListener("error",Cl),t.removeEventListener("durationchange",Bm),de.delete(t),t.dispatchEvent(new Event("teardown")))};function Um(t,e){var i;let a=Co(t);if(a!==ti.M3U8)return!0;let r=!a||((i=e.canPlayType(a))!=null?i:!0),{preferPlayback:n}=t,s=n===Wt.MSE,o=n===Wt.NATIVE,l=Dm&&(s||mb(e));return r&&(o||!l)}var Tb=(t,e)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l}=t,d=Co(t)===ti.M3U8,m=Um(t,e);if(d&&!m&&Dm){let p={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},h=Ab(a),c=kb(t),v=[Ar.QUERY,Ar.HEADER].includes(s)?{useHeaders:s===Ar.HEADER,sessionId:n?.view_session_id,contentId:n?.video_id}:void 0,E=o.capLevelToPlayerSize==null?{capLevelController:tl}:{},g=new B({debug:i,startPosition:r,cmcd:v,xhrSetup:(y,T)=>{var _,S;if(s&&s!==Ar.QUERY)return;let C=new URL(T);if(!C.searchParams.has("CMCD"))return;let O=((S=(_=C.searchParams.get("CMCD"))==null?void 0:_.split(","))!=null?S:[]).filter($=>$.startsWith("sid")||$.startsWith("cid")).join(",");C.searchParams.set("CMCD",O),y.open("GET",C)},...E,...p,...h,...c,...o});return E.capLevelController===tl&&l!==void 0&&tl.setMaxAutoResolution(g,l),g.on(B.Events.MANIFEST_PARSED,async function(y,T){var _,S;let C=(_=T.sessionData)==null?void 0:_["com.apple.hls.chapters"];(C!=null&&C.URI||C!=null&&C.VALUE.toLocaleLowerCase().startsWith("http"))&&Vd((S=C?.URI)!=null?S:C?.VALUE,e)}),g}},Ab=t=>t===Q.LIVE?{backBufferLength:8}:{},kb=t=>{let{tokens:{drm:e}={},playbackId:i,drmTypeCb:a}=t,r=Lo(i);return!e||!r?{}:{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:Vn(t,"fairplay"),serverCertificateUrl:$m(t,"fairplay")},"com.widevine.alpha":{licenseUrl:Vn(t,"widevine")},"com.microsoft.playready":{licenseUrl:Vn(t,"playready")}},requestMediaKeySystemAccessFunc:(n,s)=>(n==="com.widevine.alpha"&&(s=[...s.map(o=>{var l;let d=(l=o.videoCapabilities)==null?void 0:l.map(m=>({...m,robustness:"HW_SECURE_ALL"}));return{...o,videoCapabilities:d}}),...s]),navigator.requestMediaKeySystemAccess(n,s).then(o=>{let l=eb(n);return a?.(l),o}))}},Sb=async t=>{let e=await fetch(t);return e.status!==200?Promise.reject(e):await e.arrayBuffer()},wb=async(t,e)=>{let i=await fetch(e,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:t});if(i.status!==200)return Promise.reject(i);let a=await i.arrayBuffer();return new Uint8Array(a)},Ib=(t,e)=>{let i=async n=>{let s=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[n],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(l=>{var d;return(d=t.drmTypeCb)==null||d.call(t,Kn.FAIRPLAY),l}).catch(()=>{let l=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),d=new R(l,R.MEDIA_ERR_ENCRYPTED,!0);d.errorCategory=te.DRM,d.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,je(e,d)});if(!s)return;let o=await s.createMediaKeys();try{let l=await Sb($m(t,"fairplay")).catch(d=>{if(d instanceof Response){let m=to(d,te.DRM,t);return console.error("mediaError",m?.message,m?.context),m?Promise.reject(m):Promise.reject(new Error("Unexpected error in app cert request"))}return Promise.reject(d)});await o.setServerCertificate(l).catch(()=>{let d=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),m=new R(d,R.MEDIA_ERR_ENCRYPTED,!0);return m.errorCategory=te.DRM,m.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(m)})}catch(l){je(e,l);return}await e.setMediaKeys(o)},a=n=>{let s;if(n==="internal-error"){let o=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");s=new R(o,R.MEDIA_ERR_ENCRYPTED,!0),s.errorCategory=te.DRM,s.muxCode=x.ENCRYPTED_CDM_ERROR}else if(n==="output-restricted"||n==="output-downscaled"){let o=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");s=new R(o,R.MEDIA_ERR_ENCRYPTED,!1),s.errorCategory=te.DRM,s.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}s&&je(e,s)},r=async(n,s)=>{let o=e.mediaKeys.createSession(),l=()=>{o.keyStatuses.forEach(m=>a(m))},d=async m=>{let p=m.message;try{let h=await wb(p,Vn(t,"fairplay"));try{await o.update(h)}catch{let c=D("Failed to update DRM license. This may be an issue with the player or your protected content."),v=new R(c,R.MEDIA_ERR_ENCRYPTED,!0);v.errorCategory=te.DRM,v.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED,je(e,v)}}catch(h){if(h instanceof Response){let c=to(h,te.DRM,t);if(console.error("mediaError",c?.message,c?.context),c){je(e,c);return}console.error("Unexpected error in license key request",h);return}console.error(h)}};o.addEventListener("keystatuseschange",l),o.addEventListener("message",d),e.addEventListener("teardown",()=>{o.removeEventListener("keystatuseschange",l),o.removeEventListener("message",d),o.close()},{once:!0}),await o.generateRequest(n,s).catch(m=>{console.error("Failed to generate license request",m);let p=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),h=new R(p,R.MEDIA_ERR_ENCRYPTED,!0);return h.errorCategory=te.DRM,h.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED,Promise.reject(h)})};fe(e,"encrypted",async n=>{try{let s=n.initDataType;if(s!=="skd"){console.error(`Received unexpected initialization data type "${s}"`);return}e.mediaKeys||await i(s);let o=n.initData;if(o==null){console.error(`Could not start encrypted playback due to missing initData in ${n.type} event`);return}await r(s,o)}catch(s){je(e,s);return}})},Vn=({playbackId:t,tokens:{drm:e}={},customDomain:i=ii},a)=>{let r=Lo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ii)?i:ii}/license/${a}/${r}?token=${e}`},$m=({playbackId:t,tokens:{drm:e}={},customDomain:i=ii},a)=>{let r=Lo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ii)?i:ii}/appcert/${a}/${r}?token=${e}`},Hm=({playbackId:t,src:e,customDomain:i})=>{if(t)return!0;if(typeof e!="string")return!1;let a=window?.location.href,r=new URL(e,a).hostname.toLocaleLowerCase();return r.includes(ii)||!!i&&r.includes(i.toLocaleLowerCase())},Rb=(t,e,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=$d,muxDataSDKOptions:o={}}=t,l=Hm(t);if(!n&&(r||l)){let{playerInitTime:d,playerSoftwareName:m,playerSoftwareVersion:p,beaconCollectionDomain:h,debug:c,disableCookies:v}=t,E={...t.metadata,video_title:((a=t?.metadata)==null?void 0:a.video_title)||void 0},g=y=>typeof y.player_error_code=="string"?!1:typeof t.errorTranslator=="function"?t.errorTranslator(y):y;s.monitor(e,{debug:c,beaconCollectionDomain:h,hlsjs:i,Hls:i?B:void 0,automaticErrorTracking:!1,errorTranslator:g,disableCookies:v,...o,data:{...r?{env_key:r}:{},player_software_name:m,player_software:m,player_software_version:p,player_init_time:d,...E}})}},Cb=(t,e,i)=>{var a,r;let n=Um(t,e),{src:s,customDomain:o=ii}=t,l=()=>{e.ended||t.disablePseudoEnded||!Nm(e,i)||(Om(e,i)?e.currentTime=e.buffered.end(e.buffered.length-1):e.dispatchEvent(new Event("ended")))},d,m,p=()=>{let h=Gd(e),c,v;h.length>0&&(c=h.start(0),v=h.end(0)),(m!==v||d!==c)&&e.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),d=c,m=v};if(fe(e,"durationchange",p),e&&n){let h=Co(t);if(typeof s=="string"){if(s.endsWith(".mp4")&&s.includes(o)){let E=Yd(s),g=new URL(`https://stream.${o}/${E}/metadata.json`);Vd(g.toString(),e)}let c=()=>{if(Rl(e)!==Q.LIVE||Number.isFinite(e.duration))return;let E=setInterval(p,1e3);e.addEventListener("teardown",()=>{clearInterval(E)},{once:!0}),fe(e,"durationchange",()=>{Number.isFinite(e.duration)&&clearInterval(E)})},v=async()=>ob(s,e,h).then(c).catch(E=>{if(E instanceof Response){let g=to(E,te.VIDEO,t);if(g){je(e,g);return}}});if(e.preload==="none"){let E=()=>{v(),e.removeEventListener("loadedmetadata",g)},g=()=>{v(),e.removeEventListener("play",E)};fe(e,"play",E,{once:!0}),fe(e,"loadedmetadata",g,{once:!0})}else v();(a=t.tokens)!=null&&a.drm?Ib(t,e):fe(e,"encrypted",()=>{let E=D("Attempting to play DRM-protected content without providing a DRM token."),g=new R(E,R.MEDIA_ERR_ENCRYPTED,!0);g.errorCategory=te.DRM,g.muxCode=x.ENCRYPTED_MISSING_TOKEN,je(e,g)},{once:!0}),e.setAttribute("src",s),t.startTime&&(((r=de.get(e))!=null?r:{}).startTime=t.startTime,e.addEventListener("durationchange",Bm,{once:!0}))}else e.removeAttribute("src");e.addEventListener("error",Wm),e.addEventListener("error",Cl),e.addEventListener("emptied",()=>{e.querySelectorAll("track[data-removeondestroy]").forEach(c=>{c.remove()})},{once:!0}),fe(e,"pause",l),fe(e,"seeked",l),fe(e,"play",()=>{e.ended||xm(e.currentTime,e.duration)&&(e.currentTime=e.seekable.length?e.seekable.start(0):0)})}else i&&s?(i.once(B.Events.LEVEL_LOADED,(h,c)=>{db(c.details,e,i),p(),Rl(e)===Q.LIVE&&!Number.isFinite(e.duration)&&(i.on(B.Events.LEVEL_UPDATED,p),fe(e,"durationchange",()=>{Number.isFinite(e.duration)&&i.off(B.Events.LEVELS_UPDATED,p)}))}),i.on(B.Events.ERROR,(h,c)=>{var v,E;let g=Lb(c,t);if(g.muxCode===x.NETWORK_NOT_READY){let y=(v=de.get(e))!=null?v:{},T=(E=y.retryCount)!=null?E:0;if(T<6){let _=T===0?5e3:6e4,S=new R(`Retrying in ${_/1e3} seconds...`,g.code,g.fatal);Object.assign(S,g),je(e,S),setTimeout(()=>{y.retryCount=T+1,c.details==="manifestLoadError"&&c.url&&i.loadSource(c.url)},_);return}else{y.retryCount=0;let _=new R('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',g.code,g.fatal);Object.assign(_,g),je(e,_);return}}je(e,g)}),i.on(B.Events.MANIFEST_LOADED,()=>{let h=de.get(e);h&&h.error&&(h.error=null,h.retryCount=0,e.dispatchEvent(new Event("emptied")),e.dispatchEvent(new Event("loadstart")))}),e.addEventListener("error",Cl),fe(e,"waiting",l),B_(t,i),W_(e,i),i.attachMedia(e)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")};function Bm(t){var e;let i=t.target,a=(e=de.get(i))==null?void 0:e.startTime;if(a&&R_(i.seekable,i.duration,a)){let r=i.preload==="auto";r&&(i.preload="none"),i.currentTime=a,r&&(i.preload="auto")}}async function Wm(t){if(!t.isTrusted)return;t.stopImmediatePropagation();let e=t.target;if(!(e!=null&&e.error))return;let{message:i,code:a}=e.error,r=new R(i,a);if(e.src&&a===R.MEDIA_ERR_SRC_NOT_SUPPORTED&&e.readyState===HTMLMediaElement.HAVE_NOTHING){setTimeout(()=>{var n;let s=(n=Mm(e))!=null?n:e.error;s?.code===R.MEDIA_ERR_SRC_NOT_SUPPORTED&&je(e,r)},500);return}if(e.src&&(a!==R.MEDIA_ERR_DECODE||a!==void 0))try{let{status:n}=await fetch(e.src);r.data={response:{code:n}}}catch{}je(e,r)}function je(t,e){var i;e.fatal&&(((i=de.get(t))!=null?i:{}).error=e,t.dispatchEvent(new CustomEvent("error",{detail:e})))}function Cl(t){var e,i;if(!(t instanceof CustomEvent)||!(t.detail instanceof R))return;let a=t.target,r=t.detail;!r||!r.fatal||(((e=de.get(a))!=null?e:{}).error=r,(i=a.mux)==null||i.emit("error",{player_error_code:r.code,player_error_message:r.message,player_error_context:r.context}))}var Lb=(t,e)=>{var i,a,r;t.fatal?console.error("getErrorFromHlsErrorData()",t):e.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",t);let n={[B.ErrorTypes.NETWORK_ERROR]:R.MEDIA_ERR_NETWORK,[B.ErrorTypes.MEDIA_ERROR]:R.MEDIA_ERR_DECODE,[B.ErrorTypes.KEY_SYSTEM_ERROR]:R.MEDIA_ERR_ENCRYPTED},s=m=>[B.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(m.details)?R.MEDIA_ERR_NETWORK:n[m.type],o=m=>{if(m.type===B.ErrorTypes.KEY_SYSTEM_ERROR)return te.DRM;if(m.type===B.ErrorTypes.NETWORK_ERROR)return te.VIDEO},l,d=s(t);if(d===R.MEDIA_ERR_NETWORK&&t.response){let m=(i=o(t))!=null?i:te.VIDEO;l=(a=to(t.response,m,e,t.fatal))!=null?a:new R("",d,t.fatal)}else if(d===R.MEDIA_ERR_ENCRYPTED)if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE){let m=D("Attempting to play DRM-protected content without providing a DRM token.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_MISSING_TOKEN}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_ACCESS){let m=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_SESSION){let m=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,!0),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED){let m=D("Failed to update DRM license. This may be an issue with the player or your protected content.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED){let m=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR){let m=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_CDM_ERROR}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED){let m=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,!1),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}else l=new R(t.error.message,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_ERROR;else l=new R("",d,t.fatal);return l.context||(l.context=`${t.url?`url: ${t.url}
20
+ `:""}${t.response&&(t.response.code||t.response.text)?`response: ${t.response.code}, ${t.response.text}
21
+ `:""}${t.reason?`failure reason: ${t.reason}
22
+ `:""}${t.level?`level: ${t.level}
23
+ `:""}${t.parent?`parent stream controller: ${t.parent}
24
+ `:""}${t.buffer?`buffer length: ${t.buffer}
25
+ `:""}${t.error?`error: ${t.error}
26
+ `:""}${t.event?`event: ${t.event}
27
+ `:""}${t.err?`error message: ${(r=t.err)==null?void 0:r.message}
28
+ `:""}`),l.data=t,l},Fm=t=>{throw TypeError(t)},zd=(t,e,i)=>e.has(t)||Fm("Cannot "+i),De=(t,e,i)=>(zd(t,e,"read from private field"),i?i.call(t):e.get(t)),ut=(t,e,i)=>e.has(t)?Fm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),at=(t,e,i,a)=>(zd(t,e,"write to private field"),e.set(t,i),i),kn=(t,e,i)=>(zd(t,e,"access private method"),i),Db=()=>{try{return"0.29.1"}catch{}return"UNKNOWN"},Mb=Db(),xb=()=>Mb,Ob=`
29
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,b={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo"},Nb=Object.values(b),Oc=xb(),Nc="mux-video",It,Sr,qn,wr,Yn,Gn,Qn,zn,Zn,Ir,va,Rr,Pb=class extends Tn{constructor(){super(),ut(this,va),ut(this,It),ut(this,Sr),ut(this,qn),ut(this,wr,{}),ut(this,Yn,{}),ut(this,Gn),ut(this,Qn),ut(this,zn),ut(this,Zn),ut(this,Ir,""),at(this,qn,qd()),this.nativeEl.addEventListener("muxmetadata",e=>{var i;let a=fb(this.nativeEl),r=(i=this.metadata)!=null?i:{};this.metadata={...a,...r},a?.["com.mux.video.branding"]==="mux-free-plan"&&(at(this,Ir,"default"),this.updateLogo())})}static get NAME(){return Nc}static get VERSION(){return Oc}static get observedAttributes(){var e;return[...Nb,...(e=Tn.observedAttributes)!=null?e:[]]}static getLogoHTML(e){return!e||e==="false"?"":e==="default"?Ob:`<img part="logo" src="${e}" />`}static getTemplateHTML(e={}){var i;return`
30
+ ${Tn.getTemplateHTML(e)}
31
+ <style>
32
+ :host {
33
+ position: relative;
34
+ }
35
+ slot[name="logo"] {
36
+ display: flex;
37
+ justify-content: end;
38
+ position: absolute;
39
+ top: 1rem;
40
+ right: 1rem;
41
+ opacity: 0;
42
+ transition: opacity 0.25s ease-in-out;
43
+ z-index: 1;
44
+ }
45
+ slot[name="logo"]:has([part="logo"]) {
46
+ opacity: 1;
47
+ }
48
+ slot[name="logo"] [part="logo"] {
49
+ width: 5rem;
50
+ pointer-events: none;
51
+ user-select: none;
52
+ }
53
+ </style>
54
+ <slot name="logo">
55
+ ${this.getLogoHTML((i=e[b.LOGO])!=null?i:"")}
56
+ </slot>
57
+ `}get preferCmcd(){var e;return(e=this.getAttribute(b.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?eo.includes(e)?this.setAttribute(b.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${eo.join()}`):this.removeAttribute(b.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?+this.getAttribute(b.PLAYER_INIT_TIME):De(this,qn)}set playerInitTime(e){e!=this.playerInitTime&&(e==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return(e=De(this,zn))!=null?e:Nc}set playerSoftwareName(e){at(this,zn,e)}get playerSoftwareVersion(){var e;return(e=De(this,Qn))!=null?e:Oc}set playerSoftwareVersion(e){at(this,Qn,e)}get _hls(){var e;return(e=De(this,It))==null?void 0:e.engine}get mux(){var e;return(e=this.nativeEl)==null?void 0:e.mux}get error(){var e;return(e=Mm(this.nativeEl))!=null?e:null}get errorTranslator(){return De(this,Zn)}set errorTranslator(e){at(this,Zn,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(e==null?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return(e=this.getAttribute(b.TYPE))!=null?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(b.TYPE,e):this.removeAttribute(b.TYPE))}get preload(){let e=this.getAttribute("preload");return e===""?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return this.getAttribute(b.DEBUG)!=null}set debug(e){e!==this.debug&&(e?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG))}get disableTracking(){return this.hasAttribute(b.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(b.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(b.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(b.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(b.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(b.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(b.START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set startTime(e){e!==this.startTime&&(e==null?this.removeAttribute(b.START_TIME):this.setAttribute(b.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(b.PLAYBACK_ID)?this.getAttribute(b.PLAYBACK_ID):(e=Yd(this.src))!=null?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(b.PLAYBACK_ID,e):this.removeAttribute(b.PLAYBACK_ID))}get maxResolution(){var e;return(e=this.getAttribute(b.MAX_RESOLUTION))!=null?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(b.MAX_RESOLUTION,e):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var e;return(e=this.getAttribute(b.MIN_RESOLUTION))!=null?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(b.MIN_RESOLUTION,e):this.removeAttribute(b.MIN_RESOLUTION))}get maxAutoResolution(){var e;return(e=this.getAttribute(b.MAX_AUTO_RESOLUTION))!=null?e:void 0}set maxAutoResolution(e){e==null?this.removeAttribute(b.MAX_AUTO_RESOLUTION):this.setAttribute(b.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return(e=this.getAttribute(b.RENDITION_ORDER))!=null?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(b.RENDITION_ORDER,e):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(b.PROGRAM_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programStartTime(e){e==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(b.PROGRAM_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programEndTime(e){e==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(b.ASSET_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetStartTime(e){e==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(b.ASSET_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetEndTime(e){e==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return(e=this.getAttribute(b.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(b.CUSTOM_DOMAIN,e):this.removeAttribute(b.CUSTOM_DOMAIN))}get drmToken(){var e;return(e=this.getAttribute(b.DRM_TOKEN))!=null?e:void 0}set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(b.DRM_TOKEN,e):this.removeAttribute(b.DRM_TOKEN))}get playbackToken(){var e,i,a,r;if(this.hasAttribute(b.PLAYBACK_TOKEN))return(e=this.getAttribute(b.PLAYBACK_TOKEN))!=null?e:void 0;if(this.hasAttribute(b.PLAYBACK_ID)){let[,n]=Bd((i=this.playbackId)!=null?i:"");return(a=new URLSearchParams(n).get("token"))!=null?a:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(b.PLAYBACK_TOKEN,e):this.removeAttribute(b.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(b.PLAYBACK_TOKEN),i=this.getAttribute(b.DRM_TOKEN);return{...De(this,Yn),...e!=null?{playback:e}:{},...i!=null?{drm:i}:{}}}set tokens(e){at(this,Yn,e??{})}get ended(){return Nm(this.nativeEl,this._hls)}get envKey(){var e;return(e=this.getAttribute(b.ENV_KEY))!=null?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(b.ENV_KEY,e):this.removeAttribute(b.ENV_KEY))}get beaconCollectionDomain(){var e;return(e=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return(e=this.getAttribute(b.STREAM_TYPE))!=null?e:Rl(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(b.STREAM_TYPE,e):this.removeAttribute(b.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(b.TARGET_LIVE_WINDOW)?+this.getAttribute(b.TARGET_LIVE_WINDOW):Eb(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(e==null?this.removeAttribute(b.TARGET_LIVE_WINDOW):this.setAttribute(b.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,i;if(this.hasAttribute(b.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:a}=this,r=(e=this.nativeEl.seekable.end(0))!=null?e:0,n=(i=this.nativeEl.seekable.start(0))!=null?i:0;return Math.max(n,r-a)}return _b(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(b.LIVE_EDGE_OFFSET))return+this.getAttribute(b.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(e==null?this.removeAttribute(b.LIVE_EDGE_OFFSET):this.setAttribute(b.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return Gd(this.nativeEl)}async addCuePoints(e){return Sm(this.nativeEl,e)}get activeCuePoint(){return wm(this.nativeEl)}get cuePoints(){return K_(this.nativeEl)}async addChapters(e){return Rm(this.nativeEl,e)}get activeChapter(){return Cm(this.nativeEl)}get chapters(){return q_(this.nativeEl)}getStartDate(){return G_(this.nativeEl,this._hls)}get currentPdt(){return Q_(this.nativeEl,this._hls)}get preferPlayback(){let e=this.getAttribute(b.PREFER_PLAYBACK);if(e===Wt.MSE||e===Wt.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===Wt.MSE||e===Wt.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,e):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![b.METADATA_URL].includes(e)).reduce((e,i)=>{let a=this.getAttribute(i);return a!=null&&(e[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),e},{}),...De(this,wr)}}set metadata(e){at(this,wr,e??{}),this.mux&&this.mux.emit("hb",De(this,wr))}get _hlsConfig(){return De(this,Gn)}set _hlsConfig(e){at(this,Gn,e)}get logo(){var e;return(e=this.getAttribute(b.LOGO))!=null?e:De(this,Ir)}set logo(e){e?this.setAttribute(b.LOGO,e):this.removeAttribute(b.LOGO)}load(){at(this,It,yb(this,this.nativeEl,De(this,It)))}unload(){Pm(this.nativeEl,De(this,It),this),at(this,It,void 0)}attributeChangedCallback(e,i,a){var r,n;switch(Tn.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,i,a),e){case b.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=a??void 0;break;case b.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=a??void 0;break;case"src":{let s=!!i,o=!!a;!s&&o?kn(this,va,Rr).call(this):s&&!o?this.unload():s&&o&&(this.unload(),kn(this,va,Rr).call(this));break}case"autoplay":if(a===i)break;(r=De(this,It))==null||r.setAutoplay(this.autoplay);break;case"preload":if(a===i)break;(n=De(this,It))==null||n.setPreload(a);break;case b.PLAYBACK_ID:this.src=Il(this);break;case b.DEBUG:{let s=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=s);break}case b.METADATA_URL:a&&fetch(a).then(s=>s.json()).then(s=>this.metadata=s).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${a}!`));break;case b.STREAM_TYPE:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case b.TARGET_LIVE_WINDOW:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case b.LOGO:(a==null||a!==i)&&this.updateLogo();break;case b.DISABLE_TRACKING:{if(a==null||a!==i){let s=this.currentTime,o=this.paused;this.unload(),kn(this,va,Rr).call(this).then(()=>{this.currentTime=s,o||this.play()})}break}case b.DISABLE_COOKIES:{(a==null||a!==i)&&this.disableCookies&&document.cookie.split(";").forEach(s=>{s.trim().startsWith("muxData")&&(document.cookie=s.replace(/^ +/,"").replace(/=.*/,"=;expires="+new Date().toUTCString()+";path=/"))});break}}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');if(!e)return;let i=this.constructor.getLogoHTML(De(this,Ir)||this.logo);e.innerHTML=i}connectedCallback(){var e;(e=super.connectedCallback)==null||e.call(this),this.nativeEl&&this.src&&!De(this,It)&&kn(this,va,Rr).call(this)}disconnectedCallback(){this.unload()}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};It=new WeakMap,Sr=new WeakMap,qn=new WeakMap,wr=new WeakMap,Yn=new WeakMap,Gn=new WeakMap,Qn=new WeakMap,zn=new WeakMap,Zn=new WeakMap,Ir=new WeakMap,va=new WeakSet,Rr=async function(){De(this,Sr)||(await at(this,Sr,Promise.resolve()),at(this,Sr,null),this.load())};const zi=new WeakMap;class il extends Error{}class Ub extends Error{}const $b=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"],Hb=globalThis.WeakRef?class extends Set{add(t){super.add(new WeakRef(t))}forEach(t){super.forEach(e=>{const i=e.deref();i&&t(i)})}}:Set;function Bb(t){globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?t():customElements.whenDefined("google-cast-button").then(t):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(t)}}function Wb(){return globalThis.chrome}function Fb(){const t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${t}"]`))return;const e=document.createElement("script");e.src=t,document.head.append(e)}function Ti(){return globalThis.cast?.framework?.CastContext.getInstance()}function Zd(){return Ti()?.getCurrentSession()}function jd(){return Zd()?.getSessionObj().media[0]}function Kb(t){return new Promise((e,i)=>{jd().editTracksInfo(t,e,i)})}function Vb(t){return new Promise((e,i)=>{jd().getStatus(t,e,i)})}function Pc(t){return Ti().setOptions({...Km(),...t})}function Km(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}function qb(t){if(!t)return;const e=/\.([a-zA-Z0-9]+)(?:\?.*)?$/,i=t.match(e);return i?i[1]:null}function Yb(t){const e=t.split(`
58
+ `),i=[];for(let a=0;a<e.length;a++)if(e[a].trim().startsWith("#EXT-X-STREAM-INF")){const n=e[a+1]?e[a+1].trim():"";n&&!n.startsWith("#")&&i.push(n)}return i}function Gb(t){return t.split(`
59
+ `).find(a=>!a.trim().startsWith("#")&&a.trim()!=="")}async function Qb(t){try{const i=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return $b.some(a=>i===a)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function zb(t){try{const e=await(await fetch(t)).text();let i=e;const a=Yb(e);if(a.length>0){const s=new URL(a[0],t).toString();i=await(await fetch(s)).text()}const r=Gb(i);return qb(r)}catch(e){console.error("Error while trying to parse the manifest playlist",e);return}}const jn=new Hb,oi=new WeakSet;let Te;Bb(()=>{if(!globalThis.chrome?.cast?.isAvailable){console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable);return}Te||(Te=cast.framework,Ti().addEventListener(Te.CastContextEventType.CAST_STATE_CHANGED,t=>{jn.forEach(e=>zi.get(e).onCastStateChanged?.(t))}),Ti().addEventListener(Te.CastContextEventType.SESSION_STATE_CHANGED,t=>{jn.forEach(e=>zi.get(e).onSessionStateChanged?.(t))}),jn.forEach(t=>zi.get(t).init?.()))});let Uc=0;class Zb extends EventTarget{#t;#s;#i;#a;#e="disconnected";#r=!1;#o=new Set;#c=new WeakMap;constructor(e){super(),this.#t=e,jn.add(this),zi.set(this,{init:()=>this.#d(),onCastStateChanged:()=>this.#l(),onSessionStateChanged:()=>this.#p(),getCastPlayer:()=>this.#n}),this.#d()}get#n(){if(oi.has(this.#t))return this.#i}get state(){return this.#e}async watchAvailability(e){if(this.#t.disableRemotePlayback)throw new il("disableRemotePlayback attribute is present.");return this.#c.set(e,++Uc),this.#o.add(e),queueMicrotask(()=>e(this.#m())),Uc}async cancelWatchAvailability(e){if(this.#t.disableRemotePlayback)throw new il("disableRemotePlayback attribute is present.");e?this.#o.delete(e):this.#o.clear()}async prompt(){if(this.#t.disableRemotePlayback)throw new il("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new Ub("The RemotePlayback API is disabled on this platform.");const e=oi.has(this.#t);oi.add(this.#t),Pc(this.#t.castOptions),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await Ti().requestSession()}catch(i){if(e||oi.delete(this.#t),i==="cancel")return;throw new Error(i)}zi.get(this.#t)?.loadOnPrompt?.()}#h(){oi.has(this.#t)&&(Object.entries(this.#a).forEach(([e,i])=>{this.#i.controller.removeEventListener(e,i)}),oi.delete(this.#t),this.#t.muted=this.#i.isMuted,this.#t.currentTime=this.#i.savedPlayerState.currentTime,this.#i.savedPlayerState.isPaused===!1&&this.#t.play())}#m(){const e=Ti()?.getCastState();return e&&e!=="NO_DEVICES_AVAILABLE"}#l(){const e=Ti().getCastState();if(oi.has(this.#t)&&e==="CONNECTING"&&(this.#e="connecting",this.dispatchEvent(new Event("connecting"))),!this.#r&&e?.includes("CONNECT")){this.#r=!0;for(let i of this.#o)i(!0)}else if(this.#r&&(!e||e==="NO_DEVICES_AVAILABLE")){this.#r=!1;for(let i of this.#o)i(!1)}}async#p(){const{SESSION_RESUMED:e}=Te.SessionState;if(Ti().getSessionState()===e&&this.#t.castSrc===jd()?.media.contentId){oi.add(this.#t),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await Vb(new chrome.cast.media.GetStatusRequest)}catch(i){console.error(i)}this.#a[Te.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#a[Te.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#d(){!Te||this.#s||(this.#s=!0,Pc(this.#t.castOptions),this.#t.textTracks.addEventListener("change",()=>this.#u()),this.#l(),this.#i=new Te.RemotePlayer,new Te.RemotePlayerController(this.#i),this.#a={[Te.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{e===!0?(this.#e="connected",this.dispatchEvent(new Event("connect"))):(this.#h(),this.#e="disconnected",this.dispatchEvent(new Event("disconnect")))},[Te.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#t.dispatchEvent(new Event("durationchange"))},[Te.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[Te.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[Te.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#n?.isMediaLoaded&&this.#t.dispatchEvent(new Event("timeupdate"))},[Te.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#t.dispatchEvent(new Event("resize"))},[Te.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#t.dispatchEvent(new Event(this.paused?"pause":"play"))},[Te.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#n?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#t.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#n?.playerState]))},[Te.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#n?.isMediaLoaded&&(await Promise.resolve(),this.#v())}})}#v(){this.#u()}async#u(){if(!this.#n)return;const i=(this.#i.mediaInfo?.tracks??[]).filter(({type:p})=>p===chrome.cast.media.TrackType.TEXT),a=[...this.#t.textTracks].filter(({kind:p})=>p==="subtitles"||p==="captions"),r=i.map(({language:p,name:h,trackId:c})=>{const{mode:v}=a.find(E=>E.language===p&&E.label===h)??{};return v?{mode:v,trackId:c}:!1}).filter(Boolean),s=r.filter(({mode:p})=>p!=="showing").map(({trackId:p})=>p),o=r.find(({mode:p})=>p==="showing"),l=Zd()?.getSessionObj().media[0]?.activeTrackIds??[];let d=l;if(l.length&&(d=d.filter(p=>!s.includes(p))),o?.trackId&&(d=[...d,o.trackId]),d=[...new Set(d)],!((p,h)=>p.length===h.length&&p.every(c=>h.includes(c)))(l,d))try{const p=new chrome.cast.media.EditTracksInfoRequest(d);await Kb(p)}catch(p){console.error(p)}}}const jb=t=>class extends t{static observedAttributes=[...t.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#t={paused:!1};#s=Km();#i;#a;get remote(){return this.#a?this.#a:Wb()?(this.disableRemotePlayback||Fb(),zi.set(this,{loadOnPrompt:()=>this.#r()}),this.#a=new Zb(this)):super.remote}get#e(){return zi.get(this.remote)?.getCastPlayer?.()}attributeChangedCallback(i,a,r){if(super.attributeChangedCallback(i,a,r),i==="cast-receiver"&&r){this.#s.receiverApplicationId=r;return}if(this.#e)switch(i){case"cast-stream-type":case"cast-src":this.load();break}}async#r(){this.#t.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(i){console.error(i)}}async load(){if(!this.#e)return super.load();const i=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);i.customData=this.castCustomData;const a=[...this.querySelectorAll("track")].filter(({kind:o,src:l})=>l&&(o==="subtitles"||o==="captions")),r=[];let n=0;if(a.length&&(i.tracks=a.map(o=>{const l=++n;r.length===0&&o.track.mode==="showing"&&r.push(l);const d=new chrome.cast.media.Track(l,chrome.cast.media.TrackType.TEXT);return d.trackContentId=o.src,d.trackContentType="text/vtt",d.subtype=o.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,d.name=o.label,d.language=o.srclang,d})),this.castStreamType==="live"?i.streamType=chrome.cast.media.StreamType.LIVE:i.streamType=chrome.cast.media.StreamType.BUFFERED,i.metadata=new chrome.cast.media.GenericMediaMetadata,i.metadata.title=this.title,i.metadata.images=[{url:this.poster}],Qb(this.castSrc)){const o=await zb(this.castSrc);o?.includes("m4s")||o?.includes("mp4")?(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):o?.includes("ts")&&(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}const s=new chrome.cast.media.LoadRequest(i);s.currentTime=super.currentTime??0,s.autoplay=!this.#t.paused,s.activeTrackIds=r,await Zd()?.loadMedia(s),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#e){this.#e.isPaused&&this.#e.controller?.playOrPause();return}return super.play()}pause(){if(this.#e){this.#e.isPaused||this.#e.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#s}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(i){this.castReceiver!=i&&this.setAttribute("cast-receiver",`${i}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(i){this.castSrc!=i&&this.setAttribute("cast-src",`${i}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(i){this.setAttribute("cast-content-type",`${i}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(i){this.setAttribute("cast-stream-type",`${i}`)}get castCustomData(){return this.#i}set castCustomData(i){const a=typeof i;if(!["object","undefined"].includes(a)){console.error(`castCustomData must be nullish or an object but value was of type ${a}`);return}this.#i=i}get readyState(){if(this.#e)switch(this.#e.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.#e?this.#e.isPaused:super.paused}get muted(){return this.#e?this.#e?.isMuted:super.muted}set muted(i){if(this.#e){(i&&!this.#e.isMuted||!i&&this.#e.isMuted)&&this.#e.controller?.muteOrUnmute();return}super.muted=i}get volume(){return this.#e?this.#e?.volumeLevel??1:super.volume}set volume(i){if(this.#e){this.#e.volumeLevel=+i,this.#e.controller?.setVolumeLevel();return}super.volume=i}get duration(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.duration??NaN:super.duration}get currentTime(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.currentTime??0:super.currentTime}set currentTime(i){if(this.#e){this.#e.currentTime=i,this.#e.controller?.seek();return}super.currentTime=i}};var Vm=t=>{throw TypeError(t)},qm=(t,e,i)=>e.has(t)||Vm("Cannot "+i),Xb=(t,e,i)=>(qm(t,e,"read from private field"),i?i.call(t):e.get(t)),Jb=(t,e,i)=>e.has(t)?Vm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),eg=(t,e,i,a)=>(qm(t,e,"write to private field"),e.set(t,i),i),Ym=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment>"u"){class t extends Ym{}globalThis.DocumentFragment=t}var tg=class extends Ym{},ig={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(tg)}},ag={customElements:ig},rg=typeof window>"u"||typeof globalThis.customElements>"u",al=rg?ag:globalThis,Xn,$c=class extends jb(uf(Pb)){constructor(){super(...arguments),Jb(this,Xn)}get autoplay(){let t=this.getAttribute("autoplay");return t===null?!1:t===""?!0:t}set autoplay(t){let e=this.autoplay;t!==e&&(t?this.setAttribute("autoplay",typeof t=="string"?t:""):this.removeAttribute("autoplay"))}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var t;return(t=Xb(this,Xn))!=null?t:this.muxCastCustomData}set castCustomData(t){eg(this,Xn,t)}};Xn=new WeakMap;al.customElements.get("mux-video")||(al.customElements.define("mux-video",$c),al.MuxVideoElement=$c);const I={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},q={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},Gm={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Qm=Object.entries(Gm),u=Qm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),ng={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},ri=Qm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...ng});Object.entries(ri).reduce((t,[e,i])=>{const a=u[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"});const sg=Object.entries(u).reduce((t,[e,i])=>{const a=ri[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),Vt={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},Ka={DISABLED:"disabled",SHOWING:"showing"},rl={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Ye={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},Xt={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},og={FULLSCREEN:"fullscreen"};function lg(t){return t?.map(ug).join(" ")}function dg(t){return t?.split(/\s+/).map(cg)}function ug(t){if(t){const{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function cg(t){if(t){const[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function hg(t){return t?.map(pg).join(" ")}function mg(t){return t?.split(/\s+/).map(vg)}function pg(t){if(t){const{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(n=>n!=null).join(":")}}function vg(t){if(t){const[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function fg(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function Xd(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function zm(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}const Zm=t=>new Promise(e=>setTimeout(e,t)),Hc=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Eg=(t,e)=>{const i=t===1?Hc[e].singular:Hc[e].plural;return`${t} ${i}`},Gr=t=>{if(!Xd(t))return"";const e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((o,l)=>o&&Eg(o,l)).filter(o=>o).join(", ")}${i?" remaining":""}`};function ki(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;let a=Math.floor(t%60),r=Math.floor(t/60%60),n=Math.floor(t/3600);const s=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(n=r=a="0"),n=n>0||o>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(i?"-":"")+n+r+a}const _g={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."};var Bc;const nl={en:_g};let Ll=((Bc=globalThis.navigator)==null?void 0:Bc.language)||"en";const bg=t=>{Ll=t},gg=t=>{var e,i,a;const[r]=Ll.split("-");return((e=nl[Ll])==null?void 0:e[t])||((i=nl[r])==null?void 0:i[t])||((a=nl.en)==null?void 0:a[t])||t},L=(t,e={})=>gg(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);let jm=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}};class Xm extends jm{}let Wc=class extends Xm{constructor(){super(...arguments),this.role=null}};class yg{observe(){}unobserve(){}disconnect(){}}const Jm={createElement:function(){return new nn.HTMLElement},createElementNS:function(){return new nn.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},nn={ResizeObserver:yg,document:Jm,Node:Xm,Element:Wc,HTMLElement:class extends Wc{constructor(){super(...arguments),this.innerHTML=""}get content(){return new nn.DocumentFragment}},DocumentFragment:class extends jm{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},ep="global"in globalThis&&globalThis?.global===globalThis||typeof window>"u"||typeof window.customElements>"u",tp=Object.keys(nn).every(t=>t in globalThis),f=ep&&!tp?nn:globalThis,ge=ep&&!tp?Jm:globalThis.document,Fc=new WeakMap,Jd=t=>{let e=Fc.get(t);return e||Fc.set(t,e=new Set),e},ip=new f.ResizeObserver(t=>{for(const e of t)for(const i of Jd(e.target))i(e)});function Xa(t,e){Jd(t).add(e),ip.observe(t)}function Ja(t,e){const i=Jd(t);i.delete(e),i.size||ip.unobserve(t)}function Je(t){const e={};for(const i of t)e[i.name]=i.value;return e}function Be(t){var e;return(e=Dl(t))!=null?e:rr(t,"media-controller")}function Dl(t){var e;const{MEDIA_CONTROLLER:i}=q,a=t.getAttribute(i);if(a)return(e=Do(t))==null?void 0:e.getElementById(a)}const ap=(t,e,i=".value")=>{const a=t.querySelector(i);a&&(a.textContent=e)},Tg=(t,e)=>{const i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},rp=(t,e)=>Tg(t,e)[0],si=(t,e)=>!t||!e?!1:t?.contains(e)?!0:si(t,e.getRootNode().host),rr=(t,e)=>{if(!t)return null;const i=t.closest(e);return i||rr(t.getRootNode().host,e)};function eu(t=document){var e;const i=t?.activeElement;return i?(e=eu(i.shadowRoot))!=null?e:i:null}function Do(t){var e;const i=(e=t?.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function np(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){const n=getComputedStyle(r);if(i&&n.opacity==="0"||a&&n.visibility==="hidden"||n.display==="none")return!1;r=r.parentElement,e--}return!0}function Ag(t,e,i,a){const r=a.x-i.x,n=a.y-i.y,s=r*r+n*n;if(s===0)return 0;const o=((t-i.x)*r+(e-i.y)*n)/s;return Math.max(0,Math.min(1,o))}function Ae(t,e){const i=kg(t,a=>a===e);return i||tu(t,e)}function kg(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let n;try{n=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(const s of n??[])if(e(s.selectorText))return s}}function tu(t,e){var i,a;const r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],n=r?.[r.length-1];return n?.sheet?(n?.sheet.insertRule(`${e}{}`,n.sheet.cssRules.length),(a=n.sheet.cssRules)==null?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ie(t,e,i=Number.NaN){const a=t.getAttribute(e);return a!=null?+a:i}function ue(t,e,i){const a=+i;if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}ie(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function W(t,e){return t.hasAttribute(e)}function F(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}W(t,e)!=i&&t.toggleAttribute(e,i)}function ae(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function re(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}const a=`${i}`;ae(t,e,void 0)!==a&&t.setAttribute(e,a)}var sp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},li=(t,e,i)=>(sp(t,e,"read from private field"),i?i.call(t):e.get(t)),Sg=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Sn=(t,e,i,a)=>(sp(t,e,"write to private field"),e.set(t,i),i),$e;function wg(t){return`
60
+ <style>
61
+ :host {
62
+ display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
63
+ box-sizing: border-box;
64
+ }
65
+ </style>
66
+ `}class Mo extends f.HTMLElement{constructor(){if(super(),Sg(this,$e,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER,u.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER&&(i&&((n=(r=li(this,$e))==null?void 0:r.unassociateElement)==null||n.call(r,this),Sn(this,$e,null)),a&&this.isConnected&&(Sn(this,$e,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=li(this,$e))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Sn(this,$e,Ig(this)),this.getAttribute(q.MEDIA_CONTROLLER)&&((i=(e=li(this,$e))==null?void 0:e.associateElement)==null||i.call(e,this)),(a=li(this,$e))==null||a.addEventListener("pointerdown",this),(r=li(this,$e))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,i,a,r;this.getAttribute(q.MEDIA_CONTROLLER)&&((i=(e=li(this,$e))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=li(this,$e))==null||a.removeEventListener("pointerdown",this),(r=li(this,$e))==null||r.removeEventListener("click",this),Sn(this,$e,null)}handleEvent(e){var i;const a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a?.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){const{clientX:n,clientY:s}=e,{left:o,top:l,width:d,height:m}=this.getBoundingClientRect(),p=n-o,h=s-l;if(p<0||h<0||p>d||h>m||d===0&&m===0)return;const c=this._pointerType||"mouse";if(this._pointerType=void 0,c===rl.TOUCH){this.handleTap(e);return}else if(c===rl.MOUSE||c===rl.PEN){this.handleMouseClick(e);return}}}}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const i=this.mediaPaused?I.MEDIA_PLAY_REQUEST:I.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new f.CustomEvent(i,{composed:!0,bubbles:!0}))}}$e=new WeakMap;Mo.shadowRootOptions={mode:"open"};Mo.getTemplateHTML=wg;function Ig(t){var e;const i=t.getAttribute(q.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):rr(t,"media-controller")}f.customElements.get("media-gesture-receiver")||f.customElements.define("media-gesture-receiver",Mo);var Kc=Mo,iu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ze=(t,e,i)=>(iu(t,e,"read from private field"),i?i.call(t):e.get(t)),Ge=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mi=(t,e,i,a)=>(iu(t,e,"write to private field"),e.set(t,i),i),st=(t,e,i)=>(iu(t,e,"access private method"),i),io,fa,sn,Ua,Jn,Ml,op,Cr,es,xl,lp,Ol,dp,on,xo,Oo,au,er,ln;const M={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function Rg(t){return`
67
+ <style>
68
+
69
+ :host([${u.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
70
+ outline: none;
71
+ }
72
+
73
+ :host {
74
+ box-sizing: border-box;
75
+ position: relative;
76
+ display: inline-block;
77
+ line-height: 0;
78
+ background-color: var(--media-background-color, #000);
79
+ overflow: hidden;
80
+ }
81
+
82
+ :host(:not([${M.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
83
+ position: absolute;
84
+ top: 0;
85
+ left: 0;
86
+ bottom: 0;
87
+ right: 0;
88
+ display: flex;
89
+ flex-flow: column nowrap;
90
+ align-items: start;
91
+ pointer-events: none;
92
+ background: none;
93
+ }
94
+
95
+ slot[name=media] {
96
+ display: var(--media-slot-display, contents);
97
+ }
98
+
99
+
100
+ :host([${M.AUDIO}]) slot[name=media] {
101
+ display: var(--media-slot-display, none);
102
+ }
103
+
104
+
105
+ :host([${M.AUDIO}]) [part~=layer][part~=gesture-layer] {
106
+ height: 0;
107
+ display: block;
108
+ }
109
+
110
+
111
+ :host(:not([${M.AUDIO}])[${M.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
112
+ :host(:not([${M.AUDIO}])[${M.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
113
+ display: none;
114
+ }
115
+
116
+
117
+ ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {
118
+ pointer-events: auto;
119
+ }
120
+
121
+ :host(:not([${M.AUDIO}])) *[part~=layer][part~=centered-layer] {
122
+ align-items: center;
123
+ justify-content: center;
124
+ }
125
+
126
+ :host(:not([${M.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
127
+ :host(:not([${M.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
128
+ align-self: stretch;
129
+ flex-grow: 1;
130
+ }
131
+
132
+ slot[name=middle-chrome] {
133
+ display: inline;
134
+ flex-grow: 1;
135
+ pointer-events: none;
136
+ background: none;
137
+ }
138
+
139
+
140
+ ::slotted([slot=media]),
141
+ ::slotted([slot=poster]) {
142
+ width: 100%;
143
+ height: 100%;
144
+ }
145
+
146
+
147
+ :host(:not([${M.AUDIO}])) .spacer {
148
+ flex-grow: 1;
149
+ }
150
+
151
+
152
+ :host(:-webkit-full-screen) {
153
+
154
+ width: 100% !important;
155
+ height: 100% !important;
156
+ }
157
+
158
+
159
+ ::slotted(:not([slot=media]):not([slot=poster]):not([${M.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {
160
+ opacity: 1;
161
+ transition: var(--media-control-transition-in, opacity 0.25s);
162
+ }
163
+
164
+
165
+ :host([${M.USER_INACTIVE}]:not([${u.MEDIA_PAUSED}]):not([${u.MEDIA_IS_AIRPLAYING}]):not([${u.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${M.NO_AUTOHIDE}]):not([role=dialog])) {
166
+ opacity: 0;
167
+ transition: var(--media-control-transition-out, opacity 1s);
168
+ }
169
+
170
+ :host([${M.USER_INACTIVE}]:not([${M.NO_AUTOHIDE}]):not([${u.MEDIA_PAUSED}]):not([${u.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) ::slotted([slot=media]) {
171
+ cursor: none;
172
+ }
173
+
174
+ :host([${M.USER_INACTIVE}][${M.AUTOHIDE_OVER_CONTROLS}]:not([${M.NO_AUTOHIDE}]):not([${u.MEDIA_PAUSED}]):not([${u.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) * {
175
+ --media-cursor: none;
176
+ cursor: none;
177
+ }
178
+
179
+
180
+ ::slotted(media-control-bar) {
181
+ align-self: stretch;
182
+ }
183
+
184
+
185
+ :host(:not([${M.AUDIO}])[${u.MEDIA_HAS_PLAYED}]) slot[name=poster] {
186
+ display: none;
187
+ }
188
+
189
+ ::slotted([role=dialog]) {
190
+ width: 100%;
191
+ height: 100%;
192
+ align-self: center;
193
+ }
194
+
195
+ ::slotted([role=menu]) {
196
+ align-self: end;
197
+ }
198
+ </style>
199
+
200
+ <slot name="media" part="layer media-layer"></slot>
201
+ <slot name="poster" part="layer poster-layer"></slot>
202
+ <slot name="gestures-chrome" part="layer gesture-layer">
203
+ <media-gesture-receiver slot="gestures-chrome">
204
+ <template shadowrootmode="${Kc.shadowRootOptions.mode}">
205
+ ${Kc.getTemplateHTML({})}
206
+ </template>
207
+ </media-gesture-receiver>
208
+ </slot>
209
+ <span part="layer vertical-layer">
210
+ <slot name="top-chrome" part="top chrome"></slot>
211
+ <slot name="middle-chrome" part="middle chrome"></slot>
212
+ <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>
213
+
214
+ <slot part="bottom chrome"></slot>
215
+ </span>
216
+ <slot name="dialog" part="layer dialog-layer"></slot>
217
+ `}const Cg=Object.values(u),Lg="sm:384 md:576 lg:768 xl:960";function Dg(t){up(t.target,t.contentRect.width)}function up(t,e){var i;if(!t.isConnected)return;const a=(i=t.getAttribute(M.BREAKPOINTS))!=null?i:Lg,r=Mg(a),n=xg(r,e);let s=!1;if(Object.keys(r).forEach(o=>{if(n.includes(o)){t.hasAttribute(`breakpoint${o}`)||(t.setAttribute(`breakpoint${o}`,""),s=!0);return}t.hasAttribute(`breakpoint${o}`)&&(t.removeAttribute(`breakpoint${o}`),s=!0)}),s){const o=new CustomEvent(ri.BREAKPOINTS_CHANGE,{detail:n});t.dispatchEvent(o)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(ri.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function Mg(t){const e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function xg(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}class No extends f.HTMLElement{constructor(){if(super(),Ge(this,Ml),Ge(this,xl),Ge(this,Ol),Ge(this,on),Ge(this,Oo),Ge(this,er),Ge(this,io,0),Ge(this,fa,null),Ge(this,sn,null),Ge(this,Ua,void 0),this.breakpointsComputed=!1,Ge(this,Jn,new MutationObserver(st(this,Ml,op).bind(this))),Ge(this,Cr,!1),Ge(this,es,i=>{Ze(this,Cr)||(setTimeout(()=>{Dg(i),Mi(this,Cr,!1)},0),Mi(this,Cr,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const i=Je(this.attributes),a=this.constructor.getTemplateHTML(i);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(a):this.shadowRoot.innerHTML=a}const e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){Ze(this,fa)&&this.mediaUnsetCallback(Ze(this,fa));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[M.AUTOHIDE,M.GESTURES_DISABLED].concat(Cg).filter(e=>![u.MEDIA_RENDITION_LIST,u.MEDIA_AUDIO_TRACK_LIST,u.MEDIA_CHAPTERS_CUES,u.MEDIA_WIDTH,u.MEDIA_HEIGHT,u.MEDIA_ERROR,u.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==M.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return e?.nodeName=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Mi(this,fa,e),e.localName.includes("-")&&await f.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;Ze(this,Jn).observe(this,{childList:!0,subtree:!0}),Xa(this,Ze(this,es));const i=this.getAttribute(M.AUDIO)!=null,a=L(i?"audio player":"video player");this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(M.USER_INACTIVE,""),up(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=f.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;Ze(this,Jn).disconnect(),Ja(this,Ze(this,es)),this.media&&this.mediaUnsetCallback(this.media),(e=f.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Mi(this,fa,null)}handleEvent(e){switch(e.type){case"pointerdown":Mi(this,io,e.timeStamp);break;case"pointermove":st(this,xl,lp).call(this,e);break;case"pointerup":st(this,Ol,dp).call(this,e);break;case"mouseleave":st(this,on,xo).call(this);break;case"mouseup":this.removeAttribute(M.KEYBOARD_CONTROL);break;case"keyup":st(this,er,ln).call(this),this.setAttribute(M.KEYBOARD_CONTROL,"");break}}set autohide(e){const i=Number(e);Mi(this,Ua,isNaN(i)?0:i)}get autohide(){return(Ze(this,Ua)===void 0?2:Ze(this,Ua)).toString()}get breakpoints(){return ae(this,M.BREAKPOINTS)}set breakpoints(e){re(this,M.BREAKPOINTS,e)}get audio(){return W(this,M.AUDIO)}set audio(e){F(this,M.AUDIO,e)}get gesturesDisabled(){return W(this,M.GESTURES_DISABLED)}set gesturesDisabled(e){F(this,M.GESTURES_DISABLED,e)}get keyboardControl(){return W(this,M.KEYBOARD_CONTROL)}set keyboardControl(e){F(this,M.KEYBOARD_CONTROL,e)}get noAutohide(){return W(this,M.NO_AUTOHIDE)}set noAutohide(e){F(this,M.NO_AUTOHIDE,e)}get autohideOverControls(){return W(this,M.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){F(this,M.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return W(this,M.USER_INACTIVE)}set userInteractive(e){F(this,M.USER_INACTIVE,e)}}io=new WeakMap;fa=new WeakMap;sn=new WeakMap;Ua=new WeakMap;Jn=new WeakMap;Ml=new WeakSet;op=function(t){const e=this.media;for(const i of t){if(i.type!=="childList")continue;const a=i.removedNodes;for(const r of a){if(r.slot!="media"||i.target!=this)continue;let n=i.previousSibling&&i.previousSibling.previousElementSibling;if(!n||!e)this.mediaUnsetCallback(r);else{let s=n.slot!=="media";for(;(n=n.previousSibling)!==null;)n.slot=="media"&&(s=!1);s&&this.mediaUnsetCallback(r)}}if(e)for(const r of i.addedNodes)r===e&&this.handleMediaUpdated(e)}};Cr=new WeakMap;es=new WeakMap;xl=new WeakSet;lp=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-Ze(this,io)<250)return;st(this,Oo,au).call(this),clearTimeout(Ze(this,sn));const e=this.hasAttribute(M.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&st(this,er,ln).call(this)};Ol=new WeakSet;dp=function(t){if(t.pointerType==="touch"){const e=!this.hasAttribute(M.USER_INACTIVE);[this,this.media].includes(t.target)&&e?st(this,on,xo).call(this):st(this,er,ln).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e?.localName))&&st(this,er,ln).call(this)};on=new WeakSet;xo=function(){if(Ze(this,Ua)<0||this.hasAttribute(M.USER_INACTIVE))return;this.setAttribute(M.USER_INACTIVE,"");const t=new f.CustomEvent(ri.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};Oo=new WeakSet;au=function(){if(!this.hasAttribute(M.USER_INACTIVE))return;this.removeAttribute(M.USER_INACTIVE);const t=new f.CustomEvent(ri.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};er=new WeakSet;ln=function(){st(this,Oo,au).call(this),clearTimeout(Ze(this,sn));const t=parseInt(this.autohide);t<0||Mi(this,sn,setTimeout(()=>{st(this,on,xo).call(this)},t*1e3))};No.shadowRootOptions={mode:"open"};No.getTemplateHTML=Rg;f.customElements.get("media-container")||f.customElements.define("media-container",No);var cp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ie=(t,e,i)=>(cp(t,e,"read from private field"),i?i.call(t):e.get(t)),hr=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},wn=(t,e,i,a)=>(cp(t,e,"write to private field"),e.set(t,i),i),Ea,_a,ao,Vi,zt,hi;class ru{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){hr(this,zt),hr(this,Ea,void 0),hr(this,_a,void 0),hr(this,ao,void 0),hr(this,Vi,new Set),wn(this,Ea,e),wn(this,_a,i),wn(this,ao,new Set(a))}[Symbol.iterator](){return Ie(this,zt,hi).values()}get length(){return Ie(this,zt,hi).size}get value(){var e;return(e=[...Ie(this,zt,hi)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(wn(this,Vi,new Set),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...Ie(this,zt,hi)][e]}values(){return Ie(this,zt,hi).values()}forEach(e,i){Ie(this,zt,hi).forEach(e,i)}add(...e){var i,a;e.forEach(r=>Ie(this,Vi).add(r)),!(this.value===""&&!((i=Ie(this,Ea))!=null&&i.hasAttribute(`${Ie(this,_a)}`)))&&((a=Ie(this,Ea))==null||a.setAttribute(`${Ie(this,_a)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>Ie(this,Vi).delete(a)),(i=Ie(this,Ea))==null||i.setAttribute(`${Ie(this,_a)}`,`${this.value}`)}contains(e){return Ie(this,zt,hi).has(e)}toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){return this.remove(e),this.add(i),e===i}}Ea=new WeakMap;_a=new WeakMap;ao=new WeakMap;Vi=new WeakMap;zt=new WeakSet;hi=function(){return Ie(this,Vi).size?Ie(this,Vi):Ie(this,ao)};const Og=(t="")=>t.split(/\s+/),hp=(t="")=>{const[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?Vt.CAPTIONS:Vt.SUBTITLES,language:i,label:r}},Po=(t="",e={})=>Og(t).map(i=>{const a=hp(i);return{...e,...a}}),mp=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?hp(e):e):typeof t=="string"?Po(t):[t]:[],Nl=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,dn=(t=[])=>Array.prototype.map.call(t,Nl).join(" "),Ng=(t,e)=>i=>i[t]===e,pp=t=>{const e=Object.entries(t).map(([i,a])=>Ng(i,a));return i=>e.every(a=>a(i))},Qr=(t,e=[],i=[])=>{const a=mp(i).map(pp),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=t})},Uo=(t,e=()=>!0)=>{if(!t?.textTracks)return[];const i=typeof e=="function"?e:pp(e);return Array.from(t.textTracks).filter(i)},vp=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(u.MEDIA_SUBTITLES_SHOWING)},Pg=t=>{var e;const{media:i,fullscreenElement:a}=t;try{const r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){const n=(e=a[r])==null?void 0:e.call(a);if(n instanceof Promise)return n.catch(()=>{})}else i?.webkitEnterFullscreen?i.webkitEnterFullscreen():i?.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},Vc="exitFullscreen"in ge?"exitFullscreen":"webkitExitFullscreen"in ge?"webkitExitFullscreen":"webkitCancelFullScreen"in ge?"webkitCancelFullScreen":void 0,Ug=t=>{var e;const{documentElement:i}=t;if(Vc){const a=(e=i?.[Vc])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},Lr="fullscreenElement"in ge?"fullscreenElement":"webkitFullscreenElement"in ge?"webkitFullscreenElement":void 0,$g=t=>{const{documentElement:e,media:i}=t,a=e?.[Lr];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===og.FULLSCREEN?i:a},Hg=t=>{var e;const{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;const n=$g(t);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let s=n.shadowRoot;if(!(Lr in s))return si(n,r);for(;s?.[Lr];){if(s[Lr]===r)return!0;s=(e=s[Lr])==null?void 0:e.shadowRoot}}return!1},Bg="fullscreenEnabled"in ge?"fullscreenEnabled":"webkitFullscreenEnabled"in ge?"webkitFullscreenEnabled":void 0,Wg=t=>{const{documentElement:e,media:i}=t;return!!e?.[Bg]||i&&"webkitSupportsFullscreen"in i};let In;const nu=()=>{var t,e;return In||(In=(e=(t=ge)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),In)},Fg=async(t=nu())=>{if(!t)return!1;const e=t.volume;t.volume=e/2+.1;const i=new AbortController,a=await Promise.race([Kg(t,i.signal),Vg(t,e)]);return i.abort(),a},Kg=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),Vg=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Zm(10)}return t.volume!==e},qg=/.*Version\/.*Safari\/.*/.test(f.navigator.userAgent),fp=(t=nu())=>f.matchMedia("(display-mode: standalone)").matches&&qg?!1:typeof t?.requestPictureInPicture=="function",Ep=(t=nu())=>Wg({documentElement:ge,media:t}),Yg=Ep(),Gg=fp(),Qg=!!f.WebKitPlaybackTargetAvailabilityEvent,zg=!!f.chrome,ro=t=>Uo(t.media,e=>[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),_p=t=>Uo(t.media,e=>e.mode===Ka.SHOWING&&[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)),bp=(t,e)=>{const i=ro(t),a=_p(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)Qr(Ka.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let n=i[0];const{options:s}=t;if(!s?.noSubtitlesLangPref){const m=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),p=m?[m,...globalThis.navigator.languages]:globalThis.navigator.languages,h=i.filter(c=>p.some(v=>c.language.toLowerCase().startsWith(v.split("-")[0]))).sort((c,v)=>{const E=p.findIndex(y=>c.language.toLowerCase().startsWith(y.split("-")[0])),g=p.findIndex(y=>v.language.toLowerCase().startsWith(y.split("-")[0]));return E-g});h[0]&&(n=h[0])}const{language:o,label:l,kind:d}=n;Qr(Ka.DISABLED,i,a),Qr(Ka.SHOWING,i,[{language:o,label:l,kind:d}])}}},su=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?Zg(t,e):Object.entries(t).every(([i,a])=>i in e&&su(a,e[i])),Zg=(t,e)=>{const i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,n)=>su(r,e[n])):!0},jg=Object.values(Xt);let no;const Xg=Fg().then(t=>(no=t,no)),Jg=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof f.HTMLElement))return;const i=e.localName;if(!i.includes("-"))return;const a=f.customElements.get(i);a&&e instanceof a||(await f.customElements.whenDefined(i),f.customElements.upgrade(e))}))},e0=new f.DOMParser,t0=t=>t&&(e0.parseFromString(t,"text/html").body.textContent||t),Dr={mediaError:{get(t,e){const{media:i}=t;if(e?.type!=="playing")return i?.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;const{media:a}=t;if(e?.type!=="playing")return(i=a?.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;const{media:r}=t;if(e?.type!=="playing")return(a=(i=r?.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;const{media:i}=t;return(e=i?.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;const{media:i}=t;return(e=i?.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;const{media:i}=t;return(e=i?.paused)!=null?e:!0},set(t,e){var i;const{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){const{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;const{media:i}=t;return(e=i?.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;const{media:i}=t;return(e=i?.playbackRate)!=null?e:1},set(t,e){const{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;const{media:i}=t;return(e=i?.muted)!=null?e:!1},set(t,e){const{media:i,options:{noMutedPref:a}={}}=e;if(i){i.muted=t;try{const r=f.localStorage.getItem("media-chrome-pref-muted")!==null,n=i.hasAttribute("muted");if(a){r&&f.localStorage.removeItem("media-chrome-pref-muted");return}if(n&&!r)return;f.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{const r=f.localStorage.getItem("media-chrome-pref-muted")==="true";Dr.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaLoop:{get(t){const{media:e}=t;return e?.loop},set(t,e){const{media:i}=e;i&&(i.loop=t)},mediaEvents:["medialooprequest"]},mediaVolume:{get(t){var e;const{media:i}=t;return(e=i?.volume)!=null?e:1},set(t,e){const{media:i,options:{noVolumePref:a}={}}=e;if(i){try{t==null?f.localStorage.removeItem("media-chrome-pref-volume"):!i.hasAttribute("muted")&&!a&&f.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noVolumePref:i}}=e;if(!i)try{const{media:a}=e;if(!a)return;const r=f.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Dr.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){const{media:e}=t;return typeof e?.volume>"u"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;const{media:i}=t;return(e=i?.currentTime)!=null?e:0},set(t,e){const{media:i}=e;!i||!Xd(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){const{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e?.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){const{media:e}=t;return e?.readyState<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;const{media:i}=t;if(!((e=i?.seekable)!=null&&e.length))return;const a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;const{media:i}=t,a=(e=i?.buffered)!=null?e:[];return Array.from(a).map((r,n)=>[Number(a.start(n).toFixed(3)),Number(a.end(n).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){const{media:e,options:{defaultStreamType:i}={}}=t,a=[Xt.LIVE,Xt.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;const{streamType:r}=e;if(jg.includes(r))return r===Xt.UNKNOWN?a:r;const n=e.duration;return n===1/0?Xt.LIVE:Number.isFinite(n)?Xt.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){const{media:e}=t;if(!e)return Number.NaN;const{targetLiveWindow:i}=e,a=Dr.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===Xt.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){const{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Dr.mediaStreamType.get(t)===Xt.LIVE))return!1;const r=e.seekable;if(!r)return!0;if(!r.length)return!1;const n=r.end(r.length-1)-i;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return ro(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return _p(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;const{media:r,options:n}=e;if(!r)return;const s=o=>{var l;!n.defaultSubtitles||o&&![Vt.CAPTIONS,Vt.SUBTITLES].includes((l=o?.track)==null?void 0:l.kind)||bp(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var o,l;r.removeEventListener("loadstart",s),(o=r.textTracks)==null||o.removeEventListener("addtrack",s),(l=r.textTracks)==null||l.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;const{media:i}=t;if(!i)return[];const[a]=Uo(i,{kind:Vt.CHAPTERS});return Array.from((e=a?.cues)!=null?e:[]).map(({text:r,startTime:n,endTime:s})=>({text:t0(r),startTime:n,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;if(!a)return;const r=a.querySelector('track[kind="chapters"][default][src]'),n=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r?.addEventListener("load",t),n?.addEventListener("load",t),()=>{r?.removeEventListener("load",t),n?.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;const{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?si(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let n=r.pictureInPictureElement.shadowRoot;for(;n?.pictureInPictureElement;){if(n.pictureInPictureElement===a)return!0;n=(i=n.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){const{media:i}=e;if(i)if(t){if(!ge.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}const a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){const n=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),n()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),n()},1e3)}else throw r}else throw r})}else ge.pictureInPictureElement&&ge.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;const{media:i}=t;return[...(e=i?.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;const{media:r}=t;return(a=(i=r?.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){const{media:i}=e;if(!i?.videoRenditions){console.warn("MediaController: Rendition selection not supported by this media.");return}const a=t,r=Array.prototype.findIndex.call(i.videoRenditions,n=>n.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;const{media:i}=t;return[...(e=i?.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;const{media:a}=t;return(i=[...(e=a?.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){const{media:i}=e;if(!i?.audioTracks){console.warn("MediaChrome: Audio track selection not supported by this media.");return}const a=t;for(const r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return Hg(t)},set(t,e,i){var a;t?(Pg(e),i.detail&&((a=e.media)==null||a.focus())):Ug(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;const{media:i}=t;return!i?.remote||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;const{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){const{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&f.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){const{media:e}=t;if(!Yg||!Ep(e))return Ye.UNSUPPORTED}},mediaPipUnavailable:{get(t){const{media:e}=t;if(!Gg||!fp(e))return Ye.UNSUPPORTED;if(e?.disablePictureInPicture)return Ye.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){const{media:e}=t;if(no===!1||e?.volume==null)return Ye.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{no==null&&Xg.then(e=>t(e?void 0:Ye.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;const{media:a}=t;if(!zg||!((i=a?.remote)!=null&&i.state))return Ye.UNSUPPORTED;if(!(e==null||e==="available"))return Ye.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!Qg)return Ye.UNSUPPORTED;if(e?.availability==="not-available")return Ye.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;const{media:i}=t;if(!i?.videoRenditions)return Ye.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;const{media:a}=t;if(!a?.audioTracks)return Ye.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){const{options:{mediaLang:e}={}}=t;return e??"en"}}},i0={[I.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,n;const{media:s}=e,o=i??void 0;let l,d;if(s&&o!=null){const[c]=Uo(s,{kind:Vt.METADATA,label:"thumbnails"}),v=Array.prototype.find.call((a=c?.cues)!=null?a:[],(E,g,y)=>g===0?E.endTime>o:g===y.length-1?E.startTime<=o:E.startTime<=o&&E.endTime>o);if(v){const E=/'^(?:[a-z]+:)?\/\//i.test(v.text)||(r=s?.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,g=new URL(v.text,E);d=new URLSearchParams(g.hash).get("#xywh").split(",").map(T=>+T),l=g.href}}const m=t.mediaDuration.get(e);let h=(n=t.mediaChaptersCues.get(e).find((c,v,E)=>v===E.length-1&&m===c.endTime?c.startTime<=o&&c.endTime>=o:c.startTime<=o&&c.endTime>o))==null?void 0:n.text;return i!=null&&h==null&&(h=""),{mediaPreviewTime:o,mediaPreviewImage:l,mediaPreviewCoords:d,mediaPreviewChapter:h}},[I.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[I.MEDIA_PLAY_REQUEST](t,e){var i,a,r,n;const s="mediaPaused",l=t.mediaStreamType.get(e)===Xt.LIVE,d=!((i=e.options)!=null&&i.noAutoSeekToLive),m=t.mediaTargetLiveWindow.get(e)>0;if(l&&d&&!m){const p=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(p){const h=(n=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?n:0,c=p-h;t.mediaCurrentTime.set(c,e)}}t[s].set(!1,e)},[I.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){const a="mediaPlaybackRate",r=i;t[a].set(r,e)},[I.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[I.MEDIA_UNMUTE_REQUEST](t,e){const i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[I.MEDIA_LOOP_REQUEST](t,e,{detail:i}){const a="mediaLoop",r=!!i;return t[a].set(r,e),{mediaLoop:r}},[I.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){const a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[I.MEDIA_SEEK_REQUEST](t,e,{detail:i}){const a="mediaCurrentTime",r=i;t[a].set(r,e)},[I.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;const n="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;const o=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,l=s-o;t[n].set(l,e)},[I.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;const{options:r}=e,n=ro(e),s=mp(i),o=(a=s[0])==null?void 0:a.language;o&&!r.noSubtitlesLangPref&&f.localStorage.setItem("media-chrome-pref-subtitles-lang",o),Qr(Ka.SHOWING,n,s)},[I.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){const a=ro(e),r=i??[];Qr(Ka.DISABLED,a,r)},[I.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){bp(e,i)},[I.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){const a="mediaRenditionSelected",r=i;t[a].set(r,e)},[I.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){const a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[I.MEDIA_ENTER_PIP_REQUEST](t,e){const i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[I.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[I.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e,i){const a="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[a].set(!0,e,i)},[I.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[I.MEDIA_ENTER_CAST_REQUEST](t,e){const i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[I.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[I.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}},a0=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Dr,requestMap:r=i0,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{const o=[],l={options:{...n}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const m=E=>{E!=null&&(su(E,d)||(d=Object.freeze({...d,...E}),o.forEach(g=>g(d))))},p=()=>{const E=Object.entries(a).reduce((g,[y,{get:T}])=>(g[y]=T(l),g),{});m(E)},h={};let c;const v=async(E,g)=>{var y,T,_,S,C,O,$,Y,J,K,U,Me,Fe,Ke,he,Pe;const Tt=!!c;if(c={...l,...c??{},...E},Tt)return;await Jg(...Object.values(E));const Ue=o.length>0&&g===0&&s,lt=l.media!==c.media,Ve=((y=l.media)==null?void 0:y.textTracks)!==((T=c.media)==null?void 0:T.textTracks),ke=((_=l.media)==null?void 0:_.videoRenditions)!==((S=c.media)==null?void 0:S.videoRenditions),xe=((C=l.media)==null?void 0:C.audioTracks)!==((O=c.media)==null?void 0:O.audioTracks),et=(($=l.media)==null?void 0:$.remote)!==((Y=c.media)==null?void 0:Y.remote),na=l.documentElement!==c.documentElement,gn=!!l.media&&(lt||Ue),nc=!!((J=l.media)!=null&&J.textTracks)&&(Ve||Ue),sc=!!((K=l.media)!=null&&K.videoRenditions)&&(ke||Ue),oc=!!((U=l.media)!=null&&U.audioTracks)&&(xe||Ue),lc=!!((Me=l.media)!=null&&Me.remote)&&(et||Ue),dc=!!l.documentElement&&(na||Ue),Go=gn||nc||sc||oc||lc||dc,sa=o.length===0&&g===1&&s,uc=!!c.media&&(lt||sa),cc=!!((Fe=c.media)!=null&&Fe.textTracks)&&(Ve||sa),hc=!!((Ke=c.media)!=null&&Ke.videoRenditions)&&(ke||sa),mc=!!((he=c.media)!=null&&he.audioTracks)&&(xe||sa),pc=!!((Pe=c.media)!=null&&Pe.remote)&&(et||sa),vc=!!c.documentElement&&(na||sa),fc=uc||cc||hc||mc||pc||vc;if(!(Go||fc)){Object.entries(c).forEach(([Z,dr])=>{l[Z]=dr}),p(),c=void 0;return}Object.entries(a).forEach(([Z,{get:dr,mediaEvents:tf=[],textTracksEvents:af=[],videoRenditionsEvents:rf=[],audioTracksEvents:nf=[],remoteEvents:sf=[],rootEvents:of=[],stateOwnersUpdateHandlers:lf=[]}])=>{h[Z]||(h[Z]={});const qe=se=>{const me=dr(l,se);m({[Z]:me})};let Se;Se=h[Z].mediaEvents,tf.forEach(se=>{Se&&gn&&(l.media.removeEventListener(se,Se),h[Z].mediaEvents=void 0),uc&&(c.media.addEventListener(se,qe),h[Z].mediaEvents=qe)}),Se=h[Z].textTracksEvents,af.forEach(se=>{var me,dt;Se&&nc&&((me=l.media.textTracks)==null||me.removeEventListener(se,Se),h[Z].textTracksEvents=void 0),cc&&((dt=c.media.textTracks)==null||dt.addEventListener(se,qe),h[Z].textTracksEvents=qe)}),Se=h[Z].videoRenditionsEvents,rf.forEach(se=>{var me,dt;Se&&sc&&((me=l.media.videoRenditions)==null||me.removeEventListener(se,Se),h[Z].videoRenditionsEvents=void 0),hc&&((dt=c.media.videoRenditions)==null||dt.addEventListener(se,qe),h[Z].videoRenditionsEvents=qe)}),Se=h[Z].audioTracksEvents,nf.forEach(se=>{var me,dt;Se&&oc&&((me=l.media.audioTracks)==null||me.removeEventListener(se,Se),h[Z].audioTracksEvents=void 0),mc&&((dt=c.media.audioTracks)==null||dt.addEventListener(se,qe),h[Z].audioTracksEvents=qe)}),Se=h[Z].remoteEvents,sf.forEach(se=>{var me,dt;Se&&lc&&((me=l.media.remote)==null||me.removeEventListener(se,Se),h[Z].remoteEvents=void 0),pc&&((dt=c.media.remote)==null||dt.addEventListener(se,qe),h[Z].remoteEvents=qe)}),Se=h[Z].rootEvents,of.forEach(se=>{Se&&dc&&(l.documentElement.removeEventListener(se,Se),h[Z].rootEvents=void 0),vc&&(c.documentElement.addEventListener(se,qe),h[Z].rootEvents=qe)});const yn=h[Z].stateOwnersUpdateHandlers;if(yn&&Go&&(Array.isArray(yn)?yn:[yn]).forEach(me=>{typeof me=="function"&&me()}),fc){const se=lf.map(me=>me(qe,c)).filter(me=>typeof me=="function");h[Z].stateOwnersUpdateHandlers=se.length===1?se[0]:se}else Go&&(h[Z].stateOwnersUpdateHandlers=void 0)}),Object.entries(c).forEach(([Z,dr])=>{l[Z]=dr}),p(),c=void 0};return v({media:t,fullscreenElement:e,documentElement:i,options:n}),{dispatch(E){const{type:g,detail:y}=E;if(r[g]&&d.mediaErrorCode==null){m(r[g](a,l,E));return}g==="mediaelementchangerequest"?v({media:y}):g==="fullscreenelementchangerequest"?v({fullscreenElement:y}):g==="documentelementchangerequest"?v({documentElement:y}):g==="optionschangerequest"&&(Object.entries(y??{}).forEach(([T,_])=>{l.options[T]=_}),p())},getState(){return d},subscribe(E){return v({},o.length+1),o.push(E),E(d),()=>{const g=o.indexOf(E);g>=0&&(v({},o.length-1),o.splice(g,1))}}}};var ou=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},P=(t,e,i)=>(ou(t,e,"read from private field"),i?i.call(t):e.get(t)),ct=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Zt=(t,e,i,a)=>(ou(t,e,"write to private field"),e.set(t,i),i),$t=(t,e,i)=>(ou(t,e,"access private method"),i),gi,Mr,G,qi,xr,Rt,ts,is,Pl,Zi,Va,as,Ul,$l,gp;const yp=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],qc=10,Yc=.025,Gc=.25,r0=.25,n0=2,k={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"};class Tp extends No{constructor(){super(),ct(this,is),ct(this,Zi),ct(this,as),ct(this,$l),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,ct(this,gi,new ru(this,k.HOTKEYS)),ct(this,Mr,void 0),ct(this,G,void 0),ct(this,qi,null),ct(this,xr,void 0),ct(this,Rt,void 0),ct(this,ts,i=>{var a;(a=P(this,G))==null||a.dispatch(i)}),this.associateElement(this);let e={};Zt(this,xr,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);const n=a.toLowerCase(),s=new f.CustomEvent(sg[n],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i}),this.hasAttribute(k.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(k.NO_HOTKEYS,k.HOTKEYS,k.DEFAULT_STREAM_TYPE,k.DEFAULT_SUBTITLES,k.DEFAULT_DURATION,k.NO_MUTED_PREF,k.NO_VOLUME_PREF,k.LANG,k.LOOP)}get mediaStore(){return P(this,G)}set mediaStore(e){var i,a;if(P(this,G)&&((i=P(this,Rt))==null||i.call(this),Zt(this,Rt,void 0)),Zt(this,G,e),!P(this,G)&&!this.hasAttribute(k.NO_DEFAULT_STORE)){$t(this,is,Pl).call(this);return}Zt(this,Rt,(a=P(this,G))==null?void 0:a.subscribe(P(this,xr)))}get fullscreenElement(){var e;return(e=P(this,Mr))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(k.FULLSCREEN_ELEMENT)&&this.removeAttribute(k.FULLSCREEN_ELEMENT),Zt(this,Mr,e),(i=P(this,G))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return W(this,k.DEFAULT_SUBTITLES)}set defaultSubtitles(e){F(this,k.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return ae(this,k.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){re(this,k.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return ie(this,k.DEFAULT_DURATION)}set defaultDuration(e){ue(this,k.DEFAULT_DURATION,e)}get noHotkeys(){return W(this,k.NO_HOTKEYS)}set noHotkeys(e){F(this,k.NO_HOTKEYS,e)}get keysUsed(){return ae(this,k.KEYS_USED)}set keysUsed(e){re(this,k.KEYS_USED,e)}get liveEdgeOffset(){return ie(this,k.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){ue(this,k.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return W(this,k.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){F(this,k.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return W(this,k.NO_VOLUME_PREF)}set noVolumePref(e){F(this,k.NO_VOLUME_PREF,e)}get noMutedPref(){return W(this,k.NO_MUTED_PREF)}set noMutedPref(e){F(this,k.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return W(this,k.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){F(this,k.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return W(this,k.NO_DEFAULT_STORE)}set noDefaultStore(e){F(this,k.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,n,s,o,l,d,m,p,h,c,v,E;if(super.attributeChangedCallback(e,i,a),e===k.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(k.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===k.HOTKEYS)P(this,gi).value=a;else if(e===k.DEFAULT_SUBTITLES&&a!==i)(r=P(this,G))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(k.DEFAULT_SUBTITLES)}});else if(e===k.DEFAULT_STREAM_TYPE)(s=P(this,G))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(n=this.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?n:void 0}});else if(e===k.LIVE_EDGE_OFFSET)(o=P(this,G))==null||o.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(k.LIVE_EDGE_OFFSET)}});else if(e===k.SEEK_TO_LIVE_OFFSET)(l=P(this,G))==null||l.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(k.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===k.NO_AUTO_SEEK_TO_LIVE)(d=P(this,G))==null||d.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(k.NO_AUTO_SEEK_TO_LIVE)}});else if(e===k.FULLSCREEN_ELEMENT){const g=a?(m=this.getRootNode())==null?void 0:m.getElementById(a):void 0;Zt(this,Mr,g),(p=P(this,G))==null||p.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===k.LANG&&a!==i?(bg(a),(h=P(this,G))==null||h.dispatch({type:"optionschangerequest",detail:{mediaLang:a}})):e===k.LOOP&&a!==i?(c=P(this,G))==null||c.dispatch({type:I.MEDIA_LOOP_REQUEST,detail:a!=null}):e===k.NO_VOLUME_PREF&&a!==i?(v=P(this,G))==null||v.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(k.NO_VOLUME_PREF)}}):e===k.NO_MUTED_PREF&&a!==i&&((E=P(this,G))==null||E.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(k.NO_MUTED_PREF)}}))}connectedCallback(){var e,i;!P(this,G)&&!this.hasAttribute(k.NO_DEFAULT_STORE)&&$t(this,is,Pl).call(this),(e=P(this,G))==null||e.dispatch({type:"documentelementchangerequest",detail:ge}),super.connectedCallback(),P(this,G)&&!P(this,Rt)&&Zt(this,Rt,(i=P(this,G))==null?void 0:i.subscribe(P(this,xr))),this.hasAttribute(k.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,i,a,r;(e=super.disconnectedCallback)==null||e.call(this),P(this,G)&&((i=P(this,G))==null||i.dispatch({type:"documentelementchangerequest",detail:void 0}),(a=P(this,G))==null||a.dispatch({type:I.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),P(this,Rt)&&((r=P(this,Rt))==null||r.call(this),Zt(this,Rt,void 0))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=P(this,G))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=P(this,G))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){Zc(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(i.has(e))return;const a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=c0(e,a,r);Object.values(I).forEach(s=>{e.addEventListener(s,P(this,ts))}),i.set(e,n)}unassociateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(!i.has(e))return;i.get(e)(),i.delete(e),Object.values(I).forEach(r=>{e.removeEventListener(r,P(this,ts))})}registerMediaStateReceiver(e){if(!e)return;const i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),P(this,G)&&Object.entries(P(this,G).getState()).forEach(([r,n])=>{Zc([e],r,n)}))}unregisterMediaStateReceiver(e){const i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",$t(this,as,Ul))}disableHotkeys(){this.removeEventListener("keydown",$t(this,as,Ul)),this.removeEventListener("keyup",$t(this,Zi,Va))}get hotkeys(){return ae(this,k.HOTKEYS)}set hotkeys(e){re(this,k.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,n,s,o,l,d,m;const p=e.target;if(((r=(a=(i=p.getAttribute(k.KEYS_USED))==null?void 0:i.split(" "))!=null?a:p?.keysUsed)!=null?r:[]).map(y=>y==="Space"?" ":y).filter(Boolean).includes(e.key))return;let c,v,E;if(!(P(this,gi).contains(`no${e.key.toLowerCase()}`)||e.key===" "&&P(this,gi).contains("nospace")||e.shiftKey&&(e.key==="/"||e.key==="?")&&P(this,gi).contains("noshift+/")))switch(e.key){case" ":case"k":c=P(this,G).getState().mediaPaused?I.MEDIA_PLAY_REQUEST:I.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new f.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"m":c=this.mediaStore.getState().mediaVolumeLevel==="off"?I.MEDIA_UNMUTE_REQUEST:I.MEDIA_MUTE_REQUEST,this.dispatchEvent(new f.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"f":c=this.mediaStore.getState().mediaIsFullscreen?I.MEDIA_EXIT_FULLSCREEN_REQUEST:I.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new f.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new f.CustomEvent(I.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{const y=this.hasAttribute(k.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(k.KEYBOARD_BACKWARD_SEEK_OFFSET):qc;v=Math.max(((n=this.mediaStore.getState().mediaCurrentTime)!=null?n:0)-y,0),E=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowRight":case"l":{const y=this.hasAttribute(k.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(k.KEYBOARD_FORWARD_SEEK_OFFSET):qc;v=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+y,0),E=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowUp":{const y=this.hasAttribute(k.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(k.KEYBOARD_UP_VOLUME_STEP):Yc;v=Math.min(((o=this.mediaStore.getState().mediaVolume)!=null?o:1)+y,1),E=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowDown":{const y=this.hasAttribute(k.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(k.KEYBOARD_DOWN_VOLUME_STEP):Yc;v=Math.max(((l=this.mediaStore.getState().mediaVolume)!=null?l:1)-y,0),E=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"<":{const y=(d=this.mediaStore.getState().mediaPlaybackRate)!=null?d:1;v=Math.max(y-Gc,r0).toFixed(2),E=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case">":{const y=(m=this.mediaStore.getState().mediaPlaybackRate)!=null?m:1;v=Math.min(y+Gc,n0).toFixed(2),E=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"/":case"?":{e.shiftKey&&$t(this,$l,gp).call(this);break}case"p":{c=this.mediaStore.getState().mediaIsPip?I.MEDIA_EXIT_PIP_REQUEST:I.MEDIA_ENTER_PIP_REQUEST,E=new f.CustomEvent(c,{composed:!0,bubbles:!0}),this.dispatchEvent(E);break}}}}gi=new WeakMap;Mr=new WeakMap;G=new WeakMap;qi=new WeakMap;xr=new WeakMap;Rt=new WeakMap;ts=new WeakMap;is=new WeakSet;Pl=function(){var t;this.mediaStore=a0({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(k.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(k.DEFAULT_DURATION)?+this.getAttribute(k.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(k.SEEK_TO_LIVE_OFFSET):this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(k.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(k.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(k.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(k.NO_SUBTITLES_LANG_PREF)}})};Zi=new WeakSet;Va=function(t){const{key:e,shiftKey:i}=t;if(!(i&&(e==="/"||e==="?")||yp.includes(e))){this.removeEventListener("keyup",$t(this,Zi,Va));return}this.keyboardShortcutHandler(t)};as=new WeakSet;Ul=function(t){var e;const{metaKey:i,altKey:a,key:r,shiftKey:n}=t,s=n&&(r==="/"||r==="?");if(s&&((e=P(this,qi))!=null&&e.open)){this.removeEventListener("keyup",$t(this,Zi,Va));return}if(i||a||!s&&!yp.includes(r)){this.removeEventListener("keyup",$t(this,Zi,Va));return}const o=t.target,l=o instanceof HTMLElement&&(o.tagName.toLowerCase()==="media-volume-range"||o.tagName.toLowerCase()==="media-time-range");[" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&!(P(this,gi).contains(`no${r.toLowerCase()}`)||r===" "&&P(this,gi).contains("nospace"))&&!l&&t.preventDefault(),this.addEventListener("keyup",$t(this,Zi,Va),{once:!0})};$l=new WeakSet;gp=function(){P(this,qi)||(Zt(this,qi,ge.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(P(this,qi))),P(this,qi).open=!0};const s0=Object.values(u),o0=Object.values(Gm),Ap=t=>{var e,i,a,r;let{observedAttributes:n}=t.constructor;!n&&((e=t.nodeName)!=null&&e.includes("-"))&&(f.customElements.upgrade(t),{observedAttributes:n}=t.constructor);const s=(r=(a=(i=t?.getAttribute)==null?void 0:i.call(t,q.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(o=>s0.includes(o)):[]},l0=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&f.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof f.customElements.get(t.nodeName.toLowerCase()))&&f.customElements.upgrade(t),o0.some(a=>a in t)},Hl=t=>l0(t)||!!Ap(t).length,Qc=t=>{var e;return(e=t?.join)==null?void 0:e.call(t,":")},zc={[u.MEDIA_SUBTITLES_LIST]:dn,[u.MEDIA_SUBTITLES_SHOWING]:dn,[u.MEDIA_SEEKABLE]:Qc,[u.MEDIA_BUFFERED]:t=>t?.map(Qc).join(" "),[u.MEDIA_PREVIEW_COORDS]:t=>t?.join(" "),[u.MEDIA_RENDITION_LIST]:lg,[u.MEDIA_AUDIO_TRACK_LIST]:hg},d0=async(t,e,i)=>{var a,r;if(t.isConnected||await Zm(0),typeof i=="boolean"||i==null)return F(t,e,i);if(typeof i=="number")return ue(t,e,i);if(typeof i=="string")return re(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);const n=(r=(a=zc[e])==null?void 0:a.call(zc,i))!=null?r:i;return t.setAttribute(e,n)},u0=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},xi=(t,e)=>{if(u0(t))return;const i=(r,n)=>{var s,o;Hl(r)&&n(r);const{children:l=[]}=r??{},d=(o=(s=r?.shadowRoot)==null?void 0:s.children)!=null?o:[];[...l,...d].forEach(p=>xi(p,n))},a=t?.nodeName.toLowerCase();if(a.includes("-")&&!Hl(t)){f.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},Zc=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}const r=Ap(a),n=e.toLowerCase();r.includes(n)&&d0(a,n,i)})},c0=(t,e,i)=>{xi(t,e);const a=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;e(h)},r=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;i(h)};t.addEventListener(I.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(I.UNREGISTER_MEDIA_STATE_RECEIVER,r);const n=m=>{m.forEach(p=>{const{addedNodes:h=[],removedNodes:c=[],type:v,target:E,attributeName:g}=p;v==="childList"?(Array.prototype.forEach.call(h,y=>xi(y,e)),Array.prototype.forEach.call(c,y=>xi(y,i))):v==="attributes"&&g===q.MEDIA_CHROME_ATTRIBUTES&&(Hl(E)?e(E):i(E))})};let s=[];const o=m=>{const p=m.target;p.name!=="media"&&(s.forEach(h=>xi(h,i)),s=[...p.assignedElements({flatten:!0})],s.forEach(h=>xi(h,e)))};t.addEventListener("slotchange",o);const l=new MutationObserver(n);return l.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{xi(t,i),t.removeEventListener("slotchange",o),l.disconnect(),t.removeEventListener(I.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(I.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};f.customElements.get("media-controller")||f.customElements.define("media-controller",Tp);var h0=Tp;const oa={PLACEMENT:"placement",BOUNDS:"bounds"};function m0(t){return`
218
+ <style>
219
+ :host {
220
+ --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
221
+ --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
222
+ --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
223
+ --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
224
+ --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
225
+ position: relative;
226
+ pointer-events: none;
227
+ display: var(--media-tooltip-display, inline-flex);
228
+ justify-content: center;
229
+ align-items: center;
230
+ box-sizing: border-box;
231
+ z-index: var(--media-tooltip-z-index, 1);
232
+ background: var(--_tooltip-background);
233
+ color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
234
+ font: var(--media-font,
235
+ var(--media-font-weight, 400)
236
+ var(--media-font-size, 13px) /
237
+ var(--media-text-content-height, var(--media-control-height, 18px))
238
+ var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
239
+ padding: var(--media-tooltip-padding, .35em .7em);
240
+ border: var(--media-tooltip-border, none);
241
+ border-radius: var(--media-tooltip-border-radius, 5px);
242
+ filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
243
+ white-space: var(--media-tooltip-white-space, nowrap);
244
+ }
245
+
246
+ :host([hidden]) {
247
+ display: none;
248
+ }
249
+
250
+ img, svg {
251
+ display: inline-block;
252
+ }
253
+
254
+ #arrow {
255
+ position: absolute;
256
+ width: 0px;
257
+ height: 0px;
258
+ border-style: solid;
259
+ display: var(--media-tooltip-arrow-display, block);
260
+ }
261
+
262
+ :host(:not([placement])),
263
+ :host([placement="top"]) {
264
+ position: absolute;
265
+ bottom: calc(100% + var(--media-tooltip-distance, 12px));
266
+ left: 50%;
267
+ transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
268
+ }
269
+ :host(:not([placement])) #arrow,
270
+ :host([placement="top"]) #arrow {
271
+ top: 100%;
272
+ left: 50%;
273
+ border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
274
+ border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
275
+ transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
276
+ }
277
+
278
+ :host([placement="right"]) {
279
+ position: absolute;
280
+ left: calc(100% + var(--media-tooltip-distance, 12px));
281
+ top: 50%;
282
+ transform: translate(0, -50%);
283
+ }
284
+ :host([placement="right"]) #arrow {
285
+ top: 50%;
286
+ right: 100%;
287
+ border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
288
+ border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
289
+ transform: translate(0, -50%);
290
+ }
291
+
292
+ :host([placement="bottom"]) {
293
+ position: absolute;
294
+ top: calc(100% + var(--media-tooltip-distance, 12px));
295
+ left: 50%;
296
+ transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
297
+ }
298
+ :host([placement="bottom"]) #arrow {
299
+ bottom: 100%;
300
+ left: 50%;
301
+ border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
302
+ border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
303
+ transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
304
+ }
305
+
306
+ :host([placement="left"]) {
307
+ position: absolute;
308
+ right: calc(100% + var(--media-tooltip-distance, 12px));
309
+ top: 50%;
310
+ transform: translate(0, -50%);
311
+ }
312
+ :host([placement="left"]) #arrow {
313
+ top: 50%;
314
+ left: 100%;
315
+ border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
316
+ border-color: transparent transparent transparent var(--_tooltip-arrow-background);
317
+ transform: translate(0, -50%);
318
+ }
319
+
320
+ :host([placement="none"]) #arrow {
321
+ display: none;
322
+ }
323
+ </style>
324
+ <slot></slot>
325
+ <div id="arrow"></div>
326
+ `}class $o extends f.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!np(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}const a=getComputedStyle(this),r=(e=rr(this,"#"+this.bounds))!=null?e:Be(this);if(!r)return;const{x:n,width:s}=r.getBoundingClientRect(),{x:o,width:l}=this.getBoundingClientRect(),d=o+l,m=n+s,p=a.getPropertyValue("--media-tooltip-offset-x"),h=p?parseFloat(p.replace("px","")):0,c=a.getPropertyValue("--media-tooltip-container-margin"),v=c?parseFloat(c.replace("px","")):0,E=o-n+h-v,g=d-m+h+v;if(E<0){this.style.setProperty("--media-tooltip-offset-x",`${E}px`);return}if(g>0){this.style.setProperty("--media-tooltip-offset-x",`${g}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[oa.PLACEMENT,oa.BOUNDS]}get placement(){return ae(this,oa.PLACEMENT)}set placement(e){re(this,oa.PLACEMENT,e)}get bounds(){return ae(this,oa.BOUNDS)}set bounds(e){re(this,oa.BOUNDS,e)}}$o.shadowRootOptions={mode:"open"};$o.getTemplateHTML=m0;f.customElements.get("media-tooltip")||f.customElements.define("media-tooltip",$o);var jc=$o,lu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ve=(t,e,i)=>(lu(t,e,"read from private field"),i?i.call(t):e.get(t)),la=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Rn=(t,e,i,a)=>(lu(t,e,"write to private field"),e.set(t,i),i),p0=(t,e,i)=>(lu(t,e,"access private method"),i),Ct,$a,yi,ba,rs,Bl,kp;const di={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function v0(t,e={}){return`
327
+ <style>
328
+ :host {
329
+ position: relative;
330
+ font: var(--media-font,
331
+ var(--media-font-weight, bold)
332
+ var(--media-font-size, 14px) /
333
+ var(--media-text-content-height, var(--media-control-height, 24px))
334
+ var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
335
+ color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
336
+ background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
337
+ padding: var(--media-button-padding, var(--media-control-padding, 10px));
338
+ justify-content: var(--media-button-justify-content, center);
339
+ display: inline-flex;
340
+ align-items: center;
341
+ vertical-align: middle;
342
+ box-sizing: border-box;
343
+ transition: background .15s linear;
344
+ pointer-events: auto;
345
+ cursor: var(--media-cursor, pointer);
346
+ -webkit-tap-highlight-color: transparent;
347
+ }
348
+
349
+
350
+ :host(:focus-visible) {
351
+ box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
352
+ outline: 0;
353
+ }
354
+
355
+ :host(:where(:focus)) {
356
+ box-shadow: none;
357
+ outline: 0;
358
+ }
359
+
360
+ :host(:hover) {
361
+ background: var(--media-control-hover-background, rgba(50 50 70 / .7));
362
+ }
363
+
364
+ svg, img, ::slotted(svg), ::slotted(img) {
365
+ width: var(--media-button-icon-width);
366
+ height: var(--media-button-icon-height, var(--media-control-height, 24px));
367
+ transform: var(--media-button-icon-transform);
368
+ transition: var(--media-button-icon-transition);
369
+ fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
370
+ vertical-align: middle;
371
+ max-width: 100%;
372
+ max-height: 100%;
373
+ min-width: 100%;
374
+ }
375
+
376
+ media-tooltip {
377
+
378
+ max-width: 0;
379
+ overflow-x: clip;
380
+ opacity: 0;
381
+ transition: opacity .3s, max-width 0s 9s;
382
+ }
383
+
384
+ :host(:hover) media-tooltip,
385
+ :host(:focus-visible) media-tooltip {
386
+ max-width: 100vw;
387
+ opacity: 1;
388
+ transition: opacity .3s;
389
+ }
390
+
391
+ :host([notooltip]) slot[name="tooltip"] {
392
+ display: none;
393
+ }
394
+ </style>
395
+
396
+ ${this.getSlotTemplateHTML(t,e)}
397
+
398
+ <slot name="tooltip">
399
+ <media-tooltip part="tooltip" aria-hidden="true">
400
+ <template shadowrootmode="${jc.shadowRootOptions.mode}">
401
+ ${jc.getTemplateHTML({})}
402
+ </template>
403
+ <slot name="tooltip-content">
404
+ ${this.getTooltipContentHTML(t)}
405
+ </slot>
406
+ </media-tooltip>
407
+ </slot>
408
+ `}function f0(t,e){return`
409
+ <slot></slot>
410
+ `}function E0(){return""}class Ce extends f.HTMLElement{constructor(){if(super(),la(this,Bl),la(this,Ct,void 0),this.preventClick=!1,this.tooltipEl=null,la(this,$a,e=>{this.preventClick||this.handleClick(e),setTimeout(ve(this,yi),0)}),la(this,yi,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),la(this,ba,e=>{const{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",ve(this,ba));return}this.preventClick||this.handleClick(e)}),la(this,rs,e=>{const{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",ve(this,ba));return}this.addEventListener("keyup",ve(this,ba),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",di.TOOLTIP_PLACEMENT,q.MEDIA_CONTROLLER,u.MEDIA_LANG]}enable(){this.addEventListener("click",ve(this,$a)),this.addEventListener("keydown",ve(this,rs)),this.tabIndex=0}disable(){this.removeEventListener("click",ve(this,$a)),this.removeEventListener("keydown",ve(this,rs)),this.removeEventListener("keyup",ve(this,ba)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER?(i&&((n=(r=ve(this,Ct))==null?void 0:r.unassociateElement)==null||n.call(r,this),Rn(this,Ct,null)),a&&this.isConnected&&(Rn(this,Ct,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=ve(this,Ct))==null?void 0:o.associateElement)==null||l.call(o,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===di.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===u.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),ve(this,yi).call(this)}connectedCallback(){var e,i,a;const{style:r}=Ae(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const n=this.getAttribute(q.MEDIA_CONTROLLER);n&&(Rn(this,Ct,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=ve(this,Ct))==null?void 0:i.associateElement)==null||a.call(i,this)),f.customElements.whenDefined("media-tooltip").then(()=>p0(this,Bl,kp).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=ve(this,Ct))==null?void 0:e.unassociateElement)==null||i.call(e,this),Rn(this,Ct,null),this.removeEventListener("mouseenter",ve(this,yi)),this.removeEventListener("focus",ve(this,yi)),this.removeEventListener("click",ve(this,$a))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ae(this,di.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){re(this,di.TOOLTIP_PLACEMENT,e)}get mediaController(){return ae(this,q.MEDIA_CONTROLLER)}set mediaController(e){re(this,q.MEDIA_CONTROLLER,e)}get disabled(){return W(this,di.DISABLED)}set disabled(e){F(this,di.DISABLED,e)}get noTooltip(){return W(this,di.NO_TOOLTIP)}set noTooltip(e){F(this,di.NO_TOOLTIP,e)}handleClick(e){}}Ct=new WeakMap;$a=new WeakMap;yi=new WeakMap;ba=new WeakMap;rs=new WeakMap;Bl=new WeakSet;kp=function(){this.addEventListener("mouseenter",ve(this,yi)),this.addEventListener("focus",ve(this,yi)),this.addEventListener("click",ve(this,$a));const t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};Ce.shadowRootOptions={mode:"open"};Ce.getTemplateHTML=v0;Ce.getSlotTemplateHTML=f0;Ce.getTooltipContentHTML=E0;f.customElements.get("media-chrome-button")||f.customElements.define("media-chrome-button",Ce);const Xc=`<svg aria-hidden="true" viewBox="0 0 26 24">
411
+ <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
412
+ </svg>
413
+ `;function _0(t){return`
414
+ <style>
415
+ :host([${u.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
416
+ display: none !important;
417
+ }
418
+
419
+
420
+ :host(:not([${u.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
421
+ display: none !important;
422
+ }
423
+
424
+ :host([${u.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
425
+ :host(:not([${u.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
426
+ display: none;
427
+ }
428
+ </style>
429
+
430
+ <slot name="icon">
431
+ <slot name="enter">${Xc}</slot>
432
+ <slot name="exit">${Xc}</slot>
433
+ </slot>
434
+ `}function b0(){return`
435
+ <slot name="tooltip-enter">${L("start airplay")}</slot>
436
+ <slot name="tooltip-exit">${L("stop airplay")}</slot>
437
+ `}const Jc=t=>{const e=t.mediaIsAirplaying?L("stop airplay"):L("start airplay");t.setAttribute("aria-label",e)};class du extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_AIRPLAYING,u.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Jc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_AIRPLAYING&&Jc(this)}get mediaIsAirplaying(){return W(this,u.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){F(this,u.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return ae(this,u.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){re(this,u.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const e=new f.CustomEvent(I.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}du.getSlotTemplateHTML=_0;du.getTooltipContentHTML=b0;f.customElements.get("media-airplay-button")||f.customElements.define("media-airplay-button",du);const g0=`<svg aria-hidden="true" viewBox="0 0 26 24">
438
+ <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
439
+ </svg>`,y0=`<svg aria-hidden="true" viewBox="0 0 26 24">
440
+ <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
441
+ </svg>`;function T0(t){return`
442
+ <style>
443
+ :host([aria-checked="true"]) slot[name=off] {
444
+ display: none !important;
445
+ }
446
+
447
+
448
+ :host(:not([aria-checked="true"])) slot[name=on] {
449
+ display: none !important;
450
+ }
451
+
452
+ :host([aria-checked="true"]) slot[name=tooltip-enable],
453
+ :host(:not([aria-checked="true"])) slot[name=tooltip-disable] {
454
+ display: none;
455
+ }
456
+ </style>
457
+
458
+ <slot name="icon">
459
+ <slot name="on">${g0}</slot>
460
+ <slot name="off">${y0}</slot>
461
+ </slot>
462
+ `}function A0(){return`
463
+ <slot name="tooltip-enable">${L("Enable captions")}</slot>
464
+ <slot name="tooltip-disable">${L("Disable captions")}</slot>
465
+ `}const eh=t=>{t.setAttribute("aria-checked",vp(t).toString())};class uu extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_SUBTITLES_LIST,u.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",L("closed captions")),eh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_SUBTITLES_SHOWING&&eh(this)}get mediaSubtitlesList(){return th(this,u.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ih(this,u.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return th(this,u.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ih(this,u.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new f.CustomEvent(I.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}uu.getSlotTemplateHTML=T0;uu.getTooltipContentHTML=A0;const th=(t,e)=>{const i=t.getAttribute(e);return i?Po(i):[]},ih=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=dn(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-button")||f.customElements.define("media-captions-button",uu);const k0='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>',S0='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>';function w0(t){return`
466
+ <style>
467
+ :host([${u.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
468
+ display: none !important;
469
+ }
470
+
471
+
472
+ :host(:not([${u.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
473
+ display: none !important;
474
+ }
475
+
476
+ :host([${u.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
477
+ :host(:not([${u.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
478
+ display: none;
479
+ }
480
+ </style>
481
+
482
+ <slot name="icon">
483
+ <slot name="enter">${k0}</slot>
484
+ <slot name="exit">${S0}</slot>
485
+ </slot>
486
+ `}function I0(){return`
487
+ <slot name="tooltip-enter">${L("Start casting")}</slot>
488
+ <slot name="tooltip-exit">${L("Stop casting")}</slot>
489
+ `}const ah=t=>{const e=t.mediaIsCasting?L("stop casting"):L("start casting");t.setAttribute("aria-label",e)};class cu extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_CASTING,u.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),ah(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_CASTING&&ah(this)}get mediaIsCasting(){return W(this,u.MEDIA_IS_CASTING)}set mediaIsCasting(e){F(this,u.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ae(this,u.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){re(this,u.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?I.MEDIA_EXIT_CAST_REQUEST:I.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}cu.getSlotTemplateHTML=w0;cu.getTooltipContentHTML=I0;f.customElements.get("media-cast-button")||f.customElements.define("media-cast-button",cu);var hu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ji=(t,e,i)=>(hu(t,e,"read from private field"),e.get(t)),Gt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},mu=(t,e,i,a)=>(hu(t,e,"write to private field"),e.set(t,i),i),Ci=(t,e,i)=>(hu(t,e,"access private method"),i),so,un,ia,ns,Wl,Fl,Sp,Kl,wp,Vl,Ip,ql,Rp,Yl,Cp;function R0(t){return`
490
+ <style>
491
+ :host {
492
+ font: var(--media-font,
493
+ var(--media-font-weight, normal)
494
+ var(--media-font-size, 14px) /
495
+ var(--media-text-content-height, var(--media-control-height, 24px))
496
+ var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
497
+ color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
498
+ display: var(--media-dialog-display, inline-flex);
499
+ justify-content: center;
500
+ align-items: center;
501
+
502
+ transition-behavior: allow-discrete;
503
+ visibility: hidden;
504
+ opacity: 0;
505
+ transform: translateY(2px) scale(.99);
506
+ pointer-events: none;
507
+ }
508
+
509
+ :host([open]) {
510
+ transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
511
+ visibility: visible;
512
+ opacity: 1;
513
+ transform: translateY(0) scale(1);
514
+ pointer-events: auto;
515
+ }
516
+
517
+ #content {
518
+ display: flex;
519
+ position: relative;
520
+ box-sizing: border-box;
521
+ width: min(320px, 100%);
522
+ word-wrap: break-word;
523
+ max-height: 100%;
524
+ overflow: auto;
525
+ text-align: center;
526
+ line-height: 1.4;
527
+ }
528
+ </style>
529
+ ${this.getSlotTemplateHTML(t)}
530
+ `}function C0(t){return`
531
+ <slot id="content"></slot>
532
+ `}const mr={OPEN:"open",ANCHOR:"anchor"};class nr extends f.HTMLElement{constructor(){super(),Gt(this,ns),Gt(this,Fl),Gt(this,Kl),Gt(this,Vl),Gt(this,ql),Gt(this,Yl),Gt(this,so,!1),Gt(this,un,null),Gt(this,ia,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[mr.OPEN,mr.ANCHOR]}get open(){return W(this,mr.OPEN)}set open(e){F(this,mr.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":Ci(this,Vl,Ip).call(this,e);break;case"focusout":Ci(this,ql,Rp).call(this,e);break;case"keydown":Ci(this,Yl,Cp).call(this,e);break}}connectedCallback(){Ci(this,ns,Wl).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,i,a){Ci(this,ns,Wl).call(this),e===mr.OPEN&&a!==i&&(this.open?Ci(this,Fl,Sp).call(this):Ci(this,Kl,wp).call(this))}focus(){mu(this,un,eu());const e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;const a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a?.focus()}get keysUsed(){return["Escape","Tab"]}}so=new WeakMap;un=new WeakMap;ia=new WeakMap;ns=new WeakSet;Wl=function(){if(!ji(this,so)&&(mu(this,so,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);const t=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{const{style:e}=Ae(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};Fl=new WeakSet;Sp=function(){var t;(t=ji(this,ia))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Kl=new WeakSet;wp=function(){var t;(t=ji(this,ia))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};Vl=new WeakSet;Ip=function(t){mu(this,ia,t.relatedTarget),si(this,t.relatedTarget)||(this.open=!this.open)};ql=new WeakSet;Rp=function(t){var e;si(this,t.relatedTarget)||((e=ji(this,un))==null||e.focus(),ji(this,ia)&&ji(this,ia)!==t.relatedTarget&&this.open&&(this.open=!1))};Yl=new WeakSet;Cp=function(t){var e,i,a,r,n;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;o||l||d||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((n=ji(this,un))==null||n.focus(),this.open=!1))};nr.shadowRootOptions={mode:"open"};nr.getTemplateHTML=R0;nr.getSlotTemplateHTML=C0;f.customElements.get("media-chrome-dialog")||f.customElements.define("media-chrome-dialog",nr);var pu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oe=(t,e,i)=>(pu(t,e,"read from private field"),i?i.call(t):e.get(t)),Le=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},mi=(t,e,i,a)=>(pu(t,e,"write to private field"),e.set(t,i),i),vt=(t,e,i)=>(pu(t,e,"access private method"),i),Lt,Ho,ss,os,ft,oo,ls,ds,us,vu,Lp,cs,Gl,hs,Ql,lo,fu,zl,Dp,Zl,Mp,jl,xp,Xl,Op;function L0(t){return`
533
+ <style>
534
+ :host {
535
+ --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
536
+ --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));
537
+
538
+ box-shadow: var(--_focus-visible-box-shadow, none);
539
+ background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
540
+ height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));
541
+ display: inline-flex;
542
+ align-items: center;
543
+
544
+ vertical-align: middle;
545
+ box-sizing: border-box;
546
+ position: relative;
547
+ width: 100px;
548
+ transition: background .15s linear;
549
+ cursor: var(--media-cursor, pointer);
550
+ pointer-events: auto;
551
+ touch-action: none;
552
+ }
553
+
554
+
555
+ input[type=range]:focus {
556
+ outline: 0;
557
+ }
558
+ input[type=range]:focus::-webkit-slider-runnable-track {
559
+ outline: 0;
560
+ }
561
+
562
+ :host(:hover) {
563
+ background: var(--media-control-hover-background, rgb(50 50 70 / .7));
564
+ }
565
+
566
+ #leftgap {
567
+ padding-left: var(--media-range-padding-left, var(--_media-range-padding));
568
+ }
569
+
570
+ #rightgap {
571
+ padding-right: var(--media-range-padding-right, var(--_media-range-padding));
572
+ }
573
+
574
+ #startpoint,
575
+ #endpoint {
576
+ position: absolute;
577
+ }
578
+
579
+ #endpoint {
580
+ right: 0;
581
+ }
582
+
583
+ #container {
584
+
585
+ width: var(--media-range-track-width, 100%);
586
+ transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));
587
+ position: relative;
588
+ height: 100%;
589
+ display: flex;
590
+ align-items: center;
591
+ min-width: 40px;
592
+ }
593
+
594
+ #range {
595
+
596
+ display: var(--media-time-range-hover-display, block);
597
+ bottom: var(--media-time-range-hover-bottom, -7px);
598
+ height: var(--media-time-range-hover-height, max(100% + 7px, 25px));
599
+ width: 100%;
600
+ position: absolute;
601
+ cursor: var(--media-cursor, pointer);
602
+
603
+ -webkit-appearance: none;
604
+ -webkit-tap-highlight-color: transparent;
605
+ background: transparent;
606
+ margin: 0;
607
+ z-index: 1;
608
+ }
609
+
610
+ @media (hover: hover) {
611
+ #range {
612
+ bottom: var(--media-time-range-hover-bottom, -5px);
613
+ height: var(--media-time-range-hover-height, max(100% + 5px, 20px));
614
+ }
615
+ }
616
+
617
+
618
+
619
+ #range::-webkit-slider-thumb {
620
+ -webkit-appearance: none;
621
+ background: transparent;
622
+ width: .1px;
623
+ height: .1px;
624
+ }
625
+
626
+
627
+ #range::-moz-range-thumb {
628
+ background: transparent;
629
+ border: transparent;
630
+ width: .1px;
631
+ height: .1px;
632
+ }
633
+
634
+ #appearance {
635
+ height: var(--media-range-track-height, 4px);
636
+ display: flex;
637
+ flex-direction: column;
638
+ justify-content: center;
639
+ width: 100%;
640
+ position: absolute;
641
+
642
+ will-change: transform;
643
+ }
644
+
645
+ #track {
646
+ background: var(--media-range-track-background, rgb(255 255 255 / .2));
647
+ border-radius: var(--media-range-track-border-radius, 1px);
648
+ border: var(--media-range-track-border, none);
649
+ outline: var(--media-range-track-outline);
650
+ outline-offset: var(--media-range-track-outline-offset);
651
+ backdrop-filter: var(--media-range-track-backdrop-filter);
652
+ -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
653
+ box-shadow: var(--media-range-track-box-shadow, none);
654
+ position: absolute;
655
+ width: 100%;
656
+ height: 100%;
657
+ overflow: hidden;
658
+ }
659
+
660
+ #progress,
661
+ #pointer {
662
+ position: absolute;
663
+ height: 100%;
664
+ will-change: width;
665
+ }
666
+
667
+ #progress {
668
+ background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));
669
+ transition: var(--media-range-track-transition);
670
+ }
671
+
672
+ #pointer {
673
+ background: var(--media-range-track-pointer-background);
674
+ border-right: var(--media-range-track-pointer-border-right);
675
+ transition: visibility .25s, opacity .25s;
676
+ visibility: hidden;
677
+ opacity: 0;
678
+ }
679
+
680
+ @media (hover: hover) {
681
+ :host(:hover) #pointer {
682
+ transition: visibility .5s, opacity .5s;
683
+ visibility: visible;
684
+ opacity: 1;
685
+ }
686
+ }
687
+
688
+ #thumb,
689
+ ::slotted([slot=thumb]) {
690
+ width: var(--media-range-thumb-width, 10px);
691
+ height: var(--media-range-thumb-height, 10px);
692
+ transition: var(--media-range-thumb-transition);
693
+ transform: var(--media-range-thumb-transform, none);
694
+ opacity: var(--media-range-thumb-opacity, 1);
695
+ translate: -50%;
696
+ position: absolute;
697
+ left: 0;
698
+ cursor: var(--media-cursor, pointer);
699
+ }
700
+
701
+ #thumb {
702
+ border-radius: var(--media-range-thumb-border-radius, 10px);
703
+ background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));
704
+ box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);
705
+ border: var(--media-range-thumb-border, none);
706
+ }
707
+
708
+ :host([disabled]) #thumb {
709
+ background-color: #777;
710
+ }
711
+
712
+ .segments #appearance {
713
+ height: var(--media-range-segment-hover-height, 7px);
714
+ }
715
+
716
+ #track {
717
+ clip-path: url(#segments-clipping);
718
+ }
719
+
720
+ #segments {
721
+ --segments-gap: var(--media-range-segments-gap, 2px);
722
+ position: absolute;
723
+ width: 100%;
724
+ height: 100%;
725
+ }
726
+
727
+ #segments-clipping {
728
+ transform: translateX(calc(var(--segments-gap) / 2));
729
+ }
730
+
731
+ #segments-clipping:empty {
732
+ display: none;
733
+ }
734
+
735
+ #segments-clipping rect {
736
+ height: var(--media-range-track-height, 4px);
737
+ y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);
738
+ transition: var(--media-range-segment-transition, transform .1s ease-in-out);
739
+ transform: var(--media-range-segment-transform, scaleY(1));
740
+ transform-origin: center;
741
+ }
742
+ </style>
743
+ <div id="leftgap"></div>
744
+ <div id="container">
745
+ <div id="startpoint"></div>
746
+ <div id="endpoint"></div>
747
+ <div id="appearance">
748
+ <div id="track" part="track">
749
+ <div id="pointer"></div>
750
+ <div id="progress" part="progress"></div>
751
+ </div>
752
+ <slot name="thumb">
753
+ <div id="thumb" part="thumb"></div>
754
+ </slot>
755
+ <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>
756
+ </div>
757
+ <input id="range" type="range" min="0" max="1" step="any" value="0">
758
+ </div>
759
+ <div id="rightgap"></div>
760
+ `}class sr extends f.HTMLElement{constructor(){if(super(),Le(this,vu),Le(this,cs),Le(this,hs),Le(this,lo),Le(this,zl),Le(this,Zl),Le(this,jl),Le(this,Xl),Le(this,Lt,void 0),Le(this,Ho,void 0),Le(this,ss,void 0),Le(this,os,void 0),Le(this,ft,{}),Le(this,oo,[]),Le(this,ls,()=>{if(this.range.matches(":focus-visible")){const{style:e}=Ae(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),Le(this,ds,()=>{const{style:e}=Ae(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),Le(this,us,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),mi(this,ss,this.shadowRoot.querySelector("#startpoint")),mi(this,os,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",q.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER?(i&&((n=(r=oe(this,Lt))==null?void 0:r.unassociateElement)==null||n.call(r,this),mi(this,Lt,null)),a&&this.isConnected&&(mi(this,Lt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=oe(this,Lt))==null?void 0:o.associateElement)==null||l.call(o,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),vt(this,cs,Gl).call(this)):(this.range.setAttribute(e,a),vt(this,hs,Ql).call(this)))}connectedCallback(){var e,i,a;const{style:r}=Ae(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),oe(this,ft).pointer=Ae(this.shadowRoot,"#pointer"),oe(this,ft).progress=Ae(this.shadowRoot,"#progress"),oe(this,ft).thumb=Ae(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),oe(this,ft).activeSegment=Ae(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const n=this.getAttribute(q.MEDIA_CONTROLLER);n&&(mi(this,Lt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=oe(this,Lt))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",oe(this,ls)),this.shadowRoot.addEventListener("focusout",oe(this,ds)),vt(this,cs,Gl).call(this),Xa(this.container,oe(this,us))}disconnectedCallback(){var e,i;vt(this,hs,Ql).call(this),(i=(e=oe(this,Lt))==null?void 0:e.unassociateElement)==null||i.call(e,this),mi(this,Lt,null),this.shadowRoot.removeEventListener("focusin",oe(this,ls)),this.shadowRoot.removeEventListener("focusout",oe(this,ds)),Ja(this.container,oe(this,us))}updatePointerBar(e){var i;(i=oe(this,ft).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;const a=this.range.valueAsNumber*100;(e=oe(this,ft).progress)==null||e.style.setProperty("width",`${a}%`),(i=oe(this,ft).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){const i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!e?.length),!e?.length)return;const a=[...new Set([+this.range.min,...e.flatMap(n=>[n.start,n.end]),+this.range.max])];mi(this,oo,[...a]);const r=a.pop();for(const[n,s]of a.entries()){const[o,l]=[n===0,n===a.length-1],d=o?"calc(var(--segments-gap) / -1)":`${s*100}%`,p=`calc(${((l?r:a[n+1])-s)*100}%${o||l?"":" - var(--segments-gap)"})`,h=ge.createElementNS("http://www.w3.org/2000/svg","rect"),c=tu(this.shadowRoot,`#segments-clipping rect:nth-child(${n+1})`);c.style.setProperty("x",d),c.style.setProperty("width",p),i.append(h)}}getPointerRatio(e){return Ag(e.clientX,e.clientY,oe(this,ss).getBoundingClientRect(),oe(this,os).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":vt(this,Xl,Op).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":vt(this,zl,Dp).call(this,e);break;case"pointerdown":vt(this,lo,fu).call(this,e);break;case"pointerup":vt(this,Zl,Mp).call(this);break;case"pointerleave":vt(this,jl,xp).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}Lt=new WeakMap;Ho=new WeakMap;ss=new WeakMap;os=new WeakMap;ft=new WeakMap;oo=new WeakMap;ls=new WeakMap;ds=new WeakMap;us=new WeakMap;vu=new WeakSet;Lp=function(t){const e=oe(this,ft).activeSegment;if(!e)return;const i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${oe(this,oo).findIndex((n,s,o)=>{const l=o[s+1];return l!=null&&i>=n&&i<=l})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};cs=new WeakSet;Gl=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};hs=new WeakSet;Ql=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=f.window)==null||t.removeEventListener("pointerup",this),(e=f.window)==null||e.removeEventListener("pointermove",this)};lo=new WeakSet;fu=function(t){var e;mi(this,Ho,t.composedPath().includes(this.range)),(e=f.window)==null||e.addEventListener("pointerup",this)};zl=new WeakSet;Dp=function(t){var e;t.pointerType!=="mouse"&&vt(this,lo,fu).call(this,t),this.addEventListener("pointerleave",this),(e=f.window)==null||e.addEventListener("pointermove",this)};Zl=new WeakSet;Mp=function(){var t;(t=f.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};jl=new WeakSet;xp=function(){var t,e;this.removeEventListener("pointerleave",this),(t=f.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=oe(this,ft).activeSegment)==null||e.style.removeProperty("transform")};Xl=new WeakSet;Op=function(t){t.pointerType==="pen"&&t.buttons===0||(this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),vt(this,vu,Lp).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!oe(this,Ho))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))};sr.shadowRootOptions={mode:"open"};sr.getTemplateHTML=L0;f.customElements.get("media-chrome-range")||f.customElements.define("media-chrome-range",sr);var Np=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Cn=(t,e,i)=>(Np(t,e,"read from private field"),i?i.call(t):e.get(t)),D0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ln=(t,e,i,a)=>(Np(t,e,"write to private field"),e.set(t,i),i),Dt;function M0(t){return`
761
+ <style>
762
+ :host {
763
+
764
+ box-sizing: border-box;
765
+ display: var(--media-control-display, var(--media-control-bar-display, inline-flex));
766
+ color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
767
+ --media-loading-indicator-icon-height: 44px;
768
+ }
769
+
770
+ ::slotted(media-time-range),
771
+ ::slotted(media-volume-range) {
772
+ min-height: 100%;
773
+ }
774
+
775
+ ::slotted(media-time-range),
776
+ ::slotted(media-clip-selector) {
777
+ flex-grow: 1;
778
+ }
779
+
780
+ ::slotted([role="menu"]) {
781
+ position: absolute;
782
+ }
783
+ </style>
784
+
785
+ <slot></slot>
786
+ `}class Eu extends f.HTMLElement{constructor(){if(super(),D0(this,Dt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER&&(i&&((n=(r=Cn(this,Dt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ln(this,Dt,null)),a&&this.isConnected&&(Ln(this,Dt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Cn(this,Dt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(q.MEDIA_CONTROLLER);r&&(Ln(this,Dt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Cn(this,Dt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Cn(this,Dt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Ln(this,Dt,null)}}Dt=new WeakMap;Eu.shadowRootOptions={mode:"open"};Eu.getTemplateHTML=M0;f.customElements.get("media-control-bar")||f.customElements.define("media-control-bar",Eu);var Pp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Dn=(t,e,i)=>(Pp(t,e,"read from private field"),i?i.call(t):e.get(t)),x0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mn=(t,e,i,a)=>(Pp(t,e,"write to private field"),e.set(t,i),i),Mt;function O0(t,e={}){return`
787
+ <style>
788
+ :host {
789
+ font: var(--media-font,
790
+ var(--media-font-weight, normal)
791
+ var(--media-font-size, 14px) /
792
+ var(--media-text-content-height, var(--media-control-height, 24px))
793
+ var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
794
+ color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
795
+ background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));
796
+ padding: var(--media-control-padding, 10px);
797
+ display: inline-flex;
798
+ justify-content: center;
799
+ align-items: center;
800
+ vertical-align: middle;
801
+ box-sizing: border-box;
802
+ text-align: center;
803
+ pointer-events: auto;
804
+ }
805
+
806
+
807
+ :host(:focus-visible) {
808
+ box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);
809
+ outline: 0;
810
+ }
811
+
812
+
813
+ :host(:where(:focus)) {
814
+ box-shadow: none;
815
+ outline: 0;
816
+ }
817
+ </style>
818
+
819
+ ${this.getSlotTemplateHTML(t,e)}
820
+ `}function N0(t,e){return`
821
+ <slot></slot>
822
+ `}class wi extends f.HTMLElement{constructor(){if(super(),x0(this,Mt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER&&(i&&((n=(r=Dn(this,Mt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Mn(this,Mt,null)),a&&this.isConnected&&(Mn(this,Mt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Dn(this,Mt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const{style:r}=Ae(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const n=this.getAttribute(q.MEDIA_CONTROLLER);n&&(Mn(this,Mt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=Dn(this,Mt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Dn(this,Mt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Mn(this,Mt,null)}}Mt=new WeakMap;wi.shadowRootOptions={mode:"open"};wi.getTemplateHTML=O0;wi.getSlotTemplateHTML=N0;f.customElements.get("media-text-display")||f.customElements.define("media-text-display",wi);var Up=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},rh=(t,e,i)=>(Up(t,e,"read from private field"),i?i.call(t):e.get(t)),P0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},U0=(t,e,i,a)=>(Up(t,e,"write to private field"),e.set(t,i),i),Or;function $0(t,e){return`
823
+ <slot>${ki(e.mediaDuration)}</slot>
824
+ `}class $p extends wi{constructor(){var e;super(),P0(this,Or,void 0),U0(this,Or,this.shadowRoot.querySelector("slot")),rh(this,Or).textContent=ki((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===u.MEDIA_DURATION&&(rh(this,Or).textContent=ki(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return ie(this,u.MEDIA_DURATION)}set mediaDuration(e){ue(this,u.MEDIA_DURATION,e)}}Or=new WeakMap;$p.getSlotTemplateHTML=$0;f.customElements.get("media-duration-display")||f.customElements.define("media-duration-display",$p);const H0={2:L("Network Error"),3:L("Decode Error"),4:L("Source Not Supported"),5:L("Encryption Error")},B0={2:L("A network error caused the media download to fail."),3:L("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:L("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:L("The media is encrypted and there are no keys to decrypt it.")},Hp=t=>{var e,i;return t.code===1?null:{title:(e=H0[t.code])!=null?e:`Error ${t.code}`,message:(i=B0[t.code])!=null?i:t.message}};var Bp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},W0=(t,e,i)=>(Bp(t,e,"read from private field"),i?i.call(t):e.get(t)),F0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},K0=(t,e,i,a)=>(Bp(t,e,"write to private field"),e.set(t,i),i),ms;function V0(t){return`
825
+ <style>
826
+ :host {
827
+ background: rgb(20 20 30 / .8);
828
+ }
829
+
830
+ #content {
831
+ display: block;
832
+ padding: 1.2em 1.5em;
833
+ }
834
+
835
+ h3,
836
+ p {
837
+ margin-block: 0 .3em;
838
+ }
839
+ </style>
840
+ <slot name="error-${t.mediaerrorcode}" id="content">
841
+ ${Wp({code:+t.mediaerrorcode,message:t.mediaerrormessage})}
842
+ </slot>
843
+ `}function q0(t){return t.code&&Hp(t)!==null}function Wp(t){var e;const{title:i,message:a}=(e=Hp(t))!=null?e:{};let r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}const nh=[u.MEDIA_ERROR_CODE,u.MEDIA_ERROR_MESSAGE];class Bo extends nr{constructor(){super(...arguments),F0(this,ms,null)}static get observedAttributes(){return[...super.observedAttributes,...nh]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!nh.includes(e))return;const n=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=q0(n),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(n))}get mediaError(){return W0(this,ms)}set mediaError(e){K0(this,ms,e)}get mediaErrorCode(){return ie(this,"mediaerrorcode")}set mediaErrorCode(e){ue(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ae(this,"mediaerrormessage")}set mediaErrorMessage(e){re(this,"mediaerrormessage",e)}}ms=new WeakMap;Bo.getSlotTemplateHTML=V0;Bo.formatErrorMessage=Wp;f.customElements.get("media-error-dialog")||f.customElements.define("media-error-dialog",Bo);var Fp=Bo,Y0=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ui=(t,e,i)=>(Y0(t,e,"read from private field"),i?i.call(t):e.get(t)),sh=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ga,ya;function G0(t){return`
844
+ <style>
845
+ :host {
846
+ position: fixed;
847
+ top: 0;
848
+ left: 0;
849
+ z-index: 9999;
850
+ background: rgb(20 20 30 / .8);
851
+ backdrop-filter: blur(10px);
852
+ }
853
+
854
+ #content {
855
+ display: block;
856
+ width: clamp(400px, 40vw, 700px);
857
+ max-width: 90vw;
858
+ text-align: left;
859
+ }
860
+
861
+ h2 {
862
+ margin: 0 0 1.5rem 0;
863
+ font-size: 1.5rem;
864
+ font-weight: 500;
865
+ text-align: center;
866
+ }
867
+
868
+ .shortcuts-table {
869
+ width: 100%;
870
+ border-collapse: collapse;
871
+ }
872
+
873
+ .shortcuts-table tr {
874
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
875
+ }
876
+
877
+ .shortcuts-table tr:last-child {
878
+ border-bottom: none;
879
+ }
880
+
881
+ .shortcuts-table td {
882
+ padding: 0.75rem 0.5rem;
883
+ }
884
+
885
+ .shortcuts-table td:first-child {
886
+ text-align: right;
887
+ padding-right: 1rem;
888
+ width: 40%;
889
+ min-width: 120px;
890
+ }
891
+
892
+ .shortcuts-table td:last-child {
893
+ padding-left: 1rem;
894
+ }
895
+
896
+ .key {
897
+ display: inline-block;
898
+ background: rgba(255, 255, 255, 0.15);
899
+ border: 1px solid rgba(255, 255, 255, 0.2);
900
+ border-radius: 4px;
901
+ padding: 0.25rem 0.5rem;
902
+ font-family: 'Courier New', monospace;
903
+ font-size: 0.9rem;
904
+ font-weight: 500;
905
+ min-width: 1.5rem;
906
+ text-align: center;
907
+ margin: 0 0.2rem;
908
+ }
909
+
910
+ .description {
911
+ color: rgba(255, 255, 255, 0.9);
912
+ font-size: 0.95rem;
913
+ }
914
+
915
+ .key-combo {
916
+ display: flex;
917
+ align-items: center;
918
+ justify-content: flex-end;
919
+ gap: 0.3rem;
920
+ }
921
+
922
+ .key-separator {
923
+ color: rgba(255, 255, 255, 0.5);
924
+ font-size: 0.9rem;
925
+ }
926
+ </style>
927
+ <slot id="content">
928
+ ${Q0()}
929
+ </slot>
930
+ `}function Q0(){return`
931
+ <h2>Keyboard Shortcuts</h2>
932
+ <table class="shortcuts-table">${[{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["←","j"],description:"Seek back 10s"},{keys:["→","l"],description:"Seek forward 10s"},{keys:["↑"],description:"Turn volume up"},{keys:["↓"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map(({keys:i,description:a})=>`
933
+ <tr>
934
+ <td>
935
+ <div class="key-combo">${i.map((n,s)=>s>0?`<span class="key-separator">or</span><span class="key">${n}</span>`:`<span class="key">${n}</span>`).join("")}</div>
936
+ </td>
937
+ <td class="description">${a}</td>
938
+ </tr>
939
+ `).join("")}</table>
940
+ `}class Kp extends nr{constructor(){super(...arguments),sh(this,ga,e=>{var i;if(!this.open)return;const a=(i=this.shadowRoot)==null?void 0:i.querySelector("#content");if(!a)return;const r=e.composedPath(),n=r[0]===this||r.includes(this),s=r.includes(a);n&&!s&&(this.open=!1)}),sh(this,ya,e=>{if(!this.open)return;const i=e.shiftKey&&(e.key==="/"||e.key==="?");(e.key==="Escape"||i)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",ui(this,ga)),document.addEventListener("keydown",ui(this,ya)))}disconnectedCallback(){this.removeEventListener("click",ui(this,ga)),document.removeEventListener("keydown",ui(this,ya))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e==="open"&&(this.open?(this.addEventListener("click",ui(this,ga)),document.addEventListener("keydown",ui(this,ya))):(this.removeEventListener("click",ui(this,ga)),document.removeEventListener("keydown",ui(this,ya))))}}ga=new WeakMap;ya=new WeakMap;Kp.getSlotTemplateHTML=G0;f.customElements.get("media-keyboard-shortcuts-dialog")||f.customElements.define("media-keyboard-shortcuts-dialog",Kp);var Vp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},z0=(t,e,i)=>(Vp(t,e,"read from private field"),e.get(t)),Z0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},j0=(t,e,i,a)=>(Vp(t,e,"write to private field"),e.set(t,i),i),ps;const X0=`<svg aria-hidden="true" viewBox="0 0 26 24">
941
+ <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
942
+ </svg>`,J0=`<svg aria-hidden="true" viewBox="0 0 26 24">
943
+ <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
944
+ </svg>`;function e1(t){return`
945
+ <style>
946
+ :host([${u.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
947
+ display: none !important;
948
+ }
949
+
950
+
951
+ :host(:not([${u.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
952
+ display: none !important;
953
+ }
954
+
955
+ :host([${u.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
956
+ :host(:not([${u.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
957
+ display: none;
958
+ }
959
+ </style>
960
+
961
+ <slot name="icon">
962
+ <slot name="enter">${X0}</slot>
963
+ <slot name="exit">${J0}</slot>
964
+ </slot>
965
+ `}function t1(){return`
966
+ <slot name="tooltip-enter">${L("Enter fullscreen mode")}</slot>
967
+ <slot name="tooltip-exit">${L("Exit fullscreen mode")}</slot>
968
+ `}const oh=t=>{const e=t.mediaIsFullscreen?L("exit fullscreen mode"):L("enter fullscreen mode");t.setAttribute("aria-label",e)};class _u extends Ce{constructor(){super(...arguments),Z0(this,ps,null)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_FULLSCREEN,u.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),oh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_FULLSCREEN&&oh(this)}get mediaFullscreenUnavailable(){return ae(this,u.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){re(this,u.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return W(this,u.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){F(this,u.MEDIA_IS_FULLSCREEN,e)}handleClick(e){j0(this,ps,e);const i=z0(this,ps)instanceof PointerEvent,a=this.mediaIsFullscreen?new f.CustomEvent(I.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new f.CustomEvent(I.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}}ps=new WeakMap;_u.getSlotTemplateHTML=e1;_u.getTooltipContentHTML=t1;f.customElements.get("media-fullscreen-button")||f.customElements.define("media-fullscreen-button",_u);const{MEDIA_TIME_IS_LIVE:vs,MEDIA_PAUSED:zr}=u,{MEDIA_SEEK_TO_LIVE_REQUEST:i1,MEDIA_PLAY_REQUEST:a1}=I,r1='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>';function n1(t){return`
969
+ <style>
970
+ :host { --media-tooltip-display: none; }
971
+
972
+ slot[name=indicator] > *,
973
+ :host ::slotted([slot=indicator]) {
974
+
975
+ min-width: auto;
976
+ fill: var(--media-live-button-icon-color, rgb(140, 140, 140));
977
+ color: var(--media-live-button-icon-color, rgb(140, 140, 140));
978
+ }
979
+
980
+ :host([${vs}]:not([${zr}])) slot[name=indicator] > *,
981
+ :host([${vs}]:not([${zr}])) ::slotted([slot=indicator]) {
982
+ fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
983
+ color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
984
+ }
985
+
986
+ :host([${vs}]:not([${zr}])) {
987
+ cursor: var(--media-cursor, not-allowed);
988
+ }
989
+
990
+ slot[name=text]{
991
+ text-transform: uppercase;
992
+ }
993
+
994
+ </style>
995
+
996
+ <slot name="indicator">${r1}</slot>
997
+
998
+ <slot name="spacer">&nbsp;</slot><slot name="text">${L("live")}</slot>
999
+ `}const lh=t=>{var e;const i=t.mediaPaused||!t.mediaTimeIsLive,a=L(i?"seek to live":"playing live");t.setAttribute("aria-label",a);const r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=L("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")};class qp extends Ce{static get observedAttributes(){return[...super.observedAttributes,vs,zr]}connectedCallback(){super.connectedCallback(),lh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),lh(this)}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return W(this,u.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){F(this,u.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new f.CustomEvent(i1,{composed:!0,bubbles:!0})),this.hasAttribute(zr)&&this.dispatchEvent(new f.CustomEvent(a1,{composed:!0,bubbles:!0})))}}qp.getSlotTemplateHTML=n1;f.customElements.get("media-live-button")||f.customElements.define("media-live-button",qp);var Yp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},pr=(t,e,i)=>(Yp(t,e,"read from private field"),i?i.call(t):e.get(t)),dh=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},vr=(t,e,i,a)=>(Yp(t,e,"write to private field"),e.set(t,i),i),xt,fs;const xn={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},Gp=500,s1=`
1000
+ <svg aria-hidden="true" viewBox="0 0 100 100">
1001
+ <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
1002
+ <animateTransform
1003
+ attributeName="transform"
1004
+ attributeType="XML"
1005
+ type="rotate"
1006
+ dur="1s"
1007
+ from="0 50 50"
1008
+ to="360 50 50"
1009
+ repeatCount="indefinite" />
1010
+ </path>
1011
+ </svg>
1012
+ `;function o1(t){return`
1013
+ <style>
1014
+ :host {
1015
+ display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
1016
+ vertical-align: middle;
1017
+ box-sizing: border-box;
1018
+ --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${Gp}ms);
1019
+ }
1020
+
1021
+ #status {
1022
+ color: rgba(0,0,0,0);
1023
+ width: 0px;
1024
+ height: 0px;
1025
+ }
1026
+
1027
+ :host slot[name=icon] > *,
1028
+ :host ::slotted([slot=icon]) {
1029
+ opacity: var(--media-loading-indicator-opacity, 0);
1030
+ transition: opacity 0.15s;
1031
+ }
1032
+
1033
+ :host([${u.MEDIA_LOADING}]:not([${u.MEDIA_PAUSED}])) slot[name=icon] > *,
1034
+ :host([${u.MEDIA_LOADING}]:not([${u.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
1035
+ opacity: var(--media-loading-indicator-opacity, 1);
1036
+ transition: opacity 0.15s var(--_loading-indicator-delay);
1037
+ }
1038
+
1039
+ :host #status {
1040
+ visibility: var(--media-loading-indicator-opacity, hidden);
1041
+ transition: visibility 0.15s;
1042
+ }
1043
+
1044
+ :host([${u.MEDIA_LOADING}]:not([${u.MEDIA_PAUSED}])) #status {
1045
+ visibility: var(--media-loading-indicator-opacity, visible);
1046
+ transition: visibility 0.15s var(--_loading-indicator-delay);
1047
+ }
1048
+
1049
+ svg, img, ::slotted(svg), ::slotted(img) {
1050
+ width: var(--media-loading-indicator-icon-width);
1051
+ height: var(--media-loading-indicator-icon-height, 100px);
1052
+ fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1053
+ vertical-align: middle;
1054
+ }
1055
+ </style>
1056
+
1057
+ <slot name="icon">${s1}</slot>
1058
+ <div id="status" role="status" aria-live="polite">${L("media loading")}</div>
1059
+ `}class bu extends f.HTMLElement{constructor(){if(super(),dh(this,xt,void 0),dh(this,fs,Gp),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER,u.MEDIA_PAUSED,u.MEDIA_LOADING,xn.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===xn.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===q.MEDIA_CONTROLLER&&(i&&((n=(r=pr(this,xt))==null?void 0:r.unassociateElement)==null||n.call(r,this),vr(this,xt,null)),a&&this.isConnected&&(vr(this,xt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=pr(this,xt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(q.MEDIA_CONTROLLER);r&&(vr(this,xt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=pr(this,xt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=pr(this,xt))==null?void 0:e.unassociateElement)==null||i.call(e,this),vr(this,xt,null)}get loadingDelay(){return pr(this,fs)}set loadingDelay(e){vr(this,fs,e);const{style:i}=Ae(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,u.MEDIA_LOADING)}set mediaLoading(e){F(this,u.MEDIA_LOADING,e)}get mediaController(){return ae(this,q.MEDIA_CONTROLLER)}set mediaController(e){re(this,q.MEDIA_CONTROLLER,e)}get noAutohide(){return W(this,xn.NO_AUTOHIDE)}set noAutohide(e){F(this,xn.NO_AUTOHIDE,e)}}xt=new WeakMap;fs=new WeakMap;bu.shadowRootOptions={mode:"open"};bu.getTemplateHTML=o1;f.customElements.get("media-loading-indicator")||f.customElements.define("media-loading-indicator",bu);const l1=`<svg aria-hidden="true" viewBox="0 0 24 24">
1060
+ <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>
1061
+ </svg>`,uh=`<svg aria-hidden="true" viewBox="0 0 24 24">
1062
+ <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>
1063
+ </svg>`,d1=`<svg aria-hidden="true" viewBox="0 0 24 24">
1064
+ <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>
1065
+ </svg>`;function u1(t){return`
1066
+ <style>
1067
+ :host(:not([${u.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
1068
+ :host([${u.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
1069
+ display: none !important;
1070
+ }
1071
+
1072
+ :host([${u.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {
1073
+ display: none !important;
1074
+ }
1075
+
1076
+ :host([${u.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {
1077
+ display: none !important;
1078
+ }
1079
+
1080
+ :host([${u.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {
1081
+ display: none !important;
1082
+ }
1083
+
1084
+ :host(:not([${u.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],
1085
+ :host([${u.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {
1086
+ display: none;
1087
+ }
1088
+ </style>
1089
+
1090
+ <slot name="icon">
1091
+ <slot name="off">${l1}</slot>
1092
+ <slot name="low">${uh}</slot>
1093
+ <slot name="medium">${uh}</slot>
1094
+ <slot name="high">${d1}</slot>
1095
+ </slot>
1096
+ `}function c1(){return`
1097
+ <slot name="tooltip-mute">${L("Mute")}</slot>
1098
+ <slot name="tooltip-unmute">${L("Unmute")}</slot>
1099
+ `}const ch=t=>{const e=t.mediaVolumeLevel==="off",i=L(e?"unmute":"mute");t.setAttribute("aria-label",i)};class gu extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),ch(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_VOLUME_LEVEL&&ch(this)}get mediaVolumeLevel(){return ae(this,u.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){re(this,u.MEDIA_VOLUME_LEVEL,e)}handleClick(){const e=this.mediaVolumeLevel==="off"?I.MEDIA_UNMUTE_REQUEST:I.MEDIA_MUTE_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}gu.getSlotTemplateHTML=u1;gu.getTooltipContentHTML=c1;f.customElements.get("media-mute-button")||f.customElements.define("media-mute-button",gu);const hh=`<svg aria-hidden="true" viewBox="0 0 28 24">
1100
+ <path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>
1101
+ </svg>`;function h1(t){return`
1102
+ <style>
1103
+ :host([${u.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
1104
+ display: none !important;
1105
+ }
1106
+
1107
+ :host(:not([${u.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
1108
+ display: none !important;
1109
+ }
1110
+
1111
+ :host([${u.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
1112
+ :host(:not([${u.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
1113
+ display: none;
1114
+ }
1115
+ </style>
1116
+
1117
+ <slot name="icon">
1118
+ <slot name="enter">${hh}</slot>
1119
+ <slot name="exit">${hh}</slot>
1120
+ </slot>
1121
+ `}function m1(){return`
1122
+ <slot name="tooltip-enter">${L("Enter picture in picture mode")}</slot>
1123
+ <slot name="tooltip-exit">${L("Exit picture in picture mode")}</slot>
1124
+ `}const mh=t=>{const e=t.mediaIsPip?L("exit picture in picture mode"):L("enter picture in picture mode");t.setAttribute("aria-label",e)};class yu extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_PIP,u.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),mh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_PIP&&mh(this)}get mediaPipUnavailable(){return ae(this,u.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){re(this,u.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return W(this,u.MEDIA_IS_PIP)}set mediaIsPip(e){F(this,u.MEDIA_IS_PIP,e)}handleClick(){const e=this.mediaIsPip?I.MEDIA_EXIT_PIP_REQUEST:I.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}yu.getSlotTemplateHTML=h1;yu.getTooltipContentHTML=m1;f.customElements.get("media-pip-button")||f.customElements.define("media-pip-button",yu);var p1=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},da=(t,e,i)=>(p1(t,e,"read from private field"),i?i.call(t):e.get(t)),v1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},pi;const sl={RATES:"rates"},Qp=[1,1.2,1.5,1.7,2],Ha=1;function f1(t){return`
1125
+ <style>
1126
+ :host {
1127
+ min-width: 5ch;
1128
+ padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1129
+ }
1130
+ </style>
1131
+ <slot name="icon">${t.mediaplaybackrate||Ha}x</slot>
1132
+ `}function E1(){return L("Playback rate")}class Tu extends Ce{constructor(){var e;super(),v1(this,pi,new ru(this,sl.RATES,{defaultValue:Qp})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Ha}x`}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PLAYBACK_RATE,sl.RATES]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===sl.RATES&&(da(this,pi).value=a),e===u.MEDIA_PLAYBACK_RATE){const r=a?+a:Number.NaN,n=Number.isNaN(r)?Ha:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",L("Playback rate {playbackRate}",{playbackRate:n}))}}get rates(){return da(this,pi)}set rates(e){e?Array.isArray(e)?da(this,pi).value=e.join(" "):typeof e=="string"&&(da(this,pi).value=e):da(this,pi).value=""}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,Ha)}set mediaPlaybackRate(e){ue(this,u.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,i;const a=Array.from(da(this,pi).values(),s=>+s).sort((s,o)=>s-o),r=(i=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?i:Ha,n=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}}pi=new WeakMap;Tu.getSlotTemplateHTML=f1;Tu.getTooltipContentHTML=E1;f.customElements.get("media-playback-rate-button")||f.customElements.define("media-playback-rate-button",Tu);const _1=`<svg aria-hidden="true" viewBox="0 0 24 24">
1133
+ <path d="m6 21 15-9L6 3v18Z"/>
1134
+ </svg>`,b1=`<svg aria-hidden="true" viewBox="0 0 24 24">
1135
+ <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
1136
+ </svg>`;function g1(t){return`
1137
+ <style>
1138
+ :host([${u.MEDIA_PAUSED}]) slot[name=pause],
1139
+ :host(:not([${u.MEDIA_PAUSED}])) slot[name=play] {
1140
+ display: none !important;
1141
+ }
1142
+
1143
+ :host([${u.MEDIA_PAUSED}]) slot[name=tooltip-pause],
1144
+ :host(:not([${u.MEDIA_PAUSED}])) slot[name=tooltip-play] {
1145
+ display: none;
1146
+ }
1147
+ </style>
1148
+
1149
+ <slot name="icon">
1150
+ <slot name="play">${_1}</slot>
1151
+ <slot name="pause">${b1}</slot>
1152
+ </slot>
1153
+ `}function y1(){return`
1154
+ <slot name="tooltip-play">${L("Play")}</slot>
1155
+ <slot name="tooltip-pause">${L("Pause")}</slot>
1156
+ `}const ph=t=>{const e=t.mediaPaused?L("play"):L("pause");t.setAttribute("aria-label",e)};class Au extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PAUSED,u.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),ph(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===u.MEDIA_PAUSED||e===u.MEDIA_LANG)&&ph(this)}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}handleClick(){const e=this.mediaPaused?I.MEDIA_PLAY_REQUEST:I.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}Au.getSlotTemplateHTML=g1;Au.getTooltipContentHTML=y1;f.customElements.get("media-play-button")||f.customElements.define("media-play-button",Au);const At={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};function T1(t){return`
1157
+ <style>
1158
+ :host {
1159
+ pointer-events: none;
1160
+ display: var(--media-poster-image-display, inline-block);
1161
+ box-sizing: border-box;
1162
+ }
1163
+
1164
+ img {
1165
+ max-width: 100%;
1166
+ max-height: 100%;
1167
+ min-width: 100%;
1168
+ min-height: 100%;
1169
+ background-repeat: no-repeat;
1170
+ background-position: var(--media-poster-image-background-position, var(--media-object-position, center));
1171
+ background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));
1172
+ object-fit: var(--media-object-fit, contain);
1173
+ object-position: var(--media-object-position, center);
1174
+ }
1175
+ </style>
1176
+
1177
+ <img part="poster img" aria-hidden="true" id="image"/>
1178
+ `}const A1=t=>{t.style.removeProperty("background-image")},k1=(t,e)=>{t.style["background-image"]=`url('${e}')`};class ku extends f.HTMLElement{static get observedAttributes(){return[At.PLACEHOLDER_SRC,At.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===At.SRC&&(a==null?this.image.removeAttribute(At.SRC):this.image.setAttribute(At.SRC,a)),e===At.PLACEHOLDER_SRC&&(a==null?A1(this.image):k1(this.image,a))}get placeholderSrc(){return ae(this,At.PLACEHOLDER_SRC)}set placeholderSrc(e){re(this,At.SRC,e)}get src(){return ae(this,At.SRC)}set src(e){re(this,At.SRC,e)}}ku.shadowRootOptions={mode:"open"};ku.getTemplateHTML=T1;f.customElements.get("media-poster-image")||f.customElements.define("media-poster-image",ku);var zp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},S1=(t,e,i)=>(zp(t,e,"read from private field"),i?i.call(t):e.get(t)),w1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},I1=(t,e,i,a)=>(zp(t,e,"write to private field"),e.set(t,i),i),Es;class R1 extends wi{constructor(){super(),w1(this,Es,void 0),I1(this,Es,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PREVIEW_CHAPTER,u.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===u.MEDIA_PREVIEW_CHAPTER||e===u.MEDIA_LANG)&&a!==i&&a!=null)if(S1(this,Es).textContent=a,a!==""){const r=L("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return ae(this,u.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){re(this,u.MEDIA_PREVIEW_CHAPTER,e)}}Es=new WeakMap;f.customElements.get("media-preview-chapter-display")||f.customElements.define("media-preview-chapter-display",R1);var Zp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},On=(t,e,i)=>(Zp(t,e,"read from private field"),i?i.call(t):e.get(t)),C1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Nn=(t,e,i,a)=>(Zp(t,e,"write to private field"),e.set(t,i),i),Ot;function L1(t){return`
1179
+ <style>
1180
+ :host {
1181
+ box-sizing: border-box;
1182
+ display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));
1183
+ overflow: hidden;
1184
+ }
1185
+
1186
+ img {
1187
+ display: none;
1188
+ position: relative;
1189
+ }
1190
+ </style>
1191
+ <img crossorigin loading="eager" decoding="async">
1192
+ `}class Wo extends f.HTMLElement{constructor(){if(super(),C1(this,Ot,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER,u.MEDIA_PREVIEW_IMAGE,u.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;const r=this.getAttribute(q.MEDIA_CONTROLLER);r&&(Nn(this,Ot,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=On(this,Ot))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=On(this,Ot))==null?void 0:e.unassociateElement)==null||i.call(e,this),Nn(this,Ot,null)}attributeChangedCallback(e,i,a){var r,n,s,o,l;[u.MEDIA_PREVIEW_IMAGE,u.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===q.MEDIA_CONTROLLER&&(i&&((n=(r=On(this,Ot))==null?void 0:r.unassociateElement)==null||n.call(r,this),Nn(this,Ot,null)),a&&this.isConnected&&(Nn(this,Ot,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=On(this,Ot))==null?void 0:o.associateElement)==null||l.call(o,this)))}get mediaPreviewImage(){return ae(this,u.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,u.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(u.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(u.MEDIA_PREVIEW_COORDS);return}this.setAttribute(u.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){const e=this.mediaPreviewCoords,i=this.mediaPreviewImage;if(!(e&&i))return;const[a,r,n,s]=e,o=i.split("#")[0],l=getComputedStyle(this),{maxWidth:d,maxHeight:m,minWidth:p,minHeight:h}=l,c=Math.min(parseInt(d)/n,parseInt(m)/s),v=Math.max(parseInt(p)/n,parseInt(h)/s),E=c<1,g=E?c:v>1?v:1,{style:y}=Ae(this.shadowRoot,":host"),T=Ae(this.shadowRoot,"img").style,_=this.shadowRoot.querySelector("img"),S=E?"min":"max";y.setProperty(`${S}-width`,"initial","important"),y.setProperty(`${S}-height`,"initial","important"),y.width=`${n*g}px`,y.height=`${s*g}px`;const C=()=>{T.width=`${this.imgWidth*g}px`,T.height=`${this.imgHeight*g}px`,T.display="block"};_.src!==o&&(_.onload=()=>{this.imgWidth=_.naturalWidth,this.imgHeight=_.naturalHeight,C()},_.src=o,C()),C(),T.transform=`translate(-${a*g}px, -${r*g}px)`}}Ot=new WeakMap;Wo.shadowRootOptions={mode:"open"};Wo.getTemplateHTML=L1;f.customElements.get("media-preview-thumbnail")||f.customElements.define("media-preview-thumbnail",Wo);var vh=Wo,jp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},fh=(t,e,i)=>(jp(t,e,"read from private field"),i?i.call(t):e.get(t)),D1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},M1=(t,e,i,a)=>(jp(t,e,"write to private field"),e.set(t,i),i),Nr;class x1 extends wi{constructor(){super(),D1(this,Nr,void 0),M1(this,Nr,this.shadowRoot.querySelector("slot")),fh(this,Nr).textContent=ki(0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_PREVIEW_TIME&&a!=null&&(fh(this,Nr).textContent=ki(parseFloat(a)))}get mediaPreviewTime(){return ie(this,u.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){ue(this,u.MEDIA_PREVIEW_TIME,e)}}Nr=new WeakMap;f.customElements.get("media-preview-time-display")||f.customElements.define("media-preview-time-display",x1);const ua={SEEK_OFFSET:"seekoffset"},ol=30,O1=t=>`
1193
+ <svg aria-hidden="true" viewBox="0 0 20 24">
1194
+ <defs>
1195
+ <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1196
+ </defs>
1197
+ <text class="text value" transform="translate(2.18 19.87)">${t}</text>
1198
+ <path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/>
1199
+ </svg>`;function N1(t,e){return`
1200
+ <slot name="icon">${O1(e.seekOffset)}</slot>
1201
+ `}function P1(){return L("Seek backward")}const U1=0;class Su extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_CURRENT_TIME,ua.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=ie(this,ua.SEEK_OFFSET,ol)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===ua.SEEK_OFFSET&&(this.seekOffset=ie(this,ua.SEEK_OFFSET,ol))}get seekOffset(){return ie(this,ua.SEEK_OFFSET,ol)}set seekOffset(e){ue(this,ua.SEEK_OFFSET,e),this.setAttribute("aria-label",L("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),ap(rp(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME,U1)}set mediaCurrentTime(e){ue(this,u.MEDIA_CURRENT_TIME,e)}handleClick(){const e=Math.max(this.mediaCurrentTime-this.seekOffset,0),i=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}Su.getSlotTemplateHTML=N1;Su.getTooltipContentHTML=P1;f.customElements.get("media-seek-backward-button")||f.customElements.define("media-seek-backward-button",Su);const ca={SEEK_OFFSET:"seekoffset"},ll=30,$1=t=>`
1202
+ <svg aria-hidden="true" viewBox="0 0 20 24">
1203
+ <defs>
1204
+ <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1205
+ </defs>
1206
+ <text class="text value" transform="translate(8.9 19.87)">${t}</text>
1207
+ <path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/>
1208
+ </svg>`;function H1(t,e){return`
1209
+ <slot name="icon">${$1(e.seekOffset)}</slot>
1210
+ `}function B1(){return L("Seek forward")}const W1=0;class wu extends Ce{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_CURRENT_TIME,ca.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=ie(this,ca.SEEK_OFFSET,ll)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===ca.SEEK_OFFSET&&(this.seekOffset=ie(this,ca.SEEK_OFFSET,ll))}get seekOffset(){return ie(this,ca.SEEK_OFFSET,ll)}set seekOffset(e){ue(this,ca.SEEK_OFFSET,e),this.setAttribute("aria-label",L("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),ap(rp(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME,W1)}set mediaCurrentTime(e){ue(this,u.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,i=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}wu.getSlotTemplateHTML=H1;wu.getTooltipContentHTML=B1;f.customElements.get("media-seek-forward-button")||f.customElements.define("media-seek-forward-button",wu);var Xp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},dl=(t,e,i)=>(Xp(t,e,"read from private field"),i?i.call(t):e.get(t)),F1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},K1=(t,e,i,a)=>(Xp(t,e,"write to private field"),e.set(t,i),i),Ta;const Oi={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Eh=[...Object.values(Oi),u.MEDIA_CURRENT_TIME,u.MEDIA_DURATION,u.MEDIA_SEEKABLE],_h=["Enter"," "],V1="&nbsp;/&nbsp;",Jl=(t,{timesSep:e=V1}={})=>{var i,a;const r=(i=t.mediaCurrentTime)!=null?i:0,[,n]=(a=t.mediaSeekable)!=null?a:[];let s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(n)&&(s=n);const o=t.remaining?ki(0-(s-r)):ki(r);return t.showDuration?`${o}${e}${ki(s)}`:o},q1="video not loaded, unknown time.",Y1=t=>{var e;const i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[];let r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-valuetext",q1);return}const n=t.remaining?Gr(0-(r-i)):Gr(i);if(!t.showDuration){t.setAttribute("aria-valuetext",n);return}const s=Gr(r),o=`${n} of ${s}`;t.setAttribute("aria-valuetext",o)};function G1(t,e){return`
1211
+ <slot>${Jl(e)}</slot>
1212
+ `}class Jp extends wi{constructor(){super(),F1(this,Ta,void 0),K1(this,Ta,this.shadowRoot.querySelector("slot")),dl(this,Ta).innerHTML=`${Jl(this)}`}static get observedAttributes(){return[...super.observedAttributes,...Eh,"disabled"]}connectedCallback(){const{style:e}=Ae(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",L("playback time"));const i=a=>{const{key:r}=a;if(!_h.includes(r)){this.removeEventListener("keyup",i);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{const{metaKey:r,altKey:n,key:s}=a;if(r||n||!_h.includes(s)){this.removeEventListener("keyup",i);return}this.addEventListener("keyup",i)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,i,a){Eh.includes(e)?this.update():e==="disabled"&&a!==i&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,i,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return W(this,Oi.REMAINING)}set remaining(e){F(this,Oi.REMAINING,e)}get showDuration(){return W(this,Oi.SHOW_DURATION)}set showDuration(e){F(this,Oi.SHOW_DURATION,e)}get noToggle(){return W(this,Oi.NO_TOGGLE)}set noToggle(e){F(this,Oi.NO_TOGGLE,e)}get mediaDuration(){return ie(this,u.MEDIA_DURATION)}set mediaDuration(e){ue(this,u.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){ue(this,u.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(u.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(u.MEDIA_SEEKABLE);return}this.setAttribute(u.MEDIA_SEEKABLE,e.join(":"))}update(){const e=Jl(this);Y1(this),e!==dl(this,Ta).innerHTML&&(dl(this,Ta).innerHTML=e)}}Ta=new WeakMap;Jp.getSlotTemplateHTML=G1;f.customElements.get("media-time-display")||f.customElements.define("media-time-display",Jp);var ev=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},we=(t,e,i)=>(ev(t,e,"read from private field"),e.get(t)),kt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Qe=(t,e,i,a)=>(ev(t,e,"write to private field"),e.set(t,i),i),Q1=(t,e,i,a)=>({set _(r){Qe(t,e,r)},get _(){return we(t,e)}}),Aa,_s,ka,Pr,bs,gs,ys,Sa,Ni,Ts;class z1{constructor(e,i,a){kt(this,Aa,void 0),kt(this,_s,void 0),kt(this,ka,void 0),kt(this,Pr,void 0),kt(this,bs,void 0),kt(this,gs,void 0),kt(this,ys,void 0),kt(this,Sa,void 0),kt(this,Ni,0),kt(this,Ts,(r=performance.now())=>{Qe(this,Ni,requestAnimationFrame(we(this,Ts))),Qe(this,Pr,performance.now()-we(this,ka));const n=1e3/this.fps;if(we(this,Pr)>n){Qe(this,ka,r-we(this,Pr)%n);const s=1e3/((r-we(this,_s))/++Q1(this,bs)._),o=(r-we(this,gs))/1e3/this.duration;let l=we(this,ys)+o*this.playbackRate;l-we(this,Aa).valueAsNumber>0?Qe(this,Sa,this.playbackRate/this.duration/s):(Qe(this,Sa,.995*we(this,Sa)),l=we(this,Aa).valueAsNumber+we(this,Sa)),this.callback(l)}}),Qe(this,Aa,e),this.callback=i,this.fps=a}start(){we(this,Ni)===0&&(Qe(this,ka,performance.now()),Qe(this,_s,we(this,ka)),Qe(this,bs,0),we(this,Ts).call(this))}stop(){we(this,Ni)!==0&&(cancelAnimationFrame(we(this,Ni)),Qe(this,Ni,0))}update({start:e,duration:i,playbackRate:a}){const r=e-we(this,Aa).valueAsNumber,n=Math.abs(i-this.duration);(r>0||r<-.03||n>=.5)&&this.callback(e),Qe(this,ys,e),Qe(this,gs,performance.now()),this.duration=i,this.playbackRate=a}}Aa=new WeakMap;_s=new WeakMap;ka=new WeakMap;Pr=new WeakMap;bs=new WeakMap;gs=new WeakMap;ys=new WeakMap;Sa=new WeakMap;Ni=new WeakMap;Ts=new WeakMap;var Iu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ce=(t,e,i)=>(Iu(t,e,"read from private field"),i?i.call(t):e.get(t)),ye=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},it=(t,e,i,a)=>(Iu(t,e,"write to private field"),e.set(t,i),i),Ne=(t,e,i)=>(Iu(t,e,"access private method"),i),wa,Xi,uo,Zr,co,As,cn,hn,Ia,Ra,Ca,Ur,Ru,tv,ed,ho,Cu,mo,Lu,po,Du,td,iv,mn,vo,id,av;const Z1="video not loaded, unknown time.",j1=t=>{const e=t.range,i=Gr(+rv(t)),a=Gr(+t.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:Z1;e.setAttribute("aria-valuetext",r)};function X1(t){return`
1213
+ ${sr.getTemplateHTML(t)}
1214
+ <style>
1215
+ :host {
1216
+ --media-box-border-radius: 4px;
1217
+ --media-box-padding-left: 10px;
1218
+ --media-box-padding-right: 10px;
1219
+ --media-preview-border-radius: var(--media-box-border-radius);
1220
+ --media-box-arrow-offset: var(--media-box-border-radius);
1221
+ --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
1222
+ --_preview-background: var(--media-preview-background, var(--_control-background));
1223
+
1224
+
1225
+ contain: layout;
1226
+ }
1227
+
1228
+ #buffered {
1229
+ background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));
1230
+ position: absolute;
1231
+ height: 100%;
1232
+ will-change: width;
1233
+ }
1234
+
1235
+ #preview-rail,
1236
+ #current-rail {
1237
+ width: 100%;
1238
+ position: absolute;
1239
+ left: 0;
1240
+ bottom: 100%;
1241
+ pointer-events: none;
1242
+ will-change: transform;
1243
+ }
1244
+
1245
+ [part~="box"] {
1246
+ width: min-content;
1247
+
1248
+ position: absolute;
1249
+ bottom: 100%;
1250
+ flex-direction: column;
1251
+ align-items: center;
1252
+ transform: translateX(-50%);
1253
+ }
1254
+
1255
+ [part~="current-box"] {
1256
+ display: var(--media-current-box-display, var(--media-box-display, flex));
1257
+ margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));
1258
+ visibility: hidden;
1259
+ }
1260
+
1261
+ [part~="preview-box"] {
1262
+ display: var(--media-preview-box-display, var(--media-box-display, flex));
1263
+ margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));
1264
+ transition-property: var(--media-preview-transition-property, visibility, opacity);
1265
+ transition-duration: var(--media-preview-transition-duration-out, .25s);
1266
+ transition-delay: var(--media-preview-transition-delay-out, 0s);
1267
+ visibility: hidden;
1268
+ opacity: 0;
1269
+ }
1270
+
1271
+ :host(:is([${u.MEDIA_PREVIEW_IMAGE}], [${u.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
1272
+ transition-duration: var(--media-preview-transition-duration-in, .5s);
1273
+ transition-delay: var(--media-preview-transition-delay-in, .25s);
1274
+ visibility: visible;
1275
+ opacity: 1;
1276
+ }
1277
+
1278
+ @media (hover: hover) {
1279
+ :host(:is([${u.MEDIA_PREVIEW_IMAGE}], [${u.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
1280
+ transition-duration: var(--media-preview-transition-duration-in, .5s);
1281
+ transition-delay: var(--media-preview-transition-delay-in, .25s);
1282
+ visibility: visible;
1283
+ opacity: 1;
1284
+ }
1285
+ }
1286
+
1287
+ media-preview-thumbnail,
1288
+ ::slotted(media-preview-thumbnail) {
1289
+ visibility: hidden;
1290
+
1291
+ transition: visibility 0s .25s;
1292
+ transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1293
+ background: var(--media-preview-thumbnail-background, var(--_preview-background));
1294
+ box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));
1295
+ max-width: var(--media-preview-thumbnail-max-width, 180px);
1296
+ max-height: var(--media-preview-thumbnail-max-height, 160px);
1297
+ min-width: var(--media-preview-thumbnail-min-width, 120px);
1298
+ min-height: var(--media-preview-thumbnail-min-height, 80px);
1299
+ border: var(--media-preview-thumbnail-border);
1300
+ border-radius: var(--media-preview-thumbnail-border-radius,
1301
+ var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
1302
+ }
1303
+
1304
+ :host([${u.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
1305
+ :host([${u.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
1306
+ transition-delay: var(--media-preview-transition-delay-in, .25s);
1307
+ visibility: visible;
1308
+ }
1309
+
1310
+ @media (hover: hover) {
1311
+ :host([${u.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
1312
+ :host([${u.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
1313
+ transition-delay: var(--media-preview-transition-delay-in, .25s);
1314
+ visibility: visible;
1315
+ }
1316
+
1317
+ :host([${u.MEDIA_PREVIEW_TIME}]:hover) {
1318
+ --media-time-range-hover-display: block;
1319
+ }
1320
+ }
1321
+
1322
+ media-preview-chapter-display,
1323
+ ::slotted(media-preview-chapter-display) {
1324
+ font-size: var(--media-font-size, 13px);
1325
+ line-height: 17px;
1326
+ min-width: 0;
1327
+ visibility: hidden;
1328
+
1329
+ transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;
1330
+ transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1331
+ background: var(--media-preview-chapter-background, var(--_preview-background));
1332
+ border-radius: var(--media-preview-chapter-border-radius,
1333
+ var(--media-preview-border-radius) var(--media-preview-border-radius)
1334
+ var(--media-preview-border-radius) var(--media-preview-border-radius));
1335
+ padding: var(--media-preview-chapter-padding, 3.5px 9px);
1336
+ margin: var(--media-preview-chapter-margin, 0 0 5px);
1337
+ text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1338
+ }
1339
+
1340
+ :host([${u.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
1341
+ :host([${u.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
1342
+ transition-delay: var(--media-preview-transition-delay-in, .25s);
1343
+ border-radius: var(--media-preview-chapter-border-radius, 0);
1344
+ padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
1345
+ margin: var(--media-preview-chapter-margin, 0);
1346
+ min-width: 100%;
1347
+ }
1348
+
1349
+ media-preview-chapter-display[${u.MEDIA_PREVIEW_CHAPTER}],
1350
+ ::slotted(media-preview-chapter-display[${u.MEDIA_PREVIEW_CHAPTER}]) {
1351
+ visibility: visible;
1352
+ }
1353
+
1354
+ media-preview-chapter-display:not([aria-valuetext]),
1355
+ ::slotted(media-preview-chapter-display:not([aria-valuetext])) {
1356
+ display: none;
1357
+ }
1358
+
1359
+ media-preview-time-display,
1360
+ ::slotted(media-preview-time-display),
1361
+ media-time-display,
1362
+ ::slotted(media-time-display) {
1363
+ font-size: var(--media-font-size, 13px);
1364
+ line-height: 17px;
1365
+ min-width: 0;
1366
+
1367
+ transition: min-width 0s, border-radius 0s;
1368
+ transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1369
+ background: var(--media-preview-time-background, var(--_preview-background));
1370
+ border-radius: var(--media-preview-time-border-radius,
1371
+ var(--media-preview-border-radius) var(--media-preview-border-radius)
1372
+ var(--media-preview-border-radius) var(--media-preview-border-radius));
1373
+ padding: var(--media-preview-time-padding, 3.5px 9px);
1374
+ margin: var(--media-preview-time-margin, 0);
1375
+ text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1376
+ transform: translateX(min(
1377
+ max(calc(50% - var(--_box-width) / 2),
1378
+ calc(var(--_box-shift, 0))),
1379
+ calc(var(--_box-width) / 2 - 50%)
1380
+ ));
1381
+ }
1382
+
1383
+ :host([${u.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
1384
+ :host([${u.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
1385
+ transition-delay: var(--media-preview-transition-delay-in, .25s);
1386
+ border-radius: var(--media-preview-time-border-radius,
1387
+ 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
1388
+ min-width: 100%;
1389
+ }
1390
+
1391
+ :host([${u.MEDIA_PREVIEW_TIME}]:hover) {
1392
+ --media-time-range-hover-display: block;
1393
+ }
1394
+
1395
+ [part~="arrow"],
1396
+ ::slotted([part~="arrow"]) {
1397
+ display: var(--media-box-arrow-display, inline-block);
1398
+ transform: translateX(min(
1399
+ max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),
1400
+ calc(var(--_box-shift, 0))),
1401
+ calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))
1402
+ ));
1403
+
1404
+ border-color: transparent;
1405
+ border-top-color: var(--media-box-arrow-background, var(--_control-background));
1406
+ border-width: var(--media-box-arrow-border-width,
1407
+ var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);
1408
+ border-style: solid;
1409
+ justify-content: center;
1410
+ height: 0;
1411
+ }
1412
+ </style>
1413
+ <div id="preview-rail">
1414
+ <slot name="preview" part="box preview-box">
1415
+ <media-preview-thumbnail>
1416
+ <template shadowrootmode="${vh.shadowRootOptions.mode}">
1417
+ ${vh.getTemplateHTML({})}
1418
+ </template>
1419
+ </media-preview-thumbnail>
1420
+ <media-preview-chapter-display></media-preview-chapter-display>
1421
+ <media-preview-time-display></media-preview-time-display>
1422
+ <slot name="preview-arrow"><div part="arrow"></div></slot>
1423
+ </slot>
1424
+ </div>
1425
+ <div id="current-rail">
1426
+ <slot name="current" part="box current-box">
1427
+
1428
+ </slot>
1429
+ </div>
1430
+ `}const Pn=(t,e=t.mediaCurrentTime)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;const r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},rv=(t,e=t.range.valueAsNumber)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i};class Mu extends sr{constructor(){super(),ye(this,Ca),ye(this,Ru),ye(this,ho),ye(this,mo),ye(this,po),ye(this,td),ye(this,mn),ye(this,id),ye(this,wa,void 0),ye(this,Xi,void 0),ye(this,uo,void 0),ye(this,Zr,void 0),ye(this,co,void 0),ye(this,As,void 0),ye(this,cn,void 0),ye(this,hn,void 0),ye(this,Ia,void 0),ye(this,Ra,void 0),ye(this,ed,a=>{this.dragging||(Xd(a)&&(this.range.valueAsNumber=a),ce(this,Ra)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),it(this,uo,this.shadowRoot.querySelectorAll('[part~="box"]')),it(this,co,this.shadowRoot.querySelector('[part~="preview-box"]')),it(this,As,this.shadowRoot.querySelector('[part~="current-box"]'));const i=getComputedStyle(this);it(this,cn,parseInt(i.getPropertyValue("--media-box-padding-left"))),it(this,hn,parseInt(i.getPropertyValue("--media-box-padding-right"))),it(this,Xi,new z1(this.range,ce(this,ed),60))}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PAUSED,u.MEDIA_DURATION,u.MEDIA_SEEKABLE,u.MEDIA_CURRENT_TIME,u.MEDIA_PREVIEW_IMAGE,u.MEDIA_PREVIEW_TIME,u.MEDIA_PREVIEW_CHAPTER,u.MEDIA_BUFFERED,u.MEDIA_PLAYBACK_RATE,u.MEDIA_LOADING,u.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",L("seek")),Ne(this,Ca,Ur).call(this),it(this,wa,this.getRootNode()),(e=ce(this,wa))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),Ne(this,Ca,Ur).call(this),(e=ce(this,wa))==null||e.removeEventListener("transitionstart",this),it(this,wa,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===u.MEDIA_CURRENT_TIME||e===u.MEDIA_PAUSED||e===u.MEDIA_ENDED||e===u.MEDIA_LOADING||e===u.MEDIA_DURATION||e===u.MEDIA_SEEKABLE?(ce(this,Xi).update({start:Pn(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Ne(this,Ca,Ur).call(this),j1(this)):e===u.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===u.MEDIA_DURATION||e===u.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=ce(this,Ia),this.updateBar()))}get mediaChaptersCues(){return ce(this,Ia)}set mediaChaptersCues(e){var i;it(this,Ia,e),this.updateSegments((i=ce(this,Ia))==null?void 0:i.map(a=>({start:Pn(this,a.startTime),end:Pn(this,a.endTime)})))}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,u.MEDIA_LOADING)}set mediaLoading(e){F(this,u.MEDIA_LOADING,e)}get mediaDuration(){return ie(this,u.MEDIA_DURATION)}set mediaDuration(e){ue(this,u.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){ue(this,u.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){ue(this,u.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(u.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(u.MEDIA_BUFFERED);return}const i=e.map(a=>a.join(":")).join(" ");this.setAttribute(u.MEDIA_BUFFERED,i)}get mediaSeekable(){const e=this.getAttribute(u.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(u.MEDIA_SEEKABLE);return}this.setAttribute(u.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;const[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;const[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return ae(this,u.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,u.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return ie(this,u.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){ue(this,u.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return W(this,u.MEDIA_ENDED)}set mediaEnded(e){F(this,u.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{const n=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([o,l])=>o<=n&&n<=l))!=null?e:[];a=Pn(this,s)}const{style:r}=Ae(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const i=Ae(this.shadowRoot,"#current-rail"),a=Ae(this.shadowRoot,'[part~="current-box"]'),r=Ne(this,ho,Cu).call(this,ce(this,As)),n=Ne(this,mo,Lu).call(this,r,this.range.valueAsNumber),s=Ne(this,po,Du).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${n})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":Ne(this,id,av).call(this);break;case"pointermove":Ne(this,td,iv).call(this,e);break;case"pointerup":ce(this,Ra)&&it(this,Ra,!1);break;case"pointerdown":it(this,Ra,!0);break;case"pointerleave":Ne(this,mn,vo).call(this,null);break;case"transitionstart":si(e.target,this)&&setTimeout(()=>Ne(this,Ca,Ur).call(this),0);break}}}wa=new WeakMap;Xi=new WeakMap;uo=new WeakMap;Zr=new WeakMap;co=new WeakMap;As=new WeakMap;cn=new WeakMap;hn=new WeakMap;Ia=new WeakMap;Ra=new WeakMap;Ca=new WeakSet;Ur=function(){Ne(this,Ru,tv).call(this)?ce(this,Xi).start():ce(this,Xi).stop()};Ru=new WeakSet;tv=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&np(this)};ed=new WeakMap;ho=new WeakSet;Cu=function(t){var e;const a=((e=this.getAttribute("bounds")?rr(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),n=t.offsetWidth,s=-(r.left-a.left-n/2),o=a.right-r.left-n/2;return{box:{width:n,min:s,max:o},bounds:a,range:r}};mo=new WeakSet;Lu=function(t,e){let i=`${e*100}%`;const{width:a,min:r,max:n}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(n)){const o=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${o})`}return i};po=new WeakSet;Du=function(t,e){const{width:i,min:a,max:r}=t.box,n=e*t.range.width;if(n<a+ce(this,cn)){const s=t.range.left-t.bounds.left-ce(this,cn);return`${n-i/2+s}px`}if(n>r-ce(this,hn)){const s=t.bounds.right-t.range.right-ce(this,hn);return`${n+i/2-s-t.range.width}px`}return 0};td=new WeakSet;iv=function(t){const e=[...ce(this,uo)].some(m=>t.composedPath().includes(m));if(!this.dragging&&(e||!t.composedPath().includes(this))){Ne(this,mn,vo).call(this,null);return}const i=this.mediaSeekableEnd;if(!i)return;const a=Ae(this.shadowRoot,"#preview-rail"),r=Ae(this.shadowRoot,'[part~="preview-box"]'),n=Ne(this,ho,Cu).call(this,ce(this,co));let s=(t.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));const o=Ne(this,mo,Lu).call(this,n,s),l=Ne(this,po,Du).call(this,n,s);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${n.box.width}px`);const d=Math.round(ce(this,Zr))-Math.round(s*i);Math.abs(d)<1&&s>.01&&s<.99||(it(this,Zr,s*i),Ne(this,mn,vo).call(this,ce(this,Zr)))};mn=new WeakSet;vo=function(t){this.dispatchEvent(new f.CustomEvent(I.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};id=new WeakSet;av=function(){ce(this,Xi).stop();const t=rv(this);this.dispatchEvent(new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};Mu.shadowRootOptions={mode:"open"};Mu.getTemplateHTML=X1;f.customElements.get("media-time-range")||f.customElements.define("media-time-range",Mu);const J1=1,ey=t=>t.mediaMuted?0:t.mediaVolume,ty=t=>`${Math.round(t*100)}%`;class iy extends sr{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_VOLUME,u.MEDIA_MUTED,u.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{const e=this.range.value,i=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",L("volume"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===u.MEDIA_VOLUME||e===u.MEDIA_MUTED)&&(this.range.valueAsNumber=ey(this),this.range.setAttribute("aria-valuetext",ty(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return ie(this,u.MEDIA_VOLUME,J1)}set mediaVolume(e){ue(this,u.MEDIA_VOLUME,e)}get mediaMuted(){return W(this,u.MEDIA_MUTED)}set mediaMuted(e){F(this,u.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ae(this,u.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){re(this,u.MEDIA_VOLUME_UNAVAILABLE,e)}}f.customElements.get("media-volume-range")||f.customElements.define("media-volume-range",iy);function ay(t){return`
1431
+ <style>
1432
+ :host {
1433
+ min-width: 4ch;
1434
+ padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1435
+ width: 100%;
1436
+ display: grid;
1437
+ grid-template-columns: 1fr auto;
1438
+ gap: 1rem;
1439
+ font-weight: var(--media-button-font-weight, normal);
1440
+ }
1441
+
1442
+ #checked-indicator {
1443
+ display: none;
1444
+ }
1445
+
1446
+ :host([${u.MEDIA_LOOP}]) #checked-indicator {
1447
+ display: block;
1448
+ }
1449
+ </style>
1450
+
1451
+ <span id="icon">
1452
+ </span>
1453
+
1454
+ <div id="checked-indicator">
1455
+ <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
1456
+ <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
1457
+ </svg>
1458
+ </div>
1459
+ `}function ry(){return L("Loop")}class xu extends Ce{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=L("Loop"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return W(this,u.MEDIA_LOOP)}set mediaLoop(e){F(this,u.MEDIA_LOOP,e)}handleClick(){const e=!this.mediaLoop,i=new f.CustomEvent(I.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}xu.getSlotTemplateHTML=ay;xu.getTooltipContentHTML=ry;f.customElements.get("media-loop-button")||f.customElements.define("media-loop-button",xu);var nv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},H=(t,e,i)=>(nv(t,e,"read from private field"),i?i.call(t):e.get(t)),Ht=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ei=(t,e,i,a)=>(nv(t,e,"write to private field"),e.set(t,i),i),La,ks,Pi,$r,vi,fi,Ei,Ui,Da,Ss,pt;const bh=1,gh=0,ny=1,sy={processCallback(t,e,i){if(i){for(const[a,r]of e)if(a in i){const n=i[a];typeof n=="boolean"&&r instanceof gt&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof gt?r.element[r.attributeName]=n:r.value=n}}}};class Fo extends f.DocumentFragment{constructor(e,i,a=sy){var r;super(),Ht(this,La,void 0),Ht(this,ks,void 0),this.append(e.content.cloneNode(!0)),ei(this,La,sv(this)),ei(this,ks,a),(r=a.createCallback)==null||r.call(a,this,H(this,La),i),a.processCallback(this,H(this,La),i)}update(e){H(this,ks).processCallback(this,H(this,La),e)}}La=new WeakMap;ks=new WeakMap;const sv=(t,e=[])=>{let i,a;for(const r of t.attributes||[])if(r.value.includes("{{")){const n=new ly;for([i,a]of Th(r.value))if(!i)n.append(a);else{const s=new gt(t,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(const r of t.childNodes)if(r.nodeType===bh&&!(r instanceof HTMLTemplateElement))sv(r,e);else{const n=r.data;if(r.nodeType===bh||n.includes("{{")){const s=[];if(n)for([i,a]of Th(n))if(!i)s.push(new Text(a));else{const o=new or(t);s.push(o),e.push([a,o])}else if(r instanceof HTMLTemplateElement){const o=new dv(t,r);s.push(o),e.push([o.expression,o])}r.replaceWith(...s.flatMap(o=>o.replacementNodes||[o]))}}return e},yh={},Th=t=>{let e="",i=0,a=yh[t],r=0,n;if(a)return a;for(a=[];n=t[r];r++)n==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([gh,e]),e="",r++):n==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([ny,e.trim()]),e="",r++):e+=n||"";return e&&a.push([gh,(i>0?"{{":"")+e]),yh[t]=a},oy=11;class ov{get value(){return""}set value(e){}toString(){return this.value}}const lv=new WeakMap;class ly{constructor(){Ht(this,Pi,[])}[Symbol.iterator](){return H(this,Pi).values()}get length(){return H(this,Pi).length}item(e){return H(this,Pi)[e]}append(...e){for(const i of e)i instanceof gt&&lv.set(i,this),H(this,Pi).push(i)}toString(){return H(this,Pi).join("")}}Pi=new WeakMap;class gt extends ov{constructor(e,i,a){super(),Ht(this,Ui),Ht(this,$r,""),Ht(this,vi,void 0),Ht(this,fi,void 0),Ht(this,Ei,void 0),ei(this,vi,e),ei(this,fi,i),ei(this,Ei,a)}get attributeName(){return H(this,fi)}get attributeNamespace(){return H(this,Ei)}get element(){return H(this,vi)}get value(){return H(this,$r)}set value(e){H(this,$r)!==e&&(ei(this,$r,e),!H(this,Ui,Da)||H(this,Ui,Da).length===1?e==null?H(this,vi).removeAttributeNS(H(this,Ei),H(this,fi)):H(this,vi).setAttributeNS(H(this,Ei),H(this,fi),e):H(this,vi).setAttributeNS(H(this,Ei),H(this,fi),H(this,Ui,Da).toString()))}get booleanValue(){return H(this,vi).hasAttributeNS(H(this,Ei),H(this,fi))}set booleanValue(e){if(!H(this,Ui,Da)||H(this,Ui,Da).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}}$r=new WeakMap;vi=new WeakMap;fi=new WeakMap;Ei=new WeakMap;Ui=new WeakSet;Da=function(){return lv.get(this)};class or extends ov{constructor(e,i){super(),Ht(this,Ss,void 0),Ht(this,pt,void 0),ei(this,Ss,e),ei(this,pt,i?[...i]:[new Text])}get replacementNodes(){return H(this,pt)}get parentNode(){return H(this,Ss)}get nextSibling(){return H(this,pt)[H(this,pt).length-1].nextSibling}get previousSibling(){return H(this,pt)[0].previousSibling}get value(){return H(this,pt).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){const i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===oy?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),ei(this,pt,dy(H(this,pt)[0].parentNode,H(this,pt),i,this.nextSibling))}}Ss=new WeakMap;pt=new WeakMap;class dv extends or{constructor(e,i){const a=i.getAttribute("directive")||i.getAttribute("type");let r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}}function dy(t,e,i,a=null){let r=0,n,s,o,l=i.length,d=e.length;for(;r<l&&r<d&&e[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==e[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)t.insertBefore(i[r++],a);if(r==l)for(;r<d;)t.removeChild(e[r++]);else{for(n=e[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(t.replaceChild(o,n),n=s):t.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,t.removeChild(n),n=s}return i}const Ah={string:t=>String(t)};class uv{constructor(e){this.template=e,this.state=void 0}}const Yi=new WeakMap,Gi=new WeakMap,ad={partial:(t,e)=>{e[t.expression]=new uv(t.template)},if:(t,e)=>{var i;if(cv(t.expression,e))if(Yi.get(t)!==t.template){Yi.set(t,t.template);const a=new Fo(t.template,e,Ou);t.replace(a),Gi.set(t,a)}else(i=Gi.get(t))==null||i.update(e);else t.replace(""),Yi.delete(t),Gi.delete(t)}},uy=Object.keys(ad),Ou={processCallback(t,e,i){var a,r;if(i)for(const[n,s]of e){if(s instanceof dv){if(!s.directive){const l=uy.find(d=>s.template.hasAttribute(d));l&&(s.directive=l,s.expression=s.template.getAttribute(l))}(a=ad[s.directive])==null||a.call(ad,s,i);continue}let o=cv(n,i);if(o instanceof uv){Yi.get(s)!==o.template?(Yi.set(s,o.template),o=new Fo(o.template,o.state,Ou),s.value=o,Gi.set(s,o)):(r=Gi.get(s))==null||r.update(o.state);continue}o?(s instanceof gt&&s.attributeName.startsWith("aria-")&&(o=String(o)),s instanceof gt?typeof o=="boolean"?s.booleanValue=o:typeof o=="function"?s.element[s.attributeName]=o:s.value=o:(s.value=o,Yi.delete(s),Gi.delete(s))):s instanceof gt?s.value=void 0:(s.value=void 0,Yi.delete(s),Gi.delete(s))}}},kh={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t??e,"|":(t,e)=>{var i;return(i=Ah[e])==null?void 0:i.call(Ah,t)}};function cy(t){return hy(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function cv(t,e={}){var i,a,r,n,s,o,l;const d=cy(t);if(d.length===0||d.some(({type:m})=>!m))return fr(t);if(((i=d[0])==null?void 0:i.token)===">"){const m=e[(a=d[1])==null?void 0:a.token];if(!m)return fr(t);const p={...e};m.state=p;const h=d.slice(2);for(let c=0;c<h.length;c+=3){const v=(r=h[c])==null?void 0:r.token,E=(n=h[c+1])==null?void 0:n.token,g=(s=h[c+2])==null?void 0:s.token;v&&E==="="&&(p[v]=Er(g,e))}return m}if(d.length===1)return Un(d[0])?Er(d[0].token,e):fr(t);if(d.length===2){const m=(o=d[0])==null?void 0:o.token,p=kh[m];if(!p||!Un(d[1]))return fr(t);const h=Er(d[1].token,e);return p(h)}if(d.length===3){const m=(l=d[1])==null?void 0:l.token,p=kh[m];if(!p||!Un(d[0])||!Un(d[2]))return fr(t);const h=Er(d[0].token,e);if(m==="|")return p(h,d[2].token);const c=Er(d[2].token,e);return p(h,c)}}function fr(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function Un({type:t}){return["number","boolean","string","param"].includes(t)}function Er(t,e){const i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):zm(t)?parseFloat(t):e[t]}function hy(t,e){let i,a,r;const n=[];for(;t;){r=null,i=t.length;for(const s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&n.push({token:t.substr(0,i),type:void 0}),r&&n.push(r),t=t.substr(i+(r?r.token.length:0))}return n}var Nu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},rd=(t,e,i)=>(Nu(t,e,"read from private field"),i?i.call(t):e.get(t)),_r=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Qi=(t,e,i,a)=>(Nu(t,e,"write to private field"),e.set(t,i),i),ul=(t,e,i)=>(Nu(t,e,"access private method"),i),qa,ws,Ya,nd,hv,Is,sd;const cl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},mv=ge.createElement("template");mv.innerHTML=`
1460
+ <style>
1461
+ :host {
1462
+ display: inline-block;
1463
+ line-height: 0;
1464
+ }
1465
+
1466
+ media-controller {
1467
+ width: 100%;
1468
+ height: 100%;
1469
+ }
1470
+
1471
+ media-captions-button:not([mediasubtitleslist]),
1472
+ media-captions-menu:not([mediasubtitleslist]),
1473
+ media-captions-menu-button:not([mediasubtitleslist]),
1474
+ media-audio-track-menu[mediaaudiotrackunavailable],
1475
+ media-audio-track-menu-button[mediaaudiotrackunavailable],
1476
+ media-rendition-menu[mediarenditionunavailable],
1477
+ media-rendition-menu-button[mediarenditionunavailable],
1478
+ media-volume-range[mediavolumeunavailable],
1479
+ media-airplay-button[mediaairplayunavailable],
1480
+ media-fullscreen-button[mediafullscreenunavailable],
1481
+ media-cast-button[mediacastunavailable],
1482
+ media-pip-button[mediapipunavailable] {
1483
+ display: none;
1484
+ }
1485
+ </style>
1486
+ `;class Ko extends f.HTMLElement{constructor(){super(),_r(this,nd),_r(this,Is),_r(this,qa,void 0),_r(this,ws,void 0),_r(this,Ya,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(i=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||i.some(r=>{const n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(cl[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(ri.BREAKPOINTS_COMPUTED,this.render),ul(this,nd,hv).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=rd(this,qa))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(Qi(this,qa,e),Qi(this,Ya,null),this.createRenderer())}get props(){var e,i,a;const r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>cl[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(const s of r){const o=(a=cl[s.name])!=null?a:fg(s.name);let{value:l}=s;l!=null?(zm(l)&&(l=parseFloat(l)),n[o]=l===""?!0:l):n[o]=!1}return n}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&ul(this,Is,sd).call(this)}connectedCallback(){ul(this,Is,sd).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==rd(this,ws)&&(Qi(this,ws,this.template),this.renderer=new Fo(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(mv.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}}qa=new WeakMap;ws=new WeakMap;Ya=new WeakMap;nd=new WeakSet;hv=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}};Is=new WeakSet;sd=function(){var t;const e=this.getAttribute("template");if(!e||e===rd(this,Ya))return;const i=this.getRootNode(),a=(t=i?.getElementById)==null?void 0:t.call(i,e);if(a){Qi(this,Ya,e),Qi(this,qa,a),this.createRenderer();return}my(e)&&(Qi(this,Ya,e),py(e).then(r=>{const n=ge.createElement("template");n.innerHTML=r,Qi(this,qa,n),this.createRenderer()}).catch(console.error))};Ko.observedAttributes=["template"];Ko.processor=Ou;function my(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;const e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function py(t){const e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}f.customElements.get("media-theme")||f.customElements.define("media-theme",Ko);function vy({anchor:t,floating:e,placement:i}){const a=fy({anchor:t,floating:e}),{x:r,y:n}=_y(a,i);return{x:r,y:n}}function fy({anchor:t,floating:e}){return{anchor:Ey(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function Ey(t,e){var i;const a=t.getBoundingClientRect(),r=(i=e?.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function _y({anchor:t,floating:e},i){const a=by(i)==="x"?"y":"x",r=a==="y"?"height":"width",n=pv(i),s=t.x+t.width/2-e.width/2,o=t.y+t.height/2-e.height/2,l=t[r]/2-e[r]/2;let d;switch(n){case"top":d={x:s,y:t.y-e.height};break;case"bottom":d={x:s,y:t.y+t.height};break;case"right":d={x:t.x+t.width,y:o};break;case"left":d={x:t.x-e.width,y:o};break;default:d={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":d[a]-=l;break;case"end":d[a]+=l;break}return d}function pv(t){return t.split("-")[0]}function by(t){return["top","bottom"].includes(pv(t))?"y":"x"}class Pu extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}}class gy extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}}var Uu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},V=(t,e,i)=>(Uu(t,e,"read from private field"),i?i.call(t):e.get(t)),j=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Nt=(t,e,i,a)=>(Uu(t,e,"write to private field"),e.set(t,i),i),X=(t,e,i)=>(Uu(t,e,"access private method"),i),Pt,Ji,Si,Rs,Cs,ea,pn,od,vv,fo,$u,Eo,Ls,ld,dd,fv,ud,Ev,cd,_v,Ga,Qa,za,vn,_o,Hu,hd,bv,Bu,gv,md,yv,Wu,Tv,pd,Av,vd,kv,jr,bo,fd,Sv,Xr,go,Ds,Ed;function tr({type:t,text:e,value:i,checked:a}){const r=ge.createElement("media-chrome-menu-item");r.type=t,r.part.add("menu-item"),r.part.add(t),r.value=i,r.checked=a;const n=ge.createElement("span");return n.textContent=e,r.append(n),r}function ta(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if(i?.nodeName=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;const a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function yy(t){return`
1487
+ <style>
1488
+ :host {
1489
+ font: var(--media-font,
1490
+ var(--media-font-weight, normal)
1491
+ var(--media-font-size, 14px) /
1492
+ var(--media-text-content-height, var(--media-control-height, 24px))
1493
+ var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
1494
+ color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
1495
+ --_menu-bg: rgb(20 20 30 / .8);
1496
+ background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));
1497
+ border-radius: var(--media-menu-border-radius);
1498
+ border: var(--media-menu-border, none);
1499
+ display: var(--media-menu-display, inline-flex) !important;
1500
+
1501
+ transition: var(--media-menu-transition-in,
1502
+ visibility 0s,
1503
+ opacity .2s ease-out,
1504
+ transform .15s ease-out,
1505
+ left .2s ease-in-out,
1506
+ min-width .2s ease-in-out,
1507
+ min-height .2s ease-in-out
1508
+ ) !important;
1509
+
1510
+ visibility: var(--media-menu-visibility, visible);
1511
+ opacity: var(--media-menu-opacity, 1);
1512
+ max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
1513
+ transform: var(--media-menu-transform-in, translateY(0) scale(1));
1514
+ flex-direction: column;
1515
+
1516
+ min-height: 0;
1517
+ position: relative;
1518
+ bottom: var(--_menu-bottom);
1519
+ box-sizing: border-box;
1520
+ }
1521
+
1522
+ @-moz-document url-prefix() {
1523
+ :host{
1524
+ --_menu-bg: rgb(20 20 30);
1525
+ }
1526
+ }
1527
+
1528
+ :host([hidden]) {
1529
+ transition: var(--media-menu-transition-out,
1530
+ visibility .15s ease-in,
1531
+ opacity .15s ease-in,
1532
+ transform .15s ease-in
1533
+ ) !important;
1534
+ visibility: var(--media-menu-hidden-visibility, hidden);
1535
+ opacity: var(--media-menu-hidden-opacity, 0);
1536
+ max-height: var(--media-menu-hidden-max-height,
1537
+ var(--media-menu-max-height, var(--_menu-max-height, 300px)));
1538
+ transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
1539
+ pointer-events: none;
1540
+ }
1541
+
1542
+ :host([slot="submenu"]) {
1543
+ background: none;
1544
+ width: 100%;
1545
+ min-height: 100%;
1546
+ position: absolute;
1547
+ bottom: 0;
1548
+ right: -100%;
1549
+ }
1550
+
1551
+ #container {
1552
+ display: flex;
1553
+ flex-direction: column;
1554
+ min-height: 0;
1555
+ transition: transform .2s ease-out;
1556
+ transform: translate(0, 0);
1557
+ }
1558
+
1559
+ #container.has-expanded {
1560
+ transition: transform .2s ease-in;
1561
+ transform: translate(-100%, 0);
1562
+ }
1563
+
1564
+ button {
1565
+ background: none;
1566
+ color: inherit;
1567
+ border: none;
1568
+ padding: 0;
1569
+ font: inherit;
1570
+ outline: inherit;
1571
+ display: inline-flex;
1572
+ align-items: center;
1573
+ }
1574
+
1575
+ slot[name="header"][hidden] {
1576
+ display: none;
1577
+ }
1578
+
1579
+ slot[name="header"] > *,
1580
+ slot[name="header"]::slotted(*) {
1581
+ padding: .4em .7em;
1582
+ border-bottom: 1px solid rgb(255 255 255 / .25);
1583
+ cursor: var(--media-cursor, default);
1584
+ }
1585
+
1586
+ slot[name="header"] > button[part~="back"],
1587
+ slot[name="header"]::slotted(button[part~="back"]) {
1588
+ cursor: var(--media-cursor, pointer);
1589
+ }
1590
+
1591
+ svg[part~="back"] {
1592
+ height: var(--media-menu-icon-height, var(--media-control-height, 24px));
1593
+ fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1594
+ display: block;
1595
+ margin-right: .5ch;
1596
+ }
1597
+
1598
+ slot:not([name]) {
1599
+ gap: var(--media-menu-gap);
1600
+ flex-direction: var(--media-menu-flex-direction, column);
1601
+ overflow: var(--media-menu-overflow, hidden auto);
1602
+ display: flex;
1603
+ min-height: 0;
1604
+ }
1605
+
1606
+ :host([role="menu"]) slot:not([name]) {
1607
+ padding-block: .4em;
1608
+ }
1609
+
1610
+ slot:not([name])::slotted([role="menu"]) {
1611
+ background: none;
1612
+ }
1613
+
1614
+ media-chrome-menu-item > span {
1615
+ margin-right: .5ch;
1616
+ max-width: var(--media-menu-item-max-width);
1617
+ text-overflow: ellipsis;
1618
+ overflow: hidden;
1619
+ }
1620
+ </style>
1621
+ <style id="layout-row" media="width:0">
1622
+
1623
+ slot[name="header"] > *,
1624
+ slot[name="header"]::slotted(*) {
1625
+ padding: .4em .5em;
1626
+ }
1627
+
1628
+ slot:not([name]) {
1629
+ gap: var(--media-menu-gap, .25em);
1630
+ flex-direction: var(--media-menu-flex-direction, row);
1631
+ padding-inline: .5em;
1632
+ }
1633
+
1634
+ media-chrome-menu-item {
1635
+ padding: .3em .5em;
1636
+ }
1637
+
1638
+ media-chrome-menu-item[aria-checked="true"] {
1639
+ background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
1640
+ }
1641
+
1642
+
1643
+ media-chrome-menu-item::part(checked-indicator) {
1644
+ display: var(--media-menu-item-checked-indicator-display, none);
1645
+ }
1646
+ </style>
1647
+ <div id="container" part="container">
1648
+ <slot name="header" hidden>
1649
+ <button part="back button" aria-label="Back to previous menu">
1650
+ <slot name="back-icon">
1651
+ <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
1652
+ <path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
1653
+ </svg>
1654
+ </slot>
1655
+ <slot name="title"></slot>
1656
+ </button>
1657
+ </slot>
1658
+ <slot></slot>
1659
+ </div>
1660
+ <slot name="checked-indicator" hidden></slot>
1661
+ `}const Li={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class ot extends f.HTMLElement{constructor(){if(super(),j(this,od),j(this,fo),j(this,Ls),j(this,dd),j(this,ud),j(this,cd),j(this,za),j(this,_o),j(this,hd),j(this,Bu),j(this,md),j(this,Wu),j(this,pd),j(this,vd),j(this,jr),j(this,fd),j(this,Xr),j(this,Ds),j(this,Pt,null),j(this,Ji,null),j(this,Si,null),j(this,Rs,new Set),j(this,Cs,void 0),j(this,ea,!1),j(this,pn,null),j(this,Eo,()=>{const e=V(this,Rs),i=new Set(this.items);for(const a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(const a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));Nt(this,Rs,i)}),j(this,Ga,()=>{X(this,za,vn).call(this),X(this,_o,Hu).call(this,!1)}),j(this,Qa,()=>{X(this,za,vn).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),Nt(this,Cs,new MutationObserver(V(this,Eo))),V(this,Cs).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[Li.DISABLED,Li.HIDDEN,Li.STYLE,Li.ANCHOR,q.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":X(this,od,vv).call(this,e);break;case"invoke":X(this,dd,fv).call(this,e);break;case"click":X(this,hd,bv).call(this,e);break;case"toggle":X(this,md,yv).call(this,e);break;case"focusout":X(this,pd,Av).call(this,e);break;case"keydown":X(this,vd,kv).call(this,e);break}}connectedCallback(){var e,i;Nt(this,pn,tu(this.shadowRoot,":host")),X(this,Ls,ld).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Nt(this,Pt,Dl(this)),(i=(e=V(this,Pt))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(Xa(fn(this),V(this,Ga)),Xa(this,V(this,Qa))),X(this,fo,$u).call(this)}disconnectedCallback(){var e,i;Ja(fn(this),V(this,Ga)),Ja(this,V(this,Qa)),this.disable(),(i=(e=V(this,Pt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Nt(this,Pt,null)}attributeChangedCallback(e,i,a){var r,n,s,o;e===Li.HIDDEN&&a!==i?(V(this,ea)||Nt(this,ea,!0),this.hidden?X(this,cd,_v).call(this):X(this,ud,Ev).call(this),this.dispatchEvent(new gy({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===q.MEDIA_CONTROLLER?(i&&((n=(r=V(this,Pt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Nt(this,Pt,null)),a&&this.isConnected&&(Nt(this,Pt,Dl(this)),(o=(s=V(this,Pt))==null?void 0:s.associateElement)==null||o.call(s,this))):e===Li.DISABLED&&a!==i?a==null?this.enable():this.disable():e===Li.STYLE&&a!==i&&X(this,Ls,ld).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=Do(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(Ty)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){const i=this.items.find(a=>a.value===e);i&&X(this,Ds,Ed).call(this,i)}focus(){if(Nt(this,Ji,eu()),this.items.length){X(this,Xr,go).call(this,this.items[0]),this.items[0].focus();return}const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e?.focus()}handleSelect(e){var i;const a=X(this,jr,bo).call(this,e);a&&(X(this,Ds,Ed).call(this,a,a.type==="checkbox"),V(this,Si)&&!this.hidden&&((i=V(this,Ji))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;const{key:r}=e,n=this.items,s=(a=(i=X(this,jr,bo).call(this,e))!=null?i:X(this,fd,Sv).call(this))!=null?a:n[0],o=n.indexOf(s);let l=Math.max(0,o);r==="ArrowDown"?l++:r==="ArrowUp"?l--:e.key==="Home"?l=0:e.key==="End"&&(l=n.length-1),l<0&&(l=n.length-1),l>n.length-1&&(l=0),X(this,Xr,go).call(this,n[l]),n[l].focus()}}Pt=new WeakMap;Ji=new WeakMap;Si=new WeakMap;Rs=new WeakMap;Cs=new WeakMap;ea=new WeakMap;pn=new WeakMap;od=new WeakSet;vv=function(t){const e=t.target;for(const i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&X(this,fo,$u).call(this),e.name||V(this,Eo).call(this)};fo=new WeakSet;$u=function(){const t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0};Eo=new WeakMap;Ls=new WeakSet;ld=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};dd=new WeakSet;fv=function(t){Nt(this,Si,t.relatedTarget),si(this,t.relatedTarget)||(this.hidden=!this.hidden)};ud=new WeakSet;Ev=function(){var t;(t=V(this,Si))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Xa(fn(this),V(this,Ga)),Xa(this,V(this,Qa))};cd=new WeakSet;_v=function(){var t;(t=V(this,Si))==null||t.setAttribute("aria-expanded","false"),Ja(fn(this),V(this,Ga)),Ja(this,V(this,Qa))};Ga=new WeakMap;Qa=new WeakMap;za=new WeakSet;vn=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;const{x:e,y:i}=vy({anchor:this.anchorElement,floating:this,placement:"top-start"});t??(t=this.offsetWidth);const r=fn(this).getBoundingClientRect(),n=r.width-e-t,s=r.height-i-this.offsetHeight,{style:o}=V(this,pn);o.setProperty("position","absolute"),o.setProperty("right",`${Math.max(0,n)}px`),o.setProperty("--_menu-bottom",`${s}px`);const l=getComputedStyle(this),m=o.getPropertyValue("--_menu-bottom")===l.bottom?s:parseFloat(l.bottom),p=r.height-m-parseFloat(l.marginBottom);this.style.setProperty("--_menu-max-height",`${p}px`)};_o=new WeakSet;Hu=function(t){const e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e?.querySelector('[role="menu"]'),{style:a}=V(this,pn);if(t||a.setProperty("--media-menu-transition-in","none"),i){const r=i.offsetHeight,n=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${n}px`),this.style.setProperty("min-height",`${r}px`),X(this,za,vn).call(this,n)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),X(this,za,vn).call(this);a.removeProperty("--media-menu-transition-in")};hd=new WeakSet;bv=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(V(this,Bu,gv))){(e=V(this,Ji))==null||e.focus(),this.hidden=!0;return}const i=X(this,jr,bo).call(this,t);!i||i.hasAttribute("disabled")||(X(this,Xr,go).call(this,i),this.handleSelect(t))};Bu=new WeakSet;gv=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};md=new WeakSet;yv=function(t){if(t.target===this)return;X(this,Wu,Tv).call(this);const e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new Pu({relatedTarget:i}));for(const i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);X(this,_o,Hu).call(this,!0)};Wu=new WeakSet;Tv=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};pd=new WeakSet;Av=function(t){var e;si(this,t.relatedTarget)||(V(this,ea)&&((e=V(this,Ji))==null||e.focus()),V(this,Si)&&V(this,Si)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};vd=new WeakSet;kv=function(t){var e,i,a,r,n;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;if(!(o||l||d)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if(V(this,ea)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((n=V(this,Ji))==null||n.focus(),V(this,ea)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};jr=new WeakSet;bo=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};fd=new WeakSet;Sv=function(){return this.items.find(t=>t.tabIndex===0)};Xr=new WeakSet;go=function(t){for(const e of this.items)e.tabIndex=e===t?0:-1};Ds=new WeakSet;Ed=function(t,e){const i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};ot.shadowRootOptions={mode:"open"};ot.getTemplateHTML=yy;function Ty(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t?.role)}function fn(t){var e;return(e=t.getAttribute("bounds")?rr(t,`#${t.getAttribute("bounds")}`):Be(t)||t.parentElement)!=null?e:t}f.customElements.get("media-chrome-menu")||f.customElements.define("media-chrome-menu",ot);var Fu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ft=(t,e,i)=>(Fu(t,e,"read from private field"),i?i.call(t):e.get(t)),Qt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},hl=(t,e,i,a)=>(Fu(t,e,"write to private field"),e.set(t,i),i),bt=(t,e,i)=>(Fu(t,e,"access private method"),i),Ms,Jr,_d,wv,yo,Ku,Vu,Iv,Kt,ir,En,bd,Rv,xs,gd;function Ay(t){return`
1662
+ <style>
1663
+ :host {
1664
+ transition: var(--media-menu-item-transition,
1665
+ background .15s linear,
1666
+ opacity .2s ease-in-out
1667
+ );
1668
+ outline: var(--media-menu-item-outline, 0);
1669
+ outline-offset: var(--media-menu-item-outline-offset, -1px);
1670
+ cursor: var(--media-cursor, pointer);
1671
+ display: flex;
1672
+ align-items: center;
1673
+ align-self: stretch;
1674
+ justify-self: stretch;
1675
+ white-space: nowrap;
1676
+ white-space-collapse: collapse;
1677
+ text-wrap: nowrap;
1678
+ padding: .4em .8em .4em 1em;
1679
+ }
1680
+
1681
+ :host(:focus-visible) {
1682
+ box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
1683
+ outline: var(--media-menu-item-hover-outline, 0);
1684
+ outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));
1685
+ }
1686
+
1687
+ :host(:hover) {
1688
+ cursor: var(--media-cursor, pointer);
1689
+ background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));
1690
+ outline: var(--media-menu-item-hover-outline);
1691
+ outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));
1692
+ }
1693
+
1694
+ :host([aria-checked="true"]) {
1695
+ background: var(--media-menu-item-checked-background);
1696
+ }
1697
+
1698
+ :host([hidden]) {
1699
+ display: none;
1700
+ }
1701
+
1702
+ :host([disabled]) {
1703
+ pointer-events: none;
1704
+ color: rgba(255, 255, 255, .3);
1705
+ }
1706
+
1707
+ slot:not([name]) {
1708
+ width: 100%;
1709
+ }
1710
+
1711
+ slot:not([name="submenu"]) {
1712
+ display: inline-flex;
1713
+ align-items: center;
1714
+ transition: inherit;
1715
+ opacity: var(--media-menu-item-opacity, 1);
1716
+ }
1717
+
1718
+ slot[name="description"] {
1719
+ justify-content: end;
1720
+ }
1721
+
1722
+ slot[name="description"] > span {
1723
+ display: inline-block;
1724
+ margin-inline: 1em .2em;
1725
+ max-width: var(--media-menu-item-description-max-width, 100px);
1726
+ text-overflow: ellipsis;
1727
+ overflow: hidden;
1728
+ font-size: .8em;
1729
+ font-weight: 400;
1730
+ text-align: right;
1731
+ position: relative;
1732
+ top: .04em;
1733
+ }
1734
+
1735
+ slot[name="checked-indicator"] {
1736
+ display: none;
1737
+ }
1738
+
1739
+ :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {
1740
+ display: var(--media-menu-item-checked-indicator-display, inline-block);
1741
+ }
1742
+
1743
+
1744
+ svg, img, ::slotted(svg), ::slotted(img) {
1745
+ height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));
1746
+ fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1747
+ display: block;
1748
+ }
1749
+
1750
+
1751
+ [part~="indicator"],
1752
+ ::slotted([part~="indicator"]) {
1753
+ fill: var(--media-menu-item-indicator-fill,
1754
+ var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));
1755
+ height: var(--media-menu-item-indicator-height, 1.25em);
1756
+ margin-right: .5ch;
1757
+ }
1758
+
1759
+ [part~="checked-indicator"] {
1760
+ visibility: hidden;
1761
+ }
1762
+
1763
+ :host([aria-checked="true"]) [part~="checked-indicator"] {
1764
+ visibility: visible;
1765
+ }
1766
+ </style>
1767
+ <slot name="checked-indicator">
1768
+ <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
1769
+ <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
1770
+ </svg>
1771
+ </slot>
1772
+ <slot name="prefix"></slot>
1773
+ <slot></slot>
1774
+ <slot name="description"></slot>
1775
+ <slot name="suffix">
1776
+ ${this.getSuffixSlotInnerHTML(t)}
1777
+ </slot>
1778
+ <slot name="submenu"></slot>
1779
+ `}function ky(t){return""}const tt={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class Ii extends f.HTMLElement{constructor(){if(super(),Qt(this,_d),Qt(this,yo),Qt(this,Vu),Qt(this,ir),Qt(this,bd),Qt(this,xs),Qt(this,Ms,!1),Qt(this,Jr,void 0),Qt(this,Kt,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],n=(i=r?.dataset.description)!=null?i:r?.text,s=ge.createElement("span");s.textContent=n??"",a.replaceChildren(s)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Je(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[tt.TYPE,tt.DISABLED,tt.CHECKED,tt.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),br(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":bt(this,_d,wv).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":bt(this,bd,Rv).call(this,e);break;case"keyup":bt(this,ir,En).call(this,e);break}}attributeChangedCallback(e,i,a){e===tt.CHECKED&&br(this)&&!Ft(this,Ms)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===tt.TYPE&&a!==i?this.role="menuitem"+a:e===tt.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(tt.DISABLED)||this.enable(),this.role="menuitem"+this.type,hl(this,Jr,yd(this,this.parentNode)),bt(this,xs,gd).call(this),this.submenuElement&&bt(this,yo,Ku).call(this)}disconnectedCallback(){this.disable(),bt(this,xs,gd).call(this),hl(this,Jr,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=Do(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(tt.TYPE))!=null?e:""}set type(e){this.setAttribute(tt.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(tt.VALUE))!=null?e:this.text}set value(e){this.setAttribute(tt.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(br(this))return this.getAttribute("aria-checked")==="true"}set checked(e){br(this)&&(hl(this,Ms,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){br(this)||this.invokeTargetElement&&si(this,e.target)&&this.invokeTargetElement.dispatchEvent(new Pu({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}Ms=new WeakMap;Jr=new WeakMap;_d=new WeakSet;wv=function(t){const e=t.target;if(!e?.name)for(const a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?bt(this,yo,Ku).call(this):bt(this,Vu,Iv).call(this))};yo=new WeakSet;Ku=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Ft(this,Kt)),this.submenuElement.addEventListener("addmenuitem",Ft(this,Kt)),this.submenuElement.addEventListener("removemenuitem",Ft(this,Kt)),Ft(this,Kt).call(this)};Vu=new WeakSet;Iv=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Ft(this,Kt)),this.submenuElement.removeEventListener("addmenuitem",Ft(this,Kt)),this.submenuElement.removeEventListener("removemenuitem",Ft(this,Kt)),Ft(this,Kt).call(this)};Kt=new WeakMap;ir=new WeakSet;En=function(t){const{key:e}=t;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",bt(this,ir,En));return}this.handleClick(t)};bd=new WeakSet;Rv=function(t){const{metaKey:e,altKey:i,key:a}=t;if(e||i||!this.keysUsed.includes(a)){this.removeEventListener("keyup",bt(this,ir,En));return}this.addEventListener("keyup",bt(this,ir,En),{once:!0})};xs=new WeakSet;gd=function(){var t;const e=(t=Ft(this,Jr))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);for(const a of e)a.setAttribute("aria-checked","false");i?.setAttribute("aria-checked","true")};Ii.shadowRootOptions={mode:"open"};Ii.getTemplateHTML=Ay;Ii.getSuffixSlotInnerHTML=ky;function br(t){return t.type==="radio"||t.type==="checkbox"}function yd(t,e){if(!t)return null;const{host:i}=t.getRootNode();return!e&&i?yd(t,i):e?.items?e:yd(e,e?.parentNode)}f.customElements.get("media-chrome-menu-item")||f.customElements.define("media-chrome-menu-item",Ii);function Sy(t){return`
1780
+ ${ot.getTemplateHTML(t)}
1781
+ <style>
1782
+ :host {
1783
+ --_menu-bg: rgb(20 20 30 / .8);
1784
+ background: var(--media-settings-menu-background,
1785
+ var(--media-menu-background,
1786
+ var(--media-control-background,
1787
+ var(--media-secondary-color, var(--_menu-bg)))));
1788
+ min-width: var(--media-settings-menu-min-width, 170px);
1789
+ border-radius: 2px 2px 0 0;
1790
+ overflow: hidden;
1791
+ }
1792
+
1793
+ @-moz-document url-prefix() {
1794
+ :host{
1795
+ --_menu-bg: rgb(20 20 30);
1796
+ }
1797
+ }
1798
+
1799
+ :host([role="menu"]) {
1800
+
1801
+ justify-content: end;
1802
+ }
1803
+
1804
+ slot:not([name]) {
1805
+ justify-content: var(--media-settings-menu-justify-content);
1806
+ flex-direction: var(--media-settings-menu-flex-direction, column);
1807
+ overflow: visible;
1808
+ }
1809
+
1810
+ #container.has-expanded {
1811
+ --media-settings-menu-item-opacity: 0;
1812
+ }
1813
+ </style>
1814
+ `}class Cv extends ot{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-settings-menu-button")}}Cv.getTemplateHTML=Sy;f.customElements.get("media-settings-menu")||f.customElements.define("media-settings-menu",Cv);function wy(t){return`
1815
+ ${Ii.getTemplateHTML.call(this,t)}
1816
+ <style>
1817
+ slot:not([name="submenu"]) {
1818
+ opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));
1819
+ }
1820
+
1821
+ :host([aria-expanded="true"]:hover) {
1822
+ background: transparent;
1823
+ }
1824
+ </style>
1825
+ `}function Iy(t){return`
1826
+ <svg aria-hidden="true" viewBox="0 0 20 24">
1827
+ <path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
1828
+ </svg>
1829
+ `}class Vo extends Ii{}Vo.shadowRootOptions={mode:"open"};Vo.getTemplateHTML=wy;Vo.getSuffixSlotInnerHTML=Iy;f.customElements.get("media-settings-menu-item")||f.customElements.define("media-settings-menu-item",Vo);class lr extends Ce{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=Do(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new Pu({relatedTarget:this}))}}f.customElements.get("media-chrome-menu-button")||f.customElements.define("media-chrome-menu-button",lr);function Ry(){return`
1830
+ <style>
1831
+ :host([aria-expanded="true"]) slot[name=tooltip] {
1832
+ display: none;
1833
+ }
1834
+ </style>
1835
+ <slot name="icon">
1836
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1837
+ <path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>
1838
+ </svg>
1839
+ </slot>
1840
+ `}function Cy(){return L("Settings")}class qu extends lr{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-settings-menu")}}qu.getSlotTemplateHTML=Ry;qu.getTooltipContentHTML=Cy;f.customElements.get("media-settings-menu-button")||f.customElements.define("media-settings-menu-button",qu);var Yu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Lv=(t,e,i)=>(Yu(t,e,"read from private field"),i?i.call(t):e.get(t)),$n=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Td=(t,e,i,a)=>(Yu(t,e,"write to private field"),e.set(t,i),i),Hn=(t,e,i)=>(Yu(t,e,"access private method"),i),Hr,To,Os,Ad,Ns,kd;class Ly extends ot{constructor(){super(...arguments),$n(this,Os),$n(this,Ns),$n(this,Hr,[]),$n(this,To,void 0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_AUDIO_TRACK_LIST,u.MEDIA_AUDIO_TRACK_ENABLED,u.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===u.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(Td(this,Hr,mg(a??"")),Hn(this,Os,Ad).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Hn(this,Ns,kd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Hn(this,Ns,kd))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Be(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return Lv(this,Hr)}set mediaAudioTrackList(e){Td(this,Hr,e),Hn(this,Os,Ad).call(this)}get mediaAudioTrackEnabled(){var e;return(e=ae(this,u.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,u.MEDIA_AUDIO_TRACK_ENABLED,e)}}Hr=new WeakMap;To=new WeakMap;Os=new WeakSet;Ad=function(){if(Lv(this,To)===JSON.stringify(this.mediaAudioTrackList))return;Td(this,To,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort((e,i)=>e.id.localeCompare(i.id,void 0,{numeric:!0}));for(const e of t){const i=this.formatMenuItemText(e.label,e),a=tr({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(a)}};Ns=new WeakSet;kd=function(){if(this.value==null)return;const t=new f.CustomEvent(I.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-audio-track-menu")||f.customElements.define("media-audio-track-menu",Ly);const Dy=`<svg aria-hidden="true" viewBox="0 0 24 24">
1841
+ <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
1842
+ <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>
1843
+ </svg>`;function My(){return`
1844
+ <style>
1845
+ :host([aria-expanded="true"]) slot[name=tooltip] {
1846
+ display: none;
1847
+ }
1848
+ </style>
1849
+ <slot name="icon">${Dy}</slot>
1850
+ `}function xy(){return L("Audio")}const Sh=t=>{const e=L("Audio");t.setAttribute("aria-label",e)};class Gu extends lr{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_AUDIO_TRACK_ENABLED,u.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Sh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_LANG&&Sh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Be(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=ae(this,u.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,u.MEDIA_AUDIO_TRACK_ENABLED,e)}}Gu.getSlotTemplateHTML=My;Gu.getTooltipContentHTML=xy;f.customElements.get("media-audio-track-menu-button")||f.customElements.define("media-audio-track-menu-button",Gu);var Qu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Oy=(t,e,i)=>(Qu(t,e,"read from private field"),e.get(t)),ml=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ny=(t,e,i,a)=>(Qu(t,e,"write to private field"),e.set(t,i),i),Bn=(t,e,i)=>(Qu(t,e,"access private method"),i),Ao,Ps,Sd,Us,wd;const Py=`
1851
+ <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
1852
+ <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
1853
+ </svg>`;function Uy(t){return`
1854
+ ${ot.getTemplateHTML(t)}
1855
+ <slot name="captions-indicator" hidden>${Py}</slot>
1856
+ `}class Dv extends ot{constructor(){super(...arguments),ml(this,Ps),ml(this,Us),ml(this,Ao,void 0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_SUBTITLES_LIST,u.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_SUBTITLES_LIST&&i!==a?Bn(this,Ps,Sd).call(this):e===u.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a||"",Bn(this,Ps,Sd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Bn(this,Us,wd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Bn(this,Us,wd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return wh(this,u.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Ih(this,u.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return wh(this,u.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Ih(this,u.MEDIA_SUBTITLES_SHOWING,e)}}Ao=new WeakMap;Ps=new WeakSet;Sd=function(){var t;const e=Oy(this,Ao)!==JSON.stringify(this.mediaSubtitlesList),i=this.value!==this.getAttribute(u.MEDIA_SUBTITLES_SHOWING);if(!e&&!i)return;Ny(this,Ao,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const a=!this.value,r=tr({type:"radio",text:this.formatMenuItemText(L("Off")),value:"off",checked:a});r.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(r);const n=this.mediaSubtitlesList;for(const s of n){const o=tr({type:"radio",text:this.formatMenuItemText(s.label,s),value:Nl(s),checked:this.value==Nl(s)});o.prepend(ta(this,"checked-indicator")),((t=s.kind)!=null?t:"subs")==="captions"&&o.append(ta(this,"captions-indicator")),this.defaultSlot.append(o)}};Us=new WeakSet;wd=function(){const t=this.mediaSubtitlesShowing,e=this.getAttribute(u.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t?.length&&i&&this.dispatchEvent(new f.CustomEvent(I.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;const a=new f.CustomEvent(I.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};Dv.getTemplateHTML=Uy;const wh=(t,e)=>{const i=t.getAttribute(e);return i?Po(i):[]},Ih=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=dn(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu")||f.customElements.define("media-captions-menu",Dv);const $y=`<svg aria-hidden="true" viewBox="0 0 26 24">
1857
+ <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
1858
+ </svg>`,Hy=`<svg aria-hidden="true" viewBox="0 0 26 24">
1859
+ <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
1860
+ </svg>`;function By(){return`
1861
+ <style>
1862
+ :host([data-captions-enabled="true"]) slot[name=off] {
1863
+ display: none !important;
1864
+ }
1865
+
1866
+
1867
+ :host(:not([data-captions-enabled="true"])) slot[name=on] {
1868
+ display: none !important;
1869
+ }
1870
+
1871
+ :host([aria-expanded="true"]) slot[name=tooltip] {
1872
+ display: none;
1873
+ }
1874
+ </style>
1875
+
1876
+ <slot name="icon">
1877
+ <slot name="on">${$y}</slot>
1878
+ <slot name="off">${Hy}</slot>
1879
+ </slot>
1880
+ `}function Wy(){return L("Captions")}const Rh=t=>{t.setAttribute("data-captions-enabled",vp(t).toString())},Ch=t=>{t.setAttribute("aria-label",L("closed captions"))};class zu extends lr{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_SUBTITLES_LIST,u.MEDIA_SUBTITLES_SHOWING,u.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),Ch(this),Rh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_SUBTITLES_SHOWING?Rh(this):e===u.MEDIA_LANG&&Ch(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Be(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return Lh(this,u.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Dh(this,u.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Lh(this,u.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Dh(this,u.MEDIA_SUBTITLES_SHOWING,e)}}zu.getSlotTemplateHTML=By;zu.getTooltipContentHTML=Wy;const Lh=(t,e)=>{const i=t.getAttribute(e);return i?Po(i):[]},Dh=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=dn(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu-button")||f.customElements.define("media-captions-menu-button",zu);var Mv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ma=(t,e,i)=>(Mv(t,e,"read from private field"),i?i.call(t):e.get(t)),pl=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ha=(t,e,i)=>(Mv(t,e,"access private method"),i),bi,xa,Br,$s,Id;const vl={RATES:"rates"};class Fy extends ot{constructor(){super(),pl(this,xa),pl(this,$s),pl(this,bi,new ru(this,vl.RATES,{defaultValue:Qp})),ha(this,xa,Br).call(this)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PLAYBACK_RATE,vl.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_PLAYBACK_RATE&&i!=a?(this.value=a,ha(this,xa,Br).call(this)):e===vl.RATES&&i!=a&&(Ma(this,bi).value=a,ha(this,xa,Br).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ha(this,$s,Id))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ha(this,$s,Id))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-playback-rate-menu-button")}get rates(){return Ma(this,bi)}set rates(e){e?Array.isArray(e)?Ma(this,bi).value=e.join(" "):typeof e=="string"&&(Ma(this,bi).value=e):Ma(this,bi).value="",ha(this,xa,Br).call(this)}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,Ha)}set mediaPlaybackRate(e){ue(this,u.MEDIA_PLAYBACK_RATE,e)}}bi=new WeakMap;xa=new WeakSet;Br=function(){this.defaultSlot.textContent="";const t=this.mediaPlaybackRate,e=new Set(Array.from(Ma(this,bi)).map(a=>Number(a)));t>0&&!e.has(t)&&e.add(t);const i=Array.from(e).sort((a,r)=>a-r);for(const a of i){const r=tr({type:"radio",text:this.formatMenuItemText(`${a}x`,a),value:a.toString(),checked:t===a});r.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(r)}};$s=new WeakSet;Id=function(){if(!this.value)return;const t=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-playback-rate-menu")||f.customElements.define("media-playback-rate-menu",Fy);const Hs=1;function Ky(t){return`
1881
+ <style>
1882
+ :host {
1883
+ min-width: 5ch;
1884
+ padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1885
+ }
1886
+
1887
+ :host([aria-expanded="true"]) slot[name=tooltip] {
1888
+ display: none;
1889
+ }
1890
+ </style>
1891
+ <slot name="icon">${t.mediaplaybackrate||Hs}x</slot>
1892
+ `}function Vy(){return L("Playback rate")}class Zu extends lr{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Hs}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===u.MEDIA_PLAYBACK_RATE){const r=a?+a:Number.NaN,n=Number.isNaN(r)?Hs:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",L("Playback rate {playbackRate}",{playbackRate:n}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,Hs)}set mediaPlaybackRate(e){ue(this,u.MEDIA_PLAYBACK_RATE,e)}}Zu.getSlotTemplateHTML=Ky;Zu.getTooltipContentHTML=Vy;f.customElements.get("media-playback-rate-menu-button")||f.customElements.define("media-playback-rate-menu-button",Zu);var ju=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Wr=(t,e,i)=>(ju(t,e,"read from private field"),i?i.call(t):e.get(t)),Wn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mh=(t,e,i,a)=>(ju(t,e,"write to private field"),e.set(t,i),i),ma=(t,e,i)=>(ju(t,e,"access private method"),i),Fr,Ba,Oa,Kr,Bs,Rd;class qy extends ot{constructor(){super(...arguments),Wn(this,Oa),Wn(this,Bs),Wn(this,Fr,[]),Wn(this,Ba,{})}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_RENDITION_LIST,u.MEDIA_RENDITION_SELECTED,u.MEDIA_RENDITION_UNAVAILABLE,u.MEDIA_HEIGHT]}static formatMenuItemText(e,i){return super.formatMenuItemText(e,i)}static formatRendition(e,{showBitrate:i=!1}={}){const a=`${Math.min(e.width,e.height)}p`;if(i&&e.bitrate){const r=e.bitrate/1e6,n=`${r.toFixed(r<1?1:0)} Mbps`;return`${a} (${n})`}return this.formatMenuItemText(a,e)}static compareRendition(e,i){var a,r;return i.height===e.height?((a=i.bitrate)!=null?a:0)-((r=e.bitrate)!=null?r:0):i.height-e.height}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_RENDITION_SELECTED&&i!==a?(this.value=a??"auto",ma(this,Oa,Kr).call(this)):e===u.MEDIA_RENDITION_LIST&&i!==a?(Mh(this,Fr,dg(a)),ma(this,Oa,Kr).call(this)):e===u.MEDIA_HEIGHT&&i!==a&&ma(this,Oa,Kr).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ma(this,Bs,Rd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ma(this,Bs,Rd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Wr(this,Fr)}set mediaRenditionList(e){Mh(this,Fr,e),ma(this,Oa,Kr).call(this)}get mediaRenditionSelected(){return ae(this,u.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,u.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,u.MEDIA_HEIGHT)}set mediaHeight(e){ue(this,u.MEDIA_HEIGHT,e)}compareRendition(e,i){return this.constructor.compareRendition(e,i)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}formatRendition(e,i){return this.constructor.formatRendition(e,i)}showRenditionBitrate(e){return this.mediaRenditionList.some(i=>i!==e&&i.height===e.height&&i.bitrate!==e.bitrate)}}Fr=new WeakMap;Ba=new WeakMap;Oa=new WeakSet;Kr=function(){if(Wr(this,Ba).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Wr(this,Ba).mediaHeight===this.mediaHeight)return;Wr(this,Ba).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Wr(this,Ba).mediaHeight=this.mediaHeight;const t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),e=t.find(s=>s.id===this.mediaRenditionSelected);for(const s of t)s.selected=s===e;this.defaultSlot.textContent="";const i=!this.mediaRenditionSelected;for(const s of t){const o=this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),l=tr({type:"radio",text:o,value:`${s.id}`,checked:s.selected&&!i});l.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(l)}const a=e&&this.showRenditionBitrate(e),r=i?e?this.formatMenuItemText(`${L("Auto")} • ${this.formatRendition(e,{showBitrate:a})}`,e):this.formatMenuItemText(`${L("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(L("Auto")),n=tr({type:"radio",text:r,value:"auto",checked:i});n.dataset.description=r,n.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(n)};Bs=new WeakSet;Rd=function(){if(this.value==null)return;const t=new f.CustomEvent(I.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-rendition-menu")||f.customElements.define("media-rendition-menu",qy);const Yy=`<svg aria-hidden="true" viewBox="0 0 24 24">
1893
+ <path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />
1894
+ </svg>`;function Gy(){return`
1895
+ <style>
1896
+ :host([aria-expanded="true"]) slot[name=tooltip] {
1897
+ display: none;
1898
+ }
1899
+ </style>
1900
+ <slot name="icon">${Yy}</slot>
1901
+ `}function Qy(){return L("Quality")}class Xu extends lr{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_RENDITION_SELECTED,u.MEDIA_RENDITION_UNAVAILABLE,u.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ae(this,u.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,u.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,u.MEDIA_HEIGHT)}set mediaHeight(e){ue(this,u.MEDIA_HEIGHT,e)}}Xu.getSlotTemplateHTML=Gy;Xu.getTooltipContentHTML=Qy;f.customElements.get("media-rendition-menu-button")||f.customElements.define("media-rendition-menu-button",Xu);var Ju=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ut=(t,e,i)=>(Ju(t,e,"read from private field"),i?i.call(t):e.get(t)),St=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},xv=(t,e,i,a)=>(Ju(t,e,"write to private field"),e.set(t,i),i),rt=(t,e,i)=>(Ju(t,e,"access private method"),i),ar,_n,qo,Fi,Wa,ec,Ov,Ws,Cd,Fs,Ld,Nv,ko,So,Ks;function zy(t){return`
1902
+ ${ot.getTemplateHTML(t)}
1903
+ <style>
1904
+ :host {
1905
+ --_menu-bg: rgb(20 20 30 / .8);
1906
+ background: var(--media-settings-menu-background,
1907
+ var(--media-menu-background,
1908
+ var(--media-control-background,
1909
+ var(--media-secondary-color, var(--_menu-bg)))));
1910
+ min-width: var(--media-settings-menu-min-width, 170px);
1911
+ border-radius: 2px;
1912
+ overflow: hidden;
1913
+ }
1914
+ </style>
1915
+ `}class Pv extends ot{constructor(){super(),St(this,_n),St(this,Fi),St(this,ec),St(this,Ws),St(this,Ld),St(this,ar,!1),St(this,Fs,e=>{const i=e.target,a=i?.nodeName==="VIDEO",r=rt(this,Ws,Cd).call(this,i);(a||r)&&(Ut(this,ar)?rt(this,Fi,Wa).call(this):rt(this,Ld,Nv).call(this,e))}),St(this,ko,e=>{const i=e.target,a=this.contains(i),r=e.button===2,n=i?.nodeName==="VIDEO",s=rt(this,Ws,Cd).call(this,i);a||r&&(n||s)||rt(this,Fi,Wa).call(this)}),St(this,So,e=>{e.key==="Escape"&&rt(this,Fi,Wa).call(this)}),St(this,Ks,e=>{var i,a;const r=e.target;if((i=r.matches)!=null&&i.call(r,'button[invoke="copy"]')){const n=(a=r.closest("media-context-menu-item"))==null?void 0:a.querySelector('input[slot="copy"]');n&&navigator.clipboard.writeText(n.value)}rt(this,Fi,Wa).call(this)}),this.setAttribute("noautohide",""),rt(this,_n,qo).call(this)}connectedCallback(){super.connectedCallback(),Be(this).addEventListener("contextmenu",Ut(this,Fs)),this.addEventListener("click",Ut(this,Ks))}disconnectedCallback(){super.disconnectedCallback(),Be(this).removeEventListener("contextmenu",Ut(this,Fs)),this.removeEventListener("click",Ut(this,Ks)),document.removeEventListener("mousedown",Ut(this,ko)),document.removeEventListener("keydown",Ut(this,So))}}ar=new WeakMap;_n=new WeakSet;qo=function(){this.hidden=!Ut(this,ar)};Fi=new WeakSet;Wa=function(){xv(this,ar,!1),rt(this,_n,qo).call(this)};ec=new WeakSet;Ov=function(){document.querySelectorAll("media-context-menu").forEach(e=>{var i;e!==this&&rt(i=e,Fi,Wa).call(i)})};Ws=new WeakSet;Cd=function(t){return t?t.hasAttribute("slot")&&t.getAttribute("slot")==="media"?!0:t.nodeName.includes("-")&&t.tagName.includes("-")?t.hasAttribute("src")||t.hasAttribute("poster")||t.hasAttribute("preload")||t.hasAttribute("playsinline"):!1:!1};Fs=new WeakMap;Ld=new WeakSet;Nv=function(t){t.preventDefault(),rt(this,ec,Ov).call(this),xv(this,ar,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,rt(this,_n,qo).call(this),document.addEventListener("mousedown",Ut(this,ko),{once:!0}),document.addEventListener("keydown",Ut(this,So),{once:!0})};ko=new WeakMap;So=new WeakMap;Ks=new WeakMap;Pv.getTemplateHTML=zy;f.customElements.get("media-context-menu")||f.customElements.define("media-context-menu",Pv);function Zy(t){return`
1916
+ ${Ii.getTemplateHTML.call(this,t)}
1917
+ <style>
1918
+ ::slotted(*) {
1919
+ color: var(--media-text-color, white);
1920
+ text-decoration: none;
1921
+ border: none;
1922
+ background: none;
1923
+ cursor: pointer;
1924
+ padding: 0;
1925
+ min-height: var(--media-control-height, 24px);
1926
+ }
1927
+ </style>
1928
+ `}class tc extends Ii{}tc.shadowRootOptions={mode:"open"};tc.getTemplateHTML=Zy;f.customElements.get("media-context-menu-item")||f.customElements.define("media-context-menu-item",tc);var Uv=t=>{throw TypeError(t)},ic=(t,e,i)=>e.has(t)||Uv("Cannot "+i),z=(t,e,i)=>(ic(t,e,"read from private field"),i?i.call(t):e.get(t)),Et=(t,e,i)=>e.has(t)?Uv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),qt=(t,e,i,a)=>(ic(t,e,"write to private field"),e.set(t,i),i),Ee=(t,e,i)=>(ic(t,e,"access private method"),i),Yo=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends Yo{}globalThis.DocumentFragment=t}var ac=class extends Yo{},jy=class extends Yo{},Xy={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(ac)}},Vs,Jy=class{constructor(e,i={}){Et(this,Vs),qt(this,Vs,i?.detail)}get detail(){return z(this,Vs)}initCustomEvent(){}};Vs=new WeakMap;function eT(t,e){return new ac}var $v={document:{createElement:eT},DocumentFragment,customElements:Xy,CustomEvent:Jy,EventTarget:Yo,HTMLElement:ac,HTMLVideoElement:jy},Hv=typeof window>"u"||typeof globalThis.customElements>"u",Bt=Hv?$v:globalThis,wo=Hv?$v.document:globalThis.document;function tT(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${Dd(i)}: ${a}; `)}),e?e.trim():void 0}function Dd(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Bv(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function ze(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function Wv(t){let e=iT(t).toString();return e?"?"+e:""}function iT(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var Fv=(t,e)=>!t||!e?!1:t.contains(e)?!0:Fv(t,e.getRootNode().host),Kv="mux.com",aT=()=>{try{return"3.10.1"}catch{}return"UNKNOWN"},rT=aT(),Vv=()=>rT,nT=(t,{token:e,customDomain:i=Kv,thumbnailTime:a,programTime:r}={})=>{var n;let s=e==null?a:void 0,{aud:o}=(n=Fa(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${i}/${t}/thumbnail.webp${Wv({token:e,time:s,program_time:r})}`},sT=(t,{token:e,customDomain:i=Kv,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=(n=Fa(e))!=null?n:{};if(!(e&&s!=="s"))return`https://image.${i}/${t}/storyboard.vtt${Wv({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},rc=t=>{if(t){if([Q.LIVE,Q.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Q.LIVE}},oT={crossorigin:"crossOrigin",playsinline:"playsInline"};function lT(t){var e;return(e=oT[t])!=null?e:Bv(t)}var Na,Pa,He,dT=class{constructor(e,i){Et(this,Na),Et(this,Pa),Et(this,He,[]),qt(this,Na,e),qt(this,Pa,i)}[Symbol.iterator](){return z(this,He).values()}get length(){return z(this,He).length}get value(){var e;return(e=z(this,He).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(qt(this,He,[]),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return z(this,He)[e]}values(){return z(this,He).values()}keys(){return z(this,He).keys()}forEach(e){z(this,He).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||z(this,He).push(r)}),!(this.value===""&&!((i=z(this,Na))!=null&&i.hasAttribute(`${z(this,Pa)}`)))&&((a=z(this,Na))==null||a.setAttribute(`${z(this,Pa)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{z(this,He).splice(z(this,He).indexOf(a),1)}),(i=z(this,Na))==null||i.setAttribute(`${z(this,Pa)}`,`${this.value}`)}contains(e){return z(this,He).includes(e)}toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};Na=new WeakMap,Pa=new WeakMap,He=new WeakMap;var qv=`[mux-player ${Vv()}]`;function Jt(...t){console.warn(qv,...t)}function nt(...t){console.error(qv,...t)}function Yv(t){var e;let i=(e=t.message)!=null?e:"";t.context&&(i+=` ${t.context}`),t.file&&(i+=` ${D("Read more: ")}
1929
+ https://github.com/muxinc/elements/blob/main/errors/${t.file}`),Jt(i)}var Oe={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},$i={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},xh=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),uT=Object.values(Oe).filter(t=>Oe.PLAYSINLINE!==t),cT=Object.values($i),hT=[...uT,...cT],mT=class extends Bt.HTMLElement{static get observedAttributes(){return hT}constructor(){super()}attributeChangedCallback(t,e,i){var a,r;switch(t){case $i.MUTED:{this.media&&(this.media.muted=i!=null,this.media.defaultMuted=i!=null);return}case $i.VOLUME:{let n=(a=ze(i))!=null?a:1;this.media&&(this.media.volume=n);return}case $i.PLAYBACKRATE:{let n=(r=ze(i))!=null?r:1;this.media&&(this.media.playbackRate=n,this.media.defaultPlaybackRate=n);return}}}play(){var t,e;return(e=(t=this.media)==null?void 0:t.play())!=null?e:Promise.reject()}pause(){var t;(t=this.media)==null||t.pause()}load(){var t;(t=this.media)==null||t.load()}get media(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var t,e;return(e=(t=this.media)==null?void 0:t.paused)!=null?e:!0}get duration(){var t,e;return(e=(t=this.media)==null?void 0:t.duration)!=null?e:NaN}get ended(){var t,e;return(e=(t=this.media)==null?void 0:t.ended)!=null?e:!1}get buffered(){var t,e;return(e=(t=this.media)==null?void 0:t.buffered)!=null?e:xh}get seekable(){var t,e;return(e=(t=this.media)==null?void 0:t.seekable)!=null?e:xh}get readyState(){var t,e;return(e=(t=this.media)==null?void 0:t.readyState)!=null?e:0}get videoWidth(){var t,e;return(e=(t=this.media)==null?void 0:t.videoWidth)!=null?e:0}get videoHeight(){var t,e;return(e=(t=this.media)==null?void 0:t.videoHeight)!=null?e:0}get currentSrc(){var t,e;return(e=(t=this.media)==null?void 0:t.currentSrc)!=null?e:""}get currentTime(){var t,e;return(e=(t=this.media)==null?void 0:t.currentTime)!=null?e:0}set currentTime(t){this.media&&(this.media.currentTime=Number(t))}get volume(){var t,e;return(e=(t=this.media)==null?void 0:t.volume)!=null?e:1}set volume(t){this.media&&(this.media.volume=Number(t))}get playbackRate(){var t,e;return(e=(t=this.media)==null?void 0:t.playbackRate)!=null?e:1}set playbackRate(t){this.media&&(this.media.playbackRate=Number(t))}get defaultPlaybackRate(){var t;return(t=ze(this.getAttribute($i.PLAYBACKRATE)))!=null?t:1}set defaultPlaybackRate(t){t!=null?this.setAttribute($i.PLAYBACKRATE,`${t}`):this.removeAttribute($i.PLAYBACKRATE)}get crossOrigin(){return gr(this,Oe.CROSSORIGIN)}set crossOrigin(t){this.setAttribute(Oe.CROSSORIGIN,`${t}`)}get autoplay(){return gr(this,Oe.AUTOPLAY)!=null}set autoplay(t){t?this.setAttribute(Oe.AUTOPLAY,typeof t=="string"?t:""):this.removeAttribute(Oe.AUTOPLAY)}get loop(){return gr(this,Oe.LOOP)!=null}set loop(t){t?this.setAttribute(Oe.LOOP,""):this.removeAttribute(Oe.LOOP)}get muted(){var t,e;return(e=(t=this.media)==null?void 0:t.muted)!=null?e:!1}set muted(t){this.media&&(this.media.muted=!!t)}get defaultMuted(){return gr(this,Oe.MUTED)!=null}set defaultMuted(t){t?this.setAttribute(Oe.MUTED,""):this.removeAttribute(Oe.MUTED)}get playsInline(){return gr(this,Oe.PLAYSINLINE)!=null}set playsInline(t){nt("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(t){["","none","metadata","auto"].includes(t)?this.setAttribute(Oe.PRELOAD,t):this.removeAttribute(Oe.PRELOAD)}};function gr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Oh=mT,pT=`:host {
1930
+ --media-control-display: var(--controls);
1931
+ --media-loading-indicator-display: var(--loading-indicator);
1932
+ --media-dialog-display: var(--dialog);
1933
+ --media-play-button-display: var(--play-button);
1934
+ --media-live-button-display: var(--live-button);
1935
+ --media-seek-backward-button-display: var(--seek-backward-button);
1936
+ --media-seek-forward-button-display: var(--seek-forward-button);
1937
+ --media-mute-button-display: var(--mute-button);
1938
+ --media-captions-button-display: var(--captions-button);
1939
+ --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display));
1940
+ --media-rendition-menu-button-display: var(--rendition-menu-button);
1941
+ --media-audio-track-menu-button-display: var(--audio-track-menu-button);
1942
+ --media-airplay-button-display: var(--airplay-button);
1943
+ --media-pip-button-display: var(--pip-button);
1944
+ --media-fullscreen-button-display: var(--fullscreen-button);
1945
+ --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display));
1946
+ --media-playback-rate-button-display: var(--playback-rate-button);
1947
+ --media-playback-rate-menu-button-display: var(--playback-rate-menu-button);
1948
+ --media-volume-range-display: var(--volume-range);
1949
+ --media-time-range-display: var(--time-range);
1950
+ --media-time-display-display: var(--time-display);
1951
+ --media-duration-display-display: var(--duration-display);
1952
+ --media-title-display-display: var(--title-display);
1953
+
1954
+ display: inline-block;
1955
+ line-height: 0;
1956
+ width: 100%;
1957
+ }
1958
+
1959
+ a {
1960
+ color: #fff;
1961
+ font-size: 0.9em;
1962
+ text-decoration: underline;
1963
+ }
1964
+
1965
+ media-theme {
1966
+ display: inline-block;
1967
+ line-height: 0;
1968
+ width: 100%;
1969
+ height: 100%;
1970
+ direction: ltr;
1971
+ }
1972
+
1973
+ media-poster-image {
1974
+ display: inline-block;
1975
+ line-height: 0;
1976
+ width: 100%;
1977
+ height: 100%;
1978
+ }
1979
+
1980
+ media-poster-image:not([src]):not([placeholdersrc]) {
1981
+ display: none;
1982
+ }
1983
+
1984
+ ::part(top),
1985
+ [part~='top'] {
1986
+ --media-control-display: var(--controls, var(--top-controls));
1987
+ --media-play-button-display: var(--play-button, var(--top-play-button));
1988
+ --media-live-button-display: var(--live-button, var(--top-live-button));
1989
+ --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button));
1990
+ --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button));
1991
+ --media-mute-button-display: var(--mute-button, var(--top-mute-button));
1992
+ --media-captions-button-display: var(--captions-button, var(--top-captions-button));
1993
+ --media-captions-menu-button-display: var(
1994
+ --captions-menu-button,
1995
+ var(--media-captions-button-display, var(--top-captions-menu-button))
1996
+ );
1997
+ --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button));
1998
+ --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button));
1999
+ --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));
2000
+ --media-pip-button-display: var(--pip-button, var(--top-pip-button));
2001
+ --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));
2002
+ --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display)));
2003
+ --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));
2004
+ --media-playback-rate-menu-button-display: var(
2005
+ --captions-menu-button,
2006
+ var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button))
2007
+ );
2008
+ --media-volume-range-display: var(--volume-range, var(--top-volume-range));
2009
+ --media-time-range-display: var(--time-range, var(--top-time-range));
2010
+ --media-time-display-display: var(--time-display, var(--top-time-display));
2011
+ --media-duration-display-display: var(--duration-display, var(--top-duration-display));
2012
+ --media-title-display-display: var(--title-display, var(--top-title-display));
2013
+ }
2014
+
2015
+ ::part(center),
2016
+ [part~='center'] {
2017
+ --media-control-display: var(--controls, var(--center-controls));
2018
+ --media-play-button-display: var(--play-button, var(--center-play-button));
2019
+ --media-live-button-display: var(--live-button, var(--center-live-button));
2020
+ --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button));
2021
+ --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button));
2022
+ --media-mute-button-display: var(--mute-button, var(--center-mute-button));
2023
+ --media-captions-button-display: var(--captions-button, var(--center-captions-button));
2024
+ --media-captions-menu-button-display: var(
2025
+ --captions-menu-button,
2026
+ var(--media-captions-button-display, var(--center-captions-menu-button))
2027
+ );
2028
+ --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button));
2029
+ --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button));
2030
+ --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));
2031
+ --media-pip-button-display: var(--pip-button, var(--center-pip-button));
2032
+ --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));
2033
+ --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display)));
2034
+ --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));
2035
+ --media-playback-rate-menu-button-display: var(
2036
+ --playback-rate-menu-button,
2037
+ var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button))
2038
+ );
2039
+ --media-volume-range-display: var(--volume-range, var(--center-volume-range));
2040
+ --media-time-range-display: var(--time-range, var(--center-time-range));
2041
+ --media-time-display-display: var(--time-display, var(--center-time-display));
2042
+ --media-duration-display-display: var(--duration-display, var(--center-duration-display));
2043
+ }
2044
+
2045
+ ::part(bottom),
2046
+ [part~='bottom'] {
2047
+ --media-control-display: var(--controls, var(--bottom-controls));
2048
+ --media-play-button-display: var(--play-button, var(--bottom-play-button));
2049
+ --media-live-button-display: var(--live-button, var(--bottom-live-button));
2050
+ --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button));
2051
+ --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button));
2052
+ --media-mute-button-display: var(--mute-button, var(--bottom-mute-button));
2053
+ --media-captions-button-display: var(--captions-button, var(--bottom-captions-button));
2054
+ --media-captions-menu-button-display: var(
2055
+ --captions-menu-button,
2056
+ var(--media-captions-button-display, var(--bottom-captions-menu-button))
2057
+ );
2058
+ --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button));
2059
+ --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button));
2060
+ --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));
2061
+ --media-pip-button-display: var(--pip-button, var(--bottom-pip-button));
2062
+ --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));
2063
+ --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display)));
2064
+ --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));
2065
+ --media-playback-rate-menu-button-display: var(
2066
+ --playback-rate-menu-button,
2067
+ var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button))
2068
+ );
2069
+ --media-volume-range-display: var(--volume-range, var(--bottom-volume-range));
2070
+ --media-time-range-display: var(--time-range, var(--bottom-time-range));
2071
+ --media-time-display-display: var(--time-display, var(--bottom-time-display));
2072
+ --media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
2073
+ --media-title-display-display: var(--title-display, var(--bottom-title-display));
2074
+ }
2075
+
2076
+ :host([no-tooltips]) {
2077
+ --media-tooltip-display: none;
2078
+ }
2079
+ `,yr=new WeakMap,vT=class Gv{constructor(e,i){this.element=e,this.type=i,this.element.addEventListener(this.type,this);let a=yr.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let i=yr.get(this.element);i&&i.delete(this.type)}}static for(e){yr.has(e.element)||yr.set(e.element,new Map);let i=e.attributeName.slice(2),a=yr.get(e.element);return a&&a.has(i)?a.get(i):new Gv(e.element,i)}};function fT(t,e){return t instanceof gt&&t.attributeName.startsWith("on")?(vT.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function ET(t,e){return e instanceof Qv&&t instanceof or?(e.renderInto(t),!0):!1}function _T(t,e){return e instanceof DocumentFragment&&t instanceof or?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function bT(t,e){if(t instanceof gt){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function gT(t,e){if(t instanceof gt&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function yT(t,e){if(typeof e=="boolean"&&t instanceof gt){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function TT(t,e){return e===!1&&t instanceof or?(t.replace(""),!0):!1}function AT(t,e){gT(t,e)||yT(t,e)||fT(t,e)||TT(t,e)||ET(t,e)||_T(t,e)||bT(t,e)}var fl=new Map,Nh=new WeakMap,Ph=new WeakMap,Qv=class{constructor(e,i,a){this.strings=e,this.values=i,this.processor=a,this.stringsKey=this.strings.join("")}get template(){if(fl.has(this.stringsKey))return fl.get(this.stringsKey);{let e=wo.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<i?`{{ ${n} }}`:""),""),fl.set(this.stringsKey,e),e}}renderInto(e){var i;let a=this.template;if(Nh.get(e)!==a){Nh.set(e,a);let n=new Fo(a,this.values,this.processor);Ph.set(e,n),e instanceof or?e.replace(...n.children):e.appendChild(n);return}let r=Ph.get(e);(i=r?.update)==null||i.call(r,this.values)}},kT={processCallback(t,e,i){var a;if(i){for(let[r,n]of e)if(r in i){let s=(a=i[r])!=null?a:"";AT(n,s)}}}};function qs(t,...e){return new Qv(t,e,kT)}function ST(t,e){t.renderInto(e)}var wT=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},IT=t=>qs`
2080
+ <style>
2081
+ ${wT(t)}
2082
+ ${pT}
2083
+ </style>
2084
+ ${DT(t)}
2085
+ `,RT=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return rc(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},CT={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},LT=Object.values(CT).join(", "),DT=t=>{var e,i,a,r,n,s,o,l,d,m,p,h,c,v,E,g,y,T,_,S,C,O,$,Y,J,K,U,Me,Fe,Ke,he,Pe,Tt,Ue,lt,Ve,ke,xe;return qs`
2086
+ <media-theme
2087
+ template="${t.themeTemplate||!1}"
2088
+ defaultstreamtype="${(e=t.defaultStreamType)!=null?e:!1}"
2089
+ hotkeys="${RT(t)||!1}"
2090
+ nohotkeys="${t.noHotKeys||!t.hasSrc||!1}"
2091
+ noautoseektolive="${!!((i=t.streamType)!=null&&i.includes(Q.LIVE))&&t.targetLiveWindow!==0}"
2092
+ novolumepref="${t.novolumepref||!1}"
2093
+ nomutedpref="${t.nomutedpref||!1}"
2094
+ disabled="${!t.hasSrc||t.isDialogOpen}"
2095
+ audio="${(a=t.audio)!=null?a:!1}"
2096
+ style="${(r=tT({"--media-primary-color":t.primaryColor,"--media-secondary-color":t.secondaryColor,"--media-accent-color":t.accentColor}))!=null?r:!1}"
2097
+ defaultsubtitles="${!t.defaultHiddenCaptions}"
2098
+ forwardseekoffset="${(n=t.forwardSeekOffset)!=null?n:!1}"
2099
+ backwardseekoffset="${(s=t.backwardSeekOffset)!=null?s:!1}"
2100
+ playbackrates="${(o=t.playbackRates)!=null?o:!1}"
2101
+ defaultshowremainingtime="${(l=t.defaultShowRemainingTime)!=null?l:!1}"
2102
+ defaultduration="${(d=t.defaultDuration)!=null?d:!1}"
2103
+ hideduration="${(m=t.hideDuration)!=null?m:!1}"
2104
+ title="${(p=t.title)!=null?p:!1}"
2105
+ videotitle="${(h=t.videoTitle)!=null?h:!1}"
2106
+ proudlydisplaymuxbadge="${(c=t.proudlyDisplayMuxBadge)!=null?c:!1}"
2107
+ exportparts="${LT}"
2108
+ onclose="${t.onCloseErrorDialog}"
2109
+ onfocusin="${t.onFocusInErrorDialog}"
2110
+ >
2111
+ <mux-video
2112
+ slot="media"
2113
+ inert="${(v=t.noHotKeys)!=null?v:!1}"
2114
+ target-live-window="${(E=t.targetLiveWindow)!=null?E:!1}"
2115
+ stream-type="${(g=rc(t.streamType))!=null?g:!1}"
2116
+ crossorigin="${(y=t.crossOrigin)!=null?y:""}"
2117
+ playsinline
2118
+ autoplay="${(T=t.autoplay)!=null?T:!1}"
2119
+ muted="${(_=t.muted)!=null?_:!1}"
2120
+ loop="${(S=t.loop)!=null?S:!1}"
2121
+ preload="${(C=t.preload)!=null?C:!1}"
2122
+ debug="${(O=t.debug)!=null?O:!1}"
2123
+ prefer-cmcd="${($=t.preferCmcd)!=null?$:!1}"
2124
+ disable-tracking="${(Y=t.disableTracking)!=null?Y:!1}"
2125
+ disable-cookies="${(J=t.disableCookies)!=null?J:!1}"
2126
+ prefer-playback="${(K=t.preferPlayback)!=null?K:!1}"
2127
+ start-time="${t.startTime!=null?t.startTime:!1}"
2128
+ beacon-collection-domain="${(U=t.beaconCollectionDomain)!=null?U:!1}"
2129
+ player-init-time="${(Me=t.playerInitTime)!=null?Me:!1}"
2130
+ player-software-name="${(Fe=t.playerSoftwareName)!=null?Fe:!1}"
2131
+ player-software-version="${(Ke=t.playerSoftwareVersion)!=null?Ke:!1}"
2132
+ env-key="${(he=t.envKey)!=null?he:!1}"
2133
+ custom-domain="${(Pe=t.customDomain)!=null?Pe:!1}"
2134
+ src="${t.src?t.src:t.playbackId?Il(t):!1}"
2135
+ cast-src="${t.src?t.src:t.playbackId?Il(t):!1}"
2136
+ cast-receiver="${(Tt=t.castReceiver)!=null?Tt:!1}"
2137
+ drm-token="${(lt=(Ue=t.tokens)==null?void 0:Ue.drm)!=null?lt:!1}"
2138
+ exportparts="video"
2139
+ disable-pseudo-ended="${(Ve=t.disablePseudoEnded)!=null?Ve:!1}"
2140
+ max-auto-resolution="${(ke=t.maxAutoResolution)!=null?ke:!1}"
2141
+ >
2142
+ ${t.storyboard?qs`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:qs``}
2143
+ <slot></slot>
2144
+ </mux-video>
2145
+ <slot name="poster" slot="poster">
2146
+ <media-poster-image
2147
+ part="poster"
2148
+ exportparts="poster, img"
2149
+ src="${t.poster?t.poster:!1}"
2150
+ placeholdersrc="${(xe=t.placeholder)!=null?xe:!1}"
2151
+ ></media-poster-image>
2152
+ </slot>
2153
+ </media-theme>
2154
+ `},zv=t=>t.charAt(0).toUpperCase()+t.slice(1),MT=(t,e=!1)=>{var i,a;if(t.muxCode){let r=zv((i=t.errorCategory)!=null?i:"video"),n=Ro((a=t.errorCategory)!=null?a:te.VIDEO);if(t.muxCode===x.NETWORK_OFFLINE)return D("Your device appears to be offline",e);if(t.muxCode===x.NETWORK_TOKEN_EXPIRED)return D("{category} URL has expired",e).format({category:r});if([x.NETWORK_TOKEN_SUB_MISMATCH,x.NETWORK_TOKEN_AUD_MISMATCH,x.NETWORK_TOKEN_AUD_MISSING,x.NETWORK_TOKEN_MALFORMED].includes(t.muxCode))return D("{category} URL is formatted incorrectly",e).format({category:r});if(t.muxCode===x.NETWORK_TOKEN_MISSING)return D("Invalid {categoryName} URL",e).format({categoryName:n});if(t.muxCode===x.NETWORK_NOT_FOUND)return D("{category} does not exist",e).format({category:r});if(t.muxCode===x.NETWORK_NOT_READY){let s=t.streamType==="live"?"Live stream":"Video";return D("{mediaType} is not currently available",e).format({mediaType:s})}}if(t.code){if(t.code===R.MEDIA_ERR_NETWORK)return D("Network Error",e);if(t.code===R.MEDIA_ERR_DECODE)return D("Media Error",e);if(t.code===R.MEDIA_ERR_SRC_NOT_SUPPORTED)return D("Source Not Supported",e)}return D("Error",e)},xT=(t,e=!1)=>{var i,a;if(t.muxCode){let r=zv((i=t.errorCategory)!=null?i:"video"),n=Ro((a=t.errorCategory)!=null?a:te.VIDEO);return t.muxCode===x.NETWORK_OFFLINE?D("Check your internet connection and try reloading this video.",e):t.muxCode===x.NETWORK_TOKEN_EXPIRED?D("The video’s secured {tokenNamePrefix}-token has expired.",e).format({tokenNamePrefix:n}):t.muxCode===x.NETWORK_TOKEN_SUB_MISMATCH?D("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",e).format({tokenNamePrefix:n}):t.muxCode===x.NETWORK_TOKEN_MALFORMED?D("{category} URL is formatted incorrectly",e).format({category:r}):[x.NETWORK_TOKEN_AUD_MISMATCH,x.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode)?D("The {tokenNamePrefix}-token is formatted with incorrect information.",e).format({tokenNamePrefix:n}):[x.NETWORK_TOKEN_MISSING,x.NETWORK_INVALID_URL].includes(t.muxCode)?D("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",e).format({tokenNamePrefix:n}):t.muxCode===x.NETWORK_NOT_FOUND?"":t.message}return t.code&&(t.code===R.MEDIA_ERR_NETWORK||t.code===R.MEDIA_ERR_DECODE||(t.code,R.MEDIA_ERR_SRC_NOT_SUPPORTED)),t.message},OT=(t,e=!1)=>{let i=MT(t,e).toString(),a=xT(t,e).toString();return{title:i,message:a}},NT=t=>{if(t.muxCode){if(t.muxCode===x.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(t.muxCode===x.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([x.NETWORK_TOKEN_AUD_MISMATCH,x.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode))return"403-incorrect-aud-value.md";if(t.muxCode===x.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(t.muxCode===x.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(t.muxCode===x.NETWORK_NOT_FOUND)return"404-not-found.md";if(t.muxCode===x.NETWORK_NOT_READY)return"412-not-playable.md"}if(t.code){if(t.code===R.MEDIA_ERR_NETWORK)return"";if(t.code===R.MEDIA_ERR_DECODE)return"media-decode-error.md";if(t.code===R.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""},Uh=(t,e)=>{let i=NT(t);return{message:t.message,context:t.context,file:i}},PT=`<template id="media-theme-gerwig">
2155
+ <style>
2156
+ @keyframes pre-play-hide {
2157
+ 0% {
2158
+ transform: scale(1);
2159
+ opacity: 1;
2160
+ }
2161
+
2162
+ 30% {
2163
+ transform: scale(0.7);
2164
+ }
2165
+
2166
+ 100% {
2167
+ transform: scale(1.5);
2168
+ opacity: 0;
2169
+ }
2170
+ }
2171
+
2172
+ :host {
2173
+ --_primary-color: var(--media-primary-color, #fff);
2174
+ --_secondary-color: var(--media-secondary-color, transparent);
2175
+ --_accent-color: var(--media-accent-color, #fa50b5);
2176
+ --_text-color: var(--media-text-color, #000);
2177
+
2178
+ --media-icon-color: var(--_primary-color);
2179
+ --media-control-background: var(--_secondary-color);
2180
+ --media-control-hover-background: var(--_accent-color);
2181
+ --media-time-buffered-color: rgba(255, 255, 255, 0.4);
2182
+ --media-preview-time-text-shadow: none;
2183
+ --media-control-height: 14px;
2184
+ --media-control-padding: 6px;
2185
+ --media-tooltip-container-margin: 6px;
2186
+ --media-tooltip-distance: 18px;
2187
+
2188
+ color: var(--_primary-color);
2189
+ display: inline-block;
2190
+ width: 100%;
2191
+ height: 100%;
2192
+ }
2193
+
2194
+ :host([audio]) {
2195
+ --_secondary-color: var(--media-secondary-color, black);
2196
+ --media-preview-time-text-shadow: none;
2197
+ }
2198
+
2199
+ :host([audio]) ::slotted([slot='media']) {
2200
+ height: 0px;
2201
+ }
2202
+
2203
+ :host([audio]) media-loading-indicator {
2204
+ display: none;
2205
+ }
2206
+
2207
+ :host([audio]) media-controller {
2208
+ background: transparent;
2209
+ }
2210
+
2211
+ :host([audio]) media-controller::part(vertical-layer) {
2212
+ background: transparent;
2213
+ }
2214
+
2215
+ :host([audio]) media-control-bar {
2216
+ width: 100%;
2217
+ background-color: var(--media-control-background);
2218
+ }
2219
+
2220
+ /*
2221
+ * 0.433s is the transition duration for VTT Regions.
2222
+ * Borrowed here, so the captions don't move too fast.
2223
+ */
2224
+ media-controller {
2225
+ --media-webkit-text-track-transform: translateY(0) scale(0.98);
2226
+ --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
2227
+ }
2228
+ media-controller:is([mediapaused], :not([userinactive])) {
2229
+ --media-webkit-text-track-transform: translateY(-50px) scale(0.98);
2230
+ --media-webkit-text-track-transition: transform 0.15s ease;
2231
+ }
2232
+
2233
+ /*
2234
+ * CSS specific to iOS devices.
2235
+ * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757
2236
+ */
2237
+ @supports (-webkit-touch-callout: none) {
2238
+ /* Disable subtitle adjusting for iOS Safari */
2239
+ media-controller[mediaisfullscreen] {
2240
+ --media-webkit-text-track-transform: unset;
2241
+ --media-webkit-text-track-transition: unset;
2242
+ }
2243
+ }
2244
+
2245
+ media-time-range {
2246
+ --media-box-padding-left: 6px;
2247
+ --media-box-padding-right: 6px;
2248
+ --media-range-bar-color: var(--_accent-color);
2249
+ --media-time-range-buffered-color: var(--_primary-color);
2250
+ --media-range-track-color: transparent;
2251
+ --media-range-track-background: rgba(255, 255, 255, 0.4);
2252
+ --media-range-thumb-background: radial-gradient(
2253
+ circle,
2254
+ #000 0%,
2255
+ #000 25%,
2256
+ var(--_accent-color) 25%,
2257
+ var(--_accent-color)
2258
+ );
2259
+ --media-range-thumb-width: 12px;
2260
+ --media-range-thumb-height: 12px;
2261
+ --media-range-thumb-transform: scale(0);
2262
+ --media-range-thumb-transition: transform 0.3s;
2263
+ --media-range-thumb-opacity: 1;
2264
+ --media-preview-background: var(--_primary-color);
2265
+ --media-box-arrow-background: var(--_primary-color);
2266
+ --media-preview-thumbnail-border: 5px solid var(--_primary-color);
2267
+ --media-preview-border-radius: 5px;
2268
+ --media-text-color: var(--_text-color);
2269
+ --media-control-hover-background: transparent;
2270
+ --media-preview-chapter-text-shadow: none;
2271
+ color: var(--_accent-color);
2272
+ padding: 0 6px;
2273
+ }
2274
+
2275
+ :host([audio]) media-time-range {
2276
+ --media-preview-time-padding: 1.5px 6px;
2277
+ --media-preview-box-margin: 0 0 -5px;
2278
+ }
2279
+
2280
+ media-time-range:hover {
2281
+ --media-range-thumb-transform: scale(1);
2282
+ }
2283
+
2284
+ media-preview-thumbnail {
2285
+ border-bottom-width: 0;
2286
+ }
2287
+
2288
+ [part~='menu'] {
2289
+ border-radius: 2px;
2290
+ border: 1px solid rgba(0, 0, 0, 0.1);
2291
+ bottom: 50px;
2292
+ padding: 2.5px 10px;
2293
+ }
2294
+
2295
+ [part~='menu']::part(indicator) {
2296
+ fill: var(--_accent-color);
2297
+ }
2298
+
2299
+ [part~='menu']::part(menu-item) {
2300
+ box-sizing: border-box;
2301
+ display: flex;
2302
+ align-items: center;
2303
+ padding: 6px 10px;
2304
+ min-height: 34px;
2305
+ }
2306
+
2307
+ [part~='menu']::part(checked) {
2308
+ font-weight: 700;
2309
+ }
2310
+
2311
+ media-captions-menu,
2312
+ media-rendition-menu,
2313
+ media-audio-track-menu,
2314
+ media-playback-rate-menu {
2315
+ position: absolute; /* ensure they don't take up space in DOM on load */
2316
+ --media-menu-background: var(--_primary-color);
2317
+ --media-menu-item-checked-background: transparent;
2318
+ --media-text-color: var(--_text-color);
2319
+ --media-menu-item-hover-background: transparent;
2320
+ --media-menu-item-hover-outline: var(--_accent-color) solid 1px;
2321
+ }
2322
+
2323
+ media-rendition-menu {
2324
+ min-width: 140px;
2325
+ }
2326
+
2327
+ /* The icon is a circle so make it 16px high instead of 14px for more balance. */
2328
+ media-audio-track-menu-button {
2329
+ --media-control-padding: 5px;
2330
+ --media-control-height: 16px;
2331
+ }
2332
+
2333
+ media-playback-rate-menu-button {
2334
+ --media-control-padding: 6px 3px;
2335
+ min-width: 4.4ch;
2336
+ }
2337
+
2338
+ media-playback-rate-menu {
2339
+ --media-menu-flex-direction: row;
2340
+ --media-menu-item-checked-background: var(--_accent-color);
2341
+ --media-menu-item-checked-indicator-display: none;
2342
+ margin-right: 6px;
2343
+ padding: 0;
2344
+ --media-menu-gap: 0.25em;
2345
+ }
2346
+
2347
+ media-playback-rate-menu[part~='menu']::part(menu-item) {
2348
+ padding: 6px 6px 6px 8px;
2349
+ }
2350
+
2351
+ media-playback-rate-menu[part~='menu']::part(checked) {
2352
+ color: #fff;
2353
+ }
2354
+
2355
+ :host(:not([audio])) media-time-range {
2356
+ /* Adding px is required here for calc() */
2357
+ --media-range-padding: 0px;
2358
+ background: transparent;
2359
+ z-index: 10;
2360
+ height: 10px;
2361
+ bottom: -3px;
2362
+ width: 100%;
2363
+ }
2364
+
2365
+ media-control-bar :is([role='button'], [role='switch'], button) {
2366
+ line-height: 0;
2367
+ }
2368
+
2369
+ media-control-bar :is([part*='button'], [part*='range'], [part*='display']) {
2370
+ border-radius: 3px;
2371
+ }
2372
+
2373
+ .spacer {
2374
+ flex-grow: 1;
2375
+ background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
2376
+ }
2377
+
2378
+ media-control-bar[slot~='top-chrome'] {
2379
+ min-height: 42px;
2380
+ pointer-events: none;
2381
+ }
2382
+
2383
+ media-control-bar {
2384
+ --gradient-steps:
2385
+ hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, hsl(0 0% 0% / 0.104) 22.5%,
2386
+ hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, hsl(0 0% 0% / 0.45) 47.1%,
2387
+ hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, hsl(0 0% 0% / 0.825) 71%,
2388
+ hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, hsl(0 0% 0%) 100%;
2389
+ }
2390
+
2391
+ :host([title]) media-control-bar[slot='top-chrome']::before,
2392
+ :host([videotitle]) media-control-bar[slot='top-chrome']::before {
2393
+ content: '';
2394
+ position: absolute;
2395
+ width: 100%;
2396
+ padding-bottom: min(100px, 25%);
2397
+ background: linear-gradient(to top, var(--gradient-steps));
2398
+ opacity: 0.8;
2399
+ pointer-events: none;
2400
+ }
2401
+
2402
+ :host(:not([audio])) media-control-bar[part~='bottom']::before {
2403
+ content: '';
2404
+ position: absolute;
2405
+ width: 100%;
2406
+ bottom: 0;
2407
+ left: 0;
2408
+ padding-bottom: min(100px, 25%);
2409
+ background: linear-gradient(to bottom, var(--gradient-steps));
2410
+ opacity: 0.8;
2411
+ z-index: 1;
2412
+ pointer-events: none;
2413
+ }
2414
+
2415
+ media-control-bar[part~='bottom'] > * {
2416
+ z-index: 20;
2417
+ }
2418
+
2419
+ media-control-bar[part~='bottom'] {
2420
+ padding: 6px 6px;
2421
+ }
2422
+
2423
+ media-control-bar[slot~='top-chrome'] > * {
2424
+ --media-control-background: transparent;
2425
+ --media-control-hover-background: transparent;
2426
+ position: relative;
2427
+ }
2428
+
2429
+ media-controller::part(vertical-layer) {
2430
+ transition: background-color 1s;
2431
+ }
2432
+
2433
+ media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {
2434
+ background-color: var(--controls-backdrop-color, var(--controls, transparent));
2435
+ transition: background-color 0.25s;
2436
+ }
2437
+
2438
+ .center-controls {
2439
+ --media-button-icon-width: 100%;
2440
+ --media-button-icon-height: auto;
2441
+ --media-tooltip-display: none;
2442
+ pointer-events: none;
2443
+ width: 100%;
2444
+ display: flex;
2445
+ flex-flow: row;
2446
+ align-items: center;
2447
+ justify-content: center;
2448
+ paint-order: stroke;
2449
+ stroke: rgba(102, 102, 102, 1);
2450
+ stroke-width: 0.3px;
2451
+ text-shadow:
2452
+ 0 0 2px rgb(0 0 0 / 0.25),
2453
+ 0 0 6px rgb(0 0 0 / 0.25);
2454
+ }
2455
+
2456
+ .center-controls media-play-button {
2457
+ --media-control-background: transparent;
2458
+ --media-control-hover-background: transparent;
2459
+ --media-control-padding: 0;
2460
+ width: 40px;
2461
+ filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
2462
+ }
2463
+
2464
+ [breakpointsm] .center-controls media-play-button {
2465
+ width: 90px;
2466
+ height: 90px;
2467
+ border-radius: 50%;
2468
+ transition: background 0.4s;
2469
+ padding: 24px;
2470
+ --media-control-background: #000;
2471
+ --media-control-hover-background: var(--_accent-color);
2472
+ }
2473
+
2474
+ .center-controls media-seek-backward-button,
2475
+ .center-controls media-seek-forward-button {
2476
+ --media-control-background: transparent;
2477
+ --media-control-hover-background: transparent;
2478
+ padding: 0;
2479
+ margin: 0 20px;
2480
+ width: max(33px, min(8%, 40px));
2481
+ text-shadow:
2482
+ 0 0 2px rgb(0 0 0 / 0.25),
2483
+ 0 0 6px rgb(0 0 0 / 0.25);
2484
+ }
2485
+
2486
+ [breakpointsm]:not([audio]) .center-controls.pre-playback {
2487
+ display: grid;
2488
+ align-items: initial;
2489
+ justify-content: initial;
2490
+ height: 100%;
2491
+ overflow: hidden;
2492
+ }
2493
+
2494
+ [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {
2495
+ place-self: var(--_pre-playback-place, center);
2496
+ grid-area: 1 / 1;
2497
+ margin: 16px;
2498
+ }
2499
+
2500
+ /* Show and hide controls or pre-playback state */
2501
+
2502
+ [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])
2503
+ .center-controls.pre-playback
2504
+ media-play-button {
2505
+ /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */
2506
+ animation: 0.3s linear pre-play-hide;
2507
+ opacity: 0;
2508
+ pointer-events: none;
2509
+ }
2510
+
2511
+ .autoplay-unmute {
2512
+ --media-control-hover-background: transparent;
2513
+ width: 100%;
2514
+ display: flex;
2515
+ align-items: center;
2516
+ justify-content: center;
2517
+ filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
2518
+ }
2519
+
2520
+ .autoplay-unmute-btn {
2521
+ --media-control-height: 16px;
2522
+ border-radius: 8px;
2523
+ background: #000;
2524
+ color: var(--_primary-color);
2525
+ display: flex;
2526
+ align-items: center;
2527
+ padding: 8px 16px;
2528
+ font-size: 18px;
2529
+ font-weight: 500;
2530
+ cursor: pointer;
2531
+ }
2532
+
2533
+ .autoplay-unmute-btn:hover {
2534
+ background: var(--_accent-color);
2535
+ }
2536
+
2537
+ [breakpointsm] .autoplay-unmute-btn {
2538
+ --media-control-height: 30px;
2539
+ padding: 14px 24px;
2540
+ font-size: 26px;
2541
+ }
2542
+
2543
+ .autoplay-unmute-btn svg {
2544
+ margin: 0 6px 0 0;
2545
+ }
2546
+
2547
+ [breakpointsm] .autoplay-unmute-btn svg {
2548
+ margin: 0 10px 0 0;
2549
+ }
2550
+
2551
+ media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {
2552
+ display: none;
2553
+ }
2554
+
2555
+ media-error-dialog:not([mediaerrorcode]) {
2556
+ opacity: 0;
2557
+ }
2558
+
2559
+ media-loading-indicator {
2560
+ --media-loading-icon-width: 100%;
2561
+ --media-button-icon-height: auto;
2562
+ display: var(--media-control-display, var(--media-loading-indicator-display, flex));
2563
+ pointer-events: none;
2564
+ position: absolute;
2565
+ width: min(15%, 150px);
2566
+ flex-flow: row;
2567
+ align-items: center;
2568
+ justify-content: center;
2569
+ }
2570
+
2571
+ /* Intentionally don't target the div for transition but the children
2572
+ of the div. Prevents messing with media-chrome's autohide feature. */
2573
+ media-loading-indicator + div * {
2574
+ transition: opacity 0.15s;
2575
+ opacity: 1;
2576
+ }
2577
+
2578
+ media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {
2579
+ opacity: 0;
2580
+ transition-delay: 400ms;
2581
+ }
2582
+
2583
+ media-volume-range {
2584
+ width: min(100%, 100px);
2585
+ --media-range-padding-left: 10px;
2586
+ --media-range-padding-right: 10px;
2587
+ --media-range-thumb-width: 12px;
2588
+ --media-range-thumb-height: 12px;
2589
+ --media-range-thumb-background: radial-gradient(
2590
+ circle,
2591
+ #000 0%,
2592
+ #000 25%,
2593
+ var(--_primary-color) 25%,
2594
+ var(--_primary-color)
2595
+ );
2596
+ --media-control-hover-background: none;
2597
+ }
2598
+
2599
+ media-time-display {
2600
+ white-space: nowrap;
2601
+ }
2602
+
2603
+ /* Generic style for explicitly disabled controls */
2604
+ media-control-bar[part~='bottom'] [disabled],
2605
+ media-control-bar[part~='bottom'] [aria-disabled='true'] {
2606
+ opacity: 60%;
2607
+ cursor: not-allowed;
2608
+ }
2609
+
2610
+ media-text-display {
2611
+ --media-font-size: 16px;
2612
+ --media-control-padding: 14px;
2613
+ font-weight: 500;
2614
+ }
2615
+
2616
+ media-play-button.animated *:is(g, path) {
2617
+ transition: all 0.3s;
2618
+ }
2619
+
2620
+ media-play-button.animated[mediapaused] .pause-icon-pt1 {
2621
+ opacity: 0;
2622
+ }
2623
+
2624
+ media-play-button.animated[mediapaused] .pause-icon-pt2 {
2625
+ transform-origin: center center;
2626
+ transform: scaleY(0);
2627
+ }
2628
+
2629
+ media-play-button.animated[mediapaused] .play-icon {
2630
+ clip-path: inset(0 0 0 0);
2631
+ }
2632
+
2633
+ media-play-button.animated:not([mediapaused]) .play-icon {
2634
+ clip-path: inset(0 0 0 100%);
2635
+ }
2636
+
2637
+ media-seek-forward-button,
2638
+ media-seek-backward-button {
2639
+ --media-font-weight: 400;
2640
+ }
2641
+
2642
+ .mute-icon {
2643
+ display: inline-block;
2644
+ }
2645
+
2646
+ .mute-icon :is(path, g) {
2647
+ transition: opacity 0.5s;
2648
+ }
2649
+
2650
+ .muted {
2651
+ opacity: 0;
2652
+ }
2653
+
2654
+ media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high),
2655
+ media-mute-button[mediavolumelevel='medium'] :is(.volume-high) {
2656
+ opacity: 0;
2657
+ }
2658
+
2659
+ media-mute-button[mediavolumelevel='off'] .unmuted {
2660
+ opacity: 0;
2661
+ }
2662
+
2663
+ media-mute-button[mediavolumelevel='off'] .muted {
2664
+ opacity: 1;
2665
+ }
2666
+
2667
+ /**
2668
+ * Our defaults for these buttons are to hide them at small sizes
2669
+ * users can override this with CSS
2670
+ */
2671
+ media-controller:not([breakpointsm]):not([audio]) {
2672
+ --bottom-play-button: none;
2673
+ --bottom-seek-backward-button: none;
2674
+ --bottom-seek-forward-button: none;
2675
+ --bottom-time-display: none;
2676
+ --bottom-playback-rate-menu-button: none;
2677
+ --bottom-pip-button: none;
2678
+ }
2679
+
2680
+ [part='mux-badge'] {
2681
+ position: absolute;
2682
+ bottom: 10px;
2683
+ right: 10px;
2684
+ z-index: 2;
2685
+ opacity: 0.6;
2686
+ transition:
2687
+ opacity 0.2s ease-in-out,
2688
+ bottom 0.2s ease-in-out;
2689
+ }
2690
+
2691
+ [part='mux-badge']:hover {
2692
+ opacity: 1;
2693
+ }
2694
+
2695
+ [part='mux-badge'] a {
2696
+ font-size: 14px;
2697
+ font-family: var(--_font-family);
2698
+ color: var(--_primary-color);
2699
+ text-decoration: none;
2700
+ display: flex;
2701
+ align-items: center;
2702
+ gap: 5px;
2703
+ }
2704
+
2705
+ [part='mux-badge'] .mux-badge-text {
2706
+ transition: opacity 0.5s ease-in-out;
2707
+ opacity: 0;
2708
+ }
2709
+
2710
+ [part='mux-badge'] .mux-badge-logo {
2711
+ width: 40px;
2712
+ height: auto;
2713
+ display: inline-block;
2714
+ }
2715
+
2716
+ [part='mux-badge'] .mux-badge-logo svg {
2717
+ width: 100%;
2718
+ height: 100%;
2719
+ fill: white;
2720
+ }
2721
+
2722
+ media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'],
2723
+ media-controller:not([userinactive]) [part='mux-badge'],
2724
+ media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2725
+ transition: bottom 0.1s ease-in-out;
2726
+ }
2727
+
2728
+ media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2729
+ transition: bottom 0.2s ease-in-out 0.62s;
2730
+ }
2731
+
2732
+ media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text,
2733
+ media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text {
2734
+ opacity: 1;
2735
+ }
2736
+
2737
+ media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text {
2738
+ opacity: 0;
2739
+ }
2740
+
2741
+ media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2742
+ bottom: 10px;
2743
+ }
2744
+
2745
+ media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] {
2746
+ bottom: 10px;
2747
+ }
2748
+
2749
+ media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'],
2750
+ media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2751
+ bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2);
2752
+ }
2753
+ </style>
2754
+
2755
+ <template partial="TitleDisplay">
2756
+ <template if="videotitle">
2757
+ <template if="videotitle != true">
2758
+ <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display>
2759
+ </template>
2760
+ </template>
2761
+ <template if="!videotitle">
2762
+ <template if="title">
2763
+ <media-text-display part="top title display" class="title-display">{{title}}</media-text-display>
2764
+ </template>
2765
+ </template>
2766
+ </template>
2767
+
2768
+ <template partial="PlayButton">
2769
+ <media-play-button
2770
+ part="{{section ?? 'bottom'}} play button"
2771
+ disabled="{{disabled}}"
2772
+ aria-disabled="{{disabled}}"
2773
+ class="animated"
2774
+ >
2775
+ <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">
2776
+ <g class="play-icon">
2777
+ <path
2778
+ d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
2779
+ />
2780
+ </g>
2781
+ <g class="pause-icon">
2782
+ <path
2783
+ class="pause-icon-pt1"
2784
+ d="M5.90709 0H2.96889C2.46857 0 2.06299 0.405585 2.06299 0.9059V13.0941C2.06299 13.5944 2.46857 14 2.96889 14H5.90709C6.4074 14 6.81299 13.5944 6.81299 13.0941V0.9059C6.81299 0.405585 6.4074 0 5.90709 0Z"
2785
+ />
2786
+ <path
2787
+ class="pause-icon-pt2"
2788
+ d="M15.1571 0H12.2189C11.7186 0 11.313 0.405585 11.313 0.9059V13.0941C11.313 13.5944 11.7186 14 12.2189 14H15.1571C15.6574 14 16.063 13.5944 16.063 13.0941V0.9059C16.063 0.405585 15.6574 0 15.1571 0Z"
2789
+ />
2790
+ </g>
2791
+ </svg>
2792
+ </media-play-button>
2793
+ </template>
2794
+
2795
+ <template partial="PrePlayButton">
2796
+ <media-play-button
2797
+ part="{{section ?? 'center'}} play button pre-play"
2798
+ disabled="{{disabled}}"
2799
+ aria-disabled="{{disabled}}"
2800
+ >
2801
+ <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)">
2802
+ <path
2803
+ d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
2804
+ />
2805
+ </svg>
2806
+ </media-play-button>
2807
+ </template>
2808
+
2809
+ <template partial="SeekBackwardButton">
2810
+ <media-seek-backward-button
2811
+ seekoffset="{{backwardseekoffset}}"
2812
+ part="{{section ?? 'bottom'}} seek-backward button"
2813
+ disabled="{{disabled}}"
2814
+ aria-disabled="{{disabled}}"
2815
+ >
2816
+ <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2817
+ <path
2818
+ d="M3.65 2.07888L0.0864 6.7279C-0.0288 6.87812 -0.0288 7.12188 0.0864 7.2721L3.65 11.9211C3.7792 12.0896 4 11.9703 4 11.7321V2.26787C4 2.02968 3.7792 1.9104 3.65 2.07888Z"
2819
+ />
2820
+ <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2821
+ {{backwardseekoffset}}
2822
+ </text>
2823
+ </svg>
2824
+ </media-seek-backward-button>
2825
+ </template>
2826
+
2827
+ <template partial="SeekForwardButton">
2828
+ <media-seek-forward-button
2829
+ seekoffset="{{forwardseekoffset}}"
2830
+ part="{{section ?? 'bottom'}} seek-forward button"
2831
+ disabled="{{disabled}}"
2832
+ aria-disabled="{{disabled}}"
2833
+ >
2834
+ <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2835
+ <g>
2836
+ <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2837
+ {{forwardseekoffset}}
2838
+ </text>
2839
+ <path
2840
+ d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208 1.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z"
2841
+ />
2842
+ </g>
2843
+ </svg>
2844
+ </media-seek-forward-button>
2845
+ </template>
2846
+
2847
+ <template partial="MuteButton">
2848
+ <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2849
+ <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">
2850
+ <g class="unmuted">
2851
+ <path
2852
+ d="M6.76786 1.21233L3.98606 3.98924H1.19937C0.593146 3.98924 0.101743 4.51375 0.101743 5.1607V6.96412L0 6.99998L0.101743 7.03583V8.83926C0.101743 9.48633 0.593146 10.0108 1.19937 10.0108H3.98606L6.76773 12.7877C7.23561 13.2547 8 12.9007 8 12.2171V1.78301C8 1.09925 7.23574 0.745258 6.76786 1.21233Z"
2853
+ />
2854
+ <path
2855
+ class="volume-low"
2856
+ d="M10 3.54781C10.7452 4.55141 11.1393 5.74511 11.1393 6.99991C11.1393 8.25471 10.7453 9.44791 10 10.4515L10.7988 11.0496C11.6734 9.87201 12.1356 8.47161 12.1356 6.99991C12.1356 5.52821 11.6735 4.12731 10.7988 2.94971L10 3.54781Z"
2857
+ />
2858
+ <path
2859
+ class="volume-medium"
2860
+ d="M12.3778 2.40086C13.2709 3.76756 13.7428 5.35806 13.7428 7.00026C13.7428 8.64246 13.2709 10.233 12.3778 11.5992L13.2106 12.1484C14.2107 10.6185 14.739 8.83796 14.739 7.00016C14.739 5.16236 14.2107 3.38236 13.2106 1.85156L12.3778 2.40086Z"
2861
+ />
2862
+ <path
2863
+ class="volume-high"
2864
+ d="M15.5981 0.75L14.7478 1.2719C15.7937 2.9919 16.3468 4.9723 16.3468 7C16.3468 9.0277 15.7937 11.0082 14.7478 12.7281L15.5981 13.25C16.7398 11.3722 17.343 9.211 17.343 7C17.343 4.789 16.7398 2.6268 15.5981 0.75Z"
2865
+ />
2866
+ </g>
2867
+ <g class="muted">
2868
+ <path
2869
+ fill-rule="evenodd"
2870
+ clip-rule="evenodd"
2871
+ d="M4.39976 4.98924H1.19937C1.19429 4.98924 1.17777 4.98961 1.15296 5.01609C1.1271 5.04369 1.10174 5.09245 1.10174 5.1607V8.83926C1.10174 8.90761 1.12714 8.95641 1.15299 8.984C1.17779 9.01047 1.1943 9.01084 1.19937 9.01084H4.39977L7 11.6066V2.39357L4.39976 4.98924ZM7.47434 1.92006C7.4743 1.9201 7.47439 1.92002 7.47434 1.92006V1.92006ZM6.76773 12.7877L3.98606 10.0108H1.19937C0.593146 10.0108 0.101743 9.48633 0.101743 8.83926V7.03583L0 6.99998L0.101743 6.96412V5.1607C0.101743 4.51375 0.593146 3.98924 1.19937 3.98924H3.98606L6.76786 1.21233C7.23574 0.745258 8 1.09925 8 1.78301V12.2171C8 12.9007 7.23561 13.2547 6.76773 12.7877Z"
2872
+ />
2873
+ <path
2874
+ fill-rule="evenodd"
2875
+ clip-rule="evenodd"
2876
+ d="M15.2677 9.30323C15.463 9.49849 15.7796 9.49849 15.9749 9.30323C16.1701 9.10796 16.1701 8.79138 15.9749 8.59612L14.2071 6.82841L15.9749 5.06066C16.1702 4.8654 16.1702 4.54882 15.9749 4.35355C15.7796 4.15829 15.4631 4.15829 15.2678 4.35355L13.5 6.1213L11.7322 4.35348C11.537 4.15822 11.2204 4.15822 11.0251 4.35348C10.8298 4.54874 10.8298 4.86532 11.0251 5.06058L12.7929 6.82841L11.0251 8.59619C10.8299 8.79146 10.8299 9.10804 11.0251 9.3033C11.2204 9.49856 11.537 9.49856 11.7323 9.3033L13.5 7.53552L15.2677 9.30323Z"
2877
+ />
2878
+ </g>
2879
+ </svg>
2880
+ </media-mute-button>
2881
+ </template>
2882
+
2883
+ <template partial="PipButton">
2884
+ <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2885
+ <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2886
+ <path
2887
+ d="M15.9891 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.989C0 13.0996 0.9004 14 2.011 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0ZM17 11.9891C17 12.5465 16.5465 13 15.9891 13H2.011C1.4536 13 1.0001 12.5465 1.0001 11.9891V2.0109C1.0001 1.4535 1.4536 0.9999 2.011 0.9999H15.9891C16.5465 0.9999 17 1.4535 17 2.0109V11.9891Z"
2888
+ />
2889
+ <path
2890
+ d="M15.356 5.67822H8.19523C8.03253 5.67822 7.90063 5.81012 7.90063 5.97282V11.3836C7.90063 11.5463 8.03253 11.6782 8.19523 11.6782H15.356C15.5187 11.6782 15.6506 11.5463 15.6506 11.3836V5.97282C15.6506 5.81012 15.5187 5.67822 15.356 5.67822Z"
2891
+ />
2892
+ </svg>
2893
+ </media-pip-button>
2894
+ </template>
2895
+
2896
+ <template partial="CaptionsMenu">
2897
+ <media-captions-menu-button part="bottom captions button">
2898
+ <svg aria-hidden="true" viewBox="0 0 18 14" slot="on">
2899
+ <path
2900
+ d="M15.989 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9004 14 2.011 14H15.989C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.989 0ZM4.2292 8.7639C4.5954 9.1902 5.0935 9.4031 5.7233 9.4031C6.1852 9.4031 6.5544 9.301 6.8302 9.0969C7.1061 8.8933 7.2863 8.614 7.3702 8.26H8.4322C8.3062 8.884 8.0093 9.3733 7.5411 9.7273C7.0733 10.0813 6.4703 10.2581 5.732 10.2581C5.108 10.2581 4.5699 10.1219 4.1168 9.8489C3.6637 9.5759 3.3141 9.1946 3.0685 8.7058C2.8224 8.2165 2.6994 7.6511 2.6994 7.009C2.6994 6.3611 2.8224 5.7927 3.0685 5.3034C3.3141 4.8146 3.6637 4.4323 4.1168 4.1559C4.5699 3.88 5.108 3.7418 5.732 3.7418C6.4703 3.7418 7.0733 3.922 7.5411 4.2818C8.0094 4.6422 8.3062 5.1461 8.4322 5.794H7.3702C7.2862 5.4283 7.106 5.1368 6.8302 4.921C6.5544 4.7052 6.1852 4.5968 5.7233 4.5968C5.0934 4.5968 4.5954 4.8116 4.2292 5.2404C3.8635 5.6696 3.6804 6.259 3.6804 7.009C3.6804 7.7531 3.8635 8.3381 4.2292 8.7639ZM11.0974 8.7639C11.4636 9.1902 11.9617 9.4031 12.5915 9.4031C13.0534 9.4031 13.4226 9.301 13.6984 9.0969C13.9743 8.8933 14.1545 8.614 14.2384 8.26H15.3004C15.1744 8.884 14.8775 9.3733 14.4093 9.7273C13.9415 10.0813 13.3385 10.2581 12.6002 10.2581C11.9762 10.2581 11.4381 10.1219 10.985 9.8489C10.5319 9.5759 10.1823 9.1946 9.9367 8.7058C9.6906 8.2165 9.5676 7.6511 9.5676 7.009C9.5676 6.3611 9.6906 5.7927 9.9367 5.3034C10.1823 4.8146 10.5319 4.4323 10.985 4.1559C11.4381 3.88 11.9762 3.7418 12.6002 3.7418C13.3385 3.7418 13.9415 3.922 14.4093 4.2818C14.8776 4.6422 15.1744 5.1461 15.3004 5.794H14.2384C14.1544 5.4283 13.9742 5.1368 13.6984 4.921C13.4226 4.7052 13.0534 4.5968 12.5915 4.5968C11.9616 4.5968 11.4636 4.8116 11.0974 5.2404C10.7317 5.6696 10.5486 6.259 10.5486 7.009C10.5486 7.7531 10.7317 8.3381 11.0974 8.7639Z"
2901
+ />
2902
+ </svg>
2903
+ <svg aria-hidden="true" viewBox="0 0 18 14" slot="off">
2904
+ <path
2905
+ d="M5.73219 10.258C5.10819 10.258 4.57009 10.1218 4.11699 9.8488C3.66389 9.5758 3.31429 9.1945 3.06869 8.7057C2.82259 8.2164 2.69958 7.651 2.69958 7.0089C2.69958 6.361 2.82259 5.7926 3.06869 5.3033C3.31429 4.8145 3.66389 4.4322 4.11699 4.1558C4.57009 3.8799 5.10819 3.7417 5.73219 3.7417C6.47049 3.7417 7.07348 3.9219 7.54128 4.2817C8.00958 4.6421 8.30638 5.146 8.43238 5.7939H7.37039C7.28639 5.4282 7.10618 5.1367 6.83039 4.9209C6.55459 4.7051 6.18538 4.5967 5.72348 4.5967C5.09358 4.5967 4.59559 4.8115 4.22939 5.2403C3.86369 5.6695 3.68058 6.2589 3.68058 7.0089C3.68058 7.753 3.86369 8.338 4.22939 8.7638C4.59559 9.1901 5.09368 9.403 5.72348 9.403C6.18538 9.403 6.55459 9.3009 6.83039 9.0968C7.10629 8.8932 7.28649 8.6139 7.37039 8.2599H8.43238C8.30638 8.8839 8.00948 9.3732 7.54128 9.7272C7.07348 10.0812 6.47049 10.258 5.73219 10.258Z"
2906
+ />
2907
+ <path
2908
+ d="M12.6003 10.258C11.9763 10.258 11.4382 10.1218 10.9851 9.8488C10.532 9.5758 10.1824 9.1945 9.93685 8.7057C9.69075 8.2164 9.56775 7.651 9.56775 7.0089C9.56775 6.361 9.69075 5.7926 9.93685 5.3033C10.1824 4.8145 10.532 4.4322 10.9851 4.1558C11.4382 3.8799 11.9763 3.7417 12.6003 3.7417C13.3386 3.7417 13.9416 3.9219 14.4094 4.2817C14.8777 4.6421 15.1745 5.146 15.3005 5.7939H14.2385C14.1545 5.4282 13.9743 5.1367 13.6985 4.9209C13.4227 4.7051 13.0535 4.5967 12.5916 4.5967C11.9617 4.5967 11.4637 4.8115 11.0975 5.2403C10.7318 5.6695 10.5487 6.2589 10.5487 7.0089C10.5487 7.753 10.7318 8.338 11.0975 8.7638C11.4637 9.1901 11.9618 9.403 12.5916 9.403C13.0535 9.403 13.4227 9.3009 13.6985 9.0968C13.9744 8.8932 14.1546 8.6139 14.2385 8.2599H15.3005C15.1745 8.8839 14.8776 9.3732 14.4094 9.7272C13.9416 10.0812 13.3386 10.258 12.6003 10.258Z"
2909
+ />
2910
+ <path
2911
+ d="M15.9891 1C16.5465 1 17 1.4535 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H2.0109C1.4535 13 1 12.5465 1 11.9891V2.0109C1 1.4535 1.4535 0.9999 2.0109 0.9999L15.9891 1ZM15.9891 0H2.0109C0.9003 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9003 14 2.0109 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0Z"
2912
+ />
2913
+ </svg>
2914
+ </media-captions-menu-button>
2915
+ <media-captions-menu
2916
+ hidden
2917
+ anchor="auto"
2918
+ part="bottom captions menu"
2919
+ disabled="{{disabled}}"
2920
+ aria-disabled="{{disabled}}"
2921
+ exportparts="menu-item"
2922
+ >
2923
+ <div slot="checked-indicator">
2924
+ <style>
2925
+ .indicator {
2926
+ position: relative;
2927
+ top: 1px;
2928
+ width: 0.9em;
2929
+ height: auto;
2930
+ fill: var(--_accent-color);
2931
+ margin-right: 5px;
2932
+ }
2933
+
2934
+ [aria-checked='false'] .indicator {
2935
+ display: none;
2936
+ }
2937
+ </style>
2938
+ <svg viewBox="0 0 14 18" class="indicator">
2939
+ <path
2940
+ d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
2941
+ fill-rule="evenodd"
2942
+ />
2943
+ </svg></div
2944
+ ></media-captions-menu>
2945
+ </template>
2946
+
2947
+ <template partial="AirplayButton">
2948
+ <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2949
+ <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2950
+ <path
2951
+ d="M16.1383 0H1.8618C0.8335 0 0 0.8335 0 1.8617V10.1382C0 11.1664 0.8335 12 1.8618 12H3.076C3.1204 11.9433 3.1503 11.8785 3.2012 11.826L4.004 11H1.8618C1.3866 11 1 10.6134 1 10.1382V1.8617C1 1.3865 1.3866 0.9999 1.8618 0.9999H16.1383C16.6135 0.9999 17.0001 1.3865 17.0001 1.8617V10.1382C17.0001 10.6134 16.6135 11 16.1383 11H13.9961L14.7989 11.826C14.8499 11.8785 14.8798 11.9432 14.9241 12H16.1383C17.1665 12 18.0001 11.1664 18.0001 10.1382V1.8617C18 0.8335 17.1665 0 16.1383 0Z"
2952
+ />
2953
+ <path
2954
+ d="M9.55061 8.21903C9.39981 8.06383 9.20001 7.98633 9.00011 7.98633C8.80021 7.98633 8.60031 8.06383 8.44951 8.21903L4.09771 12.697C3.62471 13.1838 3.96961 13.9998 4.64831 13.9998H13.3518C14.0304 13.9998 14.3754 13.1838 13.9023 12.697L9.55061 8.21903Z"
2955
+ />
2956
+ </svg>
2957
+ </media-airplay-button>
2958
+ </template>
2959
+
2960
+ <template partial="FullscreenButton">
2961
+ <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2962
+ <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2963
+ <path
2964
+ d="M1.00745 4.39539L1.01445 1.98789C1.01605 1.43049 1.47085 0.978289 2.02835 0.979989L6.39375 0.992589L6.39665 -0.007411L2.03125 -0.020011C0.920646 -0.023211 0.0176463 0.874489 0.0144463 1.98509L0.00744629 4.39539H1.00745Z"
2965
+ />
2966
+ <path
2967
+ d="M17.0144 2.03431L17.0076 4.39541H18.0076L18.0144 2.03721C18.0176 0.926712 17.1199 0.0237125 16.0093 0.0205125L11.6439 0.0078125L11.641 1.00781L16.0064 1.02041C16.5638 1.02201 17.016 1.47681 17.0144 2.03431Z"
2968
+ />
2969
+ <path
2970
+ d="M16.9925 9.60498L16.9855 12.0124C16.9839 12.5698 16.5291 13.022 15.9717 13.0204L11.6063 13.0078L11.6034 14.0078L15.9688 14.0204C17.0794 14.0236 17.9823 13.1259 17.9855 12.0153L17.9925 9.60498H16.9925Z"
2971
+ />
2972
+ <path
2973
+ d="M0.985626 11.9661L0.992426 9.60498H-0.0074737L-0.0142737 11.9632C-0.0174737 13.0738 0.880226 13.9767 1.99083 13.98L6.35623 13.9926L6.35913 12.9926L1.99373 12.98C1.43633 12.9784 0.983926 12.5236 0.985626 11.9661Z"
2974
+ />
2975
+ </svg>
2976
+ <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2977
+ <path
2978
+ d="M5.39655 -0.0200195L5.38955 2.38748C5.38795 2.94488 4.93315 3.39708 4.37565 3.39538L0.0103463 3.38278L0.00744629 4.38278L4.37285 4.39538C5.48345 4.39858 6.38635 3.50088 6.38965 2.39028L6.39665 -0.0200195H5.39655Z"
2979
+ />
2980
+ <path
2981
+ d="M12.6411 2.36891L12.6479 0.0078125H11.6479L11.6411 2.36601C11.6379 3.47651 12.5356 4.37951 13.6462 4.38271L18.0116 4.39531L18.0145 3.39531L13.6491 3.38271C13.0917 3.38111 12.6395 2.92641 12.6411 2.36891Z"
2982
+ />
2983
+ <path
2984
+ d="M12.6034 14.0204L12.6104 11.613C12.612 11.0556 13.0668 10.6034 13.6242 10.605L17.9896 10.6176L17.9925 9.61759L13.6271 9.60499C12.5165 9.60179 11.6136 10.4995 11.6104 11.6101L11.6034 14.0204H12.6034Z"
2985
+ />
2986
+ <path
2987
+ d="M5.359 11.6315L5.3522 13.9926H6.3522L6.359 11.6344C6.3622 10.5238 5.4645 9.62088 4.3539 9.61758L-0.0115043 9.60498L-0.0144043 10.605L4.351 10.6176C4.9084 10.6192 5.3607 11.074 5.359 11.6315Z"
2988
+ />
2989
+ </svg>
2990
+ </media-fullscreen-button>
2991
+ </template>
2992
+
2993
+ <template partial="CastButton">
2994
+ <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2995
+ <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2996
+ <path
2997
+ d="M16.0072 0H2.0291C0.9185 0 0.0181 0.9003 0.0181 2.011V5.5009C0.357 5.5016 0.6895 5.5275 1.0181 5.5669V2.011C1.0181 1.4536 1.4716 1 2.029 1H16.0072C16.5646 1 17.0181 1.4536 17.0181 2.011V11.9891C17.0181 12.5465 16.5646 13 16.0072 13H8.4358C8.4746 13.3286 8.4999 13.6611 8.4999 13.9999H16.0071C17.1177 13.9999 18.018 13.0996 18.018 11.989V2.011C18.0181 0.9003 17.1178 0 16.0072 0ZM0 6.4999V7.4999C3.584 7.4999 6.5 10.4159 6.5 13.9999H7.5C7.5 9.8642 4.1357 6.4999 0 6.4999ZM0 8.7499V9.7499C2.3433 9.7499 4.25 11.6566 4.25 13.9999H5.25C5.25 11.1049 2.895 8.7499 0 8.7499ZM0.0181 11V14H3.0181C3.0181 12.3431 1.675 11 0.0181 11Z"
2998
+ />
2999
+ </svg>
3000
+ <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
3001
+ <path
3002
+ d="M15.9891 0H2.01103C0.900434 0 3.35947e-05 0.9003 3.35947e-05 2.011V5.5009C0.338934 5.5016 0.671434 5.5275 1.00003 5.5669V2.011C1.00003 1.4536 1.45353 1 2.01093 1H15.9891C16.5465 1 17 1.4536 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H8.41773C8.45653 13.3286 8.48183 13.6611 8.48183 13.9999H15.989C17.0996 13.9999 17.9999 13.0996 17.9999 11.989V2.011C18 0.9003 17.0997 0 15.9891 0ZM-0.0180664 6.4999V7.4999C3.56593 7.4999 6.48193 10.4159 6.48193 13.9999H7.48193C7.48193 9.8642 4.11763 6.4999 -0.0180664 6.4999ZM-0.0180664 8.7499V9.7499C2.32523 9.7499 4.23193 11.6566 4.23193 13.9999H5.23193C5.23193 11.1049 2.87693 8.7499 -0.0180664 8.7499ZM3.35947e-05 11V14H3.00003C3.00003 12.3431 1.65693 11 3.35947e-05 11Z"
3003
+ />
3004
+ <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />
3005
+ </svg>
3006
+ </media-cast-button>
3007
+ </template>
3008
+
3009
+ <template partial="LiveButton">
3010
+ <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
3011
+ <span slot="text">Live</span>
3012
+ </media-live-button>
3013
+ </template>
3014
+
3015
+ <template partial="PlaybackRateMenu">
3016
+ <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button>
3017
+ <media-playback-rate-menu
3018
+ hidden
3019
+ anchor="auto"
3020
+ rates="{{playbackrates}}"
3021
+ exportparts="menu-item"
3022
+ part="bottom playback-rate menu"
3023
+ disabled="{{disabled}}"
3024
+ aria-disabled="{{disabled}}"
3025
+ ></media-playback-rate-menu>
3026
+ </template>
3027
+
3028
+ <template partial="VolumeRange">
3029
+ <media-volume-range
3030
+ part="bottom volume range"
3031
+ disabled="{{disabled}}"
3032
+ aria-disabled="{{disabled}}"
3033
+ ></media-volume-range>
3034
+ </template>
3035
+
3036
+ <template partial="TimeDisplay">
3037
+ <media-time-display
3038
+ remaining="{{defaultshowremainingtime}}"
3039
+ showduration="{{!hideduration}}"
3040
+ part="bottom time display"
3041
+ disabled="{{disabled}}"
3042
+ aria-disabled="{{disabled}}"
3043
+ ></media-time-display>
3044
+ </template>
3045
+
3046
+ <template partial="TimeRange">
3047
+ <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}" exportparts="thumb">
3048
+ <media-preview-thumbnail slot="preview"></media-preview-thumbnail>
3049
+ <media-preview-chapter-display slot="preview"></media-preview-chapter-display>
3050
+ <media-preview-time-display slot="preview"></media-preview-time-display>
3051
+ <div slot="preview" part="arrow"></div>
3052
+ </media-time-range>
3053
+ </template>
3054
+
3055
+ <template partial="AudioTrackMenu">
3056
+ <media-audio-track-menu-button part="bottom audio-track button">
3057
+ <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16">
3058
+ <path d="M9 15A7 7 0 1 1 9 1a7 7 0 0 1 0 14Zm0 1A8 8 0 1 0 9 0a8 8 0 0 0 0 16Z" />
3059
+ <path
3060
+ d="M5.2 6.3a.5.5 0 0 1 .5.5v2.4a.5.5 0 1 1-1 0V6.8a.5.5 0 0 1 .5-.5Zm2.4-2.4a.5.5 0 0 1 .5.5v7.2a.5.5 0 0 1-1 0V4.4a.5.5 0 0 1 .5-.5ZM10 5.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.4-.8a.5.5 0 0 1 .5.5v5.6a.5.5 0 0 1-1 0V5.2a.5.5 0 0 1 .5-.5Z"
3061
+ />
3062
+ </svg>
3063
+ </media-audio-track-menu-button>
3064
+ <media-audio-track-menu
3065
+ hidden
3066
+ anchor="auto"
3067
+ part="bottom audio-track menu"
3068
+ disabled="{{disabled}}"
3069
+ aria-disabled="{{disabled}}"
3070
+ exportparts="menu-item"
3071
+ >
3072
+ <div slot="checked-indicator">
3073
+ <style>
3074
+ .indicator {
3075
+ position: relative;
3076
+ top: 1px;
3077
+ width: 0.9em;
3078
+ height: auto;
3079
+ fill: var(--_accent-color);
3080
+ margin-right: 5px;
3081
+ }
3082
+
3083
+ [aria-checked='false'] .indicator {
3084
+ display: none;
3085
+ }
3086
+ </style>
3087
+ <svg viewBox="0 0 14 18" class="indicator">
3088
+ <path
3089
+ d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
3090
+ fill-rule="evenodd"
3091
+ />
3092
+ </svg>
3093
+ </div>
3094
+ </media-audio-track-menu>
3095
+ </template>
3096
+
3097
+ <template partial="RenditionMenu">
3098
+ <media-rendition-menu-button part="bottom rendition button">
3099
+ <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14">
3100
+ <path
3101
+ d="M2.25 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM9 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
3102
+ />
3103
+ </svg>
3104
+ </media-rendition-menu-button>
3105
+ <media-rendition-menu
3106
+ hidden
3107
+ anchor="auto"
3108
+ part="bottom rendition menu"
3109
+ disabled="{{disabled}}"
3110
+ aria-disabled="{{disabled}}"
3111
+ >
3112
+ <div slot="checked-indicator">
3113
+ <style>
3114
+ .indicator {
3115
+ position: relative;
3116
+ top: 1px;
3117
+ width: 0.9em;
3118
+ height: auto;
3119
+ fill: var(--_accent-color);
3120
+ margin-right: 5px;
3121
+ }
3122
+
3123
+ [aria-checked='false'] .indicator {
3124
+ opacity: 0;
3125
+ }
3126
+ </style>
3127
+ <svg viewBox="0 0 14 18" class="indicator">
3128
+ <path
3129
+ d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
3130
+ fill-rule="evenodd"
3131
+ />
3132
+ </svg>
3133
+ </div>
3134
+ </media-rendition-menu>
3135
+ </template>
3136
+
3137
+ <template partial="MuxBadge">
3138
+ <div part="mux-badge">
3139
+ <a href="https://www.mux.com/player" target="_blank">
3140
+ <span class="mux-badge-text">Powered by</span>
3141
+ <div class="mux-badge-logo">
3142
+ <svg
3143
+ viewBox="0 0 1600 500"
3144
+ style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2"
3145
+ >
3146
+ <g>
3147
+ <path
3148
+ d="M994.287,93.486c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m0,-93.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,68.943 -56.09,125.033 -125.032,125.033c-68.942,-0 -125.03,-56.09 -125.03,-125.033l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,137.853 112.149,250.003 249.999,250.003c137.851,-0 250.001,-112.15 250.001,-250.003l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486"
3149
+ style="fill-rule: nonzero"
3150
+ ></path>
3151
+ <path
3152
+ d="M1537.51,468.511c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m-275.883,-218.509l-143.33,143.329c-24.402,24.402 -24.402,63.966 0,88.368c24.402,24.402 63.967,24.402 88.369,-0l143.33,-143.329l143.328,143.329c24.402,24.4 63.967,24.402 88.369,-0c24.403,-24.402 24.403,-63.966 0.001,-88.368l-143.33,-143.329l0.001,-0.004l143.329,-143.329c24.402,-24.402 24.402,-63.965 0,-88.367c-24.402,-24.402 -63.967,-24.402 -88.369,-0l-143.329,143.328l-143.329,-143.328c-24.402,-24.401 -63.967,-24.402 -88.369,-0c-24.402,24.402 -24.402,63.965 0,88.367l143.329,143.329l0,0.004Z"
3153
+ style="fill-rule: nonzero"
3154
+ ></path>
3155
+ <path
3156
+ d="M437.511,468.521c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m23.915,-463.762c-23.348,-9.672 -50.226,-4.327 -68.096,13.544l-143.331,143.329l-143.33,-143.329c-17.871,-17.871 -44.747,-23.216 -68.096,-13.544c-23.349,9.671 -38.574,32.455 -38.574,57.729l0,375.026c0,34.51 27.977,62.486 62.487,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-224.173l80.843,80.844c24.404,24.402 63.965,24.402 88.369,-0l80.843,-80.844l0,224.173c0,34.51 27.976,62.486 62.486,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-375.026c0,-25.274 -15.224,-48.058 -38.573,-57.729"
3157
+ style="fill-rule: nonzero"
3158
+ ></path>
3159
+ </g>
3160
+ </svg>
3161
+ </div>
3162
+ </a>
3163
+ </div>
3164
+ </template>
3165
+
3166
+ <media-controller
3167
+ part="controller"
3168
+ defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
3169
+ breakpoints="sm:470"
3170
+ gesturesdisabled="{{disabled}}"
3171
+ hotkeys="{{hotkeys}}"
3172
+ nohotkeys="{{nohotkeys}}"
3173
+ novolumepref="{{novolumepref}}"
3174
+ audio="{{audio}}"
3175
+ noautoseektolive="{{noautoseektolive}}"
3176
+ defaultsubtitles="{{defaultsubtitles}}"
3177
+ defaultduration="{{defaultduration ?? false}}"
3178
+ keyboardforwardseekoffset="{{forwardseekoffset}}"
3179
+ keyboardbackwardseekoffset="{{backwardseekoffset}}"
3180
+ exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
3181
+ style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
3182
+ >
3183
+ <slot name="media" slot="media"></slot>
3184
+ <slot name="poster" slot="poster"></slot>
3185
+
3186
+ <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
3187
+
3188
+ <template if="!audio">
3189
+ <media-error-dialog slot="dialog" noautohide></media-error-dialog>
3190
+ <!-- Pre-playback UI -->
3191
+ <!-- same for both on-demand and live -->
3192
+ <div slot="centered-chrome" class="center-controls pre-playback">
3193
+ <template if="!breakpointsm">{{>PlayButton section="center"}}</template>
3194
+ <template if="breakpointsm">{{>PrePlayButton section="center"}}</template>
3195
+ </div>
3196
+
3197
+ <!-- Mux Badge -->
3198
+ <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template>
3199
+
3200
+ <!-- Autoplay centered unmute button -->
3201
+ <!--
3202
+ todo: figure out how show this with available state variables
3203
+ needs to show when:
3204
+ - autoplay is enabled
3205
+ - playback has been successful
3206
+ - audio is muted
3207
+ - in place / instead of the pre-plaback play button
3208
+ - not to show again after user has interacted with this button
3209
+ - OR user has interacted with the mute button in the control bar
3210
+ -->
3211
+ <!--
3212
+ There should be a >MuteButton to the left of the "Unmute" text, but a templating bug
3213
+ makes it appear even if commented out in the markup, add it back when code is un-commented
3214
+ -->
3215
+ <!-- <div slot="centered-chrome" class="autoplay-unmute">
3216
+ <div role="button" class="autoplay-unmute-btn">Unmute</div>
3217
+ </div> -->
3218
+
3219
+ <template if="streamtype == 'on-demand'">
3220
+ <template if="breakpointsm">
3221
+ <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar>
3222
+ </template>
3223
+ {{>TimeRange}}
3224
+ <media-control-bar part="control-bar bottom">
3225
+ {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}
3226
+ {{>VolumeRange}}
3227
+ <div class="spacer"></div>
3228
+ {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}}
3229
+ {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
3230
+ </media-control-bar>
3231
+ </template>
3232
+
3233
+ <template if="streamtype == 'live'">
3234
+ <media-control-bar part="control-bar top" slot="top-chrome">
3235
+ {{>LiveButton}}
3236
+ <template if="breakpointsm"> {{>TitleDisplay}} </template>
3237
+ </media-control-bar>
3238
+ <template if="targetlivewindow > 0">{{>TimeRange}}</template>
3239
+ <media-control-bar part="control-bar bottom">
3240
+ {{>PlayButton}}
3241
+ <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>
3242
+ {{>MuteButton}} {{>VolumeRange}}
3243
+ <div class="spacer"></div>
3244
+ {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}
3245
+ {{>FullscreenButton}}
3246
+ </media-control-bar>
3247
+ </template>
3248
+ </template>
3249
+
3250
+ <template if="audio">
3251
+ <template if="streamtype == 'on-demand'">
3252
+ <template if="title">
3253
+ <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
3254
+ </template>
3255
+ <media-control-bar part="control-bar bottom">
3256
+ {{>PlayButton}}
3257
+ <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3258
+ {{>MuteButton}}
3259
+ <template if="breakpointsm">{{>VolumeRange}}</template>
3260
+ {{>TimeDisplay}} {{>TimeRange}}
3261
+ <template if="breakpointsm">{{>PlaybackRateMenu}}</template>
3262
+ {{>AirplayButton}} {{>CastButton}}
3263
+ </media-control-bar>
3264
+ </template>
3265
+
3266
+ <template if="streamtype == 'live'">
3267
+ <template if="title">
3268
+ <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
3269
+ </template>
3270
+ <media-control-bar part="control-bar bottom">
3271
+ {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}}
3272
+ <template if="breakpointsm">
3273
+ {{>VolumeRange}}
3274
+ <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3275
+ </template>
3276
+ <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>
3277
+ <template if="!targetlivewindow"><div class="spacer"></div></template>
3278
+ {{>AirplayButton}} {{>CastButton}}
3279
+ </media-control-bar>
3280
+ </template>
3281
+ </template>
3282
+
3283
+ <slot></slot>
3284
+ </media-controller>
3285
+ </template>
3286
+ `,Md=wo.createElement("template");"innerHTML"in Md&&(Md.innerHTML=PT);var $h,Hh,Zv=class extends Ko{};Zv.template=(Hh=($h=Md.content)==null?void 0:$h.children)==null?void 0:Hh[0];Bt.customElements.get("media-theme-gerwig")||Bt.customElements.define("media-theme-gerwig",Zv);var UT="gerwig",jt={SRC:"src",POSTER:"poster"},A={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},xd=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"];function $T(t,e){var i,a;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src||!!t.currentSrc,poster:t.poster,storyboard:t.storyboard,storyboardSrc:t.getAttribute(A.STORYBOARD_SRC),fullscreenElement:t.getAttribute(A.FULLSCREEN_ELEMENT),placeholder:t.getAttribute("placeholder"),themeTemplate:BT(t),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(A.NOHOTKEYS),hotKeys:t.getAttribute(A.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,preferCmcd:t.preferCmcd,debug:t.debug,disableTracking:t.disableTracking,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,maxResolution:t.maxResolution,minResolution:t.minResolution,maxAutoResolution:t.maxAutoResolution,programStartTime:t.programStartTime,programEndTime:t.programEndTime,assetStartTime:t.assetStartTime,assetEndTime:t.assetEndTime,renditionOrder:t.renditionOrder,metadata:t.metadata,playerInitTime:t.playerInitTime,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferPlayback:t.preferPlayback,audio:t.audio,defaultStreamType:t.defaultStreamType,targetLiveWindow:t.getAttribute(b.TARGET_LIVE_WINDOW),streamType:rc(t.getAttribute(b.STREAM_TYPE)),primaryColor:t.getAttribute(A.PRIMARY_COLOR),secondaryColor:t.getAttribute(A.SECONDARY_COLOR),accentColor:t.getAttribute(A.ACCENT_COLOR),forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultDuration:t.defaultDuration,defaultShowRemainingTime:t.defaultShowRemainingTime,hideDuration:WT(t),playbackRates:t.getAttribute(A.PLAYBACK_RATES),customDomain:(i=t.getAttribute(b.CUSTOM_DOMAIN))!=null?i:void 0,title:t.getAttribute(A.TITLE),videoTitle:(a=t.getAttribute(A.VIDEO_TITLE))!=null?a:t.getAttribute(A.TITLE),novolumepref:t.hasAttribute(A.NO_VOLUME_PREF),nomutedpref:t.hasAttribute(A.NO_MUTED_PREF),proudlyDisplayMuxBadge:t.hasAttribute(A.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:t.castReceiver,disablePseudoEnded:t.hasAttribute(A.DISABLE_PSEUDO_ENDED),...e,extraSourceParams:t.extraSourceParams}}var HT=Fp.formatErrorMessage;Fp.formatErrorMessage=t=>{var e,i;if(t instanceof R){let a=OT(t,!1);return`
3287
+ ${a!=null&&a.title?`<h3>${a.title}</h3>`:""}
3288
+ ${a!=null&&a.message||a!=null&&a.linkUrl?`<p>
3289
+ ${a?.message}
3290
+ ${a!=null&&a.linkUrl?`<a
3291
+ href="${a.linkUrl}"
3292
+ target="_blank"
3293
+ rel="external noopener"
3294
+ aria-label="${(e=a.linkText)!=null?e:""} ${D("(opens in a new window)")}"
3295
+ >${(i=a.linkText)!=null?i:a.linkUrl}</a
3296
+ >`:""}
3297
+ </p>`:""}
3298
+ `}return HT(t)};function BT(t){var e,i;let a=t.theme;if(a){let r=(i=(e=t.getRootNode())==null?void 0:e.getElementById)==null?void 0:i.call(e,a);if(r&&r instanceof HTMLTemplateElement)return r;a.startsWith("media-theme-")||(a=`media-theme-${a}`);let n=Bt.customElements.get(a);if(n!=null&&n.template)return n.template}}function WT(t){var e;let i=(e=t.mediaController)==null?void 0:e.querySelector("media-time-display");return i&&getComputedStyle(i).getPropertyValue("--media-duration-display-display").trim()==="none"}function Bh(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),i},e)}var FT=Object.values(b),KT=Object.values(jt),VT=Object.values(A),Wh=Vv(),Fh="mux-player",Kh={isDialogOpen:!1},qT={redundant_streams:!0},Ys,Gs,Qs,Hi,zs,Za,le,_i,jv,Od,Bi,Vh,qh,Yh,Gh,YT=class extends Oh{constructor(){super(),Et(this,le),Et(this,Ys),Et(this,Gs,!1),Et(this,Qs,{}),Et(this,Hi,!0),Et(this,zs,new dT(this,"hotkeys")),Et(this,Za,{...Kh,onCloseErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&Ee(this,le,Od).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&(Fv(this,wo.activeElement)||t.preventDefault())}}),qt(this,Ys,qd()),this.attachShadow({mode:"open"}),Ee(this,le,jv).call(this),this.isConnected&&Ee(this,le,_i).call(this)}static get NAME(){return Fh}static get VERSION(){return Wh}static get observedAttributes(){var t;return[...(t=Oh.observedAttributes)!=null?t:[],...KT,...FT,...VT]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,e;return(e=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:e.querySelector("media-controller")}connectedCallback(){let t=this.media;t&&(t.metadata=Bh(this))}attributeChangedCallback(t,e,i){switch(Ee(this,le,_i).call(this),super.attributeChangedCallback(t,e,i),t){case A.HOTKEYS:z(this,zs).value=i;break;case A.THUMBNAIL_TIME:{i!=null&&this.tokens.thumbnail&&Jt(D("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case A.THUMBNAIL_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Yr.THUMBNAIL;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"thumbnail"}))}}break}case A.STORYBOARD_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Yr.STORYBOARD;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"storyboard"}))}}break}case A.DRM_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Yr.DRM;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"drm"}))}}break}case b.PLAYBACK_ID:{i!=null&&i.includes("?token")&&nt(D("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break}case b.STREAM_TYPE:{i&&![Q.LIVE,Q.ON_DEMAND,Q.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?Number.POSITIVE_INFINITY:0:Yv({file:"invalid-stream-type.md",message:D("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===Q.LIVE?this.getAttribute(A.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break}case A.FULLSCREEN_ELEMENT:{if(i!=null||i!==e){let a=wo.getElementById(i),r=a?.querySelector("mux-player");this.mediaController&&a&&r&&(this.mediaController.fullscreenElement=a)}break}}[b.PLAYBACK_ID,jt.SRC,A.PLAYBACK_TOKEN].includes(t)&&e!==i&&qt(this,Za,{...z(this,Za),...Kh}),Ee(this,le,Bi).call(this,{[lT(t)]:i})}async requestFullscreen(t){var e;if(!(!this.mediaController||this.mediaController.hasAttribute(u.MEDIA_IS_FULLSCREEN)))return(e=this.mediaController)==null||e.dispatchEvent(new Bt.CustomEvent(I.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((i,a)=>{var r;(r=this.mediaController)==null||r.addEventListener(ri.MEDIA_IS_FULLSCREEN,()=>i(),{once:!0})})}async exitFullscreen(){var t;if(!(!this.mediaController||!this.mediaController.hasAttribute(u.MEDIA_IS_FULLSCREEN)))return(t=this.mediaController)==null||t.dispatchEvent(new Bt.CustomEvent(I.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,i)=>{var a;(a=this.mediaController)==null||a.addEventListener(ri.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var t;return(t=this.getAttribute(b.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?eo.includes(t)?this.setAttribute(b.PREFER_CMCD,t):Jt(`Invalid value for preferCmcd. Must be one of ${eo.join()}`):this.removeAttribute(b.PREFER_CMCD))}get hasPlayed(){var t,e;return(e=(t=this.mediaController)==null?void 0:t.hasAttribute(u.MEDIA_HAS_PLAYED))!=null?e:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(u.MEDIA_TIME_IS_LIVE)}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(A.THEME))!=null?t:UT}set theme(t){this.setAttribute(A.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let e={};for(let i of t.getAttributeNames()){if(xd.includes(i))continue;let a=t.getAttribute(i);e[Bv(i)]=a===""?!0:a}return e}set themeProps(t){var e,i;Ee(this,le,_i).call(this);let a={...this.themeProps,...t};for(let r in a){if(xd.includes(r))continue;let n=t?.[r];typeof n=="boolean"||n==null?(e=this.mediaTheme)==null||e.toggleAttribute(Dd(r),!!n):(i=this.mediaTheme)==null||i.setAttribute(Dd(r),n)}}get playbackId(){var t;return(t=this.getAttribute(b.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(b.PLAYBACK_ID,t):this.removeAttribute(b.PLAYBACK_ID)}get src(){var t,e;return this.playbackId?(t=Di(this,jt.SRC))!=null?t:void 0:(e=this.getAttribute(jt.SRC))!=null?e:void 0}set src(t){t?this.setAttribute(jt.SRC,t):this.removeAttribute(jt.SRC)}get poster(){var t;let e=this.getAttribute(jt.POSTER);if(e!=null)return e;let{tokens:i}=this;if(i.playback&&!i.thumbnail){Jt("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return nT(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(t=this.thumbnailTime)!=null?t:this.startTime,programTime:this.programStartTime,token:i.thumbnail})}set poster(t){t||t===""?this.setAttribute(jt.POSTER,t):this.removeAttribute(jt.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(A.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(A.STORYBOARD_SRC,t):this.removeAttribute(A.STORYBOARD_SRC)}get storyboard(){let{tokens:t}=this;if(this.storyboardSrc&&!t.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[Q.LIVE,Q.UNKNOWN].includes(this.streamType)||t.playback&&!t.storyboard))return sT(this.playbackId,{customDomain:this.customDomain,token:t.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(A.AUDIO)}set audio(t){if(!t){this.removeAttribute(A.AUDIO);return}this.setAttribute(A.AUDIO,"")}get hotkeys(){return z(this,zs)}get nohotkeys(){return this.hasAttribute(A.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(A.NOHOTKEYS);return}this.setAttribute(A.NOHOTKEYS,"")}get thumbnailTime(){return ze(this.getAttribute(A.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(A.THUMBNAIL_TIME,`${t}`)}get videoTitle(){var t,e;return(e=(t=this.getAttribute(A.VIDEO_TITLE))!=null?t:this.getAttribute(A.TITLE))!=null?e:""}set videoTitle(t){t!==this.videoTitle&&(t?this.setAttribute(A.VIDEO_TITLE,t):this.removeAttribute(A.VIDEO_TITLE))}get placeholder(){var t;return(t=Di(this,A.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(A.PLACEHOLDER,`${t}`)}get primaryColor(){var t,e;let i=this.getAttribute(A.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_primary-color"))==null?void 0:e.trim(),i))return i}set primaryColor(t){this.setAttribute(A.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var t,e;let i=this.getAttribute(A.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_secondary-color"))==null?void 0:e.trim(),i))return i}set secondaryColor(t){this.setAttribute(A.SECONDARY_COLOR,`${t}`)}get accentColor(){var t,e;let i=this.getAttribute(A.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_accent-color"))==null?void 0:e.trim(),i))return i}set accentColor(t){this.setAttribute(A.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(A.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(A.PLAYBACK_RATES))return this.getAttribute(A.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,e)=>t-e)}set playbackRates(t){if(!t){this.removeAttribute(A.PLAYBACK_RATES);return}this.setAttribute(A.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=ze(this.getAttribute(A.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(A.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=ze(this.getAttribute(A.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(A.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(A.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return ze(this.getAttribute(A.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(A.DEFAULT_DURATION):this.setAttribute(A.DEFAULT_DURATION,`${t}`)}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?ze(this.getAttribute(b.PLAYER_INIT_TIME)):z(this,Ys)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+t}`))}get playerSoftwareName(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_NAME))!=null?t:Fh}get playerSoftwareVersion(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_VERSION))!=null?t:Wh}get beaconCollectionDomain(){var t;return(t=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(b.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(b.MAX_RESOLUTION,t):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(b.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(b.MIN_RESOLUTION,t):this.removeAttribute(b.MIN_RESOLUTION))}get maxAutoResolution(){var t;return(t=this.getAttribute(b.MAX_AUTO_RESOLUTION))!=null?t:void 0}set maxAutoResolution(t){t==null?this.removeAttribute(b.MAX_AUTO_RESOLUTION):this.setAttribute(b.MAX_AUTO_RESOLUTION,t)}get renditionOrder(){var t;return(t=this.getAttribute(b.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(b.RENDITION_ORDER,t):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){return ze(this.getAttribute(b.PROGRAM_START_TIME))}set programStartTime(t){t==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${t}`)}get programEndTime(){return ze(this.getAttribute(b.PROGRAM_END_TIME))}set programEndTime(t){t==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){return ze(this.getAttribute(b.ASSET_START_TIME))}set assetStartTime(t){t==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${t}`)}get assetEndTime(){return ze(this.getAttribute(b.ASSET_END_TIME))}set assetEndTime(t){t==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${t}`)}get extraSourceParams(){return this.hasAttribute(A.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(A.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[e,i])=>(t[e]=i,t),{}):qT}set extraSourceParams(t){t==null?this.removeAttribute(A.EXTRA_SOURCE_PARAMS):this.setAttribute(A.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(b.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(b.CUSTOM_DOMAIN,t):this.removeAttribute(b.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Di(this,b.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(b.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(A.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(A.NO_VOLUME_PREF,""):this.removeAttribute(A.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(A.NO_MUTED_PREF)}set noMutedPref(t){t?this.setAttribute(A.NO_MUTED_PREF,""):this.removeAttribute(A.NO_MUTED_PREF)}get debug(){return Di(this,b.DEBUG)!=null}set debug(t){t?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG)}get disableTracking(){return Di(this,b.DISABLE_TRACKING)!=null}set disableTracking(t){this.toggleAttribute(b.DISABLE_TRACKING,!!t)}get disableCookies(){return Di(this,b.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES)}get streamType(){var t,e,i;return(i=(e=this.getAttribute(b.STREAM_TYPE))!=null?e:(t=this.media)==null?void 0:t.streamType)!=null?i:Q.UNKNOWN}set streamType(t){this.setAttribute(b.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,e,i;return(i=(e=this.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?e:(t=this.mediaController)==null?void 0:t.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?i:Q.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(A.DEFAULT_STREAM_TYPE,t):this.removeAttribute(A.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,e;return this.hasAttribute(A.TARGET_LIVE_WINDOW)?+this.getAttribute(A.TARGET_LIVE_WINDOW):(e=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?e:Number.NaN}set targetLiveWindow(t){t==this.targetLiveWindow||Number.isNaN(t)&&Number.isNaN(this.targetLiveWindow)||(t==null?this.removeAttribute(A.TARGET_LIVE_WINDOW):this.setAttribute(A.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return ze(Di(this,b.START_TIME))}set startTime(t){this.setAttribute(b.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(b.PREFER_PLAYBACK);if(t===Wt.MSE||t===Wt.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===Wt.MSE||t===Wt.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,t):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Bh(this),...t}}get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=t}async addCuePoints(t){var e;if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(e=this.media)==null?void 0:e.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,e;return(e=(t=this.media)==null?void 0:t.cuePoints)!=null?e:[]}addChapters(t){var e;if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(e=this.media)==null?void 0:e.addChapters(t)}get activeChapter(){var t;return(t=this.media)==null?void 0:t.activeChapter}get chapters(){var t,e;return(e=(t=this.media)==null?void 0:t.chapters)!=null?e:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(A.PLAYBACK_TOKEN),e=this.getAttribute(A.DRM_TOKEN),i=this.getAttribute(A.THUMBNAIL_TOKEN),a=this.getAttribute(A.STORYBOARD_TOKEN);return{...z(this,Qs),...t!=null?{playback:t}:{},...e!=null?{drm:e}:{},...i!=null?{thumbnail:i}:{},...a!=null?{storyboard:a}:{}}}set tokens(t){qt(this,Qs,t??{})}get playbackToken(){var t;return(t=this.getAttribute(A.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(A.PLAYBACK_TOKEN,`${t}`)}get drmToken(){var t;return(t=this.getAttribute(A.DRM_TOKEN))!=null?t:void 0}set drmToken(t){this.setAttribute(A.DRM_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(A.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(A.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(A.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(A.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,e,i,a){var r;let n=(r=this.media)==null?void 0:r.nativeEl;if(n)return Wd(n,t,e,i,a)}removeTextTrack(t){var e;let i=(e=this.media)==null?void 0:e.nativeEl;if(i)return F_(i,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}get castReceiver(){var t;return(t=this.getAttribute(A.CAST_RECEIVER))!=null?t:void 0}set castReceiver(t){t!==this.castReceiver&&(t?this.setAttribute(A.CAST_RECEIVER,t):this.removeAttribute(A.CAST_RECEIVER))}get castCustomData(){var t;return(t=this.media)==null?void 0:t.castCustomData}set castCustomData(t){if(!this.media){nt("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=t}get noTooltips(){return this.hasAttribute(A.NO_TOOLTIPS)}set noTooltips(t){if(!t){this.removeAttribute(A.NO_TOOLTIPS);return}this.setAttribute(A.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(t){t?this.setAttribute(A.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}};Ys=new WeakMap,Gs=new WeakMap,Qs=new WeakMap,Hi=new WeakMap,zs=new WeakMap,Za=new WeakMap,le=new WeakSet,_i=function(){var t,e,i,a;if(!z(this,Gs)){qt(this,Gs,!0),Ee(this,le,Bi).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof Bt.HTMLElement))throw""}catch{nt("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{nt("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof h0))throw""}catch{nt("<media-controller> failed to upgrade!")}Ee(this,le,Vh).call(this),Ee(this,le,qh).call(this),Ee(this,le,Yh).call(this),qt(this,Hi,(e=(t=this.mediaController)==null?void 0:t.hasAttribute(M.USER_INACTIVE))!=null?e:!0),Ee(this,le,Gh).call(this),(i=this.media)==null||i.addEventListener("streamtypechange",()=>Ee(this,le,Bi).call(this)),(a=this.media)==null||a.addEventListener("loadstart",()=>Ee(this,le,Bi).call(this))}},jv=function(){var t,e;try{(t=window?.CSS)==null||t.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(e=window?.CSS)==null||e.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},Od=function(t){Object.assign(z(this,Za),t),Ee(this,le,Bi).call(this)},Bi=function(t={}){ST(IT($T(this,{...z(this,Za),...t})),this.shadowRoot)},Vh=function(){let t=e=>{var i,a;if(!(e!=null&&e.startsWith("theme-")))return;let r=e.replace(/^theme-/,"");if(xd.includes(r))return;let n=this.getAttribute(e);n!=null?(i=this.mediaTheme)==null||i.setAttribute(r,n):(a=this.mediaTheme)==null||a.removeAttribute(r)};new MutationObserver(e=>{for(let{attributeName:i}of e)t(i)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},qh=function(){let t=e=>{var i;let a=(i=this.media)==null?void 0:i.error;if(!(a instanceof R)){let{message:n,code:s}=a??{};a=new R(n,s)}if(!(a!=null&&a.fatal)){Jt(a),a.data&&Jt(`${a.name} data:`,a.data);return}let r=Uh(a);r.message&&Yv(r),nt(a),a.data&&nt(`${a.name} data:`,a.data),Ee(this,le,Od).call(this,{isDialogOpen:!0})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(e={})=>{var i,a,r;if(!(((i=this.media)==null?void 0:i.error)instanceof R))return e;let n=Uh((a=this.media)==null?void 0:a.error);return{player_error_code:(r=this.media)==null?void 0:r.error.code,player_error_message:n.message?String(n.message):e.player_error_message,player_error_context:n.context?String(n.context):e.player_error_context}})},Yh=function(){var t,e,i,a;let r=()=>Ee(this,le,Bi).call(this);(e=(t=this.media)==null?void 0:t.textTracks)==null||e.addEventListener("addtrack",r),(a=(i=this.media)==null?void 0:i.textTracks)==null||a.addEventListener("removetrack",r)},Gh=function(){var t,e;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===Q.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(l,d,m=!1)=>{r()||Array.from(l&&l.activeCues||[]).forEach(p=>{if(!(!p.snapToLines||p.line<-5||p.line>=0&&p.line<10))if(!d||this.paused){let h=p.text.split(`
3299
+ `).length,c=-3;this.streamType===Q.LIVE&&(c=-2);let v=c-h;if(p.line===v&&!m)return;a.has(p)||a.set(p,p.line),p.line=v}else setTimeout(()=>{p.line=a.get(p)||"auto"},500)})},s=()=>{var l,d;n(i,(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!1)},o=()=>{var l,d;let m=Array.from(((d=(l=this.mediaController)==null?void 0:l.media)==null?void 0:d.textTracks)||[]).filter(p=>["subtitles","captions"].includes(p.kind)&&p.mode==="showing")[0];m!==i&&i?.removeEventListener("cuechange",s),i=m,i?.addEventListener("cuechange",s),n(i,z(this,Hi))};o(),(t=this.textTracks)==null||t.addEventListener("change",o),(e=this.textTracks)==null||e.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var l,d;let m=(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!0;z(this,Hi)!==m&&(qt(this,Hi,m),n(i,z(this,Hi)))})};function Di(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Qh=YT,Xv=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends Xv{}globalThis.DocumentFragment=t}var GT=class extends Xv{},QT={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(GT)}},zT={customElements:QT},ZT=typeof window>"u"||typeof globalThis.customElements>"u",El=ZT?zT:globalThis;El.customElements.get("mux-player")||(El.customElements.define("mux-player",Qh),El.MuxPlayerElement=Qh);var Jv=parseInt(en.version)>=19,zh={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},jT=t=>t==null,XT=(t,e)=>jT(e)?!1:t in e,JT=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),eA=(t,e)=>{if(!(!Jv&&typeof e=="boolean"&&!e)){if(XT(t,zh))return zh[t];if(typeof e<"u")return/[A-Z]/.test(t)?JT(t):t}},tA=(t,e)=>!Jv&&typeof t=="boolean"?"":t,iA=(t={})=>{let{ref:e,...i}=t;return Object.entries(i).reduce((a,[r,n])=>{let s=eA(r,n);if(!s)return a;let o=tA(n);return a[s]=o,a},{})};function Zh(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function aA(...t){return e=>{let i=!1,a=t.map(r=>{let n=Zh(r,e);return!i&&typeof n=="function"&&(i=!0),n});if(i)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():Zh(t[r],null)}}}}function rA(...t){return tn.useCallback(aA(...t),t)}var nA=Object.prototype.hasOwnProperty,sA=(t,e)=>{if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.some((r,n)=>e[n]===r);let i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(let r=0;r<i.length;r++)if(!nA.call(e,i[r])||!Object.is(t[i[r]],e[i[r]]))return!1;return!0},ef=(t,e,i)=>!sA(e,t[i]),oA=(t,e,i)=>{t[i]=e},lA=(t,e,i,a=oA,r=ef)=>tn.useEffect(()=>{let n=i?.current;n&&r(n,e,t)&&a(n,e,t)},[i?.current,e]),wt=lA,dA=()=>{try{return"3.10.1"}catch{}return"UNKNOWN"},uA=dA(),cA=()=>uA,ne=(t,e,i)=>tn.useEffect(()=>{let a=e?.current;if(!a||!i)return;let r=t,n=i;return a.addEventListener(r,n),()=>{a.removeEventListener(r,n)}},[e?.current,i,t]),hA=en.forwardRef(({children:t,...e},i)=>en.createElement("mux-player",{suppressHydrationWarning:!0,...iA(e),ref:i},t)),mA=(t,e)=>{let{onAbort:i,onCanPlay:a,onCanPlayThrough:r,onEmptied:n,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:m,onVolumeChange:p,onRateChange:h,onResize:c,onWaiting:v,onPlay:E,onPlaying:g,onTimeUpdate:y,onPause:T,onSeeking:_,onSeeked:S,onStalled:C,onSuspend:O,onEnded:$,onError:Y,onCuePointChange:J,onChapterChange:K,metadata:U,tokens:Me,paused:Fe,playbackId:Ke,playbackRates:he,currentTime:Pe,themeProps:Tt,extraSourceParams:Ue,castCustomData:lt,_hlsConfig:Ve,...ke}=e;return wt("tokens",Me,t),wt("playbackId",Ke,t),wt("playbackRates",he,t),wt("metadata",U,t),wt("extraSourceParams",Ue,t),wt("_hlsConfig",Ve,t),wt("themeProps",Tt,t),wt("castCustomData",lt,t),wt("paused",Fe,t,(xe,et)=>{et!=null&&(et?xe.pause():xe.play())},(xe,et,na)=>xe.hasAttribute("autoplay")&&!xe.hasPlayed?!1:ef(xe,et,na)),wt("currentTime",Pe,t,(xe,et)=>{et!=null&&(xe.currentTime=et)}),ne("abort",t,i),ne("canplay",t,a),ne("canplaythrough",t,r),ne("emptied",t,n),ne("loadstart",t,s),ne("loadeddata",t,o),ne("loadedmetadata",t,l),ne("progress",t,d),ne("durationchange",t,m),ne("volumechange",t,p),ne("ratechange",t,h),ne("resize",t,c),ne("waiting",t,v),ne("play",t,E),ne("playing",t,g),ne("timeupdate",t,y),ne("pause",t,T),ne("seeking",t,_),ne("seeked",t,S),ne("stalled",t,C),ne("suspend",t,O),ne("ended",t,$),ne("error",t,Y),ne("cuepointchange",t,J),ne("chapterchange",t,K),[ke]},pA=cA(),vA="mux-player-react",fA=en.forwardRef((t,e)=>{var i;let a=tn.useRef(null),r=rA(a,e),[n]=mA(a,t),[s]=tn.useState((i=t.playerInitTime)!=null?i:qd());return en.createElement(hA,{ref:r,defaultHiddenCaptions:t.defaultHiddenCaptions,playerSoftwareName:vA,playerSoftwareVersion:pA,playerInitTime:s,...n})}),UA=fA;export{yA as MaxResolution,R as MediaError,TA as MinResolution,AA as RenditionOrder,UA as default,qd as generatePlayerInitTime,vA as playerSoftwareName,pA as playerSoftwareVersion};