@interopio/fdc3 2.7.0 → 2.7.1

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/dist/fdc3.umd.js CHANGED
@@ -232,10 +232,10 @@
232
232
  var type = TypeError;
233
233
 
234
234
  /** @type {import('./gOPD')} */
235
- var gOPD$6 = Object.getOwnPropertyDescriptor;
235
+ var gOPD$5 = Object.getOwnPropertyDescriptor;
236
236
 
237
237
  /** @type {import('.')} */
238
- var $gOPD$2 = gOPD$6;
238
+ var $gOPD$2 = gOPD$5;
239
239
 
240
240
  if ($gOPD$2) {
241
241
  try {
@@ -325,7 +325,7 @@
325
325
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
326
326
 
327
327
  var keys = objectKeys$2;
328
- var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
328
+ var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
329
329
 
330
330
  var toStr$4 = Object.prototype.toString;
331
331
  var concat = Array.prototype.concat;
@@ -358,7 +358,7 @@
358
358
  var defineProperties$1 = function (object, map) {
359
359
  var predicates = arguments.length > 2 ? arguments[2] : {};
360
360
  var props = keys(map);
361
- if (hasSymbols$5) {
361
+ if (hasSymbols$4) {
362
362
  props = concat.call(props, Object.getOwnPropertySymbols(map));
363
363
  }
364
364
  for (var i = 0; i < props.length; i += 1) {
@@ -370,7 +370,7 @@
370
370
 
371
371
  var defineProperties_1 = defineProperties$1;
372
372
 
373
- var callBind$7 = {exports: {}};
373
+ var callBind$6 = {exports: {}};
374
374
 
375
375
  /** @type {import('.')} */
376
376
  var esObjectAtoms = Object;
@@ -424,11 +424,11 @@
424
424
  };
425
425
 
426
426
  var shams$1;
427
- var hasRequiredShams;
427
+ var hasRequiredShams$1;
428
428
 
429
- function requireShams () {
430
- if (hasRequiredShams) return shams$1;
431
- hasRequiredShams = 1;
429
+ function requireShams$1 () {
430
+ if (hasRequiredShams$1) return shams$1;
431
+ hasRequiredShams$1 = 1;
432
432
 
433
433
  /** @type {import('./shams')} */
434
434
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -477,10 +477,10 @@
477
477
  }
478
478
 
479
479
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
480
- var hasSymbolSham = requireShams();
480
+ var hasSymbolSham = requireShams$1();
481
481
 
482
482
  /** @type {import('.')} */
483
- var hasSymbols$4 = function hasNativeSymbols() {
483
+ var hasSymbols$3 = function hasNativeSymbols() {
484
484
  if (typeof origSymbol !== 'function') { return false; }
485
485
  if (typeof Symbol !== 'function') { return false; }
486
486
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -670,60 +670,78 @@
670
670
  return $actualApply(bind$2, $call$1, args);
671
671
  };
672
672
 
673
- var callBind$6 = callBindApplyHelpers;
674
- var gOPD$5 = gopd$1;
673
+ var get;
674
+ var hasRequiredGet;
675
675
 
676
- var hasProtoAccessor;
677
- try {
678
- // eslint-disable-next-line no-extra-parens, no-proto
679
- hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
680
- } catch (e) {
681
- if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
682
- throw e;
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
+ }
683
691
  }
684
- }
685
692
 
686
- // eslint-disable-next-line no-extra-parens
687
- var desc = !!hasProtoAccessor && gOPD$5 && gOPD$5(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
693
+ // eslint-disable-next-line no-extra-parens
694
+ var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
688
695
 
689
- var $Object$3 = Object;
690
- var $getPrototypeOf = $Object$3.getPrototypeOf;
696
+ var $Object = Object;
697
+ var $getPrototypeOf = $Object.getPrototypeOf;
691
698
 
692
- /** @type {import('./get')} */
693
- var get = desc && typeof desc.get === 'function'
694
- ? callBind$6([desc.get])
695
- : typeof $getPrototypeOf === 'function'
696
- ? /** @type {import('./get')} */ function getDunder(value) {
697
- // eslint-disable-next-line eqeqeq
698
- return $getPrototypeOf(value == null ? value : $Object$3(value));
699
- }
700
- : false;
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
+ }
701
710
 
702
- var reflectGetProto = requireReflect_getPrototypeOf();
703
- var originalGetProto = requireObject_getPrototypeOf();
711
+ var getProto$3;
712
+ var hasRequiredGetProto;
704
713
 
705
- var getDunderProto = get;
714
+ function requireGetProto () {
715
+ if (hasRequiredGetProto) return getProto$3;
716
+ hasRequiredGetProto = 1;
706
717
 
707
- /** @type {import('.')} */
708
- var getProto$3 = reflectGetProto
709
- ? function getProto(O) {
710
- // @ts-expect-error TS can't narrow inside a closure, for some reason
711
- return reflectGetProto(O);
712
- }
713
- : originalGetProto
718
+ var reflectGetProto = requireReflect_getPrototypeOf();
719
+ var originalGetProto = requireObject_getPrototypeOf();
720
+
721
+ var getDunderProto = requireGet();
722
+
723
+ /** @type {import('.')} */
724
+ getProto$3 = reflectGetProto
714
725
  ? function getProto(O) {
715
- if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
716
- throw new TypeError('getProto: not an object');
717
- }
718
726
  // @ts-expect-error TS can't narrow inside a closure, for some reason
719
- return originalGetProto(O);
727
+ return reflectGetProto(O);
720
728
  }
721
- : getDunderProto
729
+ : originalGetProto
722
730
  ? function getProto(O) {
731
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
732
+ throw new TypeError('getProto: not an object');
733
+ }
723
734
  // @ts-expect-error TS can't narrow inside a closure, for some reason
724
- return getDunderProto(O);
735
+ return originalGetProto(O);
725
736
  }
726
- : null;
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$3;
744
+ }
727
745
 
728
746
  var hasown;
729
747
  var hasRequiredHasown;
@@ -793,9 +811,9 @@
793
811
  }())
