@webitel/ui-sdk 26.6.34 → 26.6.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/AgentStatus.enum-C3IGHtvR.js +9 -0
  2. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
  3. package/dist/caseConverters-DXegZoCt.js +27 -0
  4. package/dist/chunk-CY3AvKd6.js +20 -0
  5. package/dist/clients-A6MHYfOX.js +36118 -0
  6. package/dist/components-DFOWyAAb.js +5395 -0
  7. package/dist/composables-DnDH-KUv.js +263 -0
  8. package/dist/convertDuration-1K7fuEpO.js +8 -0
  9. package/dist/debounce-DrmECuJ2.js +128 -0
  10. package/dist/deep-copy-CQw5yeEH.js +41 -0
  11. package/dist/displayText-CtaxzaBz.js +3 -0
  12. package/dist/dist-05Bf47Wg.js +87 -0
  13. package/dist/dist-BYiYpK00.js +7 -0
  14. package/dist/dist-Dz55hlwp.js +1371 -0
  15. package/dist/engineCallFileType-D7QVFOac.js +11 -0
  16. package/dist/enums-pbYAJNeb.js +158 -0
  17. package/dist/errors-SUXKojVW.js +69 -0
  18. package/dist/floating-ui.dom-n2j9PKCB.js +842 -0
  19. package/dist/generateInstance-ppTIeLX4.js +2582 -0
  20. package/dist/isObject-Dgs_L5xI.js +11 -0
  21. package/dist/logger-hl3ueNok.js +47 -0
  22. package/dist/prod-Cp0BjuxI.js +775 -0
  23. package/dist/prod-DSuxcp5t.js +2 -0
  24. package/dist/side-channel-Cyte-MzW.js +833 -0
  25. package/dist/sortQueryAdapters-CyYXvnDN.js +14 -0
  26. package/dist/srt-parser-DdH5U08c.js +21 -0
  27. package/dist/ssa-parser-Bjs7yDD1.js +184 -0
  28. package/dist/ui-sdk.css +2 -1
  29. package/dist/ui-sdk.js +34567 -4
  30. package/dist/ui-sdk.umd.cjs +7748 -7606
  31. package/dist/useExpansion-DVdIpoOn.js +24 -0
  32. package/dist/useValidation-DG0tifBv.js +37 -0
  33. package/dist/useVidstackSrc-DfNrFbOO.js +155 -0
  34. package/dist/useWtTable-tqmVOvve.js +12 -0
  35. package/dist/vidstack-B01xzxC4-DeYSgDZy.js +7 -0
  36. package/dist/vidstack-BGSTndAW-CyKM_CM4.js +957 -0
  37. package/dist/vidstack-BQlOPwOu-ChhdffAJ.js +43 -0
  38. package/dist/vidstack-Bq6c3Bam-3dCf_D36.js +398 -0
  39. package/dist/vidstack-C2US-gSO-DeIgENrW.js +127 -0
  40. package/dist/vidstack-C9vIqaYT-C1EgPq17.js +9 -0
  41. package/dist/vidstack-CTojmhKq-D7sZJxgm.js +30 -0
  42. package/dist/vidstack-ChQTHmIQ-nTO94M6P.js +51 -0
  43. package/dist/vidstack-Ci54COQW-CAAXpwzv.js +208 -0
  44. package/dist/vidstack-D2pY00kU-DoW028io.js +70 -0
  45. package/dist/vidstack-D5EzK014-DOe01V3H.js +14 -0
  46. package/dist/vidstack-DDXt6fpN-Don_e6LS.js +42 -0
  47. package/dist/vidstack-D_-9AA6_-Dq3APB0-.js +19 -0
  48. package/dist/vidstack-Dihypf8P-ibWMCHK-.js +12 -0
  49. package/dist/vidstack-Dm1xEU9Q-VlefmrP8.js +31 -0
  50. package/dist/vidstack-DqAw8m9J-Dk1GT3Oe.js +22 -0
  51. package/dist/vidstack-audio-B58bvsna.js +23 -0
  52. package/dist/vidstack-dash-CX-LTHx3.js +332 -0
  53. package/dist/vidstack-google-cast-Co5Q_rfL.js +361 -0
  54. package/dist/vidstack-hls-CLzdTFu6.js +269 -0
  55. package/dist/vidstack-krOAtKMi-DN1WZC3p.js +30 -0
  56. package/dist/vidstack-video-XtP8iTBc.js +151 -0
  57. package/dist/vidstack-vimeo-EzzPpggD.js +386 -0
  58. package/dist/vidstack-youtube-C1_NAfWa.js +205 -0
  59. package/dist/vue-i18n-B8Px6VcD.js +2201 -0
  60. package/dist/wt-action-bar-Ba1ZJjE_.js +85 -0
  61. package/dist/wt-button-DENbrKdy.js +785 -0
  62. package/dist/wt-button-select-BnRHgJ4i.js +80 -0
  63. package/dist/wt-call-media-action-Bkyppnsm.js +42 -0
  64. package/dist/wt-chat-emoji-D3SBme6f.js +2208 -0
  65. package/dist/wt-confirm-dialog-DCUitG2v.js +70 -0
  66. package/dist/wt-context-menu-yW52oF-2.js +89 -0
  67. package/dist/wt-copy-action-d9gVzAsB.js +38 -0
  68. package/dist/wt-datepicker-Cnbarx_j.js +5774 -0
  69. package/dist/wt-display-chip-items-DagfTTIq.js +34 -0
  70. package/dist/wt-dual-panel-DAhTYFS_.js +49 -0
  71. package/dist/wt-dummy-CLjhRWZ6.js +59 -0
  72. package/dist/wt-error-page-vhu4lIyF.js +62 -0
  73. package/dist/wt-expand-transition-C2p9bR4j.js +39 -0
  74. package/dist/wt-expansion-card-qsxvbtZm.js +47 -0
  75. package/dist/wt-expansion-panel-C_EXvx1d.js +40 -0
  76. package/dist/wt-filters-panel-wrapper-Cc9b3aci.js +51 -0
  77. package/dist/wt-galleria-CWXKuZTD.js +224 -0
  78. package/dist/wt-icon-action-CQlZHMDB.js +100 -0
  79. package/dist/wt-icon-btn-CjjI4cgE.js +107 -0
  80. package/dist/wt-icon-pxO7IjwV.js +1026 -0
  81. package/dist/wt-inline-add-panel-B0E4Vk2l.js +43 -0
  82. package/dist/wt-navigation-menu-CenQi_-T.js +126 -0
  83. package/dist/wt-notifications-bar-Ep1QuFZi.js +52 -0
  84. package/dist/wt-page-header-CDbd4aOh.js +59 -0
  85. package/dist/wt-pagination-BA_PZPIE.js +94 -0
  86. package/dist/wt-player-uidPXSTe.js +287 -0
  87. package/dist/wt-popover-CJZH3wMl.js +98 -0
  88. package/dist/wt-screen-recordings-action-Dg7Ts2Jt.js +37 -0
  89. package/dist/wt-search-bar-CWZdvAOf.js +123 -0
  90. package/dist/wt-selection-popup-B77UY7Yu.js +79 -0
  91. package/dist/wt-send-message-popup-CltYZA9D.js +77 -0
  92. package/dist/wt-slider-BS3SoGht.js +68 -0
  93. package/dist/wt-start-page-eN1PEokc.js +86 -0
  94. package/dist/wt-status-select-A5t6Vjm4.js +101 -0
  95. package/dist/wt-stepper-B6zpd1Uh.js +41 -0
  96. package/dist/wt-table-D0FynxIE.js +364 -0
  97. package/dist/wt-table-actions-4-peSVkc.js +63 -0
  98. package/dist/wt-table-column-select-DFF6z3a3.js +100 -0
  99. package/dist/wt-tabs-DuOgj-lZ.js +60 -0
  100. package/dist/wt-time-input-CO2cop3y.js +62 -0
  101. package/dist/wt-timepicker-BltFF1QD.js +145 -0
  102. package/dist/wt-tree-ZyoPrNOl.js +1206 -0
  103. package/dist/wt-tree-table-MLET4gIv.js +221 -0
  104. package/dist/wt-type-extension-value-input-028o8xRF.js +104 -0
  105. package/dist/wt-vidstack-player-B-WSB_Be.js +7440 -0
  106. package/package.json +5 -5
  107. package/src/components/wt-multi-select/wt-multi-select.vue +3 -0
  108. package/src/components/wt-single-select/wt-single-select.vue +5 -0
  109. package/src/components/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +3 -3
  110. package/src/plugins/primevue/theme/components/multi-select/multi-select.js +4 -0
  111. package/src/plugins/primevue/theme/components/single-select/single-select.js +4 -0
  112. package/types/plugins/primevue/theme/components/multi-select/multi-select.d.ts +2 -0
  113. package/types/plugins/primevue/theme/components/single-select/single-select.d.ts +2 -0
  114. package/dist/contacts-DzLKP4GQ.js +0 -49654
  115. package/dist/displayText-Cbh4IOfM.js +0 -5
  116. package/dist/engineCallFileType-yaadA7-2.js +0 -8
  117. package/dist/errors-CTL-RV3B.js +0 -70
  118. package/dist/index-BgLoxAyu.js +0 -50
  119. package/dist/install-Cm-8fwtB.js +0 -53489
  120. package/dist/isObject-BSIwu4UO.js +0 -28
  121. package/dist/prod-BoQuiIB3.js +0 -973
  122. package/dist/srt-parser-CsN7bp5E.js +0 -26
  123. package/dist/ssa-parser-BJOOPeQF.js +0 -200
  124. package/dist/useExpansion-BrQ40HiR.js +0 -24
  125. package/dist/useVidstackSrc-DKXY5f7v.js +0 -1341
  126. package/dist/vidstack-Bq6c3Bam-BHF-0bv4.js +0 -426
  127. package/dist/vidstack-D2pY00kU-B8Mhvp0m.js +0 -136
  128. package/dist/vidstack-DDXt6fpN-D0eou9h7.js +0 -51
  129. package/dist/vidstack-D_-9AA6_-DYAfclN7.js +0 -21
  130. package/dist/vidstack-Dm1xEU9Q-CXHNvShT.js +0 -30
  131. package/dist/vidstack-DqAw8m9J-b5BHkhrw.js +0 -22
  132. package/dist/vidstack-audio-CPu_TbjK.js +0 -28
  133. package/dist/vidstack-dash-VYriMjws.js +0 -393
  134. package/dist/vidstack-google-cast-Byp1cemB.js +0 -383
  135. package/dist/vidstack-hls-DdUQcmEx.js +0 -310
  136. package/dist/vidstack-krOAtKMi-C50BTxmn.js +0 -28
  137. package/dist/vidstack-video-BpSKQ3wb.js +0 -164
  138. package/dist/vidstack-vimeo-CgVJJm06.js +0 -452
  139. package/dist/vidstack-youtube-DuES80MV.js +0 -233
  140. package/dist/wt-action-bar-TMuck-q1.js +0 -102
  141. package/dist/wt-button-select-D1NP5Xw9.js +0 -105
  142. package/dist/wt-call-media-action-BsepfSVy.js +0 -60
  143. package/dist/wt-chat-emoji-B00dUXbP.js +0 -2909
  144. package/dist/wt-confirm-dialog-1hO851Da.js +0 -92
  145. package/dist/wt-context-menu-BrzRmoDw.js +0 -104
  146. package/dist/wt-copy-action-CEMOiYzN.js +0 -60
  147. package/dist/wt-datepicker-DHqZIkg2.js +0 -5660
  148. package/dist/wt-display-chip-items-D7kEAcOo.js +0 -47
  149. package/dist/wt-dual-panel-DEWR3-k-.js +0 -66
  150. package/dist/wt-dummy-DfgxciHw.js +0 -104
  151. package/dist/wt-error-page-DUSVxkXq.js +0 -89
  152. package/dist/wt-expansion-card-B8JKBMLa.js +0 -56
  153. package/dist/wt-expansion-panel-DL3eoj_b.js +0 -54
  154. package/dist/wt-filters-panel-wrapper-CGXQiRvh.js +0 -75
  155. package/dist/wt-galleria-Bahv6Mgq.js +0 -323
  156. package/dist/wt-inline-add-panel-B4RjHVDI.js +0 -49
  157. package/dist/wt-navigation-menu-DqCXAV8E.js +0 -159
  158. package/dist/wt-notifications-bar-CRIKdVai.js +0 -79
  159. package/dist/wt-page-header-DdsnoLgd.js +0 -115
  160. package/dist/wt-pagination-C_b3WmH1.js +0 -144
  161. package/dist/wt-player-B4GWEqdu.js +0 -291
  162. package/dist/wt-popover-Di-7_rDL.js +0 -4
  163. package/dist/wt-popover.vue_vue_type_style_index_0_lang-DMDTlCgv.js +0 -81
  164. package/dist/wt-screen-recordings-action-B4OpN5kl.js +0 -54
  165. package/dist/wt-search-bar-B_0_YwCn.js +0 -144
  166. package/dist/wt-selection-popup-Boyw9_V_.js +0 -109
  167. package/dist/wt-send-message-popup-0C23Zocu.js +0 -579
  168. package/dist/wt-slider-BEkw4KGp.js +0 -4
  169. package/dist/wt-slider.vue_vue_type_script_setup_true_lang-DlaRDHxo.js +0 -55
  170. package/dist/wt-start-page-HQMIG05a.js +0 -99
  171. package/dist/wt-status-select-H_me1xwA.js +0 -138
  172. package/dist/wt-stepper-hJxqyiyo.js +0 -65
  173. package/dist/wt-table-Du6mtkPw.js +0 -426
  174. package/dist/wt-table-actions-ah_H6LY9.js +0 -79
  175. package/dist/wt-table-column-select-C2Nbic5-.js +0 -128
  176. package/dist/wt-tabs-D4aGEd_t.js +0 -74
  177. package/dist/wt-time-input-DYiW0ijt.js +0 -42
  178. package/dist/wt-timepicker-BE8POMhF.js +0 -118
  179. package/dist/wt-tree-table-BJxaXqKl.js +0 -285
  180. package/dist/wt-tree-u0Zp8nb5.js +0 -2777
  181. package/dist/wt-type-extension-value-input-C1VlNa4K.js +0 -121
  182. package/dist/wt-vidstack-player-C1eyCEzP.js +0 -9094
