@clickview/lite 0.0.41-rc.0 → 0.0.41

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.
@@ -43,6 +43,6 @@ var r=n(765),i=n(766),o=n(767);function a(){return c.TYPED_ARRAY_SUPPORT?2147483
43
43
  *
44
44
  * Date: 2019-10-04T04:33:48.372Z
45
45
  */
46
- e.exports=function(){"use strict";function e(t){return(e="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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(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 r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var s="undefined"!=typeof window&&void 0!==window.document,c=s?window:{},u=!!s&&"ontouchstart"in c.document.documentElement,l=!!s&&"PointerEvent"in c,f="".concat("cropper","-crop"),p="".concat("cropper","-disabled"),h="".concat("cropper","-hidden"),d="".concat("cropper","-hide"),y="".concat("cropper","-invisible"),m="".concat("cropper","-modal"),v="".concat("cropper","-move"),g="".concat("cropper","Action"),b="".concat("cropper","Preview"),_=u?"touchstart":"mousedown",w=u?"touchmove":"mousemove",S=u?"touchend touchcancel":"mouseup",T=l?"pointerdown":_,C=l?"pointermove":w,k=l?"pointerup pointercancel":S,E=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,O=/^data:/,P=/^data:image\/jpeg;base64,/,A=/^img|canvas$/i,I={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},x=Number.isNaN||c.isNaN;function R(e){return"number"==typeof e&&!x(e)}var L=function(e){return e>0&&e<1/0};function j(e){return void 0===e}function N(t){return"object"===e(t)&&null!==t}var D=Object.prototype.hasOwnProperty;function B(e){if(!N(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&D.call(n,"isPrototypeOf")}catch(e){return!1}}function U(e){return"function"==typeof e}var M=Array.prototype.slice;function V(e){return Array.from?Array.from(e):M.call(e)}function F(e,t){return e&&U(t)&&(Array.isArray(e)||R(e.length)?V(e).forEach((function(n,r){t.call(e,n,r,e)})):N(e)&&Object.keys(e).forEach((function(n){t.call(e,e[n],n,e)}))),e}var H=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(e)&&n.length>0&&n.forEach((function(t){N(t)&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},z=/\.\d*(?:0|9){12}\d*$/;function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return z.test(e)?Math.round(e*t)/t:e}var q=/^width|height|left|top|marginLeft|marginTop$/;function G(e,t){var n=e.style;F(t,(function(e,t){q.test(t)&&R(e)&&(e="".concat(e,"px")),n[t]=e}))}function K(e,t){if(t)if(R(e.length))F(e,(function(e){K(e,t)}));else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Y(e,t){t&&(R(e.length)?F(e,(function(e){Y(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function X(e,t,n){t&&(R(e.length)?F(e,(function(e){X(e,t,n)})):n?K(e,t):Y(e,t))}var Q=/([a-z\d])([A-Z])/g;function $(e){return e.replace(Q,"$1-$2").toLowerCase()}function Z(e,t){return N(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat($(t)))}function J(e,t,n){N(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat($(t)),n)}var ee=/\s\s*/,te=function(){var e=!1;if(s){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});c.addEventListener("test",n,r),c.removeEventListener("test",n,r)}return e}();function ne(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(ee).forEach((function(t){if(!te){var o=e.listeners;o&&o[t]&&o[t][n]&&(i=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,i,r)}))}function re(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(ee).forEach((function(t){if(r.once&&!te){var o=e.listeners,a=void 0===o?{}:o;i=function(){delete a[t][n],e.removeEventListener(t,i,r);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],r),a[t][n]=i,e.listeners=a}e.addEventListener(t,i,r)}))}function ie(e,t,n){var r;return U(Event)&&U(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function oe(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var ae=c.location,se=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function ce(e){var t=e.match(se);return null!==t&&(t[1]!==ae.protocol||t[2]!==ae.hostname||t[3]!==ae.port)}function ue(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function le(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,o=e.translateY,a=[];R(i)&&0!==i&&a.push("translateX(".concat(i,"px)")),R(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),R(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),R(n)&&1!==n&&a.push("scaleX(".concat(n,")")),R(r)&&1!==r&&a.push("scaleY(".concat(r,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function fe(e,t){var n=e.pageX,r=e.pageY,i={endX:n,endY:r};return t?i:o({startX:n,startY:r},i)}function pe(e){var t=e.aspectRatio,n=e.height,r=e.width,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=L(r),a=L(n);if(o&&a){var s=n*t;"contain"===i&&s>r||"cover"===i&&s<r?n=r/t:r=n*t}else o?n=r/t:a&&(r=n*t);return{width:r,height:n}}function he(e,t,n,r){var i=t.aspectRatio,o=t.naturalWidth,s=t.naturalHeight,c=t.rotate,u=void 0===c?0:c,l=t.scaleX,f=void 0===l?1:l,p=t.scaleY,h=void 0===p?1:p,d=n.aspectRatio,y=n.naturalWidth,m=n.naturalHeight,v=r.fillColor,g=void 0===v?"transparent":v,b=r.imageSmoothingEnabled,_=void 0===b||b,w=r.imageSmoothingQuality,S=void 0===w?"low":w,T=r.maxWidth,C=void 0===T?1/0:T,k=r.maxHeight,E=void 0===k?1/0:k,O=r.minWidth,P=void 0===O?0:O,A=r.minHeight,I=void 0===A?0:A,x=document.createElement("canvas"),R=x.getContext("2d"),L=pe({aspectRatio:d,width:C,height:E}),j=pe({aspectRatio:d,width:P,height:I},"cover"),N=Math.min(L.width,Math.max(j.width,y)),D=Math.min(L.height,Math.max(j.height,m)),B=pe({aspectRatio:i,width:C,height:E}),U=pe({aspectRatio:i,width:P,height:I},"cover"),M=Math.min(B.width,Math.max(U.width,o)),V=Math.min(B.height,Math.max(U.height,s)),F=[-M/2,-V/2,M,V];return x.width=W(N),x.height=W(D),R.fillStyle=g,R.fillRect(0,0,N,D),R.save(),R.translate(N/2,D/2),R.rotate(u*Math.PI/180),R.scale(f,h),R.imageSmoothingEnabled=_,R.imageSmoothingQuality=S,R.drawImage.apply(R,[e].concat(a(F.map((function(e){return Math.floor(W(e))}))))),R.restore(),x}var de=String.fromCharCode,ye=/^data:.*,/;function me(e){var t,n=new DataView(e);try{var r,i,o;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var a=n.byteLength,s=2;s+1<a;){if(255===n.getUint8(s)&&225===n.getUint8(s+1)){i=s;break}s+=1}if(i){var c=i+10;if("Exif"===function(e,t,n){var r="";n+=t;for(var i=t;i<n;i+=1)r+=de(e.getUint8(i));return r}(n,i+4,4)){var u=n.getUint16(c);if(((r=18761===u)||19789===u)&&42===n.getUint16(c+2,r)){var l=n.getUint32(c+4,r);l>=8&&(o=c+l)}}}if(o){var f,p,h=n.getUint16(o,r);for(p=0;p<h;p+=1)if(f=o+12*p+2,274===n.getUint16(f,r)){f+=8,t=n.getUint16(f,r),n.setUint16(f,1,r);break}}}catch(e){t=1}return t}var ve={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper;K(r,h),Y(e,h);var i={width:Math.max(n.offsetWidth,Number(t.minContainerWidth)||200),height:Math.max(n.offsetHeight,Number(t.minContainerHeight)||100)};this.containerData=i,G(r,{width:i.width,height:i.height}),K(e,h),Y(r,h)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,i=r?t.naturalHeight:t.naturalWidth,o=r?t.naturalWidth:t.naturalHeight,a=i/o,s=e.width,c=e.height;e.height*a>e.width?3===n?s=e.height*a:c=e.width/a:3===n?c=e.width/a:s=e.height*a;var u={aspectRatio:a,naturalWidth:i,naturalHeight:o,width:s,height:c};u.left=(e.width-s)/2,u.top=(e.height-c)/2,u.oldLeft=u.left,u.oldTop=u.top,this.canvasData=u,this.limited=1===n||2===n,this.limitCanvas(!0,!0),this.initialImageData=H({},t),this.initialCanvasData=H({},u)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=i.aspectRatio,c=this.cropped&&o;if(e){var u=Number(n.minCanvasWidth)||0,l=Number(n.minCanvasHeight)||0;a>1?(u=Math.max(u,r.width),l=Math.max(l,r.height),3===a&&(l*s>u?u=l*s:l=u/s)):a>0&&(u?u=Math.max(u,c?o.width:0):l?l=Math.max(l,c?o.height:0):c&&(u=o.width,(l=o.height)*s>u?u=l*s:l=u/s));var f=pe({aspectRatio:s,width:u,height:l});u=f.width,l=f.height,i.minWidth=u,i.minHeight=l,i.maxWidth=1/0,i.maxHeight=1/0}if(t)if(a>(c?0:1)){var p=r.width-i.width,h=r.height-i.height;i.minLeft=Math.min(0,p),i.minTop=Math.min(0,h),i.maxLeft=Math.max(0,p),i.maxTop=Math.max(0,h),c&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,2===a&&(i.width>=r.width&&(i.minLeft=Math.min(0,p),i.maxLeft=Math.max(0,p)),i.height>=r.height&&(i.minTop=Math.min(0,h),i.maxTop=Math.max(0,h))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height},renderCanvas:function(e,t){var n=this.canvasData,r=this.imageData;if(t){var i=function(e){var t=e.width,n=e.height,r=e.degree;if(90==(r=Math.abs(r)%180))return{width:n,height:t};var i=r%90*Math.PI/180,o=Math.sin(i),a=Math.cos(i),s=t*a+n*o,c=t*o+n*a;return r>90?{width:c,height:s}:{width:s,height:c}}({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),o=i.width,a=i.height,s=n.width*(o/n.naturalWidth),c=n.height*(a/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(c-n.height)/2,n.width=s,n.height=c,n.aspectRatio=o/a,n.naturalWidth=o,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,G(this.canvas,H({width:n.width,height:n.height},le({translateX:n.left,translateY:n.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),i=n.naturalHeight*(t.height/t.naturalHeight);H(n,{width:r,height:i,left:(t.width-r)/2,top:(t.height-i)/2}),G(this.image,H({width:n.width,height:n.height},le(H({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,r=Number(e.autoCropArea)||.8,i={width:t.width,height:t.height};n&&(t.height*n>t.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*r),i.height=Math.max(i.minHeight,i.height*r),i.left=t.left+(t.width-i.width)/2,i.top=t.top+(t.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=H({},i)},limitCropBox:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=this.limited,s=n.aspectRatio;if(e){var c=Number(n.minCropBoxWidth)||0,u=Number(n.minCropBoxHeight)||0,l=a?Math.min(r.width,i.width,i.width+i.left,r.width-i.left):r.width,f=a?Math.min(r.height,i.height,i.height+i.top,r.height-i.top):r.height;c=Math.min(c,r.width),u=Math.min(u,r.height),s&&(c&&u?u*s>c?u=c/s:c=u*s:c?u=c/s:u&&(c=u*s),f*s>l?f=l/s:l=f*s),o.minWidth=Math.min(c,l),o.minHeight=Math.min(u,f),o.maxWidth=l,o.maxHeight=f}t&&(a?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(r.width,i.left+i.width)-o.width,o.maxTop=Math.min(r.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=r.width-o.width,o.maxTop=r.height-o.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&J(this.face,g,n.width>=t.width&&n.height>=t.height?"move":"all"),G(this.cropBox,H({width:n.width,height:n.height},le({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ie(this.element,"crop",this.getData())}},ge={initPreview:function(){var e=this.element,t=this.crossOrigin,n=this.options.preview,r=t?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",o=document.createElement("img");if(t&&(o.crossOrigin=t),o.src=r,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,n){var a=n;"string"==typeof n?a=e.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,F(a,(function(e){var n=document.createElement("img");J(e,b,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(n.crossOrigin=t),n.src=r,n.alt=i,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(n)}))}},resetPreview:function(){F(this.previews,(function(e){var t=Z(e,b);G(e,{width:t.width,height:t.height}),e.innerHTML=t.html,function(e,t){if(N(e[t]))try{delete e[t]}catch(n){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(n){e.dataset[t]=void 0}else e.removeAttribute("data-".concat($(t)))}(e,b)}))},preview:function(){var e=this.imageData,t=this.canvasData,n=this.cropBoxData,r=n.width,i=n.height,o=e.width,a=e.height,s=n.left-t.left-e.left,c=n.top-t.top-e.top;this.cropped&&!this.disabled&&(G(this.viewBoxImage,H({width:o,height:a},le(H({translateX:-s,translateY:-c},e)))),F(this.previews,(function(t){var n=Z(t,b),u=n.width,l=n.height,f=u,p=l,h=1;r&&(p=i*(h=u/r)),i&&p>l&&(f=r*(h=l/i),p=l),G(t,{width:f,height:p}),G(t.getElementsByTagName("img")[0],H({width:o*h,height:a*h},le(H({translateX:-s*h,translateY:-c*h},e))))})))}},be={bind:function(){var e=this.element,t=this.options,n=this.cropper;U(t.cropstart)&&re(e,"cropstart",t.cropstart),U(t.cropmove)&&re(e,"cropmove",t.cropmove),U(t.cropend)&&re(e,"cropend",t.cropend),U(t.crop)&&re(e,"crop",t.crop),U(t.zoom)&&re(e,"zoom",t.zoom),re(n,T,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&re(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&re(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),re(e.ownerDocument,C,this.onCropMove=this.cropMove.bind(this)),re(e.ownerDocument,k,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&re(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;U(t.cropstart)&&ne(e,"cropstart",t.cropstart),U(t.cropmove)&&ne(e,"cropmove",t.cropmove),U(t.cropend)&&ne(e,"cropend",t.cropend),U(t.crop)&&ne(e,"crop",t.crop),U(t.zoom)&&ne(e,"zoom",t.zoom),ne(n,T,this.onCropStart),t.zoomable&&t.zoomOnWheel&&ne(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&ne(n,"dblclick",this.onDblclick),ne(e.ownerDocument,C,this.onCropMove),ne(e.ownerDocument,k,this.onCropEnd),t.responsive&&ne(window,"resize",this.onResize)}},_e={resize:function(){var e=this.options,t=this.container,n=this.containerData,r=Number(e.minContainerWidth)||200,i=Number(e.minContainerHeight)||100;if(!(this.disabled||n.width<=r||n.height<=i)){var o,a,s=t.offsetWidth/n.width;1===s&&t.offsetHeight===n.height||(e.restore&&(o=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(F(o,(function(e,t){o[t]=e*s}))),this.setCropBoxData(F(a,(function(e,t){a[t]=e*s})))))}},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=f,(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50),e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t=e.buttons,n=e.button;if(!(this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(R(t)&&1!==t||R(n)&&0!==n||e.ctrlKey))){var r,i=this.options,o=this.pointers;e.changedTouches?F(e.changedTouches,(function(e){o[e.identifier]=fe(e)})):o[e.pointerId||0]=fe(e),r=Object.keys(o).length>1&&i.zoomable&&i.zoomOnTouch?"zoom":Z(e.target,g),E.test(r)&&!1!==ie(this.element,"cropstart",{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,K(this.dragBox,m)))}},cropMove:function(e){var t=this.action;if(!this.disabled&&t){var n=this.pointers;e.preventDefault(),!1!==ie(this.element,"cropmove",{originalEvent:e,action:t})&&(e.changedTouches?F(e.changedTouches,(function(e){H(n[e.identifier]||{},fe(e,!0))})):H(n[e.pointerId||0]||{},fe(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,n=this.pointers;e.changedTouches?F(e.changedTouches,(function(e){delete n[e.identifier]})):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,X(this.dragBox,m,this.cropped&&this.options.modal)),ie(this.element,"cropend",{originalEvent:e,action:t}))}}},we={change:function(e){var t,n=this.options,r=this.canvasData,i=this.containerData,a=this.cropBoxData,s=this.pointers,c=this.action,u=n.aspectRatio,l=a.left,f=a.top,p=a.width,d=a.height,y=l+p,m=f+d,v=0,g=0,b=i.width,_=i.height,w=!0;!u&&e.shiftKey&&(u=p&&d?p/d:1),this.limited&&(v=a.minLeft,g=a.minTop,b=v+Math.min(i.width,r.width,r.left+r.width),_=g+Math.min(i.height,r.height,r.top+r.height));var S=s[Object.keys(s)[0]],T={x:S.endX-S.startX,y:S.endY-S.startY},C=function(e){switch(e){case"e":y+T.x>b&&(T.x=b-y);break;case"w":l+T.x<v&&(T.x=v-l);break;case"n":f+T.y<g&&(T.y=g-f);break;case"s":m+T.y>_&&(T.y=_-m)}};switch(c){case"all":l+=T.x,f+=T.y;break;case"e":if(T.x>=0&&(y>=b||u&&(f<=g||m>=_))){w=!1;break}C("e"),(p+=T.x)<0&&(c="w",l-=p=-p),u&&(d=p/u,f+=(a.height-d)/2);break;case"n":if(T.y<=0&&(f<=g||u&&(l<=v||y>=b))){w=!1;break}C("n"),d-=T.y,f+=T.y,d<0&&(c="s",f-=d=-d),u&&(p=d*u,l+=(a.width-p)/2);break;case"w":if(T.x<=0&&(l<=v||u&&(f<=g||m>=_))){w=!1;break}C("w"),p-=T.x,l+=T.x,p<0&&(c="e",l-=p=-p),u&&(d=p/u,f+=(a.height-d)/2);break;case"s":if(T.y>=0&&(m>=_||u&&(l<=v||y>=b))){w=!1;break}C("s"),(d+=T.y)<0&&(c="n",f-=d=-d),u&&(p=d*u,l+=(a.width-p)/2);break;case"ne":if(u){if(T.y<=0&&(f<=g||y>=b)){w=!1;break}C("n"),d-=T.y,f+=T.y,p=d*u}else C("n"),C("e"),T.x>=0?y<b?p+=T.x:T.y<=0&&f<=g&&(w=!1):p+=T.x,T.y<=0?f>g&&(d-=T.y,f+=T.y):(d-=T.y,f+=T.y);p<0&&d<0?(c="sw",f-=d=-d,l-=p=-p):p<0?(c="nw",l-=p=-p):d<0&&(c="se",f-=d=-d);break;case"nw":if(u){if(T.y<=0&&(f<=g||l<=v)){w=!1;break}C("n"),d-=T.y,f+=T.y,p=d*u,l+=a.width-p}else C("n"),C("w"),T.x<=0?l>v?(p-=T.x,l+=T.x):T.y<=0&&f<=g&&(w=!1):(p-=T.x,l+=T.x),T.y<=0?f>g&&(d-=T.y,f+=T.y):(d-=T.y,f+=T.y);p<0&&d<0?(c="se",f-=d=-d,l-=p=-p):p<0?(c="ne",l-=p=-p):d<0&&(c="sw",f-=d=-d);break;case"sw":if(u){if(T.x<=0&&(l<=v||m>=_)){w=!1;break}C("w"),p-=T.x,l+=T.x,d=p/u}else C("s"),C("w"),T.x<=0?l>v?(p-=T.x,l+=T.x):T.y>=0&&m>=_&&(w=!1):(p-=T.x,l+=T.x),T.y>=0?m<_&&(d+=T.y):d+=T.y;p<0&&d<0?(c="ne",f-=d=-d,l-=p=-p):p<0?(c="se",l-=p=-p):d<0&&(c="nw",f-=d=-d);break;case"se":if(u){if(T.x>=0&&(y>=b||m>=_)){w=!1;break}C("e"),d=(p+=T.x)/u}else C("s"),C("e"),T.x>=0?y<b?p+=T.x:T.y>=0&&m>=_&&(w=!1):p+=T.x,T.y>=0?m<_&&(d+=T.y):d+=T.y;p<0&&d<0?(c="nw",f-=d=-d,l-=p=-p):p<0?(c="sw",l-=p=-p):d<0&&(c="ne",f-=d=-d);break;case"move":this.move(T.x,T.y),w=!1;break;case"zoom":this.zoom(function(e){var t=o({},e),n=[];return F(e,(function(e,r){delete t[r],F(t,(function(t){var r=Math.abs(e.startX-t.startX),i=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(r*r+i*i),c=(Math.sqrt(o*o+a*a)-s)/s;n.push(c)}))})),n.sort((function(e,t){return Math.abs(e)<Math.abs(t)})),n[0]}(s),e),w=!1;break;case"crop":if(!T.x||!T.y){w=!1;break}t=oe(this.cropper),l=S.startX-t.left,f=S.startY-t.top,p=a.minWidth,d=a.minHeight,T.x>0?c=T.y>0?"se":"ne":T.x<0&&(l-=p,c=T.y>0?"sw":"nw"),T.y<0&&(f-=d),this.cropped||(Y(this.cropBox,h),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}w&&(a.width=p,a.height=d,a.left=l,a.top=f,this.action=c,this.renderCropBox()),F(s,(function(e){e.startX=e.endX,e.startY=e.endY}))}},Se={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&K(this.dragBox,m),Y(this.cropBox,h),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=H({},this.initialImageData),this.canvasData=H({},this.initialCanvasData),this.cropBoxData=H({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(H(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Y(this.dragBox,m),K(this.cropBox,h)),this},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,F(this.previews,(function(t){t.getElementsByTagName("img")[0].src=e})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Y(this.cropper,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,K(this.cropper,p)),this},destroy:function(){var e=this.element;return e.cropper?(e.cropper=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,i=n.top;return this.moveTo(j(e)?e:r+Number(e),j(t)?t:i+Number(t))},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(R(e)&&(n.left=e,r=!0),R(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r=this.options,i=this.canvasData,o=i.width,a=i.height,s=i.naturalWidth,c=i.naturalHeight;if((e=Number(e))>=0&&this.ready&&!this.disabled&&r.zoomable){var u=s*e,l=c*e;if(!1===ie(this.element,"zoom",{ratio:e,oldRatio:o/s,originalEvent:n}))return this;if(n){var f=this.pointers,p=oe(this.cropper),h=f&&Object.keys(f).length?function(e){var t=0,n=0,r=0;return F(e,(function(e){var i=e.startX,o=e.startY;t+=i,n+=o,r+=1})),{pageX:t/=r,pageY:n/=r}}(f):{pageX:n.pageX,pageY:n.pageY};i.left-=(u-o)*((h.pageX-p.left-i.left)/o),i.top-=(l-a)*((h.pageY-p.top-i.top)/a)}else B(t)&&R(t.x)&&R(t.y)?(i.left-=(u-o)*((t.x-i.left)/o),i.top-=(l-a)*((t.y-i.top)/a)):(i.left-=(u-o)/2,i.top-=(l-a)/2);i.width=u,i.height=l,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return R(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,R(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(R(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(R(e)&&(n.scaleX=e,r=!0),R(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,r=this.imageData,i=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){e={x:o.left-i.left,y:o.top-i.top,width:o.width,height:o.height};var a=r.width/r.naturalWidth;if(F(e,(function(t,n){e[n]=t/a})),t){var s=Math.round(e.y+e.height),c=Math.round(e.x+e.width);e.x=Math.round(e.x),e.y=Math.round(e.y),e.width=c-e.x,e.height=s-e.y}}else e={x:0,y:0,width:0,height:0};return n.rotatable&&(e.rotate=r.rotate||0),n.scalable&&(e.scaleX=r.scaleX||1,e.scaleY=r.scaleY||1),e},setData:function(e){var t=this.options,n=this.imageData,r=this.canvasData,i={};if(this.ready&&!this.disabled&&B(e)){var o=!1;t.rotatable&&R(e.rotate)&&e.rotate!==n.rotate&&(n.rotate=e.rotate,o=!0),t.scalable&&(R(e.scaleX)&&e.scaleX!==n.scaleX&&(n.scaleX=e.scaleX,o=!0),R(e.scaleY)&&e.scaleY!==n.scaleY&&(n.scaleY=e.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;R(e.x)&&(i.left=e.x*a+r.left),R(e.y)&&(i.top=e.y*a+r.top),R(e.width)&&(i.width=e.width*a),R(e.height)&&(i.height=e.height*a),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?H({},this.containerData):{}},getImageData:function(){return this.sized?H({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&F(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){t[n]=e[n]})),t},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&B(e)&&(R(e.left)&&(t.left=e.left),R(e.top)&&(t.top=e.top),R(e.width)?(t.width=e.width,t.height=e.width/n):R(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,i=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&B(e)&&(R(e.left)&&(r.left=e.left),R(e.top)&&(r.top=e.top),R(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),R(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),i&&(t?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=he(this.image,this.imageData,t,e);if(!this.cropped)return n;var r=this.getData(),i=r.x,o=r.y,s=r.width,c=r.height,u=n.width/Math.floor(t.naturalWidth);1!==u&&(i*=u,o*=u,s*=u,c*=u);var l=s/c,f=pe({aspectRatio:l,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),p=pe({aspectRatio:l,width:e.minWidth||0,height:e.minHeight||0},"cover"),h=pe({aspectRatio:l,width:e.width||(1!==u?n.width:s),height:e.height||(1!==u?n.height:c)}),d=h.width,y=h.height;d=Math.min(f.width,Math.max(p.width,d)),y=Math.min(f.height,Math.max(p.height,y));var m=document.createElement("canvas"),v=m.getContext("2d");m.width=W(d),m.height=W(y),v.fillStyle=e.fillColor||"transparent",v.fillRect(0,0,d,y);var g=e.imageSmoothingEnabled,b=void 0===g||g,_=e.imageSmoothingQuality;v.imageSmoothingEnabled=b,_&&(v.imageSmoothingQuality=_);var w,S,T,C,k,E,O=n.width,P=n.height,A=i,I=o;A<=-s||A>O?(A=0,w=0,T=0,k=0):A<=0?(T=-A,A=0,k=w=Math.min(O,s+A)):A<=O&&(T=0,k=w=Math.min(s,O-A)),w<=0||I<=-c||I>P?(I=0,S=0,C=0,E=0):I<=0?(C=-I,I=0,E=S=Math.min(P,c+I)):I<=P&&(C=0,E=S=Math.min(c,P-I));var x=[A,I,w,S];if(k>0&&E>0){var R=d/s;x.push(T*R,C*R,k*R,E*R)}return v.drawImage.apply(v,[n].concat(a(x.map((function(e){return Math.floor(W(e))}))))),m},setAspectRatio:function(e){var t=this.options;return this.disabled||j(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,n=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var i="crop"===e,o=t.movable&&"move"===e;e=i||o?e:"none",t.dragMode=e,J(n,g,e),X(n,f,i),X(n,v,o),t.cropBoxMovable||(J(r,g,e),X(r,f,i),X(r,v,o))}return this}},Te=c.Cropper,Ce=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,e),!n||!A.test(n.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=n,this.options=H({},I,B(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var r,i,o;return r=e,o=[{key:"noConflict",value:function(){return window.Cropper=Te,e}},{key:"setDefaults",value:function(e){H(I,B(e)&&e)}}],(i=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t.cropper){if(t.cropper=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",this.originalUrl=e,!e)return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t=this;if(e){this.url=e,this.imageData={};var n=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if(O.test(e))P.test(e)?this.read((i=e.replace(ye,""),o=atob(i),a=new ArrayBuffer(o.length),F(s=new Uint8Array(a),(function(e,t){s[t]=o.charCodeAt(t)})),a)):this.clone();else{var i,o,a,s,c=new XMLHttpRequest,u=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=u,c.onerror=u,c.ontimeout=u,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){t.read(c.response)},c.onloadend=function(){t.reloading=!1,t.xhr=null},r.checkCrossOrigin&&ce(e)&&n.crossOrigin&&(e=ue(e)),c.open("GET",e),c.responseType="arraybuffer",c.withCredentials="use-credentials"===n.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=me(e),i=0,o=1,a=1;if(r>1){this.url=function(e,t){for(var n=[],r=new Uint8Array(e);r.length>0;)n.push(de.apply(null,V(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,"image/jpeg");var s=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r);i=s.rotate,o=s.scaleX,a=s.scaleY}t.rotatable&&(n.rotate=i),t.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t;this.options.checkCrossOrigin&&ce(t)&&(n||(n="anonymous"),r=ue(t)),this.crossOrigin=n,this.crossOriginUrl=r;var i=document.createElement("img");n&&(i.crossOrigin=n),i.src=r||t,i.alt=e.alt||"The image to crop",this.image=i,i.onload=this.start.bind(this),i.onerror=this.stop.bind(this),K(i,d),e.parentNode.insertBefore(i,e.nextSibling)}},{key:"start",value:function(){var e=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var n=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),r=function(t,n){H(e.imageData,{naturalWidth:t,naturalHeight:n,aspectRatio:t/n}),e.sizing=!1,e.sized=!0,e.build()};if(!t.naturalWidth||n){var i=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=i,i.onload=function(){r(i.width,i.height),n||o.removeChild(i)},i.src=t.src,n||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(i))}else r(t.naturalWidth,t.naturalHeight)}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var e=this.element,t=this.options,n=this.image,r=e.parentNode,i=document.createElement("div");i.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=i.querySelector(".".concat("cropper","-container")),a=o.querySelector(".".concat("cropper","-canvas")),s=o.querySelector(".".concat("cropper","-drag-box")),c=o.querySelector(".".concat("cropper","-crop-box")),u=c.querySelector(".".concat("cropper","-face"));this.container=r,this.cropper=o,this.canvas=a,this.dragBox=s,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=u,a.appendChild(n),K(e,h),r.insertBefore(o,e.nextSibling),this.isImg||Y(n,d),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,K(c,h),t.guides||K(c.getElementsByClassName("".concat("cropper","-dashed")),h),t.center||K(c.getElementsByClassName("".concat("cropper","-center")),h),t.background&&K(o,"".concat("cropper","-bg")),t.highlight||K(u,y),t.cropBoxMovable&&(K(u,v),J(u,g,"all")),t.cropBoxResizable||(K(c.getElementsByClassName("".concat("cropper","-line")),h),K(c.getElementsByClassName("".concat("cropper","-point")),h)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),U(t.ready)&&re(e,"ready",t.ready,{once:!0}),ie(e,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Y(this.element,h))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&n(r.prototype,i),o&&n(r,o),e}();return H(Ce.prototype,ve,ge,be,_e,we,Se),Ce}()},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return'<span class="badge badge-danger badge-pill '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.unreadCount:o,t))+'">'+s(a(null!=(o=null!=t?t.options:t)?o.unreadCount:o,t))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"\r\n"+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.unreadCount:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return'<h4 class="mt-3 text-muted">'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.heading:o,t))+"</h4>\r\n"},3:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return"<p>"+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.description:o,t))?o:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{};return'<img src="'+s(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+s(a(null!=(o=null!=t?t.options:t)?o.imageClass:o,t))+'"/>\r\n'+(null!=(o=n.if.call(c,null!=(o=null!=t?t.options:t)?o.heading:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+(null!=(o=n.if.call(c,null!=(o=null!=t?t.options:t)?o.description:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <span class="text-right pl-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.actionText:o,t))+'">'+s(a(null!=(o=null!=t?t.options:t)?o.actionText:o,t))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return'<div class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.icon:o,t))+" "+s(a(null!=(o=null!=t?t.options:t)?o.iconClass:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.icon:o,t))?o:"")+'</div><div class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.contentContainer:o,t))+'">\r\n <div class="clamp-2 pl-1">'+s(a(null!=(o=null!=t?t.options:t)?o.content:o,t))+"</div>\r\n"+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showActionText:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.notificationTime:o,t))+' pl-1">'+s(a(null!=(o=null!=t?t.options:t)?o.notificationTime:o,t))+"</div>\r\n</div>"},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="notifications-region"></div>'},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;return'<div class="py-2 border-top text-right px-2">\r\n <a class="see-all">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"seeAll",{name:"lang",hash:{},data:i}))+"</div>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<h5 class="header p-2 m-0 border-bottom">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"notifications",{name:"lang",hash:{},data:i}))+'</h5>\r\n<div class="list-region"></div>\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.hasNotifications:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return'<div id="notificationsDropdown" class="notifications-status-region" data-toggle="dropdown"></div>\r\n<div aria-labelledby="notificationsDropdown" class="notifications-region dropdown-menu dropdown-menu-right dropdown-arrow p-0 '+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.notificationsContainer:o,t))+'"></div>'},useData:!0})},function(e,t,n){e.exports={avatar:"_1XSQR"}},function(e,t,n){"use strict";var r=n(530);n.o(r,"PlaylistVideoCollectionIdentifier")&&n.d(t,"PlaylistVideoCollectionIdentifier",(function(){return r.PlaylistVideoCollectionIdentifier}));var i=n(711);n.d(t,"PlaylistVideoCollectionIdentifier",(function(){return i.a}))},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(319),i=n(763);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(319);e.exports=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&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function c(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new u,o=n.domBuilder||new i,s=n.errorHandler,c=n.locator,l=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&o.setDocumentLocator(c),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,c),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new l).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;c(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u<s;u++){e=r.getURI(u);var l=r.getValue(u),f=(n=r.getQName(u),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(u),f),f.value=f.nodeValue=l,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),c(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),c(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),c(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var u=n(768).XMLReader,l=t.DOMImplementation=n(535).DOMImplementation;t.XMLSerializer=n(535).XMLSerializer,t.DOMParser=r},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";var r=n(536),i=n(769).handleRollover,o={};o.ts=n(771),o.aac=n(772);var a=n(181).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,c=0,u=188,l=!1;u<=e.byteLength;)if(71!==e[c]||71!==e[u]&&u!==e.byteLength)c++,u++;else{switch(r=e.subarray(c,u),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;c+=188,u+=188}for(c=(u=e.byteLength)-188,l=!1;c>=0;)if(71!==e[c]||71!==e[u]&&u!==e.byteLength)c--,u--;else{switch(r=e.subarray(c,u),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;c-=188,u-=188}},c=function(e,t,n){for(var r,i,a,s,c,u,l,f=0,p=188,h=!1,d={data:[],size:0};p<e.byteLength;)if(71!==e[f]||71!==e[p])f++,p++;else{switch(r=e.subarray(f,p),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!h&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0),!n.firstKeyFrame)){if(a&&0!==d.size){for(c=new Uint8Array(d.size),u=0;d.data.length;)l=d.data.shift(),c.set(l,u),u+=l.byteLength;if(o.ts.videoPacketContainsKeyFrame(c)){var y=o.ts.parsePesTime(c);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}d.size=0}d.data.push(r),d.size+=r.byteLength}}if(h&&n.firstKeyFrame)break;f+=188,p+=188}for(f=(p=e.byteLength)-188,h=!1;f>=0;)if(71!==e[f]||71!==e[p])f--,p--;else{switch(r=e.subarray(f,p),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0)}if(h)break;f-=188,p-=188}},u=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],c(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,c=0,u=0;e.length-u>=3;){switch(o.aac.parseType(e,u)){case"timed-metadata":if(e.length-u<10){n=!0;break}if((c=o.aac.parseId3TagSize(e,u))>e.length){n=!0;break}null===s&&(t=e.subarray(u,u+c),s=o.aac.parseAacTimestamp(t)),u+=c;break;case"audio":if(e.length-u<7){n=!0;break}if((c=o.aac.parseAdtsSize(e,u))>e.length){n=!0;break}null===i&&(t=e.subarray(u,u+c),i=o.aac.parseSampleRate(t)),r++,u+=c;break;default:u++}if(n)return null}if(null===i||null===s)return null;var l=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*l,pts:s+1024*r*l}]}}(e):u(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e){e.exports=JSON.parse('{"a":"0.0.14-rc.0"}')},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],c=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+c)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(u+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var c=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+u)>>>2;c.length<=a;)c.push(0);c[a]|=o<<8*(l+r*(s%4))}return{value:c,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,c,u,l,f,p,h=0,d=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),c=0;c<a.length;c+=1){for(u=(l=h+y)>>>2;d.length<=u;)d.push(0);d[u]|=a[c]<<8*(f+i*(l%4)),h+=1}else for(f=-1===i?2:0,p="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===p&&(o=(c=255&o)<<8|o>>>8),u=(l=h+y)>>>2;d.length<=u;)d.push(0);d[u]|=o<<8*(f+i*(l%4)),h+=2}return{value:d,binLen:8*h+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,c,u,l,f=0,p=n||[0],h=(r=r||0)>>>3,d=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(c=e.substr(o,4),s=0,a=0;a<c.length;a+=1)s|=t.indexOf(c.charAt(a))<<18-6*a;for(a=0;a<c.length-1;a+=1){for(u=(l=f+h)>>>2;p.length<=u;)p.push(0);p[u]|=(s>>>16-8*a&255)<<8*(d+i*(l%4)),f+=1}}return{value:p,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,c=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+u)>>>2,c.length<=a&&c.push(0),c[a]|=i<<8*(l+r*(s%4));return{value:c,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,c=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(c+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,c,u,l="",f=n/8,p=-1===r?3:0;for(o=0;o<f;o+=3)for(c=o+1<f?e[o+1>>>2]:0,u=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(p+r*(o%4))&255)<<16|(c>>>8*(p+r*((o+1)%4))&255)<<8|u>>>8*(p+r*((o+2)%4))&255,a=0;a<4;a+=1)l+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return l}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function c(e,t,n){return e&t^e&n^t&n}function u(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function l(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function p(e,t){var n,r,i,o,f,p,h,d,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],h=0;h<80;h+=1)y[h]=h<16?e[h]:a(y[h-3]^y[h-8]^y[h-14]^y[h-16],1),p=h<20?l(a(n,5),(d=r)&i^~d&o,f,1518500249,y[h]):h<40?l(a(n,5),s(r,i,o),f,1859775393,y[h]):h<60?l(a(n,5),c(r,i,o),f,2400959708,y[h]):l(a(n,5),s(r,i,o),f,3395469782,y[h]),f=o,o=i,i=a(r,30),r=n,n=p;return t[0]=u(n,t[0]),t[1]=u(r,t[1]),t[2]=u(i,t[2]),t[3]=u(o,t[3]),t[4]=u(f,t[4]),t}function h(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=p(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=p,o.p=function(e){return e.slice()},o.l=f,o.R=h,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var c=i(e,a,this.u,s);if(!0===this.L&&this.i)return c(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return c(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.32-rc.0"}')},function(e,t){e.exports=m},function(e,t,n){e.exports={embeddedPlayer:"dgjVs"}},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region position-relative"></div>\r\n<div id="dialog-region"></div>\r\n<div id="print-region"></div>'},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(157),i=n(21),o=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,o;if(Object(i.h)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),o=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),o=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[o,f]},t}()}).call(this,n(380).Buffer)},function(e,t,n){e.exports={notificationsView:"_3UtcL"}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(1);n(814);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){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 a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(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=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(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 u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(c,e);var t,n,r,i=s(c);function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=i.call(this,e,t)).update(),n}return t=c,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&o(t.prototype,n),r&&o(t,r),c}(r.a.getComponent("Button"));function f(e){return(f="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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==f(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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}l.prototype.controlText_="Favourite";var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(o,e);var t,n,r,i=y(o);function o(){return p(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setFavourite",value:function(e,t){var n=this;e!==this.isFavourite&&(this.isFavourite=e,this.onClickFavourite=t,this.player.ready((function(){n.renderFavouriteButton()})))}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new l(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&h(t.prototype,n),r&&h(t,r),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("favouritePlugin",g)},function(e,t,n){"use strict";var r=n(1),i=n(121);n(816);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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=l(e);if(t){var i=l(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"!==o(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 l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(u,e);var t,n,r,o=c(u);function u(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=o.call(this,e,t)).update(),n}return t=u,(n=[{key:"update",value:function(){this.options_.activityStatus===i.a.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.options_.activityStatus===i.a.Complete?i.a.Incomplete:i.a.Complete,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}}])&&a(t.prototype,n),r&&a(t,r),u}(r.a.getComponent("Button"));function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==p(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 g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}f.prototype.controlText_="ActivityStatus";var b=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&&y(e,t)}(o,e);var t,n,r,i=m(o);function o(){return h(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button))}}])&&d(t.prototype,n),r&&d(t,r),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("activityStatusPlugin",b)},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},,function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(749));var i=r.tokenize,o=r.options.Options;function a(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function s(e){return e.replace(/"/g,"&quot;")}function c(e){if(!e)return"";var t=[];for(var n in e){var r=e[n]+"";t.push(n+'="'+s(r)+'"')}return t.join(" ")}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=new o(t);for(var n=i(e),r=[],u=0;u<n.length;u++){var l=n[u];if("nl"===l.type&&t.nl2br)r.push("<br>\n");else if(l.isLink&&t.check(l)){var f=t.resolve(l),p=f.formatted,h=f.formattedHref,d=f.tagName,y=f.className,m=f.target,v=f.attributes,g="<"+d+' href="'+s(h)+'"';y&&(g+=' class="'+s(y)+'"'),m&&(g+=' target="'+s(m)+'"'),v&&(g+=" "+c(v)),g+=">"+a(p)+"</"+d+">",r.push(g)}else r.push(a(l.toString()))}return r.join("")}if(!String.prototype.linkify)try{Object.defineProperty(String.prototype,"linkify",{set:function(){},get:function(){return function(e){return u(this,e)}}})}catch(e){String.prototype.linkify||(String.prototype.linkify=function(e){return u(this,e)})}t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.tokenize=t.test=t.scanner=t.parser=t.options=t.inherits=t.find=void 0;var r=n(253),i=s(n(750)),o=s(n(751)),a=s(n(752));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var c=function(e){return a.run(o.run(e))};t.find=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=c(e),r=[],i=0;i<n.length;i++){var o=n[i];!o.isLink||t&&o.type!==t||r.push(o.toObject())}return r},t.inherits=r.inherits,t.options=i,t.parser=a,t.scanner=o,t.test=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=c(e);return 1===n.length&&n[0].isLink&&(!t||n[0].type===t)},t.tokenize=c},function(e,t,n){"use strict";t.__esModule=!0;var 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},i={defaultProtocol:"http",events:null,format:a,formatHref:a,nl2br:!1,tagName:"a",target:function(e,t){return"url"===t?"_blank":null},validate:!0,ignoreTags:[],attributes:null,className:"linkified"};function o(e){e=e||{},this.defaultProtocol=e.hasOwnProperty("defaultProtocol")?e.defaultProtocol:i.defaultProtocol,this.events=e.hasOwnProperty("events")?e.events:i.events,this.format=e.hasOwnProperty("format")?e.format:i.format,this.formatHref=e.hasOwnProperty("formatHref")?e.formatHref:i.formatHref,this.nl2br=e.hasOwnProperty("nl2br")?e.nl2br:i.nl2br,this.tagName=e.hasOwnProperty("tagName")?e.tagName:i.tagName,this.target=e.hasOwnProperty("target")?e.target:i.target,this.validate=e.hasOwnProperty("validate")?e.validate:i.validate,this.ignoreTags=[],this.attributes=e.attributes||e.linkAttributes||i.attributes,this.className=e.hasOwnProperty("className")?e.className:e.linkClass||i.className;for(var t=e.hasOwnProperty("ignoreTags")?e.ignoreTags:i.ignoreTags,n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function a(e){return e}t.defaults=i,t.Options=o,t.contains=function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},o.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var o=void 0,a=this[e];if(!a)return a;switch(void 0===a?"undefined":r(a)){case"function":return a(t,n.type);case"object":return"function"==typeof(o=a.hasOwnProperty(n.type)?a[n.type]:i[e])?o(t,n.type):o}return a},getObject:function(e,t,n){var r=this[e];return"function"==typeof r?r(t,n.type):r}}},function(e,t,n){"use strict";t.__esModule=!0,t.start=t.run=t.TOKENS=t.State=void 0;var r=n(416),i=n(315),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i);var a="aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|"),s="0123456789".split(""),c="0123456789abcdefghijklmnopqrstuvwxyz".split(""),u=[" ","\f","\r","\t","\v"," "," ","᠎"],l=[],f=function(e){return new r.CharacterState(e)},p=f(),h=f(i.NUM),d=f(i.DOMAIN),y=f(),m=f(i.WS);p.on("@",f(i.AT)).on(".",f(i.DOT)).on("+",f(i.PLUS)).on("#",f(i.POUND)).on("?",f(i.QUERY)).on("/",f(i.SLASH)).on("_",f(i.UNDERSCORE)).on(":",f(i.COLON)).on("{",f(i.OPENBRACE)).on("[",f(i.OPENBRACKET)).on("<",f(i.OPENANGLEBRACKET)).on("(",f(i.OPENPAREN)).on("}",f(i.CLOSEBRACE)).on("]",f(i.CLOSEBRACKET)).on(">",f(i.CLOSEANGLEBRACKET)).on(")",f(i.CLOSEPAREN)).on("&",f(i.AMPERSAND)).on([",",";","!",'"',"'"],f(i.PUNCTUATION)),p.on("\n",f(i.NL)).on(u,m),m.on(u,m);for(var v=0;v<a.length;v++){var g=(0,r.stateify)(a[v],p,i.TLD,i.DOMAIN);l.push.apply(l,g)}var b=(0,r.stateify)("file",p,i.DOMAIN,i.DOMAIN),_=(0,r.stateify)("ftp",p,i.DOMAIN,i.DOMAIN),w=(0,r.stateify)("http",p,i.DOMAIN,i.DOMAIN),S=(0,r.stateify)("mailto",p,i.DOMAIN,i.DOMAIN);l.push.apply(l,b),l.push.apply(l,_),l.push.apply(l,w),l.push.apply(l,S);var T=b.pop(),C=_.pop(),k=w.pop(),E=S.pop(),O=f(i.DOMAIN),P=f(i.PROTOCOL),A=f(i.MAILTO);C.on("s",O).on(":",P),k.on("s",O).on(":",P),l.push(O),T.on(":",P),O.on(":",P),E.on(":",A);var I=(0,r.stateify)("localhost",p,i.LOCALHOST,i.DOMAIN);l.push.apply(l,I),p.on(s,h),h.on("-",y).on(s,h).on(c,d),d.on("-",y).on(c,d);for(var x=0;x<l.length;x++)l[x].on("-",y).on(c,d);y.on("-",y).on(s,d).on(c,d),p.defaultTransition=f(i.SYM);var R=p;t.State=r.CharacterState,t.TOKENS=o,t.run=function(e){for(var t=e.replace(/[A-Z]/g,(function(e){return e.toLowerCase()})),n=e.length,r=[],i=0;i<n;){for(var o=p,a=null,s=0,c=null,u=-1;i<n&&(a=o.next(t[i]));)(o=a).accepts()?(u=0,c=o):u>=0&&u++,s++,i++;if(!(u<0)){i-=u,s-=u;var l=c.emit();r.push(new l(e.substr(i-s,s)))}}return r},t.start=R},function(e,t,n){"use strict";t.__esModule=!0,t.start=t.run=t.TOKENS=t.State=void 0;var r=n(416),i=n(753),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=n(315);var s=function(e){return new r.TokenState(e)},c=s(),u=s(),l=s(),f=s(),p=s(),h=s(),d=s(),y=s(i.URL),m=s(),v=s(i.URL),g=s(i.URL),b=s(),_=s(),w=s(),S=s(),T=s(),C=s(i.URL),k=s(i.URL),E=s(i.URL),O=s(i.URL),P=s(),A=s(),I=s(),x=s(),R=s(),L=s(),j=s(i.EMAIL),N=s(),D=s(i.EMAIL),B=s(i.MAILTOEMAIL),U=s(),M=s(),V=s(),F=s(),H=s(i.NL);c.on(a.NL,H).on(a.PROTOCOL,u).on(a.MAILTO,l).on(a.SLASH,f),u.on(a.SLASH,f),f.on(a.SLASH,p),c.on(a.TLD,h).on(a.DOMAIN,h).on(a.LOCALHOST,y).on(a.NUM,h),p.on(a.TLD,g).on(a.DOMAIN,g).on(a.NUM,g).on(a.LOCALHOST,g),h.on(a.DOT,d),R.on(a.DOT,L),d.on(a.TLD,y).on(a.DOMAIN,h).on(a.NUM,h).on(a.LOCALHOST,h),L.on(a.TLD,j).on(a.DOMAIN,R).on(a.NUM,R).on(a.LOCALHOST,R),y.on(a.DOT,d),j.on(a.DOT,L),y.on(a.COLON,m).on(a.SLASH,g),m.on(a.NUM,v),v.on(a.SLASH,g),j.on(a.COLON,N),N.on(a.NUM,D);var z=[a.DOMAIN,a.AT,a.LOCALHOST,a.NUM,a.PLUS,a.POUND,a.PROTOCOL,a.SLASH,a.TLD,a.UNDERSCORE,a.SYM,a.AMPERSAND],W=[a.COLON,a.DOT,a.QUERY,a.PUNCTUATION,a.CLOSEBRACE,a.CLOSEBRACKET,a.CLOSEANGLEBRACKET,a.CLOSEPAREN,a.OPENBRACE,a.OPENBRACKET,a.OPENANGLEBRACKET,a.OPENPAREN];g.on(a.OPENBRACE,_).on(a.OPENBRACKET,w).on(a.OPENANGLEBRACKET,S).on(a.OPENPAREN,T),b.on(a.OPENBRACE,_).on(a.OPENBRACKET,w).on(a.OPENANGLEBRACKET,S).on(a.OPENPAREN,T),_.on(a.CLOSEBRACE,g),w.on(a.CLOSEBRACKET,g),S.on(a.CLOSEANGLEBRACKET,g),T.on(a.CLOSEPAREN,g),C.on(a.CLOSEBRACE,g),k.on(a.CLOSEBRACKET,g),E.on(a.CLOSEANGLEBRACKET,g),O.on(a.CLOSEPAREN,g),P.on(a.CLOSEBRACE,g),A.on(a.CLOSEBRACKET,g),I.on(a.CLOSEANGLEBRACKET,g),x.on(a.CLOSEPAREN,g),_.on(z,C),w.on(z,k),S.on(z,E),T.on(z,O),_.on(W,P),w.on(W,A),S.on(W,I),T.on(W,x),C.on(z,C),k.on(z,k),E.on(z,E),O.on(z,O),C.on(W,C),k.on(W,k),E.on(W,E),O.on(W,O),P.on(z,C),A.on(z,k),I.on(z,E),x.on(z,O),P.on(W,P),A.on(W,A),I.on(W,I),x.on(W,x),g.on(z,g),b.on(z,g),g.on(W,b),b.on(W,b),l.on(a.TLD,B).on(a.DOMAIN,B).on(a.NUM,B).on(a.LOCALHOST,B),B.on(z,B).on(W,U),U.on(z,B).on(W,U);var q=[a.DOMAIN,a.NUM,a.PLUS,a.POUND,a.QUERY,a.UNDERSCORE,a.SYM,a.AMPERSAND,a.TLD];h.on(q,M).on(a.AT,V),y.on(q,M).on(a.AT,V),d.on(q,M),M.on(q,M).on(a.AT,V).on(a.DOT,F),F.on(q,M),V.on(a.TLD,R).on(a.DOMAIN,R).on(a.LOCALHOST,j);t.State=r.TokenState,t.TOKENS=o,t.run=function(e){for(var t=e.length,n=0,r=[],o=[];n<t;){for(var a=c,s=null,u=null,l=0,f=null,p=-1;n<t&&!(s=a.next(e[n]));)o.push(e[n++]);for(;n<t&&(u=s||a.next(e[n]));)s=null,(a=u).accepts()?(p=0,f=a):p>=0&&p++,n++,l++;if(p<0)for(var h=n-l;h<n;h++)o.push(e[h]);else{o.length>0&&(r.push(new i.TEXT(o)),o=[]),n-=p,l-=p;var d=f.emit();r.push(new d(e.slice(n-l,n)))}}return o.length>0&&r.push(new i.TEXT(o)),r},t.start=c},function(e,t,n){"use strict";t.__esModule=!0,t.URL=t.TEXT=t.NL=t.EMAIL=t.MAILTOEMAIL=t.Base=void 0;var r=n(417),i=n(253),o=n(315);function a(e){return e instanceof o.DOMAIN||e instanceof o.TLD}var s=(0,r.createTokenClass)();s.prototype={type:"token",isLink:!1,toString:function(){for(var e=[],t=0;t<this.v.length;t++)e.push(this.v[t].toString());return e.join("")},toHref:function(){return this.toString()},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(e)}}};var c=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0}),u=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),l=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"text"}),f=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"nl"}),p=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"url",isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",t=!1,n=!1,r=this.v,i=[],s=0;r[s]instanceof o.PROTOCOL;)t=!0,i.push(r[s].toString().toLowerCase()),s++;for(;r[s]instanceof o.SLASH;)n=!0,i.push(r[s].toString()),s++;for(;a(r[s]);)i.push(r[s].toString().toLowerCase()),s++;for(;s<r.length;s++)i.push(r[s].toString());return i=i.join(""),t||n||(i=e+"://"+i),i},hasProtocol:function(){return this.v[0]instanceof o.PROTOCOL}});t.Base=s,t.MAILTOEMAIL=c,t.EMAIL=u,t.NL=f,t.TEXT=l,t.URL=p},function(e,t,n){},function(e,t){},function(e,t,n){var r=n(742).default,i=n(22);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){var r=n(283),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function o(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function c(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)t(a[0],a[1])}}function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new s;c(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var l=r.createElement("textarea"),f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},p={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},h={v:"title",lang:"lang"},d={rt:"ruby"};function y(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!d[t.localName]||d[t.localName]===e.localName}function i(t,n){var r=f[t];if(!r)return null;var i=e.document.createElement(r),o=h[t];return o&&n&&(i[o]=n.trim()),i}for(var o,s,c=e.document.createElement("div"),u=c,y=[];null!==(o=n());)if("<"!==o[0])u.appendChild(e.document.createTextNode((s=o,l.innerHTML=s,s=l.textContent,l.textContent="",s)));else{if("/"===o[1]){y.length&&y[y.length-1]===o.substr(2).replace(">","")&&(y.pop(),u=u.parentNode);continue}var m,v=a(o.substr(1,o.length-2));if(v){m=e.document.createProcessingInstruction("timestamp",v),u.appendChild(m);continue}var g=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!g)continue;if(!(m=i(g[1],g[3])))continue;if(!r(u,m))continue;if(g[2]){var b=g[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(p.hasOwnProperty(n)){var r=t?"background-color":"color",i=p[n];m.style[r]=i}})),m.className=b.join(" ")}y.push(g[1]),u.appendChild(m),u=m}return c}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<m.length;t++){var n=m[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function g(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var o=n.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var o=0;o<n.length;o++)if(v(n.charCodeAt(o)))return"rtl";return"ltr"}function b(){}function _(e,t,n){b.call(this),this.cue=t,this.cueDiv=y(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:g(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function w(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,n,r){var i=new w(t),o=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(o),s=[];if(o.snapToLines){var c;switch(o.vertical){case"":s=["+y","-y"],c="height";break;case"rl":s=["+x","-x"],c="width";break;case"lr":s=["-x","+x"],c="width"}var u=i.lineHeight,l=u*Math.round(a),f=n[c]+u,p=s[0];Math.abs(l)>f&&(l=l<0?-1:1,l*=Math.ceil(f/u)*u),a<0&&(l+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(p,l)}else{var h=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=h/2;break;case"end":a-=h}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new w(t)}var d=function(e,t){for(var i,o=new w(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var c=e.intersectPercentage(n);a>c&&(i=new w(e),a=c),e=new w(o)}return i||o}(i,s);t.move(d.toCSSCompatValues(n))}function T(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=i(b.prototype),_.prototype.constructor=_,w.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},w.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},w.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},w.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},w.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},w.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},w.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},w.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},T.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},T.convertCueToDOMTree=function(e,t){return e&&t?y(e,t):null};T.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=w.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,c=0;c<t.length;c++)s=t[c],n=new _(e,s,a),r.appendChild(n.div),S(0,n,o,i),s.displayState=n.div,i.push(w.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},T.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},T.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof o))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?c(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;c(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):c(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(c(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var l=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!l||!l[0])throw new o(o.Errors.BadSignature);t.state="HEADER"}for(var f=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(f?f=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{u(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var p=-1!==i.indexOf("--\x3e");if(!i||p&&(f=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new o(o.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=T},function(e,t){},function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function o(e,t,r){this.hasBeenReset=!1;var o="",a=!1,s=e,c=t,u=r,l=null,f="",p=!0,h="auto",d="start",y="auto",m="auto",v=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return o},set:function(e){o=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return f},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(e){var t=i(e);t?(d=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=i(e);t?(m=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,o=100,a=0,s=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");o=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):c=t}}})}},function(e,t){e.exports=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}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r,i,o,a,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,i=/^([^\/?#]*)(.*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var c=i.exec(a.path);a.netLoc=c[1],a.path=c[2]}a.netLoc&&!a.path&&(a.path="/");var u={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(u.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var l=a.path,f=l.substring(0,l.lastIndexOf("/")+1)+o.path;u.path=s.normalizePath(f)}else u.path=a.path,o.params||(u.params=a.params,o.query||(u.query=a.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(u)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(l(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
46
+ e.exports=function(){"use strict";function e(t){return(e="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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(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 r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var s="undefined"!=typeof window&&void 0!==window.document,c=s?window:{},u=!!s&&"ontouchstart"in c.document.documentElement,l=!!s&&"PointerEvent"in c,f="".concat("cropper","-crop"),p="".concat("cropper","-disabled"),h="".concat("cropper","-hidden"),d="".concat("cropper","-hide"),y="".concat("cropper","-invisible"),m="".concat("cropper","-modal"),v="".concat("cropper","-move"),g="".concat("cropper","Action"),b="".concat("cropper","Preview"),_=u?"touchstart":"mousedown",w=u?"touchmove":"mousemove",S=u?"touchend touchcancel":"mouseup",T=l?"pointerdown":_,C=l?"pointermove":w,k=l?"pointerup pointercancel":S,E=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,O=/^data:/,P=/^data:image\/jpeg;base64,/,A=/^img|canvas$/i,I={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},x=Number.isNaN||c.isNaN;function R(e){return"number"==typeof e&&!x(e)}var L=function(e){return e>0&&e<1/0};function j(e){return void 0===e}function N(t){return"object"===e(t)&&null!==t}var D=Object.prototype.hasOwnProperty;function B(e){if(!N(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&D.call(n,"isPrototypeOf")}catch(e){return!1}}function U(e){return"function"==typeof e}var M=Array.prototype.slice;function V(e){return Array.from?Array.from(e):M.call(e)}function F(e,t){return e&&U(t)&&(Array.isArray(e)||R(e.length)?V(e).forEach((function(n,r){t.call(e,n,r,e)})):N(e)&&Object.keys(e).forEach((function(n){t.call(e,e[n],n,e)}))),e}var H=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(e)&&n.length>0&&n.forEach((function(t){N(t)&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},z=/\.\d*(?:0|9){12}\d*$/;function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return z.test(e)?Math.round(e*t)/t:e}var q=/^width|height|left|top|marginLeft|marginTop$/;function G(e,t){var n=e.style;F(t,(function(e,t){q.test(t)&&R(e)&&(e="".concat(e,"px")),n[t]=e}))}function K(e,t){if(t)if(R(e.length))F(e,(function(e){K(e,t)}));else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Y(e,t){t&&(R(e.length)?F(e,(function(e){Y(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function X(e,t,n){t&&(R(e.length)?F(e,(function(e){X(e,t,n)})):n?K(e,t):Y(e,t))}var Q=/([a-z\d])([A-Z])/g;function $(e){return e.replace(Q,"$1-$2").toLowerCase()}function Z(e,t){return N(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat($(t)))}function J(e,t,n){N(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat($(t)),n)}var ee=/\s\s*/,te=function(){var e=!1;if(s){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});c.addEventListener("test",n,r),c.removeEventListener("test",n,r)}return e}();function ne(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(ee).forEach((function(t){if(!te){var o=e.listeners;o&&o[t]&&o[t][n]&&(i=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,i,r)}))}function re(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(ee).forEach((function(t){if(r.once&&!te){var o=e.listeners,a=void 0===o?{}:o;i=function(){delete a[t][n],e.removeEventListener(t,i,r);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],r),a[t][n]=i,e.listeners=a}e.addEventListener(t,i,r)}))}function ie(e,t,n){var r;return U(Event)&&U(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function oe(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var ae=c.location,se=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function ce(e){var t=e.match(se);return null!==t&&(t[1]!==ae.protocol||t[2]!==ae.hostname||t[3]!==ae.port)}function ue(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function le(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,o=e.translateY,a=[];R(i)&&0!==i&&a.push("translateX(".concat(i,"px)")),R(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),R(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),R(n)&&1!==n&&a.push("scaleX(".concat(n,")")),R(r)&&1!==r&&a.push("scaleY(".concat(r,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function fe(e,t){var n=e.pageX,r=e.pageY,i={endX:n,endY:r};return t?i:o({startX:n,startY:r},i)}function pe(e){var t=e.aspectRatio,n=e.height,r=e.width,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=L(r),a=L(n);if(o&&a){var s=n*t;"contain"===i&&s>r||"cover"===i&&s<r?n=r/t:r=n*t}else o?n=r/t:a&&(r=n*t);return{width:r,height:n}}function he(e,t,n,r){var i=t.aspectRatio,o=t.naturalWidth,s=t.naturalHeight,c=t.rotate,u=void 0===c?0:c,l=t.scaleX,f=void 0===l?1:l,p=t.scaleY,h=void 0===p?1:p,d=n.aspectRatio,y=n.naturalWidth,m=n.naturalHeight,v=r.fillColor,g=void 0===v?"transparent":v,b=r.imageSmoothingEnabled,_=void 0===b||b,w=r.imageSmoothingQuality,S=void 0===w?"low":w,T=r.maxWidth,C=void 0===T?1/0:T,k=r.maxHeight,E=void 0===k?1/0:k,O=r.minWidth,P=void 0===O?0:O,A=r.minHeight,I=void 0===A?0:A,x=document.createElement("canvas"),R=x.getContext("2d"),L=pe({aspectRatio:d,width:C,height:E}),j=pe({aspectRatio:d,width:P,height:I},"cover"),N=Math.min(L.width,Math.max(j.width,y)),D=Math.min(L.height,Math.max(j.height,m)),B=pe({aspectRatio:i,width:C,height:E}),U=pe({aspectRatio:i,width:P,height:I},"cover"),M=Math.min(B.width,Math.max(U.width,o)),V=Math.min(B.height,Math.max(U.height,s)),F=[-M/2,-V/2,M,V];return x.width=W(N),x.height=W(D),R.fillStyle=g,R.fillRect(0,0,N,D),R.save(),R.translate(N/2,D/2),R.rotate(u*Math.PI/180),R.scale(f,h),R.imageSmoothingEnabled=_,R.imageSmoothingQuality=S,R.drawImage.apply(R,[e].concat(a(F.map((function(e){return Math.floor(W(e))}))))),R.restore(),x}var de=String.fromCharCode,ye=/^data:.*,/;function me(e){var t,n=new DataView(e);try{var r,i,o;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var a=n.byteLength,s=2;s+1<a;){if(255===n.getUint8(s)&&225===n.getUint8(s+1)){i=s;break}s+=1}if(i){var c=i+10;if("Exif"===function(e,t,n){var r="";n+=t;for(var i=t;i<n;i+=1)r+=de(e.getUint8(i));return r}(n,i+4,4)){var u=n.getUint16(c);if(((r=18761===u)||19789===u)&&42===n.getUint16(c+2,r)){var l=n.getUint32(c+4,r);l>=8&&(o=c+l)}}}if(o){var f,p,h=n.getUint16(o,r);for(p=0;p<h;p+=1)if(f=o+12*p+2,274===n.getUint16(f,r)){f+=8,t=n.getUint16(f,r),n.setUint16(f,1,r);break}}}catch(e){t=1}return t}var ve={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper;K(r,h),Y(e,h);var i={width:Math.max(n.offsetWidth,Number(t.minContainerWidth)||200),height:Math.max(n.offsetHeight,Number(t.minContainerHeight)||100)};this.containerData=i,G(r,{width:i.width,height:i.height}),K(e,h),Y(r,h)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,i=r?t.naturalHeight:t.naturalWidth,o=r?t.naturalWidth:t.naturalHeight,a=i/o,s=e.width,c=e.height;e.height*a>e.width?3===n?s=e.height*a:c=e.width/a:3===n?c=e.width/a:s=e.height*a;var u={aspectRatio:a,naturalWidth:i,naturalHeight:o,width:s,height:c};u.left=(e.width-s)/2,u.top=(e.height-c)/2,u.oldLeft=u.left,u.oldTop=u.top,this.canvasData=u,this.limited=1===n||2===n,this.limitCanvas(!0,!0),this.initialImageData=H({},t),this.initialCanvasData=H({},u)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=i.aspectRatio,c=this.cropped&&o;if(e){var u=Number(n.minCanvasWidth)||0,l=Number(n.minCanvasHeight)||0;a>1?(u=Math.max(u,r.width),l=Math.max(l,r.height),3===a&&(l*s>u?u=l*s:l=u/s)):a>0&&(u?u=Math.max(u,c?o.width:0):l?l=Math.max(l,c?o.height:0):c&&(u=o.width,(l=o.height)*s>u?u=l*s:l=u/s));var f=pe({aspectRatio:s,width:u,height:l});u=f.width,l=f.height,i.minWidth=u,i.minHeight=l,i.maxWidth=1/0,i.maxHeight=1/0}if(t)if(a>(c?0:1)){var p=r.width-i.width,h=r.height-i.height;i.minLeft=Math.min(0,p),i.minTop=Math.min(0,h),i.maxLeft=Math.max(0,p),i.maxTop=Math.max(0,h),c&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,2===a&&(i.width>=r.width&&(i.minLeft=Math.min(0,p),i.maxLeft=Math.max(0,p)),i.height>=r.height&&(i.minTop=Math.min(0,h),i.maxTop=Math.max(0,h))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height},renderCanvas:function(e,t){var n=this.canvasData,r=this.imageData;if(t){var i=function(e){var t=e.width,n=e.height,r=e.degree;if(90==(r=Math.abs(r)%180))return{width:n,height:t};var i=r%90*Math.PI/180,o=Math.sin(i),a=Math.cos(i),s=t*a+n*o,c=t*o+n*a;return r>90?{width:c,height:s}:{width:s,height:c}}({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),o=i.width,a=i.height,s=n.width*(o/n.naturalWidth),c=n.height*(a/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(c-n.height)/2,n.width=s,n.height=c,n.aspectRatio=o/a,n.naturalWidth=o,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,G(this.canvas,H({width:n.width,height:n.height},le({translateX:n.left,translateY:n.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),i=n.naturalHeight*(t.height/t.naturalHeight);H(n,{width:r,height:i,left:(t.width-r)/2,top:(t.height-i)/2}),G(this.image,H({width:n.width,height:n.height},le(H({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,r=Number(e.autoCropArea)||.8,i={width:t.width,height:t.height};n&&(t.height*n>t.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*r),i.height=Math.max(i.minHeight,i.height*r),i.left=t.left+(t.width-i.width)/2,i.top=t.top+(t.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=H({},i)},limitCropBox:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=this.limited,s=n.aspectRatio;if(e){var c=Number(n.minCropBoxWidth)||0,u=Number(n.minCropBoxHeight)||0,l=a?Math.min(r.width,i.width,i.width+i.left,r.width-i.left):r.width,f=a?Math.min(r.height,i.height,i.height+i.top,r.height-i.top):r.height;c=Math.min(c,r.width),u=Math.min(u,r.height),s&&(c&&u?u*s>c?u=c/s:c=u*s:c?u=c/s:u&&(c=u*s),f*s>l?f=l/s:l=f*s),o.minWidth=Math.min(c,l),o.minHeight=Math.min(u,f),o.maxWidth=l,o.maxHeight=f}t&&(a?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(r.width,i.left+i.width)-o.width,o.maxTop=Math.min(r.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=r.width-o.width,o.maxTop=r.height-o.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&J(this.face,g,n.width>=t.width&&n.height>=t.height?"move":"all"),G(this.cropBox,H({width:n.width,height:n.height},le({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ie(this.element,"crop",this.getData())}},ge={initPreview:function(){var e=this.element,t=this.crossOrigin,n=this.options.preview,r=t?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",o=document.createElement("img");if(t&&(o.crossOrigin=t),o.src=r,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,n){var a=n;"string"==typeof n?a=e.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,F(a,(function(e){var n=document.createElement("img");J(e,b,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(n.crossOrigin=t),n.src=r,n.alt=i,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(n)}))}},resetPreview:function(){F(this.previews,(function(e){var t=Z(e,b);G(e,{width:t.width,height:t.height}),e.innerHTML=t.html,function(e,t){if(N(e[t]))try{delete e[t]}catch(n){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(n){e.dataset[t]=void 0}else e.removeAttribute("data-".concat($(t)))}(e,b)}))},preview:function(){var e=this.imageData,t=this.canvasData,n=this.cropBoxData,r=n.width,i=n.height,o=e.width,a=e.height,s=n.left-t.left-e.left,c=n.top-t.top-e.top;this.cropped&&!this.disabled&&(G(this.viewBoxImage,H({width:o,height:a},le(H({translateX:-s,translateY:-c},e)))),F(this.previews,(function(t){var n=Z(t,b),u=n.width,l=n.height,f=u,p=l,h=1;r&&(p=i*(h=u/r)),i&&p>l&&(f=r*(h=l/i),p=l),G(t,{width:f,height:p}),G(t.getElementsByTagName("img")[0],H({width:o*h,height:a*h},le(H({translateX:-s*h,translateY:-c*h},e))))})))}},be={bind:function(){var e=this.element,t=this.options,n=this.cropper;U(t.cropstart)&&re(e,"cropstart",t.cropstart),U(t.cropmove)&&re(e,"cropmove",t.cropmove),U(t.cropend)&&re(e,"cropend",t.cropend),U(t.crop)&&re(e,"crop",t.crop),U(t.zoom)&&re(e,"zoom",t.zoom),re(n,T,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&re(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&re(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),re(e.ownerDocument,C,this.onCropMove=this.cropMove.bind(this)),re(e.ownerDocument,k,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&re(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;U(t.cropstart)&&ne(e,"cropstart",t.cropstart),U(t.cropmove)&&ne(e,"cropmove",t.cropmove),U(t.cropend)&&ne(e,"cropend",t.cropend),U(t.crop)&&ne(e,"crop",t.crop),U(t.zoom)&&ne(e,"zoom",t.zoom),ne(n,T,this.onCropStart),t.zoomable&&t.zoomOnWheel&&ne(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&ne(n,"dblclick",this.onDblclick),ne(e.ownerDocument,C,this.onCropMove),ne(e.ownerDocument,k,this.onCropEnd),t.responsive&&ne(window,"resize",this.onResize)}},_e={resize:function(){var e=this.options,t=this.container,n=this.containerData,r=Number(e.minContainerWidth)||200,i=Number(e.minContainerHeight)||100;if(!(this.disabled||n.width<=r||n.height<=i)){var o,a,s=t.offsetWidth/n.width;1===s&&t.offsetHeight===n.height||(e.restore&&(o=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(F(o,(function(e,t){o[t]=e*s}))),this.setCropBoxData(F(a,(function(e,t){a[t]=e*s})))))}},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=f,(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50),e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t=e.buttons,n=e.button;if(!(this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(R(t)&&1!==t||R(n)&&0!==n||e.ctrlKey))){var r,i=this.options,o=this.pointers;e.changedTouches?F(e.changedTouches,(function(e){o[e.identifier]=fe(e)})):o[e.pointerId||0]=fe(e),r=Object.keys(o).length>1&&i.zoomable&&i.zoomOnTouch?"zoom":Z(e.target,g),E.test(r)&&!1!==ie(this.element,"cropstart",{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,K(this.dragBox,m)))}},cropMove:function(e){var t=this.action;if(!this.disabled&&t){var n=this.pointers;e.preventDefault(),!1!==ie(this.element,"cropmove",{originalEvent:e,action:t})&&(e.changedTouches?F(e.changedTouches,(function(e){H(n[e.identifier]||{},fe(e,!0))})):H(n[e.pointerId||0]||{},fe(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,n=this.pointers;e.changedTouches?F(e.changedTouches,(function(e){delete n[e.identifier]})):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,X(this.dragBox,m,this.cropped&&this.options.modal)),ie(this.element,"cropend",{originalEvent:e,action:t}))}}},we={change:function(e){var t,n=this.options,r=this.canvasData,i=this.containerData,a=this.cropBoxData,s=this.pointers,c=this.action,u=n.aspectRatio,l=a.left,f=a.top,p=a.width,d=a.height,y=l+p,m=f+d,v=0,g=0,b=i.width,_=i.height,w=!0;!u&&e.shiftKey&&(u=p&&d?p/d:1),this.limited&&(v=a.minLeft,g=a.minTop,b=v+Math.min(i.width,r.width,r.left+r.width),_=g+Math.min(i.height,r.height,r.top+r.height));var S=s[Object.keys(s)[0]],T={x:S.endX-S.startX,y:S.endY-S.startY},C=function(e){switch(e){case"e":y+T.x>b&&(T.x=b-y);break;case"w":l+T.x<v&&(T.x=v-l);break;case"n":f+T.y<g&&(T.y=g-f);break;case"s":m+T.y>_&&(T.y=_-m)}};switch(c){case"all":l+=T.x,f+=T.y;break;case"e":if(T.x>=0&&(y>=b||u&&(f<=g||m>=_))){w=!1;break}C("e"),(p+=T.x)<0&&(c="w",l-=p=-p),u&&(d=p/u,f+=(a.height-d)/2);break;case"n":if(T.y<=0&&(f<=g||u&&(l<=v||y>=b))){w=!1;break}C("n"),d-=T.y,f+=T.y,d<0&&(c="s",f-=d=-d),u&&(p=d*u,l+=(a.width-p)/2);break;case"w":if(T.x<=0&&(l<=v||u&&(f<=g||m>=_))){w=!1;break}C("w"),p-=T.x,l+=T.x,p<0&&(c="e",l-=p=-p),u&&(d=p/u,f+=(a.height-d)/2);break;case"s":if(T.y>=0&&(m>=_||u&&(l<=v||y>=b))){w=!1;break}C("s"),(d+=T.y)<0&&(c="n",f-=d=-d),u&&(p=d*u,l+=(a.width-p)/2);break;case"ne":if(u){if(T.y<=0&&(f<=g||y>=b)){w=!1;break}C("n"),d-=T.y,f+=T.y,p=d*u}else C("n"),C("e"),T.x>=0?y<b?p+=T.x:T.y<=0&&f<=g&&(w=!1):p+=T.x,T.y<=0?f>g&&(d-=T.y,f+=T.y):(d-=T.y,f+=T.y);p<0&&d<0?(c="sw",f-=d=-d,l-=p=-p):p<0?(c="nw",l-=p=-p):d<0&&(c="se",f-=d=-d);break;case"nw":if(u){if(T.y<=0&&(f<=g||l<=v)){w=!1;break}C("n"),d-=T.y,f+=T.y,p=d*u,l+=a.width-p}else C("n"),C("w"),T.x<=0?l>v?(p-=T.x,l+=T.x):T.y<=0&&f<=g&&(w=!1):(p-=T.x,l+=T.x),T.y<=0?f>g&&(d-=T.y,f+=T.y):(d-=T.y,f+=T.y);p<0&&d<0?(c="se",f-=d=-d,l-=p=-p):p<0?(c="ne",l-=p=-p):d<0&&(c="sw",f-=d=-d);break;case"sw":if(u){if(T.x<=0&&(l<=v||m>=_)){w=!1;break}C("w"),p-=T.x,l+=T.x,d=p/u}else C("s"),C("w"),T.x<=0?l>v?(p-=T.x,l+=T.x):T.y>=0&&m>=_&&(w=!1):(p-=T.x,l+=T.x),T.y>=0?m<_&&(d+=T.y):d+=T.y;p<0&&d<0?(c="ne",f-=d=-d,l-=p=-p):p<0?(c="se",l-=p=-p):d<0&&(c="nw",f-=d=-d);break;case"se":if(u){if(T.x>=0&&(y>=b||m>=_)){w=!1;break}C("e"),d=(p+=T.x)/u}else C("s"),C("e"),T.x>=0?y<b?p+=T.x:T.y>=0&&m>=_&&(w=!1):p+=T.x,T.y>=0?m<_&&(d+=T.y):d+=T.y;p<0&&d<0?(c="nw",f-=d=-d,l-=p=-p):p<0?(c="sw",l-=p=-p):d<0&&(c="ne",f-=d=-d);break;case"move":this.move(T.x,T.y),w=!1;break;case"zoom":this.zoom(function(e){var t=o({},e),n=[];return F(e,(function(e,r){delete t[r],F(t,(function(t){var r=Math.abs(e.startX-t.startX),i=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(r*r+i*i),c=(Math.sqrt(o*o+a*a)-s)/s;n.push(c)}))})),n.sort((function(e,t){return Math.abs(e)<Math.abs(t)})),n[0]}(s),e),w=!1;break;case"crop":if(!T.x||!T.y){w=!1;break}t=oe(this.cropper),l=S.startX-t.left,f=S.startY-t.top,p=a.minWidth,d=a.minHeight,T.x>0?c=T.y>0?"se":"ne":T.x<0&&(l-=p,c=T.y>0?"sw":"nw"),T.y<0&&(f-=d),this.cropped||(Y(this.cropBox,h),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}w&&(a.width=p,a.height=d,a.left=l,a.top=f,this.action=c,this.renderCropBox()),F(s,(function(e){e.startX=e.endX,e.startY=e.endY}))}},Se={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&K(this.dragBox,m),Y(this.cropBox,h),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=H({},this.initialImageData),this.canvasData=H({},this.initialCanvasData),this.cropBoxData=H({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(H(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Y(this.dragBox,m),K(this.cropBox,h)),this},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,F(this.previews,(function(t){t.getElementsByTagName("img")[0].src=e})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Y(this.cropper,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,K(this.cropper,p)),this},destroy:function(){var e=this.element;return e.cropper?(e.cropper=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,i=n.top;return this.moveTo(j(e)?e:r+Number(e),j(t)?t:i+Number(t))},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(R(e)&&(n.left=e,r=!0),R(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r=this.options,i=this.canvasData,o=i.width,a=i.height,s=i.naturalWidth,c=i.naturalHeight;if((e=Number(e))>=0&&this.ready&&!this.disabled&&r.zoomable){var u=s*e,l=c*e;if(!1===ie(this.element,"zoom",{ratio:e,oldRatio:o/s,originalEvent:n}))return this;if(n){var f=this.pointers,p=oe(this.cropper),h=f&&Object.keys(f).length?function(e){var t=0,n=0,r=0;return F(e,(function(e){var i=e.startX,o=e.startY;t+=i,n+=o,r+=1})),{pageX:t/=r,pageY:n/=r}}(f):{pageX:n.pageX,pageY:n.pageY};i.left-=(u-o)*((h.pageX-p.left-i.left)/o),i.top-=(l-a)*((h.pageY-p.top-i.top)/a)}else B(t)&&R(t.x)&&R(t.y)?(i.left-=(u-o)*((t.x-i.left)/o),i.top-=(l-a)*((t.y-i.top)/a)):(i.left-=(u-o)/2,i.top-=(l-a)/2);i.width=u,i.height=l,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return R(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,R(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(R(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(R(e)&&(n.scaleX=e,r=!0),R(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,r=this.imageData,i=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){e={x:o.left-i.left,y:o.top-i.top,width:o.width,height:o.height};var a=r.width/r.naturalWidth;if(F(e,(function(t,n){e[n]=t/a})),t){var s=Math.round(e.y+e.height),c=Math.round(e.x+e.width);e.x=Math.round(e.x),e.y=Math.round(e.y),e.width=c-e.x,e.height=s-e.y}}else e={x:0,y:0,width:0,height:0};return n.rotatable&&(e.rotate=r.rotate||0),n.scalable&&(e.scaleX=r.scaleX||1,e.scaleY=r.scaleY||1),e},setData:function(e){var t=this.options,n=this.imageData,r=this.canvasData,i={};if(this.ready&&!this.disabled&&B(e)){var o=!1;t.rotatable&&R(e.rotate)&&e.rotate!==n.rotate&&(n.rotate=e.rotate,o=!0),t.scalable&&(R(e.scaleX)&&e.scaleX!==n.scaleX&&(n.scaleX=e.scaleX,o=!0),R(e.scaleY)&&e.scaleY!==n.scaleY&&(n.scaleY=e.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;R(e.x)&&(i.left=e.x*a+r.left),R(e.y)&&(i.top=e.y*a+r.top),R(e.width)&&(i.width=e.width*a),R(e.height)&&(i.height=e.height*a),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?H({},this.containerData):{}},getImageData:function(){return this.sized?H({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&F(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){t[n]=e[n]})),t},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&B(e)&&(R(e.left)&&(t.left=e.left),R(e.top)&&(t.top=e.top),R(e.width)?(t.width=e.width,t.height=e.width/n):R(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,i=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&B(e)&&(R(e.left)&&(r.left=e.left),R(e.top)&&(r.top=e.top),R(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),R(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),i&&(t?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=he(this.image,this.imageData,t,e);if(!this.cropped)return n;var r=this.getData(),i=r.x,o=r.y,s=r.width,c=r.height,u=n.width/Math.floor(t.naturalWidth);1!==u&&(i*=u,o*=u,s*=u,c*=u);var l=s/c,f=pe({aspectRatio:l,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),p=pe({aspectRatio:l,width:e.minWidth||0,height:e.minHeight||0},"cover"),h=pe({aspectRatio:l,width:e.width||(1!==u?n.width:s),height:e.height||(1!==u?n.height:c)}),d=h.width,y=h.height;d=Math.min(f.width,Math.max(p.width,d)),y=Math.min(f.height,Math.max(p.height,y));var m=document.createElement("canvas"),v=m.getContext("2d");m.width=W(d),m.height=W(y),v.fillStyle=e.fillColor||"transparent",v.fillRect(0,0,d,y);var g=e.imageSmoothingEnabled,b=void 0===g||g,_=e.imageSmoothingQuality;v.imageSmoothingEnabled=b,_&&(v.imageSmoothingQuality=_);var w,S,T,C,k,E,O=n.width,P=n.height,A=i,I=o;A<=-s||A>O?(A=0,w=0,T=0,k=0):A<=0?(T=-A,A=0,k=w=Math.min(O,s+A)):A<=O&&(T=0,k=w=Math.min(s,O-A)),w<=0||I<=-c||I>P?(I=0,S=0,C=0,E=0):I<=0?(C=-I,I=0,E=S=Math.min(P,c+I)):I<=P&&(C=0,E=S=Math.min(c,P-I));var x=[A,I,w,S];if(k>0&&E>0){var R=d/s;x.push(T*R,C*R,k*R,E*R)}return v.drawImage.apply(v,[n].concat(a(x.map((function(e){return Math.floor(W(e))}))))),m},setAspectRatio:function(e){var t=this.options;return this.disabled||j(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,n=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var i="crop"===e,o=t.movable&&"move"===e;e=i||o?e:"none",t.dragMode=e,J(n,g,e),X(n,f,i),X(n,v,o),t.cropBoxMovable||(J(r,g,e),X(r,f,i),X(r,v,o))}return this}},Te=c.Cropper,Ce=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,e),!n||!A.test(n.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=n,this.options=H({},I,B(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var r,i,o;return r=e,o=[{key:"noConflict",value:function(){return window.Cropper=Te,e}},{key:"setDefaults",value:function(e){H(I,B(e)&&e)}}],(i=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t.cropper){if(t.cropper=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",this.originalUrl=e,!e)return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t=this;if(e){this.url=e,this.imageData={};var n=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if(O.test(e))P.test(e)?this.read((i=e.replace(ye,""),o=atob(i),a=new ArrayBuffer(o.length),F(s=new Uint8Array(a),(function(e,t){s[t]=o.charCodeAt(t)})),a)):this.clone();else{var i,o,a,s,c=new XMLHttpRequest,u=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=u,c.onerror=u,c.ontimeout=u,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){t.read(c.response)},c.onloadend=function(){t.reloading=!1,t.xhr=null},r.checkCrossOrigin&&ce(e)&&n.crossOrigin&&(e=ue(e)),c.open("GET",e),c.responseType="arraybuffer",c.withCredentials="use-credentials"===n.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=me(e),i=0,o=1,a=1;if(r>1){this.url=function(e,t){for(var n=[],r=new Uint8Array(e);r.length>0;)n.push(de.apply(null,V(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,"image/jpeg");var s=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r);i=s.rotate,o=s.scaleX,a=s.scaleY}t.rotatable&&(n.rotate=i),t.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t;this.options.checkCrossOrigin&&ce(t)&&(n||(n="anonymous"),r=ue(t)),this.crossOrigin=n,this.crossOriginUrl=r;var i=document.createElement("img");n&&(i.crossOrigin=n),i.src=r||t,i.alt=e.alt||"The image to crop",this.image=i,i.onload=this.start.bind(this),i.onerror=this.stop.bind(this),K(i,d),e.parentNode.insertBefore(i,e.nextSibling)}},{key:"start",value:function(){var e=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var n=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),r=function(t,n){H(e.imageData,{naturalWidth:t,naturalHeight:n,aspectRatio:t/n}),e.sizing=!1,e.sized=!0,e.build()};if(!t.naturalWidth||n){var i=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=i,i.onload=function(){r(i.width,i.height),n||o.removeChild(i)},i.src=t.src,n||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(i))}else r(t.naturalWidth,t.naturalHeight)}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var e=this.element,t=this.options,n=this.image,r=e.parentNode,i=document.createElement("div");i.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=i.querySelector(".".concat("cropper","-container")),a=o.querySelector(".".concat("cropper","-canvas")),s=o.querySelector(".".concat("cropper","-drag-box")),c=o.querySelector(".".concat("cropper","-crop-box")),u=c.querySelector(".".concat("cropper","-face"));this.container=r,this.cropper=o,this.canvas=a,this.dragBox=s,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=u,a.appendChild(n),K(e,h),r.insertBefore(o,e.nextSibling),this.isImg||Y(n,d),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,K(c,h),t.guides||K(c.getElementsByClassName("".concat("cropper","-dashed")),h),t.center||K(c.getElementsByClassName("".concat("cropper","-center")),h),t.background&&K(o,"".concat("cropper","-bg")),t.highlight||K(u,y),t.cropBoxMovable&&(K(u,v),J(u,g,"all")),t.cropBoxResizable||(K(c.getElementsByClassName("".concat("cropper","-line")),h),K(c.getElementsByClassName("".concat("cropper","-point")),h)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),U(t.ready)&&re(e,"ready",t.ready,{once:!0}),ie(e,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Y(this.element,h))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&n(r.prototype,i),o&&n(r,o),e}();return H(Ce.prototype,ve,ge,be,_e,we,Se),Ce}()},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return'<span class="badge badge-danger badge-pill '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.unreadCount:o,t))+'">'+s(a(null!=(o=null!=t?t.options:t)?o.unreadCount:o,t))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"\r\n"+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.unreadCount:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return'<h4 class="mt-3 text-muted">'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.heading:o,t))+"</h4>\r\n"},3:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return"<p>"+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.description:o,t))?o:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{};return'<img src="'+s(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+s(a(null!=(o=null!=t?t.options:t)?o.imageClass:o,t))+'"/>\r\n'+(null!=(o=n.if.call(c,null!=(o=null!=t?t.options:t)?o.heading:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+(null!=(o=n.if.call(c,null!=(o=null!=t?t.options:t)?o.description:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <span class="text-right pl-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.actionText:o,t))+'">'+s(a(null!=(o=null!=t?t.options:t)?o.actionText:o,t))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return'<div class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.icon:o,t))+" "+s(a(null!=(o=null!=t?t.options:t)?o.iconClass:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.icon:o,t))?o:"")+'</div><div class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.contentContainer:o,t))+'">\r\n <div class="clamp-2 pl-1">'+s(a(null!=(o=null!=t?t.options:t)?o.content:o,t))+"</div>\r\n"+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showActionText:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.notificationTime:o,t))+' pl-1">'+s(a(null!=(o=null!=t?t.options:t)?o.notificationTime:o,t))+"</div>\r\n</div>"},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="notifications-region"></div>'},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;return'<div class="py-2 border-top text-right px-2">\r\n <a class="see-all">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"seeAll",{name:"lang",hash:{},data:i}))+"</div>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<h5 class="header p-2 m-0 border-bottom">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"notifications",{name:"lang",hash:{},data:i}))+'</h5>\r\n<div class="list-region"></div>\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.hasNotifications:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;e.propertyIsEnumerable;return'<div id="notificationsDropdown" class="notifications-status-region" data-toggle="dropdown"></div>\r\n<div aria-labelledby="notificationsDropdown" class="notifications-region dropdown-menu dropdown-menu-right dropdown-arrow p-0 '+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.notificationsContainer:o,t))+'"></div>'},useData:!0})},function(e,t,n){e.exports={avatar:"_1XSQR"}},function(e,t,n){"use strict";var r=n(530);n.o(r,"PlaylistVideoCollectionIdentifier")&&n.d(t,"PlaylistVideoCollectionIdentifier",(function(){return r.PlaylistVideoCollectionIdentifier}));var i=n(711);n.d(t,"PlaylistVideoCollectionIdentifier",(function(){return i.a}))},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(319),i=n(763);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(319);e.exports=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&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function c(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new u,o=n.domBuilder||new i,s=n.errorHandler,c=n.locator,l=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&o.setDocumentLocator(c),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,c),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new l).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;c(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u<s;u++){e=r.getURI(u);var l=r.getValue(u),f=(n=r.getQName(u),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(u),f),f.value=f.nodeValue=l,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),c(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),c(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),c(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var u=n(768).XMLReader,l=t.DOMImplementation=n(535).DOMImplementation;t.XMLSerializer=n(535).XMLSerializer,t.DOMParser=r},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";var r=n(536),i=n(769).handleRollover,o={};o.ts=n(771),o.aac=n(772);var a=n(181).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,c=0,u=188,l=!1;u<=e.byteLength;)if(71!==e[c]||71!==e[u]&&u!==e.byteLength)c++,u++;else{switch(r=e.subarray(c,u),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;c+=188,u+=188}for(c=(u=e.byteLength)-188,l=!1;c>=0;)if(71!==e[c]||71!==e[u]&&u!==e.byteLength)c--,u--;else{switch(r=e.subarray(c,u),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;c-=188,u-=188}},c=function(e,t,n){for(var r,i,a,s,c,u,l,f=0,p=188,h=!1,d={data:[],size:0};p<e.byteLength;)if(71!==e[f]||71!==e[p])f++,p++;else{switch(r=e.subarray(f,p),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!h&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0),!n.firstKeyFrame)){if(a&&0!==d.size){for(c=new Uint8Array(d.size),u=0;d.data.length;)l=d.data.shift(),c.set(l,u),u+=l.byteLength;if(o.ts.videoPacketContainsKeyFrame(c)){var y=o.ts.parsePesTime(c);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}d.size=0}d.data.push(r),d.size+=r.byteLength}}if(h&&n.firstKeyFrame)break;f+=188,p+=188}for(f=(p=e.byteLength)-188,h=!1;f>=0;)if(71!==e[f]||71!==e[p])f--,p--;else{switch(r=e.subarray(f,p),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0)}if(h)break;f-=188,p-=188}},u=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],c(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,c=0,u=0;e.length-u>=3;){switch(o.aac.parseType(e,u)){case"timed-metadata":if(e.length-u<10){n=!0;break}if((c=o.aac.parseId3TagSize(e,u))>e.length){n=!0;break}null===s&&(t=e.subarray(u,u+c),s=o.aac.parseAacTimestamp(t)),u+=c;break;case"audio":if(e.length-u<7){n=!0;break}if((c=o.aac.parseAdtsSize(e,u))>e.length){n=!0;break}null===i&&(t=e.subarray(u,u+c),i=o.aac.parseSampleRate(t)),r++,u+=c;break;default:u++}if(n)return null}if(null===i||null===s)return null;var l=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*l,pts:s+1024*r*l}]}}(e):u(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e){e.exports=JSON.parse('{"a":"0.0.14"}')},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],c=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+c)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(u+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var c=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+u)>>>2;c.length<=a;)c.push(0);c[a]|=o<<8*(l+r*(s%4))}return{value:c,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,c,u,l,f,p,h=0,d=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),c=0;c<a.length;c+=1){for(u=(l=h+y)>>>2;d.length<=u;)d.push(0);d[u]|=a[c]<<8*(f+i*(l%4)),h+=1}else for(f=-1===i?2:0,p="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===p&&(o=(c=255&o)<<8|o>>>8),u=(l=h+y)>>>2;d.length<=u;)d.push(0);d[u]|=o<<8*(f+i*(l%4)),h+=2}return{value:d,binLen:8*h+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,c,u,l,f=0,p=n||[0],h=(r=r||0)>>>3,d=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(c=e.substr(o,4),s=0,a=0;a<c.length;a+=1)s|=t.indexOf(c.charAt(a))<<18-6*a;for(a=0;a<c.length-1;a+=1){for(u=(l=f+h)>>>2;p.length<=u;)p.push(0);p[u]|=(s>>>16-8*a&255)<<8*(d+i*(l%4)),f+=1}}return{value:p,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,c=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+u)>>>2,c.length<=a&&c.push(0),c[a]|=i<<8*(l+r*(s%4));return{value:c,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,c=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(c+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,c,u,l="",f=n/8,p=-1===r?3:0;for(o=0;o<f;o+=3)for(c=o+1<f?e[o+1>>>2]:0,u=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(p+r*(o%4))&255)<<16|(c>>>8*(p+r*((o+1)%4))&255)<<8|u>>>8*(p+r*((o+2)%4))&255,a=0;a<4;a+=1)l+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return l}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function c(e,t,n){return e&t^e&n^t&n}function u(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function l(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function p(e,t){var n,r,i,o,f,p,h,d,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],h=0;h<80;h+=1)y[h]=h<16?e[h]:a(y[h-3]^y[h-8]^y[h-14]^y[h-16],1),p=h<20?l(a(n,5),(d=r)&i^~d&o,f,1518500249,y[h]):h<40?l(a(n,5),s(r,i,o),f,1859775393,y[h]):h<60?l(a(n,5),c(r,i,o),f,2400959708,y[h]):l(a(n,5),s(r,i,o),f,3395469782,y[h]),f=o,o=i,i=a(r,30),r=n,n=p;return t[0]=u(n,t[0]),t[1]=u(r,t[1]),t[2]=u(i,t[2]),t[3]=u(o,t[3]),t[4]=u(f,t[4]),t}function h(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=p(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=p,o.p=function(e){return e.slice()},o.l=f,o.R=h,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var c=i(e,a,this.u,s);if(!0===this.L&&this.i)return c(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return c(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.32"}')},function(e,t){e.exports=m},function(e,t,n){e.exports={embeddedPlayer:"dgjVs"}},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region position-relative"></div>\r\n<div id="dialog-region"></div>\r\n<div id="print-region"></div>'},useData:!0})},function(e,t,n){var r=n(116);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(157),i=n(21),o=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,o;if(Object(i.h)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),o=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),o=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[o,f]},t}()}).call(this,n(380).Buffer)},function(e,t,n){e.exports={notificationsView:"_3UtcL"}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(1);n(814);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){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 a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(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=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(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 u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(c,e);var t,n,r,i=s(c);function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=i.call(this,e,t)).update(),n}return t=c,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&o(t.prototype,n),r&&o(t,r),c}(r.a.getComponent("Button"));function f(e){return(f="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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==f(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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}l.prototype.controlText_="Favourite";var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(o,e);var t,n,r,i=y(o);function o(){return p(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setFavourite",value:function(e,t){var n=this;e!==this.isFavourite&&(this.isFavourite=e,this.onClickFavourite=t,this.player.ready((function(){n.renderFavouriteButton()})))}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new l(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&h(t.prototype,n),r&&h(t,r),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("favouritePlugin",g)},function(e,t,n){"use strict";var r=n(1),i=n(121);n(816);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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=l(e);if(t){var i=l(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"!==o(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 l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(u,e);var t,n,r,o=c(u);function u(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=o.call(this,e,t)).update(),n}return t=u,(n=[{key:"update",value:function(){this.options_.activityStatus===i.a.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.options_.activityStatus===i.a.Complete?i.a.Incomplete:i.a.Complete,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}}])&&a(t.prototype,n),r&&a(t,r),u}(r.a.getComponent("Button"));function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==p(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 g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}f.prototype.controlText_="ActivityStatus";var b=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&&y(e,t)}(o,e);var t,n,r,i=m(o);function o(){return h(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button))}}])&&d(t.prototype,n),r&&d(t,r),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("activityStatusPlugin",b)},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},,function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(749));var i=r.tokenize,o=r.options.Options;function a(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function s(e){return e.replace(/"/g,"&quot;")}function c(e){if(!e)return"";var t=[];for(var n in e){var r=e[n]+"";t.push(n+'="'+s(r)+'"')}return t.join(" ")}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=new o(t);for(var n=i(e),r=[],u=0;u<n.length;u++){var l=n[u];if("nl"===l.type&&t.nl2br)r.push("<br>\n");else if(l.isLink&&t.check(l)){var f=t.resolve(l),p=f.formatted,h=f.formattedHref,d=f.tagName,y=f.className,m=f.target,v=f.attributes,g="<"+d+' href="'+s(h)+'"';y&&(g+=' class="'+s(y)+'"'),m&&(g+=' target="'+s(m)+'"'),v&&(g+=" "+c(v)),g+=">"+a(p)+"</"+d+">",r.push(g)}else r.push(a(l.toString()))}return r.join("")}if(!String.prototype.linkify)try{Object.defineProperty(String.prototype,"linkify",{set:function(){},get:function(){return function(e){return u(this,e)}}})}catch(e){String.prototype.linkify||(String.prototype.linkify=function(e){return u(this,e)})}t.default=u},function(e,t,n){"use strict";t.__esModule=!0,t.tokenize=t.test=t.scanner=t.parser=t.options=t.inherits=t.find=void 0;var r=n(253),i=s(n(750)),o=s(n(751)),a=s(n(752));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var c=function(e){return a.run(o.run(e))};t.find=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=c(e),r=[],i=0;i<n.length;i++){var o=n[i];!o.isLink||t&&o.type!==t||r.push(o.toObject())}return r},t.inherits=r.inherits,t.options=i,t.parser=a,t.scanner=o,t.test=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=c(e);return 1===n.length&&n[0].isLink&&(!t||n[0].type===t)},t.tokenize=c},function(e,t,n){"use strict";t.__esModule=!0;var 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},i={defaultProtocol:"http",events:null,format:a,formatHref:a,nl2br:!1,tagName:"a",target:function(e,t){return"url"===t?"_blank":null},validate:!0,ignoreTags:[],attributes:null,className:"linkified"};function o(e){e=e||{},this.defaultProtocol=e.hasOwnProperty("defaultProtocol")?e.defaultProtocol:i.defaultProtocol,this.events=e.hasOwnProperty("events")?e.events:i.events,this.format=e.hasOwnProperty("format")?e.format:i.format,this.formatHref=e.hasOwnProperty("formatHref")?e.formatHref:i.formatHref,this.nl2br=e.hasOwnProperty("nl2br")?e.nl2br:i.nl2br,this.tagName=e.hasOwnProperty("tagName")?e.tagName:i.tagName,this.target=e.hasOwnProperty("target")?e.target:i.target,this.validate=e.hasOwnProperty("validate")?e.validate:i.validate,this.ignoreTags=[],this.attributes=e.attributes||e.linkAttributes||i.attributes,this.className=e.hasOwnProperty("className")?e.className:e.linkClass||i.className;for(var t=e.hasOwnProperty("ignoreTags")?e.ignoreTags:i.ignoreTags,n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function a(e){return e}t.defaults=i,t.Options=o,t.contains=function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},o.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var o=void 0,a=this[e];if(!a)return a;switch(void 0===a?"undefined":r(a)){case"function":return a(t,n.type);case"object":return"function"==typeof(o=a.hasOwnProperty(n.type)?a[n.type]:i[e])?o(t,n.type):o}return a},getObject:function(e,t,n){var r=this[e];return"function"==typeof r?r(t,n.type):r}}},function(e,t,n){"use strict";t.__esModule=!0,t.start=t.run=t.TOKENS=t.State=void 0;var r=n(416),i=n(315),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i);var a="aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|"),s="0123456789".split(""),c="0123456789abcdefghijklmnopqrstuvwxyz".split(""),u=[" ","\f","\r","\t","\v"," "," ","᠎"],l=[],f=function(e){return new r.CharacterState(e)},p=f(),h=f(i.NUM),d=f(i.DOMAIN),y=f(),m=f(i.WS);p.on("@",f(i.AT)).on(".",f(i.DOT)).on("+",f(i.PLUS)).on("#",f(i.POUND)).on("?",f(i.QUERY)).on("/",f(i.SLASH)).on("_",f(i.UNDERSCORE)).on(":",f(i.COLON)).on("{",f(i.OPENBRACE)).on("[",f(i.OPENBRACKET)).on("<",f(i.OPENANGLEBRACKET)).on("(",f(i.OPENPAREN)).on("}",f(i.CLOSEBRACE)).on("]",f(i.CLOSEBRACKET)).on(">",f(i.CLOSEANGLEBRACKET)).on(")",f(i.CLOSEPAREN)).on("&",f(i.AMPERSAND)).on([",",";","!",'"',"'"],f(i.PUNCTUATION)),p.on("\n",f(i.NL)).on(u,m),m.on(u,m);for(var v=0;v<a.length;v++){var g=(0,r.stateify)(a[v],p,i.TLD,i.DOMAIN);l.push.apply(l,g)}var b=(0,r.stateify)("file",p,i.DOMAIN,i.DOMAIN),_=(0,r.stateify)("ftp",p,i.DOMAIN,i.DOMAIN),w=(0,r.stateify)("http",p,i.DOMAIN,i.DOMAIN),S=(0,r.stateify)("mailto",p,i.DOMAIN,i.DOMAIN);l.push.apply(l,b),l.push.apply(l,_),l.push.apply(l,w),l.push.apply(l,S);var T=b.pop(),C=_.pop(),k=w.pop(),E=S.pop(),O=f(i.DOMAIN),P=f(i.PROTOCOL),A=f(i.MAILTO);C.on("s",O).on(":",P),k.on("s",O).on(":",P),l.push(O),T.on(":",P),O.on(":",P),E.on(":",A);var I=(0,r.stateify)("localhost",p,i.LOCALHOST,i.DOMAIN);l.push.apply(l,I),p.on(s,h),h.on("-",y).on(s,h).on(c,d),d.on("-",y).on(c,d);for(var x=0;x<l.length;x++)l[x].on("-",y).on(c,d);y.on("-",y).on(s,d).on(c,d),p.defaultTransition=f(i.SYM);var R=p;t.State=r.CharacterState,t.TOKENS=o,t.run=function(e){for(var t=e.replace(/[A-Z]/g,(function(e){return e.toLowerCase()})),n=e.length,r=[],i=0;i<n;){for(var o=p,a=null,s=0,c=null,u=-1;i<n&&(a=o.next(t[i]));)(o=a).accepts()?(u=0,c=o):u>=0&&u++,s++,i++;if(!(u<0)){i-=u,s-=u;var l=c.emit();r.push(new l(e.substr(i-s,s)))}}return r},t.start=R},function(e,t,n){"use strict";t.__esModule=!0,t.start=t.run=t.TOKENS=t.State=void 0;var r=n(416),i=n(753),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=n(315);var s=function(e){return new r.TokenState(e)},c=s(),u=s(),l=s(),f=s(),p=s(),h=s(),d=s(),y=s(i.URL),m=s(),v=s(i.URL),g=s(i.URL),b=s(),_=s(),w=s(),S=s(),T=s(),C=s(i.URL),k=s(i.URL),E=s(i.URL),O=s(i.URL),P=s(),A=s(),I=s(),x=s(),R=s(),L=s(),j=s(i.EMAIL),N=s(),D=s(i.EMAIL),B=s(i.MAILTOEMAIL),U=s(),M=s(),V=s(),F=s(),H=s(i.NL);c.on(a.NL,H).on(a.PROTOCOL,u).on(a.MAILTO,l).on(a.SLASH,f),u.on(a.SLASH,f),f.on(a.SLASH,p),c.on(a.TLD,h).on(a.DOMAIN,h).on(a.LOCALHOST,y).on(a.NUM,h),p.on(a.TLD,g).on(a.DOMAIN,g).on(a.NUM,g).on(a.LOCALHOST,g),h.on(a.DOT,d),R.on(a.DOT,L),d.on(a.TLD,y).on(a.DOMAIN,h).on(a.NUM,h).on(a.LOCALHOST,h),L.on(a.TLD,j).on(a.DOMAIN,R).on(a.NUM,R).on(a.LOCALHOST,R),y.on(a.DOT,d),j.on(a.DOT,L),y.on(a.COLON,m).on(a.SLASH,g),m.on(a.NUM,v),v.on(a.SLASH,g),j.on(a.COLON,N),N.on(a.NUM,D);var z=[a.DOMAIN,a.AT,a.LOCALHOST,a.NUM,a.PLUS,a.POUND,a.PROTOCOL,a.SLASH,a.TLD,a.UNDERSCORE,a.SYM,a.AMPERSAND],W=[a.COLON,a.DOT,a.QUERY,a.PUNCTUATION,a.CLOSEBRACE,a.CLOSEBRACKET,a.CLOSEANGLEBRACKET,a.CLOSEPAREN,a.OPENBRACE,a.OPENBRACKET,a.OPENANGLEBRACKET,a.OPENPAREN];g.on(a.OPENBRACE,_).on(a.OPENBRACKET,w).on(a.OPENANGLEBRACKET,S).on(a.OPENPAREN,T),b.on(a.OPENBRACE,_).on(a.OPENBRACKET,w).on(a.OPENANGLEBRACKET,S).on(a.OPENPAREN,T),_.on(a.CLOSEBRACE,g),w.on(a.CLOSEBRACKET,g),S.on(a.CLOSEANGLEBRACKET,g),T.on(a.CLOSEPAREN,g),C.on(a.CLOSEBRACE,g),k.on(a.CLOSEBRACKET,g),E.on(a.CLOSEANGLEBRACKET,g),O.on(a.CLOSEPAREN,g),P.on(a.CLOSEBRACE,g),A.on(a.CLOSEBRACKET,g),I.on(a.CLOSEANGLEBRACKET,g),x.on(a.CLOSEPAREN,g),_.on(z,C),w.on(z,k),S.on(z,E),T.on(z,O),_.on(W,P),w.on(W,A),S.on(W,I),T.on(W,x),C.on(z,C),k.on(z,k),E.on(z,E),O.on(z,O),C.on(W,C),k.on(W,k),E.on(W,E),O.on(W,O),P.on(z,C),A.on(z,k),I.on(z,E),x.on(z,O),P.on(W,P),A.on(W,A),I.on(W,I),x.on(W,x),g.on(z,g),b.on(z,g),g.on(W,b),b.on(W,b),l.on(a.TLD,B).on(a.DOMAIN,B).on(a.NUM,B).on(a.LOCALHOST,B),B.on(z,B).on(W,U),U.on(z,B).on(W,U);var q=[a.DOMAIN,a.NUM,a.PLUS,a.POUND,a.QUERY,a.UNDERSCORE,a.SYM,a.AMPERSAND,a.TLD];h.on(q,M).on(a.AT,V),y.on(q,M).on(a.AT,V),d.on(q,M),M.on(q,M).on(a.AT,V).on(a.DOT,F),F.on(q,M),V.on(a.TLD,R).on(a.DOMAIN,R).on(a.LOCALHOST,j);t.State=r.TokenState,t.TOKENS=o,t.run=function(e){for(var t=e.length,n=0,r=[],o=[];n<t;){for(var a=c,s=null,u=null,l=0,f=null,p=-1;n<t&&!(s=a.next(e[n]));)o.push(e[n++]);for(;n<t&&(u=s||a.next(e[n]));)s=null,(a=u).accepts()?(p=0,f=a):p>=0&&p++,n++,l++;if(p<0)for(var h=n-l;h<n;h++)o.push(e[h]);else{o.length>0&&(r.push(new i.TEXT(o)),o=[]),n-=p,l-=p;var d=f.emit();r.push(new d(e.slice(n-l,n)))}}return o.length>0&&r.push(new i.TEXT(o)),r},t.start=c},function(e,t,n){"use strict";t.__esModule=!0,t.URL=t.TEXT=t.NL=t.EMAIL=t.MAILTOEMAIL=t.Base=void 0;var r=n(417),i=n(253),o=n(315);function a(e){return e instanceof o.DOMAIN||e instanceof o.TLD}var s=(0,r.createTokenClass)();s.prototype={type:"token",isLink:!1,toString:function(){for(var e=[],t=0;t<this.v.length;t++)e.push(this.v[t].toString());return e.join("")},toHref:function(){return this.toString()},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(e)}}};var c=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0}),u=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),l=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"text"}),f=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"nl"}),p=(0,i.inherits)(s,(0,r.createTokenClass)(),{type:"url",isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",t=!1,n=!1,r=this.v,i=[],s=0;r[s]instanceof o.PROTOCOL;)t=!0,i.push(r[s].toString().toLowerCase()),s++;for(;r[s]instanceof o.SLASH;)n=!0,i.push(r[s].toString()),s++;for(;a(r[s]);)i.push(r[s].toString().toLowerCase()),s++;for(;s<r.length;s++)i.push(r[s].toString());return i=i.join(""),t||n||(i=e+"://"+i),i},hasProtocol:function(){return this.v[0]instanceof o.PROTOCOL}});t.Base=s,t.MAILTOEMAIL=c,t.EMAIL=u,t.NL=f,t.TEXT=l,t.URL=p},function(e,t,n){},function(e,t){},function(e,t,n){var r=n(742).default,i=n(22);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){var r=n(283),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function o(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function c(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)t(a[0],a[1])}}function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new s;c(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var l=r.createElement("textarea"),f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},p={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},h={v:"title",lang:"lang"},d={rt:"ruby"};function y(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!d[t.localName]||d[t.localName]===e.localName}function i(t,n){var r=f[t];if(!r)return null;var i=e.document.createElement(r),o=h[t];return o&&n&&(i[o]=n.trim()),i}for(var o,s,c=e.document.createElement("div"),u=c,y=[];null!==(o=n());)if("<"!==o[0])u.appendChild(e.document.createTextNode((s=o,l.innerHTML=s,s=l.textContent,l.textContent="",s)));else{if("/"===o[1]){y.length&&y[y.length-1]===o.substr(2).replace(">","")&&(y.pop(),u=u.parentNode);continue}var m,v=a(o.substr(1,o.length-2));if(v){m=e.document.createProcessingInstruction("timestamp",v),u.appendChild(m);continue}var g=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!g)continue;if(!(m=i(g[1],g[3])))continue;if(!r(u,m))continue;if(g[2]){var b=g[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(p.hasOwnProperty(n)){var r=t?"background-color":"color",i=p[n];m.style[r]=i}})),m.className=b.join(" ")}y.push(g[1]),u.appendChild(m),u=m}return c}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<m.length;t++){var n=m[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function g(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var o=n.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var o=0;o<n.length;o++)if(v(n.charCodeAt(o)))return"rtl";return"ltr"}function b(){}function _(e,t,n){b.call(this),this.cue=t,this.cueDiv=y(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:g(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function w(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,n,r){var i=new w(t),o=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(o),s=[];if(o.snapToLines){var c;switch(o.vertical){case"":s=["+y","-y"],c="height";break;case"rl":s=["+x","-x"],c="width";break;case"lr":s=["-x","+x"],c="width"}var u=i.lineHeight,l=u*Math.round(a),f=n[c]+u,p=s[0];Math.abs(l)>f&&(l=l<0?-1:1,l*=Math.ceil(f/u)*u),a<0&&(l+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(p,l)}else{var h=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=h/2;break;case"end":a-=h}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new w(t)}var d=function(e,t){for(var i,o=new w(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var c=e.intersectPercentage(n);a>c&&(i=new w(e),a=c),e=new w(o)}return i||o}(i,s);t.move(d.toCSSCompatValues(n))}function T(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=i(b.prototype),_.prototype.constructor=_,w.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},w.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},w.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},w.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},w.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},w.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},w.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},w.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},T.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},T.convertCueToDOMTree=function(e,t){return e&&t?y(e,t):null};T.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=w.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,c=0;c<t.length;c++)s=t[c],n=new _(e,s,a),r.appendChild(n.div),S(0,n,o,i),s.displayState=n.div,i.push(w.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},T.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},T.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof o))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?c(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;c(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):c(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(c(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var l=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!l||!l[0])throw new o(o.Errors.BadSignature);t.state="HEADER"}for(var f=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(f?f=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{u(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var p=-1!==i.indexOf("--\x3e");if(!i||p&&(f=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new o(o.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=T},function(e,t){},function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function o(e,t,r){this.hasBeenReset=!1;var o="",a=!1,s=e,c=t,u=r,l=null,f="",p=!0,h="auto",d="start",y="auto",m="auto",v=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return o},set:function(e){o=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return f},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(e){var t=i(e);t?(d=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=i(e);t?(m=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,o=100,a=0,s=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");o=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):c=t}}})}},function(e,t){e.exports=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}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r,i,o,a,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,i=/^([^\/?#]*)(.*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var c=i.exec(a.path);a.netLoc=c[1],a.path=c[2]}a.netLoc&&!a.path&&(a.path="/");var u={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(u.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var l=a.path,f=l.substring(0,l.lastIndexOf("/")+1)+o.path;u.path=s.normalizePath(f)}else u.path=a.path,o.params||(u.params=a.params,o.query||(u.query=a.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(u)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(l(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
47
47
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
48
48
  t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+h]=255&a,h+=d,a/=256,u-=8);e[n+h-d]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,r,i,o){for(var a,s=++t,c=0;;){var u=e.charAt(s);switch(u){case"=":if(1===c)a=e.slice(t,s),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),a=e.slice(t,s)),t=s+1,!((s=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");l=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,l,t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');l=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,l,t),o.warning('attribute "'+a+'" missed start quot('+u+")!!"),t=s+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,s)),s;case">":switch(c){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=e.slice(t,s)).slice(-1)&&(n.closed=!0,l=l.slice(0,-1));case 2:2===c&&(l=a),4==c?(o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),n.add(l,l,t));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":u=" ";default:if(u<=" ")switch(c){case 0:n.setTagName(e.slice(t,s)),c=6;break;case 1:a=e.slice(t,s),c=2;break;case 4:var l=e.slice(t,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l,t);case 5:c=6}else switch(c){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=s,c=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:c=1,t=s;break;case 3:c=4,t=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function c(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,c=a.value;if((h=s.indexOf(":"))>0)var u=a.prefix=s.slice(0,h),l=s.slice(h+1),p="xmlns"===u&&l;else l=s,u=null,p="xmlns"===s&&"";a.localName=l,!1!==p&&(null==i&&(i={},f(n,n={})),n[p]=i[p]=c,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(p,c))}for(o=e.length;o--;){(u=(a=e[o]).prefix)&&("xml"===u&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==u&&(a.uri=n[u||""]))}var h;(h=r.indexOf(":"))>0?(u=e.prefix=r.slice(0,h),l=e.localName=r.slice(h+1)):(u=null,l=e.localName=r);var d=e.uri=n[u||""];if(t.startElement(d,l,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(d,l,r),i)for(u in i)t.endPrefixMapping(u)}function u(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function l(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function p(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],c=a>3&&/^public$/i.test(o[2][0])&&o[3][0],u=a>4&&o[4][0],l=o[a-1];return n.startDTD(s,c&&c.replace(/^(['"])(.*?)\1$/,"$2"),u&&u.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),l.index+l[0].length}}return-1}function h(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function d(e){}function y(e,t){return e.__proto__=t,e}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function f(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,o);b&&y(S),r.characters(n,0,t-S),S=t}}function y(t,n){for(;t>=v&&(n=g.exec(e));)m=n.index,v=m+n[0].length,b.lineNumber++;b.columnNumber=t-m+1}var m=0,v=0,g=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:t}],w={},S=0;for(;;){try{var T=e.indexOf("<",S);if(T<0){if(!e.substr(S).match(/^\s*$/)){var C=r.doc,k=C.createTextNode(e.substr(S));C.appendChild(k),r.currentElement=k}return}switch(T>S&&f(T),e.charAt(T+1)){case"/":var E=e.indexOf(">",T+3),O=e.substring(T+2,E),P=_.pop();E<0?(O=e.substring(T+2).replace(/[\s<].*/,""),i.error("end tag name: "+O+" is not complete:"+P.tagName),E=T+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),i.error("end tag name: "+O+" maybe not complete"),E=T+1+O.length);var A=P.localNSMap,I=P.tagName==O;if(I||P.tagName&&P.tagName.toLowerCase()==O.toLowerCase()){if(r.endElement(P.uri,P.localName,O),A)for(var x in A)r.endPrefixMapping(x);I||i.fatalError("end tag name: "+O+" is not match the current start tagName:"+P.tagName)}else _.push(P);E++;break;case"?":b&&y(T),E=h(e,T,r);break;case"!":b&&y(T),E=p(e,T,r,i);break;default:b&&y(T);var R=new d,L=_[_.length-1].currentNSMap,j=(E=s(e,T,R,L,o,i),R.length);if(!R.closed&&l(e,E,R.tagName,w)&&(R.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&j){for(var N=a(b,{}),D=0;D<j;D++){var B=R[D];y(B.offset),B.locator=a(b,{})}r.locator=N,c(R,r,L)&&_.push(R),r.locator=b}else c(R,r,L)&&_.push(R);"http://www.w3.org/1999/xhtml"!==R.uri||R.closed?E++:E=u(e,E,R.tagName,o,r)}}catch(e){i.error("element parse error: "+e),E=-1}E>S?S=E:f(Math.max(T,S)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},d.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},y({},y.prototype)instanceof y||(y=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.XMLReader=o},function(e,t,n){"use strict";var r=n(770),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},o=function(e){var t,n;o.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,e.exports={TimestampRolloverStream:o,handleRollover:i}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},r.prototype.partialFlush=function(e){this.trigger("partialdone",e)},r.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},r.prototype.reset=function(e){this.trigger("reset",e)},e.exports=r},function(e,t,n){"use strict";var r=n(536),i=function(e){var t=31&e[1];return t<<=8,t|=e[2]},o=function(e){return!!(64&e[1])},a=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=i(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=o(e),n=4+a(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=o(e),r=4+a(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var s=12+((15&e[r+10])<<8|e[r+11]);s<i;){var c=r+s;t[(31&e[c+1])<<8|e[c+2]]=e[c],s+=5+((15&e[c+3])<<8|e[c+4])}return t}},parsePayloadUnitStartIndicator:o,parsePesType:function(e,t){switch(t[i(e)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!o(e))return null;var t=4+a(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+a(e),n=e.subarray(t),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(e,t,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},o=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=i(e,t),o(e,t))},a=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){var t=o(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:i,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return r[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=a(e.subarray(10,14)));do{if((n=a(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t,n){var r=n(254).toUnsigned,i=n(537),o=function(e,t){var n,a,s,c,u,l=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=r(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),s=i(e.subarray(n+4,n+8)),c=a>1?n+a:e.byteLength,s===t[0]&&(1===t.length?l.push(e.subarray(n+8,c)):(u=o(e.subarray(n+8,c),t.slice(1))).length&&(l=l.concat(u))),n=c;return l};e.exports=o},function(e,t){e.exports=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],c=32&r.flags[2],u=65536&r.flags[0],l=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),c&&(r.defaultSampleFlags=n.getUint32(t)),u&&(r.durationIsEmpty=!0),!i&&l&&(r.baseDataOffsetIsMoof=!0),r}},function(e,t,n){var r=n(776);e.exports=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),o=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],c=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],f=i.getUint32(4),p=8;for(o&&(n.dataOffset=i.getInt32(p),p+=4),a&&f&&(t={flags:r(e.subarray(p,p+4))},p+=4,s&&(t.duration=i.getUint32(p),p+=4),c&&(t.size=i.getUint32(p),p+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(p):t.compositionTimeOffset=i.getUint32(p),p+=4),n.samples.push(t),f--);f--;)t={},s&&(t.duration=i.getUint32(p),p+=4),c&&(t.size=i.getUint32(p),p+=4),u&&(t.flags=r(e.subarray(p,p+4)),p+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(p):t.compositionTimeOffset=i.getUint32(p),p+=4),n.samples.push(t);return n}},function(e,t){e.exports=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},function(e,t,n){var r=n(254).toUnsigned;e.exports=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:r(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=r(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);n(745),n(746),n(747);var r=n(4),i=n(11),o=n(24),a=n(60),s=n(0),c=n.n(s),u=n(12),l=n.n(u),f=n(273),p=n(25);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(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=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==h(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 b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=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&&m(e,t)}(o,e);var t,n,r,i=v(o);function o(){return d(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"onShowAlert",value:function(e){if(this.layoutOptions.options.alertRegion){var t=e.ctor,n=e.collection,r=n?n.toJSON():[];this.layout.showChildView(this.layoutOptions.options.alertRegion,s.createElement(t,{alerts:r,removeAlert:function(e){return u.Radio.channel(p.a.ALERT).trigger("remove:alert",e)}}))}}}])&&y(t.prototype,n),r&&y(t,r),o}(f.a),w="content",S="popup",T="alert",C="hidden",k=n(2),E="TeacherLayout",O="SimpleLayout",P=n(6),A=n(333),I=n.n(A),x=n(248),R=n(8),L=n(249),j=!0,N=function(){return j},D=function(){j=!1},B=P.a.SUBJECT,U=R.a.Subjects.PREFERENCES,M=[{application:P.a.DEFAULT,action:R.a.Default.NOT_FOUND},{application:P.a.DEFAULT,action:R.a.Default.ERROR}];function V(e,t){!function(e,t){var n=e.appLink,r=e.shell;if(M.find((function(e){return e.application===(null==n?void 0:n.application)&&e.action===(null==n?void 0:n.action)})))return void t(!1);i.a.hooklessFetch(r.store,o.a.currentUser((function(e){e.isAuthenticated?i.a.hooklessFetch(r.store,o.a.permissions((function(n){n[a.a.ManageSubjectPreferences]&&I.a.get("_onboardingComplete")!==e.id.toString()?i.a.hooklessFetch(r.store,L.a.setting(e.id,x.a.HasCompletedOnboarding,(function(n){if(n.value)return I.a.set("_onboardingComplete",e.id,{expires:30}),void t(!1);t(!0)}),(function(){t(!1)}))):t(!1)}),(function(){t(!1)}))):t(!1)}),(function(){t(!1)})))}(e,(function(n){var i,o;if(n&&(D(),(null===(i=e.appLink)||void 0===i?void 0:i.application)!==B||(null===(o=e.appLink)||void 0===o?void 0:o.action)!==U))return r.a.AppLinkHelper.trigger({application:P.a.SUBJECT,action:R.a.Subjects.PREFERENCES}),void r.a.AppLinkUtility.routingEnded();t(e)}))}var F=n(106),H=n(104),z=n(71),W=n(70),q=n(9);function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(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 Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Z(e);if(t){var i=Z(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Q(this,n)}}function Q(e,t){return!t||"object"!==G(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 Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J="liteShared.noAccess",ee=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&&Y(e,t)}(o,e);var t,n,r,i=X(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Current user's school does not have access to the primary product")}return t=o,(n=[{key:"name",get:function(){return"NoAccessError"}},{key:"heading",get:function(){return q.a.getPhrase(J,"heading")}},{key:"description",get:function(){return q.a.getPhrase(J,"body")}},{key:"cta",get:function(){return!1}}])&&K(t.prototype,n),r&&K(t,r),o}(W.a),te=[{application:P.a.DEFAULT,action:R.a.Default.ERROR},{application:P.a.DEFAULT,action:R.a.Default.DEV_ERROR}];function ne(e,t){z.a._forcePushContext(e),D(),r.a.AppLinkUtility.routingEnded(),r.a.ErrorHelper.throw(null!=t?t:new H.a)}function re(e,t){var n=e.appLink,r=e.shell;F.a.isDevelopment||te.find((function(e){return e.application===(null==n?void 0:n.application)&&e.action===(null==n?void 0:n.action)}))?t(e):i.a.hooklessFetch(r.store,o.a.currentUser((function(o){i.a.hooklessFetch(r.store,L.a.setting(o.customerId,x.a.LiteAccess,(function(r){r.value?t(e):ne(n,new ee)}),(function(){return ne(n)})))}),(function(){return ne(n)})))}var ie=n(27),oe=n(200),ae=n(34),se=n(64),ce=n(49),ue=n(16),le=n(177);function fe(e){return(fe="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 pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(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 de(e,t){return(de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(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=ve(e);if(t){var i=ve(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return me(this,n)}}function me(e,t){return!t||"object"!==fe(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 ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ge=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&&de(e,t)}(o,e);var t,n,r,i=ye(o);function o(){return pe(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"enrich",value:function(e,t){}},{key:"isType",value:function(e){return e===o.type}}])&&he(t.prototype,n),r&&he(t,r),o}(r.a.Service);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Se(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=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Te(this,n)}}function Te(e,t){return!t||"object"!==be(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 Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ge.type="BaseAnalyticsEnricher";var ke=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&we(e,t)}(o,e);var t,n,r,i=Se(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).consumerKey=e.consumerKey,t}return t=o,(n=[{key:"name",get:function(){return"PluginEnricher"}},{key:"enrich",value:function(e,t){e.enrich("plugin",this.getPluginData()),t(e)}},{key:"getPluginData",value:function(){return{isPlugin:!0,consumerKey:this.consumerKey}}}])&&_e(t.prototype,n),r&&_e(t,r),o}(ge);function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Oe={application:P.a.DEFAULT,action:R.a.Default.PLUGIN},Pe={application:P.a.DEFAULT,action:R.a.Default.PLAY_VIDEO},Ae={application:P.a.DEFAULT,action:R.a.Default.PLAY_CLIP},Ie={application:P.a.INTERACTIVES,action:R.a.Interactives.VIEW_INTERACTIVE},xe={application:P.a.DEFAULT,action:R.a.Default.SHARE},Re=[Pe,Ae,Ie,xe],Le=[P.a.CLASSROOMS,P.a.USER_MANAGER,P.a.SETTINGS];function je(e,t){return e.application===(null==t?void 0:t.application)&&e.action===(null==t?void 0:t.action)}function Ne(e){if(je(e,Pe))return k.EntityType.Video;if(je(e,Ae))return k.EntityType.Clip;if(je(e,Ie))return k.EntityType.Interactive;if(je(e,xe)){var t=De(e.params);return null==t?void 0:t.entityType}r.a.ErrorHelper.throw(new ie.a("No derived share entity type found"))}function De(e){return"object"===Ee(e)?e:se.LocationUtils.DeserializeQueryParams(e)}function Be(e){z.a._forcePushContext(e),r.a.AppLinkUtility.routingEnded(),r.a.AppLinkHelper.trigger(e,{replace:!0})}function Ue(e,t){var n,r,i=e.appLink,o=e.shell,a=ae.b.get(ce.a.PLUGIN);if(a&&Re.find((function(e){return je(e,i)})))Be({application:P.a.DEFAULT,action:R.a.Default.PLUGIN_SHARE,args:[i.args[0]],params:{entityType:Ne(i)}});else if(a&&Le.find((function(e){return e===i.application})))Be({application:P.a.DEFAULT,action:R.a.Default.PLUGIN_NEW_WINDOW,params:{url:se.AppLinkHelper.getHref(i)}});else if(je(i,Oe)){var s=De(i.params);if(!a){var c={isPlugin:!0,consumerKey:s.consumerKey,ltiReturnUrl:s.ltiReturnUrl,submitUrl:s.submitUrl,lmsType:s.lmsType,sizeSelector:!("false"==(null===(n=s.sizeSelector)||void 0===n?void 0:n.toLowerCase())),singleSelectMode:"true"==(null===(r=s.singleSelectMode)||void 0===r?void 0:r.toLowerCase())};o.store.dispatch({type:oe.a.UPDATE,payload:{viewModelKey:ce.a.PLUGIN,dataOrKey:c}}),ae.b.set(ce.a.PLUGIN,c),function(e){if(e){var t=ue.a.getInstance(le.a.Analytics);t.hasEnricher(ke)||t.registerEnricher(ke,{consumerKey:e}),ue.a.releaseInstance(le.a.Analytics)}}(s.consumerKey)}Be({application:P.a.DASHBOARD,action:R.a.Dashboard.HOME})}else t(e)}var Me=[{application:P.a.LAUNCHPAD,action:R.a.Launchpad.LOGIN_LANDING},{application:P.a.DEFAULT,action:R.a.Default.ERROR},{application:P.a.EMBED,action:R.a.Embed.EMBED_ERROR},{application:P.a.SHARE,action:R.a.Share.VIEW_SHARE_LINK},{application:P.a.SHARE,action:R.a.Share.SHARE_LINK_ERROR},{application:P.a.EMBED,action:R.a.Embed.VIEW_EMBEDDED_RESOURCE},{application:P.a.LAUNCHPAD,action:R.a.Launchpad.PASSWORD_PROTECTED_SHARE_LINK},{application:P.a.LAUNCHPAD,action:R.a.Launchpad.SHARE_LINK_SIGN_IN},{application:P.a.EMBED,action:R.a.Embed.EMBED_LOGIN},{application:P.a.EMBED,action:R.a.Embed.PLUGIN_LOGIN},{application:P.a.LAUNCHPAD,action:R.a.Launchpad.JOIN_CLASSROOM_PROMPT},{application:P.a.LAUNCHPAD,action:R.a.Launchpad.JOIN_CLASSROOM}].reduce((function(e,t){return e[Ve(t)]=!0,e}),{});function Ve(e){return e.application+e.action}function Fe(e,t){Me[Ve(e.appLink)]?t(e):i.a.hooklessFetch(e.shell.store,o.a.currentUser((function(n){if(n.isAuthenticated)t(e);else{var i=e.appLink.params,o={};(null==i?void 0:i.customerId)&&(o.customerId=i.customerId),(null==i?void 0:i.skipPrompt)&&(o.skipPrompt=i.skipPrompt),"/"===se.LocationUtils.GetCurrentPath()&&(o.showJoinCode=!0),r.a.AppLinkUtility.routingEnded(),r.a.AppLinkHelper.trigger({application:P.a.LAUNCHPAD,action:R.a.Launchpad.LOGIN_LANDING,params:o},{replace:!0})}}),(function(){return t=e.appLink,z.a._forcePushContext(t),D(),r.a.AppLinkUtility.routingEnded(),void r.a.ErrorHelper.throw(new H.a);var t})))}function He(e){return(He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(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 qe(e,t,n){return t&&We(e.prototype,t),n&&We(e,n),e}function Ge(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&&Ke(e,t)}function Ke(e,t){return(Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ye(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=Qe(e);if(t){var i=Qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xe(this,n)}}function Xe(e,t){return!t||"object"!==He(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 Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $e=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Ze=function(e){Ge(n,e);var t=Ye(n);function n(){return ze(this,n),t.apply(this,arguments)}return qe(n,[{key:"channelName",get:function(){return P.a.CLASSROOMS}},{key:"appRoutes",get:function(){return{"classrooms(/)":"index","classrooms/:id":"classroom","classrooms/:id/manage":"manageClassroom","classrooms/:id/classroom-link":"generateJoinLink"}}},{key:"appLinks",get:function(){return["newClassroom","editClassroom","deleteClassroom","addStudents","removeStudents","newGroup","editGroup","deleteGroup","addStudentsChoices","addStudentsChoicesMethod","contactSchoolAdmin"]}},{key:"filters",get:function(){return[Fe,re,V,Ue]}}]),n}(r.a.AppRouter),Je=function(e){Ge(r,e);var t=Ye(r);function r(){return ze(this,r),t.apply(this,arguments)}return qe(r,[{key:"name",get:function(){return"Classrooms Application"}},{key:"channelName",get:function(){return P.a.CLASSROOMS}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:T}}}},{key:"index",value:function(){var e=this;Promise.all([n.e(5),n.e(39)]).then(n.bind(null,1923)).then((function(t){var n=t.ClassroomsView;e.layout.showChildView(w,c.a.createElement(n,null))}))}},{key:"classroom",value:function(e){var t=this;n.e(53).then(n.bind(null,1929)).then((function(n){var r=n.ClassroomView;t.layout.showChildView(w,c.a.createElement(r,{id:e}))}))}},{key:"manageClassroom",value:function(e,t){var r=this,i=t.tab;["students","groups"].includes(i)||(i="students"),n.e(34).then(n.bind(null,1916)).then((function(t){var n=t.ManageClassroomView;r.layout.showChildView(w,c.a.createElement(n,{id:e,activeTab:i}))}))}},{key:"newClassroom",value:function(){var e=this;Promise.all([n.e(1),n.e(4),n.e(87)]).then(n.bind(null,1851)).then((function(t){var n=t.CreateClassroomView,r={actionType:k.UserAction.Create,entity:k.EntityType.Classroom,workflowPhase:k.WorkflowPhase.Complete,location:k.LocationContext.Popup};e.layout.showChildView(S,c.a.createElement(n,{analyticsOptions:r,closePopup:function(){return e.layout.closePopup()}}))}))}},{key:"editClassroom",value:function(e){var t=this;Promise.all([n.e(1),n.e(4),n.e(88)]).then(n.bind(null,1852)).then((function(n){var r=n.EditClassroomView,i={actionType:k.UserAction.Edit,entity:k.EntityType.Classroom,workflowPhase:k.WorkflowPhase.Complete,location:k.LocationContext.Popup};t.layout.showChildView(S,c.a.createElement(r,{id:e,analyticsOptions:i,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"deleteClassroom",value:function(e){var t=this;n.e(121).then(n.bind(null,1853)).then((function(n){var r=n.DeleteClassroomView,i={actionType:k.UserAction.Delete,entity:k.EntityType.Classroom,workflowPhase:k.WorkflowPhase.Complete,location:k.LocationContext.Popup};t.layout.showChildView(S,c.a.createElement(r,{id:e,analyticsOptions:i,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"addStudents",value:function(e){var t=this;Promise.all([n.e(15),n.e(118)]).then(n.bind(null,1854)).then((function(n){var r=n.AddStudentsToClassroomView,i={actionType:k.UserAction.Associate,entity:k.EntityType.Classroom,location:k.LocationContext.Popup,descriptor:k.AssocDescriptor.User,workflowPhase:k.WorkflowPhase.Complete};t.layout.showChildView(S,c.a.createElement(r,{classroomId:e,closePopup:function(){return t.layout.closePopup()},analyticsOptions:i}))}))}},{key:"removeStudents",value:function(e,t){var r=this,i=t.studentIds;n.e(122).then(n.bind(null,1855)).then((function(t){var n=t.RemoveStudentsFromClassroomView,o={actionType:k.UserAction.Dissociate,entity:k.EntityType.Classroom,location:k.LocationContext.Popup,descriptor:k.AssocDescriptor.User,workflowPhase:k.WorkflowPhase.Complete};r.layout.showChildView(S,c.a.createElement(n,{classroomId:e,studentIds:i,closePopup:function(){return r.layout.closePopup()},analyticsOptions:o}))}))}},{key:"newGroup",value:function(e,t){var r=this,i=t.addStudents,o=void 0===i?[]:i;Promise.all([n.e(1),n.e(4),n.e(70)]).then(n.bind(null,1856)).then((function(t){var n=t.CreateClassroomGroupView,i={entity:k.EntityType.ClassroomGroup,location:k.LocationContext.Popup,workflowPhase:k.WorkflowPhase.Complete};r.layout.showChildView(S,c.a.createElement(n,{classroomId:e,studentIds:o,closePopup:function(){return r.layout.closePopup()},analyticsOptions:i}))}))}},{key:"editGroup",value:function(e,t){var r=this;Promise.all([n.e(1),n.e(4),n.e(71)]).then(n.bind(null,1857)).then((function(n){var i=n.EditClassroomGroupView,o={entity:k.EntityType.ClassroomGroup,actionType:k.UserAction.Edit,location:k.LocationContext.Popup,workflowPhase:k.WorkflowPhase.Complete};r.layout.showChildView(S,c.a.createElement(i,{classroomId:e,groupId:t,closePopup:function(){return r.layout.closePopup()},analyticsOptions:o}))}))}},{key:"deleteGroup",value:function(e,t){var r=this;n.e(120).then(n.bind(null,1858)).then((function(n){var i=n.DeleteClassroomGroupView,o={entity:k.EntityType.ClassroomGroup,actionType:k.UserAction.Delete,location:k.LocationContext.Popup,workflowPhase:k.WorkflowPhase.Complete};r.layout.showChildView(S,c.a.createElement(i,{classroomId:e,groupId:t,closePopup:function(){return r.layout.closePopup()},analyticsOptions:o}))}))}},{key:"generateJoinLink",value:function(e){return $e(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(58).then(n.bind(null,1933));case 2:r=t.sent,i=r.GenerateJoinLinkView,this.layout.showChildView(w,c.a.createElement(i,{classroomId:e}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"addStudentsChoices",value:function(e){return $e(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(102).then(n.bind(null,1859));case 2:r=t.sent,i=r.AddStudentsChoicesView,this.layout.showChildView(S,c.a.createElement(i,{classroomId:e,closePopup:function(){return o.layout.closePopup()}}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"addStudentsChoicesMethod",value:function(e){return $e(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(101).then(n.bind(null,1860));case 2:r=t.sent,i=r.AddStudentsChoicesMethodView,this.layout.showChildView(S,c.a.createElement(i,{classroomId:e,closePopup:function(){return o.layout.closePopup()}}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"contactSchoolAdmin",value:function(e){return $e(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(119).then(n.bind(null,1861));case 2:r=t.sent,i=r.ContactSchoolAdminView,this.layout.showChildView(S,c.a.createElement(i,{classroomId:e,closePopup:function(){return o.layout.closePopup()}}));case 5:case"end":return t.stop()}}),t,this)})))}}],[{key:"router",get:function(){return Ze}}]),r}(_),et="content",tt="popup",nt="alert",rt="hidden",it=n(58),ot={getVideoAppLink:function(e){return{application:P.a.DEFAULT,action:R.a.Default.PLAY_VIDEO,args:[e.id,it.a.slugify(e.name)]}},getSeriesAppLink:function(e){return{application:P.a.DEFAULT,action:R.a.Default.SERIES,args:[e.id,it.a.slugify(e.name)]}},getClassificationUpdateAppLink:function(e){return{application:P.a.CONTENT_UPDATES,action:R.a.ContentUpdates.CLASSIFICATION_UPDATE,args:[e.id,it.a.slugify(e.name)]}},getClassificationAppLink:function(e){return{application:P.a.SUBJECT,action:R.a.Subjects.CLASSIFICATION,args:[e.id,it.a.slugify(e.name)]}},getShareAppLink:function(e){return{application:P.a.DEFAULT,action:R.a.Default.SHARE,args:[e.id],params:{entityType:"video"}}},getAddToPlaylistAppLink:function(e){return{application:P.a.PLAYLISTS,action:R.a.Playlists.ADD_TO_PLAYLIST,args:[e.id]}},dashboardAppLink:{application:P.a.DASHBOARD,action:R.a.Dashboard.HOME},contentUpdatesAppLink:{application:P.a.CONTENT_UPDATES,action:R.a.ContentUpdates.CONTENT_UPDATES}};function at(e){return(at="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 st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ut(e,t,n){return t&&ct(e.prototype,t),n&&ct(e,n),e}function lt(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&&ft(e,t)}function ft(e,t){return(ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pt(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=dt(e);if(t){var i=dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ht(this,n)}}function ht(e,t){return!t||"object"!==at(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 dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yt=function(e){lt(n,e);var t=pt(n);function n(){return st(this,n),t.apply(this,arguments)}return ut(n,[{key:"channelName",get:function(){return P.a.CONTENT_UPDATES}},{key:"appRoutes",get:function(){return{"latest-releases":"contentUpdates","latest-releases/:id(/:slug)":"classificationUpdate"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),mt=function(e){lt(r,e);var t=pt(r);function r(){return st(this,r),t.apply(this,arguments)}return ut(r,[{key:"name",get:function(){return"Content Updates Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.CONTENT_UPDATES}},{key:"contentUpdates",value:function(){var e=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(59)]).then(n.bind(null,1934)).then((function(t){var n=t.ContentUpdatesView;e.layout.showChildView(et,s.createElement(n,{appLinks:ot}))}))}},{key:"classificationUpdate",value:function(e){var t=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(62)]).then(n.bind(null,1935)).then((function(n){var r=n.ClassificationUpdateView;t.layout.showChildView(et,s.createElement(r,{classificationId:e,appLinks:ot}))}))}}],[{key:"router",get:function(){return yt}}]),r}(_);function vt(e){return(vt="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 gt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bt(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 _t(e,t,n){return t&&bt(e.prototype,t),n&&bt(e,n),e}function wt(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&&St(e,t)}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tt(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=kt(e);if(t){var i=kt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ct(this,n)}}function Ct(e,t){return!t||"object"!==vt(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 kt(e){return(kt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Et=function(e){wt(n,e);var t=Tt(n);function n(){return gt(this,n),t.apply(this,arguments)}return _t(n,[{key:"channelName",get:function(){return P.a.DASHBOARD}},{key:"appRoutes",get:function(){return{"(/)":"index","discover(/)":"discover","discover/:id/:name":"dashboard"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),Ot=function(e){wt(r,e);var t=Tt(r);function r(){return gt(this,r),t.apply(this,arguments)}return _t(r,[{key:"name",get:function(){return"Dashboard Application"}},{key:"channelName",get:function(){return P.a.DASHBOARD}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"index",value:function(){this.discover()}},{key:"discover",value:function(){var e=this;Promise.all([n.e(0),n.e(6),n.e(17)]).then(n.bind(null,1918)).then((function(t){var n=t.DashboardView;e.layout.showChildView(et,s.createElement(n,null))}))}},{key:"dashboard",value:function(e){var t=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(19)]).then(n.bind(null,1944)).then((function(n){var r=n.DashboardWidgetView;t.layout.showChildView(et,s.createElement(r,{widgetId:e}))}))}}],[{key:"router",get:function(){return Et}}]),r}(_),Pt=n(241),At=n(245),It=n(55);function xt(e){return(xt="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 Rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lt(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 jt(e,t,n){return t&&Lt(e.prototype,t),n&&Lt(e,n),e}function Nt(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&&Dt(e,t)}function Dt(e,t){return(Dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bt(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=Mt(e);if(t){var i=Mt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ut(this,n)}}function Ut(e,t){return!t||"object"!==xt(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 Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vt,Ft=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Ht=function(e){Nt(n,e);var t=Bt(n);function n(){return Rt(this,n),t.apply(this,arguments)}return jt(n,[{key:"channelName",get:function(){return P.a.DEFAULT}},{key:"appRoutes",get:function(){return{"videos/:id(/:slug)":"playVideo","videos/:id/clips/new(/)":"createClip","clips/:id/edit(/)":"editClip","clips/:id(/:slug)":"playClip","series/:id(/:slug)":"series","favourites(/)":"favourites","my-videos(/)":"myVideos","shared-by-me(/)":"sharedByMe","shared-with-me(/)":"sharedWithMe","plugin(/)":"plugin","*path":"catchAllRoutes"}}},{key:"appLinks",get:function(){return["devError","dialogError","error","notFound","editVideo","previewPdf","previewQuestions","createClipDetails","editClipDetails","deleteClip","viewCurriculumLinks","downloadVideo","deleteVideo","share","pluginShare","pluginNewWindow"]}},{key:"externalRoutes",get:function(){return{"logout(/)":"logOut","login(/)":"logIn"}}},{key:"filters",get:function(){return[Fe,re,V,Ue]}}]),n}(r.a.AppRouter),zt=function(e){Nt(i,e);var t=Bt(i);function i(){return Rt(this,i),t.apply(this,arguments)}return jt(i,[{key:"name",get:function(){return"Default Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:N(),alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.DEFAULT}},{key:"myVideos",value:function(){var e=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(60)]).then(n.bind(null,1924)).then((function(t){var n=t.MyVideosView;e.layout.showChildView(et,s.createElement(n,null))}))}},{key:"playVideo",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ft(this,void 0,void 0,regeneratorRuntime.mark((function i(){var o,a=this;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=("string"==typeof t?r:t)||{},Promise.all([n.e(0),n.e(2),n.e(3),n.e(6),n.e(31)]).then(n.bind(null,1945)).then((function(t){var n=t.PlayView;a.layout.showChildView(et,s.createElement(n,{id:e,queryParams:o}))}));case 2:case"end":return i.stop()}}),i)})))}},{key:"editVideo",value:function(e){var t=this;Promise.all([n.e(1),n.e(4),n.e(85)]).then(n.bind(null,1862)).then((function(n){var r=n.EditVideoView;t.layout.showChildView(tt,s.createElement(r,{id:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"series",value:function(e,t,r){var i=this,o=function(t){return{application:P.a.DEFAULT,action:R.a.Default.PLAY_VIDEO,args:[t.id,it.a.slugify(t.name)],params:{context:At.a.Series,contextId:e}}};Promise.all([n.e(0),n.e(2),n.e(3),n.e(16)]).then(n.bind(null,1850)).then((function(t){var n=t.SeriesView;i.layout.showChildView(et,s.createElement(n,{id:e,classificationId:r.classificationId,getVideoAppLink:o}))}))}},{key:"favourites",value:function(){var e=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(61)]).then(n.bind(null,1946)).then((function(t){var n=t.FavouritesView;e.layout.showChildView(et,s.createElement(n,null))}))}},{key:"previewPdf",value:function(e){var t=this;Promise.all([n.e(10),n.e(52),n.e(72)]).then(n.bind(null,1947)).then((function(n){var r=n.PreviewPdfView;t.layout.showChildView(tt,s.createElement(r,{closePopup:function(){return t.layout.closePopup()},id:e}))}))}},{key:"createClip",value:function(e,t){var r=this;n.e(22).then(n.bind(null,1919)).then((function(n){var i=n.EditClipTimepointsView;r.layout.showChildView(et,s.createElement(i,{videoId:e,startTime:t.startTime}))}))}},{key:"editClip",value:function(e){var t=this;n.e(22).then(n.bind(null,1919)).then((function(n){var r=n.EditClipTimepointsView;t.layout.showChildView(et,s.createElement(r,{id:e}))}))}},{key:"createClipDetails",value:function(e,t){var r=this;Promise.all([n.e(1),n.e(4),n.e(0),n.e(23)]).then(n.bind(null,1948)).then((function(n){var i=n.EditClipDetailsView;r.layout.showChildView(tt,s.createElement(i,{videoId:e,startTime:t.startTime,endTime:t.endTime,closePopup:function(){return r.layout.closePopup()}}))}))}},{key:"editClipDetails",value:function(e,t){var r=this;Promise.all([n.e(1),n.e(4),n.e(0),n.e(23)]).then(n.bind(null,1948)).then((function(n){var i=n.EditClipDetailsView;r.layout.showChildView(tt,s.createElement(i,{id:e,startTime:t.startTime,endTime:t.endTime,closePopup:function(){return r.layout.closePopup()}}))}))}},{key:"deleteClip",value:function(e){var t=this;n.e(134).then(n.bind(null,1863)).then((function(n){var r=n.DeleteClipView;t.layout.showChildView(tt,s.createElement(r,{id:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"playClip",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Promise.all([n.e(0),n.e(2),n.e(3),n.e(6),n.e(36)]).then(n.bind(null,1864)).then((function(n){var o=n.PlayClipView,a=("string"==typeof t?i:t)||{};r.layout.showChildView(et,s.createElement(o,{id:e,queryParams:a}))}))}},{key:"viewCurriculumLinks",value:function(e){var t=this;n.e(103).then(n.bind(null,1865)).then((function(n){var r=n.ViewCurriculumLinksView;t.layout.showChildView(tt,s.createElement(r,{id:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"downloadVideo",value:function(e){var t=this;n.e(136).then(n.bind(null,1936)).then((function(n){var r=n.DownloadVideoView;t.layout.showChildView(rt,s.createElement(r,{id:e}))}))}},{key:"deleteVideo",value:function(e){var t=this;n.e(135).then(n.bind(null,1866)).then((function(n){var r=n.DeleteVideoView;t.layout.showChildView(tt,s.createElement(r,{id:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"share",value:function(e,t){var r=this;Promise.all([n.e(1),n.e(4),n.e(15),n.e(38)]).then(n.bind(null,1920)).then((function(n){var i=n.ShareView;r.layout.showChildView(tt,s.createElement(i,{entityId:e,entityType:t.entityType,closePopup:function(){return r.layout.closePopup()},emptyStateImageUrl:It.a.EmptyStates.TYPEAHEAD_RESULTS,errorStateImageUrl:It.a.TYPEAHEAD_ERROR}))}))}},{key:"sharedByMe",value:function(){var e=this;Promise.all([n.e(24),n.e(0),n.e(14),n.e(65)]).then(n.bind(null,1925)).then((function(t){var n=t.SharedByMeView;e.layout.showChildView(et,s.createElement(n,null))}))}},{key:"sharedWithMe",value:function(){var e=this;Promise.all([n.e(24),n.e(0),n.e(14),n.e(86)]).then(n.bind(null,1927)).then((function(t){var n=t.SharedWithMeView;e.layout.showChildView(et,s.createElement(n,null))}))}},{key:"pluginShare",value:function(e,t){return Ft(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Promise.all([n.e(1),n.e(4),n.e(67)]).then(n.bind(null,1937));case 2:i=r.sent,o=i.PluginShareView,this.layout.showChildView(tt,s.createElement(o,{entityId:e,entityType:t.entityType,closePopup:function(){return a.layout.closePopup()}}));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"pluginNewWindow",value:function(e){return Ft(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(137).then(n.bind(null,1867));case 2:r=t.sent,i=r.PluginNewWindowView,this.layout.showChildView(tt,s.createElement(i,{url:e.url,closePopup:function(){return o.layout.closePopup()}}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"catchAllRoutes",value:function(){r.a.ErrorHelper.throw(new Pt.a)}},{key:"notFound",value:function(){var e=this,t=u.Radio.channel("error:view").request("current:error");n.e(94).then(n.bind(null,1868)).then((function(n){var r=n.NotFoundView;e.layout.showChildView(et,s.createElement(r,{error:t}))}))}},{key:"error",value:function(){var e=this,t=u.Radio.channel("error:view").request("current:error");n.e(104).then(n.bind(null,1458)).then((function(n){var r=n.ErrorView;e.layout.showChildView(et,s.createElement(r,{error:t}))}))}},{key:"dialogError",value:function(){var e=this,t=u.Radio.channel("error:view").request("current:error");if(t){var r=t.dialogOptions;n.e(117).then(n.bind(null,1869)).then((function(n){var i=n.DialogView;e.layout.showChildView(tt,s.createElement(i,{title:r.title,text:r.text,buttons:r.buttons,onDone:t.onDone,onFail:t.onFail,closePopup:function(){return e.layout.closePopup()}}))}))}}},{key:"devError",value:function(){var e=this,t=u.Radio.channel("error:view").request("current:error");n.e(116).then(n.bind(null,1870)).then((function(n){var r=n.DevErrorView;e.layout.showChildView(et,s.createElement(r,{error:t}))}))}}],[{key:"router",get:function(){return Ht}}]),i}(_),Wt=n(59),qt=n(115),Gt=n(23),Kt=n(316);!function(e){e.Expired="expired",e.Active="active"}(Vt||(Vt={}));var Yt=n(78);function Xt(e){return(Xt="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 Qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $t(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 Zt(e,t){return(Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jt(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=tn(e);if(t){var i=tn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return en(this,n)}}function en(e,t){return!t||"object"!==Xt(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 tn(e){return(tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nn=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&&Zt(e,t)}(o,e);var t,n,r,i=Jt(o);function o(){return Qt(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return"ShareLinkError"}}])&&$t(t.prototype,n),r&&$t(t,r),o}(r.a.SilentError);function rn(e){return(rn="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 on(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function an(e,t){return(an=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sn(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=un(e);if(t){var i=un(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cn(this,n)}}function cn(e,t){return!t||"object"!==rn(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 un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ln=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&&an(e,t)}(o,e);var t,n,r,i=sn(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Share link has been deleted")}return t=o,(n=[{key:"name",get:function(){return"ShareLinkDeletedError"}},{key:"heading",get:function(){return q.a.getPhrase("share.shareLinkDeletedError","heading")}},{key:"description",get:function(){return q.a.getPhrase("share.shareLinkDeletedError","description")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.DELETED}}])&&on(t.prototype,n),r&&on(t,r),o}(nn);function fn(e){return(fn="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 pn(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 hn(e,t){return(hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dn(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=mn(e);if(t){var i=mn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yn(this,n)}}function yn(e,t){return!t||"object"!==fn(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 mn(e){return(mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vn=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&&hn(e,t)}(o,e);var t,n,r,i=dn(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Share link has expired")}return t=o,(n=[{key:"name",get:function(){return"ShareLinkExpiredError"}},{key:"heading",get:function(){return q.a.getPhrase("share.shareLinkExpiredError","heading")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.EXPIRED}}])&&pn(t.prototype,n),r&&pn(t,r),o}(nn);function gn(e){return(gn="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 bn(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 _n(e,t){return(_n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wn(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=Tn(e);if(t){var i=Tn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sn(this,n)}}function Sn(e,t){return!t||"object"!==gn(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 Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cn=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&&_n(e,t)}(o,e);var t,n,r,i=wn(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Share link doesn't exist")}return t=o,(n=[{key:"name",get:function(){return"ShareLinkNotFoundError"}},{key:"heading",get:function(){return q.a.getPhrase("share.shareLinkNotFoundError","heading")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.NOT_FOUND}}])&&bn(t.prototype,n),r&&bn(t,r),o}(nn);function kn(e){return(kn="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 En(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function On(e,t){return(On=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pn(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=In(e);if(t){var i=In(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return An(this,n)}}function An(e,t){return!t||"object"!==kn(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 In(e){return(In=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=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&&On(e,t)}(o,e);var t,n,r,i=Pn(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Access to this share link is forbidden")}return t=o,(n=[{key:"name",get:function(){return"ShareLinkPrivateError"}},{key:"heading",get:function(){return q.a.getPhrase("share.shareLinkPrivateError","heading")}},{key:"description",get:function(){return q.a.getPhrase("share.shareLinkPrivateError","description")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.PRIVATE}}])&&En(t.prototype,n),r&&En(t,r),o}(nn);function Rn(e){return(Rn="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 Ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jn(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 Nn(e,t){return(Nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dn(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=Un(e);if(t){var i=Un(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bn(this,n)}}function Bn(e,t){return!t||"object"!==Rn(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 Un(e){return(Un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nn(e,t)}(o,e);var t,n,r,i=Dn(o);function o(){return Ln(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return"EmbedError"}}])&&jn(t.prototype,n),r&&jn(t,r),o}(r.a.SilentError);function Vn(e){return(Vn="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 Fn(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 Hn(e,t){return(Hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zn(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=qn(e);if(t){var i=qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wn(this,n)}}function Wn(e,t){return!t||"object"!==Vn(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 qn(e){return(qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=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&&Hn(e,t)}(o,e);var t,n,r,i=zn(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Embed link not found error")}return t=o,(n=[{key:"name",get:function(){return"EmbedNotFoundError"}},{key:"heading",get:function(){return q.a.getPhrase("embed.embedNotFoundError","heading")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.NOT_FOUND}}])&&Fn(t.prototype,n),r&&Fn(t,r),o}(Mn);function Kn(e){return(Kn="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 Yn(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 Xn(e,t){return(Xn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qn(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=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $n(this,n)}}function $n(e,t){return!t||"object"!==Kn(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 Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jn=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&&Xn(e,t)}(o,e);var t,n,r,i=Qn(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Embed link deleted error")}return t=o,(n=[{key:"name",get:function(){return"EmbedLinkDeletedError"}},{key:"heading",get:function(){return q.a.getPhrase("embed.embedLinkDeletedError","heading")}},{key:"description",get:function(){return q.a.getPhrase("embed.embedLinkDeletedError","description")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.DELETED}}])&&Yn(t.prototype,n),r&&Yn(t,r),o}(Mn);function er(e){return(er="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 tr(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 nr(e,t){return(nr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rr(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=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ir(this,n)}}function ir(e,t){return!t||"object"!==er(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 or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ar=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&&nr(e,t)}(o,e);var t,n,r,i=rr(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Embed link expired error")}return t=o,(n=[{key:"name",get:function(){return"EmbedLinkExpiredError"}},{key:"heading",get:function(){return q.a.getPhrase("embed.embedLinkExpiredError","heading")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.EXPIRED}}])&&tr(t.prototype,n),r&&tr(t,r),o}(Mn);function sr(e){return(sr="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 cr(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 ur(e,t){return(ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lr(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=pr(e);if(t){var i=pr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fr(this,n)}}function fr(e,t){return!t||"object"!==sr(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 pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hr=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&&ur(e,t)}(o,e);var t,n,r,i=lr(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Unspecified embed error")}return t=o,(n=[{key:"name",get:function(){return"UnspecifiedEmbedError"}},{key:"heading",get:function(){return q.a.getPhrase("embed.unspecifiedEmbedError","heading")}},{key:"description",get:function(){return q.a.getPhrase("embed.unspecifiedEmbedError","description")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.NOT_FOUND}}])&&cr(t.prototype,n),r&&cr(t,r),o}(Mn);function dr(e){return(dr="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 yr(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 mr(e,t){return(mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vr(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=br(e);if(t){var i=br(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gr(this,n)}}function gr(e,t){return!t||"object"!==dr(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 br(e){return(br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _r,wr,Sr=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&&mr(e,t)}(o,e);var t,n,r,i=vr(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,"Embed link private error")}return t=o,(n=[{key:"name",get:function(){return"PrivateEmbedError"}},{key:"heading",get:function(){return q.a.getPhrase("embed.privateEmbedError","heading")}},{key:"description",get:function(){return q.a.getPhrase("embed.privateEmbedError","description")}},{key:"imageUrl",get:function(){return It.a.EmptyStates.Share.PRIVATE}}])&&yr(t.prototype,n),r&&yr(t,r),o}(Mn),Tr=n(185),Cr=n(246),kr=n(243);function Er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Or=(Er(_r={},Gt.a.Video,!0),Er(_r,Gt.a.Interactive,!0),Er(_r,Gt.a.Clip,!0),Er(_r,Gt.a.Playlist,!0),Er(_r,Gt.a.Series,!0),_r),Pr=(Er(wr={},Gt.a.Video,!0),Er(wr,Gt.a.Interactive,!0),Er(wr,Gt.a.Clip,!0),wr),Ar=function(e){return e===R.a.Share.VIEW_SHARE_LINK?{notFound:Cn,deleted:ln,private:xn,unspecified:H.a,expired:vn}:{notFound:Gn,deleted:Jn,private:Sr,unspecified:hr,expired:ar}};function Ir(e,t){z.a._forcePushContext(t),r.a.AppLinkUtility.routingEnded(),r.a.ErrorHelper.throw(e)}function xr(e,t){r.a.AppLinkUtility.routingEnded(),t.action!==R.a.Share.VIEW_SHARE_LINK?r.a.AppLinkHelper.trigger({application:P.a.EMBED,action:R.a.Embed.EMBED_LOGIN,args:[e]}):r.a.AppLinkHelper.trigger({application:P.a.LAUNCHPAD,action:R.a.Launchpad.PASSWORD_PROTECTED_SHARE_LINK,args:[e],params:{appLink:t}})}function Rr(e,t){var n=e.appLink.action===R.a.Share.VIEW_SHARE_LINK,a=e.appLink.action===R.a.Embed.VIEW_EMBEDDED_RESOURCE;if(n||a){var s=Ar(e.appLink.action),c=Wt.a.first(e.appLink.args);if(!c)return Ir(new s.notFound,e.appLink);i.a.hooklessFetch(e.shell.store,Yt.a.getShareObject(c,(function(n){if(function(e,t,n){return Or[e.objectTypeId]?e.type!==Kt.a.ShareLink||e.status.toLowerCase()!==Vt.Expired||(Ir(new n.expired,t),!1):(Ir(new n.unspecified,t),!1)}(n,e.appLink,s))return n.type===Kt.a.DirectShare?t(e):void function(t){if(!t.isPasswordProtected)return void u(t);var n=ae.b.get(c);if(n)return void i.a.hooklessFetch(e.shell.store,Yt.a.checkPassword(c,n,(function(n){n.success?u(t):xr(c,e.appLink)}),(function(){return xr(c,e.appLink)})));xr(c,e.appLink)}(n)}),(function(t){!function(e,t,n){if(r.a.AppLinkUtility.hasActiveRoute())e.status===qt.a.Forbidden?"share-link-deleted"===e.responseJSON.type?Ir(new n.deleted,t):Ir(new n.private,t):e.status===qt.a.NotFound?Ir(new n.notFound,t):Ir(new n.unspecified,t)}(t,e.appLink,s)})))}else t(e);function u(n){var a,u,f=Pr[n.objectTypeId],p=null!==(u=null===(a=e.appLink)||void 0===a?void 0:a.params)&&void 0!==u?u:{},h=p.videoId,d=p.clipId,y=p.interactiveId;if((h||d||y)&&(f=!0),!f)return n.objectTypeId===Gt.a.Playlist?void t(e):void i.a.hooklessFetch(e.shell.store,o.a.currentUser((function(e){return l(n,e,!1)}),(function(){return Ir(new s.unspecified,e.appLink)})));!function(e,t,n,r,o,a){var s=r.objectId,c=r.objectTypeId,u=e.params;if((null==u?void 0:u.videoId)?(s=u.videoId,c=Gt.a.Video):(null==u?void 0:u.clipId)?(s=u.clipId,c=Gt.a.Clip):(null==u?void 0:u.interactiveId)&&(s=u.interactiveId,c=Gt.a.Interactive),c!==Gt.a.Video)if(c!==Gt.a.Clip)if(c!==Gt.a.Interactive);else{i.a.hooklessFetch(t,kr.a.sharedInteractiveMetadata(s,n,(function(e){e.clip?o(e.clip.video):o(e.video)}),a))}else{i.a.hooklessFetch(t,Cr.a.sharedClip(s,n,(function(e){return o(e.video)}),a))}else i.a.hooklessFetch(t,Tr.a.sharedVideo(s,n,o,a))}(e.appLink,e.shell.store,c,n,(function(r){return function(n,r){if(r._canBeConsumed.value)return void t(e);i.a.hooklessFetch(e.shell.store,o.a.currentUser((function(e){return l(n,e,!0)}),(function(){return Ir(new s.unspecified,e.appLink)})))}(n,r)}),(function(t){return function(e,t,n){if(r.a.AppLinkUtility.hasActiveRoute())return e.status===qt.a.Forbidden?Ir(new n.private,t):e.status===qt.a.NotFound?Ir(new n.notFound,t):Ir(new n.unspecified,t)}(t,e.appLink,s)}))}function l(n,i,o){i.isAuthenticated?o?Ir(new s.private,e.appLink):t(e):function(e,t){r.a.AppLinkUtility.routingEnded();var n=e.ownerCustomerId;if(t.action!==R.a.Embed.VIEW_EMBEDDED_RESOURCE){var i=r.a.AppLinkHelper.getHref(t),o=t.params,a=o.videoId,s=o.clipId,c=o.interactiveId;e.objectTypeId===Gt.a.Playlist&&(a||s||c)?r.a.AppLinkHelper.trigger({application:P.a.DEFAULT,action:R.a.Default.LOG_IN,params:{redirectUrl:i,customerId:n}}):r.a.AppLinkHelper.trigger({application:P.a.LAUNCHPAD,action:R.a.Launchpad.SHARE_LINK_SIGN_IN,args:[e.id],params:{redirectUrl:i,customerId:n}})}else r.a.AppLinkHelper.trigger({application:P.a.EMBED,action:R.a.Embed.EMBED_LOGIN,args:[e.id],params:{customerId:n}})}(n,e.appLink)}}function Lr(e){return(Lr="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 jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nr(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 Dr(e,t,n){return t&&Nr(e.prototype,t),n&&Nr(e,n),e}function Br(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&&Ur(e,t)}function Ur(e,t){return(Ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mr(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=Fr(e);if(t){var i=Fr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vr(this,n)}}function Vr(e,t){return!t||"object"!==Lr(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 Fr(e){return(Fr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},zr=function(e){Br(n,e);var t=Mr(n);function n(){return jr(this,n),t.apply(this,arguments)}return Dr(n,[{key:"channelName",get:function(){return P.a.EMBED}},{key:"appRoutes",get:function(){return{"share/embed/:shareId":"viewEmbeddedResource","embed-login-success":"embedLoginSuccess","plugin-login-success":"pluginLoginSuccess","plugin/login(/)":"pluginLogin"}}},{key:"appLinks",get:function(){return["embedLogin","embedError"]}},{key:"filters",get:function(){return[Fe,Rr]}}]),n}(r.a.AppRouter),Wr=function(e){Br(r,e);var t=Mr(r);function r(){return jr(this,r),t.apply(this,arguments)}return Dr(r,[{key:"name",get:function(){return"Embed Application"}},{key:"layoutOptions",get:function(){return{name:O}}},{key:"channelName",get:function(){return P.a.EMBED}},{key:"viewEmbeddedResource",value:function(e,t){var r=this;n.e(123).then(n.bind(null,1949)).then((function(n){var i=n.BaseEmbedView;r.layout.showChildView(et,c.a.createElement(i,{shareId:e,queryParams:t}))}))}},{key:"embedLogin",value:function(e,t){return Hr(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.e(99).then(n.bind(null,1871));case 2:i=r.sent,o=i.EmbedLoginView,this.layout.showChildView(et,c.a.createElement(o,{shareId:e,consumerKey:t.consumerKey,customerId:t.customerId}));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"embedLoginSuccess",value:function(){return Hr(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(97).then(n.bind(null,1872));case 2:t=e.sent,r=t.EmbedLoginSuccessView,this.layout.showChildView(et,c.a.createElement(r,null));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"embedError",value:function(){return Hr(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.Radio.channel("error:view").request("current:error"),e.next=3,n.e(110).then(n.bind(null,1873));case 3:r=e.sent,i=r.EmbedErrorView,this.layout.showChildView(et,c.a.createElement(i,{error:t}));case 6:case"end":return e.stop()}}),e,this)})))}},{key:"pluginLogin",value:function(e){return Hr(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(107).then(n.bind(null,1874));case 2:r=t.sent,i=r.PluginLoginView,this.layout.showChildView(et,c.a.createElement(i,{returnUrl:e.returnUrl}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"pluginLoginSuccess",value:function(){return Hr(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(98).then(n.bind(null,1875));case 2:t=e.sent,r=t.PluginLoginSuccessView,this.layout.showChildView(et,c.a.createElement(r,null));case 5:case"end":return e.stop()}}),e,this)})))}}],[{key:"router",get:function(){return zr}}]),r}(_),qr=n(43);function Gr(e){return function(e){if(Array.isArray(e))return Kr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Kr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kr(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yr=n(348);function Xr(e){var t=e.view,n=e.options,r=void 0===n?{}:n,i=e.className,o=void 0===i?"":i,a=s.useMemo((function(){return new t(r)}),[r]);Object(Yr.a)(a.title);var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=s.useRef(null);return s.useEffect((function(){if(e){var t=n.current;return e.render(),t.hasChildNodes()?t.replaceChild(e.el,t.firstChild):t.appendChild(e.el),e.trigger("rendered"),function(){qr.a.isFunction(e.close)?e.close():qr.a.isFunction(e.destroy)&&e.destroy()}}}),Gr(t)),n}(a,[a]);return t?s.createElement("div",{ref:c,className:o}):s.createElement(s.Fragment,null)}function Qr(e){return(Qr="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 $r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zr(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 Jr(e,t,n){return t&&Zr(e.prototype,t),n&&Zr(e,n),e}function ei(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&&ti(e,t)}function ti(e,t){return(ti=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ni(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=ii(e);if(t){var i=ii(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ri(this,n)}}function ri(e,t){return!t||"object"!==Qr(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 ii(e){return(ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oi=function(e){ei(n,e);var t=ni(n);function n(){return $r(this,n),t.apply(this,arguments)}return Jr(n,[{key:"channelName",get:function(){return P.a.NOTIFICATIONS}},{key:"appRoutes",get:function(){return{"notifications(/)":"index"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),ai=function(e){ei(r,e);var t=ni(r);function r(){return $r(this,r),t.apply(this,arguments)}return Jr(r,[{key:"name",get:function(){return"Notifications Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:T}}}},{key:"channelName",get:function(){return P.a.NOTIFICATIONS}},{key:"index",value:function(e){var t=this;n.e(108).then(n.bind(null,1950)).then((function(n){var r=n.NotificationsView;t.layout.showChildView(w,s.createElement(Xr,{view:r,options:{params:e}}))}))}}],[{key:"router",get:function(){return oi}}]),r}(_),si=n(418);function ci(e){return(ci="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 ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function li(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 fi(e,t,n){return t&&li(e.prototype,t),n&&li(e,n),e}function pi(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&&hi(e,t)}function hi(e,t){return(hi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function di(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=mi(e);if(t){var i=mi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yi(this,n)}}function yi(e,t){return!t||"object"!==ci(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 mi(e){return(mi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vi=function(e){pi(n,e);var t=di(n);function n(){return ui(this,n),t.apply(this,arguments)}return fi(n,[{key:"channelName",get:function(){return P.a.PLAYLISTS}},{key:"appRoutes",get:function(){return{"playlists(/)":"index","playlists/:id(/:slug)":"playlist"}}},{key:"appLinks",get:function(){return["newPlaylist","editPlaylist","deletePlaylist","addToPlaylist","removeVideoFromPlaylist","copyPlaylist"]}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),gi=function(e){pi(r,e);var t=di(r);function r(){return ui(this,r),t.apply(this,arguments)}return fi(r,[{key:"name",get:function(){return"Playlists Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.PLAYLISTS}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()},analyticsOptions:{location:k.LocationContext.Popup}}}},{key:"index",value:function(e){var t=this,r=function(e){return{application:P.a.PLAYLISTS,action:R.a.Playlists.PLAYLIST,args:[e.id,it.a.slugify(e.name)]}},i=e.sort&&si.a.getSortTypeFromName(e.sort);n.e(37).then(n.bind(null,1938)).then((function(e){var n=e.PlaylistsView;t.layout.showChildView(et,s.createElement(n,{getPlaylistAppLink:r,sort:i}))}))}},{key:"playlist",value:function(e,t,r){var i=this,o="string"==typeof t?null==r?void 0:r.classificationId:null==t?void 0:t.classificationId,a=function(e){return{application:P.a.DEFAULT,action:R.a.Default.SERIES,args:[e.id,it.a.slugify(e.name)]}};Promise.all([n.e(0),n.e(2),n.e(3),n.e(13)]).then(n.bind(null,1849)).then((function(t){var n=t.PlaylistView;i.layout.showChildView(et,s.createElement(n,{key:e,playlistId:e,application:P.a.PLAYLISTS,getSeriesAppLink:a,allowEdit:!0,classificationId:o}))}))}},{key:"newPlaylist",value:function(){var e=this;Promise.all([n.e(1),n.e(4),n.e(78)]).then(n.bind(null,1876)).then((function(t){var n=t.NewPlaylistView;e.layout.showChildView(tt,s.createElement(n,Object.assign({application:P.a.PLAYLISTS},e.getPopupProps())))}))}},{key:"editPlaylist",value:function(e){var t=this;Promise.all([n.e(1),n.e(4),n.e(77)]).then(n.bind(null,1877)).then((function(n){var r=n.EditPlaylistView;t.layout.showChildView(tt,s.createElement(r,Object.assign({key:e,playlistId:e},t.getPopupProps())))}))}},{key:"deletePlaylist",value:function(e){var t=this;n.e(112).then(n.bind(null,1878)).then((function(n){var r=n.DeletePlaylistView;t.layout.showChildView(tt,s.createElement(r,Object.assign({key:e,playlistId:e,routeToOnDelete:{application:P.a.PLAYLISTS,action:R.a.Playlists.HOME}},t.getPopupProps())))}))}},{key:"addToPlaylist",value:function(e){var t=this;Promise.all([n.e(1),n.e(4),n.e(42)]).then(n.bind(null,1939)).then((function(n){var r=n.AddToPlaylistView;t.layout.showChildView(tt,s.createElement(r,{key:e,videoId:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"removeVideoFromPlaylist",value:function(e,t){var r=this;n.e(125).then(n.bind(null,1879)).then((function(n){var i=n.RemoveVideoFromPlaylistView;r.layout.showChildView(tt,s.createElement(i,Object.assign({key:"".concat(e,":").concat(t),videoId:e,playlistId:t},r.getPopupProps())))}))}},{key:"copyPlaylist",value:function(e){var t=this;n.e(124).then(n.bind(null,1880)).then((function(n){var r=n.CopyPlaylistView;t.layout.showChildView(tt,s.createElement(r,{id:e,closePopup:function(){return t.layout.closePopup()}}))}))}}],[{key:"router",get:function(){return vi}}]),r}(_);function bi(e){return(bi="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 wi(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 Si(e,t,n){return t&&wi(e.prototype,t),n&&wi(e,n),e}function Ti(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&&Ci(e,t)}function Ci(e,t){return(Ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ki(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=Oi(e);if(t){var i=Oi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ei(this,n)}}function Ei(e,t){return!t||"object"!==bi(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 Oi(e){return(Oi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pi=function(e){Ti(n,e);var t=ki(n);function n(){return _i(this,n),t.apply(this,arguments)}return Si(n,[{key:"channelName",get:function(){return P.a.SEARCH}},{key:"appRoutes",get:function(){return{"search(/)":"index"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),Ai=function(e){Ti(r,e);var t=ki(r);function r(){return _i(this,r),t.apply(this,arguments)}return Si(r,[{key:"name",get:function(){return"Search Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.SEARCH}},{key:"index",value:function(e){var t=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(5),n.e(30)]).then(n.bind(null,1915)).then((function(n){var r=n.SearchResultsView;t.layout.showChildView(et,s.createElement(r,{queryParams:e}),{preventScrollTop:!0})}))}}],[{key:"router",get:function(){return Pi}}]),r}(_);function Ii(e){return(Ii="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 xi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ri(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 Li(e,t,n){return t&&Ri(e.prototype,t),n&&Ri(e,n),e}function ji(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&&Ni(e,t)}function Ni(e,t){return(Ni=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Di(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=Ui(e);if(t){var i=Ui(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bi(this,n)}}function Bi(e,t){return!t||"object"!==Ii(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 Ui(e){return(Ui=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mi=function(e){ji(n,e);var t=Di(n);function n(){return xi(this,n),t.apply(this,arguments)}return Li(n,[{key:"channelName",get:function(){return P.a.SUBJECT}},{key:"appRoutes",get:function(){return{"topics(/)":"classificationAll","topics/preferences":"preferences","topics/:id/topics":"classificationTopics","topics/:id(/:slug)":"classification"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),Vi=function(e){ji(r,e);var t=Di(r);function r(){return xi(this,r),t.apply(this,arguments)}return Li(r,[{key:"name",get:function(){return"Subject Application"}},{key:"channelName",get:function(){return P.a.SUBJECT}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:N(),alertRegion:T}}}},{key:"classificationAll",value:function(){var e=this;Promise.all([n.e(9),n.e(18)]).then(n.bind(null,1881)).then((function(t){var n=t.ClassificationsView;e.layout.showChildView(w,s.createElement(n,null))}))}},{key:"classificationTopics",value:function(e){var t=this;Promise.all([n.e(9),n.e(18)]).then(n.bind(null,1881)).then((function(n){var r=n.ClassificationsView;t.layout.showChildView(w,s.createElement(r,{id:e}))}))}},{key:"classification",value:function(e,t,r){var i=this;Promise.all([n.e(0),n.e(6),n.e(9),n.e(33)]).then(n.bind(null,1922)).then((function(t){var n=t.ClassificationView;i.layout.showChildView(w,s.createElement(n,{key:e,id:e,queryParams:r}))}))}},{key:"preferences",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.e(63).then(n.bind(null,1951)).then((function(n){var r=n.BasePreferencesView;e.layout.showChildView(w,s.createElement(r,{step:t.step||"",redirectUrl:t.redirectUrl||""}))}))}}],[{key:"router",get:function(){return Mi}}]),r}(_);function Fi(e){return(Fi="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 Hi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zi(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 Wi(e,t,n){return t&&zi(e.prototype,t),n&&zi(e,n),e}function qi(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&&Gi(e,t)}function Gi(e,t){return(Gi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ki(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=Xi(e);if(t){var i=Xi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yi(this,n)}}function Yi(e,t){return!t||"object"!==Fi(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 Xi(e){return(Xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qi=function(e){qi(n,e);var t=Ki(n);function n(){return Hi(this,n),t.apply(this,arguments)}return Wi(n,[{key:"channelName",get:function(){return P.a.UPLOAD}},{key:"appLinks",get:function(){return["editUpload","cancelUpload"]}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),$i=function(e){qi(r,e);var t=Ki(r);function r(){return Hi(this,r),t.apply(this,arguments)}return Wi(r,[{key:"name",get:function(){return"Upload Application"}},{key:"channelName",get:function(){return P.a.UPLOAD}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:T}}}},{key:"editUpload",value:function(e){var t=this;Promise.all([n.e(1),n.e(4),n.e(84)]).then(n.bind(null,1882)).then((function(n){var r=n.EditUploadView;t.layout.showChildView(S,s.createElement(r,{uploadId:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"cancelUpload",value:function(e,t){var r=this;n.e(129).then(n.bind(null,1883)).then((function(n){var i=n.CancelUploadView;r.layout.showChildView(S,s.createElement(i,{id:e,name:t.name,status:t.status,closePopup:function(){return r.layout.closePopup()}}))}))}}],[{key:"router",get:function(){return Qi}}]),r}(_);function Zi(e){return(Zi="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 Ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eo(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 to(e,t,n){return t&&eo(e.prototype,t),n&&eo(e,n),e}function no(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&&ro(e,t)}function ro(e,t){return(ro=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function io(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=ao(e);if(t){var i=ao(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oo(this,n)}}function oo(e,t){return!t||"object"!==Zi(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 ao(e){return(ao=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var so=function(e){no(n,e);var t=io(n);function n(){return Ji(this,n),t.apply(this,arguments)}return to(n,[{key:"channelName",get:function(){return P.a.USER_MANAGER}},{key:"appRoutes",get:function(){return{"user-manager/students(/)":"studentManager","user-manager/staff(/)":"staffManager","user-manager/users/upload/edit":"bulkUserUploadEdit","user-manager/users/upload/duplicates":"bulkUserUploadDuplicates","user-manager/users/upload/review":"bulkUserUploadReview"}}},{key:"appLinks",get:function(){return["createUser","editUser","bulkRemoveUsers","toggleUserStatus","bulkUserUploadPopup","bulkUserUploadSuccess","changeStudentPassword","exportUserList"]}},{key:"filters",get:function(){return[Fe,re,V,Ue]}}]),n}(r.a.AppRouter),co=function(e){no(r,e);var t=io(r);function r(){return Ji(this,r),t.apply(this,arguments)}return to(r,[{key:"name",get:function(){return"User Manager Application"}},{key:"channelName",get:function(){return P.a.USER_MANAGER}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:T}}}},{key:"studentManager",value:function(e){var t=this;Promise.all([n.e(5),n.e(7),n.e(12),n.e(133)]).then(n.bind(null,1952)).then((function(n){var r=n.StudentManagerView;t.layout.showChildView(w,s.createElement(r,{queryParams:e}))}))}},{key:"staffManager",value:function(e){var t=this;Promise.all([n.e(5),n.e(7),n.e(12),n.e(132)]).then(n.bind(null,1953)).then((function(n){var r=n.StaffManagerView;t.layout.showChildView(w,s.createElement(r,{queryParams:e}))}))}},{key:"createUser",value:function(e){var t=this;Promise.all([n.e(1),n.e(5),n.e(7),n.e(68)]).then(n.bind(null,1884)).then((function(n){var r=n.CreateUserView,i={actionType:k.UserAction.Create,entity:k.EntityType.User,workflowPhase:k.WorkflowPhase.Complete,descriptor:k.OperationDescriptor.Single,location:k.LocationContext.Popup};t.layout.showChildView(S,s.createElement(r,{userType:e.userType,analyticsOptions:i,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"editUser",value:function(e,t){var r=this;Promise.all([n.e(1),n.e(5),n.e(7),n.e(69)]).then(n.bind(null,1885)).then((function(n){var i=n.EditUserView,o={actionType:k.UserAction.Edit,entity:k.EntityType.User,workflowPhase:k.WorkflowPhase.Complete,location:k.LocationContext.Popup};r.layout.showChildView(S,s.createElement(i,{id:e,userType:t.userType,analyticsOptions:o,closePopup:function(){return r.layout.closePopup()}}))}))}},{key:"bulkRemoveUsers",value:function(e){var t=this,r=e.userType;Promise.all([n.e(5),n.e(79)]).then(n.bind(null,1954)).then((function(e){var n=e.BulkRemoveUsersView;t.layout.showChildView(S,s.createElement(n,{userType:r,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"toggleUserStatus",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Promise.all([n.e(5),n.e(80)]).then(n.bind(null,1955)).then((function(n){var i=n.ToggleUserStatusView;t.layout.showChildView(S,s.createElement(i,{id:e,userType:r.userType,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"changeStudentPassword",value:function(e){var t=this;Promise.all([n.e(1),n.e(4),n.e(5),n.e(21),n.e(131)]).then(n.bind(null,1956)).then((function(n){var r=n.ChangeStudentPasswordView;t.layout.showChildView(S,s.createElement(r,{studentId:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"exportUserList",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.userType;Promise.all([n.e(5),n.e(92)]).then(n.bind(null,1957)).then((function(t){var n=t.ExportUserListView;e.layout.showChildView(C,s.createElement(n,{userType:r,onDone:function(){return e.layout.unsetRegion(C)}}))}))}},{key:"bulkUserUploadPopup",value:function(e){var t=this,r=e.userType;Promise.all([n.e(1),n.e(4),n.e(5),n.e(48)]).then(n.bind(null,1917)).then((function(e){var n=e.BulkUserUploadPopupView;t.layout.showChildView(S,s.createElement(n,{userType:r,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"bulkUserUploadEdit",value:function(){var e=this,t=ae.a.get(ce.a.BULK_USER_UPLOAD);Promise.all([n.e(1),n.e(5),n.e(7),n.e(20),n.e(74)]).then(n.bind(null,1940)).then((function(n){var r=n.BulkUserUploadEditView;e.layout.showChildView(w,s.createElement(r,{key:"bulk-user-upload-edit-".concat((new Date).toString()),userType:t,closePopup:function(){return e.layout.closePopup()}}))}))}},{key:"bulkUserUploadDuplicates",value:function(){var e=this,t=ae.a.get(ce.a.BULK_USER_UPLOAD);Promise.all([n.e(1),n.e(5),n.e(7),n.e(20),n.e(130)]).then(n.bind(null,1928)).then((function(n){var r=n.BulkUserUploadDuplicatesView;e.layout.showChildView(w,s.createElement(r,{userType:t,closePopup:function(){return e.layout.closePopup()}}))}))}},{key:"bulkUserUploadReview",value:function(){var e=this,t=ae.a.get(ce.a.BULK_USER_UPLOAD);Promise.all([n.e(5),n.e(46)]).then(n.bind(null,1941)).then((function(n){var r=n.BulkUserUploadReviewView;e.layout.showChildView(w,s.createElement(r,{userType:t,closePopup:function(){return e.layout.closePopup()}}))}))}},{key:"bulkUserUploadSuccess",value:function(){var e=this,t=ae.a.get(ce.a.BULK_USER_UPLOAD);Promise.all([n.e(5),n.e(64)]).then(n.bind(null,1886)).then((function(n){var r=n.BulkUserUploadSuccessView;e.layout.showChildView(w,s.createElement(r,{closePopup:function(){return e.layout.closePopup()},userType:t}))}))}}],[{key:"router",get:function(){return so}}]),r}(_);function uo(e){return(uo="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 lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fo(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 po(e,t,n){return t&&fo(e.prototype,t),n&&fo(e,n),e}function ho(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&&yo(e,t)}function yo(e,t){return(yo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mo(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=go(e);if(t){var i=go(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vo(this,n)}}function vo(e,t){return!t||"object"!==uo(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 go(e){return(go=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bo=function(e){ho(n,e);var t=mo(n);function n(){return lo(this,n),t.apply(this,arguments)}return po(n,[{key:"channelName",get:function(){return P.a.SETTINGS}},{key:"appRoutes",get:function(){return{"settings(/)":"index","settings/profile(/)":"profileDetails","settings/account(/)":"account","settings/integrations(/)":"integrations"}}},{key:"filters",get:function(){return[Fe,re,V,Ue]}}]),n}(r.a.AppRouter),_o=function(e){ho(r,e);var t=mo(r);function r(){return lo(this,r),t.apply(this,arguments)}return po(r,[{key:"name",get:function(){return"Settings Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.SETTINGS}},{key:"index",value:function(){var e=this;n.e(100).then(n.bind(null,1942)).then((function(t){var n=t.SettingsView;e.layout.showChildView(et,c.a.createElement(n,null))}))}},{key:"profileDetails",value:function(){var e=this;Promise.all([n.e(1),n.e(4),n.e(5),n.e(56)]).then(n.bind(null,1926)).then((function(t){var n=t.ProfileDetailsView;e.layout.showChildView(et,c.a.createElement(n,null))}))}},{key:"account",value:function(){var e=this;Promise.all([n.e(1),n.e(4),n.e(5),n.e(21),n.e(93)]).then(n.bind(null,1921)).then((function(t){var n=t.AccountSettingsView;e.layout.showChildView(et,c.a.createElement(n,null))}))}},{key:"integrations",value:function(){var e=this;n.e(66).then(n.bind(null,1930)).then((function(t){var n=t.IntegrationSettingsView;e.layout.showChildView(et,c.a.createElement(n,null))}))}}],[{key:"router",get:function(){return bo}}]),r}(_);function wo(e){return(wo="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 So(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function To(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 Co(e,t,n){return t&&To(e.prototype,t),n&&To(e,n),e}function ko(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&&Eo(e,t)}function Eo(e,t){return(Eo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oo(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=Ao(e);if(t){var i=Ao(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Po(this,n)}}function Po(e,t){return!t||"object"!==wo(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 Ao(e){return(Ao=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Io=function(e){ko(n,e);var t=Oo(n);function n(){return So(this,n),t.apply(this,arguments)}return Co(n,[{key:"channelName",get:function(){return P.a.WATCH_HISTORY}},{key:"appRoutes",get:function(){return{"watch-history(/)":"index"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),xo=function(e){ko(r,e);var t=Oo(r);function r(){return So(this,r),t.apply(this,arguments)}return Co(r,[{key:"name",get:function(){return"Watch History Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.WATCH_HISTORY}},{key:"index",value:function(){var e=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(51)]).then(n.bind(null,1931)).then((function(t){var n=t.WatchHistoryView;e.layout.showChildView(et,c.a.createElement(n,null))}))}}],[{key:"router",get:function(){return Io}}]),r}(_);function Ro(e){return(Ro="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 Lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jo(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 No(e,t,n){return t&&jo(e.prototype,t),n&&jo(e,n),e}function Do(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&&Bo(e,t)}function Bo(e,t){return(Bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uo(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=Vo(e);if(t){var i=Vo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mo(this,n)}}function Mo(e,t){return!t||"object"!==Ro(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 Vo(e){return(Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fo=function(e){Do(n,e);var t=Uo(n);function n(){return Lo(this,n),t.apply(this,arguments)}return No(n,[{key:"channelName",get:function(){return P.a.SHARE}},{key:"appRoutes",get:function(){return{"share/:id(/)":"viewShareLink"}}},{key:"appLinks",get:function(){return["shareLinkError"]}},{key:"filters",get:function(){return[Fe,Rr]}}]),n}(r.a.AppRouter),Ho=function(e){Do(r,e);var t=Uo(r);function r(){return Lo(this,r),t.apply(this,arguments)}return No(r,[{key:"name",get:function(){return"Share Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.SHARE}},{key:"viewShareLink",value:function(e,t){var r=this;n.e(126).then(n.bind(null,1958)).then((function(n){var i=n.BaseShareLinkView;r.layout.showChildView(et,s.createElement(i,{key:"".concat(e,":").concat(se.LocationUtils.SerializeQueryParams(t)),shareId:e,queryParams:t}))}))}},{key:"shareLinkError",value:function(){var e=this,t=u.Radio.channel("error:view").request("current:error");n.e(105).then(n.bind(null,1887)).then((function(n){var r=n.ShareLinkErrorView;e.layout.showChildView(et,s.createElement(r,{error:t}))}))}}],[{key:"router",get:function(){return Fo}}]),r}(_);function zo(e){return(zo="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 Wo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(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 Go(e,t,n){return t&&qo(e.prototype,t),n&&qo(e,n),e}function Ko(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&&Yo(e,t)}function Yo(e,t){return(Yo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xo(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=$o(e);if(t){var i=$o(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qo(this,n)}}function Qo(e,t){return!t||"object"!==zo(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 $o(e){return($o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zo=function(e){Ko(n,e);var t=Xo(n);function n(){return Wo(this,n),t.apply(this,arguments)}return Go(n,[{key:"channelName",get:function(){return P.a.INTERACTIVES}},{key:"appRoutes",get:function(){return{"interactive/:id/edit":"editInteractive","interactive/:id(/:slug)":"interactive"}}},{key:"appLinks",get:function(){return["editInteractiveDetails","previewQuestions","printQuestions","copyInteractive","newInteractive","newClipInteractive","unpublishInteractive","shareInteractive","deleteInteractive"]}},{key:"filters",get:function(){return[Fe,re,V,Ue]}}]),n}(r.a.AppRouter),Jo=function(e){Ko(r,e);var t=Xo(r);function r(){return Wo(this,r),t.apply(this,arguments)}return Go(r,[{key:"name",get:function(){return"Interactives Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"channelName",get:function(){return P.a.INTERACTIVES}},{key:"interactive",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=("string"==typeof t?i:t)||{};Promise.all([n.e(8),n.e(0),n.e(2),n.e(3),n.e(28)]).then(n.bind(null,1888)).then((function(t){var n=t.InteractiveView;r.layout.showChildView(et,s.createElement(n,{id:e,queryParams:o}))}))}},{key:"newInteractive",value:function(e){var t=this;n.e(83).then(n.bind(null,1889)).then((function(n){var r=n.NewInteractiveView;t.layout.showChildView(tt,s.createElement(r,{videoId:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"newClipInteractive",value:function(e){var t=this;n.e(95).then(n.bind(null,1959)).then((function(n){var r=n.NewClipInteractiveView;t.layout.showChildView(tt,s.createElement(r,{clipId:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"editInteractive",value:function(e){var t=this;Promise.all([n.e(8),n.e(11),n.e(57)]).then(n.bind(null,1932)).then((function(n){var r=n.EditInteractiveView;t.layout.showChildView(et,s.createElement(r,{id:e}))}))}},{key:"editInteractiveDetails",value:function(e,t){var r=this;Promise.all([n.e(1),n.e(4),n.e(0),n.e(75)]).then(n.bind(null,1960)).then((function(n){var i=n.EditInteractiveDetailsView;r.layout.showChildView(tt,s.createElement(i,{interactiveMetadataId:e,publish:!!t.publish,closePopup:function(){return r.layout.closePopup()}}))}))}},{key:"previewQuestions",value:function(e){var t=this;Promise.all([n.e(10),n.e(49)]).then(n.bind(null,1890)).then((function(n){var r=n.PreviewQuestionsView;t.layout.showChildView(tt,s.createElement(r,{id:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"printQuestions",value:function(e){var t=this;Promise.all([n.e(10),n.e(96)]).then(n.bind(null,1891)).then((function(n){var r=n.PrintInteractiveView;t.layout.showChildView(tt,s.createElement(r,{id:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"copyInteractive",value:function(e,t){var r=this;n.e(106).then(n.bind(null,1892)).then((function(n){var i=n.CopyInteractiveView;r.layout.showChildView(tt,s.createElement(i,{interactiveMetadataId:e,closePopup:function(){return r.layout.closePopup()},fromEdit:t.fromEdit}))}))}},{key:"shareInteractive",value:function(e){var t=this;n.e(114).then(n.bind(null,1893)).then((function(n){var r=n.ShareInteractiveView;t.layout.showChildView(tt,s.createElement(r,{interactiveMetadataId:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"unpublishInteractive",value:function(e){var t=this;n.e(115).then(n.bind(null,1894)).then((function(n){var r=n.UnpublishInteractiveView;t.layout.showChildView(tt,s.createElement(r,{interactiveMetadataId:e,closePopup:function(){return t.layout.closePopup()}}))}))}},{key:"deleteInteractive",value:function(e){var t=this;n.e(113).then(n.bind(null,1895)).then((function(n){var r=n.DeleteInteractiveView;t.layout.showChildView(tt,s.createElement(r,{interactiveMetadataId:e,closePopup:function(){return t.layout.closePopup()}}))}))}}],[{key:"router",get:function(){return Zo}}]),r}(_);function ea(e){return(ea="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 ta(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function na(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 ra(e,t,n){return t&&na(e.prototype,t),n&&na(e,n),e}function ia(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&&oa(e,t)}function oa(e,t){return(oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function aa(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=ca(e);if(t){var i=ca(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sa(this,n)}}function sa(e,t){return!t||"object"!==ea(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 ca(e){return(ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ua=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},la=function(e){ia(n,e);var t=aa(n);function n(){return ta(this,n),t.apply(this,arguments)}return ra(n,[{key:"channelName",get:function(){return P.a.LAUNCHPAD}},{key:"appRoutes",get:function(){return{join:"joinClassroomPrompt","join/:code(/)":"joinClassroom"}}},{key:"appLinks",get:function(){return["passwordProtectedShareLink","shareLinkSignIn","loginLanding"]}},{key:"filters",get:function(){return[Fe]}}]),n}(r.a.AppRouter),fa=function(e){ia(i,e);var t=aa(i);function i(){return ta(this,i),t.apply(this,arguments)}return ra(i,[{key:"name",get:function(){return"Launchpad Application"}},{key:"layoutOptions",get:function(){return{name:O}}},{key:"channelName",get:function(){return P.a.LAUNCHPAD}},{key:"passwordProtectedShareLink",value:function(e,t){return ua(this,void 0,void 0,regeneratorRuntime.mark((function i(){var o,a;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,n.e(82).then(n.bind(null,1896));case 2:if(o=i.sent,a=o.PasswordProtectedShareLinkView,null==t?void 0:t.appLink){i.next=7;break}return r.a.ErrorHelper.throw(new ie.a("PasswordProtectedShareLinkView must be passed an appLink as a param")),i.abrupt("return");case 7:this.layout.showChildView(et,s.createElement(a,{shareId:e,appLink:t.appLink}));case 8:case"end":return i.stop()}}),i,this)})))}},{key:"shareLinkSignIn",value:function(e,t){return ua(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.e(81).then(n.bind(null,1897));case 2:i=r.sent,o=i.ShareLinkSignIn,this.layout.showChildView(et,s.createElement(o,{shareId:e,redirectUrl:t.redirectUrl,customerId:t.customerId}));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"joinClassroomPrompt",value:function(){return ua(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(76).then(n.bind(null,1961));case 2:t=e.sent,r=t.JoinClassroomPromptView,this.layout.showChildView(et,s.createElement(r,null));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"joinClassroom",value:function(e){return ua(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(90).then(n.bind(null,1962));case 2:r=t.sent,i=r.JoinClassroomView,this.layout.showChildView(et,s.createElement(i,{joinCode:e}));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"loginLanding",value:function(e){return ua(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.e(91).then(n.bind(null,1898));case 2:r=t.sent,i=r.LoginLandingView,this.layout.showChildView(et,s.createElement(i,{skipPrompt:e.skipPrompt,showJoinCode:e.showJoinCode}));case 5:case"end":return t.stop()}}),t,this)})))}}],[{key:"router",get:function(){return la}}]),i}(_),pa=n(378);function ha(e){return(ha="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 da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ya(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 ma(e,t,n){return t&&ya(e.prototype,t),n&&ya(e,n),e}function va(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&&ga(e,t)}function ga(e,t){return(ga=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ba(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=wa(e);if(t){var i=wa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _a(this,n)}}function _a(e,t){return!t||"object"!==ha(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 wa(e){return(wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sa=function(e){va(n,e);var t=ba(n);function n(){return da(this,n),t.apply(this,arguments)}return ma(n,[{key:"channelName",get:function(){return P.a.LIBRARIES}},{key:"appRoutes",get:function(){return{"libraries/:id/recently-added":"recentlyAdded","libraries/:id(/:slug)":"library","libraries/:id/folders/:id(/:slug)":"folder"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),Ta=function(e){va(r,e);var t=ba(r);function r(){return da(this,r),t.apply(this,arguments)}return ma(r,[{key:"name",get:function(){return"Libraries Application"}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:T}}}},{key:"channelName",get:function(){return P.a.LIBRARIES}},{key:"library",value:function(e){var t=this;Promise.all([n.e(0),n.e(6),n.e(45)]).then(n.bind(null,1899)).then((function(n){var r=n.LibraryView;t.layout.showChildView(w,c.a.createElement(r,{id:e}))}))}},{key:"recentlyAdded",value:function(e){var t=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(50)]).then(n.bind(null,1900)).then((function(n){var r=n.RecentlyAddedView;t.layout.showChildView(w,c.a.createElement(r,{id:e}))}))}},{key:"folder",value:function(e,t,r,i){var o=this,a="string"==typeof r?null==i?void 0:i.sort:null==r?void 0:r.sort,s=a&&pa.a.getValidSortTypeFromParam(a);Promise.all([n.e(0),n.e(2),n.e(3),n.e(40)]).then(n.bind(null,1943)).then((function(n){var r=n.LibraryFolderView;o.layout.showChildView(w,c.a.createElement(r,{libraryId:e,folderId:t,sort:s}))}))}}],[{key:"router",get:function(){return Sa}}]),r}(_);function Ca(e){return(Ca="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 ka(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ea(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 Oa(e,t,n){return t&&Ea(e.prototype,t),n&&Ea(e,n),e}function Pa(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&&Aa(e,t)}function Aa(e,t){return(Aa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ia(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=Ra(e);if(t){var i=Ra(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xa(this,n)}}function xa(e,t){return!t||"object"!==Ca(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 Ra(e){return(Ra=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var La=function(e){Pa(n,e);var t=Ia(n);function n(){return ka(this,n),t.apply(this,arguments)}return Oa(n,[{key:"channelName",get:function(){return P.a.DASHBOARD}},{key:"appRoutes",get:function(){return{"discover(/)":"index","discover/:id/:name":"dashboard"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),ja=function(e){Pa(r,e);var t=Ia(r);function r(){return ka(this,r),t.apply(this,arguments)}return Oa(r,[{key:"name",get:function(){return"Student Discover Application"}},{key:"channelName",get:function(){return P.a.DASHBOARD}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"index",value:function(){var e=this;Promise.all([n.e(0),n.e(6),n.e(17)]).then(n.bind(null,1918)).then((function(t){var n=t.DashboardView;e.layout.showChildView(et,s.createElement(n,null))}))}},{key:"dashboard",value:function(e){var t=this;Promise.all([n.e(0),n.e(2),n.e(3),n.e(19)]).then(n.bind(null,1944)).then((function(n){var r=n.DashboardWidgetView;t.layout.showChildView(et,s.createElement(r,{widgetId:e}))}))}}],[{key:"router",get:function(){return La}}]),r}(_);function Na(e){return(Na="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 Da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ba(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 Ua(e,t,n){return t&&Ba(e.prototype,t),n&&Ba(e,n),e}function Ma(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&&Va(e,t)}function Va(e,t){return(Va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fa(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=za(e);if(t){var i=za(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ha(this,n)}}function Ha(e,t){return!t||"object"!==Na(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 za(e){return(za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wa=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},qa=function(e){Ma(n,e);var t=Fa(n);function n(){return Da(this,n),t.apply(this,arguments)}return Ua(n,[{key:"channelName",get:function(){return P.a.STUDENT_FEED}},{key:"appRoutes",get:function(){return{"(/)":"index"}}},{key:"filters",get:function(){return[Fe,re,V]}}]),n}(r.a.AppRouter),Ga=function(e){Ma(r,e);var t=Fa(r);function r(){return Da(this,r),t.apply(this,arguments)}return Ua(r,[{key:"name",get:function(){return"Student Feed Application"}},{key:"channelName",get:function(){return P.a.STUDENT_FEED}},{key:"layoutOptions",get:function(){return{name:E,options:{showNav:!0,alertRegion:nt}}}},{key:"index",value:function(e){return Wa(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([n.e(0),n.e(2),n.e(6),n.e(43)]).then(n.bind(null,1914));case 2:r=t.sent,i=r.StudentFeedView,this.layout.showChildView(et,s.createElement(i,{date:e.date,key:e.date}));case 5:case"end":return t.stop()}}),t,this)})))}}],[{key:"router",get:function(){return qa}}]),r}(_);var Ka,Ya=n(3);!function(e){e.Fifo="FifoMemoryCache"}(Ka||(Ka={}));var Xa=n(94),Qa=n(17);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 Za(e){return function(e){if(Array.isArray(e))return Ja(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ja(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ja(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function es(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 ts(e,t){return(ts=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ns(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=is(e);if(t){var i=is(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rs(this,n)}}function rs(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 is(e){return(is=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var os=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&&ts(e,t)}(o,e);var t,n,r,i=ns(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).size=e.size,t.cache={},t.cachedkeys=[],t}return t=o,(n=[{key:"name",get:function(){return Ka.Fifo}},{key:"removeCacheKey",value:function(e){this.cachedkeys=Ya.without(this.cachedkeys,e)}},{key:"has",value:function(e){return!!this.cache[e]}},{key:"get",value:function(e){return this.cache[e]}},{key:"set",value:function(e,t){e&&t||Qa.c.throw(new ie.a("Must provide a cache key and a value to cache in FifoMemoryCache.")),this.has(e)&&this.removeCacheKey(e),this.cachedkeys.push(e),this.cache[e]=t,this.cachedkeys.length>this.size&&delete this.cache[this.cachedkeys.shift()]}},{key:"getOrSet",value:function(e,t){if(this.has(e))return this.get(e);var n=t();return this.set(e,n),n}},{key:"remove",value:function(e){return!!this.has(e)&&(delete this.cache[e],this.removeCacheKey(e),!0)}},{key:"invalidate",value:function(e,t){var n=this,r=Ya.object(this.cachedkeys,this.cachedkeys),i=[];Ya.each(e,(function(e){var t;r[e]&&i.push(e);var n=new RegExp(e,"i"),o=Ya.filter(r,(function(e){return n.test(e)}));(t=i).push.apply(t,Za(o))})),i.length&&(i=Ya.uniq(i),Ya.each(i,(function(e){delete n.cache[e],Ya.isFunction(t)&&t(e)})),this.cachedkeys=Ya.without.apply(Ya,[this.cachedkeys].concat(Za(i))))}}])&&es(t.prototype,n),r&&es(t,r),o}(Xa.a);var as,ss=n(65),cs=n(199),us=n(15),ls=n(154);!function(e){e.Ajax="AjaxDataProvider",e.Notifications="NotificationsSignalRDataProvider"}(as||(as={}));var fs=function(e,t,n){if(!n||!n.errorCode)return e[t];var r="".concat(n.errorCode);return n.errorSubCode&&(r+=".".concat(n.errorSubCode)),e[r]||e[t]};function ps(e){return(ps="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 hs(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 ds(e,t){return(ds=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ys(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=vs(e);if(t){var i=vs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ms(this,n)}}function ms(e,t){return!t||"object"!==ps(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 vs(e){return(vs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gs=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&&ds(e,t)}(o,e);var t,n,r,i=ys(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this,e),$.ajaxSetup({cache:!1,contentType:"application/json; charset=utf-8"}),t.successMiddleware={},t.errorMiddleware={},t.dataServiceErrorMessageMappings=e.dataServiceErrorMessageMappings,t.defaultErrorMessageKey=e.defaultErrorMessageKey,t}return t=o,(n=[{key:"name",get:function(){return as.Ajax}},{key:"parseUrl",value:function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t}},{key:"makeHttps",value:function(e){var t=this.parseUrl(e);return"http:"===t.protocol&&(t.protocol="https:"),t.href}},{key:"base",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n||(n=us.a.GET);var i=Ya.defaults(r,{forceHttps:!1}),o={url:e,method:n,type:n};t&&(o.data=n===us.a.POST||n===us.a.PUT?JSON.stringify(t):t),i.forceHttps&&(o.url=this.makeHttps(o.url)),i.traditional&&(o.traditional=i.traditional);var a=$.ajax(o);return Ya.keys(this.successMiddleware).length&&a.done(Ya.values(this.successMiddleware)),Ya.keys(this.errorMiddleware).length&&a.fail(Ya.values(this.errorMiddleware)),a}},{key:"create",value:function(e,t,n){var r=n.channel,i=n.successEvent,o=n.errorEvent;this.base(e,t,us.a.POST).done((function(e,t,n){return r.trigger(i,e,t,n)})).fail((function(e,t,n){return r.trigger(o,e,t,n)}))}},{key:"read",value:function(e,t){var n=t.channel,r=t.successEvent,i=t.errorEvent;this.base(e,null,us.a.GET).done((function(e,t,i){n.trigger(r,e,t,i)})).fail((function(e,t,r){n.trigger(i,e,t,r)}))}},{key:"update",value:function(e,t,n){var r=n.channel,i=n.successEvent,o=n.errorEvent;this.base(e,t,us.a.PUT).done((function(e,t,n){return r.trigger(i,e,t,n)})).fail((function(e,t,n){return r.trigger(o,e,t,n)}))}},{key:"delete",value:function(e,t){var n=t.channel,r=t.successEvent,i=t.errorEvent;this.base(e,null,us.a.DELETE).done((function(e,t,i){return n.trigger(r,e,t,i)})).fail((function(e,t,r){return n.trigger(i,e,t,r)}))}},{key:"useMiddleware",value:function(e,t){this.successMiddleware[e]||(this.successMiddleware[e]=t)}},{key:"useErrorMiddleware",value:function(e,t){this.errorMiddleware[e]||(this.errorMiddleware[e]=t)}},{key:"parseError",value:function(e){var t=e.responseJSON,n=cs.a;switch(n.code=e.status,n.message=fs(this.dataServiceErrorMessageMappings,this.defaultErrorMessageKey,t),e.status){case 400:n.type=ls.a.BadRequest;break;case 401:n.type=ls.a.Unauthorized;break;case 403:n.type=ls.a.Forbidden;break;case 404:n.type=ls.a.NotFound;break;case 500:n.type=ls.a.InternalServer}return n}}])&&hs(t.prototype,n),r&&hs(t,r),o}(ss.Object);var bs=n(73),_s=n(86);function ws(e){return(ws="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 Ss(e){return function(e){if(Array.isArray(e))return Ts(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ts(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ts(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ts(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cs(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 ks(e,t){return(ks=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Es(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=As(e);if(t){var i=As(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Os(this,n)}}function Os(e,t){return!t||"object"!==ws(t)&&"function"!=typeof t?Ps(e):t}function Ps(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function As(e){return(As=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Is=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&&ks(e,t)}(o,e);var t,n,r,i=Es(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this,e),Ya.result(Ps(t),"name")||Qa.c.throw(new ie.a("Must provide a name when extending BaseDataService")),Ya.result(Ps(t),"channelName")||Qa.c.throw(new ie.a("Must provide a channelName for ".concat(Ya.result(Ps(t),"name"))));var n=[].concat(Ss(t.defaultProps),Ss(t.props||[]));return t.dataRequestSignatures={},t.mergeOptions(e,n),t}return t=o,(n=[{key:"defaultProps",get:function(){return["dataProvider","cache","bootstrapData","defaultErrorHandler","alertService"]}},{key:"getCursors",value:function(e){var t=this.cache.get(e);return t?t.cursors:{}}},{key:"clearCacheAndGet",value:function(e){var t=this,n=e.callback,r=e.errorCallback,i=e.eventPrefix,o=this.getEventNames(i),a=o.syncEvent,s=o.errorEvent,c=this.cache.get(i);if(c&&c.openRequest)return this.listenToOnce(this.getChannel(),a,(function(e){Ya.isFunction(r)&&t.stopListening(t.getChannel(),s,r),Ya.isFunction(n)&&n(e)})),void this.listenToOnce(this.getChannel(),s,(function(){Ya.isFunction(n)&&t.stopListening(t.getChannel(),a,n),Ya.isFunction(r)&&r()}));this.cache.remove(e.eventPrefix),this.get(e)}},{key:"get",value:function(e){var t=this,n=e.callback,r=e.errorCallback,i=e.eventPrefix,o=e.resource,a=e.formatData,s=e.expiryTime,c=e.successHandler,u=e.errorHandler,l=e.bootstrapName,f=this.getEventNames(i),p=f.syncEvent,h=f.requestEvent,d=f.successEvent,y=f.errorEvent,m=this.getChannel(),v=this.currentTimestamp();this.bootstrapData&&this.bootstrapData[l]&&(this.cacheData(i,this.bootstrapData[l],a,{openRequest:!1,timestamp:v}),delete this.bootstrapData[l]);var g,b=this.cache.get(i);b&&(g=b.data);var _=b&&b.openRequest,w=this.isExpired(i,s);if(_&&(this.listenToOnce(m,p,(function(e){Ya.isFunction(r)&&t.stopListening(t.getChannel(),y,r),Ya.isFunction(n)&&n(e)})),this.listenToOnce(m,y,(function(){Ya.isFunction(n)&&t.stopListening(t.getChannel(),p,n),Ya.isFunction(r)&&r()}))),this.cache.has(i)&&!w||(m.trigger(h),this.listenToResponse({eventPrefix:i,formatData:a,cacheOptions:{timestamp:v},callback:n,errorCallback:r,successHandler:c,errorHandler:u}),this.cacheData(i,null,null,{openRequest:!0,timestamp:v}),this.dataProvider.read(o,{channel:this.getTransportChannel(),successEvent:d,errorEvent:y})),g&&Ya.isFunction(n)&&!w&&n(g),g)return g}},{key:"create",value:function(e){var t=e.eventPrefix,n=e.resource,r=e.data,i=e.formatData,o=e.callback,a=e.errorCallback,s=e.invalidationKeys,c=e.successHandler,u=e.errorHandler,l=this.getEventNames(e.eventPrefix),f=l.requestEvent,p=l.successEvent,h=l.errorEvent,d=this.getChannel(),y=this.getTransportChannel();d.trigger(f),this.listenToResponse({eventPrefix:t,formatData:i,invalidationKeys:s,callback:o,errorCallback:a,successHandler:c,errorHandler:u}),this.dataProvider.create(n,r,{channel:y,successEvent:p,errorEvent:h})}},{key:"update",value:function(e){var t=e.data,n=e.callback,r=e.errorCallback,i=e.resource,o=e.formatData,a=e.eventPrefix,s=e.invalidationKeys,c=e.errorHandler,u=e.successHandler,l=this.getEventNames(e.eventPrefix),f=l.requestEvent,p=l.successEvent,h=l.errorEvent,d=this.getChannel(),y=this.getTransportChannel();d.trigger(f),this.listenToResponse({eventPrefix:a,formatData:o,invalidationKeys:s,callback:n,errorCallback:r,successHandler:u,errorHandler:c}),this.dataProvider.update(i,t,{channel:y,successEvent:p,errorEvent:h})}},{key:"delete",value:function(e){var t=e.eventPrefix,n=e.resource,r=e.callback,i=e.errorCallback,o=e.invalidationKeys,a=e.successHandler,s=e.errorHandler,c=this.getEventNames(t),u=c.successEvent,l=c.errorEvent,f=this.getTransportChannel();this.listenToResponse({eventPrefix:t,invalidationKeys:o,callback:r,errorCallback:i,cacheOptions:{noCache:!0,clearCacheKey:!0},successHandler:a,errorHandler:s}),this.dataProvider.delete(n,{channel:f,successEvent:u,errorEvent:l})}},{key:"listenToResponse",value:function(e){var t=this,n=e.eventPrefix,r=e.formatData,i=e.callback,o=e.errorCallback,a=e.successHandler,s=e.errorHandler,c=e.invalidationKeys,u=e.cacheOptions,l=void 0===u?{}:u,f=this.getEventNames(n),p=f.syncEvent,h=f.successEvent,d=f.errorEvent,y=f.successAlertEvent,m=f.errorAlertEvent,v=this.getChannel(),g=this.getTransportChannel(),b=this.getAlertChannel();Ya.isFunction(i)&&this.listenToOnce(v,p,i),Ya.isFunction(o)&&this.listenToOnce(v,d,o),this.stopListening(b,y),this.stopListening(b,m),Ya.isFunction(a)&&this.listenToOnce(b,y,a),Ya.isFunction(s)&&this.listenToOnce(b,m,s),!Ya.isFunction(s)&&!1!==s&&Ya.isFunction(this.defaultErrorHandler)&&this.listenToOnce(b,m,this.defaultErrorHandler),this.hasRequestSignature(n)||(this.setRequestSignature(n),this.listenTo(g,h,(function(e){t.stopListening(v,d,o);for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];b.trigger.apply(b,[y,e].concat(a));var u=l.noCache?t.formatData(e,r):t.cacheData(n,e,r);l.clearCacheKey&&t.cache.remove(n),v.trigger(p,u),c&&c.length&&t.cache.invalidate(c,(function(e){return v.trigger("".concat(e,":invalidate"))}))})),this.listenTo(g,d,(function(){var e;t.stopListening(v,p,i);var r=(e=t.dataProvider).parseError.apply(e,arguments);b.trigger(m,r),v.trigger(d,r),l.noCache||t.cacheData(n,null,null)})))}},{key:"cacheData",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.openRequest,o=void 0!==i&&i,a=r.timestamp;a||(a=this.currentTimestamp());var s=this.processPagination(t),c=this.formatData(t,n);return this.cache.set(e,{data:c,timestamp:a,cursors:s,openRequest:o}),c}},{key:"processPagination",value:function(e){if(e){var t=e.pagination;if(t)return t.cursors?t.cursors:Ya.isUndefined(t.offset)||Ya.isUndefined(t.pageSize)?t.page?this.convertLegacyPaginationToCursors(t):void 0:this.convertOffsetPaginationToCursors(t)}}},{key:"formatData",value:function(e,t){return Ya.isFunction(t)?t(e):e}},{key:"chain",value:function(){var e=this,t=[],n=function(e,t){Ya.isFunction(e)&&e(t)},r=function(r,o){return t.push((function(){var i=r.callback;r.callback=function(e){n(i,e),n(t.shift())},e[o](r)})),i},i={func:function(e){return t.push((function(){e(t.shift()||function(){})})),i},get:function(e){return r(e,"get")},create:function(e){return r(e,"create")},update:function(e){return r(e,"update")},delete:function(e){return r(e,"delete")},run:function(){n(t.shift())}};return i}},{key:"invalidateCache",value:function(e){e&&e.length&&this.cache.invalidate(e)}},{key:"currentTimestamp",value:function(){return(new Date).valueOf()}},{key:"isExpired",value:function(e,t){if(!t)return!1;var n=this.cache.get(e);if(!n||!n.timestamp)return!0;var r=1e3*t;return n.timestamp<this.currentTimestamp()-r}},{key:"getEventNames",value:function(e){return{syncEvent:"".concat(e,":sync"),requestEvent:"".concat(e,":request"),successEvent:"".concat(e,":success"),errorEvent:"".concat(e,":error"),successAlertEvent:"".concat(e,":success:alert"),errorAlertEvent:"".concat(e,":error:alert")}}},{key:"getTransportChannel",value:function(){return u.Radio.channel("".concat(this.channelName,":transport"))}},{key:"getAlertChannel",value:function(){return u.Radio.channel("".concat(this.channelName,":alert"))}},{key:"setRequestSignature",value:function(e){this.dataRequestSignatures[e]=e}},{key:"hasRequestSignature",value:function(e){return!!this.dataRequestSignatures[e]}},{key:"convertOffsetPaginationToCursors",value:function(e){var t=e.offset,n=e.pageSize,r=e.totalItems,i=r>0&&t<r&&t+n,o=r>0&&t>0&&Math.max(t-n,0),a={};if(i&&i<r&&(a.next=i.toString()),Ya.isNumber(o)&&(a.previous=o.toString()),!Ya.isEmpty(a))return a}},{key:"convertLegacyPaginationToCursors",value:function(e){var t=e.page,n=e.totalPages,r=Ya.isNumber(t)&&t>0&&t<n&&t+1,i=Ya.isNumber(t)&&t>1&&t-1,o={};if(r&&r<=n&&(o.next=r.toString()),i&&(o.previous=i.toString()),!Ya.isEmpty(o))return o}}])&&Cs(t.prototype,n),r&&Cs(t,r),o}(Xa.a),xs=n(33),Rs=600,Ls=n(66),js=n(47),Ns=n(202);function Ds(e){return(Ds="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 Bs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Us(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 Ms(e,t){return(Ms=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vs(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=Hs(e);if(t){var i=Hs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fs(this,n)}}function Fs(e,t){return!t||"object"!==Ds(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 Hs(e){return(Hs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zs=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&&Ms(e,t)}(o,e);var t,n,r,i=Vs(o);function o(){return Bs(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return xs.a.Language}},{key:"channelName",get:function(){return js.b.LANGUAGE}},{key:"getLanguageConfig",value:function(e){var t={locale:"",phrases:null};this.get({resource:"/api/locale",eventPrefix:Ls.a.LOCALE,expiryTime:Rs,bootstrapName:Ns.a.LOCALE,callback:function(n){t.locale=n,t.phrases&&Ya.isFunction(e)&&e(t)}}),this.get({resource:"/api/phrases",eventPrefix:Ls.a.PHRASES,expiryTime:Rs,bootstrapName:Ns.a.PHRASES,callback:function(n){t.phrases=n,t.locale&&Ya.isFunction(e)&&e(t)}})}}])&&Us(t.prototype,n),r&&Us(t,r),o}(Is);function Ws(e){return(Ws="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 qs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gs(e,t){return(Gs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ks(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=Xs(e);if(t){var i=Xs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ys(this,n)}}function Ys(e,t){return!t||"object"!==Ws(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 Xs(e){return(Xs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qs=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&&Gs(e,t)}(n,e);var t=Ks(n);function n(){return qs(this,n),t.apply(this,arguments)}return n}(r.a.Model);function $s(e){return($s="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 Zs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Js(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 ec(e,t){return(ec=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tc(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=rc(e);if(t){var i=rc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nc(this,n)}}function nc(e,t){return!t||"object"!==$s(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 rc(e){return(rc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ic=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&&ec(e,t)}(o,e);var t,n,r,i=tc(o);function o(){return Zs(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return xs.a.NotificationSocket}},{key:"channelName",get:function(){return js.b.NOTIFICATIONS_SOCKET}},{key:"receiveLatestNotifications",value:function(e){return this.get({callback:e,formatData:function(e){return new Qs(e)},resource:"notify",eventPrefix:"".concat(Ls.a.NOTIFICATIONS,":new")})}},{key:"receiveUnreadNotificationCount",value:function(e){return this.get({callback:e,resource:"notifyCount",eventPrefix:"".concat(Ls.a.NOTIFICATIONS,":count")})}}])&&Js(t.prototype,n),r&&Js(t,r),o}(Is),oc=n(56),ac=n(28),sc=n(155);function cc(e){return(cc="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 uc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lc(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 fc(e,t){return(fc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pc(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=dc(e);if(t){var i=dc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hc(this,n)}}function hc(e,t){return!t||"object"!==cc(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 dc(e){return(dc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yc=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&&fc(e,t)}(o,e);var t,n,r,i=pc(o);function o(){return uc(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"model",get:function(){return Qs}},{key:"parse",value:function(e){return e.data||e}}])&&lc(t.prototype,n),r&&lc(t,r),o}(r.a.Collection);function mc(e){return(mc="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 vc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gc(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 bc(e,t){return(bc=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=Sc(e);if(t){var i=Sc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wc(this,n)}}function wc(e,t){return!t||"object"!==mc(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 Sc(e){return(Sc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tc=function(e,t){var n="/api/domain/v2/objects/".concat(e,"/notifications?query={orderbydesc:datecreated}");if(!t)return n;var r=t.limit,i=t.cursor,o=t.before,a=[],s=ac.a.buildFilter({limit:r,before:o});return s&&a.push("filter=".concat(s)),i&&a.push("cursor=".concat(i)),a.length?"".concat(n,"&").concat(a.join("&")):n},Cc=function(e){return"/api/notifications/v1/notifications/".concat(e)},kc="/api/notifications/v1/notifications",Ec="/api/domain/v1/notifications",Oc=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&&bc(e,t)}(o,e);var t,n,r,i=_c(o);function o(){return vc(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return xs.a.Notification}},{key:"channelName",get:function(){return js.b.NOTIFICATIONS}},{key:"lang",get:function(){return"notifications.services"}},{key:"getNotifications",value:function(e,t,n,r){return this.get({resource:Tc(e,t),expiryTime:Rs,eventPrefix:n,formatData:function(e){return new yc(e,{parse:!0})},callback:r})}},{key:"markRead",value:function(e,t){return this.update({callback:t,data:{notificationStatus:sc.a.Read},resource:Cc(e),eventPrefix:"".concat(Ls.a.NOTIFICATIONS,":read")})}},{key:"markSeen",value:function(e){var t=oc().utc().toISOString();return this.update({callback:e,data:{notificationStatus:sc.a.Seen},resource:"".concat(kc,"?to=").concat(t,"&notificationStatus=").concat(sc.a.Received),eventPrefix:"".concat(Ls.a.NOTIFICATIONS,":seen")})}},{key:"getNotificationsCursors",value:function(e){return this.getCursors(e)}},{key:"suggestEdit",value:function(e,t){return this.create({resource:"".concat(Ec),eventPrefix:"".concat(Ls.a.SUGGEST_EDIT),callback:t,data:e,successHandler:this.alertService.success(q.a.getPhrase(this.lang,"suggestEditSubmit")),errorHandler:this.alertService.error({useXHR:!0})})}}])&&gc(t.prototype,n),r&&gc(t,r),o}(Is),Pc=n(230),Ac=n(26),Ic=n(280),xc=n(75),Rc=n(57),Lc=n(132),jc=n.n(Lc);function Nc(e){var t=e.alert,n=e.svgName,r=e.svgClassName,i=e.closeAlert,o=t.message,a=t.heading,c=t.appLink,u=t.appLinkText,l=t.appLinkClassName,f=void 0===l?"":l,p=Object(Ic.sanitize)(o);return s.createElement(s.Fragment,null,s.createElement("div",{className:"d-inline-block ".concat(jc.a.icon)},s.createElement(xc.a,{svgName:n,className:"svg-container ".concat(r)})),s.createElement("div",{className:"pl-2 d-inline-block ".concat(jc.a.alertContent)},s.createElement("p",{className:"p-0 m-0 pb-1 ".concat(jc.a.heading)},a),s.createElement("p",{className:"p-0 text-break clamp-4 ".concat(jc.a.message),dangerouslySetInnerHTML:{__html:p}}),!!c&&s.createElement(Rc.a,{className:f,appLink:c},u)),s.createElement("div",{className:"close d-inline-block cursor-pointer",role:"button",onClick:i},"×"))}function Dc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bc(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Uc=function(e){switch(e.type){case bs.a.Success:return Ac.b.CheckCircleOutline;case bs.a.Fail:case bs.a.Warning:return Ac.b.Warning;case bs.a.Info:default:return Ac.b.Info}};function Mc(e){var t=e.alert,n=e.closeAlert,r=Dc(s.useState(!0),2),i=r[0],o=r[1],a=s.useRef();s.useEffect((function(){i?a.current=window.setTimeout(n,3e3):clearTimeout(a.current)}),[i]);var c="text-".concat(t.type.toLowerCase());return s.createElement("li",{className:"bg-white mt-2 p-2 show clearfix ".concat(jc.a.alertItem),onMouseEnter:function(){return o(!1)},onMouseLeave:function(){return o(!0)}},s.createElement(Nc,{alert:t,svgName:Uc(t),svgClassName:c,closeAlert:n}))}function Vc(e){var t=e.alerts,n=e.removeAlert;return s.createElement("div",{className:jc.a.alertBox},s.createElement(Pc.TransitionGroup,{component:"ul",className:"".concat(jc.a.alertList," list-unstyled")},t&&t.map((function(e,t){return s.createElement(Pc.CSSTransition,{key:t,timeout:200,classNames:"alert"},s.createElement(Mc,{alert:e,closeAlert:function(){return n(e.id)}}))}))))}function Fc(e){return(Fc="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 Hc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zc(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 Wc(e,t){return(Wc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qc(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=Kc(e);if(t){var i=Kc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gc(this,n)}}function Gc(e,t){return!t||"object"!==Fc(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 Kc(e){return(Kc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yc=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&&Wc(e,t)}(o,e);var t,n,r,i=qc(o);function o(){return Hc(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return xs.a.User}},{key:"channelName",get:function(){return js.b.USER}},{key:"getCurrentUser",value:function(e,t){return this.get({resource:"/api/currentuser",eventPrefix:Ls.a.CURRENT_USER,expiryTime:Rs,callback:e,errorCallback:t})}},{key:"getWorkspace",value:function(e,t){return this.get({resource:"/api/domain/v2/me/workspace?query=categorytree",eventPrefix:Ls.a.WORKSPACE,expiryTime:Rs,callback:e,errorCallback:t})}}])&&zc(t.prototype,n),r&&zc(t,r),o}(Is),Xc=(xs.a.User,js.b.USER,xs.a.User,"".concat(Ls.a.CURRENT_USER,":sync"),n(212)),Qc=n(18);function $c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Zc=function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"?query=").concat(Qc.b.SERIES),key:"series:".concat(e),success:t}},Jc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,o;return t=e,(n=[{key:"name",get:function(){return xs.a.Series}},{key:"channelName",get:function(){return js.b.SERIES}},{key:"getSeries",value:function(e,t){var n=Zc(e,(function(e){return t&&t(new r.a.Model(e))})),o=i.a.getResponse(this.store.getState(),n.key);o.shouldFetch&&i.a.fetch(this.store.dispatch,n);var a=o.data?new r.a.Model(o.data):null;return t&&a&&t(a),a}}])&&$c(t.prototype,n),o&&$c(t,o),e}(),eu=n(38);function tu(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)}}var nu=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,r;return t=e,(n=[{key:"name",get:function(){return eu.a.FlightUser}},{key:"getCurrentUser",value:function(e,t){i.a.hooklessFetch(this.store,o.a.currentUser(e,t))}},{key:"getToken",value:function(e,t){i.a.hooklessFetch(this.store,o.a.token(e,t))}},{key:"getWorkspace",value:function(e,t){i.a.hooklessFetch(this.store,o.a.workspace(e,t))}},{key:"getPermissions",value:function(e,t){i.a.hooklessFetch(this.store,o.a.permissions(e,t))}}])&&tu(t.prototype,n),r&&tu(t,r),e}(),ru=n(114);function iu(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)}}var ou=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,r;return t=e,(n=[{key:"name",get:function(){return eu.a.FlightConfig}},{key:"getConfig",value:function(e,t){i.a.hooklessFetch(this.store,ru.a.config(e,t))}},{key:"getVersion",value:function(e,t){i.a.hooklessFetch(this.store,ru.a.version(e,t))}}])&&iu(t.prototype,n),r&&iu(t,r),e}();function au(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)}}var su=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,r;return t=e,(n=[{key:"name",get:function(){return eu.a.FlightShare}},{key:"getShareLink",value:function(e,t,n){i.a.hooklessFetch(this.store,Yt.a.getShareObject(e,t,n))}}])&&au(t.prototype,n),r&&au(t,r),e}();function cu(e){return("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uu(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 lu(e,t){return(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fu(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=hu(e);if(t){var i=hu(this).constructor;Reflect.construct(r,arguments,i)}else r.apply(this,arguments);return pu(this,n)}}function pu(e,t){return!t||"object"!==cu(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 hu(e){return(Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Qa.a;function du(e){return(du="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 yu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mu(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 vu(e,t){return(vu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gu(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=_u(e);if(t){var i=_u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bu(this,n)}}function bu(e,t){return!t||"object"!==du(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 _u(e){return(_u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wu=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&&vu(e,t)}(o,e);var t,n,r,i=gu(o);function o(){return yu(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return"AlertError"}}])&&mu(t.prototype,n),r&&mu(t,r),o}(r.a.SilentError),Su=n(124),Tu=n(352),Cu=n(353),ku=n(370),Eu=n(371),Ou=n(516),Pu=n(517);function Au(e){ue.a.getInstance(_s.a.ALERT).createAlert({heading:Xc.a.Fail,type:bs.a.Fail,message:e.message})}function Iu(e){u.Radio.channel("error:view").replyOnce("current:error",(function(){return e})),r.a.AppLinkHelper.trigger({application:P.a.DEFAULT,action:R.a.Default.NOT_FOUND})}function xu(e){u.Radio.channel("error:view").replyOnce("current:error",(function(){return e})),r.a.AppLinkHelper.trigger({application:P.a.DEFAULT,action:R.a.Default.ERROR})}function Ru(e){u.Radio.channel("error:view").replyOnce("current:error",(function(){return e})),r.a.AppLinkHelper.trigger({application:P.a.DEFAULT,action:R.a.Default.DIALOG_ERROR})}function Lu(e){u.Radio.channel("error:view").replyOnce("current:error",(function(){return e})),r.a.AppLinkHelper.trigger({application:P.a.SHARE,action:R.a.Share.SHARE_LINK_ERROR})}function ju(e){u.Radio.channel("error:view").replyOnce("current:error",(function(){return e})),r.a.AppLinkHelper.trigger({application:P.a.EMBED,action:R.a.Embed.EMBED_ERROR})}var Nu=n(89),Du=n(77);function Bu(e){return(Bu="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 Uu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mu(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 Vu(e,t){return(Vu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fu(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=zu(e);if(t){var i=zu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hu(this,n)}}function Hu(e,t){return!t||"object"!==Bu(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 zu(e){return(zu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wu=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&&Vu(e,t)}(o,e);var t,n,r,i=Fu(o);function o(){return Uu(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"isReactComponent",value:function(e){return s&&s.isValidElement(e)}},{key:"showChildView",value:function(e,t){this.isReactComponent(t)&&this.showChildReactComponent(e,t)}},{key:"showChildReactComponent",value:function(e,t){var n=this;this.isAttached()?this.renderChildReactComponent(e,t):this.listenToOnce(this,"attach",(function(){return n.renderChildReactComponent(e,t)}))}},{key:"renderChildReactComponent",value:function(e,t){var n=this.getRegion(e),r=this.$el.find(n.el);r&&r.length&&(n.trigger("before:show"),Nu.render(t,r[0],(function(){return n.trigger("show")})),this.listenToOnce(this,"unmount:".concat(e),(function(){return Nu.unmountComponentAtNode(r[0])})),this.listenToOnce(this,"before:destroy",(function(){return Nu.unmountComponentAtNode(r[0])})))}},{key:"wrapWithStore",value:function(e){return s.createElement(Du.Provider,{store:this.options.store},e)}}])&&Mu(t.prototype,n),r&&Mu(t,r),o}(n(275).a),qu=n(714),Gu=n(143),Ku=n(76),Yu=n(180),Xu=n(278),Qu=n(35);var $u=n(184),Zu=n(36),Ju=n(375),el=n(362),tl=n(300),nl=n(102),rl=n(716),il=n.n(rl),ol=n(288),al=n.n(ol);function sl(e){return(sl="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 cl(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 ul(e,t){return(ul=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ll(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=pl(e);if(t){var i=pl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fl(this,n)}}function fl(e,t){return!t||"object"!==sl(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 pl(e){return(pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hl=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&&ul(e,t)}(o,e);var t,n,r,i=ll(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"name",get:function(){return"NotificationStatusComponent"}},{key:"className",get:function(){return"notification-status mx-2 ".concat(al.a.notificationIcon," ").concat(al.a[this.options.color])}},{key:"template",get:function(){return il.a}},{key:"initialize",value:function(){this.listenTo(this.model,"change:unreadCount",this.render)}},{key:"viewOptions",value:function(){return{styles:al.a,svg:Ac.a.getSvg(Ac.b.Bell),unreadCount:this.model.get("unreadCount")}}}])&&cl(t.prototype,n),r&&cl(t,r),o}(r.a.Component),dl=n(279),yl=n(518),ml=n(706),vl=n(720),gl=n.n(vl),bl=n(527),_l=n.n(bl),wl=n(528),Sl=n.n(wl);function Tl(e){return(Tl="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 Cl(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 kl(e,t){return(kl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function El(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=Pl(e);if(t){var i=Pl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ol(this,n)}}function Ol(e,t){return!t||"object"!==Tl(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 Pl(e){return(Pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Al=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&&kl(e,t)}(o,e);var t,n,r,i=El(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"name",get:function(){return"NotificationPopoverView"}},{key:"title",get:function(){return!1}},{key:"lang",get:function(){return"notifications.notificationsPopover"}},{key:"className",get:function(){return"notifications-container"}},{key:"template",get:function(){return gl.a}},{key:"regions",value:function(){return{notifications:{replaceElement:!0,el:".list-region",partialLoading:{component:yl.a.ComponentCollection,options:{collectionLength:5,childOptions:{template:_l.a,className:"px-1 py-2",viewOptions:{styles:Sl.a}}}}}}}},{key:"elements",get:function(){return{anchor:".see-all"}}},{key:"appLinks",get:function(){return{"@ui.anchor":this.appVariables.appLinks.notifications}}},{key:"initialize",value:function(){this.notificationService=ue.a.getInstance(xs.b.Notification,this),this.appVariables=ue.a.getInstance(nl.a.NOTIFICATIONS,this)}},{key:"onData",value:function(e){this.collection=e,this.render()}},{key:"getCollectionIdentifier",value:function(){return this.collectionIdentifier?this.collectionIdentifier:this.collectionIdentifier=new ml.a({collectionPrefix:Ls.a.NOTIFICATIONS})}},{key:"renderNotificationList",value:function(){var e=new dl.b({collection:this.collection,childType:this.options.childType,isPopover:!0});this.showChildView("notifications",e)}},{key:"triggerSeen",value:function(){this.notificationService.markNotificationsSeen()}},{key:"onBeforeRender",value:function(){var e=this;return this.collection||this.notificationService.getNotifications(null,this.getCollectionIdentifier(),(function(t){return e.onData(t)})),!!this.collection}},{key:"viewOptions",value:function(){return{hasNotifications:this.collection&&this.collection.length}}},{key:"onRender",value:function(){this.renderNotificationList(),this.triggerSeen()}}])&&Cl(t.prototype,n),r&&Cl(t,r),o}(r.a.View),Il=n(721),xl=n.n(Il),Rl=n(337),Ll=n.n(Rl);function jl(e){return(jl="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 Nl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dl(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 Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ul(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=Vl(e);if(t){var i=Vl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ml(this,n)}}function Ml(e,t){return!t||"object"!==jl(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 Vl(e){return(Vl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fl=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&&Bl(e,t)}(o,e);var t,n,r,i=Ul(o);function o(){return Nl(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"initialize",value:function(){this.appVariables=ue.a.getInstance(nl.a.NOTIFICATIONS)}},{key:"name",get:function(){return"NotificationHeaderView"}},{key:"title",get:function(){return!1}},{key:"className",get:function(){return"d-flex align-items-center position-relative ".concat(Ll.a.noPopoverArrow)}},{key:"template",get:function(){return xl.a}},{key:"regions",value:function(){return{status:{el:".notifications-status-region",replaceElement:!1},notifications:{el:".notifications-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .notifications-status-region":"renderNotificationList"}}},{key:"renderNotificationList",value:function(){var e=new Al({childType:dl.a.Popover});this.showChildView("notifications",e)}},{key:"renderNotificationStatus",value:function(){var e=ue.a.getInstance(xs.b.Notification),t=new hl({model:e.getNotificationsMetadata(),color:this.appVariables.bellIconColor});this.showChildView("status",t)}},{key:"viewOptions",value:function(){return Ll.a}},{key:"onRender",value:function(){this.renderNotificationStatus()}}])&&Dl(t.prototype,n),r&&Dl(t,r),o}(r.a.View),Hl=n(295),zl=n(91),Wl=n(347),ql=n(90),Gl=n(41),Kl=n(350),Yl=n(239),Xl=function(e,t){return{url:"{gateway}/v1/users/me/products",key:"user:products",normalizeOptions:{namespace:"product"},success:e,error:t}},Ql=n(710),$l=q.a.encloseNamespace("shared.userOptions");var Zl=n(338),Jl=n.n(Zl);function ef(e){return function(e){if(Array.isArray(e))return tf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tf(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var nf,rf=q.a.encloseNamespace("shared.userOptions");function of(e){var t,n=i.a.useBasicFetch(o.a.currentUser(),{optimize:!0}),r=i.a.useBasicFetch(ru.a.config(),{optimize:!0}),c=function(e,t,n){var r=Object(ql.a)().hasPermissions,i=Wt.a.sortBy(n,"order");return e&&t?(i.push({label:$l("helpCentre"),order:0,url:Ql.a.getArticle(t.supportSiteUrl,null,null==e?void 0:e.countryCode)}),r(a.a.ViewProductBoard)&&i.push({label:$l("featureRequests"),order:0,url:t.productBoardUrl}),i):i}(n.data,r.data,e.items),u=function(e,t){var n,r=i.a.useBasicFetch(o.a.currentUser()),a=i.a.useBasicFetch((null===(n=r.data)||void 0===n?void 0:n.isAuthenticated)&&Xl());if(!t&&a.data){var s=ef(a.data);return Wt.a.sortBy(s.filter((function(t){return t.id!==e})),"order")}}(e.productId,e.hideProductList);return n.hasCompleted&&r.data?(null===(t=n.data)||void 0===t?void 0:t.isAuthenticated)?s.createElement(Gl.Dropdown,{className:"cursor-pointer position-relative"},s.createElement(Gl.Dropdown.Toggle,{as:"div",id:"userOptions",className:"".concat(Jl.a.avatarContainer," no-caret")},s.createElement(Kl.a,{imageUrl:n.data.avatar,imageCdnUrl:r.data.imageCdnUrl,initials:Yl.a.getInitials(n.data.givenName,n.data.familyName)})),s.createElement(Gl.Dropdown.Menu,{as:"ul",align:"right"},s.createElement(Gl.Dropdown.Item,{as:"div"},s.createElement("div",{className:"m-0 d-flex flex-wrap"},s.createElement("strong",null,n.data.displayName)," ",s.createElement("span",{className:"text-muted"},"(",n.data.username,")")),s.createElement("div",{className:"m-0 text-muted"},n.data.customerName)),s.createElement(Gl.Dropdown.Divider,null),c.map((function(e,t){return e.appLink?s.createElement(Gl.Dropdown.Item,{key:t,as:Rc.a,appLink:e.appLink,openInNewTab:e.openInNewTab,className:"d-flex justify-content-between"},e.label,!!e.openInNewTab&&s.createElement(xc.a,{svgName:Ac.b.NewWindow,className:"svg-container text-muted"})):e.url?s.createElement(Gl.Dropdown.Item,{key:t,as:"a",href:e.url,target:"_blank",className:"d-flex justify-content-between"},e.label,s.createElement(xc.a,{svgName:Ac.b.NewWindow,className:"svg-container text-muted"})):s.createElement(s.Fragment,null)})),s.createElement(Gl.Dropdown.Divider,null),null==u?void 0:u.map((function(e,t){return s.createElement(Gl.Dropdown.Item,{key:t,as:"a",href:e.url,target:"_blank",className:"d-flex align-items-center py-1"},s.createElement("img",{src:e.imageUrl,className:"".concat(Jl.a.productLogo," mr-2")}),e.name)})),!!(null==u?void 0:u.length)&&s.createElement(Gl.Dropdown.Divider,null),s.createElement(Gl.Dropdown.Item,{as:Rc.a,appLink:e.appLinks.logOut},rf("signOut")))):s.createElement(Rc.a,{appLink:e.appLinks.logIn,className:"btn btn-dark mr-2"},rf("logIn")):s.createElement(s.Fragment,null)}!function(e){e.Analytics="analytics",e.LibraryEditor="manage",e.Online="online",e.Primary="lite"}(nf||(nf={}));var af=n(125),sf=n(235),cf=n(158);function uf(e){var t=s.useRef(null),n=s.useCallback((function(e){e&&(t.current=e)}),[]),r=function(){t.current.value=null,t.current.click(null)};return s.createElement(s.Fragment,null,e.svgName?s.createElement(cf.a,{svgName:e.svgName,className:e.className,onClick:r},e.children):s.createElement("button",{type:"button",className:e.className,onClick:r},e.children),s.createElement("input",{type:"file",autoComplete:"off",className:"file-select d-none",multiple:!!e.acceptMultiple,accept:e.mimeType,ref:n,onChange:function(t){return e.onFileSelect(t.target.files)}}))}uf.defaultProps={className:"btn btn-primary"};var lf=n(357),ff=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];s.useEffect((function(){return e.on(t,n),function(){e.off(t,n)}}),r)},pf=n(54),hf=n(252);function df(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yf(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mf(){var e=df(c.a.useState(0),2),t=e[0],n=e[1],r=Object(Gu.a)(eu.b.CombineUploads),i=function(){var e=r.getCollection().filter((function(e){return e.get("status")!==hf.b.Errored}));n(e.length)};return c.a.useEffect(i,[]),ff(u.Radio.channel(js.c.VIDEO_UPLOAD),pf.a.FILES_ADDED,i),ff(u.Radio.channel(P.b.COMBINE_UPLOADS),pf.a.PROCESSING_CANCELLED,i),ff(u.Radio.channel(js.c.VIDEO_UPLOAD),pf.a.UPLOAD_CANCELLED,i),ff(u.Radio.channel(P.b.COMBINE_UPLOADS),pf.a.PROCESSING_FAILED,i),t}var vf=n(339),gf=n.n(vf);function bf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wf=s.memo((function(e){var t,n=e.hideButtonText,r=void 0!==n&&n,i=bf(Object(lf.a)(),2),o=i[0],a=i[1],c=Object(Gu.a)(eu.b.VideoUpload),u=mf(),l=!!u&&!a;return s.createElement(uf,{svgName:l?null:Ac.b.Upload,className:(t="btn btn-outline-dark",r&&!l&&(t+=" pl-3"),l&&(t+=" pr-2"),t),mimeType:"video/*",onFileSelect:function(e){return c.addFiles(e,{entity:k.EntityType.Video,actionType:k.UserAction.Upload,workflowPhase:k.WorkflowPhase.Start,descriptor:Qu.a.mapInteractionType(k.InteractionType.FileSelect),location:k.LocationContext.TopNav})}},s.createElement("div",{className:"d-flex align-items-center w-100",ref:o},l&&s.createElement("span",{className:"position-relative"},s.createElement(Gl.Spinner,{animation:"border",size:"sm",className:"mr-2 ".concat(gf.a.spinner)}),s.createElement("span",{className:"badge badge-danger badge-pill ".concat(gf.a.totalUploading)},u)),r?s.createElement("span",{className:"invisible"}," "):s.createElement(sf.b,{phrase:"uploadVideo",namespace:"shared.uploadFileSelect"})))})),Sf=n(67),Tf=n(379),Cf=n(197),kf=n(340),Ef=n.n(kf);function Of(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pf(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Af(){var e,t,n=z.a.getCurrentRoute().appLink;return Cf.a.isSearchAppLink(n)&&null!==(t=null===(e=n.params)||void 0===e?void 0:e.query)&&void 0!==t?t:""}var If=c.a.memo((function(e){var t,n=c.a.useMemo(Af,[]),i=Of(c.a.useState(n),2),o=i[0],a=i[1],s=Of(c.a.useState(!1),2),l=s[0],f=s[1],h=Of(Object(Ku.a)(ce.a.SHOW_SEARCH_MASK,!1),2),d=h[0],y=h[1],m=Object(Tf.a)(o,300),v=z.a.getCurrentRoute().appLink,g=Cf.a.isSearchAppLink(v),b=Cf.a.useReferrerAppLink();function _(e){var t=function(e){var t;if(null==o?void 0:o.trim())return!0;var n=null===(t=e)||void 0===t?void 0:t.tagOrClassification;return Array.isArray(n)?!!n.length:!!n}(e);if(!t&&g)return y(!0),void window.setTimeout((function(){y(!1),r.a.AppLinkHelper.trigger(b,{replace:!0})}),200);t&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i={};t=n?Sf.a.omit(t,["query"]):{},e&&(i.query=e.trimLeft()),Object.keys(t).length&&(i=Object.assign(Object.assign({},i),t)),r.a.AppLinkHelper.trigger({application:P.a.SEARCH,action:R.a.Search.HOME,params:i},{replace:n})}(o,e,g)}return c.a.useEffect((function(){(g||o)&&(l?window.setTimeout((function(){return f(!1)}),0):g||!o||d||y(!0))}),[null==o?void 0:o.trim(),l]),c.a.useEffect((function(){_(v.params)}),[null===(t=v.params)||void 0===t?void 0:t.tagOrClassification]),c.a.useEffect((function(){var e=Object.assign({},v.params);m.trim()&&(null==e?void 0:e.tagOrClassification)&&delete e.tagOrClassification,_(e)}),[m]),ff(u.Radio.channel(p.a.SHELL),r.a.EventNames.URL_CHANGE,(function(e){var t,n;e||(e=z.a.getCurrentRoute().appLink),o&&!Cf.a.isSearchAppLink(e)&&(f(!0),a("")),Cf.a.isSearchAppLink(e)&&(null===(t=e.params)||void 0===t?void 0:t.query)!==!o&&a(null!==(n=e.params.query)&&void 0!==n?n:"")}),[o,a]),c.a.createElement("form",{className:"form-control p-0 pl-1 d-flex align-items-center ".concat(Ef.a.invisibleBorder),onSubmit:function(e){return e.preventDefault()}},c.a.createElement(xc.a,{svgName:Ac.b.Search}),c.a.createElement("input",{type:"text",className:"".concat(Ef.a.invisibleBorder," w-100 h-100 outline-none"),placeholder:q.a.getPhrase("search.liteSearchBar","placeholder"),onChange:function(e){var t;return a(null!==(t=e.target.value)&&void 0!==t?t:"")},value:o,autoComplete:"off",spellCheck:!1,"aria-label":"Search"}),e.showCloseButton&&c.a.createElement(cf.a,{svgName:Ac.b.Close,onClick:e.onClickClose,className:"btn btn-link"}))})),xf=q.a.encloseNamespace("liteShared.header");var Rf=n(133),Lf=n.n(Rf);function jf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nf(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Df(e){var t=Object(ql.a)().hasPermissions,n=Object(zl.a)(Zu.a.SMDown),r=n?Lf.a.logoContainerSm:Lf.a.logoContainerLg,i=null;return e.isLink&&(i=t(a.a.StudentExperience)?{application:P.a.STUDENT_FEED,action:R.a.StudentFeed.HOME}:{application:P.a.DASHBOARD,action:R.a.Dashboard.HOME}),s.createElement(Rc.a,{appLink:i,className:"navbar-brand text-hide align-top ".concat(r," d-inline-block'")},n?s.createElement(Hl.d,null):s.createElement(Hl.a,null))}function Bf(e){var t=jf(s.useState(!1),2),n=t[0],c=t[1],u=i.a.useBasicFetch(o.a.currentUser(),{optimize:!0}).data,l=i.a.useBasicFetch(ru.a.config(),{optimize:!0}),f=Object($u.a)(),p=Object(zl.a)(Zu.a.SMDown),h=Object(zl.a)(Zu.a.MDDown),d=Object(zl.a)(Zu.a.LGDown),y=function(){var e=Object(af.b)().isPlugin,t={application:P.a.DEFAULT,action:R.a.Default.LOG_IN},n=r.a.AppLinkHelper.getHref(r.a.AppLinkHelper.getCurrentAppLink());return"/"!==n&&(t.params={redirectUrl:n}),{logIn:t,logOut:{application:P.a.DEFAULT,action:R.a.Default.LOG_OUT,params:e?{redirectUrl:"/plugin"}:null}}}(),m=function(e,t,n){var r=Object(ql.a)().hasPermissions;if(!e||!t||!n)return[];var i=[{label:xf("settings"),order:5,appLink:{application:P.a.SETTINGS,action:R.a.Settings.HOME}}];return r(a.a.StudentExperience)||i.push.apply(i,[{label:xf("shares"),order:0,appLink:{application:P.a.DEFAULT,action:R.a.Default.SHARED_BY_ME}}]),r(a.a.StudentExperience)&&i.push.apply(i,[{label:xf("joinClassroom"),order:1,appLink:{application:P.a.LAUNCHPAD,action:R.a.Launchpad.JOIN_CLASSROOM_PROMPT}}]),i}(u,l.data,e.showNav),v=Object(af.b)().isPlugin;s.useEffect((function(){!h&&n&&c(!1)}),[h,f,n]);var g=e.showNav&&!v,b=e.showNav&&!v&&!p;return s.createElement("nav",{className:"navbar navbar-expanded w-100 ".concat(Lf.a.nav)},!n&&s.createElement("div",{className:"d-flex align-items-center justify-content-start ".concat(Lf.a.headerLeft)},e.showNav&&s.createElement(xc.a,{svgName:Ac.b.Hamburger,className:"".concat(Lf.a.hamburger," ml-1 mr-3"),onClick:e.toggleLeftNav}),s.createElement(Df,{isLink:e.showNav})),e.showNav?h&&!n?s.createElement(Wl.a,{className:"ml-auto mr-3",onClick:function(){return c(!0)}},s.createElement(xc.a,{svgName:Ac.b.Search})):s.createElement("div",{className:"".concat(Lf.a.searchBarContainer," ").concat(n?"px-3 pl-0":"")},s.createElement("div",{className:"container ".concat(Lf.a.searchBarPadding," ").concat(n?"px-0":"")},s.createElement("div",{className:"".concat(Lf.a.searchBar," border border-dark")},s.createElement(If,{showCloseButton:n,onClickClose:function(){return c(!1)}})))):s.createElement(s.Fragment,null),!n&&s.createElement("div",{className:"d-flex align-items-center justify-content-end ".concat(Lf.a.actionButtons)},b&&s.createElement("div",{className:"mr-3"},s.createElement(wf,{hideButtonText:d})),g&&s.createElement(Xr,{view:Fl,className:"mx-n2 pr-3"}),!!l.data&&s.createElement("span",{className:"mr-3"},s.createElement(of,{productId:nf.Primary,appLinks:y,items:m,hideProductList:v}))))}var Uf,Mf=n(96);!function(e){e.Discover="Discover",e.Playlists="Playlists",e.MyVideos="MyVideos",e.Favourites="Favourites",e.WatchHistory="WatchHistory",e.Classrooms="Classrooms",e.Classroom="Classroom",e.Libraries="Libraries",e.StudentFeed="StudentFeed"}(Uf||(Uf={}));var Vf,Ff=n(299),Hf=n(355),zf=n(244),Wf=n(97),qf=n(48),Gf=n(40),Kf=n.n(Gf);function Yf(e){var t=Object(af.b)().isPlugin,n=e.collapsed&&e.active,r="".concat(Kf.a.leftNavAnchor," ").concat(e.className," ");return r+=e.active?Kf.a.active:Kf.a.iconGrey,!e.collapsed&&e.active&&(r+=" "+Kf.a.bgGrey),c.a.createElement(Rc.a,{className:r,appLink:e.appLink},c.a.createElement("span",{className:"".concat(Kf.a.leftNavIcon," position-relative")},!!e.svgName&&c.a.createElement(xc.a,{svgName:e.svgName,size:t?xc.b.Medium:xc.b.ExtraLarge}),!!e.imageUrl&&c.a.createElement("span",{className:Kf.a.imageContainer},c.a.createElement("img",{src:Wf.a.createUrl(e.imageUrl,{size:qf.b.Small}),className:"img-fluid rounded-circle"})),e.showRedDot),c.a.createElement("span",{className:"".concat(Kf.a.leftNavText," ").concat(n?Kf.a.highlightText:"")},e.name),e.showRedDot&&c.a.createElement("span",{className:"".concat(Kf.a.redDot," bg-danger rounded-circle ").concat(e.collapsed?Kf.a.collapsed:Kf.a.expanded)}))}function Xf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qf,$f=q.a.encloseNamespace("shared.leftNav"),Zf=(Xf(Vf={},Uf.Discover,{application:P.a.DASHBOARD,action:R.a.Dashboard.HOME}),Xf(Vf,Uf.Playlists,{application:P.a.PLAYLISTS,action:R.a.Playlists.HOME}),Xf(Vf,Uf.MyVideos,{application:P.a.DEFAULT,action:R.a.Default.MY_VIDEOS}),Xf(Vf,Uf.Favourites,{application:P.a.DEFAULT,action:R.a.Default.FAVOURITES}),Xf(Vf,Uf.Classrooms,{application:P.a.CLASSROOMS,action:R.a.Classrooms.HOME}),Xf(Vf,Uf.Classroom,{application:P.a.CLASSROOMS,action:R.a.Classrooms.CLASSROOM}),Xf(Vf,Uf.WatchHistory,{application:P.a.WATCH_HISTORY,action:R.a.WatchHistory.HOME}),Xf(Vf,Uf.Libraries,{application:P.a.LIBRARIES,action:R.a.Libraries.LIBRARY}),Xf(Vf,Uf.StudentFeed,{application:P.a.STUDENT_FEED,action:R.a.StudentFeed.HOME}),Vf);function Jf(e){var t=e.activeItem,n=e.dynamicActiveId,r=e.favouritedClassrooms,i=e.hideClassrooms,o=Object(ql.a)().hasPermissions,s=!!mf();return c.a.createElement("nav",{className:"".concat(Kf.a.leftNav," ").concat(Kf.a.leftNavExpanded)},c.a.createElement(zf.Scrollbars,{className:"h-100"},c.a.createElement("div",{className:"pt-3"},o(a.a.StudentExperience)&&c.a.createElement(Yf,{key:Uf.StudentFeed,name:$f("home"),appLink:Zf[Uf.StudentFeed],className:Kf.a.studentFeed,svgName:Ac.b.House,active:t===Uf.StudentFeed}),c.a.createElement(Yf,{key:Uf.Discover,name:$f("discover"),appLink:Zf[Uf.Discover],className:Kf.a.discover,svgName:Ac.b.Compass,active:t===Uf.Discover}),c.a.createElement(Yf,{key:Uf.Playlists,name:$f("playlists"),appLink:Zf[Uf.Playlists],className:Kf.a.playlists,svgName:Ac.b.Playlist,active:t===Uf.Playlists}),c.a.createElement(Yf,{key:Uf.MyVideos,name:$f("myVideos"),appLink:Zf[Uf.MyVideos],className:Kf.a.myVideos,svgName:Ac.b.Video,active:t===Uf.MyVideos,showRedDot:s}),c.a.createElement(Yf,{key:Uf.Favourites,name:$f("favourites"),appLink:Zf[Uf.Favourites],className:Kf.a.favourites,svgName:Ac.b.HeartOutline,active:t===Uf.Favourites}),!o(a.a.StudentExperience)&&c.a.createElement(Yf,{key:Uf.WatchHistory,name:$f("watchHistory"),appLink:Zf[Uf.WatchHistory],className:Kf.a.watchHistory,svgName:Ac.b.History,active:t===Uf.WatchHistory}),!o(a.a.StudentExperience)&&c.a.createElement("hr",{className:"my-2"}),!o(a.a.StudentExperience)&&!!e.libraries.length&&c.a.createElement(c.a.Fragment,null,e.libraries.length>1&&c.a.createElement("h6",{className:"m-b-2 pl-3"},$f("libraries")),e.libraries.map((function(e){var r,i,o,a,s;return c.a.createElement(Yf,{key:e.id,name:e.name,appLink:Object.assign(Object.assign({},Zf[Uf.Libraries]),{args:[e.id,it.a.slugify(e.name)]}),className:Kf.a.library,imageUrl:null===(i=null===(r=e.owner)||void 0===r?void 0:r.logo)||void 0===i?void 0:i.url,svgName:!(null===(a=null===(o=e.owner)||void 0===o?void 0:o.logo)||void 0===a?void 0:a.url)&&Ac.b.Library,active:t===Uf.Libraries&&(null===(s=e.id)||void 0===s?void 0:s.toString())===(null==n?void 0:n.toString())})})),c.a.createElement("hr",{className:"my-2"})),!i&&c.a.createElement(c.a.Fragment,null,c.a.createElement(Yf,{key:Uf.Classrooms,name:$f("classrooms"),appLink:Zf[Uf.Classrooms],className:Kf.a.classrooms,svgName:Ac.b.Classrooms,active:t===Uf.Classrooms}),(null==r?void 0:r.length)?r.map((function(e){var r;return c.a.createElement(Yf,{key:e.id,name:e.name,appLink:Object.assign(Object.assign({},Zf[Uf.Classroom]),{args:[e.id]}),className:Kf.a.classroom,svgName:Ac.b.StarOutline,active:t===Uf.Classroom&&(null===(r=e.id)||void 0===r?void 0:r.toString())===(null==n?void 0:n.toString())})})):c.a.createElement(c.a.Fragment,null)))))}function ep(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tp,np,rp=q.a.encloseNamespace("shared.leftNav"),ip=(ep(Qf={},Uf.Discover,{application:P.a.DASHBOARD,action:R.a.Dashboard.HOME}),ep(Qf,Uf.Playlists,{application:P.a.PLAYLISTS,action:R.a.Playlists.HOME}),ep(Qf,Uf.MyVideos,{application:P.a.DEFAULT,action:R.a.Default.MY_VIDEOS}),ep(Qf,Uf.Favourites,{application:P.a.DEFAULT,action:R.a.Default.FAVOURITES}),ep(Qf,Uf.WatchHistory,{application:P.a.WATCH_HISTORY,action:R.a.WatchHistory.HOME}),ep(Qf,Uf.StudentFeed,{application:P.a.STUDENT_FEED,action:R.a.StudentFeed.HOME}),Qf);function op(e){var t=e.activeItem,n=Object(ql.a)().hasPermissions,r=Object(af.b)().isPlugin,i=!!mf(),o="".concat(Kf.a.leftNav," ").concat(Kf.a.leftNavCollapsed);return r&&(o+=" ".concat(Kf.a.pluginLeftNav)),c.a.createElement("nav",{className:o},c.a.createElement(zf.Scrollbars,{height:"100%"},c.a.createElement("div",{className:r?"pt-1":"pt-3"},n(a.a.StudentExperience)&&c.a.createElement(Yf,{key:Uf.StudentFeed,name:rp("home"),appLink:ip[Uf.StudentFeed],className:Kf.a.studentFeed,svgName:Ac.b.House,active:t===Uf.StudentFeed,collapsed:!0}),c.a.createElement(Yf,{key:Uf.Discover,name:rp("discover"),appLink:ip[Uf.Discover],className:Kf.a.discover,svgName:Ac.b.Compass,active:t===Uf.Discover,collapsed:!0}),c.a.createElement(Yf,{key:Uf.Playlists,name:rp("playlists"),appLink:ip[Uf.Playlists],className:Kf.a.playlists,svgName:Ac.b.Playlist,active:t===Uf.Playlists,collapsed:!0}),c.a.createElement(Yf,{key:Uf.MyVideos,name:rp("myVideos"),appLink:ip[Uf.MyVideos],className:Kf.a.myVideos,svgName:Ac.b.Video,active:t===Uf.MyVideos,collapsed:!0,showRedDot:i}),c.a.createElement(Yf,{key:Uf.Favourites,name:rp("favourites"),appLink:ip[Uf.Favourites],className:Kf.a.favourites,svgName:Ac.b.HeartOutline,active:t===Uf.Favourites,collapsed:!0}),!n(a.a.StudentExperience)&&c.a.createElement(Yf,{key:Uf.WatchHistory,name:rp("watchHistory"),appLink:ip[Uf.WatchHistory],className:Kf.a.watchHistory,svgName:Ac.b.History,active:t===Uf.WatchHistory,collapsed:!0}))))}function ap(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.Open=0]="Open",e[e.Collapsed=1]="Collapsed",e[e.Hidden=2]="Hidden"}(np||(np={}));var up=(cp(tp={},Uf.Discover,Mf.a.getDiscoverAppLinks()),cp(tp,Uf.Playlists,Mf.a.getPlaylistAppLinks()),cp(tp,Uf.MyVideos,Mf.a.getMyVideosAppLinks()),cp(tp,Uf.Favourites,Mf.a.getFavouritesAppLinks()),cp(tp,Uf.WatchHistory,Mf.a.getWatchHistoryAppLinks()),cp(tp,Uf.Classrooms,Mf.a.getClassroomsAppLinks()),cp(tp,Uf.Classroom,Mf.a.getClassroomAppLinks()),cp(tp,Uf.Libraries,Mf.a.getLibrariesAppLinks()),cp(tp,Uf.StudentFeed,Mf.a.getStudentFeedAppLinks()),tp);function lp(e){var t,n,r,s,u,l=ap(c.a.useState(null),2),f=l[0],p=l[1],h=i.a.useBasicFetch(o.a.currentUser()),d=i.a.useBasicFetch(h.data&&Hf.a.getPinnedClassrooms(h.data.id)),y=i.a.useBasicFetch(Ff.a.sharedLibraries());i.a.useBasicFetch(!!(null===(t=y.data)||void 0===t?void 0:t.length)&&Ff.a.librariesWithOwnerLogos(y.data.map((function(e){return e.id}))));var m=Object(ql.a)().hasPermissions;if(c.a.useEffect((function(){if(e.appLinkIsRoute){var t=null;Object.keys(up).find((function(n){t||up[n].find((function(t){return t.application===e.activeAppLink.application&&t.action===e.activeAppLink.action}))&&(t=Uf[n])})),p(t)}}),[e.activeAppLink]),e.navState===np.Hidden)return c.a.createElement(c.a.Fragment,null);var v=(null===(n=e.activeAppLink)||void 0===n?void 0:n.args)&&e.activeAppLink.args[0];return e.navState===np.Collapsed?c.a.createElement(op,{activeItem:f}):c.a.createElement(Jf,{activeItem:f,dynamicActiveId:v,favouritedClassrooms:null!==(s=null===(r=d.data)||void 0===r?void 0:r.data)&&void 0!==s?s:[],libraries:null!==(u=y.data)&&void 0!==u?u:[],hideClassrooms:!m(a.a.ViewClassrooms)})}var fp=n(209),pp=n(42),hp=n(121),dp=n(359),yp=n(210),mp=n(534),vp=n(383),gp=n(225),bp=n(349),_p=n(377),wp=n(354),Sp=n(292),Tp=n.n(Sp);function Cp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ep(e){if(e.shareId)return{application:P.a.SHARE,action:R.a.Share.VIEW_SHARE_LINK,args:[e.shareId]};var t={};return e.contextId&&e.context&&(t.contextId=e.contextId,t.context=e.context),wp.a.getAppLink(e.video,t)}function Op(){var e,t=Cp(Object(Ku.a)(ce.a.WEB_PLAYER_DATA),1)[0];return s.createElement("h2",{className:"mb-0 h6 w-100"},pp.a.isVideo(t.video)&&pp.a.hasSeries(t.video)&&s.createElement(dp.b,{className:"d-block",video:t.video,appLink:(e=t.video.series,{application:P.a.DEFAULT,action:R.a.Default.SERIES,args:[e.id,it.a.slugify(e.name)]}),analyticsOptions:{location:k.LocationContext.FloatingPlayer}}),s.createElement(Rc.a,{appLink:!t.isOnPlayPage&&Ep(t)},t.video.name))}function Pp(){var e,t,n;Object(mp.a)();var a=Cp(Object(Ku.a)(ce.a.WEB_PLAYER_DATA),2),c=a[0],u=a[1],l=Object(bp.a)(k.LocationContext.FloatingPlayer),f=Object(_p.a)(k.LocationContext.FloatingPlayer),p=i.a.useBasicFetch(o.a.currentUser());i.a.useBasicFetch((null===(e=p.data)||void 0===e?void 0:e.isAuthenticated)&&(null==c?void 0:c.video)?gp.a.isFavourited(p.data.id,[c.video.id]):null);var h=yp.a.canFavourite(c.video),d=yp.a.isFavouritedByCurrentUser(c.video),y=(null===(t=p.data)||void 0===t?void 0:t.isAuthenticated)&&pp.a.isVideo(c.video);return(null==c?void 0:c.video)&&(null==c?void 0:c.viewKey)?s.createElement(s.Fragment,null,s.createElement(fp.a,{node:c.portalNode},(c.isOnPlayPage||c.showFloatingPlayer)&&s.createElement(vp.a,{viewKey:c.viewKey,startTime:c.startTime,playerApiUrl:c.playerApiUrl,webPlayerUrl:c.webPlayerUrl,videoId:c.video.id,onExitPictureInPicture:function(){r.a.AppLinkHelper.trigger(Ep(c))},onClickCreateClip:y&&function(){y&&r.a.AppLinkHelper.trigger({application:P.a.DEFAULT,action:R.a.Default.CREATE_CLIP,args:[c.video.id]})},autoplay:!0,canFavourite:h,favourited:d,onClickFavourite:function(){var e=!d;l(c.video,e,(function(){u("video",e?Object.assign(Object.assign({},c.video),{favouritedBy:{data:[p.data]}}):Object.assign(Object.assign({},c.video),{favouritedBy:{data:[]}}))}))},activityStatus:c.activityStatus,onSetActivityStatus:function(){var e=c.activityStatus===hp.a.Complete?hp.a.Incomplete:hp.a.Complete;f(c.shareId,c.video,e),u("activityStatus",e)},allowPip:null===(n=p.data)||void 0===n?void 0:n.isAuthenticated,onError:function(){r.a.ErrorHelper.throw(new H.a)}})),s.createElement("div",{className:Tp.a.floatingPlayer},s.createElement(Pc.CSSTransition,{timeout:400,in:c.showFloatingPlayer,classNames:"floating-player"},s.createElement("div",{className:"d-none shadow"},c.showFloatingPlayer&&s.createElement(fp.b,{node:c.portalNode}),s.createElement("div",{className:"p-2 bg-white d-flex justify-content-between align-items-center"},s.createElement(Op,null),s.createElement("span",{className:"".concat(Tp.a.buttons," flex-shrink-1")},s.createElement("span",{className:"cursor-pointer ml-1 float-right",role:"button",tabIndex:0,onClick:function(){Qu.a.logUserAction({id:c.video.id},{location:k.LocationContext.FloatingPlayer,entity:pp.a.getAnalyticsEntity(c.video),actionType:k.UserAction.Click,descriptor:k.ClickDescriptor.Close}),u("showFloatingPlayer",!1)}},s.createElement(xc.a,{svgName:Ac.b.Close})),s.createElement(Rc.a,{appLink:Ep(c),onClick:function(){u("showFloatingPlayer",!1),Qu.a.logUserAction({id:c.video.id},{location:k.LocationContext.FloatingPlayer,entity:pp.a.getAnalyticsEntity(c.video),actionType:k.UserAction.Click,descriptor:k.ClickDescriptor.Open})}},!c.isOnPlayPage&&s.createElement(xc.a,{svgName:Ac.b.NewWindow,className:"".concat(Tp.a.flippedIcon," d-inline-block svg-container float-right")})))))))):s.createElement(s.Fragment,null)}var Ap=n(234),Ip=n.n(Ap);function xp(){return s.createElement(s.Fragment,null,s.createElement("div",{className:Ip.a.dropMask}),s.createElement("div",{className:Ip.a.dropContent},s.createElement("div",{className:Ip.a.border},s.createElement("h1",null,s.createElement(sf.b,{namespace:"shared.dragMask",phrase:"message"})))),s.createElement("div",{className:Ip.a.dropArea}))}var Rp=n(113),Lp=n.n(Rp);function jp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Np(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Np(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Np(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Bp(e){return e!==Zu.a.XL&&e!==Zu.a.XXL}var Up=function(e){var t,n=e.showNav,r=e.contentChild,a=e.popupChild,c=e.alertChild,u=e.hiddenChild,l=e.activeAppLink,f=e.appLinkIsRoute,p=jp(s.useState(!1),2),h=p[0],d=p[1];Object(el.a)(),function(){function e(n){"Tab"===n.key&&(document.body.classList.add("user-is-tabbing"),window.removeEventListener("keydown",e),window.addEventListener("mousedown",t))}function t(){document.body.classList.remove("user-is-tabbing"),window.removeEventListener("mousedown",t),window.addEventListener("keydown",e)}Object(s.useEffect)((function(){return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}}),[])}();var y=i.a.useBasicFetch(o.a.currentUser());y.data&&!y.data.isAuthenticated&&(n=!1),Object(Xu.b)((null===(t=y.data)||void 0===t?void 0:t.isAuthenticated)?eu.b.CombineUploads:null);var m=Object($u.a)(),v=m===Zu.a.XS,g=m===Zu.a.SM,b=m===Zu.a.XXL,_=jp(Object(Ku.a)(ce.a.WEB_PLAYER_DATA),1)[0],w=jp(Object(Ku.a)(ce.a.SHOW_SEARCH_MASK),1)[0],S=jp(Object(Ku.a)(ce.a.LAYOUT_CONTAINER_FLUID,Bp(m)),2),T=S[0],C=S[1],E=Object(Ju.b)().enabled;s.useEffect((function(){d(!b)}),[b]),s.useEffect((function(){C(Bp(m))}),[m]);var O=Object(af.b)().isPlugin,P=function(e,t,n,r,i){var o=i?Lp.a.pluginCollapsedNavContent:Lp.a.collapsedNavContent;return r?t?{state:e?np.Hidden:np.Open,showMask:!e,contentClass:Lp.a.hiddenNavContent}:n?{state:e?np.Collapsed:np.Open,showMask:!e,contentClass:o}:{state:e?np.Collapsed:np.Open,showMask:!1,contentClass:e?o:Lp.a.openNavContent}:{state:np.Hidden,showMask:!1,contentClass:Lp.a.hiddenNavContent}}(h,v,g,n,O),A=Object(Gu.a)(eu.b.VideoUpload),I=s.useCallback((function(e){E&&A.addFiles(e,{entity:k.EntityType.Video,actionType:k.UserAction.Upload,workflowPhase:k.WorkflowPhase.Start,descriptor:Qu.a.mapInteractionType(k.InteractionType.DragDrop),location:k.LocationContext.VideoUpload})}),[E]),x=Object(qu.useDropzone)({onDrop:I,noClick:!0,noKeyboard:!0,disabled:O}),R=x.getRootProps,L=x.getInputProps,j=x.isDragActive,N="d-flex flex-column align-items-end",D="";return(null==_?void 0:_.showFloatingPlayer)?N+=" ".concat(Lp.a.fixedBottomRightContainer):D=Lp.a.fixedBottomRightContainer,s.createElement("div",Object.assign({},R()),s.createElement(Bf,{toggleLeftNav:function(){d(!h)},showNav:n}),n&&s.createElement(lp,{navState:P.state,activeAppLink:l,appLinkIsRoute:f}),s.createElement("div",{className:"".concat(Lp.a.content," ").concat(P.contentClass)},s.createElement("div",{className:"container-fluid ".concat("banner-portal-container")}),s.createElement("div",{className:"".concat(T?"container-fluid":"container")},r)),a,P.showMask&&s.createElement("div",{className:"modal-backdrop show ".concat(Lp.a.mask)}),s.createElement("div",{className:"".concat(Lp.a.searchMask," ").concat(w?Lp.a.show:""," modal-backdrop")}),s.createElement("div",{className:N},!!c&&s.createElement("div",{className:D},c),s.createElement(Pp,null)),j&&E&&s.createElement(xp,null),s.createElement("input",Object.assign({},L())),s.createElement("div",{style:{display:"none"}},u))};function Mp(e){var t=e.provider,n=Dp(e,["provider"]);return t?s.createElement(Du.Provider,{store:e.store},s.createElement(Yu.b,{defaultTitle:""},s.createElement(tl.b,{containerClassName:"banner-portal-container"},s.createElement(t,null,s.createElement(Up,Object.assign({},n)))))):s.createElement(Du.Provider,{store:e.store},s.createElement(Yu.b,{defaultTitle:""},s.createElement(tl.b,{containerClassName:"banner-portal-container"},s.createElement(Up,Object.assign({},n)))))}var Vp=n(735),Fp=n.n(Vp);function Hp(e){return(Hp="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 zp(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 Wp(e,t,n){return(Wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Yp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function qp(e,t){return(qp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gp(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=Yp(e);if(t){var i=Yp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kp(this,n)}}function Kp(e,t){return!t||"object"!==Hp(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 Yp(e){return(Yp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xp=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&&qp(e,t)}(a,e);var t,n,i,o=Gp(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).childComponents={},t.preventScrollTop=!1,t}return t=a,i=[{key:"getCacheKey",value:function(e){var t;return"".concat(E,":").concat(e.showNav,":").concat(null===(t=e.provider)||void 0===t?void 0:t.name)}}],(n=[{key:"initialize",value:function(){var e,t=this;this.activeAppLink=null===(e=z.a.getCurrentContext())||void 0===e?void 0:e.appLink,this.appLinkIsRoute=!0,this.listenTo(p.a.SHELL,r.a.EventNames.ROUTE,this.onRouteChange),this.listenTo(p.a.SHELL,"prevent:scroll:top",(function(){return t.preventScrollTop=!0}))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"TeacherLayoutView"}},{key:"template",get:function(){return Fp.a}},{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{showNav:this.options.showNav,contentChild:this.childComponents[et],popupChild:this.childComponents[tt],alertChild:this.childComponents[nt],hiddenChild:this.childComponents[rt],store:this.options.store,activeAppLink:this.activeAppLink,appLinkIsRoute:this.appLinkIsRoute,provider:this.options.provider}}},{key:"onRouteChange",value:function(e,t){this.activeAppLink=e,this.appLinkIsRoute=t.isAppRoute}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(tt)}},{key:"showChildView",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.childComponents[e]=t,e===et&&(this.preventScrollTop||n.preventScrollTop||$(window).scrollTop(0),this.preventScrollTop=!1),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());Wp(Yp(a.prototype),"showChildView",this).call(this,"layout",s.createElement(Mp,Object.assign({},e)))}}])&&zp(t.prototype,n),i&&zp(t,i),a}(Wu);function Qp(e){var t=e.contentChild;return s.createElement(s.Fragment,null,t)}function $p(e){var t=e.store;return s.createElement(Du.Provider,{store:t},s.createElement(Yu.b,{defaultTitle:""},s.createElement(Qp,Object.assign({},e))))}var Zp=n(736),Jp=n.n(Zp);function eh(e){return(eh="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 th(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nh(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 rh(e,t,n){return(rh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=sh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ih(e,t){return(ih=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oh(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=sh(e);if(t){var i=sh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ah(this,n)}}function ah(e,t){return!t||"object"!==eh(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 sh(e){return(sh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ch=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&&ih(e,t)}(o,e);var t,n,r,i=oh(o);function o(){var e;return th(this,o),(e=i.apply(this,arguments)).childComponents={},e}return t=o,r=[{key:"getCacheKey",value:function(){return O}}],(n=[{key:"title",get:function(){return!1}},{key:"name",get:function(){return"SimpleLayoutView"}},{key:"template",get:function(){return Jp.a}},{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{contentChild:this.childComponents[et],store:this.options.store}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(tt)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderLayout()}},{key:"renderLayout",value:function(){rh(sh(o.prototype),"showChildView",this).call(this,"layout",s.createElement($p,Object.assign({},this.getChildComponents())))}}])&&nh(t.prototype,n),r&&nh(t,r),o}(Wu);function uh(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)}}var lh=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=t}var t,n,r;return t=e,(n=[{key:"increment",value:function(){this.value+=1}},{key:"decrement",value:function(){this.value-=1}},{key:"getValue",value:function(){return this.value}}])&&uh(t.prototype,n),r&&uh(t,r),e}(),fh=n(111),ph=n(228);function hh(e){return(hh="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 dh(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 yh(e,t){return(yh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mh(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=gh(e);if(t){var i=gh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vh(this,n)}}function vh(e,t){return!t||"object"!==hh(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 gh(e){return(gh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bh=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&&yh(e,t)}(o,e);var t,n,r,i=mh(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).viewObjects={},e}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return"ViewModelService"}},{key:"updateViewModel",value:function(e,t){var n=this.mergeData(t,e.toJSON());return e instanceof ph.a&&e.set(n,{silent:!0}),e instanceof fh.a&&!(e instanceof ph.a)&&e.set(n,{silent:!0}),e}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.update,i=void 0!==r&&r,o=this.viewObjects[e];if(o&&i)return this.updateViewModel(o,t);if(o)return o;var a=this.getLocalData(e,n);return this.set(e,t,a,n)}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=r.ctor,o=r.storage,a=this.mergeData(t,n),s=i?new i(a):new fh.a(a);return this.viewObjects[e]=s,o&&!n?(this.setLocalData(e,s,null,r),this.setupChangeListeners(e,s,r)):o&&n&&this.setupChangeListeners(e,s,r),s}},{key:"clear",value:function(e){var t=this.viewObjects[e];return!!t&&(this.stopListening(t),t.trigger("destroy"),delete this.viewObjects[e],!0)}},{key:"getLocalData",value:function(e,t){var n=t.storage;if(n)return this.getStorageHelper(n.type).get(e)}},{key:"setLocalData",value:function(e,t,n,r){var i,o=r.storage;!o||o&&!o.persistProps||("string"==typeof o.persistProps&&(o.persistProps=[o.persistProps]),t instanceof fh.a&&(i=t.pick(o.persistProps)),this.getStorageHelper(o.type).set(e,i))}},{key:"setupChangeListeners",value:function(e,t,n){var r=this,i=n.storage;!i||i&&!i.persistProps||("string"==typeof i.persistProps&&(i.persistProps=[i.persistProps]),Ya.each(i.persistProps,(function(i){r.listenTo(t,"change:".concat(i),Ya.partial(r.setLocalData,e,Ya,Ya,n))})))}},{key:"mergeData",value:function(e,t){return t?Ya.isObject(e)&&Ya.isObject(t)?Ya.extend(e,t):void Qa.c.throw(new ie.a("defaultValues and existingData are not of the same datatype and cannot be merged")):e}},{key:"getStorageHelper",value:function(e){switch(e){case ae.c.LocalStorage:return ae.a;case ae.c.SessionStorage:return ae.b}}}])&&dh(t.prototype,n),r&&dh(t,r),o}(Xa.a).Instance;function _h(e){return(_h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(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 Th(e,t,n){return t&&Sh(e.prototype,t),n&&Sh(e,n),e}function Ch(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&&kh(e,t)}function kh(e,t){return(kh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eh(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=Ph(e);if(t){var i=Ph(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oh(this,n)}}function Oh(e,t){return!t||"object"!==_h(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 Ph(e){return(Ph=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ah,Ih=function(e){Ch(n,e);var t=Eh(n);function n(){return wh(this,n),t.apply(this,arguments)}return Th(n,[{key:"idAttribute",get:function(){return"masterVideoId"}}]),n}(r.a.Model),xh=function(e){Ch(n,e);var t=Eh(n);function n(){return wh(this,n),t.apply(this,arguments)}return Th(n,[{key:"model",get:function(){return Ih}}]),n}(r.a.Collection),Rh=n(156),Lh=n(186);function jh(e){return(jh="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 Nh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dh(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 Bh(e,t){return(Bh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uh(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=Vh(e);if(t){var i=Vh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mh(this,n)}}function Mh(e,t){return!t||"object"!==jh(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 Vh(e){return(Vh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fh=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&&Bh(e,t)}(a,e);var t,n,i,o=Uh(a);function a(){return Nh(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"name",get:function(){return xs.b.PendingItems}},{key:"channelName",get:function(){return js.c.PENDING_ITEMS}},{key:"initialize",value:function(){this.videoDataService=ue.a.getInstance(xs.a.Video,this),this.videoUploadDataService=ue.a.getInstance(xs.a.VideoUpload,this)}},{key:"clearPendingItem",value:function(e,t){var n=this;switch(e.get("pendingProcessStatus")){case Rh.a.Completed:case Rh.a.Error:this.videoUploadDataService.clearPendingItems([e.get("pendingProcessId")],(function(){e.set("clearing",!0),e.collection.remove(e),n.updateViewModel(),n.videoDataService.clearVideoCache(),Ya.isFunction(t)&&t()}));break;case Rh.a.Processing:this.videoUploadDataService.cancelPendingItems([e.get("pendingProcessId")],(function(){e.set("clearing",!0),e.collection.remove(e),n.videoDataService.clearVideoCache(),n.updateViewModel(),Ya.isFunction(t)&&t()}))}}},{key:"forceFetchPendingItems",value:function(e){this.fetchPendingItems(e)}},{key:"retryPendingItem",value:function(e,t){var n=this;this.videoUploadDataService.retryPendingItems([e.get("pendingProcessId")],(function(){n.fetchPendingItems({resetTimeout:!1,callback:t})}))}},{key:"itemStatusChanged",value:function(){u.Radio.channel(this.channelName).trigger(pf.a.PENDING_ITEM_STATUS_CHANGE),this.videoDataService.clearVideoCache()}},{key:"getPendingItems",value:function(){var e=this;return this.pendingItems||(this.pendingItems=new xh,this.listenTo(this.pendingItems,"change:foregroundComplete",(function(t){t.get("foregroundComplete")&&(e.itemStatusChanged(),t.get("video")&&u.Radio.channel(e.channelName).trigger(pf.a.PENDING_ITEM_READY_TO_WATCH,t))})),this.listenTo(this.pendingItems,"remove",(function(t){t.get("clearing")||e.videoUploadDataService.getPendingItem(t.get("pendingProcessId"),(function(t){t.get("status")===Rh.a.Completed&&e.itemStatusChanged()}))})),window.setTimeout((function(){e.fetchPendingItems()}),200)),this.pendingItems}},{key:"fetchPendingItems",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{resetTimeout:!0};this.isDestroyed()||this.videoUploadDataService.getPendingItems((function(n){var i=Ya.map(n,(function(e){return e.masterVideoId.toString()})),o=function(r){Ya.each(n,(function(e){var t=r.get(e.masterVideoId);t&&(e.video=t,e.foregroundProgress>=100&&t.get("status")===Lh.a.Processing&&t.set("status",Lh.a.Published))})),e.pendingItems.set(n),e.updateViewModel(),t.resetTimeout&&(window.clearTimeout(Ah),Ah=window.setTimeout((function(){return e.fetchPendingItems()}),e.getTimeoutLength())),Ya.isFunction(t.callback)&&t.callback()};i.length?e.videoDataService.getVideos(i,o):o(new r.a.Collection)}))}},{key:"updateViewModel",value:function(){var e=bh.get("process:progress");if(this.pendingItems&&this.pendingItems.length){var t=this.pendingItems.where((function(e){return e.get("pendingProcessStatus")>=0})),n=0;Ya.each(t,(function(e){return n+=e.get("foregroundProgress")}));var r=100*t.length;e.set({progress:Math.round(n/r*100),items:this.pendingItems.length,hasErrors:this.pendingItems.length!==t.length})}else e.set({progress:0,items:0})}},{key:"getTimeoutLength",value:function(){return this.pendingItems.any((function(e){return e.get("pendingProcessStatus")===Rh.a.Processing}))?5e3:3e4}}])&&Dh(t.prototype,n),i&&Dh(t,i),a}(r.a.Service),Hh=n(282);function zh(e){return(zh="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 Wh(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 qh(e,t){return(qh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gh(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=Yh(e);if(t){var i=Yh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kh(this,n)}}function Kh(e,t){return!t||"object"!==zh(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 Yh(e){return(Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xh=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&&qh(e,t)}(o,e);var t,n,r,i=Gh(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this)}return t=o,(n=[{key:"name",get:function(){return xs.b.Notification}},{key:"initDataServices",value:function(){this.notificationDataService=ue.a.getInstance(xs.a.Notification,this),this.notificationSocketService=ue.a.getInstance(xs.a.NotificationSocket,this),this.userDataService=ue.a.getInstance(xs.a.User,this),this.bindSocketListeners(),this.bindAppListeners()}},{key:"bindSocketListeners",value:function(){var e=Ls.a.NOTIFICATIONS;this.listenTo(js.b.NOTIFICATIONS_SOCKET,"".concat(e,":new:sync"),this.addNewNotification),this.listenTo(js.b.NOTIFICATIONS_SOCKET,"".concat(e,":count:sync"),this.updateUnreadCount),this.listenTo(js.b.NOTIFICATIONS,"".concat(e,":seen"),this.updateUnreadCount)}},{key:"bindAppListeners",value:function(){this.listenTo(js.a.NOTIFICATIONS,Hh.a.Read,this.markNotificationRead)}},{key:"getDataServices",value:function(){this.dataServicesExist()||this.initDataServices()}},{key:"dataServicesExist",value:function(){return!!this.notificationSocketService&&!!this.notificationDataService}},{key:"addNewNotification",value:function(e){var t=this;this.userDataService.getCurrentUser((function(n){t.notificationDataService.getNotifications(n.id,null,Ls.a.NOTIFICATIONS,(function(t){t.add(e,{at:0})}))}))}},{key:"updateUnreadCount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=bh.get(Ls.a.NOTIFICATIONS);t.set("unreadCount",e)}},{key:"getNotifications",value:function(e,t,n){var r=this;this.getDataServices(),this.notificationSocketService.receiveLatestNotifications(),this.userDataService.getCurrentUser((function(i){r.notificationDataService.getNotifications(i.id,e,t.toString(),n)}))}},{key:"getNotificationsMetadata",value:function(){return this.getDataServices(),this.notificationSocketService.receiveUnreadNotificationCount(),bh.get(Ls.a.NOTIFICATIONS)}},{key:"markNotificationsSeen",value:function(){this.notificationDataService.markSeen()}},{key:"markNotificationRead",value:function(e){this.notificationDataService.markRead(e)}},{key:"getNotificationsCursors",value:function(e){return this.notificationDataService.getNotificationsCursors(e.toString())}}])&&Wh(t.prototype,n),r&&Wh(t,r),o}(r.a.Service),Qh=n(112);function $h(e){return($h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zh(e){return function(e){if(Array.isArray(e))return Jh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Jh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ed(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 td(e,t){return(td=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nd(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=id(e);if(t){var i=id(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rd(this,n)}}function rd(e,t){return!t||"object"!==$h(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 id(e){return(id=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function od(e){return(od="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 ad(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sd(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 cd(e,t){return(cd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ud(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=fd(e);if(t){var i=fd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ld(this,n)}}function ld(e,t){return!t||"object"!==od(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 fd(e){return(fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pd=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&&cd(e,t)}(o,e);var t,n,r,i=ud(o);function o(){return ad(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return as.Notifications}}])&&sd(t.prototype,n),r&&sd(t,r),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&&td(e,t)}(o,e);var t,n,r,i=nd(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).subscribeEvent="subscribe",t.reconnectTimeout=5e3,t.reconnectAttempts=100,t.reconnectTries=0,t.connection=t.createConnection(e),t.authEndpoint=e.authEndpoint,t.setProviderOptions(e),t.attachSocketEvents(),!1===e.lazy&&t.openConnection(),t}return t=o,(n=[{key:"setProviderOptions",value:function(e){e.subscribeEvent&&(this.subscribeEvent=e.subscribeEvent),e.reconnectTimeout&&(this.reconnectTimeout=e.reconnectTimeout),e.reconnectAttempts&&(this.reconnectAttempts=e.reconnectAttempts)}},{key:"openConnection",value:function(){if(!this.isConnectedOrConnecting())return this.setConnectionState(Qh.b.Connecting),this.connect()}},{key:"connect",value:function(){var e=this;return $.when(this.getConnectionToken(),this.connection.start()).then((function(t){return e.start.apply(e,t)}),(function(t){return e.onConnectionError.apply(e,t)}))}},{key:"start",value:function(e){var t=this;return this.connection.invoke(this.subscribeEvent,e.token).then((function(){return t.setConnectionState(Qh.b.Connected)})).catch((function(e){return t.onConnectionError(e)}))}},{key:"stop",value:function(){if(this.isConnectedOrConnecting())return this.connection.stop()}},{key:"attachSocketEvents",value:function(){var e=this;this.connection.onclose((function(){return e.onConnectionError})),this.connection.onreconnected((function(){return e.onReconnect}))}},{key:"onReconnect",value:function(){this.reconnectTries=0}},{key:"onConnectionError",value:function(e){var t=this;e?console.log("Connection Error. Reason: ".concat(e)):console.log("Connection Error."),this.setConnectionState(Qh.b.Disconnected),!this.reconnectAttempts||this.reconnectTries>=this.reconnectAttempts||setTimeout((function(){return t.reconnectTries++,t.openConnection()}),this.reconnectTimeout||5e3)}},{key:"createConnection",value:function(e){var t=new Qh.a,n=ac.a.removeTrailingSlash(e.endpoint),r="".concat(n,"/hubs/").concat(e.hubName),i={logger:Qh.c.Error};return e.logging&&(i.logger=Qh.c.Debug),t.withUrl(r,i).build()}},{key:"getConnectionToken",value:function(){var e={url:this.authEndpoint,method:"POST",type:"POST"};return $.ajax(e)}},{key:"setConnectionState",value:function(e){e===Qh.b.Connected&&console.log("Connected!"),e===Qh.b.Disconnected&&console.log("Disconnected!"),this.connectionState=e}},{key:"isConnectedOrConnecting",value:function(){return this.connectionState===Qh.b.Connecting||this.connectionState===Qh.b.Connected||this.connectionState===Qh.b.Reconnecting}},{key:"create",value:function(e,t,n){this.openConnection(),this.rpc(e,t,n)}},{key:"read",value:function(e,t){this.openConnection(),this.subscribe(e,t)}},{key:"update",value:function(e,t,n){this.openConnection(),this.rpc(e,t,n)}},{key:"delete",value:function(e,t){this.openConnection(),this.rpc(e,null,t)}},{key:"parseError",value:function(){return cs.a}},{key:"rpc",value:function(e,t,n){var r=n.channel,i=n.successEvent,o=n.errorEvent;this.connection.invoke(e,t).then((function(e){return r.trigger.apply(r,[i].concat(Zh(e)))})).catch((function(e){return r.trigger.apply(r,[o].concat(Zh(e)))}))}},{key:"subscribe",value:function(e,t){var n=t.channel,r=t.successEvent;this.connection.on(e,(function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.trigger.apply(n,[r].concat(t))}))}}])&&ed(t.prototype,n),r&&ed(t,r),o}(ss.Object));function hd(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)}}var dd=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,o;return t=e,(n=[{key:"name",get:function(){return eu.a.Video}},{key:"clearVideoCache",value:function(){this.store.dispatch({type:i.a.Actions.INVALIDATE,keys:["video"],request:null})}},{key:"getVideos",value:function(e,t){var n=Tr.a.videos(e,(function(e){qr.a.isFunction(t)&&t(new r.a.Collection(e))}));return i.a.hooklessFetch(this.store,n),null}}])&&hd(t.prototype,n),o&&hd(t,o),e}();function yd(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)}}var md,vd,gd=function(e,t){return{url:"/api/domain/v2/process?".concat(e.map((function(e){return"pendingProcessId=".concat(e)}))),key:"pending:clear:".concat(e.join(",")),success:t,normalize:!1,type:us.a.DELETE}},bd=function(e,t){return{url:"/api/domain/v2/process/cancel?".concat(e.map((function(e){return"pendingProcessId=".concat(e)}))),key:"pending:cancel:".concat(e.join(",")),success:t,normalize:!1,type:us.a.DELETE}},_d=function(e,t){return{url:"/api/domain/v2/process/retry?".concat(e.map((function(e){return"pendingProcessId=".concat(e)}))),key:"pending:retry:".concat(e.join(",")),success:t,normalize:!1,type:us.a.POST}},wd=function(e,t){return{url:"/api/domain/v2/process/".concat(e),key:"pending:item:".concat(e),success:t,normalize:!1}},Sd=function(e){return{url:"/api/domain/v2/process?destination=2&status=1&status=-1",key:"pending",success:e,normalize:!1}},Td=function(e,t){return{url:"/api/upload/complete",key:"complete:upload:".concat(e.id),type:us.a.POST,success:t,data:e}},Cd=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,o;return t=e,(n=[{key:"name",get:function(){return eu.a.VideoUpload}},{key:"clearPendingItems",value:function(e,t){i.a.fetch(this.store.dispatch,gd(e,t))}},{key:"cancelPendingItems",value:function(e,t){i.a.fetch(this.store.dispatch,bd(e,t))}},{key:"retryPendingItems",value:function(e,t){i.a.fetch(this.store.dispatch,_d(e,t))}},{key:"getPendingItem",value:function(e,t){i.a.fetch(this.store.dispatch,wd(e,(function(e){t(new r.a.Model(e))})))}},{key:"getPendingItems",value:function(e){var t=Sd(e);i.a.ajaxRequest({resource:t.url,type:us.a.GET,success:e,error:function(){}})}},{key:"completeVideoUpload",value:function(e,t){i.a.fetch(this.store.dispatch,Td(e,t))}}])&&yd(t.prototype,n),o&&yd(t,o),e}();!function(e){e[e.Upload=1]="Upload",e[e.Tv=2]="Tv"}(md||(md={})),function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(vd||(vd={}));var kd=["pdf"],Ed=["doc","docx","dotx","dot","rtf","docm","odt"],Od=["csv","txt"],Pd=["xls","xlt","xlsx"],Ad=["jpg","tif","png","bmp","gif","jpeg"],Id=["zip","rar"],xd=["ppt","pot","pps","pptx"],Rd=["srt"],Ld={IMAGES:".".concat(Ad.join(",.")),RESOURCES:".".concat([].concat(Ed,Pd,xd,kd,Od,Ad,Id).join(",.")),SUBTITLES:".".concat(Rd.join(",."))};function jd(e){return(jd="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 Nd(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 Dd(e,t){return(Dd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bd(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=Md(e);if(t){var i=Md(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ud(this,n)}}function Ud(e,t){return!t||"object"!==jd(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 Md(e){return(Md=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vd=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&&Dd(e,t)}(o,e);var t,n,r,i=Bd(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"name",get:function(){return"FileTypeError"}},{key:"lang",get:function(){return"upload.fileType"}},{key:"dialogOptions",get:function(){return{title:q.a.getPhrase(this.lang,"heading"),text:q.a.getPhrase(this.lang,"body"),buttons:[{text:q.a.getPhrase(this.lang,"okay"),className:"btn btn-primary",success:!0},{text:q.a.getPhrase(this.lang,"close"),className:"btn btn-link",close:!0}]}}}])&&Nd(t.prototype,n),r&&Nd(t,r),o}(Su.a),Fd=n(346);function Hd(e){return(Hd="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 zd(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 Wd(e,t){return(Wd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qd(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=Kd(e);if(t){var i=Kd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gd(this,n)}}function Gd(e,t){return!t||"object"!==Hd(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 Kd(e){return(Kd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yd=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&&Wd(e,t)}(o,e);var t,n,r,i=qd(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,q.a.getPhrase("upload.internetConnectivityError","title"))}return t=o,(n=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:q.a.getPhrase("upload.internetConnectivityError","heading"),text:q.a.getPhrase("upload.internetConnectivityError","body"),buttons:[{text:q.a.getPhrase("upload.internetConnectivityError","okay"),className:"btn",success:!0}]}}}])&&zd(t.prototype,n),r&&zd(t,r),o}(Su.a);function Xd(e){return(Xd="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 Qd(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 $d(e,t){return($d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zd(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=ey(e);if(t){var i=ey(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Jd(this,n)}}function Jd(e,t){return!t||"object"!==Xd(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 ey(e){return(ey=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ty,ny,ry=[],iy=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&&$d(e,t)}(a,e);var t,n,i,o=Zd(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,i=[{key:"isValidFile",value:function(e,t){return Fd.isValidFile(e,t)}}],(n=[{key:"name",get:function(){return"DropzoneWrapper"}},{key:"initialize",value:function(e){var t=this.options.loggingEnabled,n=u.Radio.channel(e.channelName),i=this;this.dropzone=new Fd(document.createElement("div"),{url:function(e){return e[0].cvUpload.ingestUrl},chunking:this.options.chunkingEnabled,chunkSize:this.options.chunkSize,forceChunking:!0,autoProcessQueue:!0,maxFilesize:this.options.maxFileSize,acceptedFiles:this.options.acceptedFiles,paramName:"content",init:function(){var e=this;t&&(Ya.each(ry,(function(t){e.on(t,(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0]instanceof File?n[0].name:n[0];console.info(t,i,n)}))})),this.on("uploadprogress",(function(e,t,r){var o=r/e.size*100;n.trigger("progress",i.getId(e),o,r)})),this.on("success",(function(e){var t=e.upload.chunks,r=Ya.last(t),i=r.xhr;i||(i=r.file.xhr);var o=JSON.parse(i.response);e.cvUpload.fileId=o.id,n.trigger("upload:success",e,o)})),this.on("error",(function(e,t,n){n&&0===n.status?r.a.ErrorHelper.throw(new Yd):"canceled"!==e.status&&r.a.ErrorHelper.throw(new wu(q.a.getPhrase("upload.services","uploadError",{fileName:e.name,message:t.message})))})))},params:function(e,t,n){if(n)return{chunk_index:n.index,upload_length:n.file.size}},addedfile:function(){},thumbnail:function(){},uploadprogress:function(){}})}},{key:"getId",value:function(e){return e.upload.uuid}},{key:"addFile",value:function(e){this.dropzone.addFile(e)}},{key:"removeFile",value:function(e){this.dropzone.removeFile(e)}},{key:"start",value:function(){this.dropzone.processQueue()}},{key:"destroy",value:function(){this.dropzone.destroy()}}])&&Qd(t.prototype,n),i&&Qd(t,i),a}(r.a.Service);function oy(e){return(oy="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 ay(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cy(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 uy(e,t,n){return t&&cy(e.prototype,t),n&&cy(e,n),e}function ly(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&&fy(e,t)}function fy(e,t){return(fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function py(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=dy(e);if(t){var i=dy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hy(this,n)}}function hy(e,t){return!t||"object"!==oy(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 dy(e){return(dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yy,my=function(e){ly(n,e);var t=py(n);function n(){return sy(this,n),t.call(this,{dataProvider:ue.a.getInstance(as.Ajax),cache:ue.a.getInstance(Ka.Fifo),alertService:ue.a.getInstance(_s.a.ALERT)})}return uy(n,[{key:"name",get:function(){return"UploadDataService"}},{key:"channelName",get:function(){return"private:upload:data:service"}},{key:"requestUploads",value:function(e,t,n,r){var i=this,o=this.chain();Ya.each(e,(function(e){o.create({resource:"/api/upload",eventPrefix:"request:upload",data:i.getFileUploadRequest(e,t),callback:function(t){n(e,t)}})})),o.func((function(){r()})).run()}},{key:"cancelUpload",value:function(e,t,n){this.create({resource:"/api/upload/cancel",eventPrefix:"cancel:upload",data:{uploadId:e,ingestUrl:t},callback:n})}},{key:"getFileUploadRequest",value:function(e,t){var n=e.name.split(".");return{name:n.join("."),extension:n.length>1?n.pop():"",fileSize:e.size,fileLifestyle:t}}},{key:"onDestroy",value:function(){ue.a.releaseInstance(as.Ajax).releaseInstance(Ka.Fifo)}}]),n}(Is);!function(e){e[e.Video=0]="Video",e[e.LearningResource=1]="LearningResource",e[e.Subtitle=2]="Subtitle"}(yy||(yy={}));var vy,gy,by=(ay(ty={},yy.Video,"video/*"),ay(ty,yy.LearningResource,Ld.RESOURCES),ay(ty,yy.Subtitle,Ld.SUBTITLES),ty),_y=(ay(ny={},yy.Video,js.c.VIDEO_UPLOAD),ay(ny,yy.LearningResource,js.c.RESOURCE_UPLOAD),ay(ny,yy.Subtitle,js.c.SUBTITLE_UPLOAD),ny),wy=function(e){ly(n,e);var t=py(n);function n(){return sy(this,n),t.apply(this,arguments)}return uy(n,[{key:"initialize",value:function(){this.uploadDataService=new my,this.progressViewModel=bh.get("upload:progress:".concat(this.uploadType)),this.bindListeners()}},{key:"channelName",get:function(){return _y[this.uploadType]}},{key:"lang",get:function(){return"upload.services"}},{key:"initUploader",value:function(e,t){if(!this.uploader){var n=4194304;e&&n<e&&(n=e),t&&n>t&&(n=t),this.uploader=new iy({chunkingEnabled:!0,loggingEnabled:!0,chunkSize:n,maxFileSize:53687091200,acceptedFiles:this.getAcceptedFiles(),channelName:this.channelName})}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"progress",this.onProgress),this.listenTo(this.channelName,"upload:success",this.onSuccess)}},{key:"onProgress",value:function(e,t,n){var r=this.collection.get(e);r&&(r.set({progress:t>100?100:t,totalUploaded:n}),this.setOverallProgress())}},{key:"isUploading",value:function(){return!!this.getCollection().length}},{key:"getCollection",value:function(){return this.collection||(this.collection=new r.a.Collection),this.collection}},{key:"setOverallProgress",value:function(){var e=0,t=0,n=this.getCollection();if(n.length){n.each((function(n){e+=n.get("totalUploaded")||0,t+=n.get("file").size||0}));var r=e/t*100,i=r>100;this.progressViewModel.set({progress:i?100:r,done:i})}else this.progressViewModel.set({progress:0})}},{key:"isValidFile",value:function(e){return iy.isValidFile(e,this.getAcceptedFiles())}},{key:"addFiles",value:function(e,t){var n=this;Ya.any(e,(function(e){return!n.isValidFile(e)}))?r.a.ErrorHelper.throw(new Vd(q.a.getPhrase(this.lang,"invalidFileType"))):this.requestUploads(e,t)}},{key:"requestUploads",value:function(e,t){var n=this,r=this.isUploading(),i=this.getCollection();this.uploadDataService.requestUploads(e,this.fileLifestyle,(function(e,t){n.initUploader(1024*t.minChunkSize,1024*t.maxChunkSize),e.cvUpload={uploadId:t.uploadId,ingestUrl:t.ingestUrl},n.uploader.addFile(e);var r=e.name;n.uploadType===yy.Video&&(r=r.replace(/\.[^/.]+$/,"")),i.add({id:n.uploader.getId(e),file:e,name:r},{at:i.length-1})}),(function(){t&&Qu.a.logUserAction({uploadCount:e.length},t),u.Radio.channel(n.channelName).trigger(pf.a.FILES_ADDED,e,r)}))}},{key:"addFile",value:function(e,t){this.addFiles([e],t)}},{key:"cancelUpload",value:function(e){var t=this,n=this.getCollection(),r=n.get(e);if(r){var i=r.get("file");this.uploader.removeFile(i),n.remove(r),this.uploadDataService.cancelUpload(i.cvUpload.uploadId,i.cvUpload.ingestUrl,(function(){Qu.a.logUserAction({id:i.cvUpload.uploadId},{entity:k.EntityType.Video,actionType:k.UserAction.Upload,workflowPhase:k.WorkflowPhase.Discard,descriptor:k.OperationDescriptor.Single,location:k.LocationContext.MyUploads}),u.Radio.channel(t.channelName).trigger(pf.a.UPLOAD_CANCELLED)})),this.setOverallProgress()}}},{key:"onSuccess",value:function(e,t){var n=this.uploader.getId(e),r=this.getCollection().get(n);r.set("fileInfo",t),Qu.a.logUserAction({id:e.cvUpload.uploadId},{entity:k.EntityType.Video,actionType:k.UserAction.Upload,workflowPhase:k.WorkflowPhase.Complete,descriptor:k.OperationDescriptor.Single,location:k.LocationContext.VideoUpload}),u.Radio.channel(this.channelName).trigger(pf.a.UPLOAD_COMPLETE,r)}},{key:"cancelAllUploads",value:function(){var e=this,t=this.getCollection().map((function(e){return e.get("id")}));Ya.each(t,(function(t){return e.cancelUpload(t)}))}},{key:"getAcceptedFiles",value:function(){return by[this.uploadType]}}]),n}(r.a.Service),Sy=function(e){ly(n,e);var t=py(n);function n(){return sy(this,n),t.apply(this,arguments)}return uy(n,[{key:"uploadType",get:function(){return yy.Video}},{key:"name",get:function(){return xs.b.VideoUpload}},{key:"fileLifestyle",get:function(){return vd.Temporary}}]),n}(wy);function Ty(e){return(Ty="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 Cy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ky(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 Ey(e,t,n){return(Ey="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Iy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Oy(e,t){return(Oy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Py(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=Iy(e);if(t){var i=Iy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ay(this,n)}}function Ay(e,t){return!t||"object"!==Ty(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 Iy(e){return(Iy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e[e.IosApp=1]="IosApp",e[e.AndroidApp=2]="AndroidApp",e[e.WinApp=3]="WinApp",e[e.LibraryPublisher=4]="LibraryPublisher",e[e.ExchangeClient=5]="ExchangeClient",e[e.Online=6]="Online",e[e.Tinder=7]="Tinder",e[e.Cloud247=8]="Cloud247",e[e.Livestream=9]="Livestream",e[e.Curator=10]="Curator",e[e.LibraryEditor=11]="LibraryEditor",e[e.Lite=12]="Lite"}(vy||(vy={})),function(e){e[e.ExternalOnly=0]="ExternalOnly",e[e.EmbeddedOnly=1]="EmbeddedOnly"}(gy||(gy={}));var xy=q.a.encloseNamespace("upload.services"),Ry=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&&Oy(e,t)}(o,e);var t,n,r,i=Py(o);function o(){return Cy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"initialize",value:function(){Ey(Iy(o.prototype),"initialize",this).call(this),this.videoUploadDataService=ue.a.getInstance(eu.a.VideoUpload,this),this.pendingItemsService=ue.a.getInstance(eu.b.PendingItems,this),this.userDataService=ue.a.getInstance(eu.a.FlightUser,this),this.alertService=ue.a.getInstance(_s.a.ALERT,this),this.listenTo(this.channelName,pf.a.FILES_ADDED,this.onUploadStart),this.listenTo(this.channelName,pf.a.UPLOAD_COMPLETE,this.unlockNav),this.listenTo(this.channelName,pf.a.UPLOAD_CANCELLED,this.unlockNav)}},{key:"onUploadStart",value:function(e){var t={type:bs.a.Success,heading:xy("startUploadAlertHeading"),message:1===e.length?xy("startUploadSingleAlertBody",{videoName:e[0].name}):xy("startUploadMultipleAlertBody",{uploadCount:e.length})},n=z.a.getCurrentContext().appLink;!!Mf.a.getMyVideosAppLinks().find((function(e){return n.application===e.application&&n.action===e.action}))||(t.appLinkText=xy("startUploadAlertAppLinkText",{smartCount:e.length}),t.appLink={application:P.a.DEFAULT,action:R.a.Default.MY_VIDEOS},t.appLinkClassName="info-link"),this.alertService.createAlert(t)}},{key:"unlockNav",value:function(){this.getCollection().some((function(e){return e.get("progress")<100}))||u.Radio.channel(this.channelName).trigger(pf.a.UNLOCK_NAV)}},{key:"getUpload",value:function(e){var t=this.uploader.getId(e);return this.getCollection().get(t)}},{key:"completeUpload",value:function(e,t){var n=this;e.set("sending",!0),this.userDataService.getCurrentUser((function(r){n.userDataService.getWorkspace((function(i){n.videoUploadDataService.completeVideoUpload({id:e.get("id"),userId:r.id,customerId:r.customerId,libraryId:i.id,categoryId:null,pendingProcessOrigin:md.Upload,origin:vy.Lite,fileId:t.id,subtitleOptions:{subtitleExtractOptions:gy.EmbeddedOnly},video:{name:e.get("name"),description:e.get("description")}},(function(t){e.set("pendingProcessId",t.pendingProcessId),n.pendingItemsService.forceFetchPendingItems({resetTimeout:!0})}))}))}))}},{key:"onSuccess",value:function(e,t){var n=this;Ey(Iy(o.prototype),"onSuccess",this).call(this,e,t);var r=this.getUpload(e);r.get("editingMetadata")?this.listenToOnce(r,"change:editingMetadata",(function(){n.completeUpload(r,t)})):this.completeUpload(r,t)}}])&&ky(t.prototype,n),r&&ky(t,r),o}(Sy);function Ly(e){return(Ly="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 jy(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 Ny(e,t){return(Ny=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dy(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=Uy(e);if(t){var i=Uy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return By(this,n)}}function By(e,t){return!t||"object"!==Ly(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 Uy(e){return(Uy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var My=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&&Ny(e,t)}(o,e);var t,n,r,i=Dy(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).imageUrls=e.imageUrls,t}return t=o,(n=[{key:"name",get:function(){return xs.b.ImageUrl}},{key:"getImageUrls",value:function(){return this.imageUrls}}])&&jy(t.prototype,n),r&&jy(t,r),o}(r.a.Service);var Vy=n(293),Fy=n(276);function Hy(e,t){return Sf.a.isObject(t.xhr)?Object.assign(Object.assign({},e),{version:t.xhr.getResponseHeader("X-App-Version")}):e}var zy={version:null};function Wy(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zy,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Fy.a.API_RESPONSE:return Hy(e,t)}return e}function qy(e){return(qy="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 Gy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ky(e,t){return"string"==typeof t.payload.dataOrKey&&void 0!==t.payload.keyData?Object.assign(Object.assign({},e),Gy({},t.payload.viewModelKey,Object.assign(Object.assign({},e[t.payload.viewModelKey]),Gy({},t.payload.dataOrKey,t.payload.keyData)))):("object"===qy(t.payload.dataOrKey)&&Array.isArray(t.payload.dataOrKey),Object.assign(Object.assign({},e),Gy({},t.payload.viewModelKey,t.payload.dataOrKey)))}function Yy(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case oe.a.UPDATE:return Ky(e,t)}return e}var Xy=n(211);function Qy(e){return(Qy="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 Zy(e,t){return(Zy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jy(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=tm(e);if(t){var i=tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return em(this,n)}}function em(e,t){return!t||"object"!==Qy(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 tm(e){return(tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nm=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&&Zy(e,t)}(a,e);var t,n,i,o=Jy(a);function a(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(r=o.call(this,q.a.getPhrase("shared.oldVersion","title",{oldVersion:e,newVersion:t}))).btnVariant=n,r}return t=a,(n=[{key:"name",get:function(){return"OldVersionError"}},{key:"dialogOptions",get:function(){return{title:q.a.getPhrase("shared.oldVersion","heading"),text:q.a.getPhrase("shared.oldVersion","body"),buttons:[{text:q.a.getPhrase("shared.oldVersion","reload"),className:"btn btn-".concat(this.btnVariant),success:!0}]}}},{key:"onDone",value:function(){r.a.LocationUtils.Reload()}}])&&$y(t.prototype,n),i&&$y(t,i),a}(Su.a);function rm(e){return(rm="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 im(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function om(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 am(e,t,n){return t&&om(e.prototype,t),n&&om(e,n),e}function sm(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&&cm(e,t)}function cm(e,t){return(cm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function um(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=fm(e);if(t){var i=fm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lm(this,n)}}function lm(e,t){return!t||"object"!==rm(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 fm(e){return(fm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pm=function(e){sm(n,e);var t=um(n);function n(){return im(this,n),t.apply(this,arguments)}return am(n,[{key:"onDone",value:function(){r.a.LocationUtils.PageLoad("/login?returnUrl=".concat(encodeURIComponent(r.a.LocationUtils.GetCurrentUrl())))}}]),n}(function(e){sm(n,e);var t=um(n);function n(e){var r;return im(this,n),(r=t.call(this,q.a.getPhrase("shared.authentication","title"))).btnVariant=e,r}return am(n,[{key:"name",get:function(){return"AuthenticationError"}},{key:"dialogOptions",get:function(){return{title:q.a.getPhrase("shared.authentication","heading"),text:q.a.getPhrase("shared.authentication","body"),buttons:[{text:q.a.getPhrase("shared.authentication","reload"),className:"btn btn-".concat(this.btnVariant),success:!0}]}}},{key:"onDone",value:function(){r.a.LocationUtils.Reload()}}]),n}(Su.a)),hm=n(232),dm={"{gateway}":"gatewayApiUrl","{image}":"imageCdnUrl"};function ym(e){return function(t,n){var r=Object.keys(dm).find((function(e){return t.resource.startsWith(e)}));if(!r)return n(t);function a(){n(t)}function s(e,i){var o=e[dm[r]],a=Object.assign(Object.assign({},t),{resource:hm.a.safeUrlConcat(o,t.resource.split("".concat(r,"/"))[1])});(null==i?void 0:i.value)&&(a.headers={authorization:"Bearer ".concat(i.value)}),n(a)}i.a.hooklessFetch(e,ru.a.config((function(t){i.a.hooklessFetch(e,o.a.currentUser((function(n){return function(t,n){if(!n.isAuthenticated)return void s(t);i.a.hooklessFetch(e,o.a.token((function(e){return s(t,e)}),a))}(t,n)}),a))}),a))}}var mm=/\(([^()]*)\)/g;function vm(e,t){return function(n,i){var o=new r.a.Middleware;decodeURIComponent(n.resource).replace(mm,(function(e){var n=t[e];if("string"!=typeof n)return n?void o.use(n):e;o.use(function(e,t){return function(n,r){r(Object.assign(Object.assign({},n),{resource:n.resource.replace(e,t)}))}}(e,n))}));var a={resource:n.resource,store:e};o.go(a,(function(e){i(Object.assign(Object.assign({},n),{resource:e.resource}))}))}}function gm(e,t){return function(n){var o=new r.a.Middleware;o.use(ym(e.store)),o.use(vm(e.store,t)),o.go(n,(function(e){i.a.ajaxRequest(e)}))}}var bm=n(227);function _m(e){return function(t,n){i.a.hooklessFetch(t.store,o.a.currentUser((function(r){var i="".concat("video[thumbnail,_canBeConsumed],_canUpdate,_videoProgress,owner");r.isAuthenticated&&(i+=",favouritedby{id:".concat(r.id,"}")),e===Qc.b.CLIP&&(i+=",interactives[thumbnail,clip[video[thumbnail]],video[thumbnail]]");var o=t.resource.replace(e,i);n(Object.assign(Object.assign({},t),{resource:o}))}),(function(){return n(t)})))}}var wm;function Sm(e){return function(t,n){i.a.hooklessFetch(t.store,o.a.currentUser((function(r){var i="".concat("thumbnail,rating,series,season,_videoProgress");r.isAuthenticated&&(i+=",favouritedby{id:".concat(r.id,"}")),e===Qc.b.VIDEO_COLLECTION&&(i+=",_canUpdate,subtitles{limit:1},_canBeConsumed");var o=t.resource.replace(e,i);n(Object.assign(Object.assign({},t),{resource:o}))}),(function(){return n(t)})))}}function Tm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cm=(Tm(wm={},Qc.b.VIDEO_COLLECTION,Sm(Qc.b.VIDEO_COLLECTION)),Tm(wm,bm.a.WIDGET_VIDEO_COLLECTION,Sm(bm.a.WIDGET_VIDEO_COLLECTION)),Tm(wm,Qc.b.CLIP,_m(Qc.b.CLIP)),Tm(wm,Qc.b.CLIP_COLLECTION,_m(Qc.b.CLIP_COLLECTION)),Tm(wm,Qc.b.INTERACTIVE,(function(e,t){i.a.hooklessFetch(e.store,o.a.currentUser((function(n){var r="video[thumbnail,_canBeConsumed],thumbnail,clip[video[thumbnail,_canBeConsumed]],_canUpdate,_isClickViewContent,_timepoints";n.isAuthenticated&&(r+=",favouritedby{id:".concat(n.id,"}"));var i=e.resource.replace(Qc.b.INTERACTIVE,r);t(Object.assign(Object.assign({},e),{resource:i}))}),(function(){return t(e)})))})),wm);function km(e,t){var n,o,a,s=Object(Vy.combineReducers)({flightData:i.a.FlightReducer,applicationData:Wy,viewModelData:Yy}),c=i.a.createMiddleware({fetchData:gm(e,Cm),bootstrappedData:window.bootstrapData||{},defaultExpiryTime:Rs}),u=(o=(n={oldVersionError:nm,authenticationError:pm}).oldVersionError,a=n.authenticationError,function(e){return function(t){return function(n){var i,s,c=n;if(n.type===Xy.Actions.API_ERROR&&a&&(null===(i=null==c?void 0:c.xhr)||void 0===i?void 0:i.status)===qt.a.Unauthorized)return Qa.c.throw(new a("dark"));if(n.type===Xy.Actions.API_RESPONSE){var u=e.getState().applicationData.version,l=null===(s=null==c?void 0:c.xhr)||void 0===s?void 0:s.getResponseHeader("X-App-Version");o&&u&&l&&l!==u&&r.a.ErrorHelper.delayedThrow("old-version-error",new o(u,l,"dark"),18e4),t(n)}else t(n)}}});var l,f=Object(Vy.createStore)(s,Object(Vy.applyMiddleware)(c,u));l=f,e.registerStore(l),t(),delete window.bootstrapData}var Em=n(236);function Om(e){return(Om="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 Pm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Am(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 Im(e,t){return(Im=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xm(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=Lm(e);if(t){var i=Lm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rm(this,n)}}function Rm(e,t){return!t||"object"!==Om(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 Lm(e){return(Lm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jm=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&&Im(e,t)}(o,e);var t,n,r,i=xm(o);function o(){return Pm(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"appLinks",get:function(){return{searchResults:{application:P.a.SEARCH,action:R.a.Search.HOME},series:{application:P.a.DEFAULT,action:R.a.Default.SERIES},videoDetails:{application:P.a.DEFAULT,action:R.a.Default.PLAY_VIDEO},tagSearch:{application:P.a.SEARCH,action:R.a.Search.HOME},classification:{application:P.a.SUBJECT,action:R.a.Subjects.CLASSIFICATION}}}},{key:"addSlugs",get:function(){return!0}},{key:"searchBarPlaceholder",get:function(){return q.a.getPhrase("search.searchAppVariables","searchBarPlaceholder")}},{key:"showSearchTips",get:function(){return!1}},{key:"useContextualSearch",get:function(){return!1}}])&&Am(t.prototype,n),r&&Am(t,r),o}(Em.BaseSearchAppVariables),Nm=n(52),Dm=n(738),Bm=n.n(Dm);function Um(e){return(Um="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 Mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vm(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 Fm(e,t){return(Fm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hm(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=Wm(e);if(t){var i=Wm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zm(this,n)}}function zm(e,t){return!t||"object"!==Um(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 Wm(e){return(Wm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qm=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&&Fm(e,t)}(o,e);var t,n,r,i=Hm(o);function o(){return Mm(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"appLinks",get:function(){return{videoDetails:{application:P.a.DEFAULT,action:R.a.Default.PLAY_VIDEO},notifications:{application:P.a.NOTIFICATIONS,action:R.a.Notifications.HOME},shareLink:{application:P.a.SHARE,action:R.a.Share.VIEW_SHARE_LINK}}}},{key:"notificationTypesWithAppLinks",get:function(){return[Nm.a.VideoReviewReminder,Nm.a.VideoReviewAddedToLibrary,Nm.a.CustomLibraryVideoAvailable,Nm.a.WorkspaceVideoAvailable,Nm.a.ExchangeVideoAvailable,Nm.a.NewDirectShare,Nm.a.MyVideosVideoAvailable]}},{key:"unsupportedNotificationLinks",get:function(){return[Nm.a.EditedVideoAvailable,Nm.a.VideoReviewAddedToLibrary,Nm.a.VideoReviewReminder,Nm.a.StaffRequest,Nm.a.StaffRequestFulfilled,Nm.a.SuggestEdit,Nm.a.VideoRequestAvailable,Nm.a.VideoRequestDenied,Nm.a.ChapterMergeSuccess]}},{key:"notificationsEmptyStateUrl",get:function(){return It.a.EmptyStates.NOTIFICATIONS}},{key:"bellIconColor",get:function(){return"dark"}},{key:"notificationsViewClassNames",get:function(){return"px-3 ".concat(Bm.a.notificationsView)}}])&&Vm(t.prototype,n),r&&Vm(t,r),o}(Em.BaseNotificationsAppVariables);var Gm=n(116);function Km(e){return(Km="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)}var Ym={register:function(){var e=this;Gm.registerHelper("lang",(function(t,n){if(e.isValid(t,n)){var r=n.data.root.languageNamespace;return q.a.getPhrase(r,t,n.hash)}}))},isValid:function(e,t){return"string"!=typeof e?(r.a.ErrorHelper.throw(new ie.a("No language key provided.")),!1):"object"!==Km(t)?(r.a.ErrorHelper.throw(new ie.a("All options must be key-value pairs, e.g. `smartCount=options.videoCount`")),!1):!Ya.isUndefined(t.data.root.languageNamespace)||(r.a.ErrorHelper.throw(new ie.a("No `lang` property provided.")),!1)}};var Xm,Qm=n(240);function $m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e[e.Unclassified=0]="Unclassified",e[e.Primary=1]="Primary",e[e.Secondary=2]="Secondary",e[e.K12=3]="K12",e[e.Tertiary=4]="Tertiary",e[e.NonEducational=5]="NonEducational",e[e.Partners=6]="Partners",e[e.Internal=7]="Internal",e[e.Other=8]="Other",e[e.ClickView=254]="ClickView",e[e.System=255]="System"}(Xm||(Xm={}));var Zm={curriculum:!1},Jm=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=Object.assign({onlineModules:Zm},t)}var t,n,r;return t=e,(n=[{key:"name",get:function(){return xs.b.AppOptions}},{key:"hasCurriculum",get:function(){return this.options.onlineModules.curriculum}},{key:"isTeacher",get:function(){return this.options.onlineRole===Qm.a.Staff}},{key:"onlineRole",get:function(){return this.options.onlineRole}},{key:"onlineCustomerType",get:function(){return this.options.customerType}}])&&$m(t.prototype,n),r&&$m(t,r),e}();var ev=n(153),tv=n(281);function nv(e){return(nv="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 rv(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 iv(e,t){return(iv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ov(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=sv(e);if(t){var i=sv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return av(this,n)}}function av(e,t){return!t||"object"!==nv(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 sv(e){return(sv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cv=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&&iv(e,t)}(a,e);var t,n,i,o=ov(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this)).clients={},t.enrichers={},bh.get("application:options").set(e),t.bindNavigationListener(),t}return t=a,(n=[{key:"name",get:function(){return le.a.Analytics}},{key:"registerTransport",value:function(e,t){return this.transport=new e(t),this.bindTransportListeners(),this}},{key:"bindTransportListeners",value:function(){this.listenTo(tv.a.ANALYTICS,ev.a.Inlet,this.onEvent)}},{key:"registerClient",value:function(e,t){return this.validateConstructor(e),this.clients[e.prototype.name]=e.prototype.name,this.transport.subscribe(new e(t)),this}},{key:"registerEnricher",value:function(e,t){this.validateConstructor(e);var n=new e(t);return this.enrichers[e.name]=n,this.registerMiddleware(Ya.bind(n.enrich,n)),this}},{key:"hasEnricher",value:function(e){return!!this.enrichers[e.prototype.name]}},{key:"onEvent",value:function(e){var t=this;this.executeMiddleware(e,(function(e){t.transport.publish(e)}))}},{key:"validateConstructor",value:function(e){var t=e.prototype.name;t||r.a.ErrorHelper.throw(new ie.a("Classes registered with ".concat(this.name," must have a unique name property.")));var n=function(t){return qr.a.isFunction(e.prototype.isType)&&e.prototype.isType(t)};(n("BaseAnalyticsClient")||"CollectionApiClient"===t)&&this.clients[t]&&r.a.ErrorHelper.throw(new ie.a("A client class with the name: ".concat(t," has already been registered with ").concat(this.name))),n("BaseAnalyticsEnricher")&&this.enrichers[t]&&r.a.ErrorHelper.throw(new ie.a("An enricher class named: ".concat(t," has already been registered with ").concat(this.name)))}},{key:"registerMiddleware",value:function(e){var t;this.executeMiddleware=(t=this.executeMiddleware,function(n,r){return t(n,(function(){return e(n,r)}))})}},{key:"executeMiddleware",value:function(e,t){t(e)}},{key:"bindNavigationListener",value:function(){this.listenTo(p.a.SHELL,r.a.EventNames.URL_CHANGE,this.logNavigate)}},{key:"logNavigate",value:function(e,t){Qu.a.logNavigate(e,t)}}])&&rv(t.prototype,n),i&&rv(t,i),a}(r.a.Service);function uv(e){return(uv="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 lv(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 fv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pv(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&&hv(e,t)}function hv(e,t){return(hv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dv(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=mv(e);if(t){var i=mv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yv(this,n)}}function yv(e,t){return!t||"object"!==uv(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 mv(e){return(mv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vv=function(e){pv(o,e);var t,n,r,i=dv(o);function o(){return fv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return"EventTransport"}},{key:"channelName",get:function(){return"event:transport"}},{key:"publish",value:function(e){this.getChannel().trigger(ev.a.Outlet,e)}},{key:"subscribe",value:function(e){var t=e,n=function(n){qr.a.isFunction(t.shouldLog)&&!t.shouldLog(n)||e.log(n)};Ya.isFunction(t.listenTo)?t.listenTo(this.getChannel(),ev.a.Outlet,n):this.listenTo(this.getChannel(),ev.a.Outlet,n)}}])&&lv(t.prototype,n),r&&lv(t,r),o}(function(e){pv(n,e);var t=dv(n);function n(){return fv(this,n),t.apply(this,arguments)}return n}(ss.Object));function gv(e){return(gv="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 bv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _v(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 wv(e,t){return(wv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sv(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=Cv(e);if(t){var i=Cv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tv(this,n)}}function Tv(e,t){return!t||"object"!==gv(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 Cv(e){return(Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kv=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&&wv(e,t)}(o,e);var t,n,r,i=Sv(o);function o(){return bv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return"UserDataEnricher"}},{key:"initialize",value:function(){this.user=bh.get("application:options").get("user")}},{key:"shouldEnrich",value:function(e){return!0}},{key:"enrich",value:function(e,t){this.shouldEnrich(e)||t(e),e.enrich("user",this.getUser(this.user)),t(e)}},{key:"getUser",value:function(e){return{country:e.countryCode,customerId:e.customerId,id:e.id,role:e.role}}}])&&_v(t.prototype,n),r&&_v(t,r),o}(ge),Ev=n(297);function Ov(e){return(Ov="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 Pv(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 Av(e,t){return(Av=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iv(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=Rv(e);if(t){var i=Rv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xv(this,n)}}function xv(e,t){return!t||"object"!==Ov(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 Rv(e){return(Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lv=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&&Av(e,t)}(a,e);var t,n,i,o=Iv(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).productName=e.productName,t.productVersion=e.productVersion,t}return t=a,(n=[{key:"name",get:function(){return"CoreContextEnricher"}},{key:"shouldEnrich",value:function(e){return!0}},{key:"enrich",value:function(e,t){this.shouldEnrich(e)||t(e),e.enrich("coreContext",this.getCoreContext()),t(e)}},{key:"getCoreContext",value:function(){return{timestamp:this.getTimestamp(),product:this.getProductInfo(),request:this.getRequestInfo(),client:this.getClientInfo()}}},{key:"getTimestamp",value:function(){return oc.utc().toISOString()}},{key:"getProductInfo",value:function(){return{name:this.productName,version:this.productVersion}}},{key:"getRequestInfo",value:function(){return{referrer:r.a.LocationUtils.GetCurrentReferrer(),requestUrl:r.a.LocationUtils.GetCurrentUrl()}}},{key:"getClientInfo",value:function(){var e=Ev.a.getOperatingSystem(),t=Ev.a.getBrowser();return{os:e.os,osVersion:e.version,browser:t.browser,browserVersion:t.version,screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}}])&&Pv(t.prototype,n),i&&Pv(t,i),a}(ge),jv=n(287);function Nv(e){return(Nv="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 Dv(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 Bv(e,t){return(Bv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uv(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=Vv(e);if(t){var i=Vv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mv(this,n)}}function Mv(e,t){return!t||"object"!==Nv(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 Vv(e){return(Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fv=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&&Bv(e,t)}(o,e);var t,n,r,i=Uv(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"shouldLog",value:function(e){return!0}},{key:"log",value:function(e){}},{key:"isType",value:function(e){return e===o.type}}])&&Dv(t.prototype,n),r&&Dv(t,r),o}(r.a.Service);function Hv(e){return(Hv="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 zv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wv(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 qv(e,t){return(qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gv(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=Yv(e);if(t){var i=Yv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kv(this,n)}}function Kv(e,t){return!t||"object"!==Hv(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 Yv(e){return(Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fv.type="BaseAnalyticsClient";var Xv=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&&qv(e,t)}(a,e);var t,n,i,o=Gv(a);function a(){return zv(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"name",get:function(){return"DebuggerClient"}},{key:"shouldLog",value:function(){return F.a.isDevelopment}},{key:"log",value:function(e){var t=Ya.clone(e);for(var n in e){var i=t[n];(i instanceof r.a.Model||i instanceof r.a.Collection)&&(t[n]=i.toJSON())}console.log("Event Debugger: ",t)}}])&&Wv(t.prototype,n),i&&Wv(t,i),a}(Fv),Qv=n(179),$v=n(208),Zv=function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"customers:".concat(e),success:t,error:n}},Jv={getUser:function(e){return new Promise((function(t){i.a.hooklessFetch(e.store,o.a.currentUser((function(n){var r,a,s=new lh(2),c=function(){s.decrement(),s.getValue()>0||t(Jv.mapCurrentUserToAnalyticsUser(n,r,a))};i.a.hooklessFetch(e.store,o.a.user(n.id,(function(e){r=e,c()}))),i.a.hooklessFetch(e.store,Zv(n.customerId,(function(e){a=e,c()})))})))}))},mapCurrentUserToAnalyticsUser:function(e,t,n){var r,i=Yl.a.getUserTypeString(t);return{id:null==e?void 0:e.id,countryCode:null==e?void 0:e.countryCode,contentRegion:null==e?void 0:e.contentRegion,instanceRegion:null==e?void 0:e.instanceRegion,customerId:null==e?void 0:e.customerId,customerGuid:null==n?void 0:n.customerGuid,customerName:null==e?void 0:e.customerName,crmId:null==n?void 0:n.crmId,role:null==e?void 0:e.role,userGroup:i,yearGroup:i===$v.a.Staff?"staff":null===(r=t.masterYearGroup)||void 0===r?void 0:r.name}}},eg={formatData:function(e){var t=Qv.a.formatData(e),n={};return e.plugin&&(n.plugin=e.plugin),Object.assign(Object.assign({},n),t)}},tg=l.a.Router.prototype._routeToRegExp("share/:id(/)"),ng=l.a.Router.prototype._routeToRegExp("share/embed/:id(/)");var rg=new r.a.Shell({region:"#app",layoutService:new r.a.LayoutService({})});rg.addInitializationStep(km).addInitializationStep((function(e,t){e.registerLayout(E,Xp).registerLayout(O,ch),t(e)})).addInitializationStep((function(e,t){ue.a.registerInstance(os,{size:100}),t(e)})).addInitializationStep((function(e,t){ue.a.registerInstance(gs,{dataServiceErrorMessageMappings:{temp:"Error"},defaultErrorMessageKey:"temp"}),t(e)})).addInitializationStep(km).addInitializationStep((function(e,t){var n={maxAlerts:3,defaultSuccessAlert:{heading:Xc.a.Success,type:bs.a.Success},defaultErrorAlert:{heading:Xc.a.Fail,type:bs.a.Fail},alertViewCtor:Vc};ue.a.registerSingleton(new bs.b(n));var r=ue.a.getInstance(_s.a.ALERT),i={cache:Ka.Fifo,dataProvider:as.Ajax,bootstrapData:window.bootstrapData,defaultErrorHandler:r.error({useXHR:!0}),alertService:r};ue.a.registerDataService(Yc,i).registerDataService(zs,i).registerDataService(Oc,i);var o={store:e.store};ue.a.registerInstance(Jc,o).registerInstance(nu,o).registerInstance(ou,o).registerInstance(su,o);var a={cache:Ka.Fifo,dataProvider:as.Notifications,alertService:r};ue.a.registerDataService(ic,a),t(e),delete window.bootstrapData})).addInitializationStep((function(e,t){ue.a.registerInstance(My,{imageUrls:It.a}).registerInstance(Ry).registerInstance(dd,{store:e.store}).registerInstance(Cd,{store:e.store}).registerInstance(Fh).registerInstance(hf.a).registerInstance(Xh);var n=new lh(2),r=function(){n.decrement(),n.getValue()>0||(ue.a.releaseInstance(xs.a.Language),ue.a.releaseInstance(eu.a.FlightConfig),t(e))};ue.a.getInstance(xs.a.Language).getLanguageConfig((function(e){q.a.setConfig(e),r()})),ue.a.getInstance(eu.a.FlightConfig).getConfig((function(e){ue.a.registerInstance(pd,{endpoint:e.notificationServiceUrl,authEndpoint:"/api/notifications/v1/tokens",hubName:"notification",logging:!0}),r()}))})).addInitializationStep((function(e,t){var n,r,o,a=ue.a.getInstance(eu.a.FlightConfig),s=ue.a.getInstance(eu.a.FlightUser),c=new lh(3),u=function(){c.decrement(),c.getValue()>0||(r.isAuthenticated?p(n.instanceRegion):f())},f=function(){var t=l.a.history.getFragment(se.LocationUtils.GetCurrentPath()),r=tg.test(t),o=ng.test(t);if(r||o){var a="";r?a=l.a.Router.prototype._extractParameters(tg,t)[0]:o&&(a=l.a.Router.prototype._extractParameters(ng,t)[0]),a?i.a.hooklessFetch(e.store,Yt.a.getShareObject(a,(function(e){return p(e.ownerInstanceRegion)}),(function(){return p(n.instanceRegion)}))):p(n.instanceRegion)}else p(n.instanceRegion)},p=function(i){var a=new cv({user:r,config:n});ue.a.registerSingleton(a),a.registerTransport(vv),a.registerClient(Xv),a.registerClient(jv.a,{productName:"lite.web",productVersion:o,regionName:i,collectionApiUrls:n.collectionApiUrls,collectionApiClientId:n.collectionApiClientId,getUser:function(){return Jv.getUser(e)},shouldLog:Qv.a.shouldLog,formatData:eg.formatData}),a.registerEnricher(Lv,{productName:"ClickView Primary",productVersion:o}),a.registerEnricher(kv);var s=ae.b.get(ce.a.PLUGIN);(null==s?void 0:s.consumerKey)&&a.registerEnricher(ke,{consumerKey:s.consumerKey}),ue.a.releaseInstance(eu.a.FlightConfig),ue.a.releaseInstance(eu.a.FlightUser),t(e)};a.getVersion((function(e){o=e,u()})),a.getConfig((function(e){n=e,u()})),s.getCurrentUser((function(e){r=e,u()}),(function(){u()}))})).addInitializationStep((function(e,t){t(e)})).addInitializationStep((function(e,t){r.a.View.AddViewDataExtension((function(e){return{languageNamespace:Ya.result(e,"lang")}})),t(e)})).addInitializationStep((function(e,t){ue.a.registerInstance(jm).registerInstance(qm),t(e)})).addInitializationStep((function(e,t){e.registerErrorHandler(W.a,xu).registerErrorHandler(Su.a,Ru).registerErrorHandler(wu,Au).registerErrorHandler(Pt.a,Iu).registerErrorHandler(H.a,xu).registerErrorHandler(Tu.a,xu).registerErrorHandler(Cu.a,xu).registerErrorHandler(ku.a,Iu).registerErrorHandler(Eu.a,xu).registerErrorHandler(Ou.a,Iu).registerErrorHandler(Pu.a,xu).registerErrorHandler(nn,Lu).registerErrorHandler(Mn,ju),t()})).addInitializationStep((function(e,t){function n(){r.a.ErrorHelper.throw(new H.a)}e.registerApplication(zt).registerApplication(Ho).registerApplication(gi).registerApplication(Vi).registerApplication(Wr).registerApplication(ai).registerApplication(Ai).registerApplication($i).registerApplication(_o).registerApplication(Jo).registerApplication(fa),i.a.hooklessFetch(e.store,o.a.currentUser((function(r){r.isAuthenticated?i.a.hooklessFetch(e.store,o.a.permissions((function(n){if(n[a.a.StudentExperience])return e.registerApplication(ja).registerApplication(Ga),void t(e);e.registerApplication(Ot).registerApplication(co).registerApplication(Je).registerApplication(xo).registerApplication(mt).registerApplication(Ta),t(e)}),n)):t(e)}),n))})).addInitializationStep((function(e,t){Ym.register(),t(e)})).addInitializationStep((function(e,t){ue.a.registerSingleton(new Jm({onlineRole:Qm.a.Staff,customerType:Xm.Primary})),t(e)})),rg.addStartUpStep((function(e,t,n){ue.a.getInstance(eu.a.FlightConfig).getConfig((function(){F.a.setUpVariables({isDevelopment:!1}),n(e,t),ue.a.releaseInstance(eu.a.FlightConfig)}))})),rg.start()},function(e,t){e.exports=v},function(e,t){e.exports=g},function(e,t){e.exports=b},function(e,t){e.exports=_}])}));