794
812
  : throwTypeError;
795
813
 
796
- var hasSymbols$3 = hasSymbols$4();
814
+ var hasSymbols$2 = hasSymbols$3();
797
815
 
798
- var getProto$2 = getProto$3;
816
+ var getProto$2 = requireGetProto();
799
817
  var $ObjectGPO = requireObject_getPrototypeOf();
800
818
  var $ReflectGPO = requireReflect_getPrototypeOf();
801
819
 
@@ -811,7 +829,7 @@
811
829
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
812
830
  '%Array%': Array,
813
831
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
814
- '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
832
+ '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
815
833
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
816
834
  '%AsyncFunction%': needsEval,
817
835
  '%AsyncGenerator%': needsEval,
@@ -842,10 +860,10 @@
842
860
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
843
861
  '%isFinite%': isFinite,
844
862
  '%isNaN%': isNaN,
845
- '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
863
+ '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
846
864
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
847
865
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
848
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
866
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
849
867
  '%Math%': Math,
850
868
  '%Number%': Number,
851
869
  '%Object%': $Object$2,
@@ -859,11 +877,11 @@
859
877
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
860
878
  '%RegExp%': RegExp,
861
879
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
862
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
880
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
863
881
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
864
882
  '%String%': String,
865
- '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
866
- '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
883
+ '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
884
+ '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
867
885
  '%SyntaxError%': $SyntaxError$1,
868
886
  '%ThrowTypeError%': ThrowTypeError,
869
887
  '%TypedArray%': TypedArray,
@@ -1192,9 +1210,9 @@
1192
1210
  } else {
1193
1211
  module.exports.apply = applyBind$1;
1194
1212
  }
1195
- } (callBind$7));
1213
+ } (callBind$6));
1196
1214
 
1197
- var callBindExports = callBind$7.exports;
1215
+ var callBindExports = callBind$6.exports;
1198
1216
 
1199
1217
  var GetIntrinsic$7 = getIntrinsic;
1200
1218
 
@@ -1204,7 +1222,7 @@
1204
1222
  var $indexOf$2 = callBindBasic([GetIntrinsic$7('%String.prototype.indexOf%')]);
1205
1223
 
1206
1224
  /** @type {import('.')} */
