/*! * Mui Player Desktop Plugin Javascript Library v1.4.1 * Date:2022-01-16 * Released under GPL-3.0 license * https://muiplayer.js.org/ */ "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){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 _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,i=!0,r=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){r=!0,l=e},f:function(){try{i||null==o.return||o.return()}finally{if(r)throw l}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(o="Object"===o&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);or.width?r.width-a.width:e.clientX-r.left,r=e.clientY-r.top+a.height>r.height?r.height-a.height:e.clientY-r.top;o.style.top=r+"px",o.style.left=s+"px",o.focus(),setTimeout(function(){o.style.opacity=1},100)}},dcm:function(){var e=f.$method.dc;return[{name:e("03702W03303603802R039038037"),context:e("IY3JNBTGU"),click:function(){var e=f.$el.mPlayer.querySelector("#mplayer-shortcut");e&&(e.style.display="block"),f.$el.mPlayer.focus()}},]},onContextmenuEvent:function(e){e.preventDefault()}},a={togglePictureIcon:function(){return document.pictureInPictureElement?'':''},monitorPictureChange:function(){var t;f._this._global_.webpagePlugin.addMonitorPictureEvent||(f._this._global_.webpagePlugin.addMonitorPictureEvent=!0,t=function(){f.$el.mplayerFooter.querySelector("#picture-in-picture").innerHTML=a.togglePictureIcon()},f.$el.videoObject.addEventListener("enterpictureinpicture",function(e){f._this.emit("pip-change",{pip:!0}),t(),f.$data.isFullScreen&&f.$method.closeFullScreen(),f.$method.setTooltipText(f.$el.mplayerFooter.querySelector("#picture-in-picture"),f.$method.getLangObject().exitPictureInPicture)}),f.$el.videoObject.addEventListener("leavepictureinpicture",function(e){f._this.emit("pip-change",{pip:!1}),t(),f.$method.setTooltipText(f.$el.mplayerFooter.querySelector("#picture-in-picture"),f.$method.getLangObject().pictureInPicture)}))},onPictureInPicture:function(e){e.currentTarget.querySelector("svg").classList.contains("on-picture")?f.$el.videoObject!=document.pictureInPictureElement&&f.$el.videoObject.requestPictureInPicture():document.exitPictureInPicture(),a.monitorPictureChange()}},s={volumeContainer:null,el:null,$el:function(){return{volumeSize:s.volumeContainer.querySelector(".volume-size"),volumeCapacity:s.volumeContainer.querySelector(".volume-capacity"),volumeDragBall:s.volumeContainer.querySelector(".volume-drag-ball"),progressBar:s.volumeContainer.querySelector(".progress-bar")}},data:null,$data:function(){return{startY:null,moveY:null,_defaultVolumeSize:null,_capacityRect:{},_dragBallRect:{}}},toggleVolumeControl:function(e){var t;e=!0===s.getStorageVolume().muted?0:e,s.data&&(t=s.data._capacityRect.height*(e/100)-s.data._dragBallRect.height,s.el.volumeDragBall.style.bottom=(0=e?e:i.height,u.style.width=i.width+"px",u.style.height=r+"px",u.style.right=("previous"==o?p.width:-i.width)+"px",e=u.querySelector(".mp-panel-menu .mp-panel-selected"),t=u.querySelector('[panel-index="'+t+'"]'),a=e||t||u.querySelector("[panel-index]"),setTimeout(function(){a.focus()},250),setTimeout(function(){for(var e=s.querySelectorAll(".mp-panel"),t=0;t
');return n},createSettingPopup:function(t){var e=(new y.popupInstance).createPopupElement();e.setAttribute("popup-name","setting"),t instanceof Array?e.innerHTML='
':(e.innerHTML='
  • '+t.functions+"
",e.querySelector(".mp-panel-header .title").addEventListener("click",function(e){e.stopPropagation(),v.isFocusActive=!0,v.backPanel(t.panelIndex)}));for(var o=t instanceof Array?t:t.childConfig,n=0;n=e?e:o.height,l=t.querySelectorAll(".mp-popup .mp-panel,.mp-popup .mp-panel-menu"),i=0;is&&(e.style.backgroundImage="url("+c[s]+")"),!1===r.exist?((r=document.createElement("div")).setAttribute("class","mp-thumbnails thumbnails-scale"),r.style.outline="2px #FFFFFF solid",r.style.width=d+"px",r.style.height=g+"px",r.style.position="absolute",r.style.pointerEvents="none",r.appendChild(e),f.$el.touchEffective.appendChild(r)):r.appendChild(e));for(var e=f.$el.touchEffective.querySelectorAll(".preview-image"),t=0;tn&&e.clientXi&&e.clientYi&&e.clientXt&&e.clientY