@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.
@@ -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; }
@@ -647,16 +647,16 @@
647
647
  /** @type {import('./reflectApply')} */
648
648
  var reflectApply$1 = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
649
649
 
650
- var bind$4 = requireFunctionBind();
650
+ var bind$3 = requireFunctionBind();
651
651
 
652
652
  var $apply$2 = requireFunctionApply();
653
653
  var $call$2 = requireFunctionCall();
654
654
  var $reflectApply = reflectApply$1;
655
655
 
656
656
  /** @type {import('./actualApply')} */
657
- var actualApply$1 = $reflectApply || bind$4.call($call$2, $apply$2);
657
+ var actualApply$1 = $reflectApply || bind$3.call($call$2, $apply$2);
658
658
 
659
- var bind$3 = requireFunctionBind();
659
+ var bind$2 = requireFunctionBind();
660
660
  var $TypeError$a = type;
661
661
 
662
662
  var $call$1 = requireFunctionCall();
@@ -667,70 +667,97 @@
667
667
  if (args.length < 1 || typeof args[0] !== 'function') {
668
668
  throw new $TypeError$a('a function is required');
669
669
  }
670
- return $actualApply(bind$3, $call$1, args);
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
- var call = Function.prototype.call;
729
- var $hasOwn = Object.prototype.hasOwnProperty;
730
- var bind$2 = requireFunctionBind();
746
+ var hasown;
747
+ var hasRequiredHasown;
731
748
 
732
- /** @type {import('.')} */
733
- var hasown = bind$2.call(call, $hasOwn);
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
+ }
734
761
 
735
762
  var undefined$1;
736
763
 
@@ -784,9 +811,9 @@
784
811
  }())
785
812
  : throwTypeError;
786
813
 
787
- var hasSymbols$3 = hasSymbols$4();
814
+ var hasSymbols$2 = hasSymbols$3();
788
815
 
789
- var getProto$2 = getProto$3;
816
+ var getProto$2 = requireGetProto();
790
817
  var $ObjectGPO = requireObject_getPrototypeOf();
791
818
  var $ReflectGPO = requireReflect_getPrototypeOf();
792
819
 
@@ -802,7 +829,7 @@
802
829
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
803
830
  '%Array%': Array,
804
831
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
805
- '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
832
+ '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
806
833
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
807
834
  '%AsyncFunction%': needsEval,
808
835
  '%AsyncGenerator%': needsEval,
@@ -833,10 +860,10 @@
833
860
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
834
861
  '%isFinite%': isFinite,
835
862
  '%isNaN%': isNaN,
836
- '%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,
837
864
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
838
865
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
839
- '%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]()),
840
867
  '%Math%': Math,
841
868
  '%Number%': Number,
842
869
  '%Object%': $Object$2,
@@ -850,11 +877,11 @@
850
877
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
851
878
  '%RegExp%': RegExp,
852
879
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
853
- '%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]()),
854
881
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
855
882
  '%String%': String,
856
- '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
857
- '%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,
858
885
  '%SyntaxError%': $SyntaxError$1,
859
886
  '%ThrowTypeError%': ThrowTypeError,
860
887
  '%TypedArray%': TypedArray,
@@ -973,7 +1000,7 @@
973
1000
  };
974
1001
 
975
1002
  var bind$1 = requireFunctionBind();
976
- var hasOwn$3 = hasown;
1003
+ var hasOwn$3 = requireHasown();
977
1004
  var $concat$1 = bind$1.call($call, Array.prototype.concat);
978
1005
  var $spliceApply = bind$1.call($apply$1, Array.prototype.splice);
979
1006
  var $replace$1 = bind$1.call($call, String.prototype.replace);
@@ -1183,9 +1210,9 @@
1183
1210
  } else {
1184
1211
  module.exports.apply = applyBind$1;
1185
1212
  }
1186
- } (callBind$7));
1213
+ } (callBind$6));
1187
1214
 
1188
- var callBindExports = callBind$7.exports;
1215
+ var callBindExports = callBind$6.exports;
1189
1216
 
1190
1217
  var GetIntrinsic$7 = getIntrinsic;
1191
1218
 
@@ -1195,7 +1222,7 @@
1195
1222
  var $indexOf$2 = callBindBasic([GetIntrinsic$7('%String.prototype.indexOf%')]);
1196
1223
 
1197
1224
  /** @type {import('.')} */