1207
- var callBound$i = function callBoundIntrinsic(name, allowMissing) {
1225
+ var callBound$h = function callBoundIntrinsic(name, allowMissing) {
1208
1226
  /* eslint no-extra-parens: 0 */
1209
1227
 
1210
1228
  var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic$7(name, !!allowMissing));
@@ -1216,12 +1234,12 @@
1216
1234
 
1217
1235
  // modified from https://github.com/es-shims/es6-shim
1218
1236
  var objectKeys$1 = objectKeys$2;
1219
- var hasSymbols$2 = requireShams()();
1220
- var callBound$h = callBound$i;
1237
+ var hasSymbols$1 = requireShams$1()();
1238
+ var callBound$g = callBound$h;
1221
1239
  var $Object$1 = esObjectAtoms;
1222
- var $push = callBound$h('Array.prototype.push');
1223
- var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
1224
- var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
1240
+ var $push = callBound$g('Array.prototype.push');
1241
+ var $propIsEnumerable = callBound$g('Object.prototype.propertyIsEnumerable');
1242
+ var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
1225
1243
 
1226
1244
  // eslint-disable-next-line no-unused-vars
1227
1245
  var implementation$8 = function assign(target, source1) {
@@ -1235,7 +1253,7 @@
1235
1253
 
1236
1254
  // step 3.a.ii:
1237
1255
  var keys = objectKeys$1(from);
1238
- var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
1256
+ var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
1239
1257
  if (getSymbols) {
1240
1258
  var syms = getSymbols(from);
1241
1259
  for (var j = 0; j < syms.length; ++j) {
@@ -1353,7 +1371,7 @@
1353
1371
 
1354
1372
  var $indexOf$1 = callBind$4(GetIntrinsic$6('String.prototype.indexOf'));
1355
1373
 
1356
- var callBound$g = function callBoundIntrinsic(name, allowMissing) {
1374
+ var callBound$f = function callBoundIntrinsic(name, allowMissing) {
1357
1375
  var intrinsic = GetIntrinsic$6(name, !!allowMissing);
1358
1376
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
1359
1377
  return callBind$4(intrinsic);
@@ -1493,7 +1511,7 @@
1493
1511
  var gOPD$2 = gopd$1;
1494
1512
  var defineProperty = Object.defineProperty;
1495
1513
  var $TypeError$5 = esErrors;
1496
- var getProto$1 = getProto$3;
1514
+ var getProto$1 = requireGetProto();
1497
1515
  var regex = /a/;
1498
1516
 
1499
1517
  var shim$3 = function shimFlags() {
@@ -1532,29 +1550,38 @@
1532
1550
 
1533
1551
  var esGetIterator = {exports: {}};
1534
1552
 
1535
- var hasSymbols$1 = requireShams();
1553
+ var shams;
1554
+ var hasRequiredShams;
1536
1555
 
1537
- /** @type {import('.')} */
1538
- var shams = function hasToStringTagShams() {
1539
- return hasSymbols$1() && !!Symbol.toStringTag;
1540
- };
1556
+ function requireShams () {
1557
+ if (hasRequiredShams) return shams;
1558
+ hasRequiredShams = 1;
1541
1559
 
1542
- var hasToStringTag$7 = shams();
1543
- var callBound$f = callBound$i;
1560
+ var hasSymbols = requireShams$1();
1544
1561
 
1545
- var $toString$7 = callBound$f('Object.prototype.toString');
1562
+ /** @type {import('.')} */
1563
+ shams = function hasToStringTagShams() {
1564
+ return hasSymbols() && !!Symbol.toStringTag;
1565
+ };
1566
+ return shams;
1567
+ }
1568
+
1569
+ var hasToStringTag$6 = requireShams()();
1570
+ var callBound$e = callBound$h;
1571
+
1572
+ var $toString$6 = callBound$e('Object.prototype.toString');
1546
1573
 
1547
1574
  /** @type {import('.')} */
1548
1575
  var isStandardArguments = function isArguments(value) {
1549
1576
  if (
1550
- hasToStringTag$7
1577
+ hasToStringTag$6
1551
1578
  && value
1552
1579
  && typeof value === 'object'
1553
1580
  && Symbol.toStringTag in value
1554
1581
  ) {
1555
1582
  return false;
1556
1583
  }
1557
- return $toString$7(value) === '[object Arguments]';
1584
+ return $toString$6(value) === '[object Arguments]';
1558
1585
  };
1559
1586
 
1560
1587
  /** @type {import('.')} */
@@ -1567,9 +1594,9 @@
1567
1594
  && 'length' in value
1568
1595
  && typeof value.length === 'number'
1569
1596
  && value.length >= 0
1570
- && $toString$7(value) !== '[object Array]'
1597
+ && $toString$6(value) !== '[object Array]'
1571
1598
  && 'callee' in value
1572
- && $toString$7(value.callee) === '[object Function]';
1599
+ && $toString$6(value.callee) === '[object Function]';
1573
1600
  };
1574
1601
 
1575
1602
  var supportsStandardArguments = (function () {
@@ -2249,22 +2276,22 @@
2249
2276
  };
2250
2277
 
2251
2278
  var GetIntrinsic$5 = getIntrinsic;
2252
- var callBound$e = callBound$i;
2279
+ var callBound$d = callBound$h;
2253
2280
  var inspect$2 = objectInspect;
2254
2281
 
2255
2282
  var $TypeError$3 = type;
2256
2283
  var $Map$3 = GetIntrinsic$5('%Map%', true);
2257
2284
 
2258
2285
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
2259
- var $mapGet$1 = callBound$e('Map.prototype.get', true);
2286
+ var $mapGet$1 = callBound$d('Map.prototype.get', true);
2260
2287
  /** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
2261
- var $mapSet = callBound$e('Map.prototype.set', true);
2288
+ var $mapSet = callBound$d('Map.prototype.set', true);
2262
2289
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
2263
- var $mapHas$5 = callBound$e('Map.prototype.has', true);
2290
+ var $mapHas$5 = callBound$d('Map.prototype.has', true);
2264
2291
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
2265
- var $mapDelete = callBound$e('Map.prototype.delete', true);
2292
+ var $mapDelete = callBound$d('Map.prototype.delete', true);
2266
2293
  /** @type {<K, V>(thisArg: Map<K, V>) => number} */
2267
- var $mapSize$1 = callBound$e('Map.prototype.size', true);
2294
+ var $mapSize$1 = callBound$d('Map.prototype.size', true);
2268
2295
 
2269
2296
  /** @type {import('.')} */
2270
2297
  var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
@@ -2316,7 +2343,7 @@
2316
2343
  };
2317
2344
 
2318
2345
  var GetIntrinsic$4 = getIntrinsic;
2319
- var callBound$d = callBound$i;
2346
+ var callBound$c = callBound$h;
2320
2347
  var inspect$1 = objectInspect;
2321
2348
  var getSideChannelMap$1 = sideChannelMap;
2322
2349
 
@@ -2324,13 +2351,13 @@
2324
2351
  var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
2325
2352
 
2326
2353
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
2327
- var $weakMapGet = callBound$d('WeakMap.prototype.get', true);
2354
+ var $weakMapGet = callBound$c('WeakMap.prototype.get', true);
2328
2355
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
2329
- var $weakMapSet = callBound$d('WeakMap.prototype.set', true);
2356
+ var $weakMapSet = callBound$c('WeakMap.prototype.set', true);
2330
2357
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
2331
- var $weakMapHas = callBound$d('WeakMap.prototype.has', true);
2358
+ var $weakMapHas = callBound$c('WeakMap.prototype.has', true);
2332
2359
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
2333
- var $weakMapDelete = callBound$d('WeakMap.prototype.delete', true);
2360
+ var $weakMapDelete = callBound$c('WeakMap.prototype.delete', true);
2334
2361
 
2335
2362
  /** @type {import('.')} */
2336
2363
  var sideChannelWeakmap = $WeakMap$1
@@ -2559,35 +2586,44 @@
2559
2586
  return toString.call(arr) == '[object Array]';
2560
2587
  };
2561
2588
 
2562
- var callBound$c = callBound$i;
2589
+ var isString$2;
2590
+ var hasRequiredIsString;
2563
2591
 
2564
- /** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
2565
- var $strValueOf = callBound$c('String.prototype.valueOf');
2592
+ function requireIsString () {
2593
+ if (hasRequiredIsString) return isString$2;
2594
+ hasRequiredIsString = 1;
2566
2595
 
2567
- /** @type {import('.')} */
2568
- var tryStringObject = function tryStringObject(value) {
2569
- try {
2570
- $strValueOf(value);
2571
- return true;
2572
- } catch (e) {
2573
- return false;
2574
- }
2575
- };
2576
- /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
2577
- var $toString$6 = callBound$c('Object.prototype.toString');
2578
- var strClass = '[object String]';
2579
- var hasToStringTag$6 = shams();
2596
+ var callBound = callBound$h;
2580
2597
 
2581
- /** @type {import('.')} */
2582
- var isString$2 = function isString(value) {
2583
- if (typeof value === 'string') {
2584
- return true;
2585
- }
2586
- if (!value || typeof value !== 'object') {
2587
- return false;
2588
- }
2589
- return hasToStringTag$6 ? tryStringObject(value) : $toString$6(value) === strClass;
2590
- };
2598
+ /** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
2599
+ var $strValueOf = callBound('String.prototype.valueOf');
2600
+
2601
+ /** @type {import('.')} */
2602
+ var tryStringObject = function tryStringObject(value) {
2603
+ try {
2604
+ $strValueOf(value);
2605
+ return true;
2606
+ } catch (e) {
2607
+ return false;
2608
+ }
2609
+ };
2610
+ /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
2611
+ var $toString = callBound('Object.prototype.toString');
2612
+ var strClass = '[object String]';
2613
+ var hasToStringTag = requireShams()();
2614
+
2615
+ /** @type {import('.')} */
2616
+ isString$2 = function isString(value) {
2617
+ if (typeof value === 'string') {
2618
+ return true;
2619
+ }
2620
+ if (!value || typeof value !== 'object') {
2621
+ return false;
2622
+ }
2623
+ return hasToStringTag ? tryStringObject(value) : $toString(value) === strClass;
2624
+ };
2625
+ return isString$2;
2626
+ }
2591
2627
 
2592
2628
  /** @const */
2593
2629
  var $Map$2 = typeof Map === 'function' && Map.prototype ? Map : null;
@@ -2692,7 +2728,7 @@
2692
2728
  var isArguments$1 = isArguments$2;
2693
2729
  var getStopIterationIterator = stopIterationIterator;
2694
2730
 
2695
- if (hasSymbols$4() || requireShams()()) {
2731
+ if (hasSymbols$3() || requireShams$1()()) {
2696
2732
  var $iterator = Symbol.iterator;
2697
2733
  // Symbol is available natively or shammed
2698
2734
  // natively:
@@ -2715,11 +2751,11 @@
2715
2751
  } else {
2716
2752
  // Symbol is not available, native or shammed
2717
2753
  var isArray$2 = isarray;
2718
- var isString$1 = isString$2;
2754
+ var isString$1 = requireIsString();
2719
2755
  var GetIntrinsic$3 = getIntrinsic;
2720
2756
  var $Map = GetIntrinsic$3('%Map%', true);
2721
2757
  var $Set$1 = GetIntrinsic$3('%Set%', true);
2722
- var callBound$b = callBound$g;
2758
+ var callBound$b = callBound$f;
2723
2759
  var $arrayPush = callBound$b('Array.prototype.push');
2724
2760
  var $charCodeAt = callBound$b('String.prototype.charCodeAt');
2725
2761
  var $stringSlice = callBound$b('String.prototype.slice');
@@ -2924,7 +2960,7 @@
2924
2960
  var objectIs = polyfill;
2925
2961
 
2926
2962
  var callBind$1 = callBindExports;
2927
- var callBound$a = callBound$i;
2963
+ var callBound$a = callBound$h;
2928
2964
  var GetIntrinsic$2 = getIntrinsic;
2929
2965
 
2930
2966
  var $ArrayBuffer = GetIntrinsic$2('%ArrayBuffer%', true);
@@ -2965,7 +3001,7 @@
2965
3001
  return false;
2966
3002
  };
2967
3003
 
2968
- var callBound$9 = callBound$i;
3004
+ var callBound$9 = callBound$h;
2969
3005
 
2970
3006
  var getDay = callBound$9('Date.prototype.getDay');
2971
3007
  /** @type {import('.')} */
@@ -2981,7 +3017,7 @@
2981
3017
  /** @type {(value: unknown) => string} */
2982
3018
  var toStr$2 = callBound$9('Object.prototype.toString');
2983
3019
  var dateClass = '[object Date]';
2984
- var hasToStringTag$5 = shams();
3020
+ var hasToStringTag$5 = requireShams()();
2985
3021
 
2986
3022
  /** @type {import('.')} */
2987
3023
  var isDateObject = function isDateObject(value) {
@@ -2991,8 +3027,8 @@
2991
3027
  return hasToStringTag$5 ? tryDateObject(value) : toStr$2(value) === dateClass;
2992
3028
  };
2993
3029
 
2994
- var callBound$8 = callBound$i;
2995
- var hasToStringTag$4 = shams();
3030
+ var callBound$8 = callBound$h;
3031
+ var hasToStringTag$4 = requireShams()();
2996
3032
  var hasOwn = requireHasown();
2997
3033
  var gOPD$1 = gopd$1;
2998
3034
 
@@ -3059,7 +3095,7 @@
3059
3095
 
3060
3096
  var isRegex$1 = fn;
3061
3097
 
3062
- var callBound$7 = callBound$i;
3098
+ var callBound$7 = callBound$h;
3063
3099
 
3064
3100
  /** @type {undefined | ((thisArg: SharedArrayBuffer) => number)} */
3065
3101
  var $byteLength$1 = callBound$7('SharedArrayBuffer.prototype.byteLength', true);
@@ -3082,7 +3118,7 @@
3082
3118
  return false;
3083
3119
  };
3084
3120
 
3085
- var callBound$6 = callBound$i;
3121
+ var callBound$6 = callBound$h;
3086
3122
 
3087
3123
  var $numToStr = callBound$6('Number.prototype.toString');
3088
3124
 
@@ -3097,7 +3133,7 @@
3097
3133
  };
3098
3134
  var $toString$3 = callBound$6('Object.prototype.toString');
3099
3135
  var numClass = '[object Number]';
3100
- var hasToStringTag$3 = shams();
3136
+ var hasToStringTag$3 = requireShams()();
3101
3137
 
3102
3138
  /** @type {import('.')} */
3103
3139
  var isNumberObject = function isNumberObject(value) {
@@ -3110,7 +3146,7 @@
3110
3146
  return hasToStringTag$3 ? tryNumberObject(value) : $toString$3(value) === numClass;
3111
3147
  };
3112
3148
 
3113
- var callBound$5 = callBound$i;
3149
+ var callBound$5 = callBound$h;
3114
3150
  var $boolToStr = callBound$5('Boolean.prototype.toString');
3115
3151
  var $toString$2 = callBound$5('Object.prototype.toString');
3116
3152
 
@@ -3124,7 +3160,7 @@
3124
3160
  }
3125
3161
  };
3126
3162
  var boolClass = '[object Boolean]';
3127
- var hasToStringTag$2 = shams();
3163
+ var hasToStringTag$2 = requireShams()();
3128
3164
 
3129
3165
  /** @type {import('.')} */
3130
3166
  var isBooleanObject = function isBoolean(value) {
@@ -3146,7 +3182,7 @@
3146
3182
  if (hasRequiredSafeRegexTest) return safeRegexTest$1;
3147
3183
  hasRequiredSafeRegexTest = 1;
3148
3184
 
3149
- var callBound = callBound$i;
3185
+ var callBound = callBound$h;
3150
3186
  var isRegex = isRegex$1;
3151
3187
 
3152
3188
  var $exec = callBound('RegExp.prototype.exec');
@@ -3164,9 +3200,9 @@
3164
3200
  return safeRegexTest$1;
3165
3201
  }
3166
3202
 
3167
- var callBound$4 = callBound$i;
3203
+ var callBound$4 = callBound$h;
3168
3204
  var $toString$1 = callBound$4('Object.prototype.toString');
3169
- var hasSymbols = hasSymbols$4();
3205
+ var hasSymbols = hasSymbols$3();
3170
3206
  var safeRegexTest = requireSafeRegexTest();
3171
3207
 
3172
3208
  if (hasSymbols) {
@@ -3259,7 +3295,7 @@
3259
3295
 
3260
3296
  var isBigintExports = isBigint.exports;
3261
3297
 
3262
- var isString = isString$2;
3298
+ var isString = requireIsString();
3263
3299
  var isNumber = isNumberObject;
3264
3300
  var isBoolean = isBooleanObject;
3265
3301
  var isSymbol = isSymbolExports;
@@ -3337,7 +3373,7 @@
3337
3373
  var isWeakset = {exports: {}};
3338
3374
 
3339
3375
  var GetIntrinsic$1 = getIntrinsic;
3340
- var callBound$3 = callBound$i;
3376
+ var callBound$3 = callBound$h;
3341
3377
 
3342
3378
  var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
3343
3379
 
@@ -3607,12 +3643,12 @@
3607
3643
  var forEach = forEach$1;
3608
3644
  var availableTypedArrays = availableTypedArrays$1;
3609
3645
  var callBind = callBindExports;
3610
- var callBound$2 = callBound$i;
3646
+ var callBound$2 = callBound$h;
3611
3647
  var gOPD = gopd$1;
3612
- var getProto = getProto$3;
3648
+ var getProto = requireGetProto();
3613
3649
 
3614
3650
  var $toString = callBound$2('Object.prototype.toString');
3615
- var hasToStringTag = shams();
3651
+ var hasToStringTag = requireShams()();
3616
3652
 
3617
3653
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
3618
3654
  var typedArrays = availableTypedArrays();
@@ -3720,7 +3756,7 @@
3720
3756
  return tryTypedArrays(value);
3721
3757
  };
3722
3758
 
3723
- var callBound$1 = callBound$i;
3759
+ var callBound$1 = callBound$h;
3724
3760
  var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
3725
3761
 
3726
3762
  var isArrayBuffer$1 = isArrayBuffer$2;
@@ -3734,7 +3770,7 @@
3734
3770
  }; // in node < 0.11, byteLength is an own nonconfigurable property
