@das-fed/ui 6.4.0-beta.7 → 6.4.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/package.json +5 -5
  2. package/packages/business-components/device-panel/index.js +10094 -9817
  3. package/packages/business-components/device-panel/index.js.gz +0 -0
  4. package/packages/business-components/export-button/index.js +432 -152
  5. package/packages/business-components/export-button/index.js.gz +0 -0
  6. package/packages/business-components/import-button/index.js +603 -323
  7. package/packages/business-components/import-button/index.js.gz +0 -0
  8. package/packages/business-components/process-form/index.js +1122 -841
  9. package/packages/business-components/process-form/index.js.gz +0 -0
  10. package/packages/business-components/process-log/index.js +1758 -1477
  11. package/packages/business-components/process-log/index.js.gz +0 -0
  12. package/packages/business-components/process-search-form/index.js +719 -439
  13. package/packages/business-components/process-search-form/index.js.gz +0 -0
  14. package/packages/business-components/process-table/index.js +819 -538
  15. package/packages/business-components/process-table/index.js.gz +0 -0
  16. package/packages/business-components/urgent-panel/index.js +1969 -1691
  17. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  18. package/packages/business-components/video-dialog/index.js +619 -338
  19. package/packages/business-components/video-dialog/index.js.gz +0 -0
  20. package/packages/components/calendar/index.js +614 -257
  21. package/packages/components/calendar/index.js.gz +0 -0
  22. package/packages/components/date-picker/index.js +6025 -5129
  23. package/packages/components/date-picker/index.js.gz +0 -0
  24. package/packages/components/image-viewer/index.d.ts +0 -9
  25. package/packages/components/image-viewer/index.js +29 -34
  26. package/packages/components/image-viewer/index.js.gz +0 -0
  27. package/packages/components/image-viewer/src/Index.vue.d.ts +0 -3
  28. package/packages/components/image-viewer/src/hooks/use-handler-image-src.d.ts +1 -2
  29. package/packages/components/image-viewer/src/type.d.ts +0 -3
  30. package/packages/components/image-viewer/style.css +1 -1
  31. package/packages/components/image-viewer/style.css.gz +0 -0
  32. package/packages/components/search-form/index.js +11 -13
  33. package/packages/components/search-form/index.js.gz +0 -0
  34. package/packages/components/table/index.js +127 -127
  35. package/packages/components/table/index.js.gz +0 -0
  36. package/packages/components/tree/index.js +70 -70
  37. package/packages/components/tree/index.js.gz +0 -0
  38. package/packages/components/tree-select/index.js +30 -29
  39. package/packages/components/tree-select/index.js.gz +0 -0
@@ -1,58 +1,57 @@
1
1
  import '@das-fed/ui/packages/business-components/video-dialog/style.css';
