@das-fed/ui 6.4.0-test.52 → 6.4.0-test.54

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.
@@ -1,10 +1,10 @@
1
1
  import '@das-fed/ui/packages/business-components/video-dialog/style.css';
2
- import { getCurrentScope as ce, onScopeDispose as ue, getCurrentInstance as de, onMounted as K, nextTick as P, unref as l, ref as _, watch as F, defineComponent as D, useCssVars as pe, computed as x, createElementBlock as O, openBlock as g, normalizeClass as ve, renderSlot as X, createCommentVNode as I, Fragment as J, renderList as fe, createBlock as N, withCtx as f, withModifiers as y, createVNode as p, createElementVNode as v, toDisplayString as V, toRefs as me } from "vue";
3
- import { withInstall as Ce } from "@das-fed/utils/with-install/index";
4
- import { t as m, setI18nRule as ge } from "@das-fed/web/packages/i18n/index";
5
- import { DasDialog as ke } from "@das-fed/ui/packages/components/dialog/index";
2
+ import { getCurrentScope as ce, onScopeDispose as ue, getCurrentInstance as de, onMounted as K, nextTick as P, unref as l, ref as w, watch as N, defineComponent as D, useCssVars as pe, computed as x, createElementBlock as O, openBlock as k, normalizeClass as ve, renderSlot as X, createCommentVNode as I, Fragment as J, renderList as fe, createBlock as F, withCtx as m, withModifiers as _, createVNode as d, createElementVNode as p, toDisplayString as V, toRefs as me } from "vue";
3
+ import { withInstall as ge } from "@das-fed/utils/with-install/index";
4
+ import { t as g, setI18nRule as Ce } from "@das-fed/web/packages/i18n/index";
5
+ import { DasDialog as ye } from "@das-fed/ui/packages/components/dialog/index";
6
6
  import { DasTooltip as h } from "@das-fed/ui/packages/components/tooltip/index";
7
- import { DasIconFullscreen2 as ye } from "@das-fed/ui/packages/icons/fullscreen-2/index";
7
+ import { DasIconFullscreen2 as ke } from "@das-fed/ui/packages/icons/fullscreen-2/index";
8
8
  import { DasAutoRegisterIcon as _e, DasIcon as L } from "@das-fed/ui/packages/components/icon/index";
9
9
  import { DasLivePlayer as we } from "@das-fed/ui/packages/components/live-player/index";
10
10
  import { DasSpin as he } from "@das-fed/ui/packages/components/spin/index";
@@ -12,13 +12,13 @@ import be from "dayjs";
12
12
  import { createService as ee } from "@das-fed/utils/api-services/src/create-service";
13
13
  import { getProjectInfo as M, getToken as Ie } from "@das-fed/utils/common-info";
14
14
  var A;