3735
3771
 
3736
3772
  var assign = object_assign;
3737
- var callBound = callBound$g;
3773
+ var callBound = callBound$f;
3738
3774
  var flags = regexp_prototype_flags;
3739
3775
  var GetIntrinsic = getIntrinsic;
3740
3776
  var getIterator = esGetIteratorExports;
@@ -5348,7 +5384,7 @@
5348
5384
  })(ChannelTypes || (ChannelTypes = {}));
5349
5385
  const defaultChannelsProps = ["id", "type", "broadcast", "addContextListener", "getCurrentContext"];
5350
5386
  const defaultContextProps = ["type"];
5351
- const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "appManager", "windows"];
5387
+ const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "windows"];
5352
5388
  const glueChannelNamePrefix = "___channel___";
5353
5389
  const fdc3NothingContextType = "fdc3.nothing";
5354
5390
  const RaiseTimeoutMs = 75 * 1000;
@@ -6265,22 +6301,50 @@
6265
6301
  if (missingApis.length) {
6266
6302
  return { isValid: false, error: { message: `Fdc3 cannot initialize correctly - Glue is missing the following ${missingApis.length > 1 ? "properties" : "property"}: ${missingApis.join(", ")}` } };
6267
6303
  }
6304
+ if (typeof glue.apps !== "object" && typeof glue.appManager !== "object") {
6305
+ return { isValid: false, error: { message: "Glue should be initialized with either 'apps' or 'appManager' API" } };
6306
+ }
6268
6307
  return { isValid: true };
