@clickview/lite 0.36.0 → 0.36.2

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 (218) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/scripts/1316-3b78ae90ef-lite.chunk.js +1 -0
  3. package/dist/scripts/1519-5c21eee079-lite.chunk.js +1 -0
  4. package/dist/scripts/{1526-eda6832e12-lite.chunk.js → 1526-0f72117fdc-lite.chunk.js} +1 -1
  5. package/dist/scripts/{1581-c8b514e700-lite.chunk.js → 1581-9b60e699ee-lite.chunk.js} +1 -1
  6. package/dist/scripts/{1672-477ad27e45-lite.chunk.js → 1672-9ae25f79a6-lite.chunk.js} +1 -1
  7. package/dist/scripts/{1750-82cf9361fb-lite.chunk.js → 1750-d677c82b93-lite.chunk.js} +1 -1
  8. package/dist/scripts/{1913-6117995be8-lite.chunk.js → 1913-43df0909bf-lite.chunk.js} +1 -1
  9. package/dist/scripts/1919-f05344431a-lite.chunk.js +1 -0
  10. package/dist/scripts/2188-174de868f2-lite.chunk.js +1 -0
  11. package/dist/scripts/{2208-8752ddeb01-lite.chunk.js → 2208-5d63d28256-lite.chunk.js} +1 -1
  12. package/dist/scripts/2235-b860a77f30-lite.chunk.js +1 -0
  13. package/dist/scripts/2261-820480df8d-lite.chunk.js +1 -0
  14. package/dist/scripts/{2279-d09cf05062-lite.chunk.js → 2279-f9d0768764-lite.chunk.js} +1 -1
  15. package/dist/scripts/{2408-04112a0ed3-lite.chunk.js → 2408-1c0420cd0f-lite.chunk.js} +1 -1
  16. package/dist/scripts/{268-3513266caf-lite.chunk.js → 268-0982a108d8-lite.chunk.js} +1 -1
  17. package/dist/scripts/{2703-6652948b3d-lite.chunk.js → 2703-dacf5ee1d8-lite.chunk.js} +2 -2
  18. package/dist/scripts/{2767-299f58bb17-lite.chunk.js → 2767-7532ad0f94-lite.chunk.js} +1 -1
  19. package/dist/scripts/{287-251e42ad52-lite.chunk.js → 287-a1818f9bf8-lite.chunk.js} +1 -1
  20. package/dist/scripts/{3020-e6ec52d6b9-lite.chunk.js → 3020-715b046c67-lite.chunk.js} +1 -1
  21. package/dist/scripts/{316-0c68716c18-lite.chunk.js → 316-d1a5484ee3-lite.chunk.js} +1 -1
  22. package/dist/scripts/3216-d62de73736-lite.chunk.js +1 -0
  23. package/dist/scripts/{3237-4d6fd8d721-lite.chunk.js → 3237-5fcc546b28-lite.chunk.js} +1 -1
  24. package/dist/scripts/355-f5816bab06-lite.chunk.js +1 -0
  25. package/dist/scripts/3645-d1313ec6dc-lite.chunk.js +2 -0
  26. package/dist/scripts/3654-91094bc6ab-lite.chunk.js +1 -0
  27. package/dist/scripts/3667-edacb1adec-lite.chunk.js +2 -0
  28. package/dist/scripts/3728-51b81bfa83-lite.chunk.js +1 -0
  29. package/dist/scripts/3836-9906ead671-lite.chunk.js +1 -0
  30. package/dist/scripts/3848-449dd2f5c7-lite.chunk.js +1 -0
  31. package/dist/scripts/3966-ccf16c94d8-lite.chunk.js +1 -0
  32. package/dist/scripts/{4032-ad48f98700-lite.chunk.js → 4032-26ca5f363d-lite.chunk.js} +1 -1
  33. package/dist/scripts/407-9308ebdfdb-lite.chunk.js +2 -0
  34. package/dist/scripts/414-50eeedf502-lite.chunk.js +1 -0
  35. package/dist/scripts/{4210-0bc465eb67-lite.chunk.js → 4210-7ff100fda6-lite.chunk.js} +1 -1
  36. package/dist/scripts/4393-6ec554cc38-lite.chunk.js +1 -0
  37. package/dist/scripts/4436-4735d2de37-lite.chunk.js +1 -0
  38. package/dist/scripts/4441-1ce1dfb887-lite.chunk.js +2 -0
  39. package/dist/scripts/4612-f61cc8757a-lite.chunk.js +1 -0
  40. package/dist/scripts/4617-7342e91fe1-lite.chunk.js +1 -0
  41. package/dist/scripts/4676-f42625f630-lite.chunk.js +2 -0
  42. package/dist/scripts/{4690-e9b4d6108b-lite.chunk.js → 4690-1a0ed4a011-lite.chunk.js} +1 -1
  43. package/dist/scripts/{4753-d8e01a7af9-lite.chunk.js → 4753-bc445c1167-lite.chunk.js} +1 -1
  44. package/dist/scripts/4956-65a6d22162-lite.chunk.js +1 -0
  45. package/dist/scripts/5041-08eb711e53-lite.chunk.js +1 -0
  46. package/dist/scripts/{5143-56be0b0492-lite.chunk.js → 5143-8ad2cd9a86-lite.chunk.js} +1 -1
  47. package/dist/scripts/5177-c2ee8e5e62-lite.chunk.js +2 -0
  48. package/dist/scripts/{5271-da40b4f079-lite.chunk.js → 5271-1af494d9bd-lite.chunk.js} +1 -1
  49. package/dist/scripts/5442-82e8147edc-lite.chunk.js +2 -0
  50. package/dist/scripts/{5622-ec86230254-lite.chunk.js → 5622-2f5f33f31b-lite.chunk.js} +2 -2
  51. package/dist/scripts/{5940-d380295b7d-lite.chunk.js → 5940-c6c480e93b-lite.chunk.js} +1 -1
  52. package/dist/scripts/5965-24f708ac5a-lite.chunk.js +1 -0
  53. package/dist/scripts/5986-f52ce07dda-lite.chunk.js +1 -0
  54. package/dist/scripts/6086-ab856f75f4-lite.chunk.js +2 -0
  55. package/dist/scripts/615-0a32f1718e-lite.chunk.js +1 -0
  56. package/dist/scripts/6330-f92aca3b84-lite.chunk.js +1 -0
  57. package/dist/scripts/6368-eb06a0ad34-lite.chunk.js +1 -0
  58. package/dist/scripts/6532-19e258fc3e-lite.chunk.js +1 -0
  59. package/dist/scripts/6572-d500d16bea-lite.chunk.js +1 -0
  60. package/dist/scripts/{6683-6c73d08b10-lite.chunk.js → 6683-1f019395b5-lite.chunk.js} +1 -1
  61. package/dist/scripts/{6788-7c9e54bb74-lite.chunk.js → 6788-7805c988fb-lite.chunk.js} +1 -1
  62. package/dist/scripts/6801-be6a885497-lite.chunk.js +1 -0
  63. package/dist/scripts/6823-55bb7ea39d-lite.chunk.js +2 -0
  64. package/dist/scripts/{6891-8f643cb84b-lite.chunk.js → 6891-ed89dc9a1e-lite.chunk.js} +1 -1
  65. package/dist/scripts/6896-e10e31b0be-lite.chunk.js +2 -0
  66. package/dist/scripts/7017-c28af137aa-lite.chunk.js +2 -0
  67. package/dist/scripts/{7020-0bd1bd792e-lite.chunk.js → 7020-f566692803-lite.chunk.js} +1 -1
  68. package/dist/scripts/7052-e3cdaf2705-lite.chunk.js +2 -0
  69. package/dist/scripts/{7072-e5581f0660-lite.chunk.js → 7072-a42ba147b6-lite.chunk.js} +2 -2
  70. package/dist/scripts/7117-823b47ea37-lite.chunk.js +1 -0
  71. package/dist/scripts/{7119-aa44eac363-lite.chunk.js → 7119-55c151dbd0-lite.chunk.js} +1 -1
  72. package/dist/scripts/7178-08d7d5b8f9-lite.chunk.js +1 -0
  73. package/dist/scripts/7205-9e7a21b8fb-lite.chunk.js +1 -0
  74. package/dist/scripts/{7221-d71ae05428-lite.chunk.js → 7221-f5d0743e30-lite.chunk.js} +2 -2
  75. package/dist/scripts/7288-3d3041485c-lite.chunk.js +1 -0
  76. package/dist/scripts/{7351-5cb5ec25ae-lite.chunk.js → 7351-cf211ef2be-lite.chunk.js} +1 -1
  77. package/dist/scripts/7506-75116824b9-lite.chunk.js +1 -0
  78. package/dist/scripts/{7540-2694a96451-lite.chunk.js → 7540-419fef286c-lite.chunk.js} +1 -1
  79. package/dist/scripts/{7555-3d6fa65b58-lite.chunk.js → 7555-e07c20aa0d-lite.chunk.js} +1 -1
  80. package/dist/scripts/{7703-6db81722e0-lite.chunk.js → 7703-129b1e1e3a-lite.chunk.js} +1 -1
  81. package/dist/scripts/7726-f8254bfae5-lite.chunk.js +1 -0
  82. package/dist/scripts/8046-7eb3d64095-lite.chunk.js +1 -0
  83. package/dist/scripts/{8323-d72038b720-lite.chunk.js → 8323-e2892d3bed-lite.chunk.js} +1 -1
  84. package/dist/scripts/{8466-627dcf6218-lite.chunk.js → 8466-28b234fa06-lite.chunk.js} +1 -1
  85. package/dist/scripts/{8621-667296796a-lite.chunk.js → 8621-33444f5967-lite.chunk.js} +1 -1
  86. package/dist/scripts/8759-82103294ce-lite.chunk.js +1 -0
  87. package/dist/scripts/8763-8fc868e00e-lite.chunk.js +1 -0
  88. package/dist/scripts/{8771-fdb379457c-lite.chunk.js → 8771-4f43107eb8-lite.chunk.js} +1 -1
  89. package/dist/scripts/8834-bb079c32a4-lite.chunk.js +1 -0
  90. package/dist/scripts/{8905-7e47ba1360-lite.chunk.js → 8905-b20846e78c-lite.chunk.js} +1 -1
  91. package/dist/scripts/{9016-3aafc7c4a4-lite.chunk.js → 9016-68a0088483-lite.chunk.js} +1 -1
  92. package/dist/scripts/{9118-43d2bf9226-lite.chunk.js → 9118-fa90cbd0e5-lite.chunk.js} +1 -1
  93. package/dist/scripts/9226-81363cd855-lite.chunk.js +1 -0
  94. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js +2 -0
  95. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js.LICENSE.txt +1 -0
  96. package/dist/scripts/9242-1c8f6cce62-lite.chunk.js +1 -0
  97. package/dist/scripts/9254-130731e6f1-lite.chunk.js +1 -0
  98. package/dist/scripts/9433-ccb1650cbb-lite.chunk.js +1 -0
  99. package/dist/scripts/{9657-8fd569479f-lite.chunk.js → 9657-41ca234a74-lite.chunk.js} +1 -1
  100. package/dist/scripts/{9660-bec1db5818-lite.chunk.js → 9660-2ac4fe421e-lite.chunk.js} +1 -1
  101. package/dist/scripts/9704-b417ccbb66-lite.chunk.js +1 -0
  102. package/dist/scripts/{9719-32b0388f01-lite.chunk.js → 9719-c890a68331-lite.chunk.js} +1 -1
  103. package/dist/scripts/9719-c890a68331-lite.chunk.js.LICENSE.txt +1 -0
  104. package/dist/scripts/bundle-ac8f244a93.min.js +2 -0
  105. package/jest.config.js +11 -11
  106. package/package.json +62 -62
  107. package/typings/libs/CVEvents.d.ts +12 -12
  108. package/typings/libs/CVLanguages.d.ts +24 -24
  109. package/typings/libs/cloneDeep.d.ts +4 -4
  110. package/typings/libs/cookiesjs.d.ts +25 -25
  111. package/typings/libs/draft-convert.d.ts +3 -3
  112. package/typings/libs/google-api.d.ts +93 -93
  113. package/typings/libs/intersection-observer.d.ts +82 -82
  114. package/typings/libs/microsoft-teams.d.ts +2 -2
  115. package/typings/libs/react-table-config.d.ts +138 -138
  116. package/typings/libs/trackjs.d.ts +2 -2
  117. package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
  118. package/typings/utils/imports.d.ts +13 -13
  119. package/dist/scripts/1316-0707504efc-lite.chunk.js +0 -1
  120. package/dist/scripts/1519-daa7327e00-lite.chunk.js +0 -1
  121. package/dist/scripts/1919-5393388d59-lite.chunk.js +0 -1
  122. package/dist/scripts/2188-eb2a129a0c-lite.chunk.js +0 -1
  123. package/dist/scripts/2235-02fa6854c8-lite.chunk.js +0 -1
  124. package/dist/scripts/2261-93fd134a56-lite.chunk.js +0 -1
  125. package/dist/scripts/3216-9caff8afdd-lite.chunk.js +0 -1
  126. package/dist/scripts/355-3eb0659bd4-lite.chunk.js +0 -1
  127. package/dist/scripts/3645-179c1de58b-lite.chunk.js +0 -2
  128. package/dist/scripts/3654-96999f107e-lite.chunk.js +0 -1
  129. package/dist/scripts/3667-fff988dddb-lite.chunk.js +0 -2
  130. package/dist/scripts/3728-8f767eeedd-lite.chunk.js +0 -1
  131. package/dist/scripts/3836-060f903a23-lite.chunk.js +0 -1
  132. package/dist/scripts/3848-a3b274c11c-lite.chunk.js +0 -1
  133. package/dist/scripts/3966-985e03cb46-lite.chunk.js +0 -1
  134. package/dist/scripts/407-d836e312b8-lite.chunk.js +0 -2
  135. package/dist/scripts/4393-bb6bbe6eb1-lite.chunk.js +0 -1
  136. package/dist/scripts/4436-b92639529d-lite.chunk.js +0 -1
  137. package/dist/scripts/4441-58bb0c8a0e-lite.chunk.js +0 -2
  138. package/dist/scripts/4612-cfc046e6e9-lite.chunk.js +0 -1
  139. package/dist/scripts/4617-d497047b0b-lite.chunk.js +0 -1
  140. package/dist/scripts/4956-340c8b5771-lite.chunk.js +0 -1
  141. package/dist/scripts/5041-8e820ed93c-lite.chunk.js +0 -1
  142. package/dist/scripts/5177-fea828bbdb-lite.chunk.js +0 -2
  143. package/dist/scripts/5442-b859040432-lite.chunk.js +0 -2
  144. package/dist/scripts/5965-395234cb2b-lite.chunk.js +0 -1
  145. package/dist/scripts/5986-8f05456911-lite.chunk.js +0 -1
  146. package/dist/scripts/6086-06d5d40e66-lite.chunk.js +0 -2
  147. package/dist/scripts/615-0322d641a3-lite.chunk.js +0 -1
  148. package/dist/scripts/6330-0edd6eac5c-lite.chunk.js +0 -1
  149. package/dist/scripts/6368-744497853e-lite.chunk.js +0 -1
  150. package/dist/scripts/6532-5bc872b460-lite.chunk.js +0 -1
  151. package/dist/scripts/6572-c4534d0d35-lite.chunk.js +0 -1
  152. package/dist/scripts/6725-2c4851047d-lite.chunk.js +0 -1
  153. package/dist/scripts/6736-7223de888f-lite.chunk.js +0 -2
  154. package/dist/scripts/6801-a957a1b187-lite.chunk.js +0 -1
  155. package/dist/scripts/6823-b2eb2f9837-lite.chunk.js +0 -2
  156. package/dist/scripts/6896-7e04f73dcd-lite.chunk.js +0 -1
  157. package/dist/scripts/7017-d02a197561-lite.chunk.js +0 -1
  158. package/dist/scripts/7052-7a62e4f75e-lite.chunk.js +0 -2
  159. package/dist/scripts/7117-1da2d8e101-lite.chunk.js +0 -1
  160. package/dist/scripts/7178-36185f322a-lite.chunk.js +0 -1
  161. package/dist/scripts/7205-20ace43ff9-lite.chunk.js +0 -1
  162. package/dist/scripts/7288-8fca167593-lite.chunk.js +0 -1
  163. package/dist/scripts/7506-d91786f020-lite.chunk.js +0 -1
  164. package/dist/scripts/7726-ba49ddf33f-lite.chunk.js +0 -1
  165. package/dist/scripts/8046-85f5376494-lite.chunk.js +0 -1
  166. package/dist/scripts/8759-d8e5c29a2e-lite.chunk.js +0 -1
  167. package/dist/scripts/8772-80fa99f8f4-lite.chunk.js +0 -1
  168. package/dist/scripts/8834-ed4a58675e-lite.chunk.js +0 -1
  169. package/dist/scripts/9226-ac0d7f7e2b-lite.chunk.js +0 -1
  170. package/dist/scripts/9230-c680de51dd-lite.chunk.js +0 -2
  171. package/dist/scripts/9242-3453684c9f-lite.chunk.js +0 -1
  172. package/dist/scripts/9254-a56914f3fc-lite.chunk.js +0 -1
  173. package/dist/scripts/9433-255ea943a7-lite.chunk.js +0 -1
  174. package/dist/scripts/9704-cfcc679915-lite.chunk.js +0 -1
  175. package/dist/scripts/bundle-4352f30225.min.js +0 -2
  176. /package/dist/css/{6725-lite-db1dbcbd39.chunk.css → 414-lite-db1dbcbd39.chunk.css} +0 -0
  177. /package/dist/css/{8772-lite-db1dbcbd39.chunk.css → 8763-lite-db1dbcbd39.chunk.css} +0 -0
  178. /package/dist/scripts/{1461-dfff501bca-lite.chunk.js → 1461-249b97f692-lite.chunk.js} +0 -0
  179. /package/dist/scripts/{1672-477ad27e45-lite.chunk.js.LICENSE.txt → 1672-9ae25f79a6-lite.chunk.js.LICENSE.txt} +0 -0
  180. /package/dist/scripts/{1725-e5ea09eb1e-lite.chunk.js → 1725-0e284a32f3-lite.chunk.js} +0 -0
  181. /package/dist/scripts/{1891-14c0a7067f-lite.chunk.js → 1891-dd253c3378-lite.chunk.js} +0 -0
  182. /package/dist/scripts/{2452-446607a894-lite.chunk.js → 2452-f96e548d17-lite.chunk.js} +0 -0
  183. /package/dist/scripts/{2703-6652948b3d-lite.chunk.js.LICENSE.txt → 2703-dacf5ee1d8-lite.chunk.js.LICENSE.txt} +0 -0
  184. /package/dist/scripts/{3311-01c48c762e-lite.chunk.js → 3311-24c70f911f-lite.chunk.js} +0 -0
  185. /package/dist/scripts/{3645-179c1de58b-lite.chunk.js.LICENSE.txt → 3645-d1313ec6dc-lite.chunk.js.LICENSE.txt} +0 -0
  186. /package/dist/scripts/{3667-fff988dddb-lite.chunk.js.LICENSE.txt → 3667-edacb1adec-lite.chunk.js.LICENSE.txt} +0 -0
  187. /package/dist/scripts/{407-d836e312b8-lite.chunk.js.LICENSE.txt → 407-9308ebdfdb-lite.chunk.js.LICENSE.txt} +0 -0
  188. /package/dist/scripts/{4182-86ebd7cc85-lite.chunk.js → 4182-6869dfda31-lite.chunk.js} +0 -0
  189. /package/dist/scripts/{4441-58bb0c8a0e-lite.chunk.js.LICENSE.txt → 4441-1ce1dfb887-lite.chunk.js.LICENSE.txt} +0 -0
  190. /package/dist/scripts/{5177-fea828bbdb-lite.chunk.js.LICENSE.txt → 4676-f42625f630-lite.chunk.js.LICENSE.txt} +0 -0
  191. /package/dist/scripts/{5442-b859040432-lite.chunk.js.LICENSE.txt → 5177-c2ee8e5e62-lite.chunk.js.LICENSE.txt} +0 -0
  192. /package/dist/scripts/{5306-04f0322aa4-lite.chunk.js → 5306-19a098a353-lite.chunk.js} +0 -0
  193. /package/dist/scripts/{5622-ec86230254-lite.chunk.js.LICENSE.txt → 5442-82e8147edc-lite.chunk.js.LICENSE.txt} +0 -0
  194. /package/dist/scripts/{5606-adb8a4564d-lite.chunk.js → 5606-68f1afd060-lite.chunk.js} +0 -0
  195. /package/dist/scripts/{6086-06d5d40e66-lite.chunk.js.LICENSE.txt → 5622-2f5f33f31b-lite.chunk.js.LICENSE.txt} +0 -0
  196. /package/dist/scripts/{5877-855b112687-lite.chunk.js → 5877-1dc9ca4f2d-lite.chunk.js} +0 -0
  197. /package/dist/scripts/{6683-6c73d08b10-lite.chunk.js.LICENSE.txt → 6086-ab856f75f4-lite.chunk.js.LICENSE.txt} +0 -0
  198. /package/dist/scripts/{6290-9cfcecf418-lite.chunk.js → 6290-b8e7be07c0-lite.chunk.js} +0 -0
  199. /package/dist/scripts/{6450-ccd62009a0-lite.chunk.js → 6450-397ca8ed54-lite.chunk.js} +0 -0
  200. /package/dist/scripts/{6604-19f0427fcc-lite.chunk.js → 6604-d331808398-lite.chunk.js} +0 -0
  201. /package/dist/scripts/{6736-7223de888f-lite.chunk.js.LICENSE.txt → 6683-1f019395b5-lite.chunk.js.LICENSE.txt} +0 -0
  202. /package/dist/scripts/{6746-85bf67464e-lite.chunk.js → 6746-a32d22602e-lite.chunk.js} +0 -0
  203. /package/dist/scripts/{6823-b2eb2f9837-lite.chunk.js.LICENSE.txt → 6823-55bb7ea39d-lite.chunk.js.LICENSE.txt} +0 -0
  204. /package/dist/scripts/{7052-7a62e4f75e-lite.chunk.js.LICENSE.txt → 6896-e10e31b0be-lite.chunk.js.LICENSE.txt} +0 -0
  205. /package/dist/scripts/{7072-e5581f0660-lite.chunk.js.LICENSE.txt → 7017-c28af137aa-lite.chunk.js.LICENSE.txt} +0 -0
  206. /package/dist/scripts/{7221-d71ae05428-lite.chunk.js.LICENSE.txt → 7052-e3cdaf2705-lite.chunk.js.LICENSE.txt} +0 -0
  207. /package/dist/scripts/{8323-d72038b720-lite.chunk.js.LICENSE.txt → 7072-a42ba147b6-lite.chunk.js.LICENSE.txt} +0 -0
  208. /package/dist/scripts/{714-2e1c842a30-lite.chunk.js → 714-851d42f69f-lite.chunk.js} +0 -0
  209. /package/dist/scripts/{7167-48d515fcfe-lite.chunk.js → 7167-149abadcc3-lite.chunk.js} +0 -0
  210. /package/dist/scripts/{9230-c680de51dd-lite.chunk.js.LICENSE.txt → 7221-f5d0743e30-lite.chunk.js.LICENSE.txt} +0 -0
  211. /package/dist/scripts/{7432-2afa43af27-lite.chunk.js → 7432-0e394c6ee9-lite.chunk.js} +0 -0
  212. /package/dist/scripts/{7679-8bed680cf6-lite.chunk.js → 7679-939501a815-lite.chunk.js} +0 -0
  213. /package/dist/scripts/{7818-c81c2d60b9-lite.chunk.js → 7818-a9ab33bdd4-lite.chunk.js} +0 -0
  214. /package/dist/scripts/{9719-32b0388f01-lite.chunk.js.LICENSE.txt → 8323-e2892d3bed-lite.chunk.js.LICENSE.txt} +0 -0
  215. /package/dist/scripts/{8982-12ad6a9e9b-lite.chunk.js → 8982-267320e287-lite.chunk.js} +0 -0
  216. /package/dist/scripts/{9016-3aafc7c4a4-lite.chunk.js.LICENSE.txt → 9016-68a0088483-lite.chunk.js.LICENSE.txt} +0 -0
  217. /package/dist/scripts/{9537-80900593e8-lite.chunk.js → 9537-da73fc8952-lite.chunk.js} +0 -0
  218. /package/dist/scripts/{bundle-4352f30225.min.js.LICENSE.txt → bundle-ac8f244a93.min.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5177-fea828bbdb-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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==r(e)||null===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)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(t,{n:()=>o});var o=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(75163),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:()=>mn});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,(void 0,i=function(e,t){if("object"!==a(e)||null===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)}(r.key),"symbol"===a(i)?i:String(i)),r)}var i}function c(){return c="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=l(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}},c.apply(this,arguments)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var f=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,r,i,o=(r=f,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=l(r);if(i){var n=l(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 f(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(e=o.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=f,(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(){c(l(f.prototype),"handleClick",this).call(this,null)}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Z.getComponent("Button"));function h(e){return h="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},h(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,(void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===h(i)?i:String(i)),r)}var i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}f.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",f);var v=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&&d(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=y(r);if(i){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===h(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)}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function b(e){return b="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},b(e)}function g(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,(void 0,i=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(i)?i:String(i)),r)}var i}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}o.Z.registerPlugin("createClipButtonPlugin",v);var P=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&&m(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=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(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()}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("PictureInPictureToggle"));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 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,(void 0,i=function(e,t){if("object"!==O(e)||null===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)}(r.key),"symbol"===O(i)?i:String(i)),r)}var i}function k(){return k="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=C(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}},k.apply(this,arguments)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}o.Z.registerComponent("PictureInPictureToggle",P);var E=o.Z.getComponent("PlayToggle"),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&&j(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=C(r);if(i){var n=C(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 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 E(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,k(C(a.prototype),"dispose",this).call(this)}}])&&S(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",T);var x=n(23035),I=n(42892),_=n(73758);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 M(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,(void 0,i=function(e,t){if("object"!==R(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===R(i)?i:String(i)),r)}var i}function L(){return L="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=A(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}},L.apply(this,arguments)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var V=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&&D(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=A(r);if(i){var n=A(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(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=_.n,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(N(n)),n.onMouseLeave=n.onMouseLeave.bind(N(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(N(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(N(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(L(A(s.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return L(A(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")}}])&&M(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("Component"));function B(e){return B="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},B(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,(void 0,i=function(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==B(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===B(i)?i:String(i)),r)}var i}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=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}},U.apply(this,arguments)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}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&&Z(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"===B(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=U(z(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}}])&&F(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function q(e){return q="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},q(e)}function H(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,(void 0,i=function(e,t){if("object"!==q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===q(i)?i:String(i)),r)}var i}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}o.Z.registerComponent("PointsOfInterestMenuItem",G);var Q=o.Z.getPlugin("plugin"),X="cvplayer-points-of-interest",J=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&&Y(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=$(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"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return W(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(W(n)),n.updateBuffered=n.updateBuffered.bind(W(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(W(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=a,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(I.S.hasLocalStorage()&&"false"===I.S.get(X)&&(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){I.S.set(X,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 V(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:G,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,x.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&H(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Q);o.Z.registerPlugin("pointsOfInterestPlugin",J),n(93262);var K=n(65858),ee=n(86086),te=n(12399),ne=n(6156);function re(e){return re="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},re(e)}function ie(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,(void 0,i=function(e,t){if("object"!==re(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==re(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===re(i)?i:String(i)),r)}var i}var oe=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}}])&&ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ae(e){return ae="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},ae(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,(void 0,i=function(e,t){if("object"!==ae(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===ae(i)?i:String(i)),r)}var i}var ce={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},ue=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce;!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({},ce),r),this.webSocket=this.connect(),this.heartbeat=(new oe).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()}}])&&se(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),le=n(95569),fe=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()},he=n(35884);function pe(e){return pe="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},pe(e)}function de(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,(void 0,i=function(e,t){if("object"!==pe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===pe(i)?i:String(i)),r)}var i}var ye,ve=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=he.l.withDebouncedSetters(this,2e3),he.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}}])&&de(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function be(e){return be="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},be(e)}function ge(){ge=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"==be(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(be(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 me(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,(void 0,i=function(e,t){if("object"!==be(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===be(i)?i:String(i)),r)}var i}function we(){return we="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=Oe(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}},we.apply(this,arguments)}function Pe(e,t){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pe(e,t)}function Oe(e){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(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",e.Subtitles="subtitles"}(ye||(ye={}));var Se=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())}))},ke=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&&Pe(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=Oe(r);if(i){var n=Oe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===be(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 ve(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)})),we(Oe(a.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Se(this,void 0,void 0,ge().mark((function e(){return ge().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 ye.Update:this.handleUpdateMessage(t,n);break;case ye.NewChapter:this.handleNewChapterMessage(t,n);break;case ye.Volume:this.handleVolumeMessage(t,n);break;case ye.Playing:this.handlePlayingMessage(t);break;case ye.Paused:this.handlePausedMessage(t);break;case ye.Finished:this.handleFinishedMessage(t);break;case ye.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",ne.j.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",ne.j.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",ne.j.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",ne.j.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",ne.j.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",ne.j.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",ne.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",ne.j.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Se(this,void 0,void 0,ge().mark((function n(){var r,i;return ge().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",ne.j.void),i>0&&this.seek(i),t&&this.setSubtitles(t),n.next=22;break;case 18:n.prev=18,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 22:case"end":return n.stop()}}),n,this,[[2,18]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",ne.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",ne.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",ne.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",ne.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",ne.j.void))}},{key:"setSubtitles",value:function(e){return Se(this,void 0,void 0,ge().mark((function t(){var n;return ge().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",ne.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}}])&&me(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ne.N);function je(e){return je="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},je(e)}function Ce(){Ce=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"==je(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(je(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 Ee(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,(void 0,i=function(e,t){if("object"!==je(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==je(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===je(i)?i:String(i)),r)}var i}function Te(){return Te="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=Ie(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}},Te.apply(this,arguments)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}var _e=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())}))},Re=1e4,Me=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&&xe(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=Ie(i);if(o){var n=Ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===je(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 oe,t.bindFunctions(),t.initialize(),t}return t=s,r=[{key:"createAckId",value:function(){return fe()}},{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,le.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 ue(this.options.url.toString()),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return _e(e,void 0,void 0,Ce().mark((function e(){return Ce().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",ne.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 _e(e,void 0,void 0,Ce().mark((function e(){var t,n;return Ce().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:te.Y.Vivi,status:te.L.Available}})),this.devicesFingerprint=n,this.trigger("deviceschange",ne.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(),Te(Ie(s.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(e){return e===te.Y.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new ke(this,e)}},{key:"authenticateWithVivi",value:function(){return _e(this,void 0,void 0,Ce().mark((function e(){return Ce().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(Re).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return _e(this,void 0,void 0,Ce().mark((function e(){var t;return Ce().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(Re).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 _e(this,void 0,void 0,Ce().mark((function t(){return Ce().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(Re).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return _e(this,void 0,void 0,Ce().mark((function t(){var n;return Ce().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(Re).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 _e(this,void 0,void 0,Ce().mark((function e(){return Ce().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(Re).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return _e(this,void 0,void 0,Ce().mark((function t(){return Ce().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(Re).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return _e(this,void 0,void 0,Ce().mark((function t(){return Ce().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(Re).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return _e(this,void 0,void 0,Ce().mark((function t(){return Ce().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(Re).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 _e(this,void 0,void 0,Ce().mark((function n(){return Ce().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(Re).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 _e(this,void 0,void 0,Ce().mark((function n(){return Ce().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(Re).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 _e(this,void 0,void 0,Ce().mark((function n(){return Ce().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(Re).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 _e(this,void 0,void 0,Ce().mark((function n(){var r;return Ce().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){var n;return t.source===e&&"subtitles"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Re).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return n.stop()}}),n,this)})))}}])&&Ee(t.prototype,n),r&&Ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ne.N);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 De(e){return function(e){if(Array.isArray(e))return Ne(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 Ne(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)?Ne(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 Ne(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 Ae(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,(void 0,i=function(e,t){if("object"!==Le(e)||null===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)}(r.key),"symbol"===Le(i)?i:String(i)),r)}var i}function Ve(){return Ve="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=Fe(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}},Ve.apply(this,arguments)}function Be(e,t){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Be(e,t)}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fe(e)}var Ue=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&&Be(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=Fe(i);if(o){var n=Fe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Le(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(De(e),De(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=[],Ve(Fe(s.prototype),"dispose",this).call(this)}}])&&Ae(t.prototype,n),r&&Ae(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ne.N);Ue.instances={};var Ze=n(30050),ze=n(98115);function Ge(e){return Ge="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},Ge(e)}function qe(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,(void 0,i=function(e,t){if("object"!==Ge(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ge(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Ge(i)?i:String(i)),r)}var i}function He(){return He="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(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}},He.apply(this,arguments)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function We(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$e(e)}var 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&&Ye(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=$e(r);if(i){var n=$e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return We(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(We(n)),n}return t=a,(n=[{key:"createEl",value:function(){return He($e(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(){He($e(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){He($e(a.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!He($e(a.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&qe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("MenuItem"));function Xe(e){return Xe="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},Xe(e)}function Je(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,(void 0,i=function(e,t){if("object"!==Xe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Xe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Xe(i)?i:String(i)),r)}var i}function Ke(){return Ke="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=tt(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}},Ke.apply(this,arguments)}function et(e,t){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},et(e,t)}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}var nt=o.Z.getComponent("MenuButton"),rt=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&&et(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=tt(r);if(i){var n=tt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Xe(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=nt.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(Ke(tt(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new Ze.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new ze.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new ze.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;Ke(tt(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 Qe}))}},{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 Qe(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===te.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===te.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(){Ke(tt(a.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],n&&Je(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(nt);rt.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",rt);var it=n(10463);function ot(e){return ot="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},ot(e)}function at(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,(void 0,i=function(e,t){if("object"!==ot(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===ot(i)?i:String(i)),r)}var i}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=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}},st.apply(this,arguments)}function ct(e,t){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ct(e,t)}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&&ct(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"===ot(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(ut(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:te.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(){}}])&&at(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("Component"));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,(void 0,i=function(e,t){if("object"!==ft(e)||null===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)}(r.key),"symbol"===ft(i)?i:String(i)),r)}var i}function pt(){return pt="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=yt(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}},pt.apply(this,arguments)}function dt(e,t){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dt(e,t)}function yt(e){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yt(e)}var vt=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&&dt(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=yt(i);if(a){var n=yt(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 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!!Ue.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return Ue.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 it.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){it.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(),pt(yt(c.prototype),"cleanupAutoTextTracks",this).call(this),pt(yt(c.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new lt({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 pt(yt(c.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return Ue.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(){}}])&&ht(t.prototype,n),r&&ht(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Z.getComponent("Tech"));function bt(e){return bt="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},bt(e)}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,(void 0,i=function(e,t){if("object"!==bt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===bt(i)?i:String(i)),r)}var i}function mt(){return mt="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=Pt(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}},mt.apply(this,arguments)}function wt(e,t){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wt(e,t)}function Pt(e){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pt(e)}o.Z.registerTech("devices",vt);var Ot=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&&wt(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=Pt(r);if(i){var n=Pt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===bt(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:K.Vw.Play,workflowPhase:K.eu.Complete,descriptor:K.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(te.Y.AppleTv)),this.player.removeClass("cv-device-".concat(te.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(Me)){var t=new Me({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(ee.w)){var t=new ee.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 Ue.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),Ue.disposeAndRemoveInstance(e),mt(Pt(a.prototype),"dispose",this).call(this))}}])&&gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function St(e){return St="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},St(e)}function kt(){kt=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"==St(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(St(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 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 Ct(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,(void 0,i=function(e,t){if("object"!==St(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==St(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===St(i)?i:String(i)),r)}var i}function Et(){return Et="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=xt(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}},Et.apply(this,arguments)}function Tt(e,t){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tt(e,t)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xt(e)}o.Z.registerPlugin("devicesPlugin",Ot);var It=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&&Tt(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=xt(r);if(i){var n=xt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===St(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=Et(xt(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 jt(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 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}}(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:fe()}}):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 Et(xt(a.prototype),"additionalSetup",h)}}});return c=this,u=void 0,l=void 0,f=kt().mark((function a(){var c;return kt().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)}}])&&Ct(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.r),_t=n(63816),Rt=n(14735);function Mt(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 Lt(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 Mt(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)?Mt(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 Dt(e){return Dt="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},Dt(e)}function Nt(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,(void 0,i=function(e,t){if("object"!==Dt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Dt(i)?i:String(i)),r)}var i}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.registerComponent("UpNext",(0,Rt.Z)((function(e,t){return r.createElement(Lt,Object.assign({player:e},t))})));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)}(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=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"===Dt(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=At(Bt(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}}])&&Nt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));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(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,(void 0,i=function(e,t){if("object"!==Ut(e)||null===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)}(r.key),"symbol"===Ut(i)?i:String(i)),r)}var i}function zt(){return zt="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=Ht(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}},zt.apply(this,arguments)}function Gt(e,t){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gt(e,t)}function qt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ht(e){return Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ht(e)}o.Z.registerComponent("NextVideoMenuItem",Ft);var Yt="cv-persisttest",Wt="cv-play-next-video",$t=o.Z.getPlugin("plugin"),Qt=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),Xt=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&&Gt(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=Ht(r);if(i){var n=Ht(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 qt(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(qt(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(qt(t)),t.getChapterTrack=t.getChapterTrack.bind(qt(t)),t.onTimeUpdate=t.onTimeUpdate.bind(qt(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem(Wt);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 it.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:Qt,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(Wt,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),zt(Ht(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(Yt,"persistPlayNext"),window.localStorage.removeItem(Yt),!0}catch(e){return!1}}}])&&Zt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}($t);o.Z.registerPlugin("nextVideoPlugin",Xt);var Jt=n(26733);function Kt(e){return Kt="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},Kt(e)}function en(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,(void 0,i=function(e,t){if("object"!==Kt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Kt(i)?i:String(i)),r)}var i}function tn(e,t){return tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tn(e,t)}function nn(e){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nn(e)}function rn(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(Jt.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var on=(0,Rt.Z)((function(e,t){return r.createElement(rn,Object.assign({},t))})),an=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&&tn(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=nn(r);if(i){var n=nn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Kt(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 on(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)}}])&&en(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("ClickableComponent"));function sn(e){return sn="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},sn(e)}function cn(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,(void 0,i=function(e,t){if("object"!==sn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===sn(i)?i:String(i)),r)}var i}function un(){return un="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=fn(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}},un.apply(this,arguments)}function ln(e,t){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ln(e,t)}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fn(e)}var hn=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&&ln(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=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"===sn(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(un(fn(s.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(un(fn(s.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){un(fn(s.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",un(fn(s.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new an(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(){un(fn(s.prototype),"handleClick",this).call(this,null)}}])&&cn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuButton"));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 dn(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,(void 0,i=function(e,t){if("object"!==pn(e)||null===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)}(r.key),"symbol"===pn(i)?i:String(i)),r)}var i}function yn(e,t){return yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yn(e,t)}function vn(e){return vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vn(e)}hn.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",hn);var bn=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&&yn(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=vn(r);if(i){var n=vn(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 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)}}}])&&dn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",bn);var gn=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 mn(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=gn(e,["className","playerApi","onReady","onDispose"]),c=r.useRef();return r.useEffect((function(){if(c){var e=new It(c.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,_t.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:c,className:n})}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5442-b859040432-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5442],{84789:(t,e,r)=>{var n;r.d(e,{X:()=>n}),function(t){t.Lite="lite",t.Auth="auth"}(n||(n={}))},76153:(t,e,r)=>{r.d(e,{F:()=>v});var n=r(63093),o=r(33003),i=r.n(o),a=r(84789),c=r(86664);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t,e)||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.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:O(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",v="executing",y="completed",g={};function b(){}function w(){}function C(){}var E={};s(E,a,(function(){return this}));var L=Object.getPrototypeOf,x=L&&L(L(_([])));x&&x!==r&&n.call(x,a)&&(E=x);var S=C.prototype=b.prototype=Object.create(E);function k(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function r(o,i,a,c){var l=d(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?y:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function U(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(U,this),this.reset(!0)}function _(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=C,o(S,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:w,configurable:!0}),w.displayName=s(C,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,s(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(N.prototype),s(N.prototype,c,(function(){return this})),e.AsyncIterator=N,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new N(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),s(S,l,"Generator"),s(S,a,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=_,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:_(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===u(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={k12:"Primary & Secondary"},p={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},m=h(h({},a.X.Auth,"auth.web"),a.X.Lite,"lite.web"),v={getClient:function(t){var e,r,o,i,a,u;return o=this,i=void 0,a=void 0,u=f().mark((function o(){var i,a,u,l,s,h;return f().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=t.brazeConfig,a=t.geoLocation,u=t.version,l=i[c.I.getInstanceRegion(null==a?void 0:a.countryCode)],s=m[t.productName],h=(0,n.getInstance)({baseUrl:l.url,apiKey:l.apiKey,productVersion:u,productName:s,enableLogging:!1,automaticallyShowInAppMessages:!1}),(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode)&&h.setUserCountry(null===(r=t.geoLocation)||void 0===r?void 0:r.countryCode),o.abrupt("return",h);case 6:case"end":return o.stop()}}),o)})),new(a||(a=Promise))((function(t,e){function r(t){try{c(u.next(t))}catch(t){e(t)}}function n(t){try{c(u.throw(t))}catch(t){e(t)}}function c(e){var o;e.done?t(e.value):(o=e.value,o instanceof a?o:new a((function(t){t(o)}))).then(r,n)}c((u=u.apply(o,i||[])).next())}))},hashedEmail:function(t){var e=t.trim().toLowerCase();return i().hash(e)},removeEmptyKeys:function(t){if(Array.isArray(t))return t;var e=Object.assign({},t);return Object.entries(e).filter((function(t){var e=l(t,2)[1];return null!=e&&!("string"==typeof e&&!e.length)})).reduce((function(t,e){var r=l(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),h({},n,o===Object(o)?v.removeEmptyKeys(o):o))}),{})},getEventTopic:function(){return"Free Trial Request"},getCustomEventType:function(){return n.ProductFormEvent.ProductTrailRequested},getProductFormEventType:function(){return"product_form_submission"},getSchoolType:function(t){if(t){var e=t.toLowerCase();if(!["unknown","other"].includes(e))return d[e]||t}},parseProvince:function(t){return t.length?p[t.toLowerCase()]||t:""}}},86664:(t,e,r)=>{r.d(e,{I:()=>u});var n=r(83765),o=r(93824),i=["uk","gb","gg","im","je","ie"],a={au:o.C.AU,nz:o.C.NZ,us:o.C.US,uk:o.C.UK,gb:o.C.UK,gg:o.C.UK,im:o.C.UK,je:o.C.UK,ie:o.C.UK},c={au:n.M.CvApSoutheast1,uk:n.M.CvEuWest1,us:n.M.CvNaWest1,nz:n.M.CvApSoutheast2},u={getInstanceRegion:function(t){var e=u.getCountryCode(t);return c[e]},getCountryCode:function(t){return a[null==t?void 0:t.toLowerCase()]||o.C.US},isCountryCodeUK:function(t){return i.includes(t.toLowerCase())},isCountryCodeAU:function(t){return(null==t?void 0:t.toLowerCase())===o.C.AU},isCountryCodeUS:function(t){return(null==t?void 0:t.toLowerCase())===o.C.US},isCountryCodeNZ:function(t){return(null==t?void 0:t.toLowerCase())===o.C.NZ},isSupportedCountryCode:function(t){return Object.keys(a).includes(null==t?void 0:t.toLowerCase())},getLocalizedLocalityPlaceholderPhrase:function(t){if(t)return u.isCountryCodeUK(t)?"E.g. CR0 3RL or 36 Factory Lane":u.isCountryCodeAU(t)||u.isCountryCodeNZ(t)?"E.g. 2212 or Revesby":u.isCountryCodeUS(t)?"E.g. 95826 or Sacramento":void 0},getLocalizedLocalityPlaceholderText:function(t){if(t){var e=u.getLocalizedLocalityPlaceholderPhrase(t);if(e)return e}}}},93824:(t,e,r)=>{var n;r.d(e,{C:()=>n}),function(t){t.AU="au",t.NZ="nz",t.UK="uk",t.US="us"}(n||(n={}))},74887:(t,e,r)=>{r.d(e,{f:()=>a});var n=r(32735),o=r(11607);const i={icon:"ohit6",description:"DmrW6",option:"KOzYf"};function a(t){return n.createElement("ul",{className:"list-unstyled mb-3"},t.options.map((function(e){return n.createElement("li",{key:e.id,className:"mb-2 ".concat(i.option," rounded-3 ").concat(t.selection===e.id?"border border-dark border-2 bg-light-blue":"")},n.createElement(o.L,{onClick:function(){return t.setSelection(e.id)},className:"d-flex align-items-center p-2"},n.createElement("div",{className:"rounded border border-dark ".concat(e.colourClass," ").concat(i.icon)},n.createElement("img",{src:e.imageUrl,className:"img-fluid"})),n.createElement("div",null,n.createElement("h2",{className:"mb-1 h6"},e.title),n.createElement("p",{className:"mb-0 ".concat(i.description)},e.description))))})))}},12058:(t,e,r)=>{r.d(e,{X:()=>o});var n=r(32735);function o(t){return n.createElement("p",{className:t.className},t.children)}},11572:(t,e,r)=>{r.r(e),r.d(e,{OnboardingContactSalesView:()=>T});var n=r(32735),o=r(63093),i=r(23481),a=r(20354),c=r(84789),u=r(76153),l=r(83345),s=r(39151),f=r(1666),h=r(31949),d=r(99742),p=r(99940),m={checkEmail:function(t){return{url:"/api/braze/check-email",key:"braze:check:email:".concat(t),type:p.k.POST,data:{email:t}}}},v=r(75359),y=r(74887),g=r(12058),b=r(27583),w=r(73190),C=r(36669),E=r(17762);const L={imageContainer:"QqX1V",topImage:"mjPRy",bottomImage:"uHwHs",info:"dNDnN"};function x(t){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x(t)}function S(){S=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:O(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var C=Object.getPrototypeOf,E=C&&C(C(_([])));E&&E!==r&&n.call(E,a)&&(w=E);var L=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==x(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function U(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(U,this),this.reset(!0)}function _(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(x(e)+" is not iterable")}return g.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},k(N.prototype),l(N.prototype,c,(function(){return this})),e.AsyncIterator=N,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new N(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=_,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:_(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function k(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==x(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===x(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function N(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(t,e):void 0}}(t,e)||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.")}()}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var j,U=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function c(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))},P="onboarding.contactSales",A=i.T.encloseNamespace(P),_="product_onboarding_submission";!function(t){t.BookADemo="Book a demo",t.RequestPricing="Request pricing",t.ContactUs="Onboarding contact us"}(j||(j={}));var F=[{id:j.BookADemo,imageUrl:d.W.OnboardingV2.ContactSales.BOOK_DEMO_ICON,colourClass:"bg-yellow",title:A("bookDemo"),description:A("bookDemoInfo")},{id:j.RequestPricing,imageUrl:d.W.OnboardingV2.ContactSales.REQUEST_PRICING_ICON,colourClass:"bg-purple",title:A("requestPricing"),description:A("requestPricingInfo")},{id:j.ContactUs,imageUrl:d.W.OnboardingV2.ContactSales.OTHER_ICON,colourClass:"bg-dark-blue",title:A("other"),description:A("otherInfo")}];function T(){var t=(0,w.Q)(),e=t.onClickBack,r=t.exitOnboarding,i=t.completeStepAsync,p=t.onSaveError,x=a.a.useBasicFetch(h.N.currentUser()),O=a.a.useBasicFetch(x.data&&h.N.user(x.data.id)),T=a.a.useBasicFetch(s.L.version()),I=a.a.useBasicFetch(s.L.config()),G=a.a.useBasicFetch(x.data&&f.h.customer(x.data.customerId)),K=a.a.useBasicFetch(C.t.currentProspect()),B=a.a.useBasicFetch(x.data&&m.checkEmail(x.data.email)),R=(0,E.M)(),z=N(n.useState(),2),D=z[0],q=z[1],M=N(n.useState(""),2),W=M[0],X=M[1],V=N(n.useState(""),2),Y=V[0],Z=V[1];function H(){switch(D){case j.BookADemo:return"book_a_demo";case j.RequestPricing:return"request_pricing";case j.ContactUs:return"other"}}return n.createElement(b.z,{namespace:P},n.createElement(b.z.Left,{className:"bg-blue d-flex align-items-center"},n.createElement("div",{className:"px-5"},n.createElement("img",{className:"img-fluid",src:d.W.OnboardingV2.ContactSales.BACKGROUND}))),n.createElement(b.z.Right,{hasCustomButtons:!1,onClickNext:function(){var t,e,r,n,a,l,s,f,h,d,m,v,y,g,b,w,C,E,L,N;return U(this,void 0,void 0,S().mark((function j(){var P,A,F,z,q=this;return S().wrap((function(j){for(;;)switch(j.prev=j.next){case 0:return j.prev=0,j.next=3,u.F.getClient({brazeConfig:I.data.braze,geoLocation:R.isFallback?{countryCode:null!==(e=null===(t=x.data)||void 0===t?void 0:t.countryCode)&&void 0!==e?e:R.countryCode}:R,productName:c.X.Lite,version:T.data});case 3:(P=j.sent).setUser(u.F.hashedEmail(null===(r=O.data)||void 0===r?void 0:r.email)),P.openSession(),P.setUserFirstName(null===(n=O.data)||void 0===n?void 0:n.name),P.setUserLastName(null===(a=O.data)||void 0===a?void 0:a.surname),P.setUserPhone(W),P.setUserEmail(null===(l=O.data)||void 0===l?void 0:l.email),A=u.F.removeEmptyKeys(k(k(k(k({},o.DefaultUserAttributes.Email,null===(s=O.data)||void 0===s?void 0:s.email),o.DefaultUserAttributes.FirstName,null===(f=O.data)||void 0===f?void 0:f.name),o.DefaultUserAttributes.LastName,null===(h=O.data)||void 0===h?void 0:h.surname),o.DefaultUserAttributes.Phone,W)),F=u.F.removeEmptyKeys(k(k(k(k(k(k(k({},o.CustomUserAttributes.JobTitle,null===(v=null===(m=null===(d=O.data)||void 0===d?void 0:d.userProfile)||void 0===m?void 0:m.metadata)||void 0===v?void 0:v.jobTitle),o.CustomUserAttributes.AccountName,null===(y=x.data)||void 0===y?void 0:y.customerName),o.CustomUserAttributes.CrmId,null===(g=G.data)||void 0===g?void 0:g.crmId),o.CustomUserAttributes.OrgSubType,u.F.getSchoolType("")),"account_address",{country_code:null===(b=x.data)||void 0===b?void 0:b.countryCode,province:u.F.parseProvince((null===(w=K.data)||void 0===w?void 0:w.province)||"")}),"topic",D),o.CustomUserAttributes.SyncToCrm,!(null===(E=null===(C=B.data)||void 0===C?void 0:C.users)||void 0===E?void 0:E.length))),z=u.F.removeEmptyKeys(k(k(k(k({},o.EventUserAttributes.AccountCity,null===(L=K.data)||void 0===L?void 0:L.city),o.EventUserAttributes.AccountState,null===(N=K.data)||void 0===N?void 0:N.province),o.EventUserAttributes.ContactUsComment,Y),"form_type",H())),P.bulkSetCustomUserAttributes(F),P.logEvent({type:_,data:Object.assign(Object.assign(Object.assign({},A),F),z)}),P.sendData((function(t){return U(q,void 0,void 0,S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return p(),e.abrupt("return",Promise.reject());case 3:return e.prev=3,e.next=6,i();case 6:e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(3),p(),e.abrupt("return",Promise.reject());case 12:case"end":return e.stop()}}),e,null,[[3,8]])})))})),j.next=22;break;case 18:return j.prev=18,j.t0=j.catch(0),p(),j.abrupt("return",Promise.reject());case 22:case"end":return j.stop()}}),j,null,[[0,18]])})))},onClickBack:e,onClickComeBackLater:r,disableNext:!D||!W||!O.data||D===j.ContactUs&&!Y,nextText:A("contactSales")},n.createElement(v.W,{className:"mb-0"},n.createElement(l.x,{phrase:"heading"})),n.createElement(g.X,{className:"".concat(L.info," mb-0 mt-1")},n.createElement(l.x,{phrase:"info"})),n.createElement(g.X,{className:"fw-semibold mt-3"},n.createElement(l.x,{phrase:"howCanWeHelp"})),n.createElement(y.f,{options:F,selection:D,setSelection:function(t){q(t)}}),n.createElement("label",{htmlFor:"phone-number"},A("phoneNumber"),n.createElement("span",{className:"text-danger"},"*")),n.createElement("input",{id:"phone-number",name:"phone-number",className:"form-control form-control-lg mb-3",type:"tel",value:W,onChange:function(t){return X(t.target.value)},placeholder:A("phoneNumberPlaceholder")}),n.createElement("label",{htmlFor:"other-information"},A("otherLabel"),D===j.ContactUs&&n.createElement("span",{className:"text-danger"},"*")),n.createElement("input",{id:"other-information",name:"other-information",className:"form-control form-control-lg",value:Y,onChange:function(t){return Z(t.target.value)},placeholder:A("otherPlaceholder")})))}},36669:(t,e,r)=>{r.d(e,{t:()=>n});var n={currentProspect:function(){return{url:"/api/prospects/current",key:"prospect:current"}},getLookups:function(t){return{url:"/api/prospects/".concat(t,"/lookups"),key:"prospect:".concat(t)}}}},17762:(t,e,r)=>{r.d(e,{M:()=>a});var n=r(20354),o=r(39151),i={countryCode:"us",isFallback:!0};function a(){var t=n.a.useBasicFetch(o.L.geoLocation());return t.hasCompleted&&!t.data?i:t.data}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5965,1519],{96922:(e,t,n)=>{n.r(t),n.d(t,{SharedSeriesView:()=>s});var a=n(32735),i=n(81886),r=n(183),o=n(95342);function s(e){var t=i.Q.C$.getCurrentAppLink();return a.createElement(o.SeriesView,{key:e.objectId,id:e.objectId,shareId:e.shareId,getVideoAppLink:function(n){return Object.assign(Object.assign({},t),{params:{videoId:n.id,contextId:e.objectId,context:r.Q.Series}})}})}},95342:(e,t,n)=>{n.r(t),n.d(t,{SeriesView:()=>ne});var a=n(32735),i=n(70680),r=n(23481),o=n(20354),s=n(65858),c=n(89043),l=n(49935),u=n(71020),d=n(74696),p=n(4632),f=n(79718),v=n(7733),m=n(51365),h=n(16714),b=n(23788),y=n(21750),g=n(39151),S=n(1666),I=n(60011),E=n(31949),O=n(56520),k=n(97037),A=n(91286),T=n(60115),L=n(22902),w=n(79612),P=n(35223),j=n(68140),C=n(14070),F=n(97291),N=n(64364);function _(e){return _="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},_(e)}function x(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==_(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===_(i)?i:String(i)),a)}var i}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}var D="shared.seriesNotFoundError",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&&B(e,t)}(s,e);var t,n,a,i,o=(a=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=V(a);if(i){var n=V(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===_(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(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o.call(this,"Series doesn't exist")}return t=s,(n=[{key:"name",get:function(){return"SeriesNotFoundError"}},{key:"heading",get:function(){return r.T.getPhrase(D,"heading")}},{key:"description",get:function(){return r.T.getPhrase(D,"description")}}])&&x(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(N.H),M=n(62756),U=n(65986),H=n(7179),J=n(86698),G=n(44110),Q=n(97816),Z=n(56017),K=n(33192),$=n(28400),q=n(10144),z=r.T.encloseNamespace("shared.series"),W=function(e,t){return{application:F.O.SUBJECT,action:C.e.Subjects.CLASSIFICATION,args:[e.id,$.m.slugify(e.name)],params:{mtv:!!t||void 0}}},X={getBreadcrumbs:function(e){var t=e.moviesAndTv,n=e.topicPath,a=e.series,i=e.presentation,r=e.availablePresentations;if(t){var o=[{name:z("moviesAndTv"),appLink:{application:F.O.MOVIES_AND_TV,action:C.e.MoviesAndTv.HOME}}];return null==n||n.slice(1,n.length).forEach((function(e){o.push({name:e.name,appLink:W(e,!0)})})),o.push({name:a.name,active:!0}),o}var s=[{name:z("discover"),appLink:{application:F.O.DASHBOARD,action:C.e.Dashboard.HOME}}];return n&&(s.push({name:q.i.getExploreAllTopicsTitle(null==i?void 0:i.name,null==r?void 0:r.length),appLink:{application:F.O.SUBJECT,action:C.e.Subjects.CLASSIFICATION_ALL,params:{presentationId:null==i?void 0:i.id}}}),n.forEach((function(e){s.push({name:e.name,appLink:W(e)})}))),s.push({name:a.name,active:!0}),s}},Y=n(82431),ee=r.T.encloseNamespace("shared.series"),te=function(e){return v.o[e.name.charCodeAt(0)%v.o.length]};function ne(e){var t,n,r,v,N,_=(0,i.I0)(),x=(0,k.c)(s.LZ.VideoThumbnail),B=x.setFavourite,V=x.canFavourite,D=(0,L.T)(),$=D.hasPermissions,q=D.hasLocalPermissions,z=(0,M.G)().isPlugin,W=(0,O.R0)(),ne=W.openInCurationStudioLabel,ae=W.isUserCurator,ie=W.getOpenInCurationStudioLink;(0,H.P)({id:e.id,app:"series",shareId:e.shareId});var re=o.a.useBasicFetch(g.L.config()),oe=o.a.useBasicFetch(E.N.currentUser()),se=o.a.useBasicFetch((null===(t=oe.data)||void 0===t?void 0:t.isAuthenticated)&&S.h.yearGroups(oe.data.customerId)),ce=o.a.useBasicFetch(e.classificationId&&y.x.classification(e.classificationId,null===(n=oe.data)||void 0===n?void 0:n.id)),le=o.a.useBasicFetch(e.shareId?I.J.sharedSeries(e.id,e.shareId):I.J.series(e.id)),ue=o.a.useBasicFetch((null===(r=ce.data)||void 0===r?void 0:r.presentationId)&&y.x.presentationById(ce.data.presentationId)),de=(0,J.y)().availablePresentations,pe=(0,G.i)();(0,w.M)(Z.C.getSeriesMetadata({content:le.data,phraseContext:{phraseHandler:ee,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:K.f.getCanonicalLink({stripPresentationSlug:!0}),allowIndexing:!1}));var fe=(0,U._)(U.i.VideoItem),ve=o.a.useBasicFetch(e.classificationId&&y.x.path(e.classificationId));function me(t){var n;return I.J.seriesVideos(e.id,null===(n=oe.data)||void 0===n?void 0:n.id,be,t)}function he(e){return o.a.getFetch(_)(me(e))}var be=!!oe.data&&j.d.getOrSetSortType(oe.data.id,e.sort,b.D.Series),ye={classificationId:e.classificationId,mtv:e.moviesAndTv},ge=(0,T.K)(!!oe.data&&me,he),Se=ge.items,Ie=ge.hasMore,Ee=ge.isFetching;(0,Q.V)(Se,{hasCurriculumLinks:!0}),(0,A.v)(le,{notFound:R});var Oe=!$(h.C.StudentExperience)&&q(h.E.UseSeriesActions);return a.createElement(m.M.Provider,{value:fe},a.createElement("div",{className:"px-3"},re.data&&le.data?a.createElement(c.p,{heading:le.data.name,banner:le.data.banner,imageCdnUrl:re.data.imageCdnUrl,actions:function(){var e,t,n;if(z||!Oe)return[];var a=[{label:ee("share"),appLink:le&&{application:F.O.DEFAULT,action:C.e.Default.SHARE,args:[null===(e=le.data)||void 0===e?void 0:e.id],params:{entityType:"series"}},svgName:P.vn.Share2,className:"btn btn-outline-dark me-2",button:!0}];return ae&&a.push({label:ne,href:ie(null===(t=le.data)||void 0===t?void 0:t.typeId,null===(n=le.data)||void 0===n?void 0:n.id),openInNewTab:!0}),a}(),actionsDropdownClassName:"btn btn-outline-dark",blockColourClass:te(le.data)}):a.createElement(c.v,null),a.createElement("div",null,a.createElement("div",{className:(null===(v=le.data)||void 0===v?void 0:v.description)||e.moviesAndTv&&ve.data?"border-bottom py-3 mb-3":"pt-3 mb-2"},e.classificationId||e.moviesAndTv?!le.data||e.classificationId&&!ve.data?a.createElement(l.b2,null):a.createElement(l.Oo,{breadcrumbs:X.getBreadcrumbs({moviesAndTv:e.moviesAndTv,topicPath:ve.data,series:le.data,presentation:ue.data,availablePresentations:de})}):a.createElement(a.Fragment,null),a.createElement("div",{className:"d-flex align-items-center"},(null===(N=le.data)||void 0===N?void 0:N.description)&&a.createElement("p",{className:"mb-0 ".concat(e.classificationId?"pt-2":"")},le.data.description),le.data&&a.createElement("div",{className:"ms-auto"},a.createElement(f.p,{variant:"outline-dark",type:be,analyticsOptions:{location:s.LZ.VideoListHeader,entity:s.py.Video,actionType:s.Vw.Sort,workflowPhase:s.eu.Complete},getSortAppLink:function(e){return Y.j.getSeriesAppLink(le.data,Object.assign(Object.assign({},ye),{sort:e}))}})))),Se?a.createElement(a.Fragment,null,a.createElement(p.E4,{videos:Se,yearGroups:se.data,getVideoAppLink:e.getVideoAppLink,getSeriesAppLink:function(e){return Y.j.getSeriesAppLink(e,Object.assign(Object.assign({},ye),{sort:be}))},setFavourite:B,canFavourite:V,presentationAudiences:e.moviesAndTv?null:pe.data}),(Ie||Ee)&&a.createElement(u._,{isFetching:Ee,fetchNext:he})):a.createElement(d.S,null))))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5986],{56520:(t,e,a)=>{a.d(e,{R0:()=>b,_N:()=>p,eR:()=>d});var i=a(23481),n=a(97395),s=a(20354),o=a(42617),r=a(4594),l=a(39151),c=a(31949),u=i.T.encloseNamespace("shared.hooks");function p(t,e,a,i){var s=n._.safeUrlConcat(t,"manage"),o=n._.safeUrlConcat(t,"exchange"),l=function(t,e,a){return n._.safeUrlConcat(t,"".concat(e,"/").concat(a))};switch(e){case r.E.Subject:return n._.safeUrlConcat(s,"subjects/presentations/".concat(i,"/classifications/").concat(a,"/edit"));case r.E.Video:return l(s,"videos",a);case r.E.Playlist:return l(s,"playlists",a);case r.E.Series:return l(s,"series",a);case r.E.Company:return l(s,"companies",a);case r.E.Interactive:return l(s,"interactives",a);case r.E.Clip:return l(s,"clips",a);case r.E.Category:return l(o,"categories",a)}}function d(){return u("openInCurationStudio")}function b(){var t,e,a=s.a.useBasicFetch(c.N.currentUser()),i=s.a.useBasicFetch((null===(t=a.data)||void 0===t?void 0:t.id)&&c.N.groups(null===(e=a.data)||void 0===e?void 0:e.id)).data,n=s.a.useBasicFetch(l.L.config()),r=[o.j.Curator,o.j.Content,o.j.Developer];return{openInCurationStudioLabel:d(),isUserCurator:r.some((function(t){return null==i?void 0:i.data.find((function(e){return e.name===t}))})),getOpenInCurationStudioLink:function(t,e,a){var i;return p(null===(i=n.data)||void 0===i?void 0:i.curatorUrl,t,e,a)}}}},70227:(t,e,a)=>{a.d(e,{c:()=>s});var i=a(97395),n=a(4594),s={getObjectUrl:function(t,e){var a=t.analyticsWebUrl;if(a){var s="";switch(e.typeId){case n.E.Video:s="/videos/".concat(e.id,"/overview");break;case n.E.Clip:s="/clips/".concat(e.id,"/overview");break;case n.E.Interactive:s="/interactives/".concat(e.id,"/overview")}if(s)return i._.safeUrlConcat(a,s)}}}},9064:(t,e,a)=>{function i(t){var e,a,i,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return null;var o=Object.assign(Object.assign({},s),{id:t.id,interactiveId:t.interactiveId,name:t.name,status:t.status,originType:t.originType});return(null===(e=null==t?void 0:t._parentClip)||void 0===e?void 0:e.id)&&(o.clip={id:null===(a=null==t?void 0:t._parentClip)||void 0===a?void 0:a.id}),(null===(i=null==t?void 0:t._parentVideo)||void 0===i?void 0:i.id)&&(o.video={id:null===(n=null==t?void 0:t._parentVideo)||void 0===n?void 0:n.id}),o}a.d(e,{T:()=>i})},65986:(t,e,a)=>{a.d(e,{i:()=>K,_:()=>et});var i,n,s,o=a(20354),r=a(65858),l=a(16714),c=a(39151),u=a(98064),p=a(79967),d=a(56520),b=a(97037),y=a(22902),g=a(37802),v=a(31908),O=a(62756),m=a(41063),C=a(23481),f=a(49985);!function(t){t[t.AddToPlaylist=0]="AddToPlaylist",t[t.RemoveFromPlaylist=1]="RemoveFromPlaylist",t[t.Share=2]="Share",t[t.EditDetails=3]="EditDetails",t[t.Download=4]="Download",t[t.Delete=5]="Delete",t[t.ViewCurriculumLinks=6]="ViewCurriculumLinks",t[t.CreateClip=7]="CreateClip",t[t.CreateInteractive=8]="CreateInteractive",t[t.Favourite=9]="Favourite",t[t.ViewUsage=10]="ViewUsage",t[t.AddToLibrary=11]="AddToLibrary",t[t.Approve=12]="Approve",t[t.ManageAccess=13]="ManageAccess",t[t.OpenInCurationStudio=14]="OpenInCurationStudio"}(i||(i={})),function(t){t[t.Share=0]="Share",t[t.AddToPlaylist=1]="AddToPlaylist",t[t.ViewOriginalVideo=2]="ViewOriginalVideo",t[t.EditClip=3]="EditClip",t[t.EditDetails=4]="EditDetails",t[t.Delete=5]="Delete",t[t.CreateInteractive=6]="CreateInteractive",t[t.Favourite=7]="Favourite",t[t.ViewUsage=8]="ViewUsage",t[t.Approve=9]="Approve",t[t.ManageAccess=10]="ManageAccess",t[t.OpenInCurationStudio=11]="OpenInCurationStudio",t[t.AddToLibrary=12]="AddToLibrary"}(n||(n={})),function(t){t[t.AddToPlaylist=0]="AddToPlaylist",t[t.PreviewQuestions=1]="PreviewQuestions",t[t.ViewResults=2]="ViewResults",t[t.Share=3]="Share",t[t.Copy=4]="Copy",t[t.Edit=5]="Edit",t[t.Print=6]="Print",t[t.ViewOriginalVideo=7]="ViewOriginalVideo",t[t.Delete=8]="Delete",t[t.Unpublish=9]="Unpublish",t[t.Favourite=10]="Favourite",t[t.Approve=11]="Approve",t[t.ManageAccess=12]="ManageAccess",t[t.OpenInCurationStudio=13]="OpenInCurationStudio",t[t.AddToLibrary=14]="AddToLibrary"}(s||(s={}));var I=a(26361),T=a(35223),w=a(28400),S=a(5960),j=a(4594),V=a(70227),A=a(1643),k=a(14070),h=a(97291),P=a(9064);function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function E(t,e,a){return(e=function(t){var e=function(t,e){if("object"!==D(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,"string");if("object"!==D(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===D(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var L="shared.utils",N=function(t,e,a,n,s,o){var l,c=C.T.encloseNamespace(L),u=e.xs,p=A.h.isFavouritedByCurrentUser(t),b=Object.assign(Object.assign({},o||{}),{id:t.id});return E(E(E(E(E(E(E(E(E(E(l={},i.Favourite,{order:0,svgName:p?T.vn.Heart:T.vn.HeartOutline,onClick:function(){return s(t,!p)},button:!0,className:"btn btn-link ".concat(p?"text-danger":""),analyticsOptions:null,analyticsData:b}),i.AddToPlaylist,{order:5,label:c("addToPlaylist"),button:!u,className:"btn btn-link",svgName:T.vn.AddToPlaylists,appLink:{application:h.O.PLAYLISTS,action:k.e.Playlists.ADD_TO_PLAYLIST,args:[t.id]},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Associate,descriptor:r.iF.Playlist,workflowPhase:r.eu.Start}),analyticsData:b}),i.Share,{order:10,label:c("share"),svgName:T.vn.Share2,appLink:{application:h.O.DEFAULT,action:k.e.Default.SHARE,args:[t.id],params:{entityType:"video"}},button:!u,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Share,workflowPhase:r.eu.Start,eventVersion:r.eq.V3}),analyticsData:b}),i.OpenInCurationStudio,{order:15,label:(0,d.eR)(),href:(0,d._N)(a.curatorUrl,t.typeId,t.id),openInNewTab:!0}),i.CreateInteractive,{order:20,label:c("createInteractive"),button:!1,analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Create,entity:r.py.Interactive,workflowPhase:r.eu.Start}),analyticsData:{video:b},appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.NEW_INTERACTIVE,args:[t.id]}}),i.CreateClip,{order:30,label:c("createClip"),button:!1,appLink:{application:h.O.CLIPS,action:k.e.Clips.CREATE_CLIP,args:[t.id]},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Create,entity:r.py.Clip,workflowPhase:r.eu.Start}),analyticsData:{video:b}}),i.AddToLibrary,{order:35,label:c("addToLibrary"),button:!1,appLink:{application:h.O.LIBRARIES,action:k.e.Libraries.ADD_TO_LIBRARY,args:[t.id,t.typeId]},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Create,entity:r.py.LibraryRequest,workflowPhase:r.eu.Start}),analyticsData:{video:b}}),i.EditDetails,{order:40,label:c("editDetails"),button:!1,appLink:{application:h.O.VIDEOS,action:k.e.Videos.EDIT_VIDEO,args:[t.id]},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Edit,workflowPhase:r.eu.Start}),analyticsData:b}),i.ViewCurriculumLinks,{order:50,label:c("viewCurriculumLinks"),button:!1,appLink:{application:h.O.VIDEOS,action:k.e.Videos.VIEW_CURRICULUM_LINKS,args:[t.id]},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Click,workflowPhase:r.eu.Complete,descriptor:r.XX.ViewCurriculumLinks}),analyticsData:b}),i.ViewUsage,{order:60,label:c("viewUsage"),button:!1,href:V.c.getObjectUrl(a,t),openInNewTab:!0,analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Click,workflowPhase:r.eu.Complete,descriptor:r.XX.ViewUsage}),analyticsData:b}),E(E(E(E(l,i.Download,{order:70,label:c("download"),button:!1,appLink:{application:h.O.VIDEOS,action:k.e.Videos.DOWNLOAD_VIDEO,args:[t.id]},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Download,workflowPhase:r.eu.Start}),analyticsData:b}),i.Approve,{order:90,label:c("approve"),button:!0,className:"btn btn-outline-dark mx-2",appLink:{application:h.O.DEFAULT,action:k.e.Default.APPROVE_VIDEO,params:{objectId:t.id,objectTypeId:j.E.Video}},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Click,descriptor:r.XX.Approve}),analyticsData:b}),i.ManageAccess,{order:90,label:c("manageAccess"),button:!1,appLink:{application:h.O.DEFAULT,action:k.e.Default.MANAGE_ACCCESS,params:{objectId:t.id,objectTypeId:j.E.Video}},analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Click,descriptor:r.XX.ManageAccess}),analyticsData:b}),i.Delete,{order:100,label:c("delete"),button:!1,appLink:{application:h.O.VIDEOS,action:k.e.Videos.DELETE_VIDEO,params:{ids:[t.id]}},className:"btn btn-link text-danger",analyticsOptions:Object.assign(Object.assign({},n),{actionType:r.Vw.Delete,workflowPhase:r.eu.Start}),analyticsData:b})},_=function(t,e,a,i,s,o){var l,c,u,p,b,y=C.T.encloseNamespace(L),g=A.h.isFavouritedByCurrentUser(t),v=e.xs,O=Object.assign(Object.assign({},o||{}),{id:t.id});return(null===(c=t._parentVideo)||void 0===c?void 0:c.id)&&(O.video={id:null===(u=t._parentVideo)||void 0===u?void 0:u.id}),E(E(E(E(E(E(E(E(E(E(l={},n.Favourite,{order:0,svgName:g?T.vn.Heart:T.vn.HeartOutline,onClick:function(){return s(t,!g)},button:!0,className:"btn btn-link ".concat(g?"text-danger":""),analyticsOptions:null,analyticsData:O}),n.AddToPlaylist,{order:10,label:v?y("addToPlaylist"):null,tooltip:v?null:y("addToPlaylist"),svgName:T.vn.AddToPlaylists,appLink:{application:h.O.PLAYLISTS,action:k.e.Playlists.ADD_TO_PLAYLIST,args:[t.id]},button:!v,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Associate,descriptor:r.iF.Playlist,workflowPhase:r.eu.Start}),analyticsData:O}),n.OpenInCurationStudio,{order:13,label:(0,d.eR)(),href:(0,d._N)(a.curatorUrl,t.typeId,t.id),openInNewTab:!0}),n.Share,{order:15,label:v?y("share"):null,tooltip:v?null:y("share"),svgName:T.vn.Share2,appLink:{application:h.O.DEFAULT,action:k.e.Default.SHARE,args:[t.id],params:{entityType:"clip"}},button:!v,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Share,workflowPhase:r.eu.Start,eventVersion:r.eq.V3}),analyticsData:O}),n.CreateInteractive,{order:20,label:y("createInteractive"),appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.NEW_CLIP_INTERACTIVE,args:[t.id]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Create,entity:r.py.Interactive,workflowPhase:r.eu.Start}),analyticsData:Object.assign(Object.assign({},O),{clipId:t.id})}),n.ViewOriginalVideo,{order:30,label:y("viewOriginalVideo"),appLink:{application:h.O.VIDEOS,action:k.e.Videos.PLAY_VIDEO,args:[null===(p=t._parentVideo)||void 0===p?void 0:p.id,w.m.slugify(null===(b=t._parentVideo)||void 0===b?void 0:b.name)]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.ViewOriginalVideo}),analyticsData:O}),n.AddToLibrary,{order:35,label:y("addToLibrary"),button:!1,appLink:{application:h.O.LIBRARIES,action:k.e.Libraries.ADD_TO_LIBRARY,args:[t.id,t.typeId]},analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Create,entity:r.py.LibraryRequest,workflowPhase:r.eu.Start}),analyticsData:{video:O}}),n.ViewUsage,{order:40,label:y("viewUsage"),button:!1,href:V.c.getObjectUrl(a,t),openInNewTab:!0,analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,workflowPhase:r.eu.Complete,descriptor:r.XX.ViewUsage}),analyticsData:O}),n.EditClip,{order:45,label:y("editClip"),appLink:{application:h.O.CLIPS,action:k.e.Clips.EDIT_CLIP,args:[t.id]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Edit,workflowPhase:r.eu.Start}),analyticsData:O}),n.EditDetails,{order:50,label:y("editDetails"),appLink:{application:h.O.CLIPS,action:k.e.Clips.EDIT_CLIP_DETAILS,args:[t.id]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Edit,workflowPhase:r.eu.Start}),analyticsData:O}),E(E(E(l,n.Approve,{order:60,label:y("approve"),button:!0,className:"btn btn-outline-dark mx-2",appLink:{application:h.O.DEFAULT,action:k.e.Default.APPROVE_VIDEO,params:{objectId:t.id,objectTypeId:j.E.Clip}},analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.Approve}),analyticsData:O}),n.ManageAccess,{order:70,label:y("manageAccess"),button:!1,appLink:{application:h.O.DEFAULT,action:k.e.Default.MANAGE_ACCCESS,params:{objectId:t.id,objectTypeId:j.E.Clip}},analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.ManageAccess}),analyticsData:O}),n.Delete,{order:80,label:y("deleteClip"),appLink:{application:h.O.CLIPS,action:k.e.Clips.DELETE_CLIP,args:[t.id]},button:!1,className:"btn btn-link text-danger",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Delete,workflowPhase:r.eu.Start}),analyticsData:O})},R=function(t,e,a,i,n,o){var l,c=C.T.encloseNamespace(L),u=e.xs,p=(0,P.T)(t,o),b=A.h.isFavouritedByCurrentUser(t),y=t.status===S.X.Draft;return E(E(E(E(E(E(E(E(E(E(l={},s.Favourite,{order:0,svgName:b?T.vn.Heart:T.vn.HeartOutline,onClick:function(){return n(t,!b)},button:!0,className:"btn btn-link ".concat(b?"text-danger":""),analyticsOptions:null,analyticsData:p}),s.ViewResults,{order:5,className:"btn btn-link",href:V.c.getObjectUrl(a,t),openInNewTab:!0,svgName:T.vn.Chart,label:u?c("viewResults"):null,tooltip:u?null:c("viewResults"),button:!u,analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.ViewResults}),analyticsData:p}),s.AddToPlaylist,{order:10,label:u?c("addToPlaylist"):null,tooltip:u?null:c("addToPlaylist"),svgName:T.vn.AddToPlaylists,appLink:{application:h.O.PLAYLISTS,action:k.e.Playlists.ADD_TO_PLAYLIST,args:[t.id]},button:!u,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Associate,descriptor:r.iF.Playlist,workflowPhase:r.eu.Start}),analyticsData:p}),s.OpenInCurationStudio,{order:15,label:(0,d.eR)(),href:(0,d._N)(a.curatorUrl,t.typeId,t.id),openInNewTab:!0}),s.Share,{order:20,label:u?c("share"):null,tooltip:u?null:c("share"),svgName:T.vn.Share2,appLink:{application:h.O.DEFAULT,action:k.e.Default.SHARE,args:[t.id],params:{entityType:"interactive"}},button:!u,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Share,workflowPhase:r.eu.Start,eventVersion:r.eq.V3}),analyticsData:p}),s.PreviewQuestions,{order:30,label:c("previewInteractive"),appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.PREVIEW_QUESTIONS,args:[t.id]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.PreviewInteractiveVideo}),analyticsData:p}),s.AddToLibrary,{order:35,label:c("addToLibrary"),button:!1,appLink:{application:h.O.LIBRARIES,action:k.e.Libraries.ADD_TO_LIBRARY,args:[t.id,t.typeId]},analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Create,entity:r.py.LibraryRequest,workflowPhase:r.eu.Start}),analyticsData:{video:p}}),s.Copy,{order:40,label:c("copyInteractive"),appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.COPY_INTERACTIVE,args:[t.id]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Copy,workflowPhase:r.eu.Start}),analyticsData:p}),s.Edit,{order:50,label:!y||u?c("editInteractive"):"",svgName:T.vn.Edit,appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.EDIT_INTERACTIVE,args:[t.id]},button:y&&!u,tooltip:y&&!u?c("editInteractiveTooltip"):"",className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Edit,workflowPhase:r.eu.Start}),analyticsData:p}),s.Unpublish,{order:60,label:c("editInteractive"),appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.UNPUBLISH_INTERACTIVE,args:[t.id]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Publish,descriptor:r.Iq.Unpublish,workflowPhase:r.eu.Start}),analyticsData:p}),E(E(E(E(E(l,s.Print,{order:70,label:c("printAsWorksheet"),appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.PRINT_QUESTIONS,args:[t.id]},button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Print,workflowPhase:r.eu.Start}),analyticsData:p}),s.ViewOriginalVideo,{order:80,label:c("viewOriginalVideo"),appLink:t._parentClip?{application:h.O.CLIPS,action:k.e.Clips.PLAY_CLIP,args:[t._parentClip.id,w.m.slugify(t._parentClip.name)]}:t._parentVideo?{application:h.O.VIDEOS,action:k.e.Videos.PLAY_VIDEO,args:[t._parentVideo.id,w.m.slugify(t._parentVideo.name)]}:null,button:!1,className:"btn btn-link",analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.ViewOriginalVideo}),analyticsData:p}),s.Approve,{order:90,label:c("approve"),button:!0,className:"btn btn-outline-dark mx-2",appLink:{application:h.O.DEFAULT,action:k.e.Default.APPROVE_VIDEO,params:{objectId:t.id,objectTypeId:j.E.Interactive}},analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.Approve}),analyticsData:p}),s.ManageAccess,{order:100,label:c("manageAccess"),button:!1,appLink:{application:h.O.DEFAULT,action:k.e.Default.MANAGE_ACCCESS,params:{objectId:t.id,objectTypeId:j.E.Interactive}},analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Click,descriptor:r.XX.ManageAccess}),analyticsData:p}),s.Delete,{order:110,label:!y||u?c("deleteInteractive"):"",appLink:{application:h.O.INTERACTIVES,action:k.e.Interactives.DELETE_INTERACTIVE,args:[t.id]},svgName:T.vn.Delete,tooltip:y&&!u?c("deleteInteractiveTooltip"):"",button:y&&!u,className:"btn btn-link ".concat(y&&!u?"":"text-danger"),analyticsOptions:Object.assign(Object.assign({},i),{actionType:r.Vw.Delete,workflowPhase:r.eu.Start}),analyticsData:p})};function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function F(t,e,a){return(e=function(t){var e=function(t,e){if("object"!==U(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,"string");if("object"!==U(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===U(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var M=function(t){var e=t.clip,a=t.breakpoints,i=t.config,s=t.analyticsData,o=t.analyticsOptions,l=f.k.mergeOptions(o,{entity:r.py.Clip,location:r.LZ.ClipListItem}),c=_(e,a,i,l,null,s),u=I.l.hasCustomRestriction(e);return Object.assign(Object.assign({},c),F(F({},n.ManageAccess,Object.assign(Object.assign({},c[n.ManageAccess]),{button:u,className:u?"btn btn-outline-dark":""})),n.OpenInCurationStudio,c[n.OpenInCurationStudio]))},X=function(t){var e=t.clip,a=t.breakpoints,i=t.config,s=t.analyticsData,o=t.analyticsOptions,l=C.T.encloseNamespace("liteShared.hooks"),c=a.xs,u=a.sm||a.md||c,p=f.k.mergeOptions(o,{entity:r.py.Clip,location:r.LZ.PlayPage}),d=_(e,a,i,p,null,s),b=I.l.hasCustomRestriction(e);return Object.assign(Object.assign({},d),F(F(F(F(F({},n.CreateInteractive,Object.assign(Object.assign({},d[n.CreateInteractive]),{order:u?20:0,label:l("makeInteractive"),svgName:T.vn.CreateInteractive,button:!u,className:u?"":"btn btn-outline-dark me-2",tooltip:null})),n.Share,Object.assign(Object.assign({},d[n.Share]),{label:l("share"),button:!c,className:c?"":"btn btn-outline-dark me-2",tooltip:null})),n.AddToPlaylist,Object.assign(Object.assign({},d[n.AddToPlaylist]),{label:l("addToPlaylist"),button:!c,className:c?"":"btn btn-outline-dark me-2",tooltip:null})),n.ManageAccess,Object.assign(Object.assign({},d[n.ManageAccess]),{button:b,className:b?"btn btn-outline-dark":""})),n.OpenInCurationStudio,d[n.OpenInCurationStudio]))},x=function(t){var e=t.clip,a=t.breakpoints,i=t.config,s=t.setFavourite,o=t.analyticsData,l=t.analyticsOptions,c=f.k.mergeOptions(l,{entity:r.py.Clip,location:r.LZ.StudentFeed}),u=_(e,a,i,c,s,o);return F(F({},n.AddToPlaylist,Object.assign(Object.assign({},u[n.AddToPlaylist]),{label:"",button:!0})),n.Favourite,u[n.Favourite])};function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function q(t,e,a){return(e=function(t){var e=function(t,e){if("object"!==B(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,"string");if("object"!==B(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===B(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var Y=C.T.encloseNamespace("liteShared.hooks"),Z=function(t){var e=t.interactive,a=t.breakpoints,i=t.config,n=t.analyticsOptions,o=t.analyticsData,l=f.k.mergeOptions(n,{entity:r.py.Interactive,location:r.LZ.VideoListItem}),c=R(e,a,i,l,null,o),u=I.l.hasCustomRestriction(e);return Object.assign(Object.assign({},c),q(q({},s.ManageAccess,Object.assign(Object.assign({},c[s.ManageAccess]),{button:u,className:u?"btn btn-outline-dark":""})),s.OpenInCurationStudio,c[s.OpenInCurationStudio]))},H=function(t){var e=t.interactive,a=t.breakpoints,i=t.config,n=t.analyticsOptions,o=t.analyticsData,l=f.k.mergeOptions(n,{entity:r.py.Interactive,location:r.LZ.PreviewInteractive}),c=R(e,a,i,l,null,o),u=I.l.hasCustomRestriction(e);return Object.assign(Object.assign({},c),q(q(q(q(q(q(q({},s.ViewResults,Object.assign(Object.assign({},c[s.ViewResults]),{order:0,className:"btn btn-outline-dark me-2",button:!0,tooltip:null,label:Y("viewResults")})),s.Edit,Object.assign(Object.assign({},c[s.Edit]),{order:10,label:Y("editInteractive"),tooltip:null,className:"btn btn-outline-dark me-2",button:!0})),s.Delete,Object.assign(Object.assign({},c[s.Delete]),{className:"text-danger",label:Y("deleteInteractive"),tooltip:null,button:!1})),s.Share,Object.assign(Object.assign({},c[s.Share]),{order:30,className:"btn btn-outline-dark me-2",label:Y("share"),tooltip:null})),s.AddToPlaylist,Object.assign(Object.assign({},c[s.AddToPlaylist]),{order:20,label:Y("addToPlaylist"),className:"btn btn-outline-dark me-2",tooltip:null})),s.ManageAccess,Object.assign(Object.assign({},c[s.ManageAccess]),{button:u,className:u?"btn btn-outline-dark":""})),s.OpenInCurationStudio,c[s.OpenInCurationStudio]))},W=function(t){var e=t.interactive,a=t.breakpoints,i=t.setFavourite,n=t.config,o=t.analyticsOptions,l=t.analyticsData,c=f.k.mergeOptions(o,{entity:r.py.Video,location:r.LZ.StudentFeed}),u=R(e,a,n,c,i,l);return q(q({},s.AddToPlaylist,Object.assign(Object.assign({},u[s.AddToPlaylist]),{label:"",button:!0})),s.Favourite,u[s.Favourite])};function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function G(t,e,a){return(e=function(t){var e=function(t,e){if("object"!==Q(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,"string");if("object"!==Q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Q(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var K,z="liteShared.hooks",J=function(t){var e=t.video,a=t.breakpoints,n=t.config,s=t.analyticsOptions,o=t.analyticsData,l=C.T.encloseNamespace(z),c=a.xs,u=f.k.mergeOptions(s,{entity:r.py.Video,location:r.LZ.VideoListItem}),p=N(e,a,n,u,null,o),d=I.l.hasCustomRestriction(e);return Object.assign(Object.assign({},p),G(G(G(G({},i.AddToPlaylist,Object.assign(Object.assign({},p[i.AddToPlaylist]),{label:c?l("addToPlaylist"):null,tooltip:c?null:l("addToPlaylist")})),i.Share,Object.assign(Object.assign({},p[i.Share]),{label:c?l("share"):null,tooltip:c?null:l("share")})),i.ManageAccess,Object.assign(Object.assign({},p[i.ManageAccess]),{button:d,className:d?"btn btn-outline-dark":""})),i.OpenInCurationStudio,p[i.OpenInCurationStudio]))},$=function(t){var e=t.video,a=t.breakpoints,n=t.config,s=t.analyticsOptions,o=t.analyticsData,l=C.T.encloseNamespace(z),c=a.xs,u=a.sm||a.md||c,p=f.k.mergeOptions(s,{entity:r.py.Video,location:r.LZ.PlayPage}),d=N(e,a,n,p,null,o),b=I.l.hasCustomRestriction(e);return Object.assign(Object.assign({},d),G(G(G(G(G({},i.CreateInteractive,Object.assign(Object.assign({},d[i.CreateInteractive]),{order:u?20:0,label:l("makeInteractive"),svgName:T.vn.CreateInteractive,className:"".concat(u?"":"btn btn-outline-dark me-2"," ").concat("D5OdX"),button:!u})),i.AddToPlaylist,Object.assign(Object.assign({},d[i.AddToPlaylist]),{order:u?0:10,className:c?"":"btn btn-outline-dark me-2"})),i.Share,Object.assign(Object.assign({},d[i.Share]),{order:u?10:20,className:c?"":"btn btn-outline-dark me-2"})),i.ManageAccess,Object.assign(Object.assign({},d[i.ManageAccess]),{button:b,className:b?"btn btn-outline-dark":""})),i.OpenInCurationStudio,d[i.OpenInCurationStudio]))},tt=function(t){var e=t.video,a=t.breakpoints,n=t.setFavourite,s=t.config,o=t.analyticsOptions,l=t.analyticsData,c=f.k.mergeOptions(o,{entity:r.py.Video,location:r.LZ.StudentFeed}),u=N(e,a,s,c,n,l);return G(G({},i.AddToPlaylist,Object.assign(Object.assign({},u[i.AddToPlaylist]),{label:"",button:!0})),i.Favourite,u[i.Favourite])};!function(t){t[t.PlayPage=0]="PlayPage",t[t.VideoItem=1]="VideoItem",t[t.StudentFeed=2]="StudentFeed"}(K||(K={}));var et=function(t){var e=o.a.useBasicFetch(c.L.config()),a=(0,y.T)(),C=a.hasPermissions,f=a.hasLocalPermissions,T=(0,b.c)(function(t){switch(t){case K.PlayPage:return r.LZ.PlayPage;case K.VideoItem:return r.LZ.VideoListItem;case K.StudentFeed:return r.LZ.StudentFeed}}(t)).setFavourite,w=(0,O.G)().isPlugin,j=(0,d.R0)().isUserCurator,V=(0,p.k)(),A=(0,m.b)(),k=(0,g.r)(null).libraryEditorClipsInteractives,h=o.a.useBasicFetch(C(l.C.ViewLibraries)&&u.D.libraryRequestLibraries());return function(a){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f(l.E.UseVideoActions)?v.M.isClip(a)?function(t){var e,a,i,s,o=t.clip,r=t.location,c=t.isPlugin,u=t.hasPermissions,p=t.canManageVideoAccess,d=t.requestLibraries,b=t.isUserCurator,y=t.libraryEditorOption;if(!(null===(e=v.M.getCanBeConsumed(o))||void 0===e?void 0:e.canConsume))return[];var g=function(t){switch(t){case K.PlayPage:return X;case K.StudentFeed:return x;case K.VideoItem:default:return M}}(r)(t);if(I.l.hasCustomRestriction(o))return p?[g[n.Approve],g[n.ManageAccess]]:[];var O=[g[n.AddToPlaylist]];if(r===K.StudentFeed)O.push(g[n.Favourite]);else{var m=u(l.C.StudentExperience),C=u(l.C.ViewAnalyticsProduct),f=u(l.C.ViewCustomerAnalytics);c||(O.push(g[n.Share]),O.push(g[n.CreateInteractive])),m||(c||r===K.VideoItem&&v.M.canViewOriginalVideo(o)&&O.push(g[n.ViewOriginalVideo]),C&&(f||(null===(a=o._canUpdate)||void 0===a?void 0:a.value))&&O.push(g[n.ViewUsage]),(null===(i=o._canAddToLibrary)||void 0===i?void 0:i.value)&&y&&(null==d?void 0:d.length)&&O.push(g[n.AddToLibrary])),(null===(s=o._canUpdate)||void 0===s?void 0:s.value)&&(O.push(g[n.EditDetails]),O.push(g[n.EditClip]),O.push(g[n.Delete])),p&&O.push(g[n.ManageAccess]),b&&O.push(g[n.OpenInCurationStudio])}return O}(Object.assign({clip:a,location:t,breakpoints:V,setFavourite:T,isPlugin:w,hasPermissions:C,config:e.data,requestLibraries:h.data,canManageVideoAccess:A,isUserCurator:j,libraryEditorOption:k},o)):v.M.isInteractive(a)?function(t){var e,a,i,n=t.interactive,o=t.location,r=t.breakpoints,c=t.setFavourite,u=t.isPlugin,p=t.hasPermissions,d=t.config,b=t.requestLibraries,y=t.analyticsData,g=t.analyticsOptions,O=t.canManageVideoAccess,m=t.isUserCurator,C=t.libraryEditorOption;if(!(null===(e=v.M.getCanBeConsumed(n))||void 0===e?void 0:e.canConsume))return[];var f=function(t){switch(t){case K.PlayPage:return H;case K.StudentFeed:return W;case K.VideoItem:default:return Z}}(o)({interactive:n,breakpoints:r,setFavourite:c,config:d,analyticsOptions:g,analyticsData:y});if(I.l.hasCustomRestriction(n))return O?[f[s.Approve],f[s.ManageAccess]]:[];var T=[];if(n.status!==S.X.Draft&&T.push(f[s.AddToPlaylist]),o===K.StudentFeed)T.push(f[s.Favourite]);else{var w=p(l.C.StudentExperience),j=p(l.C.ViewAnalyticsProduct);w||(T.push(f[s.Copy]),j&&T.push(f[s.ViewResults]),(null===(a=n._canAddToLibrary)||void 0===a?void 0:a.value)&&C&&(null==b?void 0:b.length)&&n.status!==S.X.Draft&&T.push(f[s.AddToLibrary])),n.status!==S.X.Draft&&T.push(f[s.Share]),T.push(f[s.Print]),(null===(i=n._canUpdate)||void 0===i?void 0:i.value)&&(u||T.push(n.status===S.X.Draft?f[s.Edit]:f[s.Unpublish]),T.push(f[s.Delete])),O&&T.push(f[s.ManageAccess])}return o===K.VideoItem&&(T.push(f[s.PreviewQuestions]),v.M.canViewOriginalVideo(n)&&T.push(f[s.ViewOriginalVideo])),m&&T.push(f[s.OpenInCurationStudio]),T}(Object.assign({interactive:a,location:t,breakpoints:V,setFavourite:T,isPlugin:w,hasPermissions:C,config:e.data,requestLibraries:h.data,canManageVideoAccess:A,isUserCurator:j,libraryEditorOption:k},o)):function(t){var e,a,n,s=t.video,o=t.location,r=t.breakpoints,c=t.setFavourite,u=t.isPlugin,p=t.hasPermissions,d=t.config,b=t.analyticsData,y=t.analyticsOptions,g=t.requestLibraries,O=t.canManageVideoAccess,m=t.isUserCurator;if(!v.M.getCanBeConsumed(s).canConsume)return[];var C=function(t){switch(t){case K.PlayPage:return $;case K.StudentFeed:return tt;case K.VideoItem:default:return J}}(o)({video:s,breakpoints:r,setFavourite:c,config:d,analyticsOptions:y,analyticsData:b});if(I.l.hasCustomRestriction(s))return O?[C[i.Approve],C[i.ManageAccess]]:[];var f=[C[i.AddToPlaylist]];if(o===K.StudentFeed)f.push(C[i.Favourite]);else{var T=p(l.C.StudentExperience),w=p(l.C.ViewAnalyticsProduct),S=p(l.C.ViewCustomerAnalytics);f.push(C[i.Share]),T||(O&&f.push(C[i.ManageAccess]),(null===(e=s._canAddToLibrary)||void 0===e?void 0:e.value)&&(null==g?void 0:g.length)&&f.push(C[i.AddToLibrary]),s._hasCurriculumLinks&&f.push(C[i.ViewCurriculumLinks]),w&&(S||(null===(a=s._canUpdate)||void 0===a?void 0:a.value))&&f.push(C[i.ViewUsage])),u||(f.push(C[i.CreateClip]),f.push(C[i.CreateInteractive])),(null===(n=s._canUpdate)||void 0===n?void 0:n.value)&&(f.push(C[i.EditDetails]),f.push(C[i.Delete]),f.push(C[i.Download])),m&&f.push(C[i.OpenInCurationStudio])}return f}(Object.assign({video:a,location:t,breakpoints:V,setFavourite:T,isPlugin:w,hasPermissions:C,config:e.data,requestLibraries:h.data,canManageVideoAccess:A,isUserCurator:j},o)):[]}}}}]);