@mux/mux-player 1.11.4 → 1.12.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.
@@ -0,0 +1,1254 @@
1
+ // ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
2
+ var EventTarget = class {
3
+ addEventListener() {
4
+ }
5
+ removeEventListener() {
6
+ }
7
+ dispatchEvent() {
8
+ return true;
9
+ }
10
+ };
11
+ var ResizeObserver = class {
12
+ observe() {
13
+ }
14
+ };
15
+ var documentShim = {
16
+ createElement: function() {
17
+ return new globalThisShim.HTMLElement();
18
+ },
19
+ addEventListener() {
20
+ },
21
+ removeEventListener() {
22
+ }
23
+ };
24
+ var globalThisShim = {
25
+ ResizeObserver,
26
+ document: documentShim,
27
+ HTMLElement: class HTMLElement extends EventTarget {
28
+ },
29
+ DocumentFragment: class DocumentFragment extends EventTarget {
30
+ },
31
+ customElements: {
32
+ get: function() {
33
+ },
34
+ define: function() {
35
+ },
36
+ whenDefined: function() {
37
+ }
38
+ },
39
+ CustomEvent: function CustomEvent() {
40
+ },
41
+ getComputedStyle: function() {
42
+ }
43
+ };
44
+ var isServer = typeof window === "undefined" || typeof window.customElements === "undefined";
45
+ var isShimmed = Object.keys(globalThisShim).every((key) => key in globalThis);
46
+ var GlobalThis = isServer && !isShimmed ? globalThisShim : globalThis;
47
+ var Document = isServer && !isShimmed ? documentShim : globalThis.document;
48
+
49
+ // ../../node_modules/media-chrome/dist/utils/template-parts.js
50
+ var __defProp = Object.defineProperty;
51
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
52
+ var __publicField = (obj, key, value) => {
53
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
54
+ return value;
55
+ };
56
+ var __accessCheck = (obj, member, msg) => {
57
+ if (!member.has(obj))
58
+ throw TypeError("Cannot " + msg);
59
+ };
60
+ var __privateGet = (obj, member, getter) => {
61
+ __accessCheck(obj, member, "read from private field");
62
+ return getter ? getter.call(obj) : member.get(obj);
63
+ };
64
+ var __privateAdd = (obj, member, value) => {
65
+ if (member.has(obj))
66
+ throw TypeError("Cannot add the same private member more than once");
67
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
68
+ };
69
+ var __privateSet = (obj, member, value, setter) => {
70
+ __accessCheck(obj, member, "write to private field");
71
+ setter ? setter.call(obj, value) : member.set(obj, value);
72
+ return value;
73
+ };
74
+ var _parts;
75
+ var _processor;
76
+ var _items;
77
+ var _value;
78
+ var _element;
79
+ var _attributeName;
80
+ var _namespaceURI;
81
+ var _list;
82
+ var list_get;
83
+ var _parentNode;
84
+ var _nodes;
85
+ var ELEMENT = 1;
86
+ var STRING = 0;
87
+ var PART = 1;
88
+ var defaultProcessor = {
89
+ processCallback(instance, parts, state) {
90
+ if (!state)
91
+ return;
92
+ for (const [expression, part] of parts) {
93
+ if (expression in state) {
94
+ const value = state[expression];
95
+ if (typeof value === "boolean" && part instanceof AttrPart && typeof part.element[part.attributeName] === "boolean") {
96
+ part.booleanValue = value;
97
+ } else if (typeof value === "function" && part instanceof AttrPart) {
98
+ part.element[part.attributeName] = value;
99
+ } else {
100
+ part.value = value;
101
+ }
102
+ }
103
+ }
104
+ }
105
+ };
106
+ var TemplateInstance = class extends GlobalThis.DocumentFragment {
107
+ constructor(template2, state, processor2 = defaultProcessor) {
108
+ var _a;
109
+ super();
110
+ __privateAdd(this, _parts, void 0);
111
+ __privateAdd(this, _processor, void 0);
112
+ this.append(template2.content.cloneNode(true));
113
+ __privateSet(this, _parts, parse(this));
114
+ __privateSet(this, _processor, processor2);
115
+ (_a = processor2.createCallback) == null ? void 0 : _a.call(processor2, this, __privateGet(this, _parts), state);
116
+ processor2.processCallback(this, __privateGet(this, _parts), state);
117
+ }
118
+ update(state) {
119
+ __privateGet(this, _processor).processCallback(this, __privateGet(this, _parts), state);
120
+ }
121
+ };
122
+ _parts = /* @__PURE__ */ new WeakMap();
123
+ _processor = /* @__PURE__ */ new WeakMap();
124
+ var parse = (element, parts = []) => {
125
+ let type, value;
126
+ for (let attr of element.attributes || []) {
127
+ if (attr.value.includes("{{")) {
128
+ const list = new AttrPartList();
129
+ for ([type, value] of tokenize(attr.value)) {
130
+ if (!type)
131
+ list.append(value);
132
+ else {
133
+ const part = new AttrPart(element, attr.name, attr.namespaceURI);
134
+ list.append(part);
135
+ parts.push([value, part]);
136
+ }
137
+ }
138
+ attr.value = list.toString();
139
+ }
140
+ }
141
+ for (let node of element.childNodes) {
142
+ if (node.nodeType === ELEMENT && !(node instanceof HTMLTemplateElement)) {
143
+ parse(node, parts);
144
+ } else {
145
+ if (node.nodeType === ELEMENT || node.data.includes("{{")) {
146
+ const items = [];
147
+ if (node.data) {
148
+ for ([type, value] of tokenize(node.data))
149
+ if (!type)
150
+ items.push(new Text(value));
151
+ else {
152
+ const part = new ChildNodePart(element);
153
+ items.push(part);
154
+ parts.push([value, part]);
155
+ }
156
+ } else if (node instanceof HTMLTemplateElement) {
157
+ const part = new InnerTemplatePart(element, node);
158
+ items.push(part);
159
+ parts.push([part.expression, part]);
160
+ }
161
+ node.replaceWith(
162
+ ...items.flatMap((part) => part.replacementNodes || [part])
163
+ );
164
+ }
165
+ }
166
+ }
167
+ return parts;
168
+ };
169
+ var mem = {};
170
+ var tokenize = (text) => {
171
+ let value = "", open = 0, tokens = mem[text], i = 0, c;
172
+ if (tokens)
173
+ return tokens;
174
+ else
175
+ tokens = [];
176
+ for (; c = text[i]; i++) {
177
+ if (c === "{" && text[i + 1] === "{" && text[i - 1] !== "\\" && text[i + 2] && ++open == 1) {
178
+ if (value)
179
+ tokens.push([STRING, value]);
180
+ value = "";
181
+ i++;
182
+ } else if (c === "}" && text[i + 1] === "}" && text[i - 1] !== "\\" && !--open) {
183
+ tokens.push([PART, value.trim()]);
184
+ value = "";
185
+ i++;
186
+ } else
187
+ value += c || "";
188
+ }
189
+ if (value)
190
+ tokens.push([STRING, (open > 0 ? "{{" : "") + value]);
191
+ return mem[text] = tokens;
192
+ };
193
+ var FRAGMENT = 11;
194
+ var Part = class {
195
+ get value() {
196
+ return "";
197
+ }
198
+ set value(val) {
199
+ }
200
+ toString() {
201
+ return this.value;
202
+ }
203
+ };
204
+ var attrPartToList = /* @__PURE__ */ new WeakMap();
205
+ var AttrPartList = class {
206
+ constructor() {
207
+ __privateAdd(this, _items, []);
208
+ }
209
+ [Symbol.iterator]() {
210
+ return __privateGet(this, _items).values();
211
+ }
212
+ get length() {
213
+ return __privateGet(this, _items).length;
214
+ }
215
+ item(index) {
216
+ return __privateGet(this, _items)[index];
217
+ }
218
+ append(...items) {
219
+ for (const item of items) {
220
+ if (item instanceof AttrPart) {
221
+ attrPartToList.set(item, this);
222
+ }
223
+ __privateGet(this, _items).push(item);
224
+ }
225
+ }
226
+ toString() {
227
+ return __privateGet(this, _items).join("");
228
+ }
229
+ };
230
+ _items = /* @__PURE__ */ new WeakMap();
231
+ var AttrPart = class extends Part {
232
+ constructor(element, attributeName, namespaceURI) {
233
+ super();
234
+ __privateAdd(this, _list);
235
+ __privateAdd(this, _value, "");
236
+ __privateAdd(this, _element, void 0);
237
+ __privateAdd(this, _attributeName, void 0);
238
+ __privateAdd(this, _namespaceURI, void 0);
239
+ __privateSet(this, _element, element);
240
+ __privateSet(this, _attributeName, attributeName);
241
+ __privateSet(this, _namespaceURI, namespaceURI);
242
+ }
243
+ get attributeName() {
244
+ return __privateGet(this, _attributeName);
245
+ }
246
+ get attributeNamespace() {
247
+ return __privateGet(this, _namespaceURI);
248
+ }
249
+ get element() {
250
+ return __privateGet(this, _element);
251
+ }
252
+ get value() {
253
+ return __privateGet(this, _value);
254
+ }
255
+ set value(newValue) {
256
+ if (__privateGet(this, _value) === newValue)
257
+ return;
258
+ __privateSet(this, _value, newValue);
259
+ if (!__privateGet(this, _list, list_get) || __privateGet(this, _list, list_get).length === 1) {
260
+ if (newValue == null) {
261
+ __privateGet(this, _element).removeAttributeNS(
262
+ __privateGet(this, _namespaceURI),
263
+ __privateGet(this, _attributeName)
264
+ );
265
+ } else {
266
+ __privateGet(this, _element).setAttributeNS(
267
+ __privateGet(this, _namespaceURI),
268
+ __privateGet(this, _attributeName),
269
+ newValue
270
+ );
271
+ }
272
+ } else {
273
+ __privateGet(this, _element).setAttributeNS(
274
+ __privateGet(this, _namespaceURI),
275
+ __privateGet(this, _attributeName),
276
+ __privateGet(this, _list, list_get)
277
+ );
278
+ }
279
+ }
280
+ get booleanValue() {
281
+ return __privateGet(this, _element).hasAttributeNS(
282
+ __privateGet(this, _namespaceURI),
283
+ __privateGet(this, _attributeName)
284
+ );
285
+ }
286
+ set booleanValue(value) {
287
+ if (!__privateGet(this, _list, list_get) || __privateGet(this, _list, list_get).length === 1)
288
+ this.value = value ? "" : null;
289
+ else
290
+ throw new DOMException("Value is not fully templatized");
291
+ }
292
+ };
293
+ _value = /* @__PURE__ */ new WeakMap();
294
+ _element = /* @__PURE__ */ new WeakMap();
295
+ _attributeName = /* @__PURE__ */ new WeakMap();
296
+ _namespaceURI = /* @__PURE__ */ new WeakMap();
297
+ _list = /* @__PURE__ */ new WeakSet();
298
+ list_get = function() {
299
+ return attrPartToList.get(this);
300
+ };
301
+ var ChildNodePart = class extends Part {
302
+ constructor(parentNode, nodes) {
303
+ super();
304
+ __privateAdd(this, _parentNode, void 0);
305
+ __privateAdd(this, _nodes, void 0);
306
+ __privateSet(this, _parentNode, parentNode);
307
+ __privateSet(this, _nodes, nodes ? [...nodes] : [new Text()]);
308
+ }
309
+ get replacementNodes() {
310
+ return __privateGet(this, _nodes);
311
+ }
312
+ get parentNode() {
313
+ return __privateGet(this, _parentNode);
314
+ }
315
+ get nextSibling() {
316
+ return __privateGet(this, _nodes)[__privateGet(this, _nodes).length - 1].nextSibling;
317
+ }
318
+ get previousSibling() {
319
+ return __privateGet(this, _nodes)[0].previousSibling;
320
+ }
321
+ get value() {
322
+ return __privateGet(this, _nodes).map((node) => node.textContent).join("");
323
+ }
324
+ set value(newValue) {
325
+ this.replace(newValue);
326
+ }
327
+ replace(...nodes) {
328
+ const normalisedNodes = nodes.flat().flatMap(
329
+ (node) => node == null ? [new Text()] : node.forEach ? [...node] : node.nodeType === FRAGMENT ? [...node.childNodes] : node.nodeType ? [node] : [new Text(node)]
330
+ );
331
+ if (!normalisedNodes.length)
332
+ normalisedNodes.push(new Text());
333
+ __privateSet(this, _nodes, swapdom(
334
+ __privateGet(this, _nodes)[0].parentNode,
335
+ __privateGet(this, _nodes),
336
+ normalisedNodes,
337
+ this.nextSibling
338
+ ));
339
+ }
340
+ };
341
+ _parentNode = /* @__PURE__ */ new WeakMap();
342
+ _nodes = /* @__PURE__ */ new WeakMap();
343
+ var InnerTemplatePart = class extends ChildNodePart {
344
+ constructor(parentNode, template2) {
345
+ let directive = template2.getAttribute("directive") || template2.getAttribute("type");
346
+ let expression = template2.getAttribute("expression") || template2.getAttribute(directive) || "";
347
+ if (expression.startsWith("{{"))
348
+ expression = expression.trim().slice(2, -2).trim();
349
+ super(parentNode);
350
+ __publicField(this, "directive");
351
+ this.expression = expression;
352
+ this.template = template2;
353
+ this.directive = directive;
354
+ }
355
+ };
356
+ function swapdom(parent, a, b, end = null) {
357
+ let i = 0, cur, next, bi, n = b.length, m = a.length;
358
+ while (i < n && i < m && a[i] == b[i])
359
+ i++;
360
+ while (i < n && i < m && b[n - 1] == a[m - 1])
361
+ end = b[--m, --n];
362
+ if (i == m)
363
+ while (i < n)
364
+ parent.insertBefore(b[i++], end);
365
+ if (i == n)
366
+ while (i < m)
367
+ parent.removeChild(a[i++]);
368
+ else {
369
+ cur = a[i];
370
+ while (i < n) {
371
+ bi = b[i++], next = cur ? cur.nextSibling : end;
372
+ if (cur == bi)
373
+ cur = next;
374
+ else if (i < n && b[i] == next)
375
+ parent.replaceChild(bi, cur), cur = next;
376
+ else
377
+ parent.insertBefore(bi, cur);
378
+ }
379
+ while (cur != end)
380
+ next = cur.nextSibling, parent.removeChild(cur), cur = next;
381
+ }
382
+ return b;
383
+ }
384
+
385
+ // ../../node_modules/media-chrome/dist/utils/utils.js
386
+ function camelCase(name) {
387
+ return name.replace(/[-_]([a-z])/g, ($0, $1) => $1.toUpperCase());
388
+ }
389
+ function isNumericString(str) {
390
+ if (typeof str != "string")
391
+ return false;
392
+ return !isNaN(str) && !isNaN(parseFloat(str));
393
+ }
394
+
395
+ // ../../node_modules/media-chrome/dist/utils/template-processor.js
396
+ var pipeModifiers = {
397
+ string: (value) => String(value)
398
+ };
399
+ var PartialTemplate = class {
400
+ constructor(template2) {
401
+ this.template = template2;
402
+ this.state = void 0;
403
+ }
404
+ };
405
+ var templates = /* @__PURE__ */ new WeakMap();
406
+ var templateInstances = /* @__PURE__ */ new WeakMap();
407
+ var Directives = {
408
+ partial: (part, state) => {
409
+ state[part.expression] = new PartialTemplate(part.template);
410
+ },
411
+ if: (part, state) => {
412
+ var _a;
413
+ if (evaluateExpression(part.expression, state)) {
414
+ if (templates.get(part) !== part.template) {
415
+ templates.set(part, part.template);
416
+ const tpl = new TemplateInstance(part.template, state, processor);
417
+ part.replace(tpl);
418
+ templateInstances.set(part, tpl);
419
+ } else {
420
+ (_a = templateInstances.get(part)) == null ? void 0 : _a.update(state);
421
+ }
422
+ } else {
423
+ part.replace("");
424
+ templates.delete(part);
425
+ templateInstances.delete(part);
426
+ }
427
+ }
428
+ };
429
+ var DirectiveNames = Object.keys(Directives);
430
+ var processor = {
431
+ processCallback(instance, parts, state) {
432
+ var _a, _b;
433
+ if (!state)
434
+ return;
435
+ for (const [expression, part] of parts) {
436
+ if (part instanceof InnerTemplatePart) {
437
+ if (!part.directive) {
438
+ const directive = DirectiveNames.find((n) => part.template.hasAttribute(n));
439
+ if (directive) {
440
+ part.directive = directive;
441
+ part.expression = part.template.getAttribute(directive);
442
+ }
443
+ }
444
+ (_a = Directives[part.directive]) == null ? void 0 : _a.call(Directives, part, state);
445
+ continue;
446
+ }
447
+ let value = evaluateExpression(expression, state);
448
+ if (value instanceof PartialTemplate) {
449
+ if (templates.get(part) !== value.template) {
450
+ templates.set(part, value.template);
451
+ value = new TemplateInstance(
452
+ value.template,
453
+ value.state,
454
+ processor
455
+ );
456
+ part.value = value;
457
+ templateInstances.set(part, value);
458
+ } else {
459
+ (_b = templateInstances.get(part)) == null ? void 0 : _b.update(value.state);
460
+ }
461
+ continue;
462
+ }
463
+ if (value) {
464
+ if (part instanceof AttrPart) {
465
+ if (part.attributeName.startsWith("aria-")) {
466
+ value = String(value);
467
+ }
468
+ }
469
+ if (part instanceof AttrPart) {
470
+ if (typeof value === "boolean") {
471
+ part.booleanValue = value;
472
+ } else if (typeof value === "function") {
473
+ part.element[part.attributeName] = value;
474
+ } else {
475
+ part.value = value;
476
+ }
477
+ } else {
478
+ part.value = value;
479
+ templates.delete(part);
480
+ templateInstances.delete(part);
481
+ }
482
+ } else {
483
+ if (part instanceof AttrPart) {
484
+ part.value = void 0;
485
+ } else {
486
+ part.value = void 0;
487
+ templates.delete(part);
488
+ templateInstances.delete(part);
489
+ }
490
+ }
491
+ }
492
+ }
493
+ };
494
+ var operators = {
495
+ "!": (a) => !a,
496
+ "!!": (a) => !!a,
497
+ "==": (a, b) => a == b,
498
+ "!=": (a, b) => a != b,
499
+ ">": (a, b) => a > b,
500
+ ">=": (a, b) => a >= b,
501
+ "<": (a, b) => a < b,
502
+ "<=": (a, b) => a <= b,
503
+ "??": (a, b) => a != null ? a : b,
504
+ "|": (a, b) => {
505
+ var _a;
506
+ return (_a = pipeModifiers[b]) == null ? void 0 : _a.call(pipeModifiers, a);
507
+ }
508
+ };
509
+ function tokenizeExpression(expr) {
510
+ return tokenize2(expr, {
511
+ boolean: /true|false/,
512
+ number: /-?\d+\.?\d*/,
513
+ string: /(["'])((?:\\.|[^\\])*?)\1/,
514
+ operator: /[!=><][=!]?|\?\?|\|/,
515
+ ws: /\s+/,
516
+ param: /[$a-z_][$\w]*/i
517
+ }).filter(({ type }) => type !== "ws");
518
+ }
519
+ function evaluateExpression(expr, state = {}) {
520
+ var _a, _b, _c, _d, _e, _f, _g;
521
+ const tokens = tokenizeExpression(expr);
522
+ if (tokens.length === 0 || tokens.some(({ type }) => !type)) {
523
+ return invalidExpression(expr);
524
+ }
525
+ if (((_a = tokens[0]) == null ? void 0 : _a.token) === ">") {
526
+ const partial = state[(_b = tokens[1]) == null ? void 0 : _b.token];
527
+ if (!partial) {
528
+ return invalidExpression(expr);
529
+ }
530
+ const partialState = { ...state };
531
+ partial.state = partialState;
532
+ const args = tokens.slice(2);
533
+ for (let i = 0; i < args.length; i += 3) {
534
+ const name = (_c = args[i]) == null ? void 0 : _c.token;
535
+ const operator = (_d = args[i + 1]) == null ? void 0 : _d.token;
536
+ const value = (_e = args[i + 2]) == null ? void 0 : _e.token;
537
+ if (name && operator === "=") {
538
+ partialState[name] = getParamValue(value, state);
539
+ }
540
+ }
541
+ return partial;
542
+ }
543
+ if (tokens.length === 1) {
544
+ if (!isValidParam(tokens[0])) {
545
+ return invalidExpression(expr);
546
+ }
547
+ return getParamValue(tokens[0].token, state);
548
+ }
549
+ if (tokens.length === 2) {
550
+ const operator = (_f = tokens[0]) == null ? void 0 : _f.token;
551
+ const run = operators[operator];
552
+ if (!run || !isValidParam(tokens[1])) {
553
+ return invalidExpression(expr);
554
+ }
555
+ const a = getParamValue(tokens[1].token, state);
556
+ return run(a);
557
+ }
558
+ if (tokens.length === 3) {
559
+ const operator = (_g = tokens[1]) == null ? void 0 : _g.token;
560
+ const run = operators[operator];
561
+ if (!run || !isValidParam(tokens[0]) || !isValidParam(tokens[2])) {
562
+ return invalidExpression(expr);
563
+ }
564
+ const a = getParamValue(tokens[0].token, state);
565
+ if (operator === "|") {
566
+ return run(a, tokens[2].token);
567
+ }
568
+ const b = getParamValue(tokens[2].token, state);
569
+ return run(a, b);
570
+ }
571
+ }
572
+ function invalidExpression(expr) {
573
+ console.warn(`Warning: invalid expression \`${expr}\``);
574
+ return false;
575
+ }
576
+ function isValidParam({ type }) {
577
+ return ["number", "boolean", "string", "param"].includes(type);
578
+ }
579
+ function getParamValue(raw, state) {
580
+ const firstChar = raw[0];
581
+ const lastChar = raw.slice(-1);
582
+ if (raw === "true" || raw === "false") {
583
+ return raw === "true";
584
+ }
585
+ if (firstChar === lastChar && [`'`, `"`].includes(firstChar)) {
586
+ return raw.slice(1, -1);
587
+ }
588
+ if (isNumericString(raw)) {
589
+ return parseFloat(raw);
590
+ }
591
+ return state[raw];
592
+ }
593
+ function tokenize2(str, parsers) {
594
+ let len, match, token, tokens = [];
595
+ while (str) {
596
+ token = null;
597
+ len = str.length;
598
+ for (let key in parsers) {
599
+ match = parsers[key].exec(str);
600
+ if (match && match.index < len) {
601
+ token = {
602
+ token: match[0],
603
+ type: key,
604
+ matches: match.slice(1)
605
+ };
606
+ len = match.index;
607
+ }
608
+ }
609
+ if (len) {
610
+ tokens.push({
611
+ token: str.substr(0, len),
612
+ type: void 0
613
+ });
614
+ }
615
+ if (token) {
616
+ tokens.push(token);
617
+ }
618
+ str = str.substr(len + (token ? token.token.length : 0));
619
+ }
620
+ return tokens;
621
+ }
622
+
623
+ // ../../node_modules/media-chrome/dist/media-theme-element.js
624
+ var __defProp2 = Object.defineProperty;
625
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
626
+ var __publicField2 = (obj, key, value) => {
627
+ __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
628
+ return value;
629
+ };
630
+ var __accessCheck2 = (obj, member, msg) => {
631
+ if (!member.has(obj))
632
+ throw TypeError("Cannot " + msg);
633
+ };
634
+ var __privateGet2 = (obj, member, getter) => {
635
+ __accessCheck2(obj, member, "read from private field");
636
+ return getter ? getter.call(obj) : member.get(obj);
637
+ };
638
+ var __privateAdd2 = (obj, member, value) => {
639
+ if (member.has(obj))
640
+ throw TypeError("Cannot add the same private member more than once");
641
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
642
+ };
643
+ var __privateSet2 = (obj, member, value, setter) => {
644
+ __accessCheck2(obj, member, "write to private field");
645
+ setter ? setter.call(obj, value) : member.set(obj, value);
646
+ return value;
647
+ };
648
+ var __privateMethod = (obj, member, method) => {
649
+ __accessCheck2(obj, member, "access private method");
650
+ return method;
651
+ };
652
+ var _template;
653
+ var _prevTemplate;
654
+ var _prevTemplateId;
655
+ var _upgradeProperty;
656
+ var upgradeProperty_fn;
657
+ var _updateTemplate;
658
+ var updateTemplate_fn;
659
+ var observedMediaAttributes = {
660
+ mediatargetlivewindow: "targetlivewindow",
661
+ mediastreamtype: "streamtype"
662
+ };
663
+ var prependTemplate = Document.createElement("template");
664
+ prependTemplate.innerHTML = `
665
+ <style>
666
+ :host {
667
+ display: inline-block;
668
+ line-height: 0;
669
+ }
670
+
671
+ media-controller {
672
+ width: 100%;
673
+ height: 100%;
674
+ }
675
+
676
+ media-controller:not([mediasubtitleslist]) media-captions-selectmenu,
677
+ media-captions-button:not([mediasubtitleslist]),
678
+ media-rendition-selectmenu[mediarenditionunavailable],
679
+ media-volume-range[mediavolumeunavailable],
680
+ media-airplay-button[mediaairplayunavailable],
681
+ media-fullscreen-button[mediafullscreenunavailable],
682
+ media-cast-button[mediacastunavailable],
683
+ media-pip-button[mediapipunavailable] {
684
+ display: none;
685
+ }
686
+ </style>
687
+ `;
688
+ var MediaThemeElement = class extends GlobalThis.HTMLElement {
689
+ constructor() {
690
+ super();
691
+ __privateAdd2(this, _upgradeProperty);
692
+ __privateAdd2(this, _updateTemplate);
693
+ __publicField2(this, "renderRoot");
694
+ __publicField2(this, "renderer");
695
+ __privateAdd2(this, _template, void 0);
696
+ __privateAdd2(this, _prevTemplate, void 0);
697
+ __privateAdd2(this, _prevTemplateId, void 0);
698
+ if (this.shadowRoot) {
699
+ this.renderRoot = this.shadowRoot;
700
+ } else {
701
+ this.renderRoot = this.attachShadow({ mode: "open" });
702
+ this.createRenderer();
703
+ }
704
+ const observer = new MutationObserver((mutationList) => {
705
+ if (mutationList.some((mutation) => {
706
+ const target = mutation.target;
707
+ if (target === this)
708
+ return true;
709
+ if (target.localName !== "media-controller")
710
+ return false;
711
+ if (observedMediaAttributes[mutation.attributeName])
712
+ return true;
713
+ if (mutation.attributeName.startsWith("breakpoint"))
714
+ return true;
715
+ return false;
716
+ })) {
717
+ this.render();
718
+ }
719
+ });
720
+ observer.observe(this, { attributes: true });
721
+ observer.observe(this.renderRoot, {
722
+ attributes: true,
723
+ subtree: true
724
+ });
725
+ __privateMethod(this, _upgradeProperty, upgradeProperty_fn).call(this, "template");
726
+ }
727
+ get mediaController() {
728
+ return this.renderRoot.querySelector("media-controller");
729
+ }
730
+ get template() {
731
+ var _a;
732
+ return (_a = __privateGet2(this, _template)) != null ? _a : this.constructor.template;
733
+ }
734
+ set template(element) {
735
+ __privateSet2(this, _prevTemplateId, null);
736
+ __privateSet2(this, _template, element);
737
+ this.createRenderer();
738
+ }
739
+ get props() {
740
+ var _a, _b, _c;
741
+ const observedAttributes = [
742
+ ...Array.from((_b = (_a = this.mediaController) == null ? void 0 : _a.attributes) != null ? _b : []).filter(({ name }) => {
743
+ return observedMediaAttributes[name] || name.startsWith("breakpoint");
744
+ }),
745
+ ...Array.from(this.attributes)
746
+ ];
747
+ const props = {};
748
+ for (let attr of observedAttributes) {
749
+ const name = (_c = observedMediaAttributes[attr.name]) != null ? _c : camelCase(attr.name);
750
+ let { value } = attr;
751
+ if (value != null) {
752
+ if (isNumericString(value)) {
753
+ value = parseFloat(value);
754
+ }
755
+ props[name] = value === "" ? true : value;
756
+ } else {
757
+ props[name] = false;
758
+ }
759
+ }
760
+ return props;
761
+ }
762
+ attributeChangedCallback(attrName, oldValue, newValue) {
763
+ if (attrName === "template" && oldValue != newValue) {
764
+ __privateMethod(this, _updateTemplate, updateTemplate_fn).call(this);
765
+ }
766
+ }
767
+ connectedCallback() {
768
+ __privateMethod(this, _updateTemplate, updateTemplate_fn).call(this);
769
+ }
770
+ createRenderer() {
771
+ if (this.template && this.template !== __privateGet2(this, _prevTemplate)) {
772
+ __privateSet2(this, _prevTemplate, this.template);
773
+ this.renderer = new TemplateInstance(
774
+ this.template,
775
+ this.props,
776
+ this.constructor.processor
777
+ );
778
+ this.renderRoot.textContent = "";
779
+ this.renderRoot.append(
780
+ prependTemplate.content.cloneNode(true),
781
+ this.renderer
782
+ );
783
+ }
784
+ }
785
+ render() {
786
+ var _a;
787
+ (_a = this.renderer) == null ? void 0 : _a.update(this.props);
788
+ }
789
+ };
790
+ _template = /* @__PURE__ */ new WeakMap();
791
+ _prevTemplate = /* @__PURE__ */ new WeakMap();
792
+ _prevTemplateId = /* @__PURE__ */ new WeakMap();
793
+ _upgradeProperty = /* @__PURE__ */ new WeakSet();
794
+ upgradeProperty_fn = function(prop) {
795
+ if (Object.prototype.hasOwnProperty.call(this, prop)) {
796
+ const value = this[prop];
797
+ delete this[prop];
798
+ this[prop] = value;
799
+ }
800
+ };
801
+ _updateTemplate = /* @__PURE__ */ new WeakSet();
802
+ updateTemplate_fn = function() {
803
+ var _a;
804
+ const templateId = this.getAttribute("template");
805
+ if (!templateId || templateId === __privateGet2(this, _prevTemplateId))
806
+ return;
807
+ const rootNode = this.getRootNode();
808
+ const template2 = (_a = rootNode == null ? void 0 : rootNode.getElementById) == null ? void 0 : _a.call(rootNode, templateId);
809
+ if (template2) {
810
+ __privateSet2(this, _prevTemplateId, templateId);
811
+ __privateSet2(this, _template, template2);
812
+ this.createRenderer();
813
+ return;
814
+ }
815
+ if (isValidUrl(templateId)) {
816
+ __privateSet2(this, _prevTemplateId, templateId);
817
+ request(templateId).then((data) => {
818
+ const template22 = Document.createElement("template");
819
+ template22.innerHTML = data;
820
+ __privateSet2(this, _template, template22);
821
+ this.createRenderer();
822
+ }).catch(console.error);
823
+ }
824
+ };
825
+ __publicField2(MediaThemeElement, "template");
826
+ __publicField2(MediaThemeElement, "observedAttributes", ["template"]);
827
+ __publicField2(MediaThemeElement, "processor", processor);
828
+ function isValidUrl(url) {
829
+ if (!/^(\/|\.\/|https?:\/\/)/.test(url))
830
+ return false;
831
+ const base = /^https?:\/\//.test(url) ? void 0 : location.origin;
832
+ try {
833
+ new URL(url, base);
834
+ } catch (e) {
835
+ return false;
836
+ }
837
+ return true;
838
+ }
839
+ async function request(resource) {
840
+ const response = await fetch(resource);
841
+ if (response.status !== 200) {
842
+ throw new Error(`Failed to load resource: the server responded with a status of ${response.status}`);
843
+ }
844
+ return response.text();
845
+ }
846
+ if (!GlobalThis.customElements.get("media-theme")) {
847
+ GlobalThis.customElements.define("media-theme", MediaThemeElement);
848
+ }
849
+
850
+ // ../../node_modules/media-chrome/dist/themes/minimal.js
851
+ var __defProp3 = Object.defineProperty;
852
+ var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
853
+ var __publicField3 = (obj, key, value) => {
854
+ __defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
855
+ return value;
856
+ };
857
+ var template = Document.createElement("template");
858
+ template.innerHTML = `
859
+ <style>
860
+ :host {
861
+ --_primary-color: var(--media-primary-color, #fff);
862
+ --_secondary-color: var(--media-secondary-color, rgb(0 0 0 / .75));
863
+
864
+ --media-icon-color: var(--_primary-color);
865
+ --media-range-thumb-background: var(--_primary-color);
866
+ --media-range-bar-color: var(--_primary-color);
867
+ --media-control-background: transparent;
868
+ --media-control-hover-background: transparent;
869
+ --media-range-track-border-radius: 3px;
870
+ --media-time-range-buffered-color: rgba(255, 255, 255, 0.4);
871
+ --media-range-track-background: rgba(255, 255, 255, 0.5);
872
+ --media-range-thumb-opacity: 0;
873
+ --media-preview-thumbnail-border-radius: 2px;
874
+
875
+ color: var(--_primary-color);
876
+ }
877
+
878
+ media-control-bar {
879
+ --media-control-padding: 2px;
880
+ background: var(--_secondary-color);
881
+ align-items: center;
882
+ height: 30px;
883
+ border-radius: 4px;
884
+ margin: 0 5px 5px;
885
+ padding-inline: 2px;
886
+ }
887
+
888
+ media-controller[breakpointsm] media-control-bar {
889
+ --media-control-padding: 4px;
890
+ height: 38px;
891
+ border-radius: 8px;
892
+ padding-inline: 5px;
893
+ }
894
+
895
+ media-controller[breakpointmd] media-control-bar {
896
+ height: 46px;
897
+ margin: 0 8px 8px;
898
+ }
899
+
900
+ media-controller[breakpointlg] media-control-bar,
901
+ media-controller[breakpointxl] media-control-bar {
902
+ padding-inline: 7px;
903
+ }
904
+
905
+ .live-controls-left {
906
+ margin-right: auto;
907
+ }
908
+
909
+ media-time-range,
910
+ media-live-button,
911
+ media-time-display,
912
+ media-text-display,
913
+ media-playback-rate-button[role='button'] {
914
+ color: inherit;
915
+ }
916
+
917
+ [disabled]:not(media-live-button) {
918
+ opacity: 60%;
919
+ cursor: not-allowed;
920
+ }
921
+
922
+ ${""}
923
+ media-seek-backward-button {
924
+ display: var(--media-control-display, var(--media-seek-backward-button-display, none));
925
+ }
926
+
927
+ media-seek-forward-button {
928
+ display: var(--media-control-display, var(--media-seek-forward-button-display, none));
929
+ }
930
+
931
+ media-pip-button {
932
+ display: var(--media-control-display, var(--media-pip-button-display, none));
933
+ }
934
+ </style>
935
+
936
+ <template partial="PlayButton">
937
+ <media-play-button
938
+ part="play button"
939
+ disabled="{{disabled}}"
940
+ aria-disabled="{{disabled}}"
941
+ >
942
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="play">
943
+ <path
944
+ d="m6.73 20.93 14.05-8.54a.46.46 0 0 0 0-.78L6.73 3.07a.48.48 0 0 0-.73.39v17.07a.48.48 0 0 0 .73.4Z"
945
+ />
946
+ </svg>
947
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="pause">
948
+ <path
949
+ d="M6 19.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v15ZM14.5 4a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3Z"
950
+ />
951
+ </svg>
952
+ </media-play-button>
953
+ </template>
954
+
955
+ <template partial="MuteButton">
956
+ <media-mute-button
957
+ part="mute button"
958
+ disabled="{{disabled}}"
959
+ aria-disabled="{{disabled}}"
960
+ >
961
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="high">
962
+ <path
963
+ d="m11.14 4.86-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.21a.5.5 0 0 0-.86-.35Zm2.74-1.56v1.52A7.52 7.52 0 0 1 19.47 12a7.52 7.52 0 0 1-5.59 7.18v1.52A9 9 0 0 0 21 12a9 9 0 0 0-7.12-8.7Zm3.56 8.7a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
964
+ />
965
+ </svg>
966
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="medium">
967
+ <path
968
+ d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
969
+ />
970
+ </svg>
971
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="low">
972
+ <path
973
+ d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
974
+ />
975
+ </svg>
976
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="off">
977
+ <path
978
+ d="m3 4.05 4.48 4.47-.33.33a.49.49 0 0 1-.36.15H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.48.48 0 0 0 .36.15.5.5 0 0 0 .5-.5v-5.75l4.67 4.66a7.71 7.71 0 0 1-2.79 1.47v1.52a9.32 9.32 0 0 0 3.87-1.91L20 21l1-1L4.06 3 3 4.05Zm5.36 5.36 2.39 2.39V17L8 14.26a1.74 1.74 0 0 0-1.24-.51H4.25v-3.5h2.54A1.74 1.74 0 0 0 8 9.74l.36-.33ZM19.47 12a7.19 7.19 0 0 1-.89 3.47l1.11 1.1A8.64 8.64 0 0 0 21 12a9 9 0 0 0-7.12-8.7v1.52A7.52 7.52 0 0 1 19.47 12ZM12 8.88V5.21a.5.5 0 0 0-.5-.5.48.48 0 0 0-.36.15L9.56 6.44 12 8.88ZM15.91 12a4.284 4.284 0 0 1-.07.72l1.22 1.22a5.2 5.2 0 0 0 .38-1.94 5.49 5.49 0 0 0-3.56-5.1v1.66A4 4 0 0 1 15.91 12Z"
979
+ />
980
+ </svg>
981
+ </media-mute-button>
982
+ </template>
983
+
984
+ <template partial="CaptionsButton">
985
+ <media-captions-button
986
+ part="captions button"
987
+ disabled="{{disabled}}"
988
+ aria-disabled="{{disabled}}"
989
+ >
990
+ <svg aria-hidden="true" viewBox="0 0 26 24" slot="on">
991
+ <path
992
+ d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.41 10.1a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 4 4 0 0 1-1.28-.83 3.67 3.67 0 0 1-.84-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.53 3.53 0 0 1 .84-1.21 3.89 3.89 0 0 1 1.29-.8 4.76 4.76 0 0 1 1.63-.27 4.06 4.06 0 0 1 1.35.24c.225.091.44.205.64.34a2.7 2.7 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 2.78 2.78 0 0 0-.16 1c-.009.34.046.68.16 1 .104.283.26.545.46.77.188.21.415.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.88 2.88 0 0 1-1.22 1.01Zm7.52 0a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 3.89 3.89 0 0 1-1.28-.83 3.55 3.55 0 0 1-.85-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.43 3.43 0 0 1 .85-1.25 3.75 3.75 0 0 1 1.28-.8 4.76 4.76 0 0 1 1.63-.27 4 4 0 0 1 1.35.24c.225.091.44.205.64.34.21.144.395.32.55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.352 2.352 0 0 0-.46.77 3.01 3.01 0 0 0-.16 1c-.003.34.05.678.16 1 .108.282.263.542.46.77.188.21.416.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.82 2.82 0 0 1-1.21 1.05Z"
993
+ />
994
+ </svg>
995
+ <svg aria-hidden="true" viewBox="0 0 26 24" slot="off">
996
+ <path
997
+ d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-1.81-.12-4.67-.18-7.53-.18-2.86 0-5.72.06-7.53.18a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c1.81.12 4.67.18 7.53.18 2.86 0 5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.137-.21-8.283 0-12.42a1.11 1.11 0 0 1 .91-1.11c1.67-.11 4.43-.18 7.43-.18s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.137.21 8.283 0 12.42ZM10.843 14a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.099 2.099 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42c.23-.103.479-.158.73-.16.241-.004.48.044.7.14.199.088.373.222.51.39l1.08-.89a2.179 2.179 0 0 0-.47-.44 2.81 2.81 0 0 0-.54-.32 2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0 4.08 4.08 0 0 0-1.38.15 3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06c.316.293.687.52 1.09.67.443.16.91.238 1.38.23a3.2 3.2 0 0 0 1.28-.27c.401-.183.747-.47 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18 1.54 1.54 0 0 1-.7-.18 1.69 1.69 0 0 1-.57-.42 2.12 2.12 0 0 1-.43-.58 2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58c.241-.003.48.045.7.14.199.088.373.222.51.39l1.08-.92a2.43 2.43 0 0 0-.47-.44 3.22 3.22 0 0 0-.53-.29 2.999 2.999 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0 4.06 4.06 0 0 0-1.36.15 3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38c.16.402.405.764.72 1.06a3.17 3.17 0 0 0 1.09.67c.44.16.904.237 1.37.23.441 0 .877-.092 1.28-.27a2.45 2.45 0 0 0 1-.83l-1.15-.85a1.49 1.49 0 0 1-.54.49Z"
998
+ />
999
+ </svg>
1000
+ </media-captions-button>
1001
+ </template>
1002
+
1003
+ <template partial="FullscreenButton">
1004
+ <media-fullscreen-button
1005
+ part="fullscreen button"
1006
+ disabled="{{disabled}}"
1007
+ aria-disabled="{{disabled}}"
1008
+ >
1009
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="enter">
1010
+ <path
1011
+ d="M20.25 14.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 1 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM8.75 19.5H4.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 1 0 0-1.5Zm0-16.5h-5a.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V4.5h4.25a.76.76 0 0 0 .75-.75.76.76 0 0 0-.75-.75Z"
1012
+ />
1013
+ </svg>
1014
+ <svg aria-hidden="true" viewBox="0 0 24 24" slot="exit">
1015
+ <path
1016
+ d="M20.25 14.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 1 0 1.5 0V16h4.25a.75.75 0 1 0 0-1.5Zm-5-5h5a.75.75 0 1 0 0-1.5H16V3.75a.75.75 0 1 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 1 0 0 1.5H8v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5a.76.76 0 0 0-.75.75V8H3.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 8.75 3Z"
1017
+ />
1018
+ </svg>
1019
+ </media-fullscreen-button>
1020
+ </template>
1021
+
1022
+ <template partial="LiveButton">
1023
+ <media-live-button
1024
+ part="live seek-live button"
1025
+ disabled="{{disabled}}"
1026
+ aria-disabled="{{disabled}}"
1027
+ >
1028
+ <span slot="text" style="font-weight: normal;">Live</span>
1029
+ <svg
1030
+ slot="indicator"
1031
+ width="8"
1032
+ height="8"
1033
+ viewBox="0 0 8 8"
1034
+ xmlns="http://www.w3.org/2000/svg"
1035
+ style="width: 8px; height: 8px; margin-right: 2px;"
1036
+ >
1037
+ <rect width="8" height="8" rx="2" />
1038
+ </svg>
1039
+ </media-live-button>
1040
+ </template>
1041
+
1042
+ <template partial="PipButton">
1043
+ <media-pip-button
1044
+ part="pip button"
1045
+ disabled="{{disabled}}"
1046
+ aria-disabled="{{disabled}}"
1047
+ >
1048
+ <svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
1049
+ <path
1050
+ d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
1051
+ />
1052
+ </svg>
1053
+ <svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
1054
+ <path
1055
+ d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
1056
+ />
1057
+ </svg>
1058
+ </media-pip-button>
1059
+ </template>
1060
+
1061
+ <template partial="SeekBackwardButton">
1062
+ <media-seek-backward-button
1063
+ seekoffset="{{backwardseekoffset ?? 10}}"
1064
+ part="seek-backward button"
1065
+ disabled="{{disabled}}"
1066
+ aria-disabled="{{disabled}}"
1067
+ >
1068
+ <svg aria-hidden="true" viewBox="0 0 22 24" slot="icon">
1069
+ <path
1070
+ d="M11 6V3L5.37 7 11 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 11 6Z"
1071
+ />
1072
+ <text
1073
+ class="value"
1074
+ transform="translate(2.5 21)"
1075
+ style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
1076
+ >
1077
+ {{backwardseekoffset ?? 10}}
1078
+ </text>
1079
+ </svg>
1080
+ </media-seek-backward-button>
1081
+ </template>
1082
+
1083
+ <template partial="SeekForwardButton">
1084
+ <media-seek-forward-button
1085
+ seekoffset="{{forwardseekoffset ?? 10}}"
1086
+ part="seek-forward button"
1087
+ disabled="{{disabled}}"
1088
+ aria-disabled="{{disabled}}"
1089
+ >
1090
+ <svg aria-hidden="true" viewBox="0 0 22 24" slot="icon">
1091
+ <path
1092
+ d="M11 6V3l5.61 4L11 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 11 6Z"
1093
+ />
1094
+ <text
1095
+ class="value"
1096
+ transform="translate(10 21)"
1097
+ style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
1098
+ >
1099
+ {{forwardseekoffset ?? 10}}
1100
+ </text>
1101
+ </svg>
1102
+ </media-seek-forward-button>
1103
+ </template>
1104
+
1105
+ <template partial="AirplayButton">
1106
+ <media-airplay-button
1107
+ part="airplay button"
1108
+ disabled="{{disabled}}"
1109
+ aria-disabled="{{disabled}}"
1110
+ >
1111
+ <svg aria-hidden="true" viewBox="0 0 26 24" slot="icon">
1112
+ <path
1113
+ d="M13.19 14.22a.25.25 0 0 0-.38 0l-5.46 6.37a.25.25 0 0 0 .19.41h10.92a.25.25 0 0 0 .19-.41l-5.46-6.37Z"
1114
+ />
1115
+ <path
1116
+ d="M22 3H4a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h2.94L8 16.75H4.25V4.25h17.5v12.5H18L19.06 18H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
1117
+ />
1118
+ </svg>
1119
+ </media-airplay-button>
1120
+ </template>
1121
+
1122
+ <template partial="CastButton">
1123
+ <media-cast-button
1124
+ part="cast button"
1125
+ disabled="{{disabled}}"
1126
+ aria-disabled="{{disabled}}"
1127
+ >
1128
+ <svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
1129
+ <path
1130
+ d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z"
1131
+ />
1132
+ <path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z" />
1133
+ <path
1134
+ d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
1135
+ />
1136
+ </svg>
1137
+ <svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
1138
+ <path
1139
+ d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z"
1140
+ />
1141
+ <path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z" />
1142
+ <path
1143
+ d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
1144
+ />
1145
+ <path
1146
+ d="M20.5 5.5h-15v5.811c3.52.906 6.283 3.67 7.189 7.19H20.5V5.5Z"
1147
+ />
1148
+ </svg>
1149
+ </media-cast-button>
1150
+ </template>
1151
+
1152
+ <template partial="TimeRange">
1153
+ <media-time-range
1154
+ part="time range"
1155
+ disabled="{{disabled}}"
1156
+ aria-disabled="{{disabled}}"
1157
+ ></media-time-range>
1158
+ </template>
1159
+
1160
+ <template partial="VolumeRange">
1161
+ <media-volume-range
1162
+ part="volume range"
1163
+ disabled="{{disabled}}"
1164
+ aria-disabled="{{disabled}}"
1165
+ ></media-volume-range>
1166
+ </template>
1167
+
1168
+ <media-controller
1169
+ defaultsubtitles="{{defaultsubtitles}}"
1170
+ gesturesdisabled="{{disabled}}"
1171
+ hotkeys="{{hotkeys}}"
1172
+ nohotkeys="{{nohotkeys}}"
1173
+ audio="{{audio}}"
1174
+ exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
1175
+ >
1176
+ <slot name="media" slot="media"></slot>
1177
+ <slot name="poster" slot="poster"></slot>
1178
+ <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
1179
+
1180
+ <template if="title">
1181
+ <div slot="top-chrome">
1182
+ <media-text-display>{{title}}</media-text-display>
1183
+ </div>
1184
+ </template>
1185
+
1186
+ <template if="streamtype == 'on-demand'">
1187
+ <template if="!breakpointsm">
1188
+ <media-control-bar>
1189
+ {{>PlayButton}}
1190
+ {{>TimeRange}}
1191
+ {{>MuteButton}}
1192
+ {{>CaptionsButton}}
1193
+ {{>FullscreenButton}}
1194
+ </media-control-bar>
1195
+ </template>
1196
+
1197
+ <template if="breakpointsm">
1198
+ <media-control-bar>
1199
+ {{>PlayButton}}
1200
+ {{>SeekBackwardButton}}
1201
+ {{>SeekForwardButton}}
1202
+ {{>TimeRange}}
1203
+ <template if="breakpointmd">
1204
+ <media-time-display></media-time-display>
1205
+ </template>
1206
+ {{>MuteButton}}
1207
+ {{>VolumeRange}}
1208
+ {{>CaptionsButton}}
1209
+ {{>AirplayButton}}
1210
+ {{>CastButton}}
1211
+ {{>PipButton}}
1212
+ {{>FullscreenButton}}
1213
+ </media-control-bar>
1214
+ </template>
1215
+ </template>
1216
+
1217
+ <template if="streamtype == 'live'">
1218
+ <media-control-bar>
1219
+ <div class="live-controls-left">
1220
+ {{>LiveButton}}
1221
+ <template if="!targetlivewindow">
1222
+ <template if="breakpointsm">
1223
+ <media-time-display></media-time-display>
1224
+ </template>
1225
+ </template>
1226
+ </div>
1227
+ <template if="targetlivewindow > 0">
1228
+ <template if="breakpointsm">{{>TimeRange}}</template>
1229
+ </template>
1230
+ <div class="live-controls-right">
1231
+ <template if="targetlivewindow > 0">
1232
+ {{>SeekBackwardButton}}
1233
+ {{>SeekForwardButton}}
1234
+ </template>
1235
+ {{>MuteButton}}
1236
+ {{>VolumeRange}}
1237
+ {{>CaptionsButton}}
1238
+ {{>AirplayButton}}
1239
+ {{>CastButton}}
1240
+ {{>PipButton}}
1241
+ {{>FullscreenButton}}
1242
+ </div>
1243
+ </media-control-bar>
1244
+ </template>
1245
+
1246
+ <slot></slot>
1247
+ </media-controller>
1248
+ `;
1249
+ var MediaThemeMinimal = class extends MediaThemeElement {
1250
+ };
1251
+ __publicField3(MediaThemeMinimal, "template", template);
1252
+ if (!GlobalThis.customElements.get("media-theme-minimal")) {
1253
+ GlobalThis.customElements.define("media-theme-minimal", MediaThemeMinimal);
1254
+ }