iking-web-ui-pro 0.2.27 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IKPreviewFile/ik.index.es.js +262 -261
- package/dist/IKPreviewFile/ik.index.umd.js +44 -44
- package/dist/IkApprovalProcessDetail/ik.index.es.js +845 -844
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +38 -38
- package/dist/IkDescription/ik.index.es.js +295 -294
- package/dist/IkDescription/ik.index.umd.js +45 -45
- package/dist/IkDetailPreviewFiles/ik.index.es.js +898 -897
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +39 -39
- package/dist/IkUploadFile/ik.index.es.js +5 -5
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/index.es.js +4396 -4395
- package/dist/index.umd.js +64 -64
- package/dist/src/components/IKPreviewFile/index.d.ts +16 -4
- package/dist/src/components/IKPreviewFile/src/IkPreviewFile.vue.d.ts +6 -2
- package/dist/src/components/IkUploadFile/index.d.ts +6 -0
- package/dist/src/components/IkUploadFile/src/index.vue.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as le, computed as Y, openBlock as L, createElementBlock as
|
|
1
|
+
import { defineComponent as le, computed as Y, openBlock as L, createElementBlock as N, createElementVNode as S, inject as Xe, mergeModels as at, useModel as Kt, ref as Ke, reactive as kn, watch as Ui, nextTick as zi, resolveComponent as $e, Fragment as Ze, createBlock as Le, createCommentVNode as he, createVNode as J, unref as j, withCtx as de, normalizeClass as Q, normalizeStyle as oe, createTextVNode as Bt, toDisplayString as Ge, h as wn, mergeProps as bn, createSlots as Tn, renderSlot as Ie, Teleport as En, Transition as Sn, renderList as ai, withModifiers as li } from "vue";
|
|
2
2
|
import { buildUUID as Vi, ikColor as xn, paramType as Pn, ikFile as In } from "iking-utils-pro";
|
|
3
3
|
import { useNamespace as An } from "element-plus";
|
|
4
4
|
const De = (a, o) => {
|
|
@@ -620,7 +620,7 @@ const De = (a, o) => {
|
|
|
620
620
|
},
|
|
621
621
|
setup(a) {
|
|
622
622
|
const o = a, r = Y(() => o.file ? Ht(o.file, o.fields) : o.type);
|
|
623
|
-
return (t, e) => r.value === "image" ? (L(),
|
|
623
|
+
return (t, e) => r.value === "image" ? (L(), N("svg", Rn, Bn)) : r.value === "zip" ? (L(), N("svg", Hn, Vn)) : r.value === "ppt" ? (L(), N("svg", jn, Kn)) : r.value === "word" ? (L(), N("svg", $n, qn)) : r.value === "pdf" ? (L(), N("svg", Zn, er)) : r.value === "txt" ? (L(), N("svg", tr, rr)) : r.value === "audio" ? (L(), N("svg", sr, lr)) : r.value === "video" ? (L(), N("svg", ur, hr)) : r.value === "excel" ? (L(), N("svg", dr, mr)) : r.value === "exe" ? (L(), N("svg", yr, br)) : r.value === "json" ? (L(), N("svg", Tr, Pr)) : (L(), N("svg", Ir, Rr));
|
|
624
624
|
}
|
|
625
625
|
}), Fr = De(Or);
|
|
626
626
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
@@ -628,7 +628,7 @@ var Mr = /* @__PURE__ */ le({
|
|
|
628
628
|
name: "Close",
|
|
629
629
|
__name: "close",
|
|
630
630
|
setup(a) {
|
|
631
|
-
return (o, r) => (L(),
|
|
631
|
+
return (o, r) => (L(), N("svg", {
|
|
632
632
|
xmlns: "http://www.w3.org/2000/svg",
|
|
633
633
|
viewBox: "0 0 1024 1024"
|
|
634
634
|
}, [
|
|
@@ -711,7 +711,7 @@ const yt = (a, o) => {
|
|
|
711
711
|
}), s = (u) => {
|
|
712
712
|
var c, h, d, g, p, m, _;
|
|
713
713
|
try {
|
|
714
|
-
const
|
|
714
|
+
const w = ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u, b = w[t.value.url] || (w == null ? void 0 : w.id) || w.attachmentId, C = (h = w[t.value.suffix] || w.attachmentSuffix) == null ? void 0 : h.toLowerCase(), F = w[t.value.name] || (w == null ? void 0 : w.attachmentName) || (w == null ? void 0 : w.originName);
|
|
715
715
|
if (i.value = {
|
|
716
716
|
...u,
|
|
717
717
|
name: u[t.value.name],
|
|
@@ -722,7 +722,7 @@ const yt = (a, o) => {
|
|
|
722
722
|
} else if (u && Ht(u, t.value) === "video") {
|
|
723
723
|
n.video = !0;
|
|
724
724
|
return;
|
|
725
|
-
} else if ((((d = o.onlyOfficeConfig) == null ? void 0 : d.accept) || o.onlyOfficeAccept).includes(
|
|
725
|
+
} else if ((((d = o.onlyOfficeConfig) == null ? void 0 : d.accept) || o.onlyOfficeAccept).includes(C)) {
|
|
726
726
|
n.office = !0, e.value = {
|
|
727
727
|
...o.onlyOfficeConfig,
|
|
728
728
|
editorConfig: {
|
|
@@ -736,17 +736,17 @@ const yt = (a, o) => {
|
|
|
736
736
|
},
|
|
737
737
|
document: {
|
|
738
738
|
key: Vi(),
|
|
739
|
-
title:
|
|
739
|
+
title: F,
|
|
740
740
|
url: Qe(o.loadUrl, b),
|
|
741
|
-
fileType:
|
|
741
|
+
fileType: C,
|
|
742
742
|
...((_ = o.onlyOfficeConfig) == null ? void 0 : _.document) || {}
|
|
743
743
|
},
|
|
744
|
-
documentType: Dn(
|
|
744
|
+
documentType: Dn(C)
|
|
745
745
|
};
|
|
746
746
|
return;
|
|
747
747
|
}
|
|
748
|
-
} catch (
|
|
749
|
-
console.info("预览错误: ",
|
|
748
|
+
} catch (w) {
|
|
749
|
+
console.info("预览错误: ", w);
|
|
750
750
|
}
|
|
751
751
|
};
|
|
752
752
|
Ui([r, o.file], ([u, c]) => {
|
|
@@ -760,7 +760,7 @@ const yt = (a, o) => {
|
|
|
760
760
|
return (u, c) => {
|
|
761
761
|
var d, g, p;
|
|
762
762
|
const h = $e("el-image-viewer");
|
|
763
|
-
return r.value ? (L(),
|
|
763
|
+
return r.value ? (L(), N(
|
|
764
764
|
Ze,
|
|
765
765
|
{ key: 0 },
|
|
766
766
|
[
|
|
@@ -883,8 +883,8 @@ const zr = De(Ur), Vr = {
|
|
|
883
883
|
});
|
|
884
884
|
return (i, n) => {
|
|
885
885
|
const s = $e("el-tooltip"), l = $e("el-button");
|
|
886
|
-
return r.value.tableIconType === "icon" || !r.value.tableIconType ? (L(),
|
|
887
|
-
r.value.notip || !r.value.title ? (L(),
|
|
886
|
+
return r.value.tableIconType === "icon" || !r.value.tableIconType ? (L(), N("span", Vr, [
|
|
887
|
+
r.value.notip || !r.value.title ? (L(), N(
|
|
888
888
|
"i",
|
|
889
889
|
{
|
|
890
890
|
key: 0,
|
|
@@ -905,7 +905,7 @@ const zr = De(Ur), Vr = {
|
|
|
905
905
|
},
|
|
906
906
|
[
|
|
907
907
|
he(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
908
|
-
t.value === "iksig" ? (L(),
|
|
908
|
+
t.value === "iksig" ? (L(), N(
|
|
909
909
|
"i",
|
|
910
910
|
{
|
|
911
911
|
key: 0,
|
|
@@ -915,15 +915,15 @@ const zr = De(Ur), Vr = {
|
|
|
915
915
|
null,
|
|
916
916
|
6
|
|
917
917
|
/* CLASS, STYLE */
|
|
918
|
-
)) : t.value === "svg" ? (L(),
|
|
918
|
+
)) : t.value === "svg" ? (L(), N("svg", jr, [
|
|
919
919
|
S("use", {
|
|
920
920
|
"xlink:href": `#${r.value.name}`
|
|
921
921
|
}, null, 8, Wr)
|
|
922
|
-
])) : t.value === "img" ? (L(),
|
|
922
|
+
])) : t.value === "img" ? (L(), N("img", {
|
|
923
923
|
key: 2,
|
|
924
924
|
src: r.value.name,
|
|
925
925
|
class: "h-[1em] w-[1em]"
|
|
926
|
-
}, null, 8, Gr)) : (L(),
|
|
926
|
+
}, null, 8, Gr)) : (L(), N(
|
|
927
927
|
"i",
|
|
928
928
|
{
|
|
929
929
|
key: 3,
|
|
@@ -961,7 +961,7 @@ const zr = De(Ur), Vr = {
|
|
|
961
961
|
style: oe(e.value)
|
|
962
962
|
},
|
|
963
963
|
[
|
|
964
|
-
t.value === "iksig" ? (L(),
|
|
964
|
+
t.value === "iksig" ? (L(), N(
|
|
965
965
|
"i",
|
|
966
966
|
{
|
|
967
967
|
key: 0,
|
|
@@ -971,15 +971,15 @@ const zr = De(Ur), Vr = {
|
|
|
971
971
|
null,
|
|
972
972
|
6
|
|
973
973
|
/* CLASS, STYLE */
|
|
974
|
-
)) : t.value === "svg" ? (L(),
|
|
974
|
+
)) : t.value === "svg" ? (L(), N("svg", Kr, [
|
|
975
975
|
S("use", {
|
|
976
976
|
"xlink:href": `#${r.value.name}`
|
|
977
977
|
}, null, 8, $r)
|
|
978
|
-
])) : t.value === "img" ? (L(),
|
|
978
|
+
])) : t.value === "img" ? (L(), N("img", {
|
|
979
979
|
key: 2,
|
|
980
980
|
src: r.value.name,
|
|
981
981
|
class: "h-[1em] w-[1em]"
|
|
982
|
-
}, null, 8, Yr)) : (L(),
|
|
982
|
+
}, null, 8, Yr)) : (L(), N(
|
|
983
983
|
"i",
|
|
984
984
|
{
|
|
985
985
|
key: 3,
|
|
@@ -1028,7 +1028,7 @@ const qr = /* @__PURE__ */ yt(Xr, [["__scopeId", "data-v-52806adf"]]), je = De(q
|
|
|
1028
1028
|
}
|
|
1029
1029
|
},
|
|
1030
1030
|
setup(a) {
|
|
1031
|
-
return (o, r) => (L(),
|
|
1031
|
+
return (o, r) => (L(), N(
|
|
1032
1032
|
"div",
|
|
1033
1033
|
{
|
|
1034
1034
|
class: Q({ "exit-main-page-maximize": a.showBg && a.fullscreen })
|
|
@@ -1435,7 +1435,7 @@ var ss = function(a, o) {
|
|
|
1435
1435
|
});
|
|
1436
1436
|
const os = ["id"];
|
|
1437
1437
|
function as(a, o, r, t, e, i) {
|
|
1438
|
-
return L(),
|
|
1438
|
+
return L(), N("div", { id: a.id }, null, 8, os);
|
|
1439
1439
|
}
|
|
1440
1440
|
Yt.render = as;
|
|
1441
1441
|
Yt.__file = "src/components/DocumentEditor.vue";
|
|
@@ -1468,7 +1468,7 @@ const ls = /* @__PURE__ */ le({
|
|
|
1468
1468
|
}), t = () => {
|
|
1469
1469
|
console.info("文档加载完成", o.configOptions);
|
|
1470
1470
|
};
|
|
1471
|
-
return (e, i) => (L(),
|
|
1471
|
+
return (e, i) => (L(), N(
|
|
1472
1472
|
"div",
|
|
1473
1473
|
{
|
|
1474
1474
|
style: oe({ height: o.officeHeight })
|
|
@@ -1705,9 +1705,9 @@ var Gi = { exports: {} };
|
|
|
1705
1705
|
var m = r ? r + u : u;
|
|
1706
1706
|
if (!this._events[m])
|
|
1707
1707
|
return !1;
|
|
1708
|
-
var _ = this._events[m],
|
|
1708
|
+
var _ = this._events[m], w = arguments.length, b, C;
|
|
1709
1709
|
if (_.fn) {
|
|
1710
|
-
switch (_.once && this.removeListener(u, _.fn, void 0, !0),
|
|
1710
|
+
switch (_.once && this.removeListener(u, _.fn, void 0, !0), w) {
|
|
1711
1711
|
case 1:
|
|
1712
1712
|
return _.fn.call(_.context), !0;
|
|
1713
1713
|
case 2:
|
|
@@ -1721,30 +1721,30 @@ var Gi = { exports: {} };
|
|
|
1721
1721
|
case 6:
|
|
1722
1722
|
return _.fn.call(_.context, c, h, d, g, p), !0;
|
|
1723
1723
|
}
|
|
1724
|
-
for (
|
|
1725
|
-
b[
|
|
1724
|
+
for (C = 1, b = new Array(w - 1); C < w; C++)
|
|
1725
|
+
b[C - 1] = arguments[C];
|
|
1726
1726
|
_.fn.apply(_.context, b);
|
|
1727
1727
|
} else {
|
|
1728
|
-
var
|
|
1729
|
-
for (
|
|
1730
|
-
switch (_[
|
|
1728
|
+
var F = _.length, R;
|
|
1729
|
+
for (C = 0; C < F; C++)
|
|
1730
|
+
switch (_[C].once && this.removeListener(u, _[C].fn, void 0, !0), w) {
|
|
1731
1731
|
case 1:
|
|
1732
|
-
_[
|
|
1732
|
+
_[C].fn.call(_[C].context);
|
|
1733
1733
|
break;
|
|
1734
1734
|
case 2:
|
|
1735
|
-
_[
|
|
1735
|
+
_[C].fn.call(_[C].context, c);
|
|
1736
1736
|
break;
|
|
1737
1737
|
case 3:
|
|
1738
|
-
_[
|
|
1738
|
+
_[C].fn.call(_[C].context, c, h);
|
|
1739
1739
|
break;
|
|
1740
1740
|
case 4:
|
|
1741
|
-
_[
|
|
1741
|
+
_[C].fn.call(_[C].context, c, h, d);
|
|
1742
1742
|
break;
|
|
1743
1743
|
default:
|
|
1744
1744
|
if (!b)
|
|
1745
|
-
for (
|
|
1746
|
-
b[
|
|
1747
|
-
_[
|
|
1745
|
+
for (R = 1, b = new Array(w - 1); R < w; R++)
|
|
1746
|
+
b[R - 1] = arguments[R];
|
|
1747
|
+
_[C].fn.apply(_[C].context, b);
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
return !0;
|
|
@@ -1762,7 +1762,7 @@ var Gi = { exports: {} };
|
|
|
1762
1762
|
if (p.fn)
|
|
1763
1763
|
p.fn === c && (!d || p.once) && (!h || p.context === h) && n(this, g);
|
|
1764
1764
|
else {
|
|
1765
|
-
for (var m = 0, _ = [],
|
|
1765
|
+
for (var m = 0, _ = [], w = p.length; m < w; m++)
|
|
1766
1766
|
(p[m].fn !== c || d && !p[m].once || h && p[m].context !== h) && _.push(p[m]);
|
|
1767
1767
|
_.length ? this._events[g] = _.length === 1 ? _[0] : _ : n(this, g);
|
|
1768
1768
|
}
|
|
@@ -1778,7 +1778,7 @@ var ys = typeof window < "u" && window.location && window.location.href.indexOf(
|
|
|
1778
1778
|
info: "color: #525252; background-color: #90ee90;",
|
|
1779
1779
|
error: "color: #525252; background-color: red;",
|
|
1780
1780
|
warn: "color: #525252; background-color: yellow; "
|
|
1781
|
-
}, Et = "%c[xgplayer]",
|
|
1781
|
+
}, Et = "%c[xgplayer]", M = {
|
|
1782
1782
|
config: {
|
|
1783
1783
|
debug: ys ? 3 : 0
|
|
1784
1784
|
},
|
|
@@ -1802,7 +1802,7 @@ var ys = typeof window < "u" && window.location && window.location.href.indexOf(
|
|
|
1802
1802
|
}
|
|
1803
1803
|
};
|
|
1804
1804
|
function _s(a) {
|
|
1805
|
-
a.logInfo =
|
|
1805
|
+
a.logInfo = M.logInfo.bind(a), a.logWarn = M.logWarn.bind(a), a.logError = M.logError.bind(a);
|
|
1806
1806
|
}
|
|
1807
1807
|
var Cs = /* @__PURE__ */ function() {
|
|
1808
1808
|
function a(o) {
|
|
@@ -1842,7 +1842,7 @@ f.createDomFromHtml = function(a) {
|
|
|
1842
1842
|
e.setAttribute(i, o[i]);
|
|
1843
1843
|
}), e) : null;
|
|
1844
1844
|
} catch (i) {
|
|
1845
|
-
return
|
|
1845
|
+
return M.logError("util.createDomFromHtml", i), null;
|
|
1846
1846
|
}
|
|
1847
1847
|
};
|
|
1848
1848
|
f.hasClass = function(a, o) {
|
|
@@ -1899,7 +1899,7 @@ f.findDom = function() {
|
|
|
1899
1899
|
try {
|
|
1900
1900
|
r = a.querySelector(o);
|
|
1901
1901
|
} catch (t) {
|
|
1902
|
-
|
|
1902
|
+
M.logError("util.findDom", t), o.indexOf("#") === 0 && (r = a.getElementById(o.slice(1)));
|
|
1903
1903
|
}
|
|
1904
1904
|
return r;
|
|
1905
1905
|
};
|
|
@@ -2270,45 +2270,45 @@ function ws(a, o, r) {
|
|
|
2270
2270
|
return window.cancelAnimationFrame(H);
|
|
2271
2271
|
clearTimeout(H);
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2274
|
-
return u = H, s = m(
|
|
2273
|
+
function w(H) {
|
|
2274
|
+
return u = H, s = m(F, o), c ? p(H) : n;
|
|
2275
2275
|
}
|
|
2276
2276
|
function b(H) {
|
|
2277
2277
|
var ee = H - l, re = H - u, se = o - ee;
|
|
2278
2278
|
return h ? Math.min(se, i - re) : se;
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function C(H) {
|
|
2281
2281
|
var ee = H - l, re = H - u;
|
|
2282
2282
|
return l === void 0 || ee >= o || ee < 0 || h && re >= i;
|
|
2283
2283
|
}
|
|
2284
|
-
function
|
|
2284
|
+
function F() {
|
|
2285
2285
|
var H = Date.now();
|
|
2286
|
-
if (
|
|
2287
|
-
return
|
|
2288
|
-
s = m(
|
|
2286
|
+
if (C(H))
|
|
2287
|
+
return R(H);
|
|
2288
|
+
s = m(F, b(H));
|
|
2289
2289
|
}
|
|
2290
|
-
function
|
|
2290
|
+
function R(H) {
|
|
2291
2291
|
return s = void 0, d && t ? p(H) : (t = e = void 0, n);
|
|
2292
2292
|
}
|
|
2293
2293
|
function z() {
|
|
2294
2294
|
s !== void 0 && _(s), u = 0, t = l = e = s = void 0;
|
|
2295
2295
|
}
|
|
2296
2296
|
function D() {
|
|
2297
|
-
return s === void 0 ? n :
|
|
2297
|
+
return s === void 0 ? n : R(Date.now());
|
|
2298
2298
|
}
|
|
2299
2299
|
function q() {
|
|
2300
2300
|
return s !== void 0;
|
|
2301
2301
|
}
|
|
2302
2302
|
function G() {
|
|
2303
|
-
for (var H = Date.now(), ee =
|
|
2303
|
+
for (var H = Date.now(), ee = C(H), re = arguments.length, se = new Array(re), Se = 0; Se < re; Se++)
|
|
2304
2304
|
se[Se] = arguments[Se];
|
|
2305
2305
|
if (t = se, e = this, l = H, ee) {
|
|
2306
2306
|
if (s === void 0)
|
|
2307
|
-
return
|
|
2307
|
+
return w(l);
|
|
2308
2308
|
if (h)
|
|
2309
|
-
return s = m(
|
|
2309
|
+
return s = m(F, o), p(l);
|
|
2310
2310
|
}
|
|
2311
|
-
return s === void 0 && (s = m(
|
|
2311
|
+
return s === void 0 && (s = m(F, o)), n;
|
|
2312
2312
|
}
|
|
2313
2313
|
return G.cancel = z, G.flush = D, G.pending = q, G;
|
|
2314
2314
|
}
|
|
@@ -2335,9 +2335,9 @@ function Es(a, o, r) {
|
|
|
2335
2335
|
var di = {
|
|
2336
2336
|
android: /(Android)\s([\d.]+)/,
|
|
2337
2337
|
ios: /(Version)\/([\d.]+)/
|
|
2338
|
-
}, Ss = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"],
|
|
2338
|
+
}, Ss = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"], O = {
|
|
2339
2339
|
get device() {
|
|
2340
|
-
var a =
|
|
2340
|
+
var a = O.os;
|
|
2341
2341
|
return a.isPc ? "pc" : "mobile";
|
|
2342
2342
|
},
|
|
2343
2343
|
get browser() {
|
|
@@ -2488,8 +2488,8 @@ var di = {
|
|
|
2488
2488
|
for (var m = {
|
|
2489
2489
|
playerVersion: Vt,
|
|
2490
2490
|
domain: document.domain
|
|
2491
|
-
}, _ = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"],
|
|
2492
|
-
m[_[
|
|
2491
|
+
}, _ = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"], w = 0; w < arguments.length; w++)
|
|
2492
|
+
m[_[w]] = arguments[w];
|
|
2493
2493
|
return m.ex = t ? (t[arguments[0]] || {}).msg : "", m;
|
|
2494
2494
|
}
|
|
2495
2495
|
}
|
|
@@ -2619,7 +2619,7 @@ var Hs = /* @__PURE__ */ function(a) {
|
|
|
2619
2619
|
"data-index": -1
|
|
2620
2620
|
}, t.videoConfig, t.videoAttributes);
|
|
2621
2621
|
var i = t["x5-video-player-type"] || t.x5VideoPlayerType;
|
|
2622
|
-
return
|
|
2622
|
+
return O.isWeixin && O.os.isAndroid && i && (e.mediaConfig["x5-video-player-type"] = i, delete e.mediaConfig.playsinline, delete e.mediaConfig["webkit-playsinline"], delete e.mediaConfig["x5-playsinline"]), t.loop && (e.mediaConfig.loop = "loop"), t.autoplayMuted && !Object.prototype.hasOwnProperty.call(e.mediaConfig, "muted") && (e.mediaConfig.muted = !0), e.media = f.createDom(e.mediaConfig.mediaType, "", e.mediaConfig, ""), t.defaultPlaybackRate && (e.media.defaultPlaybackRate = e.media.playbackRate = t.defaultPlaybackRate), f.typeOf(t.volume) === "Number" && (e.volume = t.volume), t.autoplayMuted && (e.media.muted = !0, e._lastMuted = !0), t.autoplay && (e.media.autoplay = !0), e._interval = {}, e.mediaEventMiddleware = {}, e.attachVideoEvents(), e;
|
|
2623
2623
|
}
|
|
2624
2624
|
return E(r, [{
|
|
2625
2625
|
key: "setEventsMiddleware",
|
|
@@ -3194,7 +3194,7 @@ function pe(a, o, r) {
|
|
|
3194
3194
|
return r.call.apply(r, [a, a].concat(e));
|
|
3195
3195
|
}
|
|
3196
3196
|
function xt(a, o) {
|
|
3197
|
-
|
|
3197
|
+
M.logError("[".concat(a, "] event or callback cant be undefined or null when call ").concat(o));
|
|
3198
3198
|
}
|
|
3199
3199
|
var be = /* @__PURE__ */ function() {
|
|
3200
3200
|
function a(o) {
|
|
@@ -3454,11 +3454,11 @@ function bi(a, o) {
|
|
|
3454
3454
|
try {
|
|
3455
3455
|
return i = a(), i instanceof window.Element ? (f.addClass(i, r), Object.keys(t).map(function(n) {
|
|
3456
3456
|
i.setAttribute(n, t[n]);
|
|
3457
|
-
}), i) : (
|
|
3457
|
+
}), i) : (M.logWarn("warn>>icons.".concat(o, " in config of plugin named [").concat(e, "] is a function mast return an Element Object")), null);
|
|
3458
3458
|
} catch (n) {
|
|
3459
|
-
return
|
|
3459
|
+
return M.logError("Plugin named [".concat(e, "]:createIcon"), n), null;
|
|
3460
3460
|
}
|
|
3461
|
-
return typeof a == "string" ? f.createDomFromHtml(a, t, r) : (
|
|
3461
|
+
return typeof a == "string" ? f.createDomFromHtml(a, t, r) : (M.logWarn("warn>>icons.".concat(o, " in config of plugin named [").concat(e, "] is invalid")), null);
|
|
3462
3462
|
}
|
|
3463
3463
|
function Zs(a, o) {
|
|
3464
3464
|
var r = o.config.icons || o.playerConfig.icons;
|
|
@@ -3498,7 +3498,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3498
3498
|
try {
|
|
3499
3499
|
u = this.render();
|
|
3500
3500
|
} catch (d) {
|
|
3501
|
-
throw
|
|
3501
|
+
throw M.logError("Plugin:".concat(this.pluginName, ":render"), d), new Error("Plugin:".concat(this.pluginName, ":render:").concat(d.message));
|
|
3502
3502
|
}
|
|
3503
3503
|
if (u)
|
|
3504
3504
|
n = r.insert(u, i, e.index), n.setAttribute("data-index", e.index);
|
|
@@ -3696,7 +3696,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3696
3696
|
try {
|
|
3697
3697
|
return typeof e == "string" ? this.find(e).appendChild(i) : e.appendChild(i);
|
|
3698
3698
|
} catch (n) {
|
|
3699
|
-
return
|
|
3699
|
+
return M.logError("Plugin:appendChild", n), null;
|
|
3700
3700
|
}
|
|
3701
3701
|
}
|
|
3702
3702
|
}, {
|
|
@@ -4183,7 +4183,7 @@ var io = function(o, r) {
|
|
|
4183
4183
|
return E(r, [{
|
|
4184
4184
|
key: "beforeCreate",
|
|
4185
4185
|
value: function(e) {
|
|
4186
|
-
!e.config.mode &&
|
|
4186
|
+
!e.config.mode && O.device === "mobile" && (e.config.mode = "flex"), e.player.config.marginControls && (e.config.autoHide = !1);
|
|
4187
4187
|
}
|
|
4188
4188
|
}, {
|
|
4189
4189
|
key: "afterCreate",
|
|
@@ -4200,7 +4200,7 @@ var io = function(o, r) {
|
|
|
4200
4200
|
h ? f.addClass(e.root, "mini-controls") : f.removeClass(e.root, "mini-controls");
|
|
4201
4201
|
});
|
|
4202
4202
|
var c = this.playerConfig.isMobileSimulateMode;
|
|
4203
|
-
|
|
4203
|
+
O.device !== "mobile" && c !== "mobile" && (this.bind("mouseenter", this.onMouseEnter), this.bind("mouseleave", this.onMouseLeave));
|
|
4204
4204
|
}
|
|
4205
4205
|
}
|
|
4206
4206
|
}, {
|
|
@@ -4280,7 +4280,7 @@ var io = function(o, r) {
|
|
|
4280
4280
|
}, {
|
|
4281
4281
|
key: "destroy",
|
|
4282
4282
|
value: function() {
|
|
4283
|
-
|
|
4283
|
+
O.device !== "mobile" && (this.unbind("mouseenter", this.onMouseEnter), this.unbind("mouseleave", this.onMouseLeave));
|
|
4284
4284
|
}
|
|
4285
4285
|
}, {
|
|
4286
4286
|
key: "render",
|
|
@@ -4467,7 +4467,7 @@ var We = {
|
|
|
4467
4467
|
extend: so,
|
|
4468
4468
|
use: ni,
|
|
4469
4469
|
init: oo
|
|
4470
|
-
},
|
|
4470
|
+
}, B = {
|
|
4471
4471
|
INITIAL: 1,
|
|
4472
4472
|
READY: 2,
|
|
4473
4473
|
ATTACHING: 3,
|
|
@@ -4581,14 +4581,14 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4581
4581
|
e = o.call(this, i), y(v(e), "canPlayFunc", function() {
|
|
4582
4582
|
if (e.config) {
|
|
4583
4583
|
var p = e.config, m = p.autoplay, _ = p.defaultPlaybackRate;
|
|
4584
|
-
|
|
4584
|
+
M.logInfo("player", "canPlayFunc, startTime", e.__startTime), e.__startTime > 0 && e.duration > 0 && (e.currentTime = e.__startTime > e.duration ? e.duration : e.__startTime, e.__startTime = -1), e.playbackRate = _, (m || e._useAutoplay) && e.mediaPlay(), e.off(ve, e.canPlayFunc), e.removeClass(k.ENTER);
|
|
4585
4585
|
}
|
|
4586
4586
|
}), y(v(e), "onFullscreenChange", function(p, m) {
|
|
4587
4587
|
var _ = function() {
|
|
4588
4588
|
f.setTimeout(v(e), function() {
|
|
4589
4589
|
e.resize();
|
|
4590
4590
|
}, 100);
|
|
4591
|
-
},
|
|
4591
|
+
}, w = f.getFullScreenEl();
|
|
4592
4592
|
e._fullActionFrom ? e._fullActionFrom = "" : e.emit(dt, {
|
|
4593
4593
|
eventType: "system",
|
|
4594
4594
|
action: "switch_fullscreen",
|
|
@@ -4601,13 +4601,13 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4601
4601
|
to: !1
|
|
4602
4602
|
}]
|
|
4603
4603
|
});
|
|
4604
|
-
var b = Es(
|
|
4605
|
-
if (m ||
|
|
4606
|
-
_(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root,
|
|
4604
|
+
var b = Es(w, e.playerId, Pe);
|
|
4605
|
+
if (m || w && (w === e._fullscreenEl || b))
|
|
4606
|
+
_(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root, w, k.FULLSCREEN), e.emit(ge, !0, e._fullScreenOffset), e.cssfullscreen && e.exitCssFullscreen();
|
|
4607
4607
|
else if (e.fullscreen) {
|
|
4608
4608
|
_();
|
|
4609
|
-
var
|
|
4610
|
-
if (
|
|
4609
|
+
var C = v(e), F = C._fullScreenOffset, R = C.config;
|
|
4610
|
+
if (R.needFullscreenScroll ? (window.scrollTo(F.left, F.top), f.setTimeout(v(e), function() {
|
|
4611
4611
|
e.fullscreen = !1, e._fullScreenOffset = null;
|
|
4612
4612
|
}, 100)) : (!e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !1, e._fullScreenOffset = null), e.cssfullscreen)
|
|
4613
4613
|
e.removeClass(k.FULLSCREEN);
|
|
@@ -4628,7 +4628,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4628
4628
|
s >= 0 && n && (e.config.presets[s] = n);
|
|
4629
4629
|
} else
|
|
4630
4630
|
n && e.config.presets.push(n);
|
|
4631
|
-
e.userTimer = null, e.waitTimer = null, e.handleSource = !0, e._state =
|
|
4631
|
+
e.userTimer = null, e.waitTimer = null, e.handleSource = !0, e._state = B.INITIAL, e.isError = !1, e._hasStart = !1, e.isSeeking = !1, e.isCanplay = !1, e._useAutoplay = !1, e.__startTime = -1, e.rotateDeg = 0, e.isActive = !1, e.fullscreen = !1, e.cssfullscreen = !1, e.isRotateFullscreen = !1, e._fullscreenEl = null, e.timeSegments = [], e._cssfullscreenEl = null, e.curDefinition = null, e._orgCss = "", e._fullScreenOffset = null, e._videoHeight = 0, e._videoWidth = 0, e.videoPos = {
|
|
4632
4632
|
pi: 1,
|
|
4633
4633
|
scale: 0,
|
|
4634
4634
|
rotate: -1,
|
|
@@ -4650,7 +4650,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4650
4650
|
}, e._offsetInfo = {
|
|
4651
4651
|
currentTime: -1,
|
|
4652
4652
|
duration: 0
|
|
4653
|
-
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = We.init(e._pluginInfoId),
|
|
4653
|
+
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = We.init(e._pluginInfoId), O.os.isAndroid && O.osVersion > 0 && O.osVersion < 6 && (e.config.autoplay = !1), e.database = new Us(), e.isUserActive = !1, e._onceSeekCanplay = null, e._isPauseBeforeSeek = 0, e.innerStates = {
|
|
4654
4654
|
isActiveLocked: !1
|
|
4655
4655
|
}, e.instManager = _e;
|
|
4656
4656
|
var l = e._initDOM();
|
|
@@ -4663,9 +4663,9 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4663
4663
|
});
|
|
4664
4664
|
g || (h.defaultDefinition = h.list[0].definition, g = h.list[0]), e.config.url = g.url, e.curDefinition = g;
|
|
4665
4665
|
}
|
|
4666
|
-
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), K.onPluginsReady(v(e)), e.getInitDefinition(), e.setState(
|
|
4666
|
+
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), K.onPluginsReady(v(e)), e.getInitDefinition(), e.setState(B.READY), f.setTimeout(v(e), function() {
|
|
4667
4667
|
e.emit(Qt);
|
|
4668
|
-
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state <
|
|
4668
|
+
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state < B.ATTACHED) && e.start(), e;
|
|
4669
4669
|
}
|
|
4670
4670
|
return E(r, [{
|
|
4671
4671
|
key: "_initDOM",
|
|
@@ -4683,7 +4683,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4683
4683
|
})), console.error("this.confg.id or this.config.el can't be empty"), !1;
|
|
4684
4684
|
}
|
|
4685
4685
|
var s = ao(this.root);
|
|
4686
|
-
s && (
|
|
4686
|
+
s && (M.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"), s.destroy()), this.root.setAttribute(Pe, this.playerId), (e = _e) === null || e === void 0 || e.add(this), K.init(this), this._initBaseDoms();
|
|
4687
4687
|
var l = this.constructor.XgVideoProxy;
|
|
4688
4688
|
if (l && this.mediaConfig.mediaType === l.mediaType) {
|
|
4689
4689
|
var u = this.innerContainer || this.root;
|
|
@@ -4697,25 +4697,25 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4697
4697
|
});
|
|
4698
4698
|
this.controls = d;
|
|
4699
4699
|
}
|
|
4700
|
-
var g = this.config.isMobileSimulateMode === "mobile" ? "mobile" :
|
|
4700
|
+
var g = this.config.isMobileSimulateMode === "mobile" ? "mobile" : O.device;
|
|
4701
4701
|
if (this.addClass("".concat(k.DEFAULT, " ").concat(k.INACTIVE, " xgplayer-").concat(g, " ").concat(this.config.controls ? "" : k.NO_CONTROLS)), this.config.autoplay ? this.addClass(k.ENTER) : this.addClass(k.NO_START), this.config.fluid) {
|
|
4702
4702
|
var p = this.config, m = p.width, _ = p.height;
|
|
4703
4703
|
(typeof m != "number" || typeof _ != "number") && (m = 600, _ = 337.5);
|
|
4704
|
-
var
|
|
4704
|
+
var w = {
|
|
4705
4705
|
width: "100%",
|
|
4706
4706
|
height: "0",
|
|
4707
4707
|
"max-width": "100%",
|
|
4708
4708
|
"padding-top": "".concat(_ * 100 / m, "%")
|
|
4709
4709
|
};
|
|
4710
|
-
Object.keys(
|
|
4711
|
-
i.root.style[D] =
|
|
4710
|
+
Object.keys(w).forEach(function(D) {
|
|
4711
|
+
i.root.style[D] = w[D];
|
|
4712
4712
|
});
|
|
4713
4713
|
} else
|
|
4714
4714
|
["width", "height"].forEach(function(D) {
|
|
4715
4715
|
i.config[D] && (typeof i.config[D] != "number" ? i.root.style[D] = i.config[D] : i.root.style[D] = "".concat(i.config[D], "px"));
|
|
4716
4716
|
});
|
|
4717
|
-
var b = this.root.getBoundingClientRect(),
|
|
4718
|
-
return this.sizeInfo.width =
|
|
4717
|
+
var b = this.root.getBoundingClientRect(), C = b.width, F = b.height, R = b.left, z = b.top;
|
|
4718
|
+
return this.sizeInfo.width = C, this.sizeInfo.height = F, this.sizeInfo.left = R, this.sizeInfo.top = z, !0;
|
|
4719
4719
|
}
|
|
4720
4720
|
}, {
|
|
4721
4721
|
key: "_initBaseDoms",
|
|
@@ -4732,7 +4732,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4732
4732
|
e.on(i, e["on" + i.charAt(0).toUpperCase() + i.slice(1)]);
|
|
4733
4733
|
}), vi.forEach(function(i) {
|
|
4734
4734
|
document && document.addEventListener(i, e.onFullscreenChange);
|
|
4735
|
-
}),
|
|
4735
|
+
}), O.os.isIos && (this.media.addEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.addEventListener("webkitendfullscreen", this._onWebkitendfullscreen)), this.once(ye, this.resize), this.playFunc = function() {
|
|
4736
4736
|
e.config.closeFocusVideoFocus || e.media.focus();
|
|
4737
4737
|
}, this.once(ne, this.playFunc);
|
|
4738
4738
|
}
|
|
@@ -4753,14 +4753,14 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4753
4753
|
key: "_startInit",
|
|
4754
4754
|
value: function(e) {
|
|
4755
4755
|
var i = this;
|
|
4756
|
-
if (this.media && !((!e || e === "" || f.typeOf(e) === "Array" && e.length === 0) && (e = "", this.emit(Qi),
|
|
4756
|
+
if (this.media && !((!e || e === "" || f.typeOf(e) === "Array" && e.length === 0) && (e = "", this.emit(Qi), M.logWarn("config.url is null, please get url and run player._startInit(url)"), this.config.nullUrlStart))) {
|
|
4757
4757
|
this.handleSource && (this._detachSourceEvents(this.media), f.typeOf(e) === "Array" && e.length > 0 ? this._attachSourceEvents(this.media, e) : !this.media.src || this.media.src !== e ? this.media.src = e : e || this.media.removeAttribute("src")), f.typeOf(this.config.volume) === "Number" && (this.volume = this.config.volume);
|
|
4758
4758
|
var n = this.innerContainer ? this.innerContainer : this.root;
|
|
4759
4759
|
this.media instanceof window.Element && !n.contains(this.media) && n.insertBefore(this.media, n.firstChild);
|
|
4760
4760
|
var s = this.media.readyState;
|
|
4761
|
-
|
|
4761
|
+
M.logInfo("_startInit readyState", s), this.config.autoplay && (!f.isMSE(this.media) && this.load(), (O.os.isIpad || O.os.isPhone) && this.mediaPlay());
|
|
4762
4762
|
var l = this.config.startTime;
|
|
4763
|
-
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ve, this.canPlayFunc), (!this.hasStart || this.state <
|
|
4763
|
+
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ve, this.canPlayFunc), (!this.hasStart || this.state < B.ATTACHED) && K.afterInit(this), this.hasStart = !0, this.setState(B.ATTACHED), f.setTimeout(this, function() {
|
|
4764
4764
|
i.emit(Ct);
|
|
4765
4765
|
}, 0);
|
|
4766
4766
|
}
|
|
@@ -4785,13 +4785,13 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4785
4785
|
h.forceBeforeInit && (g.then(function() {
|
|
4786
4786
|
e._loadingPlugins.splice(e._loadingPlugins.indexOf(g), 1);
|
|
4787
4787
|
}).catch(function(p) {
|
|
4788
|
-
|
|
4788
|
+
M.logError("_registerPlugins:loadingPlugin", p), e._loadingPlugins.splice(e._loadingPlugins.indexOf(g), 1);
|
|
4789
4789
|
}), e._loadingPlugins.push(g));
|
|
4790
4790
|
return;
|
|
4791
4791
|
}
|
|
4792
4792
|
return e.registerPlugin(h);
|
|
4793
4793
|
} catch (p) {
|
|
4794
|
-
|
|
4794
|
+
M.logError("_registerPlugins:", p);
|
|
4795
4795
|
}
|
|
4796
4796
|
});
|
|
4797
4797
|
}
|
|
@@ -4898,15 +4898,15 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4898
4898
|
key: "start",
|
|
4899
4899
|
value: function(e) {
|
|
4900
4900
|
var i = this;
|
|
4901
|
-
if (!(this.state >
|
|
4902
|
-
return !e && !this.config.url && this.getInitDefinition(), this.hasStart = !0, this.setState(
|
|
4901
|
+
if (!(this.state > B.ATTACHING))
|
|
4902
|
+
return !e && !this.config.url && this.getInitDefinition(), this.hasStart = !0, this.setState(B.ATTACHING), this._registerPlugins(!1), K.beforeInit(this).then(function() {
|
|
4903
4903
|
if (i.config) {
|
|
4904
4904
|
e || (e = i.url || i.config.url);
|
|
4905
4905
|
var n = i._preProcessUrl(e), s = i._startInit(n.url);
|
|
4906
4906
|
return s;
|
|
4907
4907
|
}
|
|
4908
4908
|
}).catch(function(n) {
|
|
4909
|
-
throw n.fileName = "player", n.lineNumber = "236",
|
|
4909
|
+
throw n.fileName = "player", n.lineNumber = "236", M.logError("start:beforeInit:", n), n;
|
|
4910
4910
|
});
|
|
4911
4911
|
}
|
|
4912
4912
|
}, {
|
|
@@ -4930,7 +4930,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4930
4930
|
});
|
|
4931
4931
|
return;
|
|
4932
4932
|
}
|
|
4933
|
-
|
|
4933
|
+
O.os.isAndroid ? n.once("timeupdate", g) : n.once("canplay", g), n.play();
|
|
4934
4934
|
});
|
|
4935
4935
|
}
|
|
4936
4936
|
}, {
|
|
@@ -4942,23 +4942,23 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
4942
4942
|
key: "mediaPlay",
|
|
4943
4943
|
value: function() {
|
|
4944
4944
|
var e = this;
|
|
4945
|
-
if (!this.hasStart && this.state <
|
|
4945
|
+
if (!this.hasStart && this.state < B.ATTACHED) {
|
|
4946
4946
|
this.removeClass(k.NO_START), this.addClass(k.ENTER), this.start(), this._useAutoplay = !0;
|
|
4947
4947
|
return;
|
|
4948
4948
|
}
|
|
4949
|
-
this.state <
|
|
4949
|
+
this.state < B.RUNNING && (this.removeClass(k.NO_START), !this.isCanplay && this.addClass(k.ENTER));
|
|
4950
4950
|
var i = A(I(r.prototype), "play", this).call(this);
|
|
4951
4951
|
return i !== void 0 && i && i.then ? i.then(function() {
|
|
4952
|
-
e.removeClass(k.NOT_ALLOW_AUTOPLAY), e.addClass(k.PLAYING), e.state <
|
|
4952
|
+
e.removeClass(k.NOT_ALLOW_AUTOPLAY), e.addClass(k.PLAYING), e.state < B.RUNNING && (M.logInfo(">>>>playPromise.then"), e.setState(B.RUNNING), e.emit(Ae));
|
|
4953
4953
|
}).catch(function(n) {
|
|
4954
|
-
if (
|
|
4954
|
+
if (M.logWarn(">>>>playPromise.catch", n.name), e.media && e.media.error) {
|
|
4955
4955
|
e.onError(), e.removeClass(k.ENTER);
|
|
4956
4956
|
return;
|
|
4957
4957
|
}
|
|
4958
4958
|
n.name === "NotAllowedError" && (e._errorTimer = f.setTimeout(e, function() {
|
|
4959
|
-
e._errorTimer = null, e.emit(ei), e.addClass(k.NOT_ALLOW_AUTOPLAY), e.removeClass(k.ENTER), e.pause(), e.setState(
|
|
4959
|
+
e._errorTimer = null, e.emit(ei), e.addClass(k.NOT_ALLOW_AUTOPLAY), e.removeClass(k.ENTER), e.pause(), e.setState(B.NOTALLOW);
|
|
4960
4960
|
}, 0));
|
|
4961
|
-
}) : (
|
|
4961
|
+
}) : (M.logWarn("video.play not return promise"), this.state < B.RUNNING && (this.setState(B.RUNNING), this.removeClass(k.NOT_ALLOW_AUTOPLAY), this.removeClass(k.NO_START), this.removeClass(k.ENTER), this.addClass(k.PLAYING), this.emit(Ae))), i;
|
|
4962
4962
|
}
|
|
4963
4963
|
}, {
|
|
4964
4964
|
key: "mediaPause",
|
|
@@ -5004,7 +5004,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5004
5004
|
n._isPauseBeforeSeek > 1 || n.paused ? n.pause() : n.play();
|
|
5005
5005
|
}
|
|
5006
5006
|
n._isPauseBeforeSeek = 0, n._onceSeekCanplay = null;
|
|
5007
|
-
}, this.once(me, this._onceSeekCanplay), this.state <
|
|
5007
|
+
}, this.once(me, this._onceSeekCanplay), this.state < B.RUNNING ? (this.removeClass(k.NO_START), this.currentTime = e, this.play()) : this.currentTime = e;
|
|
5008
5008
|
}
|
|
5009
5009
|
}
|
|
5010
5010
|
}, {
|
|
@@ -5291,7 +5291,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5291
5291
|
}, {
|
|
5292
5292
|
key: "onPlay",
|
|
5293
5293
|
value: function() {
|
|
5294
|
-
this.state ===
|
|
5294
|
+
this.state === B.ENDED && this.setState(B.RUNNING), this.removeClass(k.PAUSED), this.ended && this.removeClass(k.ENDED), !this.config.closePlayVideoFocus && this.focus();
|
|
5295
5295
|
}
|
|
5296
5296
|
}, {
|
|
5297
5297
|
key: "onPause",
|
|
@@ -5301,7 +5301,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5301
5301
|
}, {
|
|
5302
5302
|
key: "onEnded",
|
|
5303
5303
|
value: function() {
|
|
5304
|
-
this.updateAcc("ended"), this.addClass(k.ENDED), this.setState(
|
|
5304
|
+
this.updateAcc("ended"), this.addClass(k.ENDED), this.setState(B.ENDED);
|
|
5305
5305
|
}
|
|
5306
5306
|
}, {
|
|
5307
5307
|
key: "onError",
|
|
@@ -5339,7 +5339,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5339
5339
|
}, {
|
|
5340
5340
|
key: "onTimeupdate",
|
|
5341
5341
|
value: function() {
|
|
5342
|
-
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(k.LOADING)) && this.media.readyState > 2 && (this.removeClass(k.LOADING), f.clearTimeout(this, this.waitTimer), this.waitTimer = null), !this.paused && this.state ===
|
|
5342
|
+
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(k.LOADING)) && this.media.readyState > 2 && (this.removeClass(k.LOADING), f.clearTimeout(this, this.waitTimer), this.waitTimer = null), !this.paused && this.state === B.NOTALLOW && this.duration && (this.setState(B.RUNNING), this.emit(Ae)), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
5343
5343
|
}
|
|
5344
5344
|
}, {
|
|
5345
5345
|
key: "onVolumechange",
|
|
@@ -5398,13 +5398,13 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5398
5398
|
this.videoPos.pi = c, u = u < 0 ? 0 : u;
|
|
5399
5399
|
var h = {
|
|
5400
5400
|
rotate: u
|
|
5401
|
-
}, d = 0, g = 0, p = 1, m = Math.abs(u / 90), _ = this.root,
|
|
5401
|
+
}, d = 0, g = 0, p = 1, m = Math.abs(u / 90), _ = this.root, w = this.innerContainer, b = _.offsetWidth, C = w ? w.offsetHeight : _.offsetHeight, F = C, R = b;
|
|
5402
5402
|
if (m % 2 === 0)
|
|
5403
|
-
p = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = p, d = i > 0 ? (100 - s) / 2 - i : 0, h.y = m === 2 ? 0 - d : d, g = n > 0 ? (100 - l) / 2 - n : 0, h.x = m === 2 ? 0 - g : g, this.media.style.width = "".concat(
|
|
5403
|
+
p = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = p, d = i > 0 ? (100 - s) / 2 - i : 0, h.y = m === 2 ? 0 - d : d, g = n > 0 ? (100 - l) / 2 - n : 0, h.x = m === 2 ? 0 - g : g, this.media.style.width = "".concat(R, "px"), this.media.style.height = "".concat(F, "px");
|
|
5404
5404
|
else if (m % 2 === 1) {
|
|
5405
|
-
|
|
5406
|
-
var z =
|
|
5407
|
-
g = -z / 2 /
|
|
5405
|
+
R = C, F = b;
|
|
5406
|
+
var z = C - b;
|
|
5407
|
+
g = -z / 2 / R * 100, h.x = m === 3 ? g + i / 2 : g - i / 2, d = z / 2 / F * 100, h.y = m === 3 ? d + n / 2 : d - n / 2, h.scale = p, this.media.style.width = "".concat(R, "px"), this.media.style.height = "".concat(F, "px");
|
|
5408
5408
|
}
|
|
5409
5409
|
var D = f.getTransformStyle(h, this.media.style.transform || this.media.style.webkitTransform);
|
|
5410
5410
|
this.media.style.transform = D, this.media.style.webkitTransform = D;
|
|
@@ -5455,18 +5455,18 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5455
5455
|
var n = this.media, s = n.videoWidth, l = n.videoHeight, u = this.config, c = u.fitVideoSize, h = u.videoFillMode;
|
|
5456
5456
|
if ((h === "fill" || h === "cover" || h === "contain") && this.setAttribute("data-xgfill", h), !(!l || !s)) {
|
|
5457
5457
|
this._videoHeight = l, this._videoWidth = s;
|
|
5458
|
-
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, g = i.width, p = i.height - d, m = parseInt(s / l * 1e3, 10), _ = parseInt(g / p * 1e3, 10),
|
|
5459
|
-
c === "auto" && _ > m || c === "fixWidth" ? (b = g / m * 1e3, this.config.fluid ?
|
|
5460
|
-
e.root.style[
|
|
5458
|
+
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, g = i.width, p = i.height - d, m = parseInt(s / l * 1e3, 10), _ = parseInt(g / p * 1e3, 10), w = g, b = p, C = {};
|
|
5459
|
+
c === "auto" && _ > m || c === "fixWidth" ? (b = g / m * 1e3, this.config.fluid ? C.paddingTop = "".concat(b * 100 / w, "%") : C.height = "".concat(b + d, "px")) : (c === "auto" && _ < m || c === "fixHeight") && (w = m * p / 1e3, C.width = "".concat(w, "px")), !this.fullscreen && !this.cssfullscreen && Object.keys(C).forEach(function(R) {
|
|
5460
|
+
e.root.style[R] = C[R];
|
|
5461
5461
|
}), (h === "fillHeight" && _ < m || h === "fillWidth" && _ > m) && this.setAttribute("data-xgfill", "cover");
|
|
5462
|
-
var
|
|
5462
|
+
var F = {
|
|
5463
5463
|
videoScale: m,
|
|
5464
|
-
vWidth:
|
|
5464
|
+
vWidth: w,
|
|
5465
5465
|
vHeight: b,
|
|
5466
|
-
cWidth:
|
|
5466
|
+
cWidth: w,
|
|
5467
5467
|
cHeight: b + d
|
|
5468
5468
|
};
|
|
5469
|
-
this.resizePosition(), this.emit(we,
|
|
5469
|
+
this.resizePosition(), this.emit(we, F);
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
5472
5472
|
}
|
|
@@ -5483,7 +5483,7 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5483
5483
|
}, {
|
|
5484
5484
|
key: "setState",
|
|
5485
5485
|
value: function(e) {
|
|
5486
|
-
|
|
5486
|
+
M.logInfo("setState", "state from:".concat(Ei[this.state], " to:").concat(Ei[e])), this._state = e;
|
|
5487
5487
|
}
|
|
5488
5488
|
}, {
|
|
5489
5489
|
key: "_preProcessUrl",
|
|
@@ -5514,15 +5514,15 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5514
5514
|
return this._hasStart;
|
|
5515
5515
|
},
|
|
5516
5516
|
set: function(e) {
|
|
5517
|
-
typeof e == "boolean" && (this._hasStart = e, e === !1 && this.setState(
|
|
5517
|
+
typeof e == "boolean" && (this._hasStart = e, e === !1 && this.setState(B.READY), this.emit("hasstart"));
|
|
5518
5518
|
}
|
|
5519
5519
|
}, {
|
|
5520
5520
|
key: "isPlaying",
|
|
5521
5521
|
get: function() {
|
|
5522
|
-
return this._state ===
|
|
5522
|
+
return this._state === B.RUNNING || this._state === B.ENDED;
|
|
5523
5523
|
},
|
|
5524
5524
|
set: function(e) {
|
|
5525
|
-
e ? this.setState(
|
|
5525
|
+
e ? this.setState(B.RUNNING) : this._state >= B.RUNNING && this.setState(B.ATTACHED);
|
|
5526
5526
|
}
|
|
5527
5527
|
}, {
|
|
5528
5528
|
key: "definitionList",
|
|
@@ -5716,10 +5716,10 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5716
5716
|
}], [{
|
|
5717
5717
|
key: "debugger",
|
|
5718
5718
|
get: function() {
|
|
5719
|
-
return
|
|
5719
|
+
return M.config.debug;
|
|
5720
5720
|
},
|
|
5721
5721
|
set: function(e) {
|
|
5722
|
-
|
|
5722
|
+
M.config.debug = e;
|
|
5723
5723
|
}
|
|
5724
5724
|
}, {
|
|
5725
5725
|
key: "instManager",
|
|
@@ -5744,12 +5744,12 @@ var lo = ["play", "pause", "replay", "retry"], Si = 0, xi = 0, _e = null, bt = /
|
|
|
5744
5744
|
}, {
|
|
5745
5745
|
key: "isHevcSupported",
|
|
5746
5746
|
value: function() {
|
|
5747
|
-
return
|
|
5747
|
+
return O.isHevcSupported();
|
|
5748
5748
|
}
|
|
5749
5749
|
}, {
|
|
5750
5750
|
key: "probeConfigSupported",
|
|
5751
5751
|
value: function(e) {
|
|
5752
|
-
return
|
|
5752
|
+
return O.probeConfigSupported(e);
|
|
5753
5753
|
}
|
|
5754
5754
|
}, {
|
|
5755
5755
|
key: "install",
|
|
@@ -5786,9 +5786,9 @@ var Ce = {
|
|
|
5786
5786
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
5787
5787
|
i[n] = arguments[n];
|
|
5788
5788
|
return t = o.call.apply(o, [this].concat(i)), y(v(t), "_onTimeupdate", function() {
|
|
5789
|
-
t._state.isTimeUpdate = !0, t._state.autoplayStart && (
|
|
5789
|
+
t._state.isTimeUpdate = !0, t._state.autoplayStart && (M.logInfo("[xgLogger]".concat(t.player.playerId, " _onTimeupdate")), t._sendFF("onTimeupdate"));
|
|
5790
5790
|
}), y(v(t), "_onAutoplayStart", function() {
|
|
5791
|
-
|
|
5791
|
+
M.logInfo("[xgLogger]".concat(t.player.playerId, " _onAutoplayStart")), t._state.autoplayStart = !0, t.vt && t._sendFF("onAutoplayStart");
|
|
5792
5792
|
}), y(v(t), "_onReset", function() {
|
|
5793
5793
|
t._state = {
|
|
5794
5794
|
autoplayStart: !1,
|
|
@@ -5831,17 +5831,17 @@ var Ce = {
|
|
|
5831
5831
|
var e = this;
|
|
5832
5832
|
this._onReset(), this._waitType = "firstFrame", this._initOnceEvents(), this.newPointTime = $(), this.loadedCostTime = 0, this.startCostTime = 0, this.on(Zt, function() {
|
|
5833
5833
|
var i = e._state, n = i.autoplayStart, s = i.isFFSend;
|
|
5834
|
-
e.startCostTime = $() - e.newPointTime,
|
|
5834
|
+
e.startCostTime = $() - e.newPointTime, M.logInfo("[xgLogger]".concat(e.player.playerId, " LOAD_START"), "autoplayStart:".concat(n, " isFFSend:").concat(s, " startCostTime:").concat(e.startCostTime, " newPointTime").concat(e.newPointTime)), !s && (!i.isLs && e.emitLog(Ce.LOAD_START, {}), i.isLs = !0, i.isTimeUpdate = !1, i.isFFLoading = !0, e.pt = $(), e.vt = 0, e.fvt = 0, e._initOnceEvents(), e._onWaitingLoadStart());
|
|
5835
5835
|
}), this.on(ye, function() {
|
|
5836
5836
|
e.vt = $(), e.fvt = e.vt - e.pt, e.loadedCostTime = e.vt - e.newPointTime;
|
|
5837
5837
|
var i = e._state, n = i.isTimeUpdate, s = i.isFFSend, l = i.autoplayStart;
|
|
5838
|
-
|
|
5838
|
+
M.logInfo("[xgLogger]".concat(e.player.playerId, " LOADED_DATA"), "fvt:".concat(e.fvt, " isTimeUpdate:").concat(e._state.isTimeUpdate, " loadedCostTime:").concat(e.loadedCostTime)), (n || l) && e._sendFF("loadedData"), s || e.emitLog(Ce.LOADED_DATA, {}), e.suspendWaitingStatus("loadeddata");
|
|
5839
5839
|
}), this.on(_t, this._onSeeking), this.on(me, this._onSeeked), this.on(ti, function() {
|
|
5840
5840
|
e.endState("destroy");
|
|
5841
5841
|
}), this.on(kt, function() {
|
|
5842
|
-
e.endState("urlChange"),
|
|
5842
|
+
e.endState("urlChange"), M.logInfo("[xgLogger]".concat(e.player.playerId, " URL_CHANGE")), e._state.isFFSend && e._onReset();
|
|
5843
5843
|
}), this.on([qt, ve], this._onPlaying), this.on(it, this._onWaiting), this.on(tt, this._onError), this.on(wt, function() {
|
|
5844
|
-
|
|
5844
|
+
M.logInfo("[xgLogger]".concat(e.player.playerId, " RESET")), e.endState("reset"), e._initOnceEvents(), e._onReset();
|
|
5845
5845
|
});
|
|
5846
5846
|
}
|
|
5847
5847
|
}, {
|
|
@@ -5854,7 +5854,7 @@ var Ce = {
|
|
|
5854
5854
|
value: function(e) {
|
|
5855
5855
|
this.s = $();
|
|
5856
5856
|
var i = this._state, n = i.isFFLoading, s = i.isFFSend;
|
|
5857
|
-
|
|
5857
|
+
M.logInfo("[xgLogger]".concat(this.player.playerId, " _sendFF"), "".concat(e, " fvt:").concat(this.fvt, " isFFLoading:").concat(n, " !isFFSend:").concat(!s)), this.vt > 0 && n && !s && (M.logInfo("[xgLogger]".concat(this.player.playerId, " emitLog_firstFrame"), e), this._state.isFFLoading = !1, this._state.isFFSend = !0, this.emitLog(Ce.FIRST_FRAME, {
|
|
5858
5858
|
fvt: this.fvt,
|
|
5859
5859
|
costTime: this.fvt,
|
|
5860
5860
|
vt: this.vt,
|
|
@@ -6270,16 +6270,16 @@ var po = /* @__PURE__ */ function(a) {
|
|
|
6270
6270
|
key: "switchPausePlay",
|
|
6271
6271
|
value: function(e) {
|
|
6272
6272
|
var i = this.player;
|
|
6273
|
-
if (e.cancelable && e.preventDefault(), e.stopPropagation(), !(i.state <
|
|
6273
|
+
if (e.cancelable && e.preventDefault(), e.stopPropagation(), !(i.state < B.READY)) {
|
|
6274
6274
|
var n = this.player.paused;
|
|
6275
|
-
!n && i.state ===
|
|
6275
|
+
!n && i.state === B.RUNNING ? i.pause() : i.play();
|
|
6276
6276
|
}
|
|
6277
6277
|
}
|
|
6278
6278
|
}, {
|
|
6279
6279
|
key: "onPlayPause",
|
|
6280
6280
|
value: function(e) {
|
|
6281
6281
|
var i = this.config, n = this.player;
|
|
6282
|
-
if (!(!n || n.state <
|
|
6282
|
+
if (!(!n || n.state < B.RUNNING || !this.autoPlayStart)) {
|
|
6283
6283
|
if (i.mode === "show") {
|
|
6284
6284
|
this.switchStatus(), this.show();
|
|
6285
6285
|
return;
|
|
@@ -6913,7 +6913,7 @@ var Dt = {
|
|
|
6913
6913
|
e.__hooks[n] = null;
|
|
6914
6914
|
});
|
|
6915
6915
|
var i = this.playerConfig.isMobileSimulateMode;
|
|
6916
|
-
i === "mobile" ||
|
|
6916
|
+
i === "mobile" || O.device === "mobile" && !O.os.isIpad || this.initEvents();
|
|
6917
6917
|
}
|
|
6918
6918
|
}, {
|
|
6919
6919
|
key: "initEvents",
|
|
@@ -7124,12 +7124,12 @@ var Ne = {
|
|
|
7124
7124
|
if (!(!n || u.disableGesture || !e.duration || !l.isStart)) {
|
|
7125
7125
|
var h = u.miniMoveStep, d = u.hideControlsActive, g = parseInt(n.pageX - l.left, 10), p = parseInt(n.pageY - l.top, 10), m = c.rotateDeg === 90 ? p : g, _ = c.rotateDeg === 90 ? g : p;
|
|
7126
7126
|
if (Math.abs(m - l.x) > h || Math.abs(_ - l.y) > h) {
|
|
7127
|
-
var
|
|
7128
|
-
if (
|
|
7127
|
+
var w = m - l.x, b = _ - l.y, C = l.scope;
|
|
7128
|
+
if (C === -1 && (C = e.checkScope(m, _, w, b, l), C === 0 && (d ? c.blur() : c.focus({
|
|
7129
7129
|
autoHide: !1
|
|
7130
|
-
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope =
|
|
7130
|
+
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope = C), C === -1 || C > 0 && !u.gestureY || C === 0 && !u.gestureX)
|
|
7131
7131
|
return;
|
|
7132
|
-
e.executeMove(
|
|
7132
|
+
e.executeMove(w, b, C, l.width, l.height), l.x = m, l.y = _;
|
|
7133
7133
|
}
|
|
7134
7134
|
}
|
|
7135
7135
|
}), y(v(e), "onTouchEnd", function(i) {
|
|
@@ -7316,7 +7316,7 @@ var Ne = {
|
|
|
7316
7316
|
this.updateBrightness(i / l);
|
|
7317
7317
|
break;
|
|
7318
7318
|
case 2:
|
|
7319
|
-
|
|
7319
|
+
O.os.isIos || this.updateVolume(i / l);
|
|
7320
7320
|
break;
|
|
7321
7321
|
}
|
|
7322
7322
|
}
|
|
@@ -7353,7 +7353,7 @@ var Ne = {
|
|
|
7353
7353
|
key: "clickHandler",
|
|
7354
7354
|
value: function(e) {
|
|
7355
7355
|
var i = this.player, n = this.config, s = this.playerConfig;
|
|
7356
|
-
if (i.state <
|
|
7356
|
+
if (i.state < B.RUNNING) {
|
|
7357
7357
|
s.closeVideoClick || (this.sendUseAction(f.createEvent("click")), i.play());
|
|
7358
7358
|
return;
|
|
7359
7359
|
}
|
|
@@ -7363,7 +7363,7 @@ var Ne = {
|
|
|
7363
7363
|
key: "dbClickHandler",
|
|
7364
7364
|
value: function(e) {
|
|
7365
7365
|
var i = this.config, n = this.player;
|
|
7366
|
-
!i.closedbClick && n.state >=
|
|
7366
|
+
!i.closedbClick && n.state >= B.RUNNING && (this.sendUseAction(f.createEvent("dblclick")), this.switchPlayPause());
|
|
7367
7367
|
}
|
|
7368
7368
|
}, {
|
|
7369
7369
|
key: "onClick",
|
|
@@ -7452,7 +7452,7 @@ var Ne = {
|
|
|
7452
7452
|
key: "switchPlayPause",
|
|
7453
7453
|
value: function() {
|
|
7454
7454
|
var e = this.player;
|
|
7455
|
-
if (e.state <
|
|
7455
|
+
if (e.state < B.ATTACHED)
|
|
7456
7456
|
return !1;
|
|
7457
7457
|
e.ended || (e.paused ? e.play() : e.pause());
|
|
7458
7458
|
}
|
|
@@ -8239,7 +8239,7 @@ var Io = /* @__PURE__ */ function(a) {
|
|
|
8239
8239
|
fragAutoFocus: s,
|
|
8240
8240
|
fragClass: l,
|
|
8241
8241
|
style: this.playerConfig.commonStyle || {}
|
|
8242
|
-
}),
|
|
8242
|
+
}), O.device === "mobile" && (this.config.isDragingSeek = !1, this.isMobile = !0), this.progressBtn = this.find(".xgplayer-progress-btn"), this.on(Te, function() {
|
|
8243
8243
|
e.onMouseLeave();
|
|
8244
8244
|
}), this.on(ie, function() {
|
|
8245
8245
|
e.onTimeupdate();
|
|
@@ -8356,10 +8356,10 @@ var Io = /* @__PURE__ */ function(a) {
|
|
|
8356
8356
|
m = m > d ? d : m < 0 ? 0 : m;
|
|
8357
8357
|
var _ = m / d;
|
|
8358
8358
|
_ = _ < 0 ? 0 : _ > 1 ? 1 : _;
|
|
8359
|
-
var
|
|
8359
|
+
var w = parseInt(_ * this.offsetDuration * 1e3, 10) / 1e3, b = f.getCurrentTimeByOffset(w, n.timeSegments);
|
|
8360
8360
|
return {
|
|
8361
8361
|
percent: _,
|
|
8362
|
-
currentTime:
|
|
8362
|
+
currentTime: w,
|
|
8363
8363
|
seekTime: b,
|
|
8364
8364
|
offset: m,
|
|
8365
8365
|
width: d,
|
|
@@ -8732,7 +8732,7 @@ var Bo = /* @__PURE__ */ function(a) {
|
|
|
8732
8732
|
}
|
|
8733
8733
|
}
|
|
8734
8734
|
}
|
|
8735
|
-
})),
|
|
8735
|
+
})), O.device === "mobile" && window.addEventListener("orientationchange", this._onOrientationChange);
|
|
8736
8736
|
}
|
|
8737
8737
|
}
|
|
8738
8738
|
}, {
|
|
@@ -8752,7 +8752,7 @@ var Bo = /* @__PURE__ */ function(a) {
|
|
|
8752
8752
|
}, {
|
|
8753
8753
|
key: "destroy",
|
|
8754
8754
|
value: function() {
|
|
8755
|
-
A(I(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon",
|
|
8755
|
+
A(I(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon", O.device === "mobile" ? "touchend" : "click", this.handleFullscreen), O.device === "mobile" && window.removeEventListener("orientationchange", this._onOrientationChange);
|
|
8756
8756
|
}
|
|
8757
8757
|
}, {
|
|
8758
8758
|
key: "initIcons",
|
|
@@ -9212,7 +9212,7 @@ var Wo = /* @__PURE__ */ function(a) {
|
|
|
9212
9212
|
pre: function(u) {
|
|
9213
9213
|
u.preventDefault(), u.stopPropagation();
|
|
9214
9214
|
}
|
|
9215
|
-
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave),
|
|
9215
|
+
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave), O.device !== "mobile" && this.playerConfig.isMobileSimulateMode !== "mobile" && (this.bind("mouseenter", this._onMouseenterHandler), this.bind(["blur", "mouseleave"], this._onMouseleaveHandler), this.bind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.bind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.bind(".xgplayer-slider", "mouseup", this.onBarMouseUp)), this.bind(".xgplayer-icon", ["touchend", "click"], this.changeMutedHandler), this.on(Xi, this.onVolumeChange), this.once(ye, this.onVolumeChange), f.typeOf(s) !== "Number" && (this.player.volume = this.config.default), this.onVolumeChange();
|
|
9216
9216
|
}
|
|
9217
9217
|
}
|
|
9218
9218
|
}, {
|
|
@@ -9290,7 +9290,7 @@ var Wo = /* @__PURE__ */ function(a) {
|
|
|
9290
9290
|
}, {
|
|
9291
9291
|
key: "destroy",
|
|
9292
9292
|
value: function() {
|
|
9293
|
-
this._timerId && (f.clearTimeout(this, this._timerId), this._timerId = null), this.unbind("mouseenter", this.onMouseenter), this.unbind(["blur", "mouseleave"], this.onMouseleave), this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp), document.removeEventListener("mouseup", this.onBarMouseUp), this.unbind(".xgplayer-icon",
|
|
9293
|
+
this._timerId && (f.clearTimeout(this, this._timerId), this._timerId = null), this.unbind("mouseenter", this.onMouseenter), this.unbind(["blur", "mouseleave"], this.onMouseleave), this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp), document.removeEventListener("mouseup", this.onBarMouseUp), this.unbind(".xgplayer-icon", O.device === "mobile" ? "touchend" : "click", this.changeMutedHandler);
|
|
9294
9294
|
}
|
|
9295
9295
|
}, {
|
|
9296
9296
|
key: "render",
|
|
@@ -9381,17 +9381,17 @@ var Ko = /* @__PURE__ */ function(a) {
|
|
|
9381
9381
|
this.player.videoRotateDeg = e;
|
|
9382
9382
|
return;
|
|
9383
9383
|
}
|
|
9384
|
-
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, g = c && i ? c.offsetHeight : u.offsetHeight, p = s, m = l, _ = 0,
|
|
9385
|
-
(e === 0.75 || e === 0.25) && (p = "".concat(g, "px"), m = "".concat(d, "px"), _ = -(g - d) / 2,
|
|
9386
|
-
var b = "translate(".concat(_, "px,").concat(
|
|
9384
|
+
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, g = c && i ? c.offsetHeight : u.offsetHeight, p = s, m = l, _ = 0, w = 0;
|
|
9385
|
+
(e === 0.75 || e === 0.25) && (p = "".concat(g, "px"), m = "".concat(d, "px"), _ = -(g - d) / 2, w = -(d - g) / 2);
|
|
9386
|
+
var b = "translate(".concat(_, "px,").concat(w, "px) rotate(").concat(e, "turn)"), C = {
|
|
9387
9387
|
transformOrigin: "center center",
|
|
9388
9388
|
transform: b,
|
|
9389
9389
|
webKitTransform: b,
|
|
9390
9390
|
height: m,
|
|
9391
9391
|
width: p
|
|
9392
|
-
},
|
|
9393
|
-
Object.keys(
|
|
9394
|
-
|
|
9392
|
+
}, F = i ? h : u, R = i ? n.getPlugin("poster") : null;
|
|
9393
|
+
Object.keys(C).map(function(z) {
|
|
9394
|
+
F.style[z] = C[z], R && R.root && (R.root.style[z] = C[z]);
|
|
9395
9395
|
});
|
|
9396
9396
|
}
|
|
9397
9397
|
}, {
|
|
@@ -9566,18 +9566,18 @@ var Be = {
|
|
|
9566
9566
|
documentPictureInPicture.requestWindow(u).then(function(h) {
|
|
9567
9567
|
var d = s.docPiPNode, g = s.docPiPStyle;
|
|
9568
9568
|
e.enterPIPCallback();
|
|
9569
|
-
var p = d || i.root, m = p.parentElement, _ = p.previousSibling,
|
|
9569
|
+
var p = d || i.root, m = p.parentElement, _ = p.previousSibling, w = p.nextSibling;
|
|
9570
9570
|
e.copyStyleIntoPiPWindow(h);
|
|
9571
9571
|
var b = document.createElement("style");
|
|
9572
9572
|
if (b.append("body{padding:0; margin:0;}"), g) {
|
|
9573
|
-
var
|
|
9574
|
-
typeof g == "string" ?
|
|
9573
|
+
var C = "";
|
|
9574
|
+
typeof g == "string" ? C = g : typeof g == "function" && (C = g.call(s)), C && b.append(C);
|
|
9575
9575
|
} else
|
|
9576
9576
|
p === i.root && b.append(`
|
|
9577
9577
|
.xgplayer{width: 100%!important; height: 100%!important;}
|
|
9578
9578
|
`);
|
|
9579
|
-
h.document.head.append(b), h.document.body.append(p), h.addEventListener("pagehide", function(
|
|
9580
|
-
m && (
|
|
9579
|
+
h.document.head.append(b), h.document.body.append(p), h.addEventListener("pagehide", function(F) {
|
|
9580
|
+
m && (w ? m.insertBefore(p, w) : _ ? m.insertBefore(p, _.nextSibling) : m.appendChild(p)), e.leavePIPCallback();
|
|
9581
9581
|
}, {
|
|
9582
9582
|
once: !0
|
|
9583
9583
|
});
|
|
@@ -9695,7 +9695,7 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9695
9695
|
key: "initEvents",
|
|
9696
9696
|
value: function() {
|
|
9697
9697
|
this.nextHandler = this.hook("nextClick", this.changeSrc);
|
|
9698
|
-
var e =
|
|
9698
|
+
var e = O.device === "mobile" ? "touchend" : "click";
|
|
9699
9699
|
this.bind(e, this.playNext), this.show();
|
|
9700
9700
|
}
|
|
9701
9701
|
}, {
|
|
@@ -9747,29 +9747,29 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9747
9747
|
return String(D);
|
|
9748
9748
|
}, g = n.Blob || n.MozBlob || n.WebKitBlob || d, p = e || "download", m, _;
|
|
9749
9749
|
if (g = g.call ? g.bind(n) : Blob, String(this) === "true" && (u = [u, l], l = u[0], u = u[1]), c && c.length < 2048 && (p = c.split("/").pop().split("?")[0], h.href = c, h.href.indexOf(c) !== -1)) {
|
|
9750
|
-
var
|
|
9751
|
-
return
|
|
9750
|
+
var w = new XMLHttpRequest();
|
|
9751
|
+
return w.open("GET", c, !0), w.responseType = "blob", w.onload = function(D) {
|
|
9752
9752
|
r(D.target.response, p, s);
|
|
9753
9753
|
}, setTimeout(function() {
|
|
9754
|
-
|
|
9755
|
-
}, 0),
|
|
9754
|
+
w.send();
|
|
9755
|
+
}, 0), w;
|
|
9756
9756
|
}
|
|
9757
9757
|
if (/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))
|
|
9758
9758
|
if (u.length > 1024 * 1024 * 1.999 && g !== d)
|
|
9759
|
-
u =
|
|
9759
|
+
u = R(u), l = u.type || s;
|
|
9760
9760
|
else
|
|
9761
9761
|
return navigator.msSaveBlob ? (
|
|
9762
9762
|
// IE10 can't do a[download], only Blobs:
|
|
9763
|
-
navigator.msSaveBlob(
|
|
9763
|
+
navigator.msSaveBlob(R(u), p)
|
|
9764
9764
|
) : z(u);
|
|
9765
9765
|
else if (/([\x80-\xff])/.test(u)) {
|
|
9766
|
-
var b = 0,
|
|
9767
|
-
for (b; b <
|
|
9768
|
-
|
|
9769
|
-
u = new g([
|
|
9766
|
+
var b = 0, C = new Uint8Array(u.length), F = C.length;
|
|
9767
|
+
for (b; b < F; ++b)
|
|
9768
|
+
C[b] = u.charCodeAt(b);
|
|
9769
|
+
u = new g([C], { type: l });
|
|
9770
9770
|
}
|
|
9771
9771
|
m = u instanceof g ? u : new g([u], { type: l });
|
|
9772
|
-
function
|
|
9772
|
+
function R(D) {
|
|
9773
9773
|
var q = D.split(/[:;,]/), G = q[1], H = q[2] == "base64" ? atob : decodeURIComponent, ee = H(q.pop()), re = ee.length, se = 0, Se = new Uint8Array(re);
|
|
9774
9774
|
for (se; se < re; ++se)
|
|
9775
9775
|
Se[se] = ee.charCodeAt(se);
|
|
@@ -9972,8 +9972,8 @@ var ta = /* @__PURE__ */ function(a) {
|
|
|
9972
9972
|
p = u.media.canvas;
|
|
9973
9973
|
else {
|
|
9974
9974
|
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i), p = n.canvas, m = n.canvasCtx;
|
|
9975
|
-
var _ = u.media.videoWidth / u.media.videoHeight,
|
|
9976
|
-
_ >
|
|
9975
|
+
var _ = u.media.videoWidth / u.media.videoHeight, w = p.width / p.height, b = 0, C = 0, F = u.media.videoWidth, R = u.media.videoHeight, z, D, q, G;
|
|
9976
|
+
_ > w ? (q = p.width, G = p.width / _, z = 0, D = Math.round((p.height - G) / 2)) : _ === w ? (q = p.width, G = p.height, z = 0, D = 0) : _ < w && (q = p.height * _, G = p.height, z = Math.round((p.width - q) / 2), D = 0), m.drawImage(u.media, b, C, F, R, z, D, q, G);
|
|
9977
9977
|
}
|
|
9978
9978
|
var H = p.toDataURL(h, c).replace(h, "image/octet-stream");
|
|
9979
9979
|
H = H.replace(/^data:image\/[^;]+/, "data:application/octet-stream"), d(H);
|
|
@@ -10110,7 +10110,7 @@ var ta = /* @__PURE__ */ function(a) {
|
|
|
10110
10110
|
function ra(a, o) {
|
|
10111
10111
|
return a === ce.SIDE ? o === V.CONTROLS_LEFT ? "xg-side-list xg-left-side" : "xg-side-list xg-right-side" : "";
|
|
10112
10112
|
}
|
|
10113
|
-
var xe =
|
|
10113
|
+
var xe = O.device === "mobile", mt = /* @__PURE__ */ function(a) {
|
|
10114
10114
|
x(r, a);
|
|
10115
10115
|
var o = P(r);
|
|
10116
10116
|
function r(t) {
|
|
@@ -10142,7 +10142,7 @@ var xe = R.device === "mobile", mt = /* @__PURE__ */ function(a) {
|
|
|
10142
10142
|
key: "afterCreate",
|
|
10143
10143
|
value: function() {
|
|
10144
10144
|
var e = this, i = this.config;
|
|
10145
|
-
this.initIcons(), xe = xe || this.domEventType === "touch", xe &&
|
|
10145
|
+
this.initIcons(), xe = xe || this.domEventType === "touch", xe && O.device === "mobile" && i.listType === ce.DEFAULT && (i.listType = ce.SIDE), i.hidePortrait && f.addClass(this.root, "portrait"), this.on([we, ge], function() {
|
|
10146
10146
|
e._resizeList();
|
|
10147
10147
|
}), this.once(ve, function() {
|
|
10148
10148
|
i.list && i.list.length > 0 && (e.renderItemList(i.list), e.show());
|
|
@@ -10972,7 +10972,7 @@ var Ue = {
|
|
|
10972
10972
|
var e = this, i = this.player.plugins.progress;
|
|
10973
10973
|
if (i && (Object.keys(Ue).map(function(s) {
|
|
10974
10974
|
e[Ue[s]] = e[Ue[s]].bind(e), i.addCallBack(s, e[Ue[s]]);
|
|
10975
|
-
}),
|
|
10975
|
+
}), O.device !== "mobile")) {
|
|
10976
10976
|
this.bind(".xg-spot-info", "mousemove", this.onMousemove), this.bind(".xg-spot-info", "mousedown", this.onMousedown), this.bind(".xg-spot-info", "mouseup", this.onMouseup);
|
|
10977
10977
|
var n = this.hook("previewClick", function() {
|
|
10978
10978
|
});
|
|
@@ -11048,7 +11048,7 @@ var Ue = {
|
|
|
11048
11048
|
key: "registerThumbnail",
|
|
11049
11049
|
value: function() {
|
|
11050
11050
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
11051
|
-
if (
|
|
11051
|
+
if (O.device !== "mobile") {
|
|
11052
11052
|
var i = this.player, n = this.config, s = i.getPlugin("thumbnail");
|
|
11053
11053
|
if (s && s.setConfig(e), !s || !s.usable || !n.isShowThumbnail) {
|
|
11054
11054
|
f.addClass(this.root, "short-line no-thumbnail");
|
|
@@ -11136,7 +11136,7 @@ var Ue = {
|
|
|
11136
11136
|
}, {
|
|
11137
11137
|
key: "render",
|
|
11138
11138
|
value: function() {
|
|
11139
|
-
return
|
|
11139
|
+
return O.device === "mobile" || this.playerConfig.isMobileSimulateMode === "mobile" ? "" : '<div class="xg-spot-info hide '.concat(this.config.mode === "short" ? "short-line" : "", `">
|
|
11140
11140
|
<div class="xg-spot-content">
|
|
11141
11141
|
<div class="xg-spot-thumbnail">
|
|
11142
11142
|
<span class="xg-spot-time"></span>
|
|
@@ -11236,26 +11236,26 @@ var Ue = {
|
|
|
11236
11236
|
this.interval = Math.round(this.player.duration / l);
|
|
11237
11237
|
var g = Math.ceil(e / this.interval);
|
|
11238
11238
|
g = g > l ? l : g;
|
|
11239
|
-
var p = g < u * c ? 0 : Math.ceil(g / (u * c)) - 1, m = g - p * (c * u), _ = m > 0 ? Math.ceil(m / c) - 1 : 0,
|
|
11239
|
+
var p = g < u * c ? 0 : Math.ceil(g / (u * c)) - 1, m = g - p * (c * u), _ = m > 0 ? Math.ceil(m / c) - 1 : 0, w = m > 0 ? m - _ * c - 1 : 0, b = 0, C = 0;
|
|
11240
11240
|
if (i && n) {
|
|
11241
|
-
var
|
|
11242
|
-
|
|
11241
|
+
var F = i / n;
|
|
11242
|
+
F < h / d ? (C = n, b = C * (h / d)) : (b = i, C = b / (h / d));
|
|
11243
11243
|
} else
|
|
11244
|
-
n ? i || (
|
|
11245
|
-
var
|
|
11244
|
+
n ? i || (C = n || d, b = C * (h / d)) : (b = i || h, C = b / (h / d));
|
|
11245
|
+
var R = this.getUrlByIndex(p);
|
|
11246
11246
|
return {
|
|
11247
11247
|
urlIndex: p,
|
|
11248
11248
|
rowIndex: _,
|
|
11249
|
-
colIndex:
|
|
11250
|
-
url:
|
|
11251
|
-
height:
|
|
11249
|
+
colIndex: w,
|
|
11250
|
+
url: R,
|
|
11251
|
+
height: C,
|
|
11252
11252
|
width: b,
|
|
11253
11253
|
style: {
|
|
11254
|
-
backgroundImage: "url(".concat(
|
|
11254
|
+
backgroundImage: "url(".concat(R, ")"),
|
|
11255
11255
|
backgroundSize: "".concat(b * c, "px auto"),
|
|
11256
|
-
backgroundPosition: "-".concat(
|
|
11256
|
+
backgroundPosition: "-".concat(w * b, "px -").concat(_ * C, "px"),
|
|
11257
11257
|
width: "".concat(b, "px"),
|
|
11258
|
-
height: "".concat(
|
|
11258
|
+
height: "".concat(C, "px")
|
|
11259
11259
|
}
|
|
11260
11260
|
};
|
|
11261
11261
|
}
|
|
@@ -11485,7 +11485,7 @@ var st = null, ma = /* @__PURE__ */ function(a) {
|
|
|
11485
11485
|
s || (s = n.isInnerRender && i.innerContainer || i.root), s.insertAdjacentHTML("afterbegin", '<div class="xgplayer-dynamic-bg" data-index="'.concat(n.index, `"><canvas>
|
|
11486
11486
|
</canvas><xgmask></xgmask></div>`)), this.root = s.children[0], this.canvas = this.find("canvas"), this.canvasFilter || (this.canvas.style.filter = n.filter, this.canvas.style.webkitFilter = n.filter), this.mask = this.find("xgmask"), n.addMask && (this.mask.style.background = n.maskBg), this.canvasCtx = this.canvas.getContext("2d");
|
|
11487
11487
|
} catch (l) {
|
|
11488
|
-
|
|
11488
|
+
M.logError("plugin:DynamicBg", l);
|
|
11489
11489
|
}
|
|
11490
11490
|
}
|
|
11491
11491
|
}, {
|
|
@@ -11510,7 +11510,7 @@ var st = null, ma = /* @__PURE__ */ function(a) {
|
|
|
11510
11510
|
if (!e)
|
|
11511
11511
|
return null;
|
|
11512
11512
|
var i = e && e instanceof window.HTMLVideoElement ? e : e.canvas ? e.canvas : e.flyVideo ? e.flyVideo : null;
|
|
11513
|
-
if (i && !(
|
|
11513
|
+
if (i && !(O.browser === "safari" && f.isMSE(i)))
|
|
11514
11514
|
return i;
|
|
11515
11515
|
var n = i ? i.tagName.toLowerCase() : "";
|
|
11516
11516
|
return n === "canvas" || n === "img" ? i : null;
|
|
@@ -11569,7 +11569,7 @@ var st = null, ma = /* @__PURE__ */ function(a) {
|
|
|
11569
11569
|
}
|
|
11570
11570
|
this.canvasFilter && (this.canvasCtx.filter = s.filter), this.canvasCtx.drawImage(e, n.x, n.y, n.rwidth, n.rheight);
|
|
11571
11571
|
} catch (p) {
|
|
11572
|
-
|
|
11572
|
+
M.logError("plugin:DynamicBg", p);
|
|
11573
11573
|
}
|
|
11574
11574
|
}
|
|
11575
11575
|
}, {
|
|
@@ -11612,7 +11612,7 @@ var st = null, ma = /* @__PURE__ */ function(a) {
|
|
|
11612
11612
|
}, {
|
|
11613
11613
|
key: "supportCanvasFilter",
|
|
11614
11614
|
value: function() {
|
|
11615
|
-
return !(
|
|
11615
|
+
return !(O.browser === "safari" || O.browser === "firefox");
|
|
11616
11616
|
}
|
|
11617
11617
|
}]), r;
|
|
11618
11618
|
}(U), ya = {
|
|
@@ -11856,8 +11856,8 @@ var st = null, ma = /* @__PURE__ */ function(a) {
|
|
|
11856
11856
|
console.log("GapJump bufferRange ", c.start(p), c.end(p));
|
|
11857
11857
|
var m = c.start(p) + 0.1, _ = l.media.duration;
|
|
11858
11858
|
if (!(m > _)) {
|
|
11859
|
-
var
|
|
11860
|
-
|
|
11859
|
+
var w = m - g, b = w <= h;
|
|
11860
|
+
w < r.BROWSER_GAP_TOLERANCE || b && (u.useGapJump !== !1 && (l.media.currentTime = t.isSafari ? m + 0.1 : m), t.player && t.player.emit("detectGap"), console.log("gapJump gapIndex", p, " isGapSamll:", b, " currentTime:", l.media.currentTime, " jumpSize:", g - l.media.currentTime), m !== 0.08 && l && l.emit("log", {
|
|
11861
11861
|
type: "oneevent",
|
|
11862
11862
|
end_type: "gap",
|
|
11863
11863
|
vid: l.config.vid,
|
|
@@ -12002,14 +12002,14 @@ var Ca = /* @__PURE__ */ function(a) {
|
|
|
12002
12002
|
try {
|
|
12003
12003
|
var g = (/* @__PURE__ */ new Date()).getTime(), p = null, m = new XMLHttpRequest();
|
|
12004
12004
|
t.xhr = m, m.open("GET", d);
|
|
12005
|
-
var _ = {},
|
|
12006
|
-
_.Range = "bytes=" +
|
|
12005
|
+
var _ = {}, w = Math.floor(Math.random() * 10);
|
|
12006
|
+
_.Range = "bytes=" + w + "-" + (u + w), _ && Object.keys(_).forEach(function(b) {
|
|
12007
12007
|
m.setRequestHeader(b, _[b]);
|
|
12008
12008
|
}), m.onreadystatechange = function() {
|
|
12009
12009
|
if (m.readyState === 4) {
|
|
12010
12010
|
t.xhr = null, p = (/* @__PURE__ */ new Date()).getTime();
|
|
12011
|
-
var b = m.getResponseHeader("Content-Length") / 1024 * 8,
|
|
12012
|
-
t.appendList(
|
|
12011
|
+
var b = m.getResponseHeader("Content-Length") / 1024 * 8, C = Math.round(b * 1e3 / (p - g));
|
|
12012
|
+
t.appendList(C), t.timer = setTimeout(t.testSpeed, h);
|
|
12013
12013
|
}
|
|
12014
12014
|
}, m.send();
|
|
12015
12015
|
} catch (b) {
|
|
@@ -12212,7 +12212,7 @@ var ba = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12212
12212
|
T(this, a);
|
|
12213
12213
|
var n = r && r.isMobileSimulateMode === "mobile", s = r.isLive, l = s ? [] : [Uo, Do, ga, ha, Ho], u = [].concat(l, [Ro, Bo, Ko, Zo, sa, oa, ta, ia, Wo, Xo]), c = [fo, ho, po, Io, vo, ua, ca, da, Co];
|
|
12214
12214
|
this.plugins = [_a, uo].concat(ae(u), c, [Cn, Ca]);
|
|
12215
|
-
var h = n ? "mobile" :
|
|
12215
|
+
var h = n ? "mobile" : O.device;
|
|
12216
12216
|
switch (h) {
|
|
12217
12217
|
case "pc":
|
|
12218
12218
|
(t = this.plugins).push.apply(t, [Fi, Ot, Ni, ka, wa]);
|
|
@@ -12223,7 +12223,7 @@ var ba = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12223
12223
|
default:
|
|
12224
12224
|
(i = this.plugins).push.apply(i, [Fi, Ot, Ni]);
|
|
12225
12225
|
}
|
|
12226
|
-
(
|
|
12226
|
+
(O.os.isIpad || h === "pc") && this.plugins.push(ma), O.os.isIpad && this.plugins.push(Ot), this.ignores = [], this.i18n = [];
|
|
12227
12227
|
}), ue = /* @__PURE__ */ function(a) {
|
|
12228
12228
|
x(r, a);
|
|
12229
12229
|
var o = P(r);
|
|
@@ -12234,7 +12234,7 @@ var ba = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12234
12234
|
}(bt);
|
|
12235
12235
|
y(ue, "defaultPreset", ba);
|
|
12236
12236
|
y(ue, "Util", f);
|
|
12237
|
-
y(ue, "Sniffer",
|
|
12237
|
+
y(ue, "Sniffer", O);
|
|
12238
12238
|
y(ue, "Errors", lt);
|
|
12239
12239
|
y(ue, "Events", Ns);
|
|
12240
12240
|
y(ue, "Plugin", U);
|
|
@@ -12451,55 +12451,56 @@ const Sa = /* @__PURE__ */ yt(Ea, [["__scopeId", "data-v-b301aa7d"]]), xa = De(S
|
|
|
12451
12451
|
default: !1
|
|
12452
12452
|
}
|
|
12453
12453
|
},
|
|
12454
|
-
|
|
12455
|
-
|
|
12454
|
+
emits: ["handPreview"],
|
|
12455
|
+
setup(a, { emit: o }) {
|
|
12456
|
+
const r = a, { cLoadUrl: t, cOnlyofficeConfig: e } = ji(r), i = o, n = Y(() => ({
|
|
12456
12457
|
name: "name",
|
|
12457
12458
|
url: "url",
|
|
12458
12459
|
suffix: "suffix",
|
|
12459
12460
|
size: "size",
|
|
12460
|
-
...
|
|
12461
|
-
})),
|
|
12462
|
-
var
|
|
12463
|
-
|
|
12464
|
-
...
|
|
12465
|
-
name:
|
|
12461
|
+
...r.field
|
|
12462
|
+
})), s = Ke({}), l = Ke(!1), u = (g) => {
|
|
12463
|
+
var p, m;
|
|
12464
|
+
s.value = {
|
|
12465
|
+
...g,
|
|
12466
|
+
name: g.name,
|
|
12466
12467
|
url: Qe(
|
|
12467
|
-
|
|
12468
|
-
|
|
12468
|
+
t.value,
|
|
12469
|
+
g.url || ((m = (p = g == null ? void 0 : g.response) == null ? void 0 : p.data) == null ? void 0 : m.id) || (g == null ? void 0 : g.id)
|
|
12469
12470
|
)
|
|
12470
|
-
},
|
|
12471
|
-
},
|
|
12471
|
+
}, r.isOnlyOfficePreview && (l.value = !0), i("handPreview", s.value);
|
|
12472
|
+
}, c = (g) => {
|
|
12472
12473
|
In.downloadFile(
|
|
12473
12474
|
Qe(
|
|
12474
|
-
|
|
12475
|
-
|
|
12475
|
+
t.value,
|
|
12476
|
+
g[n.value.url] || g.attachmentId || g.id
|
|
12476
12477
|
),
|
|
12477
|
-
|
|
12478
|
+
g[n.value.name] || g.attachmentName
|
|
12478
12479
|
);
|
|
12479
|
-
},
|
|
12480
|
-
...
|
|
12481
|
-
name:
|
|
12482
|
-
size:
|
|
12483
|
-
suffix:
|
|
12480
|
+
}, h = Y(() => Pn.isNumber(r.width) ? `${r.width}px` : r.width), d = Y(() => r.list.map((g) => ({
|
|
12481
|
+
...g,
|
|
12482
|
+
name: g[n.value.name] || g.attachmentName,
|
|
12483
|
+
size: g[n.value.size] || g.fileSize || g.attachmentSize,
|
|
12484
|
+
suffix: g[n.value.suffix] || g.attachmentSuffix
|
|
12484
12485
|
})));
|
|
12485
|
-
return (
|
|
12486
|
-
var
|
|
12487
|
-
const
|
|
12488
|
-
return L(),
|
|
12486
|
+
return (g, p) => {
|
|
12487
|
+
var _, w, b;
|
|
12488
|
+
const m = $e("tmplate");
|
|
12489
|
+
return L(), N(
|
|
12489
12490
|
Ze,
|
|
12490
12491
|
null,
|
|
12491
12492
|
[
|
|
12492
|
-
(
|
|
12493
|
+
(_ = a.list) != null && _.length ? (L(), N(
|
|
12493
12494
|
Ze,
|
|
12494
12495
|
{ key: 0 },
|
|
12495
12496
|
[
|
|
12496
|
-
a.simple ? (L(!0),
|
|
12497
|
+
a.simple ? (L(!0), N(
|
|
12497
12498
|
Ze,
|
|
12498
12499
|
{ key: 0 },
|
|
12499
|
-
ai(
|
|
12500
|
+
ai(d.value, (C, F) => (L(), N("div", {
|
|
12500
12501
|
class: "iking-privew-annex simple",
|
|
12501
|
-
onClick: (
|
|
12502
|
-
style: oe({ width:
|
|
12502
|
+
onClick: (R) => u(C),
|
|
12503
|
+
style: oe({ width: h.value })
|
|
12503
12504
|
}, [
|
|
12504
12505
|
S(
|
|
12505
12506
|
"div",
|
|
@@ -12516,7 +12517,7 @@ const Sa = /* @__PURE__ */ yt(Ea, [["__scopeId", "data-v-b301aa7d"]]), xa = De(S
|
|
|
12516
12517
|
[
|
|
12517
12518
|
J(j(je), {
|
|
12518
12519
|
name: "iksvg_daochu",
|
|
12519
|
-
onClick: li((
|
|
12520
|
+
onClick: li((R) => c(C), ["stop"]),
|
|
12520
12521
|
size: 20,
|
|
12521
12522
|
active: ""
|
|
12522
12523
|
}, null, 8, ["onClick"]),
|
|
@@ -12525,8 +12526,8 @@ const Sa = /* @__PURE__ */ yt(Ea, [["__scopeId", "data-v-b301aa7d"]]), xa = De(S
|
|
|
12525
12526
|
size: 20,
|
|
12526
12527
|
active: ""
|
|
12527
12528
|
}),
|
|
12528
|
-
Ie(
|
|
12529
|
-
data: { ...C, findex:
|
|
12529
|
+
Ie(g.$slots, "operation", {
|
|
12530
|
+
data: { ...C, findex: F }
|
|
12530
12531
|
})
|
|
12531
12532
|
],
|
|
12532
12533
|
2
|
|
@@ -12535,33 +12536,33 @@ const Sa = /* @__PURE__ */ yt(Ea, [["__scopeId", "data-v-b301aa7d"]]), xa = De(S
|
|
|
12535
12536
|
], 12, Pa))),
|
|
12536
12537
|
256
|
|
12537
12538
|
/* UNKEYED_FRAGMENT */
|
|
12538
|
-
)) : (L(), Le(
|
|
12539
|
+
)) : (L(), Le(m, { key: 1 }, {
|
|
12539
12540
|
default: de(() => [
|
|
12540
|
-
(L(!0),
|
|
12541
|
+
(L(!0), N(
|
|
12541
12542
|
Ze,
|
|
12542
12543
|
null,
|
|
12543
|
-
ai(
|
|
12544
|
-
var
|
|
12545
|
-
return L(),
|
|
12544
|
+
ai(d.value, (C, F) => {
|
|
12545
|
+
var R;
|
|
12546
|
+
return L(), N(
|
|
12546
12547
|
"div",
|
|
12547
12548
|
{
|
|
12548
12549
|
class: Q(["iking-privew-annex", { "is-bg": a.showBg }]),
|
|
12549
|
-
key:
|
|
12550
|
+
key: F,
|
|
12550
12551
|
style: oe({
|
|
12551
|
-
marginBottom:
|
|
12552
|
-
width:
|
|
12552
|
+
marginBottom: F == ((R = a.list) == null ? void 0 : R.length) - 1 ? "0" : "10px",
|
|
12553
|
+
width: h.value
|
|
12553
12554
|
})
|
|
12554
12555
|
},
|
|
12555
12556
|
[
|
|
12556
12557
|
S("div", {
|
|
12557
12558
|
class: "file-card",
|
|
12558
|
-
onClick: (
|
|
12559
|
+
onClick: (z) => u(C)
|
|
12559
12560
|
}, [
|
|
12560
12561
|
J(j(Fr), {
|
|
12561
12562
|
file: C,
|
|
12562
12563
|
style: oe({ height: `${a.iconSize}px` }),
|
|
12563
12564
|
class: "ikui-w-auto",
|
|
12564
|
-
fields:
|
|
12565
|
+
fields: n.value
|
|
12565
12566
|
}, null, 8, ["file", "style", "fields"]),
|
|
12566
12567
|
S("div", La, [
|
|
12567
12568
|
S(
|
|
@@ -12587,7 +12588,7 @@ const Sa = /* @__PURE__ */ yt(Ea, [["__scopeId", "data-v-b301aa7d"]]), xa = De(S
|
|
|
12587
12588
|
[
|
|
12588
12589
|
J(j(je), {
|
|
12589
12590
|
name: "iksvg_daochu",
|
|
12590
|
-
onClick: li((
|
|
12591
|
+
onClick: li((z) => c(C), ["stop"]),
|
|
12591
12592
|
bg: a.showBg,
|
|
12592
12593
|
size: a.showBg ? "default" : 20,
|
|
12593
12594
|
title: "下载"
|
|
@@ -12598,8 +12599,8 @@ const Sa = /* @__PURE__ */ yt(Ea, [["__scopeId", "data-v-b301aa7d"]]), xa = De(S
|
|
|
12598
12599
|
size: a.showBg ? "default" : 20,
|
|
12599
12600
|
title: "预览"
|
|
12600
12601
|
}, null, 8, ["bg", "size"]),
|
|
12601
|
-
Ie(
|
|
12602
|
-
data: { ...C, findex:
|
|
12602
|
+
Ie(g.$slots, "operation", {
|
|
12603
|
+
data: { ...C, findex: F }
|
|
12603
12604
|
})
|
|
12604
12605
|
],
|
|
12605
12606
|
2
|
|
@@ -12623,13 +12624,13 @@ const Sa = /* @__PURE__ */ yt(Ea, [["__scopeId", "data-v-b301aa7d"]]), xa = De(S
|
|
|
12623
12624
|
/* STABLE_FRAGMENT */
|
|
12624
12625
|
)) : he("v-if", !0),
|
|
12625
12626
|
J(j(zr), {
|
|
12626
|
-
show:
|
|
12627
|
-
"onUpdate:show":
|
|
12628
|
-
loadUrl: j(
|
|
12629
|
-
file:
|
|
12630
|
-
onlyofficeServer: ((
|
|
12631
|
-
onlyOfficeConfig: j(
|
|
12632
|
-
onlyOfficeAccept: ((
|
|
12627
|
+
show: l.value,
|
|
12628
|
+
"onUpdate:show": p[0] || (p[0] = (C) => l.value = C),
|
|
12629
|
+
loadUrl: j(t),
|
|
12630
|
+
file: s.value,
|
|
12631
|
+
onlyofficeServer: ((w = j(e)) == null ? void 0 : w.serverUrl) || a.onlyofficeServer,
|
|
12632
|
+
onlyOfficeConfig: j(e),
|
|
12633
|
+
onlyOfficeAccept: ((b = j(e)) == null ? void 0 : b.accept) || a.onlyOfficeAccept
|
|
12633
12634
|
}, null, 8, ["show", "loadUrl", "file", "onlyofficeServer", "onlyOfficeConfig", "onlyOfficeAccept"])
|
|
12634
12635
|
],
|
|
12635
12636
|
64
|