1198
- var callBound$i = function callBoundIntrinsic(name, allowMissing) {
1225
+ var callBound$h = function callBoundIntrinsic(name, allowMissing) {
1199
1226
  /* eslint no-extra-parens: 0 */
1200
1227
 
1201
1228
  var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic$7(name, !!allowMissing));
@@ -1207,12 +1234,12 @@
1207
1234
 
1208
1235
  // modified from https://github.com/es-shims/es6-shim
1209
1236
  var objectKeys$1 = objectKeys$2;
1210
- var hasSymbols$2 = requireShams()();
1211
- var callBound$h = callBound$i;
1237
+ var hasSymbols$1 = requireShams$1()();
1238
+ var callBound$g = callBound$h;
1212
1239
  var $Object$1 = esObjectAtoms;
1213
- var $push = callBound$h('Array.prototype.push');
1214
- var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
1215
- 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;
1216
1243
 
1217
1244
  // eslint-disable-next-line no-unused-vars
1218
1245
  var implementation$8 = function assign(target, source1) {
@@ -1226,7 +1253,7 @@
1226
1253
 
1227
1254
  // step 3.a.ii:
1228
1255
  var keys = objectKeys$1(from);
1229
- var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
1256
+ var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
1230
1257
  if (getSymbols) {
1231
1258
  var syms = getSymbols(from);
1232
1259
  for (var j = 0; j < syms.length; ++j) {
@@ -1344,7 +1371,7 @@
1344
1371
 
1345
1372
  var $indexOf$1 = callBind$4(GetIntrinsic$6('String.prototype.indexOf'));
1346
1373
 
1347
- var callBound$g = function callBoundIntrinsic(name, allowMissing) {
1374
+ var callBound$f = function callBoundIntrinsic(name, allowMissing) {
1348
1375
  var intrinsic = GetIntrinsic$6(name, !!allowMissing);
1349
1376
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
1350
1377
  return callBind$4(intrinsic);
@@ -1484,7 +1511,7 @@
1484
1511
  var gOPD$2 = gopd$1;
1485
1512
  var defineProperty = Object.defineProperty;
1486
1513
  var $TypeError$5 = esErrors;
1487
- var getProto$1 = getProto$3;
1514
+ var getProto$1 = requireGetProto();
1488
1515
  var regex = /a/;
1489
1516
 
1490
1517
  var shim$3 = function shimFlags() {
@@ -1523,29 +1550,38 @@
1523
1550
 
1524
1551
  var esGetIterator = {exports: {}};
1525
1552
 
1526
- var hasSymbols$1 = requireShams();
1553
+ var shams;
1554
+ var hasRequiredShams;
1527
1555
 
1528
- /** @type {import('.')} */
1529
- var shams = function hasToStringTagShams() {
1530
- return hasSymbols$1() && !!Symbol.toStringTag;
1531
- };
1556
+ function requireShams () {
1557
+ if (hasRequiredShams) return shams;
1558
+ hasRequiredShams = 1;
1532
1559
 
1533
- var hasToStringTag$7 = shams();
1534
- var callBound$f = callBound$i;
1560
+ var hasSymbols = requireShams$1();
1535
1561
 
1536
- 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');
1537
1573
 
1538
1574
  /** @type {import('.')} */
1539
1575
  var isStandardArguments = function isArguments(value) {
1540
1576
  if (
1541
- hasToStringTag$7
1577
+ hasToStringTag$6
1542
1578
  && value
1543
1579
  && typeof value === 'object'
1544
1580
  && Symbol.toStringTag in value
1545
1581
  ) {
1546
1582
  return false;
1547
1583
  }
1548
- return $toString$7(value) === '[object Arguments]';
1584
+ return $toString$6(value) === '[object Arguments]';
1549
1585
  };
1550
1586
 
1551
1587
  /** @type {import('.')} */
@@ -1558,9 +1594,9 @@
1558
1594
  && 'length' in value
1559
1595
  && typeof value.length === 'number'
1560
1596
  && value.length >= 0
1561
- && $toString$7(value) !== '[object Array]'
1597
+ && $toString$6(value) !== '[object Array]'
1562
1598
  && 'callee' in value
1563
- && $toString$7(value.callee) === '[object Function]';
1599
+ && $toString$6(value.callee) === '[object Function]';
1564
1600
  };
1565
1601
 
1566
1602
  var supportsStandardArguments = (function () {
@@ -2240,22 +2276,22 @@
2240
2276
  };
2241
2277
 
2242
2278
  var GetIntrinsic$5 = getIntrinsic;
2243
- var callBound$e = callBound$i;
2279
+ var callBound$d = callBound$h;
2244
2280
  var inspect$2 = objectInspect;
2245
2281
 
2246
2282
  var $TypeError$3 = type;
2247
2283
  var $Map$3 = GetIntrinsic$5('%Map%', true);
2248
2284
 
2249
2285
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
2250
- var $mapGet$1 = callBound$e('Map.prototype.get', true);
2286
+ var $mapGet$1 = callBound$d('Map.prototype.get', true);
2251
2287
  /** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
2252
- var $mapSet = callBound$e('Map.prototype.set', true);
2288
+ var $mapSet = callBound$d('Map.prototype.set', true);
2253
2289
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
2254
- var $mapHas$5 = callBound$e('Map.prototype.has', true);
2290
+ var $mapHas$5 = callBound$d('Map.prototype.has', true);
2255
2291
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
2256
- var $mapDelete = callBound$e('Map.prototype.delete', true);
2292
+ var $mapDelete = callBound$d('Map.prototype.delete', true);
2257
2293
  /** @type {<K, V>(thisArg: Map<K, V>) => number} */
2258
- var $mapSize$1 = callBound$e('Map.prototype.size', true);
2294
+ var $mapSize$1 = callBound$d('Map.prototype.size', true);
2259
2295
 
2260
2296
  /** @type {import('.')} */
2261
2297
  var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
@@ -2307,7 +2343,7 @@
2307
2343
  };
2308
2344
 
2309
2345
  var GetIntrinsic$4 = getIntrinsic;
2310
- var callBound$d = callBound$i;
2346
+ var callBound$c = callBound$h;
2311
2347
  var inspect$1 = objectInspect;
2312
2348
  var getSideChannelMap$1 = sideChannelMap;
2313
2349
 
@@ -2315,13 +2351,13 @@
2315
2351
  var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
2316
2352
 
2317
2353
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
2318
- var $weakMapGet = callBound$d('WeakMap.prototype.get', true);
2354
+ var $weakMapGet = callBound$c('WeakMap.prototype.get', true);
2319
2355
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
2320
- var $weakMapSet = callBound$d('WeakMap.prototype.set', true);
2356
+ var $weakMapSet = callBound$c('WeakMap.prototype.set', true);
2321
2357
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
2322
- var $weakMapHas = callBound$d('WeakMap.prototype.has', true);
2358
+ var $weakMapHas = callBound$c('WeakMap.prototype.has', true);
2323
2359
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
2324
- var $weakMapDelete = callBound$d('WeakMap.prototype.delete', true);
2360
+ var $weakMapDelete = callBound$c('WeakMap.prototype.delete', true);
2325
2361
 
2326
2362
  /** @type {import('.')} */
2327
2363
  var sideChannelWeakmap = $WeakMap$1
@@ -2434,7 +2470,7 @@
2434
2470
  /** @typedef {`$${import('.').InternalSlot}`} SaltedInternalSlot */
2435
2471
  /** @typedef {{ [k in SaltedInternalSlot]?: unknown }} SlotsObject */
2436
2472
 
2437
- var hasOwn$1 = hasown;
2473
+ var hasOwn$1 = requireHasown();
2438
2474
  /** @type {import('side-channel').Channel<object, SlotsObject>} */
2439
2475
  var channel = sideChannel();
2440
2476
 
@@ -2550,35 +2586,44 @@
2550
2586
  return toString.call(arr) == '[object Array]';
2551
2587
  };
2552
2588
 
2553
- var callBound$c = callBound$i;
2589
+ var isString$2;
2590
+ var hasRequiredIsString;
2554
2591
 
2555
- /** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
2556
- var $strValueOf = callBound$c('String.prototype.valueOf');
2592
+ function requireIsString () {
2593
+ if (hasRequiredIsString) return isString$2;
2594
+ hasRequiredIsString = 1;
2557
2595
 
2558
- /** @type {import('.')} */
2559
- var tryStringObject = function tryStringObject(value) {
2560
- try {
2561
- $strValueOf(value);
2562
- return true;
2563
- } catch (e) {
2564
- return false;
2565
- }
2566
- };
2567
- /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
2568
- var $toString$6 = callBound$c('Object.prototype.toString');
2569
- var strClass = '[object String]';
2570
- var hasToStringTag$6 = shams();
2596
+ var callBound = callBound$h;
2571
2597
 
2572
- /** @type {import('.')} */
2573
- var isString$2 = function isString(value) {
2574
- if (typeof value === 'string') {
2575
- return true;
2576
- }
2577
- if (!value || typeof value !== 'object') {
2578
- return false;
2579
- }
2580
- return hasToStringTag$6 ? tryStringObject(value) : $toString$6(value) === strClass;
2581
- };
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
+ }
2582
2627
 
2583
2628
  /** @const */
2584
2629
  var $Map$2 = typeof Map === 'function' && Map.prototype ? Map : null;
@@ -2683,7 +2728,7 @@
2683
2728
  var isArguments$1 = isArguments$2;
2684
2729
  var getStopIterationIterator = stopIterationIterator;
2685
2730
 
2686
- if (hasSymbols$4() || requireShams()()) {
2731
+ if (hasSymbols$3() || requireShams$1()()) {
2687
2732
  var $iterator = Symbol.iterator;
2688
2733
  // Symbol is available natively or shammed
2689
2734
  // natively:
@@ -2706,11 +2751,11 @@
2706
2751
  } else {
2707
2752
  // Symbol is not available, native or shammed
2708
2753
  var isArray$2 = isarray;
2709
- var isString$1 = isString$2;
2754
+ var isString$1 = requireIsString();
2710
2755
  var GetIntrinsic$3 = getIntrinsic;
2711
2756
  var $Map = GetIntrinsic$3('%Map%', true);
2712
2757
  var $Set$1 = GetIntrinsic$3('%Set%', true);
2713
- var callBound$b = callBound$g;
2758
+ var callBound$b = callBound$f;
2714
2759
  var $arrayPush = callBound$b('Array.prototype.push');
2715
2760
  var $charCodeAt = callBound$b('String.prototype.charCodeAt');
2716
2761
  var $stringSlice = callBound$b('String.prototype.slice');
@@ -2915,7 +2960,7 @@
2915
2960
  var objectIs = polyfill;
2916
2961
 
2917
2962
  var callBind$1 = callBindExports;
2918
- var callBound$a = callBound$i;
2963
+ var callBound$a = callBound$h;
2919
2964
  var GetIntrinsic$2 = getIntrinsic;
2920
2965
 
2921
2966
  var $ArrayBuffer = GetIntrinsic$2('%ArrayBuffer%', true);
@@ -2956,7 +3001,7 @@
2956
3001
  return false;
2957
3002
  };
2958
3003
 
2959
- var callBound$9 = callBound$i;
3004
+ var callBound$9 = callBound$h;
2960
3005
 
2961
3006
  var getDay = callBound$9('Date.prototype.getDay');
2962
3007
  /** @type {import('.')} */
@@ -2972,7 +3017,7 @@
2972
3017
  /** @type {(value: unknown) => string} */
2973
3018
  var toStr$2 = callBound$9('Object.prototype.toString');
2974
3019
  var dateClass = '[object Date]';
2975
- var hasToStringTag$5 = shams();
3020
+ var hasToStringTag$5 = requireShams()();
2976
3021
 
2977
3022
  /** @type {import('.')} */
2978
3023
  var isDateObject = function isDateObject(value) {
@@ -2982,9 +3027,9 @@
2982
3027
  return hasToStringTag$5 ? tryDateObject(value) : toStr$2(value) === dateClass;
2983
3028
  };
2984
3029
 
2985
- var callBound$8 = callBound$i;
2986
- var hasToStringTag$4 = shams();
2987
- var hasOwn = hasown;
3030
+ var callBound$8 = callBound$h;
3031
+ var hasToStringTag$4 = requireShams()();
3032
+ var hasOwn = requireHasown();
2988
3033
  var gOPD$1 = gopd$1;
2989
3034
 
2990
3035
  /** @type {import('.')} */
@@ -3050,7 +3095,7 @@
3050
3095
 
3051
3096
  var isRegex$1 = fn;
3052
3097
 
3053
- var callBound$7 = callBound$i;
3098
+ var callBound$7 = callBound$h;
3054
3099
 
3055
3100
  /** @type {undefined | ((thisArg: SharedArrayBuffer) => number)} */
3056
3101
  var $byteLength$1 = callBound$7('SharedArrayBuffer.prototype.byteLength', true);
@@ -3073,7 +3118,7 @@
3073
3118
  return false;
3074
3119
  };
3075
3120
 
3076
- var callBound$6 = callBound$i;
3121
+ var callBound$6 = callBound$h;
3077
3122
 
3078
3123
  var $numToStr = callBound$6('Number.prototype.toString');
3079
3124
 
@@ -3088,7 +3133,7 @@
3088
3133
  };
3089
3134
  var $toString$3 = callBound$6('Object.prototype.toString');
3090
3135
  var numClass = '[object Number]';
3091
- var hasToStringTag$3 = shams();
3136
+ var hasToStringTag$3 = requireShams()();
3092
3137
 
3093
3138
  /** @type {import('.')} */
3094
3139
  var isNumberObject = function isNumberObject(value) {
@@ -3101,7 +3146,7 @@
3101
3146
  return hasToStringTag$3 ? tryNumberObject(value) : $toString$3(value) === numClass;
3102
3147
  };
3103
3148
 
3104
- var callBound$5 = callBound$i;
3149
+ var callBound$5 = callBound$h;
3105
3150
  var $boolToStr = callBound$5('Boolean.prototype.toString');
3106
3151
  var $toString$2 = callBound$5('Object.prototype.toString');
3107
3152
 
@@ -3115,7 +3160,7 @@
3115
3160
  }
3116
3161
  };
3117
3162
  var boolClass = '[object Boolean]';
3118
- var hasToStringTag$2 = shams();
3163
+ var hasToStringTag$2 = requireShams()();
3119
3164
 
3120
3165
  /** @type {import('.')} */
3121
3166
  var isBooleanObject = function isBoolean(value) {
@@ -3137,7 +3182,7 @@
3137
3182
  if (hasRequiredSafeRegexTest) return safeRegexTest$1;
3138
3183
  hasRequiredSafeRegexTest = 1;
3139
3184
 
3140
- var callBound = callBound$i;
3185
+ var callBound = callBound$h;
3141
3186
  var isRegex = isRegex$1;
3142
3187
 
3143
3188
  var $exec = callBound('RegExp.prototype.exec');
@@ -3155,9 +3200,9 @@
3155
3200
  return safeRegexTest$1;
3156
3201
  }
3157
3202
 
3158
- var callBound$4 = callBound$i;
3203
+ var callBound$4 = callBound$h;
3159
3204
  var $toString$1 = callBound$4('Object.prototype.toString');
3160
- var hasSymbols = hasSymbols$4();
3205
+ var hasSymbols = hasSymbols$3();
3161
3206
  var safeRegexTest = requireSafeRegexTest();
3162
3207
 
3163
3208
  if (hasSymbols) {
@@ -3250,7 +3295,7 @@
3250
3295
 
3251
3296
  var isBigintExports = isBigint.exports;
3252
3297
 
3253
- var isString = isString$2;
3298
+ var isString = requireIsString();
3254
3299
  var isNumber = isNumberObject;
3255
3300
  var isBoolean = isBooleanObject;
3256
3301
  var isSymbol = isSymbolExports;
@@ -3328,7 +3373,7 @@
3328
3373
  var isWeakset = {exports: {}};
3329
3374
 
3330
3375
  var GetIntrinsic$1 = getIntrinsic;
3331
- var callBound$3 = callBound$i;
3376
+ var callBound$3 = callBound$h;
3332
3377
 
3333
3378
  var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
3334
3379
 
@@ -3598,12 +3643,12 @@
3598
3643
  var forEach = forEach$1;
3599
3644
  var availableTypedArrays = availableTypedArrays$1;
3600
3645
  var callBind = callBindExports;
3601
- var callBound$2 = callBound$i;
3646
+ var callBound$2 = callBound$h;
3602
3647
  var gOPD = gopd$1;
3603
- var getProto = getProto$3;
3648
+ var getProto = requireGetProto();
3604
3649
 
3605
3650
  var $toString = callBound$2('Object.prototype.toString');
3606
- var hasToStringTag = shams();
3651
+ var hasToStringTag = requireShams()();
3607
3652
 
3608
3653
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
3609
3654
  var typedArrays = availableTypedArrays();
@@ -3711,7 +3756,7 @@
3711
3756
  return tryTypedArrays(value);
3712
3757
  };
3713
3758
 
3714
- var callBound$1 = callBound$i;
3759
+ var callBound$1 = callBound$h;
3715
3760
  var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
3716
3761
 
3717
3762
  var isArrayBuffer$1 = isArrayBuffer$2;
@@ -3725,7 +3770,7 @@
3725
3770
  }; // in node < 0.11, byteLength is an own nonconfigurable property
3726
3771
 
3727
3772
  var assign = object_assign;
3728
- var callBound = callBound$g;
3773
+ var callBound = callBound$f;
3729
3774
  var flags = regexp_prototype_flags;
3730
3775
  var GetIntrinsic = getIntrinsic;
3731
3776
  var getIterator = esGetIteratorExports;
@@ -5350,7 +5395,7 @@
5350
5395
  })(ChannelTypes || (ChannelTypes = {}));
