@ezuikit/player-theme 3.0.0-beta.5 → 3.0.1-beta.4

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.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v3.0.0-beta.5
3
- * Copyright (c) 2026-05-06 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.0.1-beta.4
3
+ * Copyright (c) 2026-05-18 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -492,6 +492,9 @@
492
492
  /** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
493
493
  /** 语音广播状态变化 */ broadcastChange: 'broadcastChange',
494
494
  /** AI对话框状态变化 */ aichatChange: 'aichatChange',
495
+ /** 直播模式切换 */ liveChange: 'liveChange',
496
+ /** 回放下拉选择变化 */ recDropdownChange: 'recDropdownChange',
497
+ /** 告警消息面板状态变化 */ alarmMessageChange: 'alarmMessageChange',
495
498
  /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
496
499
  records: 'records',
497
500
  ptzSpeedChange: 'ptzSpeedChange',
@@ -539,6 +542,12 @@
539
542
  /** 语音广播控件销毁 */ broadcastDestroy: 'Control.broadcastDestroy',
540
543
  /** AI对话框状态变化 */ aichatChange: 'Control.aichatChange',
541
544
  /** AI对话框控件销毁 */ aichatDestroy: 'Control.aichatDestroy',
545
+ /** 直播按钮点击 */ liveChange: 'Control.liveChange',
546
+ /** 直播控件销毁 */ liveDestroy: 'Control.liveDestroy',
547
+ /** 回放下拉选择变化 */ recDropdownChange: 'Control.recDropdownChange',
548
+ /** 回放下拉控件销毁 */ recDropdownDestroy: 'Control.recDropdownDestroy',
549
+ /** 告警消息面板开关 */ alarmMessageChange: 'Control.alarmMessageChange',
550
+ /** 告警消息面板销毁 */ alarmMessageDestroy: 'Control.alarmMessageDestroy',
542
551
  /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
