@ezuikit/player-theme 2.0.2-beta.1 → 2.0.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +174 -639
- package/dist/index.mjs +175 -640
- package/dist/index.umd.js +524 -816
- package/dist/style.css +3 -2
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +70 -45
- package/package.json +10 -6
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.2-beta.
|
|
3
|
-
* Copyright (c) 2025-12-
|
|
2
|
+
* @ezuikit/player-theme v2.0.2-beta.10
|
|
3
|
+
* Copyright (c) 2025-12-13 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
@@ -391,7 +391,8 @@
|
|
|
391
391
|
'speed',
|
|
392
392
|
'urlInfo',
|
|
393
393
|
'videoLevelList',
|
|
394
|
-
'videoLevel'
|
|
394
|
+
'videoLevel',
|
|
395
|
+
'recMonth'
|
|
395
396
|
];
|
|
396
397
|
/**
|
|
397
398
|
* 当移动端 picker 控件打开时需要关闭动画(定时器)
|
|
@@ -537,8 +538,9 @@
|
|
|
537
538
|
/** 全局全屏控件销毁 */ globalFullscreenDestroy: 'Control.globalFullscreenDestroy',
|
|
538
539
|
/** 日期面板展示隐藏变换 */ datePanelOpenChange: 'Control.datePanelOpenChange',
|
|
539
540
|
/** 日期改变 */ dateChange: 'Control.dateChange',
|
|
541
|
+
/** 日期改变 */ dateMonthChange: 'Control.dateMonthChange',
|
|
540
542
|
/** 日期销毁 */ dateDestroy: 'Control.datePanelDestroy',
|
|
541
|
-
/**
|
|
543
|
+
/** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
|
|
542
544
|
/** 时间轴图片列表面板 */ timeLinePanelOpenChange: 'Control.timeLinePanelOpenChange',
|
|
543
545
|
/** 时间轴控件销毁 */ timeLineDestroy: 'Control.timeLineDestroy',
|
|
544
546
|
/** 主题控件挂载前 切换新的主题也会触发,如果想首次获取需要在 onInitializing 回调中进行监听 */ beforeMountControls: 'Control.beforeMountControls',
|
|
@@ -549,7 +551,7 @@
|
|
|
549
551
|
/** 加载控件销毁 */ loadingDestroy: 'Control.loadingDestroy',
|
|
550
552
|
/** 消息控件销毁 */ messageDestroy: 'Control.messageDestroy',
|
|
551
553
|
/** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
|
|
552
|
-
contentRerender: 'Control.contentRerender'
|
|
554
|
+
/** 播放器内容区域重新渲染 */ contentRerender: 'Control.contentRerender'
|
|
553
555
|
},
|
|
554
556
|
/**
|
|
555
557
|
* 主题控件相关
|
|
@@ -616,9 +618,14 @@
|
|
|
616
618
|
function Control(options) {
|
|
617
619
|
var _this;
|
|
618
620
|
var _this___options;
|
|
619
|
-
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false;
|
|
621
|
+
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false, _this._camelCaseName = '';
|
|
620
622
|
_this.__options = options;
|
|
621
623
|
_this.locale = getLocale(_this.__options.locales, _this.__options.language);
|
|
624
|
+
_this._camelCaseName = _this.__options.classNameSuffix ? _this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
625
|
+
return c ? c.toUpperCase() : '';
|
|
626
|
+
}).replace(/^(.)/, function(first) {
|
|
627
|
+
return first.toLowerCase();
|
|
628
|
+
}) : '';
|
|
622
629
|
_this.$container = document.createElement(options.tagName || 'span');
|
|
623
630
|
_this.$container.classList.add("" + PREFIX_CLASS + "-control"); // 默认隐藏
|
|
624
631
|
if ((options == null ? void 0 : options.controlType) === 'text') {
|
|
@@ -777,19 +784,6 @@
|
|
|
777
784
|
this._disabled = disabled;
|
|
778
785
|
this._updateDisabledState(disabled);
|
|
779
786
|
}
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
key: "_camelCaseName",
|
|
783
|
-
get: function get() {
|
|
784
|
-
if (this.__options.classNameSuffix) {
|
|
785
|
-
return this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
786
|
-
return c ? c.toUpperCase() : '';
|
|
787
|
-
}).replace(/^(.)/, function(first) {
|
|
788
|
-
return first.toLowerCase();
|
|
789
|
-
});
|
|
790
|
-
}
|
|
791
|
-
return null;
|
|
792
|
-
}
|
|
793
787
|
}
|
|
794
788
|
]);
|
|
795
789
|
return Control;
|
|
@@ -1472,8 +1466,8 @@
|
|
|
1472
1466
|
/**
|
|
1473
1467
|
* picker component for js framework, support mobile and pc
|
|
1474
1468
|
*
|
|
1475
|
-
* @skax/picker v1.1.
|
|
1476
|
-
* Copyright (c) 2025-
|
|
1469
|
+
* @skax/picker v1.1.7
|
|
1470
|
+
* Copyright (c) 2025-12-08 ShineShao <xiaoshaoqq@gmail.com>
|
|
1477
1471
|
*
|
|
1478
1472
|
* This source code is licensed under the MIT license found in the
|
|
1479
1473
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1617,7 +1611,8 @@
|
|
|
1617
1611
|
trigger: 'click',
|
|
1618
1612
|
mouseLeaveDelay: 0.1,
|
|
1619
1613
|
mouseEnterDelay: 0.1,
|
|
1620
|
-
isMobile: false
|
|
1614
|
+
isMobile: false,
|
|
1615
|
+
triggerClose: false
|
|
1621
1616
|
};
|
|
1622
1617
|
/**
|
|
1623
1618
|
* Picker 弹窗, 支持 PC 和移动端
|
|
@@ -1673,6 +1668,7 @@
|
|
|
1673
1668
|
(_this__$popupContainer1 = this._$popupContainer) == null ? void 0 : _this__$popupContainer1.appendChild(this.$wrapperContent);
|
|
1674
1669
|
this._onContentClick = this._onContentClick.bind(this);
|
|
1675
1670
|
this._onShow = this._onShow.bind(this);
|
|
1671
|
+
this._onContainerClick = this._onContainerClick.bind(this);
|
|
1676
1672
|
this._onWrapperShow = this._onWrapperShow.bind(this);
|
|
1677
1673
|
this._onHide = this._onHide.bind(this);
|
|
1678
1674
|
this._onDocumentClick = this._onDocumentClick.bind(this);
|
|
@@ -1755,7 +1751,7 @@
|
|
|
1755
1751
|
var _this_$wrapperContent, _this_$container_removeEventListener, _this_$container, _this_$container_removeEventListener1, _this_$container1;
|
|
1756
1752
|
(_this_$wrapperContent = this.$wrapperContent) == null ? void 0 : _this_$wrapperContent.removeEventListener('click', this._onContentClick);
|
|
1757
1753
|
(_this_$container = this.$container) == null ? void 0 : (_this_$container_removeEventListener = _this_$container.removeEventListener) == null ? void 0 : _this_$container_removeEventListener.call(_this_$container, 'click', this._onContentClick);
|
|
1758
|
-
if (this._options.trigger === 'click') (_this_$container1 = this.$container) == null ? void 0 : (_this_$container_removeEventListener1 = _this_$container1.removeEventListener) == null ? void 0 : _this_$container_removeEventListener1.call(_this_$container1, 'click', this.
|
|
1754
|
+
if (this._options.trigger === 'click') (_this_$container1 = this.$container) == null ? void 0 : (_this_$container_removeEventListener1 = _this_$container1.removeEventListener) == null ? void 0 : _this_$container_removeEventListener1.call(_this_$container1, 'click', this._onContainerClick);
|
|
1759
1755
|
if (this._options.trigger === 'hover') {
|
|
1760
1756
|
var _this_$container_removeEventListener2, _this_$container2, _this_$container_removeEventListener3, _this_$container3, _this_$container_removeEventListener4, _this_$container4,
|
|
1761
1757
|
// prettier-ignore
|
|
@@ -1794,14 +1790,14 @@
|
|
|
1794
1790
|
var $popupContainerRect = this._$popupContainer.getBoundingClientRect();
|
|
1795
1791
|
// 容器的坐标 - 挂载的容器的坐标差
|
|
1796
1792
|
// prettier-ignore
|
|
1797
|
-
var containerLeft = $containerRect.left - $popupContainerRect.left;
|
|
1798
|
-
var containerRight = -($containerRect.right - $popupContainerRect.right);
|
|
1793
|
+
var containerLeft = Math.ceil($containerRect.left) - Math.ceil($popupContainerRect.left);
|
|
1794
|
+
var containerRight = -(Math.ceil($containerRect.right) - Math.ceil($popupContainerRect.right));
|
|
1799
1795
|
// prettier-ignore
|
|
1800
|
-
var containerTop = $containerRect.y - $popupContainerRect.y;
|
|
1801
|
-
var left = containerLeft + ($containerRect.width - $wrapperContentRect.width) / 2;
|
|
1796
|
+
var containerTop = Math.ceil($containerRect.y) - Math.ceil($popupContainerRect.y);
|
|
1797
|
+
var left = containerLeft + (Math.ceil($containerRect.width) - Math.ceil($wrapperContentRect.width)) / 2;
|
|
1802
1798
|
var right;
|
|
1803
|
-
var top = containerTop - $wrapperContentRect.height;
|
|
1804
|
-
var bottom = containerTop + $containerRect.height;
|
|
1799
|
+
var top = containerTop - Math.ceil($wrapperContentRect.height);
|
|
1800
|
+
var bottom = containerTop + Math.ceil($containerRect.height);
|
|
1805
1801
|
if (/^t/.test(this._options.placement)) {
|
|
1806
1802
|
var _this__options_offset, _this__options_offset1, _this__options_offset2;
|
|
1807
1803
|
switch (this._options.placement) {
|
|
@@ -1877,7 +1873,7 @@
|
|
|
1877
1873
|
this.$wrapperContent.addEventListener('click', this._onContentClick);
|
|
1878
1874
|
(_this_$container = this.$container) == null ? void 0 : (_this_$container_addEventListener = _this_$container.addEventListener) == null ? void 0 : _this_$container_addEventListener.call(_this_$container, 'click', this._onContentClick);
|
|
1879
1875
|
//
|
|
1880
|
-
if (this._options.trigger === 'click') (_this_$container1 = this.$container) == null ? void 0 : (_this_$container_addEventListener1 = _this_$container1.addEventListener) == null ? void 0 : _this_$container_addEventListener1.call(_this_$container1, 'click', this.
|
|
1876
|
+
if (this._options.trigger === 'click') (_this_$container1 = this.$container) == null ? void 0 : (_this_$container_addEventListener1 = _this_$container1.addEventListener) == null ? void 0 : _this_$container_addEventListener1.call(_this_$container1, 'click', this._onContainerClick);
|
|
1881
1877
|
if (this._options.trigger === 'hover') {
|
|
1882
1878
|
var _this_$container_addEventListener2, _this_$container2, _this_$container_addEventListener3, _this_$container3, _this_$container_addEventListener4, _this_$container4;
|
|
1883
1879
|
(_this_$container2 = this.$container) == null ? void 0 : (_this_$container_addEventListener2 = _this_$container2.addEventListener) == null ? void 0 : _this_$container_addEventListener2.call(_this_$container2, 'mouseenter', this._onShow);
|
|
@@ -1902,6 +1898,23 @@
|
|
|
1902
1898
|
pickerProvider.closeOther(e);
|
|
1903
1899
|
};
|
|
1904
1900
|
/**
|
|
1901
|
+
* $container click event
|
|
1902
|
+
* @param event - 鼠标点击事件
|
|
1903
|
+
* @returns
|
|
1904
|
+
*/
|
|
1905
|
+
_proto._onContainerClick = function _onContainerClick(event) {
|
|
1906
|
+
var _this_$wrapperContent_contains, _this_$wrapperContent;
|
|
1907
|
+
if (this._disabled) return;
|
|
1908
|
+
// wrapper contain
|
|
1909
|
+
var contain = ((_this_$wrapperContent = this.$wrapperContent) == null ? void 0 : (_this_$wrapperContent_contains = _this_$wrapperContent.contains) == null ? void 0 : _this_$wrapperContent_contains.call(_this_$wrapperContent, event.target)) || this.$wrapperContent === event.target;
|
|
1910
|
+
// open 状态下触发关闭
|
|
1911
|
+
if (this._options.triggerClose && this._options.trigger === 'click' && !contain) {
|
|
1912
|
+
this.open = !this.open;
|
|
1913
|
+
} else {
|
|
1914
|
+
this.open = true;
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
/**
|
|
1905
1918
|
* 显示事件
|
|
1906
1919
|
*/
|
|
1907
1920
|
_proto._onShow = function _onShow() {
|
|
@@ -2040,145 +2053,153 @@
|
|
|
2040
2053
|
* Picker.VERSION; // 输出版本号
|
|
2041
2054
|
* ```
|
|
2042
2055
|
*/
|
|
2043
|
-
Picker.VERSION = '1.1.
|
|
2056
|
+
Picker.VERSION = '1.1.7';
|
|
2044
2057
|
|
|
2045
2058
|
dist$a = Picker;
|
|
2046
2059
|
return dist$a;
|
|
2047
2060
|
}
|
|
2048
2061
|
|
|
2049
|
-
var distExports$
|
|
2050
|
-
var Picker = /*@__PURE__*/getDefaultExportFromCjs(distExports$
|
|
2062
|
+
var distExports$7 = requireDist$a();
|
|
2063
|
+
var Picker = /*@__PURE__*/getDefaultExportFromCjs(distExports$7);
|
|
2064
|
+
|
|
2065
|
+
var delegate$2 = {exports: {}};
|
|
2051
2066
|
|
|
2052
2067
|
/*
|
|
2053
|
-
* delegate.js v4.0.
|
|
2054
|
-
* Copyright (c) 2025-11-
|
|
2068
|
+
* delegate.js v4.0.1
|
|
2069
|
+
* Copyright (c) 2025-11-23
|
|
2055
2070
|
* Released under the MIT License.
|
|
2056
2071
|
*/
|
|
2072
|
+
var delegate$1 = delegate$2.exports;
|
|
2073
|
+
|
|
2074
|
+
var hasRequiredDelegate;
|
|
2075
|
+
|
|
2076
|
+
function requireDelegate () {
|
|
2077
|
+
if (hasRequiredDelegate) return delegate$2.exports;
|
|
2078
|
+
hasRequiredDelegate = 1;
|
|
2079
|
+
(function (module, exports) {
|
|
2080
|
+
(function (global, factory) {
|
|
2081
|
+
module.exports = factory() ;
|
|
2082
|
+
})(delegate$1, (function () {
|
|
2083
|
+
var DOCUMENT_NODE_TYPE = 9;
|
|
2084
|
+
/**
|
|
2085
|
+
* A polyfill for Element.matches()
|
|
2086
|
+
*/ if (typeof Element !== "undefined" && !Element.prototype.matches) {
|
|
2087
|
+
var proto = Element.prototype;
|
|
2088
|
+
proto.matches = (proto == null ? void 0 : proto.matchesSelector) || (proto == null ? void 0 : proto.mozMatchesSelector) || (proto == null ? void 0 : proto.msMatchesSelector) || (proto == null ? void 0 : proto.oMatchesSelector) || (proto == null ? void 0 : proto.webkitMatchesSelector);
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Finds the closest parent that matches a selector.
|
|
2092
|
+
*
|
|
2093
|
+
* @param {Element} element
|
|
2094
|
+
* @param {string} selector
|
|
2095
|
+
* @return {Element}
|
|
2096
|
+
*/ function closest(element, selector) {
|
|
2097
|
+
while(element && element.nodeType !== DOCUMENT_NODE_TYPE){
|
|
2098
|
+
if (typeof element.matches === "function" && element.matches(selector)) {
|
|
2099
|
+
return element;
|
|
2100
|
+
}
|
|
2101
|
+
element = element.parentNode;
|
|
2102
|
+
}
|
|
2103
|
+
return null;
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* Finds the closest parent that matches a selector.
|
|
2107
|
+
*
|
|
2108
|
+
* @param {Element} element
|
|
2109
|
+
* @param {string} selector
|
|
2110
|
+
* @return {Element}
|
|
2111
|
+
*/ function closestNative(element, selector) {
|
|
2112
|
+
return element && element.closest(selector);
|
|
2113
|
+
}
|
|
2114
|
+
var closest$1 = typeof Element.prototype.closest === "function" ? closestNative : closest;
|
|
2115
|
+
|
|
2116
|
+
/**
|
|
2117
|
+
* Delegates event to a selector.
|
|
2118
|
+
*
|
|
2119
|
+
* @param {Element} element
|
|
2120
|
+
* @param {string} selector
|
|
2121
|
+
* @param {string} type
|
|
2122
|
+
* @param {Function} callback
|
|
2123
|
+
* @param {boolean} useCapture
|
|
2124
|
+
* @return {Object}
|
|
2125
|
+
*/ // prettier-ignore
|
|
2126
|
+
function _delegate(element, selector, type, callback, useCapture) {
|
|
2127
|
+
// prettier-ignore
|
|
2128
|
+
var listenerFn = listener.apply(this, arguments);
|
|
2129
|
+
element.addEventListener(type, listenerFn, useCapture);
|
|
2130
|
+
return {
|
|
2131
|
+
destroy: function destroy() {
|
|
2132
|
+
element.removeEventListener(type, listenerFn, useCapture);
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Delegates event to a selector.
|
|
2138
|
+
*
|
|
2139
|
+
* @param {Element|string|Array} [elements]
|
|
2140
|
+
* @param {string | Element} selector
|
|
2141
|
+
* @param {string} type
|
|
2142
|
+
* @param {Function} callback
|
|
2143
|
+
* @param {boolean} useCapture
|
|
2144
|
+
* @return {Object}
|
|
2145
|
+
* @example
|
|
2146
|
+
* ```ts
|
|
2147
|
+
* const delegation = delegate(document.body, 'a', 'click', function (e) {})
|
|
2148
|
+
* // destroy (removeEventListener)
|
|
2149
|
+
* delegation.destroy();
|
|
2150
|
+
*
|
|
2151
|
+
* const delegation1 = delegate(".btn", "click", function (e) { console.log(e.delegateTarget)},false);
|
|
2152
|
+
* // destroy (removeEventListener)
|
|
2153
|
+
* delegation1.destroy();
|
|
2154
|
+
* ```
|
|
2155
|
+
*/ // prettier-ignore
|
|
2156
|
+
function delegate(elements, selector, type, callback, useCapture) {
|
|
2157
|
+
// Handle the regular Element usage
|
|
2158
|
+
if (typeof elements.addEventListener === "function") {
|
|
2159
|
+
return _delegate.apply(null, arguments);
|
|
2160
|
+
}
|
|
2161
|
+
// Handle Element-less usage, it defaults to global delegation
|
|
2162
|
+
if (typeof type === "function") {
|
|
2163
|
+
// Use `document` as the first parameter, then apply arguments
|
|
2164
|
+
// This is a short way to .unshift `arguments` without running into deoptimizations
|
|
2165
|
+
return _delegate.bind(null, document).apply(null, arguments);
|
|
2166
|
+
}
|
|
2167
|
+
// Handle Selector-based usage
|
|
2168
|
+
if (typeof elements === "string") {
|
|
2169
|
+
elements = document.querySelectorAll(elements);
|
|
2170
|
+
}
|
|
2171
|
+
// Handle Array-like based usage
|
|
2172
|
+
return Array.prototype.map.call(elements, function(element) {
|
|
2173
|
+
return _delegate(element, selector, type, callback, useCapture);
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
/**
|
|
2177
|
+
* Finds closest match and invokes callback.
|
|
2178
|
+
*
|
|
2179
|
+
* @param {Element} element
|
|
2180
|
+
* @param {string} selector
|
|
2181
|
+
* @param {string} type
|
|
2182
|
+
* @param {Function} callback
|
|
2183
|
+
* @return {Function}
|
|
2184
|
+
*/ // prettier-ignore
|
|
2185
|
+
function listener(element, selector, type, callback) {
|
|
2186
|
+
return function(e) {
|
|
2187
|
+
e.delegateTarget = closest$1(e.target, selector);
|
|
2188
|
+
if (e.delegateTarget) {
|
|
2189
|
+
callback.call(element, e);
|
|
2190
|
+
}
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2057
2193
|
|
|
2058
|
-
|
|
2059
|
-
var hasRequiredDist$9;
|
|
2060
|
-
|
|
2061
|
-
function requireDist$9 () {
|
|
2062
|
-
if (hasRequiredDist$9) return dist$9;
|
|
2063
|
-
hasRequiredDist$9 = 1;
|
|
2064
|
-
|
|
2065
|
-
const DOCUMENT_NODE_TYPE = 9;
|
|
2066
|
-
/**
|
|
2067
|
-
* A polyfill for Element.matches()
|
|
2068
|
-
*/ if (typeof Element !== "undefined" && !Element.prototype.matches) {
|
|
2069
|
-
const proto = Element.prototype;
|
|
2070
|
-
proto.matches = (proto == null ? void 0 : proto.matchesSelector) || (proto == null ? void 0 : proto.mozMatchesSelector) || (proto == null ? void 0 : proto.msMatchesSelector) || (proto == null ? void 0 : proto.oMatchesSelector) || (proto == null ? void 0 : proto.webkitMatchesSelector);
|
|
2071
|
-
}
|
|
2072
|
-
/**
|
|
2073
|
-
* Finds the closest parent that matches a selector.
|
|
2074
|
-
*
|
|
2075
|
-
* @param {Element} element
|
|
2076
|
-
* @param {string} selector
|
|
2077
|
-
* @return {Element}
|
|
2078
|
-
*/ function closest(element, selector) {
|
|
2079
|
-
while(element && element.nodeType !== DOCUMENT_NODE_TYPE){
|
|
2080
|
-
if (typeof element.matches === "function" && element.matches(selector)) {
|
|
2081
|
-
return element;
|
|
2082
|
-
}
|
|
2083
|
-
element = element.parentNode;
|
|
2084
|
-
}
|
|
2085
|
-
return null;
|
|
2086
|
-
}
|
|
2087
|
-
/**
|
|
2088
|
-
* Finds the closest parent that matches a selector.
|
|
2089
|
-
*
|
|
2090
|
-
* @param {Element} element
|
|
2091
|
-
* @param {string} selector
|
|
2092
|
-
* @return {Element}
|
|
2093
|
-
*/ function closestNative(element, selector) {
|
|
2094
|
-
return element && element.closest(selector);
|
|
2095
|
-
}
|
|
2096
|
-
var closest$1 = typeof Element.prototype.closest === "function" ? closestNative : closest;
|
|
2097
|
-
|
|
2098
|
-
/**
|
|
2099
|
-
* Delegates event to a selector.
|
|
2100
|
-
*
|
|
2101
|
-
* @param {Element} element
|
|
2102
|
-
* @param {string} selector
|
|
2103
|
-
* @param {string} type
|
|
2104
|
-
* @param {Function} callback
|
|
2105
|
-
* @param {boolean} useCapture
|
|
2106
|
-
* @return {Object}
|
|
2107
|
-
*/ // prettier-ignore
|
|
2108
|
-
function _delegate(element, selector, type, callback, useCapture) {
|
|
2109
|
-
// prettier-ignore
|
|
2110
|
-
const listenerFn = listener.apply(this, arguments);
|
|
2111
|
-
element.addEventListener(type, listenerFn, useCapture);
|
|
2112
|
-
return {
|
|
2113
|
-
destroy: function() {
|
|
2114
|
-
element.removeEventListener(type, listenerFn, useCapture);
|
|
2115
|
-
}
|
|
2116
|
-
};
|
|
2117
|
-
}
|
|
2118
|
-
/**
|
|
2119
|
-
* Delegates event to a selector.
|
|
2120
|
-
*
|
|
2121
|
-
* @param {Element|string|Array} [elements]
|
|
2122
|
-
* @param {string | Element} selector
|
|
2123
|
-
* @param {string} type
|
|
2124
|
-
* @param {Function} callback
|
|
2125
|
-
* @param {boolean} useCapture
|
|
2126
|
-
* @return {Object}
|
|
2127
|
-
* @example
|
|
2128
|
-
* ```ts
|
|
2129
|
-
* const delegation = delegate(document.body, 'a', 'click', function (e) {})
|
|
2130
|
-
* // destroy (removeEventListener)
|
|
2131
|
-
* delegation.destroy();
|
|
2132
|
-
*
|
|
2133
|
-
* const delegation1 = delegate(".btn", "click", function (e) { console.log(e.delegateTarget)},false);
|
|
2134
|
-
* // destroy (removeEventListener)
|
|
2135
|
-
* delegation1.destroy();
|
|
2136
|
-
* ```
|
|
2137
|
-
*/ // prettier-ignore
|
|
2138
|
-
function delegate(elements, selector, type, callback, useCapture) {
|
|
2139
|
-
// Handle the regular Element usage
|
|
2140
|
-
if (typeof elements.addEventListener === "function") {
|
|
2141
|
-
return _delegate.apply(null, arguments);
|
|
2142
|
-
}
|
|
2143
|
-
// Handle Element-less usage, it defaults to global delegation
|
|
2144
|
-
if (typeof type === "function") {
|
|
2145
|
-
// Use `document` as the first parameter, then apply arguments
|
|
2146
|
-
// This is a short way to .unshift `arguments` without running into deoptimizations
|
|
2147
|
-
return _delegate.bind(null, document).apply(null, arguments);
|
|
2148
|
-
}
|
|
2149
|
-
// Handle Selector-based usage
|
|
2150
|
-
if (typeof elements === "string") {
|
|
2151
|
-
elements = document.querySelectorAll(elements);
|
|
2152
|
-
}
|
|
2153
|
-
// Handle Array-like based usage
|
|
2154
|
-
return Array.prototype.map.call(elements, function(element) {
|
|
2155
|
-
return _delegate(element, selector, type, callback, useCapture);
|
|
2156
|
-
});
|
|
2157
|
-
}
|
|
2158
|
-
/**
|
|
2159
|
-
* Finds closest match and invokes callback.
|
|
2160
|
-
*
|
|
2161
|
-
* @param {Element} element
|
|
2162
|
-
* @param {string} selector
|
|
2163
|
-
* @param {string} type
|
|
2164
|
-
* @param {Function} callback
|
|
2165
|
-
* @return {Function}
|
|
2166
|
-
*/ // prettier-ignore
|
|
2167
|
-
function listener(element, selector, type, callback) {
|
|
2168
|
-
return function(e) {
|
|
2169
|
-
e.delegateTarget = closest$1(e.target, selector);
|
|
2170
|
-
if (e.delegateTarget) {
|
|
2171
|
-
callback.call(element, e);
|
|
2172
|
-
}
|
|
2173
|
-
};
|
|
2174
|
-
}
|
|
2194
|
+
return delegate;
|
|
2175
2195
|
|
|
2176
|
-
|
|
2177
|
-
|
|
2196
|
+
}));
|
|
2197
|
+
} (delegate$2));
|
|
2198
|
+
return delegate$2.exports;
|
|
2178
2199
|
}
|
|
2179
2200
|
|
|
2180
|
-
var
|
|
2181
|
-
var delegate = /*@__PURE__*/getDefaultExportFromCjs(
|
|
2201
|
+
var delegateExports = requireDelegate();
|
|
2202
|
+
var delegate = /*@__PURE__*/getDefaultExportFromCjs(delegateExports);
|
|
2182
2203
|
|
|
2183
2204
|
var cjs;
|
|
2184
2205
|
var hasRequiredCjs;
|
|
@@ -2324,25 +2345,25 @@
|
|
|
2324
2345
|
var cjsExports = requireCjs();
|
|
2325
2346
|
var deepmerge = /*@__PURE__*/getDefaultExportFromCjs(cjsExports);
|
|
2326
2347
|
|
|
2327
|
-
var dist$
|
|
2348
|
+
var dist$9 = {};
|
|
2328
2349
|
|
|
2329
2350
|
/*
|
|
2330
|
-
* @ezuikit/utils-tools v2.0.1
|
|
2351
|
+
* @ezuikit/utils-tools v2.0.1
|
|
2331
2352
|
* tools utils
|
|
2332
|
-
* Copyright (c) 2025-
|
|
2353
|
+
* Copyright (c) 2025-12-02 Ezviz-OpenBiz
|
|
2333
2354
|
* Released under the MIT License.
|
|
2334
2355
|
*/
|
|
2335
2356
|
|
|
2336
|
-
var hasRequiredDist$
|
|
2357
|
+
var hasRequiredDist$9;
|
|
2337
2358
|
|
|
2338
|
-
function requireDist$
|
|
2339
|
-
if (hasRequiredDist$
|
|
2340
|
-
hasRequiredDist$
|
|
2341
|
-
var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};dist$
|
|
2342
|
-
return dist$
|
|
2359
|
+
function requireDist$9 () {
|
|
2360
|
+
if (hasRequiredDist$9) return dist$9;
|
|
2361
|
+
hasRequiredDist$9 = 1;
|
|
2362
|
+
var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}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 DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(str+"T00:00:00"):/^\d{8}$/.test(str)?(str+="",new Date(str.slice(0,4)+"-"+str.slice(4,6)+"-"+str.slice(6,8)+"T00:00:00")):/^\d{14}$/.test(str)?(str+="",new Date(str.slice(0,4)+"-"+str.slice(4,6)+"-"+str.slice(6,8)+"T"+str.slice(8,10)+":"+str.slice(10,12)+":"+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$9.DateTime=DateTime,dist$9.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce((function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)}),0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter((function(item){return !/^vc=\d?/.test(item)})).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$9.getQuery=getQuery,dist$9.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$9.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$9.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$9.parseEzopenUrl=parseEzopenUrl,dist$9.pick=function(obj,keys){return Object.entries(obj).reduce((function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc}),{})},dist$9.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce((function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"}),"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
|
|
2363
|
+
return dist$9;
|
|
2343
2364
|
}
|
|
2344
2365
|
|
|
2345
|
-
var distExports$6 = requireDist$
|
|
2366
|
+
var distExports$6 = requireDist$9();
|
|
2346
2367
|
|
|
2347
2368
|
/**
|
|
2348
2369
|
* 节流函数
|
|
@@ -4056,13 +4077,13 @@
|
|
|
4056
4077
|
return Rec;
|
|
4057
4078
|
}(Control);
|
|
4058
4079
|
|
|
4059
|
-
var dist$
|
|
4080
|
+
var dist$8 = {exports: {}};
|
|
4060
4081
|
|
|
4061
|
-
var hasRequiredDist$
|
|
4082
|
+
var hasRequiredDist$8;
|
|
4062
4083
|
|
|
4063
|
-
function requireDist$
|
|
4064
|
-
if (hasRequiredDist$
|
|
4065
|
-
hasRequiredDist$
|
|
4084
|
+
function requireDist$8 () {
|
|
4085
|
+
if (hasRequiredDist$8) return dist$8.exports;
|
|
4086
|
+
hasRequiredDist$8 = 1;
|
|
4066
4087
|
|
|
4067
4088
|
var deepmerge = requireCjs();
|
|
4068
4089
|
|
|
@@ -4134,19 +4155,19 @@
|
|
|
4134
4155
|
} ]), I18n;
|
|
4135
4156
|
}();
|
|
4136
4157
|
|
|
4137
|
-
I18n.VERSION = "2.0.0", dist$
|
|
4138
|
-
return dist$
|
|
4158
|
+
I18n.VERSION = "2.0.0", dist$8.exports = I18n;
|
|
4159
|
+
return dist$8.exports;
|
|
4139
4160
|
}
|
|
4140
4161
|
|
|
4141
|
-
var distExports$5 = requireDist$
|
|
4162
|
+
var distExports$5 = requireDist$8();
|
|
4142
4163
|
var I18n = /*@__PURE__*/getDefaultExportFromCjs(distExports$5);
|
|
4143
4164
|
|
|
4144
|
-
var dist$
|
|
4145
|
-
var hasRequiredDist$
|
|
4165
|
+
var dist$7;
|
|
4166
|
+
var hasRequiredDist$7;
|
|
4146
4167
|
|
|
4147
|
-
function requireDist$
|
|
4148
|
-
if (hasRequiredDist$
|
|
4149
|
-
hasRequiredDist$
|
|
4168
|
+
function requireDist$7 () {
|
|
4169
|
+
if (hasRequiredDist$7) return dist$7;
|
|
4170
|
+
hasRequiredDist$7 = 1;
|
|
4150
4171
|
|
|
4151
4172
|
var _$LoggerStyle$_ = {
|
|
4152
4173
|
info: "",
|
|
@@ -4211,7 +4232,7 @@
|
|
|
4211
4232
|
|
|
4212
4233
|
var __$list$__ = [ "info", "log", "warn", "error" ];
|
|
4213
4234
|
|
|
4214
|
-
dist$
|
|
4235
|
+
dist$7 = function(options) {
|
|
4215
4236
|
var logger = new LoggerCls(options);
|
|
4216
4237
|
return new Proxy(logger, {
|
|
4217
4238
|
get: function(target, prop) {
|
|
@@ -4230,10 +4251,10 @@
|
|
|
4230
4251
|
}
|
|
4231
4252
|
});
|
|
4232
4253
|
};
|
|
4233
|
-
return dist$
|
|
4254
|
+
return dist$7;
|
|
4234
4255
|
}
|
|
4235
4256
|
|
|
4236
|
-
var distExports$4 = requireDist$
|
|
4257
|
+
var distExports$4 = requireDist$7();
|
|
4237
4258
|
var Logger = /*@__PURE__*/getDefaultExportFromCjs(distExports$4);
|
|
4238
4259
|
|
|
4239
4260
|
var zh = {
|
|
@@ -5664,11 +5685,11 @@
|
|
|
5664
5685
|
// 对讲
|
|
5665
5686
|
// =======================================================
|
|
5666
5687
|
theme.on(EVENTS.talkingChange, function(talking) {
|
|
5667
|
-
var _theme_controls_talkControl,
|
|
5688
|
+
var _theme_controls, _theme_controls_talkControl, _theme_controls1;
|
|
5668
5689
|
theme._talking = talking;
|
|
5669
|
-
if (talking !== ((
|
|
5670
|
-
var _theme_controls_talkControl1,
|
|
5671
|
-
(
|
|
5690
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.talkControl) && talking !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls1.talkControl) == null ? void 0 : _theme_controls_talkControl.active)) {
|
|
5691
|
+
var _theme_controls_talkControl1, _theme_controls2;
|
|
5692
|
+
(_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls2.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
|
|
5672
5693
|
}
|
|
5673
5694
|
});
|
|
5674
5695
|
theme.on(EVENTS.talkVolumeChange, function(value) {
|
|
@@ -5679,9 +5700,9 @@
|
|
|
5679
5700
|
// 录制
|
|
5680
5701
|
// =======================================================
|
|
5681
5702
|
theme.on(EVENTS.recordingChange, function(recording) {
|
|
5682
|
-
var _theme_controls_recordControl,
|
|
5703
|
+
var _theme_controls, _theme_controls_recordControl, _theme_controls1;
|
|
5683
5704
|
theme._recording = recording;
|
|
5684
|
-
if (recording !== ((
|
|
5705
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recordControl) && recording !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recordControl = _theme_controls1.recordControl) == null ? void 0 : _theme_controls_recordControl.active)) theme.controls.recordControl.active = recording;
|
|
5685
5706
|
});
|
|
5686
5707
|
// =======================================================
|
|
5687
5708
|
// 清晰度
|
|
@@ -5698,14 +5719,14 @@
|
|
|
5698
5719
|
// 放大
|
|
5699
5720
|
// =======================================================
|
|
5700
5721
|
theme.on(EVENTS.zoomingChange, function(zooming) {
|
|
5701
|
-
var _theme_controls_zoomControl1,
|
|
5702
|
-
if (((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 =
|
|
5722
|
+
var _theme_controls1, _theme_controls_zoomControl1, _theme_controls2;
|
|
5723
|
+
if (((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.zoomControl) && ((_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 = _theme_controls2.zoomControl) == null ? void 0 : _theme_controls_zoomControl1.active) !== zooming) {
|
|
5703
5724
|
theme.controls.zoomControl.active = zooming;
|
|
5704
5725
|
}
|
|
5705
5726
|
});
|
|
5706
5727
|
theme.on(EVENTS.zoomChange, function(zoom) {
|
|
5707
|
-
var _theme_controls_zoomControl,
|
|
5708
|
-
if (((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_zoomControl =
|
|
5728
|
+
var _theme_controls, _theme_controls_zoomControl, _theme_controls1;
|
|
5729
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.zoomControl) && ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl = _theme_controls1.zoomControl) == null ? void 0 : _theme_controls_zoomControl.value) !== zoom) {
|
|
5709
5730
|
theme.controls.zoomControl.value = zoom;
|
|
5710
5731
|
}
|
|
5711
5732
|
});
|
|
@@ -5731,31 +5752,40 @@
|
|
|
5731
5752
|
// 全屏
|
|
5732
5753
|
// =======================================================
|
|
5733
5754
|
theme == null ? void 0 : theme.on(EVENTS.fullscreenChange, function(info) {
|
|
5734
|
-
if (
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5755
|
+
if (theme.zoomUtil) {
|
|
5756
|
+
if ([
|
|
5757
|
+
0,
|
|
5758
|
+
180
|
|
5759
|
+
].includes(theme.orientationAngle) && info.isMobile && info.isCurrentFullscreen) {
|
|
5760
|
+
var // 代表移动端播放内容节点被旋转了 90度
|
|
5761
|
+
_theme_zoomUtil_setTransform, _theme_zoomUtil;
|
|
5762
|
+
(_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
|
|
5763
|
+
} else {
|
|
5764
|
+
var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
|
|
5765
|
+
(_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
|
|
5766
|
+
}
|
|
5744
5767
|
}
|
|
5745
5768
|
});
|
|
5746
5769
|
theme == null ? void 0 : theme.on(EVENTS.orientationChange, function(angle) {
|
|
5747
|
-
if (
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5770
|
+
if (theme.zoomUtil) {
|
|
5771
|
+
if ([
|
|
5772
|
+
0,
|
|
5773
|
+
180
|
|
5774
|
+
].includes(angle) && Utils.isMobile && theme.isCurrentFullscreen) {
|
|
5775
|
+
var // 代表移动端播放内容节点被旋转了 90度
|
|
5776
|
+
_theme_zoomUtil_setTransform, _theme_zoomUtil;
|
|
5777
|
+
(_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
|
|
5778
|
+
} else {
|
|
5779
|
+
var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
|
|
5780
|
+
(_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
|
|
5781
|
+
}
|
|
5757
5782
|
}
|
|
5758
5783
|
});
|
|
5784
|
+
// 日期选择器
|
|
5785
|
+
theme == null ? void 0 : theme.on(EVENTS.control.dateMonthChange, function(dates) {
|
|
5786
|
+
var _theme_controls_dateControl_emit, _theme_controls_dateControl, _theme_controls;
|
|
5787
|
+
(_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : (_theme_controls_dateControl_emit = _theme_controls_dateControl.emit) == null ? void 0 : _theme_controls_dateControl_emit.call(_theme_controls_dateControl, EVENTS.control.dateMonthChange, dates);
|
|
5788
|
+
});
|
|
5759
5789
|
}
|
|
5760
5790
|
/**
|
|
5761
5791
|
* 控件向主题发现通信消息 control.on -> theme.emit ,仅用来转发控件的事件
|
|
@@ -5935,13 +5965,16 @@
|
|
|
5935
5965
|
// prettier-ignore
|
|
5936
5966
|
theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
|
|
5937
5967
|
if (theme.recType !== type) {
|
|
5938
|
-
var _theme__headerMoreControl;
|
|
5968
|
+
var _theme__headerMoreControl, _theme_controls;
|
|
5939
5969
|
theme.recType = type;
|
|
5940
5970
|
theme.emit(EVENTS.control.recTypeChange, type);
|
|
5941
5971
|
// theme.emit(EVENTS.recTypeChange, type);
|
|
5942
5972
|
if ((_theme__headerMoreControl = theme._headerMoreControl) == null ? void 0 : _theme__headerMoreControl.picker) {
|
|
5943
5973
|
theme._headerMoreControl.picker.open = false;
|
|
5944
5974
|
}
|
|
5975
|
+
if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.speedControl) {
|
|
5976
|
+
theme.controls.speedControl.emit(EVENTS.control.recTypeChange, type);
|
|
5977
|
+
}
|
|
5945
5978
|
}
|
|
5946
5979
|
});
|
|
5947
5980
|
theme.controls.recControl.on(EVENTS.control.recDestroy, function() {
|
|
@@ -5954,10 +5987,10 @@
|
|
|
5954
5987
|
theme.emit(EVENTS.control.timeLineChange, date);
|
|
5955
5988
|
});
|
|
5956
5989
|
theme.controls.timeLineControl.on(EVENTS.control.timeLinePanelOpenChange, function(open) {
|
|
5957
|
-
var _theme_controls_dateControl;
|
|
5958
|
-
if ((
|
|
5959
|
-
var
|
|
5960
|
-
(
|
|
5990
|
+
var _theme_controls_dateControl, _theme_controls;
|
|
5991
|
+
if ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : _theme_controls_dateControl.datePicker) {
|
|
5992
|
+
var _theme_controls_dateControl_datePicker, _theme_controls_dateControl1, _theme_controls1;
|
|
5993
|
+
(_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_dateControl1 = _theme_controls1.dateControl) == null ? void 0 : (_theme_controls_dateControl_datePicker = _theme_controls_dateControl1.datePicker) == null ? void 0 : _theme_controls_dateControl_datePicker.hide();
|
|
5961
5994
|
}
|
|
5962
5995
|
theme.emit(EVENTS.control.timeLinePanelOpenChange, open);
|
|
5963
5996
|
});
|
|
@@ -6246,12 +6279,12 @@
|
|
|
6246
6279
|
* Released under the MIT License.
|
|
6247
6280
|
*/
|
|
6248
6281
|
|
|
6249
|
-
var dist$
|
|
6250
|
-
var hasRequiredDist$
|
|
6282
|
+
var dist$6;
|
|
6283
|
+
var hasRequiredDist$6;
|
|
6251
6284
|
|
|
6252
|
-
function requireDist$
|
|
6253
|
-
if (hasRequiredDist$
|
|
6254
|
-
hasRequiredDist$
|
|
6285
|
+
function requireDist$6 () {
|
|
6286
|
+
if (hasRequiredDist$6) return dist$6;
|
|
6287
|
+
hasRequiredDist$6 = 1;
|
|
6255
6288
|
|
|
6256
6289
|
/**
|
|
6257
6290
|
* Zoom position
|
|
@@ -6958,11 +6991,11 @@
|
|
|
6958
6991
|
}();
|
|
6959
6992
|
Zoom.VERSION = '0.0.2';
|
|
6960
6993
|
|
|
6961
|
-
dist$
|
|
6962
|
-
return dist$
|
|
6994
|
+
dist$6 = Zoom;
|
|
6995
|
+
return dist$6;
|
|
6963
6996
|
}
|
|
6964
6997
|
|
|
6965
|
-
var distExports$3 = requireDist$
|
|
6998
|
+
var distExports$3 = requireDist$6();
|
|
6966
6999
|
var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$3);
|
|
6967
7000
|
|
|
6968
7001
|
function _extends$h() {
|
|
@@ -8038,9 +8071,9 @@
|
|
|
8038
8071
|
return CapturePicture;
|
|
8039
8072
|
}(Control);
|
|
8040
8073
|
|
|
8041
|
-
var dist$
|
|
8074
|
+
var dist$5 = {};
|
|
8042
8075
|
|
|
8043
|
-
var dist$
|
|
8076
|
+
var dist$4 = {};
|
|
8044
8077
|
|
|
8045
8078
|
/*
|
|
8046
8079
|
* @ezuikit/utils-tools v1.1.1-beta.1
|
|
@@ -8049,13 +8082,13 @@
|
|
|
8049
8082
|
* Released under the MIT License.
|
|
8050
8083
|
*/
|
|
8051
8084
|
|
|
8052
|
-
var hasRequiredDist$
|
|
8085
|
+
var hasRequiredDist$5;
|
|
8053
8086
|
|
|
8054
|
-
function requireDist$
|
|
8055
|
-
if (hasRequiredDist$
|
|
8056
|
-
hasRequiredDist$
|
|
8057
|
-
const getQuery=url=>{const query=url.split("?")[1],obj={};if(query){const vars=query.split("&");for(let i=0;i<vars.length;i++){const pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}}return obj};function parseEzopenUrl(url){const obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){const endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;const pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}const codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};dist$
|
|
8058
|
-
return dist$
|
|
8087
|
+
function requireDist$5 () {
|
|
8088
|
+
if (hasRequiredDist$5) return dist$4;
|
|
8089
|
+
hasRequiredDist$5 = 1;
|
|
8090
|
+
const getQuery=url=>{const query=url.split("?")[1],obj={};if(query){const vars=query.split("&");for(let i=0;i<vars.length;i++){const pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}}return obj};function parseEzopenUrl(url){const obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){const endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;const pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}const codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};dist$4.addVc=function(url){const vc=((arguments.length>1&&void 0!==arguments[1]?arguments[1]:["h264"])||["h264"]).reduce(((acc,key)=>(key=key.toLowerCase(),acc+(codec[key]||0))),0),host=url.split("?")[0];let query=url.split("?")[1];return query=(query||"").split("&").filter((item=>!/^vc=\d?/.test(item))).join("&"),query+=`${query?"&":""}vc=${vc}`,host+"?"+query},dist$4.getQuery=getQuery,dist$4.getStaticPath=function(path){let base=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$4.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$4.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(null==(_navigator1=navigator)?void 0:_navigator1.userAgent)&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$4.parseEzopenUrl=parseEzopenUrl,dist$4.pick=function(obj,keys){return Object.entries(obj).reduce(((acc,_ref)=>{let[key,value]=_ref;return keys.includes(key)&&(acc[key]=value),acc}),{})},dist$4.switchEzopenUrl=function(url,options){let{type:type,recType:recType,search:search,definition:definition,channelNo:channelNo,deviceSerial:deviceSerial,validateCode:validateCode}=null!=options?options:{};const obj=parseEzopenUrl(url);if(search){const ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce(((acc,_ref)=>{let[key,value]=_ref;return ""===value?acc:acc+=`${key}=${encodeURIComponent(value)}&`}),"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,`${obj.protocol}//${validateCode?`${validateCode}@`:""}${obj.hostname}/${deviceSerial}/${channelNo}${"rec"===type&&recType?"."+recType:""}${"live"===type&&"hd"===definition?"."+definition:""}.${type}${search}`};
|
|
8091
|
+
return dist$4;
|
|
8059
8092
|
}
|
|
8060
8093
|
|
|
8061
8094
|
/*
|
|
@@ -8064,14 +8097,14 @@
|
|
|
8064
8097
|
* Released under the MIT License.
|
|
8065
8098
|
*/
|
|
8066
8099
|
|
|
8067
|
-
var hasRequiredDist$
|
|
8100
|
+
var hasRequiredDist$4;
|
|
8068
8101
|
|
|
8069
|
-
function requireDist$
|
|
8070
|
-
if (hasRequiredDist$
|
|
8071
|
-
hasRequiredDist$
|
|
8102
|
+
function requireDist$4 () {
|
|
8103
|
+
if (hasRequiredDist$4) return dist$5;
|
|
8104
|
+
hasRequiredDist$4 = 1;
|
|
8072
8105
|
|
|
8073
8106
|
var deepmerge = requireCjs();
|
|
8074
|
-
var utilsTools = requireDist$
|
|
8107
|
+
var utilsTools = requireDist$5();
|
|
8075
8108
|
|
|
8076
8109
|
var en_US = {
|
|
8077
8110
|
GET_PTZ_STATUS: 'Get current PTZ status',
|
|
@@ -8991,13 +9024,13 @@
|
|
|
8991
9024
|
return Ptz;
|
|
8992
9025
|
}(BasePtz);
|
|
8993
9026
|
|
|
8994
|
-
dist$
|
|
8995
|
-
dist$
|
|
8996
|
-
dist$
|
|
8997
|
-
return dist$
|
|
9027
|
+
dist$5.BasePtz = BasePtz;
|
|
9028
|
+
dist$5.MobilePtz = MobilePtz;
|
|
9029
|
+
dist$5.Ptz = Ptz;
|
|
9030
|
+
return dist$5;
|
|
8998
9031
|
}
|
|
8999
9032
|
|
|
9000
|
-
var distExports$2 = requireDist$
|
|
9033
|
+
var distExports$2 = requireDist$4();
|
|
9001
9034
|
|
|
9002
9035
|
function _defineProperties$4(target, props) {
|
|
9003
9036
|
for(var i = 0; i < props.length; i++){
|
|
@@ -10197,12 +10230,35 @@
|
|
|
10197
10230
|
_assert_this_initialized(_this).emit(EVENTS.control.speedPanelOpenChange, open, value, item);
|
|
10198
10231
|
}
|
|
10199
10232
|
})) || this;
|
|
10233
|
+
_this._filterSpeedList(options.list, options.props.recType);
|
|
10200
10234
|
_this.on(EVENTS.speedChange, function(speed) {
|
|
10201
10235
|
if (_this.value !== speed + '') _this.value = speed + '';
|
|
10202
10236
|
});
|
|
10237
|
+
_this.on(EVENTS.control.recTypeChange, function(type) {
|
|
10238
|
+
_this._filterSpeedList(options.list, type);
|
|
10239
|
+
});
|
|
10203
10240
|
return _this;
|
|
10204
10241
|
}
|
|
10205
10242
|
var _proto = Speed.prototype;
|
|
10243
|
+
/**
|
|
10244
|
+
* 滤掉本地回放不支持的倍速
|
|
10245
|
+
* @param optionsList 初始化配置倍速列表
|
|
10246
|
+
* @param type 回放类型
|
|
10247
|
+
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type) {
|
|
10248
|
+
if (!optionsList) {
|
|
10249
|
+
// 非用户自定义
|
|
10250
|
+
if (type === 'rec') {
|
|
10251
|
+
// 本地回放 不支持 8 16 32 倍速
|
|
10252
|
+
var list = this.list.filter(function(item) {
|
|
10253
|
+
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
10254
|
+
});
|
|
10255
|
+
this.updateOptions(list);
|
|
10256
|
+
} else {
|
|
10257
|
+
// 云端回放 支持 8 16 32 倍速
|
|
10258
|
+
this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
|
|
10259
|
+
}
|
|
10260
|
+
}
|
|
10261
|
+
};
|
|
10206
10262
|
_proto.reset = function reset(hide) {
|
|
10207
10263
|
this.value = 1 + '';
|
|
10208
10264
|
Select.prototype.reset.call(this, hide);
|
|
@@ -10210,540 +10266,24 @@
|
|
|
10210
10266
|
return Speed;
|
|
10211
10267
|
}(Select);
|
|
10212
10268
|
|
|
10269
|
+
var dist$3 = {};
|
|
10270
|
+
|
|
10213
10271
|
/*
|
|
10214
|
-
* @ezuikit/control-date-picker
|
|
10215
|
-
* Copyright (c) 2025-
|
|
10272
|
+
* @ezuikit/control-date-picker v1.0.3
|
|
10273
|
+
* Copyright (c) 2025-12-08 Ezviz-OpenBiz
|
|
10216
10274
|
* Released under the MIT License.
|
|
10217
10275
|
*/
|
|
10218
10276
|
|
|
10219
|
-
var
|
|
10220
|
-
var hasRequiredDist$2;
|
|
10277
|
+
var hasRequiredDist$3;
|
|
10221
10278
|
|
|
10222
|
-
function requireDist$
|
|
10223
|
-
if (hasRequiredDist$
|
|
10224
|
-
hasRequiredDist$
|
|
10279
|
+
function requireDist$3 () {
|
|
10280
|
+
if (hasRequiredDist$3) return dist$3;
|
|
10281
|
+
hasRequiredDist$3 = 1;
|
|
10282
|
+
var delegate=requireDelegate(),utilsTools=requireDist$9(),deepmerge=requireCjs(),Picker=requireDist$a(),Util=function(){function Util(){}return Util.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},Util.chunkBySize=function(arr,size){return Array.from({length:Math.ceil(arr.length/size)}).map(function(_,index){return arr.slice(index*size,(index+1)*size)})},Util.generateYears=function(year){for(var years=[],i=year%10+1;i>=0;i--)years.push(year-i);for(var i1=1;years.length<12;i1++)years.push(year+i1);return years},Util.getDaysInMonth=function(year,month){return new Date(year,month+1,0).getDate()},Util.getFirstDayOfMonth=function(year,month,startOfWeek){return void 0===startOfWeek&&(startOfWeek=0),(new Date(year,month).getDay()-startOfWeek+7)%7},Util.generateWeeksByYearMonth=function(year,month,startOfWeek){ void 0===startOfWeek&&(startOfWeek=0),month-=1;for(var daysInMonth=Util.getDaysInMonth(year,month),firstDay=Util.getFirstDayOfMonth(year,month,startOfWeek),weeks=[],i=1;i<=firstDay+daysInMonth;i++){var day=i-firstDay;day<1?weeks.push((0===month?year-1:year)+"-"+Util.fillZero((month+12-1)%12+1)+"-"+Util.fillZero(Util.getDaysInMonth(year,month-1)+day)):day>daysInMonth?weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+(day-daysInMonth)):weeks.push(year+"-"+Util.fillZero(month+1)+"-"+Util.fillZero(day));}for(var nextDay=1;weeks.length<42;)weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+Util.fillZero(nextDay++));return weeks},Util.generateHours=function(){for(var hours=[],i=0;i<24;i++)hours.push(Util.fillZero(i));return hours},Util.generateMinutesOrSeconds=function(){for(var hours=[],i=0;i<=59;i++)hours.push(Util.fillZero(i));return hours},Util}(),__$CALENDAR_LOCALES$__={en:{year:"",month:"",weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],today:"Today",ok:"OK",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",months:["01","02","03","04","05","06","07","08","09","10","11","12"]}},__DEFAULT_COMPONENTS_OPTIONS__={showSuperPrevIcon:false,showSuperNextIcon:false,showPrevIcon:false,showNextIcon:false,showHeaderClose:false,showHeaderOk:false,renderSuperPrevIcon:'<span class="edate-super-prev-icon"></span>',renderSuperNextIcon:'<span class="edate-super-next-icon"></span>',renderPrevIcon:'<span class="edate-prev-icon"></span>',renderNextIcon:'<span class="edate-next-icon"></span>',renderHeaderCloseIcon:'<span class="edate-close-icon">\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n </span>',renderHeaderOkIcon:function(locale){return '<span class="edate-btn-text">'+((null==locale?void 0:locale.ok)||"确定")+"</span>"}},Header=function(){function Header(options){this.$header=null,this.options=deepmerge.all([{},__DEFAULT_COMPONENTS_OPTIONS__,options],{clone:false}),this.$header=document.createElement("div"),this.$header.classList.add("edate-header",options.prefixCls+"-header"),options.className&&this.$header.classList.add(options.className),this._render(),this._eventListeners();}var _proto=Header.prototype;return _proto._render=function(){var _this__getStrOrFunToStr,_this__getStrOrFunToStr1,_this__getStrOrFunToStr2,_this__getStrOrFunToStr3,_this__getStrOrFunToStr4,_this__getStrOrFunToStr5;this.$header&&(this.$header.innerHTML="\n "+(this.options.showHeaderClose?'<div class="edate-close-btn">\n '+(null!=(_this__getStrOrFunToStr=this._getStrOrFunToStr(this.options.renderHeaderCloseIcon))?_this__getStrOrFunToStr:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderCloseIcon)+"\n </div>":this.options.showHeaderOk?"<span></span>":"")+"\n "+(this.options.showSuperPrevIcon||this.options.showPrevIcon?'\n <div class="edate-prev-btns">\n '+(this.options.showSuperPrevIcon?'<div class="edate-super-prev-btn '+this.options.prefixCls+'-super-prev-btn">\n '+(null!=(_this__getStrOrFunToStr1=this._getStrOrFunToStr(this.options.renderSuperPrevIcon))?_this__getStrOrFunToStr1:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperPrevIcon)+"\n </div>":"")+"\n "+(this.options.showPrevIcon?'<div class="edate-prev-btn '+this.options.prefixCls+'-prev-btn">\n '+(null!=(_this__getStrOrFunToStr2=this._getStrOrFunToStr(this.options.renderPrevIcon))?_this__getStrOrFunToStr2:__DEFAULT_COMPONENTS_OPTIONS__.renderPrevIcon)+"\n </div>":"")+"\n </div>\n ":"")+'\n\n <div class="edate-header-view '+this.options.prefixCls+'-header-view"></div>\n\n '+(this.options.showNextIcon||this.options.showSuperNextIcon?'\n <div class="edate-next-btns">\n '+(this.options.showNextIcon?'<div class="edate-next-btn '+this.options.prefixCls+'-next-btn">\n '+(null!=(_this__getStrOrFunToStr3=this._getStrOrFunToStr(this.options.renderNextIcon))?_this__getStrOrFunToStr3:__DEFAULT_COMPONENTS_OPTIONS__.renderNextIcon)+"\n </div>":"")+"\n "+(this.options.showSuperNextIcon?'<div class="edate-super-next-btn '+this.options.prefixCls+'-super-next-btn">\n '+(null!=(_this__getStrOrFunToStr4=this._getStrOrFunToStr(this.options.renderSuperNextIcon))?_this__getStrOrFunToStr4:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperNextIcon)+"\n </div>":"")+"\n </div>\n ":"")+"\n "+(this.options.showHeaderOk?'<div class="edate-ok-btn">\n '+(null!=(_this__getStrOrFunToStr5=this._getStrOrFunToStr(this.options.renderHeaderOkIcon))?_this__getStrOrFunToStr5:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderOkIcon)+"\n </div>":this.options.showHeaderClose?"<span></span>":""));},_proto._getStrOrFunToStr=function(value){if(null!=value){var _this_options;if("function"==typeof value)return this._getStrOrFunToStr(null==value?void 0:value(null==(_this_options=this.options)?void 0:_this_options.locale));if("string"==typeof value)return value}},_proto.renderContent=function(html){if(this.$header){var _$content=this.$header.querySelector(".edate-header-view");if(!_$content)return;_$content.innerHTML=html;}},_proto.destroy=function(){this.$header&&this.$header.remove();},_proto._eventListeners=function(){var _this=this;_this.$header&&(delegate(_this.$header,".edate-super-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperPrev||_this.options.onSuperPrev.call(_this.options);}),delegate(_this.$header,".edate-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onPrev||_this.options.onPrev.call(_this.options);}),delegate(_this.$header,".edate-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onNext||_this.options.onNext.call(_this.options);}),delegate(_this.$header,".edate-super-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperNext||_this.options.onSuperNext.call(_this.options);}),delegate(_this.$header,".edate-close-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onClose||_this.options.onClose.call(_this.options),event.stopPropagation(),event.preventDefault());}),delegate(_this.$header,".edate-ok-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onOk||_this.options.onOk.call(_this.options),event.stopPropagation(),event.preventDefault());}));},Header}();function _extends$2(){return _extends$2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$2.apply(this,arguments)}var _CONTAINER_DEFAULT_OPTIONS_={prefixCls:"edate",locales:__$CALENDAR_LOCALES$__,showHeader:true},Container=function(){function Container(popupContainer,options){this.$panel=document.createElement("div"),this.$body=document.createElement("div"),this.$container=document.createElement("div"),this.language="zh",this.header=null,this.locale=__$CALENDAR_LOCALES$__.zh,this.options=deepmerge.all([{},_CONTAINER_DEFAULT_OPTIONS_,options],{clone:false}),this.$popupContainer=popupContainer?"function"==typeof popupContainer?popupContainer():popupContainer:document.body,this._setLocale(),this.$container.classList.add("edate-container",(this.options.prefixCls||"edate")+"-container"),options.isMobile&&this.$container.classList.add("edate-mobile",this.options.prefixCls+"-mobile"),this.options.wrapClassName&&this.$container.classList.add(this.options.wrapClassName),this.$panel.classList.add("edate-panel",(this.options.prefixCls||"edate")+"-panel"),this.options.showHeader&&(this.header=new Header(_extends$2({},this.options,{locale:this.locale,onPrev:this._onPrev.bind(this),onNext:this._onNext.bind(this),onSuperPrev:this._onSuperPrev.bind(this),onSuperNext:this._onSuperNext.bind(this),onClose:this._onClose.bind(this),onOk:this._onOk.bind(this)})),this.$panel.appendChild(this.header.$header)),this.$body.classList.add("edate-body",(this.options.prefixCls||"edate")+"-body"),this.$container.appendChild(this.$panel),this.$popupContainer.appendChild(this.$container);}var _proto=Container.prototype;return _proto._setLocale=function(){if(this.options.locales)if("string"==typeof this.options.language){var language=this.options.language||navigator.language;this.options.locales[language]?this.locale=this.options.locales[language]:this.locale=this.options.locales.zh;}else this.locale=this.options.locales.zh;},_proto.destroy=function(){var _this_$container;(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null;},_proto.setLocale=function(locale){"string"==typeof locale?this._setLocale():this.locale=locale;},_proto._onSuperPrev=function(){},_proto._onSuperNext=function(){},_proto._onPrev=function(){},_proto._onNext=function(){},_proto._onClose=function(){},_proto._onOk=function(){},Container}();function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}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 _CALENDAR_DEFAULT_OPTIONS_={startOfWeek:0,showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,showPrevIcon:true,showNextIcon:true,language:"zh",renderBadge:'<span class="ecalendar-badge"></span>',badges:[]},Calendar=function(Container){function Calendar(container,options){var _this,_this_options_badges,_this_options,_this_options1,_this_options2;return (_this=Container.call(this,container,_extends$1({},_CALENDAR_DEFAULT_OPTIONS_,options,{prefixCls:"ecalendar"}))||this).badges=[],(null==(_this_options_badges=_this.options.badges)?void 0:_this_options_badges.length)&&_this._updateBadges(_this.options.badges,false),(null==(_this_options=_this.options)?void 0:_this_options.startOfWeek)&&((null==(_this_options1=_this.options)?void 0:_this_options1.startOfWeek)>6||(null==(_this_options2=_this.options)?void 0:_this_options2.startOfWeek)<0)&&(_this.options.startOfWeek=0),_this._render(),_this.setCurrent(_this.options.current,false),_this._onHeader(),_this._onCell(),_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:true,configurable:true}}),superClass&&_set_prototype_of$3(subClass,superClass);}(Calendar,Container);var _proto=Calendar.prototype;return _proto.setCurrent=function(date,change){if(void 0===change&&(change=true),"string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{if(date="string"==typeof date?utilsTools.DateTime.toDate(date):date,(!this._current||utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,utilsTools.DateTime.format(date,"YYYY-MM-DD"))),this.$body)){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-cell-selected"))||_this_$body_querySelector.classList.remove("ecalendar-cell-selected");var title=utilsTools.DateTime.format(this._current,"YYYY-MM-DD");null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-cell-in-view[title='"+title+"']"))||_this_$body_querySelector1.classList.add("ecalendar-cell-selected");}this._setRenderCurrent(this._current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto.updateBadges=function(badges){this._updateBadges(badges);},_proto._updateBadges=function(badges,rerender){ void 0===rerender&&(rerender=true),(null==badges?void 0:badges.length)>=0&&(this.badges=badges.map(function(date){return utilsTools.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate());},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&utilsTools.DateTime.format(this._renderCurrent,"YYYY-MM")!==utilsTools.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate());},_proto._onCell=function(){var _this=this;delegate(this.$body,".ecalendar-cell","click",function(event){var date=new Date(event.delegateTarget.getAttribute("title").replace(/\//gi,"/")),disabled=event.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(date),null==_this.options.onCell||_this.options.onCell.call(_this.options,date,utilsTools.DateTime.format(_this._renderCurrent,"YYYY-MM-DD"),disabled),event.stopPropagation(),event.preventDefault();});},_proto._onSuperPrev=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()-1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()+1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onPrev=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()-1,date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onNext=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()+1,date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onHeader=function(){var _this=this;delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent);}),delegate(this.$panel,".ecalendar-header-year-btn","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._render=function(){var _this_locale,_this_locale1,shiftedCustomDays=[].concat(((null==(_this_locale=this.locale)?void 0:_this_locale.weeks)||[]).slice(this.options.startOfWeek),((null==(_this_locale1=this.locale)?void 0:_this_locale1.weeks)||[]).slice(0,this.options.startOfWeek));this.$body.innerHTML='<table class="ecalendar-content">\n <thead><tr>'+shiftedCustomDays.map(function(day){return "<th>"+day+"</th>"}).join("")+"</tr></thead>\n <tbody></tbody>\n </table>",this.$panel.appendChild(this.$body);},_proto._renderDate=function(){var _this_header,_this_$body_querySelector,_this=this;if(this.$body){var _this_locale_months,_this_locale,_this_locale1,_this_locale2,_this_locale3,_this_locale_months1,_this_locale4,_this_locale5,_this_$body_querySelector1,todayStr=utilsTools.DateTime.format(new Date,"YYYY-MM-DD"),year=this._renderCurrent.getFullYear(),month=this._renderCurrent.getMonth()+1,dayGroupArray=Util.chunkBySize(Util.generateWeeksByYearMonth(year,month,this.options.startOfWeek),7),allowMonthClick="function"==typeof this.options.onMonth,allowYearClick="function"==typeof this.options.onYear;if(null==(_this_header=this.header)?void 0:_this_header.$header)this.header.renderContent("\n "+("zh"!==this.options.language?'<span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale=this.locale)||null==(_this_locale_months=_this_locale.months)?void 0:_this_locale_months[+(month-1)])+((null==(_this_locale1=this.locale)?void 0:_this_locale1.month)||"")+'</span> <span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale2=this.locale)?void 0:_this_locale2.year)||"")+"</span>":'<span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale3=this.locale)?void 0:_this_locale3.year)||"")+'</span> <span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale4=this.locale)||null==(_this_locale_months1=_this_locale4.months)?void 0:_this_locale_months1[+(month-1)])+((null==(_this_locale5=this.locale)?void 0:_this_locale5.month)||"")+"</span>"));if(null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector.querySelector("tbody"))(null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector1.querySelector("tbody")).innerHTML="\n "+dayGroupArray.slice(0,7).map(function(dates){return "<tr>\n "+dates.map(function(dateStr){var _this_options,_dateStr_split=dateStr.split("-"),y=_dateStr_split[0],m=_dateStr_split[1],d=_dateStr_split[2],date=new Date(+y,+m,+d),classNames=[month===+m?"ecalendar-cell-in-view":"",todayStr===dateStr?"ecalendar-cell-today":"",_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===dateStr?"ecalendar-cell-selected":"","function"==typeof(null==(_this_options=_this.options)?void 0:_this_options.disabledDate)&&_this.options.disabledDate(utilsTools.DateTime.toDate(dateStr),dateStr)?"edate-disabled":""].filter(Boolean),badgeHtml=_this._renderBadge(date,dateStr);return '<td title="'+dateStr+'" class="ecalendar-cell '+classNames.join(" ")+'">\n '+("function"==typeof _this.options.renderDate?_this.options.renderDate(date,dateStr):'<span class="ecalendar-cell-inner">'+Util.fillZero(+d)+"</span>")+"\n "+badgeHtml+"\n </td>"}).join("")+"\n </tr>"}).join("");}},_proto._renderBadge=function(date,dateStr){var badgeHtml="";badgeHtml="function"==typeof this.options.renderBadge?this.options.renderBadge(date,dateStr):"string"==typeof this.options.renderBadge?this.options.renderBadge:"";var showBadge="function"==typeof this.options.showBadge&&this.options.showBadge(date,dateStr);return this.badges.includes(dateStr)||showBadge||(badgeHtml=""),badgeHtml},_create_class$3(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(Container);function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}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)}Calendar.DateTime=utilsTools.DateTime;var _Month_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh"},Month=function(Container){function Month(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_Month_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,prefixCls:"emonth"}],{clone:false}))||this)._render(),_this.setCurrent(_this.options.current,false),_this._onHeaderTitle(),_this._onCell(),_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:true,configurable:true}}),superClass&&_set_prototype_of$2(subClass,superClass);}(Month,Container);var _proto=Month.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto._setCurrent=function(date,change){if("string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{var d=date;"string"==typeof d&&(d=utilsTools.DateTime.toDate(d));var current=d;this._current&&utilsTools.DateTime.format(current,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=current,"function"==typeof this.options.onChange&&change&&(null==this.options.onChange||this.options.onChange.call(this.options,current,utilsTools.DateTime.format(current,"YYYY-MM")))),this._setRenderCurrent(current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto._setRenderCurrent=function(date){if((!this._renderCurrent||this._renderCurrent&&utilsTools.DateTime.format(date,"YYYY")!==utilsTools.DateTime.format(this._renderCurrent,"YYYY"))&&(this._renderCurrent=date,this._renderMonths(date.getFullYear())),this._current){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".emonth-cell-selected"))||_this_$body_querySelector.classList.remove("emonth-cell-selected");var selectedTitle=utilsTools.DateTime.format(this._current,"YYYY-MM");null==(_this_$body_querySelector1=this.$body.querySelector(".emonth-cell-in-view[title='"+selectedTitle+"']"))||_this_$body_querySelector1.classList.add("emonth-cell-selected");}this._setHeader();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setMonth(month-1);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY-MM"),disabled);});},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperPrev||this.options.onSuperPrev.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var year=this._renderCurrent.getFullYear()+1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperNext||this.options.onSuperNext.call(this.options,this._current,this._renderCurrent);},_proto._onHeaderTitle=function(){var _this=this;delegate(this.$panel,".edate-header-title-hover","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._setHeader=function(){if(this.$panel.querySelector(".emonth-header-view")){var allowClick="function"==typeof this.options.onYear;this.$panel.querySelector(".emonth-header-view").innerHTML='<span class="'+(allowClick?"edate-header-title-hover":"")+'">'+this._renderCurrent.getFullYear()+this.locale.year+"</span>";}},_proto._setDisabled=function(){for(var year=this._renderCurrent.getFullYear(),i=0;i<12;i++){var $cell=this.$body.querySelector(".emonth-cell[title='"+year+"-"+Util.fillZero(i+1)+"']");if($cell){var date=utilsTools.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+utilsTools.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,utilsTools.DateTime.format(date,"YYYY-MM"))?$cell.classList.add("edate-disabled"):$cell.classList.remove("edate-disabled");}}},_proto._render=function(){this.$body.innerHTML='<table class="emonth-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderMonths=function(year){var _this=this;this.$body.querySelector(".emonth-content")&&(this.$body.querySelector(".emonth-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(this.locale.months,3).slice(0,4).map(function(month,index){return "<tr>\n "+month.map(function(m,i){return '<td title="'+year+"-"+Util.fillZero(3*index+i+1)+'" data-month="'+Util.fillZero(3*index+i+1)+'" class="emonth-cell emonth-cell-in-view">\n <span class="emonth-cell-inner">'+(_this.options.monthRender&&"function"==typeof _this.options.monthRender?_this.options.monthRender(utilsTools.DateTime.toDate(year+"-"+Util.fillZero(3*index+i+1)),year+"-"+Util.fillZero(3*index+i+1))||"":m)+"</span>\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>"),this._setDisabled();},_create_class$2(Month,[{key:"current",get:function(){return this._current}}]),Month}(Container);function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}var _YEAR_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh",prefixCls:"eyear"},Year=function(Container){function Year(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,renderPrevIcon:"",renderNextIcon:""}],{clone:false}))||this)._render(),_this._setCurrent(_this.options.current,false),_this._onCell(),_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:true,configurable:true}}),superClass&&_set_prototype_of$1(subClass,superClass);}(Year,Container);var _proto=Year.prototype;return _proto.setCurrent=function(year,change){ void 0===change&&(change=true),this._setCurrent(year,change);},_proto._setCurrent=function(year,change){ void 0===change&&(change=true);var left,right,_year="number"==typeof year?utilsTools.DateTime.toDate(year):(left=year,(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?year:new Date);this._current&&utilsTools.DateTime.format(_year,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=_year,"function"==typeof this.options.onChange&&change&&this.options.onChange(_year)),this._renderTenYear=(this._current||new Date).getFullYear(),this._renderYearList();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setFullYear(yearStr);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this._setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY"),disabled),e.stopPropagation(),e.preventDefault();});},_proto._onSuperPrev=function(){this._renderTenYear=this._renderTenYear-10,null==this.options.onPrevYear||this.options.onPrevYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._onSuperNext=function(){this._renderTenYear=this._renderTenYear+10,null==this.options.onNextYear||this.options.onNextYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._render=function(){this.$body.innerHTML='<table class="eyear-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderYearList=function(){var _this_header,_this=this,list=Util.generateYears(this._renderTenYear);null==(_this_header=this.header)||_this_header.renderContent(list[1]+" - "+list[list.length-2]),this.$body.querySelector(".eyear-content")&&(this.$body.querySelector(".eyear-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(list,3).slice(0,4).map(function(years,i){return "<tr>\n "+years.map(function(y,j){var classNames=0===i&&0===j||3===i&&2===j?"eyear-cell":"eyear-cell eyear-cell-in-view";return +y===+_this._current.getFullYear()&&(classNames+=" eyear-cell-selected"),"function"==typeof _this.options.disabledYear&&_this.options.disabledYear(utilsTools.DateTime.toDate(y),y)&&(classNames+=" edate-disabled"),'<td title="'+y+'" class="'+classNames+'">\n '+(_this.options.yearRender&&"function"==typeof _this.options.yearRender?_this.options.yearRender(utilsTools.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ");},_create_class$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(Container);function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:false,mode:_DATEPICKER_MODE_ARRAY[0]},DatePicker=function(Picker){function DatePicker(container,options){var _this;return (_this=Picker.call(this,container,deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker-container "+((null==options?void 0:options.wrapClassName)||"")).trim()}],{clone:false}))||this).current=null,_this._current=null,_this._calendar=null,_this._month=null,_this._year=null,_this._currentMode="date",_this.options=deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{}],{clone:false}),_this.options.current&&(_this.current=_this.options.current,_this._current=_this.options.current),_this._currentMode=_this.options.mode,_this._switchMode(),_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:true,configurable:true}}),superClass&&_set_prototype_of(subClass,superClass);}(DatePicker,Picker);var _proto=DatePicker.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto.updateBadges=function(badges){var _this__calendar;(null==badges?void 0:badges.length)>=0&&(null==(_this__calendar=this._calendar)||_this__calendar.updateBadges(badges));},_proto.destroy=function(){var _this__calendar,_this__month,_this__year;null==(_this__calendar=this._calendar)||_this__calendar.destroy(),this._calendar=null,null==(_this__month=this._month)||_this__month.destroy(),this._month=null,null==(_this__year=this._year)||_this__year.destroy(),this._year=null,Picker.prototype.destroy.call(this);},_proto._setCurrent=function(date,change){var _this__calendar,_this__month,_this__year;void 0===change&&(change=true),this._current=date,null==(_this__calendar=this._calendar)||_this__calendar.setCurrent(date,change),null==(_this__month=this._month)||_this__month.setCurrent(date,change),null==(_this__year=this._year)||_this__year.setCurrent(date,change);},_proto._switchMode=function(){this.$body.classList.add("edate-picker-"+this._currentMode),"date"===this._currentMode?this._initCalendar():"month"===this._currentMode?this._initMonth():"year"===this._currentMode&&this._initYear(),this.setPlacement(this.options.placement||"top");},_proto.hide=function(){this.open=false;},_proto._onOpenChange=function(open){Picker.prototype._onOpenChange.call(this,open),open&&(this._removeCurrentTypeClass(),this._currentMode=this.options.mode||"date",this._switchMode(),this._setCurrent(this.current,false)),open||null==this.options.onClose||this.options.onClose.call(this.options,this.current,this._currentMode);},_proto._initCalendar=function(){var _this=this;this._calendar||(this._calendar=new Calendar(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),onMonth:this._onMonth.bind(this),onYear:this._onYear.bind(this),onChange:function(date){var _this__calendar;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===utilsTools.DateTime.format(date,"YYYY-MM-DD")||_this._onChange(date,null==(_this__calendar=_this._calendar)?void 0:_this__calendar.options.showHeaderOk);}})));},_proto._initMonth=function(){var _this=this;this._month||(this._month=new Month(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__month;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM")===utilsTools.DateTime.format(date,"YYYY-MM")||_this._onChange(date,null==(_this__month=_this._month)?void 0:_this__month.options.showHeaderOk);},onYear:this._onYear.bind(this)})));},_proto._initYear=function(){var _this=this;this._year||(this._year=new Year(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__year;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY")===utilsTools.DateTime.format(date,"YYYY")||_this._onChange(date,null==(_this__year=_this._year)?void 0:_this__year.options.showHeaderOk);}})));},_proto._onOk=function(date){this.current=date||this._current,this._setCurrent(date||this._current),null==this.options.onOk||this.options.onOk.call(this.options,this.current,this._currentMode),this.hide();},_proto._onClose=function(){this.hide();},_proto._onChange=function(date,_showHeaderOk){this._setCurrent(date,true);},_proto._onCell=function(date,_renderDate,disabled){null==this.options.onCell||this.options.onCell.call(this.options,date,this._currentMode),this.options.isMobile||this._currentMode!==this.options.mode||disabled||this._current&&utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this.current=date,null==this.options.onChange||this.options.onChange.call(this.options,date,this._currentMode)),disabled||this._prvMode();},_proto._prvMode=function(){this._currentMode!==this.options.mode||this.options.isMobile||this.hide();var index=_DATEPICKER_MODE_ARRAY.indexOf(this._currentMode);index>=1&&(index--,this._removeCurrentTypeClass(),this._currentMode=_DATEPICKER_MODE_ARRAY[index],this._switchMode());},_proto._onYear=function(){this._removeCurrentTypeClass(),this._currentMode="year",this._switchMode();},_proto._onMonth=function(){this._removeCurrentTypeClass(),this._currentMode="month",this._switchMode();},_proto._removeCurrentTypeClass=function(){this.$body.classList.remove("edate-picker-"+this._currentMode);},_create_class(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker);dist$3.Calendar=Calendar,dist$3.DatePicker=DatePicker,dist$3.Header=Header,dist$3.Month=Month,dist$3.Year=Year;
|
|
10283
|
+
return dist$3;
|
|
10284
|
+
}
|
|
10225
10285
|
|
|
10226
|
-
|
|
10227
|
-
try {
|
|
10228
|
-
var info = gen[key](arg);
|
|
10229
|
-
var value = info.value;
|
|
10230
|
-
} catch (error) {
|
|
10231
|
-
reject(error);
|
|
10232
|
-
return;
|
|
10233
|
-
}
|
|
10234
|
-
if (info.done) {
|
|
10235
|
-
resolve(value);
|
|
10236
|
-
} else {
|
|
10237
|
-
Promise.resolve(value).then(_next, _throw);
|
|
10238
|
-
}
|
|
10239
|
-
}
|
|
10240
|
-
function _async_to_generator(fn) {
|
|
10241
|
-
return function() {
|
|
10242
|
-
var self = this, args = arguments;
|
|
10243
|
-
return new Promise(function(resolve, reject) {
|
|
10244
|
-
var gen = fn.apply(self, args);
|
|
10245
|
-
function _next(value) {
|
|
10246
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
10247
|
-
}
|
|
10248
|
-
function _throw(err) {
|
|
10249
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
10250
|
-
}
|
|
10251
|
-
_next(undefined);
|
|
10252
|
-
});
|
|
10253
|
-
};
|
|
10254
|
-
}
|
|
10255
|
-
function _ts_generator(thisArg, body) {
|
|
10256
|
-
var f, y, t, _ = {
|
|
10257
|
-
label: 0,
|
|
10258
|
-
sent: function() {
|
|
10259
|
-
if (t[0] & 1) throw t[1];
|
|
10260
|
-
return t[1];
|
|
10261
|
-
},
|
|
10262
|
-
trys: [],
|
|
10263
|
-
ops: []
|
|
10264
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
10265
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
10266
|
-
return this;
|
|
10267
|
-
}), g;
|
|
10268
|
-
function verb(n) {
|
|
10269
|
-
return function(v) {
|
|
10270
|
-
return step([
|
|
10271
|
-
n,
|
|
10272
|
-
v
|
|
10273
|
-
]);
|
|
10274
|
-
};
|
|
10275
|
-
}
|
|
10276
|
-
function step(op) {
|
|
10277
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
10278
|
-
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
10279
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
10280
|
-
if (y = 0, t) op = [
|
|
10281
|
-
op[0] & 2,
|
|
10282
|
-
t.value
|
|
10283
|
-
];
|
|
10284
|
-
switch(op[0]){
|
|
10285
|
-
case 0:
|
|
10286
|
-
case 1:
|
|
10287
|
-
t = op;
|
|
10288
|
-
break;
|
|
10289
|
-
case 4:
|
|
10290
|
-
_.label++;
|
|
10291
|
-
return {
|
|
10292
|
-
value: op[1],
|
|
10293
|
-
done: false
|
|
10294
|
-
};
|
|
10295
|
-
case 5:
|
|
10296
|
-
_.label++;
|
|
10297
|
-
y = op[1];
|
|
10298
|
-
op = [
|
|
10299
|
-
0
|
|
10300
|
-
];
|
|
10301
|
-
continue;
|
|
10302
|
-
case 7:
|
|
10303
|
-
op = _.ops.pop();
|
|
10304
|
-
_.trys.pop();
|
|
10305
|
-
continue;
|
|
10306
|
-
default:
|
|
10307
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
10308
|
-
_ = 0;
|
|
10309
|
-
continue;
|
|
10310
|
-
}
|
|
10311
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
10312
|
-
_.label = op[1];
|
|
10313
|
-
break;
|
|
10314
|
-
}
|
|
10315
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
10316
|
-
_.label = t[1];
|
|
10317
|
-
t = op;
|
|
10318
|
-
break;
|
|
10319
|
-
}
|
|
10320
|
-
if (t && _.label < t[2]) {
|
|
10321
|
-
_.label = t[2];
|
|
10322
|
-
_.ops.push(op);
|
|
10323
|
-
break;
|
|
10324
|
-
}
|
|
10325
|
-
if (t[2]) _.ops.pop();
|
|
10326
|
-
_.trys.pop();
|
|
10327
|
-
continue;
|
|
10328
|
-
}
|
|
10329
|
-
op = body.call(thisArg, _);
|
|
10330
|
-
} catch (e) {
|
|
10331
|
-
op = [
|
|
10332
|
-
6,
|
|
10333
|
-
e
|
|
10334
|
-
];
|
|
10335
|
-
y = 0;
|
|
10336
|
-
} finally{
|
|
10337
|
-
f = t = 0;
|
|
10338
|
-
}
|
|
10339
|
-
if (op[0] & 5) throw op[1];
|
|
10340
|
-
return {
|
|
10341
|
-
value: op[0] ? op[1] : void 0,
|
|
10342
|
-
done: true
|
|
10343
|
-
};
|
|
10344
|
-
}
|
|
10345
|
-
}
|
|
10346
|
-
var AppendJS = /*#__PURE__*/ function() {
|
|
10347
|
-
function AppendJS() {}
|
|
10348
|
-
AppendJS.loadScript = function loadScript(src) {
|
|
10349
|
-
return _async_to_generator(function() {
|
|
10350
|
-
return _ts_generator(this, function(_state) {
|
|
10351
|
-
switch(_state.label){
|
|
10352
|
-
case 0:
|
|
10353
|
-
return [
|
|
10354
|
-
4,
|
|
10355
|
-
new Promise(function(resolve, reject) {
|
|
10356
|
-
if (AppendJS.LoadedScr.includes(src)) {
|
|
10357
|
-
return resolve(src);
|
|
10358
|
-
}
|
|
10359
|
-
if (AppendJS.LoadingScrQueue[src]) {
|
|
10360
|
-
return AppendJS.LoadingScrQueue[src].push(resolve);
|
|
10361
|
-
} else {
|
|
10362
|
-
AppendJS.LoadingScrQueue[src] = [
|
|
10363
|
-
resolve
|
|
10364
|
-
];
|
|
10365
|
-
}
|
|
10366
|
-
var link;
|
|
10367
|
-
if (src.includes('.js')) {
|
|
10368
|
-
link = document.createElement('script');
|
|
10369
|
-
link.src = src;
|
|
10370
|
-
link.async = true;
|
|
10371
|
-
} else if (src.includes('.css')) {
|
|
10372
|
-
link = document.createElement('link');
|
|
10373
|
-
link.rel = 'stylesheet';
|
|
10374
|
-
link.href = src;
|
|
10375
|
-
}
|
|
10376
|
-
link.onload = function() {
|
|
10377
|
-
AppendJS.LoadedScr.push(src);
|
|
10378
|
-
AppendJS.LoadingScrQueue[src].forEach(function(resolve) {
|
|
10379
|
-
return resolve(src);
|
|
10380
|
-
});
|
|
10381
|
-
AppendJS.LoadingScrQueue[src] = [];
|
|
10382
|
-
};
|
|
10383
|
-
link.onerror = function() {
|
|
10384
|
-
return reject(new Error('Failed to load ' + src));
|
|
10385
|
-
};
|
|
10386
|
-
document.head.appendChild(link);
|
|
10387
|
-
})
|
|
10388
|
-
];
|
|
10389
|
-
case 1:
|
|
10390
|
-
return [
|
|
10391
|
-
2,
|
|
10392
|
-
_state.sent()
|
|
10393
|
-
];
|
|
10394
|
-
}
|
|
10395
|
-
});
|
|
10396
|
-
})();
|
|
10397
|
-
};
|
|
10398
|
-
AppendJS.loadScriptsBatch = function loadScriptsBatch(srcArr) {
|
|
10399
|
-
return _async_to_generator(function() {
|
|
10400
|
-
return _ts_generator(this, function(_state) {
|
|
10401
|
-
switch(_state.label){
|
|
10402
|
-
case 0:
|
|
10403
|
-
return [
|
|
10404
|
-
4,
|
|
10405
|
-
Promise.all(srcArr.map(AppendJS.loadScript))
|
|
10406
|
-
];
|
|
10407
|
-
case 1:
|
|
10408
|
-
return [
|
|
10409
|
-
2,
|
|
10410
|
-
_state.sent()
|
|
10411
|
-
];
|
|
10412
|
-
}
|
|
10413
|
-
});
|
|
10414
|
-
})();
|
|
10415
|
-
};
|
|
10416
|
-
AppendJS.remove = function remove(src) {
|
|
10417
|
-
src.forEach(function(item) {
|
|
10418
|
-
var link = document.querySelector('script[src="' + item + '"]') || document.querySelector('link[href="' + item + '"]');
|
|
10419
|
-
if (link) {
|
|
10420
|
-
link.remove();
|
|
10421
|
-
}
|
|
10422
|
-
});
|
|
10423
|
-
};
|
|
10424
|
-
AppendJS.clear = function clear() {
|
|
10425
|
-
AppendJS.remove(AppendJS.LoadedScr);
|
|
10426
|
-
};
|
|
10427
|
-
return AppendJS;
|
|
10428
|
-
}();
|
|
10429
|
-
/** 已经加载完的js/css */ AppendJS.LoadedScr = [];
|
|
10430
|
-
/** 正在加载的js/css */ AppendJS.LoadingScrQueue = {};
|
|
10431
|
-
|
|
10432
|
-
function _defineProperties(target, props) {
|
|
10433
|
-
for(var i = 0; i < props.length; i++){
|
|
10434
|
-
var descriptor = props[i];
|
|
10435
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
10436
|
-
descriptor.configurable = true;
|
|
10437
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
10438
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
10439
|
-
}
|
|
10440
|
-
}
|
|
10441
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
10442
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
10443
|
-
return Constructor;
|
|
10444
|
-
}
|
|
10445
|
-
var DEFAULT_OPTIONS = {
|
|
10446
|
-
staticPath: '.',
|
|
10447
|
-
place: 'top-right',
|
|
10448
|
-
language: 'zh-CN',
|
|
10449
|
-
current: new Date(),
|
|
10450
|
-
maxDate: new Date()
|
|
10451
|
-
};
|
|
10452
|
-
/**
|
|
10453
|
-
* 日期选择器
|
|
10454
|
-
*/ var DatePicker = /*#__PURE__*/ function() {
|
|
10455
|
-
function DatePicker(container, options) {
|
|
10456
|
-
var _this = this;
|
|
10457
|
-
this._open = false;
|
|
10458
|
-
this._change = true;
|
|
10459
|
-
this.$container = container;
|
|
10460
|
-
this.options = Object.assign({}, DEFAULT_OPTIONS, options);
|
|
10461
|
-
this.options.staticPath = (this.options.staticPath || '').replace(/\/$/, '');
|
|
10462
|
-
if (this.options.current) {
|
|
10463
|
-
this._date = this.options.current;
|
|
10464
|
-
}
|
|
10465
|
-
this._init();
|
|
10466
|
-
this.$container.addEventListener('click', function() {
|
|
10467
|
-
if (_this._open) _this.hide();
|
|
10468
|
-
else _this.show();
|
|
10469
|
-
});
|
|
10470
|
-
document.body.addEventListener('click', function(e) {
|
|
10471
|
-
if (!_this.$container.contains(e.target)) {
|
|
10472
|
-
_this.hide();
|
|
10473
|
-
}
|
|
10474
|
-
});
|
|
10475
|
-
}
|
|
10476
|
-
var _proto = DatePicker.prototype;
|
|
10477
|
-
_proto._init = function _init() {
|
|
10478
|
-
var _this = this;
|
|
10479
|
-
// 因为挂载在行内,需要父标签设置 position: relative;
|
|
10480
|
-
this.$container.style.cssText += ";position: relative;";
|
|
10481
|
-
this.$container.classList.add("datepicker-inline-" + this.options.place);
|
|
10482
|
-
AppendJS.loadScriptsBatch([
|
|
10483
|
-
"" + this.options.staticPath + "/rec/jquery.min.js",
|
|
10484
|
-
"" + this.options.staticPath + "/rec/datepicker.min.css"
|
|
10485
|
-
]).then(function() {
|
|
10486
|
-
AppendJS.loadScriptsBatch([
|
|
10487
|
-
"" + _this.options.staticPath + "/rec/datepicker.js"
|
|
10488
|
-
]).then(function() {
|
|
10489
|
-
AppendJS.loadScriptsBatch([
|
|
10490
|
-
"" + _this.options.staticPath + "/rec/datepicker.zh-CN.js",
|
|
10491
|
-
"" + _this.options.staticPath + "/rec/datepicker.en-US.js"
|
|
10492
|
-
]).then(function() {
|
|
10493
|
-
window.$(_this.$container).datepicker({
|
|
10494
|
-
date: _this.options.current,
|
|
10495
|
-
language: _this.options.language,
|
|
10496
|
-
endDate: _this.options.maxDate,
|
|
10497
|
-
inline: true
|
|
10498
|
-
});
|
|
10499
|
-
_this.hide();
|
|
10500
|
-
window.$(_this.$container).on('pick.datepicker', function(e) {
|
|
10501
|
-
var _this__date, _this__date1, _this__date2, _this__date3, _this__date4, _this__date5;
|
|
10502
|
-
if (e.view === 'year' && ((_this__date = _this._date) == null ? void 0 : _this__date.getFullYear()) !== e.date.getFullYear()) {
|
|
10503
|
-
_this.options.onYearChange == null ? void 0 : _this.options.onYearChange.call(_this.options, e.date);
|
|
10504
|
-
} else if (e.view === 'month' && (((_this__date1 = _this._date) == null ? void 0 : _this__date1.getMonth()) !== e.date.getMonth() || ((_this__date2 = _this._date) == null ? void 0 : _this__date2.getFullYear()) !== e.date.getFullYear())) {
|
|
10505
|
-
_this.options.onMonthChange == null ? void 0 : _this.options.onMonthChange.call(_this.options, e.date);
|
|
10506
|
-
} else if ([
|
|
10507
|
-
'day',
|
|
10508
|
-
'pick'
|
|
10509
|
-
].includes(e.view || e.type) && (((_this__date3 = _this._date) == null ? void 0 : _this__date3.getDate()) !== e.date.getDate() || ((_this__date4 = _this._date) == null ? void 0 : _this__date4.getMonth()) !== e.date.getMonth() || ((_this__date5 = _this._date) == null ? void 0 : _this__date5.getFullYear()) !== e.date.getFullYear())) {
|
|
10510
|
-
if (_this._change) {
|
|
10511
|
-
_this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, e.date);
|
|
10512
|
-
}
|
|
10513
|
-
_this._date = new Date(e.date.getTime());
|
|
10514
|
-
}
|
|
10515
|
-
if (e.view === 'day') _this.hide();
|
|
10516
|
-
_this._change = true;
|
|
10517
|
-
});
|
|
10518
|
-
});
|
|
10519
|
-
});
|
|
10520
|
-
});
|
|
10521
|
-
};
|
|
10522
|
-
/**
|
|
10523
|
-
* 设置日期, change = true 时触发 onChange 事件
|
|
10524
|
-
*
|
|
10525
|
-
* @param date 设置的日期
|
|
10526
|
-
* @param change 是否触发 onChange 事件
|
|
10527
|
-
*/ _proto.setDate = function setDate(date, change) {
|
|
10528
|
-
if (change === void 0) change = true;
|
|
10529
|
-
var $datepicker = this.$container.querySelector(".datepicker-inline");
|
|
10530
|
-
if ($datepicker) {
|
|
10531
|
-
this._change = change;
|
|
10532
|
-
window.$(this.$container).datepicker('setDate', date);
|
|
10533
|
-
}
|
|
10534
|
-
};
|
|
10535
|
-
/**
|
|
10536
|
-
* 隐藏面板, 会触发 onPanelChange 事件
|
|
10537
|
-
*/ _proto.hide = function hide() {
|
|
10538
|
-
var $datepicker = this.$container.querySelector(".datepicker-inline");
|
|
10539
|
-
if ($datepicker) {
|
|
10540
|
-
if (this._open) {
|
|
10541
|
-
this._open = false;
|
|
10542
|
-
this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, false, this._date);
|
|
10543
|
-
}
|
|
10544
|
-
$datepicker.classList.add('datepicker-hide');
|
|
10545
|
-
}
|
|
10546
|
-
};
|
|
10547
|
-
/**
|
|
10548
|
-
* 显示面板, 会触发 onPanelChange 事件
|
|
10549
|
-
*/ _proto.show = function show() {
|
|
10550
|
-
var $datepicker = this.$container.querySelector(".datepicker-inline");
|
|
10551
|
-
if ($datepicker) {
|
|
10552
|
-
var _window_$_datepicker, _window_$;
|
|
10553
|
-
if (!this._open) {
|
|
10554
|
-
this._open = true;
|
|
10555
|
-
this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, true, this._date);
|
|
10556
|
-
}
|
|
10557
|
-
if (this._date) this.setDate(this._date, false);
|
|
10558
|
-
(_window_$_datepicker = (_window_$ = window.$(this.$container)).datepicker) == null ? void 0 : _window_$_datepicker.call(_window_$, 'showView');
|
|
10559
|
-
if (this.options.place === 'bottom-left') {
|
|
10560
|
-
$datepicker.style.cssText += "top: " + (this.$container.clientHeight + 10) + "px; bottom: auto; right: auto; left: 0px";
|
|
10561
|
-
} else {
|
|
10562
|
-
$datepicker.style.cssText += "bottom: " + (this.$container.clientHeight + 10) + "px; top: auto";
|
|
10563
|
-
}
|
|
10564
|
-
$datepicker.classList.remove('datepicker-hide');
|
|
10565
|
-
}
|
|
10566
|
-
};
|
|
10567
|
-
/**
|
|
10568
|
-
* 销毁
|
|
10569
|
-
*/ _proto.destroy = function destroy() {
|
|
10570
|
-
this.hide();
|
|
10571
|
-
this._date = undefined;
|
|
10572
|
-
window.$(this.$container).datepicker('destroy');
|
|
10573
|
-
// AppendJS.remove([
|
|
10574
|
-
// `${this.options.staticPath}/rec/jquery.min.js`,
|
|
10575
|
-
// `${this.options.staticPath}/rec/datepicker.min.css`,
|
|
10576
|
-
// `${this.options.staticPath}/rec/datepicker.js`,
|
|
10577
|
-
// `${this.options.staticPath}/rec/datepicker.zh-CN.js`,
|
|
10578
|
-
// `${this.options.staticPath}/rec/datepicker.en-US.js`,
|
|
10579
|
-
// ]);
|
|
10580
|
-
};
|
|
10581
|
-
_create_class(DatePicker, [
|
|
10582
|
-
{
|
|
10583
|
-
key: "date",
|
|
10584
|
-
get: /**
|
|
10585
|
-
* 获取日期
|
|
10586
|
-
*/ function get() {
|
|
10587
|
-
return this._date;
|
|
10588
|
-
}
|
|
10589
|
-
}
|
|
10590
|
-
]);
|
|
10591
|
-
return DatePicker;
|
|
10592
|
-
}();
|
|
10593
|
-
|
|
10594
|
-
dist$2 = DatePicker;
|
|
10595
|
-
return dist$2;
|
|
10596
|
-
}
|
|
10597
|
-
|
|
10598
|
-
var distExports$1 = requireDist$2();
|
|
10599
|
-
var DatePickerUtil = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
|
|
10600
|
-
|
|
10601
|
-
/**
|
|
10602
|
-
* @description 时间操作
|
|
10603
|
-
*/ var DateTime = /*#__PURE__*/ function() {
|
|
10604
|
-
function DateTime() {}
|
|
10605
|
-
/**
|
|
10606
|
-
* @description 时间格式化
|
|
10607
|
-
* @param {Date | number | string} date
|
|
10608
|
-
* @param {string} formatType 格式 'YYYY-MM-DD hh:mm:ss' 或 'YYYYMMDDhhmmss' 或 'YYYY/MM/DD hh:mm:ss' 或 'hh:mm:ss' 或 'YYYYMMDDThhmmssZ'
|
|
10609
|
-
* @param {number} timeZone 时区偏移量 默认 0
|
|
10610
|
-
*/ DateTime.formate = function formate(date, formatType, timeZone) {
|
|
10611
|
-
if (timeZone === void 0) timeZone = 0;
|
|
10612
|
-
var dateTime = date;
|
|
10613
|
-
if (typeof date === 'string') {
|
|
10614
|
-
dateTime = DateTime.strToDate(date);
|
|
10615
|
-
} else if (typeof date === 'number') {
|
|
10616
|
-
dateTime = new Date(date);
|
|
10617
|
-
}
|
|
10618
|
-
dateTime = new Date(dateTime.getTime() - timeZone * 3600 * 1000);
|
|
10619
|
-
var year = dateTime.getFullYear();
|
|
10620
|
-
var month = String(dateTime.getMonth() + 1).padStart(2, '0');
|
|
10621
|
-
var day = String(dateTime.getDate()).padStart(2, '0');
|
|
10622
|
-
var hours = String(dateTime.getHours()).padStart(2, '0');
|
|
10623
|
-
var minutes = String(dateTime.getMinutes()).padStart(2, '0');
|
|
10624
|
-
var seconds = String(dateTime.getSeconds()).padStart(2, '0');
|
|
10625
|
-
switch(formatType){
|
|
10626
|
-
case 'YYYY-MM-DD hh:mm:ss':
|
|
10627
|
-
return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
|
10628
|
-
case 'YYYYMMDDhhmmss':
|
|
10629
|
-
return "" + year + month + day + hours + minutes + seconds;
|
|
10630
|
-
case 'YYYY/MM/DD hh:mm:ss':
|
|
10631
|
-
return year + "/" + month + "/" + day + " " + hours + ":" + minutes + ":" + seconds;
|
|
10632
|
-
case 'YYYYMMDDThhmmssZ':
|
|
10633
|
-
return "" + year + month + day + "T" + hours + minutes + seconds + "Z";
|
|
10634
|
-
case 'YYYY/MM/DD':
|
|
10635
|
-
return year + "/" + month + "/" + day;
|
|
10636
|
-
case 'YYYYMMDD':
|
|
10637
|
-
return "" + year + month + day;
|
|
10638
|
-
case 'YYYY-MM-DD':
|
|
10639
|
-
return year + "-" + month + "-" + day;
|
|
10640
|
-
case 'YYYY':
|
|
10641
|
-
return "" + year;
|
|
10642
|
-
case 'MM':
|
|
10643
|
-
return "" + month;
|
|
10644
|
-
case 'DD':
|
|
10645
|
-
return "" + day;
|
|
10646
|
-
case 'hh:mm:ss':
|
|
10647
|
-
return hours + ":" + minutes + ":" + seconds;
|
|
10648
|
-
case 'hh':
|
|
10649
|
-
return "" + hours;
|
|
10650
|
-
case 'mm':
|
|
10651
|
-
return "" + minutes;
|
|
10652
|
-
case 'ss':
|
|
10653
|
-
return "" + seconds;
|
|
10654
|
-
default:
|
|
10655
|
-
throw new Error('Unsupported format type');
|
|
10656
|
-
}
|
|
10657
|
-
};
|
|
10658
|
-
/**
|
|
10659
|
-
* @description 对比两个时间的差值
|
|
10660
|
-
* @param {Date | string | number} date1
|
|
10661
|
-
* @param {Date | string | number} date2
|
|
10662
|
-
* @param {"year" | "month" | "day" | "hour" | "minute" | "second"} diffType
|
|
10663
|
-
*/ DateTime.diff = function diff(date1, date2, diffType) {
|
|
10664
|
-
/** @type {Date} */ var dateTime1 = date1;
|
|
10665
|
-
if (typeof date1 === 'string') {
|
|
10666
|
-
dateTime1 = DateTime.strToDate(date1);
|
|
10667
|
-
} else if (typeof date1 === 'number') {
|
|
10668
|
-
dateTime1 = new Date(date1);
|
|
10669
|
-
}
|
|
10670
|
-
/** @type {Date} */ var dateTime2 = date2;
|
|
10671
|
-
if (typeof date2 === 'string') {
|
|
10672
|
-
dateTime1 = DateTime.strToDate(date2);
|
|
10673
|
-
} else if (typeof date2 === 'number') {
|
|
10674
|
-
dateTime1 = new Date(date2);
|
|
10675
|
-
}
|
|
10676
|
-
var diffSecond = dateTime1.getTime() - dateTime2.getTime();
|
|
10677
|
-
// diff
|
|
10678
|
-
switch(diffType){
|
|
10679
|
-
case 'year':
|
|
10680
|
-
return dateTime1.getFullYear() - dateTime2.getFullYear();
|
|
10681
|
-
case 'month':
|
|
10682
|
-
// 计算总月份差
|
|
10683
|
-
// eslint-disable-next-line no-case-declarations
|
|
10684
|
-
var months = (dateTime1.getFullYear() - dateTime2.getFullYear()) * 12 + (dateTime1.getMonth() - dateTime2.getMonth());
|
|
10685
|
-
// 如果结束日的日期小于开始日的日期,则减去一个月
|
|
10686
|
-
if (dateTime1.getDate() < dateTime2.getDate()) {
|
|
10687
|
-
months--;
|
|
10688
|
-
}
|
|
10689
|
-
return months;
|
|
10690
|
-
case 'day':
|
|
10691
|
-
return diffSecond / 60 / 60 / 24;
|
|
10692
|
-
case 'hour':
|
|
10693
|
-
return diffSecond / 60 / 60;
|
|
10694
|
-
case 'minute':
|
|
10695
|
-
return diffSecond / 60;
|
|
10696
|
-
case 'second':
|
|
10697
|
-
return diffSecond;
|
|
10698
|
-
default:
|
|
10699
|
-
throw new Error('Unsupported diff type');
|
|
10700
|
-
}
|
|
10701
|
-
};
|
|
10702
|
-
DateTime.now = function now() {
|
|
10703
|
-
return Date.now();
|
|
10704
|
-
};
|
|
10705
|
-
/**
|
|
10706
|
-
*
|
|
10707
|
-
* @param {string} str 日期, 2025-04-10 10:10:10 或 2025/04/10 10:10:10 或 20250410101010 或 20250410T101010Z 或 秒 或 毫秒
|
|
10708
|
-
* @example
|
|
10709
|
-
* DateTime.strToDate("2025/04/10 10:10:10") // Date
|
|
10710
|
-
* DateTime.strToDate("2025-04-10 10:10:10") // Date
|
|
10711
|
-
* DateTime.strToDate("20250410101010") // Date
|
|
10712
|
-
* DateTime.strToDate("20250410T101010Z") // Date
|
|
10713
|
-
*/ DateTime.strToDate = function strToDate(str) {
|
|
10714
|
-
var time = (str + '').replace(/-/gi, '').replace(/:/gi, '').replace(/\//gi, '').replace(/ /gi, '').replace(/T|Z/gi, '');
|
|
10715
|
-
// 兼容
|
|
10716
|
-
if ((str + '').length === 10) {
|
|
10717
|
-
// 时间戳 秒
|
|
10718
|
-
return new Date(+str);
|
|
10719
|
-
} else if ((str + '').length === 13) {
|
|
10720
|
-
// 时间戳 毫秒
|
|
10721
|
-
return new Date(+str);
|
|
10722
|
-
}
|
|
10723
|
-
var year = time.slice(0, 4);
|
|
10724
|
-
var month = time.slice(4, 6);
|
|
10725
|
-
var day = time.slice(6, 8);
|
|
10726
|
-
var hour = time.slice(8, 10);
|
|
10727
|
-
var minute = time.slice(10, 12);
|
|
10728
|
-
var second = time.slice(12, 14);
|
|
10729
|
-
return new Date(year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second);
|
|
10730
|
-
};
|
|
10731
|
-
/**
|
|
10732
|
-
* @description 补充十位
|
|
10733
|
-
* @param {number} num
|
|
10734
|
-
* @returns {string}
|
|
10735
|
-
* @example
|
|
10736
|
-
* DateTime.padStart(1) // "01"
|
|
10737
|
-
* DateTime.padStart(33) // "33"
|
|
10738
|
-
*/ DateTime.padStart = function padStart(num) {
|
|
10739
|
-
if (num < 10) {
|
|
10740
|
-
return '0' + num;
|
|
10741
|
-
} else {
|
|
10742
|
-
return num + '';
|
|
10743
|
-
}
|
|
10744
|
-
};
|
|
10745
|
-
return DateTime;
|
|
10746
|
-
}();
|
|
10286
|
+
var distExports$1 = requireDist$3();
|
|
10747
10287
|
|
|
10748
10288
|
function _extends$5() {
|
|
10749
10289
|
_extends$5 = Object.assign || function(target) {
|
|
@@ -10787,20 +10327,29 @@
|
|
|
10787
10327
|
function DatePickerControl(options) {
|
|
10788
10328
|
var _this;
|
|
10789
10329
|
var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
|
|
10790
|
-
_this = Control.call(this, _extends$5({
|
|
10330
|
+
_this = Control.call(this, _extends$5({
|
|
10331
|
+
maxDate: new Date()
|
|
10332
|
+
}, options, {
|
|
10791
10333
|
tagName: 'span',
|
|
10792
10334
|
controlType: 'button',
|
|
10793
10335
|
classNameSuffix: 'date'
|
|
10794
10336
|
})) || this;
|
|
10795
10337
|
_this.options = options;
|
|
10796
|
-
_this._value = DateTime.
|
|
10338
|
+
_this._value = distExports$6.DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
|
|
10797
10339
|
_this._render();
|
|
10340
|
+
// 日期上的点
|
|
10341
|
+
_this.on(EVENTS.control.dateMonthChange, function(dates) {
|
|
10342
|
+
var _this_datePicker_updateBadges, _this_datePicker;
|
|
10343
|
+
(_this_datePicker = _this.datePicker) == null ? void 0 : (_this_datePicker_updateBadges = _this_datePicker.updateBadges) == null ? void 0 : _this_datePicker_updateBadges.call(_this_datePicker, dates);
|
|
10344
|
+
});
|
|
10798
10345
|
return _this;
|
|
10799
10346
|
}
|
|
10800
10347
|
var _proto = DatePickerControl.prototype;
|
|
10801
10348
|
_proto._render = function _render() {
|
|
10802
10349
|
var _this = this;
|
|
10803
|
-
|
|
10350
|
+
var _this_options_props;
|
|
10351
|
+
var isMobile1 = distExports$6.isMobile();
|
|
10352
|
+
if (isMobile1) {
|
|
10804
10353
|
var _this_locale;
|
|
10805
10354
|
this.$container.innerHTML = '\n <span class="' + PREFIX_CLASS + '-mobile-date-filter" title="' + (((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_CALENDAR) || '') + '">\n <span class="' + PREFIX_CLASS + '-mobile-date-filter-value">' + this._getDateStr() + "</span>\n " + IconComponents.filter() + "\n <span>";
|
|
10806
10355
|
} else {
|
|
@@ -10809,25 +10358,45 @@
|
|
|
10809
10358
|
title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
|
|
10810
10359
|
});
|
|
10811
10360
|
}
|
|
10812
|
-
this.
|
|
10813
|
-
|
|
10814
|
-
|
|
10361
|
+
this.datePicker = new distExports$1.DatePicker(this.$container, {
|
|
10362
|
+
isMobile: isMobile1,
|
|
10363
|
+
getPopupContainer: function() {
|
|
10364
|
+
return _this.$container;
|
|
10365
|
+
},
|
|
10366
|
+
mode: 'date',
|
|
10367
|
+
offset: [
|
|
10368
|
+
0,
|
|
10369
|
+
-10
|
|
10370
|
+
],
|
|
10371
|
+
badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
|
|
10372
|
+
language: this.options.language === 'zh' ? 'zh' : 'en',
|
|
10815
10373
|
current: new Date(this._value + ' 00:00:00'),
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10374
|
+
placement: 'tr',
|
|
10375
|
+
triggerClose: true,
|
|
10376
|
+
disabledDate: function(date) {
|
|
10377
|
+
return date.getTime() > (_this.options.maxDate || new Date()).getTime();
|
|
10378
|
+
},
|
|
10379
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10380
|
+
onOk: function(date, _mode) {
|
|
10381
|
+
if (date && _this._value !== distExports$6.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
|
|
10382
|
+
_this._value = distExports$6.DateTime.format(date, 'YYYY-MM-DD');
|
|
10383
|
+
_this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
|
|
10822
10384
|
_this.emit(EVENTS.control.dateChange, date);
|
|
10823
10385
|
if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
10824
10386
|
_this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = _this._getDateStr();
|
|
10825
10387
|
}
|
|
10826
10388
|
}
|
|
10827
10389
|
},
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10390
|
+
onChange: function(date, mode) {
|
|
10391
|
+
if (date && _this._value !== distExports$6.DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
|
|
10392
|
+
_this._value = distExports$6.DateTime.format(date, 'YYYY-MM-DD');
|
|
10393
|
+
_this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
|
|
10394
|
+
_this.emit(EVENTS.control.dateChange, date);
|
|
10395
|
+
}
|
|
10396
|
+
},
|
|
10397
|
+
onOpenChange: function(open) {
|
|
10398
|
+
_this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
|
|
10399
|
+
_this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
|
|
10831
10400
|
}
|
|
10832
10401
|
});
|
|
10833
10402
|
};
|
|
@@ -10837,28 +10406,27 @@
|
|
|
10837
10406
|
* @param change 是否触发 onChange 事件
|
|
10838
10407
|
*/ _proto.setDate = function setDate(date, change) {
|
|
10839
10408
|
if (change === void 0) change = true;
|
|
10840
|
-
var
|
|
10841
|
-
(
|
|
10842
|
-
if (date && !change && this._value !== DateTime.
|
|
10843
|
-
this._value = DateTime.
|
|
10409
|
+
var _this_datePicker;
|
|
10410
|
+
(_this_datePicker = this.datePicker) == null ? void 0 : _this_datePicker.setCurrent(date, change);
|
|
10411
|
+
if (date && !change && this._value !== distExports$6.DateTime.format(date, 'YYYY-MM-DD')) {
|
|
10412
|
+
this._value = distExports$6.DateTime.format(date, 'YYYY-MM-DD');
|
|
10844
10413
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
10845
10414
|
this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = this._getDateStr();
|
|
10846
10415
|
}
|
|
10847
10416
|
}
|
|
10848
10417
|
};
|
|
10849
10418
|
_proto.reset = function reset() {
|
|
10850
|
-
|
|
10851
|
-
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
|
|
10419
|
+
if (this.datePicker) this.datePicker.open = false;
|
|
10852
10420
|
Control.prototype.reset.call(this);
|
|
10853
10421
|
};
|
|
10854
10422
|
/**
|
|
10855
10423
|
* 销毁控件
|
|
10856
10424
|
* @override
|
|
10857
10425
|
*/ _proto.destroy = function destroy() {
|
|
10858
|
-
if (this.
|
|
10859
|
-
this.
|
|
10426
|
+
if (this.datePicker) {
|
|
10427
|
+
this.datePicker.destroy();
|
|
10860
10428
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
10861
|
-
this.
|
|
10429
|
+
this.datePicker = null;
|
|
10862
10430
|
}
|
|
10863
10431
|
Control.prototype.destroy.call(this);
|
|
10864
10432
|
};
|
|
@@ -10868,30 +10436,31 @@
|
|
|
10868
10436
|
};
|
|
10869
10437
|
/**
|
|
10870
10438
|
* 点击 Control 会触发
|
|
10439
|
+
* @overload super._onControlClick(e: Event)
|
|
10871
10440
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
10872
10441
|
Control.prototype._onControlClick.call(this, e);
|
|
10873
10442
|
};
|
|
10874
10443
|
return DatePickerControl;
|
|
10875
10444
|
}(Control);
|
|
10876
10445
|
|
|
10877
|
-
var dist$
|
|
10446
|
+
var dist$2 = {};
|
|
10878
10447
|
|
|
10879
10448
|
/**
|
|
10880
10449
|
* drag scroll support move and touch
|
|
10881
10450
|
*
|
|
10882
|
-
* @skax/drag-scroll v1.1.
|
|
10883
|
-
* Copyright (c) 2025-11-
|
|
10451
|
+
* @skax/drag-scroll v1.1.2
|
|
10452
|
+
* Copyright (c) 2025-11-22 ShineShao <xiaoshaoqq@gmail.com>
|
|
10884
10453
|
*
|
|
10885
10454
|
* This source code is licensed under the MIT license found in the
|
|
10886
10455
|
* LICENSE file in the root directory of this source tree.
|
|
10887
10456
|
*/
|
|
10888
10457
|
|
|
10889
|
-
var dist;
|
|
10890
|
-
var hasRequiredDist$
|
|
10458
|
+
var dist$1;
|
|
10459
|
+
var hasRequiredDist$2;
|
|
10891
10460
|
|
|
10892
|
-
function requireDist$
|
|
10893
|
-
if (hasRequiredDist$
|
|
10894
|
-
hasRequiredDist$
|
|
10461
|
+
function requireDist$2 () {
|
|
10462
|
+
if (hasRequiredDist$2) return dist$1;
|
|
10463
|
+
hasRequiredDist$2 = 1;
|
|
10895
10464
|
|
|
10896
10465
|
/**
|
|
10897
10466
|
* 拖拽滚动状态
|
|
@@ -11078,8 +10647,8 @@
|
|
|
11078
10647
|
this._addEventListeners();
|
|
11079
10648
|
// 初始化滚动条
|
|
11080
10649
|
this._updateScrollbar();
|
|
11081
|
-
|
|
11082
|
-
|
|
10650
|
+
// 弹性动画
|
|
10651
|
+
// this._animationId = requestAnimationFrame(this._animate.bind(this));
|
|
11083
10652
|
};
|
|
11084
10653
|
// ----------- 事件处理 ----------- //
|
|
11085
10654
|
/**
|
|
@@ -11326,23 +10895,151 @@
|
|
|
11326
10895
|
return DragScroll;
|
|
11327
10896
|
}();
|
|
11328
10897
|
|
|
11329
|
-
dist = DragScroll;
|
|
10898
|
+
dist$1 = DragScroll;
|
|
10899
|
+
return dist$1;
|
|
10900
|
+
}
|
|
10901
|
+
|
|
10902
|
+
/*
|
|
10903
|
+
* delegate.js v4.0.0
|
|
10904
|
+
* Copyright (c) 2025-11-09
|
|
10905
|
+
* Released under the MIT License.
|
|
10906
|
+
*/
|
|
10907
|
+
|
|
10908
|
+
var dist;
|
|
10909
|
+
var hasRequiredDist$1;
|
|
10910
|
+
|
|
10911
|
+
function requireDist$1 () {
|
|
10912
|
+
if (hasRequiredDist$1) return dist;
|
|
10913
|
+
hasRequiredDist$1 = 1;
|
|
10914
|
+
|
|
10915
|
+
const DOCUMENT_NODE_TYPE = 9;
|
|
10916
|
+
/**
|
|
10917
|
+
* A polyfill for Element.matches()
|
|
10918
|
+
*/ if (typeof Element !== "undefined" && !Element.prototype.matches) {
|
|
10919
|
+
const proto = Element.prototype;
|
|
10920
|
+
proto.matches = (proto == null ? void 0 : proto.matchesSelector) || (proto == null ? void 0 : proto.mozMatchesSelector) || (proto == null ? void 0 : proto.msMatchesSelector) || (proto == null ? void 0 : proto.oMatchesSelector) || (proto == null ? void 0 : proto.webkitMatchesSelector);
|
|
10921
|
+
}
|
|
10922
|
+
/**
|
|
10923
|
+
* Finds the closest parent that matches a selector.
|
|
10924
|
+
*
|
|
10925
|
+
* @param {Element} element
|
|
10926
|
+
* @param {string} selector
|
|
10927
|
+
* @return {Element}
|
|
10928
|
+
*/ function closest(element, selector) {
|
|
10929
|
+
while(element && element.nodeType !== DOCUMENT_NODE_TYPE){
|
|
10930
|
+
if (typeof element.matches === "function" && element.matches(selector)) {
|
|
10931
|
+
return element;
|
|
10932
|
+
}
|
|
10933
|
+
element = element.parentNode;
|
|
10934
|
+
}
|
|
10935
|
+
return null;
|
|
10936
|
+
}
|
|
10937
|
+
/**
|
|
10938
|
+
* Finds the closest parent that matches a selector.
|
|
10939
|
+
*
|
|
10940
|
+
* @param {Element} element
|
|
10941
|
+
* @param {string} selector
|
|
10942
|
+
* @return {Element}
|
|
10943
|
+
*/ function closestNative(element, selector) {
|
|
10944
|
+
return element && element.closest(selector);
|
|
10945
|
+
}
|
|
10946
|
+
var closest$1 = typeof Element.prototype.closest === "function" ? closestNative : closest;
|
|
10947
|
+
|
|
10948
|
+
/**
|
|
10949
|
+
* Delegates event to a selector.
|
|
10950
|
+
*
|
|
10951
|
+
* @param {Element} element
|
|
10952
|
+
* @param {string} selector
|
|
10953
|
+
* @param {string} type
|
|
10954
|
+
* @param {Function} callback
|
|
10955
|
+
* @param {boolean} useCapture
|
|
10956
|
+
* @return {Object}
|
|
10957
|
+
*/ // prettier-ignore
|
|
10958
|
+
function _delegate(element, selector, type, callback, useCapture) {
|
|
10959
|
+
// prettier-ignore
|
|
10960
|
+
const listenerFn = listener.apply(this, arguments);
|
|
10961
|
+
element.addEventListener(type, listenerFn, useCapture);
|
|
10962
|
+
return {
|
|
10963
|
+
destroy: function() {
|
|
10964
|
+
element.removeEventListener(type, listenerFn, useCapture);
|
|
10965
|
+
}
|
|
10966
|
+
};
|
|
10967
|
+
}
|
|
10968
|
+
/**
|
|
10969
|
+
* Delegates event to a selector.
|
|
10970
|
+
*
|
|
10971
|
+
* @param {Element|string|Array} [elements]
|
|
10972
|
+
* @param {string | Element} selector
|
|
10973
|
+
* @param {string} type
|
|
10974
|
+
* @param {Function} callback
|
|
10975
|
+
* @param {boolean} useCapture
|
|
10976
|
+
* @return {Object}
|
|
10977
|
+
* @example
|
|
10978
|
+
* ```ts
|
|
10979
|
+
* const delegation = delegate(document.body, 'a', 'click', function (e) {})
|
|
10980
|
+
* // destroy (removeEventListener)
|
|
10981
|
+
* delegation.destroy();
|
|
10982
|
+
*
|
|
10983
|
+
* const delegation1 = delegate(".btn", "click", function (e) { console.log(e.delegateTarget)},false);
|
|
10984
|
+
* // destroy (removeEventListener)
|
|
10985
|
+
* delegation1.destroy();
|
|
10986
|
+
* ```
|
|
10987
|
+
*/ // prettier-ignore
|
|
10988
|
+
function delegate(elements, selector, type, callback, useCapture) {
|
|
10989
|
+
// Handle the regular Element usage
|
|
10990
|
+
if (typeof elements.addEventListener === "function") {
|
|
10991
|
+
return _delegate.apply(null, arguments);
|
|
10992
|
+
}
|
|
10993
|
+
// Handle Element-less usage, it defaults to global delegation
|
|
10994
|
+
if (typeof type === "function") {
|
|
10995
|
+
// Use `document` as the first parameter, then apply arguments
|
|
10996
|
+
// This is a short way to .unshift `arguments` without running into deoptimizations
|
|
10997
|
+
return _delegate.bind(null, document).apply(null, arguments);
|
|
10998
|
+
}
|
|
10999
|
+
// Handle Selector-based usage
|
|
11000
|
+
if (typeof elements === "string") {
|
|
11001
|
+
elements = document.querySelectorAll(elements);
|
|
11002
|
+
}
|
|
11003
|
+
// Handle Array-like based usage
|
|
11004
|
+
return Array.prototype.map.call(elements, function(element) {
|
|
11005
|
+
return _delegate(element, selector, type, callback, useCapture);
|
|
11006
|
+
});
|
|
11007
|
+
}
|
|
11008
|
+
/**
|
|
11009
|
+
* Finds closest match and invokes callback.
|
|
11010
|
+
*
|
|
11011
|
+
* @param {Element} element
|
|
11012
|
+
* @param {string} selector
|
|
11013
|
+
* @param {string} type
|
|
11014
|
+
* @param {Function} callback
|
|
11015
|
+
* @return {Function}
|
|
11016
|
+
*/ // prettier-ignore
|
|
11017
|
+
function listener(element, selector, type, callback) {
|
|
11018
|
+
return function(e) {
|
|
11019
|
+
e.delegateTarget = closest$1(e.target, selector);
|
|
11020
|
+
if (e.delegateTarget) {
|
|
11021
|
+
callback.call(element, e);
|
|
11022
|
+
}
|
|
11023
|
+
};
|
|
11024
|
+
}
|
|
11025
|
+
|
|
11026
|
+
dist = delegate;
|
|
11330
11027
|
return dist;
|
|
11331
11028
|
}
|
|
11332
11029
|
|
|
11333
11030
|
/*
|
|
11334
|
-
* @ezuikit/control-time-line v1.0.
|
|
11335
|
-
* Copyright (c) 2025-
|
|
11031
|
+
* @ezuikit/control-time-line v1.0.5
|
|
11032
|
+
* Copyright (c) 2025-12-12 Ezviz-OpenBiz
|
|
11336
11033
|
* Released under the MIT License.
|
|
11337
11034
|
*/
|
|
11338
11035
|
|
|
11339
11036
|
var hasRequiredDist;
|
|
11340
11037
|
|
|
11341
11038
|
function requireDist () {
|
|
11342
|
-
if (hasRequiredDist) return dist$
|
|
11039
|
+
if (hasRequiredDist) return dist$2;
|
|
11343
11040
|
hasRequiredDist = 1;
|
|
11344
|
-
var deepmerge=requireCjs(),I18n=requireDist$7(),Picker=requireDist$a(),DragScroll=requireDist$1(),delegate=requireDist$9(),_$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#1890ff",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.toDate=function(time){var left,right,date=null;return "string"==typeof time&&time.includes(":")?date=new Date(time):"string"!=typeof time&&"number"!=typeof time||!/\d/.test(time+"")||10!==(time+"").length?"string"!=typeof time&&"number"!=typeof time||!/\d/.test(time+"")||13!==(time+"").length?(left=time,date=(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?time:new Date):date=new Date(+time):date=new Date(1e3*+time),date},TimeLineUtil.formatDateToHHmmss=function(time){var date=TimeLineUtil.toDate(time);if(date){var h=date.getHours(),m=date.getMinutes(),s=date.getSeconds();return (h>9?h:"0"+h)+":"+(m>9?m:"0"+m)+":"+(s>9?s:"0"+s)}return "00:00:00"},TimeLineUtil.subTime=function(m){return +m>9?m+"":"0"+m},TimeLineUtil.tranTime=function(time,fmt){ void 0===fmt&&(fmt="YYYY-MM-DD HH:mm:ss");var newDate=TimeLineUtil.toDate(time);return newDate?"YYYY-MM-DD"===fmt?newDate.getFullYear()+"-"+TimeLineUtil.subTime(newDate.getMonth()+1)+"-"+TimeLineUtil.subTime(newDate.getDate()):"HH:mm:ss"===fmt?TimeLineUtil.subTime(newDate.getHours())+":"+TimeLineUtil.subTime(newDate.getMinutes())+":"+TimeLineUtil.subTime(newDate.getSeconds()):"HH"===fmt?TimeLineUtil.subTime(newDate.getHours()):"mm:ss"===fmt?TimeLineUtil.subTime(newDate.getMinutes())+":"+TimeLineUtil.subTime(newDate.getSeconds()):"HH:mm"===fmt?TimeLineUtil.subTime(newDate.getHours())+":"+TimeLineUtil.subTime(newDate.getMinutes()):"YYYYMMDDTHHmmssZ"===fmt?newDate.getFullYear()+""+TimeLineUtil.subTime(newDate.getMonth()+1)+TimeLineUtil.subTime(newDate.getDate())+"T"+TimeLineUtil.subTime(newDate.getHours())+TimeLineUtil.subTime(newDate.getMinutes())+TimeLineUtil.subTime(newDate.getSeconds())+"Z":newDate.getFullYear()+"-"+TimeLineUtil.subTime(newDate.getMonth()+1)+"-"+TimeLineUtil.subTime(newDate.getDate())+" "+TimeLineUtil.subTime(newDate.getHours())+":"+TimeLineUtil.subTime(newDate.getMinutes())+":"+TimeLineUtil.subTime(newDate.getSeconds()):""},TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.isOverlap=function(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)},TimeLineUtil.tranTimeToString=function(start,end){var _TimeLineUtil_toDate,_TimeLineUtil_toDate1,secondNum=Math.floor((null==(_TimeLineUtil_toDate=TimeLineUtil.toDate(end))?void 0:_TimeLineUtil_toDate.getTime())-(null==(_TimeLineUtil_toDate1=TimeLineUtil.toDate(start))?void 0:_TimeLineUtil_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?TimeLineUtil.subTime(minute)+"'":"0'")+TimeLineUtil.subTime(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path xmlns="http://www.w3.org/2000/svg" id="形状结合" d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]];function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._onImageError=_this._onImageError.bind(_this),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_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:true,configurable:true}}),superClass&&_set_prototype_of$1(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1({},record,{startTime:TimeLineUtil.formatDateToHHmmss(record.startTime),endTime:TimeLineUtil.formatDateToHHmmss(record.endTime)})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:TimeLineUtil.formatDateToHHmmss(this.current||(new Date).getTime())}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:TimeLineUtil.tranTime(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll,_this__picker_$body_querySelectorAll,_this__picker_$body;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemList&&this._imageRemoveErrorEvent(this._$itemList.querySelectorAll("img.ez-time-line-img")||[]),this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._imageRemoveErrorEvent((null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelectorAll=_this__picker_$body.querySelectorAll)?void 0:_this__picker_$body_querySelectorAll.call(_this__picker_$body,"img"))||[]),this._picker.destroy(),this._picker=null);this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(TimeLineUtil.tranTime((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+" "+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;this._imageRemoveErrorEvent(container.querySelectorAll("img.ez-time-line-img")||[]),container.innerHTML="",timeArr.forEach(function(item,index){var timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+(_this.options.timeAxisBgColor||"rgba(189, 205, 255, 1)")+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+TimeLineUtil.tranTime(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+(_this.options.timeSectionColor||"#369FFF")+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+(_this.options.timeTextColor||"#666")+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),_this._imageErrorEvent(container.querySelectorAll("img.ez-time-line-img")||[]);}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+(this.options.currentTimeBgColor||"#648FFC")+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+(this.options.timePointColor||"#648FFC")+';"></span>\n <div class="ez-time-line-current-value" style="color: '+(this.options.currentTimeColor||"#FFFFFF")+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=TimeLineUtil.tranTime(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1({},item,{_index:index})):obj[+hour]=[_extends$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(TimeLineUtil.tranTime(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+TimeLineUtil.tranTime(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+TimeLineUtil.tranTime(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+TimeLineUtil.tranTime(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&this._imageErrorEvent((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]);},_proto._imageErrorEvent=function(list){var _this=this;void 0===list&&(list=[]),Array.from(list).forEach(function(img){img.hasAttribute("data-error")||img.addEventListener("error",_this._onImageError);});},_proto._imageRemoveErrorEvent=function(list){var _this=this;void 0===list&&(list=[]),Array.from(list).forEach(function(img){img.removeEventListener("error",_this._onImageError);});},_proto._onImageError=function(e){var img=e.target;if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,TimeLineUtil.subTime(Math.floor(second/3600))+":"+TimeLineUtil.subTime(Math.floor(second%3600/60))+":"+TimeLineUtil.subTime(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,scaleOffsetTop:4,showYearMonthDay:true},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._isCtrlKeyDown=false,_this._lastTouchDist=0,_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._ctrlKeyDownFun=_this._ctrlKeyDownFun.bind(_this),_this._ctrlKeyUpFun=_this._ctrlKeyUpFun.bind(_this),_this._init(),_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:true,configurable:true}}),superClass&&_set_prototype_of(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cssText+="cursor: pointer;"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.cssText+="width: "+this.width+"px;"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.cssText+="height: "+this.height+"px;"),this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:new Date(TimeLineUtil.tranTime(time,"YYYY-MM-DD HH:mm:ss"))});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,this._mergeTimeSections(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw();},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cssText+="cursor: "+(readOnly?"not-allowed":"pointer"));},_proto.destroy=function(){if(this._removeEventListener(),this._$canvas)try{this.$container.removeChild(this._$canvas),this._$canvas=null;}catch(e){}BaseTimeLine.prototype.destroy.call(this);},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale();},_proto._drawScale=function(){var lineWidth=1*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-Math.floor(new Date(TimeLineUtil.tranTime(new Date(1e3*curScaleTime),"YYYY-MM-DD")+" 00:00:00").getTime()/1e3))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-Math.floor(new Date(TimeLineUtil.tranTime(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD")+" 00:00:00").getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(TimeLineUtil.tranTime(new Date(1e3*leftLastScaleTime)),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-Math.floor(new Date(TimeLineUtil.tranTime(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD")+" 00:00:00").getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(TimeLineUtil.tranTime(new Date(1e3*rightLastScaleTime)),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawSolidLine(centerPosition.x,0,centerPosition.x,centerPosition.y,lineWidth,this.options.timePointColor);},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=12*this.options.dpr*1+"px serif",this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&TimeLineUtil.isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,0,position.x2-position.x1,this.height*this.options.dpr));}},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._mergeTimeSections=function(timeSections){if(0===timeSections.length)return timeSections;for(var merged=[(timeSections=timeSections.map(function(item){return 10===(item.startTime+"").length&&(item.startTime=1e3*item.startTime),10===(item.endTime+"").length&&(item.endTime=1e3*item.endTime),_extends({},item,{startTime:item.startTime,endTime:item.endTime})}))[0]],i=1;i<timeSections.length;i++){var prev=merged[merged.length-1],curr=timeSections[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",function(e){e.preventDefault();},{passive:false}),this._$canvas.addEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.addEventListener("keyup",this._ctrlKeyUpFun),document.addEventListener("keydown",this._ctrlKeyDownFun,false),document.addEventListener("keyup",this._ctrlKeyUpFun,false),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this._$canvas.removeEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.removeEventListener("keyup",this._ctrlKeyUpFun),document.removeEventListener("keydown",this._ctrlKeyDownFun),document.removeEventListener("keyup",this._ctrlKeyUpFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true);},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._moveEndOrTouchEndFun(e));},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left,this._update();}},_proto._mousewheelFun=function(e){e.preventDefault(),this.readOnly;},_proto._ctrlKeyDownFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=true);},_proto._ctrlKeyUpFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=false);},_proto._getTouchDistance=function(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=this._getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else if(2===e.touches.length){this._getTouchDistance(e.touches);this._lastTouchDist;}},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true;}},_create_class(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH,dist$1.BaseTimeLine=BaseTimeLine,dist$1.MobileTimeLine=MobileTimeLine,dist$1.TimeLine=TimeLine;
|
|
11345
|
-
return dist$
|
|
11041
|
+
var deepmerge=requireCjs(),I18n=requireDist$8(),Picker=requireDist$a(),DragScroll=requireDist$2(),delegate=requireDist$1(),_$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#1890ff",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.toDate=function(time){var left,right,date=null;return "string"==typeof time&&time.includes(":")?date=new Date(time):"string"!=typeof time&&"number"!=typeof time||!/\d/.test(time+"")||10!==(time+"").length?"string"!=typeof time&&"number"!=typeof time||!/\d/.test(time+"")||13!==(time+"").length?(left=time,date=(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?time:new Date):date=new Date(+time):date=new Date(1e3*+time),date},TimeLineUtil.formatDateToHHmmss=function(time){var date=TimeLineUtil.toDate(time);if(date){var h=date.getHours(),m=date.getMinutes(),s=date.getSeconds();return (h>9?h:"0"+h)+":"+(m>9?m:"0"+m)+":"+(s>9?s:"0"+s)}return "00:00:00"},TimeLineUtil.subTime=function(m){return +m>9?m+"":"0"+m},TimeLineUtil.tranTime=function(time,fmt){ void 0===fmt&&(fmt="YYYY-MM-DD HH:mm:ss");var newDate=TimeLineUtil.toDate(time);return newDate?"YYYY-MM-DD"===fmt?newDate.getFullYear()+"-"+TimeLineUtil.subTime(newDate.getMonth()+1)+"-"+TimeLineUtil.subTime(newDate.getDate()):"HH:mm:ss"===fmt?TimeLineUtil.subTime(newDate.getHours())+":"+TimeLineUtil.subTime(newDate.getMinutes())+":"+TimeLineUtil.subTime(newDate.getSeconds()):"HH"===fmt?TimeLineUtil.subTime(newDate.getHours()):"mm:ss"===fmt?TimeLineUtil.subTime(newDate.getMinutes())+":"+TimeLineUtil.subTime(newDate.getSeconds()):"HH:mm"===fmt?TimeLineUtil.subTime(newDate.getHours())+":"+TimeLineUtil.subTime(newDate.getMinutes()):"YYYYMMDDTHHmmssZ"===fmt?newDate.getFullYear()+""+TimeLineUtil.subTime(newDate.getMonth()+1)+TimeLineUtil.subTime(newDate.getDate())+"T"+TimeLineUtil.subTime(newDate.getHours())+TimeLineUtil.subTime(newDate.getMinutes())+TimeLineUtil.subTime(newDate.getSeconds())+"Z":newDate.getFullYear()+"-"+TimeLineUtil.subTime(newDate.getMonth()+1)+"-"+TimeLineUtil.subTime(newDate.getDate())+" "+TimeLineUtil.subTime(newDate.getHours())+":"+TimeLineUtil.subTime(newDate.getMinutes())+":"+TimeLineUtil.subTime(newDate.getSeconds()):""},TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.isOverlap=function(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)},TimeLineUtil.tranTimeToString=function(start,end){var _TimeLineUtil_toDate,_TimeLineUtil_toDate1,secondNum=Math.floor((null==(_TimeLineUtil_toDate=TimeLineUtil.toDate(end))?void 0:_TimeLineUtil_toDate.getTime())-(null==(_TimeLineUtil_toDate1=TimeLineUtil.toDate(start))?void 0:_TimeLineUtil_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?TimeLineUtil.subTime(minute)+"'":"0'")+TimeLineUtil.subTime(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path xmlns="http://www.w3.org/2000/svg" id="形状结合" d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_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:true,configurable:true}}),superClass&&_set_prototype_of$1(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1({},record,{startTime:TimeLineUtil.formatDateToHHmmss(record.startTime),endTime:TimeLineUtil.formatDateToHHmmss(record.endTime)})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:TimeLineUtil.formatDateToHHmmss(this.current||(new Date).getTime())}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:TimeLineUtil.tranTime(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(TimeLineUtil.tranTime((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+" "+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+(_this.options.timeAxisBgColor||"rgba(189, 205, 255, 1)")+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+TimeLineUtil.tranTime(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+(_this.options.timeSectionColor||"#369FFF")+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+(_this.options.timeTextColor||"#666")+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+(this.options.currentTimeBgColor||"#648FFC")+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+(this.options.timePointColor||"#648FFC")+';"></span>\n <div class="ez-time-line-current-value" style="color: '+(this.options.currentTimeColor||"#FFFFFF")+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=TimeLineUtil.tranTime(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1({},item,{_index:index})):obj[+hour]=[_extends$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(TimeLineUtil.tranTime(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+TimeLineUtil.tranTime(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+TimeLineUtil.tranTime(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+TimeLineUtil.tranTime(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,TimeLineUtil.subTime(Math.floor(second/3600))+":"+TimeLineUtil.subTime(Math.floor(second%3600/60))+":"+TimeLineUtil.subTime(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,scaleOffsetTop:4,showYearMonthDay:true},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._isCtrlKeyDown=false,_this._lastTouchDist=0,_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._ctrlKeyDownFun=_this._ctrlKeyDownFun.bind(_this),_this._ctrlKeyUpFun=_this._ctrlKeyUpFun.bind(_this),_this._init(),_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:true,configurable:true}}),superClass&&_set_prototype_of(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cssText+="cursor: pointer;"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.cssText+="width: "+this.width+"px;"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.cssText+="height: "+this.height+"px;"),this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:new Date(TimeLineUtil.tranTime(time,"YYYY-MM-DD HH:mm:ss"))});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,this._mergeTimeSections(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw();},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cssText+="cursor: "+(readOnly?"not-allowed":"pointer"));},_proto.destroy=function(){if(this._removeEventListener(),this._$canvas)try{this.$container.removeChild(this._$canvas),this._$canvas=null;}catch(e){}BaseTimeLine.prototype.destroy.call(this);},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale();},_proto._drawScale=function(){var lineWidth=1*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-Math.floor(new Date(TimeLineUtil.tranTime(new Date(1e3*curScaleTime),"YYYY-MM-DD")+" 00:00:00").getTime()/1e3))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-Math.floor(new Date(TimeLineUtil.tranTime(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD")+" 00:00:00").getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(TimeLineUtil.tranTime(new Date(1e3*leftLastScaleTime)),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-Math.floor(new Date(TimeLineUtil.tranTime(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD")+" 00:00:00").getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(TimeLineUtil.tranTime(new Date(1e3*rightLastScaleTime)),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawSolidLine(centerPosition.x,0,centerPosition.x,centerPosition.y,lineWidth,this.options.timePointColor);},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=12*this.options.dpr*1+"px serif",this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&TimeLineUtil.isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,0,position.x2-position.x1,this.height*this.options.dpr));}},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._mergeTimeSections=function(timeSections){if(0===timeSections.length)return timeSections;for(var merged=[(timeSections=timeSections.map(function(item){return 10===(item.startTime+"").length&&(item.startTime=1e3*item.startTime),10===(item.endTime+"").length&&(item.endTime=1e3*item.endTime),_extends({},item,{startTime:item.startTime,endTime:item.endTime})}))[0]],i=1;i<timeSections.length;i++){var prev=merged[merged.length-1],curr=timeSections[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",function(e){e.preventDefault();},{passive:false}),this._$canvas.addEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.addEventListener("keyup",this._ctrlKeyUpFun),document.addEventListener("keydown",this._ctrlKeyDownFun,false),document.addEventListener("keyup",this._ctrlKeyUpFun,false),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this._$canvas.removeEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.removeEventListener("keyup",this._ctrlKeyUpFun),document.removeEventListener("keydown",this._ctrlKeyDownFun),document.removeEventListener("keyup",this._ctrlKeyUpFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true);},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._moveEndOrTouchEndFun(e));},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left,this._update();}},_proto._mousewheelFun=function(e){e.preventDefault(),this.readOnly;},_proto._ctrlKeyDownFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=true);},_proto._ctrlKeyUpFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=false);},_proto._getTouchDistance=function(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=this._getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else if(2===e.touches.length){this._getTouchDistance(e.touches);this._lastTouchDist;}},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true;}},_create_class(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH,dist$2.BaseTimeLine=BaseTimeLine,dist$2.MobileTimeLine=MobileTimeLine,dist$2.TimeLine=TimeLine;
|
|
11042
|
+
return dist$2;
|
|
11346
11043
|
}
|
|
11347
11044
|
|
|
11348
11045
|
var distExports = requireDist();
|
|
@@ -12413,8 +12110,7 @@
|
|
|
12413
12110
|
return container;
|
|
12414
12111
|
},
|
|
12415
12112
|
language: theme.options.language,
|
|
12416
|
-
locales: theme.i18n.translations
|
|
12417
|
-
staticPath: theme.options.staticPath
|
|
12113
|
+
locales: theme.i18n.translations
|
|
12418
12114
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["dateOptions"]) || {}, {
|
|
12419
12115
|
props: props
|
|
12420
12116
|
}));
|
|
@@ -12713,7 +12409,18 @@
|
|
|
12713
12409
|
*/ _this._footerMoreControl = null, /** 头部控件 @since 0.0.1 @private */ _this._header = null, /** 低部控件 @since 0.0.1 @private */ _this._footer = null, /** 回放底部时间轴 @since 0.0.1 @private */ _this._recFooter = null, /**
|
|
12714
12410
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
12715
12411
|
* @private
|
|
12716
|
-
*/ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null,
|
|
12412
|
+
*/ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null, // /**
|
|
12413
|
+
// * 记录回放的月份
|
|
12414
|
+
// *
|
|
12415
|
+
// * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
|
|
12416
|
+
// *
|
|
12417
|
+
// * value: 月份列表 比如 ["2025-12-01", "2025-12-02"]
|
|
12418
|
+
// * @private
|
|
12419
|
+
// */
|
|
12420
|
+
// _recMonthObj: Record<string, string[]> = {};
|
|
12421
|
+
/**
|
|
12422
|
+
* 录像回放的月份列表 @private
|
|
12423
|
+
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, /** 播放地址信息 */ _this.urlInfo = null, _this.scaleMode = 0;
|
|
12717
12424
|
_this._initOptions(options);
|
|
12718
12425
|
if (_this.options.type === 'ezopen') {
|
|
12719
12426
|
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
@@ -12723,7 +12430,7 @@
|
|
|
12723
12430
|
}
|
|
12724
12431
|
if (_this.urlInfo.type === 'rec') {
|
|
12725
12432
|
var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo_searchParams2, _this_urlInfo2;
|
|
12726
|
-
_this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? DateTime.
|
|
12433
|
+
_this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? distExports$6.DateTime.toDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : distExports$6.DateTime.toDate(distExports$6.DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
|
|
12727
12434
|
}
|
|
12728
12435
|
}
|
|
12729
12436
|
_this._getRecType(_this.options.url);
|
|
@@ -12970,6 +12677,7 @@
|
|
|
12970
12677
|
this._themeData = null;
|
|
12971
12678
|
if (this.i18n) this.i18n = null;
|
|
12972
12679
|
this.recType = '';
|
|
12680
|
+
this.recMonth = []; // 清空数据
|
|
12973
12681
|
this.emit(EVENTS.theme.destroyed);
|
|
12974
12682
|
this.removeAllListeners();
|
|
12975
12683
|
if (this.logger) this.logger = null;
|
|
@@ -13935,7 +13643,7 @@
|
|
|
13935
13643
|
zh: zh,
|
|
13936
13644
|
en: en
|
|
13937
13645
|
};
|
|
13938
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.
|
|
13646
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.10';
|
|
13939
13647
|
|
|
13940
13648
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
13941
13649
|
|