"),this.list=list,this._activeOption()}else if(0===(null==list?void 0:list.length)){var _this__picker_innerHTML,_this__picker1;null==(_this__picker1=this._picker)||null==(_this__picker_innerHTML=_this__picker1.innerHTML)||_this__picker_innerHTML.call(_this__picker1,"")}},_proto._render=function(item){var _this__options_fieldNames;if(0!==this.list.length){var _this__options_fieldNames_label,labelKey=null!=(_this__options_fieldNames_label=null==(_this__options_fieldNames=this._options.fieldNames)?void 0:_this__options_fieldNames.label)?_this__options_fieldNames_label:"label";if(this.$container.querySelector(".ezplayer-select-btn"))this.$container.querySelector(".ezplayer-select-btn").innerHTML=null==this._options.renderLabel?void 0:this._options.renderLabel.call(this._options,null==item?void 0:item[labelKey],item,this.list);else{var $span=document.createElement("span");$span.classList.add("ezplayer-btn","ezplayer-select-btn"),$span.innerHTML=null==this._options.renderLabel?void 0:this._options.renderLabel.call(this._options,null==item?void 0:item[labelKey],item,this.list),this.$container.appendChild($span),this._options.title&&$span.setAttribute("title",this._options.title)}}},_proto._activeOption=function(){var _this=this;if(this._picker){var _this__options_fieldNames,_this__picker_$body,_this__picker_$body1,_this__options_fieldNames_value,valueKey=null!=(_this__options_fieldNames_value=null==(_this__options_fieldNames=this._options.fieldNames)?void 0:_this__options_fieldNames.value)?_this__options_fieldNames_value:"value",$active=null==(_this__picker_$body=this._picker.$body)?void 0:_this__picker_$body.querySelector(".ezplayer-active");null==$active||$active.classList.remove("ezplayer-active");var $target=null==(_this__picker_$body1=this._picker.$body)?void 0:_this__picker_$body1.querySelector('.ezplayer-select-option[data-value="'+this.value+'"]');null==$target||$target.classList.add("ezplayer-active");var target=this.list.find((function(item){return item[valueKey]+""===_this.value}));this._render(target)}},_proto._onSelectChange=function(){var _this=this;if(this._picker){var _this__options_fieldNames,_this__options_fieldNames_value,valueKey=null!=(_this__options_fieldNames_value=null==(_this__options_fieldNames=this._options.fieldNames)?void 0:_this__options_fieldNames.value)?_this__options_fieldNames_value:"value";this._delegationOption=delegate$1(this._picker.$body,".ezplayer-select-option","click",(function(e){var target=e.delegateTarget;if(e.stopPropagation(),!target.classList.contains("ezplayer-disabled")){var value=target.getAttribute("data-value");if(_this.value!==value){_this.value=value;var item=_this.list.find((function(item){return item[valueKey]+""===_this.value}));null==_this._options.onChange||_this._options.onChange.call(_this._options,_this.value,item),_this._picker.open=!1}}})),this._delegationClose=delegate$1(this._picker.$body,".ezplayer-select-close","click",(function(e){e.stopPropagation(),_this._picker.open=!1})),this._delegationCancel=delegate$1(this._picker.$body,".ezplayer-select-cancel","click",(function(e){e.stopPropagation(),_this._picker.open=!1}))}},_proto.destroy=function(){var _this__delegationOption_destroy,_this__delegationOption,_this__delegationClose_destroy,_this__delegationClose,_this__delegationCancel_destroy,_this__delegationCancel,_this__picker_$body,_this__picker;(null==(_this__delegationOption=this._delegationOption)||null==(_this__delegationOption_destroy=_this__delegationOption.destroy)||_this__delegationOption_destroy.call(_this__delegationOption),this._delegationOption=null,null==(_this__delegationClose=this._delegationClose)||null==(_this__delegationClose_destroy=_this__delegationClose.destroy)||_this__delegationClose_destroy.call(_this__delegationClose),this._delegationClose=null,null==(_this__delegationCancel=this._delegationCancel)||null==(_this__delegationCancel_destroy=_this__delegationCancel.destroy)||_this__delegationCancel_destroy.call(_this__delegationCancel),this._delegationCancel=null,this._picker)&&(null==(_this__picker_$body=this._picker.$body)||_this__picker_$body.removeEventListener("dblclick",this._onDBlPanelClick),null==(_this__picker=this._picker)||_this__picker.destroy(),this._picker=null);Control.prototype.destroy.call(this)},_proto._onDBlPanelClick=function(e){e.stopPropagation(),e.preventDefault()},_proto._onControlClick=function(e){null==this._options.onClick||this._options.onClick.call(this._options,e)},_create_class$1(Select,[{key:"value",get:function(){return this._value},set:function(value){this.value!==value&&(this._value=value,this._activeOption())}},{key:"disabled",get:function(){return this._disabled},set:function(disabled){this._disabled=disabled,this._picker.disabled=disabled,this._updateDisabledState(disabled)}}]),Select}(Control);function _assert_this_initialized$1(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _extends$7$1(){return _extends$7$1=Object.assign||function(target){for(var i=1;i
"+(null==options||null==(_options_locales_options_language=options.locales[options.language])?void 0:_options_locales_options_language.VIDEO_LEVEL_AUTO)+"("+((null==realItem?void 0:realItem.name)||"")+")"}return""+(label||(null==(_list_=list[0])?void 0:_list_.name)||"")+""},onChange:function(value,item){var _options_onChange;null==options||null==(_options_onChange=options.onChange)||_options_onChange.call(options,value,item),"auto"===value?_assert_this_initialized$1(_this).emit(EVENTS$1.control.definitionChange,"auto",_assert_this_initialized$1(_this)._level):(_assert_this_initialized$1(_this)._level=value,_assert_this_initialized$1(_this).emit(EVENTS$1.control.definitionChange,value,item))},onOpenChange:function(open,value,item){var _options_onOpenChange;null==options||null==(_options_onOpenChange=options.onOpenChange)||_options_onOpenChange.call(options,open,value,item),_assert_this_initialized$1(_this).emit(EVENTS$1.control.definitionPanelOpenChange,open,value,item)}}))||this)._level="",_this.options=options||{},_this.on(EVENTS$1.setVideoLevelList,(function(list){Select.prototype.updateOptions.call(_assert_this_initialized$1(_this),__filter(list,_this.locale))})),_this.on(EVENTS$1.currentVideoLevel,(function(item,realLevel){var obj,l="object"==(void 0===item?"undefined":(obj=item)&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj)?item.level:item;if(_this._level=realLevel+"","auto"===l){var _options_locales_options_language,realItem=_this.list.find((function(it){return it.level===_this._level}));_this.$container.querySelector(".ezplayer-select-btn").innerHTML="\n "+(null==options||null==(_options_locales_options_language=options.locales[options.language])?void 0:_options_locales_options_language.VIDEO_LEVEL_AUTO)+"("+((null==realItem?void 0:realItem.name)||"")+")\n "}else _this.value!==_this._level+""&&(_this.value=_this._level+"")})),_this}return function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of$8(subClass,superClass)}(Definition,Select),Definition.prototype.reset=function(hide){Select.prototype.reset.call(this,hide)},Definition}(Select);function _assert_this_initialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _extends$6$1(){return _extends$6$1=Object.assign||function(target){for(var i=1;i0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]\n '+this._getDateStr()+"\n "+IconComponents_filter()+"\n ":this.$container.innerHTML=IconComponents_date({title:null==(_this_locale1=this.locale)?void 0:_this_locale1.BTN_CALENDAR});this.dataPickerUtil=new DatePickerUtil(this.$container,{staticPath:this.options.staticPath,language:"zh"===this.options.language?"zh-CN":"en-US",current:new Date(this._value+" 00:00:00"),maxDate:this.options.maxDate||new Date,place:distExports$7.isMobile()?"bottom-left":"top-right",onChange:function(date){date&&_this._value!==DateTime$1.formate(date,"YYYY-MM-DD")&&(_this._value=DateTime$1.formate(date,"YYYY-MM-DD"),null==_this.options.onChange||_this.options.onChange.call(_this.options,date),_this.emit(EVENTS$1.control.dateChange,date),date&&_this.$container.querySelector(".ezplayer-mobile-date-filter-value")&&(_this.$container.querySelector(".ezplayer-mobile-date-filter-value").innerHTML=_this._getDateStr()))},onPanelChange:function(open,date){null==_this.options.onPanelChange||_this.options.onPanelChange.call(_this.options,open,date),_this.emit(EVENTS$1.control.datePanelOpenChange,open,date)}})},_proto.setDate=function(date,change){var _this_dataPickerUtil;void 0===change&&(change=!0),null==(_this_dataPickerUtil=this.dataPickerUtil)||_this_dataPickerUtil.setDate(date,change),date&&!change&&this._value!==DateTime$1.formate(date,"YYYY-MM-DD")&&(this._value=DateTime$1.formate(date,"YYYY-MM-DD"),date&&this.$container.querySelector(".ezplayer-mobile-date-filter-value")&&(this.$container.querySelector(".ezplayer-mobile-date-filter-value").innerHTML=this._getDateStr()))},_proto.reset=function(){var _this_dataPickerUtil;null==(_this_dataPickerUtil=this.dataPickerUtil)||_this_dataPickerUtil.hide(),Control.prototype.reset.call(this)},_proto.destroy=function(){this.dataPickerUtil&&(this.dataPickerUtil.destroy(),this.dataPickerUtil=null),Control.prototype.destroy.call(this)},_proto._getDateStr=function(){var arr=this._value.split("-");return arr[1]+"."+arr[2]},_proto._onControlClick=function(e){Control.prototype._onControlClick.call(this,e)},DatePickerControl}(Control);function _extends$4$1(){return _extends$4$1=Object.assign||function(target){for(var i=1;i'+this._splicingString(this.__options.deviceName,null==(_this___options_props=this.__options.props)||null==(_this___options_props_urlInfo=_this___options_props.urlInfo)?void 0:_this___options_props_urlInfo.deviceSerial)+""},_proto.update=function(deviceName,deviceSerial){if(this.$container.querySelector(".ezplayer-text-device")){var $span=this.$container.querySelector(".ezplayer-text-device"),text=this._splicingString(deviceName,deviceSerial);null==$span||$span.setAttribute("title",text),$span.innerHTML=text}},_proto._splicingString=function(deviceName,deviceSerial){return(deviceName||"")+(deviceSerial?deviceName?"("+deviceSerial+")":""+deviceSerial:"")},Device}(Control),Controls={play:Play,volume:Volume,device:Device,capturePicture:CapturePicture,ptz:Ptz$1,record:Record,talk:Talk,zoom:Zoom$1,definition:Definition,fullscreen:Fullscreen,globalFullscreen:GlobalFullscreen,rec:Rec,speed:Speed,date:DatePickerControl,timeLine:TimeLineControl};function _set_prototype_of$3(o,p){return _set_prototype_of$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$3(o,p)}var RecFooter=function(EventEmitter){function RecFooter(container,options){var _this;return void 0===options&&(options={hasDatePicker:!0}),(_this=EventEmitter.call(this)||this).options=options,_this.$container=container,_this.$popupContainer=document.createElement("div"),_this.$popupContainer.classList.add("ezplayer-rec-footer"),_this.options.hasDatePicker&&_this.$popupContainer.classList.add("ezplayer-rec-footer-has-date-picker"),_this.$container.appendChild(_this.$popupContainer),_this.$timeLineContainer=document.createElement("div"),_this.$timeLineContainer.classList.add("ezplayer-rec-footer-time-line"),_this.options.hasDatePicker&&(_this.$popupContainer.appendChild(_this.$timeLineContainer),_this.$datePickerContainer=document.createElement("div"),_this.$datePickerContainer.classList.add("ezplayer-rec-footer-date-picker"),_this.$popupContainer.appendChild(_this.$datePickerContainer)),_this.$popupContainer.addEventListener("dblclick",(function(e){e.preventDefault(),e.stopPropagation()})),_this}return function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of$3(subClass,superClass)}(RecFooter,EventEmitter),RecFooter.prototype.destroy=function(){var _this_$timeLineContainer_remove,_this_$timeLineContainer,_this_$popupContainer_remove,_this_$popupContainer;(this.$datePickerContainer&&(this.$datePickerContainer.remove(),this.$datePickerContainer=null),this.$timeLineContainer)&&(null==(_this_$timeLineContainer=this.$timeLineContainer)||null==(_this_$timeLineContainer_remove=_this_$timeLineContainer.remove)||_this_$timeLineContainer_remove.call(_this_$timeLineContainer),this.$timeLineContainer=null);this.$popupContainer&&(null==(_this_$popupContainer=this.$popupContainer)||null==(_this_$popupContainer_remove=_this_$popupContainer.remove)||_this_$popupContainer_remove.call(_this_$popupContainer),this.$popupContainer=null);this.emit(EVENTS$1.theme.recFooterDestroy)},RecFooter}(EventEmitter$1);function _set_prototype_of$2(o,p){return _set_prototype_of$2=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$2(o,p)}var MobileExtend=function(EventEmitter){function MobileExtend($siblingContainer){var _this;return(_this=EventEmitter.call(this)||this)._$siblingContainer=$siblingContainer,_this.render(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of$2(subClass,superClass)}(MobileExtend,EventEmitter);var _proto=MobileExtend.prototype;return _proto.render=function(){this.$container||(this.$container=document.createElement("div"),this.$container.classList.add("ezplayer-mobile-extend"),null==this._$siblingContainer.insertAdjacentElement||this._$siblingContainer.insertAdjacentElement.call(this._$siblingContainer,"afterend",this.$container),this.$controlPanel=document.createElement("div"),this.$controlPanel.classList.add("ezplayer-mobile-extend-control-panel"),this.$container.appendChild(this.$controlPanel),this.$content=document.createElement("div"),this.$content.classList.add("ezplayer-mobile-extend-control-content"),this.$controlPanel.appendChild(this.$content),this.$top=document.createElement("div"),this.$top.classList.add("ezplayer-mobile-extend-control-top"),this.$content.appendChild(this.$top),this.$topLeft=document.createElement("div"),this.$topLeft.classList.add("ezplayer-mobile-extend-control-top-left"),this.$top.appendChild(this.$topLeft),this.$topRight=document.createElement("div"),this.$topRight.classList.add("ezplayer-mobile-extend-control-top-right"),this.$top.appendChild(this.$topRight))},_proto.destroy=function(){var _this_$container;null==(_this_$container=this.$container)||_this_$container.remove(),this.emit(EVENTS$1.theme.mobileExtendDestroy)},MobileExtend}(EventEmitter$1);function _extends$2$1(){return _extends$2$1=Object.assign||function(target){for(var i=1;i'+IconComponents_play()+"",this._timer&&(clearTimeout(this._timer),this._timer=null),this._timer2&&(clearTimeout(this._timer2),this._timer2=null),null==(_this_$container=this.$container)||null==(_this_$container_classList=_this_$container.classList)||_this_$container_classList.remove("ezplayer-hide"),this._timer=setTimeout((function(){var _this_$container_classList,_this_$container;_this._timer&&(clearTimeout(_this._timer),_this._timer=null),always||(null==(_this_$container=_this.$container)||null==(_this_$container_classList=_this_$container.classList)||_this_$container_classList.add("ezplayer-pause-transform"),_this._timer2=setTimeout((function(){var _this_$container_classList,_this_$container,_this_$container_classList1,_this_$container1;_this._timer2&&(clearTimeout(_this._timer2),_this._timer2=null),null==(_this_$container=_this.$container)||null==(_this_$container_classList=_this_$container.classList)||_this_$container_classList.add("ezplayer-hide"),null==(_this_$container1=_this.$container)||null==(_this_$container_classList1=_this_$container1.classList)||_this_$container_classList1.remove("ezplayer-pause-transform")}),300))}),10))},_proto.destroy=function(){this._timer&&(clearTimeout(this._timer),this._timer=null),this._timer2&&(clearTimeout(this._timer2),this._timer2=null),this._timer3&&(clearTimeout(this._timer3),this._timer3=null),this.hide(),Control.prototype.destroy.call(this)},_proto._onControlClick=function(e){var _this=this;if(e.stopPropagation(),e.preventDefault(),this._firstFlag){if(this._timer3)return clearTimeout(this._timer3),void(this._timer3=null);this._timer3=setTimeout((function(){_this._timer3&&(clearTimeout(_this._timer3),_this._timer3=null),_this.emit(EVENTS$1.control.play,!0,"pause")}),250)}},Pause}(Control),_unmountedControls=function(theme){if(theme.controls){var hasControls=Object.keys(theme.controls).length>0||theme._header||theme._footer;if(theme._interactiveResult&&(null==theme._interactiveResult.cleanup||theme._interactiveResult.cleanup.call(theme._interactiveResult),theme._interactiveResult=null),hasControls&&theme.emit(EVENTS$1.control.beforeUnmountControls),Object.keys(theme.controls).length>0){for(var key in theme.controls){var _theme_controls_key_destroy,_theme_controls_key;null==(_theme_controls_key_destroy=(_theme_controls_key=theme.controls[key]).destroy)||_theme_controls_key_destroy.call(_theme_controls_key)}theme.controls=null}theme._pauseControl&&(null==theme._pauseControl.destroy||theme._pauseControl.destroy.call(theme._pauseControl)),theme._loadingControl&&(null==theme._loadingControl.destroy||theme._loadingControl.destroy.call(theme._loadingControl)),theme.messageControl&&(null==theme.messageControl.destroy||theme.messageControl.destroy.call(theme.messageControl)),theme.posterControl&&(null==theme.posterControl.destroy||theme.posterControl.destroy.call(theme.posterControl)),theme._headerMoreControl&&(null==theme._headerMoreControl.destroy||theme._headerMoreControl.destroy.call(theme._headerMoreControl),theme._headerMoreControl=null),theme._footerMoreControl&&(null==theme._footerMoreControl.destroy||theme._footerMoreControl.destroy.call(theme._footerMoreControl),theme._footerMoreControl=null),theme._recFooter&&(theme._recFooter.destroy(),theme._recFooter=null),theme._mobileExtend&&(theme._mobileExtend.destroy(),theme._mobileExtend=null),theme._header&&(theme._header.destroy(),theme._header=null),theme._footer&&(theme._footer.destroy(),theme._footer=null),theme._onPauseTimingFunc&&(theme._onPauseTimingFunc=null),hasControls&&theme.emit(EVENTS$1.control.unmountedControls)}};function _array_like_to_array$1(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i