543
552
  /** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
544
553
  /** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
@@ -590,7 +599,7 @@
590
599
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
591
600
  return Constructor;
592
601
  }
593
- function _inherits$t(subClass, superClass) {
602
+ function _inherits$w(subClass, superClass) {
594
603
  if (typeof superClass !== "function" && superClass !== null) {
595
604
  throw new TypeError("Super expression must either be null or a function");
596
605
  }
@@ -601,14 +610,14 @@
601
610
  configurable: true
602
611
  }
603
612
  });
604
- if (superClass) _set_prototype_of$w(subClass, superClass);
613
+ if (superClass) _set_prototype_of$z(subClass, superClass);
605
614
  }
606
- function _set_prototype_of$w(o, p) {
607
- _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
615
+ function _set_prototype_of$z(o, p) {
616
+ _set_prototype_of$z = Object.setPrototypeOf || function setPrototypeOf(o, p) {
608
617
  o.__proto__ = p;
609
618
  return o;
610
619
  };
611
- return _set_prototype_of$w(o, p);
620
+ return _set_prototype_of$z(o, p);
612
621
  }
613
622
  /**
614
623
  * 控件基类
@@ -622,7 +631,7 @@
622
631
  * const myControl = new MyControl({})
623
632
  * ```
624
633
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
625
- _inherits$t(Control, EventEmitter);
634
+ _inherits$w(Control, EventEmitter);
626
635
  function Control(options) {
627
636
  var _this;
628
637
  var _this___options;
@@ -797,8 +806,8 @@
797
806
  return Control;
798
807
  }(EventEmitter);
799
808
 
800
- function _extends$u() {
801
- _extends$u = Object.assign || function(target) {
809
+ function _extends$x() {
810
+ _extends$x = Object.assign || function(target) {
802
811
  for(var i = 1; i < arguments.length; i++){
803
812
  var source = arguments[i];
804
813
  for(var key in source){
@@ -809,9 +818,9 @@
809
818
  }
810
819
  return target;
811
820
  };
812
- return _extends$u.apply(this, arguments);
821
+ return _extends$x.apply(this, arguments);
813
822
  }
814
- function _inherits$s(subClass, superClass) {
823
+ function _inherits$v(subClass, superClass) {
815
824
  if (typeof superClass !== "function" && superClass !== null) {
816
825
  throw new TypeError("Super expression must either be null or a function");
817
826
  }
@@ -822,25 +831,25 @@
822
831
  configurable: true
823
832
  }
824
833
  });
825
- if (superClass) _set_prototype_of$v(subClass, superClass);
834
+ if (superClass) _set_prototype_of$y(subClass, superClass);
826
835
  }
827
- function _set_prototype_of$v(o, p) {
828
- _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
836
+ function _set_prototype_of$y(o, p) {
837
+ _set_prototype_of$y = Object.setPrototypeOf || function setPrototypeOf(o, p) {
829
838
  o.__proto__ = p;
830
839
  return o;
831
840
  };
832
- return _set_prototype_of$v(o, p);
841
+ return _set_prototype_of$y(o, p);
833
842
  }
834
843
  var LOADING_DEFAULT_OPTIONS = {};
835
844
  /**
836
845
  * 加载动画控件
837
846
  * @category Control
838
847
  */ var Loading = /*#__PURE__*/ function(Control) {
839
- _inherits$s(Loading, Control);
848
+ _inherits$v(Loading, Control);
840
849
  function Loading(options) {
841
850
  if (options === void 0) options = {};
842
851
  var _this;
843
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$u({}, options, {
852
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$x({}, options, {
844
853
  tagName: 'div',
845
854
  controlType: 'block',
846
855
  classNameSuffix: 'loading'
@@ -878,8 +887,8 @@
878
887
  return Loading;
879
888
  }(Control);
880
889
 
881
- function _extends$t() {
882
- _extends$t = Object.assign || function(target) {
890
+ function _extends$w() {
891
+ _extends$w = Object.assign || function(target) {
883
892
  for(var i = 1; i < arguments.length; i++){
884
893
  var source = arguments[i];
885
894
  for(var key in source){
@@ -890,9 +899,9 @@
890
899
  }
891
900
  return target;
892
901
  };
893
- return _extends$t.apply(this, arguments);
902
+ return _extends$w.apply(this, arguments);
894
903
  }
895
- function _inherits$r(subClass, superClass) {
904
+ function _inherits$u(subClass, superClass) {
896
905
  if (typeof superClass !== "function" && superClass !== null) {
897
906
  throw new TypeError("Super expression must either be null or a function");
898
907
  }
@@ -903,14 +912,14 @@
903
912
  configurable: true
904
913
  }
905
914
  });
906
- if (superClass) _set_prototype_of$u(subClass, superClass);
915
+ if (superClass) _set_prototype_of$x(subClass, superClass);
907
916
  }
908
- function _set_prototype_of$u(o, p) {
909
- _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
917
+ function _set_prototype_of$x(o, p) {
918
+ _set_prototype_of$x = Object.setPrototypeOf || function setPrototypeOf(o, p) {
910
919
  o.__proto__ = p;
911
920
  return o;
912
921
  };
913
- return _set_prototype_of$u(o, p);
922
+ return _set_prototype_of$x(o, p);
914
923
  }
915
924
  // 不放在服务器上 是因为有可能http加载失败
916
925
  // prettier-ignore
@@ -922,11 +931,11 @@
922
931
  * 封面控件
923
932
  * @category Control
924
933
  */ var Poster = /*#__PURE__*/ function(Control) {
925
- _inherits$r(Poster, Control);
934
+ _inherits$u(Poster, Control);
926
935
  function Poster(options) {
927
936
  if (options === void 0) options = {};
928
937
  var _this;
929
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$t({}, options, {
938
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$w({}, options, {
930
939
  tagName: 'div',
931
940
  controlType: 'block',
932
941
  classNameSuffix: 'poster'
@@ -1032,7 +1041,10 @@
1032
1041
  warnCircleOutLined: '<svg width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" focusable="false" aria-hidden="true" data-icon="info-circle">\n <path d="M8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM7.5 8.875C7.5 8.94375 7.55625 9 7.625 9L8.375 9C8.44375 9 8.5 8.94375 8.5 8.875L8.5 4.625C8.5 4.55625 8.44375 4.5 8.375 4.5L7.625 4.5C7.55625 4.5 7.5 4.55625 7.5 4.625L7.5 8.875ZM7.25 10.75C7.25 11.1642 7.58579 11.5 8 11.5C8.41421 11.5 8.75 11.1642 8.75 10.75C8.75 10.3358 8.41421 10 8 10C7.58579 10 7.25 10.3358 7.25 10.75Z" fill-rule="evenodd" />\n </svg>',
1033
1042
  date: '<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="date">\n <g>\n <path d="m13.35,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.3,0.5 -0.5,0.5z" />\n <path d="m6.65,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.2,0.5 -0.5,0.5z" />\n <path d="m17.45,8.4l-15,0c-0.3,0 -0.5,-0.2 -0.5,-0.5s0.2,-0.5 0.5,-0.5l15,0c0.3,0 0.5,0.2 0.5,0.5s-0.2,0.5 -0.5,0.5z" />\n <path d="m15.85,18.4l-11.7,0c-1.2,0 -2.2,-1 -2.2,-2.2l0,-10.8c0,-1.2 1,-2.2 2.2,-2.2l11.7,0c1.2,0 2.2,1 2.2,2.2l0,10.8c-0.1,1.3 -1,2.2 -2.2,2.2zm-11.7,-14.1c-0.6,0 -1.2,0.5 -1.2,1.2l0,10.8c0,0.6 0.5,1.2 1.2,1.2l11.7,0c0.6,0 1.2,-0.5 1.2,-1.2l0,-10.9c0,-0.6 -0.5,-1.2 -1.2,-1.2l-11.7,0l0,0.1z" />\n <path d="m9.95,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5s0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7z" />\n <path d="m14.15,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7zm0,-1c-0.2,0 -0.3,0.1 -0.3,0.3c0,0.2 0.3,0.4 0.5,0.2c0.1,-0.1 0.1,-0.1 0.1,-0.2c0,-0.2 -0.1,-0.3 -0.3,-0.3z" />\n <path d="m5.85,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0,0.4 -0.3,0.7 -0.7,0.7z" />\n <path d="m9.95,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0.1,0.4 -0.3,0.7 -0.7,0.7z" />\n </g>\n </svg>',
1034
1043
  add: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="add">\n <path d="M10.5859 2.96875L9.41406 2.96875C9.3099 2.96875 9.25781 3.02083 9.25781 3.125L9.25781 9.25781L3.4375 9.25781C3.38542 9.25781 3.34635 9.27083 3.32031 9.29688C3.29427 9.32292 3.28125 9.36198 3.28125 9.41406L3.28125 10.5859C3.28125 10.6901 3.33333 10.7422 3.4375 10.7422L9.25781 10.7422L9.25781 16.875C9.25781 16.9792 9.3099 17.0312 9.41406 17.0312L10.5859 17.0312C10.6901 17.0312 10.7422 16.9792 10.7422 16.875L10.7422 10.7422L16.5625 10.7422C16.6667 10.7422 16.7188 10.6901 16.7188 10.5859L16.7188 9.41406C16.7188 9.3099 16.6667 9.25781 16.5625 9.25781L10.7422 9.25781L10.7422 3.125C10.7422 3.07292 10.7292 3.03385 10.7031 3.00781C10.6771 2.98177 10.638 2.96875 10.5859 2.96875Z" fill-rule="evenodd" /></svg>',
1035
- reduce: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="reduce">\n <path d="M3.4375 9.25781L16.5625 9.25781C16.6667 9.25781 16.7188 9.3099 16.7188 9.41406L16.7188 10.5859C16.7188 10.6901 16.6667 10.7422 16.5625 10.7422L3.4375 10.7422C3.33333 10.7422 3.28125 10.6901 3.28125 10.5859L3.28125 9.41406C3.28125 9.3099 3.33333 9.25781 3.4375 9.25781Z" fill-rule="evenodd" />\n </svg>'
1044
+ reduce: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="reduce">\n <path d="M3.4375 9.25781L16.5625 9.25781C16.6667 9.25781 16.7188 9.3099 16.7188 9.41406L16.7188 10.5859C16.7188 10.6901 16.6667 10.7422 16.5625 10.7422L3.4375 10.7422C3.33333 10.7422 3.28125 10.6901 3.28125 10.5859L3.28125 9.41406C3.28125 9.3099 3.33333 9.25781 3.4375 9.25781Z" fill-rule="evenodd" />\n </svg>',
1045
+ /** 直播 */ live: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="live">\n <rect width="18" height="13" x="3" y="7" rx="1.6" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M8.26636 4.8L10.466 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M15.996 4.8L13.796 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M9.8 17L15.4 13.354L9.8 10L9.8 17Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1046
+ /** 回放 */ recDropdown: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="rec-dropdown">\n <path d="M9.168 2.556C9.168 2.556 12.51 4.445 12 4.445C7.306 4.445 3.5 8.251 3.5 12.945C3.5 17.64 7.306 21.445 12 21.445C16.695 21.445 20.5 17.64 20.5 12.945C20.5 10.622 19.568 8.517 18.058 6.982" stroke-linecap="round" stroke-width="1.5"/>\n <path d="M11.61 9.829L11.61 13.731L16.064 13.731" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1047
+ /** 消息/告警 */ alarmMessage: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="alarm-message">\n <path d="M9.708 18.344L9.708 18.709C9.708 19.974 10.734 21 12 21C13.266 21 14.292 19.974 14.292 18.709L14.292 18.343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M13.833 5.751L13.833 4.833C13.833 3.821 13.013 3 12 3C10.987 3 10.167 3.821 10.167 4.833L10.167 5.751" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M6.563 10.189C6.563 7.686 8.592 5.657 11.094 5.657L12.907 5.657C15.41 5.657 17.438 7.686 17.438 10.189L17.438 12.986C17.438 13.516 17.649 14.025 18.024 14.4L18.665 15.04C19.04 15.416 19.251 15.925 19.251 16.455C19.251 17.499 18.405 18.345 17.361 18.345L6.64 18.345C5.596 18.345 4.75 17.499 4.75 16.455C4.75 15.925 4.961 15.416 5.336 15.04L5.977 14.4C6.352 14.025 6.563 13.516 6.563 12.986L6.563 10.189Z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>'
1036
1048
  };
1037
1049
 
1038
1050
  /**
@@ -1190,11 +1202,23 @@
1190
1202
  reduce: function(attr) {
1191
1203
  if (attr === void 0) attr = {};
1192
1204
  return createIcon(Icons.reduce, 'reduce', attr);
1205
+ },
1206
+ /** 直播 */ live: function(attr) {
1207
+ if (attr === void 0) attr = {};
1208
+ return createIcon(Icons.live, 'live', attr);
1209
+ },
1210
+ /** 回放 */ recDropdown: function(attr) {
1211
+ if (attr === void 0) attr = {};
1212
+ return createIcon(Icons.recDropdown, 'rec-dropdown', attr);
1213
+ },
1214
+ /** 消息 */ alarmMessage: function(attr) {
1215
+ if (attr === void 0) attr = {};
1216
+ return createIcon(Icons.alarmMessage, 'alarm-message', attr);
1193
1217
  }
1194
1218
  };
1195
1219
 
1196
- function _extends$s() {
1197
- _extends$s = Object.assign || function(target) {
1220
+ function _extends$v() {
1221
+ _extends$v = Object.assign || function(target) {
1198
1222
  for(var i = 1; i < arguments.length; i++){
1199
1223
  var source = arguments[i];
1200
1224
  for(var key in source){
@@ -1205,9 +1229,9 @@
1205
1229
  }
1206
1230
  return target;
1207
1231
  };
1208
- return _extends$s.apply(this, arguments);
1232
+ return _extends$v.apply(this, arguments);
1209
1233
  }
1210
- function _inherits$q(subClass, superClass) {
1234
+ function _inherits$t(subClass, superClass) {
1211
1235
  if (typeof superClass !== "function" && superClass !== null) {
1212
1236
  throw new TypeError("Super expression must either be null or a function");
1213
1237
  }
@@ -1218,25 +1242,25 @@
1218
1242
  configurable: true
1219
1243
  }
1220
1244
  });
1221
- if (superClass) _set_prototype_of$t(subClass, superClass);
1245
+ if (superClass) _set_prototype_of$w(subClass, superClass);
1222
1246
  }
1223
- function _set_prototype_of$t(o, p) {
1224
- _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1247
+ function _set_prototype_of$w(o, p) {
1248
+ _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1225
1249
  o.__proto__ = p;
1226
1250
  return o;
1227
1251
  };
1228
- return _set_prototype_of$t(o, p);
1252
+ return _set_prototype_of$w(o, p);
1229
1253
  }
1230
1254
  var MESSAGE_DEFAULT_OPTIONS = {};
1231
1255
  /**
1232
1256
  * 消息控件
1233
1257
  * @category Control
1234
1258
  */ var Message = /*#__PURE__*/ function(Control) {
1235
- _inherits$q(Message, Control);
1259
+ _inherits$t(Message, Control);
1236
1260
  function Message(options) {
1237
1261
  if (options === void 0) options = {};
1238
1262
  var _this;
1239
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$s({}, options, {
1263
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$v({}, options, {
1240
1264
  tagName: 'div',
1241
1265
  controlType: 'block'
1242
1266
  }))) || this, _this._$toast = null;
@@ -1389,8 +1413,8 @@
1389
1413
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1390
1414
  return Constructor;
1391
1415
  }
1392
- function _extends$r() {
1393
- _extends$r = Object.assign || function(target) {
1416
+ function _extends$u() {
1417
+ _extends$u = Object.assign || function(target) {
1394
1418
  for(var i = 1; i < arguments.length; i++){
1395
1419
  var source = arguments[i];
1396
1420
  for(var key in source){
@@ -1401,9 +1425,9 @@
1401
1425
  }
1402
1426
  return target;
1403
1427
  };
1404
- return _extends$r.apply(this, arguments);
1428
+ return _extends$u.apply(this, arguments);
1405
1429
  }
1406
- function _inherits$p(subClass, superClass) {
1430
+ function _inherits$s(subClass, superClass) {
1407
1431
  if (typeof superClass !== "function" && superClass !== null) {
1408
1432
  throw new TypeError("Super expression must either be null or a function");
1409
1433
  }
@@ -1414,23 +1438,23 @@
1414
1438
  configurable: true
1415
1439
  }
1416
1440
  });
1417
- if (superClass) _set_prototype_of$s(subClass, superClass);
1441
+ if (superClass) _set_prototype_of$v(subClass, superClass);
1418
1442
  }
1419
- function _set_prototype_of$s(o, p) {
1420
- _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1443
+ function _set_prototype_of$v(o, p) {
1444
+ _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1421
1445
  o.__proto__ = p;
1422
1446
  return o;
1423
1447
  };
1424
- return _set_prototype_of$s(o, p);
1448
+ return _set_prototype_of$v(o, p);
1425
1449
  }
1426
1450
  /**
1427
1451
  * 播放/暂停控件
1428
1452
  * @category Control
1429
1453
  */ var Play = /*#__PURE__*/ function(Control) {
1430
- _inherits$p(Play, Control);
1454
+ _inherits$s(Play, Control);
1431
1455
  function Play(options) {
1432
1456
  var _this;
1433
- _this = Control.call(this, _extends$r({}, options, {
1457
+ _this = Control.call(this, _extends$u({}, options, {
1434
1458
  tagName: 'span',
1435
1459
  controlType: 'button',
1436
1460
  classNameSuffix: 'play'
@@ -2948,8 +2972,8 @@
2948
2972
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
2949
2973
  return Constructor;
2950
2974
  }
2951
- function _extends$q() {
2952
- _extends$q = Object.assign || function(target) {
2975
+ function _extends$t() {
2976
+ _extends$t = Object.assign || function(target) {
2953
2977
  for(var i = 1; i < arguments.length; i++){
2954
2978
  var source = arguments[i];
2955
2979
  for(var key in source){
@@ -2960,9 +2984,9 @@
2960
2984
  }
2961
2985
  return target;
2962
2986
  };
2963
- return _extends$q.apply(this, arguments);
2987
+ return _extends$t.apply(this, arguments);
2964
2988
  }
2965
- function _inherits$o(subClass, superClass) {
2989
+ function _inherits$r(subClass, superClass) {
2966
2990
  if (typeof superClass !== "function" && superClass !== null) {
2967
2991
  throw new TypeError("Super expression must either be null or a function");
2968
2992
  }
@@ -2973,14 +2997,14 @@
2973
2997
  configurable: true
2974
2998
  }
2975
2999
  });
2976
- if (superClass) _set_prototype_of$r(subClass, superClass);
3000
+ if (superClass) _set_prototype_of$u(subClass, superClass);
2977
3001
  }
2978
- function _set_prototype_of$r(o, p) {
2979
- _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3002
+ function _set_prototype_of$u(o, p) {
3003
+ _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2980
3004
  o.__proto__ = p;
2981
3005
  return o;
2982
3006
  };
2983
- return _set_prototype_of$r(o, p);
3007
+ return _set_prototype_of$u(o, p);
2984
3008
  }
2985
3009
  var VOLUME_DEFAULT_OPTIONS = {
2986
3010
  volume: 0.8,
@@ -2994,12 +3018,12 @@
2994
3018
  * 音量调节控件
2995
3019
  * @category Control
2996
3020
  */ var Volume = /*#__PURE__*/ function(Control) {
2997
- _inherits$o(Volume, Control);
3021
+ _inherits$r(Volume, Control);
2998
3022
  function Volume(options) {
2999
3023
  if (options === void 0) options = {};
3000
3024
  var _this;
3001
3025
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
3002
- _this = Control.call(this, _extends$q({}, options, {
3026
+ _this = Control.call(this, _extends$t({}, options, {
3003
3027
  tagName: 'span',
3004
3028
  classNameSuffix: 'volume',
3005
3029
  controlType: 'button'
@@ -3858,8 +3882,8 @@
3858
3882
  return Fullscreen;
3859
3883
  }();
3860
3884
 
3861
- function _extends$p() {
3862
- _extends$p = Object.assign || function(target) {
3885
+ function _extends$s() {
3886
+ _extends$s = Object.assign || function(target) {
3863
3887
  for(var i = 1; i < arguments.length; i++){
3864
3888
  var source = arguments[i];
3865
3889
  for(var key in source){
@@ -3870,9 +3894,9 @@
3870
3894
  }
3871
3895
  return target;
3872
3896
  };
3873
- return _extends$p.apply(this, arguments);
3897
+ return _extends$s.apply(this, arguments);
3874
3898
  }
3875
- function _inherits$n(subClass, superClass) {
3899
+ function _inherits$q(subClass, superClass) {
3876
3900
  if (typeof superClass !== "function" && superClass !== null) {
3877
3901
  throw new TypeError("Super expression must either be null or a function");
3878
3902
  }
@@ -3883,24 +3907,24 @@
3883
3907
  configurable: true
3884
3908
  }
3885
3909
  });
3886
- if (superClass) _set_prototype_of$q(subClass, superClass);
3910
+ if (superClass) _set_prototype_of$t(subClass, superClass);
3887
3911
  }
3888
- function _set_prototype_of$q(o, p) {
3889
- _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3912
+ function _set_prototype_of$t(o, p) {
3913
+ _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3890
3914
  o.__proto__ = p;
3891
3915
  return o;
3892
3916
  };
3893
- return _set_prototype_of$q(o, p);
3917
+ return _set_prototype_of$t(o, p);
3894
3918
  }
3895
3919
  /**
3896
3920
  * 全屏控件
3897
3921
  * @category Control
3898
3922
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
3899
- _inherits$n(Fullscreen, Control);
3923
+ _inherits$q(Fullscreen, Control);
3900
3924
  function Fullscreen(options) {
3901
3925
  var _this;
3902
3926
  var _options_props, _this_options;
3903
- _this = Control.call(this, _extends$p({
3927
+ _this = Control.call(this, _extends$s({
3904
3928
  tagName: 'span',
3905
3929
  classNameSuffix: 'fullscreen',
3906
3930
  controlType: 'button'
@@ -3965,8 +3989,8 @@
3965
3989
  return Fullscreen;
3966
3990
  }(Control);
3967
3991
 
3968
- function _extends$o() {
3969
- _extends$o = Object.assign || function(target) {
3992
+ function _extends$r() {
3993
+ _extends$r = Object.assign || function(target) {
3970
3994
  for(var i = 1; i < arguments.length; i++){
3971
3995
  var source = arguments[i];
3972
3996
  for(var key in source){
@@ -3977,9 +4001,9 @@
3977
4001
  }
3978
4002
  return target;
3979
4003
  };
3980
- return _extends$o.apply(this, arguments);
4004
+ return _extends$r.apply(this, arguments);
3981
4005
  }
3982
- function _inherits$m(subClass, superClass) {
4006
+ function _inherits$p(subClass, superClass) {
3983
4007
  if (typeof superClass !== "function" && superClass !== null) {
3984
4008
  throw new TypeError("Super expression must either be null or a function");
3985
4009
  }
@@ -3990,24 +4014,24 @@
3990
4014
  configurable: true
3991
4015
  }
3992
4016
  });
3993
- if (superClass) _set_prototype_of$p(subClass, superClass);
4017
+ if (superClass) _set_prototype_of$s(subClass, superClass);
3994
4018
  }
3995
- function _set_prototype_of$p(o, p) {
3996
- _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4019
+ function _set_prototype_of$s(o, p) {
4020
+ _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3997
4021
  o.__proto__ = p;
3998
4022
  return o;
3999
4023
  };
4000
- return _set_prototype_of$p(o, p);
4024
+ return _set_prototype_of$s(o, p);
4001
4025
  }
4002
4026
  /**
4003
4027
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
4004
4028
  * @category Control
4005
4029
  */ var Rec = /*#__PURE__*/ function(Control) {
4006
- _inherits$m(Rec, Control);
4030
+ _inherits$p(Rec, Control);
4007
4031
  function Rec(options) {
4008
4032
  var _this;
4009
4033
  var _options_props;
4010
- _this = Control.call(this, _extends$o({}, options, {
4034
+ _this = Control.call(this, _extends$r({}, options, {
4011
4035
  tagName: 'div',
4012
4036
  controlType: 'block',
4013
4037
  classNameSuffix: 'rec'
@@ -4325,6 +4349,12 @@
4325
4349
  BTN_TALK: '对讲',
4326
4350
  BTN_BROADCAST: '语音广播',
4327
4351
  BTN_AICHAT: 'AI对话',
4352
+ BTN_LIVE: '直播',
4353
+ BTN_REC_DROPDOWN: '回放',
4354
+ BTN_ALARM_MESSAGE: '消息',
4355
+ REC_DROPDOWN_CLOUD_REC: '云存储',
4356
+ REC_DROPDOWN_CLOUD_RECORD: '云录制',
4357
+ REC_DROPDOWN_LOCAL_REC: '本地回放',
4328
4358
  BTN_ZOOM: '电子放大',
4329
4359
  BTN_3D_ZOOM: '3D定位',
4330
4360
  BTN_PTZ: '云台控制',
@@ -4597,6 +4627,12 @@
4597
4627
  BTN_TALK: 'Intercom',
4598
4628
  BTN_BROADCAST: 'Voice broadcast',
4599
4629
  BTN_AICHAT: 'AI Chat',
4630
+ BTN_LIVE: 'Live',
4631
+ BTN_REC_DROPDOWN: 'Playback',
4632
+ BTN_ALARM_MESSAGE: 'Messages',
4633
+ REC_DROPDOWN_CLOUD_REC: 'Cloud Storage',
4634
+ REC_DROPDOWN_CLOUD_RECORD: 'Cloud Recording',
4635
+ REC_DROPDOWN_LOCAL_REC: 'Local Playback',
4600
4636
  BTN_ZOOM: 'Electronic zoom',
4601
4637
  BTN_3D_ZOOM: '3D positioning',
4602
4638
  BTN_PTZ: 'PTZ control',
@@ -4786,6 +4822,21 @@
4786
4822
  iconId: 'deviceName',
4787
4823
  part: 'left',
4788
4824
  isrender: 1
4825
+ },
4826
+ {
4827
+ iconId: 'live',
4828
+ part: 'right',
4829
+ isrender: 1
4830
+ },
4831
+ {
4832
+ iconId: 'recDropdown',
4833
+ part: 'right',
4834
+ isrender: 1
4835
+ },
4836
+ {
4837
+ iconId: 'alarmMessage',
4838
+ part: 'right',
4839
+ isrender: 1
4789
4840
  }
4790
4841
  ]
4791
4842
  },
@@ -4873,19 +4924,19 @@
4873
4924
  isrender: 1
4874
4925
  },
4875
4926
  {
4876
- iconId: 'cloudRec',
4927
+ iconId: 'live',
4877
4928
  part: 'right',
4878
4929
  defaultActive: 0,
4879
4930
  isrender: 1
4880
4931
  },
4881
4932
  {
4882
- iconId: 'cloudRecord',
4933
+ iconId: 'recDropdown',
4883
4934
  part: 'right',
4884
4935
  defaultActive: 0,
4885
4936
  isrender: 1
4886
4937
  },
4887
4938
  {
4888
- iconId: 'rec',
4939
+ iconId: 'alarmMessage',
4889
4940
  part: 'right',
4890
4941
  defaultActive: 0,
4891
4942
  isrender: 1
@@ -5288,7 +5339,7 @@
5288
5339
  voice: voice
5289
5340
  };
5290
5341
 
5291
- function _inherits$l(subClass, superClass) {
5342
+ function _inherits$o(subClass, superClass) {
5292
5343
  if (typeof superClass !== "function" && superClass !== null) {
5293
5344
  throw new TypeError("Super expression must either be null or a function");
5294
5345
  }
@@ -5299,20 +5350,20 @@
5299
5350
  configurable: true
5300
5351
  }
5301
5352
  });
5302
- if (superClass) _set_prototype_of$o(subClass, superClass);
5353
+ if (superClass) _set_prototype_of$r(subClass, superClass);
5303
5354
  }
5304
- function _set_prototype_of$o(o, p) {
5305
- _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5355
+ function _set_prototype_of$r(o, p) {
5356
+ _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5306
5357
  o.__proto__ = p;
5307
5358
  return o;
5308
5359
  };
5309
- return _set_prototype_of$o(o, p);
5360
+ return _set_prototype_of$r(o, p);
5310
5361
  }
5311
5362
  /**
5312
5363
  * 截图控件
5313
5364
  * @category Content
5314
5365
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
5315
- _inherits$l(Content, EventEmitter);
5366
+ _inherits$o(Content, EventEmitter);
5316
5367
  function Content(options) {
5317
5368
  var _this;
5318
5369
  _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
@@ -5427,8 +5478,8 @@
5427
5478
  return Content;
5428
5479
  }(EventEmitter);
5429
5480
 
5430
- function _extends$n() {
5431
- _extends$n = Object.assign || function(target) {
5481
+ function _extends$q() {
5482
+ _extends$q = Object.assign || function(target) {
5432
5483
  for(var i = 1; i < arguments.length; i++){
5433
5484
  var source = arguments[i];
5434
5485
  for(var key in source){
@@ -5439,9 +5490,9 @@
5439
5490
  }
5440
5491
  return target;
5441
5492
  };
5442
- return _extends$n.apply(this, arguments);
5493
+ return _extends$q.apply(this, arguments);
5443
5494
  }
5444
- function _inherits$k(subClass, superClass) {
5495
+ function _inherits$n(subClass, superClass) {
5445
5496
  if (typeof superClass !== "function" && superClass !== null) {
5446
5497
  throw new TypeError("Super expression must either be null or a function");
5447
5498
  }
@@ -5452,23 +5503,23 @@
5452
5503
  configurable: true
5453
5504
  }
5454
5505
  });
5455
- if (superClass) _set_prototype_of$n(subClass, superClass);
5506
+ if (superClass) _set_prototype_of$q(subClass, superClass);
5456
5507
  }
5457
- function _set_prototype_of$n(o, p) {
5458
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5508
+ function _set_prototype_of$q(o, p) {
5509
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5459
5510
  o.__proto__ = p;
5460
5511
  return o;
5461
5512
  };
5462
- return _set_prototype_of$n(o, p);
5513
+ return _set_prototype_of$q(o, p);
5463
5514
  }
5464
5515
  /**
5465
5516
  * 更多控件
5466
5517
  * @category Control
5467
5518
  */ var More = /*#__PURE__*/ function(Control) {
5468
- _inherits$k(More, Control);
5519
+ _inherits$n(More, Control);
5469
5520
  function More(options) {
5470
5521
  var _this;
5471
- _this = Control.call(this, _extends$n({}, options, {
5522
+ _this = Control.call(this, _extends$q({}, options, {
5472
5523
  tagName: 'span',
5473
5524
  controlType: 'button',
5474
5525
  classNameSuffix: 'more'
@@ -5684,6 +5735,15 @@
5684
5735
  }
5685
5736
  });
5686
5737
  // =======================================================
5738
+ // 告警消息
5739
+ // =======================================================
5740
+ theme.on(EVENTS.alarmMessageChange, function(active) {
5741
+ var _theme_controls;
5742
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.alarmMessageControl) {
5743
+ theme.controls.alarmMessageControl._panelOpen = active;
5744
+ }
5745
+ });
5746
+ // =======================================================
5687
5747
  // 录制
5688
5748
  // =======================================================
5689
5749
  theme.on(EVENTS.recordingChange, function(recording) {
@@ -5779,7 +5839,7 @@
5779
5839
  *
5780
5840
  * @param theme - Theme
5781
5841
  */ function _controlEventemitter(theme) {
5782
- var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16;
5842
+ var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16, _theme_controls17, _theme_controls18, _theme_controls19, _theme_controls20, _theme_controls21;
5783
5843
  // Controls
5784
5844
  if (theme._recFooter) {
5785
5845
  theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
@@ -5890,8 +5950,50 @@
5890
5950
  theme.emit(EVENTS.control.aichatDestroy);
5891
5951
  });
5892
5952
  }
5953
+ // 直播按钮
5954
+ if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.liveControl) {
5955
+ theme.controls.liveControl.on(EVENTS.control.liveChange, function() {
5956
+ var _theme_controls;
5957
+ // 直接设置回放下拉控件为非激活状态
5958
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recDropdownControl) {
5959
+ theme.controls.recDropdownControl.active = false;
5960
+ }
5961
+ theme.emit(EVENTS.control.liveChange);
5962
+ });
5963
+ }
5964
+ // 回放下拉
5965
+ if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.recDropdownControl) {
5966
+ theme.controls.recDropdownControl.on(EVENTS.control.recDropdownChange, function(type) {
5967
+ var _theme_controls;
5968
+ // 直接设置直播控件为非激活状态
5969
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
5970
+ theme.controls.liveControl.active = false;
5971
+ }
5972
+ theme.emit(EVENTS.control.recDropdownChange, type);
5973
+ });
5974
+ }
5975
+ // 告警消息
5976
+ if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.alarmMessageControl) {
5977
+ theme.controls.alarmMessageControl.on(EVENTS.control.alarmMessageChange, function(active) {
5978
+ theme.emit(EVENTS.control.alarmMessageChange, active);
5979
+ });
5980
+ }
5981
+ // 播放地址切换后同步 Live/RecDropdown 激活状态
5982
+ // changePlayUrl 后 urlInfo 已更新,firstFrameDisplay 表示新地址播放成功
5983
+ if (((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.liveControl) || ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.recDropdownControl)) {
5984
+ theme.on(EVENTS.firstFrameDisplay, function() {
5985
+ var _theme_controls, _theme_controls1;
5986
+ var urlInfo = theme.urlInfo;
5987
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
5988
+ theme.controls.liveControl._syncActiveByUrlInfo(urlInfo);
5989
+ }
5990
+ if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.recDropdownControl) {
5991
+ theme.controls.recDropdownControl._syncActiveByUrlInfo(urlInfo);
5992
+ }
5993
+ });
5994
+ }
5893
5995
  // 缩放控件
5894
- if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
5996
+ if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.zoomControl) {
5895
5997
  theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
5896
5998
  if (theme.zoom !== value) {
5897
5999
  theme.zoom = value;
@@ -5913,7 +6015,7 @@
5913
6015
  });
5914
6016
  }
5915
6017
  // 清晰度控件
5916
- if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
6018
+ if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.definitionControl) {
5917
6019
  theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
5918
6020
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
5919
6021
  theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
@@ -5926,7 +6028,7 @@
5926
6028
  });
5927
6029
  }
5928
6030
  // 倍速控件
5929
- if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
6031
+ if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.speedControl) {
5930
6032
  theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
5931
6033
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
5932
6034
  theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
@@ -5939,7 +6041,7 @@
5939
6041
  });
5940
6042
  }
5941
6043
  // 截图控件
5942
- if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
6044
+ if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.capturePictureControl) {
5943
6045
  theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
5944
6046
  theme.emit(EVENTS.control.capturePicture, options);
5945
6047
  });
@@ -5948,25 +6050,25 @@
5948
6050
  });
5949
6051
  }
5950
6052
  // 全屏控件
5951
- if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
6053
+ if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.fullscreenControl) {
5952
6054
  theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
5953
6055
  theme.emit(EVENTS.control.fullscreenDestroy);
5954
6056
  });
5955
6057
  }
5956
6058
  // 全局全屏控件
5957
- if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
6059
+ if ((_theme_controls17 = theme.controls) == null ? void 0 : _theme_controls17.globalFullscreenControl) {
5958
6060
  theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
5959
6061
  theme.emit(EVENTS.control.globalFullscreenDestroy);
5960
6062
  });
5961
6063
  }
5962
6064
  // 设备信息控件
5963
- if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
6065
+ if ((_theme_controls18 = theme.controls) == null ? void 0 : _theme_controls18.deviceControl) {
5964
6066
  theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
5965
6067
  theme.emit(EVENTS.control.deviceDestroy);
5966
6068
  });
5967
6069
  }
5968
6070
  // 回放类型切换控件
5969
- if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
6071
+ if ((_theme_controls19 = theme.controls) == null ? void 0 : _theme_controls19.recControl) {
5970
6072
  // prettier-ignore
5971
6073
  theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
5972
6074
  if (theme.recType !== type) {
@@ -5987,7 +6089,7 @@
5987
6089
  });
5988
6090
  }
5989
6091
  // 时间轴控件
5990
- if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
6092
+ if ((_theme_controls20 = theme.controls) == null ? void 0 : _theme_controls20.timeLineControl) {
5991
6093
  theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
5992
6094
  theme.emit(EVENTS.control.timeLineChange, date);
5993
6095
  });
@@ -6004,7 +6106,7 @@
6004
6106
  });
6005
6107
  }
6006
6108
  // 日历控件
6007
- if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
6109
+ if ((_theme_controls21 = theme.controls) == null ? void 0 : _theme_controls21.dateControl) {
6008
6110
  theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
6009
6111
  theme.emit(EVENTS.control.datePanelOpenChange, open, date);
6010
6112
  });
@@ -6099,8 +6201,8 @@
6099
6201
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
6100
6202
  return Constructor;
6101
6203
  }
6102
- function _extends$m() {
6103
- _extends$m = Object.assign || function(target) {
6204
+ function _extends$p() {
6205
+ _extends$p = Object.assign || function(target) {
6104
6206
  for(var i = 1; i < arguments.length; i++){
6105
6207
  var source = arguments[i];
6106
6208
  for(var key in source){
@@ -6111,9 +6213,9 @@
6111
6213
  }
6112
6214
  return target;
6113
6215
  };
6114
- return _extends$m.apply(this, arguments);
6216
+ return _extends$p.apply(this, arguments);
6115
6217
  }
6116
- function _inherits$j(subClass, superClass) {
6218
+ function _inherits$m(subClass, superClass) {
6117
6219
  if (typeof superClass !== "function" && superClass !== null) {
6118
6220
  throw new TypeError("Super expression must either be null or a function");
6119
6221
  }
@@ -6124,14 +6226,14 @@
6124
6226
  configurable: true
6125
6227
  }
6126
6228
  });
6127
- if (superClass) _set_prototype_of$m(subClass, superClass);
6229
+ if (superClass) _set_prototype_of$p(subClass, superClass);
6128
6230
  }
6129
- function _set_prototype_of$m(o, p) {
6130
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6231
+ function _set_prototype_of$p(o, p) {
6232
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6131
6233
  o.__proto__ = p;
6132
6234
  return o;
6133
6235
  };
6134
- return _set_prototype_of$m(o, p);
6236
+ return _set_prototype_of$p(o, p);
6135
6237
  }
6136
6238
  var ZOOM_DEFAULT_OPTIONS = {
6137
6239
  open: false,
@@ -6141,10 +6243,10 @@
6141
6243
  * 电子放大控件
6142
6244
  * @category Control
6143
6245
  */ var Zoom$1 = /*#__PURE__*/ function(Control) {
6144
- _inherits$j(Zoom, Control);
6246
+ _inherits$m(Zoom, Control);
6145
6247
  function Zoom(options) {
6146
6248
  var _this;
6147
- _this = Control.call(this, _extends$m({}, options, {
6249
+ _this = Control.call(this, _extends$p({}, options, {
6148
6250
  tagName: 'span',
6149
6251
  controlType: 'button',
6150
6252
  classNameSuffix: 'zoom'
@@ -6279,8 +6381,8 @@
6279
6381
  */
6280
6382
  function _create_class$a(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 ZOOM_DEFAULT_POSITION=[0,0],DefaultOptions={initialZoom:1,defaultCursor:"pointer",scrollVelocity:.1,animDuration:.25,allowZoom:true,allowPan:true,onChange:function(){},onTranslateChange:function(){},onTap:function(){},max:8,min:1,zoomStep:.1,allowTouchEvents:false,allowWheel:true,ignoredMouseButtons:[],doubleTouchMaxDelay:300,decelerationDuration:750},Zoom=function(){function Zoom(container,options){var _this=this;this._dragging=false,this.destroy=function(){_this.setAllowZoom(false),_this.reset(),_this.removeEventListeners();},this.setTransform=function(trans){_this.transform=trans;},this.getTransform=function(){return _this.transform},this.updateTranslate=function(){var translateX=0,translateY=0;translateX=_this.percentPos[0]<0?_this.percentPos[0]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[0]:_this.percentPos[0]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[0],translateY=_this.percentPos[1]<0?_this.percentPos[1]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[1]:_this.percentPos[1]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[1],_this.percentPos=[translateX,translateY];},this.update=function(){_this.container&&(_this.updateTranslate(),_this.container.style.transition="transform ease-out "+_this.transition+"s",_this.container.style.transform="translate3d("+100*_this.percentPos[0]+"%, "+100*_this.percentPos[1]+"%, 0) scale("+_this.zoom+")");},this.setAllowZoom=function(allow){_this.options.allowZoom=allow;},this.setZoom=function(zoom,reset){zoom=parseFloat(zoom.toFixed(_this.getPrecision(_this.options.zoomStep))),_this.zoom!==zoom&&(_this.zoom=zoom,_this.update(),null==_this.options.onChange||_this.options.onChange.call(_this.options,+_this.zoom.toFixed(_this.getPrecision(_this.options.zoomStep)),reset));},this.getZoom=function(){return _this.zoom},this.setPos=function(pos){var _this_container,_this_container1,containerWidth=null==(_this_container=_this.container)?void 0:_this_container.clientWidth,containerHeight=null==(_this_container1=_this.container)?void 0:_this_container1.clientHeight;+_this.pos[0]===pos[0]&&+_this.pos[1]===pos[1]||(_this.percentPos=[pos[0]/containerWidth,pos[1]/containerHeight],_this.update(),null==_this.options.onTranslateChange||_this.options.onTranslateChange.call(_this.options,{posX:pos[0],posY:pos[1]}));},this.setTransitionDuration=function(duration){_this.transition=duration,_this.update();},this.setCursor=function(cursor){_this.container&&(_this.container.style.cssText+="cursor:"+cursor+";",_this.cursor=cursor);},this.zoomIn=function(value){var _this_options_max,_this_options_max1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom+value<(null!=(_this_options_max=_this.options.max)?_this_options_max:8)?prevZoom+value:null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom),newPosY=newPosY*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomOut=function(value){var _this_options_min,_this_options_min1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom-value>(null!=(_this_options_min=_this.options.min)?_this_options_min:1)?prevZoom-value:null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom-1),newPosY=newPosY*(newZoom-1)/(prevZoom-1)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomToZone=function(relX,relY,relWidth,relHeight){var _this_container;if(_this.container){var _this_options_max,newPosX=_this.pos[0],newPosY=_this.pos[1],parentRect=(null==(_this_container=_this.container)?void 0:_this_container.parentNode).getBoundingClientRect(),prevZoom=_this.zoom,optimalZoomX=parentRect.width/relWidth,optimalZoomY=parentRect.height/relHeight,newZoom=Math.min(optimalZoomX,optimalZoomY,null!=(_this_options_max=_this.options.max)?_this_options_max:8),rect=_this.container.getBoundingClientRect(),_ref=[rect.width/prevZoom/2,rect.height/prevZoom/2],_ref1=[relX+relWidth/2,relY+relHeight/2];newPosX=(_ref[0]-_ref1[0])*newZoom,newPosY=(_ref[1]-_ref1[1])*newZoom,_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);}},this.getNewPosition=function(x,y,newZoom){var prevZoom=[_this.zoom,_this.pos[0],_this.pos[1]][0];if(1===newZoom||!_this)return ZOOM_DEFAULT_POSITION;var _ref1=[_this.container.clientWidth,_this.container.clientHeight],clientWidth=_ref1[0],clientHeight=_ref1[1];if(newZoom>prevZoom)return [0,0];var w=-(x-clientWidth/2)/(clientWidth/2)*newZoom/2,h=-(y-clientHeight/2)/(clientHeight/2)*newZoom/2;return w>newZoom/2-.5&&(w=3.5),h>newZoom/2-.5&&(h=3.5),[clientWidth*w,clientHeight*h]},this.fullZoomInOnPosition=function(x,y){var _this_options_max,zoom=null!=(_this_options_max=_this.options.max)?_this_options_max:DefaultOptions.max;_this.setZoom(null!=zoom?zoom:DefaultOptions.max),_this.setPos(_this.getNewPosition(x,y,zoom)),_this.setTransitionDuration(_this.options.animDuration);},this.getLimitedShift=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(minElement>minLimit)return 0;if(minElement+shift>minLimit)return minLimit-minElement}else if(shift<0){if(maxElement<maxLimit)return 0;if(maxElement+shift<maxLimit)return maxLimit-maxElement}return shift},this.getCursor=function(canMoveOnX,canMoveOnY){return canMoveOnX&&canMoveOnY?"move":canMoveOnX?"ew-resize":canMoveOnY?"ns-resize":"auto"},this.move=function(shiftX,shiftY,transitionDuration){if(void 0===transitionDuration&&(transitionDuration=0),_this.container){var newPosX=_this.pos[0],newPosY=_this.pos[1],rect=_this.container.getBoundingClientRect(),parentRect=_this.container.parentNode.getBoundingClientRect(),shiftHorizontal=_this.transform?shiftY:shiftX,shiftVertical=_this.transform?shiftX:shiftY,_ref=_this.transform?[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0]:[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.left-parentRect.left<0,shiftHorizontal<0&&rect.right-parentRect.right>0],canMoveOnX=_ref[0]||_ref[1]||_ref[2];canMoveOnX&&(_this.transform?newPosX+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom):newPosX+=_this.getLimitedShift(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right));var _ref1=_this.transform?[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.right-parentRect.right<0,shiftHorizontal<0&&rect.left-parentRect.left>0]:[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0],canMoveOnY=_ref1[0]||_ref1[1]||_ref1[2];if(canMoveOnY)if(_this.transform){newPosY+=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(maxElement<maxLimit+1)return 0;if(maxElement+shift<maxLimit+1)return maxLimit-maxElement}else if(shift<0){if(minElement+1>minLimit)return 0;if(minElement+1+shift>minLimit)return minLimit-minElement}return shift}(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right);}else newPosY+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom);var cursor=_this.getCursor(canMoveOnX,canMoveOnY);_this.setPos([newPosX,newPosY]),_this.setCursor(cursor),_this.setTransitionDuration(transitionDuration);}},this.isDoubleTapping=function(){var _this_lastTouchTime,_this_options_doubleTouchMaxDelay,_this_lastDoubleTapTime,_this_options_doubleTouchMaxDelay1,touchTime=(new Date).getTime();return touchTime-(null!=(_this_lastTouchTime=_this.lastTouchTime)?_this_lastTouchTime:0)<(null!=(_this_options_doubleTouchMaxDelay=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay:300)&&touchTime-(null!=(_this_lastDoubleTapTime=_this.lastDoubleTapTime)?_this_lastDoubleTapTime:0)>(null!=(_this_options_doubleTouchMaxDelay1=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay1:750)?(_this.lastDoubleTapTime=touchTime,true):(_this.lastTouchTime=touchTime,false)},this.startDeceleration=function(lastShiftOnX,lastShiftOnY){var startTimestamp=null,startDecelerationMove=function(timestamp){null===startTimestamp&&(startTimestamp=timestamp);var _this_options_decelerationDuration,_this_options_decelerationDuration1,_this_options_decelerationDuration2,progress=timestamp-startTimestamp,ratio=((null!=(_this_options_decelerationDuration=_this.options.decelerationDuration)?_this_options_decelerationDuration:750)-progress)/(null!=(_this_options_decelerationDuration1=_this.options.decelerationDuration)?_this_options_decelerationDuration1:750),_ref=[lastShiftOnX*ratio,lastShiftOnY*ratio],shiftX=_ref[0],shiftY=_ref[1];progress<(null!=(_this_options_decelerationDuration2=_this.options.decelerationDuration)?_this_options_decelerationDuration2:750)&&Math.max(Math.abs(shiftX),Math.abs(shiftY))>1?(_this.move(shiftX,shiftY,0),_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove)):_this.lastRequestAnimationId=null;};_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove);},this.reset=function(){_this.setZoom(_this.options.initialZoom,true),_this.cursor=_this.options.defaultCursor,_this.setTransitionDuration(_this.options.animDuration),_this.setPos(ZOOM_DEFAULT_POSITION);},this.addScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomAdd(scale);},this.handleZoomAdd=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,newZoom=parseFloat((_this.zoom+scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom>(null!=(_this_options_max=_this.options.max)?_this_options_max:8)&&(newZoom=8),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.subScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomSub(scale);},this.handleZoomSub=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var newZoom=parseFloat((_this.zoom-scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom<1&&(newZoom=1),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.handleMouseWheel=function(event){if(event.preventDefault(),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,_this_options_min,velocity=event.deltaY<0?_this.options.scrollVelocity:0-_this.options.scrollVelocity,newZoom=parseFloat(Math.max(Math.min(_this.zoom+velocity,null!=(_this_options_max=_this.options.max)?_this_options_max:8),null!=(_this_options_min=_this.options.min)?_this_options_min:1).toFixed(_this.getPrecision(_this.options.zoomStep)));_this.setZoom(newZoom),_this.setTransitionDuration(.05);}},this.handleMouseStart=function(event){var _this_options_ignoredMouseButtons;event.preventDefault(),_this.options.allowPan&&!(null==(_this_options_ignoredMouseButtons=_this.options.ignoredMouseButtons)?void 0:_this_options_ignoredMouseButtons.includes(event.button))&&(_this._dragging=true,_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId),_this.lastCursor=_this.getCoordinates(event));},this.handleMouseMove=function(event){event.preventDefault(),_this.options.allowPan&&_this.lastCursor&&_this._dragging&&_this._touchOrMouseDrag(event);},this.handleMouseStop=function(event){event.preventDefault(),_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this.lastCursor=null,_this.setCursor("auto"),_this._dragging=false;},this.handleTouchStart=function(event){var isThisDoubleTapping=_this.isDoubleTapping();_this.isMultiTouch=event.touches.length,_this.options.allowTouchEvents||event.preventDefault(),_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId);var _this_getCoordinates=_this.getCoordinates(event.touches[0]),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1];if(_this.isMultiTouch>1)_this.lastCursor=[posX,posY];else if(isThisDoubleTapping&&_this.options.allowZoom)if(1===_this.zoom){var _this_container_getBoundingClientRect=_this.container.getBoundingClientRect();_this_container_getBoundingClientRect.top,_this_container_getBoundingClientRect.left;var ref,ref1,x=_this_container_getBoundingClientRect.x,y=_this_container_getBoundingClientRect.y;posX=(ref1=[posX-(x=(ref=_this.transform?[y,x]:[x,y])[0]),posY-(y=ref[1])])[0],posY=ref1[1],_this.fullZoomInOnPosition(posX,posY);}else _this.reset();else _this._tapStartTime=(new Date).getTime(),_this.options.allowPan&&(_this.lastCursor=[posX,posY]);},this.handleTouchMove=function(event){if(_this.options.allowTouchEvents||event.preventDefault(),_this.lastCursor)if(1===_this.isMultiTouch)_this._touchOrMouseDrag(event.touches[0]),_this.lastTouchDistance=null;else if(_this.isMultiTouch>1){var newZoom=_this.zoom,_this_getCoordinates=_this.getCoordinates(event.touches[0]),pos1X=_this_getCoordinates[0],pos1Y=_this_getCoordinates[1],_this_getCoordinates1=_this.getCoordinates(event.touches[1]),pos2X=_this_getCoordinates1[0],pos2Y=_this_getCoordinates1[1],distance=Math.sqrt(Math.pow(pos2X-pos1X,2)+Math.pow(pos2Y-pos1Y,2));if(_this.lastTouchDistance&&distance&&distance!==_this.lastTouchDistance){var _this_options_max,_this_options_min,_this_options_max1;if(_this.options.allowZoom)if((newZoom+=(distance-_this.lastTouchDistance)/100)>(null!=(_this_options_max=_this.options.max)?_this_options_max:8))newZoom=null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;else if(newZoom<(null!=(_this_options_min=_this.options.min)?_this_options_min:1)){var _this_options_min1;newZoom=null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;}_this.setZoom(newZoom),_this.setTransitionDuration(0);}_this.lastCursor=[pos1X,pos1Y],_this.lastTouchDistance=distance;}},this.handleTouchStop=function(){_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this._tapStartTime&&(new Date).getTime()-_this._tapStartTime<200&&(null==_this.options.onTap||_this.options.onTap.call(_this.options)),_this._tapStartTime=void 0,_this.lastCursor=null,_this.lastTouchDistance=null,_this.isMultiTouch=0;},this.container=container,this.options=Object.assign({},DefaultOptions,options||{}),this.percentPos=ZOOM_DEFAULT_POSITION,this.transition=this.options.animDuration,this.zoom=1,this.cursor="auto",this.lastCursor=[0,0],this.lastShift=null,this.lastTouchDistance=null,this.lastRequestAnimationId=null,this.lastTouchTime=(new Date).getTime(),this.lastDoubleTapTime=(new Date).getTime(),this.transform=false,this.isMultiTouch=1,this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseStart=this.handleMouseStart.bind(this),this.handleMouseStop=this.handleMouseStop.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchMove=this.handleTouchMove.bind(this),this.handleTouchStop=this.handleTouchStop.bind(this),this.getZoom=this.getZoom.bind(this),this.setZoom=this.setZoom.bind(this);}var _proto=Zoom.prototype;return _proto.setUpEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.addEventListener("wheel",this.handleMouseWheel,{passive:false})),null==refCurrentValue||refCurrentValue.addEventListener("mousedown",this.handleMouseStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mousemove",this.handleMouseMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseup",this.handleMouseStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseleave",this.handleMouseStop,{passive:false})):(null==refCurrentValue||refCurrentValue.addEventListener("touchstart",this.handleTouchStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchmove",this.handleTouchMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchend",this.handleTouchStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchcancel",this.handleTouchStop,{passive:false}));},_proto.removeEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.removeEventListener("wheel",this.handleMouseWheel)),null==refCurrentValue||refCurrentValue.removeEventListener("mousedown",this.handleMouseStart),null==refCurrentValue||refCurrentValue.removeEventListener("mousemove",this.handleMouseMove),null==refCurrentValue||refCurrentValue.removeEventListener("mouseup",this.handleMouseStop),null==refCurrentValue||refCurrentValue.removeEventListener("mouseleave",this.handleMouseStop)):(null==refCurrentValue||refCurrentValue.removeEventListener("touchstart",this.handleTouchStart),null==refCurrentValue||refCurrentValue.removeEventListener("touchmove",this.handleTouchMove),null==refCurrentValue||refCurrentValue.removeEventListener("touchend",this.handleTouchStop),null==refCurrentValue||refCurrentValue.removeEventListener("touchcancel",this.handleTouchStop));},_proto.getPrecision=function(value){ void 0===value&&(value=1);var valueStr=value.toString();return valueStr.includes(".")?valueStr.split(".")[1].length:1},_proto.getCoordinates=function(event){var clientHeight=this.container.clientHeight,clientTop=this.container.clientTop,clientLeft=this.container.clientLeft,_ref=this.transform?[event.clientY,clientHeight-event.clientX]:[event.clientX-clientTop,event.clientY-clientLeft];return [_ref[0],_ref[1]]},_proto._touchOrMouseDrag=function(event){if(this.lastCursor){var _this_getCoordinates=this.getCoordinates(event),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1],shiftX=posX-this.lastCursor[0],shiftY=posY-this.lastCursor[1];this.move(shiftX,shiftY,0),this.lastCursor=[posX,posY],this.lastShift=[shiftX,shiftY];}},_create_class$a(Zoom,[{key:"pos",get:function(){return [this.container.clientWidth*this.percentPos[0],this.container.clientHeight*this.percentPos[1]]}}]),Zoom}();Zoom.VERSION="1.0.0-beta.2";
