@sapia-ai/chatbot-v3 1.0.3 → 1.1.1
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/{EmbeddedVideoPlayer-CNcds-dW.js → EmbeddedVideoPlayer-COUZHpPa.js} +14 -14
- package/dist/{Preview-Dmns6UWL.js → Preview-wPnYtccF.js} +3 -3
- package/dist/api/client.d.ts +6 -2
- package/dist/api/types/messages.d.ts +16 -5
- package/dist/api/types/responses.d.ts +48 -7
- package/dist/api.js +2 -2
- package/dist/core/bubbles/types.d.ts +2 -5
- package/dist/core/i18n/languages.d.ts +6 -1
- package/dist/core/interview.d.ts +15 -8
- package/dist/core/media/mimeTypes.d.ts +6 -1
- package/dist/core/media/recorder.d.ts +11 -2
- package/dist/core/store.d.ts +21 -1
- package/dist/core/theme/contrast.d.ts +6 -0
- package/dist/core/theme/cssVariables.d.ts +5 -0
- package/dist/core/theme/types.d.ts +3 -0
- package/dist/{dist-BSi28_cP.js → dist-BOe6WyvN.js} +92 -92
- package/dist/{dist-B9SbMqZU.js → dist-Bwlks_W8.js} +98 -98
- package/dist/{fix-webm-duration-BWL-ZRDX.js → fix-webm-duration-QAy9T6AR.js} +2 -2
- package/dist/index.js +7445 -5039
- package/dist/{jsx-runtime-8QqjHL5t.js → jsx-runtime-24G8w2Bf.js} +2 -2
- package/dist/{messages-Czlp86gl.js → messages-DCvBcspv.js} +260 -245
- package/dist/react/AnswerInput.d.ts +4 -5
- package/dist/react/bubbleViewModel.d.ts +25 -9
- package/dist/react/strings.d.ts +26 -3
- package/dist/{react-DJysvNxz.js → react-BjO903pN.js} +33 -33
- package/dist/{react-QrtEtv1G.js → react-Bw5AugJc.js} +31 -31
- package/dist/{react-dE7BdGuR.js → react-D8hV9uow.js} +10 -10
- package/dist/{react-NauLB_WU.js → react-DDjfkpOE.js} +38 -38
- package/dist/{react-Dbs-sPBo.js → react-DEF8h8hc.js} +37 -37
- package/dist/{react-B0K-sClg.js → react-DOgLiyZi.js} +2 -2
- package/dist/{react-be7q6yw_.js → react-DPFikgTM.js} +55 -55
- package/dist/{react-ChCcxVnw.js → react-qa12DkXH.js} +34 -34
- package/dist/{react-czRIxT0g.js → react-y4vaW3OH.js} +46 -46
- package/dist/ui/chat/ChatBubble/ChatBubble.d.ts +14 -5
- package/dist/ui/chat/ChatLog/ChatLog.d.ts +6 -4
- package/dist/ui/chat/EditBanner/EditBanner.d.ts +16 -0
- package/dist/ui/chat/SummaryCard/SummaryCard.d.ts +46 -0
- package/dist/ui/chat/types.d.ts +21 -8
- package/dist/ui/constants.d.ts +1 -0
- package/dist/ui/inputs/OptionList/OptionList.d.ts +3 -1
- package/dist/ui/inputs/TextAnswerInput/TextAnswerInput.d.ts +11 -4
- package/dist/ui/inputs/VideoRecorder/VideoRecorder.d.ts +6 -2
- package/dist/ui/markdown.d.ts +4 -0
- package/dist/ui/motion.d.ts +2 -0
- package/dist/ui/primitives/Button/Button.d.ts +5 -1
- package/dist/ui/primitives/Dialog/Dialog.d.ts +2 -1
- package/dist/ui/shell/WidgetRoot/WidgetRoot.d.ts +7 -1
- package/dist-umd/sapia-chatbot.umd.js +394 -270
- package/package.json +4 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./react-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as l } from "./
|
|
6
|
-
import { n as u, t as d } from "./dist-
|
|
1
|
+
import { w as e } from "./messages-DCvBcspv.js";
|
|
2
|
+
import { t } from "./react-DOgLiyZi.js";
|
|
3
|
+
import { t as n } from "./defineProperty-DiFpLzd2.js";
|
|
4
|
+
import { n as r, t as i } from "./hls-mBncGwsE.js";
|
|
5
|
+
import { a, i as o, n as s, r as c, t as l } from "./classPrivateFieldSet2-DtQPURVD.js";
|
|
6
|
+
import { n as u, t as d } from "./dist-BOe6WyvN.js";
|
|
7
7
|
//#region ../../node_modules/.pnpm/mux-embed@5.18.1/node_modules/mux-embed/dist/mux.mjs
|
|
8
8
|
var f = /* @__PURE__ */ e(t(), 1), p = Object.create, m = Object.defineProperty, h = Object.getOwnPropertyDescriptor, ee = Object.getOwnPropertyNames, te = Object.getPrototypeOf, ne = Object.prototype.hasOwnProperty, re = function(e, t) {
|
|
9
9
|
return function() {
|
|
@@ -2780,7 +2780,7 @@ var tr = function(e, t) {
|
|
|
2780
2780
|
Object.assign(hr, gr), Ae.default !== void 0 && typeof Ae.default.addEventListener == "function" && Ae.default.addEventListener("pagehide", function(e) {
|
|
2781
2781
|
e.persisted || (hr.WINDOW_UNLOADING = !0);
|
|
2782
2782
|
}, !1);
|
|
2783
|
-
var _r = hr, b =
|
|
2783
|
+
var _r = hr, b = r, x = {
|
|
2784
2784
|
VIDEO: "video",
|
|
2785
2785
|
THUMBNAIL: "thumbnail",
|
|
2786
2786
|
STORYBOARD: "storyboard",
|
|
@@ -3862,7 +3862,7 @@ var La = (e, t) => {
|
|
|
3862
3862
|
return i.includes(ua) || !!n && i.includes(n.toLocaleLowerCase());
|
|
3863
3863
|
}, Ka = (e, t) => {
|
|
3864
3864
|
let n = {};
|
|
3865
|
-
return n.capLevelToPlayerSize = e.capRenditionToPlayerSize, n.capLevelToPlayerSize == null ? (n.capLevelController = Fi, n.capLevelToPlayerSize = !0) : n.capLevelController =
|
|
3865
|
+
return n.capLevelToPlayerSize = e.capRenditionToPlayerSize, n.capLevelToPlayerSize == null ? (n.capLevelController = Fi, n.capLevelToPlayerSize = !0) : n.capLevelController = i, n;
|
|
3866
3866
|
}, qa = (e, t, n) => {
|
|
3867
3867
|
var r;
|
|
3868
3868
|
let { envKey: i, disableTracking: a, muxDataSDK: o = _r, muxDataSDKOptions: s = {} } = e, c = Ga(e);
|
|
@@ -4762,54 +4762,54 @@ No(() => {
|
|
|
4762
4762
|
});
|
|
4763
4763
|
var Qo = 0, O = /* @__PURE__ */ new WeakMap(), $o = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakMap(), ts = /* @__PURE__ */ new WeakMap(), ns = /* @__PURE__ */ new WeakMap(), rs = /* @__PURE__ */ new WeakMap(), is = /* @__PURE__ */ new WeakMap(), as = /* @__PURE__ */ new WeakMap(), os = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakSet(), cs = class extends EventTarget {
|
|
4764
4764
|
constructor(e) {
|
|
4765
|
-
super(),
|
|
4766
|
-
init: () =>
|
|
4767
|
-
onCastStateChanged: () =>
|
|
4768
|
-
onSessionStateChanged: () =>
|
|
4769
|
-
getCastPlayer: () => ls.call(
|
|
4770
|
-
}),
|
|
4765
|
+
super(), a(this, ss), o(this, O, void 0), o(this, $o, void 0), o(this, es, void 0), o(this, ts, void 0), o(this, ns, "disconnected"), o(this, rs, !1), o(this, is, /* @__PURE__ */ new Set()), o(this, as, /* @__PURE__ */ new WeakMap()), o(this, os, () => c(ss, this, gs).call(this)), l(O, this, e), Yo.add(this), Oo.set(this, {
|
|
4766
|
+
init: () => c(ss, this, ms).call(this),
|
|
4767
|
+
onCastStateChanged: () => c(ss, this, fs).call(this),
|
|
4768
|
+
onSessionStateChanged: () => c(ss, this, ps).call(this),
|
|
4769
|
+
getCastPlayer: () => ls.call(c(ss, this))
|
|
4770
|
+
}), c(ss, this, ms).call(this);
|
|
4771
4771
|
}
|
|
4772
4772
|
destroy() {
|
|
4773
4773
|
var e, t;
|
|
4774
|
-
(e =
|
|
4775
|
-
|
|
4776
|
-
}),
|
|
4774
|
+
(e = s(O, this)) == null || (e = e.textTracks) == null || e.removeEventListener("change", s(os, this)), s(ts, this) && (t = s(es, this)) != null && t.controller && Object.entries(s(ts, this)).forEach(([e, t]) => {
|
|
4775
|
+
s(es, this).controller.removeEventListener(e, t);
|
|
4776
|
+
}), s(O, this) && Xo.delete(s(O, this)), l($o, this, !1);
|
|
4777
4777
|
}
|
|
4778
4778
|
get state() {
|
|
4779
|
-
return
|
|
4779
|
+
return s(ns, this);
|
|
4780
4780
|
}
|
|
4781
4781
|
async watchAvailability(e) {
|
|
4782
|
-
if (
|
|
4783
|
-
return
|
|
4782
|
+
if (s(O, this).disableRemotePlayback) throw new ko("disableRemotePlayback attribute is present.");
|
|
4783
|
+
return s(as, this).set(e, ++Qo), s(is, this).add(e), queueMicrotask(() => e(c(ss, this, ds).call(this))), Qo;
|
|
4784
4784
|
}
|
|
4785
4785
|
async cancelWatchAvailability(e) {
|
|
4786
|
-
if (
|
|
4787
|
-
e ?
|
|
4786
|
+
if (s(O, this).disableRemotePlayback) throw new ko("disableRemotePlayback attribute is present.");
|
|
4787
|
+
e ? s(is, this).delete(e) : s(is, this).clear();
|
|
4788
4788
|
}
|
|
4789
4789
|
async prompt() {
|
|
4790
4790
|
var e, t, n;
|
|
4791
|
-
if (
|
|
4791
|
+
if (s(O, this).disableRemotePlayback) throw new ko("disableRemotePlayback attribute is present.");
|
|
4792
4792
|
if (!(!((e = globalThis.chrome) == null || (e = e.cast) == null) && e.isAvailable)) throw new Ao("The RemotePlayback API is disabled on this platform.");
|
|
4793
|
-
let r = Xo.has(
|
|
4794
|
-
Xo.add(
|
|
4795
|
-
|
|
4793
|
+
let r = Xo.has(s(O, this));
|
|
4794
|
+
Xo.add(s(O, this)), Vo(s(O, this).castOptions), Object.entries(s(ts, this)).forEach(([e, t]) => {
|
|
4795
|
+
s(es, this).controller.addEventListener(e, t);
|
|
4796
4796
|
});
|
|
4797
4797
|
try {
|
|
4798
4798
|
await Io().requestSession();
|
|
4799
4799
|
} catch (e) {
|
|
4800
|
-
if (r || Xo.delete(
|
|
4800
|
+
if (r || Xo.delete(s(O, this)), e === "cancel") return;
|
|
4801
4801
|
throw Error(e);
|
|
4802
4802
|
}
|
|
4803
|
-
(t = Oo.get(
|
|
4803
|
+
(t = Oo.get(s(O, this))) == null || (n = t.loadOnPrompt) == null || n.call(t);
|
|
4804
4804
|
}
|
|
4805
4805
|
};
|
|
4806
4806
|
function ls() {
|
|
4807
|
-
if (Xo.has(
|
|
4807
|
+
if (Xo.has(s(O, this))) return s(es, this);
|
|
4808
4808
|
}
|
|
4809
4809
|
function us() {
|
|
4810
|
-
Xo.has(
|
|
4811
|
-
|
|
4812
|
-
}), Xo.delete(
|
|
4810
|
+
Xo.has(s(O, this)) && (Object.entries(s(ts, this)).forEach(([e, t]) => {
|
|
4811
|
+
s(es, this).controller.removeEventListener(e, t);
|
|
4812
|
+
}), Xo.delete(s(O, this)), s(O, this).muted = s(es, this).isMuted, s(O, this).currentTime = s(es, this).savedPlayerState.currentTime, s(es, this).savedPlayerState.isPaused === !1 && s(O, this).play());
|
|
4813
4813
|
}
|
|
4814
4814
|
function ds() {
|
|
4815
4815
|
var e;
|
|
@@ -4818,83 +4818,83 @@ function ds() {
|
|
|
4818
4818
|
}
|
|
4819
4819
|
function fs() {
|
|
4820
4820
|
let e = Io().getCastState();
|
|
4821
|
-
if (Xo.has(
|
|
4822
|
-
|
|
4823
|
-
for (let e of
|
|
4824
|
-
} else if (
|
|
4825
|
-
|
|
4826
|
-
for (let e of
|
|
4821
|
+
if (Xo.has(s(O, this)) && e === "CONNECTING" && (l(ns, this, "connecting"), this.dispatchEvent(new Event("connecting"))), !s(rs, this) && e != null && e.includes("CONNECT")) {
|
|
4822
|
+
l(rs, this, !0);
|
|
4823
|
+
for (let e of s(is, this)) e(!0);
|
|
4824
|
+
} else if (s(rs, this) && (!e || e === "NO_DEVICES_AVAILABLE")) {
|
|
4825
|
+
l(rs, this, !1);
|
|
4826
|
+
for (let e of s(is, this)) e(!1);
|
|
4827
4827
|
}
|
|
4828
4828
|
}
|
|
4829
4829
|
async function ps() {
|
|
4830
4830
|
let { SESSION_RESUMED: e } = Zo.SessionState;
|
|
4831
4831
|
if (Io().getSessionState() === e) {
|
|
4832
4832
|
var t;
|
|
4833
|
-
if (
|
|
4834
|
-
Xo.add(
|
|
4835
|
-
|
|
4833
|
+
if (s(O, this).castSrc === ((t = Ro()) == null ? void 0 : t.media.contentId)) {
|
|
4834
|
+
Xo.add(s(O, this)), Object.entries(s(ts, this)).forEach(([e, t]) => {
|
|
4835
|
+
s(es, this).controller.addEventListener(e, t);
|
|
4836
4836
|
});
|
|
4837
4837
|
try {
|
|
4838
4838
|
await Bo(new chrome.cast.media.GetStatusRequest());
|
|
4839
4839
|
} catch (e) {
|
|
4840
4840
|
console.error(e);
|
|
4841
4841
|
}
|
|
4842
|
-
|
|
4842
|
+
s(ts, this)[Zo.RemotePlayerEventType.IS_PAUSED_CHANGED](), s(ts, this)[Zo.RemotePlayerEventType.PLAYER_STATE_CHANGED]();
|
|
4843
4843
|
}
|
|
4844
4844
|
}
|
|
4845
4845
|
}
|
|
4846
4846
|
function ms() {
|
|
4847
|
-
!Zo ||
|
|
4847
|
+
!Zo || s($o, this) || (l($o, this, !0), Vo(s(O, this).castOptions), s(O, this).textTracks.addEventListener("change", s(os, this)), c(ss, this, fs).call(this), l(es, this, new Zo.RemotePlayer()), new Zo.RemotePlayerController(s(es, this)), l(ts, this, {
|
|
4848
4848
|
[Zo.RemotePlayerEventType.IS_CONNECTED_CHANGED]: ({ value: e }) => {
|
|
4849
|
-
e === !0 ? (
|
|
4849
|
+
e === !0 ? (l(ns, this, "connected"), this.dispatchEvent(new Event("connect"))) : (c(ss, this, us).call(this), l(ns, this, "disconnected"), this.dispatchEvent(new Event("disconnect")));
|
|
4850
4850
|
},
|
|
4851
4851
|
[Zo.RemotePlayerEventType.DURATION_CHANGED]: () => {
|
|
4852
|
-
|
|
4852
|
+
s(O, this).dispatchEvent(new Event("durationchange"));
|
|
4853
4853
|
},
|
|
4854
4854
|
[Zo.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]: () => {
|
|
4855
|
-
|
|
4855
|
+
s(O, this).dispatchEvent(new Event("volumechange"));
|
|
4856
4856
|
},
|
|
4857
4857
|
[Zo.RemotePlayerEventType.IS_MUTED_CHANGED]: () => {
|
|
4858
|
-
|
|
4858
|
+
s(O, this).dispatchEvent(new Event("volumechange"));
|
|
4859
4859
|
},
|
|
4860
4860
|
[Zo.RemotePlayerEventType.CURRENT_TIME_CHANGED]: () => {
|
|
4861
4861
|
var e;
|
|
4862
|
-
(e = ls.call(
|
|
4862
|
+
(e = ls.call(c(ss, this))) != null && e.isMediaLoaded && s(O, this).dispatchEvent(new Event("timeupdate"));
|
|
4863
4863
|
},
|
|
4864
4864
|
[Zo.RemotePlayerEventType.VIDEO_INFO_CHANGED]: () => {
|
|
4865
|
-
|
|
4865
|
+
s(O, this).dispatchEvent(new Event("resize"));
|
|
4866
4866
|
},
|
|
4867
4867
|
[Zo.RemotePlayerEventType.IS_PAUSED_CHANGED]: () => {
|
|
4868
|
-
|
|
4868
|
+
s(O, this).dispatchEvent(new Event(this.paused ? "pause" : "play"));
|
|
4869
4869
|
},
|
|
4870
4870
|
[Zo.RemotePlayerEventType.PLAYER_STATE_CHANGED]: () => {
|
|
4871
4871
|
var e, t;
|
|
4872
|
-
((e = ls.call(
|
|
4872
|
+
((e = ls.call(c(ss, this))) == null ? void 0 : e.playerState) !== chrome.cast.media.PlayerState.PAUSED && s(O, this).dispatchEvent(new Event({
|
|
4873
4873
|
[chrome.cast.media.PlayerState.PLAYING]: "playing",
|
|
4874
4874
|
[chrome.cast.media.PlayerState.BUFFERING]: "waiting",
|
|
4875
4875
|
[chrome.cast.media.PlayerState.IDLE]: "emptied"
|
|
4876
|
-
}[(t = ls.call(
|
|
4876
|
+
}[(t = ls.call(c(ss, this))) == null ? void 0 : t.playerState]));
|
|
4877
4877
|
},
|
|
4878
4878
|
[Zo.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]: async () => {
|
|
4879
4879
|
var e;
|
|
4880
|
-
(e = ls.call(
|
|
4880
|
+
(e = ls.call(c(ss, this))) != null && e.isMediaLoaded && (await Promise.resolve(), c(ss, this, hs).call(this));
|
|
4881
4881
|
}
|
|
4882
4882
|
}));
|
|
4883
4883
|
}
|
|
4884
4884
|
function hs() {
|
|
4885
|
-
|
|
4885
|
+
c(ss, this, gs).call(this);
|
|
4886
4886
|
}
|
|
4887
4887
|
async function gs() {
|
|
4888
4888
|
var e, t, n, r;
|
|
4889
|
-
if (!ls.call(
|
|
4890
|
-
let i = ((e = (t =
|
|
4889
|
+
if (!ls.call(c(ss, this))) return;
|
|
4890
|
+
let i = ((e = (t = s(es, this).mediaInfo) == null ? void 0 : t.tracks) == null ? [] : e).filter(({ type: e }) => e === chrome.cast.media.TrackType.TEXT), a = [...s(O, this).textTracks].filter(({ kind: e }) => e === "subtitles" || e === "captions"), o = i.map(({ language: e, name: t, trackId: n }) => {
|
|
4891
4891
|
var r;
|
|
4892
4892
|
let { mode: i } = (r = a.find((n) => n.language === e && n.label === t)) == null ? {} : r;
|
|
4893
4893
|
return i ? {
|
|
4894
4894
|
mode: i,
|
|
4895
4895
|
trackId: n
|
|
4896
4896
|
} : !1;
|
|
4897
|
-
}).filter(Boolean), l =
|
|
4897
|
+
}).filter(Boolean), l = o.filter(({ mode: e }) => e !== "showing").map(({ trackId: e }) => e), u = o.find(({ mode: e }) => e === "showing"), d = (n = (r = Lo()) == null || (r = r.getSessionObj().media[0]) == null ? void 0 : r.activeTrackIds) == null ? [] : n, f = d;
|
|
4898
4898
|
if (d.length && (f = f.filter((e) => !l.includes(e))), u != null && u.trackId && (f = [...f, u.trackId]), f = [...new Set(f)], !((e, t) => e.length === t.length && e.every((e) => t.includes(e)))(d, f)) try {
|
|
4899
4899
|
await zo(new chrome.cast.media.EditTracksInfoRequest(f));
|
|
4900
4900
|
} catch (e) {
|
|
@@ -4936,24 +4936,24 @@ function bs(e, t, n, r) {
|
|
|
4936
4936
|
//#endregion
|
|
4937
4937
|
//#region ../../node_modules/.pnpm/castable-video@1.1.16/node_modules/castable-video/castable-mixin.js
|
|
4938
4938
|
var xs = (e) => {
|
|
4939
|
-
var t,
|
|
4940
|
-
return
|
|
4939
|
+
var t, r, i, u, d, f, p;
|
|
4940
|
+
return i = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakSet(), t = class extends e {
|
|
4941
4941
|
constructor(...e) {
|
|
4942
|
-
super(...e),
|
|
4942
|
+
super(...e), a(this, p), o(this, i, { paused: !1 }), o(this, u, Ho()), o(this, d, void 0), o(this, f, void 0);
|
|
4943
4943
|
}
|
|
4944
4944
|
get remote() {
|
|
4945
|
-
return
|
|
4945
|
+
return s(f, this) ? s(f, this) : Po() ? this.isConnected ? (this.disableRemotePlayback || Fo(), Oo.set(this, { loadOnPrompt: () => c(p, this, h).call(this) }), l(f, this, new cs(this))) : void 0 : super.remote;
|
|
4946
4946
|
}
|
|
4947
4947
|
disconnectedCallback() {
|
|
4948
4948
|
var e, t;
|
|
4949
|
-
(e =
|
|
4949
|
+
(e = s(f, this)) == null || e.destroy(), l(f, this, null), Oo.delete(this), (t = super.disconnectedCallback) == null || t.call(this);
|
|
4950
4950
|
}
|
|
4951
4951
|
attributeChangedCallback(e, t, n) {
|
|
4952
4952
|
if (super.attributeChangedCallback(e, t, n), e === "cast-receiver" && n) {
|
|
4953
|
-
|
|
4953
|
+
s(u, this).receiverApplicationId = n;
|
|
4954
4954
|
return;
|
|
4955
4955
|
}
|
|
4956
|
-
if (m.call(
|
|
4956
|
+
if (m.call(c(p, this))) switch (e) {
|
|
4957
4957
|
case "cast-stream-type":
|
|
4958
4958
|
case "cast-src":
|
|
4959
4959
|
this.load();
|
|
@@ -4962,12 +4962,12 @@ var xs = (e) => {
|
|
|
4962
4962
|
}
|
|
4963
4963
|
async load() {
|
|
4964
4964
|
var e, t;
|
|
4965
|
-
if (!m.call(
|
|
4965
|
+
if (!m.call(c(p, this))) return super.load();
|
|
4966
4966
|
let n = new chrome.cast.media.MediaInfo(this.castSrc, this.castContentType);
|
|
4967
4967
|
n.customData = this.castCustomData;
|
|
4968
|
-
let
|
|
4969
|
-
if (
|
|
4970
|
-
let t = ++
|
|
4968
|
+
let r = [...this.querySelectorAll("track")].filter(({ kind: e, src: t }) => t && (e === "subtitles" || e === "captions")), a = [], o = 0;
|
|
4969
|
+
if (r.length && (n.tracks = r.map((e) => {
|
|
4970
|
+
let t = ++o;
|
|
4971
4971
|
a.length === 0 && e.track.mode === "showing" && a.push(t);
|
|
4972
4972
|
let n = new chrome.cast.media.Track(t, chrome.cast.media.TrackType.TEXT);
|
|
4973
4973
|
return n.trackContentId = e.src, n.trackContentType = "text/vtt", n.subtype = e.kind === "captions" ? chrome.cast.media.TextTrackType.CAPTIONS : chrome.cast.media.TextTrackType.SUBTITLES, n.name = e.label, n.language = e.srclang, n;
|
|
@@ -4977,30 +4977,30 @@ var xs = (e) => {
|
|
|
4977
4977
|
e != null && e.includes("m4s") || e != null && e.includes("mp4") || e != null && e.includes("m4a") ? (n.hlsSegmentFormat = chrome.cast.media.HlsSegmentFormat.FMP4, n.hlsVideoSegmentFormat = chrome.cast.media.HlsVideoSegmentFormat.FMP4) : t != null && t.includes("aac") ? (n.hlsSegmentFormat = chrome.cast.media.HlsSegmentFormat.AAC, n.hlsVideoSegmentFormat = chrome.cast.media.HlsVideoSegmentFormat.MPEG2_TS) : (e != null && e.includes("ts") || t != null && t.includes("ts")) && (n.hlsSegmentFormat = chrome.cast.media.HlsSegmentFormat.TS, n.hlsVideoSegmentFormat = chrome.cast.media.HlsVideoSegmentFormat.MPEG2_TS);
|
|
4978
4978
|
}
|
|
4979
4979
|
let l = new chrome.cast.media.LoadRequest(n);
|
|
4980
|
-
l.currentTime = (e = super.currentTime) == null ? 0 : e, l.autoplay = !
|
|
4980
|
+
l.currentTime = (e = super.currentTime) == null ? 0 : e, l.autoplay = !s(i, this).paused, l.activeTrackIds = a, await ((t = Lo()) == null ? void 0 : t.loadMedia(l)), this.dispatchEvent(new Event("volumechange"));
|
|
4981
4981
|
}
|
|
4982
4982
|
play() {
|
|
4983
|
-
if (m.call(
|
|
4984
|
-
if (m.call(
|
|
4983
|
+
if (m.call(c(p, this))) {
|
|
4984
|
+
if (m.call(c(p, this)).isPaused) {
|
|
4985
4985
|
var e;
|
|
4986
|
-
(e = m.call(
|
|
4986
|
+
(e = m.call(c(p, this)).controller) == null || e.playOrPause();
|
|
4987
4987
|
}
|
|
4988
4988
|
return;
|
|
4989
4989
|
}
|
|
4990
4990
|
return super.play();
|
|
4991
4991
|
}
|
|
4992
4992
|
pause() {
|
|
4993
|
-
if (m.call(
|
|
4994
|
-
if (!m.call(
|
|
4993
|
+
if (m.call(c(p, this))) {
|
|
4994
|
+
if (!m.call(c(p, this)).isPaused) {
|
|
4995
4995
|
var e;
|
|
4996
|
-
(e = m.call(
|
|
4996
|
+
(e = m.call(c(p, this)).controller) == null || e.playOrPause();
|
|
4997
4997
|
}
|
|
4998
4998
|
return;
|
|
4999
4999
|
}
|
|
5000
5000
|
super.pause();
|
|
5001
5001
|
}
|
|
5002
5002
|
get castOptions() {
|
|
5003
|
-
return
|
|
5003
|
+
return s(u, this);
|
|
5004
5004
|
}
|
|
5005
5005
|
get castReceiver() {
|
|
5006
5006
|
var e;
|
|
@@ -5032,7 +5032,7 @@ var xs = (e) => {
|
|
|
5032
5032
|
this.setAttribute("cast-stream-type", `${e}`);
|
|
5033
5033
|
}
|
|
5034
5034
|
get castCustomData() {
|
|
5035
|
-
return
|
|
5035
|
+
return s(d, this);
|
|
5036
5036
|
}
|
|
5037
5037
|
set castCustomData(e) {
|
|
5038
5038
|
let t = typeof e;
|
|
@@ -5040,10 +5040,10 @@ var xs = (e) => {
|
|
|
5040
5040
|
console.error(`castCustomData must be nullish or an object but value was of type ${t}`);
|
|
5041
5041
|
return;
|
|
5042
5042
|
}
|
|
5043
|
-
|
|
5043
|
+
l(d, this, e);
|
|
5044
5044
|
}
|
|
5045
5045
|
get readyState() {
|
|
5046
|
-
if (m.call(
|
|
5046
|
+
if (m.call(c(p, this))) switch (m.call(c(p, this)).playerState) {
|
|
5047
5047
|
case chrome.cast.media.PlayerState.IDLE: return 0;
|
|
5048
5048
|
case chrome.cast.media.PlayerState.BUFFERING: return 2;
|
|
5049
5049
|
default: return 3;
|
|
@@ -5051,17 +5051,17 @@ var xs = (e) => {
|
|
|
5051
5051
|
return super.readyState;
|
|
5052
5052
|
}
|
|
5053
5053
|
get paused() {
|
|
5054
|
-
return m.call(
|
|
5054
|
+
return m.call(c(p, this)) ? m.call(c(p, this)).isPaused : super.paused;
|
|
5055
5055
|
}
|
|
5056
5056
|
get muted() {
|
|
5057
5057
|
var e;
|
|
5058
|
-
return m.call(
|
|
5058
|
+
return m.call(c(p, this)) ? (e = m.call(c(p, this))) == null ? void 0 : e.isMuted : super.muted;
|
|
5059
5059
|
}
|
|
5060
5060
|
set muted(e) {
|
|
5061
|
-
if (m.call(
|
|
5062
|
-
if (e && !m.call(
|
|
5061
|
+
if (m.call(c(p, this))) {
|
|
5062
|
+
if (e && !m.call(c(p, this)).isMuted || !e && m.call(c(p, this)).isMuted) {
|
|
5063
5063
|
var t;
|
|
5064
|
-
(t = m.call(
|
|
5064
|
+
(t = m.call(c(p, this)).controller) == null || t.muteOrUnmute();
|
|
5065
5065
|
}
|
|
5066
5066
|
return;
|
|
5067
5067
|
}
|
|
@@ -5069,42 +5069,42 @@ var xs = (e) => {
|
|
|
5069
5069
|
}
|
|
5070
5070
|
get volume() {
|
|
5071
5071
|
var e, t;
|
|
5072
|
-
return m.call(
|
|
5072
|
+
return m.call(c(p, this)) ? (e = (t = m.call(c(p, this))) == null ? void 0 : t.volumeLevel) == null ? 1 : e : super.volume;
|
|
5073
5073
|
}
|
|
5074
5074
|
set volume(e) {
|
|
5075
|
-
if (m.call(
|
|
5075
|
+
if (m.call(c(p, this))) {
|
|
5076
5076
|
var t;
|
|
5077
|
-
m.call(
|
|
5077
|
+
m.call(c(p, this)).volumeLevel = +e, (t = m.call(c(p, this)).controller) == null || t.setVolumeLevel();
|
|
5078
5078
|
return;
|
|
5079
5079
|
}
|
|
5080
5080
|
super.volume = e;
|
|
5081
5081
|
}
|
|
5082
5082
|
get duration() {
|
|
5083
5083
|
var e;
|
|
5084
|
-
if (m.call(
|
|
5084
|
+
if (m.call(c(p, this)) && (e = m.call(c(p, this))) != null && e.isMediaLoaded) {
|
|
5085
5085
|
var t, n;
|
|
5086
|
-
return (t = (n = m.call(
|
|
5086
|
+
return (t = (n = m.call(c(p, this))) == null ? void 0 : n.duration) == null ? NaN : t;
|
|
5087
5087
|
}
|
|
5088
5088
|
return super.duration;
|
|
5089
5089
|
}
|
|
5090
5090
|
get currentTime() {
|
|
5091
5091
|
var e;
|
|
5092
|
-
if (m.call(
|
|
5092
|
+
if (m.call(c(p, this)) && (e = m.call(c(p, this))) != null && e.isMediaLoaded) {
|
|
5093
5093
|
var t, n;
|
|
5094
|
-
return (t = (n = m.call(
|
|
5094
|
+
return (t = (n = m.call(c(p, this))) == null ? void 0 : n.currentTime) == null ? 0 : t;
|
|
5095
5095
|
}
|
|
5096
5096
|
return super.currentTime;
|
|
5097
5097
|
}
|
|
5098
5098
|
set currentTime(e) {
|
|
5099
|
-
if (m.call(
|
|
5099
|
+
if (m.call(c(p, this))) {
|
|
5100
5100
|
var t;
|
|
5101
|
-
m.call(
|
|
5101
|
+
m.call(c(p, this)).currentTime = e, (t = m.call(c(p, this)).controller) == null || t.seek();
|
|
5102
5102
|
return;
|
|
5103
5103
|
}
|
|
5104
5104
|
super.currentTime = e;
|
|
5105
5105
|
}
|
|
5106
|
-
},
|
|
5107
|
-
...(
|
|
5106
|
+
}, n(t, "observedAttributes", [
|
|
5107
|
+
...(r = e.observedAttributes) == null ? [] : r,
|
|
5108
5108
|
"cast-src",
|
|
5109
5109
|
"cast-content-type",
|
|
5110
5110
|
"cast-stream-type",
|
|
@@ -5112,10 +5112,10 @@ var xs = (e) => {
|
|
|
5112
5112
|
]), t;
|
|
5113
5113
|
function m() {
|
|
5114
5114
|
var e, t;
|
|
5115
|
-
return (e = Oo.get(
|
|
5115
|
+
return (e = Oo.get(s(f, this))) == null || (t = e.getCastPlayer) == null ? void 0 : t.call(e);
|
|
5116
5116
|
}
|
|
5117
5117
|
async function h() {
|
|
5118
|
-
|
|
5118
|
+
s(i, this).paused = bs(t.prototype, "paused", this), bs(t.prototype, "pause", this, 2)([]), this.muted = bs(t.prototype, "muted", this);
|
|
5119
5119
|
try {
|
|
5120
5120
|
await this.load();
|
|
5121
5121
|
} catch (e) {
|
|
@@ -14324,4 +14324,4 @@ var Kw = Object.prototype.hasOwnProperty, qw = (e, t) => {
|
|
|
14324
14324
|
//#endregion
|
|
14325
14325
|
export { Or as MaxResolution, C as MediaError, kr as MinResolution, Ar as RenditionOrder, rT as default, ha as generatePlayerInitTime, nT as playerSoftwareName, tT as playerSoftwareVersion };
|
|
14326
14326
|
|
|
14327
|
-
//# sourceMappingURL=dist-
|
|
14327
|
+
//# sourceMappingURL=dist-Bwlks_W8.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as e } from "./messages-DCvBcspv.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/fix-webm-duration@1.0.6/node_modules/fix-webm-duration/fix-webm-duration.js
|
|
3
3
|
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
4
|
(function(e, n) {
|
|
@@ -1054,4 +1054,4 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1054
1054
|
//#endregion
|
|
1055
1055
|
export default t();
|
|
1056
1056
|
|
|
1057
|
-
//# sourceMappingURL=fix-webm-duration-
|
|
1057
|
+
//# sourceMappingURL=fix-webm-duration-QAy9T6AR.js.map
|