5351
5396
  const defaultChannelsProps = ["id", "type", "broadcast", "addContextListener", "getCurrentContext"];
5352
5397
  const defaultContextProps = ["type"];
5353
- const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "appManager", "windows"];
5398
+ const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "windows"];
5354
5399
  const glueChannelNamePrefix = "___channel___";
5355
5400
  const fdc3NothingContextType = "fdc3.nothing";
5356
5401
  const RaiseTimeoutMs = 75 * 1000;
@@ -6267,22 +6312,50 @@
6267
6312
  if (missingApis.length) {
6268
6313
  return { isValid: false, error: { message: `Fdc3 cannot initialize correctly - Glue is missing the following ${missingApis.length > 1 ? "properties" : "property"}: ${missingApis.join(", ")}` } };
6269
6314
  }
6315
+ if (typeof glue.apps !== "object" && typeof glue.appManager !== "object") {
6316
+ return { isValid: false, error: { message: "Glue should be initialized with either 'apps' or 'appManager' API" } };
6317
+ }
6270
6318
  return { isValid: true };
6271
6319
  }
6272
6320
  interopInstance() {
6273
6321
  return this.glue.interop.instance;
6274
6322
  }
6275
- getApplication(name) {
6276
- return this.glue.appManager.application(name);
6323
+ async getApplication(name) {
6324
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6325
+ if (!isAppsAPIAvailable) {
6326
+ return this.glue.appManager.application(name);
6327
+ }
6328
+ const app = await this.glue.apps.registry.get({ name });
6329
+ return app ?? undefined;
6277
6330
  }
6278
- getAllAppManagerInstances() {
6279
- return this.glue.appManager.instances();
6331
+ async getApplicationInstances(appName) {
6332
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6333
+ if (!isAppsAPIAvailable) {
6334
+ return this.glue.appManager.instances().filter(inst => inst.application.name === appName);
6335
+ }
6336
+ const appInstances = await this.glue.apps.instances.getMany({ appNames: [appName] });
6337
+ return appInstances;
6280
6338
  }
6281
- getApplicationInstances(appName) {
6282
- return this.getAllAppManagerInstances().filter(inst => inst.application.name === appName);
6339
+ async getAppInstanceById(id) {
6340
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6341
+ if (!isAppsAPIAvailable) {
6342
+ return this.glue.appManager.instances().find(inst => inst.id === id);
6343
+ }
6344
+ const appInstance = await this.glue.apps.instances.get({ id });
6345
+ return appInstance ?? undefined;
6283
6346
  }
6284
- getAppInstanceById(id) {
6285
- return this.getAllAppManagerInstances().find(inst => inst.id === id);
6347
+ async startApplication({ app, context, waitForInstanceReady }) {
6348
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6349
+ if (!isAppsAPIAvailable) {
6350
+ const glueInst = await app.start(context, { waitForAGMReady: waitForInstanceReady });
6351
+ return glueInst;
6352
+ }
6353
+ const glueInstance = await this.glue.apps.instances.start({ name: app.name, context });
6354
+ if (!waitForInstanceReady) {
6355
+ return glueInstance;
6356
+ }
6357
+ await this.glue.apps?.instances.waitForReady({ id: glueInstance.id });
6358
+ return glueInstance;
6286
6359
  }
6287
6360
  async findIntents(intentFilter) {
6288
6361
  return this.glue.intents.find(intentFilter);
@@ -6406,8 +6479,15 @@
6406
6479
  getGlueVersion() {
6407
6480
  return this.glue?.version;
6408
6481
  }
6409
- registerOnInstanceStopped(cb) {
6410
- return this.glue.appManager.onInstanceStopped(cb);
6482
+ async registerOnInstanceStopped(callback) {
6483
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6484
+ if (!isAppsAPIAvailable) {
6485
+ return this.glue.appManager.onInstanceStopped((inst) => callback(inst.id));
6486
+ }
6487
+ const unsub = await this.glue.apps.instances.onStopped((event) => {
6488
+ callback(event.instance.id);
6489
+ });
6490
+ return unsub;
6411
6491
  }
6412
6492
  async unregisterMethod(methodName) {
6413
6493
  return this.glue.interop.unregister(methodName);
@@ -6569,6 +6649,9 @@
6569
6649
  async contextsSetPaths(name, paths) {
6570
6650
  await this.glue.contexts.setPaths(name, paths);
6571
6651
  }
6652
+ isAppsAPIAvailable() {
6653
+ return typeof this.glue.apps === "object";
6654
+ }
6572
6655
  }
6573
6656
 
6574
6657
  const GLUE42_EVENT_NAME = "Glue42";
@@ -8602,10 +8685,11 @@
8602
8685
  throw new Error(ResolveError.NoAppsFound);
8603
8686
  }
8604
8687
  this.logger?.info(`[${commandId}] - parsing glue intents to fdc3 intents and returning`);
8605
- return glueIntents.map((glueIntent) => {
8688
+ const appIntents = await Promise.all(glueIntents.map((glueIntent) => {
8606
8689
  const intentWithFilteredHandlers = this.getGlueIntentWithFilteredHandlers(glueIntent, { contextType: context.type, resultType });
8607
8690
  return this.convertGlue42IntentToFDC3Intent(intentWithFilteredHandlers);
8608
- });
8691
+ }));
8692
+ return appIntents;
8609
8693
  }
8610
8694
  async raiseIntent({ commandId, intent, context, target }) {
8611
8695
  await this.glueController.gluePromise;
@@ -8617,7 +8701,7 @@
8617
8701
  throw new Error(ResolveError.NoAppsFound);
8618
8702
  }
8619
8703
  if (!target) {
8620
- const filteredGlueIntent = this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
8704
+ const filteredGlueIntent = await this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
8621
8705
  this.logger?.info(`[${commandId}] - raising intent ${intent} with contextType ${context.type} and handlers ${filteredGlueIntent.handlers.map(h => h.applicationName && h.instanceId)}`);
8622
8706
  return this.invokeRaiseIntent(commandId, { intent, context: glueContext, handlers: filteredGlueIntent.handlers });
8623
8707
  }
@@ -8723,7 +8807,7 @@
8723
8807
  handler: rememberedHandlerWithFilter.handler
8724
8808
  };
8725
8809
  }
8726
- filterGlueIntentHandlers({ commandId, intent, context, target }) {
8810
+ async filterGlueIntentHandlers({ commandId, intent, context, target }) {
8727
8811
  let filteredGlueIntent;
8728
8812
  filteredGlueIntent = this.filterIntentHandlersByContext(intent, context);
8729
8813
  if (!target) {
@@ -8731,14 +8815,14 @@
8731
8815
  return filteredGlueIntent;
8732
8816
  }
8733
8817
  this.logger?.log(`[${commandId}] - filtering handlers by target (${JSON.stringify(target)}) for intent ${intent.name}`);
8734
- filteredGlueIntent = this.filterIntentHandlersByTarget({ intent, target, commandId });
8818
+ filteredGlueIntent = await this.filterIntentHandlersByTarget({ intent, target, commandId });
8735
8819
  return filteredGlueIntent;
8736
8820
  }
8737
- filterIntentHandlersByTarget({ intent, target, commandId }) {
8821
+ async filterIntentHandlersByTarget({ intent, target, commandId }) {
8738
8822
  const appName = typeof target === "string" ? target : target.appId;
8739
8823
  const instanceId = typeof target === "string" ? undefined : target.instanceId;
8740
8824
  this.logger?.info(`[${commandId}] - Checking if application with name ${appName} exists`);
8741
- const app = this.glueController.getApplication(appName);
8825
+ const app = await this.glueController.getApplication(appName);
8742
8826
  const serverInstances = this.serverInstanceAsIntentHandler(intent.name);
8743
8827
  if (!app && (typeof target === "string" || !target.instanceId || !serverInstances.length)) {
8744
8828
  throw new Error(ResolveError.TargetAppUnavailable);
@@ -8818,27 +8902,28 @@
8818
8902
  this.logger?.info(`[${commandId}] - returning private channel`);
8819
8903
  return channel.toApi();
8820
8904
  }
8821
- convertGlue42IntentToFDC3Intent(glueIntent) {
8905
+ async convertGlue42IntentToFDC3Intent(glueIntent) {
8822
8906
  const { name, handlers } = glueIntent;
8907
+ const apps = await Promise.all(handlers.map(async (handler) => {
8908
+ const appName = handler.applicationName;
8909
+ const app = await this.glueController.getApplication(appName);
8910
+ const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
8911
+ const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
8912
+ return {
8913
+ appId: appName,
8914
+ instanceId: handler.instanceId,
8915
+ name: appName,
8916
+ title: handler.applicationTitle || handler.instanceTitle || appName,
8917
+ tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
8918
+ description: handler.applicationDescription,
8919
+ icons,
8920
+ images,
8921
+ resultType: handler.resultType
8922
+ };
8923
+ }));
8823
8924
  const appIntent = {
8824
8925
  intent: { name, displayName: handlers[0].displayName || "" },
8825
- apps: handlers.map((handler) => {
8826
- const appName = handler.applicationName;
8827
- const app = this.glueController.getApplication(appName);
8828
- const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
8829
- const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
8830
- return {
8831
- appId: appName,
8832
- instanceId: handler.instanceId,
8833
- name: appName,
8834
- title: handler.applicationTitle || handler.instanceTitle || appName,
8835
- tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
8836
- description: handler.applicationDescription,
8837
- icons,
8838
- images,
8839
- resultType: handler.resultType
8840
- };
8841
- })
8926
+ apps
8842
8927
  };
8843
8928
  return appIntent;
8844
8929
  }
@@ -8951,7 +9036,7 @@
8951
9036
  await this.glueController.gluePromise;
8952
9037
  this.logger?.log(`[${commandId}] - open() invoked with target ${JSON.stringify(target)} ${context ? `and contextType ${context.type}` : ""}`);
8953
9038
  const name = typeof target === "object" ? target.appId : target;
8954
- const app = this.glueController.getApplication(name);
9039
+ const app = await this.glueController.getApplication(name);
8955
9040
  if (!app) {
8956
9041
  throw new Error(OpenError.AppNotFound);
8957
9042
  }
@@ -8962,8 +9047,7 @@
8962
9047
  }
8963
9048
  try {
8964
9049
  this.logger?.info(`[${commandId}] - opening app '${app.name}' without context`);
8965
- const inBrowser = this.glueController.isRunningInBrowser();
8966
- const glueInst = await app.start(undefined, { waitForAGMReady: !inBrowser });
9050
+ const glueInst = await this.glueController.startApplication({ app, waitForInstanceReady: !this.glueController.isRunningInBrowser() });
8967
9051
  this.logger?.info(`[${commandId}] - instance with id ${glueInst.id} started`);
8968
9052
  return this.parseGlueInstToAppIdentifier(glueInst);
8969
9053
  }
@@ -8975,11 +9059,11 @@
8975
9059
  await this.glueController.gluePromise;
8976
9060
  this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
8977
9061
  const { appId } = appIdentifier;
8978
- const app = this.glueController.getApplication(appId);
9062
+ const app = await this.glueController.getApplication(appId);
8979
9063
  if (!app) {
8980
9064
  throw new Error(ResolveError.NoAppsFound);
8981
9065
  }
8982
- const glueInstances = this.glueController.getApplicationInstances(appId);
9066
+ const glueInstances = await this.glueController.getApplicationInstances(appId);
8983
9067
  const fdc3Instances = glueInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
8984
9068
  this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${JSON.stringify(appIdentifier)}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
8985
9069
  return fdc3Instances;
@@ -8988,7 +9072,7 @@
8988
9072
  await this.glueController.gluePromise;
8989
9073
  this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
8990
9074
  const { appId, instanceId } = appIdentifier;
8991
- const app = this.glueController.getApplication(appId);
9075
+ const app = await this.glueController.getApplication(appId);
8992
9076
  if (!app) {
8993
9077
  throw new Error(OpenError.AppNotFound);
8994
9078
  }
@@ -8996,7 +9080,7 @@
8996
9080
  this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app.name}`);
8997
9081
  return this.parseGlueAppToAppMetadata(app);
8998
9082
  }
8999
- const instance = this.glueController.getAppInstanceById(instanceId);
9083
+ const instance = await this.glueController.getAppInstanceById(instanceId);
9000
9084
  const appMetadata = this.parseGlueAppToAppMetadata(app, instance);
9001
9085
  this.logger?.info(`[${commandId}] - found app metadata: ${appMetadata}`);
9002
9086
  return appMetadata;
@@ -9004,9 +9088,9 @@
9004
9088
  async getInfo({ commandId }) {
9005
9089
  await this.glueController.gluePromise;
9006
9090
  this.logger?.info(`${commandId} - getInfo() invoked`);
9007
- const appMetadata = this.getCurrentAppMetadata();
9091
+ const appMetadata = await this.getCurrentAppMetadata();
9008
9092
  const globalScope = typeof process !== "undefined" ? process : window;
9009
- const { provider, providerVersion, standardVersion } = globalScope.fdc3Info;
9093
+ const { provider, providerVersion, standardVersion } = globalScope.fdc3Info ?? {};
9010
9094
  return {
9011
9095
  provider,
9012
9096
  providerVersion,
@@ -9019,10 +9103,10 @@
9019
9103
  appMetadata
9020
9104
  };
9021
9105
  }
9022
- getCurrentAppMetadata() {
9106
+ async getCurrentAppMetadata() {
9023
9107
  const myInstance = this.glueController.interopInstance();
9024
9108
  const myInstanceApplicationName = myInstance.application ?? myInstance.applicationName;
9025
- const myApp = this.glueController.getApplication(myInstanceApplicationName);
9109
+ const myApp = await this.glueController.getApplication(myInstanceApplicationName);
9026
9110
  if (myApp) {
9027
9111
  return { appId: myApp.name, instanceId: myInstance.instance };
9028
9112
  }
@@ -9031,7 +9115,7 @@
9031
9115
  }
9032
9116
  parseGlueInstToAppIdentifier(glueInst) {
9033
9117
  return {
9034
- appId: glueInst.application.name,
9118
+ appId: this.isApplicationInstance(glueInst) ? glueInst.appName : glueInst.application.name,
9035
9119
  instanceId: glueInst.id
9036
9120
  };
9037
9121
  }
@@ -9050,6 +9134,10 @@
9050
9134
  const icon = inBrowserNamespace
9051
9135
  ? app.icon
9052
9136
  : (await app.getConfiguration()).icon;
9137
+ const desktopScreenshots = appConfiguration.customProperties?.screenshots ?? appConfiguration.userProperties?.screenshots;
9138
+ const screenshots = inBrowserNamespace
9139
+ ? appConfiguration.screenshots
9140
+ : desktopScreenshots;
9053
9141
  return {
9054
9142
  appId: app.name,
9055
9143
  name: app.name,
@@ -9058,22 +9146,30 @@
9058
9146
  title: app.title,
9059
9147
  icons: icon ? [{ src: icon }] : [],
9060
9148
  tooltip: appConfiguration.tooltip,
9061
- screenshots: inBrowserNamespace
9062
- ? appConfiguration.screenshots
9063
- : appConfiguration.customProperties.screenshots
9149
+ screenshots
9064
9150
  };
9065
9151
  }
9066
9152
  addInstanceMetadataToAppMetadata(appMetadata, instance) {
9067
- return { ...appMetadata, instanceId: instance.id, instanceMetadata: instance.agm };
9153
+ return {
9154
+ ...appMetadata,
9155
+ instanceId: instance.id,
9156
+ instanceMetadata: this.isApplicationInstance(instance) ? instance.interopInstance : instance.agm
9157
+ };
9158
+ }
9159
+ isApplicationInstance(instance) {
9160
+ return "appName" in instance;
9068
9161
  }
9069
9162
  async openAppWithContext(app, context) {
9070
9163
  const guid = nanoid();
9071
9164
  const startContext = this.buildStartContext(context, guid);
9072
9165
  const wrappedPromise = this.createContextListenerWrappedPromise(app);
9073
9166
  this.appsStateStore.addOpenAppPromise(guid, wrappedPromise);
9074
- const inBrowser = this.glueController.isRunningInBrowser();
9075
9167
  try {
9076
- const glueInst = await app.start(startContext, { waitForAGMReady: !inBrowser });
9168
+ const glueInst = await this.glueController.startApplication({
9169
+ app,
9170
+ context: startContext,
9171
+ waitForInstanceReady: !this.glueController.isRunningInBrowser()
9172
+ });
9077
9173
  await wrappedPromise.promise;
9078
9174
  this.appsStateStore.removeOpenAppPromise(guid);
9079
9175
  return this.parseGlueInstToAppIdentifier(glueInst);
@@ -9535,9 +9631,12 @@
9535
9631
  this.channelsController.removePrivateChannelFromStoreById(this.id);
9536
9632
  await this.sendCollaborateMessage({ action: "disconnectedFromPrivateChannel" });
9537
9633
  this.logger?.trace(`[${commandId}] - collaborator received action ${"disconnectedFromPrivateChannel"}`);
9538
- if (this.unsubFromInstanceStopped) {
9539
- this.unsubFromInstanceStopped();
9634
+ if (!this.unsubFromInstanceStopped) {
9635
+ return;
9540
9636
  }
9637
+ const unsub = this.unsubFromInstanceStopped instanceof Promise ? await this.unsubFromInstanceStopped : this.unsubFromInstanceStopped;
9638
+ unsub();
9639
+ this.unsubFromInstanceStopped = undefined;
9541
9640
  }
9542
9641
  ensureAlive(commandId) {
9543
9642
  if (!this.disconnected) {
@@ -9556,8 +9655,8 @@
9556
9655
  throw new Error(ChannelError.AccessDenied);
9557
9656
  }
9558
9657
  subscribeForCollaboratorInstanceStop(commandId) {
9559
- const handler = (instance) => {
9560
- if (instance.id !== this.collaborator?.instanceId) {
9658
+ const handler = (id) => {
9659
+ if (id !== this.collaborator?.instanceId) {
9561
9660
  return;
9562
9661
  }
9563
9662
  this.handleCollaboratorDisconnect();
@@ -10442,7 +10541,7 @@
10442
10541
  return ioc.fdc3;
10443
10542
  };
10444
10543
 
10445
- var version = "2.7.0";
10544
+ var version = "2.7.1";
10446
10545
 
10447
10546
  const globalScope = typeof process !== "undefined" ? process : window;
10448
10547
  globalScope.fdc3Info = {