@clickview/lite 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/scripts/{100-027d60c0eb-lite.chunk.js → 100-a4712a2d2d-lite.chunk.js} +1 -1
- package/dist/scripts/{101-d38941cf49-lite.chunk.js → 101-74272750c1-lite.chunk.js} +1 -1
- package/dist/scripts/{102-1edc7f7ed4-lite.chunk.js → 102-89f8d2ace0-lite.chunk.js} +1 -1
- package/dist/scripts/{103-b8abe6cdf5-lite.chunk.js → 103-dd3ab5cdba-lite.chunk.js} +1 -1
- package/dist/scripts/{104-aeb67f9746-lite.chunk.js → 104-1265eb258d-lite.chunk.js} +1 -1
- package/dist/scripts/{105-2acb27628f-lite.chunk.js → 105-487c5080be-lite.chunk.js} +1 -1
- package/dist/scripts/106-07e187cbdf-lite.chunk.js +1 -0
- package/dist/scripts/{107-7ee6c9e66b-lite.chunk.js → 107-af5efce987-lite.chunk.js} +1 -1
- package/dist/scripts/{108-c715cf41d5-lite.chunk.js → 108-8ce37ef25c-lite.chunk.js} +1 -1
- package/dist/scripts/{109-7f4a498172-lite.chunk.js → 109-c77a5d7644-lite.chunk.js} +1 -1
- package/dist/scripts/{110-0129863aa5-lite.chunk.js → 110-f055eaac1d-lite.chunk.js} +1 -1
- package/dist/scripts/{111-d086f4eaca-lite.chunk.js → 111-36453bd485-lite.chunk.js} +1 -1
- package/dist/scripts/{112-bd3ae6a5c5-lite.chunk.js → 112-f42f7209c5-lite.chunk.js} +1 -1
- package/dist/scripts/{113-f839abd156-lite.chunk.js → 113-f9f5416e2e-lite.chunk.js} +1 -1
- package/dist/scripts/{114-a0195e58be-lite.chunk.js → 114-f0f75abc64-lite.chunk.js} +1 -1
- package/dist/scripts/{115-b3bfd3c041-lite.chunk.js → 115-e28fbeedb7-lite.chunk.js} +1 -1
- package/dist/scripts/116-c2c5d5bc6e-lite.chunk.js +1 -0
- package/dist/scripts/{117-de454d0367-lite.chunk.js → 117-86186529d2-lite.chunk.js} +1 -1
- package/dist/scripts/{118-b6892dfffd-lite.chunk.js → 118-81f3145d4d-lite.chunk.js} +1 -1
- package/dist/scripts/{119-be23fe1291-lite.chunk.js → 119-31caa6870b-lite.chunk.js} +1 -1
- package/dist/scripts/{120-498a44eac3-lite.chunk.js → 120-42d22d18d3-lite.chunk.js} +1 -1
- package/dist/scripts/{121-85e77cdf56-lite.chunk.js → 121-5e37acaa93-lite.chunk.js} +1 -1
- package/dist/scripts/{122-a6ecf138d3-lite.chunk.js → 122-3f93b19c00-lite.chunk.js} +1 -1
- package/dist/scripts/{123-162f6b6fde-lite.chunk.js → 123-2c3c4da4ee-lite.chunk.js} +1 -1
- package/dist/scripts/{124-ab76124615-lite.chunk.js → 124-4b29b80b77-lite.chunk.js} +1 -1
- package/dist/scripts/{125-5ed80d6f4c-lite.chunk.js → 125-6f938e3114-lite.chunk.js} +1 -1
- package/dist/scripts/{126-6dcef7401b-lite.chunk.js → 126-76c253e7e0-lite.chunk.js} +1 -1
- package/dist/scripts/127-ee0ce87869-lite.chunk.js +1 -0
- package/dist/scripts/{128-db85e66fdc-lite.chunk.js → 128-d0d509f787-lite.chunk.js} +1 -1
- package/dist/scripts/{129-599efcf62a-lite.chunk.js → 129-345c40a7c6-lite.chunk.js} +1 -1
- package/dist/scripts/{13-6f7b663157-lite.chunk.js → 13-4882a2e3d6-lite.chunk.js} +1 -1
- package/dist/scripts/{130-8aa5726031-lite.chunk.js → 130-84367cadaa-lite.chunk.js} +1 -1
- package/dist/scripts/{131-9fab3d768c-lite.chunk.js → 131-d067547d11-lite.chunk.js} +1 -1
- package/dist/scripts/{132-f2f710ecd2-lite.chunk.js → 132-c00e252041-lite.chunk.js} +1 -1
- package/dist/scripts/{133-96c1fb0f59-lite.chunk.js → 133-70a3715c79-lite.chunk.js} +1 -1
- package/dist/scripts/{134-1350b4c0ff-lite.chunk.js → 134-0e21d5e056-lite.chunk.js} +1 -1
- package/dist/scripts/{135-720d5068b2-lite.chunk.js → 135-0ac71c25b8-lite.chunk.js} +1 -1
- package/dist/scripts/{136-86515e1a45-lite.chunk.js → 136-89209d4f04-lite.chunk.js} +1 -1
- package/dist/scripts/{137-dbede04372-lite.chunk.js → 137-495f7aeb4d-lite.chunk.js} +1 -1
- package/dist/scripts/{138-cc2c408258-lite.chunk.js → 138-40ea855432-lite.chunk.js} +1 -1
- package/dist/scripts/{139-a561b51ce8-lite.chunk.js → 139-cc55359d8e-lite.chunk.js} +1 -1
- package/dist/scripts/{14-af8b9d38e7-lite.chunk.js → 14-b8652feee4-lite.chunk.js} +1 -1
- package/dist/scripts/{140-fc1f47f220-lite.chunk.js → 140-365949e3c0-lite.chunk.js} +1 -1
- package/dist/scripts/{141-7e76bf4aba-lite.chunk.js → 141-356f44ef31-lite.chunk.js} +1 -1
- package/dist/scripts/{142-52e6024d9f-lite.chunk.js → 142-4273e8a88a-lite.chunk.js} +1 -1
- package/dist/scripts/143-1b80d17bb0-lite.chunk.js +1 -0
- package/dist/scripts/{144-abefeb1763-lite.chunk.js → 144-fd6361e0bf-lite.chunk.js} +1 -1
- package/dist/scripts/{145-9a65b18a6b-lite.chunk.js → 145-5492fdf524-lite.chunk.js} +1 -1
- package/dist/scripts/{146-a8635e26ac-lite.chunk.js → 146-d748009223-lite.chunk.js} +1 -1
- package/dist/scripts/147-1864deac89-lite.chunk.js +1 -0
- package/dist/scripts/148-509ba8d553-lite.chunk.js +1 -0
- package/dist/scripts/149-f9177b042c-lite.chunk.js +1 -0
- package/dist/scripts/{150-7c18a47d4f-lite.chunk.js → 150-a677e30759-lite.chunk.js} +1 -1
- package/dist/scripts/{151-08e62b3d7d-lite.chunk.js → 151-179dddc58e-lite.chunk.js} +1 -1
- package/dist/scripts/{152-b6a2f53717-lite.chunk.js → 152-af435ef7ea-lite.chunk.js} +1 -1
- package/dist/scripts/{153-c6d2cd1a3b-lite.chunk.js → 153-bfbd97701e-lite.chunk.js} +1 -1
- package/dist/scripts/{154-ae551e279d-lite.chunk.js → 154-3f918eba39-lite.chunk.js} +1 -1
- package/dist/scripts/{155-ae19cc8706-lite.chunk.js → 155-a6e1bb01d0-lite.chunk.js} +1 -1
- package/dist/scripts/{156-2b6252f6ef-lite.chunk.js → 156-47a60093a0-lite.chunk.js} +1 -1
- package/dist/scripts/{157-de305f1c24-lite.chunk.js → 157-daee81c5e0-lite.chunk.js} +1 -1
- package/dist/scripts/{158-90b3bf2026-lite.chunk.js → 158-cbd0802179-lite.chunk.js} +1 -1
- package/dist/scripts/{159-a288ebd5bb-lite.chunk.js → 159-b017814153-lite.chunk.js} +1 -1
- package/dist/scripts/16-e8defe56b0-lite.chunk.js +1 -0
- package/dist/scripts/{160-bee508389a-lite.chunk.js → 160-55349216b8-lite.chunk.js} +1 -1
- package/dist/scripts/{161-808aeb2184-lite.chunk.js → 161-a2268f2e38-lite.chunk.js} +1 -1
- package/dist/scripts/{162-ac8d841865-lite.chunk.js → 162-bf5029d2f1-lite.chunk.js} +1 -1
- package/dist/scripts/{163-879925a6af-lite.chunk.js → 163-c997b37988-lite.chunk.js} +1 -1
- package/dist/scripts/{164-2e41d3c12e-lite.chunk.js → 164-50dc293812-lite.chunk.js} +1 -1
- package/dist/scripts/{165-7bd919615d-lite.chunk.js → 165-4f218c65b2-lite.chunk.js} +1 -1
- package/dist/scripts/{166-d97e580ca5-lite.chunk.js → 166-900efa9be1-lite.chunk.js} +1 -1
- package/dist/scripts/{167-58ba3ac38a-lite.chunk.js → 167-923d4747cb-lite.chunk.js} +1 -1
- package/dist/scripts/{168-992004fdee-lite.chunk.js → 168-a7537bbd9e-lite.chunk.js} +1 -1
- package/dist/scripts/{169-649afbc204-lite.chunk.js → 169-03bdd8bbc9-lite.chunk.js} +1 -1
- package/dist/scripts/{17-5172822d97-lite.chunk.js → 17-2c2eb2370a-lite.chunk.js} +1 -1
- package/dist/scripts/{170-e499037a8c-lite.chunk.js → 170-bc112b5484-lite.chunk.js} +1 -1
- package/dist/scripts/{171-db7bce1077-lite.chunk.js → 171-2ee3cd6a15-lite.chunk.js} +1 -1
- package/dist/scripts/{172-53738f8ecf-lite.chunk.js → 172-bf64e84286-lite.chunk.js} +1 -1
- package/dist/scripts/{173-2445a2e803-lite.chunk.js → 173-89c3691606-lite.chunk.js} +1 -1
- package/dist/scripts/174-999ae7d226-lite.chunk.js +1 -0
- package/dist/scripts/{175-eea9be489c-lite.chunk.js → 175-01c15b0247-lite.chunk.js} +1 -1
- package/dist/scripts/{176-72437d1549-lite.chunk.js → 176-db874932e5-lite.chunk.js} +1 -1
- package/dist/scripts/177-f3246f355f-lite.chunk.js +1 -0
- package/dist/scripts/{178-3040a92550-lite.chunk.js → 178-1eae2e1e00-lite.chunk.js} +1 -1
- package/dist/scripts/{179-2616c37c49-lite.chunk.js → 179-1019d87957-lite.chunk.js} +1 -1
- package/dist/scripts/{18-0044ce927b-lite.chunk.js → 18-d21f322353-lite.chunk.js} +1 -1
- package/dist/scripts/{180-ed740e8d5a-lite.chunk.js → 180-513c439581-lite.chunk.js} +1 -1
- package/dist/scripts/{181-40d67df9bf-lite.chunk.js → 181-93c3749d07-lite.chunk.js} +1 -1
- package/dist/scripts/{182-319d763a61-lite.chunk.js → 182-4a12515ac4-lite.chunk.js} +1 -1
- package/dist/scripts/{183-f03c44f391-lite.chunk.js → 183-2b5614e2fc-lite.chunk.js} +1 -1
- package/dist/scripts/{184-b75a0a4b97-lite.chunk.js → 184-1a9e8d2343-lite.chunk.js} +1 -1
- package/dist/scripts/{185-a6cf054f6d-lite.chunk.js → 185-19988a5bd9-lite.chunk.js} +1 -1
- package/dist/scripts/{186-bb1ef1dcfd-lite.chunk.js → 186-10c1b9ab94-lite.chunk.js} +1 -1
- package/dist/scripts/{187-5018bdcaaf-lite.chunk.js → 187-d200bf9472-lite.chunk.js} +1 -1
- package/dist/scripts/{188-2d4f452f4f-lite.chunk.js → 188-0fb94266c0-lite.chunk.js} +1 -1
- package/dist/scripts/{189-819e2c5026-lite.chunk.js → 189-4691a94c27-lite.chunk.js} +1 -1
- package/dist/scripts/{19-eb36ced7eb-lite.chunk.js → 19-6b6a6d56df-lite.chunk.js} +1 -1
- package/dist/scripts/{190-930fea657f-lite.chunk.js → 190-cc82fae044-lite.chunk.js} +1 -1
- package/dist/scripts/{2-b05ed53058-lite.chunk.js → 2-1c6ba06243-lite.chunk.js} +1 -1
- package/dist/scripts/{21-f467535e38-lite.chunk.js → 21-4c9fcd8e24-lite.chunk.js} +1 -1
- package/dist/scripts/{22-dc6686075a-lite.chunk.js → 22-023c206c37-lite.chunk.js} +1 -1
- package/dist/scripts/{24-07cb32b607-lite.chunk.js → 24-990b4f80c0-lite.chunk.js} +1 -1
- package/dist/scripts/{25-6fabc9822e-lite.chunk.js → 25-34b9614151-lite.chunk.js} +1 -1
- package/dist/scripts/{26-08d6014223-lite.chunk.js → 26-edbe74da58-lite.chunk.js} +1 -1
- package/dist/scripts/29-968fd7b21b-lite.chunk.js +1 -0
- package/dist/scripts/{30-862bc4075b-lite.chunk.js → 30-856093d854-lite.chunk.js} +1 -1
- package/dist/scripts/{31-42686956a4-lite.chunk.js → 31-78dab2c181-lite.chunk.js} +1 -1
- package/dist/scripts/34-7674a66b87-lite.chunk.js +1 -0
- package/dist/scripts/35-d8005cef5d-lite.chunk.js +1 -0
- package/dist/scripts/{36-4b54e594e2-lite.chunk.js → 36-ef70522232-lite.chunk.js} +2 -2
- package/dist/scripts/{37-91f82e9099-lite.chunk.js → 37-ae1ee14466-lite.chunk.js} +1 -1
- package/dist/scripts/38-69895e66fb-lite.chunk.js +1 -0
- package/dist/scripts/39-d220486b74-lite.chunk.js +1 -0
- package/dist/scripts/40-f706aaded6-lite.chunk.js +1 -0
- package/dist/scripts/{41-a32cb24ebd-lite.chunk.js → 41-ee4fbc6866-lite.chunk.js} +1 -1
- package/dist/scripts/42-6e00435fdd-lite.chunk.js +1 -0
- package/dist/scripts/43-77ac8e9c6a-lite.chunk.js +1 -0
- package/dist/scripts/{44-b1a78528ac-lite.chunk.js → 44-b6c548760b-lite.chunk.js} +1 -1
- package/dist/scripts/{45-b753a7d859-lite.chunk.js → 45-3cb45ff964-lite.chunk.js} +1 -1
- package/dist/scripts/{46-6ccf2e74d9-lite.chunk.js → 46-434ec90d13-lite.chunk.js} +1 -1
- package/dist/scripts/{47-ae3a8aa869-lite.chunk.js → 47-91ca47d8ae-lite.chunk.js} +1 -1
- package/dist/scripts/{48-3b545c5772-lite.chunk.js → 48-d44733b503-lite.chunk.js} +1 -1
- package/dist/scripts/{49-489d8ba53c-lite.chunk.js → 49-1325a3201c-lite.chunk.js} +1 -1
- package/dist/scripts/{50-3db4085201-lite.chunk.js → 50-e0eff85467-lite.chunk.js} +1 -1
- package/dist/scripts/{51-f1f9f0e363-lite.chunk.js → 51-83983f26a7-lite.chunk.js} +1 -1
- package/dist/scripts/{52-f01d12b595-lite.chunk.js → 52-ff2d99e7a4-lite.chunk.js} +1 -1
- package/dist/scripts/{53-2078729559-lite.chunk.js → 53-884ec626cf-lite.chunk.js} +1 -1
- package/dist/scripts/{54-564a31ed78-lite.chunk.js → 54-9b1602b796-lite.chunk.js} +1 -1
- package/dist/scripts/{55-2f9854530f-lite.chunk.js → 55-005e3f2dff-lite.chunk.js} +1 -1
- package/dist/scripts/{56-907978ef06-lite.chunk.js → 56-1c500fffdc-lite.chunk.js} +1 -1
- package/dist/scripts/{57-01a4afda37-lite.chunk.js → 57-99979c3aad-lite.chunk.js} +1 -1
- package/dist/scripts/{58-97a204b0b9-lite.chunk.js → 58-baa1a98e62-lite.chunk.js} +1 -1
- package/dist/scripts/{59-6f4bcb9fd2-lite.chunk.js → 59-15bd998416-lite.chunk.js} +1 -1
- package/dist/scripts/{60-5fc4ba379b-lite.chunk.js → 60-621da070bd-lite.chunk.js} +1 -1
- package/dist/scripts/{61-f01038880d-lite.chunk.js → 61-5a942f1913-lite.chunk.js} +1 -1
- package/dist/scripts/{62-f86662aadb-lite.chunk.js → 62-e097c4122c-lite.chunk.js} +1 -1
- package/dist/scripts/{63-f15c72dcad-lite.chunk.js → 63-7c75de2446-lite.chunk.js} +1 -1
- package/dist/scripts/{64-393ff338f8-lite.chunk.js → 64-7a430627bb-lite.chunk.js} +1 -1
- package/dist/scripts/{65-3d757887ed-lite.chunk.js → 65-bf66f8a868-lite.chunk.js} +1 -1
- package/dist/scripts/66-00c6068c3c-lite.chunk.js +2 -0
- package/dist/scripts/67-f1d67e3d7e-lite.chunk.js +7 -0
- package/dist/scripts/{68-030a2bd451-lite.chunk.js → 68-0acb7998fd-lite.chunk.js} +1 -1
- package/dist/scripts/{69-be0e9656e7-lite.chunk.js → 69-8d01d30cdd-lite.chunk.js} +1 -1
- package/dist/scripts/{70-708d85f91e-lite.chunk.js → 70-0601b5aa41-lite.chunk.js} +1 -1
- package/dist/scripts/{71-35fded130d-lite.chunk.js → 71-04548dfee1-lite.chunk.js} +1 -1
- package/dist/scripts/{72-37bab23ba2-lite.chunk.js → 72-c3136918d9-lite.chunk.js} +1 -1
- package/dist/scripts/{73-14240be869-lite.chunk.js → 73-c68bf7ccf7-lite.chunk.js} +1 -1
- package/dist/scripts/{74-b9de3e01ce-lite.chunk.js → 74-4193d8f932-lite.chunk.js} +1 -1
- package/dist/scripts/{75-87f2c0a9d1-lite.chunk.js → 75-0c37808491-lite.chunk.js} +1 -1
- package/dist/scripts/{76-81d629e827-lite.chunk.js → 76-a561cd2282-lite.chunk.js} +1 -1
- package/dist/scripts/{77-1a57e2fc94-lite.chunk.js → 77-9764a1f590-lite.chunk.js} +1 -1
- package/dist/scripts/{78-af322f547f-lite.chunk.js → 78-a7379ade12-lite.chunk.js} +1 -1
- package/dist/scripts/{79-f7ac16cf24-lite.chunk.js → 79-bb57299316-lite.chunk.js} +1 -1
- package/dist/scripts/{8-95ee1ad386-lite.chunk.js → 8-58bd56d951-lite.chunk.js} +1 -1
- package/dist/scripts/{80-cc1c353755-lite.chunk.js → 80-7ce3d63a87-lite.chunk.js} +1 -1
- package/dist/scripts/{81-cd566f6da3-lite.chunk.js → 81-650b07666c-lite.chunk.js} +1 -1
- package/dist/scripts/{82-711dc15ddb-lite.chunk.js → 82-ce7541c732-lite.chunk.js} +1 -1
- package/dist/scripts/{83-d36971ff7c-lite.chunk.js → 83-9cdae88b80-lite.chunk.js} +1 -1
- package/dist/scripts/{84-ef608b0b1b-lite.chunk.js → 84-7f74467474-lite.chunk.js} +1 -1
- package/dist/scripts/{85-66ddcd4009-lite.chunk.js → 85-2fb9b4ffdf-lite.chunk.js} +1 -1
- package/dist/scripts/{86-7bf25500a6-lite.chunk.js → 86-c183da3056-lite.chunk.js} +1 -1
- package/dist/scripts/{87-ba343bf450-lite.chunk.js → 87-e3cff5d87c-lite.chunk.js} +1 -1
- package/dist/scripts/{88-5f6aabb2cf-lite.chunk.js → 88-c5c1ac4962-lite.chunk.js} +1 -1
- package/dist/scripts/{89-cb093964ed-lite.chunk.js → 89-7bcd2836c1-lite.chunk.js} +1 -1
- package/dist/scripts/{9-44f3f06105-lite.chunk.js → 9-750f4cfad4-lite.chunk.js} +3 -3
- package/dist/scripts/{90-433ba7d18e-lite.chunk.js → 90-2c837e9491-lite.chunk.js} +1 -1
- package/dist/scripts/{91-84d0f0870e-lite.chunk.js → 91-62d66e7948-lite.chunk.js} +1 -1
- package/dist/scripts/{92-4b345d9de8-lite.chunk.js → 92-14d283fef9-lite.chunk.js} +1 -1
- package/dist/scripts/{93-9b2ab91325-lite.chunk.js → 93-e10369f702-lite.chunk.js} +1 -1
- package/dist/scripts/{94-0cb3553d70-lite.chunk.js → 94-238ee10a81-lite.chunk.js} +1 -1
- package/dist/scripts/95-faf6b3ecb7-lite.chunk.js +1 -0
- package/dist/scripts/{96-fc85aa31bb-lite.chunk.js → 96-98182b55a8-lite.chunk.js} +1 -1
- package/dist/scripts/{97-0605378cda-lite.chunk.js → 97-535e2d6364-lite.chunk.js} +1 -1
- package/dist/scripts/{98-68ced88b0b-lite.chunk.js → 98-7f75c507ce-lite.chunk.js} +1 -1
- package/dist/scripts/{99-dc8abfb0b4-lite.chunk.js → 99-9b91d88fe5-lite.chunk.js} +1 -1
- package/dist/scripts/bundle-07fe9ff1d4.min.js +48 -0
- package/dist/scripts/polyfills-78f803af78.min.js +1 -0
- package/package.json +2 -2
- package/dist/scripts/106-d46c61ab57-lite.chunk.js +0 -1
- package/dist/scripts/116-d868a925cd-lite.chunk.js +0 -1
- package/dist/scripts/127-fd7a737f22-lite.chunk.js +0 -1
- package/dist/scripts/143-4b761e6c60-lite.chunk.js +0 -1
- package/dist/scripts/147-3d1084f5d2-lite.chunk.js +0 -1
- package/dist/scripts/148-5398fc2ed3-lite.chunk.js +0 -1
- package/dist/scripts/149-b4849fa25f-lite.chunk.js +0 -1
- package/dist/scripts/16-f14251e3fd-lite.chunk.js +0 -1
- package/dist/scripts/174-29381de9b1-lite.chunk.js +0 -1
- package/dist/scripts/177-1dabf01b1f-lite.chunk.js +0 -1
- package/dist/scripts/29-ce6ab8f039-lite.chunk.js +0 -1
- package/dist/scripts/34-831d51609f-lite.chunk.js +0 -1
- package/dist/scripts/35-b82af5544a-lite.chunk.js +0 -1
- package/dist/scripts/38-ebcd30d447-lite.chunk.js +0 -1
- package/dist/scripts/39-462f73ad67-lite.chunk.js +0 -1
- package/dist/scripts/40-c59fbaac4d-lite.chunk.js +0 -1
- package/dist/scripts/42-6b0710c320-lite.chunk.js +0 -1
- package/dist/scripts/43-66ad83ac9f-lite.chunk.js +0 -1
- package/dist/scripts/66-dd2b3068b4-lite.chunk.js +0 -1
- package/dist/scripts/67-84f3098837-lite.chunk.js +0 -7
- package/dist/scripts/95-de7c60edab-lite.chunk.js +0 -1
- package/dist/scripts/bundle-058ab5f293.min.js +0 -48
- package/dist/scripts/polyfills-3a495b6ec5.min.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[16],{1135:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(15),o={createViewKey:function(t,e,n){var o={mediaId:t.toString(),mediaIdType:e};return n&&(o.shareContextId=n),{url:"/api/player/create-view-key",key:"view:key:".concat(t,":").concat(e),type:r.a.POST,data:o,expiryTime:28800}}}},1136:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.Share="share",t.MasterObject="masterobject"}(r||(r={}))},1142:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.Correct=0]="Correct",t[t.Incorrect=1]="Incorrect",t[t.AwaitingMarking=2]="AwaitingMarking",t[t.Answered=3]="Answered",t[t.UnAnswered=4]="UnAnswered",t[t.NotApplicable=5]="NotApplicable"}(r||(r={}))},1148:function(t,e,n){"use strict";var r=n(1221);n.d(e,"InteractiveMode",(function(){return r.a}));n(1244),n(1245),n(1246),n(1247),n(1248),n(1249),n(1250)},1189:function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var r=n(0),o=n(1093),a=n(8),i=n(29),c=n(245),u=n(15),l=n(42),s=n(1190),f=n.n(s);function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var m=null,h=!1;function v(t){var e=d(r.useState(m),2),n=e[0],s=e[1];if(m||h||(h=!0,Object(c.ajaxRequest)({resource:"/api/integrations/token/immersive-reader",type:u.a.GET,success:function(t){m=t,s(t),window.setTimeout((function(){m=null,h=!1}),9e5)},error:function(){}})),!n)return r.createElement(r.Fragment,null);return t.title||(t.title=a.a.getPhrase("shared.immersiveReader","titleFallback")),r.createElement("span",{className:"".concat(f.a.button," ").concat(t.className||""),onClick:function(){l.a.isFunction(t.onLaunch)&&t.onLaunch(),i.a.logUserAction(t.analyticsData,t.analyticsOptions);var e={title:t.title,chunks:[{content:t.text,mimeType:t.html?"text/html":"text/plain"}]},r=n.subdomain,a=n.token,c={uiZIndex:5e3,onExit:function(){l.a.isFunction(t.onExit)&&t.onExit()}};o.launchAsync(a,r,e,c)}},r.createElement("svg",{viewBox:"0 0 40 37"},r.createElement("path",{d:"M37.4,0.9 L37.4,9.6 L35.4,9.6 L35.4,2.9 L24.4,2.9 C22.9,3.3 20,4.5 20,6 L20,17.2 L18,17.2 L18,6 C18,5 15.6,3.6 13.8,2.9 L2,2.9 L2,29 L12.4,29 L12.4,31 L0,31 L0,0.9 L14.1,0.9 L14.3,1 C15,1.2 17.5,2.2 18.9,3.7 C20.5,1.9 23.5,1.1 23.9,1 L24.1,1 L37.4,1 L37.4,0.9 Z",fill:"#000000"}),r.createElement("path",{d:"M27.4,37 L25.8,37 L18.4,29.4 L14,29.4 L14,21 L18.4,20.9 L26.1,13 L27.4,13 L27.4,37 Z M16,27.4 L19.2,27.4 L25.3,33.7 L25.3,16.6 L19.2,22.9 L15.9,22.9 L15.9,27.4 L16,27.4 Z",fill:"#0197F2"}),r.createElement("path",{d:"M31.3,32.7 L29.6,31.7 C29.6,31.7 31.7,28.3 31.7,25.2 C31.7,21.9 29.6,18.5 29.6,18.4 L31.3,17.4 C31.4,17.6 33.7,21.3 33.7,25.2 C33.7,28.8 31.4,32.6 31.3,32.7 Z",fill:"#0197F2"}),r.createElement("path",{d:"M36.4,36.2 L34.8,35 C34.8,35 38,30.8 38,25.2 C38,19.6 34.8,15.4 34.8,15.4 L36.4,14.2 C36.5,14.4 40,19 40,25.3 C40,31.5 36.5,36 36.4,36.2 Z",fill:"#0197F2"})))}},1190:function(t,e,n){t.exports={button:"TRYB2"}},1208:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.AddToPlaylist="115005679748",t.LibraryEditor="360001974533",t.VideoAccess="360000153947",t.AddFromOnline="360011718234",t.UploadToLibraryEditor="360012069334",t.PublisherArchive="360011150174",t.PBTErrorCodes="360012421153",t.ManuelReview="360020004534",t.LibraryReview="360000163788",t.PublisherServer="360023108873",t.MigrationOptions="360023109033",t.Integrations="4407268725529",t.Classrooms="4405362551833",t.MakeInteractive="4405370510873"}(r||(r={}))},1221:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.View=0]="View",t[t.Create=1]="Create"}(r||(r={}))},1229:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(0),o=n.n(r),a=n(116),i=n(62),c=n(21);function u(t){return o.a.createElement(a.a,{title:t.tooltipText,spanHack:!0,spanHackClassName:"d-inline-block"},o.a.createElement(i.a,{svgName:c.b.Info}))}},1244:function(t,e){},1245:function(t,e){},1246:function(t,e){},1247:function(t,e){},1248:function(t,e){},1249:function(t,e){},1250:function(t,e){},1253:function(t,e,n){t.exports={uncheckedBackground:"_3OcAr"}},1254:function(t,e,n){"use strict";var r=n(0),o=n.n(r),a=n(4),i=n(28),c=(n(812),n(813),n(2)),u=n(94),l=n(1148),s=n(1127);n(1351);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=m(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function m(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}function h(t,e){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g(t);if(e){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(a,t);var e,n,r,o=v(a);function a(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).timepoint_=e.timepoint,n.time_=e.timepoint.visibleAt/1e3;var r=e.timepoint.interactions[0];r||n.hide();var i=s.a.getTypeInfo(r.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(i),n.controlText(r.name),n.update(),n}return e=a,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(p(g(a.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return p(g(a.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabIndex:0}))}},{key:"update",value:function(){var t=this.player_.duration(),e=this.time_/t;this.el().style.left=100*e+"%",e>100||e<0?this.hide():this.show()}},{key:"handleClick",value:function(t){t.stopPropagation(),this.player_.currentTime(this.time_)}}])&&d(e.prototype,n),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(c.a.getComponent("Button"));n(1352);function w(t){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(t,e)}(t)||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 x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function I(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function S(){return(S="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=k(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function k(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=L(t)););return t}function O(t,e){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=L(t);if(e){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(t,e){if(e&&("object"===w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return j(t)}function j(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L(t){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}(a,t);var e,n,r,o=C(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).track_=e.track,n.interactive_=e.interactive,n.onDurationChange=n.onDurationChange.bind(j(n)),n.createInteractionItems=n.createInteractionItems.bind(j(n)),n.createInteractionItems(),n.track_.on("cv:cuechange",n.createInteractionItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.track_.off("cv:cuechange"),n.player_.off("durationchange",n.onDurationChange)})),n}return e=a,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(S(L(a.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return S(L(a.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"createInteractionItems",value:function(){var t,e=this;if(this.track_){E(this.children_).forEach((function(t){e.removeChild(t)}));for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],o=this.getTimepointById(r.text);o&&(null===(t=o.interactions)||void 0===t?void 0:t.length)&&this.addChild(new b(this.player_,{timepoint:o}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(t){var e;return null===(e=this.interactive_.timepoints)||void 0===e?void 0:e.find((function(e){return e.id.toString()===t.toString()}))}}])&&I(e.prototype,n),r&&I(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(c.a.getComponent("Component")),A=n(288),P=n(1221);function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var M=n(400),U=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function R(t){return!!(null==t?void 0:t.toString().startsWith("new_"))}function D(t){t.error,t.hasChanges,t.submitted,t.spinner;return U(t,["error","hasChanges","submitted","spinner"])}var G=n(339);function q(t){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function B(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */B=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==q(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function W(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var z=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},Y=function(){return"/api/domain/v1/interactions/bulk"},$=function(t){return"/api/domain/v1/interactions/bulk/".concat(t)},H=function(t){return"/api/domain/v1/interactions/".concat(t)},V=function(){return"/api/domain/v1/timepoints"},K=function(t){return"/api/domain/v1/timepoints/".concat(t)},Z=function(t){return"/api/domain/v1/timepoints/".concat(t)},J={},Q=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,(n=[{key:"saveInteraction",value:function(t){return z(this,void 0,void 0,B().mark((function e(){var n,r,o,a,i;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=R(t.id),r=n?Y():$(t.id),o={name:t.name,data:t.data,timepointId:t.timepointId,interactiveId:t.interactiveId,typeId:t.typeId,actionableItems:t.actionableItems,order:t.order},n||(o.id=t.id),a=n?G.a.post(r,JSON.stringify(o),J):G.a.put(r,JSON.stringify(o),J),e.next=7,a;case 7:i=e.sent,n&&(t.id=i.id);case 9:case"end":return e.stop()}}),e)})))}},{key:"deleteInteraction",value:function(t){return z(this,void 0,void 0,B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G.a.delete(H(t),J);case 2:case"end":return e.stop()}}),e)})))}},{key:"saveTimepoint",value:function(t){return z(this,void 0,void 0,B().mark((function e(){var n,r;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={interactiveId:t.interactiveId,shouldPause:1,visibleAt:t.visibleAt},e.next=3,G.a.post(V(),JSON.stringify(n),J);case 3:r=e.sent,t.id=r.id;case 5:case"end":return e.stop()}}),e)})))}},{key:"updateTimepoint",value:function(t){return z(this,void 0,void 0,B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G.a.put(Z(t.id),JSON.stringify(t),J);case 2:case"end":return e.stop()}}),e)})))}},{key:"deleteTimepoint",value:function(t){return z(this,void 0,void 0,B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G.a.delete(K(t),J);case 2:case"end":return e.stop()}}),e)})))}}])&&W(e.prototype,n),r&&W(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),X=n(406),tt=n(163),et=n(240);function nt(t){var e=t.error;return t.error?o.a.createElement("p",{className:"mt-2 small text-danger"},e):o.a.createElement(o.a.Fragment,null)}var rt=n(129);function ot(t){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function at(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */at=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}var it=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},ct=/[.\?!,;:\-''\(\)]/g;function ut(t){for(var e=t.split("");e.length&&e[0].match(ct);)e.shift();for(;e.length&&e[e.length-1].match(ct);)e.pop();return e.join("")}function lt(t,e){for(var n=t.split(""),r=[],o=[];n.length&&n[0].match(ct);)r.push(n.shift());for(;n.length&&n[n.length-1].match(ct);)o.unshift(n.pop());return r.join("")+e+o.join("")}function st(t){return t.map((function(t){if(!t.selected)return t.text;var e=ut(t.text).length,n=new Array(e).fill("_").join("");return lt(t.text,n)})).join(" ")}function ft(t){return t.map((function(t){var e;return t.selected?null===(e=lt(t.text,"{".concat(t.order,"}")))||void 0===e?void 0:e.trim():t.text})).join(" ")}var dt=n(1237),pt=n(1229);function mt(t){return(mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ht(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ht=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==mt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}var vt=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))};var yt=n(35);function gt(t){var e=o.a.useRef(null);function n(){t.onChange(Object.assign(Object.assign({},t.answer),{isCorrect:!t.answer.isCorrect}))}return o.a.createElement("li",{className:"p-1 my-1 w-100 bg-white d-flex align-items-center border rounded"},o.a.createElement("div",{className:"custom-control ".concat(t.isTrueOrFalse?"custom-radio":"custom-checkbox"),onKeyDown:function(t){return"Enter"===t.key&&n()}},o.a.createElement("input",{id:"multiple-choice--".concat(t.answer.order),type:t.isTrueOrFalse?"radio":"checkbox",className:"custom-control-input mr-2",name:"multiple-choice-answer",checked:t.answer.isCorrect,onChange:n,disabled:!t.answer.name}),o.a.createElement("label",{ref:e,htmlFor:"multiple-choice--".concat(t.answer.order),className:"cursor-pointer custom-control-label"})),t.isTrueOrFalse?o.a.createElement("label",{className:"mb-0",htmlFor:"multiple-choice--".concat(t.answer.order)},t.answer.name):o.a.createElement("input",{placeholder:"Answer",onChange:function(e){t.onChange(Object.assign(Object.assign({},t.answer),{name:e.target.value}))},value:t.answer.name,className:"border-0 outline-none w-100",autoComplete:"off"}))}n(1353);function bt(t){return(bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */wt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==bt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}var Et=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))};function xt(t){var e;if(!(null===(e=t.question)||void 0===e?void 0:e.trim()))return"Please provide a question";if(!t.answers.find((function(t){return t.isCorrect})))return"Please select the correct answer";var n=t.answers.filter((function(t){var e;return!!(null===(e=t.name)||void 0===e?void 0:e.trim())}));if(n.length<2)return"Please provide at least two answers";var r=!1,o={};return n.forEach((function(t){r||(o[t.name]?r=!0:o[t.name]=!0)})),r?"There are duplicates in your answers":null}function It(t,e){var n;return Et(this,void 0,void 0,wt().mark((function r(){return wt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.name=null===(n=t.question)||void 0===n?void 0:n.trim(),e.actionableItems=t.answers.filter((function(t){var e;return!!(null===(e=t.name)||void 0===e?void 0:e.trim())})),t.feedback&&(e.data.feedback=t.feedback),r.next=5,Q.saveInteraction(e);case 5:case"end":return r.stop()}}),r)})))}function St(t){var e=t.state,n=void 0===e?function(t){var e,n=t.typeId===tt.InteractionTypeId.TrueOrFalse,r=null===(e=t.actionableItems)||void 0===e?void 0:e.map((function(t){return{order:t.order,name:t.name,isCorrect:t.isCorrect}}));return(null==r?void 0:r.length)?!n&&(null==r?void 0:r.length)<4&&r.push({order:r.length,name:"",isCorrect:!1}):r=[{order:0,name:n?"True":"",isCorrect:!1},{order:1,name:n?"False":"",isCorrect:!1}],{question:t.name||"",answers:r,feedback:t.data.feedback||""}}(t.interaction):e,r=t.setState,a=t.interaction,i=t.optionsPortalNode,c=t.showFeedback,u=a.typeId===tt.InteractionTypeId.TrueOrFalse;function l(t){var e=n.answers.map((function(e){return e.order!==t.order?Object.assign(Object.assign({},e),{isCorrect:!u&&e.isCorrect}):t}));if(e.find((function(t){return!t.name}))&&(e=function(t){var e=t.find((function(t){return!t.name}));if(t.length>2)return t.filter((function(t){return t.order!==e.order})).map((function(t,e){return Object.assign(Object.assign({},t),{order:e})}));return t.map((function(t){return t.order!==e.order?t:Object.assign(Object.assign({},t),{isCorrect:!1})}))}(e)),!u&&e.length<4&&!e.find((function(t){return!t.name}))){var o=yt.a.last(e);e.push({name:"",order:o.order+1,isCorrect:!1})}r(Object.assign(Object.assign({},n),{answers:e}))}return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("div",{className:"form-group"},o.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},o.a.createElement("label",{className:"cv-interaction-field-label mb-0",htmlFor:"multiple-choice-question"},"Question"),o.a.createElement(et.b,{node:i})),o.a.createElement("input",{id:"multiple-choice-question",className:"form-control",placeholder:"Enter your question here",value:n.question,onChange:function(t){r(Object.assign(Object.assign({},n),{question:t.target.value}))},autoComplete:"off"}),!n.question&&o.a.createElement(nt,{error:n.error})),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"multiple-choice-answer"},"Answers"),n.answers.map((function(t){return o.a.createElement(gt,{key:t.order,answer:t,onChange:l,isTrueOrFalse:u})})),n.question&&o.a.createElement(nt,{error:n.error})),c&&u&&o.a.createElement("div",{className:"form-group mb-0"},o.a.createElement("label",{className:"cv-true-or-false-feedback-label cv-interaction-field-label",htmlFor:"true-or-false-feedback"},"Feedback ",o.a.createElement("span",{className:"text-muted"},"(optional)")," ",o.a.createElement(pt.a,{tooltipText:"Provide answer feedback for your students"})),o.a.createElement(dt.a,{id:"true-or-false-feedback",className:"form-control",minRows:2,value:n.feedback||"",onChange:function(t){r(Object.assign(Object.assign({},n),{feedback:t.target.value}))},placeholder:"Give feedback for this question"})))}var kt=n(413),Ot=n(30),Ct=n(421);function Nt(){return o.a.createElement("svg",{viewBox:"0 0 43 38",className:"cv-upload-image-icon"},o.a.createElement("g",{transform:"translate(-1193.000000, -185.000000)"},o.a.createElement("g",{transform:"translate(1183.000000, 173.000000)"},o.a.createElement("path",{d:"M49.875,12.9166667 C51.3247475,12.9166667 52.5,14.0732644 52.5,15.5 L52.5,46.5 C52.5,47.9267356 51.3247475,49.0833333 49.875,49.0833333 L13.125,49.0833333 C11.6752525,49.0833333 10.5,47.9267356 10.5,46.5 L10.5,15.5 C10.5,14.0732644 11.6752525,12.9166667 13.125,12.9166667 L49.875,12.9166667 Z M49.875,15.5 L13.125,15.5 L13.125,46.5 L49.875,46.5 L49.875,15.5 Z M35.5085905,22.5470241 L45.7260956,38.0470241 C46.1206004,38.6454897 45.9474325,39.445375 45.3393142,39.8336178 C44.731196,40.2218607 43.9184093,40.0514415 43.5239044,39.4529759 L34.3641741,25.5576247 L29.9489593,31.7425222 C29.4803332,32.3989804 28.5233602,32.4806343 27.9469223,31.9133463 L26.3920049,30.38311 L19.425,39.525 C18.9900758,40.0956942 18.167399,40.211354 17.5875,39.7833333 C17.007601,39.3553127 16.8900758,38.5456942 17.325,37.975 L25.2,27.6416667 C25.6792326,27.0128323 26.6132966,26.9475041 27.1780777,27.5033204 L28.6987913,28.9998957 L33.3335357,22.5074778 C33.8680838,21.758675 35.0025121,21.7793009 35.5085905,22.5470241 Z M21,19.375 C23.1746212,19.375 24.9375,21.1098966 24.9375,23.25 C24.9375,25.3901034 23.1746212,27.125 21,27.125 C18.8253788,27.125 17.0625,25.3901034 17.0625,23.25 C17.0625,21.1098966 18.8253788,19.375 21,19.375 Z M21,21.9583333 C20.2751263,21.9583333 19.6875,22.5366322 19.6875,23.25 C19.6875,23.9633678 20.2751263,24.5416667 21,24.5416667 C21.7248737,24.5416667 22.3125,23.9633678 22.3125,23.25 C22.3125,22.5366322 21.7248737,21.9583333 21,21.9583333 Z",id:"Combined-Shape"}))))}function jt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Tt(t){var e=jt(o.a.useState(!1),2),n=e[0],r=e[1],a=jt(o.a.useState(0),2),i=a[0],c=a[1];return o.a.useEffect((function(){0===i&&n&&r(!1)}),[i,n,r]),o.a.createElement("div",{onDragOver:function(t){t.preventDefault(),t.stopPropagation()},onDragEnter:function(t){t.preventDefault(),t.stopPropagation(),c((function(t){return t+1})),t.dataTransfer.items&&t.dataTransfer.items.length>0&&!n&&r(!0)},onDragLeave:function(t){t.preventDefault(),t.stopPropagation(),c((function(t){return t-1}))},onDrop:function(e){e.preventDefault(),e.stopPropagation(),r(!1),i>0&&c(0),e.dataTransfer.files&&e.dataTransfer.files.length>0&&(t.onDropImage(e.dataTransfer.files),e.dataTransfer.clearData())},className:n?"cv-image-upload-mask":""},t.children)}n(1354);function At(t){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==At(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}var _t=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))};var Ft=n(1306),Mt=n(1526),Ut=n(1533),Rt={styleToHTML:function(t){return"SUPERSCRIPT"===t?{start:"<sup>",end:"</sup>"}:"SUBSCRIPT"===t?{start:"<sub>",end:"</sub>"}:void 0},entityToHTML:function(t,e){return"LINK"===t.type?o.a.createElement("a",{href:t.data.url},e):e},htmlToStyle:function(t,e,n){return"sup"===t?n.add("SUPERSCRIPT"):"sub"===t?n.add("SUBSCRIPT"):n},htmlToEntity:function(t,e,n){if("a"===t)return n("LINK","MUTABLE",{url:e.href})}};function Dt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Gt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qt(t){var e=Dt(o.a.useState(""),2),n=e[0],r=e[1],a=Dt(o.a.useState(""),2),i=a[0],c=a[1];return o.a.createElement("div",{"aria-haspopup":"true","aria-expanded":t.expanded,"aria-label":"rdw-color-picker"},o.a.createElement("div",{className:"rdw-option-wrapper cv-annotation-toolbar-option cv-annotation-link",onClick:t.onExpandEvent}," "),t.expanded&&o.a.createElement("div",{className:"rdw-link-modal",onClick:function(t){return t.stopPropagation()}},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"cv-annotation-url"},"URL"),o.a.createElement("input",{id:"cv-annotation-url",className:"form-control",onChange:function(t){return r(t.target.value)},value:n,placeholder:"Enter URL",autoComplete:"off"})),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"cv-annotation-text"},"Text"),o.a.createElement("input",{id:"cv-annotation-text",className:"form-control",onChange:function(t){return c(t.target.value)},value:i,placeholder:"Enter Text",autoComplete:"off"})),o.a.createElement(rt.a,{onClick:function(){return t.onChange("link",i||n,n,"_blank")},className:"btn btn-dark"},"Add")))}n(1359);function Bt(t){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return zt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Yt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Yt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Bt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}var $t,Ht,Vt,Kt=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))};function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jt=(Zt($t={},tt.InteractionTypeId.Annotation,(function(t){var e=t.state,n=void 0===e?function(t){var e;return{annotation:(null===(e=t.data)||void 0===e?void 0:e.annotation)||""}}(t.interaction):e,r=t.setState,a=t.interaction,i=t.optionsPortalNode,c=Wt(o.a.useState(function(){var t=a.data.annotation;if(t){var e=Object(Ut.a)(Rt)(t);return Ft.EditorState.createWithContent(e)}return Ft.EditorState.createEmpty()}()),2),u=c[0],l=c[1],s=Wt(o.a.useState(null),2),f=s[0],d=s[1];return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("div",{className:"form-group"},o.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},o.a.createElement("label",{className:"cv-interaction-field-label mb-0",onClick:function(){return null==f?void 0:f.focusEditor()}},"Annotation"),o.a.createElement(et.b,{node:i})),o.a.createElement("div",{className:"cv-annotation ".concat(function(){if(!u)return!1;var t=u.getCurrentContent();return t.hasText()||"unstyled"!==t.getBlockMap().first().getType()}()?"Editor--hide-placeholder":"")},u&&o.a.createElement(Mt.Editor,{editorState:u,onEditorStateChange:function(t){l(t);var e=t.getCurrentContent();if(e.hasText()){var o=Object(Ut.b)(Rt)(e);r(Object.assign(Object.assign({},n),{annotation:o}))}else r(Object.assign(Object.assign({},n),{annotation:""}))},toolbarClassName:"cv-annotation-toolbar",editorClassName:"form-control cv-annotation-editor",ref:d,placeholder:"Enter your annotation here",toolbar:{options:["inline","list","link"],inline:{options:["bold","italic","underline","superscript","subscript"],bold:{className:"cv-annotation-toolbar-option cv-annotation-bold",icon:""},italic:{className:"cv-annotation-toolbar-option cv-annotation-italic",icon:""},underline:{className:"cv-annotation-toolbar-option cv-annotation-underline",icon:""},superscript:{className:"cv-annotation-toolbar-option cv-annotation-superscript",icon:""},subscript:{className:"cv-annotation-toolbar-option cv-annotation-subscript",icon:""}},list:{options:["unordered","ordered"],unordered:{className:"cv-annotation-toolbar-option cv-annotation-bullet-list",icon:""},ordered:{className:"cv-annotation-toolbar-option cv-annotation-number-list",icon:""}},link:{component:qt,options:["link"]}}}),o.a.createElement(nt,{error:n.error}))))})),Zt($t,tt.InteractionTypeId.Image,(function(t){var e=t.state,n=void 0===e?function(t){var e;return{url:(null===(e=t.data)||void 0===e?void 0:e.url)||"",caption:t.data.caption}}(t.interaction):e,r=t.setState,a=t.interaction,i=t.optionsPortalNode;Object(Ct.a)();var c=o.a.useRef(null);function u(t){t&&t[0]&&kt.a.onFileSelect(Ot.c.None,t,(function(t){X.a.renderCropper({src:t.src,alt:"",onClickCrop:l})}))}function l(e){var o=e.split(",")[1];G.a.post("".concat(t.imageApi,"v2/thumbnails/base64"),'"'.concat(o,'"'),{tokenName:"gateway"}).then((function(t){r(Object.assign(Object.assign({},n),{url:t.location}))})).catch((function(){return alert("Something went wrong while trying to upload image. Please try again.")}))}return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("div",{className:"form-group"},o.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},o.a.createElement("label",{className:"cv-interaction-field-label mb-0"},"Image"),o.a.createElement(et.b,{node:i})),n.url?o.a.createElement("div",{className:"text-center"},o.a.createElement("div",{className:"cv-uploaded-image-container"},o.a.createElement("img",{className:"img img-fluid",src:n.url,alt:n.caption}),o.a.createElement(rt.a,{className:"cv-remove-uploaded-image d-flex justify-content-center align-items-center",onClick:function(){r(Object.assign(Object.assign({},n),{url:""}))}},o.a.createElement("div",{className:"btn btn-link text-light"},"Remove")))):o.a.createElement(Tt,{onDropImage:u},o.a.createElement("div",{className:"cv-image-interaction-upload-container rounded py-4 text-center"},o.a.createElement("div",{className:"svg-container xlg mb-2"},o.a.createElement(Nt,null)),o.a.createElement("p",{className:"mb-0"},"Drag and drop an image file or"),o.a.createElement(rt.a,{type:"button",className:"text-underline d-inline-block",onClick:function(){c.current.value=null,c.current.click(null)}},"upload from your device"),o.a.createElement("input",{type:"file",autoComplete:"off",className:"file-select d-none",multiple:!1,accept:"image/jpg,image/jpeg,image/png",ref:c,onChange:function(t){return u(t.target.files)}}))),o.a.createElement(nt,{error:n.error})),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"image-caption"},"Caption ",o.a.createElement("span",{className:"text-muted"},"(optional)")),o.a.createElement("textarea",{id:"image-caption",className:"form-control",placeholder:"Caption your image",value:n.caption||a.data.caption||"",onChange:function(t){r(Object.assign(Object.assign({},n),{caption:t.target.value}))},rows:2})))})),Zt($t,tt.InteractionTypeId.MissingWord,(function(t){var e,n,r,a,i,c,u=t.state,l=void 0===u?(e=t.interaction,a=(null===(n=e.data)||void 0===n?void 0:n.sentence)||"",i=a.split(" ").filter(Boolean),c=i.map((function(t,e){return{text:t,order:e,selected:!1}})),null===(r=e.actionableItems)||void 0===r||r.forEach((function(t){var e=t.order,n=lt(i[e],t.name);i[e]=n,c[e].text=n,c[e].selected=!0})),{fullSentence:i.join(" "),sentence:a,preview:e.name,words:c}):u,s=t.setState,f=t.optionsPortalNode,d=!!l.sentence;return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("div",{className:"form-group"},o.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},o.a.createElement("label",{className:"cv-interaction-field-label mb-0",htmlFor:"missing-word-sentence"},"Sentence"),o.a.createElement(et.b,{node:f})),o.a.createElement("input",{id:"missing-word-sentence",className:"form-control",placeholder:"Enter your sentence here",value:l.fullSentence||"",onChange:function(t){var e=t.target.value,n=e.split(" ").filter(Boolean).map((function(t,e){return{text:t,order:e,selected:!1}}));s(Object.assign(Object.assign({},l),{fullSentence:e,sentence:ft(n),preview:st(n),words:n}))},autoComplete:"off"})),d&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{className:"cv-interaction-field-label"},"Select the missing word(s)"),o.a.createElement("ul",{className:"list-unstyled d-flex flex-wrap mx-n1 mb-n1"},l.words.map((function(t,e){var n;return(null===(n=ut(t.text))||void 0===n?void 0:n.trim())?o.a.createElement("li",{key:"".concat(e,"-").concat(t.text)},o.a.createElement(rt.a,{className:"rounded border p-2 mx-1 mb-1 cursor-pointer ".concat(t.selected?"bg-info text-white":"bg-white"),onClick:function(){return t=e,n=l.words.map((function(e){return e.order!==t?e:Object.assign(Object.assign({},e),{selected:!e.selected})})),void s(Object.assign(Object.assign({},l),{words:n,preview:st(n),sentence:ft(n)}));var t,n}},ut(t.text))):o.a.createElement(o.a.Fragment,{key:"".concat(e,"-").concat(t.text)})})))),o.a.createElement("div",null,o.a.createElement("label",{className:"cv-interaction-field-label"},"Preview"),o.a.createElement("p",null,l.preview))),o.a.createElement(nt,{error:l.error}))})),Zt($t,tt.InteractionTypeId.MultipleChoice,St),Zt($t,tt.InteractionTypeId.ShortAnswer,(function(t){var e=t.state,n=void 0===e?function(t){return{question:t.name,suggestedResponse:t.data.suggestedResponse||""}}(t.interaction):e,r=t.setState,a=t.interaction,i=t.optionsPortalNode,c=t.showFeedback;return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("div",{className:"form-group"},o.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},o.a.createElement("label",{className:"cv-interaction-field-label mb-0",htmlFor:"short-answer-question"},"Question"),o.a.createElement(et.b,{node:i})),o.a.createElement("input",{id:"short-answer-question",className:"form-control",onChange:function(t){r(Object.assign(Object.assign({},n),{question:t.target.value}))},value:n.question||a.data.text||"",placeholder:"Enter your question here",autoComplete:"off"}),o.a.createElement(nt,{error:n.error})),c&&o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"short-answer-suggested-response"},"Suggested Response ",o.a.createElement("span",{className:"text-muted"},"(optional)")," ",o.a.createElement(pt.a,{tooltipText:"Provide a suggested response for your students"})),o.a.createElement(dt.a,{id:"short-answer-suggested-response",className:"form-control",minRows:2,value:n.suggestedResponse||"",onChange:function(t){r(Object.assign(Object.assign({},n),{suggestedResponse:t.target.value}))},placeholder:"Give a suggested response for this question"})))})),Zt($t,tt.InteractionTypeId.TrueOrFalse,St),$t);var Qt=(Zt(Ht={},tt.InteractionTypeId.Annotation,(function(t){var e;return(null===(e=t.annotation)||void 0===e?void 0:e.trim())?null:"Please provide an annotation"})),Zt(Ht,tt.InteractionTypeId.Image,(function(t){return t.url?null:"Please upload an image"})),Zt(Ht,tt.InteractionTypeId.MissingWord,(function(t){var e;return(null===(e=t.sentence)||void 0===e?void 0:e.trim())?t.words.find((function(t){return t.selected}))?null:"Please select a missing word":"Please provide a sentence"})),Zt(Ht,tt.InteractionTypeId.MultipleChoice,xt),Zt(Ht,tt.InteractionTypeId.ShortAnswer,(function(t){var e;return(null===(e=t.question)||void 0===e?void 0:e.trim())?null:"Please provide a question"})),Zt(Ht,tt.InteractionTypeId.TrueOrFalse,xt),Ht);var Xt=(Zt(Vt={},tt.InteractionTypeId.Annotation,(function(t,e){var n;return Kt(this,void 0,void 0,Yt().mark((function r(){return Yt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.name="Annotation",e.data.annotation=null===(n=t.annotation)||void 0===n?void 0:n.trim(),e.actionableItems=[{name:"Answer"}],r.next=5,Q.saveInteraction(e);case 5:case"end":return r.stop()}}),r)})))})),Zt(Vt,tt.InteractionTypeId.Image,(function(t,e){var n,r;return _t(this,void 0,void 0,Pt().mark((function o(){return Pt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return e.data.url=t.url,e.name=(null===(n=t.caption)||void 0===n?void 0:n.trim())||"Image",e.data.caption=null===(r=t.caption)||void 0===r?void 0:r.trim(),e.actionableItems=[{name:"Answer"}],o.next=6,Q.saveInteraction(e);case 6:case"end":return o.stop()}}),o)})))})),Zt(Vt,tt.InteractionTypeId.MissingWord,(function(t,e){return it(this,void 0,void 0,at().mark((function n(){var r;return at().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.data.sentence=ft(t.words),e.name=t.preview,r=t.words.filter((function(t){return t.selected})),e.actionableItems=r.map((function(t){return{name:ut(t.text),order:t.order,isCorrect:!0}})),n.next=6,Q.saveInteraction(e);case 6:case"end":return n.stop()}}),n)})))})),Zt(Vt,tt.InteractionTypeId.MultipleChoice,It),Zt(Vt,tt.InteractionTypeId.ShortAnswer,(function(t,e){var n,r;return vt(this,void 0,void 0,ht().mark((function o(){return ht().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return e.name=null===(n=t.question)||void 0===n?void 0:n.trim(),e.data.suggestedResponse=null===(r=t.suggestedResponse)||void 0===r?void 0:r.trim(),e.actionableItems=[{name:"Answer"}],o.next=5,Q.saveInteraction(e);case 5:case"end":return o.stop()}}),o)})))})),Zt(Vt,tt.InteractionTypeId.TrueOrFalse,It),Vt);function te(t){return Xt[t]}var ee=n(1189),ne=n(1),re=["A","B","C","D"];function oe(t){var e=t.interaction,n=t.className,r=s.a.getTypeInfo(e.typeId),a=r.name,i=r.typeName,c="";switch(e.typeId){case tt.InteractionTypeId.Annotation:c=e.data.annotation;break;case tt.InteractionTypeId.Image:c=e.data.caption;break;case tt.InteractionTypeId.MissingWord:c=e.data.sentence.replace(/{([^{}]*)}/g,(function(){return"<u> </u>"}));break;case tt.InteractionTypeId.MultipleChoice:c=e.name,e.actionableItems.map((function(t,e){return c+="<br />".concat(re[e],": ").concat(t.name)}));break;case tt.InteractionTypeId.ShortAnswer:c=e.name;break;case tt.InteractionTypeId.TrueOrFalse:c="True or false: ".concat(e.name)}var u=e.typeId===tt.InteractionTypeId.Annotation||e.typeId===tt.InteractionTypeId.MissingWord||e.typeId===tt.InteractionTypeId.MultipleChoice;return o.a.createElement(ee.a,{title:a,text:c,html:u,className:"pr-2 ".concat(n||""),analyticsData:{id:e.interactiveId,type:i},analyticsOptions:{location:ne.LocationContext.InteractivePlayer,entity:ne.EntityType.Interactive,actionType:ne.UserAction.Click,descriptor:ne.ClickDescriptor.LaunchImmersiveReader}})}n(1360);function ae(t){var e=t.error;return t.error?o.a.createElement("p",{className:"mt-2 small text-danger"},e):o.a.createElement(o.a.Fragment,null)}var ie,ce,ue=n(1142);function le(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function se(){return ue.a.NotApplicable}function fe(t,e){var n=t.actionableItems.filter((function(t){return t.isCorrect}));return n.every((function(t){return!e(t.id)}))?ue.a.UnAnswered:n.every((function(t){var n;return t.name.trim().toLowerCase()===(null===(n=e(t.id))||void 0===n?void 0:n.trim().toLowerCase())}))?ue.a.Correct:ue.a.Incorrect}function de(t,e){return t.actionableItems.every((function(t){return!e(t.id)}))?ue.a.UnAnswered:t.actionableItems.filter((function(t){return t.isCorrect})).every((function(t){return e(t.id)===t.name}))?ue.a.Correct:ue.a.Incorrect}function pe(t,e){var n;return t.actionableItems.forEach((function(t){var r=e(t.id);n=r?r.status!==ie.Correct?r.status!==ie.Incorrect?ue.a.AwaitingMarking:ue.a.Incorrect:ue.a.Correct:ue.a.UnAnswered})),n}function me(t,e){return function(n){var r=e.attempts.find((function(e){return e.id===t.id}));return null==r?void 0:r.answers.find((function(t){return t.id===n}))}}function he(t,e){var n=me(t,e);return de(t,(function(t){var e=n(t);return null==e?void 0:e.text}))}!function(t){t[t.Incorrect=0]="Incorrect",t[t.Correct=1]="Correct",t[t.PendingReview=2]="PendingReview"}(ie||(ie={}));var ve=(le(ce={},tt.InteractionTypeId.Annotation,se),le(ce,tt.InteractionTypeId.Image,se),le(ce,tt.InteractionTypeId.MissingWord,(function(t,e){var n=me(t,e);return fe(t,(function(t){var e=n(t);return null==e?void 0:e.text}))})),le(ce,tt.InteractionTypeId.MultipleChoice,he),le(ce,tt.InteractionTypeId.ShortAnswer,(function(t,e){return pe(t,me(t,e))})),le(ce,tt.InteractionTypeId.TrueOrFalse,he),ce);var ye={notApplicable:se,awaitingMarking:function(){return ue.a.AwaitingMarking},isMissingWordCorrect:fe,isMultipleChoiceCorrect:de,isShortAnswerMarkedCorrect:pe,isInteractionCorrect:function(t,e){return(0,ve[t.typeId])(t,e)}};n(1361);function ge(t){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var be=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};var we=n(274),Ee=n(62),xe=n(21),Ie=n(388),Se=n(1362),ke=n.n(Se),Oe=["A","B","C","D"];function Ce(t){var e=1===t.interaction.actionableItems.filter((function(t){return t.isCorrect})).length;function n(e,n){t.onSelectAnswer&&t.onSelectAnswer(e,n)}return o.a.createElement(o.a.Fragment,null,t.interaction.actionableItems.map((function(r,a){var i=t.getSelectedAnswer(r.id);if(t.onlyShowSelectedAnswer&&!i)return o.a.createElement(o.a.Fragment,{key:a});var c=i?"bg-info text-white":t.unCheckedBackground,u=function(){return o.a.createElement(o.a.Fragment,null,Oe[a])};t.showFeedback&&(c=r.isCorrect?"bg-success text-white":"bg-danger text-white ".concat(ke.a.incorrect),t.hideFeedbackIcons||(u=function(){return o.a.createElement(o.a.Fragment,null,r.isCorrect?o.a.createElement(Ee.a,{size:Ee.b.Small,svgName:xe.b.Check}):o.a.createElement(Ee.a,{size:Ee.b.Small,svgName:xe.b.Close}))}));var l=t.showFeedback?{}:{role:"button",tabIndex:0,onKeyDown:function(t){return"Enter"===t.key&&n(r,!i)}};return o.a.createElement(o.a.Fragment,{key:a},o.a.createElement("input",{id:r.id,type:e?"radio":"checkbox",name:"multiple-choice",checked:!!i,onChange:function(){return n(r,!i)},disabled:t.showFeedback,hidden:!0,tabIndex:-1}),o.a.createElement("label",Object.assign({className:"\n d-block\n rounded-lg\n shadow-sm\n mb-2\n ".concat("sm"===t.size?"p-2":"p-3","\n d-flex\n justify-content-between\n position-relative\n ").concat(t.showFeedback?"":"cursor-pointer","\n ").concat(ke.a.answer,"\n ").concat(c),key:a,htmlFor:r.id},l),o.a.createElement("span",{className:"d-inline-block mr-3 cv-multiple-choice-bullet"},o.a.createElement(u,null)),o.a.createElement("span",{className:"flex-grow-1 pr-4"},r.name),!t.onlyShowSelectedAnswer&&o.a.createElement("span",{className:ke.a.avatarContainer},i&&o.a.createElement(Ie.a,{imageCdnUrl:t.imageApi,initials:t.userInitials,imageUrl:t.userAvatar}))))})))}Ce.defaultProps={size:"lg",unCheckedBackground:"bg-white"};n(1363);function Ne(t){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function je(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Le=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};var Te=n(1364),Ae=n.n(Te);function Pe(t){function e(e){t.onSelectAnswer&&t.onSelectAnswer(e)}return o.a.createElement("div",{className:"d-flex ".concat(t.className?t.className:""," ").concat("sm"===t.size?"mx-n1":"mx-n2")},t.interaction.actionableItems.map((function(n,r){var a=t.getSelectedAnswer(n.id),i=a?"bg-info text-white":t.unCheckedBackground,c=function(){return o.a.createElement(o.a.Fragment,null)};t.showFeedback&&(i=n.isCorrect?"bg-success text-white":"bg-danger text-white ".concat(Ae.a.incorrect),t.hideFeedbackIcons||(c=function(){return o.a.createElement(o.a.Fragment,null,n.isCorrect?o.a.createElement(Ee.a,{size:Ee.b.Small,svgName:xe.b.Check}):o.a.createElement(Ee.a,{size:Ee.b.Small,svgName:xe.b.Close}))}));var u=t.showFeedback?{}:{role:"button",tabIndex:0,onKeyDown:function(t){return"Enter"===t.key&&e(n)}};return o.a.createElement("label",Object.assign({key:r,htmlFor:n.id,className:"\n d-inline-block\n rounded-lg\n shadow-sm\n my-0\n position-relative\n overflow-hidden\n ".concat("sm"===t.size?"p-4 mx-1 h5":"p-5 mx-2 h4","\n ").concat(t.showFeedback?"":"cursor-pointer","\n ").concat(i)},u),o.a.createElement("input",{id:n.id,type:"radio",name:"multiple-choice",checked:!!a,onChange:function(){return e(n)},disabled:t.showFeedback,hidden:!0}),n.name,o.a.createElement("span",{className:"position-absolute p-2 ".concat(Ae.a.feedback)},o.a.createElement(c,null)),o.a.createElement("span",{className:"".concat(Ae.a.avatarContainer).concat("sm"===t.size?" ".concat(Ae.a.avatarContainerSmall):"")},a&&o.a.createElement(Ie.a,{imageCdnUrl:t.imageApi,initials:t.userInitials,imageUrl:t.userAvatar})))})))}Pe.defaultProps={size:"lg",unCheckedBackground:"bg-white"};var _e,Fe,Me,Ue,Re;function De(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ge=function(){return!0},qe=function(){return!1},Be=(De(_e={},tt.InteractionTypeId.Annotation,qe),De(_e,tt.InteractionTypeId.Image,qe),De(_e,tt.InteractionTypeId.MissingWord,Ge),De(_e,tt.InteractionTypeId.MultipleChoice,Ge),De(_e,tt.InteractionTypeId.ShortAnswer,(function(t){return!!t.data.suggestedResponse})),De(_e,tt.InteractionTypeId.TrueOrFalse,Ge),_e);function We(t){return Be[t]}var ze=(De(Fe={},tt.InteractionTypeId.Annotation,(function(t){var e=t.interaction.data.annotation.replace(/<(a)(.*?)>/g,'<$1 target="_blank" $2>');return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("div",{className:"mb-2",dangerouslySetInnerHTML:{__html:e}}),o.a.createElement(oe,{interaction:t.interaction}))})),De(Fe,tt.InteractionTypeId.Image,(function(t){var e=t.interaction,n=t.recalculateScroll,r=o.a.useCallback((function(t){t&&(t.onload=function(){n()})}),[]);return o.a.createElement("div",{className:"cv-interactive-question cv-image-interactive"},o.a.createElement("div",{className:"cv-image-container text-center"},o.a.createElement("img",{className:"img-fluid shadow-lg",src:e.data.url,ref:r}),e.data.caption&&o.a.createElement(o.a.Fragment,null,o.a.createElement("p",{className:"mt-3"},e.data.caption,o.a.createElement(oe,{interaction:t.interaction,className:"ml-2"})))))})),De(Fe,tt.InteractionTypeId.MissingWord,(function(t){var e=t.state,n=t.setState,r=t.interaction,a=t.showFeedback,i=r.data.sentence.replace(/{([^{}]*)}/g,(function(t,e){return"{".concat("cv-missing-word-").concat(e,"}")})).split(/{([^{}]*)}/g);function c(t,r){if(r.stopPropagation(),r.target.value){var o,a,i;n((o={},a=t.id,i=r.target.value,a in o?Object.defineProperty(o,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[a]=i,o))}else{var c=e,u=t.id,l=(c[u],be(c,["symbol"===ge(u)?u:u+""]));n(l,!0)}}return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("div",{className:"mb-2"},i.map((function(t,n){var i;if(!t.startsWith("cv-missing-word-"))return t;var u=t.replace("cv-missing-word-",""),l=r.actionableItems.find((function(t){return t.order.toString()===u}));if(l){var s,f,d=e[l.id]||"",p=(s=l.name,(f=document.createElement("canvas").getContext("2d")).font="17pt arial",f.measureText(s).width);if(a){var m=l.name.toLowerCase().toString()===(null===(i=e[l.id])||void 0===i?void 0:i.toLowerCase().toString());return o.a.createElement(o.a.Fragment,{key:n},!m&&o.a.createElement(o.a.Fragment,null,o.a.createElement("del",{className:"text-danger"},d)," "),o.a.createElement("span",{className:"text-success"},l.name))}return o.a.createElement("span",{className:"cv-missing-word-input-container",key:n},o.a.createElement("input",{style:{width:p/16+"rem"},onChange:function(t){return c(l,t)},value:d,disabled:!!e.submitted,className:"cv-missing-word-input",autoComplete:"off"}))}}))),o.a.createElement(ae,{error:e.error}),o.a.createElement(oe,{interaction:t.interaction}))})),De(Fe,tt.InteractionTypeId.MultipleChoice,(function(t){var e=t.state,n=t.setState,r=t.interaction,a=t.showFeedback,i=t.imageApi,c=t.currentUser,u=1===r.actionableItems.filter((function(t){return t.isCorrect})).length;return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("p",null,r.name,o.a.createElement(oe,{interaction:t.interaction,className:"ml-2"})),!u&&o.a.createElement("p",{className:"text-muted"},o.a.createElement("small",null,"This question has multiple correct answers")),o.a.createElement(Ce,{interaction:r,showFeedback:a,onSelectAnswer:function(t,r){if(!e.submitted)if(u)n(je({},t.id,t.name),!0);else if(r)n(je({},t.id,t.name));else{var o=e,a=t.id,i=(o[a],Le(o,["symbol"===Ne(a)?a:a+""]));n(i,!0)}},getSelectedAnswer:function(t){return e[t]},imageApi:i.toString(),userInitials:we.a.getInitials(c.givenName,c.familyName),userAvatar:c.avatar}),o.a.createElement(ae,{error:e.error}))})),De(Fe,tt.InteractionTypeId.ShortAnswer,(function(t){var e=t.interaction,n=t.state,r=t.setState;return t.showFeedback?o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("p",null,e.name),o.a.createElement("label",{className:"cv-interaction-field-label"},"My answer"),o.a.createElement("p",null,n[e.actionableItems[0].id]),e.data.suggestedResponse&&o.a.createElement(o.a.Fragment,null,o.a.createElement("label",{className:"cv-interaction-field-label mt-1"},"Teacher's suggested answer"),o.a.createElement("p",null,e.data.suggestedResponse))):o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("p",null,e.name,o.a.createElement(oe,{interaction:e,className:"ml-2"})),o.a.createElement(dt.a,{id:"short-answer-answer",className:"form-control mt-2",minRows:3,value:n[e.actionableItems[0].id]||"",onChange:function(t){var o,a,i;r(Object.assign(Object.assign({},n),(o={},a=e.actionableItems[0].id,i=t.target.value,a in o?Object.defineProperty(o,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[a]=i,o)))},disabled:!!n.submitted}),o.a.createElement(ae,{error:n.error}))})),De(Fe,tt.InteractionTypeId.TrueOrFalse,(function(t){var e=t.state,n=t.setState,r=t.interaction,a=t.showFeedback,i=t.imageApi,c=t.currentUser,u=r.actionableItems.find((function(t){return t.isCorrect}));return o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("p",null,r.name,o.a.createElement(oe,{interaction:t.interaction,className:"ml-2"})),o.a.createElement(Pe,{className:"justify-content-center",interaction:r,showFeedback:a,onSelectAnswer:function(t){var r,o,a;e.submitted||n((r={},o=t.id,a=t.name,o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a,r),!0)},getSelectedAnswer:function(t){return e[t]},imageApi:i.toString(),userInitials:we.a.getInitials(c.givenName,c.familyName),userAvatar:c.avatar}),a&&o.a.createElement("div",{className:"text-center px-5 mt-3"},o.a.createElement("p",null,"The answer is ",o.a.createElement("strong",null,u.name)),r.data.feedback&&o.a.createElement("p",null,r.data.feedback)),o.a.createElement(ae,{error:e.error}))})),Fe);function Ye(){return""}var $e=(De(Me={},tt.InteractionTypeId.Annotation,Ye),De(Me,tt.InteractionTypeId.Image,Ye),De(Me,tt.InteractionTypeId.MissingWord,(function(t,e){var n=Object.keys(t).filter((function(e){var n;return!!(null===(n=t[e])||void 0===n?void 0:n.trim())})).length;return n?n!==e.actionableItems.length?"Please fill in all of the missing words":null:"Please fill in the missing words"})),De(Me,tt.InteractionTypeId.MultipleChoice,(function(t){return Object.keys(t).length?null:"Please choose an answer"})),De(Me,tt.InteractionTypeId.ShortAnswer,(function(t){return Object.keys(t).filter((function(e){var n;return!!(null===(n=t[e])||void 0===n?void 0:n.trim())})).length?null:"Please provide an answer to the question"})),De(Me,tt.InteractionTypeId.TrueOrFalse,(function(t){return Object.keys(t).length?null:"Please choose an answer"})),Me);var He=(De(Ue={},tt.InteractionTypeId.Annotation,null),De(Ue,tt.InteractionTypeId.Image,null),De(Ue,tt.InteractionTypeId.MissingWord,(function(t,e,n){return n(e.id,Object.keys(t).map((function(e){return{actionableItemId:e,value:t[e].toString()}})))})),De(Ue,tt.InteractionTypeId.MultipleChoice,(function(t,e,n){return n(e.id,Object.keys(t).map((function(e){return{actionableItemId:e,value:t[e]}})))})),De(Ue,tt.InteractionTypeId.ShortAnswer,(function(t,e,n){return n(e.id,Object.keys(t).map((function(e){return{actionableItemId:e,value:t[e].toString()}})))})),De(Ue,tt.InteractionTypeId.TrueOrFalse,(function(t,e,n){return n(e.id,Object.keys(t).map((function(e){return{actionableItemId:e,value:t[e]}})))})),Ue);function Ve(t){return He[t]}var Ke=(De(Re={},tt.InteractionTypeId.Annotation,ye.notApplicable),De(Re,tt.InteractionTypeId.Image,ye.notApplicable),De(Re,tt.InteractionTypeId.MissingWord,(function(t,e){return ye.isMissingWordCorrect(e,(function(e){return t[e]}))})),De(Re,tt.InteractionTypeId.MultipleChoice,(function(t,e){return ye.isMultipleChoiceCorrect(e,(function(e){return t[e]}))})),De(Re,tt.InteractionTypeId.ShortAnswer,ye.awaitingMarking),De(Re,tt.InteractionTypeId.TrueOrFalse,(function(t,e){return e.actionableItems.filter((function(t){return t.isCorrect})).every((function(e){return t[e.id]===e.name}))?ue.a.Correct:ue.a.Incorrect})),Re);function Ze(t){return Ke[t]}function Je(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qe={interactions:{},timepoints:{}};function Xe(t,e){return"interaction"===e.type?{timepoints:t.timepoints,interactions:Object.assign(Object.assign({},t.interactions),Je({},e.id,e.value))}:"timepoint"===e.type?{interactions:t.interactions,timepoints:Object.assign(Object.assign({},t.timepoints),Je({},e.id,e.value))}:void 0}function tn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return en(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return en(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function en(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var nn={interactionIndex:0},rn=function(t){var e=t.mode,n=t.timepoint,r=t.latestSession,a=e===l.InteractiveMode.Create,i=tn(o.a.useReducer(Xe,null,(function(){return function(t){return t?{timepoints:{},interactions:t.actions.reduce((function(t,e){var n;return t[e.interactionId]=Object.assign(Object.assign({},t[e.interactionId]),(Je(n={},e.actionableItemId,e.data),Je(n,"submitted",!0),n)),t}),{})}:Qe}(r)})),2),c=i[0],u=i[1],s=h(null==n?void 0:n.id),f=null==n?void 0:n.interactions[s.interactionIndex],d="number"==typeof s.nextInteractionIndex?null==n?void 0:n.interactions[s.nextInteractionIndex]:null,p=v(null==f?void 0:f.id),m=v(null==d?void 0:d.id);function h(t){return t&&c.timepoints[t]||nn}function v(t){if(!t)return{};var e=c.interactions[t];return e||a?e:{}}function y(t,e,n){var r=v(t);u({type:"interaction",id:t,value:Object.assign(Object.assign({},n?{}:r),e)})}return{state:c,interaction:f,interactionState:p,timepointState:s,nextInteraction:d,nextInteractionState:m,getTimepointState:h,getInteractionState:v,updateTimepointState:function(t,e){var n=h(t);u({type:"timepoint",id:t,value:Object.assign(Object.assign({},n),e)})},updateInteractionState:y,clearTimepointState:function(t){u({type:"timepoint",id:t,value:void 0})},clearInteractionState:function(t){u({type:"interaction",id:t,value:void 0})},userUpdateInteractionState:function(t,e){y(f.id,Object.assign(Object.assign({},t),{hasChanges:!0,error:null}),e)}}};function on(t){return(on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function an(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */an=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==on(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}var cn=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},un=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},ln=!1,sn=function(t){var e=t.interactive,n=t.timepoint,r=t.player,a=t.mode,i=t.resultsService,c=t.latestSession,u=t.analyticsService,f=un(t,["interactive","timepoint","player","mode","resultsService","latestSession","analyticsService"]),d=rn({mode:a,timepoint:n,latestSession:c}),p=d.state,m=d.interaction,h=d.interactionState,v=d.timepointState,y=d.nextInteraction,g=d.nextInteractionState,b=un(d,["state","interaction","interactionState","timepointState","nextInteraction","nextInteractionState"]),w=a===l.InteractiveMode.Create;function E(t){for(var n=0;n<e.timepoints.length;){for(var r=e.timepoints[n],o=0;o<r.interactions.length;){var a=r.interactions[o];if(a.id===t)return{localTimepoint:r,localInteraction:a};o++}n++}return{localInteraction:null,localTimepoint:null}}function x(t){var n=s.a.getTypeInfo(t.typeId);return{id:R(t.id)?void 0:t.id,typeId:t.typeId,type:n.typeName,interactiveId:e.id,timepointId:R(t.timepointId)?void 0:t.timepointId,order:t.order}}function I(t){return cn(this,void 0,void 0,an().mark((function n(){var r,o,a,i,c,l,s;return an().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=E(t),o=r.localInteraction,a=r.localTimepoint,o&&a){n.next=3;break}throw new Error("Could not find the interaction and timepoint for the interactionId ".concat(t));case 3:if(i=x(o),R(o.id)){n.next=10;break}return n.next=7,Q.deleteInteraction(o.id);case 7:u.logUserAction(i,{actionType:ne.UserAction.Delete,entity:ne.EntityType.Interaction,workflowPhase:ne.WorkflowPhase.Complete}),n.next=11;break;case 10:u.logUserAction(i,{actionType:ne.UserAction.Create,entity:ne.EntityType.Interaction,workflowPhase:ne.WorkflowPhase.Discard});case 11:if(c=a.interactions.findIndex((function(t){return t.id===o.id})),a.interactions.splice(c,1),b.clearInteractionState(o.id),l=b.getTimepointState(a.id),c<l.interactionIndex&&b.updateTimepointState(a.id,{interactionIndex:l.interactionIndex-1}),!(a.interactions.length>0)){n.next=18;break}return n.abrupt("return");case 18:if(R(a.id)){n.next=21;break}return n.next=21,Q.deleteTimepoint(a.id);case 21:s=e.timepoints.findIndex((function(t){return t.id===a.id})),e.timepoints.splice(s,1),f.removeCue(a.visibleAt/1e3),b.clearTimepointState(a.id);case 25:case"end":return n.stop()}}),n)})))}function S(t){if(m){var e=R(m.id);if(e||(null==h?void 0:h.hasChanges)||(null==v?void 0:v.hasChanges)){X.a.render(o.a.createElement("p",null,"Do you want to discard your changes?"),{title:"Unsaved changes",success:function(){(null==v?void 0:v.hasChanges)&&j(!0),e?I(m.id):b.clearInteractionState(m.id),t&&t()},buttons:[{variant:"link",buttonText:"Cancel"},{variant:"danger",success:!0,buttonText:"Discard"}]})}else t&&t()}else t&&t()}function k(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(w)S((function(){b.updateTimepointState(n.id,{interactionIndex:t})}));else{var r=function(){b.updateTimepointState(n.id,{nextInteractionIndex:t}),window.requestAnimationFrame((function(){b.updateTimepointState(n.id,{nextInteractionIndex:t,slideIn:!0}),window.setTimeout((function(){b.updateTimepointState(n.id,{interactionIndex:t,nextInteractionIndex:null,slideIn:null})}),400)}))};e?S(r):r()}}function O(){v.interactionIndex+1>=n.interactions.length?f.continueInteractive():k(v.interactionIndex+1,!1)}function C(){e.timepoints.sort((function(t,e){return t.visibleAt>e.visibleAt?1:e.visibleAt>t.visibleAt?-1:0}))}function N(){k(n.interactions.length)}function j(t){(null==v?void 0:v.hasChanges)&&(t&&f.moveTimepoint(v.originalVisibleAt),b.updateTimepointState(n.id,{hasChanges:void 0,originalVisibleAt:void 0}),ln=!1)}return{state:p,interaction:m,interactionState:h,timepointState:v,nextInteraction:y,nextInteractionState:g,skip:O,cancel:function(){return cn(this,void 0,void 0,an().mark((function t(){return an().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(null==h?void 0:h.hasChanges)){t.next=3;break}return S(),t.abrupt("return");case 3:return t.next=5,I(m.id);case 5:f.setOpen(!0);case 6:case"end":return t.stop()}}),t)})))},addAnotherQuestion:N,goToTimepoint:function(t,n){var o=function(t){for(var n=0;n<e.timepoints.length;){var r=e.timepoints[n];if(r.id===t)return r;n++}return null}(t),a=o.interactions.find((function(t){return t.id.toString()===n.toString()}));r.currentTime(o.visibleAt/1e3),b.updateTimepointState(o.id,{interactionIndex:o.interactions.indexOf(a)})},discardChanges:S,changeIndex:k,promptDelete:function(t){var e=x(E(t).localInteraction);u.logUserAction(e,{actionType:ne.UserAction.Delete,entity:ne.EntityType.Interaction,workflowPhase:ne.WorkflowPhase.Start}),X.a.render(o.a.createElement("p",null,"Are you sure you want to delete this question?"),{title:"Delete question",success:function(){return I(t)},buttons:[{variant:"link",buttonText:"Cancel"},{variant:"danger",success:!0,buttonText:"Delete question"}]})},showTypeSelector:function(){r.pause(),f.setOpen(!0),n&&N()},cancelTypeSelector:function(){n?k(v.interactionIndex-1):(f.setOpen(!1),r.play())},deleteInteraction:I,saveInteraction:function(){return cn(this,void 0,void 0,an().mark((function t(){var e,r,o,a,i,c;return an().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w){t.next=2;break}throw new Error("Should not be calling onClickSave while viewing an interactive");case 2:if(l=m.typeId,!(e=(0,Qt[l])(b.getInteractionState(m.id),m))){t.next=7;break}return b.updateInteractionState(m.id,{error:e}),t.abrupt("return");case 7:if(b.updateInteractionState(m.id,{spinner:!0}),!R(n.id)){t.next=15;break}return r=n.id,t.next=12,Q.saveTimepoint(n);case 12:f.updateCue(r,n.id),b.clearTimepointState(r),(null==v?void 0:v.hasChanges)&&(C(),j());case 15:return m.timepointId=n.id,o=m.id,a=te(m.typeId),t.next=20,a(b.getInteractionState(m.id),m);case 20:b.clearInteractionState(o),i=R(o),c=x(m),u.logUserAction(c,{actionType:i?ne.UserAction.Create:ne.UserAction.Edit,entity:ne.EntityType.Interaction,workflowPhase:i?ne.WorkflowPhase.Complete:ne.WorkflowPhase.Save});case 24:case"end":return t.stop()}var l}),t)})))},addInteraction:function(t){var o;r.pause();var a=(null==n?void 0:n.id)||"new_".concat(Math.round(Math.random()*Number.MAX_SAFE_INTEGER)),i={id:"new_".concat(Math.round(Math.random()*Number.MAX_SAFE_INTEGER)),timepointId:a,typeId:t,order:(null===(o=null==n?void 0:n.interactions)||void 0===o?void 0:o.length)||0,interactiveId:e.id,data:{}},c=x(i);if(u.logUserAction(c,{actionType:ne.UserAction.Create,entity:ne.EntityType.Interaction,workflowPhase:ne.WorkflowPhase.Start}),n)return n.interactions.push(i),void k(v.interactionIndex);var l=r.currentTime();e.timepoints||(e.timepoints=[]),e.timepoints.push({id:a,visibleAt:1e3*l,interactiveId:e.id,shouldPause:1,interactions:[i]}),C(),f.addCue(a)},submitInteractionAnswer:function(){return cn(this,void 0,void 0,an().mark((function t(){var r,o,c,s,d;return an().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a===l.InteractiveMode.View){t.next=2;break}throw new Error("Should not be calling onClickSubmit while creating an interactive");case 2:if(!h.submitted){t.next=8;break}if(!(v.interactionIndex>=n.interactions.length)){t.next=6;break}return f.continueInteractive(),t.abrupt("return");case 6:return k(v.interactionIndex+1),t.abrupt("return");case 8:if(r=D(h),p=m.typeId,!(o=(0,$e[p])(r,m))){t.next=14;break}return b.updateInteractionState(m.id,{error:o}),t.abrupt("return");case 14:if(!i||!h.hasChanges){t.next=22;break}if(c=Ve(m.typeId),b.updateInteractionState(m.id,{spinner:!0}),!c){t.next=22;break}return t.next=20,c(r,m,i.save);case 20:s=x(m),u.logUserAction(s,{actionType:ne.UserAction.Answer,entity:ne.EntityType.Interaction});case 22:if(b.updateInteractionState(m.id,{submitted:!0,error:null,hasChanges:!1,spinner:!1}),e.immediateFeedback){t.next=26;break}return O(),t.abrupt("return");case 26:d=We(m.typeId),d(m)||O();case 29:case"end":return t.stop()}var p}),t)})))},userUpdateInteractionState:b.userUpdateInteractionState,updateTimepointTime:function(t){var o=r.duration(),a=function(t){for(var r=n.visibleAt+1e3*t,o=t>0,a=0;a<e.timepoints.length;a++){var i=e.timepoints[a];r<i.visibleAt-1e3||r>i.visibleAt+1e3||(r=o?i.visibleAt+1001:i.visibleAt-1001,a=0)}return r}(t);if(!(a/1e3>o||a<0)){var i=n.visibleAt;ln||(ln=!0,b.updateTimepointState(n.id,{originalVisibleAt:i,hasChanges:!0})),f.moveTimepoint(a)}},saveTimepoint:function(){return cn(this,void 0,void 0,an().mark((function t(){return an().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!R(n.id)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Q.updateTimepoint(n);case 4:C(),j();case 6:case"end":return t.stop()}}),t)})))},clearTimepointTimeState:j,reOrderQuestions:function(t){return cn(this,void 0,void 0,an().mark((function e(){var r,o;return an().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=7;break}return e.next=4,Q.saveInteraction(Object.assign(Object.assign({},t[r]),{order:r}));case 4:r++,e.next=1;break;case 7:o=n.interactions[v.interactionIndex],n.interactions=t,b.updateTimepointState(n.id,{interactionIndex:t.indexOf(o)});case 10:case"end":return e.stop()}}),e)})))}}},fn=n(1365),dn=n.n(fn);function pn(t){var e="".concat(t.className," ").concat(dn.a.iconButton);t.children?e+=" ".concat(dn.a.iconWithText):e+=" ".concat(dn.a.iconOnly);var n=o.a.createElement(Ee.a,{svgName:t.svgName,className:dn.a.svg});return o.a.createElement(rt.a,{className:e,onClick:t.onClick},n,t.children)}function mn(t){var e=t.isCreate,n=t.open,r=t.showTypeSelector;return!e||n?o.a.createElement(o.a.Fragment,null):o.a.createElement(pn,{className:"btn btn-outline-dark cv-add-question",onClick:r,svgName:xe.b.Plus},"Add question")}var hn=n(1284),vn=n(409),yn=n(1208);function gn(t){return o.a.createElement("div",{className:"my-5 text-center"},o.a.createElement("h2",{className:"h3"},"Select an interaction to get started"),o.a.createElement("p",{className:"mb-0"},"Choose a point in the video and add a question to interact and engage your students."),!(!t.supportSiteUrl||!t.currentUser)&&o.a.createElement("a",{href:vn.a.getArticle(t.supportSiteUrl.toString(),yn.a.MakeInteractive,t.currentUser.countryCode,"articles"),target:"_blank",className:"btn btn-link text-info"},"How do I make interactives?"))}function bn(t){var e=t.isCreate,n=t.interactive,r=t.interaction,a=t.portalNode,i=t.goToTimepoint,c=t.promptDelete,u=t.supportSiteUrl,l=t.currentUser;if(!a)return o.a.createElement(o.a.Fragment,null);var s=n.timepoints.reduce((function(t,e){return t+e.interactions.length}),0);return o.a.createElement(et.a,{node:a},s?o.a.createElement(o.a.Fragment,null,o.a.createElement("h2",{className:"h4 mt-3"},"Question List (",s,")"),o.a.createElement(hn.a,{interactive:n,maxHeight:300,goToTimepoint:i,selectedInteractionId:null==r?void 0:r.id,onClickDelete:e?c:void 0})):e?o.a.createElement(gn,{currentUser:l,supportSiteUrl:u}):o.a.createElement(o.a.Fragment,null))}var wn=n(1548);function En(t,e){if(e===l.InteractiveMode.Create)return function(t){return Jt[t]}(t);if(e===l.InteractiveMode.View)return function(t){return ze[t]}(t);throw new Error("Cannot find components for the mode ".concat(e))}var xn=n(287);n(1366);function In(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Sn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kn=[tt.InteractionTypeId.MissingWord,tt.InteractionTypeId.MultipleChoice,tt.InteractionTypeId.TrueOrFalse,tt.InteractionTypeId.ShortAnswer,tt.InteractionTypeId.Image,tt.InteractionTypeId.Annotation];function On(t){var e=t.addInteraction,n=t.cancelTypeSelector,r=t.player,a=t.timepoint,i=t.open,c=t.isCreate,u=t.interaction,l=In(o.a.useState(Object(xn.a)(r.currentTime()||0)),2),f=l[0],d=l[1];return o.a.useEffect((function(){var t=function(){d(Object(xn.a)(r.currentTime()))};return r.on("timeupdate",t),function(){return r.off("timeupdate",t)}}),[]),u||!c?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{className:"d-flex align-items-center justify-content-center h-100"},o.a.createElement("div",{className:"cv-interactive-type-selector d-flex flex-wrap justify-content-center align-items-center"},o.a.createElement("div",{className:"text-center font-weight-bold w-100 text-body mb-3 cv-add-question-copy"},a?"Add another question at:":"Add a question at:"," ",f),kn.map((function(t,n){var r=s.a.getTypeInfo(t),a=r.name,i=r.bgClassName,c=r.Svg;return o.a.createElement(rt.a,{key:n,className:"cv-type-selector rounded py-2 m-1 ".concat(i),onClick:function(){return e(t)}},o.a.createElement("span",{className:"cv-create-type-icon mb-1"},o.a.createElement(c,null)),o.a.createElement("div",{className:"d-flex align-items-center justify-content-center cv-interaction-type-name px-1"},a))})),(a||i)&&o.a.createElement("div",{className:"text-center w-100 mt-2 ".concat(a?"":"cv-adding-first-cancel")},o.a.createElement(rt.a,{className:"btn btn-link",onClick:n},"Cancel"))))}function Cn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Nn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function jn(t){var e=t.typeId,n=t.currentIndex,r=t.numberOfInteractions,a=t.changeIndex,i=t.player,c=Cn(o.a.useState(Object(xn.a)(i.currentTime()||0)),2),u=c[0],l=c[1];o.a.useEffect((function(){var t=function(){l(Object(xn.a)(i.currentTime()))};return i.on("timeupdate",t),function(){return i.off("timeupdate",t)}}),[]);var f=s.a.getTypeInfo(e),d=f.name,p=f.bgClassName,m=n<r-1;var h=n>0;return o.a.createElement("div",{className:"text-center d-flex justify-content-between align-items-center p-1 ".concat(p)},o.a.createElement(rt.a,{onClick:function(){h&&a(n-1)},className:h?"":"invisible"},o.a.createElement(Ee.a,{size:Ee.b.Medium,svgName:xe.b.ChevronLeft})),o.a.createElement("div",null,o.a.createElement("div",{className:"h6 mb-0"},d),r>1&&o.a.createElement("div",null,n+1," of ",r," at ",u)),o.a.createElement(rt.a,{onClick:function(){m&&a(n+1)},className:m?"":"invisible"},o.a.createElement(Ee.a,{size:Ee.b.Medium,svgName:xe.b.ChevronRight})))}n(1367);function Ln(t){var e=t.typeId,n=s.a.getTypeInfo(e),r=n.name,a=n.prompt,i=n.bgClassName,c=n.Svg;return o.a.createElement("div",{className:"text-center text-body d-flex justify-content-between align-items-center px-3 pt-3"},o.a.createElement("div",{className:"d-flex align-items-center"},o.a.createElement("span",{className:"cv-interaction-icon rounded my-1 text-white ".concat(i)},o.a.createElement(c,null)),o.a.createElement("span",{className:"text-left flex-grow-1"},o.a.createElement("div",{className:"h5 ".concat(a?"":"mb-0")},o.a.createElement("strong",null,r)),a&&o.a.createElement("div",{className:"h6 mb-0"},a))))}function Tn(t){var e=t.isCreate,n=t.interaction,r=t.player,a=t.changeIndex,i=t.timepointState,c=t.timepoint;return e?o.a.createElement(jn,{typeId:n.typeId,changeIndex:a,player:r,currentIndex:i.interactionIndex,numberOfInteractions:c.interactions.length}):o.a.createElement(Ln,{typeId:n.typeId})}var An=n(33);function Pn(t){var e=t.interaction,n=t.interactionState,o=t.onClickContinue,a=t.onClickSave,i=t.onClickCancel,c=t.onClickAddAnother,u=t.onClickDiscard,l=R(e.id),s=!!(null==n?void 0:n.hasChanges),f=!!(null==n?void 0:n.spinner);return r.createElement("div",{className:"cv-timpoint-button-container"},l?r.createElement(rt.a,{className:"btn btn-link",onClick:i},"Cancel"):s?r.createElement(rt.a,{className:"btn btn-link",onClick:u},"Discard"):r.createElement(rt.a,{className:"btn btn-link",onClick:c},"Add another question"),f?r.createElement(rt.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},r.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):l?s?r.createElement(rt.a,{className:"btn btn-dark ml-2",onClick:a},"Save"):r.createElement(rt.a,{className:"btn btn-dark ml-2 disabled",onClick:function(){}},"Save"):s?r.createElement(rt.a,{className:"btn btn-dark ml-2",onClick:a},"Save"):r.createElement(pn,{className:"btn btn-dark ml-2",onClick:o,svgName:xe.b.Play},"Continue"))}function _n(t){var e=t.typeId,n=t.interactionState,o=t.onClickSkip,a=t.numberOfInteractions,i=t.currentIndex,c=t.changeIndex,u=!!(null==n?void 0:n.submitted),l=!!(null==n?void 0:n.hasChanges),s=!!(null==n?void 0:n.spinner),f=!!Ve(e),d=i<a-1;function p(){d&&c(i+1)}var m=i>0;function h(){l&&t.onClickSubmit()}return r.createElement("div",{className:"cv-timpoint-button-container flex-wrap"},!u&&f&&r.createElement(rt.a,{className:"btn btn-link",onClick:o},"Come back later"),a>1&&i>0&&r.createElement(pn,{className:"btn btn-dark ml-2 ".concat(m?"":"disabled"),onClick:function(){m&&c(i-1)},svgName:xe.b.ChevronUp}),s?r.createElement(rt.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},r.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):u||!f?1===a||i===a-1?r.createElement(pn,{className:"btn btn-dark ml-2",onClick:o,svgName:xe.b.Play},"Continue"):r.createElement(rt.a,{className:"btn btn-dark ml-2 ".concat(d?"":"disabled"),onClick:p},"Next"):r.createElement(rt.a,{className:"btn btn-dark ml-2 ".concat(l?"":"disabled"),onClick:h},"Save"))}function Fn(t){var e=t.isCreate,n=t.interaction,r=t.interactionState,a=t.continueInteractive,i=t.saveInteraction,c=t.cancel,u=t.addAnotherQuestion,l=t.discardChanges,s=t.submitInteractionAnswer,f=t.skip,d=t.changeIndex,p=t.timepoint,m=t.currentIndex;return o.a.createElement(o.a.Fragment,null,e?o.a.createElement(Pn,{interaction:n,interactionState:r,onClickContinue:a,onClickSave:i,onClickCancel:c,onClickAddAnother:u,onClickDiscard:function(){return l()}}):o.a.createElement(_n,{typeId:n.typeId,interactionState:r,onClickSubmit:s,onClickSkip:f,changeIndex:d,currentIndex:m,numberOfInteractions:p.interactions.length}))}var Mn=n(1111);function Un(t){var e=t.timepoint,n=t.interaction,r=t.promptDelete,a=t.optionsPortalNode,i=t.setView;if(!n)return o.a.createElement(o.a.Fragment,null);var c=[];if(c.push({label:"Move time point",onClick:function(){return i("move")}}),e.interactions.length>1){var u=R(n.id);c.push({label:"Re-order questions",onClick:function(){return i("reorder")},className:u?"disabled":""})}return c.push({label:"Delete",onClick:function(){return r(n.id)},className:"text-danger"}),o.a.createElement(et.a,{node:a},!!n&&o.a.createElement(Mn.a,{actions:c}))}n(1368),n(1369);function Rn(t){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Dn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Rn(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Gn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return qn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Bn=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},Wn=null,zn=0,Yn=1;function $n(t){var e=t.timepoint,n=t.updateTimepointTime,r=t.saveTimepoint,a=t.back,i=t.clearTimepointTimeState,c=Gn(o.a.useState(Object(xn.a)(e.visibleAt/1e3)),2),u=c[0],l=c[1],s=Gn(o.a.useState(!1),2),f=s[0],d=s[1];function p(t){n(t*Yn),l(Object(xn.a)(e.visibleAt/1e3)),2===++zn?Yn=5:4===zn?Yn=20:6===zn?Yn=60:8===zn&&(Yn=120),Wn||(Wn=window.setInterval((function(){return p(t)}),200),window.addEventListener("mouseup",m))}function m(){window.removeEventListener("mouseup",m),window.clearInterval(Wn),Wn=null,zn=0,Yn=1}return o.a.useEffect((function(){return m}),[]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"cv-timepoint flex-grow-1"},o.a.createElement("div",{className:"cv-timepoint-padding"},o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("label",{className:"cv-interaction-field-label mb-0"},"Move time point"),o.a.createElement("div",{className:"text-center mt-3"},o.a.createElement(rt.a,{className:"cv-left-arrow d-inline-block cursor-pointer",onClick:function(){},onMouseDown:function(){return p(-1)},onKeyDown:function(t){t.stopPropagation(),13===t.keyCode&&0===zn&&p(-1)},onKeyUp:m}),o.a.createElement("input",{className:"form-control text-center d-inline-block cv-move-timepoint-input",value:u,onChange:function(){},onKeyDown:function(t){t.stopPropagation(),37===t.keyCode&&0===zn&&p(-1),39===t.keyCode&&0===zn&&p(1)},onKeyUp:m}),o.a.createElement(rt.a,{className:"cv-right-arrow d-inline-block cursor-pointer",onClick:function(){},onMouseDown:function(){return p(1)},onKeyDown:function(t){t.stopPropagation(),13===t.keyCode&&0===zn&&p(1)},onKeyUp:m}))))),o.a.createElement("div",{className:"cv-timpoint-button-container"},o.a.createElement(rt.a,{className:"btn btn-link",onClick:function(){i(!0),a()}},"Cancel"),f?o.a.createElement(rt.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},o.a.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):o.a.createElement(rt.a,{className:"btn btn-dark",onClick:function(){return Bn(this,void 0,void 0,Dn().mark((function t(){return Dn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d(!0),t.next=3,r();case 3:a();case 4:case"end":return t.stop()}}),t)})))}},"Save")))}var Hn=n(1092),Vn=n(1370),Kn=n.n(Vn),Zn=n(1185);function Jn(t){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Qn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Jn(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Xn(t){return function(t){if(Array.isArray(t))return nr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||er(t)||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 tr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||er(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(t,e){if(t){if("string"==typeof t)return nr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nr(t,e):void 0}}function nr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var rr=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))};var or=Object(Hn.SortableElement)((function(t){var e=t.interaction,n=s.a.getTypeInfo(e.typeId).bgClassName;return o.a.createElement("div",{className:"py-2 text-left"},o.a.createElement("span",{className:Kn.a.dragIcon},o.a.createElement(Ee.a,{size:Ee.b.Small,svgName:xe.b.Handle})),o.a.createElement(Zn.a,{interaction:e,iconClassName:"".concat(Kn.a.type," ").concat(n),questionClassName:"".concat(Kn.a.name," clamp-1")}))})),ar=Object(Hn.SortableContainer)((function(t){var e=t.interactions,n=function(){var t=o.a.useRef();function e(){document.body.style.cursor="",document.removeEventListener("mouseup",e),t.current&&(t.current.style.cursor="grab")}return{ref:t,style:{cursor:"grab"},onMouseDown:function(){document.body.style.cursor="grabbing",document.addEventListener("mouseup",e),t.current&&(t.current.style.cursor="grabbing")},onMouseUp:e}}();return o.a.createElement("div",Object.assign({tabIndex:0},n),e.map((function(t,e){return o.a.createElement(or,{key:t.id,index:e,interaction:t})})))}));function ir(t){var e=tr(o.a.useState(!1),2),n=e[0],r=e[1],a=tr(o.a.useState(Xn(t.interactions)),2),i=a[0],c=a[1],u=tr(o.a.useState(!1),2),l=u[0],s=u[1];return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"cv-timepoint flex-grow-1"},o.a.createElement("div",{className:"cv-timepoint-padding"},o.a.createElement("div",{className:"cv-interactive-question"},o.a.createElement("label",{className:"cv-interaction-field-label mb-0"},"Re-order questions"),o.a.createElement("div",{className:"text-center mt-3"},o.a.createElement(ar,{onSortEnd:function(t){var e=t.oldIndex,n=t.newIndex;e!==n&&(c(Xn(function(t,e,n){for(;e<0;)e+=t.length;for(;n<0;)n+=t.length;if(n>=t.length)for(var r=n-t.length+1;r--;)t.push(void 0);return t.splice(n,0,t.splice(e,1)[0]),t}(i,e,n))),s(!0))},interactions:i,helperClass:Kn.a.dragging,lockAxis:"y"}))))),o.a.createElement("div",{className:"cv-timpoint-button-container"},o.a.createElement(rt.a,{className:"btn btn-link",onClick:function(){c(Xn(t.interactions)),s(!1),t.back()}},"Cancel"),n?o.a.createElement(rt.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},o.a.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):o.a.createElement(rt.a,{className:"btn btn-dark ".concat(l?"":"disabled"),onClick:function(){return rr(this,void 0,void 0,Qn().mark((function e(){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l){e.next=2;break}return e.abrupt("return");case 2:return r(!0),e.next=5,t.reOrderQuestions(i);case 5:r(!1),t.back();case 7:case"end":return e.stop()}}),e)})))}},"Save")))}var cr=n(92),ur=n(43);function lr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return sr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function fr(t){var e=t.isCreate,n=t.interaction,r=t.mode,a=t.immediateFeedback,i=t.interactionState,c=t.shouldFocus,u=t.delayFocus,l=t.open,s=t.timepoint,f=t.userUpdateInteractionState,d=t.submitInteractionAnswer,p=t.saveInteraction,m=o.a.useRef(),h=o.a.useRef(),v=Object(cr.a)(ur.a.XLDown),y=!e||v;function g(){return!!m.current&&(!!c&&!!l)}function b(){m.current&&(m.current.focus(),x(!0))}var w=lr(o.a.useState(!1),2),E=w[0],x=w[1];o.a.useEffect((function(){g()&&(E||(u&&y?window.setTimeout((function(){g()&&b()}),400):b()))}),[m.current,E]);var I=lr(o.a.useState("question"),2),S=I[0],k=I[1],O=o.a.useMemo((function(){return Object(et.c)()}),[]),C=n?En(n.typeId,r):null,N=a;return e||(N=N&&(null==i?void 0:i.submitted)),o.a.createElement(o.a.Fragment,null,o.a.createElement(Un,Object.assign({optionsPortalNode:O,setView:k},t)),o.a.createElement(wn.a,{style:{height:"100%"},ref:h},o.a.createElement(On,Object.assign({},t)),!!n&&o.a.createElement("div",{className:"d-flex flex-column h-100"},o.a.createElement(Tn,Object.assign({},t)),"question"===S&&o.a.createElement(o.a.Fragment,null,o.a.createElement("form",{className:"cv-timepoint flex-grow-1",tabIndex:-1,onSubmit:function(t){t.preventDefault(),e?p():d()}},o.a.createElement("div",{className:"cv-timepoint-padding"},o.a.createElement("div",{ref:m,tabIndex:0}),o.a.createElement(C,Object.assign({state:i,setState:f,recalculateScroll:function(){h.current.recalculate()},showFeedback:N,optionsPortalNode:O},t)))),o.a.createElement(Fn,Object.assign({},t))),"move"===S&&o.a.createElement($n,Object.assign({back:function(){return k("question")}},t)),"reorder"===S&&o.a.createElement(ir,Object.assign({back:function(){return k("question")},interactions:s.interactions},t)))))}n(1371);function dr(t){var e=t.open,n=t.nextInteraction,r=t.nextInteractionState,a=t.timepointState,i=t.interaction,c=t.delayFocus,u=n&&a.nextInteractionIndex<a.interactionIndex,l=n&&a.nextInteractionIndex>a.interactionIndex,s=l&&a.slideIn,f=u&&a.slideIn;return o.a.createElement("div",{className:"cv-interactive ".concat(e?"cv-open":"")},u&&o.a.createElement("div",{className:"cv-prev-interaction ".concat(a.slideIn?"cv-slide-in":"")},o.a.createElement(fr,Object.assign({},t,{currentIndex:a.nextInteractionIndex,interaction:n,interactionState:r}))),o.a.createElement("div",{className:"\n cv-main-slide\n ".concat(s?"cv-slide-out-up":"","\n ").concat(f?"cv-slide-out-down":"","\n ").concat(n?"cv-transitioning":"","\n ")},o.a.createElement(fr,Object.assign({key:null==i?void 0:i.id},t,{currentIndex:a.interactionIndex,shouldFocus:i&&!u&&!l,delayFocus:c}))),l&&o.a.createElement("div",{className:"cv-next-interaction ".concat(a.slideIn?"cv-slide-in":"")},o.a.createElement(fr,Object.assign({},t,{currentIndex:a.nextInteractionIndex,interaction:n,interactionState:r}))))}n(1372);function pr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return mr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function hr(t){var e=t.player,n=t.resultsService,r=t.interactive,a=t.setShowSummary,i=pr(o.a.useState(!1),2),c=i[0],u=i[1],l=t.player.activePlugins_.activityStatusPlugin,s=t.player.activePlugins_.favouritePlugin;function f(){e.currentTime()>r.timepoints[r.timepoints.length-1].visibleAt/1e3+1?u(!0):u(!1)}if(o.a.useEffect((function(){if(n)return e.on("timeupdate",f),function(){return e.off("timeupdate",f)}}),[]),!c)return null;var d="btn btn-outline-dark cv-show-summary";return s&&(d+=" cv-has-favourite-plugin"),l&&(d+=" cv-has-activity-status-plugin"),o.a.createElement(rt.a,{className:d,onClick:function(){a(!0),e.pause(),e.hide()}},e.gradePassbackPlugin().enabled?"Submit answers":"View summary")}var vr=n(1373),yr=n.n(vr);function gr(t){var e=t.interactive,n=t.duration;return n?o.a.createElement(o.a.Fragment,null,e.timepoints.map((function(e,r){if(!e.interactions.length)return o.a.createElement(o.a.Fragment,null);var a=s.a.getTypeInfo(e.interactions[0].typeId).bgClassName,i=e.visibleAt/1e3/n*100;return o.a.createElement("span",{key:r,className:"".concat(yr.a.interaction," ").concat(a),style:{left:"".concat(i,"%")},onClick:function(n){return r=e.id,o=e.interactions[0].id,n.stopPropagation(),void t.goToTimepoint(r,o);var r,o}})}))):o.a.createElement(o.a.Fragment,null)}var br=n(154),wr=n(398),Er=n(1374),xr=n.n(Er);function Ir(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Sr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kr(t){var e=t.duration,n=t.progress,r=t.player,a=Ir(o.a.useState(n.length),2)[1],i=[];if(n.length){var c=n[0];i.push(c),n.forEach((function(t,e){0!==e&&(c.end.time+1>t.start.time&&c.start.time<t.start.time?c.end=t.end:(c=t,i.push(c)))}))}return o.a.useEffect((function(){var t=function(){a(n.length)};return r.on("progressflush",t),function(){return r.off("progressflush",t)}}),[]),o.a.createElement(o.a.Fragment,null,i.map((function(t,n){var r=t.start.time/e*100,a=100*(1-t.end.time/e);return o.a.createElement("span",{key:n,className:xr.a.progress,style:{left:"".concat(r,"%"),right:"".concat(a,"%")}})})))}function Or(t){return yt.a.last(t.results)}function Cr(t,e){return yt.a.findWhere(null==e?void 0:e.attempts,{id:t})}var Nr,jr=n(1253),Lr=n.n(jr);function Tr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ar=function(){return o.a.createElement(o.a.Fragment,null)},Pr=(Tr(Nr={},tt.InteractionTypeId.Annotation,Ar),Tr(Nr,tt.InteractionTypeId.Image,Ar),Tr(Nr,tt.InteractionTypeId.MissingWord,(function(t){var e=t.interaction.data.sentence.replace(/{([^{}]*)}/g,(function(t,e){return"{".concat("cv-missing-word-").concat(e,"}")})).split(/{([^{}]*)}/g),n="p-2";return t.reportsStyling||(n+=" border rounded"),o.a.createElement("div",{className:n},e.map((function(e,n){if(!e.startsWith("cv-missing-word-"))return e;var r=e.replace("cv-missing-word-",""),a=t.interaction.actionableItems.find((function(t){return t.order.toString()===r}));if(a){var i=t.answers.find((function(t){return t.id==a.id}));if(i){if(!t.showFeedback)return o.a.createElement("strong",{key:n,className:"text-info"},i.text);var c=i.status===ie.Correct;return o.a.createElement(o.a.Fragment,{key:n},!c&&o.a.createElement(o.a.Fragment,null,o.a.createElement("del",{className:"text-danger"},o.a.createElement("strong",null,i.text))," "),o.a.createElement("strong",{className:"text-success"},a.name))}}})))})),Tr(Nr,tt.InteractionTypeId.MultipleChoice,(function(t){var e,n,r,a,i="my-2";return t.reportsStyling&&(i+=" mx-2"),o.a.createElement("div",{className:i},o.a.createElement(Ce,{interaction:t.interaction,showFeedback:t.showFeedback,getSelectedAnswer:function(e){var n=t.answers.find((function(t){return t.id==e}));return null==n?void 0:n.text},imageApi:t.imageCdnUrl,userInitials:t.anonymisedUserName?we.a.getInitialsFromFullName(t.anonymisedUserName):we.a.getInitials(null===(e=t.user)||void 0===e?void 0:e.name,null===(n=t.user)||void 0===n?void 0:n.surname),userAvatar:t.anonymisedUserName?null:null===(a=null===(r=t.user)||void 0===r?void 0:r.avatar)||void 0===a?void 0:a.url,onlyShowSelectedAnswer:!t.showAvatar,size:"sm",unCheckedBackground:t.showFeedback?"":"".concat(Lr.a.uncheckedBackground," text-white")}))})),Tr(Nr,tt.InteractionTypeId.TrueOrFalse,(function(t){var e,n,r,a,i="justify-content-start";return t.reportsStyling&&(i="justify-content-center"),o.a.createElement("div",{className:"my-2"},o.a.createElement(Pe,{className:i,interaction:t.interaction,showFeedback:t.showFeedback,hideFeedbackIcons:!t.showAvatar,getSelectedAnswer:function(e){var n=t.answers.find((function(t){return t.id==e}));return null==n?void 0:n.text},imageApi:t.imageCdnUrl,userInitials:t.anonymisedUserName?we.a.getInitialsFromFullName(t.anonymisedUserName):we.a.getInitials(null===(e=t.user)||void 0===e?void 0:e.name,null===(n=t.user)||void 0===n?void 0:n.surname),userAvatar:t.anonymisedUserName?null:null===(a=null===(r=t.user)||void 0===r?void 0:r.avatar)||void 0===a?void 0:a.url,size:"sm",unCheckedBackground:t.showFeedback?"":"".concat(Lr.a.uncheckedBackground," text-white")}))})),Tr(Nr,tt.InteractionTypeId.ShortAnswer,(function(t){var e=yt.a.first(t.answers);if(!e)return o.a.createElement(o.a.Fragment,null);var n="rounded p-2 mb-2";return t.reportsStyling||(n+=" bg-info text-white"),o.a.createElement("div",{className:n},e.text)})),Nr),_r=n(8).a.encloseNamespace("interactives.responseTypes");function Fr(){return o.a.createElement("p",{className:"p-2"},o.a.createElement("em",null,_r("noResponse")))}function Mr(t){return o.a.createElement(o.a.Fragment,null,t.correctness===ue.a.Correct&&o.a.createElement("div",{className:"ml-2 text-success"},o.a.createElement(Ee.a,{svgName:xe.b.Check})),t.correctness===ue.a.Incorrect&&o.a.createElement("div",{className:"ml-2 text-danger"},o.a.createElement(Ee.a,{svgName:xe.b.Close})))}function Ur(t){return o.a.createElement("div",{className:"d-flex align-items-center justify-content-between"},o.a.createElement("strong",null,t.anonymisedUserName||we.a.getFullName(t.studentResults.user)),o.a.createElement(Mr,{correctness:t.correctness}))}function Rr(t){return t.correctness!==ue.a.AwaitingMarking?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{className:"d-flex justify-content-end mt-1"},o.a.createElement("div",{className:"d-flex flex-column justify-content-end cursor-pointer\n ".concat(t.markedStatus===ie.Correct?"text-success":"")},o.a.createElement(Ee.a,{svgName:t.markedStatus===ie.Correct?xe.b.CheckCircle:xe.b.CheckCircleOutline,onClick:function(){return t.markInteraction(t.studentAttempt.answers,ie.Correct)}})),o.a.createElement("div",{className:"d-flex flex-column justify-content-end cursor-pointer\n ".concat(t.markedStatus===ie.Incorrect?" text-danger":"")},o.a.createElement(Ee.a,{svgName:t.markedStatus===ie.Incorrect?xe.b.CrossCircleFilled:xe.b.CrossCircle,onClick:function(){return t.markInteraction(t.studentAttempt.answers,ie.Incorrect)}})))}var Dr=n(1375),Gr=n.n(Dr);function qr(t){var e,n,r,a,i,c=Pr[t.interaction.typeId];if(!c)return o.a.createElement(o.a.Fragment,null);var u=Or(t.studentResults),l=Cr(t.interaction.id,u),s=ye.isInteractionCorrect(t.interaction,u);return o.a.createElement("div",{className:"rounded ".concat(null!==(e=t.className)&&void 0!==e?e:"")},o.a.createElement("div",{className:"d-flex"},!!t.showStudentDetails&&o.a.createElement("div",{className:"mr-2"},o.a.createElement("div",{className:Gr.a.avatarContainer},o.a.createElement(Ie.a,{imageCdnUrl:t.imageCdnUrl,initials:t.anonymisedUserName?we.a.getInitialsFromFullName(t.anonymisedUserName):we.a.getInitials(null===(n=t.studentResults.user)||void 0===n?void 0:n.name,null===(r=t.studentResults.user)||void 0===r?void 0:r.surname),imageUrl:t.anonymisedUserName?null:null===(i=null===(a=t.studentResults.user)||void 0===a?void 0:a.avatar)||void 0===i?void 0:i.url}))),o.a.createElement("div",{className:"flex-grow-1"},!!t.showStudentDetails&&o.a.createElement(Ur,{studentResults:t.studentResults,correctness:s,anonymisedUserName:t.anonymisedUserName}),o.a.createElement("div",{className:"d-flex justify-content-between"},o.a.createElement("div",{className:"flex-grow-1 ".concat(t.responseComponentClass?t.responseComponentClass:"")},l?o.a.createElement(c,{interaction:t.interaction,answers:l.answers,imageCdnUrl:t.imageCdnUrl,user:t.studentResults.user,showFeedback:t.showFeedback,showAvatar:t.showAvatar,reportsStyling:t.reportsStyling}):o.a.createElement(Fr,null)),!t.showStudentDetails&&o.a.createElement(Mr,{correctness:s})))),o.a.createElement(Rr,{studentAttempt:l,correctness:s,markInteraction:t.markInteraction,markedStatus:t.markedStatus}))}var Br=n(1376),Wr=n.n(Br);function zr(t){var e=t.studentResults,n=t.interaction,r=t.timepoint,a=t.interactive,i=t.state,c=t.goToTimepoint,u=t.interactionNumber,l=t.imageCdnUrl,s=Or(e),f=Cr(n.id,s),d=i.interactions[n.id],p=Ze(n.typeId)(d||{},n),m=n.typeId!==tt.InteractionTypeId.Annotation&&n.typeId!==tt.InteractionTypeId.Image,h=m;n.typeId===tt.InteractionTypeId.MissingWord&&f&&(h=!1);var v=n.data.suggestedResponse||n.data.feedback;return o.a.createElement("li",{className:"mb-3 position-relative"},o.a.createElement("div",{className:"d-flex flex-wrap mb-2 cursor-pointer",onClick:function(){return c(r.id,n.id)}},a.immediateFeedback&&o.a.createElement("div",{className:Wr.a.feedback},!!f&&(p===ue.a.AwaitingMarking?o.a.createElement("span",{className:"text-muted font-italic"},"Waiting to be marked"):p===ue.a.Correct?o.a.createElement("span",{className:"text-success"},"Correct ",o.a.createElement(Ee.a,{className:"svg-container align-middle",svgName:xe.b.Check})):p===ue.a.Incorrect&&o.a.createElement("span",{className:"text-danger"},"Incorrect ",o.a.createElement(Ee.a,{className:"svg-container align-middle",svgName:xe.b.Close})))),o.a.createElement(Zn.a,{interaction:n,iconClassName:"flex-shrink-0",showQuestion:h,showTypeName:!0,questionClassName:"d-block w-100 mt-2",questionNumber:u})),m&&!f&&o.a.createElement("button",{className:"btn btn-dark",onClick:function(){return c(r.id,n.id)}},"Answer question"),f&&m&&o.a.createElement(qr,{interaction:n,studentResults:e,markedStatus:ie.PendingReview,markInteraction:function(){},imageCdnUrl:l,showFeedback:a.immediateFeedback,showAvatar:!0}),a.immediateFeedback&&f&&v&&o.a.createElement("div",{className:"bg-light rounded p-2"},o.a.createElement("div",null,o.a.createElement("strong",null,n.typeId===tt.InteractionTypeId.TrueOrFalse?"Teacher's feedback":"Teacher's suggested response")),v))}var Yr=n(1377),$r=n.n(Yr);function Hr(t){return function(t){if(Array.isArray(t))return Vr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Vr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vr(t,e)}(t)||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 Vr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Kr(t){var e=t.showSummary,n=t.setShowSummary,r=t.state,a=t.interactive,i=t.player,c=t.progress,u=t.portalNode,l=o.a.useRef();function s(){n(!1),i.show(),i.play()}function f(e,n){s(),t.goToTimepoint(e,n)}if(!u||!e)return o.a.createElement(o.a.Fragment,null);var d=function(t){var e=t.interactive,n=t.state,r=0,o=0,a=0,i=!1,c=[];return e.timepoints.forEach((function(t){t.interactions.forEach((function(t){var e=n.interactions[t.id],u=Ze(t.typeId)(e||{},t);u===ue.a.Correct&&r++,u!==ue.a.NotApplicable&&o++,u!==ue.a.NotApplicable&&(null==e?void 0:e.submitted)&&a++,u===ue.a.AwaitingMarking&&(i=!0);var l=D(e||{}),s=Object.keys(l).map((function(t){var e;return{id:t,text:null===(e=l[t])||void 0===e?void 0:e.toString()}}));s.length&&c.push({id:t.id,answeredAt:1,answers:s})}))})),{correctCount:r,total:o,answered:a,studentAttempts:c,awaitingMarking:i}}({interactive:a,state:r}),p=d.correctCount,m=d.total,h=d.answered,v=d.studentAttempts,y=d.awaitingMarking,g={name:t.currentUser.givenName,username:t.currentUser.username,user:{name:t.currentUser.givenName,surname:t.currentUser.familyName,avatar:{url:t.currentUser.avatar}},results:[{id:a.id,attempts:v}]},b=0,w=i.ended(),E=i.duration();return o.a.createElement(et.a,{node:u},o.a.createElement("div",{className:"row pb-3"},o.a.createElement("div",{className:"col-4 col-xs-12"},o.a.createElement(wr.a,{data:i.poster(),imageType:Ot.c.Thumbnails,imageOptions:{size:Ot.b.Medium}})),o.a.createElement("div",{className:"col-8 col-xs-12"},o.a.createElement("span",{className:"float-right"},o.a.createElement(br.a,{svgName:xe.b.Play,className:"btn btn-outline-dark",onClick:function(){s(),i.ended()&&i.currentTime(0)}},w?"Play again":"Continue watching"),i.gradePassbackPlugin().enabled&&o.a.createElement(br.a,{svgName:xe.b.Check,className:"btn btn-dark ml-2",onClick:function(){i.gradePassbackPlugin().submit(p/m,!y)}},"Submit")),o.a.createElement("h1",{className:"h3"},t.title),o.a.createElement("p",null))),o.a.createElement("div",{className:"border rounder px-2 mb-3"},o.a.createElement("div",{className:"cursor-pointer my-4 ".concat($r.a.bar),onClick:function(t){if(l.current){var e=l.current.getBoundingClientRect(),n=(t.pageX-e.left)/e.width*E;s(),i.currentTime(n)}},ref:l},o.a.createElement(kr,{duration:E,progress:c,interactive:a,player:i}),o.a.createElement(gr,{duration:E,interactive:a,goToTimepoint:f}))),o.a.createElement("h2",{className:"h4"},"My Answers"),o.a.createElement("div",{className:"d-flex justify-content-between"},o.a.createElement("span",null,a.immediateFeedback&&o.a.createElement("div",null,"Score: ",p,"/",m),o.a.createElement("div",{className:"mb-3"},"You have answered ",o.a.createElement("strong",{className:h!==m?"text-danger":""},h)," of ",o.a.createElement("strong",null,m)," questions"))),o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-lg-7 col-12"},o.a.createElement("ul",{className:"list-unstyled"},a.timepoints.reduce((function(e,n){return[].concat(Hr(e),Hr(n.interactions.map((function(e){return b++,o.a.createElement(zr,{key:e.id,studentResults:g,interaction:e,timepoint:n,interactive:a,state:r,goToTimepoint:f,interactionNumber:b,imageCdnUrl:t.imageCdnUrl})}))))}),[])))))}function Zr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Jr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qr(t){var e=t.resultsService,n=t.player,r=t.onShowSummary,a=Zr(o.a.useState(!1),2),i=a[0],c=a[1];function u(t){c(t),r&&r(t)}function l(){u(!0),n.hide()}return o.a.useEffect((function(){if(e)return n.on("ended",l),function(){return n.off("ended",l)}}),[]),o.a.useEffect((function(){i&&n.isFullscreen()&&n.exitFullscreen()}),[i]),o.a.createElement(o.a.Fragment,null,o.a.createElement(hr,Object.assign({setShowSummary:u},t)),o.a.createElement(Kr,Object.assign({showSummary:i,setShowSummary:u},t)))}n(1378);var Xr=n(1100);function to(t){var e,n,r,a=(e=t.interactive,r=0,null===(n=null==e?void 0:e.timepoints)||void 0===n||n.forEach((function(t){var e;return null===(e=t.interactions)||void 0===e?void 0:e.forEach((function(){return r++}))})),r>0),i=[];return t.onClickEditDetails&&i.push({label:"Edit details",svgName:xe.b.Edit,button:!0,className:"btn btn-outline-dark",onClick:t.onClickEditDetails}),t.onClickPublish&&i.push({label:"Publish",button:!0,className:"btn btn-dark ml-2".concat(a?"":" disabled"),disabled:!a,tooltip:a?"":"Interactives cannot be published without questions",onClick:function(){if(!a)return;t.onClickPublish&&t.onClickPublish()}}),i.length?o.a.createElement(et.a,{node:t.portalNode},o.a.createElement(Xr.a,{actions:i})):o.a.createElement(o.a.Fragment,null)}var eo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function no(t){var e=t.title,n=t.player,r=t.track,a=t.mode,i=t.interactive,c=t.imageApi,u=t.supportSiteUrl,s=t.actionsPortalNode,f=t.questionListPortalNode,d=t.summaryPortalNode,p=t.resultsService,m=t.currentUser,h=t.progress,v=t.latestSession,y=t.clipOffset,g=t.analyticsService,b=function(t){var e=t.player,n=t.track,r=t.interactive,a=t.clipOffset,i=_(o.a.useState(!1),2),c=i[0],u=i[1],l=_(o.a.useState(!1),2),s=l[0],f=l[1],d=_(o.a.useState(null),2),p=d[0],m=d[1];function h(t){return a?t+a:t}function v(t){f(!!t&&c),u(t)}function y(){var t=n.activeCues;if(!t.length)return v(!1),void m(null);var o=r.timepoints.find((function(e){return e.id.toString()===t[0].text.toString()}));if(!o)return v(!1),void m(null);o.shouldPause&&(e.seeking()?e.one("play",(function(){return e.pause()})):e.pause()),v(!0),m(o)}function g(t){for(var e=0;e<n.cues.length;e++){var r=n.cues[e];if(r.text.toString()===t.toString())return r}}return o.a.useEffect((function(){return n.addEventListener("cuechange",y),function(){return n.removeEventListener("cuechange",y)}})),{open:c,setOpen:v,wasOpen:s,timepoint:p,continueInteractive:function(){v(!1),e.play()},updateCue:function(t,e){var n=g(t);n.text=e.toString(),n.originalCue_.text=e.toString()},addCue:function(t){var r=e.currentTime();n.addCue({startTime:h(r)-.001,endTime:h(r+1),text:t}),n.trigger("cv:cuechange"),e.paused()&&n.trigger("cuechange")},removeCue:function(t){t=h(t);for(var e=0;e<n.cues.length;){var r=n.cues[e];if(r.startTime<=t&&r.endTime>=t){n.removeCue(r),n.trigger("cv:cuechange"),n.trigger("cuechange");break}e++}},moveTimepoint:function(t){var r=g(p.id);if(r){var o=t/1e3;r.startTime=h(o),r.endTime=h(o+1),e.currentTime(o+.5,!0),p.visibleAt=t,n.trigger("cv:cuechange")}},getClipOffset:h}}({player:n,track:r,interactive:i,mode:a,clipOffset:y}),w=b.open,E=b.timepoint,x=b.wasOpen,I=eo(b,["open","timepoint","wasOpen"]),S=sn(Object.assign({mode:a,interactive:i,timepoint:E,player:n,resultsService:p,latestSession:v,analyticsService:g},I)),k=S.interaction,O=S.interactionState,C=S.nextInteraction,N=S.nextInteractionState,j=S.timepointState,L=S.state,T=eo(S,["interaction","interactionState","nextInteraction","nextInteractionState","timepointState","state"]);!function(t){var e,n=t.mode,r=t.player,a=t.timepoint,i=t.interaction,c=t.discardChanges,u=t.interactionState,s=t.timepointState,f=Object(M.a)(),d=n===l.InteractiveMode.Create;o.a.useEffect((function(){if(d){if(R(null==i?void 0:i.id)||(null==u?void 0:u.hasChanges)||(null==s?void 0:s.hasChanges))return f.lock({id:"interactive",title:"Are you sure you want to leave?",text:"Your interactive still has unsaved changes"}),void r.lock((function(t){c(t)}));r.unlock(),f.unlock("interactive")}}),[i,null==u?void 0:u.hasChanges,null===(e=null==a?void 0:a.interactions)||void 0===e?void 0:e.length,null==s?void 0:s.hasChanges])}({mode:a,player:n,timepoint:E,interaction:k,discardChanges:T.discardChanges,interactionState:O,timepointState:j});var A={mode:a,open:w,isCreate:a===P.a.Create,interaction:k,nextInteraction:C,timepoint:E,interactive:i,interactionState:O,nextInteractionState:N,timepointState:j,player:n};return o.a.createElement(o.a.Fragment,null,!!s&&o.a.createElement(to,{interactive:i,onClickEditDetails:t.onClickEditDetails,onClickPublish:t.onClickPublish,portalNode:s}),o.a.createElement(mn,Object.assign({},A,T)),o.a.createElement(dr,Object.assign({imageApi:c,currentUser:m,immediateFeedback:i.immediateFeedback,delayFocus:!x},A,T,I)),o.a.createElement(Qr,Object.assign({title:e,currentUser:m,state:L,portalNode:d,progress:h,resultsService:p,imageCdnUrl:c.toString(),onShowSummary:t.onShowSummary},A,T)),o.a.createElement(bn,Object.assign({portalNode:f,supportSiteUrl:u,currentUser:m},A,T)))}c.a.registerComponent("Interactive",Object(A.a)((function(t,e){return o.a.createElement(no,Object.assign({player:t},e))})));var ro=n(273),oo=n(276);function ao(t){var e=t.player;function n(){var t=e.getChild("ContinueSession");e.removeChild(t),t.dispose()}function r(){t.continue(!0),n()}var a=[{buttonText:"Start again",variant:"link",onClick:function(){t.continue(!1),n()}},{buttonText:"Continue",variant:"dark",onClick:r}];return o.a.createElement(ro.a,{title:"Continue interactive?",closePopup:r},o.a.createElement("p",null,"It looks like you've already started this interactive. Would you like to continue your attempt or start a new one?"),o.a.createElement(oo.a,{buttons:a}))}function io(t){return(io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function co(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uo(t,e){return(uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fo(t);if(e){var o=fo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return so(this,n)}}function so(t,e){if(e&&("object"===io(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}c.a.registerComponent("ContinueSession",Object(A.a)((function(t,e){return o.a.createElement(ao,Object.assign({player:t},e))})));var po=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uo(t,e)}(a,t);var e,n,r,o=lo(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=o.call(this,t)).enabled=!1,e.player.ready((function(){return e.initialize()})),e}return e=a,(n=[{key:"initialize",value:function(){this.onReceiveMessage=this.onReceiveMessage.bind(this),window.addEventListener("message",this.onReceiveMessage,!1),window.parent.postMessage(JSON.stringify({type:"cv-app-loaded"}),"*")}},{key:"dispose",value:function(){window.removeEventListener("message",this.onReceiveMessage)}},{key:"onReceiveMessage",value:function(t){var e={};try{e=JSON.parse(t.data)}catch(t){return}"enable-grade-passback"===e.type&&(this.enabled=!0,window.removeEventListener("message",this.onReceiveMessage))}},{key:"submit",value:function(t,e){var n={type:"cv-lms-submit-score",data:{score:t,fullyGraded:e}};window.parent.postMessage(JSON.stringify(n),"*")}}])&&co(e.prototype,n),r&&co(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(c.a.getPlugin("plugin"));c.a.registerPlugin("gradePassbackPlugin",po);n(1379);function mo(t){return(mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ho(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vo(t,e){return(vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=bo(t);if(e){var o=bo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return go(this,n)}}function go(t,e){if(e&&("object"===mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function bo(t){return(bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vo(t,e)}(a,t);var e,n,r,o=yo(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t)).continueSession=!1,n.options=e,t.ready((function(){return n.initialize()})),n}return e=a,(n=[{key:"initialize",value:function(){var t=this;this.player.gradePassbackPlugin(),u.a.useTrack(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin"),this.options.resultsService&&!this.options.latestSession&&(this.startSession=this.startSession.bind(this),this.player.one("play",this.startSession),this.on("dispose",(function(){t.player.off("play",t.startSession)})))}},{key:"startSession",value:function(){var t,e=null===(t=this.options.latestSession)||void 0===t?void 0:t.resultId;this.continueSession||(e=null),this.options.resultsService.start(e)}},{key:"onTrackLoaded",value:function(t){var e=this;this.options.resultsService&&this.options.latestSession?(this.player.pause(),this.player.addChild("ContinueSession",{continue:function(n){e.options.analyticsService.logUserAction({},{actionType:ne.UserAction.Click,entity:ne.EntityType.Interactive,descriptor:n?ne.InteractiveSessionDescriptor.ContinueSession:ne.InteractiveSessionDescriptor.NewSession}),e.continueSession=n,e.startSession(),e.addChildren(t),e.player.play()}})):this.addChildren(t)}},{key:"addChildren",value:function(t){this.player.addChild("Interactive",Object.assign(Object.assign({},this.options),{track:t,mode:this.options.mode||l.InteractiveMode.View,latestSession:this.continueSession&&this.options.latestSession})),this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new T(this.player,{interactive:this.options.interactive,track:t}))}}])&&ho(e.prototype,n),r&&ho(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(c.a.getPlugin("plugin"));c.a.registerPlugin("viewInteractivePlugin",wo);var Eo=n(126);function xo(t){return(xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Io(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function So(t,e){return(So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ko(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Co(t);if(e){var o=Co(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oo(this,n)}}function Oo(t,e){if(e&&("object"===xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Co(t){return(Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var No=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&So(t,e)}(a,t);var e,n,r,o=ko(a);function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,"Could not connect to submit interactive results")}return e=a,(n=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:"Connection issues",text:"There seems to be an issue with your internet connection. Refresh the page to try again. ",buttons:[{text:"Refresh",className:"btn btn-dark",success:!0}]}}},{key:"onDone",value:function(){window.location.reload()}}])&&Io(e.prototype,n),r&&Io(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(n(118).a);function jo(t){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lo(t){return function(t){if(Array.isArray(t))return To(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return To(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return To(t,e)}(t)||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 To(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ao(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ao=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==jo(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Po(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var _o=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},Fo=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cache=[],this.retryCount=0,this.options=e,this.connection=(new Eo.a).withUrl("".concat(e.playerApi.origin,"/hubs/interactives"),{withCredentials:!1}).configureLogging(Eo.c.Error).withAutomaticReconnect([0,2e3,1e4,3e4]).build(),this.connection.onreconnecting((function(){n.log("reconnecting"),n.isConnected=!1})),this.connection.onreconnected((function(){n.log("reconnected"),n.isConnected=!0,n.flush()})),this.connection.onclose((function(){n.log("connection closed"),n.isConnected=!1,n.reconnect()})),this.save=this.save.bind(this)}var e,n,r;return e=t,(n=[{key:"start",value:function(t){var e=this;this.isConnected||(t&&(this.resultId=t),this.log("starting"),this.connection.start().then((function(){return _o(e,void 0,void 0,Ao().mark((function t(){return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.log("connected"),this.retryCount=0,this.isConnected=!0,t.next=5,this.startSession();case 5:this.flush();case 6:case"end":return t.stop()}}),t,this)})))})).catch((function(){e.reconnect()})))}},{key:"stop",value:function(){return _o(this,void 0,void 0,Ao().mark((function t(){return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.flush();case 2:this.connection.stop();case 3:case"end":return t.stop()}}),t,this)})))}},{key:"log",value:function(){}},{key:"reconnect",value:function(){this.retryCount>=5?a.a.ErrorHelper.throw(new No):(this.retryCount++,this.start())}},{key:"startSession",value:function(){return _o(this,void 0,void 0,Ao().mark((function t(){var e,n,r,o,i,c,u;return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.resultId){t.next=2;break}return t.abrupt("return");case 2:return e=this.options,n=e.interactiveId,r=e.mediaId,o=e.userId,i=e.customerId,c=e.shareId,t.prev=3,t.next=6,this.connection.invoke("startSession",n,r,o,i,c);case 6:u=t.sent,this.resultId=u.resultId,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),a.a.ErrorHelper.throw(new No);case 13:case"end":return t.stop()}}),t,this,[[3,10]])})))}},{key:"flush",value:function(){return _o(this,void 0,void 0,Ao().mark((function t(){var e=this;return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isConnected&&this.resultId){t.next=2;break}return t.abrupt("return");case 2:if(this.cache.length){t.next=4;break}return t.abrupt("return");case 4:Lo(this.cache).forEach((function(t){return _o(e,void 0,void 0,Ao().mark((function e(){return Ao().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.connection.invoke("saveActions",this.resultId,t.interactionId,t.results);case 3:this.cache.splice(this.cache.indexOf(t),1),this.log("Saved result",t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Failed to save results",t);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})))}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"save",value:function(t,e){return _o(this,void 0,void 0,Ao().mark((function n(){var r;return Ao().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.resultId){n.next=2;break}throw new Error("Session has not started");case 2:return r=e.map((function(t){return{actionableItemId:+t.actionableItemId,value:t.value}})),this.cache.push({interactionId:t,results:r}),n.next=6,this.flush();case 6:case"end":return n.stop()}}),n,this)})))}}])&&Po(e.prototype,n),r&&Po(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Mo=function(t,e){var n,r=t.addTextTrack("metadata","interactive"),o=e.additionalData.interactive,a=null===(n=e.additionalData.clipData)||void 0===n?void 0:n.startTime;return o.timepoints.forEach((function(t){var e,n=t.visibleAt/1e3,o=t.visibleFor?n+t.visibleFor/1e3:n+1;a&&(n+=a,o+=a),(null===(e=t.interactions)||void 0===e?void 0:e.length)&&r.addCue({startTime:n-.001,endTime:o,text:t.id})})),r},Uo=n(417);function Ro(t){return(Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Do(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Do=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new I(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==e&&n.call(v,o)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,a){function i(){return new e((function(r,i){!function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ro(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}function Go(t){return function(t){if(Array.isArray(t))return qo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return qo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qo(t,e)}(t)||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 qo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wo(){return(Wo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zo(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function zo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vo(t)););return t}function Yo(t,e){return(Yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $o(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Vo(t);if(e){var o=Vo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ho(this,n)}}function Ho(t,e){if(e&&("object"===Ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Vo(t){return(Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ko=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}u((r=r.apply(t,e||[])).next())}))},Zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yo(t,e)}(c,t);var e,n,r,o=$o(c);function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=o.call(this,t,e)).totalProgress=[],G.a.setToken("gateway",n.options.authToken),n.player.one("dispose",(function(){n.resultsService&&n.resultsService.stop()})),n.options.mode===l.InteractiveMode.Create&&n.player.addClass("cv-create-interactives"),n}return e=c,(n=[{key:"getPlayerOptions",value:function(){var t=Wo(Vo(c.prototype),"getPlayerOptions",this).call(this);return t.setMaxHeight=!1,this.options.embed||(t.aspectRatio="16:9"),t}},{key:"onFlushProgress",value:function(t){var e;Wo(Vo(c.prototype),"onFlushProgress",this).call(this,t),this.options.mode!==l.InteractiveMode.Create&&(e=this.totalProgress).push.apply(e,Go(t))}},{key:"additionalSetup",value:function(t){var e=this,n=Object.create(null,{additionalSetup:{get:function(){return Wo(Vo(c.prototype),"additionalSetup",e)}}});return Ko(this,void 0,void 0,Do().mark((function e(){return Do().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.additionalSetup.call(this,t),this.setupUpClipPlugin(t),this.setupViewInteractivePlugin(t);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"setupUpClipPlugin",value:function(t){var e;if(null===(e=null==t?void 0:t.additionalData)||void 0===e?void 0:e.clipData){var n=t.additionalData.clipData;this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime})}}},{key:"setupViewInteractivePlugin",value:function(t){var e;this.track=Mo(this.player,t);var n=t.additionalData.interactive,r=null===(e=t.additionalData.clipData)||void 0===e?void 0:e.startTime;this.options.collectResults&&(this.options.currentUser||a.a.ErrorHelper.throw(new i.a("Must provide a currentUser in order to collect interactive results")),this.options.shareId||a.a.ErrorHelper.throw(new i.a("Must provide a shareId in order to collect interactive results")),this.resultsService=new Fo({interactiveId:n.id,mediaId:t.mediaId,userId:this.options.currentUser.id,customerId:this.options.currentUser.customerId,playerApi:this.options.playerApi,shareId:this.options.shareId})),this.player.viewInteractivePlugin({interactive:n,title:t.title,mode:this.options.mode,imageApi:this.options.imageApi,supportSiteUrl:this.options.supportSiteUrl,resultsService:this.resultsService,actionsPortalNode:this.options.actionsPortalNode,questionListPortalNode:this.options.questionListPortalNode,summaryPortalNode:this.options.summaryPortalNode,currentUser:this.options.currentUser,latestSession:t.additionalData.latestSession,progress:this.totalProgress,clipOffset:r,analyticsService:this.analyticsService,onShowSummary:this.options.onShowSummary,onClickEditDetails:this.options.onClickEditDetails,onClickPublish:this.options.onClickPublish})}},{key:"getAdditionalAnalyticsData",value:function(t){var e,n,r,o;return(null===(n=null===(e=t.additionalData)||void 0===e?void 0:e.clipData)||void 0===n?void 0:n.clipId)?{clip:{id:null===(o=null===(r=t.additionalData)||void 0===r?void 0:r.clipData)||void 0===o?void 0:o.clipId}}:{}}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}},{key:"getAnalyticsPlayerType",value:function(){return"interactive-player"}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"setActivityStatus",value:function(t,e){this.player.activityStatusPlugin().setActivityStatus(t,e)}}])&&Bo(e.prototype,n),r&&Bo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),c}(Uo.a);n.d(e,"a",(function(){return Qo}));var Jo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Qo(t){var e=t.onReady,n=t.className,r=Jo(t,["onReady","className"]),a=o.a.useRef();return o.a.useEffect((function(){var t=new Zo(a.current,r);return e&&t.ready((function(){e(t)})),function(){t.dispose()}}),[]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{ref:a,className:n}),o.a.createElement("div",{id:"popup-region"}))}},1284:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(0),o=n.n(r),a=n(282),i=n(1165),c=n(129),u=n(62),l=n(21),s=n(48),f=n(1142),d=n(1185),p=n(1285),m=n.n(p),h="shared.interactiveQuestions";function v(t){var e=t.interaction;switch((0,t.getCorrectness)(e)){case f.a.Correct:return o.a.createElement("span",{className:"text-success"},o.a.createElement(u.a,{size:u.b.Medium,svgName:l.b.Check}));case f.a.Incorrect:return o.a.createElement("span",{className:"text-danger"},o.a.createElement(u.a,{size:u.b.Medium,svgName:l.b.Close}));case f.a.AwaitingMarking:return o.a.createElement("span",{className:"text-muted italic"},o.a.createElement("i",null,o.a.createElement(s.b,{namespace:h,phrase:"pending"})));case f.a.UnAnswered:return o.a.createElement("button",{className:"btn btn-outline-dark"},o.a.createElement(s.b,{namespace:h,phrase:"answer"}));case f.a.Answered:return o.a.createElement("span",{className:"text-muted italic"},o.a.createElement("i",null,o.a.createElement(s.b,{namespace:h,phrase:"answered"})));case f.a.NotApplicable:return o.a.createElement(o.a.Fragment,null)}}function y(t){var e=t.interaction,n=t.visibleAt,r=t.selectedInteractionId,a=t.goToTimepoint,s=t.scrollTo,f=t.isFirstInteraction,p=e.id.toString()===(null==r?void 0:r.toString()),h=o.a.useRef();o.a.useEffect((function(){if(p&&h.current){var t=h.current,e=t.getBoundingClientRect(),n=e.top-t.offsetParent.getBoundingClientRect().top;s(n,e.height)}}),[p]);var y=a?"cursor-pointer":"cursor-default";return o.a.createElement("div",{ref:h},o.a.createElement(c.a,{className:"py-2 ".concat(y," ").concat(m.a.row," ").concat(p?m.a.selected:""),onClick:p?function(){}:function(){a&&a(e.id)}},o.a.createElement("span",{className:"".concat(m.a.time," mr-2 ").concat(p?"font-weight-bold":"")},f?i.a.ToDisplayDuration(n):""),o.a.createElement(d.a,{interaction:e,showTypeName:!0,typeNameClassName:m.a.type,questionClassName:m.a.question}),t.onClickDelete&&o.a.createElement(c.a,{onClick:function(n){n.stopPropagation(),t.onClickDelete(e.id)},className:"".concat(m.a.deleteContainer)},o.a.createElement("span",{className:"text-right ".concat(m.a.delete)},o.a.createElement(u.a,{size:u.b.Medium,svgName:l.b.Delete}))),t.getCorrectness&&o.a.createElement("span",{className:"text-right ".concat(m.a.correctness)},o.a.createElement(v,{interaction:e,getCorrectness:t.getCorrectness}))))}function g(t){var e=t.timepoint,n=t.scrollTo,r=t.onClickDelete,a=t.selectedInteractionId,i=t.getCorrectness;function c(n){t.goToTimepoint&&t.goToTimepoint(e.id,n)}return e.interactions?o.a.createElement("div",null,e.interactions.map((function(t,u){return o.a.createElement(y,{interaction:t,visibleAt:e.visibleAt,goToTimepoint:c,onClickDelete:r,scrollTo:n,selectedInteractionId:a,isFirstInteraction:0===u,getCorrectness:i,key:u})}))):o.a.createElement(o.a.Fragment,null)}function b(t){var e=t.interactive,n=t.goToTimepoint,r=t.selectedInteractionId,i=t.maxHeight,c=t.onClickDelete,u=t.getCorrectness,l=o.a.useRef();function s(t,e){if(l.current){var n=l.current.getClientHeight(),r=l.current.getScrollTop(),o=t+r;(o<r||o+e>r+n)&&l.current.scrollTop(o-n/2+e/2)}}var f=n?"border rounded":"";return o.a.createElement(a.Scrollbars,{autoHeight:!0,autoHeightMax:i,className:f,hideTracksWhenNotNeeded:!0,ref:l},o.a.createElement("div",{className:"px-3 py-1"},e.timepoints.map((function(t,e){return o.a.createElement(g,{key:e,timepoint:t,goToTimepoint:n,selectedInteractionId:r,scrollTo:s,onClickDelete:c,getCorrectness:u})}))))}},1285:function(t,e,n){t.exports={time:"_3B2vs",type:"_3lYII",question:"_3WHlt",deleteContainer:"Dqlwr",delete:"_4TtZ",correctness:"_3G9s-",selected:"_20LzY",row:"_3uCfp"}},1351:function(t,e,n){},1352:function(t,e,n){},1353:function(t,e,n){},1354:function(t,e,n){},1359:function(t,e,n){},1360:function(t,e,n){},1361:function(t,e,n){},1362:function(t,e,n){t.exports={incorrect:"_3pK3B",answer:"_2ItYx",avatarContainer:"_3DkKy"}},1363:function(t,e,n){},1364:function(t,e,n){t.exports={feedback:"_2hJr3",avatarContainer:"_2Ukg-",avatarContainerSmall:"_1E7DW",incorrect:"xbaUc"}},1365:function(t,e,n){t.exports={svg:"_17Ny-",iconButton:"x1ePL",iconWithText:"_2BmJR",iconOnly:"_2DnLq"}},1366:function(t,e,n){},1367:function(t,e,n){},1368:function(t,e,n){},1369:function(t,e,n){},1370:function(t,e,n){t.exports={type:"_3N9_3",dragIcon:"_1GfpD",name:"_3s8vL",dragging:"_1qnqN"}},1371:function(t,e,n){},1372:function(t,e,n){},1373:function(t,e,n){t.exports={interaction:"_3SUOU"}},1374:function(t,e,n){t.exports={progress:"_1myQT"}},1375:function(t,e,n){t.exports={avatarContainer:"_27TEu"}},1376:function(t,e,n){t.exports={feedback:"F7uFH"}},1377:function(t,e,n){t.exports={bar:"_2pc-n"}},1378:function(t,e,n){},1379:function(t,e,n){}}]);
|