@clickview/lite 0.35.3-dev.0 → 0.36.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/css/{1201-lite-c31c094e0b.chunk.css → 1201-lite-bc27e1841b.chunk.css} +2 -2
- package/dist/css/{1461-lite-8a6d9f8005.chunk.css → 1461-lite-3c6f5b78a2.chunk.css} +2 -2
- package/dist/css/{1514-lite-b377d8aad7.chunk.css → 1514-lite-e7eb23a1d0.chunk.css} +2 -2
- package/dist/css/{763-lite-8818fa8d4c.chunk.css → 1519-lite-c0be07cd4c.chunk.css} +2 -2
- package/dist/css/{4973-lite-f724003877.chunk.css → 1581-lite-24faaebc8c.chunk.css} +2 -2
- package/dist/css/{1688-lite-cbde295a12.chunk.css → 1688-lite-a653f82331.chunk.css} +2 -2
- package/dist/css/{2469-lite-7a8e220d2f.chunk.css → 2469-lite-f38a67e16f.chunk.css} +4 -4
- package/dist/css/{2651-lite-c31c094e0b.chunk.css → 2651-lite-bc27e1841b.chunk.css} +2 -2
- package/dist/css/{3401-lite-705c2c5fe4.chunk.css → 268-lite-0b8496b169.chunk.css} +1 -1
- package/dist/css/{3311-lite-8f53694323.chunk.css → 3311-lite-1e355d6982.chunk.css} +2 -2
- package/dist/css/{4210-lite-5f2e12e28a.chunk.css → 4210-lite-e11245dada.chunk.css} +2 -2
- package/dist/css/{5127-lite-be5b495f2e.chunk.css → 4728-lite-6298f2bf71.chunk.css} +2 -2
- package/dist/css/{4728-lite-be5b495f2e.chunk.css → 5127-lite-6298f2bf71.chunk.css} +2 -2
- package/dist/css/{5306-lite-40a1dcaba5.chunk.css → 5306-lite-cb200964ce.chunk.css} +2 -2
- package/dist/css/{5595-lite-c07231bb2e.chunk.css → 5595-lite-888c19c68f.chunk.css} +2 -2
- package/dist/css/{5965-lite-8818fa8d4c.chunk.css → 5965-lite-c0be07cd4c.chunk.css} +2 -2
- package/dist/css/7020-lite-7347395735.chunk.css +40 -0
- package/dist/css/{9516-lite-4751b1e0aa.chunk.css → 7119-lite-c005d83db5.chunk.css} +2 -2
- package/dist/css/{1519-lite-8818fa8d4c.chunk.css → 763-lite-c0be07cd4c.chunk.css} +2 -2
- package/dist/css/{7701-lite-6d26cc737a.chunk.css → 7679-lite-fc8fd7bea5.chunk.css} +2 -1
- package/dist/css/{7703-lite-7b8ce5ad7c.chunk.css → 7703-lite-e226cf1428.chunk.css} +1 -1
- package/dist/css/{1944-lite-6cd5066b84.chunk.css → 7726-lite-f6a761b74a.chunk.css} +2 -1
- package/dist/css/8028-lite-24022433b1.chunk.css +38 -0
- package/dist/css/{9133-lite-bc1a27e4da.chunk.css → 8469-lite-47a5344de5.chunk.css} +2 -2
- package/dist/css/{8541-lite-0f6c636afb.chunk.css → 8541-lite-2c4667c98a.chunk.css} +2 -2
- package/dist/css/{8469-lite-bc1a27e4da.chunk.css → 9133-lite-47a5344de5.chunk.css} +2 -2
- package/dist/css/{9704-lite-60ead9f8df.chunk.css → 9704-lite-fe60ddd8f0.chunk.css} +2 -2
- package/dist/languages/en.json +1 -1
- package/dist/scripts/1285-0250bba8c3-lite.chunk.js +1 -0
- package/dist/scripts/1316-67d880daa1-lite.chunk.js +1 -0
- package/dist/scripts/1461-dfff501bca-lite.chunk.js +1 -0
- package/dist/scripts/1514-fdf304aa99-lite.chunk.js +1 -0
- package/dist/scripts/1518-8c3cf8d7e1-lite.chunk.js +1 -0
- package/dist/scripts/1519-aa4fb0cd55-lite.chunk.js +1 -0
- package/dist/scripts/{1526-93624f65f1-lite.chunk.js → 1526-eda6832e12-lite.chunk.js} +1 -1
- package/dist/scripts/1581-2dd179da76-lite.chunk.js +1 -0
- package/dist/scripts/1617-db4adcd8e9-lite.chunk.js +1 -0
- package/dist/scripts/{1672-9ae25f79a6-lite.chunk.js → 1672-477ad27e45-lite.chunk.js} +1 -1
- package/dist/scripts/1688-d747de40f0-lite.chunk.js +1 -0
- package/dist/scripts/{1863-8f826ffb83-lite.chunk.js → 1863-0c5334f2c2-lite.chunk.js} +1 -1
- package/dist/scripts/1919-5393388d59-lite.chunk.js +1 -0
- package/dist/scripts/2118-4bee787686-lite.chunk.js +2 -0
- package/dist/scripts/2188-eb2a129a0c-lite.chunk.js +1 -0
- package/dist/scripts/2235-02fa6854c8-lite.chunk.js +1 -0
- package/dist/scripts/2261-93fd134a56-lite.chunk.js +1 -0
- package/dist/scripts/2405-09ab783092-lite.chunk.js +1 -0
- package/dist/scripts/2469-4cd6716750-lite.chunk.js +1 -0
- package/dist/scripts/268-3513266caf-lite.chunk.js +1 -0
- package/dist/scripts/2703-d8211f2db1-lite.chunk.js +2 -0
- package/dist/scripts/287-e798bff985-lite.chunk.js +1 -0
- package/dist/scripts/3012-f28e1b683b-lite.chunk.js +1 -0
- package/dist/scripts/3020-e6ec52d6b9-lite.chunk.js +1 -0
- package/dist/scripts/3154-eb045d3ab6-lite.chunk.js +1 -0
- package/dist/scripts/316-5680165d6a-lite.chunk.js +1 -0
- package/dist/scripts/3170-0135dadbe0-lite.chunk.js +1 -0
- package/dist/scripts/3216-9caff8afdd-lite.chunk.js +1 -0
- package/dist/scripts/3311-01c48c762e-lite.chunk.js +1 -0
- package/dist/scripts/355-3eb0659bd4-lite.chunk.js +1 -0
- package/dist/scripts/3645-179c1de58b-lite.chunk.js +2 -0
- package/dist/scripts/3654-96999f107e-lite.chunk.js +1 -0
- package/dist/scripts/3667-fff988dddb-lite.chunk.js +2 -0
- package/dist/scripts/3728-8f767eeedd-lite.chunk.js +1 -0
- package/dist/scripts/3836-060f903a23-lite.chunk.js +1 -0
- package/dist/scripts/3848-a3b274c11c-lite.chunk.js +1 -0
- package/dist/scripts/3849-1690378f9f-lite.chunk.js +1 -0
- package/dist/scripts/3966-985e03cb46-lite.chunk.js +1 -0
- package/dist/scripts/{4032-01f86c1e49-lite.chunk.js → 4032-ad48f98700-lite.chunk.js} +1 -1
- package/dist/scripts/407-6445e9a93d-lite.chunk.js +2 -0
- package/dist/scripts/4210-0bc465eb67-lite.chunk.js +1 -0
- package/dist/scripts/4393-bb6bbe6eb1-lite.chunk.js +1 -0
- package/dist/scripts/4436-b92639529d-lite.chunk.js +1 -0
- package/dist/scripts/4441-fc4a723145-lite.chunk.js +2 -0
- package/dist/scripts/4537-34124b109e-lite.chunk.js +1 -0
- package/dist/scripts/455-eee6a152e3-lite.chunk.js +1 -0
- package/dist/scripts/4612-cfc046e6e9-lite.chunk.js +1 -0
- package/dist/scripts/4617-d497047b0b-lite.chunk.js +1 -0
- package/dist/scripts/4632-32447c54f1-lite.chunk.js +1 -0
- package/dist/scripts/{4690-40f41af539-lite.chunk.js → 4690-31d76373a8-lite.chunk.js} +1 -1
- package/dist/scripts/{4753-e9cd640ceb-lite.chunk.js → 4753-d8e01a7af9-lite.chunk.js} +1 -1
- package/dist/scripts/4942-a76fc1b2e9-lite.chunk.js +2 -0
- package/dist/scripts/4956-340c8b5771-lite.chunk.js +1 -0
- package/dist/scripts/5041-8e820ed93c-lite.chunk.js +1 -0
- package/dist/scripts/5134-5a2efd579d-lite.chunk.js +1 -0
- package/dist/scripts/{5143-8ad2cd9a86-lite.chunk.js → 5143-56be0b0492-lite.chunk.js} +1 -1
- package/dist/scripts/5177-a87c24b957-lite.chunk.js +2 -0
- package/dist/scripts/5268-0639a4858d-lite.chunk.js +2 -0
- package/dist/scripts/5271-da40b4f079-lite.chunk.js +1 -1
- package/dist/scripts/5306-04f0322aa4-lite.chunk.js +1 -0
- package/dist/scripts/5379-5fe1299560-lite.chunk.js +1 -0
- package/dist/scripts/5442-b859040432-lite.chunk.js +2 -0
- package/dist/scripts/5595-45c7fe484d-lite.chunk.js +1 -0
- package/dist/scripts/5622-679fd14f2a-lite.chunk.js +2 -0
- package/dist/scripts/5638-083d843d3d-lite.chunk.js +1 -0
- package/dist/scripts/{5940-54217d5e0d-lite.chunk.js → 5940-d380295b7d-lite.chunk.js} +1 -1
- package/dist/scripts/5965-c4c70d053a-lite.chunk.js +1 -0
- package/dist/scripts/5974-a8d8bd2402-lite.chunk.js +1 -0
- package/dist/scripts/5986-8f05456911-lite.chunk.js +1 -0
- package/dist/scripts/6086-06d5d40e66-lite.chunk.js +2 -0
- package/dist/scripts/615-0322d641a3-lite.chunk.js +1 -0
- package/dist/scripts/{6274-bd0f8f77cb-lite.chunk.js → 6274-7545674bdd-lite.chunk.js} +1 -1
- package/dist/scripts/6330-ff1a098eb1-lite.chunk.js +1 -0
- package/dist/scripts/6368-744497853e-lite.chunk.js +1 -0
- package/dist/scripts/{6433-8a473c7c44-lite.chunk.js → 6433-fde75b34f2-lite.chunk.js} +1 -1
- package/dist/scripts/6450-ccd62009a0-lite.chunk.js +1 -0
- package/dist/scripts/6532-5bc872b460-lite.chunk.js +1 -0
- package/dist/scripts/6572-c4534d0d35-lite.chunk.js +1 -0
- package/dist/scripts/6683-feadf29b0d-lite.chunk.js +2 -0
- package/dist/scripts/6725-6fe76436f5-lite.chunk.js +1 -0
- package/dist/scripts/6736-7223de888f-lite.chunk.js +2 -0
- package/dist/scripts/6801-a957a1b187-lite.chunk.js +1 -0
- package/dist/scripts/6823-b2eb2f9837-lite.chunk.js +2 -0
- package/dist/scripts/{6891-b2c5f27bce-lite.chunk.js → 6891-8f643cb84b-lite.chunk.js} +1 -1
- package/dist/scripts/6896-8b4fc3fd6d-lite.chunk.js +1 -0
- package/dist/scripts/6930-84d4717d08-lite.chunk.js +1 -0
- package/dist/scripts/7017-dc16719bf3-lite.chunk.js +1 -0
- package/dist/scripts/7020-fae30555f8-lite.chunk.js +1 -0
- package/dist/scripts/7052-7a62e4f75e-lite.chunk.js +2 -0
- package/dist/scripts/{7072-1cf02994dd-lite.chunk.js → 7072-e5581f0660-lite.chunk.js} +2 -2
- package/dist/scripts/7115-42bbdbbc62-lite.chunk.js +1 -0
- package/dist/scripts/7117-1da2d8e101-lite.chunk.js +1 -0
- package/dist/scripts/7119-09592c4b7a-lite.chunk.js +1 -0
- package/dist/scripts/714-362014cfec-lite.chunk.js +1 -0
- package/dist/scripts/{7167-9668cb85d2-lite.chunk.js → 7167-91d46eb4a3-lite.chunk.js} +1 -1
- package/dist/scripts/7178-36185f322a-lite.chunk.js +1 -0
- package/dist/scripts/7205-20ace43ff9-lite.chunk.js +1 -0
- package/dist/scripts/{7221-f5d0743e30-lite.chunk.js → 7221-d71ae05428-lite.chunk.js} +2 -2
- package/dist/scripts/7288-8fca167593-lite.chunk.js +1 -0
- package/dist/scripts/{7293-aa9c9eeb72-lite.chunk.js → 7293-9518687443-lite.chunk.js} +1 -1
- package/dist/scripts/7351-77e3da68f0-lite.chunk.js +1 -0
- package/dist/scripts/7385-6aee15b2de-lite.chunk.js +2 -0
- package/dist/scripts/7432-2afa43af27-lite.chunk.js +1 -0
- package/dist/scripts/7506-d91786f020-lite.chunk.js +1 -0
- package/dist/scripts/754-ec56ea2365-lite.chunk.js +1 -0
- package/dist/scripts/{7540-419fef286c-lite.chunk.js → 7540-2694a96451-lite.chunk.js} +1 -1
- package/dist/scripts/{7555-e79e8614f1-lite.chunk.js → 7555-3d6fa65b58-lite.chunk.js} +1 -1
- package/dist/scripts/763-6cc8e9ba64-lite.chunk.js +1 -0
- package/dist/scripts/{7701-791908e1c3-lite.chunk.js → 7679-8bed680cf6-lite.chunk.js} +1 -1
- package/dist/scripts/{7703-87cabd69cf-lite.chunk.js → 7703-6db81722e0-lite.chunk.js} +1 -1
- package/dist/scripts/7726-b15eceb501-lite.chunk.js +1 -0
- package/dist/scripts/{7855-80d224d718-lite.chunk.js → 7855-f51632f802-lite.chunk.js} +1 -1
- package/dist/scripts/{5622-9fd84985bd-lite.chunk.js → 7902-40f67c9b7e-lite.chunk.js} +2 -2
- package/dist/scripts/8028-b01b8bc879-lite.chunk.js +1 -0
- package/dist/scripts/8046-640629c47e-lite.chunk.js +1 -0
- package/dist/scripts/{8323-e2892d3bed-lite.chunk.js → 8323-d72038b720-lite.chunk.js} +1 -1
- package/dist/scripts/8541-e8a41d5f90-lite.chunk.js +1 -0
- package/dist/scripts/8759-d8e5c29a2e-lite.chunk.js +1 -0
- package/dist/scripts/8772-0cae662668-lite.chunk.js +1 -0
- package/dist/scripts/8834-ed4a58675e-lite.chunk.js +1 -0
- package/dist/scripts/{9016-68a0088483-lite.chunk.js → 9016-3aafc7c4a4-lite.chunk.js} +1 -1
- package/dist/scripts/9226-ac0d7f7e2b-lite.chunk.js +1 -0
- package/dist/scripts/9230-c680de51dd-lite.chunk.js +2 -0
- package/dist/scripts/9242-a9f54957c0-lite.chunk.js +1 -0
- package/dist/scripts/9254-a56914f3fc-lite.chunk.js +1 -0
- package/dist/scripts/9433-255ea943a7-lite.chunk.js +1 -0
- package/dist/scripts/{9478-7210139ef4-lite.chunk.js → 9478-d5ff15e95c-lite.chunk.js} +2 -2
- package/dist/scripts/9484-adfe8c1235-lite.chunk.js +2 -0
- package/dist/scripts/9537-80900593e8-lite.chunk.js +1 -0
- package/dist/scripts/{9657-3bd86a7f20-lite.chunk.js → 9657-8fd569479f-lite.chunk.js} +1 -1
- package/dist/scripts/9660-bec1db5818-lite.chunk.js +1 -0
- package/dist/scripts/9674-2aed0bd452-lite.chunk.js +1 -0
- package/dist/scripts/9704-cfcc679915-lite.chunk.js +1 -0
- package/dist/scripts/{9719-c890a68331-lite.chunk.js → 9719-32b0388f01-lite.chunk.js} +1 -1
- package/dist/scripts/9883-83a8db6194-lite.chunk.js +1 -0
- package/dist/scripts/993-83f5f2964b-lite.chunk.js +2 -0
- package/dist/scripts/bundle-abc628d833.min.js +2 -0
- package/jest.config.js +11 -11
- package/package.json +62 -62
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +25 -25
- package/typings/libs/draft-convert.d.ts +3 -3
- package/typings/libs/google-api.d.ts +93 -93
- package/typings/libs/intersection-observer.d.ts +82 -82
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/react-table-config.d.ts +138 -138
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
- package/typings/utils/imports.d.ts +13 -13
- package/dist/css/8364-lite-8c45fd1bcc.chunk.css +0 -32
- package/dist/css/9871-lite-71a39d9bb3.chunk.css +0 -33
- package/dist/scripts/1285-7e8f858b90-lite.chunk.js +0 -1
- package/dist/scripts/1316-6f10b36512-lite.chunk.js +0 -1
- package/dist/scripts/1461-f7e964ae21-lite.chunk.js +0 -1
- package/dist/scripts/151-5268c8b0b2-lite.chunk.js +0 -1
- package/dist/scripts/1514-c423b48155-lite.chunk.js +0 -1
- package/dist/scripts/1517-dcfff93ae3-lite.chunk.js +0 -1
- package/dist/scripts/1518-0ea2791c37-lite.chunk.js +0 -1
- package/dist/scripts/1519-bae52ef1b1-lite.chunk.js +0 -1
- package/dist/scripts/1688-ca1a2a9f04-lite.chunk.js +0 -1
- package/dist/scripts/1820-204b28ad32-lite.chunk.js +0 -1
- package/dist/scripts/1919-7889c92284-lite.chunk.js +0 -1
- package/dist/scripts/1944-b156ae061e-lite.chunk.js +0 -1
- package/dist/scripts/209-f1187b4df2-lite.chunk.js +0 -1
- package/dist/scripts/2118-7741e69919-lite.chunk.js +0 -2
- package/dist/scripts/2188-0278da007c-lite.chunk.js +0 -1
- package/dist/scripts/2235-4a03aae86f-lite.chunk.js +0 -1
- package/dist/scripts/2251-519ee9915e-lite.chunk.js +0 -1
- package/dist/scripts/2469-1c69c69857-lite.chunk.js +0 -1
- package/dist/scripts/2703-d8a1c8e6f5-lite.chunk.js +0 -2
- package/dist/scripts/287-c53e62a45c-lite.chunk.js +0 -1
- package/dist/scripts/3012-cc96ee5265-lite.chunk.js +0 -1
- package/dist/scripts/3020-6f39be646f-lite.chunk.js +0 -1
- package/dist/scripts/3154-539a352006-lite.chunk.js +0 -1
- package/dist/scripts/3216-d62de73736-lite.chunk.js +0 -1
- package/dist/scripts/3311-808538c9c6-lite.chunk.js +0 -1
- package/dist/scripts/3401-c7a150f32d-lite.chunk.js +0 -1
- package/dist/scripts/355-59bd6e899f-lite.chunk.js +0 -1
- package/dist/scripts/3645-d1313ec6dc-lite.chunk.js +0 -2
- package/dist/scripts/3654-0961346057-lite.chunk.js +0 -1
- package/dist/scripts/3667-6ce2b5b14a-lite.chunk.js +0 -2
- package/dist/scripts/3728-51b81bfa83-lite.chunk.js +0 -1
- package/dist/scripts/3836-5487914e10-lite.chunk.js +0 -1
- package/dist/scripts/3848-b85b763432-lite.chunk.js +0 -1
- package/dist/scripts/3849-965a1a6927-lite.chunk.js +0 -1
- package/dist/scripts/3966-80e9cd7a87-lite.chunk.js +0 -1
- package/dist/scripts/407-1e3ffc6e32-lite.chunk.js +0 -2
- package/dist/scripts/414-50eeedf502-lite.chunk.js +0 -1
- package/dist/scripts/4210-66c5d14532-lite.chunk.js +0 -1
- package/dist/scripts/4393-56a2324cff-lite.chunk.js +0 -1
- package/dist/scripts/4436-2615b1ce10-lite.chunk.js +0 -1
- package/dist/scripts/4441-372ecffa04-lite.chunk.js +0 -2
- package/dist/scripts/4463-49b8d27dbb-lite.chunk.js +0 -1
- package/dist/scripts/4537-6383a3ea11-lite.chunk.js +0 -1
- package/dist/scripts/4546-050a6f180a-lite.chunk.js +0 -1
- package/dist/scripts/4612-60a22d0dd6-lite.chunk.js +0 -1
- package/dist/scripts/4617-940157b232-lite.chunk.js +0 -1
- package/dist/scripts/4632-74c440dce4-lite.chunk.js +0 -1
- package/dist/scripts/4676-9295ffc870-lite.chunk.js +0 -2
- package/dist/scripts/4754-fe1cbf4ea4-lite.chunk.js +0 -1
- package/dist/scripts/4942-8b3935e911-lite.chunk.js +0 -2
- package/dist/scripts/4956-b0840f1cfa-lite.chunk.js +0 -1
- package/dist/scripts/4972-4eb7102934-lite.chunk.js +0 -1
- package/dist/scripts/4973-5df11dd4e8-lite.chunk.js +0 -1
- package/dist/scripts/5041-2af2a2541f-lite.chunk.js +0 -1
- package/dist/scripts/5134-8e129a0a0b-lite.chunk.js +0 -1
- package/dist/scripts/5177-ea01e21af3-lite.chunk.js +0 -2
- package/dist/scripts/5268-6c93736375-lite.chunk.js +0 -2
- package/dist/scripts/5306-b25542939f-lite.chunk.js +0 -1
- package/dist/scripts/5379-95b5e191fe-lite.chunk.js +0 -1
- package/dist/scripts/5442-82e8147edc-lite.chunk.js +0 -2
- package/dist/scripts/5595-ed6e8d9ca0-lite.chunk.js +0 -1
- package/dist/scripts/5965-55b2273c41-lite.chunk.js +0 -1
- package/dist/scripts/5974-8af9af8fae-lite.chunk.js +0 -1
- package/dist/scripts/5986-6f6b2bdf89-lite.chunk.js +0 -1
- package/dist/scripts/6086-642813efbe-lite.chunk.js +0 -2
- package/dist/scripts/6117-b18657a9d2-lite.chunk.js +0 -1
- package/dist/scripts/615-20af1b2df5-lite.chunk.js +0 -1
- package/dist/scripts/6330-34349d1457-lite.chunk.js +0 -1
- package/dist/scripts/6368-6e322edf00-lite.chunk.js +0 -1
- package/dist/scripts/6450-0bde4cef33-lite.chunk.js +0 -1
- package/dist/scripts/6532-19e258fc3e-lite.chunk.js +0 -1
- package/dist/scripts/6572-02f3301356-lite.chunk.js +0 -1
- package/dist/scripts/6683-6a53507e03-lite.chunk.js +0 -2
- package/dist/scripts/6801-30961910e4-lite.chunk.js +0 -1
- package/dist/scripts/6823-ca63f0d5eb-lite.chunk.js +0 -2
- package/dist/scripts/6896-e0f3a08bf2-lite.chunk.js +0 -2
- package/dist/scripts/6930-9f739d475b-lite.chunk.js +0 -1
- package/dist/scripts/6998-43af06b2d9-lite.chunk.js +0 -1
- package/dist/scripts/7017-5eb39ba9d6-lite.chunk.js +0 -2
- package/dist/scripts/7052-7ba7299ff2-lite.chunk.js +0 -2
- package/dist/scripts/7115-c73692fe3a-lite.chunk.js +0 -1
- package/dist/scripts/7117-a7ffb9474e-lite.chunk.js +0 -1
- package/dist/scripts/714-02e02b6b62-lite.chunk.js +0 -1
- package/dist/scripts/7178-d9ec32d7d3-lite.chunk.js +0 -1
- package/dist/scripts/7205-1852c97c81-lite.chunk.js +0 -1
- package/dist/scripts/7288-3d3041485c-lite.chunk.js +0 -1
- package/dist/scripts/7351-dce910a8f8-lite.chunk.js +0 -1
- package/dist/scripts/7385-f7e1626f26-lite.chunk.js +0 -1
- package/dist/scripts/7432-d41b2e0039-lite.chunk.js +0 -1
- package/dist/scripts/7506-75116824b9-lite.chunk.js +0 -1
- package/dist/scripts/754-2d58ce124d-lite.chunk.js +0 -1
- package/dist/scripts/763-a6b6d996a9-lite.chunk.js +0 -1
- package/dist/scripts/8046-82f07ecfc6-lite.chunk.js +0 -1
- package/dist/scripts/8364-3f8f3ebbfd-lite.chunk.js +0 -1
- package/dist/scripts/8541-e93ccc1e65-lite.chunk.js +0 -1
- package/dist/scripts/8759-46b3f7b560-lite.chunk.js +0 -1
- package/dist/scripts/8763-8fc868e00e-lite.chunk.js +0 -1
- package/dist/scripts/8834-bb079c32a4-lite.chunk.js +0 -1
- package/dist/scripts/8873-514feb8faa-lite.chunk.js +0 -1
- package/dist/scripts/9226-81363cd855-lite.chunk.js +0 -1
- package/dist/scripts/9230-b5f75f4b25-lite.chunk.js +0 -2
- package/dist/scripts/9242-02b00e644d-lite.chunk.js +0 -1
- package/dist/scripts/9484-2a3aa518fd-lite.chunk.js +0 -2
- package/dist/scripts/9516-7437a5a60e-lite.chunk.js +0 -1
- package/dist/scripts/9674-f5e66f8c06-lite.chunk.js +0 -1
- package/dist/scripts/9704-ee574224f3-lite.chunk.js +0 -1
- package/dist/scripts/9871-2573a8bff1-lite.chunk.js +0 -1
- package/dist/scripts/993-51d56e4686-lite.chunk.js +0 -2
- package/dist/scripts/bundle-1db2700368.min.js +0 -2
- /package/dist/css/{6117-lite-9f291e9fd0.chunk.css → 2405-lite-9f291e9fd0.chunk.css} +0 -0
- /package/dist/css/{1820-lite-983fc2b64e.chunk.css → 316-lite-983fc2b64e.chunk.css} +0 -0
- /package/dist/css/{4463-lite-b9b1686d14.chunk.css → 5638-lite-b9b1686d14.chunk.css} +0 -0
- /package/dist/css/{414-lite-db1dbcbd39.chunk.css → 6725-lite-db1dbcbd39.chunk.css} +0 -0
- /package/dist/css/{8763-lite-db1dbcbd39.chunk.css → 8772-lite-db1dbcbd39.chunk.css} +0 -0
- /package/dist/css/{209-lite-6554428c5a.chunk.css → 9537-lite-6554428c5a.chunk.css} +0 -0
- /package/dist/css/{4546-lite-3d08e5e8c2.chunk.css → 9660-lite-3d08e5e8c2.chunk.css} +0 -0
- /package/dist/scripts/{1201-c93ac8a29a-lite.chunk.js → 1201-329e609b97-lite.chunk.js} +0 -0
- /package/dist/scripts/{1672-9ae25f79a6-lite.chunk.js.LICENSE.txt → 1672-477ad27e45-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1725-0e284a32f3-lite.chunk.js → 1725-e5ea09eb1e-lite.chunk.js} +0 -0
- /package/dist/scripts/{1891-dd253c3378-lite.chunk.js → 1891-14c0a7067f-lite.chunk.js} +0 -0
- /package/dist/scripts/{1913-fef63b944b-lite.chunk.js → 1913-6117995be8-lite.chunk.js} +0 -0
- /package/dist/scripts/{2118-7741e69919-lite.chunk.js.LICENSE.txt → 2118-4bee787686-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2208-1799924a6a-lite.chunk.js → 2208-8752ddeb01-lite.chunk.js} +0 -0
- /package/dist/scripts/{2452-f96e548d17-lite.chunk.js → 2452-446607a894-lite.chunk.js} +0 -0
- /package/dist/scripts/{2651-1323807150-lite.chunk.js → 2651-a773e78cbb-lite.chunk.js} +0 -0
- /package/dist/scripts/{2703-d8a1c8e6f5-lite.chunk.js.LICENSE.txt → 2703-d8211f2db1-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3645-d1313ec6dc-lite.chunk.js.LICENSE.txt → 3645-179c1de58b-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3667-6ce2b5b14a-lite.chunk.js.LICENSE.txt → 3667-fff988dddb-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{407-1e3ffc6e32-lite.chunk.js.LICENSE.txt → 407-6445e9a93d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4182-6869dfda31-lite.chunk.js → 4182-86ebd7cc85-lite.chunk.js} +0 -0
- /package/dist/scripts/{4441-372ecffa04-lite.chunk.js.LICENSE.txt → 4441-fc4a723145-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4728-8837108457-lite.chunk.js → 4728-9ff8ae73c1-lite.chunk.js} +0 -0
- /package/dist/scripts/{4676-9295ffc870-lite.chunk.js.LICENSE.txt → 4942-a76fc1b2e9-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4942-8b3935e911-lite.chunk.js.LICENSE.txt → 5177-a87c24b957-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5177-ea01e21af3-lite.chunk.js.LICENSE.txt → 5268-0639a4858d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5268-6c93736375-lite.chunk.js.LICENSE.txt → 5442-b859040432-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5606-68f1afd060-lite.chunk.js → 5606-adb8a4564d-lite.chunk.js} +0 -0
- /package/dist/scripts/{5442-82e8147edc-lite.chunk.js.LICENSE.txt → 5622-679fd14f2a-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5877-1dc9ca4f2d-lite.chunk.js → 5877-855b112687-lite.chunk.js} +0 -0
- /package/dist/scripts/{5622-9fd84985bd-lite.chunk.js.LICENSE.txt → 6086-06d5d40e66-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6290-b8e7be07c0-lite.chunk.js → 6290-9cfcecf418-lite.chunk.js} +0 -0
- /package/dist/scripts/{6086-642813efbe-lite.chunk.js.LICENSE.txt → 6433-fde75b34f2-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6604-d331808398-lite.chunk.js → 6604-19f0427fcc-lite.chunk.js} +0 -0
- /package/dist/scripts/{6433-8a473c7c44-lite.chunk.js.LICENSE.txt → 6683-feadf29b0d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6683-6a53507e03-lite.chunk.js.LICENSE.txt → 6736-7223de888f-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6746-a32d22602e-lite.chunk.js → 6746-85bf67464e-lite.chunk.js} +0 -0
- /package/dist/scripts/{6823-ca63f0d5eb-lite.chunk.js.LICENSE.txt → 6823-b2eb2f9837-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{689-165a5a700c-lite.chunk.js → 689-cfa18cb472-lite.chunk.js} +0 -0
- /package/dist/scripts/{6896-e0f3a08bf2-lite.chunk.js.LICENSE.txt → 7052-7a62e4f75e-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7017-5eb39ba9d6-lite.chunk.js.LICENSE.txt → 7072-e5581f0660-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7052-7ba7299ff2-lite.chunk.js.LICENSE.txt → 7221-d71ae05428-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7072-1cf02994dd-lite.chunk.js.LICENSE.txt → 7385-6aee15b2de-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7818-a9ab33bdd4-lite.chunk.js → 7818-c81c2d60b9-lite.chunk.js} +0 -0
- /package/dist/scripts/{7221-f5d0743e30-lite.chunk.js.LICENSE.txt → 7902-40f67c9b7e-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8323-e2892d3bed-lite.chunk.js.LICENSE.txt → 8323-d72038b720-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8469-c872f52295-lite.chunk.js → 8469-84f9189f03-lite.chunk.js} +0 -0
- /package/dist/scripts/{8982-267320e287-lite.chunk.js → 8982-12ad6a9e9b-lite.chunk.js} +0 -0
- /package/dist/scripts/{9016-68a0088483-lite.chunk.js.LICENSE.txt → 9016-3aafc7c4a4-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9133-d324adda28-lite.chunk.js → 9133-43e40d927c-lite.chunk.js} +0 -0
- /package/dist/scripts/{9230-b5f75f4b25-lite.chunk.js.LICENSE.txt → 9230-c680de51dd-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9478-7210139ef4-lite.chunk.js.LICENSE.txt → 9478-d5ff15e95c-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9484-2a3aa518fd-lite.chunk.js.LICENSE.txt → 9484-adfe8c1235-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9719-c890a68331-lite.chunk.js.LICENSE.txt → 9719-32b0388f01-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{993-51d56e4686-lite.chunk.js.LICENSE.txt → 993-83f5f2964b-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-1db2700368.min.js.LICENSE.txt → bundle-abc628d833.min.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4956],{70872:(e,t,n)=>{n.d(t,{u:()=>l});var r=n(32735),a=n(65858),i=n(36848),o=n(38647),s=n(31908);function l(e){var t,n,l,c=s.M.getCanBeConsumed(e.video).canNavigate,u=s.M.getTitle(e.video),p=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.video)||void 0===t?void 0:t.id,name:null===(n=e.video)||void 0===n?void 0:n.name}),d=Object.assign(Object.assign({},e.analyticsOptions),{actionType:a.Vw.Click,descriptor:a._S.Title}),m=e.textClassName||"m-0 text-truncate mb-n1 pb-1 align-middle ".concat("md"===e.size?"h4":"h6");return r.createElement(i.F,{className:e.linkClassName,appLink:c?e.appLink:null,analyticsOptions:d,analyticsData:p},r.createElement("h5",{className:m,title:null!==(l=e.video.name)&&void 0!==l?l:""},u,r.createElement(o.m,{size:e.size,video:e.video,yearGroups:e.yearGroups})))}},43472:(e,t,n)=>{n.r(t),n.d(t,{PluginShareView:()=>de});var r=n(32735),a=n(70680),i=n(23481),o=n(81886),s=n(20354),l=n(28400),c=n(49985),u=n(65858),p=n(30439),d=n(32915),m=n(64249),y=n(9111),f=n(5960),v=n(4594),h=n(16714),b=n(39151),E=n(1666),g=n(31949),S=n(69883),k=n(22902),w=n(26450),T=n(45778),O=n(14070),P=n(97291),C=n(62756),x=n(47663);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,a=function(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===j(a)?a:String(a)),r)}var a}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var N="share.embedUnpublishedInteractiveError",z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(s,e);var t,n,r,a,o=(r=s,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=A(r);if(a){var n=A(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function 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=o.call(this,"Embed unpublished interactive error")).externalLink=e,t}return t=s,(n=[{key:"name",get:function(){return"EmbedUnpublishedInteractiveError"}},{key:"dialogOptions",get:function(){return{title:i.T.getPhrase(N,"title"),text:i.T.getPhrase(N,"body",{externalLink:this.externalLink}),buttons:[{text:i.T.getPhrase(N,"close"),className:"btn btn-dark",success:!0}]}}}])&&I(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(x.S),V=n(13876),_=n(96022),D=n(83345),R=n(72188),B=n(70872),F=n(54610),G=n(68626),M="share.smartEmbedConfirmation",U=i.T.encloseNamespace(M);function Z(e){return r.createElement(r.Fragment,null,r.createElement("div",{className:"row mb-3"},r.createElement("div",{className:"col-4"},r.createElement(R.u,{video:e.entity,type:"cosmetic",imageOptions:{size:F.h2.Small},textPosition:G.z.Independent,preload:!0})),r.createElement("div",{className:"col-8"},r.createElement(_.Mr,{analyticsOptions:{},video:e.entity}),r.createElement(B.u,{video:e.entity,analyticsOptions:{},appLink:null,yearGroups:null}))),r.createElement("p",null,r.createElement(D.x,{namespace:M,phrase:"prompt"})),r.createElement(V.u,null,r.createElement(V.u.Cancel,{onClick:e.closePopup}),r.createElement(V.u.Submit,{text:U("embed"),onClick:e.embed,variant:"dark"})))}var $=n(98269),Q=n(80247),W=n(92802),q=n(30357),H=n(62124),X=n(20847),Y=n(97330),J=n(61193),K=n(82644);function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return te(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)?te(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(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}var ne="share.pluginShareSettings";function re(e){var t,n,a,i,o,s=(0,W.u6)(),l=(0,k.T)().hasPermissions,c=(0,C.G)().sizeSelector,u=!!(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)||!!(null===(n=e.shareLink)||void 0===n?void 0:n.linkExpireDate),p=ee(r.useState(u),2),d=p[0],y=p[1],f=ee(r.useState(!(null===(i=null===(a=e.shareLink)||void 0===a?void 0:a.isPasswordProtected)||void 0===i||!i)),2),v=f[0],b=f[1];return r.createElement(W.l0,null,r.createElement("div",{className:"mb-4"},r.createElement("h2",{className:"h6"},r.createElement(D.x,{namespace:ne,phrase:"title"})),r.createElement(q.V,{autoplay:e.autoplay,setAutoplay:e.setAutoplay,videoSize:e.videoSize,setVideoSize:e.setVideoSize,videoSizes:c?e.videoSizes:[]})),d&&r.createElement("div",{className:"mt-2"},r.createElement("h2",{className:"h6"},r.createElement(D.x,{namespace:ne,phrase:"accessTitle"})),r.createElement(H.a,{passwordProtectLink:v}),r.createElement(X.z,{shareLink:e.shareLink,passwordProtectLink:v,setPasswordProtectLink:b}),r.createElement("div",{className:"pb-3"},r.createElement(Y.s,{linkExpireDate:s.values.linkExpireDate,isPasswordProtected:v,entityTypeId:m.I.getObjectTypeId(e.entityType),privacy:e.privacy,status:null===(o=e.shareLink)||void 0===o?void 0:o.status,hasStudentExp:e.hasStudentExp}))),r.createElement("div",{className:"d-flex justify-content-between"},r.createElement("div",null,!d&&l(h.C.ManageShareLinkSettings)&&r.createElement($.Z,{type:"button",variant:"link",className:"text-info ps-0",onClick:function(){return y(!0)}},r.createElement(D.x,{namespace:ne,phrase:"showAdvanced"}))),r.createElement("div",null,r.createElement($.Z,{className:"me-2",variant:"link",onClick:e.onClickCancel},"Cancel"),r.createElement($.Z,{variant:"outline-dark",type:"submit"},s.isSubmitting?r.createElement(Q.Z,{as:"span",animation:"border",role:"status",size:"sm"}):r.createElement(D.x,{namespace:ne,phrase:"embed"})))))}function ae(e){var t,n={password:"",removePassword:!1,linkExpireDate:null===(t=e.shareLink)||void 0===t?void 0:t.linkExpireDate};return r.createElement(K.n,{initialValues:n,onSubmit:e.onClickEmbed,castInitialValues:!1,validationSchema:J.d},r.createElement(re,{shareLink:e.shareLink,onClickCancel:e.onClickCancel,autoplay:e.autoplay,setAutoplay:e.setAutoplay,videoSize:e.videoSize,setVideoSize:e.setVideoSize,videoSizes:e.videoSizes,privacy:e.privacy,entityType:e.entityType,hasStudentExp:e.hasStudentExp}))}var ie=n(50023),oe="share.postMessageSuccess",se=i.T.encloseNamespace(oe);function le(e){return(0,C.G)().singleSelectMode?r.createElement("div",null,r.createElement("img",{className:"img-fluid mx-auto d-block",alt:"Success",src:"/images/success-tick.png",style:{maxWidth:"14rem"}}),r.createElement("p",{className:"text-center"},r.createElement("strong",null,r.createElement(D.x,{namespace:oe,phrase:"success"}))),r.createElement(V.u,null,r.createElement(V.u.Submit,{onClick:e.closePopup,text:se("close"),variant:"outline-dark"}))):r.createElement(ie.E,null)}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ue(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)?ue(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(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}var pe=i.T.encloseNamespace("share.pluginShare");function de(e){var t,n,i=(0,a.I0)(),x=(0,S.Z)(),j=(0,k.T)().hasPermissions,I=(0,C.G)(),L=I.embed,A=I.smartEmbed,N=(0,I.isConsumer)(C.A.SmartEmbed)?"smart-embed-main":"main",V=s.a.useBasicFetch(b.L.config()),_=s.a.useBasicFetch(g.N.currentUser()),D=m.I.getFetchFunctionByType(e.entityType)(e.entityId,null===(t=_.data)||void 0===t?void 0:t.id),R=s.a.useBasicFetch(p.o.getShareLinkByObjectId(e.entityId)),B=s.a.useBasicFetch(p.o.getPrivacy(e.entityId)),F=s.a.useBasicFetch((null===(n=_.data)||void 0===n?void 0:n.isAuthenticated)&&E.h.yearGroups(_.data.customerId)),G=w.i.getEmbedResolutions(!1),M=ce(r.useState(G[0]),2),U=M[0],$=M[1],Q=ce(r.useState(!1),2),W=Q[0],q=Q[1],H=ce(r.useState(null),2),X=H[0],Y=H[1];function J(t){L({entity:D.data,entityType:e.entityType,shareLink:t,videoSize:U,autoplay:W,primaryUrl:V.data.primaryUrl}),c.k.logUserAction(Object.assign(Object.assign({},D.data),{shareLink:t}),c.k.mergeOptions(m.I.getAnalyticsOptions(e.entityType),{actionType:u.Vw.Share,descriptor:u.YM.PluginEmbed,eventVersion:u.eq.V4})),Y("post-message-sent")}function K(t){R.data?m.I.updateLink(i,D.data,e.entityType,R.data,t,x,(function(){return J(R.data)})):m.I.createLink({dispatch:i,entity:D.data,entityType:e.entityType,alerts:x,password:t.password,linkExpireDate:t.linkExpireDate,success:J})}function ee(){A(D.data),Y("post-message-sent")}m.I.useRestrictionWarning(D.data,(function(e){return Y(e?"restriction-warning":N)})),r.useEffect((function(){if(D.hasCompleted&&T.G.isType(D.data,v.E.Interactive)&&D.data.status!==f.X.Published){var e=o.Q.C$.getHref({application:P.O.INTERACTIVES,action:O.e.Interactives.EDIT_INTERACTIVE,args:[D.data.id,l.m.slugify(D.data.name)]});o.Q.Ry.throw(new z(e))}}),[D.hasCompleted]);var te=V.data&&_.data&&D.data&&R.hasCompleted&&B.data&&F.hasCompleted;return r.createElement(y.G,{title:pe("title"),closePopup:e.closePopup,showLoadingSpinner:!te||null===X},function(){if(!te)return r.createElement(r.Fragment,null);switch(X){case"post-message-sent":return r.createElement(le,{closePopup:e.closePopup});case"main":return r.createElement(ae,{shareLink:R.data,analyticsOptions:m.I.getAnalyticsOptions(e.entityType),onClickCancel:e.closePopup,onClickEmbed:K,videoSize:U,setVideoSize:$,videoSizes:G,autoplay:W,setAutoplay:q,privacy:B.data,entityType:e.entityType,hasStudentExp:j(h.C.StudentExperience)});case"smart-embed-main":return r.createElement(Z,{entity:D.data,closePopup:e.closePopup,embed:ee});case"restriction-warning":return r.createElement(d.d,{currentUser:_.data,entity:D.data,entityType:e.entityType,yearGroups:F.data,onClickContinue:function(){return Y(N)},target:"share"})}}())}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5041],{86877:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(23481);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(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 u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var a=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,a,l,s=(a=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(a);if(l){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 f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"name",get:function(){return"FileTypeError"}},{key:"lang",get:function(){return"upload.fileType"}},{key:"dialogOptions",get:function(){return{title:r.T.getPhrase(this.lang,"heading"),text:r.T.getPhrase(this.lang,"body"),buttons:[{text:r.T.getPhrase(this.lang,"okay"),className:"btn btn-dark",success:!0},{text:r.T.getPhrase(this.lang,"close"),className:"btn btn-link",close:!0}]}}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(n(47663).S)},25041:(e,t,n)=>{n.r(t),n.d(t,{BaseVideoUploadService:()=>K,LearningResourceUploadService:()=>Y,SubtitleUploadService:()=>X,UploadType:()=>J});var r,o=n(48088),i=n(39479),u=n(46865),c=n(79976),a=n(37433),l=n(54149),s=n(71365),f=n(23481),p=n(70794),d=n(81886),y=n(49985),h=n(65858),v=n(29555);!function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(r||(r={}));var g=n(86877),b=n(6339),m=n(52003),w=n(60735),S=n(53301),O=n(47663);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===k(o)?o:String(o)),r)}var o}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var T="upload.internetConnectivityError",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&&j(e,t)}(u,e);var t,n,r,o,i=(r=u,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=U(r);if(o){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,f.T.getPhrase(T,"title"))}return t=u,(n=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(T,"heading"),text:f.T.getPhrase(T,"body"),buttons:[{text:f.T.getPhrase(T,"okay"),className:"btn",success:!0}]}}}])&&P(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(O.S),E=n(44331);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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===_(o)?o:String(o)),r)}var o}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var I=[],C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(l,e);var t,n,r,u,c,a=(u=l,c=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(u);if(c){var n=L(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 l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,n=[{key:"name",get:function(){return"DropzoneWrapper"}},{key:"initialize",value:function(e){var t=this.options.loggingEnabled,n=o.Radio.channel(e.channelName),r=this;this.dropzone=new S(document.createElement("div"),{url:function(e){return e[0].cvUpload.ingestUrl},chunking:this.options.chunkingEnabled,chunkSize:this.options.chunkSize,forceChunking:!0,autoProcessQueue:!0,maxFilesize:this.options.maxFileSize,acceptedFiles:this.options.acceptedFiles,paramName:"content",init:function(){var e=this;t&&(i.each(I,(function(t){e.on(t,(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n[0]instanceof File?n[0].name:n[0];console.info(t,o,n)}))})),this.on("uploadprogress",(function(e,t,o){var i=o/e.size*100;n.trigger("progress",r.getId(e),i,o)})),this.on("success",(function(e){var t=e.upload.chunks,r=i.last(t),o=r.xhr;o||(o=r.file.xhr);var u=JSON.parse(o.response);e.cvUpload.fileId=u.id,n.trigger("upload:success",e,u)})),this.on("error",(function(e,t,n){n&&0===n.status?d.Q.Ry.throw(new R):"canceled"!==e.status&&d.Q.Ry.throw(new E.n(f.T.getPhrase("upload.services","uploadError",{fileName:e.name,message:t.message})))})))},params:function(e,t,n){if(n)return{chunk_index:n.index,upload_length:n.file.size}},addedfile:function(){},thumbnail:function(){},uploadprogress:function(){}})}},{key:"getId",value:function(e){return e.upload.uuid}},{key:"addFile",value:function(e){this.dropzone.addFile(e)}},{key:"removeFile",value:function(e){this.dropzone.removeFile(e)}},{key:"start",value:function(){this.dropzone.processQueue()}},{key:"destroy",value:function(){this.dropzone.destroy()}}],r=[{key:"isValidFile",value:function(e,t){return S.isValidFile(e,t)}}],n&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(d.Q.t6);function D(e){return D="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},D(e)}function z(e,t,n){return(t=B(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B(r.key),r)}}function N(e,t,n){return t&&A(e.prototype,t),n&&A(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function B(e){var t=function(e,t){if("object"!==D(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===D(t)?t:String(t)}function Q(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&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Z(e);if(t){var o=Z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var J,G=function(e){Q(n,e);var t=M(n);function n(){var e;return V(this,n),(e=t.call(this,{dataProvider:s.u.getInstance(a.R.Ajax),cache:s.u.getInstance(u.p.Fifo),alertService:s.u.getInstance(c.P.ALERT)})).incrementingUploadId=0,e}return N(n,[{key:"name",get:function(){return"UploadDataService"}},{key:"channelName",get:function(){return"private:upload:data:service"}},{key:"requestUploads",value:function(e,t,n,r,o){var u=this,c=this.chain();i.each(t,(function(t){u.incrementingUploadId++,c.create({resource:e,eventPrefix:"request:upload:".concat(u.incrementingUploadId),data:u.getFileUploadRequest(t,n),callback:function(e){r(t,e)},errorHandler:u.alertService.error("Something went wrong while we were uploading your video. Please try again.")})})),c.func((function(){o()})).run()}},{key:"cancelUpload",value:function(e,t,n){this.create({resource:"/api/upload/cancel",eventPrefix:"cancel:upload",data:{uploadId:e,ingestUrl:t},callback:n})}},{key:"getFileUploadRequest",value:function(e,t){var n=e.name.split(".");return{name:n.join("."),extension:n.length>1?n.pop():"",fileSize:e.size,fileLifestyle:t}}},{key:"onDestroy",value:function(){s.u.releaseInstance(a.R.Ajax).releaseInstance(u.p.Fifo)}}]),n}(l.B);!function(e){e[e.Video=0]="Video",e[e.LearningResource=1]="LearningResource",e[e.Subtitle=2]="Subtitle"}(J||(J={}));var H=z(z(z({},J.Video,"video/*"),J.LearningResource,b.l.RESOURCES),J.Subtitle,b.l.SUBTITLES),W=z(z(z({},J.Video,m.Q4.VIDEO_UPLOAD),J.LearningResource,m.Q4.RESOURCE_UPLOAD),J.Subtitle,m.Q4.SUBTITLE_UPLOAD),$=function(e){Q(n,e);var t=M(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return V(this,n),t.call(this,Object.assign({uploadUrl:"/api/upload"},e))}return N(n,[{key:"initialize",value:function(){this.uploadDataService=new G,this.progressViewModel=p.r.get("upload:progress:".concat(this.uploadType)),this.bindListeners()}},{key:"channelName",get:function(){return W[this.uploadType]}},{key:"lang",get:function(){return"uploadShared.services"}},{key:"initUploader",value:function(e,t){if(!this.uploader){var n=4194304;e&&n<e&&(n=e),t&&n>t&&(n=t),this.uploader=new C({chunkingEnabled:!0,loggingEnabled:!0,chunkSize:n,maxFileSize:53687091200,acceptedFiles:this.getAcceptedFiles(),channelName:this.channelName})}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"progress",this.onProgress),this.listenTo(this.channelName,"upload:success",this.onSuccess)}},{key:"onProgress",value:function(e,t,n){var r=this.collection.get(e);r&&(r.set({progress:t>100?100:t,totalUploaded:n}),this.setOverallProgress())}},{key:"isUploading",value:function(){return!!this.getCollection().length}},{key:"getCollection",value:function(){return this.collection||(this.collection=new d.Q.FE),this.collection}},{key:"setOverallProgress",value:function(){var e=this,t=0,n=0,r=this.getCollection();if(r.length){r.each((function(e){t+=e.get("totalUploaded")||0,n+=e.get("file").size||0}));var o=t/n*100,i=o>=100,u=function(){e.progressViewModel.set({progress:i?100:o,done:i})};i?window.setTimeout(u,2e3):u()}else this.progressViewModel.set({progress:0})}},{key:"isValidFile",value:function(e){return C.isValidFile(e,this.getAcceptedFiles())}},{key:"addFiles",value:function(e,t){var n=this;i.any(e,(function(e){return!n.isValidFile(e)}))?d.Q.Ry.throw(new g.Z(f.T.getPhrase(this.lang,"invalidFileType"))):this.requestUploads(e,t)}},{key:"requestUploads",value:function(e,t){var n=this,r=this.isUploading(),i=this.getCollection();this.uploadDataService.requestUploads(this.options.uploadUrl,e,this.fileLifestyle,(function(e,t){n.initUploader(1024*t.minChunkSize,1024*t.maxChunkSize),e.cvUpload={uploadId:t.uploadId,ingestUrl:t.ingestUrl},n.uploader.addFile(e);var r=e.name;n.uploadType===J.Video&&(r=r.replace(/\.[^/.]+$/,"")),i.add(Object.assign({id:n.uploader.getId(e),file:e,name:r},n.getAdditionalFileInfo(e,t)),{at:i.length-1})}),(function(){t&&y.k.logUserAction({uploadCount:e.length},t),o.Radio.channel(n.channelName).trigger(v.S.FILES_ADDED,e,r)}))}},{key:"addFile",value:function(e,t){this.addFiles([e],t)}},{key:"cancelUpload",value:function(e){var t=this,n=this.getCollection(),r=n.get(e);if(r){var i=r.get("file");this.uploader.removeFile(i),n.remove(r),this.uploadDataService.cancelUpload(i.cvUpload.uploadId,i.cvUpload.ingestUrl,(function(){y.k.logUserAction(r.toJSON(),{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Discard,descriptor:h.yh.Single,location:h.LZ.MyUploads}),o.Radio.channel(t.channelName).trigger(v.S.UPLOAD_CANCELLED)})),this.setOverallProgress()}}},{key:"onSuccess",value:function(e,t){var n=this.uploader.getId(e),r=this.getCollection().get(n);r.set("fileInfo",t),y.k.logUserAction({id:e.cvUpload.uploadId},{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Complete,descriptor:h.yh.Single,location:h.LZ.VideoUpload}),o.Radio.channel(this.channelName).trigger(v.S.UPLOAD_COMPLETE,r)}},{key:"cancelAllUploads",value:function(){var e=this,t=this.getCollection().map((function(e){return e.get("id")}));i.each(t,(function(t){return e.cancelUpload(t)}))}},{key:"getAcceptedFiles",value:function(){return H[this.uploadType]}},{key:"getAdditionalFileInfo",value:function(e,t){return{}}}]),n}(d.Q.t6),K=function(e){Q(n,e);var t=M(n);function n(){return V(this,n),t.apply(this,arguments)}return N(n,[{key:"uploadType",get:function(){return J.Video}},{key:"name",get:function(){return w.D.VideoUpload}},{key:"fileLifestyle",get:function(){return r.Temporary}}]),n}($),X=function(e){Q(n,e);var t=M(n);function n(){return V(this,n),t.apply(this,arguments)}return N(n,[{key:"uploadType",get:function(){return J.Subtitle}},{key:"name",get:function(){return w.D.SubtitleUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}($),Y=function(e){Q(n,e);var t=M(n);function n(){return V(this,n),t.apply(this,arguments)}return N(n,[{key:"uploadType",get:function(){return J.LearningResource}},{key:"name",get:function(){return w.D.ResourceUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}($)},6339:(e,t,n)=>{n.d(t,{l:()=>p,v:()=>d});var r=n(39479),o=["pdf"],i=["doc","docx","dotx","dot","rtf","docm","odt"],u=["csv","txt"],c=["xls","xlt","xlsx"],a=["jpg","tif","png","bmp","gif","jpeg"],l=["zip","rar"],s=["ppt","pot","pps","pptx"],f=["srt"],p={IMAGES:".".concat(a.join(",.")),RESOURCES:".".concat([].concat(i,c,s,o,u,a,l).join(",.")),SUBTITLES:".".concat(f.join(",."))},d={getResourceType:function(e){var t=e.toLowerCase();return r.contains(i,t)?"document":r.contains(c,t)?"excel":r.contains(s,t)?"powerpoint":r.contains(o,t)?"pdf":r.contains(u,t)?"text":r.contains(a,t)?"image":r.contains(l,t)?"archive":r.contains(f,t)?"subtitle":""}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5134],{15134:(e,t,n)=>{n.r(t),n.d(t,{SettingsView:()=>h});var a=n(32735),c=n(23481),l=n(81886),i=n(83345),r=n(67058),s=n(79612),m=n(36848);const o={myAccount:"Olsqt",group:"wCqdk"};function u(e){var t,n=null===(t=e.modules)||void 0===t?void 0:t.filter((function(e){return!e.hide})),c=!!(null==n?void 0:n.length);return a.createElement(m.F,{appLink:e.appLink},a.createElement("div",{className:"row p-3 border border-dark m-0 w-100 h-100 ".concat(o.group)},a.createElement("div",{className:"col-3"},a.createElement("div",{className:"d-flex justify-content-center align-items-center h-100"},a.createElement("img",{src:e.imageUrl,alt:"",role:"presentation",className:"my-account"===e.id?"img-fluid ".concat(o.myAccount):"img-fluid"}))),a.createElement("div",{className:"col-9 h-100 ".concat(c?"":"d-flex align-items-center")},a.createElement("h2",{className:"h4"},e.name),c&&a.createElement("ul",{className:"list-unstyled mb-0"},n.map((function(e){return a.createElement("li",{key:e.name,className:"mb-1"},"appLink"in e?a.createElement(m.F,{className:"btn btn-link p-0",appLink:e.appLink},e.name):a.createElement("button",{className:"btn btn-link p-0 text-start",onClick:e.onClick},e.name))}))))))}var d=n(96368);const p={settingsContainer:"wIhgs",groupContainer:"rAJjd"};var g="settings.settings";function h(){(0,s.M)({title:c.T.getPhrase(g,"pageTitle")});var e=(0,d.e)();if(e.length)return a.createElement("div",{className:"px-3"},a.createElement("h1",{className:"h2"},a.createElement(i.x,{namespace:g,phrase:"heading"})),a.createElement("main",{className:"row"},e.map((function(e){return a.createElement("div",{key:e.id,className:"col-md-6 p-0"},a.createElement("div",{className:"h-100 ".concat(p.groupContainer)},a.createElement(u,Object.assign({},e))))}))));l.Q.Ry.throw(new r.d)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5143],{61807:(e,t,n)=>{n.d(t,{L:()=>u});var a=n(32735),r=n(81886),i=n(23481),c=n(65858),l=n(38502),o="settings.domainSettingsTabs",s=i.T.encloseNamespace(o);function u(e){var t=e.active,n=e.appLinks;return a.createElement("div",{className:"mb-3"},a.createElement(l.r,{tabs:[{name:s("requestingAccess"),appLink:n.requestingAccess,active:"requesting-access"===t,analyticsData:{name:s("requestingAccess"),url:r.Q.C$.getHref(n.requestingAccess)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}},{name:s("teacherInvites"),appLink:n.teacherInvites,active:"teacher-invites"===t,analyticsData:{name:i.T.getPhrase(o,"teacherInvites"),url:r.Q.C$.getHref(n.teacherInvites)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}},{name:s("automaticAccess"),appLink:n.automaticAccess,active:"automatic-access"===t,analyticsData:{name:i.T.getPhrase(o,"automaticAccess"),url:r.Q.C$.getHref(n.automaticAccess)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}}]}))}},49935:(e,t,n)=>{n.d(t,{Oo:()=>m,b2:()=>p});var a=n(32735),r=n(36848),i=n(86764),c=n(3747),l=n(5859),o=n(35223),s=n(83914),u=function(e){var t=e.breadcrumb,n=t.name,i=t.appLink,c=t.active,l=e.withBackIcon;return a.createElement("li",{className:"breadcrumb-item".concat(c?" active":"")},c?a.createElement("strong",null,n):a.createElement(r.F,{appLink:i},l&&a.createElement(s.x,{svgName:o.vn.ChevronLeft,size:s.S.Small}),a.createElement("span",{className:l?"ms-2":""},n)))},m=function(e){var t=e.breadcrumbs,n=(0,c.a)(i.r.XS),r=null==t?void 0:t.length;return!r||n&&r<2?a.createElement(a.Fragment,null):n?a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},a.createElement(u,{breadcrumb:t[r-2],withBackIcon:!0}))):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},t.map((function(e,t){return a.createElement(u,{key:t,breadcrumb:e})}))))},p=a.memo((function(e){var t=e.numItems,n=void 0===t?3:t;return(0,c.a)(i.r.XS)?a.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},l.u.getPartialLoadingItems({numItems:n}).map((function(e,t){var n=e.width;return a.createElement("li",{key:t,className:"breadcrumb-item"},a.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:n},dangerouslySetInnerHTML:{__html:" "}}))}))))}))},38502:(e,t,n)=>{n.d(t,{r:()=>s});var a=n(32735),r=n(49985),i=n(36848),c=n(76246),l=n(11607),o=n(87432);function s(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(o.Z.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(o.Z.pillItem)},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(c.C,{type:c.g.Count,data:e.count}))):a.createElement(l.L,{className:"".concat(o.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(c.C,{type:c.g.Count,data:e.count}))))}))))}},24833:(e,t,n)=>{var a;n.d(t,{C:()=>a}),function(e){e.RequestingAccess="requestingAccess",e.TeacherInvites="teacherInvites",e.AutomaticAccess="automaticAccess"}(a||(a={}))},5859:(e,t,n)=>{function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n.d(t,{u:()=>i});var r={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},r),t);return(e=Array(n.numItems),function(e){if(Array.isArray(e))return a(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 a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(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.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*n.maxWidth),n.minWidth),"px")}}))}}},81803:(e,t,n)=>{n.d(t,{d:()=>f});var a=n(32735),r=n(81886),i=n(23481),c=n(49935),l=n(22902),o=n(14070),s=n(97291),u=n(96368);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p="settings.settingsLayout",d=function(e){var t=(0,l.T)().hasPermissions,n=(0,u.e)();if(e)return t(e);var a=r.Q.C$.getCurrentAppLink();return a.application!==s.O.SETTINGS||n.some((function(e){return e.modules.some((function(e){return"appLink"in e&&e.appLink.action===a.action}))}))};function f(e){var t,n=d(e.requiredPermissions);if(a.useEffect((function(){n||r.Q.C$.trigger({application:s.O.SETTINGS,action:o.e.Settings.HOME},{replace:!0})}),[n]),!n)return a.createElement(a.Fragment,null);var l,u=e.breadcrumbs.map((function(t,n){return{name:t,appLink:{application:s.O.SETTINGS,action:o.e.Settings.HOME},active:n===e.breadcrumbs.length-1}}));return a.createElement("div",{className:"px-3"},a.createElement("div",{className:"d-flex align-items-center justify-content-between"},a.createElement("h1",{className:"h2"},e.heading),null===(t=e.headingButton)||void 0===t?void 0:t.call(e)),a.createElement("div",{className:"pb-3"},a.createElement(c.Oo,{breadcrumbs:[{name:i.T.getPhrase(p,"settingsBreadcrumb"),appLink:{application:s.O.SETTINGS,action:o.e.Settings.HOME}}].concat((l=u,function(e){if(Array.isArray(e))return m(e)}(l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}(l)||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.")}()))})),e.description&&a.createElement(a.Fragment,null,a.createElement("p",null,e.description),a.createElement("hr",null)),e.children)}},68598:(e,t,n)=>{n.d(t,{W:()=>o});var a=n(24833),r=n(14070),i=n(97291);function c(e){return c="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},c(e)}function l(e,t,n){var a;return a=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=c(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==c(a)?a:String(a))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=l(l(l({},a.C.RequestingAccess,{application:i.O.SETTINGS,action:r.e.Settings.REQUESTING_ACCESS}),a.C.TeacherInvites,{application:i.O.SETTINGS,action:r.e.Settings.TEACHER_INVITES}),a.C.AutomaticAccess,{application:i.O.SETTINGS,action:r.e.Settings.AUTOMATIC_ACCESS})},96268:(e,t,n)=>{n.d(t,{W:()=>s});var a=n(32735),r=n(81886),i=n(65858),c=n(37802),l=n(14070),o=n(97291);function s(){var e=(0,c.r)(i.LZ.Settings),t=e.isLoadingSettings,n=e.domainSettings;a.useEffect((function(){t||n||r.Q.C$.trigger({application:o.O.SETTINGS,action:l.e.Settings.HOME},{replace:!0})}),[n,t])}},45143:(e,t,n)=>{n.r(t),n.d(t,{TeacherInvitesView:()=>A});var a=n(32735),r=n(23481),i=n(20354),c=n(65858),l=n(83345),o=n(83523),s="settings.domainSettingsInvitesToggle";function u(e){var t=e.allowInvites,n=e.onToggleInvites;return a.createElement("div",{className:"col-12 col-md-7 card p-3"},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("p",{className:"fw-semibold"},a.createElement(l.x,{namespace:s,phrase:"invitesLabel"})),a.createElement(o.Z,{onClick:n,on:t})),a.createElement("p",null,a.createElement(l.x,{namespace:s,phrase:"invitesDescription"})),a.createElement("div",{className:"d-flex"},a.createElement("div",{className:"rounded p-2 bg-light-blue text-info fw-semibold"},a.createElement(l.x,{namespace:s,phrase:t?"invitesInfoMessage":"noInvitesInfoMessage"}))))}var m=n(61807),p=n(16714),d=n(77963),f=n(65728),b=n(31949),v=n(69883),g=n(37802),y=n(81803),E=n(68598),h=n(96268);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var I="settings.teacherInvites",T=r.T.encloseNamespace(I);function A(){(0,h.W)();var e,t,n=i.a.useBasicFetch(b.N.currentUser()).data.customerId,r=(0,g.r)(c.LZ.Settings),o=r.inviteColleague,s=r.updateSetting,A=r.isLoadingSettings,N=(0,v.Z)(),k=(e=a.useState(o),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,c,l=[],o=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;o=!1}else for(;!(o=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=k[0],w=k[1];return a.useEffect((function(){A||w(o)}),[o,A]),A?a.createElement(a.Fragment,null):a.createElement(y.d,{heading:T("heading"),breadcrumbs:[T("breadcrumb")],requiredPermissions:p.C.ManageUsers},a.createElement(m.L,{active:"teacher-invites",appLinks:E.W}),a.createElement("p",null,a.createElement(l.x,{namespace:I,phrase:"description"})),a.createElement(u,{allowInvites:C,onToggleInvites:function(){var e={name:f.E.InviteColleague,value:!C,kind:d.g.Permanent};s(n,e,(function(){N.success(T("successAlert")),w(!C)}),(function(){return N.error(T("errorAlert"))}))}}))}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5143],{61807:(e,t,n)=>{n.d(t,{L:()=>u});var a=n(32735),r=n(81886),i=n(23481),c=n(65858),l=n(38502),o="settings.domainSettingsTabs",s=i.T.encloseNamespace(o);function u(e){var t=e.active,n=e.appLinks;return a.createElement("div",{className:"mb-3"},a.createElement(l.r,{tabs:[{name:s("requestingAccess"),appLink:n.requestingAccess,active:"requesting-access"===t,analyticsData:{name:s("requestingAccess"),url:r.Q.C$.getHref(n.requestingAccess)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}},{name:s("teacherInvites"),appLink:n.teacherInvites,active:"teacher-invites"===t,analyticsData:{name:i.T.getPhrase(o,"teacherInvites"),url:r.Q.C$.getHref(n.teacherInvites)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}},{name:s("automaticAccess"),appLink:n.automaticAccess,active:"automatic-access"===t,analyticsData:{name:i.T.getPhrase(o,"automaticAccess"),url:r.Q.C$.getHref(n.automaticAccess)},analyticsOptions:{actionType:c.Vw.Click,entity:c.py.Url,location:c.LZ.MagicTabs}}]}))}},49935:(e,t,n)=>{n.d(t,{Oo:()=>m,b2:()=>p});var a=n(32735),r=n(36848),i=n(86764),c=n(3747),l=n(5859),o=n(35223),s=n(83914),u=function(e){var t=e.breadcrumb,n=t.name,i=t.appLink,c=t.active,l=e.withBackIcon;return a.createElement("li",{className:"breadcrumb-item".concat(c?" active":"")},c?a.createElement("strong",null,n):a.createElement(r.F,{appLink:i},l&&a.createElement(s.x,{svgName:o.vn.ChevronLeft,size:s.S.Small}),a.createElement("span",{className:l?"ms-2":""},n)))},m=function(e){var t=e.breadcrumbs,n=(0,c.a)(i.r.XS),r=null==t?void 0:t.length;return!r||n&&r<2?a.createElement(a.Fragment,null):n?a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},a.createElement(u,{breadcrumb:t[r-2],withBackIcon:!0}))):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},t.map((function(e,t){return a.createElement(u,{key:t,breadcrumb:e})}))))},p=a.memo((function(e){var t=e.numItems,n=void 0===t?3:t;return(0,c.a)(i.r.XS)?a.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},l.u.getPartialLoadingItems({numItems:n}).map((function(e,t){var n=e.width;return a.createElement("li",{key:t,className:"breadcrumb-item"},a.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:n},dangerouslySetInnerHTML:{__html:" "}}))}))))}))},38502:(e,t,n)=>{n.d(t,{r:()=>s});var a=n(32735),r=n(49985),i=n(36848),c=n(76246),l=n(11607),o=n(87432);function s(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(o.Z.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(o.Z.pillItem)},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(c.C,{type:c.g.Count,data:e.count}))):a.createElement(l.L,{className:"".concat(o.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(c.C,{type:c.g.Count,data:e.count}))))}))))}},24833:(e,t,n)=>{var a;n.d(t,{C:()=>a}),function(e){e.RequestingAccess="requestingAccess",e.TeacherInvites="teacherInvites",e.AutomaticAccess="automaticAccess"}(a||(a={}))},5859:(e,t,n)=>{function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n.d(t,{u:()=>i});var r={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},r),t);return(e=Array(n.numItems),function(e){if(Array.isArray(e))return a(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 a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(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.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*n.maxWidth),n.minWidth),"px")}}))}}},81803:(e,t,n)=>{n.d(t,{d:()=>f});var a=n(32735),r=n(81886),i=n(23481),c=n(49935),l=n(22902),o=n(14070),s=n(97291),u=n(96368);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p="settings.settingsLayout",d=function(e){var t=(0,l.T)().hasPermissions,n=(0,u.e)();if(e)return t(e);var a=r.Q.C$.getCurrentAppLink();return a.application!==s.O.SETTINGS||n.some((function(e){return e.modules.some((function(e){return"appLink"in e&&e.appLink.action===a.action}))}))};function f(e){var t,n=d(e.requiredPermissions);if(a.useEffect((function(){n||r.Q.C$.trigger({application:s.O.SETTINGS,action:o.e.Settings.HOME},{replace:!0})}),[n]),!n)return a.createElement(a.Fragment,null);var l,u=e.breadcrumbs.map((function(t,n){return{name:t,appLink:{application:s.O.SETTINGS,action:o.e.Settings.HOME},active:n===e.breadcrumbs.length-1}}));return a.createElement("div",{className:"px-3"},a.createElement("div",{className:"d-flex align-items-center justify-content-between"},a.createElement("h1",{className:"h2"},e.heading),null===(t=e.headingButton)||void 0===t?void 0:t.call(e)),a.createElement("div",{className:"pb-3"},a.createElement(c.Oo,{breadcrumbs:[{name:i.T.getPhrase(p,"settingsBreadcrumb"),appLink:{application:s.O.SETTINGS,action:o.e.Settings.HOME}}].concat((l=u,function(e){if(Array.isArray(e))return m(e)}(l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}(l)||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.")}()))})),e.description&&a.createElement(a.Fragment,null,a.createElement("p",null,e.description),a.createElement("hr",null)),e.children)}},68598:(e,t,n)=>{n.d(t,{W:()=>o});var a=n(24833),r=n(14070),i=n(97291);function c(e){return c="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},c(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==c(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===c(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=l(l(l({},a.C.RequestingAccess,{application:i.O.SETTINGS,action:r.e.Settings.REQUESTING_ACCESS}),a.C.TeacherInvites,{application:i.O.SETTINGS,action:r.e.Settings.TEACHER_INVITES}),a.C.AutomaticAccess,{application:i.O.SETTINGS,action:r.e.Settings.AUTOMATIC_ACCESS})},96268:(e,t,n)=>{n.d(t,{W:()=>s});var a=n(32735),r=n(81886),i=n(65858),c=n(37802),l=n(14070),o=n(97291);function s(){var e=(0,c.r)(i.LZ.Settings),t=e.isLoadingSettings,n=e.domainSettings;a.useEffect((function(){t||n||r.Q.C$.trigger({application:o.O.SETTINGS,action:l.e.Settings.HOME},{replace:!0})}),[n,t])}},45143:(e,t,n)=>{n.r(t),n.d(t,{TeacherInvitesView:()=>A});var a=n(32735),r=n(23481),i=n(20354),c=n(65858),l=n(83345),o=n(83523),s="settings.domainSettingsInvitesToggle";function u(e){var t=e.allowInvites,n=e.onToggleInvites;return a.createElement("div",{className:"col-12 col-md-7 card p-3"},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("p",{className:"fw-semibold"},a.createElement(l.x,{namespace:s,phrase:"invitesLabel"})),a.createElement(o.Z,{onClick:n,on:t})),a.createElement("p",null,a.createElement(l.x,{namespace:s,phrase:"invitesDescription"})),a.createElement("div",{className:"d-flex"},a.createElement("div",{className:"rounded p-2 bg-light-blue text-info fw-semibold"},a.createElement(l.x,{namespace:s,phrase:t?"invitesInfoMessage":"noInvitesInfoMessage"}))))}var m=n(61807),p=n(16714),d=n(77963),f=n(65728),b=n(31949),v=n(69883),g=n(37802),y=n(81803),E=n(68598),h=n(96268);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var I="settings.teacherInvites",T=r.T.encloseNamespace(I);function A(){(0,h.W)();var e,t,n=i.a.useBasicFetch(b.N.currentUser()).data.customerId,r=(0,g.r)(c.LZ.Settings),o=r.inviteColleague,s=r.updateSetting,A=r.isLoadingSettings,N=(0,v.Z)(),k=(e=a.useState(o),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,c,l=[],o=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;o=!1}else for(;!(o=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=k[0],w=k[1];return a.useEffect((function(){A||w(o)}),[o,A]),A?a.createElement(a.Fragment,null):a.createElement(y.d,{heading:T("heading"),breadcrumbs:[T("breadcrumb")],requiredPermissions:p.C.ManageUsers},a.createElement(m.L,{active:"teacher-invites",appLinks:E.W}),a.createElement("p",null,a.createElement(l.x,{namespace:I,phrase:"description"})),a.createElement(u,{allowInvites:C,onToggleInvites:function(){var e={name:f.E.InviteColleague,value:!C,kind:d.g.Permanent};s(n,e,(function(){N.success(T("successAlert")),w(!C)}),(function(){return N.error(T("errorAlert"))}))}}))}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 5177-a87c24b957-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"}(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.client.seek(r,i),n.next=21;break;case 17:n.prev=17,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 21:case"end":return n.stop()}}),n,this,[[2,17]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",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){return t.source===e&&t.message.ack_id===r})).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))}}])&>(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})}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 5268-0639a4858d-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5268],{12617:(e,t,r)=>{r.d(t,{E:()=>u});var n=r(99940),o=r(97395),a=r(62803),i=r(5960),c=r(4594),l=r(78417),u={videos:function(e,t,r){var n=a.v.VIDEO_COLLECTION,u=a.v.CLIP_COLLECTION,s=a.v.INTERACTIVE,d="videos[".concat(n,"]{libraries.typeid:").concat(c.E.WorkspaceCollection,"}"),f="clips[".concat(u,"]{status:").concat(i.X.Published,"}"),h="interactives[".concat(s,"]{status:[").concat(i.X.Published,",").concat(i.X.Draft,"]}"),p=[];r?(r.includes("video")&&p.push(d),r.includes("clip")&&p.push(f),r.includes("interactive")&&p.push(h)):p.push(d,f,h);var y={query:"(".concat(p.join("|"),"){orderbydesc:timestamp}"),permissionFilterOption:l.r.FilterOut};return t&&(y.cursor=t),{url:o._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),y),key:"my:videos:".concat(e,":").concat(t).concat(r?":".concat(Array.isArray(r)?r.join(":"):r):"")}},workspaceWithCategories:function(){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:["workspace"],maxCategoryDepth:5}),key:"workspace:folders",normalize:!1}},exchangeWithCategories:function(){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:["exchange"],maxCategoryDepth:5}),key:"exchange:folders",normalize:!1}},addFolder:function(e){var t="/api/domain/v2/collections/".concat(e.collectionId,"/categories");return e.parentCategoryId&&(t=o._.urlBuilder(t,{parentCategoryId:e.parentCategoryId})),{url:t,key:"add:folder",type:n.k.POST,data:{name:e.name},invalidationKeys:["workspace","folder"]}},deleteFolder:function(e){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:folder",type:n.k.DELETE,invalidationKeys:["workspace","folder"]}},moveFolder:function(e){return{url:"/api/domain/v2/objects/move",key:"move:folder",type:n.k.POST,data:{assocType:"has",newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:[e.moveFolderId]},invalidationKeys:["workspace","folder"]}},updateFolder:function(e,t){return{url:"{gateway}/v1/objects/".concat(e),key:"rename:folder",type:n.k.PUT,data:{name:t},invalidationKeys:["workspace","folder"]}},videoFolders:function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"/categories?query=libraries{id:").concat(t,"}"),key:"video:folders:".concat(e)}},moveVideo:function(e){var t={newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:e.videoId};return{url:"/api/domain/v3/objects/move",key:"move:folder:".concat(t.objectIds.join(",")),type:n.k.POST,data:t,invalidationKeys:["video"]}},addToExchange:function(e){return{url:"{gateway}/v1/users/me/videos/exchange",key:"add:to:exchange",type:n.k.POST,data:e}}}},54485:(e,t,r)=>{r.d(t,{b:()=>c});var n=r(32735),o=r(23481),a=r(11462),i=o.T.encloseNamespace("myVideos.hooks");function c(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n.useMemo((function(){return(null==e?void 0:e.length)?{children:e.map((function(e){return Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{name:t?i("myVideos"):e.data.name})})})).map(a.d.convertNestedObjectToTree)}:null}),[e])}},82540:(e,t,r)=>{r.r(t),r.d(t,{AddFolderView:()=>F});var n=r(32735),o=r(23481),a=r(20354),i=r(49985),c=r(65858),l=r(82644),u=r(9111),s=r(31949),d=r(69883),f=r(11462),h=r(12617),p=r(54485),y=r(98495),v=r(92802),m=r(5173),g=r(38365),w=r(13876),b=r(55367),k=o.T.encloseNamespace("myVideos.addFolder"),E=m.Ry().shape({name:m.Z_().required((function(){return k("nameRequired")})).max(255,(function(){return k("maxNameLength")})),folder:m.Ry().required()});function x(e){var t=(0,v.u6)();return n.createElement(v.l0,null,n.createElement(g.W,{label:k("name"),type:"text",name:"name",id:"name",placeholder:k("placeholder"),autoFocus:!0,value:t.values.name,required:!0}),n.createElement(g.W,{label:k("parentFolder"),name:"folder"},(function(){var r;return n.createElement(y.ZP,{autoHeight:!0,autoHeightMax:300,className:"border rounded-3"},n.createElement(b.m,{tree:e.folders,onSelect:function(e){return t.setFieldValue("folder",e)},selectedIds:(null===(r=t.values.folder)||void 0===r?void 0:r.id)?[t.values.folder.id]:void 0,selectedLinkClassName:"bg-light",openDepth:1}))})),n.createElement(w.u,null,n.createElement(w.u.Cancel,{onClick:e.onClickCancel}),n.createElement(w.u.Submit,{variant:"dark",showSpinner:e.showSpinner})))}function L(e){return L="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},L(e)}function j(){j=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:I(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};u(b,i,(function(){return this}));var k=Object.getPrototypeOf,E=k&&k(k(P([])));E&&E!==r&&n.call(E,i)&&(b=E);var x=w.prototype=m.prototype=Object.create(b);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,a,i,c){var l=d(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==L(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function I(t,r,n){var o=f;return function(a,i){if(o===p)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=F(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=d(t,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function F(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,F(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=d(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function S(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 _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(L(t)+" is not iterable")}return g.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=u(w,l,"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,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},O(C.prototype),u(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new C(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,T.prototype={constructor:T,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(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){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 a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},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 r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},I=o.T.encloseNamespace("myVideos.addFolder");function F(e){var t,r,o=(t=n.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=o[0],v=o[1],m=a.a.useGetFetchAsync(),g=(0,d.Z)(),w=a.a.useBasicFetch(s.N.workspace()),b=a.a.useBasicFetch(h.E.workspaceWithCategories()),k=(0,p.b)(b.data),L=n.useMemo((function(){return f.d.find(k,e.parentFolderId)}),[k,e.parentFolderId]),F=w.hasCompleted&&b.hasCompleted;return n.createElement(u.G,{title:I("title"),closePopup:e.closePopup,showLoadingSpinner:!F},F&&n.createElement(l.n,{initialValues:{name:"",folder:L},validationSchema:E,onSubmit:function(t){return C(this,void 0,void 0,j().mark((function r(){var n;return j().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return v(!0),r.prev=1,r.next=4,m(h.E.addFolder({collectionId:w.data.id,name:t.name,parentCategoryId:t.folder.id===w.data.id?void 0:t.folder.id}));case 4:n=r.sent,g.success(I("success")),e.closePopup(),i.k.logUserAction({id:n.id,name:n.name},{entity:c.py.Folder,actionType:c.Vw.Create,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),r.next=14;break;case 10:r.prev=10,r.t0=r.catch(1),g.error(I("error")),e.closePopup();case 14:case"end":return r.stop()}}),r,null,[[1,10]])})))},validateOnMount:!0},n.createElement(x,{onClickCancel:e.closePopup,folders:k,showSpinner:y})))}}}]);
|