15
- const B = typeof window < "u", Ee = (t) => typeof t == "string", Ne = () => {
15
+ const B = typeof window < "u", Ee = (t) => typeof t == "string", Fe = () => {
16
16
  };
17
17
  B && ((A = window == null ? void 0 : window.navigator) != null && A.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
18
18
  function te(t) {
19
19
  return typeof t == "function" ? t() : l(t);
20
20
  }
21
- function Fe(t) {
21
+ function Ne(t) {
22
22
  return t;
23
23
  }
24
24
  function oe(t) {
@@ -36,19 +36,19 @@ const Re = B ? window : void 0, ze = B ? window.document : void 0;
36
36
  function Oe(...t) {
37
37
  let n, e, i, s;
38
38
  if (Ee(t[0]) || Array.isArray(t[0]) ? ([e, i, s] = t, n = Re) : [n, e, i, s] = t, !n)
39
- return Ne;
39
+ return Fe;
40
40
  Array.isArray(e) || (e = [e]), Array.isArray(i) || (i = [i]);
41
41
  const o = [], a = () => {
42
42
  o.forEach((c) => c()), o.length = 0;
43
- }, k = (c, C, w, E) => (c.addEventListener(C, w, E), () => c.removeEventListener(C, w, E)), r = F(() => [ne(n), te(s)], ([c, C]) => {
44
- a(), c && o.push(...e.flatMap((w) => i.map((E) => k(c, w, E, C))));
45
- }, { immediate: !0, flush: "post" }), u = () => {
43
+ }, y = (c, f, C, E) => (c.addEventListener(f, C, E), () => c.removeEventListener(f, C, E)), r = N(() => [ne(n), te(s)], ([c, f]) => {
44
+ a(), c && o.push(...e.flatMap((C) => i.map((E) => y(c, C, E, f))));
45
+ }, { immediate: !0, flush: "post" }), v = () => {
46
46
  r(), a();
47
47
  };
48
- return oe(u), u;
48
+ return oe(v), v;
49
49
  }
50
50
  function De(t, n = !1) {
51
- const e = _(), i = () => e.value = !!t();
51
+ const e = w(), i = () => e.value = !!t();
52
52
  return i(), Se(i, n), e;
53
53
  }
54
54
  const Q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, q = "__vueuse_ssr_handlers__";
@@ -96,9 +96,9 @@ const G = [
96
96
  ]
97
97
  ];
98
98
  function le(t, n = {}) {
99
- const { document: e = ze, autoExit: i = !1 } = n, s = t || (e == null ? void 0 : e.querySelector("html")), o = _(!1);
99
+ const { document: e = ze, autoExit: i = !1 } = n, s = t || (e == null ? void 0 : e.querySelector("html")), o = w(!1);
100
100
  let a = G[0];
101
- const k = De(() => {
101
+ const y = De(() => {
102
102
  if (e) {
103
103
  for (const S of G)
104
104
  if (S[1] in e)
@@ -106,27 +106,27 @@ function le(t, n = {}) {
106
106
  } else
107
107
  return !1;
108
108
  return !1;
109
- }), [r, u, c, , C] = a;
110
- async function w() {
111
- k.value && (e != null && e[c] && await e[u](), o.value = !1);
109
+ }), [r, v, c, , f] = a;
110
+ async function C() {
111
+ y.value && (e != null && e[c] && await e[v](), o.value = !1);
112
112
  }
113
113
  async function E() {
114
- if (!k.value)
114
+ if (!y.value)
115
115
  return;
116
- await w();
116
+ await C();
117
117
  const S = ne(s);
118
118
  S && (await S[r](), o.value = !0);
119
119
  }
120
120
  async function $() {
121
- o.value ? await w() : await E();
121
+ o.value ? await C() : await E();
122
122
  }
123
- return e && Oe(e, C, () => {
123
+ return e && Oe(e, f, () => {
124
124
  o.value = !!(e != null && e[c]);
125
- }, !1), i && oe(w), {
126
- isSupported: k,
125
+ }, !1), i && oe(C), {
126
+ isSupported: y,
127
127
  isFullscreen: o,
128
128
  enter: E,
129
- exit: w,
129
+ exit: C,
130
130
  toggle: $
131
131
  };
132
132
  }
@@ -142,7 +142,7 @@ var $e = Object.defineProperty, H = Object.getOwnPropertySymbols, Le = Object.pr
142
142
  Pe.call(n, e) && Y(t, e, n[e]);
143
143
  return t;
144
144
  };
145
- const Te = {
145
+ const Ue = {
146
146
  easeInSine: [0.12, 0, 0.39, 0],
147
147
  easeOutSine: [0.61, 1, 0.88, 1],
148
148
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -169,9 +169,9 @@ const Te = {
169
169
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
170
170
  };
171
171
  xe({
172
- linear: Fe
173
- }, Te);
174
- const Ue = /* @__PURE__ */ D({
172
+ linear: Ne
173
+ }, Ue);
174
+ const Te = /* @__PURE__ */ D({
175
175
  __name: "GridItem",
176
176
  props: {
177
177
  active: { type: Boolean },
@@ -180,23 +180,23 @@ const Ue = /* @__PURE__ */ D({
180
180
  emits: ["itemClick"],
181
181
  setup(t, { emit: n }) {
182
182
  pe((c) => ({
183
- "9b3a2c32": u.value
183
+ "9b3a2c32": v.value
184
184
  }));
185
- const e = t, i = n, s = _(), { toggle: o, isFullscreen: a } = le(s), k = () => {
185
+ const e = t, i = n, s = w(), { toggle: o, isFullscreen: a } = le(s), y = () => {
186
186
  s.value != document.fullscreenElement && (a.value ? (a.value = !1, P(() => {
187
187
  o();
188
188
  })) : o());
189
189
  }, r = () => {
190
190
  i("itemClick");
191
- }, u = x(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
192
- return (c, C) => (g(), O(
191
+ }, v = x(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
192
+ return (c, f) => (k(), O(
193
193
  "div",
194
194
  {
195
195
  ref_key: "containerRef",
196
196
  ref: s,
197
197
  class: ve(["wrapper", { "is-active": e.active }]),
198
- onDblclick: C[0] || (C[0] = (w) => k()),
199
- onClick: C[1] || (C[1] = (w) => r())
198
+ onDblclick: f[0] || (f[0] = (C) => y()),
199
+ onClick: f[1] || (f[1] = (C) => r())
200
200
  },
201
201
  [
202
202
  X(c.$slots, "default", {}, void 0, !0)
@@ -205,12 +205,12 @@ const Ue = /* @__PURE__ */ D({
205
205
  /* CLASS, NEED_HYDRATION */
206
206
  ));
207
207
  }
208
- }), T = (t, n) => {
208
+ }), U = (t, n) => {
209
209
  const e = t.__vccOpts || t;
210
210
  for (const [i, s] of n)
211
211
  e[i] = s;
212
212
  return e;
213
- }, Ve = /* @__PURE__ */ T(Ue, [["__scopeId", "data-v-100b67ca"]]), Be = { class: "layout-wrapper" }, je = /* @__PURE__ */ D({
213
+ }, Ve = /* @__PURE__ */ U(Te, [["__scopeId", "data-v-100b67ca"]]), Be = { class: "layout-wrapper" }, je = /* @__PURE__ */ D({
214
214
  __name: "GridLayout",
215
215
  props: {
216
216
  gridNum: {},
@@ -222,17 +222,17 @@ const Ue = /* @__PURE__ */ D({
222
222
  const e = t, i = n, s = (o) => {
223
223
  i("update:activeIndex", o);
224
224
  };
225
- return (o, a) => (g(), O("div", Be, [
225
+ return (o, a) => (k(), O("div", Be, [
226
226
  I(' :active="index === activeIndex" '),
227
- (g(!0), O(
227
+ (k(!0), O(
228
228
  J,
229
229
  null,
230
- fe(e.gridNum, (k, r) => (g(), N(Ve, {
230
+ fe(e.gridNum, (y, r) => (k(), F(Ve, {
231
231
  active: !1,
232
232
  "grid-num": e.gridNum,
233
- onItemClick: (u) => s(r)
233
+ onItemClick: (v) => s(r)
234
234
  }, {
235
- default: f(() => [
235
+ default: m(() => [
236
236
  o.showFn(r) ? X(o.$slots, "default", {
237
237
  key: 0,
238
238
  index: r
@@ -246,123 +246,123 @@ const Ue = /* @__PURE__ */ D({
246
246
  ))
247
247
  ]));
248
248
  }
249
- }), Me = /* @__PURE__ */ T(je, [["__scopeId", "data-v-661e2289"]]), Ae = /* @__PURE__ */ D({
249
+ }), Me = /* @__PURE__ */ U(je, [["__scopeId", "data-v-661e2289"]]), Ae = /* @__PURE__ */ D({
250
250
  __name: "DirectionControl",
251
251
  emits: ["change"],
252
252
  setup(t, { emit: n }) {
253
253
  const e = n, i = (s) => {
254
254
  e("change", s);
255
255
  };
256
- return (s, o) => (g(), O(
256
+ return (s, o) => (k(), O(
257
257
  "div",
258
258
  {
259
259
  class: "direction-control",
260
- onDblclick: o[9] || (o[9] = y((a) => a.stopPropagation(), ["stop"]))
260
+ onDblclick: o[9] || (o[9] = _((a) => a.stopPropagation(), ["stop"]))
261
261
  },
262
262
  [
263
- p(l(h), {
264
- content: l(m)("左上")
263
+ d(l(h), {
264
+ content: l(g)("左上")
265
265
  }, {
266
- default: f(() => [
267
- v("div", {
266
+ default: m(() => [
267
+ p("div", {
268
268
  class: "icon icon-top-left",
269
- onClick: o[0] || (o[0] = y((a) => i("leftUp"), ["stop"]))
269
+ onClick: o[0] || (o[0] = _((a) => i("leftUp"), ["stop"]))
270
270
  })
271
271
  ]),
272
272
  _: 1
273
273
  /* STABLE */
274
274
  }, 8, ["content"]),
275
- p(l(h), {
276
- content: l(m)("上")
275
+ d(l(h), {
276
+ content: l(g)("上")
277
277
  }, {
278
- default: f(() => [
279
- v("div", {
278
+ default: m(() => [
279
+ p("div", {
280
280
  class: "icon icon-top",
281
- onClick: o[1] || (o[1] = y((a) => i("up"), ["stop"]))
281
+ onClick: o[1] || (o[1] = _((a) => i("up"), ["stop"]))
282
282
  })
283
283
  ]),
284
284
  _: 1
285
285
  /* STABLE */
286
286
  }, 8, ["content"]),
287
- p(l(h), {
288
- content: l(m)("右上")
287
+ d(l(h), {
288
+ content: l(g)("右上")
289
289
  }, {
290
- default: f(() => [
291
- v("div", {
290
+ default: m(() => [
291
+ p("div", {
292
292
  class: "icon icon-top-right",
293
- onClick: o[2] || (o[2] = y((a) => i("rightUp"), ["stop"]))
293
+ onClick: o[2] || (o[2] = _((a) => i("rightUp"), ["stop"]))
294
294
  })
295
295
  ]),
296
296
  _: 1
297
297
  /* STABLE */
298
298
  }, 8, ["content"]),
299
- p(l(h), {
300
- content: l(m)("左")
299
+ d(l(h), {
300
+ content: l(g)("左")
301
301
  }, {
302
- default: f(() => [
303
- v("div", {
302
+ default: m(() => [
303
+ p("div", {
304
304
  class: "icon icon-left",
305
- onClick: o[3] || (o[3] = y((a) => i("left"), ["stop"]))
305
+ onClick: o[3] || (o[3] = _((a) => i("left"), ["stop"]))
306
306
  })
307
307
  ]),
308
308
  _: 1
309
309
  /* STABLE */
310
310
  }, 8, ["content"]),
311
- p(l(h), {
312
- content: l(m)("自动")
311
+ d(l(h), {
312
+ content: l(g)("自动")
313
313
  }, {
314
- default: f(() => [
315
- v("div", {
314
+ default: m(() => [
315
+ p("div", {
316
316
  class: "icon icon-auto",
317
- onClick: o[4] || (o[4] = y((a) => i("auto"), ["stop"]))
317
+ onClick: o[4] || (o[4] = _((a) => i("auto"), ["stop"]))
318
318
  })
319
319
  ]),
320
320
  _: 1
321
321
  /* STABLE */
322
322
  }, 8, ["content"]),
323
- p(l(h), {
324
- content: l(m)("右")
323
+ d(l(h), {
324
+ content: l(g)("右")
325
325
  }, {
326
- default: f(() => [
327
- v("div", {
326
+ default: m(() => [
327
+ p("div", {
328
328
  class: "icon icon-right",
329
- onClick: o[5] || (o[5] = y((a) => i("right"), ["stop"]))
329
+ onClick: o[5] || (o[5] = _((a) => i("right"), ["stop"]))
330
330
  })
331
331
  ]),
332
332
  _: 1
333
333
  /* STABLE */
334
334
  }, 8, ["content"]),
335
- p(l(h), {
336
- content: l(m)("左下")
335
+ d(l(h), {
336
+ content: l(g)("左下")
337
337
  }, {
338
- default: f(() => [
339
- v("div", {
338
+ default: m(() => [
339
+ p("div", {
340
340
  class: "icon icon-bottom-left",
341
- onClick: o[6] || (o[6] = y((a) => i("leftDown"), ["stop"]))
341
+ onClick: o[6] || (o[6] = _((a) => i("leftDown"), ["stop"]))
342
342
  })
343
343
  ]),
344
344
  _: 1
345
345
  /* STABLE */
346
346
  }, 8, ["content"]),
347
- p(l(h), {
348
- content: l(m)("下")
347
+ d(l(h), {
348
+ content: l(g)("下")
349
349
  }, {
350
- default: f(() => [
351
- v("div", {
350
+ default: m(() => [
351
+ p("div", {
352
352
  class: "icon icon-bottom",
353
- onClick: o[7] || (o[7] = y((a) => i("down"), ["stop"]))
353
+ onClick: o[7] || (o[7] = _((a) => i("down"), ["stop"]))
354
354
  })
355
355
  ]),
356
356
  _: 1
357
357
  /* STABLE */
358
358
  }, 8, ["content"]),
359
- p(l(h), {
360
- content: l(m)("右下")
359
+ d(l(h), {
360
+ content: l(g)("右下")
361
361
  }, {
362
- default: f(() => [
363
- v("div", {
362
+ default: m(() => [
363
+ p("div", {
364
364
  class: "icon icon-bottom-right",
365
- onClick: o[8] || (o[8] = y((a) => i("rightDown"), ["stop"]))
365
+ onClick: o[8] || (o[8] = _((a) => i("rightDown"), ["stop"]))
366
366
  })
367
367
  ]),
368
368
  _: 1
@@ -373,7 +373,7 @@ const Ue = /* @__PURE__ */ D({
373
373
  /* NEED_HYDRATION */
374
374
  ));
375
375
  }
376
- }), Qe = /* @__PURE__ */ T(Ae, [["__scopeId", "data-v-db2e8ec2"]]), qe = { class: "video-wrapper" }, Ge = { class: "video-top" }, We = { class: "video-top_l" }, He = { class: "video-title-wrapper" }, Ye = { class: "video-title" }, Ze = { class: "video-top_r" }, Ke = {
376
+ }), Qe = /* @__PURE__ */ U(Ae, [["__scopeId", "data-v-db2e8ec2"]]), qe = { class: "video-wrapper" }, Ge = { class: "video-top" }, We = { class: "video-top_l" }, He = { class: "video-title-wrapper" }, Ye = { class: "video-title" }, Ze = { class: "video-top_r" }, Ke = {
377
377
  key: 0,
378
378
  class: "play-status"
379
379
  }, Xe = { class: "video-bottom" }, Je = { class: "video-bottom_r" }, et = /* @__PURE__ */ D({
@@ -399,55 +399,55 @@ const Ue = /* @__PURE__ */ D({
399
399
  enlarge: import("@das-fed/ui/packages/icons/enlarge"),
400
400
  "direction-control": import("@das-fed/ui/packages/icons/direction-control")
401
401
  });
402
- const s = _(!0), o = _(), a = _(!1), k = _(), r = x(() => {
403
- var d;
404
- return (d = k.value) == null ? void 0 : d.video;
405
- }), u = _(!1), c = _(!0), C = (d) => {
406
- o.value = d, o.value.on(window.mpegts.Events.ERROR, (b) => {
402
+ const s = w(!0), o = w(), a = w(!1), y = w(), r = x(() => {
403
+ var u;
404
+ return (u = y.value) == null ? void 0 : u.video;
405
+ }), v = w(!1), c = w(!0), f = (u) => {
406
+ o.value = u, o.value.on(window.mpegts.Events.ERROR, (b) => {
407
407
  });
408
- }, w = () => {
408
+ }, C = () => {
409
409
  s.value = !s.value, o.value && (o.value.muted = s.value);
410
410
  }, E = () => {
411
411
  a.value = !a.value;
412
- }, $ = _(""), S = () => {
413
- const d = document.createElement("canvas");
412
+ }, $ = w(""), S = () => {
413
+ const u = document.createElement("canvas");
414
414
  if (r.value) {
415
- d.width = r.value.clientWidth, d.height = r.value.clientHeight;
416
- const b = d.getContext("2d");
417
- b == null || b.drawImage(r.value, 0, 0, d.width, d.height);
418
- const z = d.toDataURL("image/jpg"), ae = `【${e.title}】${be().format("YYYYMMDDHHmmss").toString()}.jpg`;
415
+ u.width = r.value.clientWidth, u.height = r.value.clientHeight;
416
+ const b = u.getContext("2d");
417
+ b == null || b.drawImage(r.value, 0, 0, u.width, u.height);
418
+ const z = u.toDataURL("image/jpg"), ae = `【${e.title}】${be().format("YYYYMMDDHHmmss").toString()}.jpg`;
419
419
  if ($.value = z, "download" in document.createElement("a")) {
420
420
  const R = document.createElement("a");
421
- R.download = ae, R.style.display = "none", R.href = z, document.body.appendChild(R), document.body.appendChild(d), R.click(), URL.revokeObjectURL(R.href), document.body.removeChild(R), document.body.removeChild(d);
421
+ R.download = ae, R.style.display = "none", R.href = z, document.body.appendChild(R), document.body.appendChild(u), R.click(), URL.revokeObjectURL(R.href), document.body.removeChild(R), document.body.removeChild(u);
422
422
  }
423
423
  }
424
- }, se = (d) => {
425
- i("directionControl", d);
426
- }, j = (d) => {
427
- i("zoomControl", d);
428
- }, U = (d) => e.authType.includes(d);
429
- return F(
424
+ }, se = (u) => {
425
+ i("directionControl", u);
426
+ }, j = (u) => {
427
+ i("zoomControl", u);
428
+ }, T = (u) => e.authType.includes(u);
429
+ return N(
430
430
  () => r.value,
431
431
  () => {
432
432
  r.value && r.value.addEventListener("ended", () => {
433
- u.value = !0, e.type === "playback" && (c.value = !1);
433
+ v.value = !0, e.type === "playback" && (c.value = !1);
434
434
  });
435
435
  }
436
- ), F(
436
+ ), N(
437
437
  () => r.value,
438
438
  () => {
439
439
  r.value && P(() => {
440
440
  r.value.playbackRate = e.playbackRate || 1;
441
441
  });
442
442
  }
443
- ), F(
443
+ ), N(
444
444
  () => o.value,
445
445
  () => {
446
446
  o.value && P(() => {
447
447
  o.value.muted = s.value;
448
448
  });
449
449
  }
450
- ), F(
450
+ ), N(
451
451
  () => e.playbackRate,
452
452
  () => {
453
453
  r.value && (r.value.playbackRate = e.playbackRate || 1);
@@ -455,29 +455,29 @@ const Ue = /* @__PURE__ */ D({
455
455
  {
456
456
  immediate: !0
457
457
  }
458
- ), F(
458
+ ), N(
459
459
  () => e.paused,
460
460
  () => {
461
461
  o.value && (e.paused ? o.value.pause() : o.value.play());
462
462
  }
463
- ), F(
463
+ ), N(
464
464
  () => e.videoUrl,
465
465
  () => {
466
466
  c.value = !1, P(() => {
467
467
  c.value = !0;
468
468
  });
469
469
  }
470
- ), (d, b) => (g(), O("div", qe, [
471
- p(l(he), {
470
+ ), (u, b) => (k(), O("div", qe, [
471
+ d(l(he), {
472
472
  spinning: e.loading,
473
473
  type: "component",
474
- tip: l(m)("加载中...")
474
+ tip: l(g)("加载中...")
475
475
  }, {
476
- default: f(() => [
477
- v("div", Ge, [
478
- v("div", We, [
479
- v("div", He, [
480
- v(
476
+ default: m(() => [
477
+ p("div", Ge, [
478
+ p("div", We, [
479
+ p("div", He, [
480
+ p(
481
481
  "div",
482
482
  Ye,
483
483
  V(e.title.length > 20 ? e.title.slice(0, 19) + "..." : e.title),
@@ -486,108 +486,108 @@ const Ue = /* @__PURE__ */ D({
486
486
  )
487
487
  ])
488
488
  ]),
489
- v("div", Ze, [
490
- ["live"].includes(d.type) ? (g(), O(
489
+ p("div", Ze, [
490
+ ["live"].includes(u.type) ? (k(), O(
491
491
  "span",
492
492
  Ke,
493
- V(l(m)("正在实时预览")),
493
+ V(l(g)("正在实时预览")),
494
494
  1
495
495
  /* TEXT */
496
496
  )) : I("v-if", !0),
497
497
  I(' <das-icon v-if="isFullscreen" class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
498
498
  ])
499
499
  ]),
500
- e.videoUrl && c.value ? (g(), N(l(we), {
500
+ e.videoUrl && c.value ? (k(), F(l(we), {
501
501
  key: 0,
502
502
  type: "flv",
503
503
  ref_key: "dasLivePlayerRef",
504
- ref: k,
504
+ ref: y,
505
505
  muted: s.value,
506
- onLoaded: C,
506
+ onLoaded: f,
507
507
  src: e.videoUrl
508
508
  }, null, 8, ["muted", "src"])) : I("v-if", !0),
509
- v("div", Xe, [
510
- b[3] || (b[3] = v(
509
+ p("div", Xe, [
510
+ b[3] || (b[3] = p(
511
511
  "div",
512
512
  { class: "video-bottom_l" },
513
513
  null,
514
514
  -1
515
515
  /* HOISTED */
516
516
  )),
517
- v("div", Je, [
518
- v(
517
+ p("div", Je, [
518
+ p(
519
519
  "div",
520
520
  {
521
521
  class: "controls",
522
- onDblclick: b[2] || (b[2] = y((z) => z.stopPropagation(), ["stop"]))
522
+ onDblclick: b[2] || (b[2] = _((z) => z.stopPropagation(), ["stop"]))
523
523
  },
524
524
  [
525
- p(l(h), {
526
- content: l(m)("声音")
525
+ d(l(h), {
526
+ content: l(g)("声音")
527
527
  }, {
528
- default: f(() => [
529
- p(l(L), {
528
+ default: m(() => [
529
+ d(l(L), {
530
530
  class: "icon icon-volume",
531
531
  icon: s.value ? "muted" : "volume",
532
- onClick: y(w, ["stop"])
532
+ onClick: _(C, ["stop"])
533
533
  }, null, 8, ["icon"])
534
534
  ]),
535
535
  _: 1
536
536
  /* STABLE */
537
537
  }, 8, ["content"]),
538
- p(l(h), {
539
- content: l(m)("截图")
538
+ d(l(h), {
539
+ content: l(g)("截图")
540
540
  }, {
541
- default: f(() => [
542
- p(l(L), {
541
+ default: m(() => [
542
+ d(l(L), {
543
543
  class: "icon icon-screenshot",
544
544
  icon: "screenshot",
545
- onClick: y(S, ["stop"])
545
+ onClick: _(S, ["stop"])
546
546
  })
547
547
  ]),
548
548
  _: 1
549
549
  /* STABLE */
550
550
  }, 8, ["content"]),
551
- U("control") ? (g(), N(l(h), {
551
+ T("control") ? (k(), F(l(h), {
552
552
  key: 0,
553
- content: l(m)("聚焦-")
553
+ content: l(g)("聚焦-")
554
554
  }, {
555
- default: f(() => [
556
- ["live", "polling"].includes(e.type) ? (g(), N(l(L), {
555
+ default: m(() => [
556
+ ["live", "polling"].includes(e.type) ? (k(), F(l(L), {
557
557
  key: 0,
558
558
  class: "icon icon-shrink",
559
559
  icon: "shrink",
560
- onClick: b[0] || (b[0] = y((z) => j("zoomOut"), ["stop"]))
560
+ onClick: b[0] || (b[0] = _((z) => j("zoomOut"), ["stop"]))
561
561
  })) : I("v-if", !0)
562
562
  ]),
563
563
  _: 1
564
564
  /* STABLE */
565
565
  }, 8, ["content"])) : I("v-if", !0),
566
- U("control") ? (g(), N(l(h), {
566
+ T("control") ? (k(), F(l(h), {
567
567
  key: 1,
568
- content: l(m)("聚焦+")
568
+ content: l(g)("聚焦+")
569
569
  }, {
570
- default: f(() => [
571
- ["live", "polling"].includes(e.type) ? (g(), N(l(L), {
570
+ default: m(() => [
571
+ ["live", "polling"].includes(e.type) ? (k(), F(l(L), {
572
572
  key: 0,
573
573
  class: "icon icon-enlarge",
574
574
  icon: "enlarge",
575
- onClick: b[1] || (b[1] = y((z) => j("zoomIn"), ["stop"]))
575
+ onClick: b[1] || (b[1] = _((z) => j("zoomIn"), ["stop"]))
576
576
  })) : I("v-if", !0)
577
577
  ]),
578
578
  _: 1
579
579
  /* STABLE */
580
580
  }, 8, ["content"])) : I("v-if", !0),
581
- U("control") ? (g(), N(l(h), {
581
+ T("control") ? (k(), F(l(h), {
582
582
  key: 2,
583
- content: l(m)("方向控制")
583
+ content: l(g)("方向控制")
584
584
  }, {
585
- default: f(() => [
586
- ["live", "polling"].includes(e.type) ? (g(), N(l(L), {
585
+ default: m(() => [
586
+ ["live", "polling"].includes(e.type) ? (k(), F(l(L), {
587
587
  key: 0,
588
588
  class: "icon icon-direction-control",
589
589
  icon: "direction-control",
590
- onClick: y(E, ["stop"])
590
+ onClick: _(E, ["stop"])
591
591
  })) : I("v-if", !0)
592
592
  ]),
593
593
  _: 1
@@ -599,7 +599,7 @@ const Ue = /* @__PURE__ */ D({
599
599
  )
600
600
  ])
601
601
  ]),
602
- a.value ? (g(), N(Qe, {
602
+ a.value ? (k(), F(Qe, {
603
603
  key: 1,
604
604
  onChange: se
605
605
  })) : I("v-if", !0)
@@ -609,7 +609,7 @@ const Ue = /* @__PURE__ */ D({
609
609
  }, 8, ["spinning", "tip"])
610
610
  ]));
611
611
  }
612
- }), tt = /* @__PURE__ */ T(et, [["__scopeId", "data-v-9cfa053b"]]), ot = "/api/device-relation/deviceproject/v1/project/device/video", nt = "v1", lt = ee(`/api/enterpriseright/permission/${nt}`), ie = ee(`${ot}`, it);
612
+ }), tt = /* @__PURE__ */ U(et, [["__scopeId", "data-v-9cfa053b"]]), ot = "/api/device-relation/deviceproject/v1/project/device/video", nt = "v1", lt = ee(`/api/enterpriseright/permission/${nt}`), ie = ee(`${ot}`, it);
613
613
  function it(t) {
614
614
  const n = M() ? M().id : 1;
615
615
  return t.params || (t.params = {}), t.params.project = n, t.params.projectId = n, t;
@@ -631,7 +631,7 @@ const st = (t) => {
631
631
  const n = Ie();
632
632
  return `${t}?token=${n}`;
633
633
  };
634
- _([]);
634
+ w([]);
635
635
  const at = /* @__PURE__ */ D({
636
636
  props: {
637
637
  deviceInfo: {
@@ -640,6 +640,10 @@ const at = /* @__PURE__ */ D({
640
640
  },
641
641
  source: {
642
642
  type: String
643
+ },
644
+ streamUrlField: {
645
+ type: String,
646
+ default: "wsFlvStreamURL"
643
647
  }
644
648
  },
645
649
  setup(t, {
@@ -647,58 +651,59 @@ const at = /* @__PURE__ */ D({
647
651
  }) {
648
652
  const {
649
653
  deviceInfo: e,
650
- source: i
651
- } = me(t), s = _(!1), o = _(""), a = async () => {
654
+ source: i,
655
+ streamUrlField: s
656
+ } = me(t), o = w(!1), a = w(""), y = async () => {
652
657
  var C;
653
658
  if (!((C = e.value) != null && C.deviceId)) return;
654
- s.value = !0;
655
- const [u, c] = await rt({
659
+ o.value = !0;
660
+ const [c, f] = await rt({
656
661
  productId: e.value.productId,
657
662
  deviceId: e.value.deviceId,
658
663
  source: i.value
659
664
  });
660
- u || (o.value = st(c == null ? void 0 : c.wsFlvStreamURL)), s.value = !1;
661
- }, k = (u) => {
665
+ c || (a.value = st(f == null ? void 0 : f[s.value])), o.value = !1;
666
+ }, r = (c) => {
662
667
  Z({
663
668
  productId: e.value.productId,
664
669
  deviceId: e.value.deviceId,
665
- direction: u,
670
+ direction: c,
666
671
  zoom: "",
667
672
  source: i.value || "web"
668
673
  });
669
- }, r = (u) => {
674
+ }, v = (c) => {
670
675
  Z({
671
676
  productId: e.value.productId,
672
677
  deviceId: e.value.deviceId,
673
678
  direction: "",
674
- zoom: u,
679
+ zoom: c,
675
680
  source: i.value || "web"
676
681
  });
677
682
  };
678
683
  return K(() => {
679
- a();
680
- }), F(() => e.value, () => {
681
- a();
684
+ y();
685
+ }), N(() => e.value, () => {
686
+ y();
682
687
  }, {
683
688
  deep: !0
684
- }), () => p(J, null, [n.default({
685
- videoUrl: o.value,
686
- loading: s.value,
687
- onDirectionControl: k,
688
- onZoomControl: r
689
+ }), () => d(J, null, [n.default({
690
+ videoUrl: a.value,
691
+ loading: o.value,
692
+ onDirectionControl: r,
693
+ onZoomControl: v
689
694
  })]);
690
695
  }
691
696
  });
692
697
  function ct(t) {
693
- const n = _(0), e = _(), {
698
+ const n = w(0), e = w(), {
694
699
  toggle: i,
695
700
  isFullscreen: s,
696
701
  exit: o
697
- } = le(e), a = (r, u) => {
702
+ } = le(e), a = (r, v) => {
698
703
  s.value && o();
699
704
  };
700
705
  return {
701
- render: () => p(Me, {
706
+ render: () => d(Me, {
702
707
  ref: e,
703
708
  gridNum: t.gridNum,
704
709
  activeIndex: n.value,
@@ -708,26 +713,26 @@ function ct(t) {
708
713
  default: ({
709
714
  index: r
710
715
  }) => {
711
- const u = t.deviceList[r], c = t.source;
712
- return p(at, {
713
- deviceInfo: u,
716
+ const v = t.deviceList[r], c = t.source;
717
+ return d(at, {
718
+ deviceInfo: v,
714
719
  source: c
715
720
  }, {
716
721
  default: ({
717
- videoUrl: C,
718
- onDirectionControl: w,
722
+ videoUrl: f,
723
+ onDirectionControl: C,
719
724
  onZoomControl: E,
720
725
  loading: $
721
- }) => p(tt, {
726
+ }) => d(tt, {
722
727
  type: "live",
723
728
  loading: $,
724
729
  isFullscreen: s.value,
725
- videoUrl: C,
726
- title: u.deviceName,
730
+ videoUrl: f,
731
+ title: v.deviceName,
727
732
  onClose: () => a(),
728
- onDirectionControl: w,
733
+ onDirectionControl: C,
729
734
  onZoomControl: E,
730
- authType: u.authType === 2 ? ["control"] : []
735
+ authType: v.authType === 2 ? ["control"] : []
731
736
  }, null)
732
737
  });
733
738
  }
@@ -741,14 +746,15 @@ const ut = /* @__PURE__ */ D({
741
746
  visible: { type: Boolean, default: !1 },
742
747
  deviceList: { default: () => [] },
743
748
  gridNum: { default: 4 },
744
- source: {}
749
+ source: {},
750
+ streamUrlField: {}
745
751
  },
746
752
  emits: ["update:visible"],
747
753
  setup(t, { emit: n }) {
748
754
  const e = t, i = n, s = x({
749
755
  get: () => e.visible,
750
756
  set: (r) => i("update:visible", r)
751
- }), { render: o, toggleFullscreen: a } = ct(e), k = x(() => {
757
+ }), { render: o, toggleFullscreen: a } = ct(e), y = x(() => {
752
758
  let r = {};
753
759
  switch (e.gridNum) {
754
760
  case 1:
@@ -763,33 +769,33 @@ const ut = /* @__PURE__ */ D({
763
769
  }
764
770
  return r;
765
771
  });
766
- return (r, u) => (g(), N(l(ke), {
772
+ return (r, v) => (k(), F(l(ye), {
767
773
  size: "mini",
768
- title: l(m)("视频监控"),
769
- "custom-class": `das-linakge-video-dialog ${k.value}`,
774
+ title: l(g)("视频监控"),
775
+ "custom-class": `das-linakge-video-dialog ${y.value}`,
770
776
  modelValue: s.value,
771
- "onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
777
+ "onUpdate:modelValue": v[0] || (v[0] = (c) => s.value = c),
772
778
  bodyStyle: { padding: 0 },
773
779
  "close-on-click-modal": !1,
774
780
  "close-on-press-escape": !1,
775
781
  modal: !1,
776
782
  "header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" }
777
783
  }, {
778
- header: f(() => [
779
- v("div", null, [
780
- v(
784
+ header: m(() => [
785
+ p("div", null, [
786
+ p(
781
787
  "span",
782
788
  null,
783
- V(l(m)("视频监控")),
789
+ V(l(g)("视频监控")),
784
790
  1
785
791
  /* TEXT */
786
792
  )
787
793
  ]),
788
- p(l(h), {
789
- content: l(m)("页面全屏")
794
+ d(l(h), {
795
+ content: l(g)("页面全屏")
790
796
  }, {
791
- default: f(() => [
792
- p(l(ye), {
797
+ default: m(() => [
798
+ d(l(ke), {
793
799
  class: "icon",
794
800
  color: "#999",
795
801
  onClick: l(a)
@@ -799,8 +805,8 @@ const ut = /* @__PURE__ */ D({
799
805
  /* STABLE */
800
806
  }, 8, ["content"])
801
807
  ]),
802
- default: f(() => [
803
- s.value ? (g(), N(l(o), { key: 0 })) : I("v-if", !0)
808
+ default: m(() => [
809
+ s.value ? (k(), F(l(o), { key: 0 })) : I("v-if", !0)
804
810
  ]),
805
811
  _: 1
806
812
  /* STABLE */
@@ -828,8 +834,8 @@ const ut = /* @__PURE__ */ D({
828
834
  "聚焦-": { "zh-CN": "聚焦-", en: "Focus-", _appCode: "framework" },
829
835
  "聚焦+": { "zh-CN": "聚焦+", en: "Focus+", _appCode: "framework" }
830
836
  };
831
- ge(dt);
832
- const It = Ce(ut), Et = () => _(null);
837
+ Ce(dt);
838
+ const It = ge(ut), Et = () => w(null);
833
839
  export {
834
840
  It as DasVideoDialog,
835
841
  Et as DasVideoDialogRef,