@deep-eye/core 0.9.1 → 1.0.0

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 (134) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +113 -174
  3. package/dist/components/chat/ChatBot.vue.d.ts +48 -17
  4. package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
  5. package/dist/components/chat/attachmentController.d.ts +25 -0
  6. package/dist/components/chat/attachmentController.d.ts.map +1 -0
  7. package/dist/components/chat/attachments.d.ts +12 -0
  8. package/dist/components/chat/attachments.d.ts.map +1 -0
  9. package/dist/components/chat/chatContext.d.ts +14 -0
  10. package/dist/components/chat/chatContext.d.ts.map +1 -0
  11. package/dist/components/chat/chatErrors.d.ts +16 -0
  12. package/dist/components/chat/chatErrors.d.ts.map +1 -0
  13. package/dist/components/chat/chatQueue.d.ts +6 -0
  14. package/dist/components/chat/chatQueue.d.ts.map +1 -0
  15. package/dist/components/chat/components/ArtifactPreview.vue.d.ts.map +1 -1
  16. package/dist/components/chat/components/ChatActionbar.vue.d.ts +3 -3
  17. package/dist/components/chat/components/ChatActionbar.vue.d.ts.map +1 -1
  18. package/dist/components/chat/components/ChatAttachments.vue.d.ts +12 -0
  19. package/dist/components/chat/components/ChatAttachments.vue.d.ts.map +1 -0
  20. package/dist/components/chat/components/ChatFilePreview.vue.d.ts +45 -0
  21. package/dist/components/chat/components/ChatFilePreview.vue.d.ts.map +1 -0
  22. package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts +24 -0
  23. package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts.map +1 -0
  24. package/dist/components/chat/components/ChatImageLightbox.vue.d.ts +16 -0
  25. package/dist/components/chat/components/ChatImageLightbox.vue.d.ts.map +1 -0
  26. package/dist/components/chat/components/ChatMediaPreview.vue.d.ts +9 -0
  27. package/dist/components/chat/components/ChatMediaPreview.vue.d.ts.map +1 -0
  28. package/dist/components/chat/components/ChatMessage.vue.d.ts +43 -2
  29. package/dist/components/chat/components/ChatMessage.vue.d.ts.map +1 -1
  30. package/dist/components/chat/components/ChatOfficePreview.vue.d.ts +9 -0
  31. package/dist/components/chat/components/ChatOfficePreview.vue.d.ts.map +1 -0
  32. package/dist/components/chat/components/ChatProvider.vue.d.ts +73 -0
  33. package/dist/components/chat/components/ChatProvider.vue.d.ts.map +1 -0
  34. package/dist/components/chat/components/ChatQueue.vue.d.ts +16 -0
  35. package/dist/components/chat/components/ChatQueue.vue.d.ts.map +1 -0
  36. package/dist/components/chat/components/ChatReasoning.vue.d.ts +21 -0
  37. package/dist/components/chat/components/ChatReasoning.vue.d.ts.map +1 -0
  38. package/dist/components/chat/components/ChatSender.vue.d.ts +34 -17
  39. package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
  40. package/dist/components/chat/components/ChatSidebarResizeHandle.vue.d.ts +13 -0
  41. package/dist/components/chat/components/ChatSidebarResizeHandle.vue.d.ts.map +1 -0
  42. package/dist/components/chat/components/ChatToolGroup.vue.d.ts +28 -0
  43. package/dist/components/chat/components/ChatToolGroup.vue.d.ts.map +1 -0
  44. package/dist/components/chat/components/ConversationList.vue.d.ts +129 -0
  45. package/dist/components/chat/components/ConversationList.vue.d.ts.map +1 -0
  46. package/dist/components/chat/components/InputContentParts.vue.d.ts +8 -0
  47. package/dist/components/chat/components/InputContentParts.vue.d.ts.map +1 -0
  48. package/dist/components/chat/components/MessageBubble.vue.d.ts +43 -2
  49. package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
  50. package/dist/components/chat/components/TextPartRenderer.vue.d.ts.map +1 -1
  51. package/dist/components/chat/components/ToolCallPart.vue.d.ts +12 -3
  52. package/dist/components/chat/components/ToolCallPart.vue.d.ts.map +1 -1
  53. package/dist/components/chat/components/index.d.ts +9 -0
  54. package/dist/components/chat/components/index.d.ts.map +1 -1
  55. package/dist/components/chat/composables/index.d.ts +0 -1
  56. package/dist/components/chat/composables/index.d.ts.map +1 -1
  57. package/dist/components/chat/composables/useChatVoice.d.ts +45 -0
  58. package/dist/components/chat/composables/useChatVoice.d.ts.map +1 -0
  59. package/dist/components/chat/composables/useConversation.d.ts +1 -5
  60. package/dist/components/chat/composables/useConversation.d.ts.map +1 -1
  61. package/dist/components/chat/composables/useMeasuredHeight.d.ts +11 -0
  62. package/dist/components/chat/composables/useMeasuredHeight.d.ts.map +1 -0
  63. package/dist/components/chat/composables/useStreamSmoothing.d.ts +13 -0
  64. package/dist/components/chat/composables/useStreamSmoothing.d.ts.map +1 -0
  65. package/dist/components/chat/index.d.ts +12 -4
  66. package/dist/components/chat/index.d.ts.map +1 -1
  67. package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -1
  68. package/dist/components/chat/mdoc/MediaImageStack.vue.d.ts.map +1 -1
  69. package/dist/components/chat/previewRenderers.d.ts +6 -0
  70. package/dist/components/chat/previewRenderers.d.ts.map +1 -0
  71. package/dist/components/chat/qiniuUpload.d.ts +10 -0
  72. package/dist/components/chat/qiniuUpload.d.ts.map +1 -0
  73. package/dist/components/chat/responseStream.d.ts +17 -0
  74. package/dist/components/chat/responseStream.d.ts.map +1 -0
  75. package/dist/components/chat/toolLabels.d.ts +4 -0
  76. package/dist/components/chat/toolLabels.d.ts.map +1 -0
  77. package/dist/components/chat/toolStatus.d.ts +16 -0
  78. package/dist/components/chat/toolStatus.d.ts.map +1 -0
  79. package/dist/components/chat/types.d.ts +457 -144
  80. package/dist/components/chat/types.d.ts.map +1 -1
  81. package/dist/components/visualization/types.d.ts +8 -7
  82. package/dist/components/visualization/types.d.ts.map +1 -1
  83. package/dist/components/visualization/utils.d.ts +4 -2
  84. package/dist/components/visualization/utils.d.ts.map +1 -1
  85. package/dist/composables/useMindMapTheme.d.ts +4 -7
  86. package/dist/composables/useMindMapTheme.d.ts.map +1 -1
  87. package/dist/errors-CHzikrqu.js +70 -0
  88. package/dist/errors-upLl4kf2.cjs +1 -0
  89. package/dist/index-B4hgICk-.cjs +198 -0
  90. package/dist/index-BJdNN1GV.cjs +33 -0
  91. package/dist/index-Bj9h-xEr.cjs +112 -0
  92. package/dist/index-BufnUXnQ.js +5071 -0
  93. package/dist/index-CnxZBHPD.js +42825 -0
  94. package/dist/index-DF8KmkKX.js +38392 -0
  95. package/dist/index-DPhuLMkO.cjs +1 -0
  96. package/dist/index-Dq4cniDm.cjs +5 -0
  97. package/dist/index-cW_BnxHR.js +1722 -0
  98. package/dist/index-iCVvFIlX.js +28 -0
  99. package/dist/index.cjs +275 -134
  100. package/dist/index.js +20496 -10365
  101. package/dist/media-community-skin-Djo8L1G9.js +302 -0
  102. package/dist/media-community-skin-YI6NjsJg.cjs +1 -0
  103. package/dist/media-core-CkW37AYl.js +3827 -0
  104. package/dist/media-core-Rxz2MNwG.cjs +1 -0
  105. package/dist/media-outlet-CZTh6XmJ.cjs +1 -0
  106. package/dist/media-outlet-D2rcuhYN.js +2 -0
  107. package/dist/media-player-BZrIM0O_.js +387 -0
  108. package/dist/media-player-D_USOhtK.cjs +1 -0
  109. package/dist/media-ui-DfPbRfFS.js +2832 -0
  110. package/dist/media-ui-zZVnK1ts.cjs +1 -0
  111. package/dist/prod-Ba2x-T01.cjs +4 -0
  112. package/dist/prod-DBMM0zDd.js +992 -0
  113. package/dist/provider-B7wAEcCR.js +163 -0
  114. package/dist/provider-BPphQwpc.cjs +1 -0
  115. package/dist/provider-BSeBwvzM.cjs +1 -0
  116. package/dist/provider-DgSZc2dM.js +162 -0
  117. package/dist/provider-EKFFiZS1.js +27 -0
  118. package/dist/provider-O8r0RFmF.cjs +1 -0
  119. package/dist/provider-WrRdjcjY.js +483 -0
  120. package/dist/provider-sqICX3H9.cjs +1 -0
  121. package/dist/srt-parser-BECMkbXb.cjs +2 -0
  122. package/dist/srt-parser-BR28Llpk.js +27 -0
  123. package/dist/ssa-parser-BJTK0kd-.js +209 -0
  124. package/dist/ssa-parser-CuKkTpK_.cjs +4 -0
  125. package/dist/style.css +1 -1
  126. package/package.json +7 -2
  127. package/dist/components/chat/AiConversation.vue.d.ts +0 -28
  128. package/dist/components/chat/AiConversation.vue.d.ts.map +0 -1
  129. package/dist/components/chat/components/AssistantTrace.vue.d.ts +0 -27
  130. package/dist/components/chat/components/AssistantTrace.vue.d.ts.map +0 -1
  131. package/dist/components/chat/composables/useConversationStream.d.ts +0 -3
  132. package/dist/components/chat/composables/useConversationStream.d.ts.map +0 -1
  133. package/dist/components/chat/presentation.d.ts +0 -27
  134. package/dist/components/chat/presentation.d.ts.map +0 -1
