@clickview/library-editor 1.1.45-rc.3 → 1.1.46-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/{library-editor-app-9c24416a39.css → library-editor-app-d4e455dc19.css} +1 -1
- package/dist/scripts/{0-2f5a66d67a.chunk.js → 0-39b4264c40.chunk.js} +1 -1
- package/dist/scripts/{1-6e8dcc5ca2.chunk.js → 1-c2f2ee50e1.chunk.js} +1 -1
- package/dist/scripts/{10-a4ab5eff50.chunk.js → 10-74b6a07baa.chunk.js} +1 -1
- package/dist/scripts/{11-3dec7d2c7e.chunk.js → 11-f9ca151e61.chunk.js} +1 -1
- package/dist/scripts/{12-bb9475eac6.chunk.js → 12-a961dabbb5.chunk.js} +1 -1
- package/dist/scripts/{13-de5b2bb606.chunk.js → 13-31b759d4dc.chunk.js} +1 -1
- package/dist/scripts/{14-c671e8bc46.chunk.js → 14-28ab8d5025.chunk.js} +1 -1
- package/dist/scripts/{15-7de7fc2b35.chunk.js → 15-e326770074.chunk.js} +1 -1
- package/dist/scripts/{16-382f0c41cf.chunk.js → 16-33bc415c72.chunk.js} +1 -1
- package/dist/scripts/{17-1eb8479302.chunk.js → 17-4d85362caa.chunk.js} +1 -1
- package/dist/scripts/{2-7cc9176e8a.chunk.js → 2-6334a56d75.chunk.js} +1 -1
- package/dist/scripts/{20-d3444fe825.chunk.js → 20-be33eea416.chunk.js} +1 -1
- package/dist/scripts/{21-df15d4d827.chunk.js → 21-d07eac93af.chunk.js} +1 -1
- package/dist/scripts/{22-5d9b14f0b0.chunk.js → 22-f61848d852.chunk.js} +1 -1
- package/dist/scripts/{23-7922bfa9d3.chunk.js → 23-883535facb.chunk.js} +1 -1
- package/dist/scripts/{24-a675687323.chunk.js → 24-28d1ee1ddb.chunk.js} +1 -1
- package/dist/scripts/{25-a1259842aa.chunk.js → 25-36f6c0f04c.chunk.js} +1 -1
- package/dist/scripts/{26-bbf1c17cb5.chunk.js → 26-41d73fb1cc.chunk.js} +1 -1
- package/dist/scripts/{27-eff11570d8.chunk.js → 27-9faadbc5ad.chunk.js} +1 -1
- package/dist/scripts/{28-285eb18d9a.chunk.js → 28-1abda5ddcd.chunk.js} +1 -1
- package/dist/scripts/{29-b7d2b7cde1.chunk.js → 29-e1b5688929.chunk.js} +1 -1
- package/dist/scripts/{3-aa8256fe40.chunk.js → 3-c468e5f805.chunk.js} +1 -1
- package/dist/scripts/{30-6fdc3a1e11.chunk.js → 30-4331611384.chunk.js} +1 -1
- package/dist/scripts/{31-4a94075827.chunk.js → 31-f594f549df.chunk.js} +1 -1
- package/dist/scripts/{32-7e2b293f23.chunk.js → 32-b5a8e7c2a3.chunk.js} +1 -1
- package/dist/scripts/{33-8de738bfb9.chunk.js → 33-b88d856ab0.chunk.js} +1 -1
- package/dist/scripts/{34-7d112464d3.chunk.js → 34-7fcaaeddea.chunk.js} +1 -1
- package/dist/scripts/{35-e850443dff.chunk.js → 35-e210da4f12.chunk.js} +1 -1
- package/dist/scripts/{36-a480ba6fea.chunk.js → 36-524bf056e4.chunk.js} +1 -1
- package/dist/scripts/{37-43b5d8c3af.chunk.js → 37-0336031536.chunk.js} +1 -1
- package/dist/scripts/{38-1b53bc0747.chunk.js → 38-1aa8ca825c.chunk.js} +1 -1
- package/dist/scripts/{39-674f9ca697.chunk.js → 39-faf8a59822.chunk.js} +1 -1
- package/dist/scripts/{4-9915802afa.chunk.js → 4-4c62127fb2.chunk.js} +1 -1
- package/dist/scripts/{40-4f0571b8a2.chunk.js → 40-9b473a87c2.chunk.js} +1 -1
- package/dist/scripts/{41-5ed5f9712e.chunk.js → 41-20fe91435b.chunk.js} +1 -1
- package/dist/scripts/{42-c280d7752c.chunk.js → 42-143ac3914b.chunk.js} +1 -1
- package/dist/scripts/{43-c0a7d44737.chunk.js → 43-ce726c3839.chunk.js} +1 -1
- package/dist/scripts/{44-b04dab25e6.chunk.js → 44-fc7c025c5f.chunk.js} +1 -1
- package/dist/scripts/{45-a6b9650b26.chunk.js → 45-1e84cd6639.chunk.js} +1 -1
- package/dist/scripts/{46-319d735448.chunk.js → 46-26b40a870e.chunk.js} +1 -1
- package/dist/scripts/{47-87b93cae7d.chunk.js → 47-f03e03252c.chunk.js} +1 -1
- package/dist/scripts/{48-92ee4ae7a7.chunk.js → 48-c9a61fd1e3.chunk.js} +1 -1
- package/dist/scripts/{49-5c6fe71808.chunk.js → 49-2879e96eed.chunk.js} +1 -1
- package/dist/scripts/{5-5341544820.chunk.js → 5-5d2e1c890e.chunk.js} +1 -1
- package/dist/scripts/{50-38186c72b7.chunk.js → 50-b76b6c7d52.chunk.js} +1 -1
- package/dist/scripts/{51-37749b146e.chunk.js → 51-c252822f95.chunk.js} +1 -1
- package/dist/scripts/{52-67c9e2601b.chunk.js → 52-ecde4fecf3.chunk.js} +1 -1
- package/dist/scripts/{53-16ef9ed0cb.chunk.js → 53-3ab3b83088.chunk.js} +1 -1
- package/dist/scripts/{54-8d377c5aff.chunk.js → 54-0e921db390.chunk.js} +1 -1
- package/dist/scripts/{55-2360f690da.chunk.js → 55-bd9dc838cd.chunk.js} +1 -1
- package/dist/scripts/{56-d6e13d4afb.chunk.js → 56-6528a68474.chunk.js} +1 -1
- package/dist/scripts/{57-d31643829d.chunk.js → 57-3477d4f9b5.chunk.js} +1 -1
- package/dist/scripts/{58-21714dd15f.chunk.js → 58-2c62df5dbd.chunk.js} +1 -1
- package/dist/scripts/{59-b36d9e7be9.chunk.js → 59-13ade58ba1.chunk.js} +1 -1
- package/dist/scripts/{6-19be7f0d3b.chunk.js → 6-1fdfa2191a.chunk.js} +1 -1
- package/dist/scripts/{60-86a780fb81.chunk.js → 60-f36c57ef33.chunk.js} +1 -1
- package/dist/scripts/{61-897e3aacfb.chunk.js → 61-24acf3201f.chunk.js} +1 -1
- package/dist/scripts/{62-35425b2e29.chunk.js → 62-d869eccf9a.chunk.js} +1 -1
- package/dist/scripts/{63-714e5c1ee7.chunk.js → 63-d35e9ced47.chunk.js} +1 -1
- package/dist/scripts/{64-6ee45d0114.chunk.js → 64-dfc3cd19ee.chunk.js} +1 -1
- package/dist/scripts/{65-4041af23f8.chunk.js → 65-b66a158393.chunk.js} +1 -1
- package/dist/scripts/{66-1089ec4f34.chunk.js → 66-89b577d70f.chunk.js} +1 -1
- package/dist/scripts/{67-c03fd65497.chunk.js → 67-83b2b3ad1a.chunk.js} +1 -1
- package/dist/scripts/{68-53e4b905db.chunk.js → 68-452e0327d9.chunk.js} +1 -1
- package/dist/scripts/{69-6e315af542.chunk.js → 69-0491a8faf5.chunk.js} +1 -1
- package/dist/scripts/{7-8626ad1134.chunk.js → 7-13b4886b73.chunk.js} +1 -1
- package/dist/scripts/{70-64d4bc3567.chunk.js → 70-62aff2ab4e.chunk.js} +1 -1
- package/dist/scripts/{71-979bac4e9f.chunk.js → 71-91b4d4dfcb.chunk.js} +1 -1
- package/dist/scripts/{72-be5d02bfe6.chunk.js → 72-4d851db609.chunk.js} +1 -1
- package/dist/scripts/{8-ed9e11c370.chunk.js → 8-55ea9736c8.chunk.js} +1 -1
- package/dist/scripts/{9-82e97cb80a.chunk.js → 9-175ec73a5d.chunk.js} +1 -1
- package/dist/scripts/bundle-804e733ae8.min.js +10 -0
- package/dist/scripts/polyfills-e2b8375767.min.js +1 -0
- package/package.json +3 -3
- package/typings/libs/trackjs.d.ts +3 -0
- package/dist/css/0-library-editor.chunk.css +0 -26
- package/dist/css/10-library-editor.chunk.css +0 -25
- package/dist/css/11-library-editor.chunk.css +0 -135
- package/dist/css/12-library-editor.chunk.css +0 -18
- package/dist/css/13-library-editor.chunk.css +0 -21
- package/dist/css/14-library-editor.chunk.css +0 -76
- package/dist/css/16-library-editor.chunk.css +0 -52
- package/dist/css/17-library-editor.chunk.css +0 -14
- package/dist/css/18-library-editor.chunk.css +0 -18
- package/dist/css/2-library-editor.chunk.css +0 -143
- package/dist/css/21-library-editor.chunk.css +0 -52
- package/dist/css/22-library-editor.chunk.css +0 -12
- package/dist/css/23-library-editor.chunk.css +0 -25
- package/dist/css/25-library-editor.chunk.css +0 -35
- package/dist/css/26-library-editor.chunk.css +0 -20
- package/dist/css/28-library-editor.chunk.css +0 -63
- package/dist/css/29-library-editor.chunk.css +0 -80
- package/dist/css/3-library-editor.chunk.css +0 -15
- package/dist/css/30-library-editor.chunk.css +0 -33
- package/dist/css/31-library-editor.chunk.css +0 -30
- package/dist/css/32-library-editor.chunk.css +0 -45
- package/dist/css/33-library-editor.chunk.css +0 -13
- package/dist/css/34-library-editor.chunk.css +0 -19
- package/dist/css/35-library-editor.chunk.css +0 -18
- package/dist/css/36-library-editor.chunk.css +0 -12
- package/dist/css/37-library-editor.chunk.css +0 -5
- package/dist/css/38-library-editor.chunk.css +0 -5
- package/dist/css/40-library-editor.chunk.css +0 -24
- package/dist/css/41-library-editor.chunk.css +0 -76
- package/dist/css/42-library-editor.chunk.css +0 -44
- package/dist/css/43-library-editor.chunk.css +0 -30
- package/dist/css/44-library-editor.chunk.css +0 -12
- package/dist/css/45-library-editor.chunk.css +0 -25
- package/dist/css/46-library-editor.chunk.css +0 -24
- package/dist/css/47-library-editor.chunk.css +0 -84
- package/dist/css/48-library-editor.chunk.css +0 -4
- package/dist/css/49-library-editor.chunk.css +0 -33
- package/dist/css/50-library-editor.chunk.css +0 -20
- package/dist/css/51-library-editor.chunk.css +0 -37
- package/dist/css/52-library-editor.chunk.css +0 -64
- package/dist/css/55-library-editor.chunk.css +0 -3
- package/dist/css/56-library-editor.chunk.css +0 -3
- package/dist/css/58-library-editor.chunk.css +0 -3
- package/dist/css/59-library-editor.chunk.css +0 -3
- package/dist/css/6-library-editor.chunk.css +0 -42
- package/dist/css/60-library-editor.chunk.css +0 -16
- package/dist/css/62-library-editor.chunk.css +0 -4
- package/dist/css/63-library-editor.chunk.css +0 -168
- package/dist/css/67-library-editor.chunk.css +0 -76
- package/dist/css/68-library-editor.chunk.css +0 -15
- package/dist/css/69-library-editor.chunk.css +0 -15
- package/dist/css/7-library-editor.chunk.css +0 -10
- package/dist/css/70-library-editor.chunk.css +0 -21
- package/dist/css/71-library-editor.chunk.css +0 -38
- package/dist/css/72-library-editor.chunk.css +0 -14
- package/dist/css/73-library-editor.chunk.css +0 -35
- package/dist/css/74-library-editor.chunk.css +0 -27
- package/dist/css/75-library-editor.chunk.css +0 -4
- package/dist/css/76-library-editor.chunk.css +0 -4
- package/dist/css/8-library-editor.chunk.css +0 -7
- package/dist/css/library-editor-app.css +0 -9291
- package/dist/scripts/0-298010e33a.chunk.js +0 -1
- package/dist/scripts/0-aaa3608203.chunk.js +0 -1
- package/dist/scripts/0.chunk.js +0 -64
- package/dist/scripts/1-323257c9af.chunk.js +0 -1
- package/dist/scripts/1-c690200bdb.chunk.js +0 -1
- package/dist/scripts/1.chunk.js +0 -75
- package/dist/scripts/10-466cc9683b.chunk.js +0 -1
- package/dist/scripts/10-abb1be81df.chunk.js +0 -1
- package/dist/scripts/10.chunk.js +0 -62
- package/dist/scripts/11-2356f4df85.chunk.js +0 -11
- package/dist/scripts/11-3ea7c37829.chunk.js +0 -11
- package/dist/scripts/11.chunk.js +0 -317
- package/dist/scripts/12-26db35cb21.chunk.js +0 -1
- package/dist/scripts/12-c76d68628d.chunk.js +0 -1
- package/dist/scripts/12.chunk.js +0 -56
- package/dist/scripts/13-a886aeba95.chunk.js +0 -1
- package/dist/scripts/13-ffdf6d7db4.chunk.js +0 -1
- package/dist/scripts/13.chunk.js +0 -25
- package/dist/scripts/14-377ed1af74.chunk.js +0 -1
- package/dist/scripts/14-d80e0ddb3c.chunk.js +0 -1
- package/dist/scripts/14.chunk.js +0 -272
- package/dist/scripts/15-3c4f92249c.chunk.js +0 -1
- package/dist/scripts/15-ac502fa5ec.chunk.js +0 -1
- package/dist/scripts/15.chunk.js +0 -35
- package/dist/scripts/16-082a975dbb.chunk.js +0 -1
- package/dist/scripts/16-783d3e4092.chunk.js +0 -1
- package/dist/scripts/16.chunk.js +0 -79
- package/dist/scripts/17-b13fb41bd3.chunk.js +0 -1
- package/dist/scripts/17-c66a2978ae.chunk.js +0 -1
- package/dist/scripts/17.chunk.js +0 -40
- package/dist/scripts/18.chunk.js +0 -40
- package/dist/scripts/19.chunk.js +0 -43
- package/dist/scripts/2-717e5953ab.chunk.js +0 -1
- package/dist/scripts/2-8e809f7467.chunk.js +0 -1
- package/dist/scripts/2.chunk.js +0 -33
- package/dist/scripts/20-6dd45d4f46.chunk.js +0 -1
- package/dist/scripts/20-fa33bbf746.chunk.js +0 -1
- package/dist/scripts/20.chunk.js +0 -18
- package/dist/scripts/21-4de1bd55b0.chunk.js +0 -1
- package/dist/scripts/21-dadfbacfbc.chunk.js +0 -1
- package/dist/scripts/21.chunk.js +0 -55
- package/dist/scripts/22-6d8b1c21c5.chunk.js +0 -1
- package/dist/scripts/22-d381139a29.chunk.js +0 -1
- package/dist/scripts/22.chunk.js +0 -47
- package/dist/scripts/23-30dffdfecf.chunk.js +0 -1
- package/dist/scripts/23-9f6cc70b65.chunk.js +0 -1
- package/dist/scripts/23.chunk.js +0 -47
- package/dist/scripts/24-7406b564f6.chunk.js +0 -1
- package/dist/scripts/24-b6ec3366cb.chunk.js +0 -1
- package/dist/scripts/24.chunk.js +0 -33
- package/dist/scripts/25-7faa89d5e3.chunk.js +0 -1
- package/dist/scripts/25-d7396e955d.chunk.js +0 -1
- package/dist/scripts/25.chunk.js +0 -25
- package/dist/scripts/26-2d98320aae.chunk.js +0 -1
- package/dist/scripts/26-c1fc20583b.chunk.js +0 -1
- package/dist/scripts/26.chunk.js +0 -25
- package/dist/scripts/27-31485d4b2a.chunk.js +0 -1
- package/dist/scripts/27-531532942a.chunk.js +0 -1
- package/dist/scripts/27.chunk.js +0 -10
- package/dist/scripts/28-b71b9ac0eb.chunk.js +0 -1
- package/dist/scripts/28-e85da77e0f.chunk.js +0 -1
- package/dist/scripts/28.chunk.js +0 -334
- package/dist/scripts/29-7be825c44d.chunk.js +0 -1
- package/dist/scripts/29-d980d0cbb5.chunk.js +0 -1
- package/dist/scripts/29.chunk.js +0 -202
- package/dist/scripts/3-151fc3d544.chunk.js +0 -1
- package/dist/scripts/3-eeb2d3d492.chunk.js +0 -1
- package/dist/scripts/3.chunk.js +0 -57
- package/dist/scripts/30-0e805630f4.chunk.js +0 -1
- package/dist/scripts/30-ad62e78d54.chunk.js +0 -1
- package/dist/scripts/30.chunk.js +0 -137
- package/dist/scripts/31-49c7676cff.chunk.js +0 -1
- package/dist/scripts/31-b1a679306a.chunk.js +0 -1
- package/dist/scripts/31.chunk.js +0 -113
- package/dist/scripts/32-042cda92ae.chunk.js +0 -1
- package/dist/scripts/32-e448ef7e82.chunk.js +0 -1
- package/dist/scripts/32.chunk.js +0 -115
- package/dist/scripts/33-36ddd95595.chunk.js +0 -1
- package/dist/scripts/33-b5cf4cfa6f.chunk.js +0 -1
- package/dist/scripts/33.chunk.js +0 -93
- package/dist/scripts/34-894005f525.chunk.js +0 -1
- package/dist/scripts/34-b206a218e9.chunk.js +0 -1
- package/dist/scripts/34.chunk.js +0 -63
- package/dist/scripts/35-9cdb858587.chunk.js +0 -1
- package/dist/scripts/35-d0137a950e.chunk.js +0 -1
- package/dist/scripts/35.chunk.js +0 -48
- package/dist/scripts/36-54624daa85.chunk.js +0 -1
- package/dist/scripts/36-846ab1a7ae.chunk.js +0 -1
- package/dist/scripts/36.chunk.js +0 -33
- package/dist/scripts/37-3314327a46.chunk.js +0 -1
- package/dist/scripts/37-6ffb96d64b.chunk.js +0 -1
- package/dist/scripts/37.chunk.js +0 -25
- package/dist/scripts/38-a18528bd5a.chunk.js +0 -1
- package/dist/scripts/38-d5dc6c775d.chunk.js +0 -1
- package/dist/scripts/38.chunk.js +0 -25
- package/dist/scripts/39-a4d5bf70ed.chunk.js +0 -1
- package/dist/scripts/39-d1b6c2defd.chunk.js +0 -1
- package/dist/scripts/39.chunk.js +0 -19
- package/dist/scripts/4-3516e54324.chunk.js +0 -1
- package/dist/scripts/4-adab2b69d4.chunk.js +0 -1
- package/dist/scripts/4.chunk.js +0 -26
- package/dist/scripts/40-264a3768ac.chunk.js +0 -1
- package/dist/scripts/40-bc2c6ae993.chunk.js +0 -1
- package/dist/scripts/40.chunk.js +0 -182
- package/dist/scripts/41-2084077727.chunk.js +0 -1
- package/dist/scripts/41-a4121258fa.chunk.js +0 -1
- package/dist/scripts/41.chunk.js +0 -175
- package/dist/scripts/42-16c4690eeb.chunk.js +0 -1
- package/dist/scripts/42-6b99047385.chunk.js +0 -1
- package/dist/scripts/42.chunk.js +0 -176
- package/dist/scripts/43-16efe31266.chunk.js +0 -1
- package/dist/scripts/43-f0a2833261.chunk.js +0 -1
- package/dist/scripts/43.chunk.js +0 -121
- package/dist/scripts/44-66950d4440.chunk.js +0 -1
- package/dist/scripts/44-dbc3731bcb.chunk.js +0 -1
- package/dist/scripts/44.chunk.js +0 -122
- package/dist/scripts/45-6dd66a0ec6.chunk.js +0 -1
- package/dist/scripts/45-bc07f6ed34.chunk.js +0 -1
- package/dist/scripts/45.chunk.js +0 -85
- package/dist/scripts/46-1188acdeb9.chunk.js +0 -1
- package/dist/scripts/46-b403f6be5b.chunk.js +0 -1
- package/dist/scripts/46.chunk.js +0 -78
- package/dist/scripts/47-2964488de7.chunk.js +0 -1
- package/dist/scripts/47-b482682154.chunk.js +0 -1
- package/dist/scripts/47.chunk.js +0 -70
- package/dist/scripts/48-48a409c875.chunk.js +0 -1
- package/dist/scripts/48-d924ddb603.chunk.js +0 -1
- package/dist/scripts/48.chunk.js +0 -88
- package/dist/scripts/49-3728b15a3c.chunk.js +0 -1
- package/dist/scripts/49-a76be85054.chunk.js +0 -1
- package/dist/scripts/49.chunk.js +0 -62
- package/dist/scripts/5-3fe2876121.chunk.js +0 -1
- package/dist/scripts/5-c3a1e51e77.chunk.js +0 -1
- package/dist/scripts/5.chunk.js +0 -10
- package/dist/scripts/50-06212d1dc8.chunk.js +0 -1
- package/dist/scripts/50-a20245292f.chunk.js +0 -1
- package/dist/scripts/50.chunk.js +0 -64
- package/dist/scripts/51-4e98f3c73f.chunk.js +0 -1
- package/dist/scripts/51-af622cc279.chunk.js +0 -1
- package/dist/scripts/51.chunk.js +0 -55
- package/dist/scripts/52-1ece273b07.chunk.js +0 -1
- package/dist/scripts/52-c988320a6f.chunk.js +0 -1
- package/dist/scripts/52.chunk.js +0 -47
- package/dist/scripts/53-1514119651.chunk.js +0 -1
- package/dist/scripts/53-eae4eb72dc.chunk.js +0 -1
- package/dist/scripts/53.chunk.js +0 -56
- package/dist/scripts/54-56e7cb4493.chunk.js +0 -1
- package/dist/scripts/54-f489df5eda.chunk.js +0 -1
- package/dist/scripts/54.chunk.js +0 -56
- package/dist/scripts/55-b621cecfd3.chunk.js +0 -1
- package/dist/scripts/55-c7303d997f.chunk.js +0 -1
- package/dist/scripts/55.chunk.js +0 -41
- package/dist/scripts/56-53c4bdf797.chunk.js +0 -1
- package/dist/scripts/56-db9dbfd5fa.chunk.js +0 -1
- package/dist/scripts/56.chunk.js +0 -41
- package/dist/scripts/57-be599f08b2.chunk.js +0 -1
- package/dist/scripts/57-fb4f8ce1ab.chunk.js +0 -1
- package/dist/scripts/57.chunk.js +0 -50
- package/dist/scripts/58-8d1653ecd7.chunk.js +0 -1
- package/dist/scripts/58-c0e985cbc4.chunk.js +0 -1
- package/dist/scripts/58.chunk.js +0 -33
- package/dist/scripts/59-9b9c8c0f2d.chunk.js +0 -1
- package/dist/scripts/59-fcf6a940d6.chunk.js +0 -1
- package/dist/scripts/59.chunk.js +0 -33
- package/dist/scripts/6-a39d1f4585.chunk.js +0 -1
- package/dist/scripts/6-deb7609cc9.chunk.js +0 -1
- package/dist/scripts/6.chunk.js +0 -40
- package/dist/scripts/60-6995cd4cf5.chunk.js +0 -1
- package/dist/scripts/60-b4f7090720.chunk.js +0 -1
- package/dist/scripts/60.chunk.js +0 -33
- package/dist/scripts/61-7d1475b277.chunk.js +0 -1
- package/dist/scripts/61-cac68e627b.chunk.js +0 -1
- package/dist/scripts/61.chunk.js +0 -33
- package/dist/scripts/62-2aa55f08d5.chunk.js +0 -1
- package/dist/scripts/62-3a96a88b11.chunk.js +0 -1
- package/dist/scripts/62.chunk.js +0 -25
- package/dist/scripts/63-65744e61fe.chunk.js +0 -1
- package/dist/scripts/63-90bb249d0f.chunk.js +0 -1
- package/dist/scripts/63.chunk.js +0 -25
- package/dist/scripts/64-4f64cd6916.chunk.js +0 -1
- package/dist/scripts/64-b92f429d9a.chunk.js +0 -1
- package/dist/scripts/64.chunk.js +0 -33
- package/dist/scripts/65-179891d951.chunk.js +0 -1
- package/dist/scripts/65-fe362dec65.chunk.js +0 -1
- package/dist/scripts/65.chunk.js +0 -34
- package/dist/scripts/66-0bda221806.chunk.js +0 -1
- package/dist/scripts/66-b1de02727e.chunk.js +0 -1
- package/dist/scripts/66.chunk.js +0 -33
- package/dist/scripts/67-9773a2f9cf.chunk.js +0 -1
- package/dist/scripts/67-fc341ce660.chunk.js +0 -1
- package/dist/scripts/67.chunk.js +0 -25
- package/dist/scripts/68-2ff366d408.chunk.js +0 -1
- package/dist/scripts/68-c6ef8701a2.chunk.js +0 -1
- package/dist/scripts/68.chunk.js +0 -25
- package/dist/scripts/69-4af679bc4c.chunk.js +0 -1
- package/dist/scripts/69-5368c32a2e.chunk.js +0 -1
- package/dist/scripts/69.chunk.js +0 -25
- package/dist/scripts/7-c387d70c9b.chunk.js +0 -1
- package/dist/scripts/7-c86af5cc3a.chunk.js +0 -1
- package/dist/scripts/7.chunk.js +0 -33
- package/dist/scripts/70-3650ef74f8.chunk.js +0 -1
- package/dist/scripts/70-e782f523de.chunk.js +0 -1
- package/dist/scripts/70.chunk.js +0 -25
- package/dist/scripts/71-a45419aed7.chunk.js +0 -1
- package/dist/scripts/71-cf362223a9.chunk.js +0 -1
- package/dist/scripts/71.chunk.js +0 -25
- package/dist/scripts/72-3f71367bdd.chunk.js +0 -1
- package/dist/scripts/72-93adcc17c5.chunk.js +0 -1
- package/dist/scripts/72.chunk.js +0 -25
- package/dist/scripts/73.chunk.js +0 -25
- package/dist/scripts/74.chunk.js +0 -25
- package/dist/scripts/75.chunk.js +0 -25
- package/dist/scripts/76.chunk.js +0 -25
- package/dist/scripts/77.chunk.js +0 -26
- package/dist/scripts/78.chunk.js +0 -26
- package/dist/scripts/79.chunk.js +0 -26
- package/dist/scripts/8-2e66d6cb35.chunk.js +0 -1
- package/dist/scripts/8-82c9c86dfd.chunk.js +0 -1
- package/dist/scripts/8.chunk.js +0 -33
- package/dist/scripts/80.chunk.js +0 -26
- package/dist/scripts/81.chunk.js +0 -26
- package/dist/scripts/82.chunk.js +0 -26
- package/dist/scripts/83.chunk.js +0 -26
- package/dist/scripts/84.chunk.js +0 -26
- package/dist/scripts/85.chunk.js +0 -26
- package/dist/scripts/86.chunk.js +0 -18
- package/dist/scripts/87.chunk.js +0 -18
- package/dist/scripts/88.chunk.js +0 -18
- package/dist/scripts/89.chunk.js +0 -18
- package/dist/scripts/9-61225547b6.chunk.js +0 -1
- package/dist/scripts/9-bd46228181.chunk.js +0 -1
- package/dist/scripts/9.chunk.js +0 -18
- package/dist/scripts/90.chunk.js +0 -18
- package/dist/scripts/91.chunk.js +0 -18
- package/dist/scripts/92.chunk.js +0 -18
- package/dist/scripts/bundle-39b749b21d.min.js +0 -10
- package/dist/scripts/bundle-42046b5b88.min.js +0 -10
- package/dist/scripts/bundle-a8b8854ef1.min.js +0 -10
- package/dist/scripts/bundle-f18858be26.min.js +0 -10
- package/dist/scripts/bundle.js +0 -8153
- package/dist/scripts/polyfills-022d27190f.min.js +0 -1
- package/dist/scripts/polyfills-5139b6bb05.min.js +0 -1
- package/dist/scripts/polyfills-b0f2bc073f.min.js +0 -1
- package/dist/scripts/polyfills.js +0 -2701
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[34],{1026:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),i=n(262);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,a=c(l);function l(){return o(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"defaults",value:function(){return e={},t=i.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&u(t.prototype,n),r&&u(t,r),l}(r.a.Model)},1032:function(e,t,n){"use strict";var r=n(1037),i=n(1033),a=(n(1034),n(3),n(1038)),o=(n(1040),n(1036));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return i.g})),n.d(t,"g",(function(){return i.j})),n.d(t,"f",(function(){return i.i})),n.d(t,"c",(function(){return i.f})),n.d(t,"e",(function(){return i.h})),n.d(t,"b",(function(){return a.a})),n.d(t,"h",(function(){return o.a}))},1033:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"e",(function(){return h})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return w})),n.d(t,"f",(function(){return P})),n.d(t,"h",(function(){return y}));var r=n(2),i=n(1),a=n(18),o=n(29),u=n(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?f(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var d={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,d.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var u=e.get(o);(u instanceof r.a.Model||u instanceof r.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),u=t.get(a).map((function(e){return e.id})),s=i.filter(o,(function(e){return e&&!i.contains(u,e)}));s.length&&(r[a]=s)}})),r}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},m=o().year(),h={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>m?u.a.getPhrase(s,"validProductionYears",{currentYear:m}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},k={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function w(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1034:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(48),a=n(166),o=n(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},s,c(i,a)):t?s:n?c(i,a):void 0}},1036:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(17),i=n(3),a=n(195),o=n(1052),u=n(61);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return i.a.getPhrase(l,"exchange");case u.a.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(s(t={},c.Pdf,r.b.FilePDF),s(t,c.Image,r.b.FileImg),s(t,c.PowerPoint,r.b.FilePowerpoint),s(t,c.Document,r.b.FileWord),s(t,c.Excel,r.b.FileExcel),s(t,c.Zip,r.b.FileZip),s(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.MetadataType.VideoTitle:t+="VideoTitle";break;case a.MetadataType.Description:t+="Description";break;case a.MetadataType.Rating:t+="Rating";break;case a.MetadataType.SeriesTitle:t+="SeriesTitle";break;case a.MetadataType.Season:t+="SeasonNumber";break;case a.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case a.MetadataType.BroadcastDate:t+="BroadcastDate";break;case a.MetadataType.Channel:t+="Channel";break;case a.MetadataType.ProductionYear:t+="ProductionYear";break;case a.MetadataType.Distributors:t+="Distributors";break;case a.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case a.MetadataType.Directors:t+="Directors";break;case a.MetadataType.Producers:t+="Producers";break;case a.MetadataType.Other:t+="Other"}return i.a.getPhrase(l,t)}}},1037:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n(13),a=n(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>i.x.millisecondsToSeconds(n))return s.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?s.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?s.Name.Exists():r.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},s={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1038:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},1040:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(1033),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.e.productionYear.apply(null,t)}}},1052:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1311:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=t?t.options:t)?a.spinnerEl:a,t))?a:"")+"\r\n"},3:function(e,t,n,r,i){return'<form>\r\n <div class="form-group">\r\n <label for="url" class="control-label">URL</label>\r\n <input name="url" id="url" type="text" class="form-control" placeholder="URL" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n <div class="form-group">\r\n <label for="name" class="control-label">Name</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="Name" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var a;e.propertyIsEnumerable;return null!=(a=n.unless.call(null!=t?t:e.nullContext||{},null!=(a=null!=t?t.options:t)?a.dataFetched:a,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:""},useData:!0})},1430:function(e,t,n){"use strict";n.r(t),n.d(t,"EditLinkView",(function(){return w}));var r=n(6),i=n(2),a=n(5),o=n(30),u=n(42),s=n(301),c=n(262),l=n(13),f=n(0),d=n(189),p=n(1026),m=n(1032),h=n(1311),g=n.n(h);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(E,e);var t,n,h,b=P(E);function E(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),b.call(this,e)}return t=E,(n=[{key:"initialize",value:function(){this.listenTo(f.e.LINK,"link:".concat(this.options.linkId,":sync"),this.render),this.linkDataService=a.a.getInstance(f.g.Link,this)}},{key:"name",get:function(){return"EditLinkView"}},{key:"title",get:function(){return"Edit link"}},{key:"template",get:function(){return g.a}},{key:"channelName",get:function(){return l.k.generateUniqueChannelName(this)}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.e,title:"Edit link",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.a,buttonText:"Save",onClick:function(t){return e.onSubmit(t)}}}]}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(c.b.ShowSpinner),this.linkDataService.updateLink(this.options.videoId,this.viewModel,(function(){t.logAction(),i.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.linkId,parentId:+this.options.videoId,name:this.viewModel.get("name")};u.a.logUserAction(e,this.options.analyticsOptions)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.linkDataService.getLink(this.options.linkId,(function(t){e.viewModel=o.a.get("link:".concat(e.options.linkId),t.toJSON(),{ctor:d.a}),e.viewModel.addValidation(m.c)})),this.dataFetched()&&this.spinnerModel.set(c.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:l.r.getSpinner({size:l.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),r.Validation.bind(this,{model:this.viewModel}))}},{key:"onClose",value:function(){this.unstickit()}}])&&y(t.prototype,n),h&&y(t,h),E}(i.a.View)}}]);
|
package/dist/scripts/34.chunk.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
(window["webpackJsonp_clickview_library_editor"] = window["webpackJsonp_clickview_library_editor"] || []).push([[34],{
|
|
2
|
-
|
|
3
|
-
/***/ "./src/apps/library-editor/components/chapter-form/ChapterForm.hbs":
|
|
4
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
5
|
-
|
|
6
|
-
eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {}), alias5=container.hooks.helperMissing;\n\n return \" <div class=\\\"col-6 form-group\\\">\\r\\n <label class=\\\"d-block\\\" for=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.timeId : stack1), depth0))\n + \"\\\">\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"startTimeLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</label>\\r\\n <input\\r\\n class=\\\"form-control d-inline-block col-3 time-input hour-input\\\"\\r\\n type=\\\"number\\\"\\r\\n placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"hoursPlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\"\\r\\n name=\\\"hours\\\"\\r\\n autocomplete=\\\"off\\\"\\r\\n \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.hrDisabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"> <b>:</b>\\r\\n <input\\r\\n class=\\\"form-control d-inline-block col-3 time-input minute-input\\\"\\r\\n type=\\\"number\\\"\\r\\n placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"minutesPlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\"\\r\\n name=\\\"minutes\\\"\\r\\n autocomplete=\\\"off\\\"\\r\\n \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.minDisabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"> <b>:</b>\\r\\n <input\\r\\n class=\\\"form-control d-inline-block col-3 time-input second-input\\\"\\r\\n type=\\\"number\\\"\\r\\n placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"secondsPlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\"\\r\\n name=\\\"seconds\\\"\\r\\n id=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.timeId : stack1), depth0))\n + \"\\\"\\r\\n autocomplete=\\\"off\\\"\\r\\n \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.secDisabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \">\\r\\n <div class=\\\"form-feedback\\\"></div>\\r\\n </div>\\r\\n\";\n},\"2\":function(container,depth0,helpers,partials,data) {\n return \"disabled\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \" <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-sm ml-2\\\">\\r\\n <span class=\\\"d-inline-block align-middle svg-container\\\">\"\n + ((stack1 = container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.plusSvg : stack1), depth0)) != null ? stack1 : \"\")\n + \"</span>\\r\\n <span class=\\\"align-middle\\\">\"\n + container.escapeExpression((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"add\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</span>\\r\\n </button>\\r\\n\";\n},\"6\":function(container,depth0,helpers,partials,data) {\n var alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=container.escapeExpression;\n\n return \" <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-sm ml-2\\\">\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"save\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</button>\\r\\n <button type=\\\"button\\\" class=\\\"btn btn-secondary btn-sm cancel ml-2\\\">\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"cancel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</button>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {}), alias5=container.hooks.helperMissing;\n\n return \"<div class=\\\"row\\\">\\r\\n <div class=\\\"col-6 form-group\\\">\\r\\n <label for=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.chapterId : stack1), depth0))\n + \"\\\">\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"nameLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</label>\\r\\n <input type=\\\"text\\\" class=\\\"form-control chapter-name\\\" name=\\\"name\\\" id=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.chapterId : stack1), depth0))\n + \"\\\" placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"namePlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\" autofocus autocomplete=\\\"off\\\">\\r\\n <div class=\\\"form-feedback\\\"></div>\\r\\n </div>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.enabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</div>\\r\\n\\r\\n<div class=\\\"row\\\">\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.creating : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.editing : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(6, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</div>\";\n},\"useData\":true});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItZm9ybS9DaGFwdGVyRm9ybS5oYnMuanMiLCJzb3VyY2VzIjpbImZpbGU6Ly9DOi9DbGlja1ZpZXcgUHJvamVjdHMvQGNsaWNrdmlldy9wYWNrYWdlcy9wcm9qZWN0cy9saWJyYXJ5LWVkaXRvci9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItZm9ybS9DaGFwdGVyRm9ybS5oYnMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIEhhbmRsZWJhcnMgPSByZXF1aXJlKCdoYW5kbGViYXJzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IChIYW5kbGViYXJzWydkZWZhdWx0J10gfHwgSGFuZGxlYmFycykudGVtcGxhdGUoe1wiMVwiOmZ1bmN0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PyBkZXB0aDAub3B0aW9ucyA6IGRlcHRoMCkpICE9IG51bGwgPyBzdGFjazEuZWRpdGluZyA6IHN0YWNrMSkse1wibmFtZVwiOlwiaWZcIixcImhhc2hcIjp7fSxcImZuXCI6Y29udGFpbmVyLnByb2dyYW0oNiwgZGF0YSwgMCksXCJpbnZlcnNlXCI6Y29udGFpbmVyLm5vb3AsXCJkYXRhXCI6ZGF0YX0pKSAhPSBudWxsID8gc3RhY2sxIDogXCJcIilcbiAgICArIFwiPC9kaXY+XCI7XG59LFwidXNlRGF0YVwiOnRydWV9KTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-form/ChapterForm.hbs\n");
|
|
7
|
-
|
|
8
|
-
/***/ }),
|
|
9
|
-
|
|
10
|
-
/***/ "./src/apps/library-editor/components/chapter-form/ChapterFormComponent.ts":
|
|
11
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12
|
-
|
|
13
|
-
"use strict";
|
|
14
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChapterFormComponent\", function() { return ChapterFormComponent; });\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"backbone\");\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"../../libs/common/src/backbone/services/ViewModelService.ts\");\n/* harmony import */ var libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"../../libs/shared/src/utils/SvgHelper.ts\");\n/* harmony import */ var shared_behaviors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/shared/behaviors/index.ts\");\n/* harmony import */ var shared_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\"./src/shared/utils/index.ts\");\n/* harmony import */ var apps_library_editor_utils_ChapterHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\"./src/apps/library-editor/utils/ChapterHelper.ts\");\n/* harmony import */ var apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\"./src/apps/library-editor/constants/index.ts\");\n/* harmony import */ var _ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-form/ChapterForm.hbs\");\n/* harmony import */ var _ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\n\n\nvar ENTER_KEYCODE = 13;\nvar ChapterFormComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(ChapterFormComponent, _Core$Component);\n\n var _super = _createSuper(ChapterFormComponent);\n\n function ChapterFormComponent(options) {\n _classCallCheck(this, ChapterFormComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(ChapterFormComponent, [{\n key: \"initialize\",\n value: function initialize() {\n if (this.options.playerViewModelKey) this.listenToPlayerViewModel();\n this.initViewModel();\n if (this.options.editing) this.syncTime();\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'ChapterFormComponent';\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.chapterForm';\n }\n }, {\n key: \"tagName\",\n get: function get() {\n return 'form';\n }\n }, {\n key: \"viewModelName\",\n get: function get() {\n return \"\".concat(this.name, \":\").concat(this.cid);\n }\n }, {\n key: \"template\",\n get: function get() {\n return _ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8___default.a;\n }\n }, {\n key: \"className\",\n get: function get() {\n return this.options.creating ? 'py-3' : 'border-top p-2';\n }\n }, {\n key: \"behaviors\",\n get: function get() {\n return [{\n behaviorClass: shared_behaviors__WEBPACK_IMPORTED_MODULE_4__[\"BackboneValidationBehavior\"],\n bindViewModel: true\n }, {\n behaviorClass: shared_behaviors__WEBPACK_IMPORTED_MODULE_4__[\"StickitBehavior\"],\n bindViewModel: true\n }];\n }\n }, {\n key: \"events\",\n value: function events() {\n return {\n 'submit': 'onSubmit',\n 'change .chapter-name': 'validateName',\n 'keyup .chapter-name': 'validateName',\n 'change .time-input': 'onTimeInputUpdate',\n 'click .time-input': 'onTimeInputUpdate',\n 'keyup .time-input': 'onTimeInputUpdate',\n 'click .cancel': 'destroyView'\n };\n }\n }, {\n key: \"bindings\",\n get: function get() {\n return {\n '[name=name]': {\n observe: 'name',\n setOptions: {\n validate: true\n }\n },\n '[name=hours]': {\n observe: 'hours',\n setOptions: {\n validate: true\n }\n },\n '[name=minutes]': {\n observe: 'minutes',\n setOptions: {\n validate: true\n }\n },\n '[name=seconds]': {\n observe: 'seconds',\n setOptions: {\n validate: true\n }\n }\n };\n }\n }, {\n key: \"initViewModel\",\n value: function initViewModel() {\n this.viewModel = libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__[\"ViewModelService\"].get(this.viewModelName, this.model.toJSON());\n }\n /**\r\n * Synchronise start time based on current player's playback position\r\n */\n\n }, {\n key: \"listenToPlayerViewModel\",\n value: function listenToPlayerViewModel() {\n var playerViewModel = libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__[\"ViewModelService\"].get(this.options.playerViewModelKey);\n this.listenTo(playerViewModel, 'change:currenttime', this.updateTime);\n }\n /**\r\n * Set the value of each time input, syncing with the webplayer current time\r\n */\n\n }, {\n key: \"updateTime\",\n value: function updateTime(player) {\n this.webPlayerTime = player.get('currenttime');\n this.syncTime();\n }\n }, {\n key: \"syncTime\",\n value: function syncTime() {\n // The start time of the chapter, or the current webplayer time\n var time = this.viewModel.get('startTime') || this.webPlayerTime;\n this.viewModel.set({\n hours: shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getHoursComponent(time),\n minutes: shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getMinutesComponent(time),\n seconds: shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getSecondsComponent(time)\n });\n }\n /**\r\n * The time constructed from each time input in seconds\r\n * Returns -1 if any time component is negative, or all time components are undefined\r\n */\n\n }, {\n key: \"getNewTime\",\n value: function getNewTime() {\n if (!this.enabled()) return 0;\n return shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].parseTime(this.viewModel.pick('hours', 'minutes', 'seconds'));\n }\n /**\r\n * Whether the time input's are enabled\r\n * Is true for all chapters except for the first existing chapter\r\n */\n\n }, {\n key: \"enabled\",\n value: function enabled() {\n return this.options.creating || this.model.collection.indexOf(this.model) !== 0;\n }\n /**\r\n * Returns the maximum values for hours, minutes and seconds\r\n * based on the duration of the video\r\n */\n\n }, {\n key: \"maxTimes\",\n value: function maxTimes() {\n var duration = shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].millisecondsToSeconds(this.options.duration);\n var maxHr = shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getHoursComponent(duration);\n var maxMin = maxHr > 0 ? 59 : shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getMinutesComponent(duration);\n var maxSec = maxMin > 0 ? 59 : shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getSecondsComponent(duration);\n return {\n maxHr: maxHr,\n maxMin: maxMin,\n maxSec: maxSec\n };\n }\n /**\r\n * Called when any of the 3 time inputs are updated\r\n * If we are creating a chapter, the webplayer time is also updated\r\n */\n\n }, {\n key: \"onTimeInputUpdate\",\n value: function onTimeInputUpdate() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].UpdateChapterTime, this.getNewTime());\n this.validateStartTime();\n }\n }, {\n key: \"destroyView\",\n value: function destroyView() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].CancelChapterEdit);\n this.destroy();\n }\n /**\r\n * When a chapter is added or saved, validate the new values\r\n * and trigger appropriate event to update the chapter list\r\n */\n\n }, {\n key: \"onSubmit\",\n value: function onSubmit(e) {\n e.preventDefault();\n if (!this.validate()) return false;\n var newChapter = {\n id: this.viewModel.get('id'),\n name: this.viewModel.get('name'),\n startTime: this.getNewTime()\n };\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName); // Update or create chapter depending on where the component is being rendered\n\n var chapterChangeEvent = apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].CreateChapter;\n if (this.options.editing) chapterChangeEvent = apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].UpdateChapter;\n channel.trigger(chapterChangeEvent, newChapter);\n this.stopListening(this.viewModel);\n libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__[\"ViewModelService\"].clear(this.viewModelName);\n }\n }, {\n key: \"validate\",\n value: function validate() {\n this.viewModel.validate();\n var validStartTime = this.validateStartTime();\n var validateName = this.validateName();\n return this.viewModel.isValid() && validStartTime && validateName;\n }\n }, {\n key: \"validateStartTime\",\n value: function validateStartTime() {\n var _this = this;\n\n var _Backbone$Validation$ = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Validation\"].callbacks,\n valid = _Backbone$Validation$.valid,\n invalid = _Backbone$Validation$.invalid;\n var parentCollection = this.model.collection || this.options.collection;\n var newTime = this.getNewTime();\n var invalidTimeMessage = apps_library_editor_utils_ChapterHelper__WEBPACK_IMPORTED_MODULE_6__[\"ChapterHelpers\"].isValidChapterTime(this.model, newTime, this.options.duration, parentCollection);\n var invalidTimeProps = [];\n var validTimeProps = ['seconds', 'minutes', 'hours'];\n\n if (newTime < 0) {\n invalidTimeProps = validTimeProps;\n } else if (invalidTimeMessage) {\n invalidTimeProps.push('seconds');\n if (newTime > 59) invalidTimeProps.push('minutes');\n if (newTime > 59 * 60) invalidTimeProps.push('hours');\n }\n\n validTimeProps.forEach(function (prop) {\n return valid(_this, prop, null);\n });\n invalidTimeProps.forEach(function (prop) {\n return invalid(_this, prop, invalidTimeMessage, null);\n });\n return !invalidTimeMessage;\n }\n }, {\n key: \"validateName\",\n value: function validateName(e) {\n if (e && e.keyCode === ENTER_KEYCODE) return;\n var _Backbone$Validation$2 = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Validation\"].callbacks,\n valid = _Backbone$Validation$2.valid,\n invalid = _Backbone$Validation$2.invalid;\n var parentCollection = this.model.collection || this.options.collection;\n var invalidNameMessage = apps_library_editor_utils_ChapterHelper__WEBPACK_IMPORTED_MODULE_6__[\"ChapterHelpers\"].isValidChapterName(this.model, this.viewModel.get('name'), parentCollection);\n if (!invalidNameMessage) valid(this, 'name', null);else invalid(this, 'name', invalidNameMessage, null);\n return !invalidNameMessage;\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n var _this$maxTimes = this.maxTimes(),\n maxHr = _this$maxTimes.maxHr,\n maxMin = _this$maxTimes.maxMin,\n maxSec = _this$maxTimes.maxSec;\n\n var secDisabled = maxSec === 0;\n var minDisabled = maxMin === 0;\n var hrDisabled = maxHr === 0;\n return Object.assign(Object.assign({}, this.options), {\n enabled: this.enabled(),\n timeId: \"\".concat(this.cid, \"-time\"),\n chapterId: \"\".concat(this.cid, \"-chapter-name\"),\n plusSvg: libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_3__[\"SvgHelper\"].getSvg(libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_3__[\"cvSvgLibrary\"].Plus),\n secDisabled: secDisabled,\n minDisabled: minDisabled,\n hrDisabled: hrDisabled\n });\n }\n }]);\n\n return ChapterFormComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_1__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItZm9ybS9DaGFwdGVyRm9ybUNvbXBvbmVudC50cy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9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0E7QUFFQTs7O0FBR0E7QUFDQTtBQXpLQTtBQUFBO0FBQUE7QUEwS0E7QUFFQTtBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBSEE7QUFNQTtBQUNBO0FBRUE7QUFFQTtBQUdBO0FBRUE7QUFDQTtBQUNBO0FBak1BO0FBQUE7QUFBQTtBQW9NQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBeE1BO0FBQUE7QUFBQTtBQTBNQTtBQUNBO0FBREE7QUFBQTtBQUFBO0FBRUE7QUFFQTtBQUVBO0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQTtBQUVBO0FBQ0E7QUFuT0E7QUFBQTtBQUFBO0FBc09BO0FBREE7QUFBQTtBQUFBO0FBSUE7QUFFQTtBQUVBO0FBS0E7QUFDQTtBQW5QQTtBQUFBO0FBQUE7QUFxUEE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFMQTtBQU9BO0FBcFFBO0FBQ0E7QUFEQTtBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-form/ChapterFormComponent.ts\n");
|
|
15
|
-
|
|
16
|
-
/***/ }),
|
|
17
|
-
|
|
18
|
-
/***/ "./src/apps/library-editor/components/chapter-list/ChapterComponentCollection.ts":
|
|
19
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20
|
-
|
|
21
|
-
"use strict";
|
|
22
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChapterComponentCollection\", function() { return ChapterComponentCollection; });\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var apps_library_editor_components_chapter_list_ChapterItemComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/ChapterItemComponent.ts\");\n/* harmony import */ var apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/apps/library-editor/constants/index.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar ChapterComponentCollection = /*#__PURE__*/function (_Core$ComponentCollec) {\n _inherits(ChapterComponentCollection, _Core$ComponentCollec);\n\n var _super = _createSuper(ChapterComponentCollection);\n\n function ChapterComponentCollection(options) {\n _classCallCheck(this, ChapterComponentCollection);\n\n return _super.call(this, options);\n }\n\n _createClass(ChapterComponentCollection, [{\n key: \"initialize\",\n value: function initialize() {\n this.bindEditorListeners();\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'ChapterComponentCollection';\n }\n }, {\n key: \"className\",\n get: function get() {\n return 'chapters';\n }\n }, {\n key: \"childView\",\n get: function get() {\n return apps_library_editor_components_chapter_list_ChapterItemComponent__WEBPACK_IMPORTED_MODULE_1__[\"ChapterItemComponent\"];\n }\n }, {\n key: \"bindEditorListeners\",\n value: function bindEditorListeners() {\n if (!this.options.editable) return;\n this.listenTo(this.options.channelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_2__[\"LibraryEditorActions\"].ToggleEdit, this.toggleEditForm);\n }\n /**\r\n * When a child view triggers its edit view, hide all other edit views\r\n */\n\n }, {\n key: \"toggleEditForm\",\n value: function toggleEditForm(model) {\n this.collection.each(function (m) {\n return m !== model && m.set('showEditor', false);\n });\n model.set('showEditor', !model.get('showEditor'));\n }\n }, {\n key: \"childViewOptions\",\n get: function get() {\n return {\n showActions: this.options.showActions,\n duration: this.options.duration,\n channelName: this.options.channelName\n };\n }\n }]);\n\n return ChapterComponentCollection;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].ComponentCollection);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9DaGFwdGVyQ29tcG9uZW50Q29sbGVjdGlvbi50cy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvY2hhcHRlci1saXN0L0NoYXB0ZXJDb21wb25lbnRDb2xsZWN0aW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9iamVjdEhhc2ggfSBmcm9tICdiYWNrYm9uZSc7XHJcbmltcG9ydCB7IENvcmUgfSBmcm9tICdsaWJzL2NvbW1vbi9jb3JlJztcclxuXHJcbmltcG9ydCB7IENoYXB0ZXIgfSBmcm9tICdzaGFyZWQvbW9kZWxzL0NoYXB0ZXInO1xyXG5pbXBvcnQgeyBDaGFwdGVySXRlbUNvbXBvbmVudCB9IGZyb20gJ2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9jaGFwdGVyLWxpc3QvQ2hhcHRlckl0ZW1Db21wb25lbnQnO1xyXG5pbXBvcnQgeyBMaWJyYXJ5RWRpdG9yQWN0aW9ucyB9IGZyb20gJ2FwcHMvbGlicmFyeS1lZGl0b3Iv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E7QUFBQTtBQUNBO0FBREE7QUFFQTtBQUNBO0FBTkE7QUFBQTtBQUFBO0FBUUE7QUFDQTtBQVRBO0FBQUE7QUFBQTtBQVlBO0FBQ0E7QUFiQTtBQUFBO0FBQUE7QUFnQkE7QUFDQTtBQWpCQTtBQUFBO0FBQUE7QUFvQkE7QUFDQTtBQXJCQTtBQUFBO0FBQUE7QUF3QkE7QUFHQTtBQUNBO0FBRUE7O0FBRUE7QUFDQTtBQWpDQTtBQUFBO0FBQUE7QUFrQ0E7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQXBDQTtBQUFBO0FBQUE7QUF1Q0E7QUFDQTtBQUNBO0FBQ0E7QUFIQTtBQUtBO0FBNUNBO0FBQ0E7QUFEQTtBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/ChapterComponentCollection.ts\n");
|
|
23
|
-
|
|
24
|
-
/***/ }),
|
|
25
|
-
|
|
26
|
-
/***/ "./src/apps/library-editor/components/chapter-list/ChapterItem.hbs":
|
|
27
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
28
|
-
|
|
29
|
-
eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.loading : stack1), depth0));\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \" <div class=\\\"col-2 text-right\\\">\\r\\n <a class=\\\"action edit-chapter my-2 svg-container \"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.svgContainer : stack1), depth0))\n + \" d-inline-block text-muted\\\"\\r\\n title=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(alias4,\"edit\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\">\"\n + ((stack1 = alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.editSvg : stack1), depth0)) != null ? stack1 : \"\")\n + \"</a>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.allowDelete : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" </div>\\r\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression;\n\n return \" <a class=\\\"action delete-chapter my-2 svg-container \"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.svgContainer : stack1), depth0))\n + \" d-inline-block text-muted\\\"\\r\\n title=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"delete\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\">\"\n + ((stack1 = alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.deleteSvg : stack1), depth0)) != null ? stack1 : \"\")\n + \"</a>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.lambda, alias4=container.escapeExpression;\n\n return \"<div class=\\\"row mx-0 border-top chapter-item \"\n + ((stack1 = helpers[\"if\"].call(alias2,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.loading : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\r\\n <div class=\\\"clickable-seek col-1\\\">\\r\\n <p class=\\\"m-0 py-2\\\">\"\n + alias4(alias3(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.index : stack1), depth0))\n + \"</p>\\r\\n </div>\\r\\n <div class=\\\"clickable-seek col-6\\\">\\r\\n <p class=\\\"m-0 py-2\\\">\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(alias2,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n <div class=\\\"clickable-seek col-3 text-right\\\">\\r\\n <p class=\\\"m-0 py-2\\\">\"\n + alias4(alias3(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.time : stack1), depth0))\n + \"</p>\\r\\n </div>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.showActions : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</div>\\r\\n<div class=\\\"edit-form-region\\\"></div>\\r\\n\";\n},\"useData\":true});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9DaGFwdGVySXRlbS5oYnMuanMiLCJzb3VyY2VzIjpbImZpbGU6Ly9DOi9DbGlja1ZpZXcgUHJvamVjdHMvQGNsaWNrdmlldy9wYWNrYWdlcy9wcm9qZWN0cy9saWJyYXJ5LWVkaXRvci9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbn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gPC9kaXY+XFxyXFxuXCJcbiAgICArICgoc3RhY2sxID0gaGVscGVyc1tcImlmXCJdLmNhbGwoYWxpYXMyLCgoc3RhY2sxID0gKGRlcHRoMCAhPSBudWxsID8gZGVwdGgwLm9wdGlvbnMgOiBkZXB0aDApKSAhPSBudWxsID8gc3RhY2sxLnNob3dBY3Rpb25zIDogc3RhY2sxKSx7XCJuYW1lXCI6XCJpZlwiLFwiaGFzaFwiOnt9LFwiZm5cIjpjb250YWluZXIucHJvZ3JhbSgzLCBkYXRhLCAwKSxcImludmVyc2VcIjpjb250YWluZXIubm9vcCxcImRhdGFcIjpkYXRhfSkpICE9IG51bGwgPyBzdGFjazEgOiBcIlwiKVxuICAgICsgXCI8L2Rpdj5cXHJcXG48ZGl2IGNsYXNzPVxcXCJlZGl0LWZvcm0tcmVnaW9uXFxcIj48L2Rpdj5cXHJcXG5cIjtcbn0sXCJ1c2VEYXRhXCI6dHJ1ZX0pOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/ChapterItem.hbs\n");
|
|
30
|
-
|
|
31
|
-
/***/ }),
|
|
32
|
-
|
|
33
|
-
/***/ "./src/apps/library-editor/components/chapter-list/ChapterItemComponent.ts":
|
|
34
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35
|
-
|
|
36
|
-
"use strict";
|
|
37
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChapterItemComponent\", function() { return ChapterItemComponent; });\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"backbone\");\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"../../libs/shared/src/utils/SvgHelper.ts\");\n/* harmony import */ var libs_shared_legacy_behaviors_tooltip_TooltipBehavior__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"../../libs/shared/src/legacy/behaviors/tooltip/TooltipBehavior.ts\");\n/* harmony import */ var shared_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/shared/utils/index.ts\");\n/* harmony import */ var apps_library_editor_components_chapter_form_ChapterFormComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-form/ChapterFormComponent.ts\");\n/* harmony import */ var apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\"./src/apps/library-editor/constants/index.ts\");\n/* harmony import */ var _ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/ChapterItem.hbs\");\n/* harmony import */ var _ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _chapter_item_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/chapter-item.scss\");\n/* harmony import */ var _chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\n\nvar ChapterItemComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(ChapterItemComponent, _Core$Component);\n\n var _super = _createSuper(ChapterItemComponent);\n\n function ChapterItemComponent(options) {\n _classCallCheck(this, ChapterItemComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(ChapterItemComponent, [{\n key: \"initialize\",\n value: function initialize() {\n this.bindListeners();\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'ChapterItemComponent';\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.chapterItem';\n }\n }, {\n key: \"instanceChannelName\",\n get: function get() {\n return \"\".concat(this.name).concat(this.cid);\n }\n }, {\n key: \"template\",\n get: function get() {\n return _ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7___default.a;\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"chapter \".concat(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a.chapterItem);\n }\n }, {\n key: \"behaviors\",\n get: function get() {\n return [{\n behaviorClass: libs_shared_legacy_behaviors_tooltip_TooltipBehavior__WEBPACK_IMPORTED_MODULE_3__[\"TooltipBehavior\"],\n selector: '.action'\n }];\n }\n }, {\n key: \"regions\",\n value: function regions() {\n return {\n editForm: {\n replaceElement: false,\n el: '.edit-form-region'\n }\n };\n }\n }, {\n key: \"elements\",\n get: function get() {\n return {\n chapterItem: '.chapter-item',\n editChapter: '.edit-chapter',\n deleteChapter: '.delete-chapter'\n };\n }\n }, {\n key: \"events\",\n value: function events() {\n return {\n 'click @ui.editChapter': 'onEditChapter',\n 'click @ui.deleteChapter': 'onDeleteChapter',\n 'click .clickable-seek': 'onClick'\n };\n }\n }, {\n key: \"bindListeners\",\n value: function bindListeners() {\n this.listenTo(this.instanceChannelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].CancelChapterEdit, this.onCancelEdit);\n this.listenTo(this.instanceChannelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapter, this.onUpdateChapter);\n this.listenTo(this.instanceChannelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapterTime, this.onUpdateChapterTime);\n this.listenTo(this.model, 'change:showEditor', this.onShowEditorChange);\n this.listenTo(this.model, 'change:loading', this.onLoadingChange);\n /**\r\n * Bind listener to the first chapter to ensure that it's actions are\r\n * updated to reflect the chapter collection's state.\r\n */\n\n var firstChapter = this.model.collection.first();\n\n if (this.model === firstChapter) {\n this.listenTo(this.model.collection, 'add remove sort', this.render);\n return;\n } // Re-render to ensure we display accurate indexes\n\n\n this.listenTo(this.model.collection, 'sort', this.render);\n }\n }, {\n key: \"onClick\",\n value: function onClick() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n if (this.model.get('isPhysicalChapter')) channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].SeekToChapter, this.model.get('index'));else channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapterTime, this.model.get('startTime'));\n }\n }, {\n key: \"onLoadingChange\",\n value: function onLoadingChange() {\n var tooltipState = this.model.get('loading') ? 'disable' : 'enable';\n this.getUI('editChapter').tooltip(tooltipState);\n this.getUI('deleteChapter').tooltip(tooltipState);\n this.model.set('showEditor', false, {\n silent: true\n });\n this.render();\n }\n }, {\n key: \"onShowEditorChange\",\n value: function onShowEditorChange() {\n if (this.model.get('loading')) return;\n this.model.get('showEditor') ? this.showEditView() : this.hideEditView();\n }\n }, {\n key: \"showEditView\",\n value: function showEditView() {\n this.renderEditForm();\n this.getUI('chapterItem').addClass(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a.darkBackground);\n }\n }, {\n key: \"hideEditView\",\n value: function hideEditView() {\n this.model.set('showEditor', false, {\n silent: true\n });\n this.getUI('chapterItem').removeClass(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a.darkBackground);\n this.detachChildView('editForm');\n }\n }, {\n key: \"onCancelEdit\",\n value: function onCancelEdit() {\n this.hideEditView();\n }\n }, {\n key: \"onDeleteChapter\",\n value: function onDeleteChapter() {\n if (this.model.get('loading')) return;\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].DeleteChapter, this.model);\n } // Proxy the update event and propogate up to the edit chapters parent\n\n }, {\n key: \"onUpdateChapter\",\n value: function onUpdateChapter(chapter) {\n backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName).trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapter, chapter);\n this.render();\n } // Proxy the update event and propogate up to the edit chapters parent\n\n }, {\n key: \"onUpdateChapterTime\",\n value: function onUpdateChapterTime(time) {\n backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName).trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapterTime, time);\n }\n }, {\n key: \"onEditChapter\",\n value: function onEditChapter() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].ToggleEdit, this.model);\n }\n }, {\n key: \"canDelete\",\n value: function canDelete(index) {\n var collectionLength = this.model.collection.length; // If the only chapter in the collection is the first chapter, allow deletion.\n\n if (index === 1 && collectionLength === 1) return true; // Don't let the first chapter be deleted if there multiple chapters.\n\n if (index === 1 && collectionLength > 1) return false; // All other chapters in th collection can be deleted.\n\n return true;\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n var index = this.model.collection.indexOf(this.model) + 1;\n var time = shared_utils__WEBPACK_IMPORTED_MODULE_4__[\"TimeHelpers\"].trimToMinutes(shared_utils__WEBPACK_IMPORTED_MODULE_4__[\"TimeHelpers\"].secondsToHoursFormatted(this.model.get('startTime')));\n return Object.assign(Object.assign({}, this.options), {\n styles: _chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a,\n time: time,\n index: index,\n loading: this.model.get('loading'),\n allowDelete: this.canDelete(index),\n editSvg: libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"SvgHelper\"].getSvg(libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"cvSvgLibrary\"].Edit),\n deleteSvg: libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"SvgHelper\"].getSvg(libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"cvSvgLibrary\"].Delete)\n });\n }\n }, {\n key: \"renderEditForm\",\n value: function renderEditForm() {\n this.showChildView('editForm', new apps_library_editor_components_chapter_form_ChapterFormComponent__WEBPACK_IMPORTED_MODULE_5__[\"ChapterFormComponent\"]({\n model: this.model,\n editing: true,\n channelName: this.instanceChannelName,\n duration: this.options.duration\n }));\n } // This is super trash - but calling dispose does nothing. \n\n }, {\n key: \"onBeforeDetach\",\n value: function onBeforeDetach() {\n $('.tooltip').remove();\n }\n }]);\n\n return ChapterItemComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_1__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9DaGFwdGVySXRlbUNvbXBvbmVudC50cy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvY2hhcHRlci1saXN0L0NoYXB0ZXJJdGVtQ29tcG9uZW50LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9iamVjdEhhc2gsIFJhZGlvIH0gZnJvbSAnYmFja2JvbmUnO1xyXG5pbXBvcnQgeyBDb3JlIH0gZnJvbSAnbGlicy9jb21tb24vY29yZSc7XHJcbmltcG9ydCB7IFN2Z0hlbHBlciwgY3ZTdmdMaWJyYXJ5IH0gZnJvbSAnbGlicy9zaGFyZWQvdXRpbHMvU3ZnSGVscGVyJztcclxuaW1wb3J0IHsgVG9vbHRpcEJlaGF2aW9yIH0gZnJvbSAnbGlicy9zaGFyZWQvbGVnYWN5L2JlaGF2aW9ycy90b29sdGlwL1Rvb2x0aXBCZWhhdmlvcic7XHJcblxyXG5pbXBvcnQgeyBUaW1lSGVscGVycyB9IGZyb20gJ3NoYXJlZC91dGlscyc7XHJcblxyXG5pbXBvcnQgeyBDaGFwdGVyRm9ybUNvbXBvbmVudCB9IGZyb20gJ2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9jaGFwdGVyLWZvcm0vQ2hhcHRlckZvcm1Db21wb25lbnQnO1xyXG5pbXBvcnQgeyBMaWJyYXJ5RWRpdG9yQWN0aW9ucyB9IGZyb20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dBO0FBQ0E7QUE3R0E7QUFBQTtBQUFBO0FBZ0hBO0FBQ0E7QUFDQTtBQWxIQTtBQUFBO0FBQUE7QUFxSEE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBeEhBO0FBQUE7QUFBQTtBQTJIQTtBQUNBO0FBNUhBO0FBQUE7QUFBQTtBQStIQTtBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBcklBO0FBQUE7QUFBQTtBQXdJQTtBQUNBO0FBQ0E7QUFDQTtBQTNJQTtBQUFBO0FBQUE7QUE4SUE7QUFDQTtBQS9JQTtBQUFBO0FBQUE7QUFrSkE7QUFDQTtBQUNBO0FBcEpBO0FBQUE7QUFBQTtBQXVKQTtBQUNBO0FBRUE7QUFDQTtBQUdBO0FBQ0E7QUFHQTtBQUNBO0FBbktBO0FBQUE7QUFBQTtBQXNLQTtBQUNBO0FBRUE7QUFFQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUxBO0FBT0E7QUFqTEE7QUFBQTtBQUFBO0FBb0xBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQU1BO0FBQ0E7QUEzTEE7QUFBQTtBQUFBO0FBOExBO0FBQ0E7QUEvTEE7QUFDQTtBQURBO0FBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/ChapterItemComponent.ts\n");
|
|
38
|
-
|
|
39
|
-
/***/ }),
|
|
40
|
-
|
|
41
|
-
/***/ "./src/apps/library-editor/components/chapter-list/chapter-item.scss":
|
|
42
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
43
|
-
|
|
44
|
-
eval("// extracted by mini-css-extract-plugin\nmodule.exports = {\"darkBackground\":\"cv--darkBackground--2jtQl\",\"loading\":\"cv--loading--152ia\",\"svgContainer\":\"cv--svgContainer--xdD5o\",\"chapterItem\":\"cv--chapterItem--3G38c\"};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9jaGFwdGVyLWl0ZW0uc2Nzcy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvY2hhcHRlci1saXN0L2NoYXB0ZXItaXRlbS5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxubW9kdWxlLmV4cG9ydHMgPSB7XCJkYXJrQmFja2dyb3VuZFwiOlwiY3YtLWRhcmtCYWNrZ3JvdW5kLS0yanRRbFwiLFwibG9hZGluZ1wiOlwiY3YtLWxvYWRpbmctLTE1MmlhXCIsXCJzdmdDb250YWluZXJcIjpcImN2LS1zdmdDb250YWluZXItLXhkRDVvXCIsXCJjaGFwdGVySXRlbVwiOlwiY3YtLWNoYXB0ZXJJdGVtLS0zRzM4Y1wifTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/chapter-item.scss\n");
|
|
45
|
-
|
|
46
|
-
/***/ }),
|
|
47
|
-
|
|
48
|
-
/***/ "./src/apps/library-editor/components/chapters/Chapters.hbs":
|
|
49
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50
|
-
|
|
51
|
-
eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=container.escapeExpression;\n\n return \"<h5>\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"chapters\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</h5>\\r\\n<div class=\\\"row mt-3 m-0 border-bottom\\\">\\r\\n <div class=\\\"col-1\\\">\\r\\n <label>#</label>\\r\\n </div>\\r\\n <div class=\\\"col-6\\\">\\r\\n <label>\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"nameLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</label>\\r\\n </div>\\r\\n <div class=\\\"col-3 text-right\\\">\\r\\n <label>\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"startLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</>\\r\\n </div>\\r\\n</div>\\r\\n<div class=\\\"chapter-list-region\\\"></div>\";\n},\"useData\":true});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXJzL0NoYXB0ZXJzLmhicy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvY2hhcHRlcnMvQ2hhcHRlcnMuaGJzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBIYW5kbGViYXJzID0gcmVxdWlyZSgnaGFuZGxlYmFycycpO1xubW9kdWxlLmV4cG9ydHMgPSAoSGFuZGxlYmFyc1snZGVmYXVsdCddIHx8IEhhbmRsZWJhcnMpLnRlbXBsYXRlKHtcImNvbXBpbGVyXCI6WzgsXC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2h0XFxcIj5cXHJcXG4gICAgPGxhYmVsPlwiXG4gICAgKyBhbGlhczQoKGhlbHBlcnMubGFuZ3x8KGRlcHRoMCAmJiBkZXB0aDAubGFuZyl8fGFsaWFzMykuY2FsbChhbGlhczIsXCJzdGFydExhYmVsXCIse1wibmFtZVwiOlwibGFuZ1wiLFwiaGFzaFwiOnt9LFwiZGF0YVwiOmRhdGF9KSlcbiAgICArIFwiPC8+XFxyXFxuICA8L2Rpdj5cXHJcXG48L2Rpdj5cXHJcXG48ZGl2IGNsYXNzPVxcXCJjaGFwdGVyLWxpc3QtcmVnaW9uXFxcIj48L2Rpdj5cIjtcbn0sXCJ1c2VEYXRhXCI6dHJ1ZX0pOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapters/Chapters.hbs\n");
|
|
52
|
-
|
|
53
|
-
/***/ }),
|
|
54
|
-
|
|
55
|
-
/***/ "./src/apps/library-editor/components/chapters/ChaptersComponent.ts":
|
|
56
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
57
|
-
|
|
58
|
-
"use strict";
|
|
59
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChaptersComponent\", function() { return ChaptersComponent; });\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var apps_library_editor_components_chapter_list_ChapterComponentCollection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/ChapterComponentCollection.ts\");\n/* harmony import */ var _Chapters_hbs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/apps/library-editor/components/chapters/Chapters.hbs\");\n/* harmony import */ var _Chapters_hbs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_Chapters_hbs__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar ChaptersComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(ChaptersComponent, _Core$Component);\n\n var _super = _createSuper(ChaptersComponent);\n\n function ChaptersComponent(options) {\n _classCallCheck(this, ChaptersComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(ChaptersComponent, [{\n key: \"name\",\n get: function get() {\n return 'ChaptersComponent';\n }\n }, {\n key: \"template\",\n get: function get() {\n return _Chapters_hbs__WEBPACK_IMPORTED_MODULE_2___default.a;\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.chapters';\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"chapters \".concat(!this.options.editable && 'py-3 border-top');\n }\n }, {\n key: \"regions\",\n value: function regions() {\n return {\n chapterList: {\n replaceElement: true,\n el: '.chapter-list-region'\n }\n };\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n return {\n showHeader: this.options.showHeader\n };\n }\n }, {\n key: \"onRender\",\n value: function onRender() {\n this.showChildView('chapterList', new apps_library_editor_components_chapter_list_ChapterComponentCollection__WEBPACK_IMPORTED_MODULE_1__[\"ChapterComponentCollection\"]({\n collection: this.collection,\n duration: this.options.duration,\n channelName: this.options.channelName,\n showActions: this.options.showActions,\n editable: this.options.editable\n }));\n }\n }]);\n\n return ChaptersComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXJzL0NoYXB0ZXJzQ29tcG9uZW50LnRzLmpzIiwic291cmNlcyI6WyJmaWxlOi8vQzovQ2xpY2tWaWV3IFByb2plY3RzL0BjbGlja3ZpZXcvcGFja2FnZXMvcHJvamVjdHMvbGlicmFyeS1lZGl0b3Ivc3JjL2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9jaGFwdGVycy9DaGFwdGVyc0NvbXBvbmVudC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb3JlIH0gZnJvbSAnbGlicy9jb21tb24vY29yZSc7XHJcbmltcG9ydCB7IE9iamVjdEhhc2ggfSBmcm9tICdiYWNrYm9uZSc7XHJcblxyXG5pbXBvcnQgeyBDaGFwdGVyQ29tcG9uZW50Q29sbGVjdGlvbiB9IGZyb20gJ2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9jaGFwdGVyLWxpc3QvQ2hhcHRlckNvbXBvbmVudENvbGxlY3Rpb24nO1xyXG5pbXBvcnQgQ2hhcHRlcnNUZW1wbGF0ZSBmcm9tICcuL0NoYXB0ZXJzLmhicyc7XHJcblxyXG5pbnRlcmZhY2UgQ2hhcHRlcnNDb21wb25lbnRPcHRpb25zIGV4dGVuZHMgQ29yZS5Db21wb25lbnRPcHRpb25zIHtcclxuICBjaGFubmVsTmFtZT86IHN0cmluZztcclxuICBkdXJhdGlvbj86IG51bWJlcjtcclxuICBzaG93QWN0aW9ucz86IGJvb2xlYW47XHJcbiAgZWRpdGFibGU/OiBib29sZWFuO1xyXG4gIHNob3dIZWFkZXI/OiBib29sZWFuO1xyXG59XHJcblxyXG5leHBvcnQgY2xhc3MgQ2hhcHRlcnNDb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aptersComponent.ts\n");
|
|
60
|
-
|
|
61
|
-
/***/ })
|
|
62
|
-
|
|
63
|
-
}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[35],{1026:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),a=n(262);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var a=f(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,i=c(l);function l(){return o(this,l),i.apply(this,arguments)}return t=l,(n=[{key:"defaults",value:function(){return e={},t=a.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&u(t.prototype,n),r&&u(t,r),l}(r.a.Model)},1032:function(e,t,n){"use strict";var r=n(1037),a=n(1033),i=(n(1034),n(3),n(1038)),o=(n(1040),n(1036));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return a.g})),n.d(t,"g",(function(){return a.j})),n.d(t,"f",(function(){return a.i})),n.d(t,"c",(function(){return a.f})),n.d(t,"e",(function(){return a.h})),n.d(t,"b",(function(){return i.a})),n.d(t,"h",(function(){return o.a}))},1033:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"f",(function(){return P})),n.d(t,"h",(function(){return y}));var r=n(2),a=n(1),i=n(18),o=n(29),u=n(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=a.reduce(e,(function(e,n,r){var i=t[r];return n||i?a.isObject(n)&&a.isObject(i)&&!a.isUndefined(n.id)&&n.id===i.id?e:a.isArray(n)?f(n,i).length?e.concat(r):e:a.isEqual(n,i)?e:e.concat(r):e}),[]);if(n.length)return a.object(a.map(n,(function(n){return a.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return a.each(t,(function(t){var r=a.findWhere(e,{id:t.id});if(!a.isUndefined(r)||0!==Object.keys(t).length){var i=a.isUndefined(r)?t:l(r,t);i&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(i.id=t.id,n.push(i))))}})),n}var d={getChanges:function(e,t){var n=l(a.omit(e.toJSON(),c),a.omit(t.toJSON(),c));if(n)return a.object(a.map(a.keys(n),(function(e){return[e,d.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(a.isObject(t)&&a.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return a.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var i=["distributors","producers","directors","productionCompanies"];for(var o in a.each(a.keys(n),(function(e){i.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(a.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var u=e.get(o);(u instanceof r.a.Model||u instanceof r.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return a.each(a.keys(e.toJSON()),(function(i){if(a.contains(n,i)){var o=e.get(i).map((function(e){return e.id})),u=t.get(i).map((function(e){return e.id})),s=a.filter(o,(function(e){return e&&!a.contains(u,e)}));s.length&&(r[i]=s)}})),r}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},h=o().year(),m={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?u.a.getPhrase(s,"validProductionYears",{currentYear:h}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},w={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function x(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1034:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),a=n(48),i=n(166),o=n(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?a.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,a=e.folder,i=e.collection;return t&&n?r.extend({},s,c(a,i)):t?s:n?c(a,i):void 0}},1036:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(17),a=n(3),i=n(195),o=n(1052),u=n(61);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return a.a.getPhrase(l,"exchange");case u.a.Workspace:return a.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(s(t={},c.Pdf,r.b.FilePDF),s(t,c.Image,r.b.FileImg),s(t,c.PowerPoint,r.b.FilePowerpoint),s(t,c.Document,r.b.FileWord),s(t,c.Excel,r.b.FileExcel),s(t,c.Zip,r.b.FileZip),s(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return a.a.getPhrase(l,"pdf");case c.Image:return a.a.getPhrase(l,"image");case c.Document:return a.a.getPhrase(l,"document");case c.Excel:return a.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return a.a.getPhrase(l,"presentation");case c.Zip:return a.a.getPhrase(l,"zipArchive");case c.File:return a.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return a.a.getPhrase(l,t)}}},1037:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),a=n(13),i=n(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,n,i){if(i){if(!r.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>a.x.millisecondsToSeconds(n))return s.StartTime.Exceeds();if(i.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?s.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?s.Name.Exists():r.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},s={Name:{Invalid:function(){return i.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1038:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),a="libraryEditor.utils",i={name:[{required:!0,msg:function(){return r.a.getPhrase(a,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(a,"libraryNameExceeds")}}]}},1040:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),a=n(1033),i=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.e.productionYear.apply(null,t)}}},1052:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e);var t=o(n);function n(){return a(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1286:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,a){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1420:function(e,t,n){"use strict";n.r(t),n.d(t,"EditResourceView",(function(){return O}));var r=n(1),a=n(6),i=n(42),o=n(2),u=n(5),s=n(30),c=n(301),l=n(262),f=n(0),d=n(13),p=n(1026),h=n(182),m=n(3),g=n(1032),b=n(1286),y=n.n(b);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var a=N(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(x,e);var t,n,b,v=w(x);function x(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,x),v.call(this,e)}return t=x,(n=[{key:"initialize",value:function(){this.listenTo(f.e.RESOURCE,"resource:".concat(this.options.resourceId,":sync"),this.render),this.resourceDataService=u.a.getInstance(f.g.Resource,this)}},{key:"name",get:function(){return"EditResourceView"}},{key:"lang",get:function(){return"libraryEditor.editResource"}},{key:"title",get:function(){return m.a.getPhrase(this.lang,"title")}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:m.a.getPhrase(this.lang,"edit"),spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.a,buttonText:m.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{name:"#name",feedback:".form-feedback"}}},{key:"events",value:function(){return{submit:"onSubmit","shown.bs.modal":"onModalShown"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(a.Radio.channel(this.channelName).trigger(l.b.ShowSpinner),this.resourceDataService.updateResource(this.options.videoId,this.viewModel,(function(){t.logAction(),o.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.resourceId,parentId:+this.options.videoId,name:this.viewModel.get("name")};i.a.logUserAction(e,this.options.analyticsOptions)}},{key:"selectAllWithoutExtension",value:function(){if(this.model){var e=this.model.get("name").split(".").slice(0,-1).join("."),t=this.getUI("name");t.each((function(n,a){if(r.isFunction(a.setSelectionRange))t.focus(),a.setSelectionRange(0,e.length);else if(r.isFunction(a.createTextRange)){var i=a.createTextRange();i.collapse(!0),i.moveEnd("character",e.length),i.moveStart("character",0),i.select()}}))}}},{key:"onModalShown",value:function(){this.selectAllWithoutExtension()}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.resourceDataService.getResource(this.options.resourceId,(function(t){e.viewModel=s.a.get("resource:".concat(e.options.resourceId),t.toJSON(),{ctor:h.a}),e.viewModel.addValidation(g.d)})),this.dataFetched()&&this.spinnerModel.set(l.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),a.Validation.bind(this,{model:this.viewModel}),this.selectAllWithoutExtension())}},{key:"onClose",value:function(){this.unstickit(),a.Validation.unbind(this)}}])&&P(t.prototype,n),b&&P(t,b),x}(o.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[35],{1034:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),a=n(261);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var a=f(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,i=c(l);function l(){return o(this,l),i.apply(this,arguments)}return t=l,(n=[{key:"defaults",value:function(){return e={},t=a.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&u(t.prototype,n),r&&u(t,r),l}(r.a.Model)},1040:function(e,t,n){"use strict";var r=n(1045),a=n(1041),i=(n(1042),n(3),n(1046)),o=(n(1048),n(1044));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return a.g})),n.d(t,"g",(function(){return a.j})),n.d(t,"f",(function(){return a.i})),n.d(t,"c",(function(){return a.f})),n.d(t,"e",(function(){return a.h})),n.d(t,"b",(function(){return i.a})),n.d(t,"h",(function(){return o.a}))},1041:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"f",(function(){return P})),n.d(t,"h",(function(){return y}));var r=n(2),a=n(1),i=n(18),o=n(29),u=n(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=a.reduce(e,(function(e,n,r){var i=t[r];return n||i?a.isObject(n)&&a.isObject(i)&&!a.isUndefined(n.id)&&n.id===i.id?e:a.isArray(n)?f(n,i).length?e.concat(r):e:a.isEqual(n,i)?e:e.concat(r):e}),[]);if(n.length)return a.object(a.map(n,(function(n){return a.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return a.each(t,(function(t){var r=a.findWhere(e,{id:t.id});if(!a.isUndefined(r)||0!==Object.keys(t).length){var i=a.isUndefined(r)?t:l(r,t);i&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(i.id=t.id,n.push(i))))}})),n}var d={getChanges:function(e,t){var n=l(a.omit(e.toJSON(),c),a.omit(t.toJSON(),c));if(n)return a.object(a.map(a.keys(n),(function(e){return[e,d.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(a.isObject(t)&&a.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return a.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var i=["distributors","producers","directors","productionCompanies"];for(var o in a.each(a.keys(n),(function(e){i.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(a.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var u=e.get(o);(u instanceof r.a.Model||u instanceof r.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return a.each(a.keys(e.toJSON()),(function(i){if(a.contains(n,i)){var o=e.get(i).map((function(e){return e.id})),u=t.get(i).map((function(e){return e.id})),s=a.filter(o,(function(e){return e&&!a.contains(u,e)}));s.length&&(r[i]=s)}})),r}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},h=o().year(),m={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?u.a.getPhrase(s,"validProductionYears",{currentYear:h}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},w={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function x(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1042:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),a=n(48),i=n(165),o=n(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?a.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,a=e.folder,i=e.collection;return t&&n?r.extend({},s,c(a,i)):t?s:n?c(a,i):void 0}},1044:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(17),a=n(3),i=n(194),o=n(1060),u=n(61);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return a.a.getPhrase(l,"exchange");case u.a.Workspace:return a.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(s(t={},c.Pdf,r.b.FilePDF),s(t,c.Image,r.b.FileImg),s(t,c.PowerPoint,r.b.FilePowerpoint),s(t,c.Document,r.b.FileWord),s(t,c.Excel,r.b.FileExcel),s(t,c.Zip,r.b.FileZip),s(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return a.a.getPhrase(l,"pdf");case c.Image:return a.a.getPhrase(l,"image");case c.Document:return a.a.getPhrase(l,"document");case c.Excel:return a.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return a.a.getPhrase(l,"presentation");case c.Zip:return a.a.getPhrase(l,"zipArchive");case c.File:return a.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return a.a.getPhrase(l,t)}}},1045:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),a=n(13),i=n(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,n,i){if(i){if(!r.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>a.x.millisecondsToSeconds(n))return s.StartTime.Exceeds();if(i.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?s.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?s.Name.Exists():r.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},s={Name:{Invalid:function(){return i.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1046:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),a="libraryEditor.utils",i={name:[{required:!0,msg:function(){return r.a.getPhrase(a,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(a,"libraryNameExceeds")}}]}},1048:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),a=n(1041),i=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.e.productionYear.apply(null,t)}}},1060:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e);var t=o(n);function n(){return a(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1294:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,a){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1428:function(e,t,n){"use strict";n.r(t),n.d(t,"EditResourceView",(function(){return O}));var r=n(1),a=n(6),i=n(42),o=n(2),u=n(5),s=n(30),c=n(300),l=n(261),f=n(0),d=n(13),p=n(1034),h=n(181),m=n(3),g=n(1040),b=n(1294),y=n.n(b);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var a=N(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(x,e);var t,n,b,v=w(x);function x(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,x),v.call(this,e)}return t=x,(n=[{key:"initialize",value:function(){this.listenTo(f.e.RESOURCE,"resource:".concat(this.options.resourceId,":sync"),this.render),this.resourceDataService=u.a.getInstance(f.g.Resource,this)}},{key:"name",get:function(){return"EditResourceView"}},{key:"lang",get:function(){return"libraryEditor.editResource"}},{key:"title",get:function(){return m.a.getPhrase(this.lang,"title")}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:m.a.getPhrase(this.lang,"edit"),spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.a,buttonText:m.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{name:"#name",feedback:".form-feedback"}}},{key:"events",value:function(){return{submit:"onSubmit","shown.bs.modal":"onModalShown"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(a.Radio.channel(this.channelName).trigger(l.b.ShowSpinner),this.resourceDataService.updateResource(this.options.videoId,this.viewModel,(function(){t.logAction(),o.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.resourceId,parentId:+this.options.videoId,name:this.viewModel.get("name")};i.a.logUserAction(e,this.options.analyticsOptions)}},{key:"selectAllWithoutExtension",value:function(){if(this.model){var e=this.model.get("name").split(".").slice(0,-1).join("."),t=this.getUI("name");t.each((function(n,a){if(r.isFunction(a.setSelectionRange))t.focus(),a.setSelectionRange(0,e.length);else if(r.isFunction(a.createTextRange)){var i=a.createTextRange();i.collapse(!0),i.moveEnd("character",e.length),i.moveStart("character",0),i.select()}}))}}},{key:"onModalShown",value:function(){this.selectAllWithoutExtension()}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.resourceDataService.getResource(this.options.resourceId,(function(t){e.viewModel=s.a.get("resource:".concat(e.options.resourceId),t.toJSON(),{ctor:h.a}),e.viewModel.addValidation(g.d)})),this.dataFetched()&&this.spinnerModel.set(l.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),a.Validation.bind(this,{model:this.viewModel}),this.selectAllWithoutExtension())}},{key:"onClose",value:function(){this.unstickit(),a.Validation.unbind(this)}}])&&P(t.prototype,n),b&&P(t,b),x}(o.a.View)}}]);
|