2
- import { getCurrentScope as re, onScopeDispose as ae, unref as a, getCurrentInstance as ce, onMounted as Y, nextTick as L, ref as k, watch as O, defineComponent as R, useCssVars as ue, computed as N, openBlock as g, createElementBlock as $, normalizeClass as de, renderSlot as Z, Fragment as K, renderList as pe, createBlock as h, withCtx as f, createCommentVNode as b, withModifiers as y, createVNode as d, createElementVNode as p, toDisplayString as ve, pushScopeId as fe, popScopeId as me, toRefs as ge } from "vue";
3
- import { withInstall as ye } from "@das-fed/utils/with-install/index";
4
- import { DasDialog as ke } from "@das-fed/ui/packages/components/dialog/index";
5
- import { DasTooltip as I } from "@das-fed/ui/packages/components/tooltip/index";
6
- import { DasIconFullscreen2 as _e } from "@das-fed/ui/packages/icons/fullscreen-2/index";
7
- import { DasAutoRegisterIcon as Ie, DasIcon as P } from "@das-fed/ui/packages/components/icon/index";
8
- import { DasLivePlayer as we } from "@das-fed/ui/packages/components/live-player/index";
9
- import { DasSpin as Ce } from "@das-fed/ui/packages/components/spin/index";
10
- import be from "dayjs";
11
- import { createService as X } from "@das-fed/utils/api-services/src/create-service";
12
- import { getProjectInfo as j, getToken as he } from "@das-fed/utils/common-info";
13
- var B;
14
- const z = typeof window < "u", Ee = (t) => typeof t == "string", Oe = () => {
2
+ import { getCurrentScope as Re, onScopeDispose as xe, unref as $, getCurrentInstance as Ne, onMounted as be, nextTick as oe, ref as R, watch as Q, defineComponent as K, useCssVars as Pe, computed as le, openBlock as E, createElementBlock as J, normalizeClass as Ue, renderSlot as Ce, Fragment as Ie, renderList as je, createBlock as V, withCtx as D, createCommentVNode as z, withModifiers as L, createVNode as C, createElementVNode as I, toDisplayString as ze, pushScopeId as Ve, popScopeId as Ae, toRefs as He } from "vue";
3
+ import { withInstall as Ye } from "@das-fed/utils/with-install/index";
4
+ import { DasDialog as We } from "@das-fed/ui/packages/components/dialog/index";
5
+ import { DasTooltip as x } from "@das-fed/ui/packages/components/tooltip/index";
6
+ import { DasIconFullscreen2 as Be } from "@das-fed/ui/packages/icons/fullscreen-2/index";
7
+ import { DasAutoRegisterIcon as Qe, DasIcon as ne } from "@das-fed/ui/packages/components/icon/index";
8
+ import { DasLivePlayer as qe } from "@das-fed/ui/packages/components/live-player/index";
9
+ import { DasSpin as Ge } from "@das-fed/ui/packages/components/spin/index";
10
+ import { createService as De } from "@das-fed/utils/api-services/src/create-service";
11
+ import { getProjectInfo as pe, getToken as Ze } from "@das-fed/utils/common-info";
12
+ var me;
13
+ const fe = typeof window < "u", Je = (t) => typeof t == "string", Ke = () => {
15
14
  };
16
- z && ((B = window == null ? void 0 : window.navigator) != null && B.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
17
- function J(t) {
18
- return typeof t == "function" ? t() : a(t);
19
- }
15
+ fe && ((me = window == null ? void 0 : window.navigator) != null && me.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
20
16
  function Se(t) {
17
+ return typeof t == "function" ? t() : $(t);
18
+ }
19
+ function Xe(t) {
21
20
  return t;
22
21
  }
23
- function ee(t) {
24
- return re() ? (ae(t), !0) : !1;
22
+ function Oe(t) {
23
+ return Re() ? (xe(t), !0) : !1;
25
24
  }
26
- function Fe(t, o = !0) {
27
- ce() ? Y(t) : o ? t() : L(t);
25
+ function et(t, a = !0) {
26
+ Ne() ? be(t) : a ? t() : oe(t);
28
27
  }
29
- function te(t) {
30
- var o;
31
- const e = J(t);
32
- return (o = e == null ? void 0 : e.$el) != null ? o : e;
28
+ function Me(t) {
29
+ var a;
30
+ const e = Se(t);
31
+ return (a = e == null ? void 0 : e.$el) != null ? a : e;
33
32
  }
34
- const De = z ? window : void 0, $e = z ? window.document : void 0;
35
- function Re(...t) {
36
- let o, e, l, r;
37
- if (Ee(t[0]) || Array.isArray(t[0]) ? ([e, l, r] = t, o = De) : [o, e, l, r] = t, !o)
38
- return Oe;
33
+ const tt = fe ? window : void 0, nt = fe ? window.document : void 0;
34
+ function ot(...t) {
35
+ let a, e, l, p;
36
+ if (Je(t[0]) || Array.isArray(t[0]) ? ([e, l, p] = t, a = tt) : [a, e, l, p] = t, !a)
37
+ return Ke;
39
38
  Array.isArray(e) || (e = [e]), Array.isArray(l) || (l = [l]);
40
- const n = [], s = () => {
41
- n.forEach((c) => c()), n.length = 0;
42
- }, v = (c, _, w, E) => (c.addEventListener(_, w, E), () => c.removeEventListener(_, w, E)), i = O(() => [te(o), J(r)], ([c, _]) => {
43
- s(), c && n.push(...e.flatMap((w) => l.map((E) => v(c, w, E, _))));
44
- }, { immediate: !0, flush: "post" }), m = () => {
45
- i(), s();
39
+ const i = [], d = () => {
40
+ i.forEach((m) => m()), i.length = 0;
41
+ }, _ = (m, g, F, S) => (m.addEventListener(g, F, S), () => m.removeEventListener(g, F, S)), u = Q(() => [Me(a), Se(p)], ([m, g]) => {
42
+ d(), m && i.push(...e.flatMap((F) => l.map((S) => _(m, F, S, g))));
43
+ }, { immediate: !0, flush: "post" }), y = () => {
44
+ u(), d();
46
45
  };
47
- return ee(m), m;
46
+ return Oe(y), y;
48
47
  }
49
- function Pe(t, o = !1) {
50
- const e = k(), l = () => e.value = !!t();
51
- return l(), Fe(l, o), e;
48
+ function rt(t, a = !1) {
49
+ const e = R(), l = () => e.value = !!t();
50
+ return l(), et(l, a), e;
52
51
  }
53
- const M = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Q = "__vueuse_ssr_handlers__";
54
- M[Q] = M[Q] || {};
55
- const A = [
52
+ const he = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ye = "__vueuse_ssr_handlers__";
53
+ he[ye] = he[ye] || {};
54
+ const ge = [
56
55
  [
57
56
  "requestFullscreen",
58
57
  "exitFullscreen",
@@ -94,54 +93,54 @@ const A = [
94
93
  "MSFullscreenError"
95
94
  ]
96
95
  ];
97
- function ne(t, o = {}) {
98
- const { document: e = $e, autoExit: l = !1 } = o, r = t || (e == null ? void 0 : e.querySelector("html")), n = k(!1);
99
- let s = A[0];
100
- const v = Pe(() => {
96
+ function Ee(t, a = {}) {
97
+ const { document: e = nt, autoExit: l = !1 } = a, p = t || (e == null ? void 0 : e.querySelector("html")), i = R(!1);
98
+ let d = ge[0];
99
+ const _ = rt(() => {
101
100
  if (e) {
102
- for (const S of A)
103
- if (S[1] in e)
104
- return s = S, !0;
101
+ for (const H of ge)
102
+ if (H[1] in e)
103
+ return d = H, !0;
105
104
  } else
106
105
  return !1;
107
106
  return !1;
108
- }), [i, m, c, , _] = s;
109
- async function w() {
110
- v.value && (e != null && e[c] && await e[m](), n.value = !1);
107
+ }), [u, y, m, , g] = d;
108
+ async function F() {
109
+ _.value && (e != null && e[m] && await e[y](), i.value = !1);
111
110
  }
112
- async function E() {
113
- if (!v.value)
111
+ async function S() {
112
+ if (!_.value)
114
113
  return;
115
- await w();
116
- const S = te(r);
117
- S && (await S[i](), n.value = !0);
114
+ await F();
115
+ const H = Me(p);
116
+ H && (await H[u](), i.value = !0);
118
117
  }
119
- async function T() {
120
- n.value ? await w() : await E();
118
+ async function A() {
119
+ i.value ? await F() : await S();
121
120
  }
122
- return e && Re(e, _, () => {
123
- n.value = !!(e != null && e[c]);
124
- }, !1), l && ee(w), {
125
- isSupported: v,
126
- isFullscreen: n,
127
- enter: E,
128
- exit: w,
129
- toggle: T
121
+ return e && ot(e, g, () => {
122
+ i.value = !!(e != null && e[m]);
123
+ }, !1), l && Oe(F), {
124
+ isSupported: _,
125
+ isFullscreen: i,
126
+ enter: S,
127
+ exit: F,
128
+ toggle: A
130
129
  };
131
130
  }
132
- var q;
131
+ var $e;
133
132
  (function(t) {
134
133
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
135
- })(q || (q = {}));
136
- var Le = Object.defineProperty, G = Object.getOwnPropertySymbols, Ne = Object.prototype.hasOwnProperty, xe = Object.prototype.propertyIsEnumerable, W = (t, o, e) => o in t ? Le(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e, Te = (t, o) => {
137
- for (var e in o || (o = {}))
138
- Ne.call(o, e) && W(t, e, o[e]);
139
- if (G)
140
- for (var e of G(o))
141
- xe.call(o, e) && W(t, e, o[e]);
134
+ })($e || ($e = {}));
135
+ var it = Object.defineProperty, _e = Object.getOwnPropertySymbols, st = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, we = (t, a, e) => a in t ? it(t, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[a] = e, lt = (t, a) => {
136
+ for (var e in a || (a = {}))
137
+ st.call(a, e) && we(t, e, a[e]);
138
+ if (_e)
139
+ for (var e of _e(a))
140
+ at.call(a, e) && we(t, e, a[e]);
142
141
  return t;
143
142
  };
144
- const Ue = {
143
+ const ut = {
145
144
  easeInSine: [0.12, 0, 0.39, 0],
146
145
  easeOutSine: [0.61, 1, 0.88, 1],
147
146
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -167,43 +166,43 @@ const Ue = {
167
166
  easeOutBack: [0.34, 1.56, 0.64, 1],
168
167
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
169
168
  };
170
- Te({
171
- linear: Se
172
- }, Ue);
173
- const ze = /* @__PURE__ */ R({
169
+ lt({
170
+ linear: Xe
171
+ }, ut);
172
+ const ct = /* @__PURE__ */ K({
174
173
  __name: "GridItem",
175
174
  props: {
176
175
  active: { type: Boolean },
177
176
  gridNum: {}
178
177
  },
179
178
  emits: ["itemClick"],
180
- setup(t, { emit: o }) {
181
- ue((c) => ({
182
- "40d17f34": m.value
179
+ setup(t, { emit: a }) {
180
+ Pe((m) => ({
181
+ "40d17f34": y.value
183
182
  }));
184
- const e = t, l = o, r = k(), { toggle: n, isFullscreen: s } = ne(r), v = () => {
185
- r.value != document.fullscreenElement && (s.value ? (s.value = !1, L(() => {
186
- n();
187
- })) : n());
188
- }, i = () => {
183
+ const e = t, l = a, p = R(), { toggle: i, isFullscreen: d } = Ee(p), _ = () => {
184
+ p.value != document.fullscreenElement && (d.value ? (d.value = !1, oe(() => {
185
+ i();
186
+ })) : i());
187
+ }, u = () => {
189
188
  l("itemClick");
190
- }, m = N(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
191
- return (c, _) => (g(), $("div", {
189
+ }, y = le(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
190
+ return (m, g) => (E(), J("div", {
192
191
  ref_key: "containerRef",
193
- ref: r,
194
- class: de(["wrapper", { "is-active": e.active }]),
195
- onDblclick: _[0] || (_[0] = (w) => v()),
196
- onClick: _[1] || (_[1] = (w) => i())
192
+ ref: p,
193
+ class: Ue(["wrapper", { "is-active": e.active }]),
194
+ onDblclick: g[0] || (g[0] = (F) => _()),
195
+ onClick: g[1] || (g[1] = (F) => u())
197
196
  }, [
198
- Z(c.$slots, "default", {}, void 0, !0)
197
+ Ce(m.$slots, "default", {}, void 0, !0)
199
198
  ], 34));
200
199
  }
201
- }), x = (t, o) => {
200
+ }), ue = (t, a) => {
202
201
  const e = t.__vccOpts || t;
203
- for (const [l, r] of o)
204
- e[l] = r;
202
+ for (const [l, p] of a)
203
+ e[l] = p;
205
204
  return e;
206
- }, Ve = /* @__PURE__ */ x(ze, [["__scopeId", "data-v-1a6dbdfc"]]), je = { class: "layout-wrapper" }, Be = /* @__PURE__ */ R({
205
+ }, dt = /* @__PURE__ */ ue(ct, [["__scopeId", "data-v-1a6dbdfc"]]), ft = { class: "layout-wrapper" }, vt = /* @__PURE__ */ K({
207
206
  __name: "GridLayout",
208
207
  props: {
209
208
  gridNum: {},
@@ -211,124 +210,406 @@ const ze = /* @__PURE__ */ R({
211
210
  showFn: {}
212
211
  },
213
212
  emits: ["update:activeIndex"],
214
- setup(t, { emit: o }) {
215
- const e = t, l = o, r = (n) => {
216
- l("update:activeIndex", n);
213
+ setup(t, { emit: a }) {
214
+ const e = t, l = a, p = (i) => {
215
+ l("update:activeIndex", i);
217
216
  };
218
- return (n, s) => (g(), $("div", je, [
219
- (g(!0), $(K, null, pe(e.gridNum, (v, i) => (g(), h(Ve, {
217
+ return (i, d) => (E(), J("div", ft, [
218
+ (E(!0), J(Ie, null, je(e.gridNum, (_, u) => (E(), V(dt, {
220
219
  active: !1,
221
220
  "grid-num": e.gridNum,
222
- onItemClick: (m) => r(i)
221
+ onItemClick: (y) => p(u)
223
222
  }, {
224
- default: f(() => [
225
- n.showFn(i) ? Z(n.$slots, "default", {
223
+ default: D(() => [
224
+ i.showFn(u) ? Ce(i.$slots, "default", {
226
225
  key: 0,
227
- index: i
228
- }, void 0, !0) : b("", !0)
226
+ index: u
227
+ }, void 0, !0) : z("", !0)
229
228
  ]),
230
229
  _: 2
231
230
  }, 1032, ["grid-num", "onItemClick"]))), 256))
232
231
  ]));
233
232
  }
234
- }), Me = /* @__PURE__ */ x(Be, [["__scopeId", "data-v-6c66f7ad"]]), Qe = /* @__PURE__ */ R({
233
+ }), pt = /* @__PURE__ */ ue(vt, [["__scopeId", "data-v-6c66f7ad"]]);
234
+ var mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
235
+ function ht(t) {
236
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
237
+ }
238
+ var Fe = { exports: {} };
239
+ (function(t, a) {
240
+ (function(e, l) {
241
+ t.exports = l();
242
+ })(mt, function() {
243
+ var e = 1e3, l = 6e4, p = 36e5, i = "millisecond", d = "second", _ = "minute", u = "hour", y = "day", m = "week", g = "month", F = "quarter", S = "year", A = "date", H = "Invalid Date", ce = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, re = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, X = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(c) {
244
+ var r = ["th", "st", "nd", "rd"], n = c % 100;
245
+ return "[" + c + (r[(n - 20) % 10] || r[n] || r[0]) + "]";
246
+ } }, k = function(c, r, n) {
247
+ var s = String(c);
248
+ return !s || s.length >= r ? c : "" + Array(r + 1 - s.length).join(n) + c;
249
+ }, P = { s: k, z: function(c) {
250
+ var r = -c.utcOffset(), n = Math.abs(r), s = Math.floor(n / 60), o = n % 60;
251
+ return (r <= 0 ? "+" : "-") + k(s, 2, "0") + ":" + k(o, 2, "0");
252
+ }, m: function c(r, n) {
253
+ if (r.date() < n.date()) return -c(n, r);
254
+ var s = 12 * (n.year() - r.year()) + (n.month() - r.month()), o = r.clone().add(s, g), f = n - o < 0, v = r.clone().add(s + (f ? -1 : 1), g);
255
+ return +(-(s + (n - o) / (f ? o - v : v - o)) || 0);
256
+ }, a: function(c) {
257
+ return c < 0 ? Math.ceil(c) || 0 : Math.floor(c);
258
+ }, p: function(c) {
259
+ return { M: g, y: S, w: m, d: y, D: A, h: u, m: _, s: d, ms: i, Q: F }[c] || String(c || "").toLowerCase().replace(/s$/, "");
260
+ }, u: function(c) {
261
+ return c === void 0;
262
+ } }, U = "en", W = {};
263
+ W[U] = X;
264
+ var Y = "$isDayjsObject", de = function(c) {
265
+ return c instanceof se || !(!c || !c[Y]);
266
+ }, ie = function c(r, n, s) {
267
+ var o;
268
+ if (!r) return U;
269
+ if (typeof r == "string") {
270
+ var f = r.toLowerCase();
271
+ W[f] && (o = f), n && (W[f] = n, o = f);
272
+ var v = r.split("-");
273
+ if (!o && v.length > 1) return c(v[0]);
274
+ } else {
275
+ var w = r.name;
276
+ W[w] = r, o = w;
277
+ }
278
+ return !s && o && (U = o), o || !s && U;
279
+ }, O = function(c, r) {
280
+ if (de(c)) return c.clone();
281
+ var n = typeof r == "object" ? r : {};
282
+ return n.date = c, n.args = arguments, new se(n);
283
+ }, h = P;
284
+ h.l = ie, h.i = de, h.w = function(c, r) {
285
+ return O(c, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
286
+ };
287
+ var se = function() {
288
+ function c(n) {
289
+ this.$L = ie(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[Y] = !0;
290
+ }
291
+ var r = c.prototype;
292
+ return r.parse = function(n) {
293
+ this.$d = function(s) {
294
+ var o = s.date, f = s.utc;
295
+ if (o === null) return /* @__PURE__ */ new Date(NaN);
296
+ if (h.u(o)) return /* @__PURE__ */ new Date();
297
+ if (o instanceof Date) return new Date(o);
298
+ if (typeof o == "string" && !/Z$/i.test(o)) {
299
+ var v = o.match(ce);
300
+ if (v) {
301
+ var w = v[2] - 1 || 0, b = (v[7] || "0").substring(0, 3);
302
+ return f ? new Date(Date.UTC(v[1], w, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, b)) : new Date(v[1], w, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, b);
303
+ }
304
+ }
305
+ return new Date(o);
306
+ }(n), this.init();
307
+ }, r.init = function() {
308
+ var n = this.$d;
309
+ this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
310
+ }, r.$utils = function() {
311
+ return h;
312
+ }, r.isValid = function() {
313
+ return this.$d.toString() !== H;
314
+ }, r.isSame = function(n, s) {
315
+ var o = O(n);
316
+ return this.startOf(s) <= o && o <= this.endOf(s);
317
+ }, r.isAfter = function(n, s) {
318
+ return O(n) < this.startOf(s);
319
+ }, r.isBefore = function(n, s) {
320
+ return this.endOf(s) < O(n);
321
+ }, r.$g = function(n, s, o) {
322
+ return h.u(n) ? this[s] : this.set(o, n);
323
+ }, r.unix = function() {
324
+ return Math.floor(this.valueOf() / 1e3);
325
+ }, r.valueOf = function() {
326
+ return this.$d.getTime();
327
+ }, r.startOf = function(n, s) {
328
+ var o = this, f = !!h.u(s) || s, v = h.p(n), w = function(G, N) {
329
+ var B = h.w(o.$u ? Date.UTC(o.$y, N, G) : new Date(o.$y, N, G), o);
330
+ return f ? B : B.endOf(y);
331
+ }, b = function(G, N) {
332
+ return h.w(o.toDate()[G].apply(o.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(N)), o);
333
+ }, M = this.$W, T = this.$M, j = this.$D, Z = "set" + (this.$u ? "UTC" : "");
334
+ switch (v) {
335
+ case S:
336
+ return f ? w(1, 0) : w(31, 11);
337
+ case g:
338
+ return f ? w(1, T) : w(0, T + 1);
339
+ case m:
340
+ var q = this.$locale().weekStart || 0, ee = (M < q ? M + 7 : M) - q;
341
+ return w(f ? j - ee : j + (6 - ee), T);
342
+ case y:
343
+ case A:
344
+ return b(Z + "Hours", 0);
345
+ case u:
346
+ return b(Z + "Minutes", 1);
347
+ case _:
348
+ return b(Z + "Seconds", 2);
349
+ case d:
350
+ return b(Z + "Milliseconds", 3);
351
+ default:
352
+ return this.clone();
353
+ }
354
+ }, r.endOf = function(n) {
355
+ return this.startOf(n, !1);
356
+ }, r.$set = function(n, s) {
357
+ var o, f = h.p(n), v = "set" + (this.$u ? "UTC" : ""), w = (o = {}, o[y] = v + "Date", o[A] = v + "Date", o[g] = v + "Month", o[S] = v + "FullYear", o[u] = v + "Hours", o[_] = v + "Minutes", o[d] = v + "Seconds", o[i] = v + "Milliseconds", o)[f], b = f === y ? this.$D + (s - this.$W) : s;
358
+ if (f === g || f === S) {
359
+ var M = this.clone().set(A, 1);
360
+ M.$d[w](b), M.init(), this.$d = M.set(A, Math.min(this.$D, M.daysInMonth())).$d;
361
+ } else w && this.$d[w](b);
362
+ return this.init(), this;
363
+ }, r.set = function(n, s) {
364
+ return this.clone().$set(n, s);
365
+ }, r.get = function(n) {
366
+ return this[h.p(n)]();
367
+ }, r.add = function(n, s) {
368
+ var o, f = this;
369
+ n = Number(n);
370
+ var v = h.p(s), w = function(T) {
371
+ var j = O(f);
372
+ return h.w(j.date(j.date() + Math.round(T * n)), f);
373
+ };
374
+ if (v === g) return this.set(g, this.$M + n);
375
+ if (v === S) return this.set(S, this.$y + n);
376
+ if (v === y) return w(1);
377
+ if (v === m) return w(7);
378
+ var b = (o = {}, o[_] = l, o[u] = p, o[d] = e, o)[v] || 1, M = this.$d.getTime() + n * b;
379
+ return h.w(M, this);
380
+ }, r.subtract = function(n, s) {
381
+ return this.add(-1 * n, s);
382
+ }, r.format = function(n) {
383
+ var s = this, o = this.$locale();
384
+ if (!this.isValid()) return o.invalidDate || H;
385
+ var f = n || "YYYY-MM-DDTHH:mm:ssZ", v = h.z(this), w = this.$H, b = this.$m, M = this.$M, T = o.weekdays, j = o.months, Z = o.meridiem, q = function(N, B, te, ae) {
386
+ return N && (N[B] || N(s, f)) || te[B].slice(0, ae);
387
+ }, ee = function(N) {
388
+ return h.s(w % 12 || 12, N, "0");
389
+ }, G = Z || function(N, B, te) {
390
+ var ae = N < 12 ? "AM" : "PM";
391
+ return te ? ae.toLowerCase() : ae;
392
+ };
393
+ return f.replace(re, function(N, B) {
394
+ return B || function(te) {
395
+ switch (te) {
396
+ case "YY":
397
+ return String(s.$y).slice(-2);
398
+ case "YYYY":
399
+ return h.s(s.$y, 4, "0");
400
+ case "M":
401
+ return M + 1;
402
+ case "MM":
403
+ return h.s(M + 1, 2, "0");
404
+ case "MMM":
405
+ return q(o.monthsShort, M, j, 3);
406
+ case "MMMM":
407
+ return q(j, M);
408
+ case "D":
409
+ return s.$D;
410
+ case "DD":
411
+ return h.s(s.$D, 2, "0");
412
+ case "d":
413
+ return String(s.$W);
414
+ case "dd":
415
+ return q(o.weekdaysMin, s.$W, T, 2);
416
+ case "ddd":
417
+ return q(o.weekdaysShort, s.$W, T, 3);
418
+ case "dddd":
419
+ return T[s.$W];
420
+ case "H":
421
+ return String(w);
422
+ case "HH":
423
+ return h.s(w, 2, "0");
424
+ case "h":
425
+ return ee(1);
426
+ case "hh":
427
+ return ee(2);
428
+ case "a":
429
+ return G(w, b, !0);
430
+ case "A":
431
+ return G(w, b, !1);
432
+ case "m":
433
+ return String(b);
434
+ case "mm":
435
+ return h.s(b, 2, "0");
436
+ case "s":
437
+ return String(s.$s);
438
+ case "ss":
439
+ return h.s(s.$s, 2, "0");
440
+ case "SSS":
441
+ return h.s(s.$ms, 3, "0");
442
+ case "Z":
443
+ return v;
444
+ }
445
+ return null;
446
+ }(N) || v.replace(":", "");
447
+ });
448
+ }, r.utcOffset = function() {
449
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
450
+ }, r.diff = function(n, s, o) {
451
+ var f, v = this, w = h.p(s), b = O(n), M = (b.utcOffset() - this.utcOffset()) * l, T = this - b, j = function() {
452
+ return h.m(v, b);
453
+ };
454
+ switch (w) {
455
+ case S:
456
+ f = j() / 12;
457
+ break;
458
+ case g:
459
+ f = j();
460
+ break;
461
+ case F:
462
+ f = j() / 3;
463
+ break;
464
+ case m:
465
+ f = (T - M) / 6048e5;
466
+ break;
467
+ case y:
468
+ f = (T - M) / 864e5;
469
+ break;
470
+ case u:
471
+ f = T / p;
472
+ break;
473
+ case _:
474
+ f = T / l;
475
+ break;
476
+ case d:
477
+ f = T / e;
478
+ break;
479
+ default:
480
+ f = T;
481
+ }
482
+ return o ? f : h.a(f);
483
+ }, r.daysInMonth = function() {
484
+ return this.endOf(g).$D;
485
+ }, r.$locale = function() {
486
+ return W[this.$L];
487
+ }, r.locale = function(n, s) {
488
+ if (!n) return this.$L;
489
+ var o = this.clone(), f = ie(n, s, !0);
490
+ return f && (o.$L = f), o;
491
+ }, r.clone = function() {
492
+ return h.w(this.$d, this);
493
+ }, r.toDate = function() {
494
+ return new Date(this.valueOf());
495
+ }, r.toJSON = function() {
496
+ return this.isValid() ? this.toISOString() : null;
497
+ }, r.toISOString = function() {
498
+ return this.$d.toISOString();
499
+ }, r.toString = function() {
500
+ return this.$d.toUTCString();
501
+ }, c;
502
+ }(), ve = se.prototype;
503
+ return O.prototype = ve, [["$ms", i], ["$s", d], ["$m", _], ["$H", u], ["$W", y], ["$M", g], ["$y", S], ["$D", A]].forEach(function(c) {
504
+ ve[c[1]] = function(r) {
505
+ return this.$g(r, c[0], c[1]);
506
+ };
507
+ }), O.extend = function(c, r) {
508
+ return c.$i || (c(r, se, O), c.$i = !0), O;
509
+ }, O.locale = ie, O.isDayjs = de, O.unix = function(c) {
510
+ return O(1e3 * c);
511
+ }, O.en = W[U], O.Ls = W, O.p = {}, O;
512
+ });
513
+ })(Fe);
514
+ var yt = Fe.exports;
515
+ const gt = /* @__PURE__ */ ht(yt), $t = /* @__PURE__ */ K({
235
516
  __name: "DirectionControl",
236
517
  emits: ["change"],
237
- setup(t, { emit: o }) {
238
- const e = o, l = (r) => {
239
- e("change", r);
518
+ setup(t, { emit: a }) {
519
+ const e = a, l = (p) => {
520
+ e("change", p);
240
521
  };
241
- return (r, n) => (g(), $("div", {
522
+ return (p, i) => (E(), J("div", {
242
523
  class: "direction-control",
243
- onDblclick: n[9] || (n[9] = y((s) => s.stopPropagation(), ["stop"]))
524
+ onDblclick: i[9] || (i[9] = L((d) => d.stopPropagation(), ["stop"]))
244
525
  }, [
245
- d(a(I), { content: "左上" }, {
246
- default: f(() => [
247
- p("div", {
526
+ C($(x), { content: "左上" }, {
527
+ default: D(() => [
528
+ I("div", {
248
529
  class: "icon icon-top-left",
249
- onClick: n[0] || (n[0] = y((s) => l("leftUp"), ["stop"]))
530
+ onClick: i[0] || (i[0] = L((d) => l("leftUp"), ["stop"]))
250
531
  })
251
532
  ]),
252
533
  _: 1
253
534
  }),
254
- d(a(I), { content: "上" }, {
255
- default: f(() => [
256
- p("div", {
535
+ C($(x), { content: "上" }, {
536
+ default: D(() => [
537
+ I("div", {
257
538
  class: "icon icon-top",
258
- onClick: n[1] || (n[1] = y((s) => l("up"), ["stop"]))
539
+ onClick: i[1] || (i[1] = L((d) => l("up"), ["stop"]))
259
540
  })
260
541
  ]),
261
542
  _: 1
262
543
  }),
263
- d(a(I), { content: "右上" }, {
264
- default: f(() => [
265
- p("div", {
544
+ C($(x), { content: "右上" }, {
545
+ default: D(() => [
546
+ I("div", {
266
547
  class: "icon icon-top-right",
267
- onClick: n[2] || (n[2] = y((s) => l("rightUp"), ["stop"]))
548
+ onClick: i[2] || (i[2] = L((d) => l("rightUp"), ["stop"]))
268
549
  })
269
550
  ]),
270
551
  _: 1
271
552
  }),
272
- d(a(I), { content: "左" }, {
273
- default: f(() => [
274
- p("div", {
553
+ C($(x), { content: "左" }, {
554
+ default: D(() => [
555
+ I("div", {
275
556
  class: "icon icon-left",
276
- onClick: n[3] || (n[3] = y((s) => l("left"), ["stop"]))
557
+ onClick: i[3] || (i[3] = L((d) => l("left"), ["stop"]))
277
558
  })
278
559
  ]),
279
560
  _: 1
280
561
  }),
281
- d(a(I), { content: "自动" }, {
282
- default: f(() => [
283
- p("div", {
562
+ C($(x), { content: "自动" }, {
563
+ default: D(() => [
564
+ I("div", {
284
565
  class: "icon icon-auto",
285
- onClick: n[4] || (n[4] = y((s) => l("auto"), ["stop"]))
566
+ onClick: i[4] || (i[4] = L((d) => l("auto"), ["stop"]))
286
567
  })
287
568
  ]),
288
569
  _: 1
289
570
  }),
290
- d(a(I), { content: "右" }, {
291
- default: f(() => [
292
- p("div", {
571
+ C($(x), { content: "右" }, {
572
+ default: D(() => [
573
+ I("div", {
293
574
  class: "icon icon-right",
294
- onClick: n[5] || (n[5] = y((s) => l("right"), ["stop"]))
575
+ onClick: i[5] || (i[5] = L((d) => l("right"), ["stop"]))
295
576
  })
296
577
  ]),
297
578
  _: 1
298
579
  }),
299
- d(a(I), { content: "左下" }, {
300
- default: f(() => [
301
- p("div", {
580
+ C($(x), { content: "左下" }, {
581
+ default: D(() => [
582
+ I("div", {
302
583
  class: "icon icon-bottom-left",
303
- onClick: n[6] || (n[6] = y((s) => l("leftDown"), ["stop"]))
584
+ onClick: i[6] || (i[6] = L((d) => l("leftDown"), ["stop"]))
304
585
  })
305
586
  ]),
306
587
  _: 1
307
588
  }),
308
- d(a(I), { content: "下" }, {
309
- default: f(() => [
310
- p("div", {
589
+ C($(x), { content: "下" }, {
590
+ default: D(() => [
591
+ I("div", {
311
592
  class: "icon icon-bottom",
312
- onClick: n[7] || (n[7] = y((s) => l("down"), ["stop"]))
593
+ onClick: i[7] || (i[7] = L((d) => l("down"), ["stop"]))
313
594
  })
314
595
  ]),
315
596
  _: 1
316
597
  }),
317
- d(a(I), { content: "右下" }, {
318
- default: f(() => [
319
- p("div", {
598
+ C($(x), { content: "右下" }, {
599
+ default: D(() => [
600
+ I("div", {
320
601
  class: "icon icon-bottom-right",
321
- onClick: n[8] || (n[8] = y((s) => l("rightDown"), ["stop"]))
602
+ onClick: i[8] || (i[8] = L((d) => l("rightDown"), ["stop"]))
322
603
  })
323
604
  ]),
324
605
  _: 1
325
606
  })
326
607
  ], 32));
327
608
  }
328
- }), Ae = /* @__PURE__ */ x(Qe, [["__scopeId", "data-v-3b02830e"]]), qe = (t) => (fe("data-v-a46773e1"), t = t(), me(), t), Ge = { class: "video-wrapper" }, We = { class: "video-top" }, He = { class: "video-top_l" }, Ye = { class: "video-title-wrapper" }, Ze = { class: "video-title" }, Ke = { class: "video-top_r" }, Xe = {
609
+ }), _t = /* @__PURE__ */ ue($t, [["__scopeId", "data-v-3b02830e"]]), wt = (t) => (Ve("data-v-a46773e1"), t = t(), Ae(), t), kt = { class: "video-wrapper" }, bt = { class: "video-top" }, Ct = { class: "video-top_l" }, It = { class: "video-title-wrapper" }, Dt = { class: "video-title" }, St = { class: "video-top_r" }, Ot = {
329
610
  key: 0,
330
611
  class: "play-status"
331
- }, Je = { class: "video-bottom" }, et = /* @__PURE__ */ qe(() => /* @__PURE__ */ p("div", { class: "video-bottom_l" }, null, -1)), tt = { class: "video-bottom_r" }, nt = /* @__PURE__ */ R({
612
+ }, Mt = { class: "video-bottom" }, Et = /* @__PURE__ */ wt(() => /* @__PURE__ */ I("div", { class: "video-bottom_l" }, null, -1)), Ft = { class: "video-bottom_r" }, Tt = /* @__PURE__ */ K({
332
613
  __name: "index",
333
614
  props: {
334
615
  videoUrl: {},
@@ -341,214 +622,214 @@ const ze = /* @__PURE__ */ R({
341
622
  onReplay: {}
342
623
  },
343
624
  emits: ["close", "directionControl", "zoomControl"],
344
- setup(t, { emit: o }) {
345
- const e = t, l = o;
346
- Ie({
625
+ setup(t, { emit: a }) {
626
+ const e = t, l = a;
627
+ Qe({
347
628
  muted: import("@das-fed/ui/packages/icons/muted"),
348
629
  volume: import("@das-fed/ui/packages/icons/volume"),
349
630
  shrink: import("@das-fed/ui/packages/icons/shrink"),
350
631
  enlarge: import("@das-fed/ui/packages/icons/enlarge"),
351
632
  "direction-control": import("@das-fed/ui/packages/icons/direction-control")
352
633
  });
353
- const r = k(!0), n = k(), s = k(!1), v = k(), i = N(() => {
354
- var u;
355
- return (u = v.value) == null ? void 0 : u.video;
356
- }), m = k(!1), c = k(!0), _ = (u) => {
357
- n.value = u, n.value.on(window.mpegts.Events.ERROR, (C) => {
634
+ const p = R(!0), i = R(), d = R(!1), _ = R(), u = le(() => {
635
+ var k;
636
+ return (k = _.value) == null ? void 0 : k.video;
637
+ }), y = R(!1), m = R(!0), g = (k) => {
638
+ i.value = k, i.value.on(window.mpegts.Events.ERROR, (P) => {
358
639
  });
359
- }, w = () => {
360
- r.value = !r.value, n.value && (n.value.muted = r.value);
361
- }, E = () => {
362
- s.value = !s.value;
363
- }, T = k(""), S = () => {
364
- const u = document.createElement("canvas");
365
- if (i.value) {
366
- u.width = i.value.clientWidth, u.height = i.value.clientHeight;
367
- const C = u.getContext("2d");
368
- C == null || C.drawImage(i.value, 0, 0, u.width, u.height);
369
- const D = u.toDataURL("image/jpg"), se = `【${e.title}】${be().format("YYYYMMDDHHmmss").toString()}.jpg`;
370
- if (T.value = D, "download" in document.createElement("a")) {
371
- const F = document.createElement("a");
372
- F.download = se, F.style.display = "none", F.href = D, document.body.appendChild(F), document.body.appendChild(u), F.click(), URL.revokeObjectURL(F.href), document.body.removeChild(F), document.body.removeChild(u);
640
+ }, F = () => {
641
+ p.value = !p.value, i.value && (i.value.muted = p.value);
642
+ }, S = () => {
643
+ d.value = !d.value;
644
+ }, A = R(""), H = () => {
645
+ const k = document.createElement("canvas");
646
+ if (u.value) {
647
+ k.width = u.value.clientWidth, k.height = u.value.clientHeight;
648
+ const P = k.getContext("2d");
649
+ P == null || P.drawImage(u.value, 0, 0, k.width, k.height);
650
+ const U = k.toDataURL("image/jpg"), W = `【${e.title}】${gt().format("YYYYMMDDHHmmss").toString()}.jpg`;
651
+ if (A.value = U, "download" in document.createElement("a")) {
652
+ const Y = document.createElement("a");
653
+ Y.download = W, Y.style.display = "none", Y.href = U, document.body.appendChild(Y), document.body.appendChild(k), Y.click(), URL.revokeObjectURL(Y.href), document.body.removeChild(Y), document.body.removeChild(k);
373
654
  }
374
655
  }
375
- }, ie = (u) => {
376
- l("directionControl", u);
377
- }, V = (u) => {
378
- l("zoomControl", u);
379
- }, U = (u) => e.authType.includes(u);
380
- return O(
381
- () => i.value,
656
+ }, ce = (k) => {
657
+ l("directionControl", k);
658
+ }, re = (k) => {
659
+ l("zoomControl", k);
660
+ }, X = (k) => e.authType.includes(k);
661
+ return Q(
662
+ () => u.value,
382
663
  () => {
383
- i.value && i.value.addEventListener("ended", () => {
384
- m.value = !0, e.type === "playback" && (c.value = !1);
664
+ u.value && u.value.addEventListener("ended", () => {
665
+ y.value = !0, e.type === "playback" && (m.value = !1);
385
666
  });
386
667
  }
387
- ), O(
388
- () => i.value,
668
+ ), Q(
669
+ () => u.value,
389
670
  () => {
390
- i.value && L(() => {
391
- i.value.playbackRate = e.playbackRate || 1;
671
+ u.value && oe(() => {
672
+ u.value.playbackRate = e.playbackRate || 1;
392
673
  });
393
674
  }
394
- ), O(
395
- () => n.value,
675
+ ), Q(
676
+ () => i.value,
396
677
  () => {
397
- n.value && L(() => {
398
- n.value.muted = r.value;
678
+ i.value && oe(() => {
679
+ i.value.muted = p.value;
399
680
  });
400
681
  }
401
- ), O(
682
+ ), Q(
402
683
  () => e.playbackRate,
403
684
  () => {
404
- i.value && (i.value.playbackRate = e.playbackRate || 1);
685
+ u.value && (u.value.playbackRate = e.playbackRate || 1);
405
686
  },
406
687
  {
407
688
  immediate: !0
408
689
  }
409
- ), O(
690
+ ), Q(
410
691
  () => e.paused,
411
692
  () => {
412
- n.value && (e.paused ? n.value.pause() : n.value.play());
693
+ i.value && (e.paused ? i.value.pause() : i.value.play());
413
694
  }
414
- ), O(
695
+ ), Q(
415
696
  () => e.videoUrl,
416
697
  () => {
417
- c.value = !1, L(() => {
418
- c.value = !0;
698
+ m.value = !1, oe(() => {
699
+ m.value = !0;
419
700
  });
420
701
  }
421
- ), (u, C) => (g(), $("div", Ge, [
422
- d(a(Ce), {
702
+ ), (k, P) => (E(), J("div", kt, [
703
+ C($(Ge), {
423
704
  spinning: e.loading,
424
705
  type: "component",
425
706
  tip: "加载中..."
426
707
  }, {
427
- default: f(() => [
428
- p("div", We, [
429
- p("div", He, [
430
- p("div", Ye, [
431
- p("div", Ze, ve(e.title.length > 20 ? e.title.slice(0, 19) + "..." : e.title), 1)
708
+ default: D(() => [
709
+ I("div", bt, [
710
+ I("div", Ct, [
711
+ I("div", It, [
712
+ I("div", Dt, ze(e.title.length > 20 ? e.title.slice(0, 19) + "..." : e.title), 1)
432
713
  ])
433
714
  ]),
434
- p("div", Ke, [
435
- ["live"].includes(u.type) ? (g(), $("span", Xe, "正在实时预览")) : b("", !0)
715
+ I("div", St, [
716
+ ["live"].includes(k.type) ? (E(), J("span", Ot, "正在实时预览")) : z("", !0)
436
717
  ])
437
718
  ]),
438
- e.videoUrl && c.value ? (g(), h(a(we), {
719
+ e.videoUrl && m.value ? (E(), V($(qe), {
439
720
  key: 0,
440
721
  type: "flv",
441
722
  ref_key: "dasLivePlayerRef",
442
- ref: v,
443
- muted: r.value,
444
- onLoaded: _,
723
+ ref: _,
724
+ muted: p.value,
725
+ onLoaded: g,
445
726
  src: e.videoUrl
446
- }, null, 8, ["muted", "src"])) : b("", !0),
447
- p("div", Je, [
448
- et,
449
- p("div", tt, [
450
- p("div", {
727
+ }, null, 8, ["muted", "src"])) : z("", !0),
728
+ I("div", Mt, [
729
+ Et,
730
+ I("div", Ft, [
731
+ I("div", {
451
732
  class: "controls",
452
- onDblclick: C[2] || (C[2] = y((D) => D.stopPropagation(), ["stop"]))
733
+ onDblclick: P[2] || (P[2] = L((U) => U.stopPropagation(), ["stop"]))
453
734
  }, [
454
- d(a(I), { content: "声音" }, {
455
- default: f(() => [
456
- d(a(P), {
735
+ C($(x), { content: "声音" }, {
736
+ default: D(() => [
737
+ C($(ne), {
457
738
  class: "icon icon-volume",
458
- icon: r.value ? "muted" : "volume",
459
- onClick: y(w, ["stop"])
739
+ icon: p.value ? "muted" : "volume",
740
+ onClick: L(F, ["stop"])
460
741
  }, null, 8, ["icon"])
461
742
  ]),
462
743
  _: 1
463
744
  }),
464
- d(a(I), { content: "截图" }, {
465
- default: f(() => [
466
- d(a(P), {
745
+ C($(x), { content: "截图" }, {
746
+ default: D(() => [
747
+ C($(ne), {
467
748
  class: "icon icon-screenshot",
468
749
  icon: "screenshot",
469
- onClick: y(S, ["stop"])
750
+ onClick: L(H, ["stop"])
470
751
  })
471
752
  ]),
472
753
  _: 1
473
754
  }),
474
- U("control") ? (g(), h(a(I), {
755
+ X("control") ? (E(), V($(x), {
475
756
  key: 0,
476
757
  content: "聚焦-"
477
758
  }, {
478
- default: f(() => [
479
- ["live", "polling"].includes(e.type) ? (g(), h(a(P), {
759
+ default: D(() => [
760
+ ["live", "polling"].includes(e.type) ? (E(), V($(ne), {
480
761
  key: 0,
481
762
  class: "icon icon-shrink",
482
763
  icon: "shrink",
483
- onClick: C[0] || (C[0] = y((D) => V("zoomOut"), ["stop"]))
484
- })) : b("", !0)
764
+ onClick: P[0] || (P[0] = L((U) => re("zoomOut"), ["stop"]))
765
+ })) : z("", !0)
485
766
  ]),
486
767
  _: 1
487
- })) : b("", !0),
488
- U("control") ? (g(), h(a(I), {
768
+ })) : z("", !0),
769
+ X("control") ? (E(), V($(x), {
489
770
  key: 1,
490
771
  content: "聚焦+"
491
772
  }, {
492
- default: f(() => [
493
- ["live", "polling"].includes(e.type) ? (g(), h(a(P), {
773
+ default: D(() => [
774
+ ["live", "polling"].includes(e.type) ? (E(), V($(ne), {
494
775
  key: 0,
495
776
  class: "icon icon-enlarge",
496
777
  icon: "enlarge",
497
- onClick: C[1] || (C[1] = y((D) => V("zoomIn"), ["stop"]))
498
- })) : b("", !0)
778
+ onClick: P[1] || (P[1] = L((U) => re("zoomIn"), ["stop"]))
779
+ })) : z("", !0)
499
780
  ]),
500
781
  _: 1
501
- })) : b("", !0),
502
- U("control") ? (g(), h(a(I), {
782
+ })) : z("", !0),
783
+ X("control") ? (E(), V($(x), {
503
784
  key: 2,
504
785
  content: "方向控制"
505
786
  }, {
506
- default: f(() => [
507
- ["live", "polling"].includes(e.type) ? (g(), h(a(P), {
787
+ default: D(() => [
788
+ ["live", "polling"].includes(e.type) ? (E(), V($(ne), {
508
789
  key: 0,
509
790
  class: "icon icon-direction-control",
510
791
  icon: "direction-control",
511
- onClick: y(E, ["stop"])
512
- })) : b("", !0)
792
+ onClick: L(S, ["stop"])
793
+ })) : z("", !0)
513
794
  ]),
514
795
  _: 1
515
- })) : b("", !0)
796
+ })) : z("", !0)
516
797
  ], 32)
517
798
  ])
518
799
  ]),
519
- s.value ? (g(), h(Ae, {
800
+ d.value ? (E(), V(_t, {
520
801
  key: 1,
521
- onChange: ie
522
- })) : b("", !0)
802
+ onChange: ce
803
+ })) : z("", !0)
523
804
  ]),
524
805
  _: 1
525
806
  }, 8, ["spinning"])
526
807
  ]));
527
808
  }
528
- }), ot = /* @__PURE__ */ x(nt, [["__scopeId", "data-v-a46773e1"]]), lt = "/api/intelligent-security/video/v1", it = "v1", st = X(`/api/enterpriseright/permission/${it}`), oe = X(`${lt}`, rt);
529
- function rt(t) {
530
- const o = j() ? j().id : 1;
531
- return t.params || (t.params = {}), t.params.project = o, t.params.projectId = o, t;
809
+ }), Lt = /* @__PURE__ */ ue(Tt, [["__scopeId", "data-v-a46773e1"]]), Rt = "/api/intelligent-security/video/v1", xt = "v1", Nt = De(`/api/enterpriseright/permission/${xt}`), Te = De(`${Rt}`, Pt);
810
+ function Pt(t) {
811
+ const a = pe() ? pe().id : 1;
812
+ return t.params || (t.params = {}), t.params.project = a, t.params.projectId = a, t;
532
813
  }
533
- function le(t) {
534
- const o = new URLSearchParams("");
814
+ function Le(t) {
815
+ const a = new URLSearchParams("");
535
816
  for (let [e, l] of Object.entries(t))
536
- o.append(e, l);
537
- return o.toString();
817
+ a.append(e, l);
818
+ return a.toString();
538
819
  }
539
- function H(t) {
540
- return oe.post(`/device/ptz?${le(t)}`)().run();
820
+ function ke(t) {
821
+ return Te.post(`/device/ptz?${Le(t)}`)().run();
541
822
  }
542
- function at(t) {
543
- return oe.post(`/device/video/url/preview?${le(t)}`)().run();
823
+ function Ut(t) {
824
+ return Te.post(`/device/video/url/preview?${Le(t)}`)().run();
544
825
  }
545
- st.post("data/device-auth");
546
- const ct = (t) => {
547
- const o = he();
548
- return `${t}?token=${o}`;
826
+ Nt.post("data/device-auth");
827
+ const jt = (t) => {
828
+ const a = Ze();
829
+ return `${t}?token=${a}`;
549
830
  };
550
- k([]);
551
- const ut = /* @__PURE__ */ R({
831
+ R([]);
832
+ const zt = /* @__PURE__ */ K({
552
833
  props: {
553
834
  deviceInfo: {
554
835
  type: Object,
@@ -556,81 +837,81 @@ const ut = /* @__PURE__ */ R({
556
837
  }
557
838
  },
558
839
  setup(t, {
559
- slots: o
840
+ slots: a
560
841
  }) {
561
842
  const {
562
843
  deviceInfo: e
563
- } = ge(t), l = k(!1), r = k(""), n = async () => {
564
- var c;
565
- if (!((c = e.value) != null && c.deviceId)) return;
844
+ } = He(t), l = R(!1), p = R(""), i = async () => {
845
+ var m;
846
+ if (!((m = e.value) != null && m.deviceId)) return;
566
847
  l.value = !0;
567
- const [i, m] = await at({
848
+ const [u, y] = await Ut({
568
849
  productId: e.value.productId,
569
850
  deviceId: e.value.deviceId
570
851
  });
571
- i || (r.value = ct(m == null ? void 0 : m.wsFlvStreamURL)), l.value = !1;
572
- }, s = (i) => {
573
- H({
852
+ u || (p.value = jt(y == null ? void 0 : y.wsFlvStreamURL)), l.value = !1;
853
+ }, d = (u) => {
854
+ ke({
574
855
  productId: e.value.productId,
575
856
  deviceId: e.value.deviceId,
576
- direction: i,
857
+ direction: u,
577
858
  zoom: ""
578
859
  });
579
- }, v = (i) => {
580
- H({
860
+ }, _ = (u) => {
861
+ ke({
581
862
  productId: e.value.productId,
582
863
  deviceId: e.value.deviceId,
583
864
  direction: "",
584
- zoom: i
865
+ zoom: u
585
866
  });
586
867
  };
587
- return Y(() => {
588
- n();
589
- }), O(() => e.value, () => {
590
- n();
868
+ return be(() => {
869
+ i();
870
+ }), Q(() => e.value, () => {
871
+ i();
591
872
  }, {
592
873
  deep: !0
593
- }), () => d(K, null, [o.default({
594
- videoUrl: r.value,
874
+ }), () => C(Ie, null, [a.default({
875
+ videoUrl: p.value,
595
876
  loading: l.value,
596
- onDirectionControl: s,
597
- onZoomControl: v
877
+ onDirectionControl: d,
878
+ onZoomControl: _
598
879
  })]);
599
880
  }
600
881
  });
601
- function dt(t) {
602
- const o = k(0), e = k(), {
882
+ function Vt(t) {
883
+ const a = R(0), e = R(), {
603
884
  toggle: l,
604
- isFullscreen: r
605
- } = ne(e);
885
+ isFullscreen: p
886
+ } = Ee(e);
606
887
  return {
607
- render: () => d(Me, {
888
+ render: () => C(pt, {
608
889
  ref: e,
609
890
  gridNum: t.gridNum,
610
- activeIndex: o.value,
611
- "onUpdate:activeIndex": (s) => o.value = s,
612
- showFn: (s) => !!t.deviceList[s]
891
+ activeIndex: a.value,
892
+ "onUpdate:activeIndex": (d) => a.value = d,
893
+ showFn: (d) => !!t.deviceList[d]
613
894
  }, {
614
895
  default: ({
615
- index: s
896
+ index: d
616
897
  }) => {
617
- const v = t.deviceList[s];
618
- return d(ut, {
619
- deviceInfo: v
898
+ const _ = t.deviceList[d];
899
+ return C(zt, {
900
+ deviceInfo: _
620
901
  }, {
621
902
  default: ({
622
- videoUrl: i,
623
- onDirectionControl: m,
624
- onZoomControl: c,
625
- loading: _
626
- }) => d(ot, {
903
+ videoUrl: u,
904
+ onDirectionControl: y,
905
+ onZoomControl: m,
906
+ loading: g
907
+ }) => C(Lt, {
627
908
  type: "live",
628
- loading: _,
629
- videoUrl: i,
630
- title: v.deviceName,
631
- onDirectionControl: m,
632
- onZoomControl: c,
633
- authType: v.authType === 2 ? ["control"] : []
909
+ loading: g,
910
+ videoUrl: u,
911
+ title: _.deviceName,
912
+ onDirectionControl: y,
913
+ onZoomControl: m,
914
+ authType: _.authType === 2 ? ["control"] : []
634
915
  }, null)
635
916
  });
636
917
  }
@@ -638,9 +919,9 @@ function dt(t) {
638
919
  toggleFullscreen: l
639
920
  };
640
921
  }
641
- const pt = /* @__PURE__ */ p("div", null, [
642
- /* @__PURE__ */ p("span", null, "视频监控")
643
- ], -1), vt = /* @__PURE__ */ R({
922
+ const At = /* @__PURE__ */ I("div", null, [
923
+ /* @__PURE__ */ I("span", null, "视频监控")
924
+ ], -1), Ht = /* @__PURE__ */ K({
644
925
  __name: "index",
645
926
  props: {
646
927
  visible: { type: Boolean, default: !1 },
@@ -648,59 +929,59 @@ const pt = /* @__PURE__ */ p("div", null, [
648
929
  gridNum: { default: 4 }
649
930
  },
650
931
  emits: ["update:visible"],
651
- setup(t, { emit: o }) {
652
- const e = t, l = o, r = N({
932
+ setup(t, { emit: a }) {
933
+ const e = t, l = a, p = le({
653
934
  get: () => e.visible,
654
- set: (i) => l("update:visible", i)
655
- }), { render: n, toggleFullscreen: s } = dt(e), v = N(() => {
656
- let i = {};
935
+ set: (u) => l("update:visible", u)
936
+ }), { render: i, toggleFullscreen: d } = Vt(e), _ = le(() => {
937
+ let u = {};
657
938
  switch (e.gridNum) {
658
939
  case 1:
659
- i = "one-video";
940
+ u = "one-video";
660
941
  break;
661
942
  case 4:
662
- i = "four-video";
943
+ u = "four-video";
663
944
  break;
664
945
  case 9:
665
- i = "nine-video";
946
+ u = "nine-video";
666
947
  break;
667
948
  }
668
- return i;
949
+ return u;
669
950
  });
670
- return (i, m) => (g(), h(a(ke), {
951
+ return (u, y) => (E(), V($(We), {
671
952
  size: "mini",
672
953
  title: "视频监控",
673
- "custom-class": `das-linakge-video-dialog ${v.value}`,
674
- modelValue: r.value,
675
- "onUpdate:modelValue": m[0] || (m[0] = (c) => r.value = c),
954
+ "custom-class": `das-linakge-video-dialog ${_.value}`,
955
+ modelValue: p.value,
956
+ "onUpdate:modelValue": y[0] || (y[0] = (m) => p.value = m),
676
957
  bodyStyle: { padding: 0 },
677
958
  "close-on-click-modal": !1,
678
959
  "close-on-press-escape": !1,
679
960
  modal: !1,
680
961
  "header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" }
681
962
  }, {
682
- header: f(() => [
683
- pt,
684
- d(a(I), { content: "页面全屏" }, {
685
- default: f(() => [
686
- d(a(_e), {
963
+ header: D(() => [
964
+ At,
965
+ C($(x), { content: "页面全屏" }, {
966
+ default: D(() => [
967
+ C($(Be), {
687
968
  class: "icon",
688
969
  color: "#999",
689
- onClick: a(s)
970
+ onClick: $(d)
690
971
  }, null, 8, ["onClick"])
691
972
  ]),
692
973
  _: 1
693
974
  })
694
975
  ]),
695
- default: f(() => [
696
- r.value ? (g(), h(a(n), { key: 0 })) : b("", !0)
976
+ default: D(() => [
977
+ p.value ? (E(), V($(i), { key: 0 })) : z("", !0)
697
978
  ]),
698
979
  _: 1
699
980
  }, 8, ["custom-class", "modelValue"]));
700
981
  }
701
- }), Et = ye(vt), Ot = () => k(null);
982
+ }), en = Ye(Ht), tn = () => R(null);
702
983
  export {
703
- Et as DasVideoDialog,
704
- Ot as DasVideoDialogRef,
705
- dt as useVideo
984
+ en as DasVideoDialog,
985
+ tn as DasVideoDialogRef,
986
+ Vt as useVideo
706
987
  };