@@ -0,0 +1,332 @@
1
+ import { D as e, H as t, I as n, K as r, N as i, R as a, f as o, r as s, v as c } from "./vidstack-BGSTndAW-CyKM_CM4.js";
2
+ import { _ as l, f as u, r as d, u as f } from "./useVidstackSrc-DfNrFbOO.js";
3
+ import { i as p, r as m } from "./vidstack-CTojmhKq-D7sZJxgm.js";
4
+ import { t as h } from "./vidstack-DqAw8m9J-Dk1GT3Oe.js";
5
+ import { t as g } from "./vidstack-D5EzK014-DOe01V3H.js";
6
+ import { n as _, t as v } from "./vidstack-Ci54COQW-CAAXpwzv.js";
7
+ import { VideoProvider as y } from "./vidstack-video-XtP8iTBc.js";
8
+ import { t as b } from "./vidstack-B01xzxC4-DeYSgDZy.js";
9
+ import { n as x } from "./vidstack-C9vIqaYT-C1EgPq17.js";
10
+ //#region node_modules/vidstack/prod/providers/vidstack-dash.js
11
+ function S(e) {
12
+ try {
13
+ return new Intl.DisplayNames(navigator.languages, { type: "language" }).of(e) ?? null;
14
+ } catch {
15
+ return null;
16
+ }
17
+ }
18
+ var C = (e) => `dash-${o(e)}`, w = class {
19
+ #e;
20
+ #t;
21
+ #n = null;
22
+ #r = /* @__PURE__ */ new Set();
23
+ #i = null;
24
+ config = {};
25
+ get instance() {
26
+ return this.#n;
27
+ }
28
+ constructor(e, t) {
29
+ this.#e = e, this.#t = t;
30
+ }
31
+ setup(e) {
32
+ this.#n = e().create();
33
+ let n = this.#c.bind(this);
34
+ for (let t of Object.values(e.events)) this.#n.on(t, n);
35
+ this.#n.on(e.events.ERROR, this.#g.bind(this));
36
+ for (let e of this.#r) e(this.#n);
37
+ this.#t.player.dispatch("dash-instance", { detail: this.#n }), this.#n.initialize(this.#e, void 0, !1), this.#n.updateSettings({
38
+ streaming: {
39
+ text: {
40
+ defaultEnabled: !1,
41
+ dispatchForManualRendering: !0
42
+ },
43
+ buffer: { fastSwitchEnabled: !0 }
44
+ },
45
+ ...this.config
46
+ }), this.#n.on(e.events.FRAGMENT_LOADING_STARTED, this.#_.bind(this)), this.#n.on(e.events.FRAGMENT_LOADING_COMPLETED, this.#v.bind(this)), this.#n.on(e.events.MANIFEST_LOADED, this.#h.bind(this)), this.#n.on(e.events.QUALITY_CHANGE_RENDERED, this.#m.bind(this)), this.#n.on(e.events.TEXT_TRACKS_ADDED, this.#f.bind(this)), this.#n.on(e.events.TRACK_CHANGE_RENDERED, this.#p.bind(this)), this.#t.qualities[b.enableAuto] = this.#C.bind(this), t(this.#t.qualities, "change", this.#T.bind(this)), t(this.#t.audioTracks, "change", this.#E.bind(this)), this.#i = c(this.#o.bind(this));
47
+ }
48
+ #a(e) {
49
+ return new s(C(e.type), { detail: e });
50
+ }
51
+ #o() {
52
+ if (!this.#t.$state.live()) return;
53
+ let e = new h(this.#s.bind(this));
54
+ return e.start(), e.stop.bind(e);
55
+ }
56
+ #s() {
57
+ if (!this.#n) return;
58
+ let e = this.#n.duration() - this.#n.time();
59
+ this.#t.$state.liveSyncPosition.set(isNaN(e) ? Infinity : e);
60
+ }
61
+ #c(e) {
62
+ this.#t.player?.dispatch(this.#a(e));
63
+ }
64
+ #l = null;
65
+ #u = {};
66
+ #d(e) {
67
+ let t = this.#l?.[_.native], n = (t?.track).cues;
68
+ if (!t || !n) return;
69
+ let r = this.#l.id, i = this.#u[r] ?? 0, a = this.#a(e);
70
+ for (let e = i; e < n.length; e++) {
71
+ let t = n[e];
72
+ t.positionAlign ||= "auto", this.#l.addCue(t, a);
73
+ }
74
+ this.#u[r] = n.length;
75
+ }
76
+ #f(e) {
77
+ if (!this.#n) return;
78
+ let t = e.tracks, n = [...this.#e.textTracks].filter((e) => "manualMode" in e), r = this.#a(e);
79
+ for (let e = 0; e < n.length; e++) {
80
+ let i = t[e], a = n[e], o = new v({
81
+ id: `dash-${i.kind}-${e}`,
82
+ label: i?.label ?? i.labels.find((e) => e.text)?.text ?? (i?.lang && S(i.lang)) ?? i?.lang ?? void 0,
83
+ language: i.lang ?? void 0,
84
+ kind: i.kind,
85
+ default: i.defaultTrack
86
+ });
87
+ o[_.native] = {
88
+ managed: !0,
89
+ track: a
90
+ }, o[_.readyState] = 2, o[_.onModeChange] = () => {
91
+ this.#n && (o.mode === "showing" ? (this.#n.setTextTrack(e), this.#l = o) : (this.#n.setTextTrack(-1), this.#l = null));
92
+ }, this.#t.textTracks.add(o, r);
93
+ }
94
+ }
95
+ #p(e) {
96
+ let { mediaType: t, newMediaInfo: n } = e;
97
+ if (t === "audio") {
98
+ let t = this.#t.audioTracks.getById(`dash-audio-${n.index}`);
99
+ if (t) {
100
+ let n = this.#a(e);
101
+ this.#t.audioTracks[g.select](t, !0, n);
102
+ }
103
+ }
104
+ }
105
+ #m(e) {
106
+ if (e.mediaType !== "video") return;
107
+ let t = this.#t.qualities[e.newQuality];
108
+ if (t) {
109
+ let n = this.#a(e);
110
+ this.#t.qualities[g.select](t, !0, n);
111
+ }
112
+ }
113
+ #h(e) {
114
+ if (this.#t.$state.canPlay() || !this.#n) return;
115
+ let { type: t, mediaPresentationDuration: n } = e.data, r = this.#a(e);
116
+ this.#t.notify("stream-type-change", t === "static" ? "on-demand" : "live", r), this.#t.notify("duration-change", n, r), this.#t.qualities[b.setAuto](!0, r);
117
+ let a = this.#n.getVideoElement(), o = this.#n.getTracksForTypeFromManifest("video", e.data), c = [...new Set(o.map((e) => e.mimeType))].find((e) => e && u(a, e)), l = o.filter((e) => c === e.mimeType)[0], d = this.#n.getTracksForTypeFromManifest("audio", e.data), p = [...new Set(d.map((e) => e.mimeType))].find((e) => e && f(a, e));
118
+ if (d = d.filter((e) => p === e.mimeType), l.bitrateList.forEach((e, t) => {
119
+ let n = {
120
+ id: e.id?.toString() ?? `dash-bitrate-${t}`,
121
+ width: e.width ?? 0,
122
+ height: e.height ?? 0,
123
+ bitrate: e.bandwidth ?? 0,
124
+ codec: l.codec,
125
+ index: t
126
+ };
127
+ this.#t.qualities[g.add](n, r);
128
+ }), i(l.index)) {
129
+ let e = this.#t.qualities[l.index];
130
+ e && this.#t.qualities[g.select](e, !0, r);
131
+ }
132
+ d.forEach((e, t) => {
133
+ let n = e.labels.find((e) => navigator.languages.some((t) => e.lang && t.toLowerCase().startsWith(e.lang.toLowerCase()))) || e.labels[0], i = {
134
+ id: `dash-audio-${e?.index}`,
135
+ label: n?.text ?? (e.lang && S(e.lang)) ?? e.lang ?? "",
136
+ language: e.lang ?? "",
137
+ kind: "main",
138
+ mimeType: e.mimeType,
139
+ codec: e.codec,
140
+ index: t
141
+ };
142
+ this.#t.audioTracks[g.add](i, r);
143
+ }), a.dispatchEvent(new s("canplay", { trigger: r }));
144
+ }
145
+ #g(e) {
146
+ let { type: t, error: n } = e;
147
+ switch (n.code) {
148
+ case 27:
149
+ this.#b(n);
150
+ break;
151
+ default:
152
+ this.#S(n);
153
+ break;
154
+ }
155
+ }
156
+ #_() {
157
+ this.#y >= 0 && this.#x();
158
+ }
159
+ #v(e) {
160
+ e.mediaType === "text" && requestAnimationFrame(this.#d.bind(this, e));
161
+ }
162
+ #y = -1;
163
+ #b(e) {
164
+ this.#x(), this.#n?.play(), this.#y = window.setTimeout(() => {
165
+ this.#y = -1, this.#S(e);
166
+ }, 5e3);
167
+ }
168
+ #x() {
169
+ clearTimeout(this.#y), this.#y = -1;
170
+ }
171
+ #S(e) {
172
+ this.#t.notify("error", {
173
+ message: e.message ?? "",
174
+ code: 1,
175
+ error: e
176
+ });
177
+ }
178
+ #C() {
179
+ this.#w("video", !0);
180
+ let { qualities: e } = this.#t;
181
+ this.#n?.setQualityFor("video", e.selectedIndex, !0);
182
+ }
183
+ #w(e, t) {
184
+ this.#n?.updateSettings({ streaming: { abr: { autoSwitchBitrate: { [e]: t } } } });
185
+ }
186
+ #T() {
187
+ let { qualities: e } = this.#t;
188
+ !this.#n || e.auto || !e.selected || (this.#w("video", !1), this.#n.setQualityFor("video", e.selectedIndex, e.switch === "current"), d && (this.#e.currentTime = this.#e.currentTime));
189
+ }
190
+ #E() {
191
+ if (!this.#n) return;
192
+ let { audioTracks: e } = this.#t, t = this.#n.getTracksFor("audio").find((t) => e.selected && e.selected.id === `dash-audio-${t.index}`);
193
+ t && this.#n.setCurrentTrack(t);
194
+ }
195
+ #D() {
196
+ this.#x(), this.#l = null, this.#u = {};
197
+ }
198
+ onInstance(e) {
199
+ return this.#r.add(e), () => this.#r.delete(e);
200
+ }
201
+ loadSource(e) {
202
+ this.#D(), n(e.src) && this.#n?.attachSource(e.src);
203
+ }
204
+ destroy() {
205
+ this.#D(), this.#n?.destroy(), this.#n = null, this.#i?.(), this.#i = null;
206
+ }
207
+ }, T = class {
208
+ #e;
209
+ #t;
210
+ #n;
211
+ constructor(e, t, n) {
212
+ this.#e = e, this.#t = t, this.#n = n, this.#r();
213
+ }
214
+ async #r() {
215
+ let e = {
216
+ onLoadStart: this.#i.bind(this),
217
+ onLoaded: this.#a.bind(this),
218
+ onLoadError: this.#o.bind(this)
219
+ }, t = await D(this.#e, e);
220
+ return a(t) && !n(this.#e) && (t = await E(this.#e, e)), t ? window.dashjs.supportsMediaSource() ? t : (this.#t.player.dispatch(new s("dash-unsupported")), this.#t.notify("error", {
221
+ message: "[vidstack] `dash.js` is not supported in this environment",
222
+ code: 4
223
+ }), null) : null;
224
+ }
225
+ #i() {
226
+ this.#t.player.dispatch(new s("dash-lib-load-start"));
227
+ }
228
+ #a(e) {
229
+ this.#t.player.dispatch(new s("dash-lib-loaded", { detail: e })), this.#n(e);
230
+ }
231
+ #o(e) {
232
+ let t = x(e);
233
+ this.#t.player.dispatch(new s("dash-lib-load-error", { detail: t })), this.#t.notify("error", {
234
+ message: t.message,
235
+ code: 4,
236
+ error: t
237
+ });
238
+ }
239
+ };
240
+ async function E(e, t = {}) {
241
+ if (!a(e)) {
242
+ if (t.onLoadStart?.(), O(e)) return t.onLoaded?.(e), e;
243
+ if (k(e)) {
244
+ let n = e.MediaPlayer;
245
+ return t.onLoaded?.(n), n;
246
+ }
247
+ try {
248
+ let n = (await e())?.default;
249
+ if (k(n)) return t.onLoaded?.(n.MediaPlayer), n.MediaPlayer;
250
+ if (n) t.onLoaded?.(n);
251
+ else throw Error("");
252
+ return n;
253
+ } catch (e) {
254
+ t.onLoadError?.(e);
255
+ }
256
+ }
257
+ }
258
+ async function D(t, r = {}) {
259
+ if (n(t)) {
260
+ r.onLoadStart?.();
261
+ try {
262
+ if (await m(t), !e(window.dashjs.MediaPlayer)) throw Error("");
263
+ let n = window.dashjs.MediaPlayer;
264
+ return r.onLoaded?.(n), n;
265
+ } catch (e) {
266
+ r.onLoadError?.(e);
267
+ }
268
+ }
269
+ }
270
+ function O(e) {
271
+ return e && e.prototype && e.prototype !== Function;
272
+ }
273
+ function k(e) {
274
+ return e && "MediaPlayer" in e;
275
+ }
276
+ var A = "https://cdn.jsdelivr.net", j = class extends y {
277
+ $$PROVIDER_TYPE = "DASH";
278
+ #e = null;
279
+ #t = new w(this.video, this.ctx);
280
+ get ctor() {
281
+ return this.#e;
282
+ }
283
+ get instance() {
284
+ return this.#t.instance;
285
+ }
286
+ static supported = l();
287
+ get type() {
288
+ return "dash";
289
+ }
290
+ get canLiveSync() {
291
+ return !0;
292
+ }
293
+ #n = `${A}/npm/dashjs@4.7.4/dist/dash.all.min.js`;
294
+ get config() {
295
+ return this.#t.config;
296
+ }
297
+ set config(e) {
298
+ this.#t.config = e;
299
+ }
300
+ get library() {
301
+ return this.#n;
302
+ }
303
+ set library(e) {
304
+ this.#n = e;
305
+ }
306
+ preconnect() {
307
+ n(this.#n) && p(this.#n);
308
+ }
309
+ setup() {
310
+ super.setup(), new T(this.#n, this.ctx, (e) => {
311
+ this.#e = e, this.#t.setup(e), this.ctx.notify("provider-setup", this);
312
+ let t = r(this.ctx.$state.source);
313
+ t && this.loadSource(t);
314
+ });
315
+ }
316
+ async loadSource(e, t) {
317
+ if (!n(e.src)) {
318
+ this.removeSource();
319
+ return;
320
+ }
321
+ this.media.preload = t || "", this.appendSource(e, "application/x-mpegurl"), this.#t.loadSource(e), this.currentSrc = e;
322
+ }
323
+ onInstance(e) {
324
+ let t = this.#t.instance;
325
+ return t && e(t), this.#t.onInstance(e);
326
+ }
327
+ destroy() {
328
+ this.#t.destroy();
329
+ }
330
+ };
331
+ //#endregion
332
+ export { j as DASHProvider };
@@ -0,0 +1,361 @@
1
+ import { G as e, H as t, K as n, V as r, h as i, r as a, tt as o, v as s } from "./vidstack-BGSTndAW-CyKM_CM4.js";
2
+ import { a as c, d as l, i as u, n as d, s as f, t as p } from "./vidstack-BQlOPwOu-ChhdffAJ.js";
3
+ import { t as m } from "./vidstack-DqAw8m9J-Dk1GT3Oe.js";
4
+ import { t as h } from "./vidstack-D5EzK014-DOe01V3H.js";
5
+ import { t as g } from "./vidstack-ChQTHmIQ-nTO94M6P.js";
6
+ //#region node_modules/vidstack/prod/providers/vidstack-google-cast.js
7
+ var _ = class {
8
+ #e;
9
+ constructor(e) {
10
+ this.#e = new chrome.cast.media.MediaInfo(e.src, e.type);
11
+ }
12
+ build() {
13
+ return this.#e;
14
+ }
15
+ setStreamType(e) {
16
+ return e.includes("live") ? this.#e.streamType = chrome.cast.media.StreamType.LIVE : this.#e.streamType = chrome.cast.media.StreamType.BUFFERED, this;
17
+ }
18
+ setTracks(e) {
19
+ return this.#e.tracks = e.map(this.#t), this;
20
+ }
21
+ setMetadata(e, t) {
22
+ return this.#e.metadata = new chrome.cast.media.GenericMediaMetadata(), this.#e.metadata.title = e, this.#e.metadata.images = [{ url: t }], this;
23
+ }
24
+ #t(e, t) {
25
+ let n = new chrome.cast.media.Track(t, chrome.cast.media.TrackType.TEXT);
26
+ return n.name = e.label, n.trackContentId = e.src, n.trackContentType = "text/vtt", n.language = e.language, n.subtype = e.kind.toUpperCase(), n;
27
+ }
28
+ }, v = class {
29
+ #e;
30
+ #t;
31
+ #n;
32
+ constructor(e, t, n) {
33
+ this.#e = e, this.#t = t, this.#n = n;
34
+ }
35
+ setup() {
36
+ let e = this.syncRemoteActiveIds.bind(this);
37
+ t(this.#t.audioTracks, "change", e), t(this.#t.textTracks, "mode-change", e), s(this.#o.bind(this));
38
+ }
39
+ getLocalTextTracks() {
40
+ return this.#t.$state.textTracks().filter((e) => e.src && e.type === "vtt");
41
+ }
42
+ #r() {
43
+ return this.#t.$state.audioTracks();
44
+ }
45
+ #i(e) {
46
+ let t = this.#e.mediaInfo?.tracks ?? [];
47
+ return e ? t.filter((t) => t.type === e) : t;
48
+ }
49
+ #a() {
50
+ let e = [], t = this.#r().find((e) => e.selected), n = this.getLocalTextTracks().filter((e) => e.mode === "showing");
51
+ if (t) {
52
+ let n = this.#i(chrome.cast.media.TrackType.AUDIO), r = this.#l(n, t);
53
+ r && e.push(r.trackId);
54
+ }
55
+ if (n?.length) {
56
+ let t = this.#i(chrome.cast.media.TrackType.TEXT);
57
+ if (t.length) for (let r of n) {
58
+ let n = this.#l(t, r);
59
+ n && e.push(n.trackId);
60
+ }
61
+ }
62
+ return e;
63
+ }
64
+ #o() {
65
+ let e = this.getLocalTextTracks();
66
+ if (!this.#e.isMediaLoaded) return;
67
+ let t = this.#i(chrome.cast.media.TrackType.TEXT);
68
+ for (let n of e) if (!this.#l(t, n)) {
69
+ o(() => this.#n?.());
70
+ break;
71
+ }
72
+ }
73
+ syncRemoteTracks(e) {
74
+ if (!this.#e.isMediaLoaded) return;
75
+ let t = this.#r(), n = this.getLocalTextTracks(), r = this.#i(chrome.cast.media.TrackType.AUDIO), i = this.#i(chrome.cast.media.TrackType.TEXT);
76
+ for (let n of r) {
77
+ if (this.#c(t, n)) continue;
78
+ let r = {
79
+ id: n.trackId.toString(),
80
+ label: n.name,
81
+ language: n.language,
82
+ kind: n.subtype ?? "main",
83
+ selected: !1
84
+ };
85
+ this.#t.audioTracks[h.add](r, e);
86
+ }
87
+ for (let t of i) {
88
+ if (this.#c(n, t)) continue;
89
+ let r = {
90
+ id: t.trackId.toString(),
91
+ src: t.trackContentId,
92
+ label: t.name,
93
+ language: t.language,
94
+ kind: t.subtype.toLowerCase()
95
+ };
96
+ this.#t.textTracks.add(r, e);
97
+ }
98
+ }
99
+ syncRemoteActiveIds(e) {
100
+ if (!this.#e.isMediaLoaded) return;
101
+ let t = this.#a(), n = new chrome.cast.media.EditTracksInfoRequest(t);
102
+ this.#s(n).catch((e) => {});
103
+ }
104
+ #s(e) {
105
+ let t = c();
106
+ return new Promise((n, r) => t?.editTracksInfo(e, n, r));
107
+ }
108
+ #c(e, t) {
109
+ return e.find((e) => this.#u(e, t));
110
+ }
111
+ #l(e, t) {
112
+ return e.find((e) => this.#u(t, e));
113
+ }
114
+ #u(e, t) {
115
+ return t.name === e.label && t.language === e.language && t.subtype.toLowerCase() === e.kind.toLowerCase();
116
+ }
117
+ }, y = class {
118
+ $$PROVIDER_TYPE = "GOOGLE_CAST";
119
+ scope = i();
120
+ #e;
121
+ #t;
122
+ #n;
123
+ #r = null;
124
+ #i = "disconnected";
125
+ #a = 0;
126
+ #o = 0;
127
+ #s = new g(0, 0);
128
+ #c = new m(this.#v.bind(this));
129
+ #l;
130
+ #u = null;
131
+ #d = !1;
132
+ constructor(e, t) {
133
+ this.#e = e, this.#t = t, this.#n = new v(e, t, this.#I.bind(this));
134
+ }
135
+ get type() {
136
+ return "google-cast";
137
+ }
138
+ get currentSrc() {
139
+ return this.#r;
140
+ }
141
+ get player() {
142
+ return this.#e;
143
+ }
144
+ get cast() {
145
+ return p();
146
+ }
147
+ get session() {
148
+ return u();
149
+ }
150
+ get media() {
151
+ return c();
152
+ }
153
+ get hasActiveSession() {
154
+ return f(this.#r);
155
+ }
156
+ setup() {
157
+ this.#f(), this.#p(), this.#n.setup(), this.#t.notify("provider-setup", this);
158
+ }
159
+ #f() {
160
+ l(cast.framework.CastContextEventType.CAST_STATE_CHANGED, this.#b.bind(this));
161
+ }
162
+ #p() {
163
+ let t = cast.framework.RemotePlayerEventType, n = {
164
+ [t.IS_CONNECTED_CHANGED]: this.#b,
165
+ [t.IS_MEDIA_LOADED_CHANGED]: this.#x,
166
+ [t.CAN_CONTROL_VOLUME_CHANGED]: this.#S,
167
+ [t.CAN_SEEK_CHANGED]: this.#C,
168
+ [t.DURATION_CHANGED]: this.#E,
169
+ [t.IS_MUTED_CHANGED]: this.#D,
170
+ [t.VOLUME_LEVEL_CHANGED]: this.#D,
171
+ [t.IS_PAUSED_CHANGED]: this.#O,
172
+ [t.LIVE_SEEKABLE_RANGE_CHANGED]: this.#k,
173
+ [t.PLAYER_STATE_CHANGED]: this.#A
174
+ };
175
+ this.#l = n;
176
+ let i = this.#y.bind(this);
177
+ for (let e of r(n)) this.#e.controller.addEventListener(e, i);
178
+ e(() => {
179
+ for (let e of r(n)) this.#e.controller.removeEventListener(e, i);
180
+ });
181
+ }
182
+ async play() {
183
+ if (!(!this.#e.isPaused && !this.#d)) {
184
+ if (this.#d) {
185
+ await this.#F(!1, 0);
186
+ return;
187
+ }
188
+ this.#e.controller?.playOrPause();
189
+ }
190
+ }
191
+ async pause() {
192
+ this.#e.isPaused || this.#e.controller?.playOrPause();
193
+ }
194
+ getMediaStatus(e) {
195
+ return new Promise((t, n) => {
196
+ this.media?.getStatus(e, t, n);
197
+ });
198
+ }
199
+ setMuted(e) {
200
+ (e && !this.#e.isMuted || !e && this.#e.isMuted) && this.#e.controller?.muteOrUnmute();
201
+ }
202
+ setCurrentTime(e) {
203
+ this.#e.currentTime = e, this.#t.notify("seeking", e), this.#e.controller?.seek();
204
+ }
205
+ setVolume(e) {
206
+ this.#e.volumeLevel = e, this.#e.controller?.setVolumeLevel();
207
+ }
208
+ async loadSource(e) {
209
+ if (this.#u?.src !== e && (this.#u = null), f(e)) {
210
+ this.#h(), this.#r = e;
211
+ return;
212
+ }
213
+ this.#t.notify("load-start");
214
+ let t = this.#P(e), n = await this.session.loadMedia(t);
215
+ if (n) {
216
+ this.#r = null, this.#t.notify("error", Error(d(n)));
217
+ return;
218
+ }
219
+ this.#r = e;
220
+ }
221
+ destroy() {
222
+ this.#m(), this.#g();
223
+ }
224
+ #m() {
225
+ this.#u || (this.#o = 0, this.#s = new g(0, 0)), this.#c.stop(), this.#a = 0, this.#u = null;
226
+ }
227
+ #h() {
228
+ let e = new a("resume-session", { detail: this.session });
229
+ this.#x(e);
230
+ let { muted: t, volume: n, savedState: r } = this.#t.$state, i = r();
231
+ this.setCurrentTime(Math.max(this.#e.currentTime, i?.currentTime ?? 0)), this.setMuted(t()), this.setVolume(n()), i?.paused === !1 && this.play();
232
+ }
233
+ #g() {
234
+ this.cast.endCurrentSession(!0);
235
+ let { remotePlaybackLoader: e } = this.#t.$state;
236
+ e.set(null);
237
+ }
238
+ #_() {
239
+ let { savedState: e } = this.#t.$state;
240
+ e.set({
241
+ paused: this.#e.isPaused,
242
+ currentTime: this.#e.currentTime
243
+ }), this.#g();
244
+ }
245
+ #v() {
246
+ this.#T();
247
+ }
248
+ #y(e) {
249
+ this.#l[e.type].call(this, e);
250
+ }
251
+ #b(e) {
252
+ let t = this.cast.getCastState(), n = t === cast.framework.CastState.CONNECTED ? "connected" : t === cast.framework.CastState.CONNECTING ? "connecting" : "disconnected";
253
+ if (this.#i === n) return;
254
+ let r = {
255
+ type: "google-cast",
256
+ state: n
257
+ }, i = this.#M(e);
258
+ this.#i = n, this.#t.notify("remote-playback-change", r, i), n === "disconnected" && this.#_();
259
+ }
260
+ #x(e) {
261
+ if (!this.#e.isMediaLoaded) return;
262
+ let t = n(this.#t.$state.source);
263
+ Promise.resolve().then(() => {
264
+ if (t !== n(this.#t.$state.source) || !this.#e.isMediaLoaded) return;
265
+ this.#m();
266
+ let r = this.#e.duration;
267
+ this.#s = new g(0, r);
268
+ let i = {
269
+ provider: this,
270
+ duration: r,
271
+ buffered: new g(0, 0),
272
+ seekable: this.#j()
273
+ }, a = this.#M(e);
274
+ this.#t.notify("loaded-metadata", void 0, a), this.#t.notify("loaded-data", void 0, a), this.#t.notify("can-play", i, a), this.#S(), this.#C(e);
275
+ let { volume: o, muted: s } = this.#t.$state;
276
+ this.setVolume(o()), this.setMuted(s()), this.#c.start(), this.#n.syncRemoteTracks(a), this.#n.syncRemoteActiveIds(a);
277
+ });
278
+ }
279
+ #S() {
280
+ this.#t.$state.canSetVolume.set(this.#e.canControlVolume);
281
+ }
282
+ #C(e) {
283
+ let t = this.#M(e);
284
+ this.#t.notify("stream-type-change", this.#w(), t);
285
+ }
286
+ #w() {
287
+ return this.#e.mediaInfo?.streamType === chrome.cast.media.StreamType.LIVE ? this.#e.canSeek ? "live:dvr" : "live" : "on-demand";
288
+ }
289
+ #T() {
290
+ if (this.#u) return;
291
+ let e = this.#e.currentTime;
292
+ e !== this.#a && (this.#t.notify("time-change", e), e > this.#o && (this.#o = e, this.#k()), this.#t.$state.seeking() && this.#t.notify("seeked", e), this.#a = e);
293
+ }
294
+ #E(e) {
295
+ if (!this.#e.isMediaLoaded || this.#u) return;
296
+ let t = this.#e.duration, n = this.#M(e);
297
+ this.#s = new g(0, t), this.#t.notify("duration-change", t, n);
298
+ }
299
+ #D(e) {
300
+ if (!this.#e.isMediaLoaded) return;
301
+ let t = {
302
+ muted: this.#e.isMuted,
303
+ volume: this.#e.volumeLevel
304
+ }, n = this.#M(e);
305
+ this.#t.notify("volume-change", t, n);
306
+ }
307
+ #O(e) {
308
+ let t = this.#M(e);
309
+ this.#e.isPaused ? this.#t.notify("pause", void 0, t) : this.#t.notify("play", void 0, t);
310
+ }
311
+ #k(e) {
312
+ let t = {
313
+ seekable: this.#j(),
314
+ buffered: new g(0, this.#o)
315
+ }, n = e ? this.#M(e) : void 0;
316
+ this.#t.notify("progress", t, n);
317
+ }
318
+ #A(e) {
319
+ let t = this.#e.playerState, n = chrome.cast.media.PlayerState;
320
+ if (this.#d = t === n.IDLE, t === n.PAUSED) return;
321
+ let r = this.#M(e);
322
+ switch (t) {
323
+ case n.PLAYING:
324
+ this.#t.notify("playing", void 0, r);
325
+ break;
326
+ case n.BUFFERING:
327
+ this.#t.notify("waiting", void 0, r);
328
+ break;
329
+ case n.IDLE:
330
+ this.#c.stop(), this.#t.notify("pause"), this.#t.notify("end");
331
+ break;
332
+ }
333
+ }
334
+ #j() {
335
+ return this.#e.liveSeekableRange ? new g(this.#e.liveSeekableRange.start, this.#e.liveSeekableRange.end) : this.#s;
336
+ }
337
+ #M(e) {
338
+ return e instanceof Event ? e : new a(e.type, { detail: e });
339
+ }
340
+ #N(e) {
341
+ let { streamType: t, title: n, poster: r } = this.#t.$state;
342
+ return new _(e).setMetadata(n(), r()).setStreamType(t()).setTracks(this.#n.getLocalTextTracks()).build();
343
+ }
344
+ #P(e) {
345
+ let t = this.#N(e), n = new chrome.cast.media.LoadRequest(t), r = this.#t.$state.savedState();
346
+ return n.autoplay = (this.#u?.paused ?? r?.paused) === !1, n.currentTime = this.#u?.time ?? r?.currentTime ?? 0, n;
347
+ }
348
+ async #F(e, t) {
349
+ let r = n(this.#t.$state.source);
350
+ this.#u = {
351
+ src: r,
352
+ paused: e,
353
+ time: t
354
+ }, await this.loadSource(r);
355
+ }
356
+ #I() {
357
+ this.#F(this.#e.isPaused, this.#e.currentTime).catch((e) => {});
358
+ }
359
+ };
360
+ //#endregion
361
+ export { y as GoogleCastProvider };