@clickview/lite 0.35.3-dev.0 → 0.36.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/css/{1201-lite-c31c094e0b.chunk.css → 1201-lite-bc27e1841b.chunk.css} +2 -2
  3. package/dist/css/{1461-lite-8a6d9f8005.chunk.css → 1461-lite-3c6f5b78a2.chunk.css} +2 -2
  4. package/dist/css/{1514-lite-b377d8aad7.chunk.css → 1514-lite-e7eb23a1d0.chunk.css} +2 -2
  5. package/dist/css/{763-lite-8818fa8d4c.chunk.css → 1519-lite-c0be07cd4c.chunk.css} +2 -2
  6. package/dist/css/{4973-lite-f724003877.chunk.css → 1581-lite-24faaebc8c.chunk.css} +2 -2
  7. package/dist/css/{1688-lite-cbde295a12.chunk.css → 1688-lite-a653f82331.chunk.css} +2 -2
  8. package/dist/css/{2469-lite-7a8e220d2f.chunk.css → 2469-lite-f38a67e16f.chunk.css} +4 -4
  9. package/dist/css/{2651-lite-c31c094e0b.chunk.css → 2651-lite-bc27e1841b.chunk.css} +2 -2
  10. package/dist/css/{3401-lite-705c2c5fe4.chunk.css → 268-lite-0b8496b169.chunk.css} +1 -1
  11. package/dist/css/{3311-lite-8f53694323.chunk.css → 3311-lite-1e355d6982.chunk.css} +2 -2
  12. package/dist/css/{4210-lite-5f2e12e28a.chunk.css → 4210-lite-e11245dada.chunk.css} +2 -2
  13. package/dist/css/{5127-lite-be5b495f2e.chunk.css → 4728-lite-6298f2bf71.chunk.css} +2 -2
  14. package/dist/css/{4728-lite-be5b495f2e.chunk.css → 5127-lite-6298f2bf71.chunk.css} +2 -2
  15. package/dist/css/{5306-lite-40a1dcaba5.chunk.css → 5306-lite-cb200964ce.chunk.css} +2 -2
  16. package/dist/css/{5595-lite-c07231bb2e.chunk.css → 5595-lite-888c19c68f.chunk.css} +2 -2
  17. package/dist/css/{5965-lite-8818fa8d4c.chunk.css → 5965-lite-c0be07cd4c.chunk.css} +2 -2
  18. package/dist/css/7020-lite-7347395735.chunk.css +40 -0
  19. package/dist/css/{9516-lite-4751b1e0aa.chunk.css → 7119-lite-c005d83db5.chunk.css} +2 -2
  20. package/dist/css/{1519-lite-8818fa8d4c.chunk.css → 763-lite-c0be07cd4c.chunk.css} +2 -2
  21. package/dist/css/{7701-lite-6d26cc737a.chunk.css → 7679-lite-fc8fd7bea5.chunk.css} +2 -1
  22. package/dist/css/{7703-lite-7b8ce5ad7c.chunk.css → 7703-lite-e226cf1428.chunk.css} +1 -1
  23. package/dist/css/{1944-lite-6cd5066b84.chunk.css → 7726-lite-f6a761b74a.chunk.css} +2 -1
  24. package/dist/css/8028-lite-24022433b1.chunk.css +38 -0
  25. package/dist/css/{9133-lite-bc1a27e4da.chunk.css → 8469-lite-47a5344de5.chunk.css} +2 -2
  26. package/dist/css/{8541-lite-0f6c636afb.chunk.css → 8541-lite-2c4667c98a.chunk.css} +2 -2
  27. package/dist/css/{8469-lite-bc1a27e4da.chunk.css → 9133-lite-47a5344de5.chunk.css} +2 -2
  28. package/dist/css/{9704-lite-60ead9f8df.chunk.css → 9704-lite-fe60ddd8f0.chunk.css} +2 -2
  29. package/dist/languages/en.json +1 -1
  30. package/dist/scripts/1285-0250bba8c3-lite.chunk.js +1 -0
  31. package/dist/scripts/1316-67d880daa1-lite.chunk.js +1 -0
  32. package/dist/scripts/1461-dfff501bca-lite.chunk.js +1 -0
  33. package/dist/scripts/1514-fdf304aa99-lite.chunk.js +1 -0
  34. package/dist/scripts/1518-8c3cf8d7e1-lite.chunk.js +1 -0
  35. package/dist/scripts/1519-aa4fb0cd55-lite.chunk.js +1 -0
  36. package/dist/scripts/{1526-93624f65f1-lite.chunk.js → 1526-eda6832e12-lite.chunk.js} +1 -1
  37. package/dist/scripts/1581-2dd179da76-lite.chunk.js +1 -0
  38. package/dist/scripts/1617-db4adcd8e9-lite.chunk.js +1 -0
  39. package/dist/scripts/{1672-9ae25f79a6-lite.chunk.js → 1672-477ad27e45-lite.chunk.js} +1 -1
  40. package/dist/scripts/1688-d747de40f0-lite.chunk.js +1 -0
  41. package/dist/scripts/{1863-8f826ffb83-lite.chunk.js → 1863-0c5334f2c2-lite.chunk.js} +1 -1
  42. package/dist/scripts/1919-5393388d59-lite.chunk.js +1 -0
  43. package/dist/scripts/2118-4bee787686-lite.chunk.js +2 -0
  44. package/dist/scripts/2188-eb2a129a0c-lite.chunk.js +1 -0
  45. package/dist/scripts/2235-02fa6854c8-lite.chunk.js +1 -0
  46. package/dist/scripts/2261-93fd134a56-lite.chunk.js +1 -0
  47. package/dist/scripts/2405-09ab783092-lite.chunk.js +1 -0
  48. package/dist/scripts/2469-4cd6716750-lite.chunk.js +1 -0
  49. package/dist/scripts/268-3513266caf-lite.chunk.js +1 -0
  50. package/dist/scripts/2703-d8211f2db1-lite.chunk.js +2 -0
  51. package/dist/scripts/287-e798bff985-lite.chunk.js +1 -0
  52. package/dist/scripts/3012-f28e1b683b-lite.chunk.js +1 -0
  53. package/dist/scripts/3020-e6ec52d6b9-lite.chunk.js +1 -0
  54. package/dist/scripts/3154-eb045d3ab6-lite.chunk.js +1 -0
  55. package/dist/scripts/316-5680165d6a-lite.chunk.js +1 -0
  56. package/dist/scripts/3170-0135dadbe0-lite.chunk.js +1 -0
  57. package/dist/scripts/3216-9caff8afdd-lite.chunk.js +1 -0
  58. package/dist/scripts/3311-01c48c762e-lite.chunk.js +1 -0
  59. package/dist/scripts/355-3eb0659bd4-lite.chunk.js +1 -0
  60. package/dist/scripts/3645-179c1de58b-lite.chunk.js +2 -0
  61. package/dist/scripts/3654-96999f107e-lite.chunk.js +1 -0
  62. package/dist/scripts/3667-fff988dddb-lite.chunk.js +2 -0
  63. package/dist/scripts/3728-8f767eeedd-lite.chunk.js +1 -0
  64. package/dist/scripts/3836-060f903a23-lite.chunk.js +1 -0
  65. package/dist/scripts/3848-a3b274c11c-lite.chunk.js +1 -0
  66. package/dist/scripts/3849-1690378f9f-lite.chunk.js +1 -0
  67. package/dist/scripts/3966-985e03cb46-lite.chunk.js +1 -0
  68. package/dist/scripts/{4032-01f86c1e49-lite.chunk.js → 4032-ad48f98700-lite.chunk.js} +1 -1
  69. package/dist/scripts/407-6445e9a93d-lite.chunk.js +2 -0
  70. package/dist/scripts/4210-0bc465eb67-lite.chunk.js +1 -0
  71. package/dist/scripts/4393-bb6bbe6eb1-lite.chunk.js +1 -0
  72. package/dist/scripts/4436-b92639529d-lite.chunk.js +1 -0
  73. package/dist/scripts/4441-fc4a723145-lite.chunk.js +2 -0
  74. package/dist/scripts/4537-34124b109e-lite.chunk.js +1 -0
  75. package/dist/scripts/455-eee6a152e3-lite.chunk.js +1 -0
  76. package/dist/scripts/4612-cfc046e6e9-lite.chunk.js +1 -0
  77. package/dist/scripts/4617-d497047b0b-lite.chunk.js +1 -0
  78. package/dist/scripts/4632-32447c54f1-lite.chunk.js +1 -0
  79. package/dist/scripts/{4690-40f41af539-lite.chunk.js → 4690-31d76373a8-lite.chunk.js} +1 -1
  80. package/dist/scripts/{4753-e9cd640ceb-lite.chunk.js → 4753-d8e01a7af9-lite.chunk.js} +1 -1
  81. package/dist/scripts/4942-a76fc1b2e9-lite.chunk.js +2 -0
  82. package/dist/scripts/4956-340c8b5771-lite.chunk.js +1 -0
  83. package/dist/scripts/5041-8e820ed93c-lite.chunk.js +1 -0
  84. package/dist/scripts/5134-5a2efd579d-lite.chunk.js +1 -0
  85. package/dist/scripts/{5143-8ad2cd9a86-lite.chunk.js → 5143-56be0b0492-lite.chunk.js} +1 -1
  86. package/dist/scripts/5177-a87c24b957-lite.chunk.js +2 -0
  87. package/dist/scripts/5268-0639a4858d-lite.chunk.js +2 -0
  88. package/dist/scripts/5271-da40b4f079-lite.chunk.js +1 -1
  89. package/dist/scripts/5306-04f0322aa4-lite.chunk.js +1 -0
  90. package/dist/scripts/5379-5fe1299560-lite.chunk.js +1 -0
  91. package/dist/scripts/5442-b859040432-lite.chunk.js +2 -0
  92. package/dist/scripts/5595-45c7fe484d-lite.chunk.js +1 -0
  93. package/dist/scripts/5622-679fd14f2a-lite.chunk.js +2 -0
  94. package/dist/scripts/5638-083d843d3d-lite.chunk.js +1 -0
  95. package/dist/scripts/{5940-54217d5e0d-lite.chunk.js → 5940-d380295b7d-lite.chunk.js} +1 -1
  96. package/dist/scripts/5965-c4c70d053a-lite.chunk.js +1 -0
  97. package/dist/scripts/5974-a8d8bd2402-lite.chunk.js +1 -0
  98. package/dist/scripts/5986-8f05456911-lite.chunk.js +1 -0
  99. package/dist/scripts/6086-06d5d40e66-lite.chunk.js +2 -0
  100. package/dist/scripts/615-0322d641a3-lite.chunk.js +1 -0
  101. package/dist/scripts/{6274-bd0f8f77cb-lite.chunk.js → 6274-7545674bdd-lite.chunk.js} +1 -1
  102. package/dist/scripts/6330-ff1a098eb1-lite.chunk.js +1 -0
  103. package/dist/scripts/6368-744497853e-lite.chunk.js +1 -0
  104. package/dist/scripts/{6433-8a473c7c44-lite.chunk.js → 6433-fde75b34f2-lite.chunk.js} +1 -1
  105. package/dist/scripts/6450-ccd62009a0-lite.chunk.js +1 -0
  106. package/dist/scripts/6532-5bc872b460-lite.chunk.js +1 -0
  107. package/dist/scripts/6572-c4534d0d35-lite.chunk.js +1 -0
  108. package/dist/scripts/6683-feadf29b0d-lite.chunk.js +2 -0
  109. package/dist/scripts/6725-6fe76436f5-lite.chunk.js +1 -0
  110. package/dist/scripts/6736-7223de888f-lite.chunk.js +2 -0
  111. package/dist/scripts/6801-a957a1b187-lite.chunk.js +1 -0
  112. package/dist/scripts/6823-b2eb2f9837-lite.chunk.js +2 -0
  113. package/dist/scripts/{6891-b2c5f27bce-lite.chunk.js → 6891-8f643cb84b-lite.chunk.js} +1 -1
  114. package/dist/scripts/6896-8b4fc3fd6d-lite.chunk.js +1 -0
  115. package/dist/scripts/6930-84d4717d08-lite.chunk.js +1 -0
  116. package/dist/scripts/7017-dc16719bf3-lite.chunk.js +1 -0
  117. package/dist/scripts/7020-fae30555f8-lite.chunk.js +1 -0
  118. package/dist/scripts/7052-7a62e4f75e-lite.chunk.js +2 -0
  119. package/dist/scripts/{7072-1cf02994dd-lite.chunk.js → 7072-e5581f0660-lite.chunk.js} +2 -2
  120. package/dist/scripts/7115-42bbdbbc62-lite.chunk.js +1 -0
  121. package/dist/scripts/7117-1da2d8e101-lite.chunk.js +1 -0
  122. package/dist/scripts/7119-09592c4b7a-lite.chunk.js +1 -0
  123. package/dist/scripts/714-362014cfec-lite.chunk.js +1 -0
  124. package/dist/scripts/{7167-9668cb85d2-lite.chunk.js → 7167-91d46eb4a3-lite.chunk.js} +1 -1
  125. package/dist/scripts/7178-36185f322a-lite.chunk.js +1 -0
  126. package/dist/scripts/7205-20ace43ff9-lite.chunk.js +1 -0
  127. package/dist/scripts/{7221-f5d0743e30-lite.chunk.js → 7221-d71ae05428-lite.chunk.js} +2 -2
  128. package/dist/scripts/7288-8fca167593-lite.chunk.js +1 -0
  129. package/dist/scripts/{7293-aa9c9eeb72-lite.chunk.js → 7293-9518687443-lite.chunk.js} +1 -1
  130. package/dist/scripts/7351-77e3da68f0-lite.chunk.js +1 -0
  131. package/dist/scripts/7385-6aee15b2de-lite.chunk.js +2 -0
  132. package/dist/scripts/7432-2afa43af27-lite.chunk.js +1 -0
  133. package/dist/scripts/7506-d91786f020-lite.chunk.js +1 -0
  134. package/dist/scripts/754-ec56ea2365-lite.chunk.js +1 -0
  135. package/dist/scripts/{7540-419fef286c-lite.chunk.js → 7540-2694a96451-lite.chunk.js} +1 -1
  136. package/dist/scripts/{7555-e79e8614f1-lite.chunk.js → 7555-3d6fa65b58-lite.chunk.js} +1 -1
  137. package/dist/scripts/763-6cc8e9ba64-lite.chunk.js +1 -0
  138. package/dist/scripts/{7701-791908e1c3-lite.chunk.js → 7679-8bed680cf6-lite.chunk.js} +1 -1
  139. package/dist/scripts/{7703-87cabd69cf-lite.chunk.js → 7703-6db81722e0-lite.chunk.js} +1 -1
  140. package/dist/scripts/7726-b15eceb501-lite.chunk.js +1 -0
  141. package/dist/scripts/{7855-80d224d718-lite.chunk.js → 7855-f51632f802-lite.chunk.js} +1 -1
  142. package/dist/scripts/{5622-9fd84985bd-lite.chunk.js → 7902-40f67c9b7e-lite.chunk.js} +2 -2
  143. package/dist/scripts/8028-b01b8bc879-lite.chunk.js +1 -0
  144. package/dist/scripts/8046-640629c47e-lite.chunk.js +1 -0
  145. package/dist/scripts/{8323-e2892d3bed-lite.chunk.js → 8323-d72038b720-lite.chunk.js} +1 -1
  146. package/dist/scripts/8541-e8a41d5f90-lite.chunk.js +1 -0
  147. package/dist/scripts/8759-d8e5c29a2e-lite.chunk.js +1 -0
  148. package/dist/scripts/8772-0cae662668-lite.chunk.js +1 -0
  149. package/dist/scripts/8834-ed4a58675e-lite.chunk.js +1 -0
  150. package/dist/scripts/{9016-68a0088483-lite.chunk.js → 9016-3aafc7c4a4-lite.chunk.js} +1 -1
  151. package/dist/scripts/9226-ac0d7f7e2b-lite.chunk.js +1 -0
  152. package/dist/scripts/9230-c680de51dd-lite.chunk.js +2 -0
  153. package/dist/scripts/9242-a9f54957c0-lite.chunk.js +1 -0
  154. package/dist/scripts/9254-a56914f3fc-lite.chunk.js +1 -0
  155. package/dist/scripts/9433-255ea943a7-lite.chunk.js +1 -0
  156. package/dist/scripts/{9478-7210139ef4-lite.chunk.js → 9478-d5ff15e95c-lite.chunk.js} +2 -2
  157. package/dist/scripts/9484-adfe8c1235-lite.chunk.js +2 -0
  158. package/dist/scripts/9537-80900593e8-lite.chunk.js +1 -0
  159. package/dist/scripts/{9657-3bd86a7f20-lite.chunk.js → 9657-8fd569479f-lite.chunk.js} +1 -1
  160. package/dist/scripts/9660-bec1db5818-lite.chunk.js +1 -0
  161. package/dist/scripts/9674-2aed0bd452-lite.chunk.js +1 -0
  162. package/dist/scripts/9704-cfcc679915-lite.chunk.js +1 -0
  163. package/dist/scripts/{9719-c890a68331-lite.chunk.js → 9719-32b0388f01-lite.chunk.js} +1 -1
  164. package/dist/scripts/9883-83a8db6194-lite.chunk.js +1 -0
  165. package/dist/scripts/993-83f5f2964b-lite.chunk.js +2 -0
  166. package/dist/scripts/bundle-abc628d833.min.js +2 -0
  167. package/jest.config.js +11 -11
  168. package/package.json +62 -62
  169. package/typings/libs/CVEvents.d.ts +12 -12
  170. package/typings/libs/CVLanguages.d.ts +24 -24
  171. package/typings/libs/cloneDeep.d.ts +4 -4
  172. package/typings/libs/cookiesjs.d.ts +25 -25
  173. package/typings/libs/draft-convert.d.ts +3 -3
  174. package/typings/libs/google-api.d.ts +93 -93
  175. package/typings/libs/intersection-observer.d.ts +82 -82
  176. package/typings/libs/microsoft-teams.d.ts +2 -2
  177. package/typings/libs/react-table-config.d.ts +138 -138
  178. package/typings/libs/trackjs.d.ts +2 -2
  179. package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
  180. package/typings/utils/imports.d.ts +13 -13
  181. package/dist/css/8364-lite-8c45fd1bcc.chunk.css +0 -32
  182. package/dist/css/9871-lite-71a39d9bb3.chunk.css +0 -33
  183. package/dist/scripts/1285-7e8f858b90-lite.chunk.js +0 -1
  184. package/dist/scripts/1316-6f10b36512-lite.chunk.js +0 -1
  185. package/dist/scripts/1461-f7e964ae21-lite.chunk.js +0 -1
  186. package/dist/scripts/151-5268c8b0b2-lite.chunk.js +0 -1
  187. package/dist/scripts/1514-c423b48155-lite.chunk.js +0 -1
  188. package/dist/scripts/1517-dcfff93ae3-lite.chunk.js +0 -1
  189. package/dist/scripts/1518-0ea2791c37-lite.chunk.js +0 -1
  190. package/dist/scripts/1519-bae52ef1b1-lite.chunk.js +0 -1
  191. package/dist/scripts/1688-ca1a2a9f04-lite.chunk.js +0 -1
  192. package/dist/scripts/1820-204b28ad32-lite.chunk.js +0 -1
  193. package/dist/scripts/1919-7889c92284-lite.chunk.js +0 -1
  194. package/dist/scripts/1944-b156ae061e-lite.chunk.js +0 -1
  195. package/dist/scripts/209-f1187b4df2-lite.chunk.js +0 -1
  196. package/dist/scripts/2118-7741e69919-lite.chunk.js +0 -2
  197. package/dist/scripts/2188-0278da007c-lite.chunk.js +0 -1
  198. package/dist/scripts/2235-4a03aae86f-lite.chunk.js +0 -1
  199. package/dist/scripts/2251-519ee9915e-lite.chunk.js +0 -1
  200. package/dist/scripts/2469-1c69c69857-lite.chunk.js +0 -1
  201. package/dist/scripts/2703-d8a1c8e6f5-lite.chunk.js +0 -2
  202. package/dist/scripts/287-c53e62a45c-lite.chunk.js +0 -1
  203. package/dist/scripts/3012-cc96ee5265-lite.chunk.js +0 -1
  204. package/dist/scripts/3020-6f39be646f-lite.chunk.js +0 -1
  205. package/dist/scripts/3154-539a352006-lite.chunk.js +0 -1
  206. package/dist/scripts/3216-d62de73736-lite.chunk.js +0 -1
  207. package/dist/scripts/3311-808538c9c6-lite.chunk.js +0 -1
  208. package/dist/scripts/3401-c7a150f32d-lite.chunk.js +0 -1
  209. package/dist/scripts/355-59bd6e899f-lite.chunk.js +0 -1
  210. package/dist/scripts/3645-d1313ec6dc-lite.chunk.js +0 -2
  211. package/dist/scripts/3654-0961346057-lite.chunk.js +0 -1
  212. package/dist/scripts/3667-6ce2b5b14a-lite.chunk.js +0 -2
  213. package/dist/scripts/3728-51b81bfa83-lite.chunk.js +0 -1
  214. package/dist/scripts/3836-5487914e10-lite.chunk.js +0 -1
  215. package/dist/scripts/3848-b85b763432-lite.chunk.js +0 -1
  216. package/dist/scripts/3849-965a1a6927-lite.chunk.js +0 -1
  217. package/dist/scripts/3966-80e9cd7a87-lite.chunk.js +0 -1
  218. package/dist/scripts/407-1e3ffc6e32-lite.chunk.js +0 -2
  219. package/dist/scripts/414-50eeedf502-lite.chunk.js +0 -1
  220. package/dist/scripts/4210-66c5d14532-lite.chunk.js +0 -1
  221. package/dist/scripts/4393-56a2324cff-lite.chunk.js +0 -1
  222. package/dist/scripts/4436-2615b1ce10-lite.chunk.js +0 -1
  223. package/dist/scripts/4441-372ecffa04-lite.chunk.js +0 -2
  224. package/dist/scripts/4463-49b8d27dbb-lite.chunk.js +0 -1
  225. package/dist/scripts/4537-6383a3ea11-lite.chunk.js +0 -1
  226. package/dist/scripts/4546-050a6f180a-lite.chunk.js +0 -1
  227. package/dist/scripts/4612-60a22d0dd6-lite.chunk.js +0 -1
  228. package/dist/scripts/4617-940157b232-lite.chunk.js +0 -1
  229. package/dist/scripts/4632-74c440dce4-lite.chunk.js +0 -1
  230. package/dist/scripts/4676-9295ffc870-lite.chunk.js +0 -2
  231. package/dist/scripts/4754-fe1cbf4ea4-lite.chunk.js +0 -1
  232. package/dist/scripts/4942-8b3935e911-lite.chunk.js +0 -2
  233. package/dist/scripts/4956-b0840f1cfa-lite.chunk.js +0 -1
  234. package/dist/scripts/4972-4eb7102934-lite.chunk.js +0 -1
  235. package/dist/scripts/4973-5df11dd4e8-lite.chunk.js +0 -1
  236. package/dist/scripts/5041-2af2a2541f-lite.chunk.js +0 -1
  237. package/dist/scripts/5134-8e129a0a0b-lite.chunk.js +0 -1
  238. package/dist/scripts/5177-ea01e21af3-lite.chunk.js +0 -2
  239. package/dist/scripts/5268-6c93736375-lite.chunk.js +0 -2
  240. package/dist/scripts/5306-b25542939f-lite.chunk.js +0 -1
  241. package/dist/scripts/5379-95b5e191fe-lite.chunk.js +0 -1
  242. package/dist/scripts/5442-82e8147edc-lite.chunk.js +0 -2
  243. package/dist/scripts/5595-ed6e8d9ca0-lite.chunk.js +0 -1
  244. package/dist/scripts/5965-55b2273c41-lite.chunk.js +0 -1
  245. package/dist/scripts/5974-8af9af8fae-lite.chunk.js +0 -1
  246. package/dist/scripts/5986-6f6b2bdf89-lite.chunk.js +0 -1
  247. package/dist/scripts/6086-642813efbe-lite.chunk.js +0 -2
  248. package/dist/scripts/6117-b18657a9d2-lite.chunk.js +0 -1
  249. package/dist/scripts/615-20af1b2df5-lite.chunk.js +0 -1
  250. package/dist/scripts/6330-34349d1457-lite.chunk.js +0 -1
  251. package/dist/scripts/6368-6e322edf00-lite.chunk.js +0 -1
  252. package/dist/scripts/6450-0bde4cef33-lite.chunk.js +0 -1
  253. package/dist/scripts/6532-19e258fc3e-lite.chunk.js +0 -1
  254. package/dist/scripts/6572-02f3301356-lite.chunk.js +0 -1
  255. package/dist/scripts/6683-6a53507e03-lite.chunk.js +0 -2
  256. package/dist/scripts/6801-30961910e4-lite.chunk.js +0 -1
  257. package/dist/scripts/6823-ca63f0d5eb-lite.chunk.js +0 -2
  258. package/dist/scripts/6896-e0f3a08bf2-lite.chunk.js +0 -2
  259. package/dist/scripts/6930-9f739d475b-lite.chunk.js +0 -1
  260. package/dist/scripts/6998-43af06b2d9-lite.chunk.js +0 -1
  261. package/dist/scripts/7017-5eb39ba9d6-lite.chunk.js +0 -2
  262. package/dist/scripts/7052-7ba7299ff2-lite.chunk.js +0 -2
  263. package/dist/scripts/7115-c73692fe3a-lite.chunk.js +0 -1
  264. package/dist/scripts/7117-a7ffb9474e-lite.chunk.js +0 -1
  265. package/dist/scripts/714-02e02b6b62-lite.chunk.js +0 -1
  266. package/dist/scripts/7178-d9ec32d7d3-lite.chunk.js +0 -1
  267. package/dist/scripts/7205-1852c97c81-lite.chunk.js +0 -1
  268. package/dist/scripts/7288-3d3041485c-lite.chunk.js +0 -1
  269. package/dist/scripts/7351-dce910a8f8-lite.chunk.js +0 -1
  270. package/dist/scripts/7385-f7e1626f26-lite.chunk.js +0 -1
  271. package/dist/scripts/7432-d41b2e0039-lite.chunk.js +0 -1
  272. package/dist/scripts/7506-75116824b9-lite.chunk.js +0 -1
  273. package/dist/scripts/754-2d58ce124d-lite.chunk.js +0 -1
  274. package/dist/scripts/763-a6b6d996a9-lite.chunk.js +0 -1
  275. package/dist/scripts/8046-82f07ecfc6-lite.chunk.js +0 -1
  276. package/dist/scripts/8364-3f8f3ebbfd-lite.chunk.js +0 -1
  277. package/dist/scripts/8541-e93ccc1e65-lite.chunk.js +0 -1
  278. package/dist/scripts/8759-46b3f7b560-lite.chunk.js +0 -1
  279. package/dist/scripts/8763-8fc868e00e-lite.chunk.js +0 -1
  280. package/dist/scripts/8834-bb079c32a4-lite.chunk.js +0 -1
  281. package/dist/scripts/8873-514feb8faa-lite.chunk.js +0 -1
  282. package/dist/scripts/9226-81363cd855-lite.chunk.js +0 -1
  283. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js +0 -2
  284. package/dist/scripts/9242-02b00e644d-lite.chunk.js +0 -1
  285. package/dist/scripts/9484-2a3aa518fd-lite.chunk.js +0 -2
  286. package/dist/scripts/9516-7437a5a60e-lite.chunk.js +0 -1
  287. package/dist/scripts/9674-f5e66f8c06-lite.chunk.js +0 -1
  288. package/dist/scripts/9704-ee574224f3-lite.chunk.js +0 -1
  289. package/dist/scripts/9871-2573a8bff1-lite.chunk.js +0 -1
  290. package/dist/scripts/993-51d56e4686-lite.chunk.js +0 -2
  291. package/dist/scripts/bundle-1db2700368.min.js +0 -2
  292. /package/dist/css/{6117-lite-9f291e9fd0.chunk.css → 2405-lite-9f291e9fd0.chunk.css} +0 -0
  293. /package/dist/css/{1820-lite-983fc2b64e.chunk.css → 316-lite-983fc2b64e.chunk.css} +0 -0
  294. /package/dist/css/{4463-lite-b9b1686d14.chunk.css → 5638-lite-b9b1686d14.chunk.css} +0 -0
  295. /package/dist/css/{414-lite-db1dbcbd39.chunk.css → 6725-lite-db1dbcbd39.chunk.css} +0 -0
  296. /package/dist/css/{8763-lite-db1dbcbd39.chunk.css → 8772-lite-db1dbcbd39.chunk.css} +0 -0
  297. /package/dist/css/{209-lite-6554428c5a.chunk.css → 9537-lite-6554428c5a.chunk.css} +0 -0
  298. /package/dist/css/{4546-lite-3d08e5e8c2.chunk.css → 9660-lite-3d08e5e8c2.chunk.css} +0 -0
  299. /package/dist/scripts/{1201-c93ac8a29a-lite.chunk.js → 1201-329e609b97-lite.chunk.js} +0 -0
  300. /package/dist/scripts/{1672-9ae25f79a6-lite.chunk.js.LICENSE.txt → 1672-477ad27e45-lite.chunk.js.LICENSE.txt} +0 -0
  301. /package/dist/scripts/{1725-0e284a32f3-lite.chunk.js → 1725-e5ea09eb1e-lite.chunk.js} +0 -0
  302. /package/dist/scripts/{1891-dd253c3378-lite.chunk.js → 1891-14c0a7067f-lite.chunk.js} +0 -0
  303. /package/dist/scripts/{1913-fef63b944b-lite.chunk.js → 1913-6117995be8-lite.chunk.js} +0 -0
  304. /package/dist/scripts/{2118-7741e69919-lite.chunk.js.LICENSE.txt → 2118-4bee787686-lite.chunk.js.LICENSE.txt} +0 -0
  305. /package/dist/scripts/{2208-1799924a6a-lite.chunk.js → 2208-8752ddeb01-lite.chunk.js} +0 -0
  306. /package/dist/scripts/{2452-f96e548d17-lite.chunk.js → 2452-446607a894-lite.chunk.js} +0 -0
  307. /package/dist/scripts/{2651-1323807150-lite.chunk.js → 2651-a773e78cbb-lite.chunk.js} +0 -0
  308. /package/dist/scripts/{2703-d8a1c8e6f5-lite.chunk.js.LICENSE.txt → 2703-d8211f2db1-lite.chunk.js.LICENSE.txt} +0 -0
  309. /package/dist/scripts/{3645-d1313ec6dc-lite.chunk.js.LICENSE.txt → 3645-179c1de58b-lite.chunk.js.LICENSE.txt} +0 -0
  310. /package/dist/scripts/{3667-6ce2b5b14a-lite.chunk.js.LICENSE.txt → 3667-fff988dddb-lite.chunk.js.LICENSE.txt} +0 -0
  311. /package/dist/scripts/{407-1e3ffc6e32-lite.chunk.js.LICENSE.txt → 407-6445e9a93d-lite.chunk.js.LICENSE.txt} +0 -0
  312. /package/dist/scripts/{4182-6869dfda31-lite.chunk.js → 4182-86ebd7cc85-lite.chunk.js} +0 -0
  313. /package/dist/scripts/{4441-372ecffa04-lite.chunk.js.LICENSE.txt → 4441-fc4a723145-lite.chunk.js.LICENSE.txt} +0 -0
  314. /package/dist/scripts/{4728-8837108457-lite.chunk.js → 4728-9ff8ae73c1-lite.chunk.js} +0 -0
  315. /package/dist/scripts/{4676-9295ffc870-lite.chunk.js.LICENSE.txt → 4942-a76fc1b2e9-lite.chunk.js.LICENSE.txt} +0 -0
  316. /package/dist/scripts/{4942-8b3935e911-lite.chunk.js.LICENSE.txt → 5177-a87c24b957-lite.chunk.js.LICENSE.txt} +0 -0
  317. /package/dist/scripts/{5177-ea01e21af3-lite.chunk.js.LICENSE.txt → 5268-0639a4858d-lite.chunk.js.LICENSE.txt} +0 -0
  318. /package/dist/scripts/{5268-6c93736375-lite.chunk.js.LICENSE.txt → 5442-b859040432-lite.chunk.js.LICENSE.txt} +0 -0
  319. /package/dist/scripts/{5606-68f1afd060-lite.chunk.js → 5606-adb8a4564d-lite.chunk.js} +0 -0
  320. /package/dist/scripts/{5442-82e8147edc-lite.chunk.js.LICENSE.txt → 5622-679fd14f2a-lite.chunk.js.LICENSE.txt} +0 -0
  321. /package/dist/scripts/{5877-1dc9ca4f2d-lite.chunk.js → 5877-855b112687-lite.chunk.js} +0 -0
  322. /package/dist/scripts/{5622-9fd84985bd-lite.chunk.js.LICENSE.txt → 6086-06d5d40e66-lite.chunk.js.LICENSE.txt} +0 -0
  323. /package/dist/scripts/{6290-b8e7be07c0-lite.chunk.js → 6290-9cfcecf418-lite.chunk.js} +0 -0
  324. /package/dist/scripts/{6086-642813efbe-lite.chunk.js.LICENSE.txt → 6433-fde75b34f2-lite.chunk.js.LICENSE.txt} +0 -0
  325. /package/dist/scripts/{6604-d331808398-lite.chunk.js → 6604-19f0427fcc-lite.chunk.js} +0 -0
  326. /package/dist/scripts/{6433-8a473c7c44-lite.chunk.js.LICENSE.txt → 6683-feadf29b0d-lite.chunk.js.LICENSE.txt} +0 -0
  327. /package/dist/scripts/{6683-6a53507e03-lite.chunk.js.LICENSE.txt → 6736-7223de888f-lite.chunk.js.LICENSE.txt} +0 -0
  328. /package/dist/scripts/{6746-a32d22602e-lite.chunk.js → 6746-85bf67464e-lite.chunk.js} +0 -0
  329. /package/dist/scripts/{6823-ca63f0d5eb-lite.chunk.js.LICENSE.txt → 6823-b2eb2f9837-lite.chunk.js.LICENSE.txt} +0 -0
  330. /package/dist/scripts/{689-165a5a700c-lite.chunk.js → 689-cfa18cb472-lite.chunk.js} +0 -0
  331. /package/dist/scripts/{6896-e0f3a08bf2-lite.chunk.js.LICENSE.txt → 7052-7a62e4f75e-lite.chunk.js.LICENSE.txt} +0 -0
  332. /package/dist/scripts/{7017-5eb39ba9d6-lite.chunk.js.LICENSE.txt → 7072-e5581f0660-lite.chunk.js.LICENSE.txt} +0 -0
  333. /package/dist/scripts/{7052-7ba7299ff2-lite.chunk.js.LICENSE.txt → 7221-d71ae05428-lite.chunk.js.LICENSE.txt} +0 -0
  334. /package/dist/scripts/{7072-1cf02994dd-lite.chunk.js.LICENSE.txt → 7385-6aee15b2de-lite.chunk.js.LICENSE.txt} +0 -0
  335. /package/dist/scripts/{7818-a9ab33bdd4-lite.chunk.js → 7818-c81c2d60b9-lite.chunk.js} +0 -0
  336. /package/dist/scripts/{7221-f5d0743e30-lite.chunk.js.LICENSE.txt → 7902-40f67c9b7e-lite.chunk.js.LICENSE.txt} +0 -0
  337. /package/dist/scripts/{8323-e2892d3bed-lite.chunk.js.LICENSE.txt → 8323-d72038b720-lite.chunk.js.LICENSE.txt} +0 -0
  338. /package/dist/scripts/{8469-c872f52295-lite.chunk.js → 8469-84f9189f03-lite.chunk.js} +0 -0
  339. /package/dist/scripts/{8982-267320e287-lite.chunk.js → 8982-12ad6a9e9b-lite.chunk.js} +0 -0
  340. /package/dist/scripts/{9016-68a0088483-lite.chunk.js.LICENSE.txt → 9016-3aafc7c4a4-lite.chunk.js.LICENSE.txt} +0 -0
  341. /package/dist/scripts/{9133-d324adda28-lite.chunk.js → 9133-43e40d927c-lite.chunk.js} +0 -0
  342. /package/dist/scripts/{9230-b5f75f4b25-lite.chunk.js.LICENSE.txt → 9230-c680de51dd-lite.chunk.js.LICENSE.txt} +0 -0
  343. /package/dist/scripts/{9478-7210139ef4-lite.chunk.js.LICENSE.txt → 9478-d5ff15e95c-lite.chunk.js.LICENSE.txt} +0 -0
  344. /package/dist/scripts/{9484-2a3aa518fd-lite.chunk.js.LICENSE.txt → 9484-adfe8c1235-lite.chunk.js.LICENSE.txt} +0 -0
  345. /package/dist/scripts/{9719-c890a68331-lite.chunk.js.LICENSE.txt → 9719-32b0388f01-lite.chunk.js.LICENSE.txt} +0 -0
  346. /package/dist/scripts/{993-51d56e4686-lite.chunk.js.LICENSE.txt → 993-83f5f2964b-lite.chunk.js.LICENSE.txt} +0 -0
  347. /package/dist/scripts/{bundle-1db2700368.min.js.LICENSE.txt → bundle-abc628d833.min.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4972],{29024:(e,t,n)=>{n.d(t,{k:()=>h});var r=n(32735),a=n(78276),o=n(5465),i=n(72188),l=n(7733),c=n(54610),s=n(4594),u=n(68626),m=n(9085),d=n(67453),p=n(31908);const f={thumbnailFallbackSvg:"D4JFs",posterFallbackSvg:"bjUWl",coverFallbackSvg:"kdLpt"};var v="rounded overflow-hidden";function h(e){var t=r.useCallback((function(t){var n;t&&e.fixedHeight&&(t.style.width="".concat(t.offsetHeight*(n=e.object,p.M.isVideoType(n)?16/9:n.typeId===s.E.Playlist?1:n.typeId===s.E.Series?9/16:void 0),"px"))}),[]),n={size:c.h2.Small},h=function(e){var t=d.j.getDisplayImageFromObject(e);if(p.M.isVideoType(e))return{image:t,imageType:c.__.Thumbnails,imageClassName:v,imageFallbackComponent:r.createElement(o.oy,{type:o.mS.Video})};switch(e.typeId){case s.E.Series:return{image:t,imageType:c.__.TallPosters,imageClassName:v,imageFallbackComponent:r.createElement(o.oy,{type:o.mS.Series,svgContainerClassName:f.posterFallbackSvg})};case s.E.Playlist:return{image:t,imageType:c.__.Covers,imageClassName:(null==t?void 0:t.url)?v:"".concat(v," ").concat((0,m.x)(e.name,l.o)),imageFallbackComponent:r.createElement(o.oy,{type:o.mS.Playlist,svgContainerClassName:(null==t?void 0:t.url)?f.coverFallbackSvg:"d-none",extraClasses:!(null==t?void 0:t.url)&&"bg-transparent"})}}}(e.object),y=h.image,g=h.imageType,b=h.imageClassName,C=h.imageFallbackComponent,S=p.M.isVideoType(e.object)&&!!e.showVideoMetadata;return r.createElement("div",{className:"d-flex align-items-center justify-content-center w-100 h-100"},r.createElement("div",{ref:t,className:e.fixedHeight?"h-100":"w-100"},S&&r.createElement(i.u,{video:e.object,imageOptions:n,textPosition:u.z.Independent,type:"cosmetic",appLink:e.appLink,analyticsOptions:{location:e.locationContext},hideDuration:!0,hideMask:!0,size:"sm"}),!S&&r.createElement(a.Z,{data:null==y?void 0:y.url,imageType:g,imageOptions:n,appLink:e.appLink,className:b},C)))}},95834:(e,t,n)=>{n.d(t,{J:()=>r});var r={table:"striped-list no-full-width pb-3",header:"fw-semibold pb-1",headerCell:"py-2 ps-2 text-nowrap",row:"striped-row rounded",cell:"d-flex align-items-center p-2"}},31754:(e,t,n)=>{n.d(t,{x:()=>l});var r=n(82602),a=n(75896),o=n(89682),i=n(11576),l={groupByDateShared:function(e){var t=a.m.groupBy(e,"dateShared");return Object.keys(t).sort().reverse().reduce((function(e,n){var a=(0,r.WU)(n);return e[a]||(e[a]=[]),e[a]=e[a].concat(t[n]),e}),{})},mapActivityStatusToCheckMarkStatus:function(e){switch(e){case i.T.Complete:return o.h.Complete;case i.T.Incomplete:return o.h.Incomplete;case i.T.None:return o.h.None}},mapCheckMarkStatusToActivityStatus:function(e){switch(e){case o.h.Complete:return i.T.Complete;case o.h.Incomplete:return i.T.Incomplete;case o.h.None:return i.T.None}}}},71020:(e,t,n)=>{n.d(t,{_:()=>u});var r=n(32735),a=n(80247),o=n(10288),i=n(83914),l=n(35223);const c={container:"VwD1b",spinner:"eJ85e"};function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t,n,u=(t=o.YD(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=u[0],d=u[1];return r.useEffect((function(){var t;e.fetchOnScroll&&d&&!e.isFetching&&(null===(t=e.fetchNext)||void 0===t||t.call(e,e.nextCursor))}),[d,e.isFetching]),r.createElement("div",{className:"p-3 text-center ".concat(c.container),ref:m},e.isFetching?r.createElement(a.Z,{as:"span",animation:"border",role:"status",className:c.spinner}):r.createElement(i.x,{svgName:l.vn.ChevronDown,className:"svg-container cursor-pointer",size:i.S.Large,onClick:function(){var t;return null===(t=e.fetchNext)||void 0===t?void 0:t.call(e,e.nextCursor)}}))}u.defaultProps={fetchOnScroll:!1}},38502:(e,t,n)=>{n.d(t,{r:()=>s});var r=n(32735),a=n(49985),o=n(36848),i=n(76246),l=n(11607),c=n(87432);function s(e){var t;return r.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(c.Z.pillTabSelector)},e.tabs.map((function(e){return r.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r.createElement(o.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(c.Z.pillItem)},e.name,"number"==typeof e.count&&r.createElement("div",{className:"ps-2"},r.createElement(i.C,{type:i.g.Count,data:e.count}))):r.createElement(l.L,{className:"".concat(c.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&a.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&r.createElement("div",{className:"ps-2"},r.createElement(i.C,{type:i.g.Count,data:e.count}))))}))))}},60115:(e,t,n)=>{n.d(t,{K:()=>s});var r=n(32735),a=n(50242),o=n(79014),i=400,l=n(45719);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n,s,u,m){var d,p,f,v,h=(d=(0,r.useState)(0),p=2,function(e){if(Array.isArray(e))return e}(d)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(d,p)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(d,p)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=h[0],g=h[1],b=t,C=(0,l.P)((function(t){if(!e)return null;var n=e(t);return n?n.key:null}),s,u);return f={fetchNextPage:function(){if(t&&e&&C)return g((function(e){return e+1})),b(C.nextCursor)},hasMore:!!(null==C?void 0:C.nextCursor),isFetching:null==C?void 0:C.isFetching,scrollContainer:m},v=function(){if(!f.isFetching){if(f.scrollContainer){var e=f.scrollContainer;if(e.getBoundingClientRect().height+e.scrollTop<e.scrollHeight-i)return}else if(window.innerHeight+document.documentElement.scrollTop<document.documentElement.scrollHeight-i)return;f.fetchNextPage()}},(0,r.useEffect)((function(){var e=o.q.throttle(v,200),t=f.scrollContainer||window;return f.hasMore&&t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}),[f.hasMore,f.fetchNextPage,f.scrollContainer]),(0,r.useEffect)((function(){C&&C.shouldInitialFetch&&t&&(b(),g((function(e){return e+1})))}),[null==C?void 0:C.shouldInitialFetch,t]),(0,r.useEffect)((function(){var e,t;if((null==C?void 0:C.statusCode)&&o.q.isFunction(n)){var r=+(null===(t=null===(e=C.statusCode)||void 0===e?void 0:e.toString())||void 0===t?void 0:t.substr(0,1));r!==a.k.ClientError&&r!==a.k.ServerError||n(y,C.statusCode)}}),[null==C?void 0:C.statusCode]),{items:null==C?void 0:C.items,hasMore:!!(null==C?void 0:C.nextCursor),nextCursor:null==C?void 0:C.nextCursor,isFetching:null==C?void 0:C.isFetching,totalItems:null==C?void 0:C.totalItems,hasFirstPageCompleted:null==C?void 0:C.hasFirstPageCompleted}}},2523:(e,t,n)=>{n.d(t,{w:()=>p});var r=n(32735),a=n(23481),o=n(81886),i=n(38502),l=n(75795),c=n(14070),s=n(97291),u=a.T.encloseNamespace("share.sharesHeader"),m={application:s.O.MY_SHARES,action:c.e.MyShares.SHARED_BY_ME},d={application:s.O.MY_SHARES,action:c.e.MyShares.SHARED_WITH_ME};function p(){return r.createElement("div",{className:"pb-3"},r.createElement("h1",{className:"h2 mb-3"},u("shares")),r.createElement(i.r,{tabs:(t=null===(e=l.O.getCurrentRoute())||void 0===e?void 0:e.appLink,[{name:u("sharedByMe"),onSelect:function(){return o.Q.C$.trigger(m)},active:(null==t?void 0:t.action)===m.action},{name:u("sharedWithMe"),onSelect:function(){return o.Q.C$.trigger(d)},active:(null==t?void 0:t.action)===d.action}])}));var e,t}},87432:(e,t,n)=>{n.d(t,{Z:()=>r});const r={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}},82602:(e,t,n)=>{n.d(t,{WU:()=>s});var r=["second","minute","hour","day","week","month","year"],a=["秒","分钟","小时","天","周","个月","年"],o={},i=function(e,t){o[e]=t},l=[60,60,24,7,365/7/12,12];function c(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}var s=function(e,t,n){var r=function(e,t){return(+(t?c(t):new Date)-+c(e))/1e3}(e,n&&n.relativeDate);return function(e,t){for(var n=e<0?1:0,r=e=Math.abs(e),a=0;e>=l[a]&&a<l.length;a++)e/=l[a];return(e=Math.floor(e))>(0==(a*=2)?9:1)&&(a+=1),t(e,a,r)[n].replace("%s",e.toString())}(r,function(e){return o[e]||o.en_US}(t))};i("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=r[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),i("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=a[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4973],{71020:(e,t,n)=>{n.d(t,{_:()=>u});var a=n(32735),i=n(80247),r=n(10288),s=n(83914),o=n(35223);const l={container:"VwD1b",spinner:"eJ85e"};function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function u(e){var t,n,u=(t=r.YD(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],p=u[1];return a.useEffect((function(){var t;e.fetchOnScroll&&p&&!e.isFetching&&(null===(t=e.fetchNext)||void 0===t||t.call(e,e.nextCursor))}),[p,e.isFetching]),a.createElement("div",{className:"p-3 text-center ".concat(l.container),ref:d},e.isFetching?a.createElement(i.Z,{as:"span",animation:"border",role:"status",className:l.spinner}):a.createElement(s.x,{svgName:o.vn.ChevronDown,className:"svg-container cursor-pointer",size:s.S.Large,onClick:function(){var t;return null===(t=e.fetchNext)||void 0===t?void 0:t.call(e,e.nextCursor)}}))}u.defaultProps={fetchOnScroll:!1}},16930:(e,t,n)=>{n.d(t,{W:()=>c,f:()=>l});var a=n(32735),i=n(83914),r=n(35223);const s="VSAPU",o="kgeXh";var l;!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(l||(l={}));var c=a.memo((function(e){var t,n,c,u=e.direction===l.Left,d=u?r.vn.ChevronLeft:r.vn.ChevronRight;return e.hide?a.createElement(a.Fragment,null):a.createElement("div",{className:"_ejId",style:"videos"===(null===(n=e.state)||void 0===n?void 0:n.contents)?{paddingBottom:56.25/(null===(c=e.state)||void 0===c?void 0:c.viewableItems)+"%"}:{height:"100%"}},e.useGradientBackdrop&&a.createElement("div",{className:u?"".concat("Pt3nx"," ").concat(e.leftGradientClassName):"".concat("ZuAif"," ").concat(e.rightGradientClassName)}),!e.hideExtendedClickableArea&&a.createElement("div",{role:"button",onClick:e.onClick,className:"".concat("AtsWP"," ").concat(u?s:o)}),a.createElement("div",{role:"button",className:"".concat((t="BVcIS",t+=u?" ".concat(s," ").concat(e.leftButtonClassName):" ".concat(o," ").concat(e.rightButtonClassName))," ").concat("gAsE9"," ").concat(e.className||""),onClick:e.onClick},e.hoverText&&a.createElement("span",{className:"ps-3 pe-2 ".concat("APA36")},e.hoverText),a.createElement(i.x,{svgName:d,size:i.S.Medium,className:"svg-container d-inline-block ".concat("Ev4hr")})))}))},60115:(e,t,n)=>{n.d(t,{K:()=>c});var a=n(32735),i=n(50242),r=n(79014),s=400,o=n(45719);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function c(e,t,n,c,u,d){var p,m,v,g,y=(p=(0,a.useState)(0),m=2,function(e){if(Array.isArray(e))return e}(p)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(p,m)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(p,m)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=y[0],h=y[1],b=t,E=(0,o.P)((function(t){if(!e)return null;var n=e(t);return n?n.key:null}),c,u);return v={fetchNextPage:function(){if(t&&e&&E)return h((function(e){return e+1})),b(E.nextCursor)},hasMore:!!(null==E?void 0:E.nextCursor),isFetching:null==E?void 0:E.isFetching,scrollContainer:d},g=function(){if(!v.isFetching){if(v.scrollContainer){var e=v.scrollContainer;if(e.getBoundingClientRect().height+e.scrollTop<e.scrollHeight-s)return}else if(window.innerHeight+document.documentElement.scrollTop<document.documentElement.scrollHeight-s)return;v.fetchNextPage()}},(0,a.useEffect)((function(){var e=r.q.throttle(g,200),t=v.scrollContainer||window;return v.hasMore&&t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}),[v.hasMore,v.fetchNextPage,v.scrollContainer]),(0,a.useEffect)((function(){E&&E.shouldInitialFetch&&t&&(b(),h((function(e){return e+1})))}),[null==E?void 0:E.shouldInitialFetch,t]),(0,a.useEffect)((function(){var e,t;if((null==E?void 0:E.statusCode)&&r.q.isFunction(n)){var a=+(null===(t=null===(e=E.statusCode)||void 0===e?void 0:e.toString())||void 0===t?void 0:t.substr(0,1));a!==i.k.ClientError&&a!==i.k.ServerError||n(f,E.statusCode)}}),[null==E?void 0:E.statusCode]),{items:null==E?void 0:E.items,hasMore:!!(null==E?void 0:E.nextCursor),nextCursor:null==E?void 0:E.nextCursor,isFetching:null==E?void 0:E.isFetching,totalItems:null==E?void 0:E.totalItems,hasFirstPageCompleted:null==E?void 0:E.hasFirstPageCompleted}}},57748:(e,t,n)=>{n.r(t),n.d(t,{SearchResultsView2:()=>dt,namespace:()=>ct});var a=n(32735),i=n(23481),r=n(65858),s=n(68050),o=n(51365),l=n(79967),c=n(31908),u=n(69111),d=n(2192);function p(e){var t,n,i,s=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),o=Object.assign(Object.assign({location:r.LZ.ClassificationListItem},e.analyticsOptions),{actionType:r.Vw.Click,entity:r.py.Company,descriptor:r._S.Cover});return a.createElement(d.Q,Object.assign({},e,{analyticsData:s,analyticsOptions:o,coverUrl:null===(i=e.data.logo)||void 0===i?void 0:i.url}))}function m(e){return a.createElement(u.Z,{sm:6,md:e.useLargeStyle?6:4,lg:e.useLargeStyle?4:3},a.createElement("div",{className:"position-relative px-1 mb-2"},a.createElement(p,{data:e.item,getChildAppLink:e.appLinks.getCompanyAppLink,getChildAppLinkOptions:e.appLinks.getCompanyAppLinkOptions,analyticsData:{itemIndex:e.itemIndex,search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:0},isLarge:e.useLargeStyle})))}var v=n(97395),g=n(36848),y=n(83914),f=n(83345),h=n(55577),b=n(12754),E=n(35223);const k="MrLWn";function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var L="search.exchangeVideoGroup",x={query:!0,rating:!0,hasResources:!0,hasSubtitles:!0,productionYear:!0,isHd:!0,duration:!0};function S(e){var t=e.item.showCount>=3?3:e.item.showCount,n=e.products.products.data.find((function(e){return e.id===b.x.Exchange})).url,i=Object.entries(e.queryParams).reduce((function(e,t){var n,a,i=(a=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(n,a)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(n,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],s=i[1];return x[r]&&(e[r]=s),e}),{}),r=v._.urlBuilder(v._.safeUrlConcat(n,"/exchange/search"),i);return a.createElement("div",{className:"border-top border-bottom pt-3 mt-2 pb-1 mb-3"},a.createElement("a",{href:r,target:"_blank"},a.createElement("h2",{className:"h4"},a.createElement(f.x,{namespace:L,phrase:"heading"})," ",a.createElement(y.x,{svgName:E.vn.NewWindow}))),a.createElement("p",null,a.createElement(f.x,{namespace:L,phrase:"message"})," ",a.createElement(g.F,{appLink:e.appLinks.searchSettings,className:"text-info"},a.createElement(f.x,{namespace:L,phrase:"searchSettings"})),"."),a.createElement("div",{className:"position-relative ".concat(k)},e.item.videos.slice(0,t).map((function(t,n){return a.createElement(h.m,{key:n,video:t,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.queryParams.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:e.pagePositionIndex}})}))),e.item.videos.length>t&&a.createElement("div",{className:"text-center py-2"},a.createElement("a",{className:"text-muted",href:r,target:"_blank"},a.createElement(f.x,{namespace:L,phrase:"seeMore"}))))}var O=n(3626);function C(e){return a.createElement("div",{className:"pb-3"},a.createElement(O.J,{video:e.item,presentationAudiences:e.audiences,videoAppLink:e.appLinks.getVideoAppLink(e.item),seriesAppLink:e.appLinks.getSeriesAppLink(e.item.series),setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},hideInteractiveBadge:!0,yearGroups:e.yearGroups}))}var P=n(98981),j=n(7733);const I={videoList:"eEZEe"};var N="search.playlistWithVideos";function F(e){var t,n=(t=(0,l.k)()).xl||t.xxl?3:2,i=e.playlist.videos.data.slice(0,n),o={actionType:r.Vw.Click,entity:r.py.Playlist,location:r.LZ.PlaylistWithVideos},c=Object.assign(Object.assign({},e.analyticsData),{id:e.playlist.id,name:e.playlist.name});return a.createElement("div",{className:"ps-2 py-2"},a.createElement(s.Z,{className:"g-0 border border-light rounded-3"},a.createElement(u.Z,{xs:4,lg:3,className:"pe-3"},a.createElement(P.tN,{appLink:e.playlistAppLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},o),{descriptor:r._S.Cover}),data:e.playlist,presentationAudiences:e.presentationAudiences,bgColourClassNames:j.o,itemStyle:"round-left",imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,showCount:!1,showOwner:!0})),a.createElement(u.Z,{xs:8,lg:9},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("div",{className:"pt-3 ".concat(I.videoList)},null==i?void 0:i.map((function(t){var n=Object.assign(Object.assign({},c),{videoId:t.id,videoName:t.name});return a.createElement(h.m,{key:t.id,video:t,getSeriesAppLink:e.getSeriesAppLink,canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:e.getVideoAppLink,analyticsData:n,analyticsOptions:{entity:r.py.Video,location:r.LZ.PlaylistWithVideos},size:"sm",yearGroups:e.yearGroups})}))),a.createElement("div",{className:"text-end pt-3 pe-3"},a.createElement(g.F,{className:"info-link fw-semibold",appLink:e.playlistAppLink,analyticsData:c,analyticsOptions:Object.assign(Object.assign({},o),{descriptor:r._S.Link})},a.createElement(f.x,{namespace:N,phrase:"seeAllVideos"})))))))}function w(e){return a.createElement("div",{className:"mx-n2"},a.createElement(F,{playlist:e.item,yearGroups:e.yearGroups,playlistAppLink:e.appLinks.getPlaylistAppLink(e.item),presentationAudiences:e.audiences,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,preloadImage:!0,getSeriesAppLink:e.appLinks.getSeriesAppLink,getVideoAppLink:e.appLinks.getVideoAppLink}))}var _=n(34004);const T={videoList:"UT8bc"};var q="search.seriesWithVideos";function V(e){var t,n=(t=(0,l.k)()).xl||t.xxl?5:t.lg||t.md?4:3,i=e.series.videos.data.slice(0,n),o={actionType:r.Vw.Click,entity:r.py.Series,location:r.LZ.SeriesWithVideos},c=Object.assign(Object.assign({},e.analyticsData),{id:e.series.id,name:e.series.name});return a.createElement("div",{className:"ps-2 py-2"},a.createElement(s.Z,{className:"g-0 border border-light rounded-3"},a.createElement(u.Z,{xs:4,lg:3,className:"pe-3"},a.createElement(g.F,{appLink:e.seriesAppLink,className:"position-relative",analyticsData:c,analyticsOptions:Object.assign(Object.assign({},o),{descriptor:r._S.TallPoster})},a.createElement(_.r,{series:e.series,presentationAudiences:e.presentationAudiences,preloadImage:e.preloadImage,imageClass:"rounded-start-lg"}))),a.createElement(u.Z,{xs:8,lg:9},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("div",{className:"pt-3 ".concat(T.videoList)},null==i?void 0:i.map((function(t){var n=Object.assign(Object.assign({},c),{videoId:t.id,videoName:t.name});return t=Object.assign(Object.assign({},t),{series:e.series}),a.createElement(h.m,{key:t.id,video:t,getSeriesAppLink:function(){return e.seriesAppLink},canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:function(t){return e.getVideoAppLink(t)},analyticsData:n,analyticsOptions:{entity:r.py.Video,location:r.LZ.SeriesWithVideos},size:"sm",yearGroups:e.yearGroups})}))),a.createElement("div",{className:"text-end pt-3 pe-3"},a.createElement(g.F,{className:"info-link fw-semibold",appLink:e.seriesAppLink,analyticsData:c,analyticsOptions:Object.assign(Object.assign({},o),{descriptor:r._S.Link})},a.createElement(f.x,{namespace:q,phrase:"seeAllVideos"})))))))}function D(e){return a.createElement("div",{className:"mx-n2"},a.createElement(V,{yearGroups:e.yearGroups,presentationAudiences:e.audiences,series:e.item,seriesAppLink:e.appLinks.getSeriesAppLink(e.item),getVideoAppLink:e.appLinks.getVideoAppLink,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},preloadImage:!0}))}var U=n(5465),M=n(24900),R=n(96022),B="search.collectionVideoList";function Z(e){var t,n=(t=(0,l.k)()).xs?2:t.sm?1:3,i={analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions};return a.createElement(a.Fragment,null,a.createElement("ul",{className:"list-unstyled my-1"},e.videos.slice(0,n).map((function(t){var n,r=!!t.episodeNumber&&!!(null===(n=t.season)||void 0===n?void 0:n.id);return a.createElement("li",{key:"".concat(e.collectionId,":").concat(t.id),className:"d-flex align-items-center"},a.createElement(g.F,Object.assign({},i,{className:"clamp-1",appLink:e.getVideoAppLink(t)}),r&&a.createElement(a.Fragment,null,a.createElement(R.Qn,{video:t})," "),t.name))}))),a.createElement(g.F,Object.assign({},i,{className:"info-link",appLink:e.appLink}),a.createElement(f.x,{namespace:B,phrase:"seeAll"})))}var G=n(83657),W=n(76246),H=n(17464),Q=n(78276),z=n(9977),$=n(54610);const J={overlayContainer:"MnBcv",overlay:"AZSmh"};var K="search.collectionThumbnail";function Y(e){var t,n,i,s,o=(0,l.k)(),c="sm"===z.O.getSize(o,"md"),d=!!(null===(n=null===(t=e.collection.videos)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),p=d&&e.collection.videos.data.find((function(e){var t;return!!(null===(t=e.thumbnail)||void 0===t?void 0:t.url)})),m=(s=Object.assign(Object.assign({},e.analyticsData),{id:e.collection.id,name:e.collection.name}),p&&(s.videoId=p.id,s.videoName=p.name),s),v="series"===e.collectionType;return a.createElement("div",{className:"row g-0 ".concat(c?"":"py-2")},a.createElement(u.Z,Object.assign({},z.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(c?"pb-2 pe-2":"mb-1 px-2")}),a.createElement("div",{className:"position-relative overflow-hidden ".concat(c?"rounded":"rounded-3")},a.createElement(Q.Z,{data:null==p?void 0:p.thumbnail,appLink:e.appLink,imageType:$.__.Thumbnails,analyticsData:m,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Thumbnail})},a.createElement(M.z,{type:e.maskType}),a.createElement(U.oy,{type:e.imageFallbackType}),a.createElement("div",{className:"d-flex flex-column align-items-center justify-content-center text-white h-100 ".concat(J.overlay)},a.createElement(f.x,{namespace:K,phrase:"seeAll"}))))),a.createElement(u.Z,Object.assign({},z.O.getDetailsColumns(),{className:c?"pb-2":"px-2"}),!e.isPlugin&&a.createElement(G.e,{actions:e.getCollectionActions(e.collection,e.showActions,e.collectionType,e.analyticsOptions),className:"float-end mt-n1",actionsDropdownClassName:"btn btn-link ms-1"}),a.createElement(g.F,{appLink:e.appLink,analyticsData:m,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Title})},a.createElement("h5",{className:"m-0 mb-1"},a.createElement("span",{className:"clamp-1"},e.collection.name))),v&&!e.hideBadges&&a.createElement(H.c,null,a.createElement(W.C,{type:W.g.Rating,data:e.collection.rating}),a.createElement(W.C,{type:W.g.ProductionYear,data:null===(i=e.collection.metadata)||void 0===i?void 0:i.year})),d&&a.createElement(Z,{collectionId:e.collection.id,videos:e.collection.videos.data,appLink:e.appLink,analyticsData:m,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Link}),getVideoAppLink:e.getVideoAppLink})))}function X(e){return a.createElement("div",{className:"position-relative ".concat(k)},a.createElement(Y,{analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},analyticsOptions:{entity:r.py.Playlist,actionType:r.Vw.Click,location:r.LZ.PlaylistListItem},appLink:e.appLinks.getPlaylistAppLink(e.item),showActions:e.showActions,collection:e.item,collectionType:"playlist",maskType:M.O.Playlist,imageFallbackType:U.mS.PlaylistThumbnail,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}function ee(e){return a.createElement("div",{className:"position-relative ".concat(k)},a.createElement(Y,{analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},analyticsOptions:{entity:r.py.Series,actionType:r.Vw.Click,location:r.LZ.SeriesListItem},appLink:e.appLinks.getSeriesAppLink(e.item),collectionType:"series",collection:e.item,showActions:e.showActions,maskType:M.O.Series,imageFallbackType:U.mS.SeriesThumbnail,hideBadges:!0,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}var te=n(9513);function ne(e){return a.createElement(u.Z,{sm:6,md:e.useLargeStyle?6:4,lg:e.useLargeStyle?4:3},a.createElement("div",{className:"position-relative px-1 mb-2"},a.createElement(te.Vz,{data:e.item,getChildAppLink:e.appLinks.getClassificationAppLink,getChildAppLinkOptions:function(){return e.appLinks.getClassificationAppLinkOptions(e.item)},availablePresentations:e.availablePresentations,analyticsData:{itemIndex:e.itemIndex,search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:0},isLarge:e.useLargeStyle})))}var ae=n(50333),ie=n(17585);function re(e){var t,n=(t=e.item,c.M.isClip(t)?ae.I:c.M.isInteractive(t)?ie.H:h.m);return a.createElement("div",{className:"position-relative ".concat(k)},a.createElement(n,{video:e.item,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex}}))}function se(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var le=a.memo((function(e){var t,n,i,r,u,d,p,v,g=(0,l.k)(),y=g.xs||g.sm;if(!(null===(t=e.results)||void 0===t?void 0:t.length)&&!(null===(n=e.topics)||void 0===n?void 0:n.totalResults)&&!(null===(i=e.companies)||void 0===i?void 0:i.totalResults))return a.createElement(a.Fragment,null);var f=[].concat(se(null!==(u=null===(r=e.companies)||void 0===r?void 0:r.results)&&void 0!==u?u:[]),se(null!==(p=null===(d=e.topics)||void 0===d?void 0:d.results)&&void 0!==p?p:[])),h=Object.assign({useLargeStyle:f.length<4},e);return a.createElement(o.M.Provider,{value:e.getVideoItemActions},a.createElement("div",{className:"position-relative"},a.createElement(s.Z,{className:"g-0 pb-3 mx-n1"},f.map((function(e,t){switch(e.type.toLowerCase()){case"company":return a.createElement(m,Object.assign({key:t,item:e,itemIndex:t},h));case"subject":return a.createElement(ne,Object.assign({key:t,item:e,itemIndex:t},h))}}))),null===(v=e.results)||void 0===v?void 0:v.map((function(e,t){var n,i,r=f.length?t+1:t;if("isExchangeVideoGroup"in e&&e.isExchangeVideoGroup)return a.createElement(S,Object.assign({key:t,item:e,pagePositionIndex:r},h));switch(null===(n=e.type)||void 0===n?void 0:n.toLowerCase()){case"video":return 0===t&&e._featured&&c.M.isVideo(e)?a.createElement(C,Object.assign({key:t,item:e,pagePositionIndex:r},h)):a.createElement(re,Object.assign({key:t,item:e,pagePositionIndex:r},h));case"playlist":return y?a.createElement(X,Object.assign({key:t,item:e,pagePositionIndex:r},h)):a.createElement(w,Object.assign({key:t,item:e,pagePositionIndex:r},h));case"series":return y||!(null===(i=e.tallPoster)||void 0===i?void 0:i.id)?a.createElement(ee,Object.assign({key:t,item:e,pagePositionIndex:r},h)):a.createElement(D,Object.assign({key:t,item:e,pagePositionIndex:r},h))}}))))})),ce=n(83818),ue="search.searchSubstitute";function de(e){return e.substitute?a.createElement("p",{className:"mb-3"},a.createElement(f.x,{namespace:ue,phrase:"showingFor"})," ",a.createElement(g.F,{className:"info-link",appLink:e.getAppLink(e.substitute,e.queryParams),appLinkOptions:{replace:!0}},e.substitute)):a.createElement(a.Fragment,null)}var pe="search.searchSuggestions";function me(e){var t;return(null===(t=e.suggestions)||void 0===t?void 0:t.length)?a.createElement("div",{className:"d-flex align-items-center mb-3"},a.createElement(f.x,{namespace:pe,phrase:"didYouMean"})," ",e.suggestions.map((function(t,n){return a.createElement(a.Fragment,{key:"".concat(t,":").concat(n)},0!==n&&a.createElement("span",{className:"mx-1"},"•"),a.createElement(g.F,{className:"info-link",appLink:e.getAppLink(t,e.queryParams),appLinkOptions:{replace:!0}},t))}))):a.createElement(a.Fragment,null)}me.defaultProps={suggestions:[],queryParams:{}};var ve=n(71020),ge=n(97037),ye=n(79612),fe=n(14070),he=n(97291),be=n(62756),Ee=n(65986),ke=n(56017),Ae=n(4499),Le=n(20354),xe=n(16714),Se=n(21750),Oe=n(39151),Ce=n(1666),Pe=n(31949),je=n(22902),Ie=n(15311),Ne=n(37802),Fe=n(98758),we=n(24965),_e=n(82817),Te=n(86698),qe=n(44110),Ve=n(23737),De=n(1211),Ue=n(27898),Me={search:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,s="search:".concat(e,":").concat(t,":").concat(a);s+=Object.keys(n).map((function(e){return n[e]})).join(";");var o=Object.assign({},Object.assign({index:t,cursor:null!=a?a:void 0,query:e},n));return{url:v._.urlBuilder("{gateway}/v3/search",o),publicUrl:v._.urlBuilder("/api/search",o),key:s,formatData:function(e){var t,n,a,i=e.totalResults,r=null!==(n=null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.filter((function(e){var t,n,a,r,s,o,l,c;if("series"!==e._index&&"playlist"!==e._index)return!0;if("playlist"===e._index){var u=e;return!!((null===(n=null===(t=u.clips)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)||(null===(r=null===(a=u.interactives)||void 0===a?void 0:a.data)||void 0===r?void 0:r.length)||(null===(o=null===(s=u.videos)||void 0===s?void 0:s.data)||void 0===o?void 0:o.length))||(i--,!1)}return 0!==(null===(c=null===(l=e.videos)||void 0===l?void 0:l.data)||void 0===c?void 0:c.length)||(i--,!1)})))&&void 0!==n?n:[];e.results=r,e.totalResults=i;var s=null===(a=r[0])||void 0===a?void 0:a._score;return Object.assign(Object.assign({},e),{results:Ue.Q.mapMaxScoreToSearchResults(r,s)})},normalize:!1,success:i,error:r}},tagsAndClassifications:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,s=Object.assign({},Object.assign({index:t,cursor:a,query:e},n));return{url:v._.urlBuilder("{gateway}/v3/search/tags-and-classifications",s),publicUrl:v._.urlBuilder("/api/search/tags-and-classifications",s),key:"filter:options:".concat(e,":").concat(t.join(":"),":").concat(a),success:i,error:r,normalize:!1}}},Re=n(94605),Be=n(24598);function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Ge=n(1048),We=n(2284),He=n(85594);function Qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var ze=["filters.classification","filters.presentation"],$e=["filters.classification","filters.presentation","isLearner"];function Je(e){var t,n,a,i,s,o,l=Le.a.useBasicFetch(Pe.N.currentUser()),c=Le.a.useBasicFetch((null===(t=l.data)||void 0===t?void 0:t.id)&&Pe.N.user(l.data.id)),u=Le.a.useBasicFetch(Oe.L.config()),d=Le.a.useBasicFetch((null===(n=l.data)||void 0===n?void 0:n.isAuthenticated)&&Ce.h.yearGroups(l.data.customerId)),p=(0,Ie.r)(),m=(0,Ne.r)(null),v=(0,Te.y)(),g=v.activePresentation,y=v.availablePresentations,f=v.getFallbackPresentation,h=v.hasPresentationsLoaded,b=g||f(),E=null==b?void 0:b.id,k=(0,_e.M)(),A=(0,qe.i)(),L=function(e){var t=(0,(0,je.T)().hasPermissions)(xe.C.StudentExperience),n=(0,Te.y)(),a=n.availablePresentations,i=n.hasPresentationsLoaded,r=t?e?[null==e?void 0:e.id]:null:null==a?void 0:a.map((function(e){return e.id}));return Le.a.useBasicFetch(i&&r&&De.J.schoolLevels(r))}(b),x=null===(i=null===(a=L.data)||void 0===a?void 0:a.schoolLevels)||void 0===i?void 0:i.map((function(e){return e.id})),S=Le.a.useBasicFetch((null==L?void 0:L.data)&&Se.x.topicsFromAllAvailablePresentations(x)),O=Le.a.useBasicFetch(we.Z.ratings(null===(s=l.data)||void 0===s?void 0:s.countryCode)),C=(0,je.T)(),P=C.hasPermissions,j=C.hasLocalPermissions,I=(0,Ne.r)(r.LZ.SearchFilters).hasNewMoviesAndTv,N=P(xe.C.StudentExperience),F=P(xe.C.ViewCurriculums),w=j(xe.E.UseSeriesActions),_=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,s=(null==n?void 0:n.length)&&Re.qr.buildBackendFilterParams(e,n,a,r),o=Ge.t.pick(s,r?$e:ze);o["filters.classificationType"]=He.A.Subject,o["filters.status"]=We.W.Published,(null==e?void 0:e.moviesAndTv)&&(o["filters.curationTag"]=Be.b.MOVIES_AND_TV);var l=null!==(t=null==i?void 0:i.reduce((function(e,t){return e[t.id]=t,e}),{}))&&void 0!==t?t:{},c=!Re.qr.getAppliedIndices(e).includes("classification"),u=Me.search(Ae.y.getQuery(e),["classification"],o),d=!c,p=Le.a.useBasicFetch(d&&u);if(!d)return null;if(!p.data)return p;if(!i||(null==i?void 0:i.length)<2)return p;var m,v=(m=p.data.results,function(e){if(Array.isArray(e))return Qe(e)}(m)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(m)||function(e,t){if(e){if("string"==typeof e)return Qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(e,t):void 0}}(m)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort((function(e,t){if(e._score!==t._score)return 0;var n=l[e.presentationId],a=l[t.presentationId];return n?a?n.value-a.value:-1:1}));return Object.assign(Object.assign({},p),{data:Object.assign(Object.assign({},p.data),{results:v})})}(e,O.data,E,y,N),T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=(null==t?void 0:t.length)&&Re.qr.buildBackendFilterParams(e,t,n,!1)||{};i["filters.curationTag"]=Be.b.CLICKVIEW_CURATED,n&&(i["filters.presentation"]=n);var r,s=!Re.qr.getAppliedIndices(e).includes("company"),o=Me.search(Ae.y.getQuery(e),["company"],i),l=!s&&a,c=Le.a.useBasicFetch(l&&o);return l?c.data?Object.assign(Object.assign({},c),{data:Object.assign(Object.assign({},c.data),{results:(r=c.data.results,function(e){if(Array.isArray(e))return Ze(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})}):c:null}(e,O.data,E,I);return{queryParams:e,currentUser:l,userDetails:c,config:u,yearGroups:d,products:p,settings:m,curriculums:k,audiences:A,schoolLevels:L,currentPresentation:b,availablePresentations:y,availableTopics:S,ratings:O,topics:_,companies:T,moviesAndTvDashboard:(0,Ve.y)({targetType:Fe.ku.MoviesAndTv,queryParams:e}).dashboard,hasNewMoviesAndTv:I,currentPresentationId:E,isLearner:N,canViewCurriculums:F,canUseSeriesActions:w,hasDataLoaded:A.hasCompleted&&h&&l.hasCompleted&&(!(null===(o=l.data)||void 0===o?void 0:o.isAuthenticated)||c.hasCompleted)&&O.hasCompleted&&u.hasCompleted&&y&&!p.isLoadingProducts&&!m.isLoadingSettings}}var Ke=n(94644),Ye=n(69883),Xe=n(60115),et=n(4594),tt="search.utils";var nt=n(2948),at=n(86702);function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var rt=n(23232),st=n(99742),ot="search.searchResultsEmptyState";function lt(e){var t,n,i=e.scotland&&"nessie"===(null===(n=null===(t=e.query)||void 0===t?void 0:t.trim())||void 0===n?void 0:n.toLowerCase())?st.W.EmptyStates.Search.RESULTS_SCOTLAND:st.W.EmptyStates.Search.RESULTS;return a.createElement(f.D.Provider,{value:ot},a.createElement(rt.u,null,a.createElement(rt.u.Image,{src:i}),a.createElement(rt.u.Heading,null,e.query?a.createElement(f.x,{phrase:"headingWithQuery",options:{query:e.query}}):a.createElement(f.x,{phrase:"headingWithoutQuery"})),a.createElement(rt.u.Info,null,a.createElement(f.x,{phrase:"info"}),a.createElement(g.F,{className:"info-link",appLink:{application:he.O.SUBJECT,action:fe.e.Subjects.CLASSIFICATION_ALL}},a.createElement(f.x,{phrase:"topicsAppLink"})))))}var ct="search.searchResults",ut=i.T.encloseNamespace(ct);function dt(e){var t,n,s,o,l,u,d,p,m,v,g,y,f=e.queryParams,h=void 0===f?{}:f,E=(0,Ee._)(Ee.i.VideoItem),k=(0,ge.c)(r.LZ.VideoThumbnail),A=k.setFavourite,L=k.canFavourite,x=(0,be.G)().isPlugin,S=Je(h),O=Ae.y.getBackendFilters(S),C=(y=O,Le.a.useBasicFetch(y&&Me.tagsAndClassifications(y.queryParams.query,y.appliedIndices,y.backendFilters))),P=function(e){var t,n,r,s=e.queryParams,o=e.appliedIndices,l=e.backendFilters,u=(0,Ye.Z)(),d=Le.a.useGetFetch(),p=Le.a.useGetResponse(null===(t=m())||void 0===t?void 0:t.key);function m(t){return e.hasDataLoaded&&Me.search(s.query,o,l,t)}function v(e){d(m(e))}var g=(0,Xe.K)(m,v,(function(e,t){if(1===e)return(0,Ke.r)(t);u.error(i.T.getPhrase(tt,"error"))}),(function(e){return e.results})),y=e.products.hasProduct(b.x.Exchange)&&e.settings.showExchangeSearchResults,f=function(e){return a.useMemo((function(){var t;if(!(null===(t=e.searchResults)||void 0===t?void 0:t.length))return[];var n,a,i=[],r=[],s=!1;e.searchResults.forEach((function(e,t){var o,l,u;if(c.M.isVideo(e)&&1===(null===(o=e.libraries.data)||void 0===o?void 0:o.length)&&(null===(u=null===(l=e.libraries.data)||void 0===l?void 0:l[0])||void 0===u?void 0:u.typeId)===et.E.ExchangeCollection)return void 0===n&&(n=t,a=0,s=!0),s&&a++,void r.push(e);s=!1,i.push(e)}));var o={id:null,type:null,videos:r,showCount:a,isExchangeVideoGroup:!0,_index:null};return e.groupExchangeResults&&r.length&&i.splice(n,0,o),i}),[e.searchResultsResponse])}({searchResults:g.items,searchResultsResponse:p.data,groupExchangeResults:y});return Object.assign(Object.assign({},g),{items:f,fetchNext:v,substituteQuery:null===(n=p.data)||void 0===n?void 0:n.substituteQuery,suggestions:null===(r=p.data)||void 0===r?void 0:r.suggestions})}(Object.assign(Object.assign({},O),S)),j=Ae.y.getFilters(S,null==O?void 0:O.inaccessibleIndices,C);(0,ye.M)(ke.C.getDefaultMetadata({title:null!==(t=h.query)&&void 0!==t?t:"",phraseContext:{phraseHandler:ut,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},allowIndexing:!1}));var I,N,F,w,_,T,q=S.hasDataLoaded&&j,V=P.hasFirstPageCompleted&&(!S.topics||S.topics.hasCompleted)&&(!S.companies||S.companies.hasCompleted)&&C.hasCompleted&&!!j,D=(null===(n=P.items)||void 0===n?void 0:n.length)||(null===(o=null===(s=S.topics)||void 0===s?void 0:s.data)||void 0===o?void 0:o.totalResults)||(null===(u=null===(l=S.companies)||void 0===l?void 0:l.data)||void 0===u?void 0:u.totalResults);return I=V,_=(0,nt.D)(at.y.SHOW_SEARCH_MASK,!0),T=2,N=function(e){if(Array.isArray(e))return e}(_)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(_,T)||function(e,t){if(e){if("string"==typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?it(e,t):void 0}}(_,T)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),F=N[0],w=N[1],a.useEffect((function(){F&&I&&w(!1)}),[I]),q?a.createElement("div",{className:"px-4"},a.createElement(de,{substitute:P.substituteQuery,queryParams:h,getAppLink:Ae.y.getSearchAppLink}),!P.substituteQuery&&a.createElement(me,{suggestions:P.suggestions,queryParams:h,getAppLink:Ae.y.getSearchAppLink}),!!S.audiences.data&&!!S.ratings.data&&!!S.availableTopics.data&&a.createElement(ce.J,{queryParams:h,mainFilters:null==j?void 0:j.mainFilters,moreFilters:null==j?void 0:j.moreFilters,analyticsOptions:{entity:r.py.SearchResults,location:r.LZ.SearchFilters},appLink:{application:he.O.SEARCH,action:fe.e.Search.HOME},isFetchingOptions:C.isFetching}),V&&a.createElement("section",null,D?a.createElement(le,{queryParams:h,results:P.items,topics:null===(d=S.topics)||void 0===d?void 0:d.data,companies:null===(p=S.companies)||void 0===p?void 0:p.data,getVideoItemActions:E,setFavourite:A,canFavourite:L,audiences:!h.moviesAndTv&&S.audiences.data,currentUser:S.currentUser.data,imageCdnUrl:S.config.data.imageCdnUrl,availablePresentations:S.availablePresentations,showActions:!S.isLearner&&S.canUseSeriesActions,yearGroups:S.yearGroups.data,isPlugin:x,appLinks:Ae.y.getAppLinks(S.currentPresentation,S.availablePresentations,h.moviesAndTv),products:S.products}):a.createElement(lt,{query:h.query,scotland:null!==(g=!!(null===(v=null===(m=S.currentPresentation)||void 0===m?void 0:m.description)||void 0===v?void 0:v.toLowerCase().includes("scotland")))&&void 0!==g&&g}),P.hasMore&&a.createElement(ve._,{isFetching:P.isFetching,fetchNext:P.fetchNext,nextCursor:P.nextCursor}))):a.createElement(a.Fragment,null)}},24965:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(97395),i={ratings:function(e){return{url:"/api/domain/v2/me/ratings",publicUrl:a._.urlBuilder("/api/domain/v2/me/ratings",{countryCode:e}),key:"ratings",formatData:function(e){return e.sort((function(e,t){return e.value-t.value}))}}}}},41063:(e,t,n)=>{n.d(t,{b:()=>s});var a=n(16714),i=n(22902),r=n(37802);function s(){var e=(0,i.T)().hasPermissions;return(0,r.r)(null).manageVideoAccess&&e(a.C.ManageVideoAccess)}},44110:(e,t,n)=>{n.d(t,{i:()=>s});var a=n(20354),i=n(89454),r=n(86698),s=function(){var e=(0,r.y)({redirectOnError:!0}).activePresentation;return a.a.useBasicFetch(!!e&&i.O.presentationAudiences(e.id))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5041],{86877:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(23481);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:String(t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(f,e);var t,n,c,l,s=(c=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=a(c);if(l){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"name",get:function(){return"FileTypeError"}},{key:"lang",get:function(){return"upload.fileType"}},{key:"dialogOptions",get:function(){return{title:r.T.getPhrase(this.lang,"heading"),text:r.T.getPhrase(this.lang,"body"),buttons:[{text:r.T.getPhrase(this.lang,"okay"),className:"btn btn-dark",success:!0},{text:r.T.getPhrase(this.lang,"close"),className:"btn btn-link",close:!0}]}}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(n(47663).S)},25041:(e,t,n)=>{n.r(t),n.d(t,{BaseVideoUploadService:()=>Y,LearningResourceUploadService:()=>te,SubtitleUploadService:()=>ee,UploadType:()=>H});var r,o=n(48088),i=n(39479),c=n(46865),u=n(79976),a=n(37433),l=n(54149),s=n(71365),f=n(23481),p=n(70794),y=n(81886),d=n(49985),h=n(65858),v=n(29555);!function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(r||(r={}));var g=n(86877),b=n(6339),m=n(52003),w=n(60735),S=n(53301),O=n(47663);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j(r.key),r)}}function j(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:String(t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}var R="upload.internetConnectivityError",E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(c,e);var t,n,r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=T(r);if(o){var n=T(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i.call(this,f.T.getPhrase(R,"title"))}return t=c,(n=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(R,"heading"),text:f.T.getPhrase(R,"body"),buttons:[{text:f.T.getPhrase(R,"okay"),className:"btn",success:!0}]}}}])&&P(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(O.S),_=n(44331);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}}function L(e){var t=function(e,t){if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:String(t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var D=[],z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(l,e);var t,n,r,c,u,a=(c=l,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(c);if(u){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,n=[{key:"name",get:function(){return"DropzoneWrapper"}},{key:"initialize",value:function(e){var t=this.options.loggingEnabled,n=o.Radio.channel(e.channelName),r=this;this.dropzone=new S(document.createElement("div"),{url:function(e){return e[0].cvUpload.ingestUrl},chunking:this.options.chunkingEnabled,chunkSize:this.options.chunkSize,forceChunking:!0,autoProcessQueue:!0,maxFilesize:this.options.maxFileSize,acceptedFiles:this.options.acceptedFiles,paramName:"content",init:function(){var e=this;t&&(i.each(D,(function(t){e.on(t,(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n[0]instanceof File?n[0].name:n[0];console.info(t,o,n)}))})),this.on("uploadprogress",(function(e,t,o){var i=o/e.size*100;n.trigger("progress",r.getId(e),i,o)})),this.on("success",(function(e){var t=e.upload.chunks,r=i.last(t),o=r.xhr;o||(o=r.file.xhr);var c=JSON.parse(o.response);e.cvUpload.fileId=c.id,n.trigger("upload:success",e,c)})),this.on("error",(function(e,t,n){n&&0===n.status?y.Q.Ry.throw(new E):"canceled"!==e.status&&y.Q.Ry.throw(new _.n(f.T.getPhrase("upload.services","uploadError",{fileName:e.name,message:t.message})))})))},params:function(e,t,n){if(n)return{chunk_index:n.index,upload_length:n.file.size}},addedfile:function(){},thumbnail:function(){},uploadprogress:function(){}})}},{key:"getId",value:function(e){return e.upload.uuid}},{key:"addFile",value:function(e){this.dropzone.addFile(e)}},{key:"removeFile",value:function(e){this.dropzone.removeFile(e)}},{key:"start",value:function(){this.dropzone.processQueue()}},{key:"destroy",value:function(){this.dropzone.destroy()}}],r=[{key:"isValidFile",value:function(e,t){return S.isValidFile(e,t)}}],n&&F(t.prototype,n),r&&F(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(y.Q.t6);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function A(e,t,n){return(t=q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,q(r.key),r)}}function Q(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q(e){var t=function(e,t){if("object"!=V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==V(t)?t:String(t)}function M(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var o=G(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var H,W=function(e){M(n,e);var t=J(n);function n(){var e;return N(this,n),(e=t.call(this,{dataProvider:s.u.getInstance(a.R.Ajax),cache:s.u.getInstance(c.p.Fifo),alertService:s.u.getInstance(u.P.ALERT)})).incrementingUploadId=0,e}return Q(n,[{key:"name",get:function(){return"UploadDataService"}},{key:"channelName",get:function(){return"private:upload:data:service"}},{key:"requestUploads",value:function(e,t,n,r,o){var c=this,u=this.chain();i.each(t,(function(t){c.incrementingUploadId++,u.create({resource:e,eventPrefix:"request:upload:".concat(c.incrementingUploadId),data:c.getFileUploadRequest(t,n),callback:function(e){r(t,e)},errorHandler:c.alertService.error("Something went wrong while we were uploading your video. Please try again.")})})),u.func((function(){o()})).run()}},{key:"cancelUpload",value:function(e,t,n){this.create({resource:"/api/upload/cancel",eventPrefix:"cancel:upload",data:{uploadId:e,ingestUrl:t},callback:n})}},{key:"getFileUploadRequest",value:function(e,t){var n=e.name.split(".");return{name:n.join("."),extension:n.length>1?n.pop():"",fileSize:e.size,fileLifestyle:t}}},{key:"onDestroy",value:function(){s.u.releaseInstance(a.R.Ajax).releaseInstance(c.p.Fifo)}}]),n}(l.B);!function(e){e[e.Video=0]="Video",e[e.LearningResource=1]="LearningResource",e[e.Subtitle=2]="Subtitle"}(H||(H={}));var $=A(A(A({},H.Video,"video/*"),H.LearningResource,b.l.RESOURCES),H.Subtitle,b.l.SUBTITLES),K=A(A(A({},H.Video,m.Q4.VIDEO_UPLOAD),H.LearningResource,m.Q4.RESOURCE_UPLOAD),H.Subtitle,m.Q4.SUBTITLE_UPLOAD),X=function(e){M(n,e);var t=J(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(this,n),t.call(this,Object.assign({uploadUrl:"/api/upload"},e))}return Q(n,[{key:"initialize",value:function(){this.uploadDataService=new W,this.progressViewModel=p.r.get("upload:progress:".concat(this.uploadType)),this.bindListeners()}},{key:"channelName",get:function(){return K[this.uploadType]}},{key:"lang",get:function(){return"uploadShared.services"}},{key:"initUploader",value:function(e,t){if(!this.uploader){var n=4194304;e&&n<e&&(n=e),t&&n>t&&(n=t),this.uploader=new z({chunkingEnabled:!0,loggingEnabled:!0,chunkSize:n,maxFileSize:53687091200,acceptedFiles:this.getAcceptedFiles(),channelName:this.channelName})}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"progress",this.onProgress),this.listenTo(this.channelName,"upload:success",this.onSuccess)}},{key:"onProgress",value:function(e,t,n){var r=this.collection.get(e);r&&(r.set({progress:t>100?100:t,totalUploaded:n}),this.setOverallProgress())}},{key:"isUploading",value:function(){return!!this.getCollection().length}},{key:"getCollection",value:function(){return this.collection||(this.collection=new y.Q.FE),this.collection}},{key:"setOverallProgress",value:function(){var e=this,t=0,n=0,r=this.getCollection();if(r.length){r.each((function(e){t+=e.get("totalUploaded")||0,n+=e.get("file").size||0}));var o=t/n*100,i=o>=100,c=function(){e.progressViewModel.set({progress:i?100:o,done:i})};i?window.setTimeout(c,2e3):c()}else this.progressViewModel.set({progress:0})}},{key:"isValidFile",value:function(e){return z.isValidFile(e,this.getAcceptedFiles())}},{key:"addFiles",value:function(e,t){var n=this;i.any(e,(function(e){return!n.isValidFile(e)}))?y.Q.Ry.throw(new g.Z(f.T.getPhrase(this.lang,"invalidFileType"))):this.requestUploads(e,t)}},{key:"requestUploads",value:function(e,t){var n=this,r=this.isUploading(),i=this.getCollection();this.uploadDataService.requestUploads(this.options.uploadUrl,e,this.fileLifestyle,(function(e,t){n.initUploader(1024*t.minChunkSize,1024*t.maxChunkSize),e.cvUpload={uploadId:t.uploadId,ingestUrl:t.ingestUrl},n.uploader.addFile(e);var r=e.name;n.uploadType===H.Video&&(r=r.replace(/\.[^/.]+$/,"")),i.add(Object.assign({id:n.uploader.getId(e),file:e,name:r},n.getAdditionalFileInfo(e,t)),{at:i.length-1})}),(function(){t&&d.k.logUserAction({uploadCount:e.length},t),o.Radio.channel(n.channelName).trigger(v.S.FILES_ADDED,e,r)}))}},{key:"addFile",value:function(e,t){this.addFiles([e],t)}},{key:"cancelUpload",value:function(e){var t=this,n=this.getCollection(),r=n.get(e);if(r){var i=r.get("file");this.uploader.removeFile(i),n.remove(r),this.uploadDataService.cancelUpload(i.cvUpload.uploadId,i.cvUpload.ingestUrl,(function(){d.k.logUserAction(r.toJSON(),{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Discard,descriptor:h.yh.Single,location:h.LZ.MyUploads}),o.Radio.channel(t.channelName).trigger(v.S.UPLOAD_CANCELLED)})),this.setOverallProgress()}}},{key:"onSuccess",value:function(e,t){var n=this.uploader.getId(e),r=this.getCollection().get(n);r.set("fileInfo",t),d.k.logUserAction({id:e.cvUpload.uploadId},{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Complete,descriptor:h.yh.Single,location:h.LZ.VideoUpload}),o.Radio.channel(this.channelName).trigger(v.S.UPLOAD_COMPLETE,r)}},{key:"cancelAllUploads",value:function(){var e=this,t=this.getCollection().map((function(e){return e.get("id")}));i.each(t,(function(t){return e.cancelUpload(t)}))}},{key:"getAcceptedFiles",value:function(){return $[this.uploadType]}},{key:"getAdditionalFileInfo",value:function(e,t){return{}}}]),n}(y.Q.t6),Y=function(e){M(n,e);var t=J(n);function n(){return N(this,n),t.apply(this,arguments)}return Q(n,[{key:"uploadType",get:function(){return H.Video}},{key:"name",get:function(){return w.D.VideoUpload}},{key:"fileLifestyle",get:function(){return r.Temporary}}]),n}(X),ee=function(e){M(n,e);var t=J(n);function n(){return N(this,n),t.apply(this,arguments)}return Q(n,[{key:"uploadType",get:function(){return H.Subtitle}},{key:"name",get:function(){return w.D.SubtitleUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}(X),te=function(e){M(n,e);var t=J(n);function n(){return N(this,n),t.apply(this,arguments)}return Q(n,[{key:"uploadType",get:function(){return H.LearningResource}},{key:"name",get:function(){return w.D.ResourceUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}(X)},6339:(e,t,n)=>{n.d(t,{l:()=>p,v:()=>y});var r=n(39479),o=["pdf"],i=["doc","docx","dotx","dot","rtf","docm","odt"],c=["csv","txt"],u=["xls","xlt","xlsx"],a=["jpg","tif","png","bmp","gif","jpeg"],l=["zip","rar"],s=["ppt","pot","pps","pptx"],f=["srt"],p={IMAGES:".".concat(a.join(",.")),RESOURCES:".".concat([].concat(i,u,s,o,c,a,l).join(",.")),SUBTITLES:".".concat(f.join(",."))},y={getResourceType:function(e){var t=e.toLowerCase();return r.contains(i,t)?"document":r.contains(u,t)?"excel":r.contains(s,t)?"powerpoint":r.contains(o,t)?"pdf":r.contains(c,t)?"text":r.contains(a,t)?"image":r.contains(l,t)?"archive":r.contains(f,t)?"subtitle":""}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5134],{15134:(e,t,n)=>{n.r(t),n.d(t,{SettingsView:()=>h});var a=n(32735),c=n(23481),l=n(81886),i=n(83345),r=n(67058),s=n(79612),m=n(36848);const o={myAccount:"Olsqt",group:"wCqdk"};function u(e){var t,n=null===(t=e.modules)||void 0===t?void 0:t.filter((function(e){return!e.hide})),c=!!(null==n?void 0:n.length);return console.log(e.name,n),a.createElement(m.F,{appLink:e.appLink},a.createElement("div",{className:"row p-3 border border-dark m-0 w-100 h-100 ".concat(o.group)},a.createElement("div",{className:"col-3"},a.createElement("div",{className:"d-flex justify-content-center align-items-center h-100"},a.createElement("img",{src:e.imageUrl,alt:"",role:"presentation",className:"my-account"===e.id?"img-fluid ".concat(o.myAccount):"img-fluid"}))),a.createElement("div",{className:"col-9 h-100 ".concat(c?"":"d-flex align-items-center")},a.createElement("h2",{className:"h4"},e.name),c&&a.createElement("ul",{className:"list-unstyled mb-0"},n.map((function(e){return a.createElement("li",{key:e.name,className:"mb-1"},"appLink"in e?a.createElement(m.F,{className:"btn btn-link p-0",appLink:e.appLink},e.name):a.createElement("button",{className:"btn btn-link p-0 text-start",onClick:e.onClick},e.name))}))))))}var d=n(96368);const p={settingsContainer:"wIhgs",groupContainer:"rAJjd"};var g="settings.settings";function h(){(0,s.M)({title:c.T.getPhrase(g,"pageTitle")});var e=(0,d.e)();if(e.length)return console.log(e),a.createElement("div",{className:"px-3"},a.createElement("h1",{className:"h2"},a.createElement(i.x,{namespace:g,phrase:"heading"})),a.createElement("main",{className:"row"},e.map((function(e){return a.createElement("div",{key:e.id,className:"col-md-6 p-0"},a.createElement("div",{className:"h-100 ".concat(p.groupContainer)},a.createElement(u,Object.assign({},e))))}))));l.Q.Ry.throw(new r.d)}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5177-ea01e21af3-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5177],{73758:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}n.d(t,{n:()=>a});var a=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n;return t=e,n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}())},26733:(e,t,n)=>{n.d(t,{s:()=>P,R:()=>O});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),c=n(36848),u=n(78276),l=n(76177),f=n(71063),h=n(54610),p=n(4594),d=n(1164),y=n(79967),v=n(67453);const b={imageStyle:"I9E5O",item:"tqUFn",background:"s1dNr",thumbnailContainer:"EDiGi",teacherPack:"_tdVE",text:"g5NWS",hoverState:"xRYhX",atomGuide:"X39wU",studentActivity:"X9pMl",additionalMaterials:"qRVUo",userUploaded:"_18JaV",imageTypeResource:"KYtZL"};var g={width:200,resizeType:h.Nq.Cover};function m(e,t){var n,r,i;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return v.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},g));var a=o._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===d.L.Pdf?v.j.createResourceImage(a,t.url,g):t.metadata.type===d.L.Image?v.j.createUrl(t.url,{size:h.h2.Medium,resizeType:h.Nq.Cover}):(null===(i=t.pdf)||void 0===i?void 0:i.url)?v.j.createResourceImage(a,t.pdf.url,g):(t.metadata.type,d.L.Zip,"/images/zip-resource.png"):v.j.createResourceImage(a,t.url,Object.assign({},g))}function w(e){var t;return"metadata"in e?e.metadata.type===d.L.Pdf?h.__.Pdf:e.metadata.type===d.L.Image?h.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?h.__.Pdf:(e.metadata.type,d.L.Zip,h.__.Thumbnails):h.__.Link}function P(e){var t,n,i,o,a,c,f,h=null,p=0;"metadata"in e.data&&(h=e.data.metadata,p=null!==(i=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var y="".concat(null!==(a=null===(o=e.theme)||void 0===o?void 0:o.containerClass)&&void 0!==a?a:""," pt-3 px-3 rounded-3 d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return b.atomGuide;case"student-activity":return b.studentActivity;case"teacher-pack":return b.teacherPack;case"additional-materials":return b.additionalMaterials;default:return b.userUploaded}}(null==h?void 0:h.resourceType)," ").concat(b.background," ").concat(e.applyHoverState?b.hoverState:""," ");return r.createElement("div",{className:y},!e.hideHeading&&r.createElement(l.u,{title:e.data.name},r.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(b.text)},r.createElement("span",{className:"clamp-1"},e.data.name))),r.createElement("div",{className:"".concat(null!==(f=null===(c=e.theme)||void 0===c?void 0:c.thumbnailContainerClass)&&void 0!==f?f:""," w-75 overflow-hidden ").concat(b.thumbnailContainer," ").concat(b.imageStyle)},r.createElement(u.Z,{data:m(e.imageCdnUrl,e.data),imageType:w(e.data),imageStyle:{transform:"rotate(".concat(p,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==h?void 0:h.type)===d.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}P.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var O=r.memo((function(e){var t,n,o,u,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[]),h=(t=e.data,n=e.actionBehaviour,u=(0,y.k)(),"public"===n||!u.xs&&!u.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===d.L.Image||(t.metadata.type===d.L.Pdf?!!t.url:!!(null===(o=t.pdf)||void 0===o?void 0:o.url)))),v=Object.assign(Object.assign({},e.analyticsData),e.data),g=Object.assign(Object.assign({},e.analyticsOptions),{actionType:s.Vw.Click,entity:e.data.typeId===p.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,O=!!e.data.url;return l.applyHoverState=h||O,r.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(b.item," ").concat(f.M.RESOURCE_ITEM_SELECTOR)},(w="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:w,onClick:m},r.createElement(P,Object.assign({},l))):h?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(w," cursor-pointer d-inline"),onClick:function(){m(),i.C$.trigger(e.getAppLink(e.data))}},r.createElement(P,Object.assign({},l))):r.createElement(c.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(P,Object.assign({},l))):O?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(P,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(P,Object.assign({},l)))))}))},65100:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>zn});var r=n(32735),i=n(51482),o=(n(16852),n(93861));function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:String(t)}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},u.apply(this,arguments)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(c,e);var t,n,r,i,o=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=o.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=c,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){u(f(c.prototype),"handleClick",this).call(this,null)}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Z.getComponent("Button"));function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function y(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:String(t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}h.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",h);var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(r);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:String(t)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}o.Z.registerPlugin("createClipButtonPlugin",g);var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(r);if(i){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("PictureInPictureToggle"));function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function E(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:String(t)}function T(){return T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=I(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},T.apply(this,arguments)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}o.Z.registerComponent("PictureInPictureToggle",k);var _=o.Z.getComponent("PlayToggle"),R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(r);if(i){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){var e=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var n=t.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===n&&(n=t.children().length-1),t.addChild("pictureInPictureToggle",{},n);var r=t.getChild("pictureInPictureToggle");null==r||r.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new _(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,T(I(a.prototype),"dispose",this).call(this)}}])&&C(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",R);var M=n(23035),L=n(42892),D=n(73758);function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V(r.key),r)}}function V(e){var t=function(e,t){if("object"!=N(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:String(t)}function B(){return B="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Z(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},B.apply(this,arguments)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(r);if(i){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=D.n,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(U(n)),n.onMouseLeave=n.onMouseLeave.bind(U(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(U(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(U(n)),n.initialize(),n}return t=s,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(B(Z(s.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return B(Z(s.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=o.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("Component"));function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H(r.key),r)}}function H(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:String(t)}function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Y.apply(this,arguments)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}var Q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(r);if(i){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=Y($(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&q(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,K(r.key),r)}}function K(e){var t=function(e,t){if("object"!=X(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==X(t)?t:String(t)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ne(e)}o.Z.registerComponent("PointsOfInterestMenuItem",Q);var re=o.Z.getPlugin("plugin"),ie="cvplayer-points-of-interest",oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ne(r);if(i){var n=ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return te(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(te(n)),n.updateBuffered=n.updateBuffered.bind(te(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(te(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=a,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(L.S.hasLocalStorage()&&"false"===L.S.get(ie)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){L.S.set(ie,e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new z(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:Q,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,M.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(re);o.Z.registerPlugin("pointsOfInterestPlugin",oe),n(93262);var ae=n(65858),se=n(86086),ce=n(12399),ue=n(6156);function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,he(r.key),r)}}function he(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==le(t)?t:String(t)}var pe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval((function(){return e.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&fe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ve(r.key),r)}}function ve(e){var t=function(e,t){if("object"!=de(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=de(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==de(t)?t:String(t)}var be={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},ge=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions(),this.url=t,this.options=Object.assign(Object.assign({},be),r),this.webSocket=this.connect(),this.heartbeat=(new pe).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout((function(){n.webSocket=n.connect()}),this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&ye(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),me=n(95569),we=function(){var e,t;return null!==(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID())&&void 0!==t?t:Math.random().toString()},Pe=n(35884);function Oe(e){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ke(r.key),r)}}function ke(e){var t=function(e,t){if("object"!=Oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oe(t)?t:String(t)}var je,Ce=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this.position=0,this.duration=void 0,this.playing=!1,this.mute=!1,this.videoSource="",this.subtitleSource="",this.subtitles=!1,this.volume=0,this.title=t,this.device=n,this.ready=!1,this.playbackFinished=!1,this.debounced=Pe.l.withDebouncedSetters(this,2e3),Pe.l.withTimestampedSetters(this)}var t,n;return t=e,(n=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}}])&&Se(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Te(){Te=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ee(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ee(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ie(r.key),r)}}function Ie(e){var t=function(e,t){if("object"!=Ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:String(t)}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Me(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_e.apply(this,arguments)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}!function(e){e.Update="update",e.Volume="volume",e.Playing="playing",e.Paused="paused",e.NewChapter="new_chapter",e.Stopped="stopped",e.Ready="ready",e.Mute="mute",e.Finished="finished"}(je||(je={}));var Le=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Me(r);if(i){var n=Me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this)).client=e,n.localState=new Ce(t.title,t.device),n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter((function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type})),this.client.on("message",this.handleAllVideoMessages).filter((function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type}))}},{key:"dispose",value:function(){this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch((function(e){return console.error(e)})),_e(Me(a.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Le(this,void 0,void 0,Te().mark((function e(){return Te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.client.joinRoom(this.getDevice().id);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),this.trigger("error",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})))}},{key:"handleDisconnectMessage",value:function(){this.dispose()}},{key:"handleAllVideoMessages",value:function(e){var t=this.localState.debounced,n=e.message.payload.params||{};switch(e.message.payload.event){case je.Update:this.handleUpdateMessage(t,n);break;case je.NewChapter:this.handleNewChapterMessage(t,n);break;case je.Volume:this.handleVolumeMessage(t,n);break;case je.Playing:this.handlePlayingMessage(t);break;case je.Paused:this.handlePausedMessage(t);break;case je.Finished:this.handleFinishedMessage(t);break;case je.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",ue.j.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",ue.j.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",ue.j.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",ue.j.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",ue.j.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",ue.j.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",ue.j.void))}},{key:"handleNewChapterMessage",value:function(e,t){var n,r=(null!==(n=t.queue)&&void 0!==n?n:[]).find((function(t){return t.url===e.videoSource}));if(!r)return console.info("The device is no longer playing the source we loaded - disposing the session"),void this.dispose();e.subtitleSource!==r.suburl&&(e.subtitleSource=r.suburl,this.trigger("subtitleschange",ue.j.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Le(this,void 0,void 0,Te().mark((function n(){var r,i;return Te().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.next=10,this.client.joinRoom(r);case 10:return n.next=12,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 12:this.localState.ready=!0,this.trigger("sourceloaded",ue.j.void),i>0&&this.client.seek(r,i),n.next=21;break;case 17:n.prev=17,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 21:case"end":return n.stop()}}),n,this,[[2,17]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",ue.j.void))}},{key:"pause",value:function(){this.localState.ready&&!1!==this.localState.playing&&(this.localState.playing=!1,this.client.pause(this.getDevice().id),this.trigger("playingchange",ue.j.void))}},{key:"seek",value:function(e){this.localState.ready&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",ue.j.void))}},{key:"setVolume",value:function(e){this.localState.ready&&this.localState.volume!==e&&(this.localState.volume=e,this.client.setVolume(this.getDevice().id,e),this.trigger("volumechange",ue.j.void))}},{key:"setMuted",value:function(e){this.localState.ready&&this.localState.mute!==e&&(this.localState.mute=e,this.client.setMuted(this.getDevice().id,e),this.trigger("volumechange",ue.j.void))}},{key:"setSubtitles",value:function(e){return Le(this,void 0,void 0,Te().mark((function t(){var n;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.localState.ready){t.next=2;break}return t.abrupt("return");case 2:if(!e){t.next=5;break}return t.next=5,this.loadSource(this.localState.videoSource,e);case 5:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",ue.j.void));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"isPlaying",value:function(){return this.localState.playing}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackFinished}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){return this.localState.duration}},{key:"getVolume",value:function(){return this.localState.volume}},{key:"getMuted",value:function(){return this.localState.mute}},{key:"getSubtitles",value:function(){if(this.localState.subtitles)return this.localState.subtitleSource}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}])&&xe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ue.N);function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Ae(){Ae=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ne(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ne(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Be(r.key),r)}}function Be(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:String(t)}function Fe(){return Fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ze(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Fe.apply(this,arguments)}function Ue(e,t){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ue(e,t)}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}var ze=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Ge=1e4,qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ue(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ze(i);if(o){var n=Ze(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).options=e,t.accessToken="",t.devices=[],t.devicesFingerprint="",t.deviceDiscovery=new pe,t.bindFunctions(),t.initialize(),t}return t=s,r=[{key:"createAckId",value:function(){return we()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,me.Ds)(this.sendMessage,500,!0),this.beginDeviceDiscovery=this.beginDeviceDiscovery.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.authenticateWithVivi=this.authenticateWithVivi.bind(this),this.getRoomList=this.getRoomList.bind(this),this.joinRoom=this.joinRoom.bind(this),this.query=this.query.bind(this),this.loadQueue=this.loadQueue.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.stop=this.stop.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.setMuted=this.setMuted.bind(this),this.setSubtitles=this.setSubtitles.bind(this)}},{key:"initialize",value:function(){var e=this;this.webSocket=new ge(this.options.url.toString()),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return ze(e,void 0,void 0,Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=e.sent,e.next=6,this.authenticateWithVivi();case 6:this.beginDeviceDiscovery(),this.trigger("connected",ue.j.void),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),this.trigger("error",new Error("Could not connect to Vivi"));case 14:case"end":return e.stop()}}),e,this,[[0,10]])})))}}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule((function(){return ze(e,void 0,void 0,Ae().mark((function e(){var t,n;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(t=e.sent,(n=s.calculateFingerprint(t))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=t.map((function(e){return{id:e.id,name:e.name,type:ce.Y.Vivi,status:ce.L.Available}})),this.devicesFingerprint=n,this.trigger("deviceschange",ue.j.void),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.warn(e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,12]])})))})).trigger().start()}},{key:"dispose",value:function(){var e;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),Fe(Ze(s.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(e){return e===ce.Y.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new De(this,e)}},{key:"authenticateWithVivi",value:function(){return ze(this,void 0,void 0,Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.next=3,this.one("message",(function(e){return"video_api_identified"===e.message.type})).timeout(Ge).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return ze(this,void 0,void 0,Ae().mark((function e(){var t;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.next=3,this.one("message",(function(e){return"video_api_rooms"===e.message.type})).timeout(Ge).catch((function(){throw new Error("Failed to fetch rooms")}));case 3:return t=e.sent,e.abrupt("return",t.message.rooms||[]);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"joinRoom",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.next=3,this.one("message",(function(t){return t.source===e&&"connect"===t.message.type||"error"===t.message.type&&"already_connected"===t.message.error_type||void 0})).timeout(Ge).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){var n;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:n,name:"query"}}),t.next=4,this.one("message",(function(e){return e.message.ack_id===n})).timeout(Ge).catch((function(){throw new Error("Failed to fetch query")}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"loadQueue",value:function(e){var t=e.roomId,n=e.title,r=e.videoSource,i=e.subtitleSource;return ze(this,void 0,void 0,Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message_with_ack",ack_id:s.createAckId(),name:"queue_load",payload:{urls:[{title:n,url:r,suburl:i}]}}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"ready"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"paused"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"stopped"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to stop video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"seek",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to seek video")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setVolume",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"volume"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to set volume")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setMuted",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.next=3,this.one("message",(function(t){var n;return t.source===e&&"mute"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){var r;return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"set_subtitles",payload:{subtitles:t}}}),n.next=4,this.one("message",(function(t){return t.source===e&&t.message.ack_id===r})).timeout(Ge).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return n.stop()}}),n,this)})))}}])&&Ve(t.prototype,n),r&&Ve(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ue.N);function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Ye(e){return function(e){if(Array.isArray(e))return We(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?We(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qe(r.key),r)}}function Qe(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=He(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==He(t)?t:String(t)}function Xe(){return Xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ke(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Xe.apply(this,arguments)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}var et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ke(i);if(o){var n=Ke(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).instanceId=e,t.clients=[],t.bindFunctions(),t}return t=s,r=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new s(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],(n=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",(function(e){return t.trigger("error",e)})),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some((function(t){return t instanceof e}))}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find((function(t){return t.canCastToDevice(e.device.type)}));n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",(function(e){t.castSession.dispose(),t.trigger("error",e)})),this.castSession.on("dispose",(function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)})),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map((function(e){return e.getDevices()})).reduce((function(e,t){return[].concat(Ye(e),Ye(t))}),[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach((function(e){return e.dispose()})),this.castSession=void 0,this.clients=[],Xe(Ke(s.prototype),"dispose",this).call(this)}}])&&$e(t.prototype,n),r&&$e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ue.N);et.instances={};var tt=n(30050),nt=n(98115);function rt(e){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(e)}function it(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ot(r.key),r)}}function ot(e){var t=function(e,t){if("object"!=rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rt(t)?t:String(t)}function at(){return at="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ut(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},at.apply(this,arguments)}function st(e,t){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},st(e,t)}function ct(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ut(e){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ut(e)}var lt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&st(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ut(r);if(i){var n=ut(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ct(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).isVisible=n.isVisible.bind(ct(n)),n}return t=a,(n=[{key:"createEl",value:function(){return at(ut(a.prototype),"createEl",this).call(this,"li",{className:"vjs-menu-item cv-device-menu-item",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <span class="vjs-menu-item-text">').concat(this.options_.label,"</span>\n ")})}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){at(ut(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){at(ut(a.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!at(ut(a.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&it(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("MenuItem"));function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pt(r.key),r)}}function pt(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ft(t)?t:String(t)}function dt(){return dt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dt.apply(this,arguments)}function yt(e,t){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yt(e,t)}function vt(e){return vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vt(e)}var bt=o.Z.getComponent("MenuButton"),gt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vt(r);if(i){var n=vt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).alwaysCollapsed=!1,n.isCollapsed=!1,n.isCollabsible=!0,n.className="cv-devices-menu-button",n.searchText="",n.devices=[],n.castSession=void 0,n.bindFunctions(),n.bindEventListeners(),n}return t=a,n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",(function(){t.removeEventListener("blur",n)}))}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=bt.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(dt(vt(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new tt.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new nt.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new nt.C(this.player_,{label:"No devices found",selected:!1,selectable:!1,multiSelectable:!1}),this.headingItem.show(),this.searchInputItem.hide(),this.emptyPlaceholder.show(),t.push(this.headingItem,this.searchInputItem,this.emptyPlaceholder),t}},{key:"pressButton",value:function(){var e;dt(vt(a.prototype),"pressButton",this).call(this),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter((function(e){return e instanceof lt}))}},{key:"render",value:function(){this.removeMenuItems(this.getDeviceMenuItems()),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach((function(e){t.menu.removeChild(e),e.dispose()}))}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.sort((function(e,t){return"".concat(e.type,"-").concat(e.name).localeCompare("".concat(t.type,"-").concat(t.name))})).forEach((function(e){var n=new lt(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===ce.L.Available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)}))}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.headingItem.hide(),this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.headingItem.show(),this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach((function(t){var i,o=e.devices.find((function(e){return e.id===t.options_.id}));if(o){var a=o.status===ce.L.Available,s=!n||-1!==o.name.toLowerCase().indexOf(r),c=o.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id);a?t.enable():t.disable(),s?t.show():t.hide(),c?t.selected(!0):t.selected(!1)}}))}},{key:"toggleEmptyStatePlaceholder",value:function(){var e=this.getDeviceMenuItems();e.filter((function(e){return e.isVisible()})).length?this.emptyPlaceholder.hide():this.emptyPlaceholder.show(),e.length?this.emptyPlaceholder.setLabel(this.localize("No matching results")):this.emptyPlaceholder.setLabel(this.localize("No devices found"))}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){var e,t;return null!==(t=null===(e=this.castSession)||void 0===e?void 0:e.getDevice().name)&&void 0!==t?t:" "}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){this.handleClick()}},{key:"handleClick",value:function(){dt(vt(a.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],n&&ht(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(bt);gt.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",gt);var mt=n(10463);function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ot(r.key),r)}}function Ot(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wt(t)?t:String(t)}function St(){return St="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},St.apply(this,arguments)}function kt(e,t){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kt(e,t)}function jt(e){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jt(e)}var Ct=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jt(r);if(i){var n=jt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===wt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,null,e)}return t=a,(n=[{key:"createEl",value:function(){return St(jt(a.prototype),"createEl",this).call(this,"div",{className:"cv-devices-tech"})}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:ce.Y.Vivi],'"></span>').concat(null!==(r=null===(n=this.device)||void 0===n?void 0:n.name)&&void 0!==r?r:"",'</h2>\n </div>\n <div class="cv-devices-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var o=document.createElement("button"),a=function(e){e.stopPropagation(),i.options_.onStopCasting()};o.onclick=a,o.ontouchstart=a,o.className="stop-casting-button",o.innerHTML=this.localize("Stop casting"),this.el_.querySelector(".cv-devices-content").appendChild(o)}},{key:"play",value:function(){}}])&&Pt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("Component"));function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function Tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xt(r.key),r)}}function xt(e){var t=function(e,t){if("object"!=Et(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Et(t)?t:String(t)}function It(){return It="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},It.apply(this,arguments)}function _t(e,t){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_t(e,t)}function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}var Mt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_t(e,t)}(c,e);var t,n,r,i,a,s=(i=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Rt(i);if(a){var n=Rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=s.call(this,e,t)).featuresVolumeControl=!0,n.featuresPlaybackRate=!1,n.movingMediaElementInDOM=!1,n.featuresFullscreenResize=!0,n.featuresTimeupdateEvents=!0,n.featuresProgressEvents=!1,n.featuresNativeTextTracks=!1,n.featuresNativeAudioTracks=!1,n.featuresNativeVideoTracks=!1,n.featuresMuteControl=!0,n.featuresSourceset=!1,n.videojsPlayer=(0,o.Z)(n.options_.playerId),n.bindFunctions(),n.bindEventListeners(),n.ready((function(){n.setSource(n.options_.source)})),n.triggerReady(),n}return t=c,r=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!et.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return et.isActive()}}],(n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",(function(){t.dispose()})),t.on("durationchange",(function(){e.trigger("durationchange")})),t.on("dispose",(function(){e.trigger("ended"),e.hideUI()})),t.on("playingchange",(function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")})),t.on("volumechange",(function(){e.trigger("volumechange")})),t.on("sourceloaded",(function(){e.trigger("loadeddata")})),t.on("subtitleschange",(function(){e.setSelectedTextTrack(t.getSubtitles())})))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return mt.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){mt.O.forEachTrack(this.videojsPlayer.player_,(function(t){t.src===e?t.mode="showing":t.mode="hidden"}))}},{key:"showUI",value:function(e){this.ui&&(this.ui.setPoster(this.options_.poster),this.ui.setDevice(e),this.ui.show())}},{key:"hideUI",value:function(){var e;null===(e=this.ui)||void 0===e||e.hide()}},{key:"dispose",value:function(){this.textTracks().off("change",this.onTextTrackChanged);var e=this.getCastSession();e&&e.dispose(),It(Rt(c.prototype),"cleanupAutoTextTracks",this).call(this),It(Rt(c.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new Ct({onStopCasting:function(){var t;null===(t=e.getCastSession())||void 0===t||t.dispose()}}),this.ui.el()}},{key:"setSource",value:function(e){var t=this.getCastSession();if(t){this.showUI(t.getDevice()),this.trigger("loadstart");var n=this.getSelectedTextTrack();t.loadSource(e.src,null==n?void 0:n.src)}}},{key:"addRemoteTextTrack",value:function(e){return It(Rt(c.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return et.getOrCreateInstance(null!==(e=this.options_.instanceId)&&void 0!==e?e:"").getCastSession()}},{key:"play",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.play()}},{key:"pause",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.pause()}},{key:"paused",value:function(){var e;return!1===(null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaying())}},{key:"ended",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaybackFinished())&&void 0!==t&&t}},{key:"setCurrentTime",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.seek(null!=e?e:0)}},{key:"currentTime",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}},{key:"duration",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getDuration())&&void 0!==t?t:this.videojsPlayer.duration()}},{key:"volume",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getVolume())&&void 0!==t?t:1}},{key:"setVolume",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setVolume(e)}},{key:"muted",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getMuted())&&void 0!==t&&t}},{key:"setMuted",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setMuted(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return o.Z.createTimeRanges(0,this.duration())}},{key:"playbackRate",value:function(){return 1}},{key:"readyState",value:function(){return 4}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}}])&&Tt(t.prototype,n),r&&Tt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Z.getComponent("Tech"));function Lt(e){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lt(e)}function Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nt(r.key),r)}}function Nt(e){var t=function(e,t){if("object"!=Lt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lt(t)?t:String(t)}function At(){return At="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},At.apply(this,arguments)}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vt(e,t)}function Bt(e){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bt(e)}o.Z.registerTech("devices",Mt);var Ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bt(r);if(i){var n=Bt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,n.instanceId=null!==(i=null===(r=n.player.options_.devices)||void 0===r?void 0:r.instanceId)&&void 0!==i?i:"",n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.addViviClient=this.addViviClient.bind(this),this.addAppleTvClient=this.addAppleTvClient.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex((function(e){return"CustomControlSpacer"===e.name()})),r=this.getSessionManager();if(t&&n&&-1!==n&&r){r.on("deviceschange",this.onDevicesChanged),r.on("castsessionchange",this.onCastSessionChanged),r.on("error",this.onDevicesError);var i={onClick:function(){e.addViviClient(r),e.addAppleTvClient(r)},onDeviceMenuItemClick:function(t,n){var i;r.startCastSession({device:n,title:e.options.title}),null===(i=e.options.analyticsService)||void 0===i||i.logUserAction({device:n},{actionType:ae.Vw.Play,workflowPhase:ae.eu.Complete,descriptor:ae.UX.CastToDevice})}};this.devicesButton=t.addChild("DevicesButton",i,n+1)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.addClass("cv-device-".concat(e.getDevice().type)),this.player.isFullscreen()&&this.player.exitFullscreen()):(this.player.removeClass("cv-device-casting"),this.player.removeClass("cv-device-".concat(ce.Y.AppleTv)),this.player.removeClass("cv-device-".concat(ce.Y.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.viviEnabled&&this.options.viviApi&&this.options.fetchViviAccessToken&&!e.hasInstanceOfClient(qe)){var t=new qe({url:this.options.viviApi,fetchAccessToken:this.options.fetchViviAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTvEnabled&&this.options.fetchOnlineApiAccessToken&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(se.w)){var t=new se.w({fetchAccessToken:this.options.fetchOnlineApiAccessToken,trackingCode:this.options.trackingCode,userId:this.options.userId});e.addClient(t)}}},{key:"reloadTech",value:function(){var e=this.player,t=e.currentSources(),n=e.volume(),r=e.muted(),i=e.currentTime(),o=e.paused();e.src(t),e.one("playing",(function(){e.volume(n),e.muted(r),e.currentTime(i),o?e.pause():e.play()}))}},{key:"getSessionManager",value:function(){if(this.instanceId)return et.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e=this.getSessionManager();e&&(e.off("deviceschange",this.onDevicesChanged),e.off("castsessionchange",this.onCastSessionChanged),e.off("error",this.onDevicesError),et.disposeAndRemoveInstance(e),At(Bt(a.prototype),"dispose",this).call(this))}}])&&Dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function Zt(){Zt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ut(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ut(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qt(r.key),r)}}function qt(e){var t=function(e,t){if("object"!=Ut(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ut(t)?t:String(t)}function Ht(){return Ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ht.apply(this,arguments)}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}function Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}o.Z.registerPlugin("devicesPlugin",Ft);var $t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wt(r);if(i){var n=Wt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e,t)}return t=a,(n=[{key:"getPlayerOptions",value:function(){var e,t=Ht(Wt(a.prototype),"getPlayerOptions",this).call(this);return this.areDevicesEnabled()?Object.assign(Object.assign({},t),{techOrder:["devices"].concat((e=t.techOrder,function(e){if(Array.isArray(e))return zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),devices:{instanceId:we()}}):t}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t,n,r,i,o,s,c,u,l,f,h=this,p=Object.create(null,{additionalSetup:{get:function(){return Ht(Wt(a.prototype),"additionalSetup",h)}}});return c=this,u=void 0,l=void 0,f=Zt().mark((function a(){var c;return Zt().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(p.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){a.next=7;break}if(null!==(c=e.additionalData)){a.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:c.startTime,endTime:c.endTime});case 7:this.areDevicesEnabled()&&this.player.devicesPlugin({viviEnabled:null===(t=this.options.devicesConfig)||void 0===t?void 0:t.viviEnabled,viviApi:null===(n=this.options.devicesConfig)||void 0===n?void 0:n.viviApi,fetchViviAccessToken:null===(r=this.options.devicesConfig)||void 0===r?void 0:r.fetchViviAccessToken,appleTvEnabled:null===(i=this.options.devicesConfig)||void 0===i?void 0:i.appleTvEnabled,fetchOnlineApiAccessToken:null===(o=this.options.devicesConfig)||void 0===o?void 0:o.fetchOnlineApiAccessToken,trackingCode:null===(s=this.options.devicesConfig)||void 0===s?void 0:s.trackingCode,userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService});case 8:case"end":return a.stop()}}),a,this)})),new(l||(l=Promise))((function(e,t){function n(e){try{i(f.next(e))}catch(e){t(e)}}function r(e){try{i(f.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,r)}i((f=f.apply(c,u||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&Gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.r),Qt=n(63816),Xt=n(14735);function Jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kt(e){var t,n,i,o=r.useRef(e.player.duration()-e.player.currentTime()),a=(n=r.useState(o.current),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(n,i)||function(e,t){if(e){if("string"==typeof e)return Jt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jt(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];function u(){var t=e.player.duration()-e.player.currentTime();c(t),t>o.current&&(o.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",u),function(){e.player.off("timeupdate",u)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var l=Math.ceil(s),f=1===l?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",l," ",f,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function en(e){return en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(e)}function tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nn(r.key),r)}}function nn(e){var t=function(e,t){if("object"!=en(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=en(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==en(t)?t:String(t)}function rn(){return rn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=an(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},rn.apply(this,arguments)}function on(e,t){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},on(e,t)}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},an(e)}o.Z.registerComponent("UpNext",(0,Xt.Z)((function(e,t){return r.createElement(Kt,Object.assign({player:e},t))})));var sn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&on(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=an(r);if(i){var n=an(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===en(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,o.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,o.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=rn(an(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&tn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function cn(e){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(e)}function un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ln(r.key),r)}}function ln(e){var t=function(e,t){if("object"!=cn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=cn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cn(t)?t:String(t)}function fn(){return fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},fn.apply(this,arguments)}function hn(e,t){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hn(e,t)}function pn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dn(e)}o.Z.registerComponent("NextVideoMenuItem",sn);var yn="cv-persisttest",vn="cv-play-next-video",bn=o.Z.getPlugin("plugin"),gn=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hn(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=dn(r);if(i){var n=dn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===cn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pn(e)}(this,e)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(pn(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(pn(t)),t.getChapterTrack=t.getChapterTrack.bind(pn(t)),t.onTimeUpdate=t.onTimeUpdate.bind(pn(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem(vn);t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=a,(n=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return mt.O.getTrack(this.player,"chapters",null)}},{key:"setNextVideo",value:function(e,t,n){var r;this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:gn,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(vn,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),fn(dn(a.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();if(!(this.player.duration()<=0||this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint)){var n=this.getChapterTrack(),r=(null===(e=null==n?void 0:n.activeCues)||void 0===e?void 0:e.length)&&n.activeCues[0];"credits"===(null===(t=null==r?void 0:r.text)||void 0===t?void 0:t.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext()}}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(yn,"persistPlayNext"),window.localStorage.removeItem(yn),!0}catch(e){return!1}}}])&&un(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(bn);o.Z.registerPlugin("nextVideoPlugin",mn);var wn=n(26733);function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}function On(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sn(r.key),r)}}function Sn(e){var t=function(e,t){if("object"!=Pn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pn(t)?t:String(t)}function kn(e,t){return kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kn(e,t)}function jn(e){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(e)}function Cn(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(wn.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var En=(0,Xt.Z)((function(e,t){return r.createElement(Cn,Object.assign({},t))})),Tn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jn(r);if(i){var n=jn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Pn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),n=a.call(this,e,t);var r=new En(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=s,(n=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&On(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("ClickableComponent"));function xn(e){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(e)}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_n(r.key),r)}}function _n(e){var t=function(e,t){if("object"!=xn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=xn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xn(t)?t:String(t)}function Rn(){return Rn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ln(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rn.apply(this,arguments)}function Mn(e,t){return Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mn(e,t)}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(e)}var Dn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ln(r);if(i){var n=Ln(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===xn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=s,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Rn(Ln(s.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(Rn(Ln(s.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){Rn(Ln(s.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",Rn(Ln(s.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new Tn(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=o.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",o.Z.dom.appendContent(o.Z.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){Rn(Ln(s.prototype),"handleClick",this).call(this,null)}}])&&In(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuButton"));function Nn(e){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(e)}function An(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vn(r.key),r)}}function Vn(e){var t=function(e,t){if("object"!=Nn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nn(t)?t:String(t)}function Bn(e,t){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bn(e,t)}function Fn(e){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fn(e)}Dn.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",Dn);var Un=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bn(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fn(r);if(i){var n=Fn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&An(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",Un);var Zn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function zn(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=Zn(e,["className","playerApi","onReady","onDispose"]),c=r.useRef();return r.useEffect((function(){if(c){var e=new $t(c.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,Qt.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:c,className:n})}}}]);