@@ -0,0 +1,163 @@
1
+ var a = Object.defineProperty;
2
+ var g = (i, t, e) => t in i ? a(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var h = (i, t, e) => g(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { X as f, Y as p, Z as d, _ as v, a0 as L, a1 as S, a2 as m, a3 as w, z as y } from "./media-core-CkW37AYl.js";
5
+ import { VideoProvider as E } from "./provider-DgSZc2dM.js";
6
+ import { a as H } from "./provider-WrRdjcjY.js";
7
+ class j {
8
+ constructor(t, e, r) {
9
+ this.Bh = t, this.ph = e, this.jf = r, this.Ch();
10
+ }
11
+ async Ch() {
12
+ const t = {
13
+ onLoadStart: this.ge.bind(this),
14
+ onLoaded: this.ue.bind(this),
15
+ onLoadError: this.Dh.bind(this)
16
+ };
17
+ let e = await C(this.Bh, t);
18
+ if (f(e) && !p(this.Bh) && (e = await D(this.Bh, t)), !e)
19
+ return null;
20
+ if (!e.isSupported()) {
21
+ const r = "[vidstack]: `hls.js` is not supported in this environment";
22
+ return this.ph.player.dispatchEvent(new d("hls-unsupported")), this.ph.delegate.p("error", { detail: { message: r, code: 4 } }), null;
23
+ }
24
+ return e;
25
+ }
26
+ ge() {
27
+ this.ph.player.dispatchEvent(new d("hls-lib-load-start"));
28
+ }
29
+ ue(t) {
30
+ this.ph.player.dispatchEvent(
31
+ new d("hls-lib-loaded", {
32
+ detail: t
33
+ })
34
+ ), this.jf(t);
35
+ }
36
+ Dh(t) {
37
+ const e = v(t);
38
+ this.ph.player.dispatchEvent(
39
+ new d("hls-lib-load-error", {
40
+ detail: e
41
+ })
42
+ ), this.ph.delegate.p("error", {
43
+ detail: { message: e.message, code: 4 }
44
+ });
45
+ }
46
+ }
47
+ async function D(i, t = {}) {
48
+ var e, r, o, n, u;
49
+ if (!f(i)) {
50
+ if ((e = t.onLoadStart) == null || e.call(t), i.prototype && i.prototype !== Function)
51
+ return (r = t.onLoaded) == null || r.call(t, i), i;
52
+ try {
53
+ const s = (o = await i()) == null ? void 0 : o.default;
54
+ if (s && s.isSupported)
55
+ (n = t.onLoaded) == null || n.call(t, s);
56
+ else
57
+ throw Error(
58
+ ""
59
+ );
60
+ return s;
61
+ } catch (s) {
62
+ (u = t.onLoadError) == null || u.call(t, s);
63
+ }
64
+ }
65
+ }
66
+ async function C(i, t = {}) {
67
+ var e, r, o;
68
+ if (p(i)) {
69
+ (e = t.onLoadStart) == null || e.call(t);
70
+ try {
71
+ if (await L(i), !S(window.Hls))
72
+ throw Error(
73
+ ""
74
+ );
75
+ const n = window.Hls;
76
+ return (r = t.onLoaded) == null || r.call(t, n), n;
77
+ } catch (n) {
78
+ (o = t.onLoadError) == null || o.call(t, n);
79
+ }
80
+ }
81
+ }
82
+ const $ = "https://cdn.jsdelivr.net";
83
+ class B extends E {
84
+ constructor() {
85
+ super(...arguments);
86
+ h(this, "$$PROVIDER_TYPE", "HLS");
87
+ h(this, "mh", null);
88
+ h(this, "od", new H(this.video));
89
+ h(this, "lh", `${$}/npm/hls.js@^1.0.0/dist/hls.min.js`);
90
+ }
91
+ /**
92
+ * The `hls.js` constructor.
93
+ */
94
+ get ctor() {
95
+ return this.mh;
96
+ }
97
+ /**
98
+ * The current `hls.js` instance.
99
+ */
100
+ get instance() {
101
+ return this.od.instance;
102
+ }
103
+ get type() {
104
+ return "hls";
105
+ }
106
+ get canLiveSync() {
107
+ return !0;
108
+ }
109
+ /**
110
+ * The `hls.js` configuration object.
111
+ *
112
+ * @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning}
113
+ */
114
+ get config() {
115
+ return this.od.nh;
116
+ }
117
+ set config(e) {
118
+ this.od.nh = e;
119
+ }
120
+ /**
121
+ * The `hls.js` constructor (supports dynamic imports) or a URL of where it can be found.
122
+ *
123
+ * @defaultValue `https://cdn.jsdelivr.net/npm/hls.js@^1.0.0/dist/hls.min.js`
124
+ */
125
+ get library() {
126
+ return this.lh;
127
+ }
128
+ set library(e) {
129
+ this.lh = e;
130
+ }
131
+ preconnect() {
132
+ p(this.lh) && w(this.lh);
133
+ }
134
+ setup(e) {
135
+ super.setup(e), new j(this.lh, e, (r) => {
136
+ this.mh = r, this.od.setup(r, e), e.delegate.p("provider-setup", { detail: this });
137
+ const o = y(e.$store.source);
138
+ o && this.loadSource(o);
139
+ });
140
+ }
141
+ async loadSource({ src: e }) {
142
+ var r;
143
+ p(e) && ((r = this.od.instance) == null || r.loadSource(e));
144
+ }
145
+ /**
146
+ * The given callback is invoked when a new `hls.js` instance is created and right before it's
147
+ * attached to media.
148
+ */
149
+ onInstance(e) {
150
+ const r = this.od.instance;
151
+ return r && e(r), this.od.oh.add(e), () => this.od.oh.delete(e);
152
+ }
153
+ destroy() {
154
+ this.od.Jg();
155
+ }
156
+ }
157
+ /**
158
+ * Whether `hls.js` is supported in this environment.
159
+ */
160
+ h(B, "supported", m());
161
+ export {
162
+ B as HLSProvider
163
+ };
@@ -0,0 +1 @@
1
+ "use strict";var f=Object.defineProperty;var v=(r,t,e)=>t in r?f(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var h=(r,t,e)=>v(r,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./media-core-Rxz2MNwG.cjs"),S=require("./provider-O8r0RFmF.cjs"),g=require("./provider-sqICX3H9.cjs");class L{constructor(t,e,i){this.Bh=t,this.ph=e,this.jf=i,this.Ch()}async Ch(){const t={onLoadStart:this.ge.bind(this),onLoaded:this.ue.bind(this),onLoadError:this.Dh.bind(this)};let e=await w(this.Bh,t);if(n.isUndefined(e)&&!n.isString(this.Bh)&&(e=await y(this.Bh,t)),!e)return null;if(!e.isSupported()){const i="[vidstack]: `hls.js` is not supported in this environment";return this.ph.player.dispatchEvent(new n.DOMEvent("hls-unsupported")),this.ph.delegate.p("error",{detail:{message:i,code:4}}),null}return e}ge(){this.ph.player.dispatchEvent(new n.DOMEvent("hls-lib-load-start"))}ue(t){this.ph.player.dispatchEvent(new n.DOMEvent("hls-lib-loaded",{detail:t})),this.jf(t)}Dh(t){const e=n.coerceToError(t);this.ph.player.dispatchEvent(new n.DOMEvent("hls-lib-load-error",{detail:e})),this.ph.delegate.p("error",{detail:{message:e.message,code:4}})}}async function y(r,t={}){var e,i,o,s,u;if(!n.isUndefined(r)){if((e=t.onLoadStart)==null||e.call(t),r.prototype&&r.prototype!==Function)return(i=t.onLoaded)==null||i.call(t,r),r;try{const d=(o=await r())==null?void 0:o.default;if(d&&d.isSupported)(s=t.onLoaded)==null||s.call(t,d);else throw Error("");return d}catch(d){(u=t.onLoadError)==null||u.call(t,d)}}}async function w(r,t={}){var e,i,o;if(n.isString(r)){(e=t.onLoadStart)==null||e.call(t);try{if(await n.loadScript(r),!n.isFunction(window.Hls))throw Error("");const s=window.Hls;return(i=t.onLoaded)==null||i.call(t,s),s}catch(s){(o=t.onLoadError)==null||o.call(t,s)}}}const E="https://cdn.jsdelivr.net";class p extends S.VideoProvider{constructor(){super(...arguments);h(this,"$$PROVIDER_TYPE","HLS");h(this,"mh",null);h(this,"od",new g.HLSController(this.video));h(this,"lh",`${E}/npm/hls.js@^1.0.0/dist/hls.min.js`)}get ctor(){return this.mh}get instance(){return this.od.instance}get type(){return"hls"}get canLiveSync(){return!0}get config(){return this.od.nh}set config(e){this.od.nh=e}get library(){return this.lh}set library(e){this.lh=e}preconnect(){n.isString(this.lh)&&n.preconnect(this.lh)}setup(e){super.setup(e),new L(this.lh,e,i=>{this.mh=i,this.od.setup(i,e),e.delegate.p("provider-setup",{detail:this});const o=n.peek(e.$store.source);o&&this.loadSource(o)})}async loadSource({src:e}){var i;n.isString(e)&&((i=this.od.instance)==null||i.loadSource(e))}onInstance(e){const i=this.od.instance;return i&&e(i),this.od.oh.add(e),()=>this.od.oh.delete(e)}destroy(){this.od.Jg()}}h(p,"supported",n.isHLSSupported());exports.HLSProvider=p;
@@ -0,0 +1 @@
1
+ "use strict";var d=Object.defineProperty;var u=(i,e,r)=>e in i?d(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var t=(i,e,r)=>u(i,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./provider-sqICX3H9.cjs");class s extends o.HTMLMediaProvider{constructor(){super(...arguments);t(this,"$$PROVIDER_TYPE","AUDIO")}get type(){return"audio"}setup(r){super.setup(r),this.type==="audio"&&r.delegate.p("provider-setup",{detail:this})}get audio(){return this.j}}exports.AudioProvider=s;
@@ -0,0 +1,162 @@
1
+ var T = Object.defineProperty;
2
+ var P = (s, e, t) => e in s ? T(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var r = (s, e, t) => P(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { aD as d, aL as f, aM as u, aN as k, aO as I, t as c, aP as l, aQ as p, Z as E, aR as H, aS as o } from "./media-core-CkW37AYl.js";
5
+ import { H as v } from "./provider-WrRdjcjY.js";
6
+ class q {
7
+ constructor(e, t) {
8
+ this.qa = e, this.ph = t, e.textTracks.onaddtrack = this.va.bind(this), d(this.Eh.bind(this));
9
+ }
10
+ va(e) {
11
+ const t = e.track;
12
+ if (!t || A(this.qa, t))
13
+ return;
14
+ const i = new f({
15
+ id: t.id,
16
+ kind: t.kind,
17
+ label: t.label,
18
+ language: t.language,
19
+ type: "vtt"
20
+ });
21
+ i[u] = { track: t }, i[k] = 2, i[I] = !0;
22
+ let n = 0;
23
+ const h = (g) => {
24
+ if (t.cues)
25
+ for (let a = n; a < t.cues.length; a++)
26
+ i.addCue(t.cues[a], g), n++;
27
+ };
28
+ h(e), t.oncuechange = h, this.ph.textTracks.add(i, e), i.setMode(t.mode, e);
29
+ }
30
+ Eh() {
31
+ var e;
32
+ this.qa.textTracks.onaddtrack = null;
33
+ for (const t of this.ph.textTracks) {
34
+ const i = (e = t[u]) == null ? void 0 : e.track;
35
+ i != null && i.oncuechange && (i.oncuechange = null);
36
+ }
37
+ }
38
+ }
39
+ function A(s, e) {
40
+ return Array.from(s.children).find((t) => t.track === e);
41
+ }
42
+ class x {
43
+ constructor(e, t) {
44
+ r(this, "Hc", (e, t) => {
45
+ this.j.delegate.p("picture-in-picture-change", {
46
+ detail: e,
47
+ trigger: t
48
+ });
49
+ });
50
+ this.qa = e, this.j = t, c(this.qa, "enterpictureinpicture", this.Fh.bind(this)), c(this.qa, "leavepictureinpicture", this.Gh.bind(this));
51
+ }
52
+ get active() {
53
+ return document.pictureInPictureElement === this.qa;
54
+ }
55
+ get supported() {
56
+ return l(this.qa);
57
+ }
58
+ async enter() {
59
+ return this.qa.requestPictureInPicture();
60
+ }
61
+ exit() {
62
+ return document.exitPictureInPicture();
63
+ }
64
+ Fh(e) {
65
+ this.Hc(!0, e);
66
+ }
67
+ Gh(e) {
68
+ this.Hc(!1, e);
69
+ }
70
+ }
71
+ class G {
72
+ constructor(e, t) {
73
+ r(this, "Ga", "inline");
74
+ this.qa = e, this.j = t, c(this.qa, "webkitpresentationmodechanged", this.Kh.bind(this));
75
+ }
76
+ get Jh() {
77
+ return p(this.qa);
78
+ }
79
+ async Ih(e) {
80
+ this.Ga !== e && this.qa.webkitSetPresentationMode(e);
81
+ }
82
+ Kh() {
83
+ var t;
84
+ const e = this.Ga;
85
+ this.Ga = this.qa.webkitPresentationMode, (t = this.j.player) == null || t.dispatchEvent(
86
+ new E("video-presentation-change", {
87
+ detail: this.Ga,
88
+ trigger: event
89
+ })
90
+ ), ["fullscreen", "picture-in-picture"].forEach((i) => {
91
+ (this.Ga === i || e === i) && this.j.delegate.p(`${i}-change`, {
92
+ detail: this.Ga === i,
93
+ trigger: event
94
+ });
95
+ });
96
+ }
97
+ }
98
+ class b {
99
+ constructor(e) {
100
+ this.Hh = e;
101
+ }
102
+ get active() {
103
+ return this.Hh.Ga === "fullscreen";
104
+ }
105
+ get supported() {
106
+ return this.Hh.Jh;
107
+ }
108
+ async enter() {
109
+ this.Hh.Ih("fullscreen");
110
+ }
111
+ async exit() {
112
+ this.Hh.Ih("inline");
113
+ }
114
+ }
115
+ class m {
116
+ constructor(e) {
117
+ this.Hh = e;
118
+ }
119
+ get active() {
120
+ return this.Hh.Ga === "picture-in-picture";
121
+ }
122
+ get supported() {
123
+ return this.Hh.Jh;
124
+ }
125
+ async enter() {
126
+ this.Hh.Ih("picture-in-picture");
127
+ }
128
+ async exit() {
129
+ this.Hh.Ih("inline");
130
+ }
131
+ }
132
+ class V extends v {
133
+ constructor(t, i) {
134
+ super(t);
135
+ r(this, "$$PROVIDER_TYPE", "VIDEO");
136
+ r(this, "fullscreen");
137
+ r(this, "pictureInPicture");
138
+ if (p(t)) {
139
+ const n = new G(t, i);
140
+ this.fullscreen = new b(n), this.pictureInPicture = new m(n);
141
+ } else l(t) && (this.pictureInPicture = new x(t, i));
142
+ }
143
+ get type() {
144
+ return "video";
145
+ }
146
+ setup(t) {
147
+ super.setup(t), H(this.video) && new q(this.video, t), t.textRenderers[o](this.video), d(() => {
148
+ t.textRenderers[o](null);
149
+ }), this.type === "video" && t.delegate.p("provider-setup", { detail: this });
150
+ }
151
+ /**
152
+ * The native HTML `<video>` element.
153
+ *
154
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement}
155
+ */
156
+ get video() {
157
+ return this.j;
158
+ }
159
+ }
160
+ export {
161
+ V as VideoProvider
162
+ };
@@ -0,0 +1,27 @@
1
+ var d = Object.defineProperty;
2
+ var s = (i, e, t) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var r = (i, e, t) => s(i, typeof e != "symbol" ? e + "" : e, t);
4
+ import { H as p } from "./provider-WrRdjcjY.js";
5
+ class a extends p {
6
+ constructor() {
7
+ super(...arguments);
8
+ r(this, "$$PROVIDER_TYPE", "AUDIO");
9
+ }
10
+ get type() {
11
+ return "audio";
12
+ }
13
+ setup(t) {
14
+ super.setup(t), this.type === "audio" && t.delegate.p("provider-setup", { detail: this });
15
+ }
16
+ /**
17
+ * The native HTML `<audio>` element.
18
+ *
19
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement}
20
+ */
21
+ get audio() {
22
+ return this.j;
23
+ }
24
+ }
25
+ export {
26
+ a as AudioProvider
27
+ };
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var d=(s,t,e)=>t in s?o(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var n=(s,t,e)=>d(s,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./media-core-Rxz2MNwG.cjs"),l=require("./provider-sqICX3H9.cjs");class p{constructor(t,e){this.qa=t,this.ph=e,t.textTracks.onaddtrack=this.va.bind(this),r.onDispose(this.Eh.bind(this))}va(t){const e=t.track;if(!e||T(this.qa,e))return;const i=new r.TextTrack({id:e.id,kind:e.kind,label:e.label,language:e.language,type:"vtt"});i[r.TEXT_TRACK_NATIVE]={track:e},i[r.TEXT_TRACK_READY_STATE]=2,i[r.TEXT_TRACK_NATIVE_HLS]=!0;let a=0;const h=u=>{if(e.cues)for(let c=a;c<e.cues.length;c++)i.addCue(e.cues[c],u),a++};h(t),e.oncuechange=h,this.ph.textTracks.add(i,t),i.setMode(e.mode,t)}Eh(){var t;this.qa.textTracks.onaddtrack=null;for(const e of this.ph.textTracks){const i=(t=e[r.TEXT_TRACK_NATIVE])==null?void 0:t.track;i!=null&&i.oncuechange&&(i.oncuechange=null)}}}function T(s,t){return Array.from(s.children).find(e=>e.track===t)}class g{constructor(t,e){n(this,"Hc",(t,e)=>{this.j.delegate.p("picture-in-picture-change",{detail:t,trigger:e})});this.qa=t,this.j=e,r.listenEvent(this.qa,"enterpictureinpicture",this.Fh.bind(this)),r.listenEvent(this.qa,"leavepictureinpicture",this.Gh.bind(this))}get active(){return document.pictureInPictureElement===this.qa}get supported(){return r.canUsePictureInPicture(this.qa)}async enter(){return this.qa.requestPictureInPicture()}exit(){return document.exitPictureInPicture()}Fh(t){this.Hc(!0,t)}Gh(t){this.Hc(!1,t)}}class P{constructor(t,e){n(this,"Ga","inline");this.qa=t,this.j=e,r.listenEvent(this.qa,"webkitpresentationmodechanged",this.Kh.bind(this))}get Jh(){return r.canUseVideoPresentation(this.qa)}async Ih(t){this.Ga!==t&&this.qa.webkitSetPresentationMode(t)}Kh(){var e;const t=this.Ga;this.Ga=this.qa.webkitPresentationMode,(e=this.j.player)==null||e.dispatchEvent(new r.DOMEvent("video-presentation-change",{detail:this.Ga,trigger:event})),["fullscreen","picture-in-picture"].forEach(i=>{(this.Ga===i||t===i)&&this.j.delegate.p(`${i}-change`,{detail:this.Ga===i,trigger:event})})}}class f{constructor(t){this.Hh=t}get active(){return this.Hh.Ga==="fullscreen"}get supported(){return this.Hh.Jh}async enter(){this.Hh.Ih("fullscreen")}async exit(){this.Hh.Ih("inline")}}class E{constructor(t){this.Hh=t}get active(){return this.Hh.Ga==="picture-in-picture"}get supported(){return this.Hh.Jh}async enter(){this.Hh.Ih("picture-in-picture")}async exit(){this.Hh.Ih("inline")}}class I extends l.HTMLMediaProvider{constructor(e,i){super(e);n(this,"$$PROVIDER_TYPE","VIDEO");n(this,"fullscreen");n(this,"pictureInPicture");if(r.canUseVideoPresentation(e)){const a=new P(e,i);this.fullscreen=new f(a),this.pictureInPicture=new E(a)}else r.canUsePictureInPicture(e)&&(this.pictureInPicture=new g(e,i))}get type(){return"video"}setup(e){super.setup(e),r.canPlayHLSNatively(this.video)&&new p(this.video,e),e.textRenderers[r.ATTACH_VIDEO](this.video),r.onDispose(()=>{e.textRenderers[r.ATTACH_VIDEO](null)}),this.type==="video"&&e.delegate.p("provider-setup",{detail:this})}get video(){return this.j}}exports.VideoProvider=I;