import '@das-fed/upf-ui/packages/business-components/video-dialog/style.css';
import { getCurrentScope as ce, onScopeDispose as ue, unref as l, getCurrentInstance as de, onMounted as K, nextTick as L, ref as k, watch as N, defineComponent as D, useCssVars as pe, computed as x, openBlock as h, createElementBlock as R, normalizeClass as fe, renderSlot as X, createCommentVNode as I, Fragment as J, renderList as ve, createBlock as O, withCtx as v, withModifiers as y, createVNode as p, createElementVNode as f, toDisplayString as U, toRefs as me } from "vue";
import { withInstall as Ce } from "@das-fed/upf-utils/with-install/index";
import { t as m, setI18nRule as ge } from "@das-fed/upf-web/packages/i18n/index";
import { DasDialog as he } from "@das-fed/upf-ui/packages/components/dialog/index";
import { DasTooltip as w } from "@das-fed/upf-ui/packages/components/tooltip/index";
import { DasIconFullscreen2 as ye } from "@das-fed/upf-ui/packages/icons/fullscreen-2/index";
import { DasAutoRegisterIcon as ke, DasIcon as $ } from "@das-fed/upf-ui/packages/components/icon/index";
import { DasLivePlayer as _e } from "@das-fed/upf-ui/packages/components/live-player/index";
import { DasSpin as we } from "@das-fed/upf-ui/packages/components/spin/index";
import be from "dayjs";
import { createService as ee } from "@das-fed/upf-utils/api-services/src/create-service";
import { getProjectInfo as j, getToken as Ie } from "@das-fed/upf-utils/common-info";
var A;
const V = typeof window < "u", ze = (t) => typeof t == "string", Oe = () => {
};
V && ((A = window == null ? void 0 : window.navigator) != null && A.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function te(t) {
  return typeof t == "function" ? t() : l(t);
}
function Ee(t) {
  return t;
}
function ne(t) {
  return ce() ? (ue(t), !0) : !1;
}
function Ne(t, o = !0) {
  de() ? K(t) : o ? t() : L(t);
}
function oe(t) {
  var o;
  const e = te(t);
  return (o = e == null ? void 0 : e.$el) != null ? o : e;
}
const Fe = V ? window : void 0, Se = V ? window.document : void 0;
function Re(...t) {
  let o, e, i, r;
  if (ze(t[0]) || Array.isArray(t[0]) ? ([e, i, r] = t, o = Fe) : [o, e, i, r] = t, !o)
    return Oe;
  Array.isArray(e) || (e = [e]), Array.isArray(i) || (i = [i]);
  const n = [], a = () => {
    n.forEach((c) => c()), n.length = 0;
  }, g = (c, C, _, z) => (c.addEventListener(C, _, z), () => c.removeEventListener(C, _, z)), s = N(() => [oe(o), te(r)], ([c, C]) => {
    a(), c && n.push(...e.flatMap((_) => i.map((z) => g(c, _, z, C))));
  }, { immediate: !0, flush: "post" }), u = () => {
    s(), a();
  };
  return ne(u), u;
}
function De(t, o = !1) {
  const e = k(), i = () => e.value = !!t();
  return i(), Ne(i, o), e;
}
const Q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, q = "__vueuse_ssr_handlers__";
Q[q] = Q[q] || {};
const G = [
  [
    "requestFullscreen",
    "exitFullscreen",
    "fullscreenElement",
    "fullscreenEnabled",
    "fullscreenchange",
    "fullscreenerror"
  ],
  [
    "webkitRequestFullscreen",
    "webkitExitFullscreen",
    "webkitFullscreenElement",
    "webkitFullscreenEnabled",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  [
    "webkitRequestFullScreen",
    "webkitCancelFullScreen",
    "webkitCurrentFullScreenElement",
    "webkitCancelFullScreen",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  [
    "mozRequestFullScreen",
    "mozCancelFullScreen",
    "mozFullScreenElement",
    "mozFullScreenEnabled",
    "mozfullscreenchange",
    "mozfullscreenerror"
  ],
  [
    "msRequestFullscreen",
    "msExitFullscreen",
    "msFullscreenElement",
    "msFullscreenEnabled",
    "MSFullscreenChange",
    "MSFullscreenError"
  ]
];
function le(t, o = {}) {
  const { document: e = Se, autoExit: i = !1 } = o, r = t || (e == null ? void 0 : e.querySelector("html")), n = k(!1);
  let a = G[0];
  const g = De(() => {
    if (e) {
      for (const E of G)
        if (E[1] in e)
          return a = E, !0;
    } else
      return !1;
    return !1;
  }), [s, u, c, , C] = a;
  async function _() {
    g.value && (e != null && e[c] && await e[u](), n.value = !1);
  }
  async function z() {
    if (!g.value)
      return;
    await _();
    const E = oe(r);
    E && (await E[s](), n.value = !0);
  }
  async function M() {
    n.value ? await _() : await z();
  }
  return e && Re(e, C, () => {
    n.value = !!(e != null && e[c]);
  }, !1), i && ne(_), {
    isSupported: g,
    isFullscreen: n,
    enter: z,
    exit: _,
    toggle: M
  };
}
var W;
(function(t) {
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
})(W || (W = {}));
var Me = Object.defineProperty, H = Object.getOwnPropertySymbols, $e = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, Y = (t, o, e) => o in t ? Me(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e, xe = (t, o) => {
  for (var e in o)
    $e.call(o, e) && Y(t, e, o[e]);
  if (H)
    for (var e of H(o))
      Le.call(o, e) && Y(t, e, o[e]);
  return t;
};
const Pe = {
  easeInSine: [0.12, 0, 0.39, 0],
  easeOutSine: [0.61, 1, 0.88, 1],
  easeInOutSine: [0.37, 0, 0.63, 1],
  easeInQuad: [0.11, 0, 0.5, 0],
  easeOutQuad: [0.5, 1, 0.89, 1],
  easeInOutQuad: [0.45, 0, 0.55, 1],
  easeInCubic: [0.32, 0, 0.67, 0],
  easeOutCubic: [0.33, 1, 0.68, 1],
  easeInOutCubic: [0.65, 0, 0.35, 1],
  easeInQuart: [0.5, 0, 0.75, 0],
  easeOutQuart: [0.25, 1, 0.5, 1],
  easeInOutQuart: [0.76, 0, 0.24, 1],
  easeInQuint: [0.64, 0, 0.78, 0],
  easeOutQuint: [0.22, 1, 0.36, 1],
  easeInOutQuint: [0.83, 0, 0.17, 1],
  easeInExpo: [0.7, 0, 0.84, 0],
  easeOutExpo: [0.16, 1, 0.3, 1],
  easeInOutExpo: [0.87, 0, 0.13, 1],
  easeInCirc: [0.55, 0, 1, 0.45],
  easeOutCirc: [0, 0.55, 0.45, 1],
  easeInOutCirc: [0.85, 0, 0.15, 1],
  easeInBack: [0.36, 0, 0.66, -0.56],
  easeOutBack: [0.34, 1.56, 0.64, 1],
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
xe({
  linear: Ee
}, Pe);
const Te = /* @__PURE__ */ D({
  __name: "GridItem",
  props: {
    active: { type: Boolean },
    gridNum: {}
  },
  emits: ["itemClick"],
  setup(t, { emit: o }) {
    pe((c) => ({
      v9b3a2c32: u.value
    }));
    const e = t, i = o, r = k(), { toggle: n, isFullscreen: a } = le(r), g = () => {
      r.value != document.fullscreenElement && (a.value ? (a.value = !1, L(() => {
        n();
      })) : n());
    }, s = () => {
      i("itemClick");
    }, u = x(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
    return (c, C) => (h(), R(
      "div",
      {
        ref_key: "containerRef",
        ref: r,
        class: fe(["wrapper", { "is-active": e.active }]),
        onDblclick: C[0] || (C[0] = (_) => g()),
        onClick: C[1] || (C[1] = (_) => s())
      },
      [
        X(c.$slots, "default", {}, void 0, !0)
      ],
      34
      /* CLASS, NEED_HYDRATION */
    ));
  }
}), P = (t, o) => {
  const e = t.__vccOpts || t;
  for (const [i, r] of o)
    e[i] = r;
  return e;
}, Ue = /* @__PURE__ */ P(Te, [["__scopeId", "data-v-100b67ca"]]), Ve = { class: "layout-wrapper" }, Be = /* @__PURE__ */ D({
  __name: "GridLayout",
  props: {
    gridNum: {},
    activeIndex: { default: 0 },
    showFn: {}
  },
  emits: ["update:activeIndex"],
  setup(t, { emit: o }) {
    const e = t, i = o, r = (n) => {
      i("update:activeIndex", n);
    };
    return (n, a) => (h(), R("div", Ve, [
      I(' :active="index === activeIndex" '),
      (h(!0), R(
        J,
        null,
        ve(e.gridNum, (g, s) => (h(), O(Ue, {
          active: !1,
          "grid-num": e.gridNum,
          onItemClick: (u) => r(s)
        }, {
          default: v(() => [
            t.showFn(s) ? X(n.$slots, "default", {
              key: 0,
              index: s
            }, void 0, !0) : I("v-if", !0)
          ]),
          _: 2
          /* DYNAMIC */
        }, 1032, ["grid-num", "onItemClick"]))),
        256
        /* UNKEYED_FRAGMENT */
      ))
    ]));
  }
}), je = /* @__PURE__ */ P(Be, [["__scopeId", "data-v-661e2289"]]), Ae = /* @__PURE__ */ D({
  __name: "DirectionControl",
  emits: ["change"],
  setup(t, { emit: o }) {
    const e = o, i = (r) => {
      e("change", r);
    };
    return (r, n) => (h(), R(
      "div",
      {
        class: "direction-control",
        onDblclick: n[9] || (n[9] = y((a) => a.stopPropagation(), ["stop"]))
      },
      [
        p(l(w), {
          content: l(m)("左上")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-top-left",
              onClick: n[0] || (n[0] = y((a) => i("leftUp"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("上")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-top",
              onClick: n[1] || (n[1] = y((a) => i("up"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("右上")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-top-right",
              onClick: n[2] || (n[2] = y((a) => i("rightUp"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("左")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-left",
              onClick: n[3] || (n[3] = y((a) => i("left"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("自动")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-auto",
              onClick: n[4] || (n[4] = y((a) => i("auto"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("右")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-right",
              onClick: n[5] || (n[5] = y((a) => i("right"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("左下")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-bottom-left",
              onClick: n[6] || (n[6] = y((a) => i("leftDown"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("下")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-bottom",
              onClick: n[7] || (n[7] = y((a) => i("down"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"]),
        p(l(w), {
          content: l(m)("右下")
        }, {
          default: v(() => [
            f("div", {
              class: "icon icon-bottom-right",
              onClick: n[8] || (n[8] = y((a) => i("rightDown"), ["stop"]))
            })
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"])
      ],
      32
      /* NEED_HYDRATION */
    ));
  }
}), Qe = /* @__PURE__ */ P(Ae, [["__scopeId", "data-v-84b1bc1f"]]), 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 = {
  key: 0,
  class: "play-status"
}, Xe = { class: "video-bottom" }, Je = { class: "video-bottom_r" }, et = /* @__PURE__ */ D({
  __name: "index",
  props: {
    videoUrl: {},
    title: {},
    type: {},
    loading: { type: Boolean },
    isFullscreen: { type: Boolean },
    playbackRate: { default: 1 },
    paused: { type: Boolean, default: !1 },
    authType: { default: () => [] },
    onReplay: {}
  },
  emits: ["close", "directionControl", "zoomControl"],
  setup(t, { emit: o }) {
    const e = t, i = o;
    ke({
      muted: import("@das-fed/upf-ui/packages/icons/muted"),
      volume: import("@das-fed/upf-ui/packages/icons/volume"),
      shrink: import("@das-fed/upf-ui/packages/icons/shrink"),
      enlarge: import("@das-fed/upf-ui/packages/icons/enlarge"),
      "direction-control": import("@das-fed/upf-ui/packages/icons/direction-control")
    });
    const r = k(!0), n = k(), a = k(!1), g = k(), s = x(() => {
      var d;
      return (d = g.value) == null ? void 0 : d.video;
    }), u = k(!1), c = k(!0), C = (d) => {
      n.value = d, n.value.on(window.mpegts.Events.ERROR, (b) => {
      });
    }, _ = () => {
      r.value = !r.value, n.value && (n.value.muted = r.value);
    }, z = () => {
      a.value = !a.value;
    }, M = k(""), E = () => {
      const d = document.createElement("canvas");
      if (s.value) {
        d.width = s.value.clientWidth, d.height = s.value.clientHeight;
        const b = d.getContext("2d");
        b == null || b.drawImage(s.value, 0, 0, d.width, d.height);
        const S = d.toDataURL("image/jpg"), ae = `【${e.title}】${be().format("YYYYMMDDHHmmss").toString()}.jpg`;
        if (M.value = S, "download" in document.createElement("a")) {
          const F = document.createElement("a");
          F.download = ae, F.style.display = "none", F.href = S, document.body.appendChild(F), document.body.appendChild(d), F.click(), URL.revokeObjectURL(F.href), document.body.removeChild(F), document.body.removeChild(d);
        }
      }
    }, se = (d) => {
      i("directionControl", d);
    }, B = (d) => {
      i("zoomControl", d);
    }, T = (d) => e.authType.includes(d);
    return N(
      () => s.value,
      () => {
        s.value && s.value.addEventListener("ended", () => {
          u.value = !0, e.type === "playback" && (c.value = !1);
        });
      }
    ), N(
      () => s.value,
      () => {
        s.value && L(() => {
          s.value.playbackRate = e.playbackRate || 1;
        });
      }
    ), N(
      () => n.value,
      () => {
        n.value && L(() => {
          n.value.muted = r.value;
        });
      }
    ), N(
      () => e.playbackRate,
      () => {
        s.value && (s.value.playbackRate = e.playbackRate || 1);
      },
      {
        immediate: !0
      }
    ), N(
      () => e.paused,
      () => {
        n.value && (e.paused ? n.value.pause() : n.value.play());
      }
    ), N(
      () => e.videoUrl,
      () => {
        c.value = !1, L(() => {
          c.value = !0;
        });
      }
    ), (d, b) => (h(), R("div", qe, [
      p(l(we), {
        spinning: e.loading,
        type: "component",
        tip: l(m)("加载中...")
      }, {
        default: v(() => [
          f("div", Ge, [
            f("div", We, [
              f("div", He, [
                f(
                  "div",
                  Ye,
                  U(e.title.length > 20 ? e.title.slice(0, 19) + "..." : e.title),
                  1
                  /* TEXT */
                )
              ])
            ]),
            f("div", Ze, [
              ["live"].includes(t.type) ? (h(), R(
                "span",
                Ke,
                U(l(m)("正在实时预览")),
                1
                /* TEXT */
              )) : I("v-if", !0),
              I(' <das-icon v-if="isFullscreen" class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
            ])
          ]),
          e.videoUrl && c.value ? (h(), O(l(_e), {
            key: 0,
            type: "flv",
            ref_key: "dasLivePlayerRef",
            ref: g,
            muted: r.value,
            onLoaded: C,
            src: e.videoUrl
          }, null, 8, ["muted", "src"])) : I("v-if", !0),
          f("div", Xe, [
            b[3] || (b[3] = f(
              "div",
              { class: "video-bottom_l" },
              null,
              -1
              /* CACHED */
            )),
            f("div", Je, [
              f(
                "div",
                {
                  class: "controls",
                  onDblclick: b[2] || (b[2] = y((S) => S.stopPropagation(), ["stop"]))
                },
                [
                  p(l(w), {
                    content: l(m)("声音")
                  }, {
                    default: v(() => [
                      p(l($), {
                        class: "icon icon-volume",
                        icon: r.value ? "muted" : "volume",
                        onClick: y(_, ["stop"])
                      }, null, 8, ["icon"])
                    ]),
                    _: 1
                    /* STABLE */
                  }, 8, ["content"]),
                  p(l(w), {
                    content: l(m)("截图")
                  }, {
                    default: v(() => [
                      p(l($), {
                        class: "icon icon-screenshot",
                        icon: "screenshot",
                        onClick: y(E, ["stop"])
                      })
                    ]),
                    _: 1
                    /* STABLE */
                  }, 8, ["content"]),
                  T("control") ? (h(), O(l(w), {
                    key: 0,
                    content: l(m)("聚焦-")
                  }, {
                    default: v(() => [
                      ["live", "polling"].includes(e.type) ? (h(), O(l($), {
                        key: 0,
                        class: "icon icon-shrink",
                        icon: "shrink",
                        onClick: b[0] || (b[0] = y((S) => B("zoomOut"), ["stop"]))
                      })) : I("v-if", !0)
                    ]),
                    _: 1
                    /* STABLE */
                  }, 8, ["content"])) : I("v-if", !0),
                  T("control") ? (h(), O(l(w), {
                    key: 1,
                    content: l(m)("聚焦+")
                  }, {
                    default: v(() => [
                      ["live", "polling"].includes(e.type) ? (h(), O(l($), {
                        key: 0,
                        class: "icon icon-enlarge",
                        icon: "enlarge",
                        onClick: b[1] || (b[1] = y((S) => B("zoomIn"), ["stop"]))
                      })) : I("v-if", !0)
                    ]),
                    _: 1
                    /* STABLE */
                  }, 8, ["content"])) : I("v-if", !0),
                  T("control") ? (h(), O(l(w), {
                    key: 2,
                    content: l(m)("方向控制")
                  }, {
                    default: v(() => [
                      ["live", "polling"].includes(e.type) ? (h(), O(l($), {
                        key: 0,
                        class: "icon icon-direction-control",
                        icon: "direction-control",
                        onClick: y(z, ["stop"])
                      })) : I("v-if", !0)
                    ]),
                    _: 1
                    /* STABLE */
                  }, 8, ["content"])) : I("v-if", !0)
                ],
                32
                /* NEED_HYDRATION */
              )
            ])
          ]),
          a.value ? (h(), O(Qe, {
            key: 1,
            onChange: se
          })) : I("v-if", !0)
        ]),
        _: 1
        /* STABLE */
      }, 8, ["spinning", "tip"])
    ]));
  }
}), tt = /* @__PURE__ */ P(et, [["__scopeId", "data-v-f810def3"]]), nt = "/api/device-relation/deviceproject/v1/project/device/video", ot = "v1", lt = ee(`/api/enterpriseright/permission/${ot}`), ie = ee(`${nt}`, it);
function it(t) {
  const o = j() ? j().id : 1;
  return t.params || (t.params = {}), t.params.project = o, t.params.projectId = o, t;
}
function re(t) {
  const o = new URLSearchParams("");
  for (let [e, i] of Object.entries(t))
    o.append(e, i);
  return o.toString();
}
function Z(t) {
  return ie.post(`/ptz?${re(t)}`)().run();
}
function rt(t) {
  return ie.post(`/url/preview?${re(t)}`)().run();
}
lt.post("data/device-auth");
const st = (t) => {
  const o = Ie();
  return `${t}?token=${o}`;
};
k([]);
const at = /* @__PURE__ */ D({
  props: {
    deviceInfo: {
      type: Object,
      required: !0
    },
    source: {
      type: String
    }
  },
  setup(t, {
    slots: o
  }) {
    const {
      deviceInfo: e,
      source: i
    } = me(t), r = k(!1), n = k(""), a = async () => {
      var C;
      if (!((C = e.value) != null && C.deviceId)) return;
      r.value = !0;
      const [u, c] = await rt({
        productId: e.value.productId,
        deviceId: e.value.deviceId,
        source: i.value
      });
      u || (n.value = st(c == null ? void 0 : c.wsFlvStreamURL)), r.value = !1;
    }, g = (u) => {
      Z({
        productId: e.value.productId,
        deviceId: e.value.deviceId,
        direction: u,
        zoom: "",
        source: i.value || "web"
      });
    }, s = (u) => {
      Z({
        productId: e.value.productId,
        deviceId: e.value.deviceId,
        direction: "",
        zoom: u,
        source: i.value || "web"
      });
    };
    return K(() => {
      a();
    }), N(() => e.value, () => {
      a();
    }, {
      deep: !0
    }), () => p(J, null, [o.default({
      videoUrl: n.value,
      loading: r.value,
      onDirectionControl: g,
      onZoomControl: s
    })]);
  }
});
function ct(t) {
  const o = k(0), e = k(null), i = je, {
    toggle: r,
    isFullscreen: n,
    exit: a
  } = le(e), g = (u, c) => {
    n.value && a();
  };
  return {
    render: () => p(i, {
      ref: e,
      gridNum: t.gridNum,
      activeIndex: o.value,
      "onUpdate:activeIndex": (u) => o.value = u,
      showFn: (u) => !!t.deviceList[u]
    }, {
      default: ({
        index: u
      }) => {
        const c = t.deviceList[u], C = t.source;
        return p(at, {
          deviceInfo: c,
          source: C
        }, {
          default: ({
            videoUrl: _,
            onDirectionControl: z,
            onZoomControl: M,
            loading: E
          }) => p(tt, {
            type: "live",
            loading: E,
            isFullscreen: n.value,
            videoUrl: _,
            title: c.deviceName,
            onClose: () => g(),
            onDirectionControl: z,
            onZoomControl: M,
            authType: c.authType === 2 ? ["control"] : []
          }, null)
        });
      }
    }),
    toggleFullscreen: r
  };
}
const ut = /* @__PURE__ */ D({
  __name: "index",
  props: {
    visible: { type: Boolean, default: !1 },
    deviceList: { default: () => [] },
    gridNum: { default: 4 },
    source: {}
  },
  emits: ["update:visible"],
  setup(t, { emit: o }) {
    const e = t, i = o, r = x({
      get: () => e.visible,
      set: (s) => i("update:visible", s)
    }), { render: n, toggleFullscreen: a } = ct(e), g = x(() => {
      let s = {};
      switch (e.gridNum) {
        case 1:
          s = "one-video";
          break;
        case 4:
          s = "four-video";
          break;
        case 9:
          s = "nine-video";
          break;
      }
      return s;
    });
    return (s, u) => (h(), O(l(he), {
      size: "mini",
      title: l(m)("视频监控"),
      "custom-class": `das-linakge-video-dialog ${g.value}`,
      modelValue: r.value,
      "onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
      bodyStyle: { padding: 0 },
      "close-on-click-modal": !1,
      "close-on-press-escape": !1,
      modal: !1,
      "header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" }
    }, {
      header: v(() => [
        f("div", null, [
          f(
            "span",
            null,
            U(l(m)("视频监控")),
            1
            /* TEXT */
          )
        ]),
        p(l(w), {
          content: l(m)("页面全屏")
        }, {
          default: v(() => [
            p(l(ye), {
              class: "icon",
              color: "#999",
              onClick: l(a)
            }, null, 8, ["onClick"])
          ]),
          _: 1
          /* STABLE */
        }, 8, ["content"])
      ]),
      default: v(() => [
        r.value ? (h(), O(l(n), { key: 0 })) : I("v-if", !0)
      ]),
      _: 1
      /* STABLE */
    }, 8, ["title", "custom-class", "modelValue"]));
  }
}), dt = {
  加载中: { "zh-CN": "加载中", en: "Loading", "zh-MO": "加載中", _appCode: "framework" },
  正在实时预览: { "zh-CN": "正在实时预览", en: "Real-time Video", "zh-MO": "正在實時預覽", _appCode: "framework" },
  声音: { "zh-CN": "声音", en: "Sound", "zh-MO": "聲音", _appCode: "framework" },
  截图: { "zh-CN": "截图", en: "Screenshot", "zh-MO": "截圖", _appCode: "framework" },
  聚焦: { "zh-CN": "聚焦", en: "Focus", "zh-MO": "聚焦", _appCode: "framework" },
  方向控制: { "zh-CN": "方向控制", en: "Direction Control", "zh-MO": "方向控制", _appCode: "framework" },
  左上: { "zh-CN": "左上", en: "Top Left", "zh-MO": "左上", _appCode: "framework" },
  上: { "zh-CN": "上", en: "Up", "zh-MO": "上", _appCode: "framework" },
  右上: { "zh-CN": "右上", en: "Top Right", "zh-MO": "右上", _appCode: "framework" },
  左: { "zh-CN": "左", en: "Left", "zh-MO": "左", _appCode: "framework" },
  自动: { "zh-CN": "自动", en: "Auto", "zh-MO": "自動", _appCode: "framework" },
  右: { "zh-CN": "右", en: "Right", "zh-MO": "右", _appCode: "framework" },
  左下: { "zh-CN": "左下", en: "Bottom Left", "zh-MO": "左下", _appCode: "framework" },
  下: { "zh-CN": "下", en: "Down", "zh-MO": "下", _appCode: "framework" },
  右下: { "zh-CN": "右下", en: "Bottom Right", "zh-MO": "右下", _appCode: "framework" },
  视频监控: { "zh-CN": "视频监控", en: "Video Surveillance", "zh-MO": "視頻監控", _appCode: "framework" },
  页面全屏: { "zh-CN": "页面全屏", en: "Full Screen", "zh-MO": "頁面全屏", _appCode: "framework" },
  "加载中...": { "zh-CN": "加载中...", en: "Loading...", "zh-MO": "加載中...", _appCode: "framework" },
  "聚焦-": { "zh-CN": "聚焦-", en: "Focus-", "zh-MO": "聚焦-", _appCode: "framework" },
  "聚焦+": { "zh-CN": "聚焦+", en: "Focus+", "zh-MO": "聚焦+", _appCode: "framework" }
};
ge(dt);
const It = Ce(ut), zt = () => k(null);
export {
  It as DasVideoDialog,
  zt as DasVideoDialogRef,
  ct as useVideo
};
