!function(){"use strict";var e={3921:function(e,t,n){var i={};n.r(i),n.d(i,{addMediaToPlaylist:function(){return se},addNewPlaylist:function(){return ce},copyEmbedMediaCode:function(){return ne},copyShareLink:function(){return te},createPlaylist:function(){return re},deleteComment:function(){return ae},dislikeMedia:function(){return $},likeMedia:function(){return X},loadMediaData:function(){return K},removeMedia:function(){return ie},removeMediaFromPlaylist:function(){return le},reportMedia:function(){return ee},submitComment:function(){return oe},undislikeMedia:function(){return Q},unlikeMedia:function(){return J}});var o=n(2667),a=(n(5101),n(5466)),r=(n(6116),n(9518)),s=n(3074),l=n.n(s),c=n(920),u=n.n(c),d=n(2276),p=n(2787),f=n(4426),m=n(3811);function h(e){var t=null,n=e.split(".");if(n.length)switch(n=n[n.length-1]){case"webm":t="audio/webm";break;case"flac":t="audio/flac";break;case"wave":t="audio/wave";break;case"wav":t="audio/wav";break;case"ogg":case"ogg":t="audio/ogg";break;case"mp3":case"mpeg":t="audio/mpeg"}return t}n(2322),n(9268);var y=n(9688),b=n(5793),g=n(6983),v=n(9450);function w(e){return(w="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,t){for(var n=0;n'),this.AudioPlayerData.instance=new(u())(this.refs.AudioElem,{sources:this.videoSources,poster:this.videoPoster,autoplay:!this.props.inEmbed,bigPlayButton:!0,controlBar:{fullscreen:!1,theaterMode:!1,next:!this.props.inEmbed&&0this.refs.Text.offsetHeight;this.setState({enabledViewMoreContent:e,viewMoreContent:!!e&&this.state.viewMoreContent})}},{key:"toggleMore",value:function(){this.setState({viewMoreContent:!this.state.viewMoreContent})}},{key:"onPopupsDisplayChange",value:function(){this.setState({isOpenRemoveCommentPopup:this.removeCommentPopup.isPopupOpen()})}},{key:"cancelCommentRemoval",value:function(){this.removeCommentPopup.setOpenPopupState(!1)}},{key:"proceedCommentRemoval",value:function(){ae(this.props.comment_id),this.cancelCommentRemoval()}},{key:"render",value:function(){return a.createElement("div",{key:this.props.comment_id,className:"comment"},a.createElement("div",{className:"comment-inner"},a.createElement("a",{className:"comment-author-thumb",href:this.props.author_link,title:this.props.author_name},a.createElement("img",{src:this.props.author_thumb,alt:this.props.author_name})),a.createElement("div",{className:"comment-content"},a.createElement("div",{className:"comment-meta"},a.createElement("div",{className:"comment-author"},a.createElement("a",{href:this.props.author_link,title:this.props.author_name},this.props.author_name)),a.createElement("div",{className:"comment-date"},(0,_e.WU)(new Date(this.props.publish_date)))),a.createElement("div",{ref:"Text",className:"comment-text"+(this.state.viewMoreContent?" show-all":"")},a.createElement("div",{ref:"TextInner",className:"comment-text-inner",dangerouslySetInnerHTML:{__html:this.props.text}})),this.state.enabledViewMoreContent?a.createElement("button",{className:"toggle-more",onClick:this.toggleMore},this.state.viewMoreContent?"Show less":"Read more"):null,f.Z.get("config-user").can.deleteComment?a.createElement("div",{className:"comment-actions"},f.Z.get("config-user").can.deleteComment?a.createElement("div",{className:"comment-action remove-comment"},this.removeCommentPopup.triggerComponent(),this.state.isOpenRemoveCommentPopup?this.removeCommentPopup.contentComponent():null):null):null)))}}]),n}(a.PureComponent);Ae.propTypes={comment_id:l().oneOfType([l().string,l().number]).isRequired,media_id:l().oneOfType([l().string,l().number]).isRequired,text:l().string,author_name:l().string,author_link:l().string,author_thumb:l().string,publish_date:l().oneOfType([l().string,l().number]),likes:l().number,dislikes:l().number},Ae.defaultProps={author_name:"",author_link:"#",publish_date:0,likes:0,dislikes:0};var Fe=function(e){Re(n,e);var t=De(n);function n(e){var i;if(Ce(this,n),(i=t.call(this,e)).state={mediaId:d.Z.get("media-id")},f.Z.get("config-user").can.readComment){var o=d.Z.get("media-comments");i.state.comments=o,i.state.commentsLength=o?o.length:0,i.state.commentsLength||(i.onCommentsLoad=i.onCommentsLoad.bind(Ze(i)),i.onCommentSubmit=i.onCommentSubmit.bind(Ze(i)),i.onCommentSubmitFail=i.onCommentSubmitFail.bind(Ze(i)),i.onCommentDelete=i.onCommentDelete.bind(Ze(i)),i.onCommentDeleteFail=i.onCommentDeleteFail.bind(Ze(i)),d.Z.on("comments_load",i.onCommentsLoad),d.Z.on("comment_submit",i.onCommentSubmit),d.Z.on("comment_submit_fail",i.onCommentSubmitFail),d.Z.on("comment_delete",i.onCommentDelete),d.Z.on("comment_delete_fail",i.onCommentDeleteFail))}return i}return Se(n,[{key:"onCommentsLoad",value:function(){var e=d.Z.get("media-comments");this.setState({comments:e,commentsLength:e?e.length:0},(function(){}));var t=document.querySelector(".page-main"),n=t.querySelector(".no-comment");if(0===e.length&&"unlisted"===d.Z.get("media-data").state){if(-1×'+f.Z.get("config-contents").uploader.postUploadMessage,t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i),i.querySelector("button.close").addEventListener("click",(function(e){return i.setAttribute("class","alert info alert-dismissible hiding"),setTimeout(function(){i.parentNode.removeChild(i)}.bind(this),400),e.preventDefault(),e.stopPropagation(),!1}))}}else n&&0'+this.props.title+'".'})}},{key:"onFailedRateSubmit",value:function(e){this.setState({submitingScore:!1,message:'A problem has occurred when submitting your score for the category of "'+this.props.title+'". Please try again.'})}},{key:"onButtonClick",value:function(e){this.setState({score:e})}},{key:"submitRate",value:function(){this.setState({submitingScore:!0},(function(){var e,t;e=this.props.id,t=this.state.score,Y().dispatch({type:"RATE_SUBMIT",id:e,score:t})}))}},{key:"stars",value:function(){for(var e=[],t=1;t<6;)e.push(a.createElement("div",{key:t,className:(t<=this.state.score?"active":"")+(t===this.state.score?" selected":"")},a.createElement(ve.Z,{onClick:this.onButtonClick.bind(this,t)},a.createElement("i",{className:"material-icons"},"star_rate")))),t+=1;return e}},{key:"render",value:function(){return a.createElement("div",{className:"rating-category"+(this.state.submitingScore||null!==this.state.message?" submit-loading":"")},a.createElement("div",{className:"category-title"},this.props.title),a.createElement("div",{className:"stars"},this.stars()),a.createElement("div",{className:"rate-action"},a.createElement("button",{disabled:this.state.score===this.state.initialScore,onClick:this.state.score===this.state.initialScore?null:this.submitRate},"Submit score")),this.state.submitingScore?a.createElement("div",{className:"submit-loader"},a.createElement(Je.Z,null)):null,null!==this.state.message?a.createElement("div",{className:"submit-loader"},a.createElement("div",{className:"submit-msg"},a.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.message}})),a.createElement(ve.Z,{className:"close-msg",onClick:this.closeRateMessage},a.createElement("i",{className:"material-icons"},"clear"))):null)}}]),n}(a.PureComponent);lt.propTypes={id:l().oneOfType([l().string,l().number]).isRequired,title:l().string.isRequired,score:l().number.isRequired};var ct=function(e){nt(n,e);var t=ot(n);function n(e){var i;return Qe(this,n),(i=t.call(this,e)).state={extended:Xe.get("extended-rate-categories")},i.onClickExtend=i.onClickExtend.bind(rt(i)),i.onRateCategoriesToggle=i.onRateCategoriesToggle.bind(rt(i)),Xe.on("changed_rate_categories_visibility",i.onRateCategoriesToggle),i}return tt(n,[{key:"componentDidMount",value:function(){var e;e=this.props.media_id,Y().dispatch({type:"INIT",media_id:e})}},{key:"onClickExtend",value:function(){Y().dispatch({type:"EXTEND_RATE_CATEGORIES"})}},{key:"onRateCategoriesToggle",value:function(){this.setState({extended:Xe.get("extended-rate-categories")})}},{key:"ratingCategories",value:function(){for(var e=[],t=0;tf.Z.get("window-inner-width")-80?f.Z.get("window-inner-width")-80:null},t.onClickCopyMediaLink=t.onClickCopyMediaLink.bind(In(t)),t.onCompleteCopyMediaLink=t.onCompleteCopyMediaLink.bind(In(t)),t.inlineSlider=null,t.nextSlide=t.nextSlide.bind(In(t)),t.prevSlide=t.prevSlide.bind(In(t)),t.previousBtn=a.createElement("span",{className:"previous-slide"},a.createElement(ve.Z,{buttonShadow:!0,onClick:t.prevSlide},a.createElement("i",{className:"material-icons"},"keyboard_arrow_left"))),t.nextBtn=a.createElement("span",{className:"next-slide"},a.createElement(ve.Z,{buttonShadow:!0,onClick:t.nextSlide},a.createElement("i",{className:"material-icons"},"keyboard_arrow_right")));var o=d.Z.get("media-url"),l=d.Z.get("media-data").title,c=f.Z.get("config-media-share").options,u={};for(i=0;if.Z.get("window-inner-width")-80?f.Z.get("window-inner-width")-80:null},this.updateSlider)}},{key:"updateSlider",value:function(e){if(!this.inlineSlider){var t=this.refs.MediaShareOptionsContent.querySelector(".share-options-inner");t&&(this.inlineSlider=new Zn.Z(t,".sh-option"))}this.inlineSlider&&(this.inlineSlider.updateDataState(this.shareOptionsElems.length,!0,!0),this.updateSliderButtonsView())}},{key:"nextSlide",value:function(){this.inlineSlider.nextSlide(),this.updateSliderButtonsView(),this.inlineSlider.scrollToCurrentSlide()}},{key:"prevSlide",value:function(){this.inlineSlider.previousSlide(),this.updateSliderButtonsView(),this.inlineSlider.scrollToCurrentSlide()}},{key:"updateSliderButtonsView",value:function(){this.setState({displayPrev:this.inlineSlider.hasPreviousSlide(),displayNext:this.inlineSlider.hasNextSlide()})}},{key:"enableEvents",value:function(){f.Z.on("window_resize",this.onWindowResize),d.Z.on("copied_media_link",this.onCompleteCopyMediaLink)}},{key:"disableEvents",value:function(){f.Z.removeListener("window_resize",this.onWindowResize),d.Z.removeListener("copied_media_link",this.onCompleteCopyMediaLink)}},{key:"onClickCopyMediaLink",value:function(){te(this.refs.MediaShareOptionsContent.querySelector(".copy-field input"))}},{key:"onCompleteCopyMediaLink",value:function(){setTimeout(function(){be.wN("Link copied to clipboard","clipboardLinkCopy")}.bind(this),100)}},{key:"render",value:function(){return a.createElement("div",{ref:"MediaShareOptionsContent",style:null!==this.state.maxPopupWidth?{maxWidth:this.state.maxPopupWidth+"px"}:null},a.createElement("div",{className:"scrollable-content",style:null!==this.state.maxFormContentHeight?{maxHeight:this.state.maxFormContentHeight+"px"}:null},a.createElement("div",{className:"share-popup-title"},"Share media"),a.createElement("div",{ref:"ShareOptions",className:"share-options"},this.state.displayPrev?this.previousBtn:null,a.createElement("div",{className:"share-options-inner"},this.shareOptionsElems),this.state.displayNext?this.nextBtn:null)),a.createElement("div",{className:"copy-field"},a.createElement("div",null,a.createElement("input",{type:"text",readOnly:!0,value:d.Z.get("media-url")}),a.createElement("button",{onClick:this.onClickCopyMediaLink},"COPY"))))}}])&&Tn(t.prototype,n),s}(a.PureComponent);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 Un(e,t){for(var n=0;n=this.props.views?"view":"views"):null,a.createElement("div",{className:"media-actions"},a.createElement("div",null,f.Z.get("config-user").can.likeMedia?a.createElement(Pt,null):null,f.Z.get("config-user").can.dislikeMedia?a.createElement(Nt,null):null,f.Z.get("config-user").can.shareMedia?a.createElement(qn,null):null,f.Z.get("config-user").can.saveMedia&&-1this.listHandler.totalPages()||this.listHandler.loadedAllItems()?null:a.createElement("button",{className:"load-more",onClick:this.onClickLoadMore},"SHOW MORE")}}])&&ki(t.prototype,n),s}(Si.Y));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 Ai(e,t){for(var n=0;ne.defaultValue?e.minValue:e.defaultValue,t.state.currentValue=void 0!==e.maxValue&&e.maxValue'}),a.createElement("div",{className:"iframe-config"},a.createElement("div",{className:"iframe-config-options-title"},"Embed options"),a.createElement("div",{className:"iframe-config-option"},a.createElement("div",{className:"option-content"},a.createElement("div",{className:"ratio-options"},a.createElement("div",{className:"options-group"},a.createElement("label",{style:{minHeight:"36px"}},a.createElement("input",{type:"checkbox",checked:this.state.keepAspectRatio,onChange:this.onKeepAspectRatioChange}),"Keep aspect ratio")),this.state.keepAspectRatio?a.createElement("div",{className:"options-group"},a.createElement("select",{ref:"AspectRatioValue",onChange:this.onAspectRatioChange,value:this.state.aspectRatio},a.createElement("optgroup",{label:"Horizontal orientation"},a.createElement("option",{value:"16:9"},"16:9"),a.createElement("option",{value:"4:3"},"4:3"),a.createElement("option",{value:"3:2"},"3:2")),a.createElement("optgroup",{label:"Vertical orientation"},a.createElement("option",{value:"9:16"},"9:16"),a.createElement("option",{value:"3:4"},"3:4"),a.createElement("option",{value:"2:3"},"2:3")))):null),a.createElement("br",null),a.createElement("div",{className:"options-group"},a.createElement(Zo,{valueCallback:this.onEmbedWidthValueChange,unitCallback:this.onEmbedWidthUnitChange,label:"Width",defaultValue:parseInt(this.state.embedWidthValue,10),defaultUnit:this.state.embedWidthUnit,minValue:1,maxValue:99999,units:this.state.unitOptions})),a.createElement("div",{className:"options-group"},a.createElement(Zo,{valueCallback:this.onEmbedHeightValueChange,unitCallback:this.onEmbedHeightUnitChange,label:"Height",defaultValue:parseInt(this.state.embedHeightValue,10),defaultUnit:this.state.embedHeightUnit,minValue:1,maxValue:99999,units:this.state.unitOptions})))))),a.createElement("div",{ref:"OnRightBottom",className:"on-right-bottom"},a.createElement("button",{onClick:this.onClickCopyMediaLink},"COPY")))))}}])&&To(t.prototype,n),l}(a.PureComponent);function Vo(e){return(Vo="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 Uo(e,t){return(Uo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wo(e,t){return!t||"object"!==Vo(t)&&"function"!=typeof t?Ho(e):t}function Ho(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zo(e){return(zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bo=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&&Uo(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=zo(t);if(n){var o=zo(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Wo(this,e)});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)).state={isOpenPopup:!1,popupCurrentPage:"shareOptions"},t.onPopupsDisplayChange=t.onPopupsDisplayChange.bind(Ho(t)),t.onPopupPageChange=t.onPopupPageChange.bind(Ho(t)),t.triggerPopupClose=t.triggerPopupClose.bind(Ho(t));var n={shareOptions:a.createElement("div",{className:"popup-fullscreen"},a.createElement(Ee.W8,null,a.createElement("span",{className:"popup-fullscreen-overlay"}),a.createElement(Fn,null))),shareEmbed:a.createElement("div",{className:"popup-fullscreen share-embed-popup"},a.createElement(Ee.W8,null,a.createElement("span",{className:"popup-fullscreen-overlay"}),a.createElement(Fo,{triggerPopupClose:t.triggerPopupClose})))};return t.sharePopup=new ke.Z(a.createElement("button",null,a.createElement(ve.Z,{type:"span"},a.createElement(ge.Z,{type:"share"})),a.createElement("span",null,"SHARE")),a.createElement(Vt.o,{initPage:t.state.popupCurrentPage,pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id",pages:n,focusFirstItemOnPageChange:!1,pageChangeCallback:t.onPopupPageChange}),t.onPopupsDisplayChange),t}return o}(qn);function qo(e){return(qo="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 Go(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yo(e,t){for(var n=0;n=this.props.views?"view":"views"):null,a.createElement("div",{className:"media-actions"},a.createElement("div",null,f.Z.get("config-user").can.likeMedia?a.createElement(Pt,null):null,f.Z.get("config-user").can.dislikeMedia?a.createElement(Nt,null):null,f.Z.get("config-user").can.shareMedia?a.createElement(Bo,null):null,f.Z.get("config-user").can.saveMedia&&-1a[this.id].minutes?"0":"")+a[this.id].minutes+":"+a[this.id].fn.infoToString(a[this.id].seconds)),a[this.id].toString}},{key:"ariaLabel",value:function(){if(void 0===a[this.id].ariaLabel){var e=[];0this.state.totalItems},o.prototype.loadMoreItems=function(){return this.state.currentSlide+this.state.slideItemsFit>=this.state.maxSlideIndex},o.prototype.itemsFit=function(){return this.state.slideItemsFit}},7448:function(e,t,n){n.d(t,{Z:function(){return p}}),n(5101);var i=n(5466),o=(n(6116),n(3074)),a=n.n(o);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n