@interopio/fdc3 2.5.1 → 2.6.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.
- package/changelog.md +4 -0
- package/dist/fdc3.electron.es.js +2659 -686
- package/dist/fdc3.electron.umd.js +2659 -686
- package/dist/fdc3.es.js +2659 -686
- package/dist/fdc3.umd.js +2659 -686
- package/package.json +5 -6
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
return a;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
var toStr$
|
|
38
|
+
var toStr$8 = Object.prototype.toString;
|
|
39
39
|
|
|
40
40
|
var isArguments$3 = function isArguments(value) {
|
|
41
|
-
var str = toStr$
|
|
41
|
+
var str = toStr$8.call(value);
|
|
42
42
|
var isArgs = str === '[object Arguments]';
|
|
43
43
|
if (!isArgs) {
|
|
44
44
|
isArgs = str !== '[object Array]' &&
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
typeof value === 'object' &&
|
|
47
47
|
typeof value.length === 'number' &&
|
|
48
48
|
value.length >= 0 &&
|
|
49
|
-
toStr$
|
|
49
|
+
toStr$8.call(value.callee) === '[object Function]';
|
|
50
50
|
}
|
|
51
51
|
return isArgs;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
var implementation$
|
|
55
|
-
var hasRequiredImplementation;
|
|
54
|
+
var implementation$a;
|
|
55
|
+
var hasRequiredImplementation$1;
|
|
56
56
|
|
|
57
|
-
function requireImplementation () {
|
|
58
|
-
if (hasRequiredImplementation) return implementation$
|
|
59
|
-
hasRequiredImplementation = 1;
|
|
57
|
+
function requireImplementation$1 () {
|
|
58
|
+
if (hasRequiredImplementation$1) return implementation$a;
|
|
59
|
+
hasRequiredImplementation$1 = 1;
|
|
60
60
|
|
|
61
61
|
var keysShim;
|
|
62
62
|
if (!Object.keys) {
|
|
@@ -177,15 +177,15 @@
|
|
|
177
177
|
return theKeys;
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
implementation$
|
|
181
|
-
return implementation$
|
|
180
|
+
implementation$a = keysShim;
|
|
181
|
+
return implementation$a;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
var slice = Array.prototype.slice;
|
|
185
185
|
var isArgs = isArguments$3;
|
|
186
186
|
|
|
187
187
|
var origKeys = Object.keys;
|
|
188
|
-
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : requireImplementation();
|
|
188
|
+
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : requireImplementation$1();
|
|
189
189
|
|
|
190
190
|
var originalKeys = Object.keys;
|
|
191
191
|
|
|
@@ -212,6 +212,274 @@
|
|
|
212
212
|
|
|
213
213
|
var objectKeys$2 = keysShim;
|
|
214
214
|
|
|
215
|
+
/** @type {import('.')} */
|
|
216
|
+
var $defineProperty$3 = Object.defineProperty || false;
|
|
217
|
+
if ($defineProperty$3) {
|
|
218
|
+
try {
|
|
219
|
+
$defineProperty$3({}, 'a', { value: 1 });
|
|
220
|
+
} catch (e) {
|
|
221
|
+
// IE 8 has a broken defineProperty
|
|
222
|
+
$defineProperty$3 = false;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
var esDefineProperty = $defineProperty$3;
|
|
227
|
+
|
|
228
|
+
/** @type {import('./syntax')} */
|
|
229
|
+
var syntax = SyntaxError;
|
|
230
|
+
|
|
231
|
+
/** @type {import('./type')} */
|
|
232
|
+
var type = TypeError;
|
|
233
|
+
|
|
234
|
+
/** @type {import('./gOPD')} */
|
|
235
|
+
var gOPD$5 = Object.getOwnPropertyDescriptor;
|
|
236
|
+
|
|
237
|
+
/** @type {import('.')} */
|
|
238
|
+
var $gOPD$2 = gOPD$5;
|
|
239
|
+
|
|
240
|
+
if ($gOPD$2) {
|
|
241
|
+
try {
|
|
242
|
+
$gOPD$2([], 'length');
|
|
243
|
+
} catch (e) {
|
|
244
|
+
// IE 8 has a broken gOPD
|
|
245
|
+
$gOPD$2 = null;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
var gopd$1 = $gOPD$2;
|
|
250
|
+
|
|
251
|
+
var $defineProperty$2 = esDefineProperty;
|
|
252
|
+
|
|
253
|
+
var $SyntaxError$2 = syntax;
|
|
254
|
+
var $TypeError$a = type;
|
|
255
|
+
|
|
256
|
+
var gopd = gopd$1;
|
|
257
|
+
|
|
258
|
+
/** @type {import('.')} */
|
|
259
|
+
var defineDataProperty$1 = function defineDataProperty(
|
|
260
|
+
obj,
|
|
261
|
+
property,
|
|
262
|
+
value
|
|
263
|
+
) {
|
|
264
|
+
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
265
|
+
throw new $TypeError$a('`obj` must be an object or a function`');
|
|
266
|
+
}
|
|
267
|
+
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
268
|
+
throw new $TypeError$a('`property` must be a string or a symbol`');
|
|
269
|
+
}
|
|
270
|
+
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
271
|
+
throw new $TypeError$a('`nonEnumerable`, if provided, must be a boolean or null');
|
|
272
|
+
}
|
|
273
|
+
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
274
|
+
throw new $TypeError$a('`nonWritable`, if provided, must be a boolean or null');
|
|
275
|
+
}
|
|
276
|
+
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
277
|
+
throw new $TypeError$a('`nonConfigurable`, if provided, must be a boolean or null');
|
|
278
|
+
}
|
|
279
|
+
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
280
|
+
throw new $TypeError$a('`loose`, if provided, must be a boolean');
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
284
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
285
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
286
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
287
|
+
|
|
288
|
+
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
289
|
+
var desc = !!gopd && gopd(obj, property);
|
|
290
|
+
|
|
291
|
+
if ($defineProperty$2) {
|
|
292
|
+
$defineProperty$2(obj, property, {
|
|
293
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
294
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
295
|
+
value: value,
|
|
296
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
297
|
+
});
|
|
298
|
+
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
299
|
+
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
300
|
+
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
301
|
+
} else {
|
|
302
|
+
throw new $SyntaxError$2('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
var $defineProperty$1 = esDefineProperty;
|
|
307
|
+
|
|
308
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
309
|
+
return !!$defineProperty$1;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
313
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
314
|
+
if (!$defineProperty$1) {
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
try {
|
|
318
|
+
return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
|
|
319
|
+
} catch (e) {
|
|
320
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
326
|
+
|
|
327
|
+
var keys = objectKeys$2;
|
|
328
|
+
var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
329
|
+
|
|
330
|
+
var toStr$7 = Object.prototype.toString;
|
|
331
|
+
var concat = Array.prototype.concat;
|
|
332
|
+
var defineDataProperty = defineDataProperty$1;
|
|
333
|
+
|
|
334
|
+
var isFunction = function (fn) {
|
|
335
|
+
return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
var supportsDescriptors$2 = hasPropertyDescriptors_1();
|
|
339
|
+
|
|
340
|
+
var defineProperty$1 = function (object, name, value, predicate) {
|
|
341
|
+
if (name in object) {
|
|
342
|
+
if (predicate === true) {
|
|
343
|
+
if (object[name] === value) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
} else if (!isFunction(predicate) || !predicate()) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (supportsDescriptors$2) {
|
|
352
|
+
defineDataProperty(object, name, value, true);
|
|
353
|
+
} else {
|
|
354
|
+
defineDataProperty(object, name, value);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
var defineProperties$1 = function (object, map) {
|
|
359
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
360
|
+
var props = keys(map);
|
|
361
|
+
if (hasSymbols$5) {
|
|
362
|
+
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
363
|
+
}
|
|
364
|
+
for (var i = 0; i < props.length; i += 1) {
|
|
365
|
+
defineProperty$1(object, props[i], map[props[i]], predicates[props[i]]);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
|
|
370
|
+
|
|
371
|
+
var defineProperties_1 = defineProperties$1;
|
|
372
|
+
|
|
373
|
+
var callBind$6 = {exports: {}};
|
|
374
|
+
|
|
375
|
+
var implementation$9;
|
|
376
|
+
var hasRequiredImplementation;
|
|
377
|
+
|
|
378
|
+
function requireImplementation () {
|
|
379
|
+
if (hasRequiredImplementation) return implementation$9;
|
|
380
|
+
hasRequiredImplementation = 1;
|
|
381
|
+
|
|
382
|
+
/* eslint no-invalid-this: 1 */
|
|
383
|
+
|
|
384
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
385
|
+
var toStr = Object.prototype.toString;
|
|
386
|
+
var max = Math.max;
|
|
387
|
+
var funcType = '[object Function]';
|
|
388
|
+
|
|
389
|
+
var concatty = function concatty(a, b) {
|
|
390
|
+
var arr = [];
|
|
391
|
+
|
|
392
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
393
|
+
arr[i] = a[i];
|
|
394
|
+
}
|
|
395
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
396
|
+
arr[j + a.length] = b[j];
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
return arr;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
var slicy = function slicy(arrLike, offset) {
|
|
403
|
+
var arr = [];
|
|
404
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
405
|
+
arr[j] = arrLike[i];
|
|
406
|
+
}
|
|
407
|
+
return arr;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
var joiny = function (arr, joiner) {
|
|
411
|
+
var str = '';
|
|
412
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
413
|
+
str += arr[i];
|
|
414
|
+
if (i + 1 < arr.length) {
|
|
415
|
+
str += joiner;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return str;
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
implementation$9 = function bind(that) {
|
|
422
|
+
var target = this;
|
|
423
|
+
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
424
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
425
|
+
}
|
|
426
|
+
var args = slicy(arguments, 1);
|
|
427
|
+
|
|
428
|
+
var bound;
|
|
429
|
+
var binder = function () {
|
|
430
|
+
if (this instanceof bound) {
|
|
431
|
+
var result = target.apply(
|
|
432
|
+
this,
|
|
433
|
+
concatty(args, arguments)
|
|
434
|
+
);
|
|
435
|
+
if (Object(result) === result) {
|
|
436
|
+
return result;
|
|
437
|
+
}
|
|
438
|
+
return this;
|
|
439
|
+
}
|
|
440
|
+
return target.apply(
|
|
441
|
+
that,
|
|
442
|
+
concatty(args, arguments)
|
|
443
|
+
);
|
|
444
|
+
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
var boundLength = max(0, target.length - args.length);
|
|
448
|
+
var boundArgs = [];
|
|
449
|
+
for (var i = 0; i < boundLength; i++) {
|
|
450
|
+
boundArgs[i] = '$' + i;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
454
|
+
|
|
455
|
+
if (target.prototype) {
|
|
456
|
+
var Empty = function Empty() {};
|
|
457
|
+
Empty.prototype = target.prototype;
|
|
458
|
+
bound.prototype = new Empty();
|
|
459
|
+
Empty.prototype = null;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
return bound;
|
|
463
|
+
};
|
|
464
|
+
return implementation$9;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
var functionBind;
|
|
468
|
+
var hasRequiredFunctionBind;
|
|
469
|
+
|
|
470
|
+
function requireFunctionBind () {
|
|
471
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
472
|
+
hasRequiredFunctionBind = 1;
|
|
473
|
+
|
|
474
|
+
var implementation = requireImplementation();
|
|
475
|
+
|
|
476
|
+
functionBind = Function.prototype.bind || implementation;
|
|
477
|
+
return functionBind;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/** @type {import('.')} */
|
|
481
|
+
var esObjectAtoms = Object;
|
|
482
|
+
|
|
215
483
|
/** @type {import('.')} */
|
|
216
484
|
var esErrors = Error;
|
|
217
485
|
|
|
@@ -224,15 +492,42 @@
|
|
|
224
492
|
/** @type {import('./ref')} */
|
|
225
493
|
var ref = ReferenceError;
|
|
226
494
|
|
|
227
|
-
/** @type {import('./syntax')} */
|
|
228
|
-
var syntax = SyntaxError;
|
|
229
|
-
|
|
230
|
-
/** @type {import('./type')} */
|
|
231
|
-
var type = TypeError;
|
|
232
|
-
|
|
233
495
|
/** @type {import('./uri')} */
|
|
234
496
|
var uri = URIError;
|
|
235
497
|
|
|
498
|
+
/** @type {import('./abs')} */
|
|
499
|
+
var abs$1 = Math.abs;
|
|
500
|
+
|
|
501
|
+
/** @type {import('./floor')} */
|
|
502
|
+
var floor$1 = Math.floor;
|
|
503
|
+
|
|
504
|
+
/** @type {import('./max')} */
|
|
505
|
+
var max$1 = Math.max;
|
|
506
|
+
|
|
507
|
+
/** @type {import('./min')} */
|
|
508
|
+
var min$1 = Math.min;
|
|
509
|
+
|
|
510
|
+
/** @type {import('./pow')} */
|
|
511
|
+
var pow$1 = Math.pow;
|
|
512
|
+
|
|
513
|
+
/** @type {import('./round')} */
|
|
514
|
+
var round$1 = Math.round;
|
|
515
|
+
|
|
516
|
+
/** @type {import('./isNaN')} */
|
|
517
|
+
var _isNaN = Number.isNaN || function isNaN(a) {
|
|
518
|
+
return a !== a;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
var $isNaN = _isNaN;
|
|
522
|
+
|
|
523
|
+
/** @type {import('./sign')} */
|
|
524
|
+
var sign$1 = function sign(number) {
|
|
525
|
+
if ($isNaN(number) || number === 0) {
|
|
526
|
+
return number;
|
|
527
|
+
}
|
|
528
|
+
return number < 0 ? -1 : 1;
|
|
529
|
+
};
|
|
530
|
+
|
|
236
531
|
var shams$1;
|
|
237
532
|
var hasRequiredShams;
|
|
238
533
|
|
|
@@ -240,11 +535,13 @@
|
|
|
240
535
|
if (hasRequiredShams) return shams$1;
|
|
241
536
|
hasRequiredShams = 1;
|
|
242
537
|
|
|
538
|
+
/** @type {import('./shams')} */
|
|
243
539
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
244
540
|
shams$1 = function hasSymbols() {
|
|
245
541
|
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
246
542
|
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
247
543
|
|
|
544
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
248
545
|
var obj = {};
|
|
249
546
|
var sym = Symbol('test');
|
|
250
547
|
var symObj = Object(sym);
|
|
@@ -263,7 +560,7 @@
|
|
|
263
560
|
|
|
264
561
|
var symVal = 42;
|
|
265
562
|
obj[sym] = symVal;
|
|
266
|
-
for (
|
|
563
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
267
564
|
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
268
565
|
|
|
269
566
|
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
@@ -274,7 +571,8 @@
|
|
|
274
571
|
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
275
572
|
|
|
276
573
|
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
277
|
-
|
|
574
|
+
// eslint-disable-next-line no-extra-parens
|
|
575
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
278
576
|
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
279
577
|
}
|
|
280
578
|
|
|
@@ -286,7 +584,8 @@
|
|
|
286
584
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
287
585
|
var hasSymbolSham = requireShams();
|
|
288
586
|
|
|
289
|
-
|
|
587
|
+
/** @type {import('.')} */
|
|
588
|
+
var hasSymbols$4 = function hasNativeSymbols() {
|
|
290
589
|
if (typeof origSymbol !== 'function') { return false; }
|
|
291
590
|
if (typeof Symbol !== 'function') { return false; }
|
|
292
591
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -295,124 +594,191 @@
|
|
|
295
594
|
return hasSymbolSham();
|
|
296
595
|
};
|
|
297
596
|
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
foo: {}
|
|
301
|
-
};
|
|
597
|
+
var Reflect_getPrototypeOf;
|
|
598
|
+
var hasRequiredReflect_getPrototypeOf;
|
|
302
599
|
|
|
303
|
-
|
|
600
|
+
function requireReflect_getPrototypeOf () {
|
|
601
|
+
if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
|
|
602
|
+
hasRequiredReflect_getPrototypeOf = 1;
|
|
304
603
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
&& !(test instanceof $Object$1);
|
|
310
|
-
};
|
|
604
|
+
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
605
|
+
Reflect_getPrototypeOf = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
606
|
+
return Reflect_getPrototypeOf;
|
|
607
|
+
}
|
|
311
608
|
|
|
312
|
-
|
|
609
|
+
var Object_getPrototypeOf;
|
|
610
|
+
var hasRequiredObject_getPrototypeOf;
|
|
313
611
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
var funcType = '[object Function]';
|
|
612
|
+
function requireObject_getPrototypeOf () {
|
|
613
|
+
if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
|
|
614
|
+
hasRequiredObject_getPrototypeOf = 1;
|
|
318
615
|
|
|
319
|
-
|
|
320
|
-
var arr = [];
|
|
616
|
+
var $Object = esObjectAtoms;
|
|
321
617
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
arr[j + a.length] = b[j];
|
|
327
|
-
}
|
|
618
|
+
/** @type {import('./Object.getPrototypeOf')} */
|
|
619
|
+
Object_getPrototypeOf = $Object.getPrototypeOf || null;
|
|
620
|
+
return Object_getPrototypeOf;
|
|
621
|
+
}
|
|
328
622
|
|
|
329
|
-
|
|
330
|
-
|
|
623
|
+
var functionCall;
|
|
624
|
+
var hasRequiredFunctionCall;
|
|
331
625
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
arr[j] = arrLike[i];
|
|
336
|
-
}
|
|
337
|
-
return arr;
|
|
338
|
-
};
|
|
626
|
+
function requireFunctionCall () {
|
|
627
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
628
|
+
hasRequiredFunctionCall = 1;
|
|
339
629
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
if (i + 1 < arr.length) {
|
|
345
|
-
str += joiner;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
return str;
|
|
349
|
-
};
|
|
630
|
+
/** @type {import('./functionCall')} */
|
|
631
|
+
functionCall = Function.prototype.call;
|
|
632
|
+
return functionCall;
|
|
633
|
+
}
|
|
350
634
|
|
|
351
|
-
var
|
|
352
|
-
|
|
353
|
-
if (typeof target !== 'function' || toStr$8.apply(target) !== funcType) {
|
|
354
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
355
|
-
}
|
|
356
|
-
var args = slicy(arguments, 1);
|
|
357
|
-
|
|
358
|
-
var bound;
|
|
359
|
-
var binder = function () {
|
|
360
|
-
if (this instanceof bound) {
|
|
361
|
-
var result = target.apply(
|
|
362
|
-
this,
|
|
363
|
-
concatty(args, arguments)
|
|
364
|
-
);
|
|
365
|
-
if (Object(result) === result) {
|
|
366
|
-
return result;
|
|
367
|
-
}
|
|
368
|
-
return this;
|
|
369
|
-
}
|
|
370
|
-
return target.apply(
|
|
371
|
-
that,
|
|
372
|
-
concatty(args, arguments)
|
|
373
|
-
);
|
|
635
|
+
var functionApply;
|
|
636
|
+
var hasRequiredFunctionApply;
|
|
374
637
|
|
|
375
|
-
|
|
638
|
+
function requireFunctionApply () {
|
|
639
|
+
if (hasRequiredFunctionApply) return functionApply;
|
|
640
|
+
hasRequiredFunctionApply = 1;
|
|
376
641
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
642
|
+
/** @type {import('./functionApply')} */
|
|
643
|
+
functionApply = Function.prototype.apply;
|
|
644
|
+
return functionApply;
|
|
645
|
+
}
|
|
382
646
|
|
|
383
|
-
|
|
647
|
+
/** @type {import('./reflectApply')} */
|
|
648
|
+
var reflectApply$1 = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
384
649
|
|
|
385
|
-
|
|
386
|
-
var Empty = function Empty() {};
|
|
387
|
-
Empty.prototype = target.prototype;
|
|
388
|
-
bound.prototype = new Empty();
|
|
389
|
-
Empty.prototype = null;
|
|
390
|
-
}
|
|
650
|
+
var bind$2 = requireFunctionBind();
|
|
391
651
|
|
|
392
|
-
|
|
393
|
-
|
|
652
|
+
var $apply$1 = requireFunctionApply();
|
|
653
|
+
var $call$2 = requireFunctionCall();
|
|
654
|
+
var $reflectApply = reflectApply$1;
|
|
394
655
|
|
|
395
|
-
|
|
656
|
+
/** @type {import('./actualApply')} */
|
|
657
|
+
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
396
658
|
|
|
397
|
-
var
|
|
659
|
+
var bind$1 = requireFunctionBind();
|
|
660
|
+
var $TypeError$9 = type;
|
|
398
661
|
|
|
399
|
-
var call =
|
|
400
|
-
var $
|
|
401
|
-
var bind$1 = functionBind;
|
|
662
|
+
var $call$1 = requireFunctionCall();
|
|
663
|
+
var $actualApply = actualApply;
|
|
402
664
|
|
|
403
665
|
/** @type {import('.')} */
|
|
404
|
-
var
|
|
666
|
+
var callBindApplyHelpers = function callBindBasic(args) {
|
|
667
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
668
|
+
throw new $TypeError$9('a function is required');
|
|
669
|
+
}
|
|
670
|
+
return $actualApply(bind$1, $call$1, args);
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
var get;
|
|
674
|
+
var hasRequiredGet;
|
|
675
|
+
|
|
676
|
+
function requireGet () {
|
|
677
|
+
if (hasRequiredGet) return get;
|
|
678
|
+
hasRequiredGet = 1;
|
|
679
|
+
|
|
680
|
+
var callBind = callBindApplyHelpers;
|
|
681
|
+
var gOPD = gopd$1;
|
|
682
|
+
|
|
683
|
+
var hasProtoAccessor;
|
|
684
|
+
try {
|
|
685
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
|
686
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
|
687
|
+
} catch (e) {
|
|
688
|
+
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
|
689
|
+
throw e;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// eslint-disable-next-line no-extra-parens
|
|
694
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
|
695
|
+
|
|
696
|
+
var $Object = Object;
|
|
697
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
698
|
+
|
|
699
|
+
/** @type {import('./get')} */
|
|
700
|
+
get = desc && typeof desc.get === 'function'
|
|
701
|
+
? callBind([desc.get])
|
|
702
|
+
: typeof $getPrototypeOf === 'function'
|
|
703
|
+
? /** @type {import('./get')} */ function getDunder(value) {
|
|
704
|
+
// eslint-disable-next-line eqeqeq
|
|
705
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
706
|
+
}
|
|
707
|
+
: false;
|
|
708
|
+
return get;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
var getProto$2;
|
|
712
|
+
var hasRequiredGetProto;
|
|
713
|
+
|
|
714
|
+
function requireGetProto () {
|
|
715
|
+
if (hasRequiredGetProto) return getProto$2;
|
|
716
|
+
hasRequiredGetProto = 1;
|
|
717
|
+
|
|
718
|
+
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
719
|
+
var originalGetProto = requireObject_getPrototypeOf();
|
|
720
|
+
|
|
721
|
+
var getDunderProto = requireGet();
|
|
722
|
+
|
|
723
|
+
/** @type {import('.')} */
|
|
724
|
+
getProto$2 = reflectGetProto
|
|
725
|
+
? function getProto(O) {
|
|
726
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
727
|
+
return reflectGetProto(O);
|
|
728
|
+
}
|
|
729
|
+
: originalGetProto
|
|
730
|
+
? function getProto(O) {
|
|
731
|
+
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
732
|
+
throw new TypeError('getProto: not an object');
|
|
733
|
+
}
|
|
734
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
735
|
+
return originalGetProto(O);
|
|
736
|
+
}
|
|
737
|
+
: getDunderProto
|
|
738
|
+
? function getProto(O) {
|
|
739
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
740
|
+
return getDunderProto(O);
|
|
741
|
+
}
|
|
742
|
+
: null;
|
|
743
|
+
return getProto$2;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
var hasown;
|
|
747
|
+
var hasRequiredHasown;
|
|
748
|
+
|
|
749
|
+
function requireHasown () {
|
|
750
|
+
if (hasRequiredHasown) return hasown;
|
|
751
|
+
hasRequiredHasown = 1;
|
|
752
|
+
|
|
753
|
+
var call = Function.prototype.call;
|
|
754
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
755
|
+
var bind = requireFunctionBind();
|
|
756
|
+
|
|
757
|
+
/** @type {import('.')} */
|
|
758
|
+
hasown = bind.call(call, $hasOwn);
|
|
759
|
+
return hasown;
|
|
760
|
+
}
|
|
405
761
|
|
|
406
762
|
var undefined$1;
|
|
407
763
|
|
|
764
|
+
var $Object$1 = esObjectAtoms;
|
|
765
|
+
|
|
408
766
|
var $Error = esErrors;
|
|
409
767
|
var $EvalError = _eval;
|
|
410
768
|
var $RangeError = range;
|
|
411
769
|
var $ReferenceError = ref;
|
|
412
|
-
var $SyntaxError$
|
|
413
|
-
var $TypeError$
|
|
770
|
+
var $SyntaxError$1 = syntax;
|
|
771
|
+
var $TypeError$8 = type;
|
|
414
772
|
var $URIError = uri;
|
|
415
773
|
|
|
774
|
+
var abs = abs$1;
|
|
775
|
+
var floor = floor$1;
|
|
776
|
+
var max = max$1;
|
|
777
|
+
var min = min$1;
|
|
778
|
+
var pow = pow$1;
|
|
779
|
+
var round = round$1;
|
|
780
|
+
var sign = sign$1;
|
|
781
|
+
|
|
416
782
|
var $Function = Function;
|
|
417
783
|
|
|
418
784
|
// eslint-disable-next-line consistent-return
|
|
@@ -422,19 +788,13 @@
|
|
|
422
788
|
} catch (e) {}
|
|
423
789
|
};
|
|
424
790
|
|
|
425
|
-
var $gOPD$
|
|
426
|
-
|
|
427
|
-
try {
|
|
428
|
-
$gOPD$2({}, '');
|
|
429
|
-
} catch (e) {
|
|
430
|
-
$gOPD$2 = null; // this is IE 8, which has a broken gOPD
|
|
431
|
-
}
|
|
432
|
-
}
|
|
791
|
+
var $gOPD$1 = gopd$1;
|
|
792
|
+
var $defineProperty = esDefineProperty;
|
|
433
793
|
|
|
434
794
|
var throwTypeError = function () {
|
|
435
|
-
throw new $TypeError$
|
|
795
|
+
throw new $TypeError$8();
|
|
436
796
|
};
|
|
437
|
-
var ThrowTypeError = $gOPD$
|
|
797
|
+
var ThrowTypeError = $gOPD$1
|
|
438
798
|
? (function () {
|
|
439
799
|
try {
|
|
440
800
|
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
@@ -443,7 +803,7 @@
|
|
|
443
803
|
} catch (calleeThrows) {
|
|
444
804
|
try {
|
|
445
805
|
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
446
|
-
return $gOPD$
|
|
806
|
+
return $gOPD$1(arguments, 'callee').get;
|
|
447
807
|
} catch (gOPDthrows) {
|
|
448
808
|
return throwTypeError;
|
|
449
809
|
}
|
|
@@ -451,14 +811,14 @@
|
|
|
451
811
|
}())
|
|
452
812
|
: throwTypeError;
|
|
453
813
|
|
|
454
|
-
var hasSymbols$
|
|
455
|
-
var hasProto = hasProto$1();
|
|
814
|
+
var hasSymbols$3 = hasSymbols$4();
|
|
456
815
|
|
|
457
|
-
var getProto$1 =
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
);
|
|
816
|
+
var getProto$1 = requireGetProto();
|
|
817
|
+
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
818
|
+
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
819
|
+
|
|
820
|
+
var $apply = requireFunctionApply();
|
|
821
|
+
var $call = requireFunctionCall();
|
|
462
822
|
|
|
463
823
|
var needsEval = {};
|
|
464
824
|
|
|
@@ -469,7 +829,7 @@
|
|
|
469
829
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
470
830
|
'%Array%': Array,
|
|
471
831
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
472
|
-
'%ArrayIteratorPrototype%': hasSymbols$
|
|
832
|
+
'%ArrayIteratorPrototype%': hasSymbols$3 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
|
|
473
833
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
474
834
|
'%AsyncFunction%': needsEval,
|
|
475
835
|
'%AsyncGenerator%': needsEval,
|
|
@@ -499,13 +859,14 @@
|
|
|
499
859
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
500
860
|
'%isFinite%': isFinite,
|
|
501
861
|
'%isNaN%': isNaN,
|
|
502
|
-
'%IteratorPrototype%': hasSymbols$
|
|
862
|
+
'%IteratorPrototype%': hasSymbols$3 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
|
|
503
863
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
504
864
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
505
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$
|
|
865
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$1 ? undefined$1 : getProto$1(new Map()[Symbol.iterator]()),
|
|
506
866
|
'%Math%': Math,
|
|
507
867
|
'%Number%': Number,
|
|
508
|
-
'%Object%': Object,
|
|
868
|
+
'%Object%': $Object$1,
|
|
869
|
+
'%Object.getOwnPropertyDescriptor%': $gOPD$1,
|
|
509
870
|
'%parseFloat%': parseFloat,
|
|
510
871
|
'%parseInt%': parseInt,
|
|
511
872
|
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
@@ -515,15 +876,15 @@
|
|
|
515
876
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
516
877
|
'%RegExp%': RegExp,
|
|
517
878
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
518
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$
|
|
879
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$1 ? undefined$1 : getProto$1(new Set()[Symbol.iterator]()),
|
|
519
880
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
520
881
|
'%String%': String,
|
|
521
|
-
'%StringIteratorPrototype%': hasSymbols$
|
|
522
|
-
'%Symbol%': hasSymbols$
|
|
523
|
-
'%SyntaxError%': $SyntaxError$
|
|
882
|
+
'%StringIteratorPrototype%': hasSymbols$3 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
|
|
883
|
+
'%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
|
|
884
|
+
'%SyntaxError%': $SyntaxError$1,
|
|
524
885
|
'%ThrowTypeError%': ThrowTypeError,
|
|
525
886
|
'%TypedArray%': TypedArray,
|
|
526
|
-
'%TypeError%': $TypeError$
|
|
887
|
+
'%TypeError%': $TypeError$8,
|
|
527
888
|
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
528
889
|
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
529
890
|
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
@@ -531,7 +892,20 @@
|
|
|
531
892
|
'%URIError%': $URIError,
|
|
532
893
|
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
533
894
|
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
534
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
895
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
|
|
896
|
+
|
|
897
|
+
'%Function.prototype.call%': $call,
|
|
898
|
+
'%Function.prototype.apply%': $apply,
|
|
899
|
+
'%Object.defineProperty%': $defineProperty,
|
|
900
|
+
'%Object.getPrototypeOf%': $ObjectGPO,
|
|
901
|
+
'%Math.abs%': abs,
|
|
902
|
+
'%Math.floor%': floor,
|
|
903
|
+
'%Math.max%': max,
|
|
904
|
+
'%Math.min%': min,
|
|
905
|
+
'%Math.pow%': pow,
|
|
906
|
+
'%Math.round%': round,
|
|
907
|
+
'%Math.sign%': sign,
|
|
908
|
+
'%Reflect.getPrototypeOf%': $ReflectGPO
|
|
535
909
|
};
|
|
536
910
|
|
|
537
911
|
if (getProto$1) {
|
|
@@ -624,13 +998,13 @@
|
|
|
624
998
|
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
625
999
|
};
|
|
626
1000
|
|
|
627
|
-
var bind =
|
|
628
|
-
var hasOwn$2 =
|
|
629
|
-
var $concat$1 = bind.call(
|
|
630
|
-
var $spliceApply = bind.call(
|
|
631
|
-
var $replace$1 = bind.call(
|
|
632
|
-
var $strSlice = bind.call(
|
|
633
|
-
var $exec$1 = bind.call(
|
|
1001
|
+
var bind = requireFunctionBind();
|
|
1002
|
+
var hasOwn$2 = requireHasown();
|
|
1003
|
+
var $concat$1 = bind.call($call, Array.prototype.concat);
|
|
1004
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
1005
|
+
var $replace$1 = bind.call($call, String.prototype.replace);
|
|
1006
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
1007
|
+
var $exec$1 = bind.call($call, RegExp.prototype.exec);
|
|
634
1008
|
|
|
635
1009
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
636
1010
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -639,9 +1013,9 @@
|
|
|
639
1013
|
var first = $strSlice(string, 0, 1);
|
|
640
1014
|
var last = $strSlice(string, -1);
|
|
641
1015
|
if (first === '%' && last !== '%') {
|
|
642
|
-
throw new $SyntaxError$
|
|
1016
|
+
throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
|
|
643
1017
|
} else if (last === '%' && first !== '%') {
|
|
644
|
-
throw new $SyntaxError$
|
|
1018
|
+
throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
|
|
645
1019
|
}
|
|
646
1020
|
var result = [];
|
|
647
1021
|
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
@@ -665,7 +1039,7 @@
|
|
|
665
1039
|
value = doEval(intrinsicName);
|
|
666
1040
|
}
|
|
667
1041
|
if (typeof value === 'undefined' && !allowMissing) {
|
|
668
|
-
throw new $TypeError$
|
|
1042
|
+
throw new $TypeError$8('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
669
1043
|
}
|
|
670
1044
|
|
|
671
1045
|
return {
|
|
@@ -675,19 +1049,19 @@
|
|
|
675
1049
|
};
|
|
676
1050
|
}
|
|
677
1051
|
|
|
678
|
-
throw new $SyntaxError$
|
|
1052
|
+
throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
|
|
679
1053
|
};
|
|
680
1054
|
|
|
681
1055
|
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
682
1056
|
if (typeof name !== 'string' || name.length === 0) {
|
|
683
|
-
throw new $TypeError$
|
|
1057
|
+
throw new $TypeError$8('intrinsic name must be a non-empty string');
|
|
684
1058
|
}
|
|
685
1059
|
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
686
|
-
throw new $TypeError$
|
|
1060
|
+
throw new $TypeError$8('"allowMissing" argument must be a boolean');
|
|
687
1061
|
}
|
|
688
1062
|
|
|
689
1063
|
if ($exec$1(/^%?[^%]*%?$/, name) === null) {
|
|
690
|
-
throw new $SyntaxError$
|
|
1064
|
+
throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
691
1065
|
}
|
|
692
1066
|
var parts = stringToPath(name);
|
|
693
1067
|
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
@@ -714,7 +1088,7 @@
|
|
|
714
1088
|
)
|
|
715
1089
|
&& first !== last
|
|
716
1090
|
) {
|
|
717
|
-
throw new $SyntaxError$
|
|
1091
|
+
throw new $SyntaxError$1('property names with quotes must have matching quotes');
|
|
718
1092
|
}
|
|
719
1093
|
if (part === 'constructor' || !isOwn) {
|
|
720
1094
|
skipFurtherCaching = true;
|
|
@@ -728,12 +1102,12 @@
|
|
|
728
1102
|
} else if (value != null) {
|
|
729
1103
|
if (!(part in value)) {
|
|
730
1104
|
if (!allowMissing) {
|
|
731
|
-
throw new $TypeError$
|
|
1105
|
+
throw new $TypeError$8('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
732
1106
|
}
|
|
733
|
-
return void
|
|
1107
|
+
return void 0;
|
|
734
1108
|
}
|
|
735
|
-
if ($gOPD$
|
|
736
|
-
var desc = $gOPD$
|
|
1109
|
+
if ($gOPD$1 && (i + 1) >= parts.length) {
|
|
1110
|
+
var desc = $gOPD$1(value, part);
|
|
737
1111
|
isOwn = !!desc;
|
|
738
1112
|
|
|
739
1113
|
// By convention, when a data property is converted to an accessor
|
|
@@ -761,184 +1135,21 @@
|
|
|
761
1135
|
return value;
|
|
762
1136
|
};
|
|
763
1137
|
|
|
764
|
-
var
|
|
765
|
-
var hasRequiredEsDefineProperty;
|
|
766
|
-
|
|
767
|
-
function requireEsDefineProperty () {
|
|
768
|
-
if (hasRequiredEsDefineProperty) return esDefineProperty;
|
|
769
|
-
hasRequiredEsDefineProperty = 1;
|
|
770
|
-
|
|
771
|
-
var GetIntrinsic = getIntrinsic;
|
|
772
|
-
|
|
773
|
-
/** @type {import('.')} */
|
|
774
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
|
|
775
|
-
if ($defineProperty) {
|
|
776
|
-
try {
|
|
777
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
778
|
-
} catch (e) {
|
|
779
|
-
// IE 8 has a broken defineProperty
|
|
780
|
-
$defineProperty = false;
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
esDefineProperty = $defineProperty;
|
|
785
|
-
return esDefineProperty;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
var GetIntrinsic$7 = getIntrinsic;
|
|
789
|
-
|
|
790
|
-
var $gOPD$1 = GetIntrinsic$7('%Object.getOwnPropertyDescriptor%', true);
|
|
791
|
-
|
|
792
|
-
if ($gOPD$1) {
|
|
793
|
-
try {
|
|
794
|
-
$gOPD$1([], 'length');
|
|
795
|
-
} catch (e) {
|
|
796
|
-
// IE 8 has a broken gOPD
|
|
797
|
-
$gOPD$1 = null;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
var gopd$1 = $gOPD$1;
|
|
802
|
-
|
|
803
|
-
var $defineProperty$1 = requireEsDefineProperty();
|
|
804
|
-
|
|
805
|
-
var $SyntaxError$1 = syntax;
|
|
806
|
-
var $TypeError$5 = type;
|
|
807
|
-
|
|
808
|
-
var gopd = gopd$1;
|
|
809
|
-
|
|
810
|
-
/** @type {import('.')} */
|
|
811
|
-
var defineDataProperty$1 = function defineDataProperty(
|
|
812
|
-
obj,
|
|
813
|
-
property,
|
|
814
|
-
value
|
|
815
|
-
) {
|
|
816
|
-
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
817
|
-
throw new $TypeError$5('`obj` must be an object or a function`');
|
|
818
|
-
}
|
|
819
|
-
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
820
|
-
throw new $TypeError$5('`property` must be a string or a symbol`');
|
|
821
|
-
}
|
|
822
|
-
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
823
|
-
throw new $TypeError$5('`nonEnumerable`, if provided, must be a boolean or null');
|
|
824
|
-
}
|
|
825
|
-
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
826
|
-
throw new $TypeError$5('`nonWritable`, if provided, must be a boolean or null');
|
|
827
|
-
}
|
|
828
|
-
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
829
|
-
throw new $TypeError$5('`nonConfigurable`, if provided, must be a boolean or null');
|
|
830
|
-
}
|
|
831
|
-
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
832
|
-
throw new $TypeError$5('`loose`, if provided, must be a boolean');
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
836
|
-
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
837
|
-
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
838
|
-
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
839
|
-
|
|
840
|
-
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
841
|
-
var desc = !!gopd && gopd(obj, property);
|
|
842
|
-
|
|
843
|
-
if ($defineProperty$1) {
|
|
844
|
-
$defineProperty$1(obj, property, {
|
|
845
|
-
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
846
|
-
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
847
|
-
value: value,
|
|
848
|
-
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
849
|
-
});
|
|
850
|
-
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
851
|
-
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
852
|
-
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
853
|
-
} else {
|
|
854
|
-
throw new $SyntaxError$1('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
855
|
-
}
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
var $defineProperty = requireEsDefineProperty();
|
|
859
|
-
|
|
860
|
-
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
861
|
-
return !!$defineProperty;
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
865
|
-
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
866
|
-
if (!$defineProperty) {
|
|
867
|
-
return null;
|
|
868
|
-
}
|
|
869
|
-
try {
|
|
870
|
-
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
871
|
-
} catch (e) {
|
|
872
|
-
// In Firefox 4-22, defining length on an array throws an exception.
|
|
873
|
-
return true;
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
|
|
877
|
-
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
878
|
-
|
|
879
|
-
var keys = objectKeys$2;
|
|
880
|
-
var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
881
|
-
|
|
882
|
-
var toStr$7 = Object.prototype.toString;
|
|
883
|
-
var concat = Array.prototype.concat;
|
|
884
|
-
var defineDataProperty = defineDataProperty$1;
|
|
885
|
-
|
|
886
|
-
var isFunction = function (fn) {
|
|
887
|
-
return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
|
|
888
|
-
};
|
|
889
|
-
|
|
890
|
-
var supportsDescriptors$2 = hasPropertyDescriptors_1();
|
|
891
|
-
|
|
892
|
-
var defineProperty$1 = function (object, name, value, predicate) {
|
|
893
|
-
if (name in object) {
|
|
894
|
-
if (predicate === true) {
|
|
895
|
-
if (object[name] === value) {
|
|
896
|
-
return;
|
|
897
|
-
}
|
|
898
|
-
} else if (!isFunction(predicate) || !predicate()) {
|
|
899
|
-
return;
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
if (supportsDescriptors$2) {
|
|
904
|
-
defineDataProperty(object, name, value, true);
|
|
905
|
-
} else {
|
|
906
|
-
defineDataProperty(object, name, value);
|
|
907
|
-
}
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
var defineProperties$1 = function (object, map) {
|
|
911
|
-
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
912
|
-
var props = keys(map);
|
|
913
|
-
if (hasSymbols$3) {
|
|
914
|
-
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
915
|
-
}
|
|
916
|
-
for (var i = 0; i < props.length; i += 1) {
|
|
917
|
-
defineProperty$1(object, props[i], map[props[i]], predicates[props[i]]);
|
|
918
|
-
}
|
|
919
|
-
};
|
|
920
|
-
|
|
921
|
-
defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
|
|
922
|
-
|
|
923
|
-
var defineProperties_1 = defineProperties$1;
|
|
924
|
-
|
|
925
|
-
var callBind$6 = {exports: {}};
|
|
926
|
-
|
|
927
|
-
var GetIntrinsic$6 = getIntrinsic;
|
|
1138
|
+
var GetIntrinsic$8 = getIntrinsic;
|
|
928
1139
|
var define$5 = defineDataProperty$1;
|
|
929
1140
|
var hasDescriptors$1 = hasPropertyDescriptors_1();
|
|
930
1141
|
var gOPD$4 = gopd$1;
|
|
931
1142
|
|
|
932
|
-
var $TypeError$
|
|
933
|
-
var $floor$1 = GetIntrinsic$
|
|
1143
|
+
var $TypeError$7 = type;
|
|
1144
|
+
var $floor$1 = GetIntrinsic$8('%Math.floor%');
|
|
934
1145
|
|
|
935
1146
|
/** @type {import('.')} */
|
|
936
1147
|
var setFunctionLength = function setFunctionLength(fn, length) {
|
|
937
1148
|
if (typeof fn !== 'function') {
|
|
938
|
-
throw new $TypeError$
|
|
1149
|
+
throw new $TypeError$7('`fn` is not a function');
|
|
939
1150
|
}
|
|
940
1151
|
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
|
|
941
|
-
throw new $TypeError$
|
|
1152
|
+
throw new $TypeError$7('`length` must be a positive 32-bit integer');
|
|
942
1153
|
}
|
|
943
1154
|
|
|
944
1155
|
var loose = arguments.length > 2 && !!arguments[2];
|
|
@@ -967,7 +1178,7 @@
|
|
|
967
1178
|
|
|
968
1179
|
(function (module) {
|
|
969
1180
|
|
|
970
|
-
var bind =
|
|
1181
|
+
var bind = requireFunctionBind();
|
|
971
1182
|
var GetIntrinsic = getIntrinsic;
|
|
972
1183
|
var setFunctionLength$1 = setFunctionLength;
|
|
973
1184
|
|
|
@@ -976,7 +1187,7 @@
|
|
|
976
1187
|
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
977
1188
|
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
978
1189
|
|
|
979
|
-
var $defineProperty =
|
|
1190
|
+
var $defineProperty = esDefineProperty;
|
|
980
1191
|
var $max = GetIntrinsic('%Math.max%');
|
|
981
1192
|
|
|
982
1193
|
module.exports = function callBind(originalFunction) {
|
|
@@ -1004,15 +1215,15 @@
|
|
|
1004
1215
|
|
|
1005
1216
|
var callBindExports = callBind$6.exports;
|
|
1006
1217
|
|
|
1007
|
-
var GetIntrinsic$
|
|
1218
|
+
var GetIntrinsic$7 = getIntrinsic;
|
|
1008
1219
|
|
|
1009
1220
|
var callBind$5 = callBindExports;
|
|
1010
1221
|
|
|
1011
|
-
var $indexOf$
|
|
1222
|
+
var $indexOf$2 = callBind$5(GetIntrinsic$7('String.prototype.indexOf'));
|
|
1012
1223
|
|
|
1013
|
-
var callBound$
|
|
1014
|
-
var intrinsic = GetIntrinsic$
|
|
1015
|
-
if (typeof intrinsic === 'function' && $indexOf$
|
|
1224
|
+
var callBound$e = function callBoundIntrinsic(name, allowMissing) {
|
|
1225
|
+
var intrinsic = GetIntrinsic$7(name, !!allowMissing);
|
|
1226
|
+
if (typeof intrinsic === 'function' && $indexOf$2(name, '.prototype.') > -1) {
|
|
1016
1227
|
return callBind$5(intrinsic);
|
|
1017
1228
|
}
|
|
1018
1229
|
return intrinsic;
|
|
@@ -1021,10 +1232,10 @@
|
|
|
1021
1232
|
// modified from https://github.com/es-shims/es6-shim
|
|
1022
1233
|
var objectKeys$1 = objectKeys$2;
|
|
1023
1234
|
var hasSymbols$2 = requireShams()();
|
|
1024
|
-
var callBound$
|
|
1235
|
+
var callBound$d = callBound$e;
|
|
1025
1236
|
var toObject = Object;
|
|
1026
|
-
var $push = callBound$
|
|
1027
|
-
var $propIsEnumerable = callBound$
|
|
1237
|
+
var $push = callBound$d('Array.prototype.push');
|
|
1238
|
+
var $propIsEnumerable = callBound$d('Object.prototype.propertyIsEnumerable');
|
|
1028
1239
|
var originalGetSymbols = hasSymbols$2 ? Object.getOwnPropertySymbols : null;
|
|
1029
1240
|
|
|
1030
1241
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -1185,12 +1396,12 @@
|
|
|
1185
1396
|
var hasDescriptors = hasPropertyDescriptors_1();
|
|
1186
1397
|
var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
|
|
1187
1398
|
|
|
1188
|
-
var $TypeError$
|
|
1399
|
+
var $TypeError$6 = type;
|
|
1189
1400
|
|
|
1190
1401
|
/** @type {import('.')} */
|
|
1191
1402
|
var setFunctionName$1 = function setFunctionName(fn, name) {
|
|
1192
1403
|
if (typeof fn !== 'function') {
|
|
1193
|
-
throw new $TypeError$
|
|
1404
|
+
throw new $TypeError$6('`fn` is not a function');
|
|
1194
1405
|
}
|
|
1195
1406
|
var loose = arguments.length > 2 && !!arguments[2];
|
|
1196
1407
|
if (!loose || functionsHaveConfigurableNames) {
|
|
@@ -1204,13 +1415,13 @@
|
|
|
1204
1415
|
};
|
|
1205
1416
|
|
|
1206
1417
|
var setFunctionName = setFunctionName$1;
|
|
1207
|
-
var $TypeError$
|
|
1418
|
+
var $TypeError$5 = type;
|
|
1208
1419
|
|
|
1209
1420
|
var $Object = Object;
|
|
1210
1421
|
|
|
1211
1422
|
var implementation$5 = setFunctionName(function flags() {
|
|
1212
1423
|
if (this == null || this !== $Object(this)) {
|
|
1213
|
-
throw new $TypeError$
|
|
1424
|
+
throw new $TypeError$5('RegExp.prototype.flags getter called on non-object');
|
|
1214
1425
|
}
|
|
1215
1426
|
var result = '';
|
|
1216
1427
|
if (this.hasIndices) {
|
|
@@ -1327,9 +1538,9 @@
|
|
|
1327
1538
|
};
|
|
1328
1539
|
|
|
1329
1540
|
var hasToStringTag$7 = shams();
|
|
1330
|
-
var callBound$
|
|
1541
|
+
var callBound$c = callBound$e;
|
|
1331
1542
|
|
|
1332
|
-
var $toString$4 = callBound$
|
|
1543
|
+
var $toString$4 = callBound$c('Object.prototype.toString');
|
|
1333
1544
|
|
|
1334
1545
|
var isStandardArguments = function isArguments(value) {
|
|
1335
1546
|
if (hasToStringTag$7 && value && typeof value === 'object' && Symbol.toStringTag in value) {
|
|
@@ -1417,7 +1628,7 @@
|
|
|
1417
1628
|
num === Infinity
|
|
1418
1629
|
|| num === -Infinity
|
|
1419
1630
|
|| num !== num
|
|
1420
|
-
|| (num && num > -
|
|
1631
|
+
|| (num && num > -1e3 && num < 1000)
|
|
1421
1632
|
|| $test.call(/e/, str)
|
|
1422
1633
|
) {
|
|
1423
1634
|
return str;
|
|
@@ -1438,10 +1649,21 @@
|
|
|
1438
1649
|
var inspectCustom = utilInspect.custom;
|
|
1439
1650
|
var inspectSymbol = isSymbol$2(inspectCustom) ? inspectCustom : null;
|
|
1440
1651
|
|
|
1652
|
+
var quotes = {
|
|
1653
|
+
__proto__: null,
|
|
1654
|
+
'double': '"',
|
|
1655
|
+
single: "'"
|
|
1656
|
+
};
|
|
1657
|
+
var quoteREs = {
|
|
1658
|
+
__proto__: null,
|
|
1659
|
+
'double': /(["\\])/g,
|
|
1660
|
+
single: /(['\\])/g
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1441
1663
|
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
1442
1664
|
var opts = options || {};
|
|
1443
1665
|
|
|
1444
|
-
if (has$1(opts, 'quoteStyle') && (
|
|
1666
|
+
if (has$1(opts, 'quoteStyle') && !has$1(quotes, opts.quoteStyle)) {
|
|
1445
1667
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
1446
1668
|
}
|
|
1447
1669
|
if (
|
|
@@ -1613,7 +1835,10 @@
|
|
|
1613
1835
|
if (typeof window !== 'undefined' && obj === window) {
|
|
1614
1836
|
return '{ [object Window] }';
|
|
1615
1837
|
}
|
|
1616
|
-
if (
|
|
1838
|
+
if (
|
|
1839
|
+
(typeof globalThis !== 'undefined' && obj === globalThis)
|
|
1840
|
+
|| (typeof commonjsGlobal !== 'undefined' && obj === commonjsGlobal)
|
|
1841
|
+
) {
|
|
1617
1842
|
return '{ [object globalThis] }';
|
|
1618
1843
|
}
|
|
1619
1844
|
if (!isDate$1(obj) && !isRegExp(obj)) {
|
|
@@ -1633,7 +1858,8 @@
|
|
|
1633
1858
|
};
|
|
1634
1859
|
|
|
1635
1860
|
function wrapQuotes(s, defaultStyle, opts) {
|
|
1636
|
-
var
|
|
1861
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
1862
|
+
var quoteChar = quotes[style];
|
|
1637
1863
|
return quoteChar + s + quoteChar;
|
|
1638
1864
|
}
|
|
1639
1865
|
|
|
@@ -1791,8 +2017,10 @@
|
|
|
1791
2017
|
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
1792
2018
|
return inspectString($slice$1.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
1793
2019
|
}
|
|
2020
|
+
var quoteRE = quoteREs[opts.quoteStyle || 'single'];
|
|
2021
|
+
quoteRE.lastIndex = 0;
|
|
1794
2022
|
// eslint-disable-next-line no-control-regex
|
|
1795
|
-
var s = $replace.call($replace.call(str,
|
|
2023
|
+
var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
1796
2024
|
return wrapQuotes(s, 'single', opts);
|
|
1797
2025
|
}
|
|
1798
2026
|
|
|
@@ -1892,135 +2120,328 @@
|
|
|
1892
2120
|
return xs;
|
|
1893
2121
|
}
|
|
1894
2122
|
|
|
1895
|
-
var
|
|
1896
|
-
var callBound$9 = callBound$c;
|
|
1897
|
-
var inspect = objectInspect;
|
|
1898
|
-
|
|
1899
|
-
var $TypeError$1 = type;
|
|
1900
|
-
var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
|
|
1901
|
-
var $Map$3 = GetIntrinsic$4('%Map%', true);
|
|
2123
|
+
var inspect$3 = objectInspect;
|
|
1902
2124
|
|
|
1903
|
-
var $
|
|
1904
|
-
var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
|
|
1905
|
-
var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
|
|
1906
|
-
var $mapGet$1 = callBound$9('Map.prototype.get', true);
|
|
1907
|
-
var $mapSet = callBound$9('Map.prototype.set', true);
|
|
1908
|
-
var $mapHas$5 = callBound$9('Map.prototype.has', true);
|
|
2125
|
+
var $TypeError$4 = type;
|
|
1909
2126
|
|
|
1910
2127
|
/*
|
|
1911
2128
|
* This function traverses the list returning the node corresponding to the given key.
|
|
1912
2129
|
*
|
|
1913
|
-
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
|
|
2130
|
+
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
|
|
2131
|
+
* By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
1914
2132
|
*/
|
|
1915
|
-
/** @type {import('.').listGetNode} */
|
|
1916
|
-
|
|
2133
|
+
/** @type {import('./list.d.ts').listGetNode} */
|
|
2134
|
+
// eslint-disable-next-line consistent-return
|
|
2135
|
+
var listGetNode = function (list, key, isDelete) {
|
|
1917
2136
|
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
1918
2137
|
var prev = list;
|
|
1919
2138
|
/** @type {(typeof list)['next']} */
|
|
1920
2139
|
var curr;
|
|
1921
|
-
|
|
2140
|
+
// eslint-disable-next-line eqeqeq
|
|
2141
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
|
1922
2142
|
if (curr.key === key) {
|
|
1923
2143
|
prev.next = curr.next;
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
2144
|
+
if (!isDelete) {
|
|
2145
|
+
// eslint-disable-next-line no-extra-parens
|
|
2146
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
|
|
2147
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
2148
|
+
}
|
|
1927
2149
|
return curr;
|
|
1928
2150
|
}
|
|
1929
2151
|
}
|
|
1930
2152
|
};
|
|
1931
2153
|
|
|
1932
|
-
/** @type {import('.').listGet} */
|
|
2154
|
+
/** @type {import('./list.d.ts').listGet} */
|
|
1933
2155
|
var listGet = function (objects, key) {
|
|
2156
|
+
if (!objects) {
|
|
2157
|
+
return void 0;
|
|
2158
|
+
}
|
|
1934
2159
|
var node = listGetNode(objects, key);
|
|
1935
2160
|
return node && node.value;
|
|
1936
2161
|
};
|
|
1937
|
-
/** @type {import('.').listSet} */
|
|
2162
|
+
/** @type {import('./list.d.ts').listSet} */
|
|
1938
2163
|
var listSet = function (objects, key, value) {
|
|
1939
2164
|
var node = listGetNode(objects, key);
|
|
1940
2165
|
if (node) {
|
|
1941
2166
|
node.value = value;
|
|
1942
2167
|
} else {
|
|
1943
2168
|
// Prepend the new node to the beginning of the list
|
|
1944
|
-
objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
2169
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
1945
2170
|
key: key,
|
|
1946
2171
|
next: objects.next,
|
|
1947
2172
|
value: value
|
|
1948
2173
|
});
|
|
1949
2174
|
}
|
|
1950
2175
|
};
|
|
1951
|
-
/** @type {import('.').listHas} */
|
|
2176
|
+
/** @type {import('./list.d.ts').listHas} */
|
|
1952
2177
|
var listHas = function (objects, key) {
|
|
2178
|
+
if (!objects) {
|
|
2179
|
+
return false;
|
|
2180
|
+
}
|
|
1953
2181
|
return !!listGetNode(objects, key);
|
|
1954
2182
|
};
|
|
2183
|
+
/** @type {import('./list.d.ts').listDelete} */
|
|
2184
|
+
// eslint-disable-next-line consistent-return
|
|
2185
|
+
var listDelete = function (objects, key) {
|
|
2186
|
+
if (objects) {
|
|
2187
|
+
return listGetNode(objects, key, true);
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
|
|
2191
|
+
/** @type {import('.')} */
|
|
2192
|
+
var sideChannelList = function getSideChannelList() {
|
|
2193
|
+
/** @typedef {ReturnType<typeof getSideChannelList>} Channel */
|
|
2194
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
2195
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
2196
|
+
|
|
2197
|
+
/** @type {import('./list.d.ts').RootNode<V, K> | undefined} */ var $o;
|
|
2198
|
+
|
|
2199
|
+
/** @type {Channel} */
|
|
2200
|
+
var channel = {
|
|
2201
|
+
assert: function (key) {
|
|
2202
|
+
if (!channel.has(key)) {
|
|
2203
|
+
throw new $TypeError$4('Side channel does not contain ' + inspect$3(key));
|
|
2204
|
+
}
|
|
2205
|
+
},
|
|
2206
|
+
'delete': function (key) {
|
|
2207
|
+
var root = $o && $o.next;
|
|
2208
|
+
var deletedNode = listDelete($o, key);
|
|
2209
|
+
if (deletedNode && root && root === deletedNode) {
|
|
2210
|
+
$o = void 0;
|
|
2211
|
+
}
|
|
2212
|
+
return !!deletedNode;
|
|
2213
|
+
},
|
|
2214
|
+
get: function (key) {
|
|
2215
|
+
return listGet($o, key);
|
|
2216
|
+
},
|
|
2217
|
+
has: function (key) {
|
|
2218
|
+
return listHas($o, key);
|
|
2219
|
+
},
|
|
2220
|
+
set: function (key, value) {
|
|
2221
|
+
if (!$o) {
|
|
2222
|
+
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
2223
|
+
$o = {
|
|
2224
|
+
next: void 0
|
|
2225
|
+
};
|
|
2226
|
+
}
|
|
2227
|
+
// eslint-disable-next-line no-extra-parens
|
|
2228
|
+
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
2232
|
+
return channel;
|
|
2233
|
+
};
|
|
2234
|
+
|
|
2235
|
+
var GetIntrinsic$6 = getIntrinsic;
|
|
2236
|
+
|
|
2237
|
+
var callBindBasic = callBindApplyHelpers;
|
|
2238
|
+
|
|
2239
|
+
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
|
2240
|
+
var $indexOf$1 = callBindBasic([GetIntrinsic$6('%String.prototype.indexOf%')]);
|
|
2241
|
+
|
|
2242
|
+
/** @type {import('.')} */
|
|
2243
|
+
var callBound$b = function callBoundIntrinsic(name, allowMissing) {
|
|
2244
|
+
// eslint-disable-next-line no-extra-parens
|
|
2245
|
+
var intrinsic = /** @type {Parameters<typeof callBindBasic>[0][0]} */ (GetIntrinsic$6(name, !!allowMissing));
|
|
2246
|
+
if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
|
|
2247
|
+
return callBindBasic([intrinsic]);
|
|
2248
|
+
}
|
|
2249
|
+
return intrinsic;
|
|
2250
|
+
};
|
|
2251
|
+
|
|
2252
|
+
var GetIntrinsic$5 = getIntrinsic;
|
|
2253
|
+
var callBound$a = callBound$b;
|
|
2254
|
+
var inspect$2 = objectInspect;
|
|
2255
|
+
|
|
2256
|
+
var $TypeError$3 = type;
|
|
2257
|
+
var $Map$3 = GetIntrinsic$5('%Map%', true);
|
|
2258
|
+
|
|
2259
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
|
|
2260
|
+
var $mapGet$1 = callBound$a('Map.prototype.get', true);
|
|
2261
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
|
|
2262
|
+
var $mapSet = callBound$a('Map.prototype.set', true);
|
|
2263
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
2264
|
+
var $mapHas$5 = callBound$a('Map.prototype.has', true);
|
|
2265
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
2266
|
+
var $mapDelete = callBound$a('Map.prototype.delete', true);
|
|
2267
|
+
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
|
|
2268
|
+
var $mapSize$1 = callBound$a('Map.prototype.size', true);
|
|
2269
|
+
|
|
2270
|
+
/** @type {import('.')} */
|
|
2271
|
+
var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
|
|
2272
|
+
/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
|
|
2273
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
2274
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
2275
|
+
|
|
2276
|
+
/** @type {Map<K, V> | undefined} */ var $m;
|
|
2277
|
+
|
|
2278
|
+
/** @type {Channel} */
|
|
2279
|
+
var channel = {
|
|
2280
|
+
assert: function (key) {
|
|
2281
|
+
if (!channel.has(key)) {
|
|
2282
|
+
throw new $TypeError$3('Side channel does not contain ' + inspect$2(key));
|
|
2283
|
+
}
|
|
2284
|
+
},
|
|
2285
|
+
'delete': function (key) {
|
|
2286
|
+
if ($m) {
|
|
2287
|
+
var result = $mapDelete($m, key);
|
|
2288
|
+
if ($mapSize$1($m) === 0) {
|
|
2289
|
+
$m = void 0;
|
|
2290
|
+
}
|
|
2291
|
+
return result;
|
|
2292
|
+
}
|
|
2293
|
+
return false;
|
|
2294
|
+
},
|
|
2295
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
2296
|
+
if ($m) {
|
|
2297
|
+
return $mapGet$1($m, key);
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2300
|
+
has: function (key) {
|
|
2301
|
+
if ($m) {
|
|
2302
|
+
return $mapHas$5($m, key);
|
|
2303
|
+
}
|
|
2304
|
+
return false;
|
|
2305
|
+
},
|
|
2306
|
+
set: function (key, value) {
|
|
2307
|
+
if (!$m) {
|
|
2308
|
+
// @ts-expect-error TS can't handle narrowing a variable inside a closure
|
|
2309
|
+
$m = new $Map$3();
|
|
2310
|
+
}
|
|
2311
|
+
$mapSet($m, key, value);
|
|
2312
|
+
}
|
|
2313
|
+
};
|
|
2314
|
+
|
|
2315
|
+
// @ts-expect-error TODO: figure out why TS is erroring here
|
|
2316
|
+
return channel;
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
var GetIntrinsic$4 = getIntrinsic;
|
|
2320
|
+
var callBound$9 = callBound$b;
|
|
2321
|
+
var inspect$1 = objectInspect;
|
|
2322
|
+
var getSideChannelMap$1 = sideChannelMap;
|
|
2323
|
+
|
|
2324
|
+
var $TypeError$2 = type;
|
|
2325
|
+
var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
|
|
2326
|
+
|
|
2327
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
|
|
2328
|
+
var $weakMapGet = callBound$9('WeakMap.prototype.get', true);
|
|
2329
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
|
|
2330
|
+
var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
|
|
2331
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
2332
|
+
var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
|
|
2333
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
2334
|
+
var $weakMapDelete = callBound$9('WeakMap.prototype.delete', true);
|
|
2335
|
+
|
|
2336
|
+
/** @type {import('.')} */
|
|
2337
|
+
var sideChannelWeakmap = $WeakMap$1
|
|
2338
|
+
? /** @type {Exclude<import('.'), false>} */ function getSideChannelWeakMap() {
|
|
2339
|
+
/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
|
|
2340
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
2341
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
2342
|
+
|
|
2343
|
+
/** @type {WeakMap<K & object, V> | undefined} */ var $wm;
|
|
2344
|
+
/** @type {Channel | undefined} */ var $m;
|
|
2345
|
+
|
|
2346
|
+
/** @type {Channel} */
|
|
2347
|
+
var channel = {
|
|
2348
|
+
assert: function (key) {
|
|
2349
|
+
if (!channel.has(key)) {
|
|
2350
|
+
throw new $TypeError$2('Side channel does not contain ' + inspect$1(key));
|
|
2351
|
+
}
|
|
2352
|
+
},
|
|
2353
|
+
'delete': function (key) {
|
|
2354
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2355
|
+
if ($wm) {
|
|
2356
|
+
return $weakMapDelete($wm, key);
|
|
2357
|
+
}
|
|
2358
|
+
} else if (getSideChannelMap$1) {
|
|
2359
|
+
if ($m) {
|
|
2360
|
+
return $m['delete'](key);
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
return false;
|
|
2364
|
+
},
|
|
2365
|
+
get: function (key) {
|
|
2366
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2367
|
+
if ($wm) {
|
|
2368
|
+
return $weakMapGet($wm, key);
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
return $m && $m.get(key);
|
|
2372
|
+
},
|
|
2373
|
+
has: function (key) {
|
|
2374
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2375
|
+
if ($wm) {
|
|
2376
|
+
return $weakMapHas($wm, key);
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
return !!$m && $m.has(key);
|
|
2380
|
+
},
|
|
2381
|
+
set: function (key, value) {
|
|
2382
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2383
|
+
if (!$wm) {
|
|
2384
|
+
$wm = new $WeakMap$1();
|
|
2385
|
+
}
|
|
2386
|
+
$weakMapSet($wm, key, value);
|
|
2387
|
+
} else if (getSideChannelMap$1) {
|
|
2388
|
+
if (!$m) {
|
|
2389
|
+
$m = getSideChannelMap$1();
|
|
2390
|
+
}
|
|
2391
|
+
// eslint-disable-next-line no-extra-parens
|
|
2392
|
+
/** @type {NonNullable<typeof $m>} */ ($m).set(key, value);
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
};
|
|
2396
|
+
|
|
2397
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
2398
|
+
return channel;
|
|
2399
|
+
}
|
|
2400
|
+
: getSideChannelMap$1;
|
|
2401
|
+
|
|
2402
|
+
var $TypeError$1 = type;
|
|
2403
|
+
var inspect = objectInspect;
|
|
2404
|
+
var getSideChannelList = sideChannelList;
|
|
2405
|
+
var getSideChannelMap = sideChannelMap;
|
|
2406
|
+
var getSideChannelWeakMap = sideChannelWeakmap;
|
|
2407
|
+
|
|
2408
|
+
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
1955
2409
|
|
|
1956
2410
|
/** @type {import('.')} */
|
|
1957
2411
|
var sideChannel = function getSideChannel() {
|
|
1958
|
-
/** @
|
|
1959
|
-
|
|
1960
|
-
/** @type {
|
|
2412
|
+
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
|
|
2413
|
+
|
|
2414
|
+
/** @type {Channel | undefined} */ var $channelData;
|
|
1961
2415
|
|
|
1962
|
-
/** @type {
|
|
2416
|
+
/** @type {Channel} */
|
|
1963
2417
|
var channel = {
|
|
1964
2418
|
assert: function (key) {
|
|
1965
2419
|
if (!channel.has(key)) {
|
|
1966
2420
|
throw new $TypeError$1('Side channel does not contain ' + inspect(key));
|
|
1967
2421
|
}
|
|
1968
2422
|
},
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
} else if ($Map$3) {
|
|
1975
|
-
if ($m) {
|
|
1976
|
-
return $mapGet$1($m, key);
|
|
1977
|
-
}
|
|
1978
|
-
} else {
|
|
1979
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
1980
|
-
return listGet($o, key);
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
2423
|
+
'delete': function (key) {
|
|
2424
|
+
return !!$channelData && $channelData['delete'](key);
|
|
2425
|
+
},
|
|
2426
|
+
get: function (key) {
|
|
2427
|
+
return $channelData && $channelData.get(key);
|
|
1983
2428
|
},
|
|
1984
2429
|
has: function (key) {
|
|
1985
|
-
|
|
1986
|
-
if ($wm) {
|
|
1987
|
-
return $weakMapHas($wm, key);
|
|
1988
|
-
}
|
|
1989
|
-
} else if ($Map$3) {
|
|
1990
|
-
if ($m) {
|
|
1991
|
-
return $mapHas$5($m, key);
|
|
1992
|
-
}
|
|
1993
|
-
} else {
|
|
1994
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
1995
|
-
return listHas($o, key);
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
return false;
|
|
2430
|
+
return !!$channelData && $channelData.has(key);
|
|
1999
2431
|
},
|
|
2000
2432
|
set: function (key, value) {
|
|
2001
|
-
if (
|
|
2002
|
-
|
|
2003
|
-
$wm = new $WeakMap$1();
|
|
2004
|
-
}
|
|
2005
|
-
$weakMapSet($wm, key, value);
|
|
2006
|
-
} else if ($Map$3) {
|
|
2007
|
-
if (!$m) {
|
|
2008
|
-
$m = new $Map$3();
|
|
2009
|
-
}
|
|
2010
|
-
$mapSet($m, key, value);
|
|
2011
|
-
} else {
|
|
2012
|
-
if (!$o) {
|
|
2013
|
-
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
2014
|
-
$o = { key: {}, next: null };
|
|
2015
|
-
}
|
|
2016
|
-
listSet($o, key, value);
|
|
2433
|
+
if (!$channelData) {
|
|
2434
|
+
$channelData = makeChannel();
|
|
2017
2435
|
}
|
|
2436
|
+
|
|
2437
|
+
$channelData.set(key, value);
|
|
2018
2438
|
}
|
|
2019
2439
|
};
|
|
2440
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
2020
2441
|
return channel;
|
|
2021
2442
|
};
|
|
2022
2443
|
|
|
2023
|
-
var hasOwn =
|
|
2444
|
+
var hasOwn = requireHasown();
|
|
2024
2445
|
var channel = sideChannel();
|
|
2025
2446
|
|
|
2026
2447
|
var $TypeError = type;
|
|
@@ -2108,7 +2529,7 @@
|
|
|
2108
2529
|
}
|
|
2109
2530
|
return {
|
|
2110
2531
|
done: true,
|
|
2111
|
-
value: void
|
|
2532
|
+
value: void 0
|
|
2112
2533
|
};
|
|
2113
2534
|
}
|
|
2114
2535
|
}
|
|
@@ -2251,7 +2672,7 @@
|
|
|
2251
2672
|
var isArguments$1 = isArguments$2;
|
|
2252
2673
|
var getStopIterationIterator = stopIterationIterator;
|
|
2253
2674
|
|
|
2254
|
-
if (hasSymbols$
|
|
2675
|
+
if (hasSymbols$4() || requireShams()()) {
|
|
2255
2676
|
var $iterator = Symbol.iterator;
|
|
2256
2677
|
// Symbol is available natively or shammed
|
|
2257
2678
|
// natively:
|
|
@@ -2278,7 +2699,7 @@
|
|
|
2278
2699
|
var GetIntrinsic$3 = getIntrinsic;
|
|
2279
2700
|
var $Map = GetIntrinsic$3('%Map%', true);
|
|
2280
2701
|
var $Set$1 = GetIntrinsic$3('%Set%', true);
|
|
2281
|
-
var callBound$8 = callBound$
|
|
2702
|
+
var callBound$8 = callBound$e;
|
|
2282
2703
|
var $arrayPush = callBound$8('Array.prototype.push');
|
|
2283
2704
|
var $charCodeAt = callBound$8('String.prototype.charCodeAt');
|
|
2284
2705
|
var $stringSlice = callBound$8('String.prototype.slice');
|
|
@@ -2483,7 +2904,7 @@
|
|
|
2483
2904
|
var objectIs = polyfill;
|
|
2484
2905
|
|
|
2485
2906
|
var callBind$1 = callBindExports;
|
|
2486
|
-
var callBound$7 = callBound$
|
|
2907
|
+
var callBound$7 = callBound$e;
|
|
2487
2908
|
var GetIntrinsic$2 = getIntrinsic;
|
|
2488
2909
|
|
|
2489
2910
|
var $ArrayBuffer = GetIntrinsic$2('%ArrayBuffer%', true);
|
|
@@ -2544,7 +2965,7 @@
|
|
|
2544
2965
|
return hasToStringTag$5 ? tryDateObject(value) : toStr$4.call(value) === dateClass;
|
|
2545
2966
|
};
|
|
2546
2967
|
|
|
2547
|
-
var callBound$6 = callBound$
|
|
2968
|
+
var callBound$6 = callBound$e;
|
|
2548
2969
|
var hasToStringTag$4 = shams();
|
|
2549
2970
|
var has;
|
|
2550
2971
|
var $exec;
|
|
@@ -2601,7 +3022,7 @@
|
|
|
2601
3022
|
return $toString$2(value) === regexClass;
|
|
2602
3023
|
};
|
|
2603
3024
|
|
|
2604
|
-
var callBound$5 = callBound$
|
|
3025
|
+
var callBound$5 = callBound$e;
|
|
2605
3026
|
|
|
2606
3027
|
var $byteLength$1 = callBound$5('SharedArrayBuffer.prototype.byteLength', true);
|
|
2607
3028
|
|
|
@@ -2645,7 +3066,7 @@
|
|
|
2645
3066
|
return hasToStringTag$3 ? tryNumberObject(value) : toStr$3.call(value) === numClass;
|
|
2646
3067
|
};
|
|
2647
3068
|
|
|
2648
|
-
var callBound$4 = callBound$
|
|
3069
|
+
var callBound$4 = callBound$e;
|
|
2649
3070
|
var $boolToStr = callBound$4('Boolean.prototype.toString');
|
|
2650
3071
|
var $toString$1 = callBound$4('Object.prototype.toString');
|
|
2651
3072
|
|
|
@@ -2673,7 +3094,7 @@
|
|
|
2673
3094
|
var isSymbol$1 = {exports: {}};
|
|
2674
3095
|
|
|
2675
3096
|
var toStr$2 = Object.prototype.toString;
|
|
2676
|
-
var hasSymbols = hasSymbols$
|
|
3097
|
+
var hasSymbols = hasSymbols$4();
|
|
2677
3098
|
|
|
2678
3099
|
if (hasSymbols) {
|
|
2679
3100
|
var symToStr = Symbol.prototype.toString;
|
|
@@ -2835,7 +3256,7 @@
|
|
|
2835
3256
|
var isWeakset = {exports: {}};
|
|
2836
3257
|
|
|
2837
3258
|
var GetIntrinsic$1 = getIntrinsic;
|
|
2838
|
-
var callBound$3 = callBound$
|
|
3259
|
+
var callBound$3 = callBound$e;
|
|
2839
3260
|
|
|
2840
3261
|
var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
|
|
2841
3262
|
|
|
@@ -3093,7 +3514,7 @@
|
|
|
3093
3514
|
var forEach = forEach_1;
|
|
3094
3515
|
var availableTypedArrays = availableTypedArrays$1;
|
|
3095
3516
|
var callBind = callBindExports;
|
|
3096
|
-
var callBound$2 = callBound$
|
|
3517
|
+
var callBound$2 = callBound$e;
|
|
3097
3518
|
var gOPD = gopd$1;
|
|
3098
3519
|
|
|
3099
3520
|
/** @type {(O: object) => string} */
|
|
@@ -3205,7 +3626,7 @@
|
|
|
3205
3626
|
return tryTypedArrays(value);
|
|
3206
3627
|
};
|
|
3207
3628
|
|
|
3208
|
-
var callBound$1 = callBound$
|
|
3629
|
+
var callBound$1 = callBound$e;
|
|
3209
3630
|
var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
|
|
3210
3631
|
|
|
3211
3632
|
var isArrayBuffer$1 = isArrayBuffer$2;
|
|
@@ -3219,7 +3640,7 @@
|
|
|
3219
3640
|
}; // in node < 0.11, byteLength is an own nonconfigurable property
|
|
3220
3641
|
|
|
3221
3642
|
var assign = object_assign;
|
|
3222
|
-
var callBound = callBound$
|
|
3643
|
+
var callBound = callBound$e;
|
|
3223
3644
|
var flags = regexp_prototype_flags;
|
|
3224
3645
|
var GetIntrinsic = getIntrinsic;
|
|
3225
3646
|
var getIterator = esGetIteratorExports;
|
|
@@ -3611,11 +4032,12 @@
|
|
|
3611
4032
|
|
|
3612
4033
|
var deepEqual$1 = /*@__PURE__*/getDefaultExportFromCjs(deepEqual);
|
|
3613
4034
|
|
|
4035
|
+
/* @ts-self-types="./index.d.ts" */
|
|
3614
4036
|
let urlAlphabet =
|
|
3615
4037
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
3616
4038
|
let nanoid = (size = 21) => {
|
|
3617
4039
|
let id = '';
|
|
3618
|
-
let i = size;
|
|
4040
|
+
let i = size | 0;
|
|
3619
4041
|
while (i--) {
|
|
3620
4042
|
id += urlAlphabet[(Math.random() * 64) | 0];
|
|
3621
4043
|
}
|
|
@@ -3625,21 +4047,17 @@
|
|
|
3625
4047
|
const isValidNonEmptyObject = (obj) => {
|
|
3626
4048
|
return typeof obj === "object" && !Array.isArray(obj) && Object.keys(obj).length !== 0;
|
|
3627
4049
|
};
|
|
3628
|
-
const
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
return;
|
|
3634
|
-
}
|
|
3635
|
-
if (typeof actualUnsub === "function") {
|
|
3636
|
-
actualUnsub();
|
|
3637
|
-
}
|
|
3638
|
-
else {
|
|
3639
|
-
actualUnsub.then((unsubFunc) => unsubFunc()).catch(console.error);
|
|
3640
|
-
}
|
|
4050
|
+
const getListenerWithAsyncUnsubscribe = (unsub) => {
|
|
4051
|
+
const asyncUnsub = () => new Promise((res, rej) => {
|
|
4052
|
+
try {
|
|
4053
|
+
unsub();
|
|
4054
|
+
res();
|
|
3641
4055
|
}
|
|
3642
|
-
|
|
4056
|
+
catch (err) {
|
|
4057
|
+
rej(err instanceof Error ? err : new Error(err));
|
|
4058
|
+
}
|
|
4059
|
+
});
|
|
4060
|
+
return { unsubscribe: asyncUnsub };
|
|
3643
4061
|
};
|
|
3644
4062
|
const checkIfInElectron = (globalFdc3) => {
|
|
3645
4063
|
const hasGlue42electron = typeof window !== "undefined" && "glue42electron" in window;
|
|
@@ -4757,6 +5175,9 @@
|
|
|
4757
5175
|
}
|
|
4758
5176
|
mergeBaseAppDataWithGlueManifest(baseAppData, hostManifestDefinition) {
|
|
4759
5177
|
let baseApplicationDefinition = baseAppData;
|
|
5178
|
+
if (hostManifestDefinition.customProperties) {
|
|
5179
|
+
baseApplicationDefinition.userProperties = { ...baseAppData.userProperties, ...hostManifestDefinition.customProperties };
|
|
5180
|
+
}
|
|
4760
5181
|
if (hostManifestDefinition.details) {
|
|
4761
5182
|
const details = { ...baseAppData.createOptions, ...hostManifestDefinition.details };
|
|
4762
5183
|
baseApplicationDefinition.createOptions = details;
|
|
@@ -4852,16 +5273,24 @@
|
|
|
4852
5273
|
const IO_ERRORS = errors.intents;
|
|
4853
5274
|
const BrowserClientControlMethodName = "T42.Web.Client.Control";
|
|
4854
5275
|
const DesktopClientControlMethodName = "T42.Channels.Command";
|
|
5276
|
+
const GlueReceivedPromiseTimeout = 120 * 1000;
|
|
4855
5277
|
|
|
4856
5278
|
const ioConnectFDC3SystemMethod = "FDC3.Collaborate";
|
|
4857
5279
|
const PrivateChannelPrefix = "___privateFDC3Channel___";
|
|
4858
|
-
var
|
|
4859
|
-
(function (
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
})(
|
|
5280
|
+
var LegacyPrivateChannelEventMethods;
|
|
5281
|
+
(function (LegacyPrivateChannelEventMethods) {
|
|
5282
|
+
LegacyPrivateChannelEventMethods["ListenerAdded"] = "listenerAdded";
|
|
5283
|
+
LegacyPrivateChannelEventMethods["OnAddContextListener"] = "onAddContextListener";
|
|
5284
|
+
LegacyPrivateChannelEventMethods["OnUnsubscribe"] = "onUnsubscribe";
|
|
5285
|
+
LegacyPrivateChannelEventMethods["OnDisconnect"] = "onDisconnect";
|
|
5286
|
+
})(LegacyPrivateChannelEventMethods || (LegacyPrivateChannelEventMethods = {}));
|
|
5287
|
+
var NewPrivateChannelEventMethods;
|
|
5288
|
+
(function (NewPrivateChannelEventMethods) {
|
|
5289
|
+
NewPrivateChannelEventMethods["ContextListenerAdded"] = "contextListenerAdded";
|
|
5290
|
+
NewPrivateChannelEventMethods["AddContextListener"] = "addContextListener";
|
|
5291
|
+
NewPrivateChannelEventMethods["Unsubscribe"] = "unsubscribe";
|
|
5292
|
+
NewPrivateChannelEventMethods["Disconnect"] = "disconnect";
|
|
5293
|
+
})(NewPrivateChannelEventMethods || (NewPrivateChannelEventMethods = {}));
|
|
4865
5294
|
|
|
4866
5295
|
/**
|
|
4867
5296
|
* Wraps values in an `Ok` type.
|
|
@@ -5709,19 +6138,19 @@
|
|
|
5709
6138
|
object({
|
|
5710
6139
|
channelId: optional(nonEmptyStringDecoder)
|
|
5711
6140
|
});
|
|
6141
|
+
const privateChannelEventTypesDecoder = oneOf(constant("addContextListener"), constant("unsubscribe"), constant("disconnect"));
|
|
6142
|
+
const optionalPrivateChannelEventTypesDecoder = optional(privateChannelEventTypesDecoder);
|
|
6143
|
+
const optionalFdc3EventTypesDecoder = optional(constant("userChannelChanged"));
|
|
5712
6144
|
|
|
5713
6145
|
class GlueController {
|
|
5714
6146
|
channelsParser;
|
|
5715
|
-
channelsStateStore;
|
|
5716
6147
|
glue;
|
|
5717
6148
|
_logger;
|
|
5718
6149
|
glueInitPromise;
|
|
5719
6150
|
resolveGluePromise;
|
|
5720
6151
|
rejectGluePromise;
|
|
5721
|
-
|
|
5722
|
-
constructor(channelsParser, channelsStateStore) {
|
|
6152
|
+
constructor(channelsParser) {
|
|
5723
6153
|
this.channelsParser = channelsParser;
|
|
5724
|
-
this.channelsStateStore = channelsStateStore;
|
|
5725
6154
|
}
|
|
5726
6155
|
get gluePromise() {
|
|
5727
6156
|
return this.glueInitPromise.then(this.initializeLogger.bind(this));
|
|
@@ -5739,7 +6168,7 @@
|
|
|
5739
6168
|
this.resolveGluePromise = resolve;
|
|
5740
6169
|
this.rejectGluePromise = reject;
|
|
5741
6170
|
});
|
|
5742
|
-
},
|
|
6171
|
+
}, GlueReceivedPromiseTimeout, `Timeout of ${GlueReceivedPromiseTimeout}ms waiting to receive initialized 'io'`);
|
|
5743
6172
|
}
|
|
5744
6173
|
get logger() {
|
|
5745
6174
|
return this._logger;
|
|
@@ -5761,11 +6190,14 @@
|
|
|
5761
6190
|
getApplication(name) {
|
|
5762
6191
|
return this.glue.appManager.application(name);
|
|
5763
6192
|
}
|
|
6193
|
+
getAllAppManagerInstances() {
|
|
6194
|
+
return this.glue.appManager.instances();
|
|
6195
|
+
}
|
|
5764
6196
|
getApplicationInstances(appName) {
|
|
5765
|
-
return this.
|
|
6197
|
+
return this.getAllAppManagerInstances().filter(inst => inst.application.name === appName);
|
|
5766
6198
|
}
|
|
5767
6199
|
getAppInstanceById(id) {
|
|
5768
|
-
return this.
|
|
6200
|
+
return this.getAllAppManagerInstances().find(inst => inst.id === id);
|
|
5769
6201
|
}
|
|
5770
6202
|
async findIntents(intentFilter) {
|
|
5771
6203
|
return this.glue.intents.find(intentFilter);
|
|
@@ -5798,11 +6230,11 @@
|
|
|
5798
6230
|
}
|
|
5799
6231
|
return myWin.getContext();
|
|
5800
6232
|
}
|
|
5801
|
-
addIntentListener(intent, handler) {
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
6233
|
+
async addIntentListener(intent, handler) {
|
|
6234
|
+
if (typeof this.glue.intents.register === "function") {
|
|
6235
|
+
return await this.glue.intents.register(intent, handler);
|
|
6236
|
+
}
|
|
6237
|
+
return this.glue.intents.addIntentListener(intent, handler);
|
|
5806
6238
|
}
|
|
5807
6239
|
getAllContexts() {
|
|
5808
6240
|
return this.glue.contexts.all();
|
|
@@ -5877,7 +6309,11 @@
|
|
|
5877
6309
|
}
|
|
5878
6310
|
getMyWindow() {
|
|
5879
6311
|
const win = this.glue.windows.my();
|
|
5880
|
-
|
|
6312
|
+
const isValidWindow = isValidNonEmptyObject(win);
|
|
6313
|
+
if (isValidWindow) {
|
|
6314
|
+
return win;
|
|
6315
|
+
}
|
|
6316
|
+
return this.glue.windows.findById(this.glue.interop.instance.instance);
|
|
5881
6317
|
}
|
|
5882
6318
|
getMyInteropInstance() {
|
|
5883
6319
|
return this.glue.interop.instance;
|
|
@@ -5958,9 +6394,12 @@
|
|
|
5958
6394
|
getPrefs(app) {
|
|
5959
6395
|
return this.glue.prefs.get(app);
|
|
5960
6396
|
}
|
|
6397
|
+
isRunningInBrowser() {
|
|
6398
|
+
return typeof window !== "undefined" && !window.iodesktop;
|
|
6399
|
+
}
|
|
5961
6400
|
async checkIsFdc3DataWrappingSupported() {
|
|
5962
|
-
const
|
|
5963
|
-
const methodName =
|
|
6401
|
+
const inBrowserNamespace = this.isRunningInBrowser();
|
|
6402
|
+
const methodName = inBrowserNamespace ? BrowserClientControlMethodName : DesktopClientControlMethodName;
|
|
5964
6403
|
const myServer = this.glue.interop.servers().find((server) => server.instance === this.glue.interop.instance.instance);
|
|
5965
6404
|
if (!myServer) {
|
|
5966
6405
|
return false;
|
|
@@ -5969,7 +6408,7 @@
|
|
|
5969
6408
|
if (!registersControlMethod) {
|
|
5970
6409
|
return false;
|
|
5971
6410
|
}
|
|
5972
|
-
const data =
|
|
6411
|
+
const data = inBrowserNamespace ? { domain: "system", operation: "isFdc3DataWrappingSupported" } : { command: "isFdc3DataWrappingSupported" };
|
|
5973
6412
|
try {
|
|
5974
6413
|
const res = await this.glue.interop.invoke(methodName, data, { instance: this.interopInstance().instance });
|
|
5975
6414
|
return res.returned.isSupported;
|
|
@@ -5995,7 +6434,7 @@
|
|
|
5995
6434
|
}
|
|
5996
6435
|
return {
|
|
5997
6436
|
source: {
|
|
5998
|
-
appId: instanceServer.applicationName,
|
|
6437
|
+
appId: instanceServer.application ?? instanceServer.applicationName,
|
|
5999
6438
|
instanceId: instanceServer.instance
|
|
6000
6439
|
}
|
|
6001
6440
|
};
|
|
@@ -6054,7 +6493,7 @@
|
|
|
6054
6493
|
const REQUEST_GLUE_RESPONSE = "requestGlueResponse";
|
|
6055
6494
|
const FDC3_READY = "fdc3Ready";
|
|
6056
6495
|
|
|
6057
|
-
class
|
|
6496
|
+
class WebEventDispatcher {
|
|
6058
6497
|
fireFdc3Ready() {
|
|
6059
6498
|
const event = new Event(FDC3_READY);
|
|
6060
6499
|
window.dispatchEvent(event);
|
|
@@ -6074,9 +6513,851 @@
|
|
|
6074
6513
|
|
|
6075
6514
|
// To parse this data:
|
|
6076
6515
|
//
|
|
6077
|
-
// import { Convert,
|
|
6516
|
+
// import { Convert, Action, Chart, ChatInitSettings, ChatMessage, ChatRoom, ChatSearchCriteria, Contact, ContactList, Context, Country, Currency, Email, FileAttachment, Instrument, InstrumentList, Interaction, Message, Nothing, Order, OrderList, Organization, Portfolio, Position, Product, TimeRange, Trade, TradeList, TransactionResult, Valuation } from "./file";
|
|
6517
|
+
//
|
|
6518
|
+
// const action = Convert.toAction(json);
|
|
6519
|
+
// const chart = Convert.toChart(json);
|
|
6520
|
+
// const chatInitSettings = Convert.toChatInitSettings(json);
|
|
6521
|
+
// const chatMessage = Convert.toChatMessage(json);
|
|
6522
|
+
// const chatRoom = Convert.toChatRoom(json);
|
|
6523
|
+
// const chatSearchCriteria = Convert.toChatSearchCriteria(json);
|
|
6524
|
+
// const contact = Convert.toContact(json);
|
|
6525
|
+
// const contactList = Convert.toContactList(json);
|
|
6526
|
+
// const context = Convert.toContext(json);
|
|
6527
|
+
// const country = Convert.toCountry(json);
|
|
6528
|
+
// const currency = Convert.toCurrency(json);
|
|
6529
|
+
// const email = Convert.toEmail(json);
|
|
6530
|
+
// const fileAttachment = Convert.toFileAttachment(json);
|
|
6531
|
+
// const instrument = Convert.toInstrument(json);
|
|
6532
|
+
// const instrumentList = Convert.toInstrumentList(json);
|
|
6533
|
+
// const interaction = Convert.toInteraction(json);
|
|
6534
|
+
// const message = Convert.toMessage(json);
|
|
6535
|
+
// const nothing = Convert.toNothing(json);
|
|
6536
|
+
// const order = Convert.toOrder(json);
|
|
6537
|
+
// const orderList = Convert.toOrderList(json);
|
|
6538
|
+
// const organization = Convert.toOrganization(json);
|
|
6539
|
+
// const portfolio = Convert.toPortfolio(json);
|
|
6540
|
+
// const position = Convert.toPosition(json);
|
|
6541
|
+
// const product = Convert.toProduct(json);
|
|
6542
|
+
// const timeRange = Convert.toTimeRange(json);
|
|
6543
|
+
// const trade = Convert.toTrade(json);
|
|
6544
|
+
// const tradeList = Convert.toTradeList(json);
|
|
6545
|
+
// const transactionResult = Convert.toTransactionResult(json);
|
|
6546
|
+
// const valuation = Convert.toValuation(json);
|
|
6547
|
+
//
|
|
6548
|
+
// These functions will throw an error if the JSON doesn't
|
|
6549
|
+
// match the expected interface, even if the JSON is valid.
|
|
6550
|
+
/**
|
|
6551
|
+
* Free text to be used for a keyword search
|
|
6552
|
+
*
|
|
6553
|
+
* `interactionType` SHOULD be one of `'Instant Message'`, `'Email'`, `'Call'`, or
|
|
6554
|
+
* `'Meeting'` although other string values are permitted.
|
|
6555
|
+
*/
|
|
6556
|
+
// Converts JSON strings to/from your types
|
|
6557
|
+
// and asserts the results of JSON.parse at runtime
|
|
6558
|
+
function a$2(typ) {
|
|
6559
|
+
return { arrayItems: typ };
|
|
6560
|
+
}
|
|
6561
|
+
function u$2(...typs) {
|
|
6562
|
+
return { unionMembers: typs };
|
|
6563
|
+
}
|
|
6564
|
+
function o$2(props, additional) {
|
|
6565
|
+
return { props, additional };
|
|
6566
|
+
}
|
|
6567
|
+
function m$2(additional) {
|
|
6568
|
+
return { props: [], additional };
|
|
6569
|
+
}
|
|
6570
|
+
function r$2(name) {
|
|
6571
|
+
return { ref: name };
|
|
6572
|
+
}
|
|
6573
|
+
({
|
|
6574
|
+
Action: o$2([
|
|
6575
|
+
{ json: 'action', js: 'action', typ: u$2(undefined, r$2('ActionType')) },
|
|
6576
|
+
{ json: 'app', js: 'app', typ: u$2(undefined, r$2('AppIdentifier')) },
|
|
6577
|
+
{ json: 'channelId', js: 'channelId', typ: u$2(undefined, '') },
|
|
6578
|
+
{ json: 'context', js: 'context', typ: r$2('ContextElement') },
|
|
6579
|
+
{ json: 'intent', js: 'intent', typ: u$2(undefined, '') },
|
|
6580
|
+
{ json: 'title', js: 'title', typ: '' },
|
|
6581
|
+
{ json: 'type', js: 'type', typ: r$2('ActionTypeEnum') },
|
|
6582
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6583
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6584
|
+
], 'any'),
|
|
6585
|
+
AppIdentifier: o$2([
|
|
6586
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
6587
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u$2(undefined, '') },
|
|
6588
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$2(undefined, '') },
|
|
6589
|
+
], 'any'),
|
|
6590
|
+
ContextElement: o$2([
|
|
6591
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6592
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6593
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
6594
|
+
], 'any'),
|
|
6595
|
+
Chart: o$2([
|
|
6596
|
+
{ json: 'instruments', js: 'instruments', typ: a$2(r$2('InstrumentElement')) },
|
|
6597
|
+
{ json: 'otherConfig', js: 'otherConfig', typ: u$2(undefined, a$2(r$2('ContextElement'))) },
|
|
6598
|
+
{ json: 'range', js: 'range', typ: u$2(undefined, r$2('TimeRangeObject')) },
|
|
6599
|
+
{ json: 'style', js: 'style', typ: u$2(undefined, r$2('ChartStyle')) },
|
|
6600
|
+
{ json: 'type', js: 'type', typ: r$2('ChartType') },
|
|
6601
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6602
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6603
|
+
], 'any'),
|
|
6604
|
+
InstrumentElement: o$2([
|
|
6605
|
+
{ json: 'id', js: 'id', typ: r$2('PurpleInstrumentIdentifiers') },
|
|
6606
|
+
{ json: 'market', js: 'market', typ: u$2(undefined, r$2('OrganizationMarket')) },
|
|
6607
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6608
|
+
{ json: 'type', js: 'type', typ: r$2('PurpleInteractionType') },
|
|
6609
|
+
], 'any'),
|
|
6610
|
+
PurpleInstrumentIdentifiers: o$2([
|
|
6611
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6612
|
+
{ json: 'CUSIP', js: 'CUSIP', typ: u$2(undefined, '') },
|
|
6613
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6614
|
+
{ json: 'FIGI', js: 'FIGI', typ: u$2(undefined, '') },
|
|
6615
|
+
{ json: 'ISIN', js: 'ISIN', typ: u$2(undefined, '') },
|
|
6616
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6617
|
+
{ json: 'RIC', js: 'RIC', typ: u$2(undefined, '') },
|
|
6618
|
+
{ json: 'SEDOL', js: 'SEDOL', typ: u$2(undefined, '') },
|
|
6619
|
+
{ json: 'ticker', js: 'ticker', typ: u$2(undefined, '') },
|
|
6620
|
+
], 'any'),
|
|
6621
|
+
OrganizationMarket: o$2([
|
|
6622
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6623
|
+
{ json: 'COUNTRY_ISOALPHA2', js: 'COUNTRY_ISOALPHA2', typ: u$2(undefined, '') },
|
|
6624
|
+
{ json: 'MIC', js: 'MIC', typ: u$2(undefined, '') },
|
|
6625
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6626
|
+
], 'any'),
|
|
6627
|
+
TimeRangeObject: o$2([
|
|
6628
|
+
{ json: 'endTime', js: 'endTime', typ: u$2(undefined, Date) },
|
|
6629
|
+
{ json: 'startTime', js: 'startTime', typ: u$2(undefined, Date) },
|
|
6630
|
+
{ json: 'type', js: 'type', typ: r$2('TimeRangeType') },
|
|
6631
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6632
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6633
|
+
], 'any'),
|
|
6634
|
+
ChatInitSettings: o$2([
|
|
6635
|
+
{ json: 'chatName', js: 'chatName', typ: u$2(undefined, '') },
|
|
6636
|
+
{ json: 'members', js: 'members', typ: u$2(undefined, r$2('ContactListObject')) },
|
|
6637
|
+
{ json: 'message', js: 'message', typ: u$2(undefined, u$2(r$2('MessageObject'), '')) },
|
|
6638
|
+
{ json: 'options', js: 'options', typ: u$2(undefined, r$2('ChatOptions')) },
|
|
6639
|
+
{ json: 'type', js: 'type', typ: r$2('ChatInitSettingsType') },
|
|
6640
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6641
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6642
|
+
], 'any'),
|
|
6643
|
+
ContactListObject: o$2([
|
|
6644
|
+
{ json: 'contacts', js: 'contacts', typ: a$2(r$2('ContactElement')) },
|
|
6645
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6646
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6647
|
+
{ json: 'type', js: 'type', typ: r$2('ContactListType') },
|
|
6648
|
+
], 'any'),
|
|
6649
|
+
ContactElement: o$2([
|
|
6650
|
+
{ json: 'id', js: 'id', typ: r$2('PurpleContactIdentifiers') },
|
|
6651
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6652
|
+
{ json: 'type', js: 'type', typ: r$2('FluffyInteractionType') },
|
|
6653
|
+
], 'any'),
|
|
6654
|
+
PurpleContactIdentifiers: o$2([
|
|
6655
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6656
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6657
|
+
], 'any'),
|
|
6658
|
+
MessageObject: o$2([
|
|
6659
|
+
{ json: 'entities', js: 'entities', typ: u$2(undefined, m$2(r$2('EntityValue'))) },
|
|
6660
|
+
{ json: 'text', js: 'text', typ: u$2(undefined, r$2('PurpleMessageText')) },
|
|
6661
|
+
{ json: 'type', js: 'type', typ: r$2('MessageType') },
|
|
6662
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6663
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6664
|
+
], 'any'),
|
|
6665
|
+
EntityValue: o$2([
|
|
6666
|
+
{ json: 'action', js: 'action', typ: u$2(undefined, r$2('ActionType')) },
|
|
6667
|
+
{ json: 'app', js: 'app', typ: u$2(undefined, r$2('AppIdentifier')) },
|
|
6668
|
+
{ json: 'channelId', js: 'channelId', typ: u$2(undefined, '') },
|
|
6669
|
+
{ json: 'context', js: 'context', typ: u$2(undefined, r$2('ContextElement')) },
|
|
6670
|
+
{ json: 'intent', js: 'intent', typ: u$2(undefined, '') },
|
|
6671
|
+
{ json: 'title', js: 'title', typ: u$2(undefined, '') },
|
|
6672
|
+
{ json: 'type', js: 'type', typ: r$2('EntityType') },
|
|
6673
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6674
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6675
|
+
{ json: 'data', js: 'data', typ: u$2(undefined, r$2('EntityData')) },
|
|
6676
|
+
], 'any'),
|
|
6677
|
+
PurpleMessageText: o$2([
|
|
6678
|
+
{ json: 'text/markdown', js: 'text/markdown', typ: u$2(undefined, '') },
|
|
6679
|
+
{ json: 'text/plain', js: 'text/plain', typ: u$2(undefined, '') },
|
|
6680
|
+
], 'any'),
|
|
6681
|
+
ChatOptions: o$2([
|
|
6682
|
+
{ json: 'allowAddUser', js: 'allowAddUser', typ: u$2(undefined, true) },
|
|
6683
|
+
{ json: 'allowHistoryBrowsing', js: 'allowHistoryBrowsing', typ: u$2(undefined, true) },
|
|
6684
|
+
{ json: 'allowMessageCopy', js: 'allowMessageCopy', typ: u$2(undefined, true) },
|
|
6685
|
+
{ json: 'groupRecipients', js: 'groupRecipients', typ: u$2(undefined, true) },
|
|
6686
|
+
{ json: 'isPublic', js: 'isPublic', typ: u$2(undefined, true) },
|
|
6687
|
+
], 'any'),
|
|
6688
|
+
ChatMessage: o$2([
|
|
6689
|
+
{ json: 'chatRoom', js: 'chatRoom', typ: r$2('ChatRoomObject') },
|
|
6690
|
+
{ json: 'message', js: 'message', typ: r$2('MessageObject') },
|
|
6691
|
+
{ json: 'type', js: 'type', typ: r$2('ChatMessageType') },
|
|
6692
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6693
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6694
|
+
], 'any'),
|
|
6695
|
+
ChatRoomObject: o$2([
|
|
6696
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6697
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6698
|
+
{ json: 'providerName', js: 'providerName', typ: '' },
|
|
6699
|
+
{ json: 'type', js: 'type', typ: r$2('ChatRoomType') },
|
|
6700
|
+
{ json: 'url', js: 'url', typ: u$2(undefined, '') },
|
|
6701
|
+
], 'any'),
|
|
6702
|
+
ChatRoom: o$2([
|
|
6703
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6704
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6705
|
+
{ json: 'providerName', js: 'providerName', typ: '' },
|
|
6706
|
+
{ json: 'type', js: 'type', typ: r$2('ChatRoomType') },
|
|
6707
|
+
{ json: 'url', js: 'url', typ: u$2(undefined, '') },
|
|
6708
|
+
], 'any'),
|
|
6709
|
+
ChatSearchCriteria: o$2([
|
|
6710
|
+
{ json: 'criteria', js: 'criteria', typ: a$2(u$2(r$2('OrganizationObject'), '')) },
|
|
6711
|
+
{ json: 'type', js: 'type', typ: r$2('ChatSearchCriteriaType') },
|
|
6712
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6713
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6714
|
+
], 'any'),
|
|
6715
|
+
OrganizationObject: o$2([
|
|
6716
|
+
{ json: 'id', js: 'id', typ: r$2('Identifiers') },
|
|
6717
|
+
{ json: 'market', js: 'market', typ: u$2(undefined, r$2('OrganizationMarket')) },
|
|
6718
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6719
|
+
{ json: 'type', js: 'type', typ: r$2('TentacledInteractionType') },
|
|
6720
|
+
], 'any'),
|
|
6721
|
+
Identifiers: o$2([
|
|
6722
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6723
|
+
{ json: 'CUSIP', js: 'CUSIP', typ: u$2(undefined, '') },
|
|
6724
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6725
|
+
{ json: 'FIGI', js: 'FIGI', typ: u$2(undefined, '') },
|
|
6726
|
+
{ json: 'ISIN', js: 'ISIN', typ: u$2(undefined, '') },
|
|
6727
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6728
|
+
{ json: 'RIC', js: 'RIC', typ: u$2(undefined, '') },
|
|
6729
|
+
{ json: 'SEDOL', js: 'SEDOL', typ: u$2(undefined, '') },
|
|
6730
|
+
{ json: 'ticker', js: 'ticker', typ: u$2(undefined, '') },
|
|
6731
|
+
{ json: 'LEI', js: 'LEI', typ: u$2(undefined, '') },
|
|
6732
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6733
|
+
], 'any'),
|
|
6734
|
+
Contact: o$2([
|
|
6735
|
+
{ json: 'id', js: 'id', typ: r$2('FluffyContactIdentifiers') },
|
|
6736
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6737
|
+
{ json: 'type', js: 'type', typ: r$2('FluffyInteractionType') },
|
|
6738
|
+
], 'any'),
|
|
6739
|
+
FluffyContactIdentifiers: o$2([
|
|
6740
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6741
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6742
|
+
], 'any'),
|
|
6743
|
+
ContactList: o$2([
|
|
6744
|
+
{ json: 'contacts', js: 'contacts', typ: a$2(r$2('ContactElement')) },
|
|
6745
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6746
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6747
|
+
{ json: 'type', js: 'type', typ: r$2('ContactListType') },
|
|
6748
|
+
], 'any'),
|
|
6749
|
+
Context: o$2([
|
|
6750
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6751
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6752
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
6753
|
+
], 'any'),
|
|
6754
|
+
Country: o$2([
|
|
6755
|
+
{ json: 'id', js: 'id', typ: r$2('CountryID') },
|
|
6756
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6757
|
+
{ json: 'type', js: 'type', typ: r$2('CountryType') },
|
|
6758
|
+
], 'any'),
|
|
6759
|
+
CountryID: o$2([
|
|
6760
|
+
{ json: 'COUNTRY_ISOALPHA2', js: 'COUNTRY_ISOALPHA2', typ: u$2(undefined, '') },
|
|
6761
|
+
{ json: 'COUNTRY_ISOALPHA3', js: 'COUNTRY_ISOALPHA3', typ: u$2(undefined, '') },
|
|
6762
|
+
{ json: 'ISOALPHA2', js: 'ISOALPHA2', typ: u$2(undefined, '') },
|
|
6763
|
+
{ json: 'ISOALPHA3', js: 'ISOALPHA3', typ: u$2(undefined, '') },
|
|
6764
|
+
], 'any'),
|
|
6765
|
+
Currency: o$2([
|
|
6766
|
+
{ json: 'id', js: 'id', typ: r$2('CurrencyID') },
|
|
6767
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6768
|
+
{ json: 'type', js: 'type', typ: r$2('CurrencyType') },
|
|
6769
|
+
], 'any'),
|
|
6770
|
+
CurrencyID: o$2([{ json: 'CURRENCY_ISOCODE', js: 'CURRENCY_ISOCODE', typ: u$2(undefined, '') }], 'any'),
|
|
6771
|
+
Email: o$2([
|
|
6772
|
+
{ json: 'recipients', js: 'recipients', typ: r$2('EmailRecipients') },
|
|
6773
|
+
{ json: 'subject', js: 'subject', typ: u$2(undefined, '') },
|
|
6774
|
+
{ json: 'textBody', js: 'textBody', typ: u$2(undefined, '') },
|
|
6775
|
+
{ json: 'type', js: 'type', typ: r$2('EmailType') },
|
|
6776
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6777
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6778
|
+
], 'any'),
|
|
6779
|
+
EmailRecipients: o$2([
|
|
6780
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, r$2('ContactTIdentifiers')) },
|
|
6781
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6782
|
+
{ json: 'type', js: 'type', typ: r$2('EmailRecipientsType') },
|
|
6783
|
+
{ json: 'contacts', js: 'contacts', typ: u$2(undefined, a$2(r$2('ContactElement'))) },
|
|
6784
|
+
], 'any'),
|
|
6785
|
+
ContactTIdentifiers: o$2([
|
|
6786
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6787
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6788
|
+
], 'any'),
|
|
6789
|
+
FileAttachment: o$2([
|
|
6790
|
+
{ json: 'data', js: 'data', typ: r$2('FileAttachmentData') },
|
|
6791
|
+
{ json: 'type', js: 'type', typ: r$2('FileAttachmentType') },
|
|
6792
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6793
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6794
|
+
], 'any'),
|
|
6795
|
+
Instrument: o$2([
|
|
6796
|
+
{ json: 'id', js: 'id', typ: r$2('FluffyInstrumentIdentifiers') },
|
|
6797
|
+
{ json: 'market', js: 'market', typ: u$2(undefined, r$2('PurpleMarket')) },
|
|
6798
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6799
|
+
{ json: 'type', js: 'type', typ: r$2('PurpleInteractionType') },
|
|
6800
|
+
], 'any'),
|
|
6801
|
+
FluffyInstrumentIdentifiers: o$2([
|
|
6802
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6803
|
+
{ json: 'CUSIP', js: 'CUSIP', typ: u$2(undefined, '') },
|
|
6804
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6805
|
+
{ json: 'FIGI', js: 'FIGI', typ: u$2(undefined, '') },
|
|
6806
|
+
{ json: 'ISIN', js: 'ISIN', typ: u$2(undefined, '') },
|
|
6807
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6808
|
+
{ json: 'RIC', js: 'RIC', typ: u$2(undefined, '') },
|
|
6809
|
+
{ json: 'SEDOL', js: 'SEDOL', typ: u$2(undefined, '') },
|
|
6810
|
+
{ json: 'ticker', js: 'ticker', typ: u$2(undefined, '') },
|
|
6811
|
+
], 'any'),
|
|
6812
|
+
PurpleMarket: o$2([
|
|
6813
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6814
|
+
{ json: 'COUNTRY_ISOALPHA2', js: 'COUNTRY_ISOALPHA2', typ: u$2(undefined, '') },
|
|
6815
|
+
{ json: 'MIC', js: 'MIC', typ: u$2(undefined, '') },
|
|
6816
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6817
|
+
], 'any'),
|
|
6818
|
+
InstrumentList: o$2([
|
|
6819
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6820
|
+
{ json: 'instruments', js: 'instruments', typ: a$2(r$2('InstrumentElement')) },
|
|
6821
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6822
|
+
{ json: 'type', js: 'type', typ: r$2('InstrumentListType') },
|
|
6823
|
+
], 'any'),
|
|
6824
|
+
Interaction: o$2([
|
|
6825
|
+
{ json: 'description', js: 'description', typ: '' },
|
|
6826
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, r$2('InteractionID')) },
|
|
6827
|
+
{ json: 'initiator', js: 'initiator', typ: u$2(undefined, r$2('ContactElement')) },
|
|
6828
|
+
{ json: 'interactionType', js: 'interactionType', typ: '' },
|
|
6829
|
+
{ json: 'origin', js: 'origin', typ: u$2(undefined, '') },
|
|
6830
|
+
{ json: 'participants', js: 'participants', typ: r$2('ContactListObject') },
|
|
6831
|
+
{ json: 'timeRange', js: 'timeRange', typ: r$2('TimeRangeObject') },
|
|
6832
|
+
{ json: 'type', js: 'type', typ: r$2('InteractionType') },
|
|
6833
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6834
|
+
], 'any'),
|
|
6835
|
+
InteractionID: o$2([
|
|
6836
|
+
{ json: 'SALESFORCE', js: 'SALESFORCE', typ: u$2(undefined, '') },
|
|
6837
|
+
{ json: 'SINGLETRACK', js: 'SINGLETRACK', typ: u$2(undefined, '') },
|
|
6838
|
+
{ json: 'URI', js: 'URI', typ: u$2(undefined, '') },
|
|
6839
|
+
], 'any'),
|
|
6840
|
+
Message: o$2([
|
|
6841
|
+
{ json: 'entities', js: 'entities', typ: u$2(undefined, m$2(r$2('EntityValue'))) },
|
|
6842
|
+
{ json: 'text', js: 'text', typ: u$2(undefined, r$2('FluffyMessageText')) },
|
|
6843
|
+
{ json: 'type', js: 'type', typ: r$2('MessageType') },
|
|
6844
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6845
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6846
|
+
], 'any'),
|
|
6847
|
+
FluffyMessageText: o$2([
|
|
6848
|
+
{ json: 'text/markdown', js: 'text/markdown', typ: u$2(undefined, '') },
|
|
6849
|
+
{ json: 'text/plain', js: 'text/plain', typ: u$2(undefined, '') },
|
|
6850
|
+
], 'any'),
|
|
6851
|
+
Nothing: o$2([
|
|
6852
|
+
{ json: 'type', js: 'type', typ: r$2('NothingType') },
|
|
6853
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6854
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6855
|
+
], 'any'),
|
|
6856
|
+
Order: o$2([
|
|
6857
|
+
{ json: 'details', js: 'details', typ: u$2(undefined, r$2('PurpleOrderDetails')) },
|
|
6858
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6859
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6860
|
+
{ json: 'type', js: 'type', typ: r$2('OrderType') },
|
|
6861
|
+
], 'any'),
|
|
6862
|
+
PurpleOrderDetails: o$2([{ json: 'product', js: 'product', typ: u$2(undefined, r$2('ProductObject')) }], 'any'),
|
|
6863
|
+
ProductObject: o$2([
|
|
6864
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6865
|
+
{ json: 'instrument', js: 'instrument', typ: u$2(undefined, r$2('InstrumentElement')) },
|
|
6866
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6867
|
+
{ json: 'type', js: 'type', typ: r$2('ProductType') },
|
|
6868
|
+
], 'any'),
|
|
6869
|
+
OrderList: o$2([
|
|
6870
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6871
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6872
|
+
{ json: 'orders', js: 'orders', typ: a$2(r$2('OrderElement')) },
|
|
6873
|
+
{ json: 'type', js: 'type', typ: r$2('OrderListType') },
|
|
6874
|
+
], 'any'),
|
|
6875
|
+
OrderElement: o$2([
|
|
6876
|
+
{ json: 'details', js: 'details', typ: u$2(undefined, r$2('FluffyOrderDetails')) },
|
|
6877
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6878
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6879
|
+
{ json: 'type', js: 'type', typ: r$2('OrderType') },
|
|
6880
|
+
], 'any'),
|
|
6881
|
+
FluffyOrderDetails: o$2([{ json: 'product', js: 'product', typ: u$2(undefined, r$2('ProductObject')) }], 'any'),
|
|
6882
|
+
Organization: o$2([
|
|
6883
|
+
{ json: 'id', js: 'id', typ: r$2('OrganizationIdentifiers') },
|
|
6884
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6885
|
+
{ json: 'type', js: 'type', typ: r$2('StickyInteractionType') },
|
|
6886
|
+
], 'any'),
|
|
6887
|
+
OrganizationIdentifiers: o$2([
|
|
6888
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6889
|
+
{ json: 'LEI', js: 'LEI', typ: u$2(undefined, '') },
|
|
6890
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6891
|
+
], 'any'),
|
|
6892
|
+
Portfolio: o$2([
|
|
6893
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6894
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6895
|
+
{ json: 'positions', js: 'positions', typ: a$2(r$2('PositionElement')) },
|
|
6896
|
+
{ json: 'type', js: 'type', typ: r$2('PortfolioType') },
|
|
6897
|
+
], 'any'),
|
|
6898
|
+
PositionElement: o$2([
|
|
6899
|
+
{ json: 'holding', js: 'holding', typ: 3.14 },
|
|
6900
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6901
|
+
{ json: 'instrument', js: 'instrument', typ: r$2('InstrumentElement') },
|
|
6902
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6903
|
+
{ json: 'type', js: 'type', typ: r$2('PositionType') },
|
|
6904
|
+
], 'any'),
|
|
6905
|
+
Position: o$2([
|
|
6906
|
+
{ json: 'holding', js: 'holding', typ: 3.14 },
|
|
6907
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6908
|
+
{ json: 'instrument', js: 'instrument', typ: r$2('InstrumentElement') },
|
|
6909
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6910
|
+
{ json: 'type', js: 'type', typ: r$2('PositionType') },
|
|
6911
|
+
], 'any'),
|
|
6912
|
+
Product: o$2([
|
|
6913
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6914
|
+
{ json: 'instrument', js: 'instrument', typ: u$2(undefined, r$2('InstrumentElement')) },
|
|
6915
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6916
|
+
{ json: 'type', js: 'type', typ: r$2('ProductType') },
|
|
6917
|
+
], 'any'),
|
|
6918
|
+
TimeRange: o$2([
|
|
6919
|
+
{ json: 'endTime', js: 'endTime', typ: u$2(undefined, Date) },
|
|
6920
|
+
{ json: 'startTime', js: 'startTime', typ: u$2(undefined, Date) },
|
|
6921
|
+
{ json: 'type', js: 'type', typ: r$2('TimeRangeType') },
|
|
6922
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6923
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6924
|
+
], 'any'),
|
|
6925
|
+
Trade: o$2([
|
|
6926
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6927
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6928
|
+
{ json: 'product', js: 'product', typ: r$2('ProductObject') },
|
|
6929
|
+
{ json: 'type', js: 'type', typ: r$2('TradeType') },
|
|
6930
|
+
], 'any'),
|
|
6931
|
+
TradeList: o$2([
|
|
6932
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6933
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6934
|
+
{ json: 'trades', js: 'trades', typ: a$2(r$2('TradeElement')) },
|
|
6935
|
+
{ json: 'type', js: 'type', typ: r$2('TradeListType') },
|
|
6936
|
+
], 'any'),
|
|
6937
|
+
TradeElement: o$2([
|
|
6938
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6939
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6940
|
+
{ json: 'product', js: 'product', typ: r$2('ProductObject') },
|
|
6941
|
+
{ json: 'type', js: 'type', typ: r$2('TradeType') },
|
|
6942
|
+
], 'any'),
|
|
6943
|
+
TransactionResult: o$2([
|
|
6944
|
+
{ json: 'context', js: 'context', typ: u$2(undefined, r$2('ContextElement')) },
|
|
6945
|
+
{ json: 'message', js: 'message', typ: u$2(undefined, '') },
|
|
6946
|
+
{ json: 'status', js: 'status', typ: r$2('TransactionStatus') },
|
|
6947
|
+
{ json: 'type', js: 'type', typ: r$2('TransactionResultType') },
|
|
6948
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6949
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6950
|
+
], 'any'),
|
|
6951
|
+
Valuation: o$2([
|
|
6952
|
+
{ json: 'CURRENCY_ISOCODE', js: 'CURRENCY_ISOCODE', typ: '' },
|
|
6953
|
+
{ json: 'expiryTime', js: 'expiryTime', typ: u$2(undefined, Date) },
|
|
6954
|
+
{ json: 'price', js: 'price', typ: u$2(undefined, 3.14) },
|
|
6955
|
+
{ json: 'type', js: 'type', typ: r$2('ValuationType') },
|
|
6956
|
+
{ json: 'valuationTime', js: 'valuationTime', typ: u$2(undefined, Date) },
|
|
6957
|
+
{ json: 'value', js: 'value', typ: 3.14 },
|
|
6958
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6959
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6960
|
+
], 'any')});
|
|
6961
|
+
|
|
6962
|
+
// To parse this data:
|
|
6963
|
+
//
|
|
6964
|
+
// import { Convert, WebConnectionProtocol1Hello, WebConnectionProtocol2LoadURL, WebConnectionProtocol3Handshake, WebConnectionProtocol4ValidateAppIdentity, WebConnectionProtocol5ValidateAppIdentityFailedResponse, WebConnectionProtocol5ValidateAppIdentitySuccessResponse, WebConnectionProtocol6Goodbye, WebConnectionProtocolMessage, AddContextListenerRequest, AddContextListenerResponse, AddEventListenerRequest, AddEventListenerResponse, AddIntentListenerRequest, AddIntentListenerResponse, AgentEventMessage, AgentResponseMessage, AppRequestMessage, BroadcastEvent, BroadcastRequest, BroadcastResponse, ChannelChangedEvent, ContextListenerUnsubscribeRequest, ContextListenerUnsubscribeResponse, CreatePrivateChannelRequest, CreatePrivateChannelResponse, EventListenerUnsubscribeRequest, EventListenerUnsubscribeResponse, Fdc3UserInterfaceChannelSelected, Fdc3UserInterfaceChannels, Fdc3UserInterfaceDrag, Fdc3UserInterfaceHandshake, Fdc3UserInterfaceHello, Fdc3UserInterfaceMessage, Fdc3UserInterfaceResolve, Fdc3UserInterfaceResolveAction, Fdc3UserInterfaceRestyle, FindInstancesRequest, FindInstancesResponse, FindIntentRequest, FindIntentResponse, FindIntentsByContextRequest, FindIntentsByContextResponse, GetAppMetadataRequest, GetAppMetadataResponse, GetCurrentChannelRequest, GetCurrentChannelResponse, GetCurrentContextRequest, GetCurrentContextResponse, GetInfoRequest, GetInfoResponse, GetOrCreateChannelRequest, GetOrCreateChannelResponse, GetUserChannelsRequest, GetUserChannelsResponse, HeartbeatAcknowledgementRequest, HeartbeatEvent, IntentEvent, IntentListenerUnsubscribeRequest, IntentListenerUnsubscribeResponse, IntentResultRequest, IntentResultResponse, JoinUserChannelRequest, JoinUserChannelResponse, LeaveCurrentChannelRequest, LeaveCurrentChannelResponse, OpenRequest, OpenResponse, PrivateChannelAddEventListenerRequest, PrivateChannelAddEventListenerResponse, PrivateChannelDisconnectRequest, PrivateChannelDisconnectResponse, PrivateChannelOnAddContextListenerEvent, PrivateChannelOnDisconnectEvent, PrivateChannelOnUnsubscribeEvent, PrivateChannelUnsubscribeEventListenerRequest, PrivateChannelUnsubscribeEventListenerResponse, RaiseIntentForContextRequest, RaiseIntentForContextResponse, RaiseIntentRequest, RaiseIntentResponse, RaiseIntentResultResponse } from "./file";
|
|
6965
|
+
//
|
|
6966
|
+
// const webConnectionProtocol1Hello = Convert.toWebConnectionProtocol1Hello(json);
|
|
6967
|
+
// const webConnectionProtocol2LoadURL = Convert.toWebConnectionProtocol2LoadURL(json);
|
|
6968
|
+
// const webConnectionProtocol3Handshake = Convert.toWebConnectionProtocol3Handshake(json);
|
|
6969
|
+
// const webConnectionProtocol4ValidateAppIdentity = Convert.toWebConnectionProtocol4ValidateAppIdentity(json);
|
|
6970
|
+
// const webConnectionProtocol5ValidateAppIdentityFailedResponse = Convert.toWebConnectionProtocol5ValidateAppIdentityFailedResponse(json);
|
|
6971
|
+
// const webConnectionProtocol5ValidateAppIdentitySuccessResponse = Convert.toWebConnectionProtocol5ValidateAppIdentitySuccessResponse(json);
|
|
6972
|
+
// const webConnectionProtocol6Goodbye = Convert.toWebConnectionProtocol6Goodbye(json);
|
|
6973
|
+
// const webConnectionProtocolMessage = Convert.toWebConnectionProtocolMessage(json);
|
|
6974
|
+
// const addContextListenerRequest = Convert.toAddContextListenerRequest(json);
|
|
6975
|
+
// const addContextListenerResponse = Convert.toAddContextListenerResponse(json);
|
|
6976
|
+
// const addEventListenerRequest = Convert.toAddEventListenerRequest(json);
|
|
6977
|
+
// const addEventListenerResponse = Convert.toAddEventListenerResponse(json);
|
|
6978
|
+
// const addIntentListenerRequest = Convert.toAddIntentListenerRequest(json);
|
|
6979
|
+
// const addIntentListenerResponse = Convert.toAddIntentListenerResponse(json);
|
|
6980
|
+
// const agentEventMessage = Convert.toAgentEventMessage(json);
|
|
6981
|
+
// const agentResponseMessage = Convert.toAgentResponseMessage(json);
|
|
6982
|
+
// const appRequestMessage = Convert.toAppRequestMessage(json);
|
|
6983
|
+
// const broadcastEvent = Convert.toBroadcastEvent(json);
|
|
6984
|
+
// const broadcastRequest = Convert.toBroadcastRequest(json);
|
|
6985
|
+
// const broadcastResponse = Convert.toBroadcastResponse(json);
|
|
6986
|
+
// const channelChangedEvent = Convert.toChannelChangedEvent(json);
|
|
6987
|
+
// const contextListenerUnsubscribeRequest = Convert.toContextListenerUnsubscribeRequest(json);
|
|
6988
|
+
// const contextListenerUnsubscribeResponse = Convert.toContextListenerUnsubscribeResponse(json);
|
|
6989
|
+
// const createPrivateChannelRequest = Convert.toCreatePrivateChannelRequest(json);
|
|
6990
|
+
// const createPrivateChannelResponse = Convert.toCreatePrivateChannelResponse(json);
|
|
6991
|
+
// const eventListenerUnsubscribeRequest = Convert.toEventListenerUnsubscribeRequest(json);
|
|
6992
|
+
// const eventListenerUnsubscribeResponse = Convert.toEventListenerUnsubscribeResponse(json);
|
|
6993
|
+
// const fdc3UserInterfaceChannelSelected = Convert.toFdc3UserInterfaceChannelSelected(json);
|
|
6994
|
+
// const fdc3UserInterfaceChannels = Convert.toFdc3UserInterfaceChannels(json);
|
|
6995
|
+
// const fdc3UserInterfaceDrag = Convert.toFdc3UserInterfaceDrag(json);
|
|
6996
|
+
// const fdc3UserInterfaceHandshake = Convert.toFdc3UserInterfaceHandshake(json);
|
|
6997
|
+
// const fdc3UserInterfaceHello = Convert.toFdc3UserInterfaceHello(json);
|
|
6998
|
+
// const fdc3UserInterfaceMessage = Convert.toFdc3UserInterfaceMessage(json);
|
|
6999
|
+
// const fdc3UserInterfaceResolve = Convert.toFdc3UserInterfaceResolve(json);
|
|
7000
|
+
// const fdc3UserInterfaceResolveAction = Convert.toFdc3UserInterfaceResolveAction(json);
|
|
7001
|
+
// const fdc3UserInterfaceRestyle = Convert.toFdc3UserInterfaceRestyle(json);
|
|
7002
|
+
// const findInstancesRequest = Convert.toFindInstancesRequest(json);
|
|
7003
|
+
// const findInstancesResponse = Convert.toFindInstancesResponse(json);
|
|
7004
|
+
// const findIntentRequest = Convert.toFindIntentRequest(json);
|
|
7005
|
+
// const findIntentResponse = Convert.toFindIntentResponse(json);
|
|
7006
|
+
// const findIntentsByContextRequest = Convert.toFindIntentsByContextRequest(json);
|
|
7007
|
+
// const findIntentsByContextResponse = Convert.toFindIntentsByContextResponse(json);
|
|
7008
|
+
// const getAppMetadataRequest = Convert.toGetAppMetadataRequest(json);
|
|
7009
|
+
// const getAppMetadataResponse = Convert.toGetAppMetadataResponse(json);
|
|
7010
|
+
// const getCurrentChannelRequest = Convert.toGetCurrentChannelRequest(json);
|
|
7011
|
+
// const getCurrentChannelResponse = Convert.toGetCurrentChannelResponse(json);
|
|
7012
|
+
// const getCurrentContextRequest = Convert.toGetCurrentContextRequest(json);
|
|
7013
|
+
// const getCurrentContextResponse = Convert.toGetCurrentContextResponse(json);
|
|
7014
|
+
// const getInfoRequest = Convert.toGetInfoRequest(json);
|
|
7015
|
+
// const getInfoResponse = Convert.toGetInfoResponse(json);
|
|
7016
|
+
// const getOrCreateChannelRequest = Convert.toGetOrCreateChannelRequest(json);
|
|
7017
|
+
// const getOrCreateChannelResponse = Convert.toGetOrCreateChannelResponse(json);
|
|
7018
|
+
// const getUserChannelsRequest = Convert.toGetUserChannelsRequest(json);
|
|
7019
|
+
// const getUserChannelsResponse = Convert.toGetUserChannelsResponse(json);
|
|
7020
|
+
// const heartbeatAcknowledgementRequest = Convert.toHeartbeatAcknowledgementRequest(json);
|
|
7021
|
+
// const heartbeatEvent = Convert.toHeartbeatEvent(json);
|
|
7022
|
+
// const intentEvent = Convert.toIntentEvent(json);
|
|
7023
|
+
// const intentListenerUnsubscribeRequest = Convert.toIntentListenerUnsubscribeRequest(json);
|
|
7024
|
+
// const intentListenerUnsubscribeResponse = Convert.toIntentListenerUnsubscribeResponse(json);
|
|
7025
|
+
// const intentResultRequest = Convert.toIntentResultRequest(json);
|
|
7026
|
+
// const intentResultResponse = Convert.toIntentResultResponse(json);
|
|
7027
|
+
// const joinUserChannelRequest = Convert.toJoinUserChannelRequest(json);
|
|
7028
|
+
// const joinUserChannelResponse = Convert.toJoinUserChannelResponse(json);
|
|
7029
|
+
// const leaveCurrentChannelRequest = Convert.toLeaveCurrentChannelRequest(json);
|
|
7030
|
+
// const leaveCurrentChannelResponse = Convert.toLeaveCurrentChannelResponse(json);
|
|
7031
|
+
// const openRequest = Convert.toOpenRequest(json);
|
|
7032
|
+
// const openResponse = Convert.toOpenResponse(json);
|
|
7033
|
+
// const privateChannelAddEventListenerRequest = Convert.toPrivateChannelAddEventListenerRequest(json);
|
|
7034
|
+
// const privateChannelAddEventListenerResponse = Convert.toPrivateChannelAddEventListenerResponse(json);
|
|
7035
|
+
// const privateChannelDisconnectRequest = Convert.toPrivateChannelDisconnectRequest(json);
|
|
7036
|
+
// const privateChannelDisconnectResponse = Convert.toPrivateChannelDisconnectResponse(json);
|
|
7037
|
+
// const privateChannelOnAddContextListenerEvent = Convert.toPrivateChannelOnAddContextListenerEvent(json);
|
|
7038
|
+
// const privateChannelOnDisconnectEvent = Convert.toPrivateChannelOnDisconnectEvent(json);
|
|
7039
|
+
// const privateChannelOnUnsubscribeEvent = Convert.toPrivateChannelOnUnsubscribeEvent(json);
|
|
7040
|
+
// const privateChannelUnsubscribeEventListenerRequest = Convert.toPrivateChannelUnsubscribeEventListenerRequest(json);
|
|
7041
|
+
// const privateChannelUnsubscribeEventListenerResponse = Convert.toPrivateChannelUnsubscribeEventListenerResponse(json);
|
|
7042
|
+
// const raiseIntentForContextRequest = Convert.toRaiseIntentForContextRequest(json);
|
|
7043
|
+
// const raiseIntentForContextResponse = Convert.toRaiseIntentForContextResponse(json);
|
|
7044
|
+
// const raiseIntentRequest = Convert.toRaiseIntentRequest(json);
|
|
7045
|
+
// const raiseIntentResponse = Convert.toRaiseIntentResponse(json);
|
|
7046
|
+
// const raiseIntentResultResponse = Convert.toRaiseIntentResultResponse(json);
|
|
7047
|
+
//
|
|
7048
|
+
// These functions will throw an error if the JSON doesn't
|
|
7049
|
+
// match the expected interface, even if the JSON is valid.
|
|
7050
|
+
/**
|
|
7051
|
+
* Identifies the type of the message and it is typically set to the FDC3 function name that
|
|
7052
|
+
* the message relates to, e.g. 'findIntent', with 'Response' appended.
|
|
7053
|
+
*/
|
|
7054
|
+
// Converts JSON strings to/from your types
|
|
7055
|
+
// and asserts the results of JSON.parse at runtime
|
|
7056
|
+
function a$1(typ) {
|
|
7057
|
+
return { arrayItems: typ };
|
|
7058
|
+
}
|
|
7059
|
+
function u$1(...typs) {
|
|
7060
|
+
return { unionMembers: typs };
|
|
7061
|
+
}
|
|
7062
|
+
function o$1(props, additional) {
|
|
7063
|
+
return { props, additional };
|
|
7064
|
+
}
|
|
7065
|
+
function m$1(additional) {
|
|
7066
|
+
return { props: [], additional };
|
|
7067
|
+
}
|
|
7068
|
+
function r$1(name) {
|
|
7069
|
+
return { ref: name };
|
|
7070
|
+
}
|
|
7071
|
+
({
|
|
7072
|
+
WebConnectionProtocol1HelloPayload: o$1([
|
|
7073
|
+
{ json: 'actualUrl', js: 'actualUrl', typ: '' },
|
|
7074
|
+
{ json: 'channelSelector', js: 'channelSelector', typ: u$1(undefined, true) },
|
|
7075
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7076
|
+
{ json: 'identityUrl', js: 'identityUrl', typ: '' },
|
|
7077
|
+
{ json: 'intentResolver', js: 'intentResolver', typ: u$1(undefined, true) },
|
|
7078
|
+
], 'any'),
|
|
7079
|
+
WebConnectionProtocol3HandshakePayload: o$1([
|
|
7080
|
+
{ json: 'appLaunchTimeout', js: 'appLaunchTimeout', typ: u$1(undefined, 3.14) },
|
|
7081
|
+
{ json: 'channelSelectorUrl', js: 'channelSelectorUrl', typ: u$1(true, '') },
|
|
7082
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7083
|
+
{ json: 'intentResolverUrl', js: 'intentResolverUrl', typ: u$1(true, '') },
|
|
7084
|
+
{ json: 'messageExchangeTimeout', js: 'messageExchangeTimeout', typ: u$1(undefined, 3.14) },
|
|
7085
|
+
], false),
|
|
7086
|
+
WebConnectionProtocol4ValidateAppIdentityPayload: o$1([
|
|
7087
|
+
{ json: 'actualUrl', js: 'actualUrl', typ: '' },
|
|
7088
|
+
{ json: 'identityUrl', js: 'identityUrl', typ: '' },
|
|
7089
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$1(undefined, '') },
|
|
7090
|
+
{ json: 'instanceUuid', js: 'instanceUuid', typ: u$1(undefined, '') },
|
|
7091
|
+
], false),
|
|
7092
|
+
WebConnectionProtocol5ValidateAppIdentityFailedResponsePayload: o$1([{ json: 'message', js: 'message', typ: u$1(undefined, '') }], false),
|
|
7093
|
+
ImplementationMetadata: o$1([
|
|
7094
|
+
{ json: 'appMetadata', js: 'appMetadata', typ: r$1('AppMetadata') },
|
|
7095
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7096
|
+
{ json: 'optionalFeatures', js: 'optionalFeatures', typ: r$1('OptionalFeatures') },
|
|
7097
|
+
{ json: 'provider', js: 'provider', typ: '' },
|
|
7098
|
+
{ json: 'providerVersion', js: 'providerVersion', typ: u$1(undefined, '') },
|
|
7099
|
+
], false),
|
|
7100
|
+
AppMetadata: o$1([
|
|
7101
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7102
|
+
{ json: 'description', js: 'description', typ: u$1(undefined, '') },
|
|
7103
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u$1(undefined, '') },
|
|
7104
|
+
{ json: 'icons', js: 'icons', typ: u$1(undefined, a$1(r$1('Icon'))) },
|
|
7105
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$1(undefined, '') },
|
|
7106
|
+
{ json: 'instanceMetadata', js: 'instanceMetadata', typ: u$1(undefined, m$1('any')) },
|
|
7107
|
+
{ json: 'name', js: 'name', typ: u$1(undefined, '') },
|
|
7108
|
+
{ json: 'resultType', js: 'resultType', typ: u$1(undefined, u$1(null, '')) },
|
|
7109
|
+
{ json: 'screenshots', js: 'screenshots', typ: u$1(undefined, a$1(r$1('Image'))) },
|
|
7110
|
+
{ json: 'title', js: 'title', typ: u$1(undefined, '') },
|
|
7111
|
+
{ json: 'tooltip', js: 'tooltip', typ: u$1(undefined, '') },
|
|
7112
|
+
{ json: 'version', js: 'version', typ: u$1(undefined, '') },
|
|
7113
|
+
], false),
|
|
7114
|
+
Icon: o$1([
|
|
7115
|
+
{ json: 'size', js: 'size', typ: u$1(undefined, '') },
|
|
7116
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7117
|
+
{ json: 'type', js: 'type', typ: u$1(undefined, '') },
|
|
7118
|
+
], false),
|
|
7119
|
+
Image: o$1([
|
|
7120
|
+
{ json: 'label', js: 'label', typ: u$1(undefined, '') },
|
|
7121
|
+
{ json: 'size', js: 'size', typ: u$1(undefined, '') },
|
|
7122
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7123
|
+
{ json: 'type', js: 'type', typ: u$1(undefined, '') },
|
|
7124
|
+
], false),
|
|
7125
|
+
WebConnectionProtocolMessage: o$1([
|
|
7126
|
+
{ json: 'meta', js: 'meta', typ: r$1('ConnectionStepMetadata') },
|
|
7127
|
+
{ json: 'payload', js: 'payload', typ: u$1(undefined, m$1('any')) },
|
|
7128
|
+
{ json: 'type', js: 'type', typ: r$1('ConnectionStepMessageType') },
|
|
7129
|
+
], false),
|
|
7130
|
+
ConnectionStepMetadata: o$1([
|
|
7131
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7132
|
+
{ json: 'connectionAttemptUuid', js: 'connectionAttemptUuid', typ: u$1(undefined, '') },
|
|
7133
|
+
], false),
|
|
7134
|
+
AddContextListenerRequestMeta: o$1([
|
|
7135
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7136
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7137
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7138
|
+
], false),
|
|
7139
|
+
AppIdentifier: o$1([
|
|
7140
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7141
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u$1(undefined, '') },
|
|
7142
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$1(undefined, '') },
|
|
7143
|
+
], 'any'),
|
|
7144
|
+
AddContextListenerRequestPayload: o$1([
|
|
7145
|
+
{ json: 'channelId', js: 'channelId', typ: u$1(null, '') },
|
|
7146
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7147
|
+
], false),
|
|
7148
|
+
AddContextListenerResponseMeta: o$1([
|
|
7149
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7150
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7151
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7152
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7153
|
+
], false),
|
|
7154
|
+
AddContextListenerResponsePayload: o$1([
|
|
7155
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7156
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7157
|
+
], false),
|
|
7158
|
+
AddEventListenerRequestPayload: o$1([{ json: 'type', js: 'type', typ: u$1(r$1('FDC3EventType'), null) }], false),
|
|
7159
|
+
AddEventListenerResponsePayload: o$1([
|
|
7160
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7161
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7162
|
+
], false),
|
|
7163
|
+
PayloadObject: o$1([
|
|
7164
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FluffyError')) },
|
|
7165
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7166
|
+
], 'any'),
|
|
7167
|
+
AgentResponseMessageMeta: o$1([
|
|
7168
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7169
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7170
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7171
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7172
|
+
], false),
|
|
7173
|
+
AgentResponseMessageResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) }], 'any'),
|
|
7174
|
+
AppRequestMessageMeta: o$1([
|
|
7175
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7176
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7177
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7178
|
+
], false),
|
|
7179
|
+
BroadcastEventPayload: o$1([
|
|
7180
|
+
{ json: 'channelId', js: 'channelId', typ: u$1(null, '') },
|
|
7181
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7182
|
+
{ json: 'originatingApp', js: 'originatingApp', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7183
|
+
], false),
|
|
7184
|
+
Context: o$1([
|
|
7185
|
+
{ json: 'id', js: 'id', typ: u$1(undefined, m$1('any')) },
|
|
7186
|
+
{ json: 'name', js: 'name', typ: u$1(undefined, '') },
|
|
7187
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
7188
|
+
], 'any'),
|
|
7189
|
+
BroadcastResponseResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) }], 'any'),
|
|
7190
|
+
ChannelChangedEventPayload: o$1([{ json: 'newChannelId', js: 'newChannelId', typ: u$1(null, '') }], false),
|
|
7191
|
+
CreatePrivateChannelResponsePayload: o$1([
|
|
7192
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7193
|
+
{ json: 'privateChannel', js: 'privateChannel', typ: u$1(undefined, r$1('Channel')) },
|
|
7194
|
+
], false),
|
|
7195
|
+
Channel: o$1([
|
|
7196
|
+
{ json: 'displayMetadata', js: 'displayMetadata', typ: u$1(undefined, r$1('DisplayMetadata')) },
|
|
7197
|
+
{ json: 'id', js: 'id', typ: '' },
|
|
7198
|
+
{ json: 'type', js: 'type', typ: r$1('Type') },
|
|
7199
|
+
], false),
|
|
7200
|
+
DisplayMetadata: o$1([
|
|
7201
|
+
{ json: 'color', js: 'color', typ: u$1(undefined, '') },
|
|
7202
|
+
{ json: 'glyph', js: 'glyph', typ: u$1(undefined, '') },
|
|
7203
|
+
{ json: 'name', js: 'name', typ: u$1(undefined, '') },
|
|
7204
|
+
], false),
|
|
7205
|
+
Fdc3UserInterfaceChannelSelectedPayload: o$1([{ json: 'selected', js: 'selected', typ: u$1(null, '') }], false),
|
|
7206
|
+
Fdc3UserInterfaceChannelsPayload: o$1([
|
|
7207
|
+
{ json: 'selected', js: 'selected', typ: u$1(null, '') },
|
|
7208
|
+
{ json: 'userChannels', js: 'userChannels', typ: a$1(r$1('Channel')) },
|
|
7209
|
+
], false),
|
|
7210
|
+
InitialCSS: o$1([
|
|
7211
|
+
{ json: 'bottom', js: 'bottom', typ: u$1(undefined, '') },
|
|
7212
|
+
{ json: 'height', js: 'height', typ: u$1(undefined, '') },
|
|
7213
|
+
{ json: 'left', js: 'left', typ: u$1(undefined, '') },
|
|
7214
|
+
{ json: 'maxHeight', js: 'maxHeight', typ: u$1(undefined, '') },
|
|
7215
|
+
{ json: 'maxWidth', js: 'maxWidth', typ: u$1(undefined, '') },
|
|
7216
|
+
{ json: 'right', js: 'right', typ: u$1(undefined, '') },
|
|
7217
|
+
{ json: 'top', js: 'top', typ: u$1(undefined, '') },
|
|
7218
|
+
{ json: 'transition', js: 'transition', typ: u$1(undefined, '') },
|
|
7219
|
+
{ json: 'width', js: 'width', typ: u$1(undefined, '') },
|
|
7220
|
+
{ json: 'zIndex', js: 'zIndex', typ: u$1(undefined, '') },
|
|
7221
|
+
], 'any'),
|
|
7222
|
+
Fdc3UserInterfaceMessage: o$1([
|
|
7223
|
+
{ json: 'payload', js: 'payload', typ: u$1(undefined, m$1('any')) },
|
|
7224
|
+
{ json: 'type', js: 'type', typ: r$1('Fdc3UserInterfaceMessageType') },
|
|
7225
|
+
], false),
|
|
7226
|
+
IntentMetadata: o$1([
|
|
7227
|
+
{ json: 'displayName', js: 'displayName', typ: u$1(undefined, '') },
|
|
7228
|
+
{ json: 'name', js: 'name', typ: '' },
|
|
7229
|
+
], false),
|
|
7230
|
+
Fdc3UserInterfaceResolveActionPayload: o$1([
|
|
7231
|
+
{ json: 'action', js: 'action', typ: r$1('Action') },
|
|
7232
|
+
{ json: 'appIdentifier', js: 'appIdentifier', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7233
|
+
{ json: 'intent', js: 'intent', typ: u$1(undefined, '') },
|
|
7234
|
+
], false),
|
|
7235
|
+
UpdatedCSS: o$1([
|
|
7236
|
+
{ json: 'bottom', js: 'bottom', typ: u$1(undefined, '') },
|
|
7237
|
+
{ json: 'height', js: 'height', typ: u$1(undefined, '') },
|
|
7238
|
+
{ json: 'left', js: 'left', typ: u$1(undefined, '') },
|
|
7239
|
+
{ json: 'maxHeight', js: 'maxHeight', typ: u$1(undefined, '') },
|
|
7240
|
+
{ json: 'maxWidth', js: 'maxWidth', typ: u$1(undefined, '') },
|
|
7241
|
+
{ json: 'right', js: 'right', typ: u$1(undefined, '') },
|
|
7242
|
+
{ json: 'top', js: 'top', typ: u$1(undefined, '') },
|
|
7243
|
+
{ json: 'transition', js: 'transition', typ: u$1(undefined, '') },
|
|
7244
|
+
{ json: 'width', js: 'width', typ: u$1(undefined, '') },
|
|
7245
|
+
{ json: 'zIndex', js: 'zIndex', typ: u$1(undefined, '') },
|
|
7246
|
+
], 'any'),
|
|
7247
|
+
FindInstancesResponsePayload: o$1([
|
|
7248
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7249
|
+
{ json: 'appIdentifiers', js: 'appIdentifiers', typ: u$1(undefined, a$1(r$1('AppMetadata'))) },
|
|
7250
|
+
], false),
|
|
7251
|
+
FindIntentRequestPayload: o$1([
|
|
7252
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, r$1('Context')) },
|
|
7253
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7254
|
+
{ json: 'resultType', js: 'resultType', typ: u$1(undefined, '') },
|
|
7255
|
+
], false),
|
|
7256
|
+
FindIntentResponsePayload: o$1([
|
|
7257
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7258
|
+
{ json: 'appIntent', js: 'appIntent', typ: u$1(undefined, r$1('AppIntent')) },
|
|
7259
|
+
], false),
|
|
7260
|
+
FindIntentsByContextRequestPayload: o$1([
|
|
7261
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7262
|
+
{ json: 'resultType', js: 'resultType', typ: u$1(undefined, '') },
|
|
7263
|
+
], false),
|
|
7264
|
+
FindIntentsByContextResponsePayload: o$1([
|
|
7265
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7266
|
+
{ json: 'appIntents', js: 'appIntents', typ: u$1(undefined, a$1(r$1('AppIntent'))) },
|
|
7267
|
+
], false),
|
|
7268
|
+
GetAppMetadataResponsePayload: o$1([
|
|
7269
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7270
|
+
{ json: 'appMetadata', js: 'appMetadata', typ: u$1(undefined, r$1('AppMetadata')) },
|
|
7271
|
+
], false),
|
|
7272
|
+
GetCurrentChannelResponsePayload: o$1([
|
|
7273
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7274
|
+
{ json: 'channel', js: 'channel', typ: u$1(undefined, u$1(r$1('Channel'), null)) },
|
|
7275
|
+
], false),
|
|
7276
|
+
GetCurrentContextRequestPayload: o$1([
|
|
7277
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7278
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7279
|
+
], false),
|
|
7280
|
+
GetCurrentContextResponsePayload: o$1([
|
|
7281
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7282
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, u$1(null, r$1('Context'))) },
|
|
7283
|
+
], false),
|
|
7284
|
+
GetInfoResponsePayload: o$1([
|
|
7285
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7286
|
+
{ json: 'implementationMetadata', js: 'implementationMetadata', typ: u$1(undefined, r$1('ImplementationMetadata')) },
|
|
7287
|
+
], false),
|
|
7288
|
+
GetOrCreateChannelResponsePayload: o$1([
|
|
7289
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7290
|
+
{ json: 'channel', js: 'channel', typ: u$1(undefined, r$1('Channel')) },
|
|
7291
|
+
], false),
|
|
7292
|
+
GetUserChannelsResponsePayload: o$1([
|
|
7293
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7294
|
+
{ json: 'userChannels', js: 'userChannels', typ: u$1(undefined, a$1(r$1('Channel'))) },
|
|
7295
|
+
], false),
|
|
7296
|
+
IntentEventPayload: o$1([
|
|
7297
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7298
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7299
|
+
{ json: 'originatingApp', js: 'originatingApp', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7300
|
+
{ json: 'raiseIntentRequestUuid', js: 'raiseIntentRequestUuid', typ: '' },
|
|
7301
|
+
], false),
|
|
7302
|
+
IntentResult: o$1([
|
|
7303
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, r$1('Context')) },
|
|
7304
|
+
{ json: 'channel', js: 'channel', typ: u$1(undefined, r$1('Channel')) },
|
|
7305
|
+
], false),
|
|
7306
|
+
JoinUserChannelResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) }], false),
|
|
7307
|
+
LeaveCurrentChannelResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) }], false),
|
|
7308
|
+
OpenRequestPayload: o$1([
|
|
7309
|
+
{ json: 'app', js: 'app', typ: r$1('AppIdentifier') },
|
|
7310
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, r$1('Context')) },
|
|
7311
|
+
], false),
|
|
7312
|
+
OpenResponsePayload: o$1([
|
|
7313
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('OpenErrorResponsePayload')) },
|
|
7314
|
+
{ json: 'appIdentifier', js: 'appIdentifier', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7315
|
+
], false),
|
|
7316
|
+
PrivateChannelAddEventListenerRequestPayload: o$1([
|
|
7317
|
+
{ json: 'listenerType', js: 'listenerType', typ: u$1(r$1('PrivateChannelEventType'), null) },
|
|
7318
|
+
{ json: 'privateChannelId', js: 'privateChannelId', typ: '' },
|
|
7319
|
+
], false),
|
|
7320
|
+
PrivateChannelAddEventListenerResponsePayload: o$1([
|
|
7321
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7322
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7323
|
+
], false),
|
|
7324
|
+
PrivateChannelDisconnectResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) }], false),
|
|
7325
|
+
PrivateChannelOnAddContextListenerEventPayload: o$1([
|
|
7326
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7327
|
+
{ json: 'privateChannelId', js: 'privateChannelId', typ: '' },
|
|
7328
|
+
], false),
|
|
7329
|
+
PrivateChannelOnUnsubscribeEventPayload: o$1([
|
|
7330
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7331
|
+
{ json: 'privateChannelId', js: 'privateChannelId', typ: '' },
|
|
7332
|
+
], false),
|
|
7333
|
+
RaiseIntentForContextRequestPayload: o$1([
|
|
7334
|
+
{ json: 'app', js: 'app', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7335
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7336
|
+
], false),
|
|
7337
|
+
RaiseIntentForContextResponsePayload: o$1([
|
|
7338
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7339
|
+
{ json: 'intentResolution', js: 'intentResolution', typ: u$1(undefined, r$1('IntentResolution')) },
|
|
7340
|
+
{ json: 'appIntents', js: 'appIntents', typ: u$1(undefined, a$1(r$1('AppIntent'))) },
|
|
7341
|
+
], false),
|
|
7342
|
+
RaiseIntentRequestPayload: o$1([
|
|
7343
|
+
{ json: 'app', js: 'app', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7344
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7345
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7346
|
+
], false),
|
|
7347
|
+
RaiseIntentResponsePayload: o$1([
|
|
7348
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7349
|
+
{ json: 'intentResolution', js: 'intentResolution', typ: u$1(undefined, r$1('IntentResolution')) },
|
|
7350
|
+
{ json: 'appIntent', js: 'appIntent', typ: u$1(undefined, r$1('AppIntent')) },
|
|
7351
|
+
], false),
|
|
7352
|
+
RaiseIntentResultResponsePayload: o$1([
|
|
7353
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7354
|
+
{ json: 'intentResult', js: 'intentResult', typ: u$1(undefined, r$1('IntentResult')) },
|
|
7355
|
+
], false)});
|
|
7356
|
+
|
|
7357
|
+
// To parse this data:
|
|
7358
|
+
//
|
|
7359
|
+
// import { Convert, AgentErrorResponseMessage, AgentRequestMessage, AgentResponseMessage, BridgeErrorResponseMessage, BridgeRequestMessage, BridgeResponseMessage, BroadcastAgentRequest, BroadcastBridgeRequest, ConnectionStepMessage, ConnectionStep2Hello, ConnectionStep3Handshake, ConnectionStep4AuthenticationFailed, ConnectionStep6ConnectedAgentsUpdate, FindInstancesAgentErrorResponse, FindInstancesAgentRequest, FindInstancesAgentResponse, FindInstancesBridgeErrorResponse, FindInstancesBridgeRequest, FindInstancesBridgeResponse, FindIntentAgentErrorResponse, FindIntentAgentRequest, FindIntentAgentResponse, FindIntentBridgeErrorResponse, FindIntentBridgeRequest, FindIntentBridgeResponse, FindIntentsByContextAgentErrorResponse, FindIntentsByContextAgentRequest, FindIntentsByContextAgentResponse, FindIntentsByContextBridgeErrorResponse, FindIntentsByContextBridgeRequest, FindIntentsByContextBridgeResponse, GetAppMetadataAgentErrorResponse, GetAppMetadataAgentRequest, GetAppMetadataAgentResponse, GetAppMetadataBridgeErrorResponse, GetAppMetadataBridgeRequest, GetAppMetadataBridgeResponse, OpenAgentErrorResponse, OpenAgentRequest, OpenAgentResponse, OpenBridgeErrorResponse, OpenBridgeRequest, OpenBridgeResponse, PrivateChannelBroadcastAgentRequest, PrivateChannelBroadcastBridgeRequest, PrivateChannelEventListenerAddedAgentRequest, PrivateChannelEventListenerAddedBridgeRequest, PrivateChannelEventListenerRemovedAgentRequest, PrivateChannelEventListenerRemovedBridgeRequest, PrivateChannelOnAddContextListenerAgentRequest, PrivateChannelOnAddContextListenerBridgeRequest, PrivateChannelOnDisconnectAgentRequest, PrivateChannelOnDisconnectBridgeRequest, PrivateChannelOnUnsubscribeAgentRequest, PrivateChannelOnUnsubscribeBridgeRequest, RaiseIntentAgentErrorResponse, RaiseIntentAgentRequest, RaiseIntentAgentResponse, RaiseIntentBridgeErrorResponse, RaiseIntentBridgeRequest, RaiseIntentBridgeResponse, RaiseIntentResultAgentErrorResponse, RaiseIntentResultAgentResponse, RaiseIntentResultBridgeErrorResponse, RaiseIntentResultBridgeResponse } from "./file";
|
|
6078
7360
|
//
|
|
6079
|
-
// const fDC3DesktopAgentAPISchema = Convert.toFDC3DesktopAgentAPISchema(json);
|
|
6080
7361
|
// const agentErrorResponseMessage = Convert.toAgentErrorResponseMessage(json);
|
|
6081
7362
|
// const agentRequestMessage = Convert.toAgentRequestMessage(json);
|
|
6082
7363
|
// const agentResponseMessage = Convert.toAgentResponseMessage(json);
|
|
@@ -6085,7 +7366,7 @@
|
|
|
6085
7366
|
// const bridgeResponseMessage = Convert.toBridgeResponseMessage(json);
|
|
6086
7367
|
// const broadcastAgentRequest = Convert.toBroadcastAgentRequest(json);
|
|
6087
7368
|
// const broadcastBridgeRequest = Convert.toBroadcastBridgeRequest(json);
|
|
6088
|
-
// const
|
|
7369
|
+
// const bridgeCommonDefinitions = Convert.toBridgeCommonDefinitions(json);
|
|
6089
7370
|
// const connectionStepMessage = Convert.toConnectionStepMessage(json);
|
|
6090
7371
|
// const connectionStep2Hello = Convert.toConnectionStep2Hello(json);
|
|
6091
7372
|
// const connectionStep3Handshake = Convert.toConnectionStep3Handshake(json);
|
|
@@ -6143,17 +7424,439 @@
|
|
|
6143
7424
|
// const raiseIntentResultAgentResponse = Convert.toRaiseIntentResultAgentResponse(json);
|
|
6144
7425
|
// const raiseIntentResultBridgeErrorResponse = Convert.toRaiseIntentResultBridgeErrorResponse(json);
|
|
6145
7426
|
// const raiseIntentResultBridgeResponse = Convert.toRaiseIntentResultBridgeResponse(json);
|
|
6146
|
-
// const context = Convert.toContext(json);
|
|
6147
7427
|
//
|
|
6148
7428
|
// These functions will throw an error if the JSON doesn't
|
|
6149
7429
|
// match the expected interface, even if the JSON is valid.
|
|
6150
7430
|
// Converts JSON strings to/from your types
|
|
6151
7431
|
// and asserts the results of JSON.parse at runtime
|
|
7432
|
+
function a(typ) {
|
|
7433
|
+
return { arrayItems: typ };
|
|
7434
|
+
}
|
|
7435
|
+
function u(...typs) {
|
|
7436
|
+
return { unionMembers: typs };
|
|
7437
|
+
}
|
|
7438
|
+
function o(props, additional) {
|
|
7439
|
+
return { props, additional };
|
|
7440
|
+
}
|
|
7441
|
+
function m(additional) {
|
|
7442
|
+
return { props: [], additional };
|
|
7443
|
+
}
|
|
7444
|
+
function r(name) {
|
|
7445
|
+
return { ref: name };
|
|
7446
|
+
}
|
|
7447
|
+
({
|
|
7448
|
+
AgentRequestMetadata: o([
|
|
7449
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7450
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7451
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7452
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7453
|
+
], false),
|
|
7454
|
+
BridgeParticipantIdentifier: o([
|
|
7455
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7456
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7457
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7458
|
+
], 'any'),
|
|
7459
|
+
SourceIdentifier: o([
|
|
7460
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7461
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7462
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7463
|
+
], 'any'),
|
|
7464
|
+
ResponseErrorMessagePayload: o([{ json: 'error', js: 'error', typ: u(undefined, r('ResponseErrorDetail')) }], 'any'),
|
|
7465
|
+
BridgeRequestMetadata: o([
|
|
7466
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7467
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7468
|
+
{ json: 'source', js: 'source', typ: r('BridgeParticipantIdentifier') },
|
|
7469
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7470
|
+
], false),
|
|
7471
|
+
BridgeResponseMessageMeta: o([
|
|
7472
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7473
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7474
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7475
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7476
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7477
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7478
|
+
], false),
|
|
7479
|
+
SourceObject: o([
|
|
7480
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7481
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7482
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7483
|
+
], 'any'),
|
|
7484
|
+
Context: o([
|
|
7485
|
+
{ json: 'id', js: 'id', typ: u(undefined, m('any')) },
|
|
7486
|
+
{ json: 'name', js: 'name', typ: u(undefined, '') },
|
|
7487
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
7488
|
+
], 'any'),
|
|
7489
|
+
MetaSource: o([
|
|
7490
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7491
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7492
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7493
|
+
], 'any'),
|
|
7494
|
+
ConnectionStepMetadata: o([
|
|
7495
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: u(undefined, '') },
|
|
7496
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: u(undefined, '') },
|
|
7497
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7498
|
+
], false),
|
|
7499
|
+
ConnectionStep2HelloPayload: o([
|
|
7500
|
+
{ json: 'authRequired', js: 'authRequired', typ: true },
|
|
7501
|
+
{ json: 'authToken', js: 'authToken', typ: u(undefined, '') },
|
|
7502
|
+
{ json: 'desktopAgentBridgeVersion', js: 'desktopAgentBridgeVersion', typ: '' },
|
|
7503
|
+
{ json: 'supportedFDC3Versions', js: 'supportedFDC3Versions', typ: a('') },
|
|
7504
|
+
], false),
|
|
7505
|
+
ConnectionStep3HandshakePayload: o([
|
|
7506
|
+
{ json: 'authToken', js: 'authToken', typ: u(undefined, '') },
|
|
7507
|
+
{ json: 'channelsState', js: 'channelsState', typ: m(a(r('Context'))) },
|
|
7508
|
+
{ json: 'implementationMetadata', js: 'implementationMetadata', typ: r('ConnectingAgentImplementationMetadata') },
|
|
7509
|
+
{ json: 'requestedName', js: 'requestedName', typ: '' },
|
|
7510
|
+
], false),
|
|
7511
|
+
ConnectingAgentImplementationMetadata: o([
|
|
7512
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7513
|
+
{ json: 'optionalFeatures', js: 'optionalFeatures', typ: r('OptionalFeatures') },
|
|
7514
|
+
{ json: 'provider', js: 'provider', typ: '' },
|
|
7515
|
+
{ json: 'providerVersion', js: 'providerVersion', typ: u(undefined, '') },
|
|
7516
|
+
], false),
|
|
7517
|
+
ConnectionStep4AuthenticationFailedPayload: o([{ json: 'message', js: 'message', typ: u(undefined, '') }], false),
|
|
7518
|
+
ConnectionStep6ConnectedAgentsUpdatePayload: o([
|
|
7519
|
+
{ json: 'addAgent', js: 'addAgent', typ: u(undefined, '') },
|
|
7520
|
+
{ json: 'allAgents', js: 'allAgents', typ: a(r('DesktopAgentImplementationMetadata')) },
|
|
7521
|
+
{ json: 'channelsState', js: 'channelsState', typ: u(undefined, m(a(r('Context')))) },
|
|
7522
|
+
{ json: 'removeAgent', js: 'removeAgent', typ: u(undefined, '') },
|
|
7523
|
+
], false),
|
|
7524
|
+
DesktopAgentImplementationMetadata: o([
|
|
7525
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7526
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7527
|
+
{ json: 'optionalFeatures', js: 'optionalFeatures', typ: r('OptionalFeatures') },
|
|
7528
|
+
{ json: 'provider', js: 'provider', typ: '' },
|
|
7529
|
+
{ json: 'providerVersion', js: 'providerVersion', typ: u(undefined, '') },
|
|
7530
|
+
], false),
|
|
7531
|
+
FindInstancesAgentRequestMeta: o([
|
|
7532
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7533
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7534
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7535
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7536
|
+
], false),
|
|
7537
|
+
DestinationObject: o([
|
|
7538
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7539
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7540
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7541
|
+
], 'any'),
|
|
7542
|
+
AppIdentifier: o([
|
|
7543
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7544
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7545
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7546
|
+
], 'any'),
|
|
7547
|
+
AppMetadata: o([
|
|
7548
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7549
|
+
{ json: 'description', js: 'description', typ: u(undefined, '') },
|
|
7550
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7551
|
+
{ json: 'icons', js: 'icons', typ: u(undefined, a(r('Icon'))) },
|
|
7552
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7553
|
+
{ json: 'instanceMetadata', js: 'instanceMetadata', typ: u(undefined, m('any')) },
|
|
7554
|
+
{ json: 'name', js: 'name', typ: u(undefined, '') },
|
|
7555
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, u(null, '')) },
|
|
7556
|
+
{ json: 'screenshots', js: 'screenshots', typ: u(undefined, a(r('Image'))) },
|
|
7557
|
+
{ json: 'title', js: 'title', typ: u(undefined, '') },
|
|
7558
|
+
{ json: 'tooltip', js: 'tooltip', typ: u(undefined, '') },
|
|
7559
|
+
{ json: 'version', js: 'version', typ: u(undefined, '') },
|
|
7560
|
+
], false),
|
|
7561
|
+
Icon: o([
|
|
7562
|
+
{ json: 'size', js: 'size', typ: u(undefined, '') },
|
|
7563
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7564
|
+
{ json: 'type', js: 'type', typ: u(undefined, '') },
|
|
7565
|
+
], false),
|
|
7566
|
+
Image: o([
|
|
7567
|
+
{ json: 'label', js: 'label', typ: u(undefined, '') },
|
|
7568
|
+
{ json: 'size', js: 'size', typ: u(undefined, '') },
|
|
7569
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7570
|
+
{ json: 'type', js: 'type', typ: u(undefined, '') },
|
|
7571
|
+
], false),
|
|
7572
|
+
FindInstancesBridgeRequestMeta: o([
|
|
7573
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7574
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7575
|
+
{ json: 'source', js: 'source', typ: r('MetaSourceObject') },
|
|
7576
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7577
|
+
], false),
|
|
7578
|
+
MetaSourceObject: o([
|
|
7579
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7580
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7581
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7582
|
+
], 'any'),
|
|
7583
|
+
FindIntentAgentRequestMeta: o([
|
|
7584
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7585
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7586
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7587
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7588
|
+
], false),
|
|
7589
|
+
FindIntentAgentRequestPayload: o([
|
|
7590
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7591
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7592
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7593
|
+
], false),
|
|
7594
|
+
IntentMetadata: o([
|
|
7595
|
+
{ json: 'displayName', js: 'displayName', typ: u(undefined, '') },
|
|
7596
|
+
{ json: 'name', js: 'name', typ: '' },
|
|
7597
|
+
], false),
|
|
7598
|
+
FindIntentBridgeRequestMeta: o([
|
|
7599
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7600
|
+
{ json: 'source', js: 'source', typ: r('BridgeParticipantIdentifier') },
|
|
7601
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7602
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7603
|
+
], false),
|
|
7604
|
+
FindIntentBridgeRequestPayload: o([
|
|
7605
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7606
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7607
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7608
|
+
], false),
|
|
7609
|
+
FindIntentBridgeResponseMeta: o([
|
|
7610
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7611
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7612
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7613
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7614
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7615
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7616
|
+
], false),
|
|
7617
|
+
FindIntentsByContextAgentRequestMeta: o([
|
|
7618
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7619
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7620
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7621
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7622
|
+
], false),
|
|
7623
|
+
FindIntentsByContextAgentRequestPayload: o([
|
|
7624
|
+
{ json: 'context', js: 'context', typ: r('Context') },
|
|
7625
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7626
|
+
], false),
|
|
7627
|
+
FindIntentsByContextBridgeRequestMeta: o([
|
|
7628
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7629
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7630
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7631
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7632
|
+
], false),
|
|
7633
|
+
FindIntentsByContextBridgeRequestPayload: o([
|
|
7634
|
+
{ json: 'context', js: 'context', typ: r('Context') },
|
|
7635
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7636
|
+
], false),
|
|
7637
|
+
FindIntentsByContextBridgeResponseMeta: o([
|
|
7638
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7639
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7640
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7641
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7642
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7643
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7644
|
+
], false),
|
|
7645
|
+
GetAppMetadataAgentRequestMeta: o([
|
|
7646
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7647
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7648
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7649
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7650
|
+
], false),
|
|
7651
|
+
AppObject: o([
|
|
7652
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7653
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7654
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7655
|
+
], 'any'),
|
|
7656
|
+
GetAppMetadataBridgeRequestMeta: o([
|
|
7657
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7658
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7659
|
+
{ json: 'source', js: 'source', typ: r('MetaSourceObject') },
|
|
7660
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7661
|
+
], false),
|
|
7662
|
+
GetAppMetadataBridgeResponseMeta: o([
|
|
7663
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7664
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7665
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7666
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7667
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7668
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7669
|
+
], false),
|
|
7670
|
+
OpenAgentRequestMeta: o([
|
|
7671
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7672
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7673
|
+
{ json: 'source', js: 'source', typ: r('SourceObject') },
|
|
7674
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7675
|
+
], false),
|
|
7676
|
+
OpenAgentRequestPayload: o([
|
|
7677
|
+
{ json: 'app', js: 'app', typ: r('AppToOpen') },
|
|
7678
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7679
|
+
], false),
|
|
7680
|
+
AppToOpen: o([
|
|
7681
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7682
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7683
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7684
|
+
], 'any'),
|
|
7685
|
+
OpenBridgeRequestMeta: o([
|
|
7686
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7687
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7688
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7689
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7690
|
+
], false),
|
|
7691
|
+
OpenBridgeRequestPayload: o([
|
|
7692
|
+
{ json: 'app', js: 'app', typ: r('AppToOpen') },
|
|
7693
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7694
|
+
], false),
|
|
7695
|
+
OpenBridgeResponseMeta: o([
|
|
7696
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7697
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7698
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7699
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7700
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7701
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7702
|
+
], false),
|
|
7703
|
+
PrivateChannelBroadcastAgentRequestMeta: o([
|
|
7704
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7705
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7706
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7707
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7708
|
+
], false),
|
|
7709
|
+
MetaDestination: o([
|
|
7710
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7711
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7712
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7713
|
+
], 'any'),
|
|
7714
|
+
PrivateChannelBroadcastBridgeRequestMeta: o([
|
|
7715
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7716
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7717
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7718
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7719
|
+
], false),
|
|
7720
|
+
PrivateChannelEventListenerAddedAgentRequestMeta: o([
|
|
7721
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7722
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7723
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7724
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7725
|
+
], false),
|
|
7726
|
+
PrivateChannelEventListenerAddedBridgeRequestMeta: o([
|
|
7727
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7728
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7729
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7730
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7731
|
+
], false),
|
|
7732
|
+
PrivateChannelEventListenerRemovedAgentRequestMeta: o([
|
|
7733
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7734
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7735
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7736
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7737
|
+
], false),
|
|
7738
|
+
PrivateChannelEventListenerRemovedBridgeRequestMeta: o([
|
|
7739
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7740
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7741
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7742
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7743
|
+
], false),
|
|
7744
|
+
PrivateChannelOnAddContextListenerAgentRequestMeta: o([
|
|
7745
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7746
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7747
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7748
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7749
|
+
], false),
|
|
7750
|
+
PrivateChannelOnAddContextListenerAgentRequestPayload: o([
|
|
7751
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7752
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7753
|
+
], false),
|
|
7754
|
+
PrivateChannelOnAddContextListenerBridgeRequestMeta: o([
|
|
7755
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7756
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7757
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7758
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7759
|
+
], false),
|
|
7760
|
+
PrivateChannelOnAddContextListenerBridgeRequestPayload: o([
|
|
7761
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7762
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7763
|
+
], false),
|
|
7764
|
+
PrivateChannelOnDisconnectAgentRequestMeta: o([
|
|
7765
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7766
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7767
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7768
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7769
|
+
], false),
|
|
7770
|
+
PrivateChannelOnDisconnectBridgeRequestMeta: o([
|
|
7771
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7772
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7773
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7774
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7775
|
+
], false),
|
|
7776
|
+
PrivateChannelOnUnsubscribeAgentRequestMeta: o([
|
|
7777
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7778
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7779
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7780
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7781
|
+
], false),
|
|
7782
|
+
PrivateChannelOnUnsubscribeAgentRequestPayload: o([
|
|
7783
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7784
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7785
|
+
], false),
|
|
7786
|
+
ERequestMetadata: o([
|
|
7787
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7788
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7789
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7790
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7791
|
+
], false),
|
|
7792
|
+
PrivateChannelOnUnsubscribeBridgeRequestPayload: o([
|
|
7793
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7794
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7795
|
+
], false),
|
|
7796
|
+
AppDestinationIdentifier: o([
|
|
7797
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7798
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7799
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7800
|
+
], 'any'),
|
|
7801
|
+
RaiseIntentBridgeResponseMeta: o([
|
|
7802
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7803
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7804
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7805
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7806
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7807
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7808
|
+
], false),
|
|
7809
|
+
IntentResult: o([
|
|
7810
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7811
|
+
{ json: 'channel', js: 'channel', typ: u(undefined, r('Channel')) },
|
|
7812
|
+
], false),
|
|
7813
|
+
Channel: o([
|
|
7814
|
+
{ json: 'displayMetadata', js: 'displayMetadata', typ: u(undefined, r('DisplayMetadata')) },
|
|
7815
|
+
{ json: 'id', js: 'id', typ: '' },
|
|
7816
|
+
{ json: 'type', js: 'type', typ: r('Type') },
|
|
7817
|
+
], false),
|
|
7818
|
+
DisplayMetadata: o([
|
|
7819
|
+
{ json: 'color', js: 'color', typ: u(undefined, '') },
|
|
7820
|
+
{ json: 'glyph', js: 'glyph', typ: u(undefined, '') },
|
|
7821
|
+
{ json: 'name', js: 'name', typ: u(undefined, '') },
|
|
7822
|
+
], false),
|
|
7823
|
+
RaiseIntentResultBridgeResponseMeta: o([
|
|
7824
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7825
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7826
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7827
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7828
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7829
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7830
|
+
], false)});
|
|
6152
7831
|
|
|
6153
7832
|
/**
|
|
6154
7833
|
* SPDX-License-Identifier: Apache-2.0
|
|
6155
7834
|
* Copyright FINOS FDC3 contributors - see NOTICE file
|
|
6156
7835
|
*/
|
|
7836
|
+
/**
|
|
7837
|
+
* Contains constants representing the errors that can be encountered when trying to connect to a web-based Desktop Agent with the getAgent function.
|
|
7838
|
+
*/
|
|
7839
|
+
var AgentError;
|
|
7840
|
+
(function (AgentError) {
|
|
7841
|
+
/** Returned if no Desktop Agent was found by any means available or
|
|
7842
|
+
* if the Agent previously connected to is not contactable on a
|
|
7843
|
+
* subsequent connection attempt.*/
|
|
7844
|
+
AgentError["AgentNotFound"] = "AgentNotFound";
|
|
7845
|
+
/** Returned if validation of the app identity by the Desktop Agent
|
|
7846
|
+
* Failed or the app is not being allowed to connect to the Desktop Agent
|
|
7847
|
+
* for another reason. */
|
|
7848
|
+
AgentError["AccessDenied"] = "AccessDenied";
|
|
7849
|
+
/** Returned if an error or exception occurs while trying to set
|
|
7850
|
+
* up communication with a Desktop Agent. */
|
|
7851
|
+
AgentError["ErrorOnConnect"] = "ErrorOnConnect";
|
|
7852
|
+
/** Returned if the failover function is not a function, or it did not
|
|
7853
|
+
* resolve to one of the allowed types. */
|
|
7854
|
+
AgentError["InvalidFailover"] = "InvalidFailover";
|
|
7855
|
+
/** Returned if an API call rejects after a timeout. Used where an API call
|
|
7856
|
+
* is not aligned to another error enumeration.
|
|
7857
|
+
*/
|
|
7858
|
+
AgentError["ApiTimeout"] = "ApiTimeout";
|
|
7859
|
+
})(AgentError || (AgentError = {}));
|
|
6157
7860
|
/** Constants representing the errors that can be encountered when calling the `open` method on the DesktopAgent object (`fdc3`). */
|
|
6158
7861
|
var OpenError;
|
|
6159
7862
|
(function (OpenError) {
|
|
@@ -6169,6 +7872,8 @@
|
|
|
6169
7872
|
OpenError["MalformedContext"] = "MalformedContext";
|
|
6170
7873
|
/** @experimental Returned if the specified Desktop Agent is not found, via a connected Desktop Agent Bridge.*/
|
|
6171
7874
|
OpenError["DesktopAgentNotFound"] = "DesktopAgentNotFound";
|
|
7875
|
+
/** Returned if a timeout occurs before a call to open is resolved for any reason other than the not adding its context listener in time.*/
|
|
7876
|
+
OpenError["ApiTimeout"] = "ApiTimeout";
|
|
6172
7877
|
})(OpenError || (OpenError = {}));
|
|
6173
7878
|
/** Constants representing the errors that can be encountered when calling the `findIntent`, `findIntentsByContext`, `raiseIntent` or `raiseIntentForContext` methods on the DesktopAgent (`fdc3`). */
|
|
6174
7879
|
var ResolveError;
|
|
@@ -6191,6 +7896,8 @@
|
|
|
6191
7896
|
ResolveError["MalformedContext"] = "MalformedContext";
|
|
6192
7897
|
/** @experimental Returned if the specified Desktop Agent is not found, via a connected Desktop Agent Bridge.*/
|
|
6193
7898
|
ResolveError["DesktopAgentNotFound"] = "DesktopAgentNotFound";
|
|
7899
|
+
/** Returned if a timeout occurs before the API call is resolved for any reason other than the resolver timing out (use ResolverTimeout) or an app launched by a raiseIntent function doesn't add its intent listener in time (use IntentDeliveryFailed).*/
|
|
7900
|
+
ResolveError["ApiTimeout"] = "ApiTimeout";
|
|
6194
7901
|
})(ResolveError || (ResolveError = {}));
|
|
6195
7902
|
var ResultError;
|
|
6196
7903
|
(function (ResultError) {
|
|
@@ -6198,6 +7905,8 @@
|
|
|
6198
7905
|
ResultError["NoResultReturned"] = "NoResultReturned";
|
|
6199
7906
|
/** Returned if the Intent handler function processing the raised intent throws an error or rejects the Promise it returned. */
|
|
6200
7907
|
ResultError["IntentHandlerRejected"] = "IntentHandlerRejected";
|
|
7908
|
+
/** Returned if a timeout occurs before the getResult() API call is resolved.*/
|
|
7909
|
+
ResultError["ApiTimeout"] = "ApiTimeout";
|
|
6201
7910
|
})(ResultError || (ResultError = {}));
|
|
6202
7911
|
var ChannelError;
|
|
6203
7912
|
(function (ChannelError) {
|
|
@@ -6209,6 +7918,8 @@
|
|
|
6209
7918
|
ChannelError["CreationFailed"] = "CreationFailed";
|
|
6210
7919
|
/** Returned if a call to the `broadcast` functions is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/
|
|
6211
7920
|
ChannelError["MalformedContext"] = "MalformedContext";
|
|
7921
|
+
/** Returned if a timeout occurs before any Channel related API call is resolved.*/
|
|
7922
|
+
ChannelError["ApiTimeout"] = "ApiTimeout";
|
|
6212
7923
|
})(ChannelError || (ChannelError = {}));
|
|
6213
7924
|
var BridgingError;
|
|
6214
7925
|
(function (BridgingError) {
|
|
@@ -6221,28 +7932,51 @@
|
|
|
6221
7932
|
/** @experimental Returned if a message to a Bridge deviates from the schema for that message sufficiently that it could not be processed. */
|
|
6222
7933
|
BridgingError["MalformedMessage"] = "MalformedMessage";
|
|
6223
7934
|
})(BridgingError || (BridgingError = {}));
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
7935
|
+
|
|
7936
|
+
/**
|
|
7937
|
+
* Type representing the different log-levels that can be set.
|
|
7938
|
+
*/
|
|
7939
|
+
var LogLevel;
|
|
7940
|
+
(function (LogLevel) {
|
|
7941
|
+
LogLevel[LogLevel["NONE"] = 0] = "NONE";
|
|
7942
|
+
LogLevel[LogLevel["ERROR"] = 1] = "ERROR";
|
|
7943
|
+
LogLevel[LogLevel["WARN"] = 2] = "WARN";
|
|
7944
|
+
LogLevel[LogLevel["INFO"] = 3] = "INFO";
|
|
7945
|
+
LogLevel[LogLevel["DEBUG"] = 4] = "DEBUG";
|
|
7946
|
+
})(LogLevel || (LogLevel = {}));
|
|
7947
|
+
/** Enumeration of values used to describe types of web-based
|
|
7948
|
+
* Desktop Agent. Each 'type' refers to the means by which
|
|
7949
|
+
* a connection to the agent is made and/or an interface to it
|
|
7950
|
+
* received. */
|
|
7951
|
+
var WebDesktopAgentType;
|
|
7952
|
+
(function (WebDesktopAgentType) {
|
|
7953
|
+
/** Denotes Desktop Agents that inject the FDC3 interface
|
|
7954
|
+
* at `window.fdc3`. */
|
|
7955
|
+
WebDesktopAgentType["Preload"] = "PRELOAD";
|
|
7956
|
+
/** Denotes Desktop Agents that run (or provide an interface)
|
|
7957
|
+
* within a parent window or frame, a reference to which
|
|
7958
|
+
* will be found at `window.opener`, `window.parent`,
|
|
7959
|
+
* `window.parent.opener` etc. */
|
|
7960
|
+
WebDesktopAgentType["ProxyParent"] = "PROXY_PARENT";
|
|
7961
|
+
/** Denotes Desktop Agents that are connected to by loading a URL
|
|
7962
|
+
* into a hidden iframe whose URL was returned by a parent window
|
|
7963
|
+
* or frame. */
|
|
7964
|
+
WebDesktopAgentType["ProxyUrl"] = "PROXY_URL";
|
|
7965
|
+
/** Denotes a Desktop Agent that was returned by a failover
|
|
7966
|
+
* function that was passed by the application. */
|
|
7967
|
+
WebDesktopAgentType["Failover"] = "FAILOVER";
|
|
7968
|
+
})(WebDesktopAgentType || (WebDesktopAgentType = {}));
|
|
6229
7969
|
|
|
6230
7970
|
/**
|
|
6231
7971
|
* Ensures at compile time that the given string tuple is exhaustive on a given union type, i.e. contains ALL possible values of the given UNION_TYPE.
|
|
6232
7972
|
*/
|
|
6233
|
-
|
|
6234
|
-
var tuple = [];
|
|
6235
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6236
|
-
tuple[_i] = arguments[_i];
|
|
6237
|
-
}
|
|
6238
|
-
return tuple;
|
|
6239
|
-
}; };
|
|
7973
|
+
const exhaustiveStringTuple = () => (...tuple) => tuple;
|
|
6240
7974
|
|
|
6241
|
-
|
|
7975
|
+
const STANDARD_CONTEXT_TYPES = exhaustiveStringTuple()('fdc3.action', 'fdc3.chart', 'fdc3.chat.initSettings', 'fdc3.chat.message', 'fdc3.chat.room', 'fdc3.chat.searchCriteria', 'fdc3.contact', 'fdc3.contactList', 'fdc3.country', 'fdc3.currency', 'fdc3.email', 'fdc3.instrument', 'fdc3.instrumentList', 'fdc3.interaction', 'fdc3.message', 'fdc3.organization', 'fdc3.portfolio', 'fdc3.position', 'fdc3.nothing', 'fdc3.timeRange', 'fdc3.transactionResult', 'fdc3.valuation');
|
|
6242
7976
|
// used internally to check if a given intent/context is a standard one
|
|
6243
7977
|
new Set(STANDARD_CONTEXT_TYPES);
|
|
6244
7978
|
|
|
6245
|
-
|
|
7979
|
+
const STANDARD_INTENTS = exhaustiveStringTuple()('CreateInteraction', 'CreateOrUpdateProfile', 'SendChatMessage', 'StartCall', 'StartChat', 'StartEmail', 'ViewAnalysis', 'ViewChat', 'ViewChart', 'ViewContact', 'ViewHoldings', 'ViewInstrument', 'ViewInteractions', 'ViewMessages', 'ViewNews', 'ViewOrders', 'ViewProfile', 'ViewQuote', 'ViewResearch');
|
|
6246
7980
|
// used internally to check if a given intent/context is a standard one
|
|
6247
7981
|
new Set(STANDARD_INTENTS);
|
|
6248
7982
|
|
|
@@ -6286,6 +8020,7 @@
|
|
|
6286
8020
|
var Intents;
|
|
6287
8021
|
(function (Intents) {
|
|
6288
8022
|
Intents["CreateInteraction"] = "CreateInteraction";
|
|
8023
|
+
Intents["CreateOrUpdateProfile"] = "CreateOrUpdateProfile";
|
|
6289
8024
|
Intents["SendChatMessage"] = "SendChatMessage";
|
|
6290
8025
|
Intents["StartCall"] = "StartCall";
|
|
6291
8026
|
Intents["StartChat"] = "StartChat";
|
|
@@ -6305,6 +8040,90 @@
|
|
|
6305
8040
|
Intents["ViewResearch"] = "ViewResearch";
|
|
6306
8041
|
})(Intents || (Intents = {}));
|
|
6307
8042
|
|
|
8043
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8044
|
+
//check if color is supported in (node) console;
|
|
8045
|
+
let noColor = true;
|
|
8046
|
+
//else only occurs in a browser and can't be tested in node
|
|
8047
|
+
/* istanbul ignore if */
|
|
8048
|
+
if (typeof process !== 'undefined') {
|
|
8049
|
+
const argv = process.argv || /* istanbul ignore next */ [];
|
|
8050
|
+
const env = process.env || /* istanbul ignore next */ {};
|
|
8051
|
+
noColor =
|
|
8052
|
+
(!!env.NO_COLOR || argv.includes('--no-color')) &&
|
|
8053
|
+
!(!!env.FORCE_COLOR ||
|
|
8054
|
+
argv.includes('--color') ||
|
|
8055
|
+
process.platform === 'win32' /* istanbul ignore next */ ||
|
|
8056
|
+
((process.stdout || {}).isTTY && env.TERM !== 'dumb') ||
|
|
8057
|
+
/* istanbul ignore next */ !!env.CI);
|
|
8058
|
+
}
|
|
8059
|
+
class AbstractFDC3Logger {
|
|
8060
|
+
/** This should be overridden by sub-classes to set the prefix applied
|
|
8061
|
+
* to log messages. */
|
|
8062
|
+
/* istanbul ignore next */ static get prefix() {
|
|
8063
|
+
return '';
|
|
8064
|
+
}
|
|
8065
|
+
//sub-classes should override this default log level
|
|
8066
|
+
static logLevel = LogLevel.DEBUG;
|
|
8067
|
+
static setLogLevel(level) {
|
|
8068
|
+
if (level in LogLevel) {
|
|
8069
|
+
this.logLevel = level;
|
|
8070
|
+
}
|
|
8071
|
+
else {
|
|
8072
|
+
/* istanbul ignore next */
|
|
8073
|
+
this.error(`Ignoring unrecognized LogLevel '${level}'! Current log level: '${this.logLevel} (${LogLevel[this.logLevel]})'`);
|
|
8074
|
+
}
|
|
8075
|
+
}
|
|
8076
|
+
static debugColor(value) {
|
|
8077
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[30m\x1b[2m' + value + '\x1b[22m\x1b[39m';
|
|
8078
|
+
}
|
|
8079
|
+
static logColor(value) {
|
|
8080
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[32m\x1b[2m' + value + '\x1b[22m\x1b[39m';
|
|
8081
|
+
}
|
|
8082
|
+
static warnColor(value) {
|
|
8083
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[33m' + value + '\x1b[39m';
|
|
8084
|
+
}
|
|
8085
|
+
static errorColor(value) {
|
|
8086
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[31m' + value + '\x1b[39m';
|
|
8087
|
+
}
|
|
8088
|
+
static debug(...params) {
|
|
8089
|
+
if (this.logLevel >= LogLevel.DEBUG) {
|
|
8090
|
+
console.debug(...this.prefixAndColorize(this.prefix, params, this.debugColor));
|
|
8091
|
+
}
|
|
8092
|
+
}
|
|
8093
|
+
static log(...params) {
|
|
8094
|
+
if (this.logLevel >= LogLevel.INFO) {
|
|
8095
|
+
console.log(...this.prefixAndColorize(this.prefix, params, this.logColor));
|
|
8096
|
+
}
|
|
8097
|
+
}
|
|
8098
|
+
static warn(...params) {
|
|
8099
|
+
if (this.logLevel >= LogLevel.WARN) {
|
|
8100
|
+
console.warn(...this.prefixAndColorize(this.prefix, params, this.warnColor));
|
|
8101
|
+
}
|
|
8102
|
+
}
|
|
8103
|
+
static error(...params) {
|
|
8104
|
+
if (this.logLevel >= LogLevel.ERROR) {
|
|
8105
|
+
console.error(...this.prefixAndColorize(this.prefix, params, this.errorColor));
|
|
8106
|
+
}
|
|
8107
|
+
}
|
|
8108
|
+
static prefixAndColorize = (prefix, params, colorFn) => {
|
|
8109
|
+
const prefixed = [prefix, ...params];
|
|
8110
|
+
return prefixed.map(value => {
|
|
8111
|
+
if (typeof value === 'string') {
|
|
8112
|
+
//just color strings
|
|
8113
|
+
return colorFn(value);
|
|
8114
|
+
}
|
|
8115
|
+
else if (value && value.stack && value.message) {
|
|
8116
|
+
//probably an error
|
|
8117
|
+
return colorFn(value.stack);
|
|
8118
|
+
}
|
|
8119
|
+
else {
|
|
8120
|
+
//something else... lets hope it stringifies
|
|
8121
|
+
return colorFn(JSON.stringify(value, null, 2));
|
|
8122
|
+
}
|
|
8123
|
+
});
|
|
8124
|
+
};
|
|
8125
|
+
}
|
|
8126
|
+
|
|
6308
8127
|
class DesktopAgent {
|
|
6309
8128
|
intentsController;
|
|
6310
8129
|
applicationController;
|
|
@@ -6318,6 +8137,7 @@
|
|
|
6318
8137
|
const api = {
|
|
6319
8138
|
getStartupContext: this.getStartupContext.bind(this),
|
|
6320
8139
|
addContextListener: this.addContextListener.bind(this),
|
|
8140
|
+
addEventListener: this.addEventListener.bind(this),
|
|
6321
8141
|
addIntentListener: this.addIntentListener.bind(this),
|
|
6322
8142
|
broadcast: this.broadcast.bind(this),
|
|
6323
8143
|
createPrivateChannel: this.createPrivateChannel.bind(this),
|
|
@@ -6459,6 +8279,13 @@
|
|
|
6459
8279
|
async leaveCurrentChannels() {
|
|
6460
8280
|
return this.channelsController.leave(generateCommandId());
|
|
6461
8281
|
}
|
|
8282
|
+
async addEventListener(type, handler) {
|
|
8283
|
+
optionalFdc3EventTypesDecoder.runWithException(type);
|
|
8284
|
+
if (typeof handler !== "function") {
|
|
8285
|
+
throw new Error("Please provide the handler as a function!");
|
|
8286
|
+
}
|
|
8287
|
+
return this.channelsController.addEventListener({ commandId: generateCommandId(), type, handler });
|
|
8288
|
+
}
|
|
6462
8289
|
}
|
|
6463
8290
|
|
|
6464
8291
|
class AppChannel {
|
|
@@ -6576,13 +8403,13 @@
|
|
|
6576
8403
|
async addContextListener(contextType, handler) {
|
|
6577
8404
|
if (arguments.length === 1) {
|
|
6578
8405
|
if (typeof contextType !== "function") {
|
|
6579
|
-
throw
|
|
8406
|
+
throw new Error(ChannelError.AccessDenied);
|
|
6580
8407
|
}
|
|
6581
8408
|
return this.channelsController.addContextListener({ commandId: generateCommandId(), handler: contextType, channelId: this.id });
|
|
6582
8409
|
}
|
|
6583
8410
|
const contextTypeDecoder = optionalNonEmptyStringDecoder.runWithException(contextType);
|
|
6584
8411
|
if (typeof handler !== "function") {
|
|
6585
|
-
throw
|
|
8412
|
+
throw new Error(ChannelError.AccessDenied);
|
|
6586
8413
|
}
|
|
6587
8414
|
return this.channelsController.addContextListener({ commandId: generateCommandId(), handler, contextType: contextTypeDecoder, channelId: this.id });
|
|
6588
8415
|
}
|
|
@@ -6613,6 +8440,22 @@
|
|
|
6613
8440
|
};
|
|
6614
8441
|
return subHandler;
|
|
6615
8442
|
};
|
|
8443
|
+
const parseHandlerToEventHandler = ({ handler, eventType, contextType }) => {
|
|
8444
|
+
const eventHandler = (event) => {
|
|
8445
|
+
const { type, details } = event;
|
|
8446
|
+
if (eventType && type !== eventType) {
|
|
8447
|
+
return;
|
|
8448
|
+
}
|
|
8449
|
+
if (contextType) {
|
|
8450
|
+
if (details.type === contextType) {
|
|
8451
|
+
handler(details, details.metadata);
|
|
8452
|
+
}
|
|
8453
|
+
return;
|
|
8454
|
+
}
|
|
8455
|
+
handler(details, details.metadata);
|
|
8456
|
+
};
|
|
8457
|
+
return eventHandler;
|
|
8458
|
+
};
|
|
6616
8459
|
|
|
6617
8460
|
class IntentsController {
|
|
6618
8461
|
glueController;
|
|
@@ -6650,11 +8493,11 @@
|
|
|
6650
8493
|
this.logger?.info(`[${commandId}] - findIntent() invoked for intent ${intent} with contextType ${context?.type} and resultType ${resultType}`);
|
|
6651
8494
|
const glueIntents = await this.glueController.findIntents({ name: intent });
|
|
6652
8495
|
if (!glueIntents.length) {
|
|
6653
|
-
throw
|
|
8496
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6654
8497
|
}
|
|
6655
8498
|
const searchedGlueIntent = glueIntents.find((glueIntent) => glueIntent.name === intent);
|
|
6656
8499
|
if (!searchedGlueIntent) {
|
|
6657
|
-
throw
|
|
8500
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6658
8501
|
}
|
|
6659
8502
|
if (!context && !resultType) {
|
|
6660
8503
|
return this.convertGlue42IntentToFDC3Intent(searchedGlueIntent);
|
|
@@ -6662,7 +8505,7 @@
|
|
|
6662
8505
|
const contextType = (context && context.type === fdc3NothingContextType) ? undefined : context?.type;
|
|
6663
8506
|
const filteredIntent = this.getGlueIntentWithFilteredHandlers(searchedGlueIntent, { contextType, resultType });
|
|
6664
8507
|
if (!filteredIntent.handlers.length) {
|
|
6665
|
-
throw
|
|
8508
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6666
8509
|
}
|
|
6667
8510
|
return this.convertGlue42IntentToFDC3Intent(filteredIntent);
|
|
6668
8511
|
}
|
|
@@ -6671,7 +8514,7 @@
|
|
|
6671
8514
|
this.logger?.info(`[${commandId}] - findIntentsByContext() invoked for context type ${context.type} and resultType ${resultType}`);
|
|
6672
8515
|
const glueIntents = await this.glueController.findIntents({ contextType: context.type, resultType });
|
|
6673
8516
|
if (!glueIntents.length) {
|
|
6674
|
-
throw
|
|
8517
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6675
8518
|
}
|
|
6676
8519
|
this.logger?.info(`[${commandId}] - parsing glue intents to fdc3 intents and returning`);
|
|
6677
8520
|
return glueIntents.map((glueIntent) => {
|
|
@@ -6681,11 +8524,12 @@
|
|
|
6681
8524
|
}
|
|
6682
8525
|
async raiseIntent({ commandId, intent, context, target }) {
|
|
6683
8526
|
await this.glueController.gluePromise;
|
|
6684
|
-
this.logger?.info(`[${commandId}] - raiseIntent() invoked for intent ${intent} with contextType: ${context.type} and target: ${target}`);
|
|
8527
|
+
this.logger?.info(`[${commandId}] - raiseIntent() invoked for intent ${intent} with contextType: ${context.type} and target: ${JSON.stringify(target)}`);
|
|
6685
8528
|
const glueContext = { type: context.type, data: { ...context } };
|
|
6686
8529
|
const searchedGlueIntent = (await this.glueController.findIntents({ name: intent })).find(glueIntent => glueIntent.name === intent);
|
|
8530
|
+
this.logger?.info(`[${commandId}] - searchedGlueIntent: ${JSON.stringify(searchedGlueIntent)}`);
|
|
6687
8531
|
if (!searchedGlueIntent) {
|
|
6688
|
-
throw
|
|
8532
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6689
8533
|
}
|
|
6690
8534
|
if (!target) {
|
|
6691
8535
|
const filteredGlueIntent = this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
|
|
@@ -6693,14 +8537,17 @@
|
|
|
6693
8537
|
return this.invokeRaiseIntent(commandId, { intent, context: glueContext, handlers: filteredGlueIntent.handlers });
|
|
6694
8538
|
}
|
|
6695
8539
|
if (target?.instanceId) {
|
|
6696
|
-
this.
|
|
6697
|
-
return this.invokeRaiseIntent(commandId, {
|
|
6698
|
-
intent,
|
|
6699
|
-
context: glueContext,
|
|
6700
|
-
target: { instance: target.instanceId }
|
|
6701
|
-
});
|
|
8540
|
+
return this.raiseIntentToInstanceTarget({ intent, context: glueContext, target: { instance: target.instanceId } }, searchedGlueIntent.handlers, target, commandId);
|
|
6702
8541
|
}
|
|
6703
8542
|
const targetAppName = typeof target === "string" ? target : target.appId;
|
|
8543
|
+
const appHandlersWithAppId = searchedGlueIntent.handlers.filter((handler) => handler.applicationName === targetAppName);
|
|
8544
|
+
if (!appHandlersWithAppId.length) {
|
|
8545
|
+
throw new Error(ResolveError.TargetAppUnavailable);
|
|
8546
|
+
}
|
|
8547
|
+
const appHandlersWithContextType = appHandlersWithAppId.filter((handler) => !handler.instanceId && handler.contextTypes?.includes(context.type));
|
|
8548
|
+
if (!appHandlersWithContextType.length) {
|
|
8549
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
8550
|
+
}
|
|
6704
8551
|
return this.invokeRaiseIntent(commandId, {
|
|
6705
8552
|
intent,
|
|
6706
8553
|
context: glueContext,
|
|
@@ -6750,7 +8597,23 @@
|
|
|
6750
8597
|
await this.glueController.gluePromise;
|
|
6751
8598
|
this.logger?.info(`[${commandId}] - addIntentListener() invoked for intent ${intent}`);
|
|
6752
8599
|
const wrappedHandler = this.getWrappedIntentHandler(handler);
|
|
6753
|
-
|
|
8600
|
+
const unsub = await this.glueController.addIntentListener(intent, wrappedHandler);
|
|
8601
|
+
return getListenerWithAsyncUnsubscribe(unsub.unsubscribe);
|
|
8602
|
+
}
|
|
8603
|
+
raiseIntentToInstanceTarget(request, glueHandlers, target, commandId) {
|
|
8604
|
+
this.logger?.info(`[${commandId}] - raising intent ${request.intent} with contextType ${request.context?.type} to target instance of app ${target.appId} and id ${target.instanceId}`);
|
|
8605
|
+
const handlersWithSameAppName = glueHandlers.filter((handler) => handler.applicationName === target.appId);
|
|
8606
|
+
const handlersWithSameContext = this.getGlueIntentWithFilteredHandlers({ name: request.intent, handlers: handlersWithSameAppName }, { contextType: request.context?.type }).handlers;
|
|
8607
|
+
if (!handlersWithSameContext.length) {
|
|
8608
|
+
this.logger?.info(`[${commandId}] - No handlers found for intent ${request.intent} with appName ${target.appId} and contextType ${request.context?.type}`);
|
|
8609
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
8610
|
+
}
|
|
8611
|
+
const isValidInstanceHandler = handlersWithSameContext.find((handler) => handler.instanceId === target.instanceId);
|
|
8612
|
+
if (!isValidInstanceHandler) {
|
|
8613
|
+
this.logger?.info(`[${commandId}] - There's no instance with id ${target.instanceId} of the passed app ${target.appId}`);
|
|
8614
|
+
throw new Error(ResolveError.TargetInstanceUnavailable);
|
|
8615
|
+
}
|
|
8616
|
+
return this.invokeRaiseIntent(commandId, request);
|
|
6754
8617
|
}
|
|
6755
8618
|
async checkForRememberedIntentHandlerForContext(contextType) {
|
|
6756
8619
|
let prefs;
|
|
@@ -6793,12 +8656,12 @@
|
|
|
6793
8656
|
const app = this.glueController.getApplication(appName);
|
|
6794
8657
|
const serverInstances = this.serverInstanceAsIntentHandler(intent.name);
|
|
6795
8658
|
if (!app && (typeof target === "string" || !target.instanceId || !serverInstances.length)) {
|
|
6796
|
-
throw
|
|
8659
|
+
throw new Error(ResolveError.TargetAppUnavailable);
|
|
6797
8660
|
}
|
|
6798
8661
|
this.logger?.info(`[${commandId}] - target app ${appName} found. Filtering handlers by applicationName: ${appName}`);
|
|
6799
8662
|
const validHandlersByApplicationName = intent.handlers.filter((handler) => handler.applicationName === appName);
|
|
6800
8663
|
if (!validHandlersByApplicationName.length) {
|
|
6801
|
-
throw
|
|
8664
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6802
8665
|
}
|
|
6803
8666
|
if (!instanceId) {
|
|
6804
8667
|
this.logger?.log(`[${commandId}] - returning all handlers for intent ${intent.name} and target: ${JSON.stringify(target)}`);
|
|
@@ -6808,12 +8671,12 @@
|
|
|
6808
8671
|
? app.instances.find((inst) => inst.id === instanceId)
|
|
6809
8672
|
: serverInstances.find((inst) => inst.instance === instanceId);
|
|
6810
8673
|
if (!isValidInstanceOfTheApp) {
|
|
6811
|
-
throw
|
|
8674
|
+
throw new Error(ResolveError.TargetInstanceUnavailable);
|
|
6812
8675
|
}
|
|
6813
8676
|
this.logger?.info(`[${commandId}] - Filtering handlers by instanceId: ${instanceId}`);
|
|
6814
8677
|
const validHandlersByInstanceId = validHandlersByApplicationName.filter((handler) => handler.instanceId === instanceId);
|
|
6815
8678
|
if (!validHandlersByInstanceId.length) {
|
|
6816
|
-
throw
|
|
8679
|
+
throw new Error(ResolveError.IntentDeliveryFailed);
|
|
6817
8680
|
}
|
|
6818
8681
|
return { name: intent.name, handlers: validHandlersByInstanceId };
|
|
6819
8682
|
}
|
|
@@ -6825,7 +8688,7 @@
|
|
|
6825
8688
|
filterIntentHandlersByContext(intent, context) {
|
|
6826
8689
|
const filteredGlueIntent = this.getGlueIntentWithFilteredHandlers(intent, { contextType: context.type });
|
|
6827
8690
|
if (!filteredGlueIntent.handlers.length) {
|
|
6828
|
-
throw
|
|
8691
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6829
8692
|
}
|
|
6830
8693
|
return filteredGlueIntent;
|
|
6831
8694
|
}
|
|
@@ -6877,15 +8740,17 @@
|
|
|
6877
8740
|
apps: handlers.map((handler) => {
|
|
6878
8741
|
const appName = handler.applicationName;
|
|
6879
8742
|
const app = this.glueController.getApplication(appName);
|
|
8743
|
+
const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
|
|
8744
|
+
const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
|
|
6880
8745
|
return {
|
|
6881
8746
|
appId: appName,
|
|
6882
8747
|
instanceId: handler.instanceId,
|
|
6883
8748
|
name: appName,
|
|
6884
8749
|
title: handler.applicationTitle || handler.instanceTitle || appName,
|
|
6885
|
-
tooltip: app?.userProperties.tooltip
|
|
8750
|
+
tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
|
|
6886
8751
|
description: handler.applicationDescription,
|
|
6887
|
-
icons
|
|
6888
|
-
images
|
|
8752
|
+
icons,
|
|
8753
|
+
images,
|
|
6889
8754
|
resultType: handler.resultType
|
|
6890
8755
|
};
|
|
6891
8756
|
})
|
|
@@ -6947,8 +8812,9 @@
|
|
|
6947
8812
|
return { name, handlers: filteredHandlers };
|
|
6948
8813
|
}
|
|
6949
8814
|
async invokeRaiseIntent(commandId, request) {
|
|
8815
|
+
const inBrowser = this.glueController.isRunningInBrowser();
|
|
6950
8816
|
try {
|
|
6951
|
-
const glueIntentResult = await this.glueController.raiseIntent({ ...request, timeout: RaiseTimeoutMs });
|
|
8817
|
+
const glueIntentResult = await this.glueController.raiseIntent({ ...request, timeout: RaiseTimeoutMs, options: { waitForAGMReady: !inBrowser } });
|
|
6952
8818
|
return {
|
|
6953
8819
|
source: {
|
|
6954
8820
|
appId: glueIntentResult.handler.applicationName,
|
|
@@ -6959,7 +8825,7 @@
|
|
|
6959
8825
|
};
|
|
6960
8826
|
}
|
|
6961
8827
|
catch (error) {
|
|
6962
|
-
throw this.parseIoToFdc3Error(error);
|
|
8828
|
+
throw new Error(this.parseIoToFdc3Error(error).message);
|
|
6963
8829
|
}
|
|
6964
8830
|
}
|
|
6965
8831
|
parseIoToFdc3Error(error) {
|
|
@@ -6973,10 +8839,7 @@
|
|
|
6973
8839
|
this.logger?.info(`[${commandId}] - raiseIntentForContext() invoked with contextType ${context.type} and target ${target}`);
|
|
6974
8840
|
const appIntents = await this.findIntentsByContext({ commandId, context });
|
|
6975
8841
|
if (!appIntents || appIntents.length === 0) {
|
|
6976
|
-
throw
|
|
6977
|
-
message: ResolveError.NoAppsFound,
|
|
6978
|
-
reason: `No apps registering intent with contextType ${context.type} ${target ? `and target ${JSON.stringify(target)}` : ""}`
|
|
6979
|
-
};
|
|
8842
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6980
8843
|
}
|
|
6981
8844
|
return this.raiseIntent({ commandId, intent: appIntents[0].intent.name, context, target });
|
|
6982
8845
|
}
|
|
@@ -7001,50 +8864,51 @@
|
|
|
7001
8864
|
}
|
|
7002
8865
|
async open({ commandId, target, context }) {
|
|
7003
8866
|
await this.glueController.gluePromise;
|
|
7004
|
-
this.logger?.log(`[${commandId}] - open() invoked with target ${target} ${context ? `and contextType ${context.type}` : ""}`);
|
|
8867
|
+
this.logger?.log(`[${commandId}] - open() invoked with target ${JSON.stringify(target)} ${context ? `and contextType ${context.type}` : ""}`);
|
|
7005
8868
|
const name = typeof target === "object" ? target.appId : target;
|
|
7006
8869
|
const app = this.glueController.getApplication(name);
|
|
7007
8870
|
if (!app) {
|
|
7008
|
-
throw
|
|
8871
|
+
throw new Error(OpenError.AppNotFound);
|
|
7009
8872
|
}
|
|
7010
8873
|
if (context) {
|
|
7011
8874
|
await this.glueEventsController.initializeCollaborateMethod();
|
|
7012
|
-
this.logger?.info(`[${commandId}] - opening app ${app} with startup context`);
|
|
8875
|
+
this.logger?.info(`[${commandId}] - opening app '${app.name}' with startup context`);
|
|
7013
8876
|
return this.openAppWithContext(app, context);
|
|
7014
8877
|
}
|
|
7015
8878
|
try {
|
|
7016
|
-
this.logger?.info(`[${commandId}] - opening app ${app}`);
|
|
7017
|
-
const
|
|
8879
|
+
this.logger?.info(`[${commandId}] - opening app '${app.name}' without context`);
|
|
8880
|
+
const inBrowser = this.glueController.isRunningInBrowser();
|
|
8881
|
+
const glueInst = await app.start(undefined, { waitForAGMReady: !inBrowser });
|
|
7018
8882
|
this.logger?.info(`[${commandId}] - instance with id ${glueInst.id} started`);
|
|
7019
8883
|
return this.parseGlueInstToAppIdentifier(glueInst);
|
|
7020
8884
|
}
|
|
7021
8885
|
catch (error) {
|
|
7022
|
-
throw
|
|
8886
|
+
throw new Error(OpenError.ErrorOnLaunch);
|
|
7023
8887
|
}
|
|
7024
8888
|
}
|
|
7025
8889
|
async findInstances({ commandId, appIdentifier }) {
|
|
7026
8890
|
await this.glueController.gluePromise;
|
|
7027
|
-
this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${appIdentifier}`);
|
|
8891
|
+
this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
|
|
7028
8892
|
const { appId } = appIdentifier;
|
|
7029
8893
|
const app = this.glueController.getApplication(appId);
|
|
7030
8894
|
if (!app) {
|
|
7031
|
-
throw
|
|
8895
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
7032
8896
|
}
|
|
7033
8897
|
const glueInstances = this.glueController.getApplicationInstances(appId);
|
|
7034
8898
|
const fdc3Instances = glueInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
|
|
7035
|
-
this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${appIdentifier}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
|
|
8899
|
+
this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${JSON.stringify(appIdentifier)}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
|
|
7036
8900
|
return fdc3Instances;
|
|
7037
8901
|
}
|
|
7038
8902
|
async getAppMetadata({ commandId, appIdentifier }) {
|
|
7039
8903
|
await this.glueController.gluePromise;
|
|
7040
|
-
this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${appIdentifier}`);
|
|
8904
|
+
this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
|
|
7041
8905
|
const { appId, instanceId } = appIdentifier;
|
|
7042
8906
|
const app = this.glueController.getApplication(appId);
|
|
7043
8907
|
if (!app) {
|
|
7044
|
-
throw
|
|
8908
|
+
throw new Error(OpenError.AppNotFound);
|
|
7045
8909
|
}
|
|
7046
8910
|
if (!instanceId) {
|
|
7047
|
-
this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app}`);
|
|
8911
|
+
this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app.name}`);
|
|
7048
8912
|
return this.parseGlueAppToAppMetadata(app);
|
|
7049
8913
|
}
|
|
7050
8914
|
const instance = this.glueController.getAppInstanceById(instanceId);
|
|
@@ -7055,8 +8919,9 @@
|
|
|
7055
8919
|
async getInfo({ commandId }) {
|
|
7056
8920
|
await this.glueController.gluePromise;
|
|
7057
8921
|
this.logger?.info(`${commandId} - getInfo() invoked`);
|
|
7058
|
-
const appMetadata =
|
|
7059
|
-
const
|
|
8922
|
+
const appMetadata = this.getCurrentAppMetadata();
|
|
8923
|
+
const globalScope = typeof process !== "undefined" ? process : window;
|
|
8924
|
+
const { provider, providerVersion, standardVersion } = globalScope.fdc3Info;
|
|
7060
8925
|
return {
|
|
7061
8926
|
provider,
|
|
7062
8927
|
providerVersion,
|
|
@@ -7071,10 +8936,13 @@
|
|
|
7071
8936
|
}
|
|
7072
8937
|
getCurrentAppMetadata() {
|
|
7073
8938
|
const myInstance = this.glueController.interopInstance();
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
8939
|
+
const myInstanceApplicationName = myInstance.application ?? myInstance.applicationName;
|
|
8940
|
+
const myApp = this.glueController.getApplication(myInstanceApplicationName);
|
|
8941
|
+
if (myApp) {
|
|
8942
|
+
return { appId: myApp.name, instanceId: myInstance.instance };
|
|
8943
|
+
}
|
|
8944
|
+
this.logger?.info(`No application found with name ${myInstanceApplicationName} probably because it's an iframe.`);
|
|
8945
|
+
return { appId: myInstanceApplicationName, instanceId: myInstance.instance };
|
|
7078
8946
|
}
|
|
7079
8947
|
parseGlueInstToAppIdentifier(glueInst) {
|
|
7080
8948
|
return {
|
|
@@ -7090,13 +8958,13 @@
|
|
|
7090
8958
|
return this.addInstanceMetadataToAppMetadata(appMetadata, instance);
|
|
7091
8959
|
}
|
|
7092
8960
|
async getBaseGlueAppToAppMetadata(app) {
|
|
7093
|
-
const
|
|
7094
|
-
const appConfiguration =
|
|
7095
|
-
?
|
|
7096
|
-
: app.
|
|
7097
|
-
const icon =
|
|
7098
|
-
?
|
|
7099
|
-
: app.icon;
|
|
8961
|
+
const inBrowserNamespace = this.glueController.isRunningInBrowser();
|
|
8962
|
+
const appConfiguration = inBrowserNamespace
|
|
8963
|
+
? app.userProperties
|
|
8964
|
+
: await app.getConfiguration();
|
|
8965
|
+
const icon = inBrowserNamespace
|
|
8966
|
+
? app.icon
|
|
8967
|
+
: (await app.getConfiguration()).icon;
|
|
7100
8968
|
return {
|
|
7101
8969
|
appId: app.name,
|
|
7102
8970
|
name: app.name,
|
|
@@ -7105,9 +8973,9 @@
|
|
|
7105
8973
|
title: app.title,
|
|
7106
8974
|
icons: icon ? [{ src: icon }] : [],
|
|
7107
8975
|
tooltip: appConfiguration.tooltip,
|
|
7108
|
-
screenshots:
|
|
7109
|
-
? appConfiguration.
|
|
7110
|
-
: appConfiguration.screenshots
|
|
8976
|
+
screenshots: inBrowserNamespace
|
|
8977
|
+
? appConfiguration.screenshots
|
|
8978
|
+
: appConfiguration.customProperties.screenshots
|
|
7111
8979
|
};
|
|
7112
8980
|
}
|
|
7113
8981
|
addInstanceMetadataToAppMetadata(appMetadata, instance) {
|
|
@@ -7118,24 +8986,26 @@
|
|
|
7118
8986
|
const startContext = this.buildStartContext(context, guid);
|
|
7119
8987
|
const wrappedPromise = this.createContextListenerWrappedPromise(app);
|
|
7120
8988
|
this.appsStateStore.addOpenAppPromise(guid, wrappedPromise);
|
|
8989
|
+
const inBrowser = this.glueController.isRunningInBrowser();
|
|
7121
8990
|
try {
|
|
7122
|
-
const glueInst = await app.start(startContext);
|
|
8991
|
+
const glueInst = await app.start(startContext, { waitForAGMReady: !inBrowser });
|
|
7123
8992
|
await wrappedPromise.promise;
|
|
7124
8993
|
this.appsStateStore.removeOpenAppPromise(guid);
|
|
7125
8994
|
return this.parseGlueInstToAppIdentifier(glueInst);
|
|
7126
8995
|
}
|
|
7127
8996
|
catch (error) {
|
|
7128
8997
|
this.appsStateStore.removeOpenAppPromise(guid);
|
|
7129
|
-
throw
|
|
8998
|
+
throw new Error(OpenError.AppTimeout);
|
|
7130
8999
|
}
|
|
7131
9000
|
}
|
|
7132
9001
|
buildStartContext(fdc3Context, guid) {
|
|
7133
9002
|
const myInteropInstance = this.glueController.getMyInteropInstance();
|
|
9003
|
+
const appId = myInteropInstance.application || myInteropInstance.applicationName || "";
|
|
7134
9004
|
return {
|
|
7135
9005
|
fdc3: {
|
|
7136
9006
|
collaborationId: guid,
|
|
7137
9007
|
openApp: {
|
|
7138
|
-
appId
|
|
9008
|
+
appId,
|
|
7139
9009
|
instanceId: myInteropInstance.instance
|
|
7140
9010
|
},
|
|
7141
9011
|
context: {
|
|
@@ -7158,7 +9028,7 @@
|
|
|
7158
9028
|
}
|
|
7159
9029
|
}
|
|
7160
9030
|
|
|
7161
|
-
class
|
|
9031
|
+
class WebEventReceiver {
|
|
7162
9032
|
glueController;
|
|
7163
9033
|
eventDispatcher;
|
|
7164
9034
|
glueResponseReceived = false;
|
|
@@ -7185,7 +9055,7 @@
|
|
|
7185
9055
|
}
|
|
7186
9056
|
glueReceiverHandler(event) {
|
|
7187
9057
|
const data = event.detail;
|
|
7188
|
-
if (!data
|
|
9058
|
+
if (!data?.glue42) {
|
|
7189
9059
|
return;
|
|
7190
9060
|
}
|
|
7191
9061
|
const glue42Event = data.glue42.event;
|
|
@@ -7369,7 +9239,8 @@
|
|
|
7369
9239
|
this.isCreator = isCreator;
|
|
7370
9240
|
this.id = channelId;
|
|
7371
9241
|
const myServerInstance = this.channelsController.getMyServerInstance();
|
|
7372
|
-
|
|
9242
|
+
const myAppId = myServerInstance.application || myServerInstance.applicationName;
|
|
9243
|
+
this.myAppMetadata = { source: { appId: myAppId, instanceId: myServerInstance.instance } };
|
|
7373
9244
|
}
|
|
7374
9245
|
toApi() {
|
|
7375
9246
|
const api = {
|
|
@@ -7379,10 +9250,11 @@
|
|
|
7379
9250
|
broadcast: this.broadcast.bind(this),
|
|
7380
9251
|
getCurrentContext: this.getCurrentContext.bind(this),
|
|
7381
9252
|
addContextListener: this.addContextListener.bind(this),
|
|
7382
|
-
onAddContextListener: this.
|
|
7383
|
-
onUnsubscribe: this.
|
|
7384
|
-
onDisconnect: this.
|
|
9253
|
+
onAddContextListener: this.legacyOnAddContextListener.bind(this),
|
|
9254
|
+
onUnsubscribe: this.legacyOnUnsubscribe.bind(this),
|
|
9255
|
+
onDisconnect: this.legacyOnDisconnect.bind(this),
|
|
7385
9256
|
disconnect: this.disconnect.bind(this),
|
|
9257
|
+
addEventListener: this.addEventListener.bind(this),
|
|
7386
9258
|
};
|
|
7387
9259
|
return api;
|
|
7388
9260
|
}
|
|
@@ -7398,54 +9270,62 @@
|
|
|
7398
9270
|
}
|
|
7399
9271
|
async handleCollaboratorJoin(collaborator, commandId) {
|
|
7400
9272
|
this.setCollaborator(collaborator, commandId);
|
|
7401
|
-
await Promise.all(this.myListenerTypesBeforeBound.map((contextType) => {
|
|
7402
|
-
const listenerAddedArgs = {
|
|
7403
|
-
action: "addedContextListenerOnPrivateChannel",
|
|
7404
|
-
correlationId: this.id,
|
|
7405
|
-
collaborationObject: {
|
|
7406
|
-
channelId: this.id,
|
|
7407
|
-
contextType: contextType || undefined
|
|
7408
|
-
}
|
|
7409
|
-
};
|
|
7410
|
-
this.logger?.trace(`[${commandId}] - announcing ${"addedContextListenerOnPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7411
|
-
return this.channelsController.invokeSystemMethod(listenerAddedArgs, this.collaborator?.instanceId);
|
|
7412
|
-
})).catch((err) => this.logger?.error(err));
|
|
9273
|
+
await Promise.all(this.myListenerTypesBeforeBound.map((contextType) => this.sendCollaborateMessage({ action: "addedContextListenerOnPrivateChannel", contextType }))).catch((err) => this.logger?.error(err));
|
|
7413
9274
|
}
|
|
7414
9275
|
handleCollaboratorBroadcast(context, metadata, commandId) {
|
|
7415
9276
|
this.logger?.trace(`[${commandId}] - heard context with type ${context.type} broadcasted on the channel`);
|
|
7416
9277
|
this.lastBroadcastedContextType = context.type;
|
|
7417
9278
|
this.broadcastedContexts[context.type] = { context, metadata };
|
|
7418
9279
|
this.logger?.trace(`[${commandId}] - invoking all context listeners`);
|
|
7419
|
-
this.
|
|
9280
|
+
this.executeCollaboratorBroadcastEvents(context, metadata);
|
|
7420
9281
|
}
|
|
7421
9282
|
handleCollaboratorAddContextListener(contextType, commandId) {
|
|
7422
9283
|
this.logger?.trace(`[${commandId}] - heard collaborator added context listener for type ${contextType}`);
|
|
7423
9284
|
this.collaboratorListenerTypes.push(contextType);
|
|
7424
|
-
this.
|
|
9285
|
+
this.executeCollaboratorAddContextListenerEvents(contextType);
|
|
7425
9286
|
}
|
|
7426
9287
|
handleCollaboratorRemovedListener(contextType, commandId) {
|
|
7427
9288
|
this.logger?.trace(`[${commandId}] - heard collaborator removed context listener with type ${contextType}`);
|
|
7428
|
-
|
|
7429
|
-
this.
|
|
7430
|
-
this.registry.execute(PrivateChannelEventMethods.OnUnsubscribe, contextType);
|
|
9289
|
+
this.collaboratorListenerTypes.splice(this.collaboratorListenerTypes.indexOf(contextType), 1);
|
|
9290
|
+
this.executeCollaboratorUnsubscribeEvents(contextType);
|
|
7431
9291
|
}
|
|
7432
9292
|
handleCollaboratorDisconnect() {
|
|
7433
9293
|
this.disconnected = true;
|
|
7434
|
-
this.
|
|
7435
|
-
this.registry.execute(PrivateChannelEventMethods.OnDisconnect);
|
|
9294
|
+
this.executeCollaboratorDisconnectEvents();
|
|
7436
9295
|
}
|
|
7437
9296
|
async announceJoin(targetInstance, commandId) {
|
|
7438
|
-
|
|
7439
|
-
action: "joinPrivateChannel",
|
|
7440
|
-
correlationId: this.id,
|
|
7441
|
-
collaborationObject: {
|
|
7442
|
-
channelId: this.id
|
|
7443
|
-
}
|
|
7444
|
-
};
|
|
7445
|
-
this.logger?.trace(`[${commandId}] - announcing ${"joinPrivateChannel"} to target instance with id ${JSON.stringify(targetInstance)}`);
|
|
7446
|
-
await this.channelsController.invokeSystemMethod(joinChannelArgs, targetInstance);
|
|
9297
|
+
await this.sendCollaborateMessage({ action: "joinPrivateChannel" });
|
|
7447
9298
|
this.logger?.trace(`[${commandId}] - collaborator received ${"joinPrivateChannel"} action`);
|
|
7448
9299
|
}
|
|
9300
|
+
async addEventListener(type, handler) {
|
|
9301
|
+
const decodedType = optionalPrivateChannelEventTypesDecoder.run(type);
|
|
9302
|
+
if (!decodedType.ok) {
|
|
9303
|
+
this.logger?.error(`Expected first argument 'type' as one of ${Object.values(NewPrivateChannelEventMethods).join(", ")}, got ${type}`);
|
|
9304
|
+
throw new Error(ChannelError.AccessDenied);
|
|
9305
|
+
}
|
|
9306
|
+
if (typeof handler !== "function") {
|
|
9307
|
+
this.logger?.error(`Expected function as an argument, got ${typeof handler}`);
|
|
9308
|
+
throw new Error(ChannelError.AccessDenied);
|
|
9309
|
+
}
|
|
9310
|
+
const commandId = generateCommandId();
|
|
9311
|
+
this.ensureAlive(commandId);
|
|
9312
|
+
this.logger?.trace(`[${commandId}] - adding event listener for type ${type}`);
|
|
9313
|
+
return this.addEventListenerByEventType(type, handler);
|
|
9314
|
+
}
|
|
9315
|
+
addEventListenerByEventType(type, handler) {
|
|
9316
|
+
const replayArgs = type === "addContextListener"
|
|
9317
|
+
? this.collaboratorListenerTypes.map((contextType) => ({ type: NewPrivateChannelEventMethods.AddContextListener, details: { contextType } }))
|
|
9318
|
+
: undefined;
|
|
9319
|
+
if (type) {
|
|
9320
|
+
const unsubscribe = this.registry.add(type, handler, replayArgs);
|
|
9321
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
9322
|
+
}
|
|
9323
|
+
const addContextListener = this.addEventListenerByEventType("addContextListener", handler);
|
|
9324
|
+
const unsubscribeListener = this.addEventListenerByEventType("unsubscribe", handler);
|
|
9325
|
+
const disconnectListener = this.addEventListenerByEventType("disconnect", handler);
|
|
9326
|
+
const unsubscribe = () => [addContextListener, unsubscribeListener, disconnectListener].forEach((listener) => listener.unsubscribe());
|
|
9327
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
9328
|
+
}
|
|
7449
9329
|
async broadcast(context) {
|
|
7450
9330
|
const contextDecoderResult = contextDecoder.run(context);
|
|
7451
9331
|
if (!contextDecoderResult.ok) {
|
|
@@ -7456,17 +9336,7 @@
|
|
|
7456
9336
|
this.ensureBound(commandId, "broadcast");
|
|
7457
9337
|
this.lastBroadcastedContextType = context.type;
|
|
7458
9338
|
this.broadcastedContexts[context.type] = { context, metadata: this.myAppMetadata };
|
|
7459
|
-
|
|
7460
|
-
action: "publishOnPrivateChannel",
|
|
7461
|
-
correlationId: this.id,
|
|
7462
|
-
collaborationObject: {
|
|
7463
|
-
channelId: this.id,
|
|
7464
|
-
contextType: context.type,
|
|
7465
|
-
payload: context
|
|
7466
|
-
}
|
|
7467
|
-
};
|
|
7468
|
-
this.logger?.trace(`[${commandId}] - announcing ${"publishOnPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7469
|
-
await this.channelsController.invokeSystemMethod(broadcastArgs, this.collaborator?.instanceId);
|
|
9339
|
+
this.sendCollaborateMessage({ action: "publishOnPrivateChannel", contextType: context.type, payload: context });
|
|
7470
9340
|
this.logger?.trace(`[${commandId}] - collaborator received context for action ${"publishOnPrivateChannel"}`);
|
|
7471
9341
|
}
|
|
7472
9342
|
async getCurrentContext(contextType) {
|
|
@@ -7478,7 +9348,10 @@
|
|
|
7478
9348
|
if (!contextType && !this.lastBroadcastedContextType) {
|
|
7479
9349
|
return null;
|
|
7480
9350
|
}
|
|
7481
|
-
const searchedType = contextType
|
|
9351
|
+
const searchedType = contextType ?? this.lastBroadcastedContextType;
|
|
9352
|
+
if (!searchedType) {
|
|
9353
|
+
throw new Error("No context type specified and no last broadcasted context available");
|
|
9354
|
+
}
|
|
7482
9355
|
this.logger?.trace(`[${commandId}] - Returning context with type ${searchedType}`);
|
|
7483
9356
|
return this.broadcastedContexts[searchedType].context;
|
|
7484
9357
|
}
|
|
@@ -7487,51 +9360,42 @@
|
|
|
7487
9360
|
this.ensureAlive(commandId);
|
|
7488
9361
|
optionalNonEmptyStringDecoder.runWithException(contextType);
|
|
7489
9362
|
if (typeof handler !== "function") {
|
|
7490
|
-
throw
|
|
9363
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7491
9364
|
}
|
|
7492
9365
|
this.logger?.trace(`[${commandId}] - adding subscription for broadcasted contexts with type: ${contextType}`);
|
|
7493
|
-
const
|
|
7494
|
-
if (contextType) {
|
|
7495
|
-
if (data.type === contextType) {
|
|
7496
|
-
handler(data, metadata);
|
|
7497
|
-
}
|
|
7498
|
-
return;
|
|
7499
|
-
}
|
|
7500
|
-
handler(data, metadata);
|
|
7501
|
-
};
|
|
7502
|
-
const lastBroadcastedContextPerType = this.retrieveLatestBroadcastedContextPerType(contextType);
|
|
7503
|
-
const replayArgs = lastBroadcastedContextPerType ? [[lastBroadcastedContextPerType.context, lastBroadcastedContextPerType.metadata]] : undefined;
|
|
7504
|
-
const unsub = this.registry.add(PrivateChannelEventMethods.ListenerAdded, subHandler, replayArgs);
|
|
9366
|
+
const unsub = this.addContextListenerInRegistry(contextType, handler);
|
|
7505
9367
|
if (!this.collaborator) {
|
|
7506
9368
|
this.myListenerTypesBeforeBound.push(contextType);
|
|
7507
9369
|
const unsubscribe = this.getAddContextListenerUnsub(unsub, contextType, commandId);
|
|
7508
|
-
return
|
|
9370
|
+
return { unsubscribe };
|
|
7509
9371
|
}
|
|
7510
|
-
|
|
7511
|
-
action: "addedContextListenerOnPrivateChannel",
|
|
7512
|
-
correlationId: this.id,
|
|
7513
|
-
collaborationObject: {
|
|
7514
|
-
channelId: this.id,
|
|
7515
|
-
contextType: contextType || undefined
|
|
7516
|
-
}
|
|
7517
|
-
};
|
|
7518
|
-
this.logger?.trace(`[${commandId}] - announcing ${"addedContextListenerOnPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7519
|
-
await this.channelsController.invokeSystemMethod(listenerAddedArgs, this.collaborator?.instanceId);
|
|
9372
|
+
await this.sendCollaborateMessage({ action: "addedContextListenerOnPrivateChannel", contextType });
|
|
7520
9373
|
this.logger?.trace(`[${commandId}] - collaborator received action ${"addedContextListenerOnPrivateChannel"}`);
|
|
7521
9374
|
const unsubscribe = this.getAddContextListenerUnsub(unsub, contextType, commandId);
|
|
7522
|
-
return
|
|
9375
|
+
return { unsubscribe };
|
|
7523
9376
|
}
|
|
9377
|
+
addContextListenerInRegistry = (contextType, handler) => {
|
|
9378
|
+
const legacySubHandler = parseContextHandler(handler, contextType);
|
|
9379
|
+
const lastBroadcastedContextPerType = this.retrieveLatestBroadcastedContextPerType(contextType);
|
|
9380
|
+
const legacyReplayArgs = lastBroadcastedContextPerType ? [[lastBroadcastedContextPerType.context, lastBroadcastedContextPerType.metadata]] : undefined;
|
|
9381
|
+
const legacyUnsub = this.registry.add(LegacyPrivateChannelEventMethods.ListenerAdded, legacySubHandler, legacyReplayArgs);
|
|
9382
|
+
const replayArgs = lastBroadcastedContextPerType ? [{ type: NewPrivateChannelEventMethods.ContextListenerAdded, details: { contextType: lastBroadcastedContextPerType.context.type, metadata: lastBroadcastedContextPerType.metadata } }] : undefined;
|
|
9383
|
+
const subHandler = parseHandlerToEventHandler({ handler, eventType: NewPrivateChannelEventMethods.ContextListenerAdded, contextType });
|
|
9384
|
+
const newUnsub = this.registry.add(NewPrivateChannelEventMethods.ContextListenerAdded, subHandler, replayArgs);
|
|
9385
|
+
const unsub = () => {
|
|
9386
|
+
legacyUnsub();
|
|
9387
|
+
newUnsub();
|
|
9388
|
+
};
|
|
9389
|
+
return unsub;
|
|
9390
|
+
};
|
|
7524
9391
|
retrieveLatestBroadcastedContextPerType(contextType) {
|
|
7525
|
-
if (
|
|
7526
|
-
return;
|
|
9392
|
+
if (contextType) {
|
|
9393
|
+
return this.broadcastedContexts[contextType];
|
|
7527
9394
|
}
|
|
7528
|
-
if (!
|
|
7529
|
-
return
|
|
7530
|
-
context: this.broadcastedContexts[this.lastBroadcastedContextType].context,
|
|
7531
|
-
metadata: this.broadcastedContexts[this.lastBroadcastedContextType].metadata
|
|
7532
|
-
};
|
|
9395
|
+
if (!this.lastBroadcastedContextType) {
|
|
9396
|
+
return;
|
|
7533
9397
|
}
|
|
7534
|
-
return this.broadcastedContexts[
|
|
9398
|
+
return this.broadcastedContexts[this.lastBroadcastedContextType];
|
|
7535
9399
|
}
|
|
7536
9400
|
getAddContextListenerUnsub(unsub, contextType, commandId) {
|
|
7537
9401
|
return async () => {
|
|
@@ -7541,45 +9405,36 @@
|
|
|
7541
9405
|
this.myListenerTypesBeforeBound.splice(index, 1);
|
|
7542
9406
|
return;
|
|
7543
9407
|
}
|
|
7544
|
-
|
|
7545
|
-
action: "removedContextListenerOnPrivateChannel",
|
|
7546
|
-
correlationId: this.id,
|
|
7547
|
-
collaborationObject: {
|
|
7548
|
-
channelId: this.id,
|
|
7549
|
-
contextType: contextType || undefined
|
|
7550
|
-
}
|
|
7551
|
-
};
|
|
7552
|
-
this.logger?.trace(`[${commandId}] - announcing unsubscribe from context listener for type ${contextType}`);
|
|
7553
|
-
await this.channelsController.invokeSystemMethod(unsubArgs, this.collaborator?.instanceId);
|
|
9408
|
+
await this.sendCollaborateMessage({ action: "removedContextListenerOnPrivateChannel", contextType });
|
|
7554
9409
|
this.logger?.trace(`[${commandId}] - collaborator heard ${"removedContextListenerOnPrivateChannel"}`);
|
|
7555
9410
|
};
|
|
7556
9411
|
}
|
|
7557
|
-
|
|
9412
|
+
legacyOnAddContextListener(handler) {
|
|
7558
9413
|
if (typeof handler !== "function") {
|
|
7559
|
-
throw
|
|
9414
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7560
9415
|
}
|
|
7561
9416
|
const commandId = generateCommandId();
|
|
7562
9417
|
this.ensureAlive(commandId);
|
|
7563
|
-
const unsub = this.registry.add(
|
|
7564
|
-
return
|
|
9418
|
+
const unsub = this.registry.add(LegacyPrivateChannelEventMethods.OnAddContextListener, handler, this.collaboratorListenerTypes);
|
|
9419
|
+
return getListenerWithAsyncUnsubscribe(unsub);
|
|
7565
9420
|
}
|
|
7566
|
-
|
|
9421
|
+
legacyOnUnsubscribe(handler) {
|
|
7567
9422
|
if (typeof handler !== "function") {
|
|
7568
|
-
throw
|
|
9423
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7569
9424
|
}
|
|
7570
9425
|
const commandId = generateCommandId();
|
|
7571
9426
|
this.ensureAlive(commandId);
|
|
7572
|
-
const unsub = this.registry.add(
|
|
7573
|
-
return
|
|
9427
|
+
const unsub = this.registry.add(LegacyPrivateChannelEventMethods.OnUnsubscribe, handler);
|
|
9428
|
+
return getListenerWithAsyncUnsubscribe(unsub);
|
|
7574
9429
|
}
|
|
7575
|
-
|
|
9430
|
+
legacyOnDisconnect(handler) {
|
|
7576
9431
|
if (typeof handler !== "function") {
|
|
7577
|
-
throw
|
|
9432
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7578
9433
|
}
|
|
7579
9434
|
const commandId = generateCommandId();
|
|
7580
9435
|
this.ensureAlive(commandId);
|
|
7581
|
-
const unsub = this.registry.add(
|
|
7582
|
-
return
|
|
9436
|
+
const unsub = this.registry.add(LegacyPrivateChannelEventMethods.OnDisconnect, handler);
|
|
9437
|
+
return getListenerWithAsyncUnsubscribe(unsub);
|
|
7583
9438
|
}
|
|
7584
9439
|
async disconnect() {
|
|
7585
9440
|
const commandId = generateCommandId();
|
|
@@ -7592,15 +9447,8 @@
|
|
|
7592
9447
|
this.logger?.trace(`[${commandId}] - disconnect invoked`);
|
|
7593
9448
|
this.disconnected = true;
|
|
7594
9449
|
this.logger?.trace(`[${commandId}] - announcing ${"disconnectedFromPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7595
|
-
const disconnectArgs = {
|
|
7596
|
-
action: "disconnectedFromPrivateChannel",
|
|
7597
|
-
correlationId: this.id,
|
|
7598
|
-
collaborationObject: {
|
|
7599
|
-
channelId: this.id
|
|
7600
|
-
}
|
|
7601
|
-
};
|
|
7602
9450
|
this.channelsController.removePrivateChannelFromStoreById(this.id);
|
|
7603
|
-
await this.
|
|
9451
|
+
await this.sendCollaborateMessage({ action: "disconnectedFromPrivateChannel" });
|
|
7604
9452
|
this.logger?.trace(`[${commandId}] - collaborator received action ${"disconnectedFromPrivateChannel"}`);
|
|
7605
9453
|
if (this.unsubFromInstanceStopped) {
|
|
7606
9454
|
this.unsubFromInstanceStopped();
|
|
@@ -7612,7 +9460,7 @@
|
|
|
7612
9460
|
}
|
|
7613
9461
|
const errorMsg = "Channel is disconnected - operation is no longer available";
|
|
7614
9462
|
this.logger?.error(`[${commandId}] - ${errorMsg}`);
|
|
7615
|
-
throw
|
|
9463
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7616
9464
|
}
|
|
7617
9465
|
ensureBound(commandId, operation) {
|
|
7618
9466
|
if (this.collaborator) {
|
|
@@ -7620,7 +9468,7 @@
|
|
|
7620
9468
|
}
|
|
7621
9469
|
const errorMsg = `There's no collaborator on the other side of the channel - operation ${operation} is unavailable`;
|
|
7622
9470
|
this.logger?.error(`[${commandId}] - ${errorMsg}`);
|
|
7623
|
-
throw
|
|
9471
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7624
9472
|
}
|
|
7625
9473
|
subscribeForCollaboratorInstanceStop(commandId) {
|
|
7626
9474
|
const handler = (instance) => {
|
|
@@ -7631,6 +9479,43 @@
|
|
|
7631
9479
|
};
|
|
7632
9480
|
this.unsubFromInstanceStopped = this.channelsController.subscribeOnInstanceStop(this.id, handler.bind(this), commandId);
|
|
7633
9481
|
}
|
|
9482
|
+
async sendCollaborateMessage({ action, contextType, payload }) {
|
|
9483
|
+
const args = {
|
|
9484
|
+
action,
|
|
9485
|
+
correlationId: this.id,
|
|
9486
|
+
collaborationObject: {
|
|
9487
|
+
channelId: this.id,
|
|
9488
|
+
contextType,
|
|
9489
|
+
payload
|
|
9490
|
+
}
|
|
9491
|
+
};
|
|
9492
|
+
this.logger?.trace(`Sending '${action}' collaborate message ${JSON.stringify(args)} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
9493
|
+
await this.channelsController.invokeSystemMethod(args, this.collaborator?.instanceId);
|
|
9494
|
+
}
|
|
9495
|
+
executeCollaboratorAddContextListenerEvents(contextType) {
|
|
9496
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.OnAddContextListener, contextType);
|
|
9497
|
+
const event = { type: NewPrivateChannelEventMethods.AddContextListener, details: { contextType } };
|
|
9498
|
+
this.registry.execute(NewPrivateChannelEventMethods.AddContextListener, event);
|
|
9499
|
+
}
|
|
9500
|
+
executeCollaboratorBroadcastEvents(context, metadata) {
|
|
9501
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.ListenerAdded, context, metadata);
|
|
9502
|
+
const event = {
|
|
9503
|
+
type: NewPrivateChannelEventMethods.ContextListenerAdded,
|
|
9504
|
+
details: { context, metadata }
|
|
9505
|
+
};
|
|
9506
|
+
this.registry.execute(NewPrivateChannelEventMethods.ContextListenerAdded, event);
|
|
9507
|
+
}
|
|
9508
|
+
executeCollaboratorUnsubscribeEvents(contextType) {
|
|
9509
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.OnUnsubscribe, contextType);
|
|
9510
|
+
const event = { type: NewPrivateChannelEventMethods.Unsubscribe, details: { contextType } };
|
|
9511
|
+
this.registry.execute(NewPrivateChannelEventMethods.Unsubscribe, event);
|
|
9512
|
+
}
|
|
9513
|
+
executeCollaboratorDisconnectEvents() {
|
|
9514
|
+
this.collaboratorListenerTypes.forEach((contextType) => this.executeCollaboratorUnsubscribeEvents(contextType));
|
|
9515
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.OnDisconnect);
|
|
9516
|
+
const event = { type: NewPrivateChannelEventMethods.Disconnect, details: {} };
|
|
9517
|
+
this.registry.execute(NewPrivateChannelEventMethods.Disconnect, event);
|
|
9518
|
+
}
|
|
7634
9519
|
}
|
|
7635
9520
|
|
|
7636
9521
|
class ChannelsFactory {
|
|
@@ -7832,7 +9717,7 @@
|
|
|
7832
9717
|
const subHandler = parseContextHandler(handler, contextType);
|
|
7833
9718
|
if (!channelIdToSubscribeTo || onMultiChannels) {
|
|
7834
9719
|
const unsubscribe = this.glueController.channelsSubscribe(subHandler, contextType);
|
|
7835
|
-
return
|
|
9720
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
7836
9721
|
}
|
|
7837
9722
|
return this.addContextListenerByChannelId({ commandId, handler: subHandler, invokedOnChannelModel: !!channelId, channelId: channelIdToSubscribeTo, contextType });
|
|
7838
9723
|
}
|
|
@@ -8005,6 +9890,14 @@
|
|
|
8005
9890
|
this.logger?.info(`[${commandId}] - leaving channel '${ioChannelToLeave.name}'`);
|
|
8006
9891
|
return this.glueController.leaveChannel({ channel: ioChannelToLeave.name });
|
|
8007
9892
|
}
|
|
9893
|
+
async addEventListener({ commandId, type, handler }) {
|
|
9894
|
+
await this.initDonePromise;
|
|
9895
|
+
this.logger?.info(`[${commandId}] - addEventListener() invoked for event type ${type}`);
|
|
9896
|
+
if (!type || type === "userChannelChanged") {
|
|
9897
|
+
return this.subscribeForChannelChangedEvent(handler);
|
|
9898
|
+
}
|
|
9899
|
+
throw new Error(`Received unknown event type: ${type}`);
|
|
9900
|
+
}
|
|
8008
9901
|
get logger() {
|
|
8009
9902
|
if (!this._logger) {
|
|
8010
9903
|
this._logger = this.glueController.initSubLogger("fdc3.channels.controller");
|
|
@@ -8042,7 +9935,7 @@
|
|
|
8042
9935
|
}
|
|
8043
9936
|
async handleWindowContextOnOpening(commandId, handler, contextType) {
|
|
8044
9937
|
const myWindow = this.glueController.getMyWindow();
|
|
8045
|
-
if (!myWindow) {
|
|
9938
|
+
if (!myWindow || !Object.keys(myWindow).length) {
|
|
8046
9939
|
this.logger?.trace(`[${commandId}] - Cannot get window context because this is not a Glue window, it's probably an iframe`);
|
|
8047
9940
|
this.invokeContextHandlerWithStartupContext = false;
|
|
8048
9941
|
return;
|
|
@@ -8123,12 +10016,10 @@
|
|
|
8123
10016
|
if (channelType === ChannelTypes.App) {
|
|
8124
10017
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 app channel with id ${channelId} (underlying glue context with same name)`);
|
|
8125
10018
|
const unsubscribe = await this.glueController.contextsSubscribe(channelId, subHandler);
|
|
8126
|
-
return {
|
|
8127
|
-
unsubscribe
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
}
|
|
8131
|
-
};
|
|
10019
|
+
return getListenerWithAsyncUnsubscribe(() => {
|
|
10020
|
+
this.logger?.info(`[${commandId}] - invoking unsubscribe for app channel with id ${channelId}`);
|
|
10021
|
+
unsubscribe();
|
|
10022
|
+
});
|
|
8132
10023
|
}
|
|
8133
10024
|
this.logger?.error("Cannot add a context listener on an invalid channel");
|
|
8134
10025
|
throw new Error(ChannelError.AccessDenied);
|
|
@@ -8145,6 +10036,28 @@
|
|
|
8145
10036
|
this.logger?.error(`Channel with id: ${channelId} does not exist`);
|
|
8146
10037
|
throw new Error(ChannelError.NoChannelFound);
|
|
8147
10038
|
}
|
|
10039
|
+
subscribeForChannelChangedEvent(handler) {
|
|
10040
|
+
const wrappedCallback = async (channelName) => {
|
|
10041
|
+
if (!channelName) {
|
|
10042
|
+
this.invokeChannelChangedEventHandler(null, handler);
|
|
10043
|
+
return;
|
|
10044
|
+
}
|
|
10045
|
+
const fdc3ChannelName = await this.glueController.getFDC3ChannelIdByIoChannelName(channelName);
|
|
10046
|
+
if (!fdc3ChannelName) {
|
|
10047
|
+
return;
|
|
10048
|
+
}
|
|
10049
|
+
this.invokeChannelChangedEventHandler(fdc3ChannelName, handler);
|
|
10050
|
+
};
|
|
10051
|
+
const unsubscribe = this.glueController.setOnChannelChanged(wrappedCallback);
|
|
10052
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
10053
|
+
}
|
|
10054
|
+
invokeChannelChangedEventHandler(channelId, handler) {
|
|
10055
|
+
const event = {
|
|
10056
|
+
type: "userChannelChanged",
|
|
10057
|
+
details: { currentChannelId: channelId }
|
|
10058
|
+
};
|
|
10059
|
+
handler(event);
|
|
10060
|
+
}
|
|
8148
10061
|
}
|
|
8149
10062
|
|
|
8150
10063
|
class LegacyDataWrappingChannelsController {
|
|
@@ -8182,7 +10095,7 @@
|
|
|
8182
10095
|
if (!invokedOnChannelModel) {
|
|
8183
10096
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8184
10097
|
const unsubscribe = this.glueController.legacyChannelsSubscribe(handler, contextType);
|
|
8185
|
-
return
|
|
10098
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8186
10099
|
}
|
|
8187
10100
|
const ioChannelName = await this.glueController.getIoChannelNameByFDC3ChannelId(channelId);
|
|
8188
10101
|
if (!ioChannelName) {
|
|
@@ -8192,7 +10105,7 @@
|
|
|
8192
10105
|
const contextToSubscribeTo = this.parser.mapChannelNameToContextName(ioChannelName);
|
|
8193
10106
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8194
10107
|
const unsubscribe = await this.glueController.contextsSubscribe(contextToSubscribeTo, handler);
|
|
8195
|
-
return
|
|
10108
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8196
10109
|
}
|
|
8197
10110
|
get logger() {
|
|
8198
10111
|
if (!this._logger) {
|
|
@@ -8238,7 +10151,7 @@
|
|
|
8238
10151
|
if (!invokedOnChannelModel) {
|
|
8239
10152
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8240
10153
|
const unsubscribe = this.glueController.channelsSubscribe(handler, contextType);
|
|
8241
|
-
return
|
|
10154
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8242
10155
|
}
|
|
8243
10156
|
const ioChannelName = await this.glueController.getIoChannelNameByFDC3ChannelId(channelId);
|
|
8244
10157
|
if (!ioChannelName) {
|
|
@@ -8248,7 +10161,7 @@
|
|
|
8248
10161
|
const contextToSubscribeTo = this.parser.mapChannelNameToContextName(ioChannelName);
|
|
8249
10162
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8250
10163
|
const unsubscribe = await this.glueController.contextsSubscribe(contextToSubscribeTo, handler);
|
|
8251
|
-
return
|
|
10164
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8252
10165
|
}
|
|
8253
10166
|
get logger() {
|
|
8254
10167
|
if (!this._logger) {
|
|
@@ -8258,9 +10171,55 @@
|
|
|
8258
10171
|
}
|
|
8259
10172
|
}
|
|
8260
10173
|
|
|
10174
|
+
class NodeEventReceiver {
|
|
10175
|
+
glueController;
|
|
10176
|
+
glueReceived = false;
|
|
10177
|
+
glueInitialized = false;
|
|
10178
|
+
timer;
|
|
10179
|
+
constructor(glueController) {
|
|
10180
|
+
this.glueController = glueController;
|
|
10181
|
+
}
|
|
10182
|
+
start() {
|
|
10183
|
+
setTimeout(this.clearInterval, GlueReceivedPromiseTimeout);
|
|
10184
|
+
this.setupInterval();
|
|
10185
|
+
}
|
|
10186
|
+
setupInterval() {
|
|
10187
|
+
this.timer = setInterval(() => {
|
|
10188
|
+
if (this.glueReceived) {
|
|
10189
|
+
return this.clearInterval();
|
|
10190
|
+
}
|
|
10191
|
+
const glueAvailable = typeof (process.io ?? process.glue) !== "undefined";
|
|
10192
|
+
if (!glueAvailable) {
|
|
10193
|
+
return;
|
|
10194
|
+
}
|
|
10195
|
+
this.glueReceived = true;
|
|
10196
|
+
const glue = process.io ?? process.glue;
|
|
10197
|
+
const glueValidator = this.glueController.validateGlue(glue);
|
|
10198
|
+
if (!glueValidator.isValid) {
|
|
10199
|
+
this.glueController.initializeFailed(glueValidator.error);
|
|
10200
|
+
return this.clearInterval();
|
|
10201
|
+
}
|
|
10202
|
+
this.clearInterval();
|
|
10203
|
+
this.glueController.initialize(glue);
|
|
10204
|
+
this.glueInitialized = true;
|
|
10205
|
+
}, 100);
|
|
10206
|
+
}
|
|
10207
|
+
clearInterval() {
|
|
10208
|
+
if (!this.timer) {
|
|
10209
|
+
return;
|
|
10210
|
+
}
|
|
10211
|
+
clearInterval(this.timer);
|
|
10212
|
+
this.timer = undefined;
|
|
10213
|
+
if (!this.glueReceived && !this.glueInitialized) {
|
|
10214
|
+
this.glueController.initializeFailed(`Timeout ${GlueReceivedPromiseTimeout}ms waiting for 'io' to be available on the process object`);
|
|
10215
|
+
}
|
|
10216
|
+
}
|
|
10217
|
+
}
|
|
10218
|
+
|
|
8261
10219
|
class IoC {
|
|
8262
|
-
|
|
8263
|
-
|
|
10220
|
+
_webEventDispatcher;
|
|
10221
|
+
_webEventReceiver;
|
|
10222
|
+
_nodeEventReceiver;
|
|
8264
10223
|
_desktopAgent;
|
|
8265
10224
|
_glueController;
|
|
8266
10225
|
_intentsController;
|
|
@@ -8278,14 +10237,15 @@
|
|
|
8278
10237
|
return this;
|
|
8279
10238
|
}
|
|
8280
10239
|
get eventReceiver() {
|
|
8281
|
-
|
|
8282
|
-
|
|
10240
|
+
const inNode = typeof process !== "undefined";
|
|
10241
|
+
if (inNode) {
|
|
10242
|
+
return this.nodeEventReceiver;
|
|
8283
10243
|
}
|
|
8284
|
-
return this.
|
|
10244
|
+
return this.webEventReceiver;
|
|
8285
10245
|
}
|
|
8286
10246
|
get glueController() {
|
|
8287
10247
|
if (!this._glueController) {
|
|
8288
|
-
this._glueController = new GlueController(this.channelsParser
|
|
10248
|
+
this._glueController = new GlueController(this.channelsParser);
|
|
8289
10249
|
}
|
|
8290
10250
|
return this._glueController;
|
|
8291
10251
|
}
|
|
@@ -8295,11 +10255,23 @@
|
|
|
8295
10255
|
}
|
|
8296
10256
|
return this._fdc3;
|
|
8297
10257
|
}
|
|
8298
|
-
get
|
|
8299
|
-
if (!this.
|
|
8300
|
-
this.
|
|
10258
|
+
get nodeEventReceiver() {
|
|
10259
|
+
if (!this._nodeEventReceiver) {
|
|
10260
|
+
this._nodeEventReceiver = new NodeEventReceiver(this.glueController);
|
|
10261
|
+
}
|
|
10262
|
+
return this._nodeEventReceiver;
|
|
10263
|
+
}
|
|
10264
|
+
get webEventReceiver() {
|
|
10265
|
+
if (!this._webEventReceiver) {
|
|
10266
|
+
this._webEventReceiver = new WebEventReceiver(this.glueController, this.webEventDispatcher);
|
|
10267
|
+
}
|
|
10268
|
+
return this._webEventReceiver;
|
|
10269
|
+
}
|
|
10270
|
+
get webEventDispatcher() {
|
|
10271
|
+
if (!this._webEventDispatcher) {
|
|
10272
|
+
this._webEventDispatcher = new WebEventDispatcher();
|
|
8301
10273
|
}
|
|
8302
|
-
return this.
|
|
10274
|
+
return this._webEventDispatcher;
|
|
8303
10275
|
}
|
|
8304
10276
|
get channelsFactory() {
|
|
8305
10277
|
if (!this._channelsFactory) {
|
|
@@ -8385,18 +10357,19 @@
|
|
|
8385
10357
|
return ioc.fdc3;
|
|
8386
10358
|
};
|
|
8387
10359
|
|
|
8388
|
-
var version = "2.
|
|
10360
|
+
var version = "2.6.0";
|
|
8389
10361
|
|
|
8390
|
-
|
|
8391
|
-
|
|
10362
|
+
const globalScope = typeof process !== "undefined" ? process : window;
|
|
10363
|
+
globalScope.fdc3Info = {
|
|
8392
10364
|
provider: "io.Connect",
|
|
8393
10365
|
providerVersion: version,
|
|
8394
|
-
standardVersion: "2.
|
|
10366
|
+
standardVersion: "2.2"
|
|
8395
10367
|
};
|
|
10368
|
+
let globalFdc3 = globalScope.fdc3;
|
|
8396
10369
|
if (typeof globalFdc3 === "undefined") {
|
|
8397
10370
|
globalFdc3 = fdc3Factory();
|
|
8398
10371
|
checkIfInElectron(globalFdc3);
|
|
8399
|
-
|
|
10372
|
+
globalScope.fdc3 = globalFdc3;
|
|
8400
10373
|
}
|
|
8401
10374
|
else {
|
|
8402
10375
|
console.warn("Defaulting to using the auto-injected fdc3.");
|