6269
6308
  }
6270
6309
  interopInstance() {
6271
6310
  return this.glue.interop.instance;
6272
6311
  }
6273
- getApplication(name) {
6274
- return this.glue.appManager.application(name);
6312
+ async getApplication(name) {
6313
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6314
+ if (!isAppsAPIAvailable) {
6315
+ return this.glue.appManager.application(name);
6316
+ }
6317
+ const app = await this.glue.apps.registry.get({ name });
6318
+ return app ?? undefined;
6275
6319
  }
6276
- getAllAppManagerInstances() {
6277
- return this.glue.appManager.instances();
6320
+ async getApplicationInstances(appName) {
6321
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6322
+ if (!isAppsAPIAvailable) {
6323
+ return this.glue.appManager.instances().filter(inst => inst.application.name === appName);
6324
+ }
6325
+ const appInstances = await this.glue.apps.instances.getMany({ appNames: [appName] });
6326
+ return appInstances;
6278
6327
  }
6279
- getApplicationInstances(appName) {
6280
- return this.getAllAppManagerInstances().filter(inst => inst.application.name === appName);
6328
+ async getAppInstanceById(id) {
6329
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6330
+ if (!isAppsAPIAvailable) {
6331
+ return this.glue.appManager.instances().find(inst => inst.id === id);
6332
+ }
6333
+ const appInstance = await this.glue.apps.instances.get({ id });
6334
+ return appInstance ?? undefined;
6281
6335
  }
6282
- getAppInstanceById(id) {
6283
- return this.getAllAppManagerInstances().find(inst => inst.id === id);
6336
+ async startApplication({ app, context, waitForInstanceReady }) {
6337
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6338
+ if (!isAppsAPIAvailable) {
6339
+ const glueInst = await app.start(context, { waitForAGMReady: waitForInstanceReady });
6340
+ return glueInst;
6341
+ }
6342
+ const glueInstance = await this.glue.apps.instances.start({ name: app.name, context });
6343
+ if (!waitForInstanceReady) {
6344
+ return glueInstance;
6345
+ }
6346
+ await this.glue.apps?.instances.waitForReady({ id: glueInstance.id });
6347
+ return glueInstance;
6284
6348
  }
6285
6349
  async findIntents(intentFilter) {
6286
6350
  return this.glue.intents.find(intentFilter);
@@ -6404,8 +6468,15 @@
6404
6468
  getGlueVersion() {
6405
6469
  return this.glue?.version;
6406
6470
  }
6407
- registerOnInstanceStopped(cb) {
6408
- return this.glue.appManager.onInstanceStopped(cb);
6471
+ async registerOnInstanceStopped(callback) {
6472
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6473
+ if (!isAppsAPIAvailable) {
6474
+ return this.glue.appManager.onInstanceStopped((inst) => callback(inst.id));
6475
+ }
6476
+ const unsub = await this.glue.apps.instances.onStopped((event) => {
6477
+ callback(event.instance.id);
6478
+ });
6479
+ return unsub;
6409
6480
  }
6410
6481
  async unregisterMethod(methodName) {
6411
6482
  return this.glue.interop.unregister(methodName);
@@ -6567,6 +6638,9 @@
6567
6638
  async contextsSetPaths(name, paths) {
6568
6639
  await this.glue.contexts.setPaths(name, paths);
6569
6640
  }
6641
+ isAppsAPIAvailable() {
6642
+ return typeof this.glue.apps === "object";
6643
+ }
6570
6644
  }
6571
6645
 
6572
6646
  const GLUE42_EVENT_NAME = "Glue42";
@@ -8600,10 +8674,11 @@
8600
8674
  throw new Error(ResolveError.NoAppsFound);
8601
8675
  }
8602
8676
  this.logger?.info(`[${commandId}] - parsing glue intents to fdc3 intents and returning`);
8603
- return glueIntents.map((glueIntent) => {
8677
+ const appIntents = await Promise.all(glueIntents.map((glueIntent) => {
8604
8678
  const intentWithFilteredHandlers = this.getGlueIntentWithFilteredHandlers(glueIntent, { contextType: context.type, resultType });
8605
8679
  return this.convertGlue42IntentToFDC3Intent(intentWithFilteredHandlers);
8606
- });
8680
+ }));
8681
+ return appIntents;
8607
8682
  }
8608
8683
  async raiseIntent({ commandId, intent, context, target }) {
8609
8684
  await this.glueController.gluePromise;
@@ -8615,7 +8690,7 @@
8615
8690
  throw new Error(ResolveError.NoAppsFound);
8616
8691
  }
8617
8692
  if (!target) {
8618
- const filteredGlueIntent = this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
8693
+ const filteredGlueIntent = await this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
8619
8694
  this.logger?.info(`[${commandId}] - raising intent ${intent} with contextType ${context.type} and handlers ${filteredGlueIntent.handlers.map(h => h.applicationName && h.instanceId)}`);
8620
8695
  return this.invokeRaiseIntent(commandId, { intent, context: glueContext, handlers: filteredGlueIntent.handlers });
8621
8696
  }
@@ -8721,7 +8796,7 @@
8721
8796
  handler: rememberedHandlerWithFilter.handler
8722
8797
  };
8723
8798
  }
8724
- filterGlueIntentHandlers({ commandId, intent, context, target }) {
8799
+ async filterGlueIntentHandlers({ commandId, intent, context, target }) {
8725
8800
  let filteredGlueIntent;
8726
8801
  filteredGlueIntent = this.filterIntentHandlersByContext(intent, context);
8727
8802
  if (!target) {
@@ -8729,14 +8804,14 @@
8729
8804
  return filteredGlueIntent;
8730
8805
  }
8731
8806
  this.logger?.log(`[${commandId}] - filtering handlers by target (${JSON.stringify(target)}) for intent ${intent.name}`);
8732
- filteredGlueIntent = this.filterIntentHandlersByTarget({ intent, target, commandId });
8807
+ filteredGlueIntent = await this.filterIntentHandlersByTarget({ intent, target, commandId });
8733
8808
  return filteredGlueIntent;
8734
8809
  }
8735
- filterIntentHandlersByTarget({ intent, target, commandId }) {
8810
+ async filterIntentHandlersByTarget({ intent, target, commandId }) {
8736
8811
  const appName = typeof target === "string" ? target : target.appId;
8737
8812
  const instanceId = typeof target === "string" ? undefined : target.instanceId;
8738
8813
  this.logger?.info(`[${commandId}] - Checking if application with name ${appName} exists`);
8739
- const app = this.glueController.getApplication(appName);
8814
+ const app = await this.glueController.getApplication(appName);
8740
8815
  const serverInstances = this.serverInstanceAsIntentHandler(intent.name);
8741
8816
  if (!app && (typeof target === "string" || !target.instanceId || !serverInstances.length)) {
8742
8817
  throw new Error(ResolveError.TargetAppUnavailable);
@@ -8816,27 +8891,28 @@
8816
8891
  this.logger?.info(`[${commandId}] - returning private channel`);
8817
8892
  return channel.toApi();
8818
8893
  }
8819
- convertGlue42IntentToFDC3Intent(glueIntent) {
8894
+ async convertGlue42IntentToFDC3Intent(glueIntent) {
8820
8895
  const { name, handlers } = glueIntent;
8896
+ const apps = await Promise.all(handlers.map(async (handler) => {
8897
+ const appName = handler.applicationName;
8898
+ const app = await this.glueController.getApplication(appName);
8899
+ const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
8900
+ const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
8901
+ return {
8902
+ appId: appName,
8903
+ instanceId: handler.instanceId,
8904
+ name: appName,
8905
+ title: handler.applicationTitle || handler.instanceTitle || appName,
8906
+ tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
8907
+ description: handler.applicationDescription,
8908
+ icons,
8909
+ images,
8910
+ resultType: handler.resultType
8911
+ };
8912
+ }));
8821
8913
  const appIntent = {
8822
8914
  intent: { name, displayName: handlers[0].displayName || "" },
8823
- apps: handlers.map((handler) => {
8824
- const appName = handler.applicationName;
8825
- const app = this.glueController.getApplication(appName);
8826
- const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
8827
- const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
8828
- return {
8829
- appId: appName,
8830
- instanceId: handler.instanceId,
8831
- name: appName,
8832
- title: handler.applicationTitle || handler.instanceTitle || appName,
8833
- tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
8834
- description: handler.applicationDescription,
8835
- icons,
8836
- images,
8837
- resultType: handler.resultType
8838
- };
8839
- })
8915
+ apps
8840
8916
  };
8841
8917
  return appIntent;
8842
8918
  }
@@ -8949,7 +9025,7 @@
8949
9025
  await this.glueController.gluePromise;
8950
9026
  this.logger?.log(`[${commandId}] - open() invoked with target ${JSON.stringify(target)} ${context ? `and contextType ${context.type}` : ""}`);
8951
9027
  const name = typeof target === "object" ? target.appId : target;
8952
- const app = this.glueController.getApplication(name);
9028
+ const app = await this.glueController.getApplication(name);
8953
9029
  if (!app) {
8954
9030
  throw new Error(OpenError.AppNotFound);
8955
9031
  }
@@ -8960,8 +9036,7 @@
8960
9036
  }
8961
9037
  try {
8962
9038
  this.logger?.info(`[${commandId}] - opening app '${app.name}' without context`);
8963
- const inBrowser = this.glueController.isRunningInBrowser();
8964
- const glueInst = await app.start(undefined, { waitForAGMReady: !inBrowser });
9039
+ const glueInst = await this.glueController.startApplication({ app, waitForInstanceReady: !this.glueController.isRunningInBrowser() });
8965
9040
  this.logger?.info(`[${commandId}] - instance with id ${glueInst.id} started`);
8966
9041
  return this.parseGlueInstToAppIdentifier(glueInst);
8967
9042
  }
@@ -8973,11 +9048,11 @@
8973
9048
  await this.glueController.gluePromise;
8974
9049
  this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
8975
9050
  const { appId } = appIdentifier;
8976
- const app = this.glueController.getApplication(appId);
9051
+ const app = await this.glueController.getApplication(appId);
8977
9052
  if (!app) {
8978
9053
  throw new Error(ResolveError.NoAppsFound);
8979
9054
  }
8980
- const glueInstances = this.glueController.getApplicationInstances(appId);
9055
+ const glueInstances = await this.glueController.getApplicationInstances(appId);
8981
9056
  const fdc3Instances = glueInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
8982
9057
  this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${JSON.stringify(appIdentifier)}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
8983
9058
  return fdc3Instances;
@@ -8986,7 +9061,7 @@
8986
9061
  await this.glueController.gluePromise;
8987
9062
  this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
8988
9063
  const { appId, instanceId } = appIdentifier;
8989
- const app = this.glueController.getApplication(appId);
9064
+ const app = await this.glueController.getApplication(appId);
8990
9065
  if (!app) {
8991
9066
  throw new Error(OpenError.AppNotFound);
8992
9067
  }
@@ -8994,7 +9069,7 @@
8994
9069
  this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app.name}`);
8995
9070
  return this.parseGlueAppToAppMetadata(app);
8996
9071
  }
8997
- const instance = this.glueController.getAppInstanceById(instanceId);
9072
+ const instance = await this.glueController.getAppInstanceById(instanceId);
8998
9073
  const appMetadata = this.parseGlueAppToAppMetadata(app, instance);
8999
9074
  this.logger?.info(`[${commandId}] - found app metadata: ${appMetadata}`);
9000
9075
  return appMetadata;
@@ -9002,9 +9077,9 @@
9002
9077
  async getInfo({ commandId }) {
9003
9078
  await this.glueController.gluePromise;
9004
9079
  this.logger?.info(`${commandId} - getInfo() invoked`);
9005
- const appMetadata = this.getCurrentAppMetadata();
9080
+ const appMetadata = await this.getCurrentAppMetadata();
9006
9081
  const globalScope = typeof process !== "undefined" ? process : window;
9007
- const { provider, providerVersion, standardVersion } = globalScope.fdc3Info;
9082
+ const { provider, providerVersion, standardVersion } = globalScope.fdc3Info ?? {};
9008
9083
  return {
9009
9084
  provider,
9010
9085
  providerVersion,
@@ -9017,10 +9092,10 @@
9017
9092
  appMetadata
9018
9093
  };
9019
9094
  }
9020
- getCurrentAppMetadata() {
9095
+ async getCurrentAppMetadata() {
9021
9096
  const myInstance = this.glueController.interopInstance();
9022
9097
  const myInstanceApplicationName = myInstance.application ?? myInstance.applicationName;
9023
- const myApp = this.glueController.getApplication(myInstanceApplicationName);
9098
+ const myApp = await this.glueController.getApplication(myInstanceApplicationName);
9024
9099
  if (myApp) {
9025
9100
  return { appId: myApp.name, instanceId: myInstance.instance };
9026
9101
  }
@@ -9029,7 +9104,7 @@
9029
9104
  }
9030
9105
  parseGlueInstToAppIdentifier(glueInst) {
9031
9106
  return {
9032
- appId: glueInst.application.name,
9107
+ appId: this.isApplicationInstance(glueInst) ? glueInst.appName : glueInst.application.name,
9033
9108
  instanceId: glueInst.id
9034
9109
  };
9035
9110
  }
@@ -9048,6 +9123,10 @@
9048
9123
  const icon = inBrowserNamespace
9049
9124
  ? app.icon
9050
9125
  : (await app.getConfiguration()).icon;
9126
+ const desktopScreenshots = appConfiguration.customProperties?.screenshots ?? appConfiguration.userProperties?.screenshots;
9127
+ const screenshots = inBrowserNamespace
9128
+ ? appConfiguration.screenshots
9129
+ : desktopScreenshots;
9051
9130
  return {
9052
9131
  appId: app.name,
9053
9132
  name: app.name,
@@ -9056,22 +9135,30 @@
9056
9135
  title: app.title,
9057
9136
  icons: icon ? [{ src: icon }] : [],
9058
9137
  tooltip: appConfiguration.tooltip,
9059
- screenshots: inBrowserNamespace
9060
- ? appConfiguration.screenshots
9061
- : appConfiguration.customProperties.screenshots
9138
+ screenshots
9062
9139
  };
9063
9140
  }
9064
9141
  addInstanceMetadataToAppMetadata(appMetadata, instance) {
9065
- return { ...appMetadata, instanceId: instance.id, instanceMetadata: instance.agm };
9142
+ return {
9143
+ ...appMetadata,
9144
+ instanceId: instance.id,
9145
+ instanceMetadata: this.isApplicationInstance(instance) ? instance.interopInstance : instance.agm
9146
+ };
9147
+ }
9148
+ isApplicationInstance(instance) {
9149
+ return "appName" in instance;
9066
9150
  }
9067
9151
  async openAppWithContext(app, context) {
9068
9152
  const guid = nanoid();
9069
9153
  const startContext = this.buildStartContext(context, guid);
9070
9154
  const wrappedPromise = this.createContextListenerWrappedPromise(app);
9071
9155
  this.appsStateStore.addOpenAppPromise(guid, wrappedPromise);
9072
- const inBrowser = this.glueController.isRunningInBrowser();
9073
9156
  try {
9074
- const glueInst = await app.start(startContext, { waitForAGMReady: !inBrowser });
9157
+ const glueInst = await this.glueController.startApplication({
9158
+ app,
9159
+ context: startContext,
9160
+ waitForInstanceReady: !this.glueController.isRunningInBrowser()
9161
+ });
9075
9162
  await wrappedPromise.promise;
9076
9163
  this.appsStateStore.removeOpenAppPromise(guid);
9077
9164
  return this.parseGlueInstToAppIdentifier(glueInst);
@@ -9533,9 +9620,12 @@
9533
9620
  this.channelsController.removePrivateChannelFromStoreById(this.id);
9534
9621
  await this.sendCollaborateMessage({ action: "disconnectedFromPrivateChannel" });
9535
9622
  this.logger?.trace(`[${commandId}] - collaborator received action ${"disconnectedFromPrivateChannel"}`);
9536
- if (this.unsubFromInstanceStopped) {
9537
- this.unsubFromInstanceStopped();
9623
+ if (!this.unsubFromInstanceStopped) {
9624
+ return;
9538
9625
  }
9626
+ const unsub = this.unsubFromInstanceStopped instanceof Promise ? await this.unsubFromInstanceStopped : this.unsubFromInstanceStopped;
9627
+ unsub();
9628
+ this.unsubFromInstanceStopped = undefined;
9539
9629
  }
9540
9630
  ensureAlive(commandId) {
9541
9631
  if (!this.disconnected) {
@@ -9554,8 +9644,8 @@
9554
9644
  throw new Error(ChannelError.AccessDenied);
9555
9645
  }
9556
9646
  subscribeForCollaboratorInstanceStop(commandId) {
9557
- const handler = (instance) => {
9558
- if (instance.id !== this.collaborator?.instanceId) {
9647
+ const handler = (id) => {
9648
+ if (id !== this.collaborator?.instanceId) {
9559
9649
  return;
9560
9650
  }
9561
9651
  this.handleCollaboratorDisconnect();
@@ -10440,7 +10530,7 @@
10440
10530
  return ioc.fdc3;
10441
10531
  };
10442
10532
 
10443
- var version = "2.7.0";
10533
+ var version = "2.7.1";
10444
10534
 
10445
10535
  const globalScope = typeof process !== "undefined" ? process : window;
10446
10536
  globalScope.fdc3Info = {