@amazon-devices/kepler-player-server 2.2.9 → 2.2.11

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.
@@ -1,1801 +0,0 @@
1
- var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=this.process||{},__METRO_GLOBAL_PREFIX__='';process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||"production";
2
- (function (global) {
3
- /**
4
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- *
9
- * @polyfill
10
- * @nolint
11
- * @format
12
- */
13
-
14
- /* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void, no-control-regex */
15
-
16
- /**
17
- * This pipes all of our console logging functions to native logging so that
18
- * JavaScript errors in required modules show up in Xcode via NSLog.
19
- */
20
- var inspect = function () {
21
- // Copyright Joyent, Inc. and other Node contributors.
22
- //
23
- // Permission is hereby granted, free of charge, to any person obtaining a
24
- // copy of this software and associated documentation files (the
25
- // "Software"), to deal in the Software without restriction, including
26
- // without limitation the rights to use, copy, modify, merge, publish,
27
- // distribute, sublicense, and/or sell copies of the Software, and to permit
28
- // persons to whom the Software is furnished to do so, subject to the
29
- // following conditions:
30
- //
31
- // The above copyright notice and this permission notice shall be included
32
- // in all copies or substantial portions of the Software.
33
- //
34
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
35
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
37
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
38
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
39
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
40
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
41
- //
42
- // https://github.com/joyent/node/blob/master/lib/util.js
43
-
44
- function inspect(obj, opts) {
45
- var ctx = {
46
- seen: [],
47
- formatValueCalls: 0,
48
- stylize: stylizeNoColor
49
- };
50
- return formatValue(ctx, obj, opts.depth);
51
- }
52
- function stylizeNoColor(str, styleType) {
53
- return str;
54
- }
55
- function arrayToHash(array) {
56
- var hash = {};
57
- array.forEach(function (val, idx) {
58
- hash[val] = true;
59
- });
60
- return hash;
61
- }
62
- function formatValue(ctx, value, recurseTimes) {
63
- ctx.formatValueCalls++;
64
- if (ctx.formatValueCalls > 200) {
65
- return `[TOO BIG formatValueCalls ${ctx.formatValueCalls} exceeded limit of 200]`;
66
- }
67
-
68
- // Primitive types cannot have properties
69
- var primitive = formatPrimitive(ctx, value);
70
- if (primitive) {
71
- return primitive;
72
- }
73
-
74
- // Look up the keys of the object.
75
- var keys = Object.keys(value);
76
- var visibleKeys = arrayToHash(keys);
77
-
78
- // IE doesn't make error fields non-enumerable
79
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
80
- if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
81
- return formatError(value);
82
- }
83
-
84
- // Some type of object without properties can be shortcutted.
85
- if (keys.length === 0) {
86
- if (isFunction(value)) {
87
- var name = value.name ? ': ' + value.name : '';
88
- return ctx.stylize('[Function' + name + ']', 'special');
89
- }
90
- if (isRegExp(value)) {
91
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
92
- }
93
- if (isDate(value)) {
94
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
95
- }
96
- if (isError(value)) {
97
- return formatError(value);
98
- }
99
- }
100
- var base = '',
101
- array = false,
102
- braces = ['{', '}'];
103
-
104
- // Make Array say that they are Array
105
- if (isArray(value)) {
106
- array = true;
107
- braces = ['[', ']'];
108
- }
109
-
110
- // Make functions say that they are functions
111
- if (isFunction(value)) {
112
- var n = value.name ? ': ' + value.name : '';
113
- base = ' [Function' + n + ']';
114
- }
115
-
116
- // Make RegExps say that they are RegExps
117
- if (isRegExp(value)) {
118
- base = ' ' + RegExp.prototype.toString.call(value);
119
- }
120
-
121
- // Make dates with properties first say the date
122
- if (isDate(value)) {
123
- base = ' ' + Date.prototype.toUTCString.call(value);
124
- }
125
-
126
- // Make error with message first say the error
127
- if (isError(value)) {
128
- base = ' ' + formatError(value);
129
- }
130
- if (keys.length === 0 && (!array || value.length == 0)) {
131
- return braces[0] + base + braces[1];
132
- }
133
- if (recurseTimes < 0) {
134
- if (isRegExp(value)) {
135
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
136
- } else {
137
- return ctx.stylize('[Object]', 'special');
138
- }
139
- }
140
- ctx.seen.push(value);
141
- var output;
142
- if (array) {
143
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
144
- } else {
145
- output = keys.map(function (key) {
146
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
147
- });
148
- }
149
- ctx.seen.pop();
150
- return reduceToSingleString(output, base, braces);
151
- }
152
- function formatPrimitive(ctx, value) {
153
- if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
154
- if (isString(value)) {
155
- var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
156
- return ctx.stylize(simple, 'string');
157
- }
158
- if (isNumber(value)) return ctx.stylize('' + value, 'number');
159
- if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
160
- // For some reason typeof null is "object", so special case here.
161
- if (isNull(value)) return ctx.stylize('null', 'null');
162
- }
163
- function formatError(value) {
164
- return '[' + Error.prototype.toString.call(value) + ']';
165
- }
166
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
167
- var output = [];
168
- for (var i = 0, l = value.length; i < l; ++i) {
169
- if (hasOwnProperty(value, String(i))) {
170
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
171
- } else {
172
- output.push('');
173
- }
174
- }
175
- keys.forEach(function (key) {
176
- if (!key.match(/^\d+$/)) {
177
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
178
- }
179
- });
180
- return output;
181
- }
182
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
183
- var name, str, desc;
184
- desc = Object.getOwnPropertyDescriptor(value, key) || {
185
- value: value[key]
186
- };
187
- if (desc.get) {
188
- if (desc.set) {
189
- str = ctx.stylize('[Getter/Setter]', 'special');
190
- } else {
191
- str = ctx.stylize('[Getter]', 'special');
192
- }
193
- } else {
194
- if (desc.set) {
195
- str = ctx.stylize('[Setter]', 'special');
196
- }
197
- }
198
- if (!hasOwnProperty(visibleKeys, key)) {
199
- name = '[' + key + ']';
200
- }
201
- if (!str) {
202
- if (ctx.seen.indexOf(desc.value) < 0) {
203
- if (isNull(recurseTimes)) {
204
- str = formatValue(ctx, desc.value, null);
205
- } else {
206
- str = formatValue(ctx, desc.value, recurseTimes - 1);
207
- }
208
- if (str.indexOf('\n') > -1) {
209
- if (array) {
210
- str = str.split('\n').map(function (line) {
211
- return ' ' + line;
212
- }).join('\n').substr(2);
213
- } else {
214
- str = '\n' + str.split('\n').map(function (line) {
215
- return ' ' + line;
216
- }).join('\n');
217
- }
218
- }
219
- } else {
220
- str = ctx.stylize('[Circular]', 'special');
221
- }
222
- }
223
- if (isUndefined(name)) {
224
- if (array && key.match(/^\d+$/)) {
225
- return str;
226
- }
227
- name = JSON.stringify('' + key);
228
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
229
- name = name.substr(1, name.length - 2);
230
- name = ctx.stylize(name, 'name');
231
- } else {
232
- name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
233
- name = ctx.stylize(name, 'string');
234
- }
235
- }
236
- return name + ': ' + str;
237
- }
238
- function reduceToSingleString(output, base, braces) {
239
- var numLinesEst = 0;
240
- var length = output.reduce(function (prev, cur) {
241
- numLinesEst++;
242
- if (cur.indexOf('\n') >= 0) numLinesEst++;
243
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
244
- }, 0);
245
- if (length > 60) {
246
- return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1];
247
- }
248
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
249
- }
250
-
251
- // NOTE: These type checking functions intentionally don't use `instanceof`
252
- // because it is fragile and can be easily faked with `Object.create()`.
253
- function isArray(ar) {
254
- return Array.isArray(ar);
255
- }
256
- function isBoolean(arg) {
257
- return typeof arg === 'boolean';
258
- }
259
- function isNull(arg) {
260
- return arg === null;
261
- }
262
- function isNumber(arg) {
263
- return typeof arg === 'number';
264
- }
265
- function isString(arg) {
266
- return typeof arg === 'string';
267
- }
268
- function isUndefined(arg) {
269
- return arg === undefined;
270
- }
271
- function isRegExp(re) {
272
- return isObject(re) && objectToString(re) === '[object RegExp]';
273
- }
274
- function isObject(arg) {
275
- return typeof arg === 'object' && arg !== null;
276
- }
277
- function isDate(d) {
278
- return isObject(d) && objectToString(d) === '[object Date]';
279
- }
280
- function isError(e) {
281
- return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error);
282
- }
283
- function isFunction(arg) {
284
- return typeof arg === 'function';
285
- }
286
- function objectToString(o) {
287
- return Object.prototype.toString.call(o);
288
- }
289
- function hasOwnProperty(obj, prop) {
290
- return Object.prototype.hasOwnProperty.call(obj, prop);
291
- }
292
- return inspect;
293
- }();
294
- var OBJECT_COLUMN_NAME = '(index)';
295
- var LOG_LEVELS = {
296
- trace: 0,
297
- info: 1,
298
- warn: 2,
299
- error: 3
300
- };
301
- var INSPECTOR_LEVELS = [];
302
- INSPECTOR_LEVELS[LOG_LEVELS.trace] = 'debug';
303
- INSPECTOR_LEVELS[LOG_LEVELS.info] = 'log';
304
- INSPECTOR_LEVELS[LOG_LEVELS.warn] = 'warning';
305
- INSPECTOR_LEVELS[LOG_LEVELS.error] = 'error';
306
-
307
- // Strip the inner function in getNativeLogFunction(), if in dev also
308
- // strip method printing to originalConsole.
309
- var INSPECTOR_FRAMES_TO_SKIP = 1;
310
- function getNativeLogFunction(level) {
311
- return function () {
312
- var str;
313
- if (arguments.length === 1 && typeof arguments[0] === 'string') {
314
- str = arguments[0];
315
- } else {
316
- str = Array.prototype.map.call(arguments, function (arg) {
317
- return inspect(arg, {
318
- depth: 10
319
- });
320
- }).join(', ');
321
- }
322
-
323
- // TRICKY
324
- // If more than one argument is provided, the code above collapses them all
325
- // into a single formatted string. This transform wraps string arguments in
326
- // single quotes (e.g. "foo" -> "'foo'") which then breaks the "Warning:"
327
- // check below. So it's important that we look at the first argument, rather
328
- // than the formatted argument string.
329
- var firstArg = arguments[0];
330
- var logLevel = level;
331
- if (typeof firstArg === 'string' && firstArg.slice(0, 9) === 'Warning: ' && logLevel >= LOG_LEVELS.error) {
332
- // React warnings use console.error so that a stack trace is shown,
333
- // but we don't (currently) want these to show a redbox
334
- // (Note: Logic duplicated in ExceptionsManager.js.)
335
- logLevel = LOG_LEVELS.warn;
336
- }
337
- if (global.__inspectorLog) {
338
- global.__inspectorLog(INSPECTOR_LEVELS[logLevel], str, [].slice.call(arguments), INSPECTOR_FRAMES_TO_SKIP);
339
- }
340
- if (groupStack.length) {
341
- str = groupFormat('', str);
342
- }
343
- global.nativeLoggingHook(str, logLevel);
344
- };
345
- }
346
- function repeat(element, n) {
347
- return Array.apply(null, Array(n)).map(function () {
348
- return element;
349
- });
350
- }
351
- function consoleTablePolyfill(rows) {
352
- // convert object -> array
353
- if (!Array.isArray(rows)) {
354
- var data = rows;
355
- rows = [];
356
- for (var key in data) {
357
- if (data.hasOwnProperty(key)) {
358
- var row = data[key];
359
- row[OBJECT_COLUMN_NAME] = key;
360
- rows.push(row);
361
- }
362
- }
363
- }
364
- if (rows.length === 0) {
365
- global.nativeLoggingHook('', LOG_LEVELS.info);
366
- return;
367
- }
368
- var columns = Object.keys(rows[0]).sort();
369
- var stringRows = [];
370
- var columnWidths = [];
371
-
372
- // Convert each cell to a string. Also
373
- // figure out max cell width for each column
374
- columns.forEach(function (k, i) {
375
- columnWidths[i] = k.length;
376
- for (var j = 0; j < rows.length; j++) {
377
- var cellStr = (rows[j][k] || '?').toString();
378
- stringRows[j] = stringRows[j] || [];
379
- stringRows[j][i] = cellStr;
380
- columnWidths[i] = Math.max(columnWidths[i], cellStr.length);
381
- }
382
- });
383
-
384
- // Join all elements in the row into a single string with | separators
385
- // (appends extra spaces to each cell to make separators | aligned)
386
- function joinRow(row, space) {
387
- var cells = row.map(function (cell, i) {
388
- var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');
389
- return cell + extraSpaces;
390
- });
391
- space = space || ' ';
392
- return cells.join(space + '|' + space);
393
- }
394
- var separators = columnWidths.map(function (columnWidth) {
395
- return repeat('-', columnWidth).join('');
396
- });
397
- var separatorRow = joinRow(separators, '-');
398
- var header = joinRow(columns);
399
- var table = [header, separatorRow];
400
- for (var i = 0; i < rows.length; i++) {
401
- table.push(joinRow(stringRows[i]));
402
- }
403
-
404
- // Notice extra empty line at the beginning.
405
- // Native logging hook adds "RCTLog >" at the front of every
406
- // logged string, which would shift the header and screw up
407
- // the table
408
- global.nativeLoggingHook('\n' + table.join('\n'), LOG_LEVELS.info);
409
- }
410
- var GROUP_PAD = "\u2502"; // Box light vertical
411
- var GROUP_OPEN = "\u2510"; // Box light down+left
412
- var GROUP_CLOSE = "\u2518"; // Box light up+left
413
-
414
- var groupStack = [];
415
- function groupFormat(prefix, msg) {
416
- // Insert group formatting before the console message
417
- return groupStack.join('') + prefix + ' ' + (msg || '');
418
- }
419
- function consoleGroupPolyfill(label) {
420
- global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);
421
- groupStack.push(GROUP_PAD);
422
- }
423
- function consoleGroupCollapsedPolyfill(label) {
424
- global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);
425
- groupStack.push(GROUP_PAD);
426
- }
427
- function consoleGroupEndPolyfill() {
428
- groupStack.pop();
429
- global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);
430
- }
431
- function consoleAssertPolyfill(expression, label) {
432
- if (!expression) {
433
- global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);
434
- }
435
- }
436
- if (global.nativeLoggingHook) {
437
- var originalConsole = global.console;
438
- // Preserve the original `console` as `originalConsole`
439
-
440
- global.console = {
441
- error: getNativeLogFunction(LOG_LEVELS.error),
442
- info: getNativeLogFunction(LOG_LEVELS.info),
443
- log: getNativeLogFunction(LOG_LEVELS.info),
444
- warn: getNativeLogFunction(LOG_LEVELS.warn),
445
- trace: getNativeLogFunction(LOG_LEVELS.trace),
446
- debug: getNativeLogFunction(LOG_LEVELS.trace),
447
- table: consoleTablePolyfill,
448
- group: consoleGroupPolyfill,
449
- groupEnd: consoleGroupEndPolyfill,
450
- groupCollapsed: consoleGroupCollapsedPolyfill,
451
- assert: consoleAssertPolyfill
452
- };
453
- Object.defineProperty(console, '_isPolyfilled', {
454
- value: true,
455
- enumerable: false
456
- });
457
-
458
- // If available, also call the original `console` method since that is
459
- // sometimes useful. Ex: on OS X, this will let you see rich output in
460
- // the Safari Web Inspector console.
461
- } else if (!global.console) {
462
- var stub = function stub() {};
463
- var log = global.print || stub;
464
- global.console = {
465
- debug: log,
466
- error: log,
467
- info: log,
468
- log: log,
469
- trace: log,
470
- warn: log,
471
- assert: function assert(expression, label) {
472
- if (!expression) {
473
- log('Assertion failed: ' + label);
474
- }
475
- },
476
- clear: stub,
477
- dir: stub,
478
- dirxml: stub,
479
- group: stub,
480
- groupCollapsed: stub,
481
- groupEnd: stub,
482
- profile: stub,
483
- profileEnd: stub,
484
- table: stub
485
- };
486
- Object.defineProperty(console, '_isPolyfilled', {
487
- value: true,
488
- enumerable: false
489
- });
490
- }
491
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
492
- (function (global) {
493
- /**
494
- * Copyright (c) Meta Platforms, Inc. and affiliates.
495
- *
496
- * This source code is licensed under the MIT license found in the
497
- * LICENSE file in the root directory of this source tree.
498
- *
499
- * @format
500
- *
501
- * @polyfill
502
- */
503
-
504
- var _inGuard = 0;
505
- /**
506
- * This is the error handler that is called when we encounter an exception
507
- * when loading a module. This will report any errors encountered before
508
- * ExceptionsManager is configured.
509
- */
510
- var _globalHandler = function onError(e, isFatal) {
511
- throw e;
512
- };
513
-
514
- /**
515
- * The particular require runtime that we are using looks for a global
516
- * `ErrorUtils` object and if it exists, then it requires modules with the
517
- * error handler specified via ErrorUtils.setGlobalHandler by calling the
518
- * require function with applyWithGuard. Since the require module is loaded
519
- * before any of the modules, this ErrorUtils must be defined (and the handler
520
- * set) globally before requiring anything.
521
- */
522
- var ErrorUtils = {
523
- setGlobalHandler: function setGlobalHandler(fun) {
524
- _globalHandler = fun;
525
- },
526
- getGlobalHandler: function getGlobalHandler() {
527
- return _globalHandler;
528
- },
529
- reportError: function reportError(error) {
530
- _globalHandler && _globalHandler(error, false);
531
- },
532
- reportFatalError: function reportFatalError(error) {
533
- // NOTE: This has an untyped call site in Metro.
534
- _globalHandler && _globalHandler(error, true);
535
- },
536
- applyWithGuard: function applyWithGuard(fun, context, args,
537
- // Unused, but some code synced from www sets it to null.
538
- unused_onError,
539
- // Some callers pass a name here, which we ignore.
540
- unused_name) {
541
- try {
542
- _inGuard++;
543
- /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
544
- * null) is fine. (2) array -> rest array should work */
545
- /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
546
- * null) is fine. (2) array -> rest array should work */
547
- return fun.apply(context, args);
548
- } catch (e) {
549
- ErrorUtils.reportError(e);
550
- } finally {
551
- _inGuard--;
552
- }
553
- return null;
554
- },
555
- applyWithGuardIfNeeded: function applyWithGuardIfNeeded(fun, context, args) {
556
- if (ErrorUtils.inGuard()) {
557
- /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
558
- * null) is fine. (2) array -> rest array should work */
559
- /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
560
- * null) is fine. (2) array -> rest array should work */
561
- return fun.apply(context, args);
562
- } else {
563
- ErrorUtils.applyWithGuard(fun, context, args);
564
- }
565
- return null;
566
- },
567
- inGuard: function inGuard() {
568
- return !!_inGuard;
569
- },
570
- guard: function guard(fun, name, context) {
571
- var _ref;
572
- // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types
573
- // should be sufficient.
574
- if (typeof fun !== 'function') {
575
- console.warn('A function must be passed to ErrorUtils.guard, got ', fun);
576
- return null;
577
- }
578
- var guardName = (_ref = name != null ? name : fun.name) != null ? _ref : '<generated guard>';
579
- /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by
580
- * Flow's LTI update could not be added via codemod */
581
- function guarded() {
582
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
583
- args[_key] = arguments[_key];
584
- }
585
- return ErrorUtils.applyWithGuard(fun, context != null ? context : this, args, null, guardName);
586
- }
587
- return guarded;
588
- }
589
- };
590
- global.ErrorUtils = ErrorUtils;
591
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
592
- (function (global) {
593
- /**
594
- * Copyright (c) Meta Platforms, Inc. and affiliates.
595
- *
596
- * This source code is licensed under the MIT license found in the
597
- * LICENSE file in the root directory of this source tree.
598
- *
599
- * @format
600
- * @polyfill
601
- * @nolint
602
- */
603
-
604
- (function () {
605
- 'use strict';
606
-
607
- var hasOwnProperty = Object.prototype.hasOwnProperty;
608
-
609
- /**
610
- * Returns an array of the given object's own enumerable entries.
611
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
612
- */
613
- if (typeof Object.entries !== 'function') {
614
- Object.entries = function (object) {
615
- // `null` and `undefined` values are not allowed.
616
- if (object == null) {
617
- throw new TypeError('Object.entries called on non-object');
618
- }
619
- var entries = [];
620
- for (var key in object) {
621
- if (hasOwnProperty.call(object, key)) {
622
- entries.push([key, object[key]]);
623
- }
624
- }
625
- return entries;
626
- };
627
- }
628
-
629
- /**
630
- * Returns an array of the given object's own enumerable entries.
631
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values
632
- */
633
- if (typeof Object.values !== 'function') {
634
- Object.values = function (object) {
635
- // `null` and `undefined` values are not allowed.
636
- if (object == null) {
637
- throw new TypeError('Object.values called on non-object');
638
- }
639
- var values = [];
640
- for (var key in object) {
641
- if (hasOwnProperty.call(object, key)) {
642
- values.push(object[key]);
643
- }
644
- }
645
- return values;
646
- };
647
- }
648
- })();
649
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
650
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
651
- Object.defineProperty(exports, "__esModule", {
652
- value: true
653
- });
654
- var _exportNames = {
655
- IPlayerSessionState: true,
656
- IUnloadSyncStatus: true,
657
- PlayerServerFactory: true
658
- };
659
- Object.defineProperty(exports, "IPlayerSessionState", {
660
- enumerable: true,
661
- get: function get() {
662
- return _$$_REQUIRE(_dependencyMap[0]).IPlayerSessionState;
663
- }
664
- });
665
- Object.defineProperty(exports, "IUnloadSyncStatus", {
666
- enumerable: true,
667
- get: function get() {
668
- return _$$_REQUIRE(_dependencyMap[0]).IUnloadSyncStatus;
669
- }
670
- });
671
- Object.defineProperty(exports, "PlayerServerFactory", {
672
- enumerable: true,
673
- get: function get() {
674
- return _$$_REQUIRE(_dependencyMap[1]).PlayerServerFactory;
675
- }
676
- });
677
- Object.keys(_$$_REQUIRE(_dependencyMap[2])).forEach(function (key) {
678
- if (key === "default" || key === "__esModule") return;
679
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
680
- if (key in exports && exports[key] === _$$_REQUIRE(_dependencyMap[2])[key]) return;
681
- Object.defineProperty(exports, key, {
682
- enumerable: true,
683
- get: function get() {
684
- return _$$_REQUIRE(_dependencyMap[2])[key];
685
- }
686
- });
687
- });
688
- },"ad677706b8945cb477ea",["bb411e2f321c4ad4bcae","1e4826ede945c5e87d86","311999c2457e52d403d4"]);
689
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
690
- Object.defineProperty(exports, "__esModule", {
691
- value: true
692
- });
693
- exports.IUnloadSyncStatus = exports.IPlayerSessionState = undefined;
694
- /*
695
- * Copyright 2025 Amazon.com, Inc. or its affiliates. All rights reserved.
696
- *
697
- * AMAZON PROPRIETARY/CONFIDENTIAL
698
- *
699
- * You may not use this file except in compliance with the terms and
700
- * conditions set forth in the accompanying LICENSE.TXT file.
701
- *
702
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
703
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
704
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
705
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
706
- */
707
- /**
708
- * Represents the possible states of media playback.
709
- * This must be set in `IPlayerSessionStatus` depending on the events received
710
- * after registering event listeners.
711
- *
712
- * @see https://html.spec.whatwg.org/#event-handlers-on-elements,-document-objects,-and-window-objects
713
- */
714
- var IPlayerSessionState;
715
- (function (IPlayerSessionState) {
716
- /**
717
- * Playback is temporarily stopped
718
- */
719
- IPlayerSessionState["PAUSED"] = "PAUSED";
720
- /**
721
- * Media content is actively playing
722
- */
723
- IPlayerSessionState["PLAYING"] = "PLAYING";
724
- /**
725
- * Media is loading into temporary storage
726
- */
727
- IPlayerSessionState["BUFFERING"] = "BUFFERING";
728
- /**
729
- * Playback position is being changed
730
- */
731
- IPlayerSessionState["SEEKING"] = "SEEKING";
732
- /**
733
- * Media playback has reached its conclusion
734
- */
735
- IPlayerSessionState["ENDED"] = "ENDED";
736
- /**
737
- * Playback has encountered an error
738
- */
739
- IPlayerSessionState["ERROR"] = "ERROR";
740
- })(IPlayerSessionState || (exports.IPlayerSessionState = IPlayerSessionState = {}));
741
- /**
742
- * Represents the possible status values of synchronous unload of media playback.
743
- * Associated with {@link @amzn/kepler-player-client#IPlayerClient.unloadSync} API.
744
- * These values are in sync with {@link @amzn/react-native-w3cmedia#MediaPlayerDeInitStatus|W3CMedia MediaPlayerDeInitStatus}
745
- */
746
- var IUnloadSyncStatus;
747
- (function (IUnloadSyncStatus) {
748
- /**
749
- * Media playback instance was unloaded successfully.
750
- */
751
- IUnloadSyncStatus["SUCCESS"] = "success";
752
- /**
753
- * Media playback instance unload timed out.
754
- */
755
- IUnloadSyncStatus["TIMEDOUT"] = "timedout";
756
- /**
757
- * Invalid request for media playback unload.
758
- */
759
- IUnloadSyncStatus["INVALID"] = "invalid";
760
- })(IUnloadSyncStatus || (exports.IUnloadSyncStatus = IUnloadSyncStatus = {}));
761
- },"bb411e2f321c4ad4bcae",[]);
762
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
763
- Object.defineProperty(exports, "__esModule", {
764
- value: true
765
- });
766
- exports.default = exports.PlayerServerFactory = undefined;
767
- var _classCallCheck2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[1]));
768
- var _createClass2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[2]));
769
- /*
770
- * Copyright 2025 Amazon.com, Inc. or its affiliates. All rights reserved.
771
- *
772
- * AMAZON PROPRIETARY/CONFIDENTIAL
773
- *
774
- * You may not use this file except in compliance with the terms and
775
- * conditions set forth in the accompanying LICENSE.TXT file.
776
- *
777
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
778
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
779
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
780
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
781
- */
782
- /** @ignore */
783
- var PlayerServerFactory = exports.PlayerServerFactory = /*#__PURE__*/function () {
784
- function PlayerServerFactory() {
785
- (0, _classCallCheck2.default)(this, PlayerServerFactory);
786
- }
787
- return (0, _createClass2.default)(PlayerServerFactory, [{
788
- key: "getOrMakeServer",
789
- value:
790
- /**
791
- * Makes or returns the PlayerServer singleton
792
- */
793
- function getOrMakeServer() {
794
- if (!PlayerServerFactory.server) {
795
- PlayerServerFactory.server = new (_$$_REQUIRE(_dependencyMap[3]).PlayerServer)();
796
- }
797
- return PlayerServerFactory.server;
798
- }
799
- }]);
800
- }();
801
- var _default = exports.default = new PlayerServerFactory();
802
- },"1e4826ede945c5e87d86",["277a84013d7e1a1ace05","cb664999166f9660a878","68819e29ebee24bb0e88","fbc2893c87e8600ee4d6"]);
803
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
804
- function _interopRequireDefault(e) {
805
- return e && e.__esModule ? e : {
806
- "default": e
807
- };
808
- }
809
- module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
810
- },"277a84013d7e1a1ace05",[]);
811
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
812
- function _classCallCheck(a, n) {
813
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
814
- }
815
- module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
816
- },"cb664999166f9660a878",[]);
817
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
818
- function _defineProperties(e, r) {
819
- for (var t = 0; t < r.length; t++) {
820
- var o = r[t];
821
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _$$_REQUIRE(_dependencyMap[0])(o.key), o);
822
- }
823
- }
824
- function _createClass(e, r, t) {
825
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
826
- writable: false
827
- }), e;
828
- }
829
- module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
830
- },"68819e29ebee24bb0e88",["cbba112244d360ffda7a"]);
831
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
832
- function toPropertyKey(t) {
833
- var i = _$$_REQUIRE(_dependencyMap[0])(t, "string");
834
- return "symbol" == _$$_REQUIRE(_dependencyMap[1])["default"](i) ? i : i + "";
835
- }
836
- module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
837
- },"cbba112244d360ffda7a",["ad82d340d0b5dc5f0801","e08c69ed06cf526909e3"]);
838
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
839
- function toPrimitive(t, r) {
840
- if ("object" != _$$_REQUIRE(_dependencyMap[0])["default"](t) || !t) return t;
841
- var e = t[Symbol.toPrimitive];
842
- if (undefined !== e) {
843
- var i = e.call(t, r || "default");
844
- if ("object" != _$$_REQUIRE(_dependencyMap[0])["default"](i)) return i;
845
- throw new TypeError("@@toPrimitive must return a primitive value.");
846
- }
847
- return ("string" === r ? String : Number)(t);
848
- }
849
- module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
850
- },"ad82d340d0b5dc5f0801",["e08c69ed06cf526909e3"]);
851
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
852
- function _typeof(o) {
853
- "@babel/helpers - typeof";
854
-
855
- return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
856
- return typeof o;
857
- } : function (o) {
858
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
859
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
860
- }
861
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
862
- },"e08c69ed06cf526909e3",[]);
863
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
864
- Object.defineProperty(exports, "__esModule", {
865
- value: true
866
- });
867
- exports.PlayerServer = undefined;
868
- var _asyncToGenerator2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[1]));
869
- var _classCallCheck2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[2]));
870
- var _createClass2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[3]));
871
- var _KeplerPlayerServerTurboModule = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[4]));
872
- /*
873
- * Copyright 2025 Amazon.com, Inc. or its affiliates. All rights reserved.
874
- *
875
- * AMAZON PROPRIETARY/CONFIDENTIAL
876
- *
877
- * You may not use this file except in compliance with the terms and
878
- * conditions set forth in the accompanying LICENSE.TXT file.
879
- *
880
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
881
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
882
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
883
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
884
- */
885
- /**
886
- * @ignore
887
- * The implementation of IPlayerServer.
888
- */
889
- var PlayerServer = exports.PlayerServer = /*#__PURE__*/function () {
890
- function PlayerServer() {
891
- (0, _classCallCheck2.default)(this, PlayerServer);
892
- this.mServerHandler = null;
893
- this.mPositionListenerMap = new Map();
894
- }
895
- return (0, _createClass2.default)(PlayerServer, [{
896
- key: "clearPositionListeners",
897
- value: function clearPositionListeners(sessionId, listenerId) {
898
- var _sessionId = sessionId ? sessionId.id : -1;
899
- var sessionListeners = this.mPositionListenerMap.get(_sessionId);
900
- if (!sessionListeners) {
901
- // no listener for session, nothing to do
902
- return false;
903
- }
904
- if (!listenerId) {
905
- // not deleting specific listener, clear all timers and delete map entry for session.
906
- sessionListeners.forEach(function (value) {
907
- clearInterval(value[1]);
908
- });
909
- this.mPositionListenerMap.delete(_sessionId);
910
- } else {
911
- // clear specific timer and update listener map
912
- var match = sessionListeners.find(function (value) {
913
- return value[0] == listenerId;
914
- });
915
- if (!match) {
916
- // listenerId not found
917
- return false;
918
- }
919
- clearInterval(match[1]);
920
- var remainingListeners = sessionListeners == null ? undefined : sessionListeners.filter(function (values) {
921
- return values[0] != listenerId;
922
- });
923
- if (remainingListeners) {
924
- this.mPositionListenerMap.set(_sessionId, remainingListeners);
925
- } else {
926
- this.mPositionListenerMap.delete(_sessionId);
927
- }
928
- }
929
- return true;
930
- }
931
- }, {
932
- key: "handleEvent",
933
- value: function handleEvent(result, transactionId) {
934
- var _this = this;
935
- console.log('KeplerPlayerServer: handleEvent with callback event ', result.event);
936
- if (this.mServerHandler === null) {
937
- return;
938
- }
939
- var resultCallback = result.event;
940
- if (resultCallback === "handleLoad") {
941
- try {
942
- this.mServerHandler.handleLoad(result.urlInfo, result.loadParams, result.sessionId);
943
- console.log("handleLoad: Success.");
944
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
945
- } catch (error) {
946
- var message = "Unknown";
947
- if (error instanceof Error) {
948
- message = error.message;
949
- }
950
- console.log(`handleLoad: Error: ${message}`);
951
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, message);
952
- }
953
- } else if (resultCallback === "handleUnload") {
954
- try {
955
- this.clearPositionListeners(result.sessionId);
956
- this.mServerHandler.handleUnload(result.sessionId);
957
- console.log("handleUnload: Success.");
958
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
959
- } catch (error) {
960
- var _message2 = "Unknown";
961
- if (error instanceof Error) {
962
- _message2 = error.message;
963
- }
964
- console.log(`handleUnload: Error: ${_message2}`);
965
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message2);
966
- }
967
- } else if (resultCallback === "handleSetVideoView") {
968
- try {
969
- this.mServerHandler.handleSetVideoView(result.handle, result.sessionId);
970
- console.log("handleSetVideoView: Success.");
971
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
972
- } catch (error) {
973
- var _message3 = "Unknown";
974
- if (error instanceof Error) {
975
- _message3 = error.message;
976
- }
977
- console.log(`handleSetVideoView: Error: ${_message3}`);
978
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message3);
979
- }
980
- } else if (resultCallback === "handleClearVideoView") {
981
- try {
982
- this.mServerHandler.handleClearVideoView(result.sessionId);
983
- console.log("handleClearVideoView: Success.");
984
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
985
- } catch (error) {
986
- var _message4 = "Unknown";
987
- if (error instanceof Error) {
988
- _message4 = error.message;
989
- }
990
- console.log(`handleClearVideoView: Error: ${_message4}`);
991
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message4);
992
- }
993
- } else if (resultCallback === "handleSetTextView") {
994
- try {
995
- this.mServerHandler.handleSetTextView(result.handle, result.sessionId);
996
- console.log("handleSetTextView: Success.");
997
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
998
- } catch (error) {
999
- var _message5 = "Unknown";
1000
- if (error instanceof Error) {
1001
- _message5 = error.message;
1002
- }
1003
- console.log(`handleSetTextView: Error: ${_message5}`);
1004
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message5);
1005
- }
1006
- } else if (resultCallback === "handleClearTextView") {
1007
- try {
1008
- this.mServerHandler.handleClearTextView(result.sessionId);
1009
- console.log("handleClearTextView: Success.");
1010
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1011
- } catch (error) {
1012
- var _message6 = "Unknown";
1013
- if (error instanceof Error) {
1014
- _message6 = error.message;
1015
- }
1016
- console.log(`handleClearTextView: Error: ${_message6}`);
1017
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message6);
1018
- }
1019
- } else if (resultCallback === "handlePlay") {
1020
- try {
1021
- this.mServerHandler.handlePlay(result.sessionId);
1022
- console.log("handlePlay: Success.");
1023
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1024
- } catch (error) {
1025
- var _message7 = "Unknown";
1026
- if (error instanceof Error) {
1027
- _message7 = error.message;
1028
- }
1029
- console.log(`handlePlay: Error: ${_message7}`);
1030
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message7);
1031
- }
1032
- } else if (resultCallback === "handlePause") {
1033
- try {
1034
- this.mServerHandler.handlePause(result.sessionId);
1035
- console.log("handlePause: Success.");
1036
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1037
- } catch (error) {
1038
- var _message8 = "Unknown";
1039
- if (error instanceof Error) {
1040
- _message8 = error.message;
1041
- }
1042
- console.log(`handlePause: Error: ${_message8}`);
1043
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message8);
1044
- }
1045
- } else if (resultCallback === "handleSeek") {
1046
- try {
1047
- this.mServerHandler.handleSeek(result.timevalue, result.boolValue, result.sessionId);
1048
- console.log("handleSeek: Success.");
1049
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1050
- } catch (error) {
1051
- var _message9 = "Unknown";
1052
- if (error instanceof Error) {
1053
- _message9 = error.message;
1054
- }
1055
- console.log(`handleSeek: Error: ${_message9}`);
1056
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message9);
1057
- }
1058
- } else if (resultCallback === "handleSetMute") {
1059
- try {
1060
- this.mServerHandler.handleSetMute(result.boolValue, result.sessionId);
1061
- console.log("handleSetMute: Success.");
1062
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1063
- } catch (error) {
1064
- var _message0 = "Unknown";
1065
- if (error instanceof Error) {
1066
- _message0 = error.message;
1067
- }
1068
- console.log(`handleSetMute: Error: ${_message0}`);
1069
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message0);
1070
- }
1071
- } else if (resultCallback === "handleSetPlaybackRate") {
1072
- try {
1073
- this.mServerHandler.handleSetPlaybackRate(result.numberValue, result.sessionId);
1074
- console.log("handleSetPlaybackRate: Success.");
1075
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1076
- } catch (error) {
1077
- var _message1 = "Unknown";
1078
- if (error instanceof Error) {
1079
- _message1 = error.message;
1080
- }
1081
- console.log(`handleSetPlaybackRate: Error: ${_message1}`);
1082
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message1);
1083
- }
1084
- } else if (resultCallback === "handleSetVolume") {
1085
- try {
1086
- this.mServerHandler.handleSetVolume(result.numberValue, result.sessionId);
1087
- console.log("handleSetVolume: Success.");
1088
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1089
- } catch (error) {
1090
- var _message10 = "Unknown";
1091
- if (error instanceof Error) {
1092
- _message10 = error.message;
1093
- }
1094
- console.log(`handleSetVolume: Error: ${_message10}`);
1095
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message10);
1096
- }
1097
- } else if (resultCallback === "handleSetActiveTrack") {
1098
- try {
1099
- this.mServerHandler.handleSetActiveTrack(result.trackType, result.stringValue, result.sessionId);
1100
- console.log("handleSetActiveTrack: Success.");
1101
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1102
- } catch (error) {
1103
- var _message11 = "Unknown";
1104
- if (error instanceof Error) {
1105
- _message11 = error.message;
1106
- }
1107
- console.log(`handleSetActiveTrack: Error: ${_message11}`);
1108
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message11);
1109
- }
1110
- } else if (resultCallback === "handleGetCurrentPosition") {
1111
- try {
1112
- var position = this.mServerHandler.handleGetCurrentPosition(result.sessionId);
1113
- console.log("handleGetCurrentPosition: Success.");
1114
- _KeplerPlayerServerTurboModule.default.transactionSuccessWithValue(transactionId, {
1115
- positionValue: position
1116
- });
1117
- } catch (error) {
1118
- var _message12 = "Unknown";
1119
- if (error instanceof Error) {
1120
- _message12 = error.message;
1121
- }
1122
- console.log(`handleGetCurrentPosition: Error: ${_message12}`);
1123
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message12);
1124
- }
1125
- } else if (resultCallback === "handleMessage") {
1126
- try {
1127
- var messageObj = JSON.parse(result.stringValue);
1128
- this.mServerHandler.handleMessage(messageObj, result.sessionId);
1129
- console.log("handleMessage: Success.");
1130
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1131
- } catch (error) {
1132
- var _message13 = "Unknown";
1133
- if (error instanceof Error) {
1134
- _message13 = error.message;
1135
- }
1136
- console.log(`handleMessage: Error: ${_message13}`);
1137
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message13);
1138
- }
1139
- } else if (resultCallback === "handleStartBufferedRangesUpdates") {
1140
- try {
1141
- this.mServerHandler.handleStartBufferedRangesUpdates(result.sessionId);
1142
- console.log("handleStartBufferedRangesUpdates: Success.");
1143
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1144
- } catch (error) {
1145
- var _message14 = "Unknown";
1146
- if (error instanceof Error) {
1147
- _message14 = error.message;
1148
- }
1149
- console.log(`handleStartBufferedRangesUpdates: Error: ${_message14}`);
1150
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message14);
1151
- }
1152
- } else if (resultCallback === "handleStopBufferedRangesUpdates") {
1153
- try {
1154
- this.mServerHandler.handleStopBufferedRangesUpdates(result.sessionId);
1155
- console.log("handleStopBufferedRangesUpdates: Success.");
1156
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1157
- } catch (error) {
1158
- var _message15 = "Unknown";
1159
- if (error instanceof Error) {
1160
- _message15 = error.message;
1161
- }
1162
- console.log(`handleStopBufferedRangesUpdates: Error: ${_message15}`);
1163
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message15);
1164
- }
1165
- } else if (resultCallback === "handleStartStatusUpdates") {
1166
- try {
1167
- this.mServerHandler.handleStartStatusUpdates(result.sessionId);
1168
- console.log("handleStartStatusUpdates: Success.");
1169
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1170
- } catch (error) {
1171
- var _message16 = "Unknown";
1172
- if (error instanceof Error) {
1173
- _message16 = error.message;
1174
- }
1175
- console.log(`handleStartStatusUpdates: Error: ${_message16}`);
1176
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message16);
1177
- }
1178
- } else if (resultCallback === "handleStopStatusUpdates") {
1179
- try {
1180
- this.mServerHandler.handleStopStatusUpdates(result.sessionId);
1181
- console.log("handleStopStatusUpdates: Success.");
1182
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1183
- } catch (error) {
1184
- var _message17 = "Unknown";
1185
- if (error instanceof Error) {
1186
- _message17 = error.message;
1187
- }
1188
- console.log(`handleStopStatusUpdates: Error: ${_message17}`);
1189
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message17);
1190
- }
1191
- } else if (resultCallback === "handleStartTrackUpdates") {
1192
- try {
1193
- this.mServerHandler.handleStartTrackUpdates(result.sessionId);
1194
- console.log("handleStartTrackUpdates: Success.");
1195
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1196
- } catch (error) {
1197
- var _message18 = "Unknown";
1198
- if (error instanceof Error) {
1199
- _message18 = error.message;
1200
- }
1201
- console.log(`handleStartTrackUpdates: Error: ${_message18}`);
1202
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message18);
1203
- }
1204
- } else if (resultCallback === "handleStopTrackUpdates") {
1205
- try {
1206
- this.mServerHandler.handleStopTrackUpdates(result.sessionId);
1207
- console.log("handleStopTrackUpdates: Success.");
1208
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1209
- } catch (error) {
1210
- var _message19 = "Unknown";
1211
- if (error instanceof Error) {
1212
- _message19 = error.message;
1213
- }
1214
- console.log(`handleStopTrackUpdates: Error: ${_message19}`);
1215
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message19);
1216
- }
1217
- } else if (resultCallback === "handleStartMessageUpdates") {
1218
- try {
1219
- this.mServerHandler.handleStartMessageUpdates(result.sessionId);
1220
- console.log("handleStartMessageUpdates: Success.");
1221
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1222
- } catch (error) {
1223
- var _message20 = "Unknown";
1224
- if (error instanceof Error) {
1225
- _message20 = error.message;
1226
- }
1227
- console.log(`handleStartMessageUpdates: Error: ${_message20}`);
1228
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message20);
1229
- }
1230
- } else if (resultCallback === "handleStopMessageUpdates") {
1231
- try {
1232
- this.mServerHandler.handleStopMessageUpdates(result.sessionId);
1233
- console.log("handleStopMessageUpdates: Success.");
1234
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1235
- } catch (error) {
1236
- var _message21 = "Unknown";
1237
- if (error instanceof Error) {
1238
- _message21 = error.message;
1239
- }
1240
- console.log(`handleStopMessageUpdates: Error: ${_message21}`);
1241
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message21);
1242
- }
1243
- } else if (resultCallback === "handleStartErrorUpdates") {
1244
- try {
1245
- this.mServerHandler.handleStartErrorUpdates(result.sessionId);
1246
- console.log("handleStartErrorUpdates: Success.");
1247
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1248
- } catch (error) {
1249
- var _message22 = "Unknown";
1250
- if (error instanceof Error) {
1251
- _message22 = error.message;
1252
- }
1253
- console.log(`handleStartErrorUpdates: Error: ${_message22}`);
1254
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message22);
1255
- }
1256
- } else if (resultCallback === "handleStopErrorUpdates") {
1257
- try {
1258
- this.mServerHandler.handleStopErrorUpdates(result.sessionId);
1259
- console.log("handleStopErrorUpdates: Success.");
1260
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1261
- } catch (error) {
1262
- var _message23 = "Unknown";
1263
- if (error instanceof Error) {
1264
- _message23 = error.message;
1265
- }
1266
- console.log(`handleStopErrorUpdates: Error: ${_message23}`);
1267
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message23);
1268
- }
1269
- } else if (resultCallback === "handleUnloadSync") {
1270
- try {
1271
- var _unloadSyncStatus = _$$_REQUIRE(_dependencyMap[5]).IUnloadSyncStatus.INVALID;
1272
- this.clearPositionListeners(result.sessionId);
1273
- if (this.mServerHandler.handleUnloadSync) {
1274
- _unloadSyncStatus = this.mServerHandler.handleUnloadSync(result.numberValue, result.sessionId);
1275
- console.log("handleUnloadSync: Success.");
1276
- _KeplerPlayerServerTurboModule.default.transactionSuccessWithValue(transactionId, {
1277
- unloadSyncStatus: _unloadSyncStatus
1278
- });
1279
- } else {
1280
- console.log("handleUnloadSync: not implemented, returning invalid.");
1281
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, "handleUnloadSync not implemented.");
1282
- }
1283
- } catch (error) {
1284
- var _message24 = "Unknown";
1285
- if (error instanceof Error) {
1286
- _message24 = error.message;
1287
- }
1288
- console.log(`handleUnloadSync: Error: ${_message24}`);
1289
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message24);
1290
- }
1291
- } else if (resultCallback === "handleStartPlaybackPositionUpdates") {
1292
- try {
1293
- if (!result.timevalue || !result.numberValue) {
1294
- throw new Error(`invalid interval: ${result.timevalue} or listenerId: ${result.numberValue}`);
1295
- }
1296
- var sessionId = result.sessionId ? result.sessionId.id : -1;
1297
- var interval = result.timevalue;
1298
- var listenerId = result.numberValue;
1299
- var timerId = setInterval(/*#__PURE__*/(0, _asyncToGenerator2.default)(function* () {
1300
- try {
1301
- if (!_this.mServerHandler) {
1302
- throw new Error('invalid mServerHandler');
1303
- }
1304
- var _position = _this.mServerHandler.handleGetCurrentPosition(result.sessionId);
1305
- var sessionPosition = {
1306
- sessionId: result.sessionId,
1307
- position: _position
1308
- };
1309
- _KeplerPlayerServerTurboModule.default.updatePlaybackPosition(listenerId, [sessionPosition]);
1310
- console.log(`updatePlaybackPosition: ${_position}, for listenerId ${listenerId}`);
1311
- } catch (error) {
1312
- console.error("updatePlaybackPosition error: ", error);
1313
- }
1314
- }), Math.floor(interval * 1000));
1315
- var listners = [[listenerId, timerId]];
1316
- var existingListeners = this.mPositionListenerMap.get(sessionId);
1317
- if (existingListeners) {
1318
- listners.concat(existingListeners);
1319
- }
1320
- this.mPositionListenerMap.set(sessionId, listners);
1321
- console.log("handleStartPlaybackPositionUpdates: Success.");
1322
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1323
- } catch (error) {
1324
- var _message25 = "Unknown";
1325
- if (error instanceof Error) {
1326
- _message25 = error.message;
1327
- }
1328
- console.log(`handleStartPlaybackPositionUpdates: Error: ${_message25}`);
1329
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message25);
1330
- }
1331
- } else if (resultCallback === "handleStopPlaybackPositionUpdates") {
1332
- try {
1333
- if (!result.numberValue) {
1334
- throw new Error(`invalid listenerId: ${result.numberValue}`);
1335
- }
1336
- if (!this.clearPositionListeners(result.sessionId, result.numberValue)) {
1337
- throw new Error(`ListenerId ${result.numberValue} not present for sessionId ${result.sessionId}`);
1338
- }
1339
- console.log("handleStopPlaybackPositionUpdates: Success.");
1340
- _KeplerPlayerServerTurboModule.default.transactionSuccess(transactionId);
1341
- } catch (error) {
1342
- var _message26 = "Unknown";
1343
- if (error instanceof Error) {
1344
- _message26 = error.message;
1345
- }
1346
- console.log(`handleStopPlaybackPositionUpdates: Error: ${_message26}`);
1347
- _KeplerPlayerServerTurboModule.default.transactionError(transactionId, _message26);
1348
- }
1349
- } else {
1350
- console.log("Unknown handler event: ", resultCallback);
1351
- }
1352
- }
1353
- /**
1354
- * {@inheritDoc}
1355
- */
1356
- }, {
1357
- key: "setHandler",
1358
- value: function setHandler(_handler, _componentId) {
1359
- this.mServerHandler = _handler;
1360
- this.handleEvent = this.handleEvent.bind(this);
1361
- _KeplerPlayerServerTurboModule.default.setHandler(this.handleEvent, _componentId);
1362
- }
1363
- /**
1364
- * {@inheritDoc}
1365
- */
1366
- }, {
1367
- key: "updateBufferedRanges",
1368
- value: function updateBufferedRanges(_bufferedRanges, _sessionId) {
1369
- if (!_sessionId) {
1370
- _sessionId = {
1371
- id: -1
1372
- };
1373
- }
1374
- var resultPromise = new Promise(function (resolve, reject) {
1375
- try {
1376
- _KeplerPlayerServerTurboModule.default.updateBufferedRanges(_bufferedRanges, _sessionId);
1377
- resolve();
1378
- } catch (error) {
1379
- reject(error);
1380
- }
1381
- });
1382
- return resultPromise;
1383
- }
1384
- /**
1385
- * {@inheritDoc}
1386
- */
1387
- }, {
1388
- key: "updateStatus",
1389
- value: function updateStatus(_states) {
1390
- var resultPromise = new Promise(function (resolve, reject) {
1391
- try {
1392
- _KeplerPlayerServerTurboModule.default.updateStatus(_states);
1393
- resolve();
1394
- } catch (error) {
1395
- reject(error);
1396
- }
1397
- });
1398
- return resultPromise;
1399
- }
1400
- /**
1401
- * {@inheritDoc}
1402
- */
1403
- }, {
1404
- key: "addTrack",
1405
- value: function addTrack(_newTrack, _sessionId) {
1406
- if (!_sessionId) {
1407
- _sessionId = {
1408
- id: -1
1409
- };
1410
- }
1411
- var resultPromise = new Promise(function (resolve, reject) {
1412
- try {
1413
- _KeplerPlayerServerTurboModule.default.addTrack(_newTrack, _sessionId);
1414
- resolve();
1415
- } catch (error) {
1416
- reject(error);
1417
- }
1418
- });
1419
- return resultPromise;
1420
- }
1421
- /**
1422
- * {@inheritDoc}
1423
- */
1424
- }, {
1425
- key: "removeTrack",
1426
- value: function removeTrack(_removedTrack, _sessionId) {
1427
- if (!_sessionId) {
1428
- _sessionId = {
1429
- id: -1
1430
- };
1431
- }
1432
- var resultPromise = new Promise(function (resolve, reject) {
1433
- try {
1434
- _KeplerPlayerServerTurboModule.default.removeTrack(_removedTrack, _sessionId);
1435
- resolve();
1436
- } catch (error) {
1437
- reject(error);
1438
- }
1439
- });
1440
- return resultPromise;
1441
- }
1442
- /**
1443
- * {@inheritDoc}
1444
- */
1445
- }, {
1446
- key: "sendMessage",
1447
- value: function sendMessage(_message, _sessionId) {
1448
- if (!_sessionId) {
1449
- _sessionId = {
1450
- id: -1
1451
- };
1452
- }
1453
- if (_message === undefined) {
1454
- // _message = null is allowed.
1455
- return Promise.reject("undefined message passed.");
1456
- }
1457
- var resultPromise = new Promise(function (resolve, reject) {
1458
- try {
1459
- var _messageString = JSON.stringify(_message);
1460
- _KeplerPlayerServerTurboModule.default.sendMessage(_messageString, _sessionId);
1461
- resolve();
1462
- } catch (error) {
1463
- reject(error);
1464
- }
1465
- });
1466
- return resultPromise;
1467
- }
1468
- /**
1469
- * {@inheritDoc}
1470
- */
1471
- }, {
1472
- key: "sendError",
1473
- value: function sendError(_error, _sessionId) {
1474
- if (!_sessionId) {
1475
- _sessionId = {
1476
- id: -1
1477
- };
1478
- }
1479
- var resultPromise = new Promise(function (resolve, reject) {
1480
- try {
1481
- _KeplerPlayerServerTurboModule.default.sendError(_error, _sessionId);
1482
- resolve();
1483
- } catch (error) {
1484
- reject(error);
1485
- }
1486
- });
1487
- return resultPromise;
1488
- }
1489
- }]);
1490
- }();
1491
- },"fbc2893c87e8600ee4d6",["277a84013d7e1a1ace05","77f56f33f638c3751138","cb664999166f9660a878","68819e29ebee24bb0e88","c25ac8ed395dc412c26d","bb411e2f321c4ad4bcae"]);
1492
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1493
- function asyncGeneratorStep(n, t, e, r, o, a, c) {
1494
- try {
1495
- var i = n[a](c),
1496
- u = i.value;
1497
- } catch (n) {
1498
- return void e(n);
1499
- }
1500
- i.done ? t(u) : Promise.resolve(u).then(r, o);
1501
- }
1502
- function _asyncToGenerator(n) {
1503
- return function () {
1504
- var t = this,
1505
- e = arguments;
1506
- return new Promise(function (r, o) {
1507
- var a = n.apply(t, e);
1508
- function _next(n) {
1509
- asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
1510
- }
1511
- function _throw(n) {
1512
- asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
1513
- }
1514
- _next(undefined);
1515
- });
1516
- };
1517
- }
1518
- module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
1519
- },"77f56f33f638c3751138",[]);
1520
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1521
- Object.defineProperty(exports, "__esModule", {
1522
- value: true
1523
- });
1524
- exports.default = undefined;
1525
- // prettier-ignore
1526
- var _default = exports.default = _$$_REQUIRE(_dependencyMap[0]).TurboModuleRegistry.getEnforcing('KeplerPlayerServerTurboModule');
1527
- },"c25ac8ed395dc412c26d",["8a35a86b7946c72e0207"]);
1528
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1529
- "use strict";
1530
-
1531
- /**
1532
- * Copyright (c) 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1533
- *
1534
- * PROPRIETARY/CONFIDENTIAL
1535
- *
1536
- * Use is subject to license terms.
1537
- *
1538
- */
1539
- Object.defineProperty(exports, "__esModule", {
1540
- value: true
1541
- });
1542
- exports.TurboModuleRegistry = undefined;
1543
- exports.TurboModuleRegistry = _$$_REQUIRE(_dependencyMap[0]);
1544
- },"8a35a86b7946c72e0207",["33d6b98d6e39f6b0a8f9"]);
1545
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1546
- "use strict";
1547
-
1548
- /**
1549
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1550
- *
1551
- * This source code is licensed under the MIT license found in the
1552
- * LICENSE file in the root directory of this source tree.
1553
- *
1554
- * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its
1555
- * affiliates. All rights reserved.
1556
- *
1557
- * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO
1558
- * LICENSE TERMS.
1559
- *
1560
- * Amazon modifications are indicated by [amznmod_* comments].
1561
- */
1562
- Object.defineProperty(exports, "__esModule", {
1563
- value: true
1564
- });
1565
- exports.getEnforcing = exports.get = undefined;
1566
- var turboModuleProxy = global.__turboModuleProxy;
1567
- function requireModule(name) {
1568
- if (turboModuleProxy != null) {
1569
- return turboModuleProxy(name);
1570
- }
1571
- return null;
1572
- }
1573
- function get(name) {
1574
- return requireModule(name);
1575
- }
1576
- exports.get = get;
1577
- function getEnforcing(name) {
1578
- var module = requireModule(name);
1579
- (0, _$$_REQUIRE(_dependencyMap[0]).default)(module != null, `TurboModuleRegistry.getEnforcing(...): '${name}' could not be found. ` + 'Verify that a module by this name is registered in the native binary.');
1580
- return module;
1581
- }
1582
- exports.getEnforcing = getEnforcing;
1583
- },"33d6b98d6e39f6b0a8f9",["8d9475a2cb77b53e450d"]);
1584
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1585
- /**
1586
- * Copyright (c) 2013-present, Facebook, Inc.
1587
- *
1588
- * This source code is licensed under the MIT license found in the
1589
- * LICENSE file in the root directory of this source tree.
1590
- *
1591
- * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its
1592
- * affiliates. All rights reserved.
1593
- *
1594
- * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO
1595
- * LICENSE TERMS.
1596
- *
1597
- * Amazon modifications are indicated by [amznmod_* comments].
1598
- */
1599
- /**
1600
- * amznmod_tmapi: Migrated to typescript
1601
- */
1602
- 'use strict';
1603
-
1604
- Object.defineProperty(exports, "__esModule", {
1605
- value: true
1606
- });
1607
- /**
1608
- * Use invariant() to assert state which your program assumes to be true.
1609
- *
1610
- * Provide sprintf-style format (only %s is supported) and arguments
1611
- * to provide information about what broke and what you were
1612
- * expecting.
1613
- *
1614
- * The invariant message will be stripped in production, but the invariant
1615
- * will remain to ensure logic does not differ in production.
1616
- */
1617
- var NODE_ENV = "production";
1618
- var invariant = function invariant(condition, format) {
1619
- for (var _len = arguments.length, extraArgs = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1620
- extraArgs[_key - 2] = arguments[_key];
1621
- }
1622
- if (!condition) {
1623
- var error;
1624
- if (format === undefined) {
1625
- error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
1626
- } else {
1627
- var argIndex = 0;
1628
- error = new Error(format.replace(/%s/g, function () {
1629
- return extraArgs[argIndex++];
1630
- }));
1631
- error.name = 'Invariant Violation';
1632
- }
1633
- // @ts-ignore `framesToPop` is not part of Error type but something Meta (and maybe RN) uses.
1634
- error.framesToPop = 1; // we don't care about invariant's own frame
1635
- throw error;
1636
- }
1637
- };
1638
- exports.default = invariant;
1639
- },"8d9475a2cb77b53e450d",[]);
1640
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1641
- Object.defineProperty(exports, "__esModule", {
1642
- value: true
1643
- });
1644
- exports.PlayerSessionError = exports.InvalidArgumentError = undefined;
1645
- var _createClass2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[1]));
1646
- var _classCallCheck2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[2]));
1647
- var _possibleConstructorReturn2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[3]));
1648
- var _getPrototypeOf2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[4]));
1649
- var _inherits2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[5]));
1650
- var _wrapNativeSuper2 = _$$_REQUIRE(_dependencyMap[0])(_$$_REQUIRE(_dependencyMap[6]));
1651
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
1652
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1653
- /*
1654
- * Copyright 2025 Amazon.com, Inc. or its affiliates. All rights reserved.
1655
- *
1656
- * AMAZON PROPRIETARY/CONFIDENTIAL
1657
- *
1658
- * You may not use this file except in compliance with the terms and
1659
- * conditions set forth in the accompanying LICENSE.TXT file.
1660
- *
1661
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
1662
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
1663
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
1664
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
1665
- */
1666
- /**
1667
- * All media elements have an associated error status,
1668
- * which records the last error the element encountered since its resource
1669
- * selection algorithm was last invoked.
1670
- * Onre getting an error while perforning handle functions,
1671
- * apps must create instance of `PlayerSessionError`
1672
- * to reject the promise in corresponding `PlayerServerHandler` handle functions.
1673
- *
1674
- * For additional information, see
1675
- * https://html.spec.whatwg.org/multipage/media.html#mediaerror.
1676
- */
1677
- var PlayerSessionError = exports.PlayerSessionError = /*#__PURE__*/function (_Error) {
1678
- /**
1679
- * Initializes a new instance of `PlayerSessionError`.
1680
- */
1681
- function PlayerSessionError(message) {
1682
- (0, _classCallCheck2.default)(this, PlayerSessionError);
1683
- return _callSuper(this, PlayerSessionError, [message]);
1684
- }
1685
- (0, _inherits2.default)(PlayerSessionError, _Error);
1686
- return (0, _createClass2.default)(PlayerSessionError);
1687
- }(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
1688
- /**
1689
- * Error occurs when the given argument is invalid.
1690
- */
1691
- var InvalidArgumentError = exports.InvalidArgumentError = /*#__PURE__*/function (_PlayerSessionError) {
1692
- function InvalidArgumentError() {
1693
- (0, _classCallCheck2.default)(this, InvalidArgumentError);
1694
- return _callSuper(this, InvalidArgumentError, arguments);
1695
- }
1696
- (0, _inherits2.default)(InvalidArgumentError, _PlayerSessionError);
1697
- return (0, _createClass2.default)(InvalidArgumentError);
1698
- }(PlayerSessionError);
1699
- },"311999c2457e52d403d4",["277a84013d7e1a1ace05","68819e29ebee24bb0e88","cb664999166f9660a878","aab42168bb4cb23540ec","ba9efe5c53f1d07f5c9d","9822a58ca7726d551fe0","66be7ef871ad04671969"]);
1700
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1701
- function _possibleConstructorReturn(t, e) {
1702
- if (e && ("object" == _$$_REQUIRE(_dependencyMap[0])["default"](e) || "function" == typeof e)) return e;
1703
- if (undefined !== e) throw new TypeError("Derived constructors may only return object or undefined");
1704
- return _$$_REQUIRE(_dependencyMap[1])(t);
1705
- }
1706
- module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
1707
- },"aab42168bb4cb23540ec",["e08c69ed06cf526909e3","0716ce96f45f287fb302"]);
1708
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1709
- function _assertThisInitialized(e) {
1710
- if (undefined === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1711
- return e;
1712
- }
1713
- module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
1714
- },"0716ce96f45f287fb302",[]);
1715
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1716
- function _getPrototypeOf(t) {
1717
- return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
1718
- return t.__proto__ || Object.getPrototypeOf(t);
1719
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
1720
- }
1721
- module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1722
- },"ba9efe5c53f1d07f5c9d",[]);
1723
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1724
- function _inherits(t, e) {
1725
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
1726
- t.prototype = Object.create(e && e.prototype, {
1727
- constructor: {
1728
- value: t,
1729
- writable: true,
1730
- configurable: true
1731
- }
1732
- }), Object.defineProperty(t, "prototype", {
1733
- writable: false
1734
- }), e && _$$_REQUIRE(_dependencyMap[0])(t, e);
1735
- }
1736
- module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
1737
- },"9822a58ca7726d551fe0",["79c731bcf4b10abe8e4d"]);
1738
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1739
- function _setPrototypeOf(t, e) {
1740
- return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
1741
- return t.__proto__ = e, t;
1742
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
1743
- }
1744
- module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1745
- },"79c731bcf4b10abe8e4d",[]);
1746
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1747
- function _wrapNativeSuper(t) {
1748
- var r = "function" == typeof Map ? new Map() : undefined;
1749
- return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) {
1750
- if (null === t || !_$$_REQUIRE(_dependencyMap[0])(t)) return t;
1751
- if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
1752
- if (undefined !== r) {
1753
- if (r.has(t)) return r.get(t);
1754
- r.set(t, Wrapper);
1755
- }
1756
- function Wrapper() {
1757
- return _$$_REQUIRE(_dependencyMap[1])(t, arguments, _$$_REQUIRE(_dependencyMap[2])(this).constructor);
1758
- }
1759
- return Wrapper.prototype = Object.create(t.prototype, {
1760
- constructor: {
1761
- value: Wrapper,
1762
- enumerable: false,
1763
- writable: true,
1764
- configurable: true
1765
- }
1766
- }), _$$_REQUIRE(_dependencyMap[3])(Wrapper, t);
1767
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t);
1768
- }
1769
- module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
1770
- },"66be7ef871ad04671969",["9cf198b81404c8b483b0","20524c8783215c6329fe","ba9efe5c53f1d07f5c9d","79c731bcf4b10abe8e4d"]);
1771
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1772
- function _isNativeFunction(t) {
1773
- try {
1774
- return -1 !== Function.toString.call(t).indexOf("[native code]");
1775
- } catch (n) {
1776
- return "function" == typeof t;
1777
- }
1778
- }
1779
- module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
1780
- },"9cf198b81404c8b483b0",[]);
1781
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1782
- function _construct(t, e, r) {
1783
- if (_$$_REQUIRE(_dependencyMap[0])()) return Reflect.construct.apply(null, arguments);
1784
- var o = [null];
1785
- o.push.apply(o, e);
1786
- var p = new (t.bind.apply(t, o))();
1787
- return r && _$$_REQUIRE(_dependencyMap[1])(p, r.prototype), p;
1788
- }
1789
- module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
1790
- },"20524c8783215c6329fe",["df21df9938c0adbd59f1","79c731bcf4b10abe8e4d"]);
1791
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1792
- function _isNativeReflectConstruct() {
1793
- try {
1794
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
1795
- } catch (t) {}
1796
- return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
1797
- return !!t;
1798
- }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
1799
- }
1800
- module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
1801
- },"df21df9938c0adbd59f1",[]);