6281
6383
 
6282
- function _extends$l() {
6283
- _extends$l = Object.assign || function(target) {
6384
+ function _extends$o() {
6385
+ _extends$o = Object.assign || function(target) {
6284
6386
  for(var i = 1; i < arguments.length; i++){
6285
6387
  var source = arguments[i];
6286
6388
  for(var key in source){
@@ -6291,10 +6393,10 @@
6291
6393
  }
6292
6394
  return target;
6293
6395
  };
6294
- return _extends$l.apply(this, arguments);
6396
+ return _extends$o.apply(this, arguments);
6295
6397
  }
6296
6398
  function __zoom(theme, container, options) {
6297
- theme.zoomUtil = new Zoom(container, _extends$l({}, options || {}, {
6399
+ theme.zoomUtil = new Zoom(container, _extends$o({}, options || {}, {
6298
6400
  min: 1,
6299
6401
  onChange: function(zoom, reset) {
6300
6402
  if (zoom !== theme._zoom) {
@@ -6519,8 +6621,8 @@
6519
6621
  });
6520
6622
  };
6521
6623
  }
6522
- function _extends$k() {
6523
- _extends$k = Object.assign || function(target) {
6624
+ function _extends$n() {
6625
+ _extends$n = Object.assign || function(target) {
6524
6626
  for(var i = 1; i < arguments.length; i++){
6525
6627
  var source = arguments[i];
6526
6628
  for(var key in source){
@@ -6531,7 +6633,7 @@
6531
6633
  }
6532
6634
  return target;
6533
6635
  };
6534
- return _extends$k.apply(this, arguments);
6636
+ return _extends$n.apply(this, arguments);
6535
6637
  }
6536
6638
  function _ts_generator$6(thisArg, body) {
6537
6639
  var f, y, t, _ = {
@@ -6659,7 +6761,7 @@
6659
6761
  }
6660
6762
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6661
6763
  // TODO: 因为回放是一组, 位置以第一个位置为准
6662
- recControls.push(recControls[0] ? _extends$k({}, item, {
6764
+ recControls.push(recControls[0] ? _extends$n({}, item, {
6663
6765
  part: recControls[0].part
6664
6766
  }) : item);
6665
6767
  return false;
@@ -6682,7 +6784,7 @@
6682
6784
  }
6683
6785
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6684
6786
  // TODO: 因为回放是一组, 位置以第一个位置为准
6685
- recControls.push(recControls[0] ? _extends$k({}, item, {
6787
+ recControls.push(recControls[0] ? _extends$n({}, item, {
6686
6788
  part: recControls[0].part
6687
6789
  }) : item);
6688
6790
  return false;
@@ -6933,8 +7035,8 @@
6933
7035
  return Component;
6934
7036
  }();
6935
7037
 
6936
- function _extends$j() {
6937
- _extends$j = Object.assign || function(target) {
7038
+ function _extends$m() {
7039
+ _extends$m = Object.assign || function(target) {
6938
7040
  for(var i = 1; i < arguments.length; i++){
6939
7041
  var source = arguments[i];
6940
7042
  for(var key in source){
@@ -6945,9 +7047,9 @@
6945
7047
  }
6946
7048
  return target;
6947
7049
  };
6948
- return _extends$j.apply(this, arguments);
7050
+ return _extends$m.apply(this, arguments);
6949
7051
  }
6950
- function _inherits$i(subClass, superClass) {
7052
+ function _inherits$l(subClass, superClass) {
6951
7053
  if (typeof superClass !== "function" && superClass !== null) {
6952
7054
  throw new TypeError("Super expression must either be null or a function");
6953
7055
  }
@@ -6958,28 +7060,28 @@
6958
7060
  configurable: true
6959
7061
  }
6960
7062
  });
6961
- if (superClass) _set_prototype_of$l(subClass, superClass);
7063
+ if (superClass) _set_prototype_of$o(subClass, superClass);
6962
7064
  }
6963
- function _set_prototype_of$l(o, p) {
6964
- _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7065
+ function _set_prototype_of$o(o, p) {
7066
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6965
7067
  o.__proto__ = p;
6966
7068
  return o;
6967
7069
  };
6968
- return _set_prototype_of$l(o, p);
7070
+ return _set_prototype_of$o(o, p);
6969
7071
  }
6970
7072
  var Footer = /*#__PURE__*/ function(Component) {
6971
- _inherits$i(Footer, Component);
7073
+ _inherits$l(Footer, Component);
6972
7074
  function Footer(options) {
6973
7075
  if (options === void 0) options = {};
6974
- return Component.call(this, _extends$j({}, options, {
7076
+ return Component.call(this, _extends$m({}, options, {
6975
7077
  cType: 'footer'
6976
7078
  })) || this;
6977
7079
  }
6978
7080
  return Footer;
6979
7081
  }(Component);
6980
7082
 
6981
- function _extends$i() {
6982
- _extends$i = Object.assign || function(target) {
7083
+ function _extends$l() {
7084
+ _extends$l = Object.assign || function(target) {
6983
7085
  for(var i = 1; i < arguments.length; i++){
6984
7086
  var source = arguments[i];
6985
7087
  for(var key in source){
@@ -6990,9 +7092,9 @@
6990
7092
  }
6991
7093
  return target;
6992
7094
  };
6993
- return _extends$i.apply(this, arguments);
7095
+ return _extends$l.apply(this, arguments);
6994
7096
  }
6995
- function _inherits$h(subClass, superClass) {
7097
+ function _inherits$k(subClass, superClass) {
6996
7098
  if (typeof superClass !== "function" && superClass !== null) {
6997
7099
  throw new TypeError("Super expression must either be null or a function");
6998
7100
  }
@@ -7003,20 +7105,20 @@
7003
7105
  configurable: true
7004
7106
  }
7005
7107
  });
7006
- if (superClass) _set_prototype_of$k(subClass, superClass);
7108
+ if (superClass) _set_prototype_of$n(subClass, superClass);
7007
7109
  }
7008
- function _set_prototype_of$k(o, p) {
7009
- _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7110
+ function _set_prototype_of$n(o, p) {
7111
+ _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7010
7112
  o.__proto__ = p;
7011
7113
  return o;
7012
7114
  };
7013
- return _set_prototype_of$k(o, p);
7115
+ return _set_prototype_of$n(o, p);
7014
7116
  }
7015
7117
  var Header$1 = /*#__PURE__*/ function(Component) {
7016
- _inherits$h(Header, Component);
7118
+ _inherits$k(Header, Component);
7017
7119
  function Header(options) {
7018
7120
  if (options === void 0) options = {};
7019
- return Component.call(this, _extends$i({}, options, {
7121
+ return Component.call(this, _extends$l({}, options, {
7020
7122
  cType: 'header'
7021
7123
  })) || this;
7022
7124
  }
@@ -7182,8 +7284,8 @@
7182
7284
  };
7183
7285
  }
7184
7286
 
7185
- function _extends$h() {
7186
- _extends$h = Object.assign || function(target) {
7287
+ function _extends$k() {
7288
+ _extends$k = Object.assign || function(target) {
7187
7289
  for(var i = 1; i < arguments.length; i++){
7188
7290
  var source = arguments[i];
7189
7291
  for(var key in source){
@@ -7194,9 +7296,9 @@
7194
7296
  }
7195
7297
  return target;
7196
7298
  };
7197
- return _extends$h.apply(this, arguments);
7299
+ return _extends$k.apply(this, arguments);
7198
7300
  }
7199
- function _inherits$g(subClass, superClass) {
7301
+ function _inherits$j(subClass, superClass) {
7200
7302
  if (typeof superClass !== "function" && superClass !== null) {
7201
7303
  throw new TypeError("Super expression must either be null or a function");
7202
7304
  }
@@ -7207,23 +7309,23 @@
7207
7309
  configurable: true
7208
7310
  }
7209
7311
  });
7210
- if (superClass) _set_prototype_of$j(subClass, superClass);
7312
+ if (superClass) _set_prototype_of$m(subClass, superClass);
7211
7313
  }
7212
- function _set_prototype_of$j(o, p) {
7213
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7314
+ function _set_prototype_of$m(o, p) {
7315
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7214
7316
  o.__proto__ = p;
7215
7317
  return o;
7216
7318
  };
7217
- return _set_prototype_of$j(o, p);
7319
+ return _set_prototype_of$m(o, p);
7218
7320
  }
7219
7321
  /**
7220
7322
  * 全局全屏
7221
7323
  * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
7222
7324
  * @category Control
7223
7325
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
7224
- _inherits$g(GlobalFullscreen, Fullscreen);
7326
+ _inherits$j(GlobalFullscreen, Fullscreen);
7225
7327
  function GlobalFullscreen(options) {
7226
- return Fullscreen.call(this, _extends$h({}, options, {
7328
+ return Fullscreen.call(this, _extends$k({}, options, {
7227
7329
  controlType: 'button',
7228
7330
  classNameSuffix: 'global-fullscreen'
7229
7331
  })) || this;
@@ -7254,8 +7356,8 @@
7254
7356
  return GlobalFullscreen;
7255
7357
  }(Fullscreen);
7256
7358
 
7257
- function _extends$g() {
7258
- _extends$g = Object.assign || function(target) {
7359
+ function _extends$j() {
7360
+ _extends$j = Object.assign || function(target) {
7259
7361
  for(var i = 1; i < arguments.length; i++){
7260
7362
  var source = arguments[i];
7261
7363
  for(var key in source){
@@ -7266,9 +7368,9 @@
7266
7368
  }
7267
7369
  return target;
7268
7370
  };
7269
- return _extends$g.apply(this, arguments);
7371
+ return _extends$j.apply(this, arguments);
7270
7372
  }
7271
- function _inherits$f(subClass, superClass) {
7373
+ function _inherits$i(subClass, superClass) {
7272
7374
  if (typeof superClass !== "function" && superClass !== null) {
7273
7375
  throw new TypeError("Super expression must either be null or a function");
7274
7376
  }
@@ -7279,23 +7381,23 @@
7279
7381
  configurable: true
7280
7382
  }
7281
7383
  });
7282
- if (superClass) _set_prototype_of$i(subClass, superClass);
7384
+ if (superClass) _set_prototype_of$l(subClass, superClass);
7283
7385
  }
7284
- function _set_prototype_of$i(o, p) {
7285
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7386
+ function _set_prototype_of$l(o, p) {
7387
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7286
7388
  o.__proto__ = p;
7287
7389
  return o;
7288
7390
  };
7289
- return _set_prototype_of$i(o, p);
7391
+ return _set_prototype_of$l(o, p);
7290
7392
  }
7291
7393
  /**
7292
7394
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
7293
7395
  * @category Control
7294
7396
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
7295
- _inherits$f(CapturePicture, Control);
7397
+ _inherits$i(CapturePicture, Control);
7296
7398
  function CapturePicture(options) {
7297
7399
  var _this;
7298
- _this = Control.call(this, _extends$g({}, options, {
7400
+ _this = Control.call(this, _extends$j({}, options, {
7299
7401
  tagName: 'span',
7300
7402
  classNameSuffix: 'capture-picture'
7301
7403
  })) || this, _this._timer = null;
@@ -7353,7 +7455,7 @@
7353
7455
  * Copyright (c) 2026-05-04 Ezviz-OpenBiz
7354
7456
  * Released under the MIT License.
7355
7457
  */
7356
- var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge(PTZ_DEFAULT_OPTIONS,options,{clone:false}),null==(_this_options_locales=this.options.locales)?void 0:_this_options_locales[this.options.language])?this.locale=null==(_this_options_locales1=this.options.locales)?void 0:_this_options_locales1[this.options.language]:this.locale=null==(_this_options_locales2=this.options.locales)?void 0:_this_options_locales2.zh;this.$container=container,this.speed=PTZ_SPEED[this.options.speed||2];}var _proto=BasePtz.prototype;return _proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}function _create_class$9(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$h(o,p){return _set_prototype_of$h=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$h(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$4.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_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$h(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$9(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7458
+ var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge(PTZ_DEFAULT_OPTIONS,options,{clone:false}),null==(_this_options_locales=this.options.locales)?void 0:_this_options_locales[this.options.language])?this.locale=null==(_this_options_locales1=this.options.locales)?void 0:_this_options_locales1[this.options.language]:this.locale=null==(_this_options_locales2=this.options.locales)?void 0:_this_options_locales2.zh;this.$container=container,this.speed=PTZ_SPEED[this.options.speed||2];}var _proto=BasePtz.prototype;return _proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}function _create_class$9(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$k(o,p){return _set_prototype_of$k=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$k(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$4.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_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$k(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$9(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7357
7459
 
7358
7460
  function _defineProperties$4(target, props) {
7359
7461
  for(var i = 0; i < props.length; i++){
@@ -7368,8 +7470,8 @@
7368
7470
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
7369
7471
  return Constructor;
7370
7472
  }
7371
- function _extends$f() {
7372
- _extends$f = Object.assign || function(target) {
7473
+ function _extends$i() {
7474
+ _extends$i = Object.assign || function(target) {
7373
7475
  for(var i = 1; i < arguments.length; i++){
7374
7476
  var source = arguments[i];
7375
7477
  for(var key in source){
@@ -7380,9 +7482,9 @@
7380
7482
  }
7381
7483
  return target;
7382
7484
  };
7383
- return _extends$f.apply(this, arguments);
7485
+ return _extends$i.apply(this, arguments);
7384
7486
  }
7385
- function _inherits$e(subClass, superClass) {
7487
+ function _inherits$h(subClass, superClass) {
7386
7488
  if (typeof superClass !== "function" && superClass !== null) {
7387
7489
  throw new TypeError("Super expression must either be null or a function");
7388
7490
  }
@@ -7393,23 +7495,23 @@
7393
7495
  configurable: true
7394
7496
  }
7395
7497
  });
7396
- if (superClass) _set_prototype_of$g(subClass, superClass);
7498
+ if (superClass) _set_prototype_of$j(subClass, superClass);
7397
7499
  }
7398
- function _set_prototype_of$g(o, p) {
7399
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7500
+ function _set_prototype_of$j(o, p) {
7501
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7400
7502
  o.__proto__ = p;
7401
7503
  return o;
7402
7504
  };
7403
- return _set_prototype_of$g(o, p);
7505
+ return _set_prototype_of$j(o, p);
7404
7506
  }
7405
7507
  /**
7406
7508
  * 云台控件
7407
7509
  * @category Control
7408
7510
  */ var Ptz = /*#__PURE__*/ function(Control) {
7409
- _inherits$e(Ptz, Control);
7511
+ _inherits$h(Ptz, Control);
7410
7512
  function Ptz(options) {
7411
7513
  var _this;
7412
- _this = Control.call(this, _extends$f({}, options, {
7514
+ _this = Control.call(this, _extends$i({}, options, {
7413
7515
  tagName: 'span',
7414
7516
  controlType: 'button',
7415
7517
  classNameSuffix: 'ptz'
@@ -7452,7 +7554,7 @@
7452
7554
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7453
7555
  this.$panel.appendChild(this.$turntable);
7454
7556
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7455
- this._ptzControl = new Ptz$1(this.$turntable, _extends$f({}, this._options, {
7557
+ this._ptzControl = new Ptz$1(this.$turntable, _extends$i({}, this._options, {
7456
7558
  onSpeedChange: this._onSpeedChange.bind(this),
7457
7559
  onDirection: this._onDirection.bind(this)
7458
7560
  }));
@@ -7461,7 +7563,7 @@
7461
7563
  };
7462
7564
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7463
7565
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7464
- if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$f({}, this._options, {
7566
+ if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$i({}, this._options, {
7465
7567
  onSpeedChange: this._onSpeedChange.bind(this),
7466
7568
  onDirection: this._onDirection.bind(this)
7467
7569
  }));
@@ -7564,8 +7666,8 @@
7564
7666
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
7565
7667
  return Constructor;
7566
7668
  }
7567
- function _extends$e() {
7568
- _extends$e = Object.assign || function(target) {
7669
+ function _extends$h() {
7670
+ _extends$h = Object.assign || function(target) {
7569
7671
  for(var i = 1; i < arguments.length; i++){
7570
7672
  var source = arguments[i];
7571
7673
  for(var key in source){
@@ -7576,9 +7678,9 @@
7576
7678
  }
7577
7679
  return target;
7578
7680
  };
7579
- return _extends$e.apply(this, arguments);
7681
+ return _extends$h.apply(this, arguments);
7580
7682
  }
7581
- function _inherits$d(subClass, superClass) {
7683
+ function _inherits$g(subClass, superClass) {
7582
7684
  if (typeof superClass !== "function" && superClass !== null) {
7583
7685
  throw new TypeError("Super expression must either be null or a function");
7584
7686
  }
@@ -7589,14 +7691,14 @@
7589
7691
  configurable: true
7590
7692
  }
7591
7693
  });
7592
- if (superClass) _set_prototype_of$f(subClass, superClass);
7694
+ if (superClass) _set_prototype_of$i(subClass, superClass);
7593
7695
  }
7594
- function _set_prototype_of$f(o, p) {
7595
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7696
+ function _set_prototype_of$i(o, p) {
7697
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7596
7698
  o.__proto__ = p;
7597
7699
  return o;
7598
7700
  };
7599
- return _set_prototype_of$f(o, p);
7701
+ return _set_prototype_of$i(o, p);
7600
7702
  }
7601
7703
  var RECORD_DEFAULT_OPTIONS = {
7602
7704
  maxDuration: 3600
@@ -7610,10 +7712,10 @@
7610
7712
  * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7611
7713
  * @category Control
7612
7714
  */ var Record = /*#__PURE__*/ function(Control) {
7613
- _inherits$d(Record, Control);
7715
+ _inherits$g(Record, Control);
7614
7716
  function Record(options) {
7615
7717
  var _this;
7616
- _this = Control.call(this, _extends$e({}, options, {
7718
+ _this = Control.call(this, _extends$h({}, options, {
7617
7719
  tagName: 'span',
7618
7720
  controlType: 'button',
7619
7721
  classNameSuffix: 'record'
@@ -7754,8 +7856,8 @@
7754
7856
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
7755
7857
  return Constructor;
7756
7858
  }
7757
- function _extends$d() {
7758
- _extends$d = Object.assign || function(target) {
7859
+ function _extends$g() {
7860
+ _extends$g = Object.assign || function(target) {
7759
7861
  for(var i = 1; i < arguments.length; i++){
7760
7862
  var source = arguments[i];
7761
7863
  for(var key in source){
@@ -7766,9 +7868,9 @@
7766
7868
  }
7767
7869
  return target;
7768
7870
  };
7769
- return _extends$d.apply(this, arguments);
7871
+ return _extends$g.apply(this, arguments);
7770
7872
  }
7771
- function _inherits$c(subClass, superClass) {
7873
+ function _inherits$f(subClass, superClass) {
7772
7874
  if (typeof superClass !== "function" && superClass !== null) {
7773
7875
  throw new TypeError("Super expression must either be null or a function");
7774
7876
  }
@@ -7779,14 +7881,14 @@
7779
7881
  configurable: true
7780
7882
  }
7781
7883
  });
7782
- if (superClass) _set_prototype_of$e(subClass, superClass);
7884
+ if (superClass) _set_prototype_of$h(subClass, superClass);
7783
7885
  }
7784
- function _set_prototype_of$e(o, p) {
7785
- _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7886
+ function _set_prototype_of$h(o, p) {
7887
+ _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7786
7888
  o.__proto__ = p;
7787
7889
  return o;
7788
7890
  };
7789
- return _set_prototype_of$e(o, p);
7891
+ return _set_prototype_of$h(o, p);
7790
7892
  }
7791
7893
  function _ts_generator$4(thisArg, body) {
7792
7894
  var f, y, t, _ = {
@@ -7888,10 +7990,10 @@
7888
7990
  *
7889
7991
  * @category Control
7890
7992
  */ var Talk = /*#__PURE__*/ function(Control) {
7891
- _inherits$c(Talk, Control);
7993
+ _inherits$f(Talk, Control);
7892
7994
  function Talk(options) {
7893
7995
  var _this;
7894
- _this = Control.call(this, _extends$d({}, options, {
7996
+ _this = Control.call(this, _extends$g({}, options, {
7895
7997
  tagName: 'span',
7896
7998
  controlType: 'button',
7897
7999
  classNameSuffix: 'talk'
@@ -8024,8 +8126,8 @@
8024
8126
  });
8025
8127
  };
8026
8128
  }
8027
- function _extends$c() {
8028
- _extends$c = Object.assign || function(target) {
8129
+ function _extends$f() {
8130
+ _extends$f = Object.assign || function(target) {
8029
8131
  for(var i = 1; i < arguments.length; i++){
8030
8132
  var source = arguments[i];
8031
8133
  for(var key in source){
@@ -8036,9 +8138,9 @@
8036
8138
  }
8037
8139
  return target;
8038
8140
  };
8039
- return _extends$c.apply(this, arguments);
8141
+ return _extends$f.apply(this, arguments);
8040
8142
  }
8041
- function _inherits$b(subClass, superClass) {
8143
+ function _inherits$e(subClass, superClass) {
8042
8144
  if (typeof superClass !== "function" && superClass !== null) {
8043
8145
  throw new TypeError("Super expression must either be null or a function");
8044
8146
  }
@@ -8049,14 +8151,14 @@
8049
8151
  configurable: true
8050
8152
  }
8051
8153
  });
8052
- if (superClass) _set_prototype_of$d(subClass, superClass);
8154
+ if (superClass) _set_prototype_of$g(subClass, superClass);
8053
8155
  }
8054
- function _set_prototype_of$d(o, p) {
8055
- _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8156
+ function _set_prototype_of$g(o, p) {
8157
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8056
8158
  o.__proto__ = p;
8057
8159
  return o;
8058
8160
  };
8059
- return _set_prototype_of$d(o, p);
8161
+ return _set_prototype_of$g(o, p);
8060
8162
  }
8061
8163
  function _ts_generator$3(thisArg, body) {
8062
8164
  var f, y, t, _ = {
@@ -8156,10 +8258,10 @@
8156
8258
  *
8157
8259
  * @category Control
8158
8260
  */ var Broadcast = /*#__PURE__*/ function(Control) {
8159
- _inherits$b(Broadcast, Control);
8261
+ _inherits$e(Broadcast, Control);
8160
8262
  function Broadcast(options) {
8161
8263
  var _this;
8162
- _this = Control.call(this, _extends$c({}, options, {
8264
+ _this = Control.call(this, _extends$f({}, options, {
8163
8265
  tagName: 'span',
8164
8266
  controlType: 'button',
8165
8267
  classNameSuffix: 'broadcast'
@@ -8254,8 +8356,8 @@
8254
8356
  });
8255
8357
  };
8256
8358
  }
8257
- function _extends$b() {
8258
- _extends$b = Object.assign || function(target) {
8359
+ function _extends$e() {
8360
+ _extends$e = Object.assign || function(target) {
8259
8361
  for(var i = 1; i < arguments.length; i++){
8260
8362
  var source = arguments[i];
8261
8363
  for(var key in source){
@@ -8266,9 +8368,9 @@
8266
8368
  }
8267
8369
  return target;
8268
8370
  };
8269
- return _extends$b.apply(this, arguments);
8371
+ return _extends$e.apply(this, arguments);
8270
8372
  }
8271
- function _inherits$a(subClass, superClass) {
8373
+ function _inherits$d(subClass, superClass) {
8272
8374
  if (typeof superClass !== "function" && superClass !== null) {
8273
8375
  throw new TypeError("Super expression must either be null or a function");
8274
8376
  }
@@ -8279,14 +8381,14 @@
8279
8381
  configurable: true
8280
8382
  }
8281
8383
  });
8282
- if (superClass) _set_prototype_of$c(subClass, superClass);
8384
+ if (superClass) _set_prototype_of$f(subClass, superClass);
8283
8385
  }
8284
- function _set_prototype_of$c(o, p) {
8285
- _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8386
+ function _set_prototype_of$f(o, p) {
8387
+ _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8286
8388
  o.__proto__ = p;
8287
8389
  return o;
8288
8390
  };
8289
- return _set_prototype_of$c(o, p);
8391
+ return _set_prototype_of$f(o, p);
8290
8392
  }
8291
8393
  function _ts_generator$2(thisArg, body) {
8292
8394
  var f, y, t, _ = {
@@ -8386,10 +8488,10 @@
8386
8488
  *
8387
8489
  * @category Control
8388
8490
  */ var AIChat = /*#__PURE__*/ function(Control) {
8389
- _inherits$a(AIChat, Control);
8491
+ _inherits$d(AIChat, Control);
8390
8492
  function AIChat(options) {
8391
8493
  var _this;
8392
- _this = Control.call(this, _extends$b({}, options, {
8494
+ _this = Control.call(this, _extends$e({}, options, {
8393
8495
  tagName: 'span',
8394
8496
  controlType: 'button',
8395
8497
  classNameSuffix: 'aichat'
@@ -8455,6 +8557,348 @@
8455
8557
  return AIChat;
8456
8558
  }(Control);
8457
8559
 
8560
+ function _extends$d() {
8561
+ _extends$d = Object.assign || function(target) {
8562
+ for(var i = 1; i < arguments.length; i++){
8563
+ var source = arguments[i];
8564
+ for(var key in source){
8565
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8566
+ target[key] = source[key];
8567
+ }
8568
+ }
8569
+ }
8570
+ return target;
8571
+ };
8572
+ return _extends$d.apply(this, arguments);
8573
+ }
8574
+ function _inherits$c(subClass, superClass) {
8575
+ if (typeof superClass !== "function" && superClass !== null) {
8576
+ throw new TypeError("Super expression must either be null or a function");
8577
+ }
8578
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8579
+ constructor: {
8580
+ value: subClass,
8581
+ writable: true,
8582
+ configurable: true
8583
+ }
8584
+ });
8585
+ if (superClass) _set_prototype_of$e(subClass, superClass);
8586
+ }
8587
+ function _set_prototype_of$e(o, p) {
8588
+ _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8589
+ o.__proto__ = p;
8590
+ return o;
8591
+ };
8592
+ return _set_prototype_of$e(o, p);
8593
+ }
8594
+ /**
8595
+ * 直播按钮控件
8596
+ *
8597
+ * 点击切换到直播模式
8598
+ *
8599
+ * @category Control
8600
+ */ var Live = /*#__PURE__*/ function(Control) {
8601
+ _inherits$c(Live, Control);
8602
+ function Live(options) {
8603
+ var _this;
8604
+ var _this___options_props1;
8605
+ _this = Control.call(this, _extends$d({}, options, {
8606
+ tagName: 'span',
8607
+ controlType: 'button',
8608
+ classNameSuffix: 'live'
8609
+ })) || this;
8610
+ _this._options = options;
8611
+ _this._render();
8612
+ // H5 端不展示直播/回放切换按钮
8613
+ if (Utils.isMobile) {
8614
+ _this.$container.style.display = 'none';
8615
+ }
8616
+ // 初始化时根据当前播放模式确定激活状态
8617
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8618
+ return _this;
8619
+ }
8620
+ var _proto = Live.prototype;
8621
+ /**
8622
+ * 根据 urlInfo 同步激活状态
8623
+ * 在初始化和播放地址切换后调用
8624
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8625
+ var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
8626
+ this.active = shouldBeActive;
8627
+ };
8628
+ _proto._render = function _render() {
8629
+ var _this_locale;
8630
+ this.$container.innerHTML = IconComponents.live({
8631
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
8632
+ });
8633
+ };
8634
+ /**
8635
+ * 销毁
8636
+ */ _proto.destroy = function destroy() {
8637
+ Control.prototype.destroy.call(this);
8638
+ };
8639
+ /**
8640
+ * 点击 Control 会触发
8641
+ */ _proto._onControlClick = function _onControlClick(e) {
8642
+ var _this__options_onChange, _this__options;
8643
+ Control.prototype._onControlClick.call(this, e);
8644
+ // 已经是直播模式则不触发
8645
+ if (this.active) {
8646
+ return;
8647
+ }
8648
+ this.active = true;
8649
+ this.emit(EVENTS.control.liveChange);
8650
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options);
8651
+ };
8652
+ return Live;
8653
+ }(Control);
8654
+
8655
+ function _extends$c() {
8656
+ _extends$c = Object.assign || function(target) {
8657
+ for(var i = 1; i < arguments.length; i++){
8658
+ var source = arguments[i];
8659
+ for(var key in source){
8660
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8661
+ target[key] = source[key];
8662
+ }
8663
+ }
8664
+ }
8665
+ return target;
8666
+ };
8667
+ return _extends$c.apply(this, arguments);
8668
+ }
8669
+ function _inherits$b(subClass, superClass) {
8670
+ if (typeof superClass !== "function" && superClass !== null) {
8671
+ throw new TypeError("Super expression must either be null or a function");
8672
+ }
8673
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8674
+ constructor: {
8675
+ value: subClass,
8676
+ writable: true,
8677
+ configurable: true
8678
+ }
8679
+ });
8680
+ if (superClass) _set_prototype_of$d(subClass, superClass);
8681
+ }
8682
+ function _set_prototype_of$d(o, p) {
8683
+ _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8684
+ o.__proto__ = p;
8685
+ return o;
8686
+ };
8687
+ return _set_prototype_of$d(o, p);
8688
+ }
8689
+ /**
8690
+ * 回放下拉控件
8691
+ *
8692
+ * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
8693
+ *
8694
+ * @category Control
8695
+ */ var RecDropdown = /*#__PURE__*/ function(Control) {
8696
+ _inherits$b(RecDropdown, Control);
8697
+ function RecDropdown(options) {
8698
+ var _this;
8699
+ var _options_props, _this___options_props1;
8700
+ _this = Control.call(this, _extends$c({}, options, {
8701
+ tagName: 'span',
8702
+ controlType: 'button',
8703
+ classNameSuffix: 'rec-dropdown'
8704
+ })) || this;
8705
+ _this._options = options;
8706
+ // H5 端不展示直播/回放切换按钮
8707
+ if (Utils.isMobile) {
8708
+ _this.$container.style.display = 'none';
8709
+ }
8710
+ // 初始化时根据 urlInfo 确定当前回放类型和激活状态
8711
+ _this._recType = options.recType || ((_options_props = options.props) == null ? void 0 : _options_props.recType) || 'cloudRec';
8712
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8713
+ _this._render();
8714
+ _this._initPicker();
8715
+ return _this;
8716
+ }
8717
+ var _proto = RecDropdown.prototype;
8718
+ /**
8719
+ * 根据 urlInfo 同步激活状态和回放类型
8720
+ * 在初始化和播放地址切换后调用
8721
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8722
+ if (urlInfo && urlInfo.type === 'rec') {
8723
+ var _urlInfo_searchParams1;
8724
+ this.active = true;
8725
+ if (urlInfo.recType === 'cloud' && ((_urlInfo_searchParams1 = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams1.busType) === '7') {
8726
+ this._recType = 'cloudRecord';
8727
+ } else if (urlInfo.recType === 'cloud') {
8728
+ this._recType = 'cloudRec';
8729
+ } else {
8730
+ this._recType = 'rec';
8731
+ }
8732
+ this._activeOption(this._recType);
8733
+ } else {
8734
+ this.active = false;
8735
+ }
8736
+ };
8737
+ _proto._render = function _render() {
8738
+ var _this_locale;
8739
+ this.$container.innerHTML = IconComponents.recDropdown({
8740
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_REC_DROPDOWN) || '回放'
8741
+ });
8742
+ };
8743
+ _proto._initPicker = function _initPicker() {
8744
+ var _this = this;
8745
+ this._picker = new Picker(this.$container, {
8746
+ getPopupContainer: function() {
8747
+ return Utils.isMobile ? _this.__options.rootContainer : _this.$container;
8748
+ },
8749
+ trigger: Utils.isMobile ? 'click' : 'hover',
8750
+ isMobile: Utils.isMobile,
8751
+ wrapClassName: "" + PREFIX_CLASS + "-rec-dropdown-picker",
8752
+ placement: 'bottom',
8753
+ offset: [
8754
+ 0,
8755
+ 4
8756
+ ]
8757
+ });
8758
+ this._picker.innerHTML(this._getPanelHTML());
8759
+ this._activeOption(this._recType);
8760
+ this._bindPanelEvents();
8761
+ };
8762
+ _proto._getPanelHTML = function _getPanelHTML() {
8763
+ var _this_locale, _this_locale1, _this_locale2;
8764
+ var cloudRecLabel = ((_this_locale = this.locale) == null ? void 0 : _this_locale.REC_DROPDOWN_CLOUD_REC) || '云存储';
8765
+ var cloudRecordLabel = ((_this_locale1 = this.locale) == null ? void 0 : _this_locale1.REC_DROPDOWN_CLOUD_RECORD) || '云录制';
8766
+ var localRecLabel = ((_this_locale2 = this.locale) == null ? void 0 : _this_locale2.REC_DROPDOWN_LOCAL_REC) || '本地回放';
8767
+ return '<div class="' + PREFIX_CLASS + '-rec-dropdown-panel">\n <ul class="' + PREFIX_CLASS + '-rec-dropdown-list">\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRec">\n <span>' + cloudRecLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRecord">\n <span>' + cloudRecordLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="rec">\n <span>' + localRecLabel + "</span>\n </li>\n </ul>\n </div>";
8768
+ };
8769
+ _proto._bindPanelEvents = function _bindPanelEvents() {
8770
+ var _this = this;
8771
+ this._delegation = delegate(this._picker.$body, "." + PREFIX_CLASS + "-rec-dropdown-item", 'click', function(e) {
8772
+ e.stopPropagation();
8773
+ var type = e.delegateTarget.getAttribute('data-type');
8774
+ if (type) {
8775
+ var _this__options_onChange, _this__options;
8776
+ _this._recType = type;
8777
+ _this._activeOption(type);
8778
+ // 设置自身为激活状态
8779
+ _this.active = true;
8780
+ _this.emit(EVENTS.control.recDropdownChange, type);
8781
+ (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, type);
8782
+ _this._picker.open = false;
8783
+ }
8784
+ });
8785
+ };
8786
+ _proto._activeOption = function _activeOption(type) {
8787
+ var _this__picker;
8788
+ if ((_this__picker = this._picker) == null ? void 0 : _this__picker.$body) {
8789
+ var items = this._picker.$body.querySelectorAll("." + PREFIX_CLASS + "-rec-dropdown-item");
8790
+ items.forEach(function(item) {
8791
+ item.classList.remove("" + PREFIX_CLASS + "-active");
8792
+ });
8793
+ var target = this._picker.$body.querySelector("." + PREFIX_CLASS + '-rec-dropdown-item[data-type="' + type + '"]');
8794
+ target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
8795
+ }
8796
+ };
8797
+ /**
8798
+ * 销毁
8799
+ */ _proto.destroy = function destroy() {
8800
+ var _this__delegation_destroy, _this__delegation;
8801
+ (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
8802
+ this._delegation = null;
8803
+ if (this._picker) {
8804
+ this._picker.destroy();
8805
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8806
+ this._picker = null;
8807
+ }
8808
+ Control.prototype.destroy.call(this);
8809
+ };
8810
+ /**
8811
+ * 点击 Control 会触发(移动端 click 触发 picker)
8812
+ */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8813
+ _proto._onControlClick = function _onControlClick(_e) {
8814
+ // picker 自行处理 click/hover,这里不额外处理
8815
+ };
8816
+ return RecDropdown;
8817
+ }(Control);
8818
+
8819
+ function _extends$b() {
8820
+ _extends$b = Object.assign || function(target) {
8821
+ for(var i = 1; i < arguments.length; i++){
8822
+ var source = arguments[i];
8823
+ for(var key in source){
8824
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8825
+ target[key] = source[key];
8826
+ }
8827
+ }
8828
+ }
8829
+ return target;
8830
+ };
8831
+ return _extends$b.apply(this, arguments);
8832
+ }
8833
+ function _inherits$a(subClass, superClass) {
8834
+ if (typeof superClass !== "function" && superClass !== null) {
8835
+ throw new TypeError("Super expression must either be null or a function");
8836
+ }
8837
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8838
+ constructor: {
8839
+ value: subClass,
8840
+ writable: true,
8841
+ configurable: true
8842
+ }
8843
+ });
8844
+ if (superClass) _set_prototype_of$c(subClass, superClass);
8845
+ }
8846
+ function _set_prototype_of$c(o, p) {
8847
+ _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8848
+ o.__proto__ = p;
8849
+ return o;
8850
+ };
8851
+ return _set_prototype_of$c(o, p);
8852
+ }
8853
+ /**
8854
+ * 告警消息按钮控件
8855
+ *
8856
+ * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
8857
+ *
8858
+ * @category Control
8859
+ */ var AlarmMessage = /*#__PURE__*/ function(Control) {
8860
+ _inherits$a(AlarmMessage, Control);
8861
+ function AlarmMessage(options) {
8862
+ var _this;
8863
+ _this = Control.call(this, _extends$b({}, options, {
8864
+ tagName: 'span',
8865
+ controlType: 'button',
8866
+ classNameSuffix: 'alarm-message'
8867
+ })) || this, _this._panelOpen = false;
8868
+ _this._options = options;
8869
+ _this._render();
8870
+ _this.on(EVENTS.alarmMessageChange, function(open) {
8871
+ _this._panelOpen = open;
8872
+ });
8873
+ return _this;
8874
+ }
8875
+ var _proto = AlarmMessage.prototype;
8876
+ _proto._render = function _render() {
8877
+ var _this_locale;
8878
+ this.$container.innerHTML = IconComponents.alarmMessage({
8879
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_ALARM_MESSAGE) || '消息'
8880
+ });
8881
+ };
8882
+ /**
8883
+ * 销毁
8884
+ */ _proto.destroy = function destroy() {
8885
+ if (this._panelOpen) {
8886
+ this.emit(EVENTS.control.alarmMessageChange, false);
8887
+ }
8888
+ Control.prototype.destroy.call(this);
8889
+ };
8890
+ /**
8891
+ * 点击 Control 会触发
8892
+ */ _proto._onControlClick = function _onControlClick(e) {
8893
+ var _this__options_onChange, _this__options;
8894
+ Control.prototype._onControlClick.call(this, e);
8895
+ this._panelOpen = !this._panelOpen;
8896
+ this.emit(EVENTS.control.alarmMessageChange, this._panelOpen);
8897
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this._panelOpen);
8898
+ };
8899
+ return AlarmMessage;
8900
+ }(Control);
8901
+
8458
8902
  function _defineProperties$1(target, props) {
8459
8903
  for(var i = 0; i < props.length; i++){
8460
8904
  var descriptor = props[i];
@@ -10003,6 +10447,9 @@
10003
10447
  talk: Talk,
10004
10448
  broadcast: Broadcast,
10005
10449
  aiChat: AIChat,
10450
+ live: Live,
10451
+ recDropdown: RecDropdown,
10452
+ alarmMessage: AlarmMessage,
10006
10453
  zoom: Zoom$1,
10007
10454
  definition: Definition,
10008
10455
  fullscreen: Fullscreen,
@@ -10536,7 +10983,10 @@
10536
10983
  // 需要权限的控件
10537
10984
  var AUTH_KEY = [
10538
10985
  'ptz',
10539
- 'aiChat'
10986
+ 'aiChat',
10987
+ 'live',
10988
+ 'recDropdown',
10989
+ 'alarmMessage'
10540
10990
  ];
10541
10991
  /**
10542
10992
  * 渲染控件
@@ -10616,7 +11066,7 @@
10616
11066
  }
10617
11067
  function _renderTheme(theme, data) {
10618
11068
  return _async_to_generator$1(function() {
10619
- var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
11069
+ var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_urlInfo, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_controls2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1, _theme_options;
10620
11070
  return _ts_generator$1(this, function(_state) {
10621
11071
  switch(_state.label){
10622
11072
  case 0:
@@ -10757,8 +11207,8 @@
10757
11207
  list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_filterThemeData_footer_btnList = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _filterThemeData_footer_btnList : []);
10758
11208
  // FIXME: 这个逻辑实际上是有问题的
10759
11209
  _needTimeLine = list.some(function(item) {
10760
- return REC_GROUP.includes(item.iconId);
10761
- });
11210
+ return REC_GROUP.includes(item.iconId) || item.iconId === 'recDropdown';
11211
+ }) && ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.type) === 'rec';
10762
11212
  // PC 单独渲染timeLine
10763
11213
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
10764
11214
  theme._recFooter = new RecFooter(theme.$container, {
@@ -10789,6 +11239,23 @@
10789
11239
  if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
10790
11240
  });
10791
11241
  }
11242
+ // 移动端:在 rec 控件旁渲染 alarmMessage 按钮
11243
+ if (theme.options.alarmMessageOptions !== null && !((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['alarmMessageControl'])) {
11244
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
11245
+ theme.controls['alarmMessageControl'] = new Controls['alarmMessage'](_extends$1({
11246
+ rootContainer: theme.$container,
11247
+ getPopupContainer: function() {
11248
+ var _theme__mobileExtend;
11249
+ return (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight;
11250
+ },
11251
+ language: theme.options.language || 'zh',
11252
+ locales: theme.i18n.translations,
11253
+ sdkType: theme.options.sdkType,
11254
+ urlInfo: theme.urlInfo
11255
+ }, ((_theme_options = theme.options) == null ? void 0 : _theme_options.alarmMessageOptions) || {}, {
11256
+ props: props
11257
+ }));
11258
+ }
10792
11259
  if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
10793
11260
  _renderTimeLine(theme, theme._mobileExtend.$content, props);
10794
11261
  }
@@ -10799,6 +11266,10 @@
10799
11266
  }
10800
11267
  theme.emit(EVENTS.control.mountedControls);
10801
11268
  if (!theme.playing) theme._disabled(true);
11269
+ // 同步 loading 状态(修复:_loadingControl 创建前设置的 loading=true 不生效的问题)
11270
+ if (theme._loading && theme._loadingControl) {
11271
+ theme._loadingControl.show();
11272
+ }
10802
11273
  _controlEventemitter(theme);
10803
11274
  return [
10804
11275
  2
@@ -12394,7 +12865,7 @@
12394
12865
  zh: zh,
12395
12866
  en: en
12396
12867
  };
12397
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.5';
12868
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.1-beta.4';
12398
12869
 
12399
12870
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
12400
12871