@openfin/node-adapter 34.78.8 → 34.78.9

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.
@@ -2,17 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var require$$0 = require('events');
6
5
  var require$$3 = require('lodash');
7
- var require$$0$2 = require('fs');
6
+ var require$$0$1 = require('fs');
8
7
  var require$$1$1 = require('crypto');
9
8
  var require$$2$1 = require('ws');
10
9
  var require$$1 = require('net');
11
- var require$$0$3 = require('path');
12
- var require$$0$4 = require('os');
10
+ var require$$0$2 = require('path');
11
+ var require$$0$3 = require('os');
13
12
  var require$$4 = require('timers');
14
13
  var require$$2 = require('child_process');
15
- var require$$0$1 = require('node:url');
14
+ var require$$0 = require('node:url');
16
15
 
17
16
  function _mergeNamespaces(n, m) {
18
17
  m.forEach(function (e) {
@@ -31,17 +30,493 @@ function _mergeNamespaces(n, m) {
31
30
 
32
31
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
33
32
 
34
- function getDefaultExportFromCjs (x) {
35
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
36
- }
37
-
38
33
  var main$1 = {};
39
34
 
40
35
  var fin = {};
41
36
 
42
- var system$1 = {};
37
+ var eventsExports = {};
38
+ var events = {
39
+ get exports(){ return eventsExports; },
40
+ set exports(v){ eventsExports = v; },
41
+ };
42
+
43
+ var R = typeof Reflect === 'object' ? Reflect : null;
44
+ var ReflectApply = R && typeof R.apply === 'function'
45
+ ? R.apply
46
+ : function ReflectApply(target, receiver, args) {
47
+ return Function.prototype.apply.call(target, receiver, args);
48
+ };
49
+
50
+ var ReflectOwnKeys;
51
+ if (R && typeof R.ownKeys === 'function') {
52
+ ReflectOwnKeys = R.ownKeys;
53
+ } else if (Object.getOwnPropertySymbols) {
54
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
55
+ return Object.getOwnPropertyNames(target)
56
+ .concat(Object.getOwnPropertySymbols(target));
57
+ };
58
+ } else {
59
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
60
+ return Object.getOwnPropertyNames(target);
61
+ };
62
+ }
63
+
64
+ function ProcessEmitWarning(warning) {
65
+ if (console && console.warn) console.warn(warning);
66
+ }
67
+
68
+ var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
69
+ return value !== value;
70
+ };
71
+
72
+ function EventEmitter() {
73
+ EventEmitter.init.call(this);
74
+ }
75
+ events.exports = EventEmitter;
76
+ eventsExports.once = once;
77
+
78
+ // Backwards-compat with node 0.10.x
79
+ EventEmitter.EventEmitter = EventEmitter;
80
+
81
+ EventEmitter.prototype._events = undefined;
82
+ EventEmitter.prototype._eventsCount = 0;
83
+ EventEmitter.prototype._maxListeners = undefined;
84
+
85
+ // By default EventEmitters will print a warning if more than 10 listeners are
86
+ // added to it. This is a useful default which helps finding memory leaks.
87
+ var defaultMaxListeners = 10;
88
+
89
+ function checkListener(listener) {
90
+ if (typeof listener !== 'function') {
91
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
92
+ }
93
+ }
94
+
95
+ Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
96
+ enumerable: true,
97
+ get: function() {
98
+ return defaultMaxListeners;
99
+ },
100
+ set: function(arg) {
101
+ if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
102
+ throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
103
+ }
104
+ defaultMaxListeners = arg;
105
+ }
106
+ });
107
+
108
+ EventEmitter.init = function() {
109
+
110
+ if (this._events === undefined ||
111
+ this._events === Object.getPrototypeOf(this)._events) {
112
+ this._events = Object.create(null);
113
+ this._eventsCount = 0;
114
+ }
115
+
116
+ this._maxListeners = this._maxListeners || undefined;
117
+ };
118
+
119
+ // Obviously not all Emitters should be limited to 10. This function allows
120
+ // that to be increased. Set to zero for unlimited.
121
+ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
122
+ if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
123
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
124
+ }
125
+ this._maxListeners = n;
126
+ return this;
127
+ };
128
+
129
+ function _getMaxListeners(that) {
130
+ if (that._maxListeners === undefined)
131
+ return EventEmitter.defaultMaxListeners;
132
+ return that._maxListeners;
133
+ }
134
+
135
+ EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
136
+ return _getMaxListeners(this);
137
+ };
43
138
 
44
- var base$1 = {};
139
+ EventEmitter.prototype.emit = function emit(type) {
140
+ var args = [];
141
+ for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
142
+ var doError = (type === 'error');
143
+
144
+ var events = this._events;
145
+ if (events !== undefined)
146
+ doError = (doError && events.error === undefined);
147
+ else if (!doError)
148
+ return false;
149
+
150
+ // If there is no 'error' event listener then throw.
151
+ if (doError) {
152
+ var er;
153
+ if (args.length > 0)
154
+ er = args[0];
155
+ if (er instanceof Error) {
156
+ // Note: The comments on the `throw` lines are intentional, they show
157
+ // up in Node's output if this results in an unhandled exception.
158
+ throw er; // Unhandled 'error' event
159
+ }
160
+ // At least give some kind of context to the user
161
+ var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
162
+ err.context = er;
163
+ throw err; // Unhandled 'error' event
164
+ }
165
+
166
+ var handler = events[type];
167
+
168
+ if (handler === undefined)
169
+ return false;
170
+
171
+ if (typeof handler === 'function') {
172
+ ReflectApply(handler, this, args);
173
+ } else {
174
+ var len = handler.length;
175
+ var listeners = arrayClone(handler, len);
176
+ for (var i = 0; i < len; ++i)
177
+ ReflectApply(listeners[i], this, args);
178
+ }
179
+
180
+ return true;
181
+ };
182
+
183
+ function _addListener(target, type, listener, prepend) {
184
+ var m;
185
+ var events;
186
+ var existing;
187
+
188
+ checkListener(listener);
189
+
190
+ events = target._events;
191
+ if (events === undefined) {
192
+ events = target._events = Object.create(null);
193
+ target._eventsCount = 0;
194
+ } else {
195
+ // To avoid recursion in the case that type === "newListener"! Before
196
+ // adding it to the listeners, first emit "newListener".
197
+ if (events.newListener !== undefined) {
198
+ target.emit('newListener', type,
199
+ listener.listener ? listener.listener : listener);
200
+
201
+ // Re-assign `events` because a newListener handler could have caused the
202
+ // this._events to be assigned to a new object
203
+ events = target._events;
204
+ }
205
+ existing = events[type];
206
+ }
207
+
208
+ if (existing === undefined) {
209
+ // Optimize the case of one listener. Don't need the extra array object.
210
+ existing = events[type] = listener;
211
+ ++target._eventsCount;
212
+ } else {
213
+ if (typeof existing === 'function') {
214
+ // Adding the second element, need to change to array.
215
+ existing = events[type] =
216
+ prepend ? [listener, existing] : [existing, listener];
217
+ // If we've already got an array, just append.
218
+ } else if (prepend) {
219
+ existing.unshift(listener);
220
+ } else {
221
+ existing.push(listener);
222
+ }
223
+
224
+ // Check for listener leak
225
+ m = _getMaxListeners(target);
226
+ if (m > 0 && existing.length > m && !existing.warned) {
227
+ existing.warned = true;
228
+ // No error code for this since it is a Warning
229
+ // eslint-disable-next-line no-restricted-syntax
230
+ var w = new Error('Possible EventEmitter memory leak detected. ' +
231
+ existing.length + ' ' + String(type) + ' listeners ' +
232
+ 'added. Use emitter.setMaxListeners() to ' +
233
+ 'increase limit');
234
+ w.name = 'MaxListenersExceededWarning';
235
+ w.emitter = target;
236
+ w.type = type;
237
+ w.count = existing.length;
238
+ ProcessEmitWarning(w);
239
+ }
240
+ }
241
+
242
+ return target;
243
+ }
244
+
245
+ EventEmitter.prototype.addListener = function addListener(type, listener) {
246
+ return _addListener(this, type, listener, false);
247
+ };
248
+
249
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
250
+
251
+ EventEmitter.prototype.prependListener =
252
+ function prependListener(type, listener) {
253
+ return _addListener(this, type, listener, true);
254
+ };
255
+
256
+ function onceWrapper() {
257
+ if (!this.fired) {
258
+ this.target.removeListener(this.type, this.wrapFn);
259
+ this.fired = true;
260
+ if (arguments.length === 0)
261
+ return this.listener.call(this.target);
262
+ return this.listener.apply(this.target, arguments);
263
+ }
264
+ }
265
+
266
+ function _onceWrap(target, type, listener) {
267
+ var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
268
+ var wrapped = onceWrapper.bind(state);
269
+ wrapped.listener = listener;
270
+ state.wrapFn = wrapped;
271
+ return wrapped;
272
+ }
273
+
274
+ EventEmitter.prototype.once = function once(type, listener) {
275
+ checkListener(listener);
276
+ this.on(type, _onceWrap(this, type, listener));
277
+ return this;
278
+ };
279
+
280
+ EventEmitter.prototype.prependOnceListener =
281
+ function prependOnceListener(type, listener) {
282
+ checkListener(listener);
283
+ this.prependListener(type, _onceWrap(this, type, listener));
284
+ return this;
285
+ };
286
+
287
+ // Emits a 'removeListener' event if and only if the listener was removed.
288
+ EventEmitter.prototype.removeListener =
289
+ function removeListener(type, listener) {
290
+ var list, events, position, i, originalListener;
291
+
292
+ checkListener(listener);
293
+
294
+ events = this._events;
295
+ if (events === undefined)
296
+ return this;
297
+
298
+ list = events[type];
299
+ if (list === undefined)
300
+ return this;
301
+
302
+ if (list === listener || list.listener === listener) {
303
+ if (--this._eventsCount === 0)
304
+ this._events = Object.create(null);
305
+ else {
306
+ delete events[type];
307
+ if (events.removeListener)
308
+ this.emit('removeListener', type, list.listener || listener);
309
+ }
310
+ } else if (typeof list !== 'function') {
311
+ position = -1;
312
+
313
+ for (i = list.length - 1; i >= 0; i--) {
314
+ if (list[i] === listener || list[i].listener === listener) {
315
+ originalListener = list[i].listener;
316
+ position = i;
317
+ break;
318
+ }
319
+ }
320
+
321
+ if (position < 0)
322
+ return this;
323
+
324
+ if (position === 0)
325
+ list.shift();
326
+ else {
327
+ spliceOne(list, position);
328
+ }
329
+
330
+ if (list.length === 1)
331
+ events[type] = list[0];
332
+
333
+ if (events.removeListener !== undefined)
334
+ this.emit('removeListener', type, originalListener || listener);
335
+ }
336
+
337
+ return this;
338
+ };
339
+
340
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
341
+
342
+ EventEmitter.prototype.removeAllListeners =
343
+ function removeAllListeners(type) {
344
+ var listeners, events, i;
345
+
346
+ events = this._events;
347
+ if (events === undefined)
348
+ return this;
349
+
350
+ // not listening for removeListener, no need to emit
351
+ if (events.removeListener === undefined) {
352
+ if (arguments.length === 0) {
353
+ this._events = Object.create(null);
354
+ this._eventsCount = 0;
355
+ } else if (events[type] !== undefined) {
356
+ if (--this._eventsCount === 0)
357
+ this._events = Object.create(null);
358
+ else
359
+ delete events[type];
360
+ }
361
+ return this;
362
+ }
363
+
364
+ // emit removeListener for all listeners on all events
365
+ if (arguments.length === 0) {
366
+ var keys = Object.keys(events);
367
+ var key;
368
+ for (i = 0; i < keys.length; ++i) {
369
+ key = keys[i];
370
+ if (key === 'removeListener') continue;
371
+ this.removeAllListeners(key);
372
+ }
373
+ this.removeAllListeners('removeListener');
374
+ this._events = Object.create(null);
375
+ this._eventsCount = 0;
376
+ return this;
377
+ }
378
+
379
+ listeners = events[type];
380
+
381
+ if (typeof listeners === 'function') {
382
+ this.removeListener(type, listeners);
383
+ } else if (listeners !== undefined) {
384
+ // LIFO order
385
+ for (i = listeners.length - 1; i >= 0; i--) {
386
+ this.removeListener(type, listeners[i]);
387
+ }
388
+ }
389
+
390
+ return this;
391
+ };
392
+
393
+ function _listeners(target, type, unwrap) {
394
+ var events = target._events;
395
+
396
+ if (events === undefined)
397
+ return [];
398
+
399
+ var evlistener = events[type];
400
+ if (evlistener === undefined)
401
+ return [];
402
+
403
+ if (typeof evlistener === 'function')
404
+ return unwrap ? [evlistener.listener || evlistener] : [evlistener];
405
+
406
+ return unwrap ?
407
+ unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
408
+ }
409
+
410
+ EventEmitter.prototype.listeners = function listeners(type) {
411
+ return _listeners(this, type, true);
412
+ };
413
+
414
+ EventEmitter.prototype.rawListeners = function rawListeners(type) {
415
+ return _listeners(this, type, false);
416
+ };
417
+
418
+ EventEmitter.listenerCount = function(emitter, type) {
419
+ if (typeof emitter.listenerCount === 'function') {
420
+ return emitter.listenerCount(type);
421
+ } else {
422
+ return listenerCount.call(emitter, type);
423
+ }
424
+ };
425
+
426
+ EventEmitter.prototype.listenerCount = listenerCount;
427
+ function listenerCount(type) {
428
+ var events = this._events;
429
+
430
+ if (events !== undefined) {
431
+ var evlistener = events[type];
432
+
433
+ if (typeof evlistener === 'function') {
434
+ return 1;
435
+ } else if (evlistener !== undefined) {
436
+ return evlistener.length;
437
+ }
438
+ }
439
+
440
+ return 0;
441
+ }
442
+
443
+ EventEmitter.prototype.eventNames = function eventNames() {
444
+ return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
445
+ };
446
+
447
+ function arrayClone(arr, n) {
448
+ var copy = new Array(n);
449
+ for (var i = 0; i < n; ++i)
450
+ copy[i] = arr[i];
451
+ return copy;
452
+ }
453
+
454
+ function spliceOne(list, index) {
455
+ for (; index + 1 < list.length; index++)
456
+ list[index] = list[index + 1];
457
+ list.pop();
458
+ }
459
+
460
+ function unwrapListeners(arr) {
461
+ var ret = new Array(arr.length);
462
+ for (var i = 0; i < ret.length; ++i) {
463
+ ret[i] = arr[i].listener || arr[i];
464
+ }
465
+ return ret;
466
+ }
467
+
468
+ function once(emitter, name) {
469
+ return new Promise(function (resolve, reject) {
470
+ function errorListener(err) {
471
+ emitter.removeListener(name, resolver);
472
+ reject(err);
473
+ }
474
+
475
+ function resolver() {
476
+ if (typeof emitter.removeListener === 'function') {
477
+ emitter.removeListener('error', errorListener);
478
+ }
479
+ resolve([].slice.call(arguments));
480
+ }
481
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
482
+ if (name !== 'error') {
483
+ addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
484
+ }
485
+ });
486
+ }
487
+
488
+ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
489
+ if (typeof emitter.on === 'function') {
490
+ eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
491
+ }
492
+ }
493
+
494
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
495
+ if (typeof emitter.on === 'function') {
496
+ if (flags.once) {
497
+ emitter.once(name, listener);
498
+ } else {
499
+ emitter.on(name, listener);
500
+ }
501
+ } else if (typeof emitter.addEventListener === 'function') {
502
+ // EventTarget does not have `error` event semantics like Node
503
+ // EventEmitters, we do not listen for `error` events here.
504
+ emitter.addEventListener(name, function wrapListener(arg) {
505
+ // IE does not have builtin `{ once: true }` support so we
506
+ // have to do it manually.
507
+ if (flags.once) {
508
+ emitter.removeEventListener(name, wrapListener);
509
+ }
510
+ listener(arg);
511
+ });
512
+ } else {
513
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
514
+ }
515
+ }
516
+
517
+ var system = {};
518
+
519
+ var base = {};
45
520
 
46
521
  var promises = {};
47
522
 
@@ -84,8 +559,8 @@ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateF
84
559
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
85
560
  };
86
561
  var _EmitterBase_emitterAccessor;
87
- Object.defineProperty(base$1, "__esModule", { value: true });
88
- base$1.Reply = base$1.EmitterBase = base$1.Base = void 0;
562
+ Object.defineProperty(base, "__esModule", { value: true });
563
+ base.Reply = base.EmitterBase = base.Base = void 0;
89
564
  const promises_1$2 = promises;
90
565
  class Base {
91
566
  /**
@@ -106,18 +581,11 @@ class Base {
106
581
  get fin() {
107
582
  return this.wire.getFin();
108
583
  }
109
- /**
110
- * Provides access to the OpenFin representation of the current code context (usually a document
111
- * such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
112
- *
113
- * Useful for debugging in the devtools console, where this will intelligently type itself based
114
- * on the context in which the devtools panel was opened.
115
- */
116
584
  get me() {
117
585
  return this.wire.me;
118
586
  }
119
587
  }
120
- base$1.Base = Base;
588
+ base.Base = Base;
121
589
  /**
122
590
  * An entity that emits OpenFin events.
123
591
  *
@@ -147,9 +615,6 @@ class EmitterBase extends Base {
147
615
  this.topic = topic;
148
616
  _EmitterBase_emitterAccessor.set(this, void 0);
149
617
  this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
150
- /**
151
- * @internal
152
- */
153
618
  this.emit = (eventType, payload, ...args) => {
154
619
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
155
620
  };
@@ -192,13 +657,16 @@ class EmitterBase extends Base {
192
657
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
193
658
  return Promise.resolve();
194
659
  };
660
+ this.addListener = this.on;
195
661
  __classPrivateFieldSet$d(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
196
662
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
197
663
  }
198
664
  /**
199
665
  * Adds a listener to the end of the listeners array for the specified event.
200
666
  *
201
- * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
667
+ * @param eventType
668
+ * @param listener
669
+ * @param options
202
670
  */
203
671
  async on(eventType, listener, options) {
204
672
  await this.registerEventListener(eventType, options, (emitter) => {
@@ -208,16 +676,12 @@ class EmitterBase extends Base {
208
676
  });
209
677
  return this;
210
678
  }
211
- /**
212
- * Adds a listener to the end of the listeners array for the specified event.
213
- */
214
- async addListener(eventType, listener, options) {
215
- return this.on(eventType, listener, options);
216
- }
217
679
  /**
218
680
  * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
219
681
  *
220
- * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
682
+ * @param eventType
683
+ * @param listener
684
+ * @param options
221
685
  */
222
686
  async once(eventType, listener, options) {
223
687
  const deregister = () => this.deregisterEventListener(eventType);
@@ -233,7 +697,9 @@ class EmitterBase extends Base {
233
697
  /**
234
698
  * Adds a listener to the beginning of the listeners array for the specified event.
235
699
  *
236
- * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
700
+ * @param eventType
701
+ * @param listener
702
+ * @param options
237
703
  */
238
704
  async prependListener(eventType, listener, options) {
239
705
  await this.registerEventListener(eventType, options, (emitter) => {
@@ -247,7 +713,9 @@ class EmitterBase extends Base {
247
713
  * Adds a one time listener for the event. The listener is invoked only the first time the event is fired,
248
714
  * after which it is removed. The listener is added to the beginning of the listeners array.
249
715
  *
250
- * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
716
+ * @param eventType
717
+ * @param listener
718
+ * @param options
251
719
  */
252
720
  async prependOnceListener(eventType, listener, options) {
253
721
  const deregister = () => this.deregisterEventListener(eventType);
@@ -264,6 +732,10 @@ class EmitterBase extends Base {
264
732
  * Remove a listener from the listener array for the specified event.
265
733
  *
266
734
  * @remarks Caution: Calling this method changes the array indices in the listener array behind the listener.
735
+ *
736
+ * @param eventType
737
+ * @param listener
738
+ * @param options
267
739
  */
268
740
  async removeListener(eventType, listener, options) {
269
741
  const emitter = await this.deregisterEventListener(eventType, options);
@@ -290,6 +762,7 @@ class EmitterBase extends Base {
290
762
  /**
291
763
  * Removes all listeners, or those of the specified event.
292
764
  *
765
+ * @param eventType
293
766
  */
294
767
  async removeAllListeners(eventType) {
295
768
  const removeByEvent = async (event) => {
@@ -314,11 +787,11 @@ class EmitterBase extends Base {
314
787
  }
315
788
  }
316
789
  }
317
- base$1.EmitterBase = EmitterBase;
790
+ base.EmitterBase = EmitterBase;
318
791
  _EmitterBase_emitterAccessor = new WeakMap();
319
792
  class Reply {
320
793
  }
321
- base$1.Reply = Reply;
794
+ base.Reply = Reply;
322
795
 
323
796
  var transportErrors = {};
324
797
 
@@ -351,7 +824,7 @@ class InternalError extends Error {
351
824
  const { message, name, stack, ...rest } = err;
352
825
  super(message);
353
826
  this.name = name || 'Error';
354
- this.stack = stack ?? this.toString();
827
+ this.stack = stack !== null && stack !== void 0 ? stack : this.toString();
355
828
  Object.keys(rest).forEach(key => {
356
829
  this[key] = rest[key];
357
830
  });
@@ -360,6 +833,7 @@ class InternalError extends Error {
360
833
  // For documentation of the error methods being used see here: https://v8.dev/docs/stack-trace-api
361
834
  class RuntimeError extends Error {
362
835
  static getCallSite(callsToRemove = 0) {
836
+ var _a, _b;
363
837
  const length = Error.stackTraceLimit;
364
838
  const realCallsToRemove = callsToRemove + 1; // remove this call;
365
839
  Error.stackTraceLimit = length + realCallsToRemove;
@@ -368,7 +842,7 @@ class RuntimeError extends Error {
368
842
  // This will be called when we access the `stack` property
369
843
  Error.prepareStackTrace = (_, stack) => stack;
370
844
  // stack is optional in non chromium contexts
371
- const stack = new Error().stack?.slice(realCallsToRemove) ?? [];
845
+ const stack = (_b = (_a = new Error().stack) === null || _a === void 0 ? void 0 : _a.slice(realCallsToRemove)) !== null && _b !== void 0 ? _b : [];
372
846
  Error.prepareStackTrace = _prepareStackTrace;
373
847
  Error.stackTraceLimit = length;
374
848
  return stack;
@@ -390,7 +864,7 @@ class RuntimeError extends Error {
390
864
  const { reason, error } = payload;
391
865
  super(reason);
392
866
  this.name = 'RuntimeError';
393
- if (error?.stack) {
867
+ if (error === null || error === void 0 ? void 0 : error.stack) {
394
868
  this.cause = new InternalError(error);
395
869
  }
396
870
  if (callSites) {
@@ -400,7 +874,7 @@ class RuntimeError extends Error {
400
874
  }
401
875
  transportErrors.RuntimeError = RuntimeError;
402
876
 
403
- var window$2 = {};
877
+ var window$1 = {};
404
878
 
405
879
  var Factory$8 = {};
406
880
 
@@ -419,30 +893,16 @@ validate.validateIdentity = validateIdentity;
419
893
 
420
894
  var Instance$7 = {};
421
895
 
422
- var application$1 = {};
896
+ var application = {};
423
897
 
424
898
  var Factory$7 = {};
425
899
 
426
900
  var Instance$6 = {};
427
901
 
428
- var view$1 = {};
902
+ var view = {};
429
903
 
430
904
  var Factory$6 = {};
431
905
 
432
- var warnings = {};
433
-
434
- Object.defineProperty(warnings, "__esModule", { value: true });
435
- warnings.handleDeprecatedWarnings = void 0;
436
- const handleDeprecatedWarnings = (options) => {
437
- if (options.contentNavigation?.whitelist ||
438
- options.contentNavigation?.blacklist ||
439
- options.contentRedirect?.whitelist ||
440
- options.contentRedirect?.blacklist) {
441
- console.warn(`The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.`);
442
- }
443
- };
444
- warnings.handleDeprecatedWarnings = handleDeprecatedWarnings;
445
-
446
906
  var hasRequiredFactory$3;
447
907
 
448
908
  function requireFactory$3 () {
@@ -450,10 +910,9 @@ function requireFactory$3 () {
450
910
  hasRequiredFactory$3 = 1;
451
911
  Object.defineProperty(Factory$6, "__esModule", { value: true });
452
912
  Factory$6.ViewModule = void 0;
453
- const base_1 = base$1;
913
+ const base_1 = base;
454
914
  const validate_1 = validate;
455
915
  const index_1 = requireView();
456
- const warnings_1 = warnings;
457
916
  /**
458
917
  * Static namespace for OpenFin API methods that interact with the {@link View} class, available under `fin.View`.
459
918
  */
@@ -491,7 +950,6 @@ function requireFactory$3 () {
491
950
  if (!options.name || typeof options.name !== 'string') {
492
951
  throw new Error('Please provide a name property as a string in order to create a View.');
493
952
  }
494
- (0, warnings_1.handleDeprecatedWarnings)(options);
495
953
  if (this.wire.environment.childViews) {
496
954
  await this.wire.environment.createChildContent({
497
955
  entityType: 'view',
@@ -779,7 +1237,7 @@ class ChannelsExposer {
779
1237
  this.exposeFunction = async (target, config) => {
780
1238
  const { key, options, meta } = config;
781
1239
  const { id } = meta;
782
- const action = `${id}.${options?.action || key}`;
1240
+ const action = `${id}.${(options === null || options === void 0 ? void 0 : options.action) || key}`;
783
1241
  await this.channelProviderOrClient.register(action, async ({ args }) => {
784
1242
  return target(...args);
785
1243
  });
@@ -810,7 +1268,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
810
1268
  };
811
1269
  Object.defineProperty(exports, "__esModule", { value: true });
812
1270
  __exportStar(channelsConsumer, exports);
813
- __exportStar(channelsExposer, exports);
1271
+ __exportStar(channelsExposer, exports);
814
1272
  } (openfinChannels));
815
1273
 
816
1274
  (function (exports) {
@@ -829,7 +1287,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
829
1287
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
830
1288
  };
831
1289
  Object.defineProperty(exports, "__esModule", { value: true });
832
- __exportStar(openfinChannels, exports);
1290
+ __exportStar(openfinChannels, exports);
833
1291
  } (strategies));
834
1292
 
835
1293
  (function (exports) {
@@ -851,7 +1309,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
851
1309
  __exportStar(apiConsumer, exports);
852
1310
  __exportStar(apiExposer, exports);
853
1311
  __exportStar(strategies, exports);
854
- __exportStar(decorators, exports);
1312
+ __exportStar(decorators, exports);
855
1313
  } (apiExposer$1));
856
1314
 
857
1315
  var channelApiRelay = {};
@@ -1092,14 +1550,14 @@ _LayoutNode_client = new WeakMap();
1092
1550
  /**
1093
1551
  * @ignore
1094
1552
  * @internal
1095
- * Encapsulates Api consumption of {@link LayoutEntitiesClient} with a relayed dispatch
1553
+ * Encapsulates Api consumption of {@link LayoutEntitiesController} with a relayed dispatch
1096
1554
  * @param client
1097
1555
  * @param controllerId
1098
1556
  * @param identity
1099
1557
  * @returns a new instance of {@link LayoutEntitiesClient} with bound to the controllerId
1100
1558
  */
1101
1559
  LayoutNode.newLayoutEntitiesClient = async (client, controllerId, identity) => {
1102
- const dispatch = (0, channel_api_relay_1.createRelayedDispatch)(client, identity, 'layout-relay', 'You are trying to interact with a layout component on a window that does not exist or has been destroyed.');
1560
+ const dispatch = (0, channel_api_relay_1.createRelayedDispatch)(client, identity, 'layout-relay', 'You are trying to interact with a layout component on a window that has been destroyed.');
1103
1561
  const consumer = new api_exposer_1.ApiConsumer(new api_exposer_1.ChannelsConsumer({ dispatch }));
1104
1562
  return consumer.consume({ id: controllerId });
1105
1563
  };
@@ -1409,20 +1867,15 @@ _ColumnOrRow_client = new WeakMap();
1409
1867
  var layout_constants = {};
1410
1868
 
1411
1869
  Object.defineProperty(layout_constants, "__esModule", { value: true });
1412
- layout_constants.DEFAULT_LAYOUT_KEY = layout_constants.LAYOUT_CONTROLLER_ID = void 0;
1870
+ layout_constants.LAYOUT_CONTROLLER_ID = void 0;
1413
1871
  layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
1414
- layout_constants.DEFAULT_LAYOUT_KEY = 'default';
1415
1872
 
1416
1873
  var main = {};
1417
1874
 
1418
1875
  Object.defineProperty(main, "__esModule", { value: true });
1419
1876
  main.WebContents = void 0;
1420
- const base_1$k = base$1;
1877
+ const base_1$k = base;
1421
1878
  class WebContents extends base_1$k.EmitterBase {
1422
- /**
1423
- * @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
1424
- * @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
1425
- */
1426
1879
  constructor(wire, identity, entityType) {
1427
1880
  super(wire, entityType, identity.uuid, identity.name);
1428
1881
  this.identity = identity;
@@ -1475,11 +1928,6 @@ class WebContents extends base_1$k.EmitterBase {
1475
1928
  * }
1476
1929
  * console.log(await wnd.capturePage(options));
1477
1930
  * ```
1478
- *
1479
- * @remarks
1480
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1481
- * We do not expose an explicit superclass for this functionality, but it does have its own
1482
- * {@link OpenFin.WebContentsEvents event namespace}.
1483
1931
  */
1484
1932
  capturePage(options) {
1485
1933
  return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
@@ -1515,10 +1963,6 @@ class WebContents extends base_1$k.EmitterBase {
1515
1963
  *
1516
1964
  * executeJavaScript(`console.log('Hello, Openfin')`).then(() => console.log('Javascript excuted')).catch(err => console.log(err));
1517
1965
  * ```
1518
- * @remarks
1519
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1520
- * We do not expose an explicit superclass for this functionality, but it does have its own
1521
- * {@link OpenFin.WebContentsEvents event namespace}.
1522
1966
  */
1523
1967
  executeJavaScript(code) {
1524
1968
  return this.wire
@@ -1558,10 +2002,6 @@ class WebContents extends base_1$k.EmitterBase {
1558
2002
  *
1559
2003
  * getZoomLevel().then(zoomLevel => console.log(zoomLevel)).catch(err => console.log(err));
1560
2004
  * ```
1561
- * @remarks
1562
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1563
- * We do not expose an explicit superclass for this functionality, but it does have its own
1564
- * {@link OpenFin.WebContentsEvents event namespace}.
1565
2005
  */
1566
2006
  getZoomLevel() {
1567
2007
  return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
@@ -1600,10 +2040,6 @@ class WebContents extends base_1$k.EmitterBase {
1600
2040
  *
1601
2041
  * setZoomLevel(4).then(() => console.log('Setting a zoom level')).catch(err => console.log(err));
1602
2042
  * ```
1603
- * @remarks
1604
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1605
- * We do not expose an explicit superclass for this functionality, but it does have its own
1606
- * {@link OpenFin.WebContentsEvents event namespace}.
1607
2043
  */
1608
2044
  setZoomLevel(level) {
1609
2045
  return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
@@ -1611,7 +2047,7 @@ class WebContents extends base_1$k.EmitterBase {
1611
2047
  /**
1612
2048
  * Navigates the WebContents to a specified URL.
1613
2049
  *
1614
- * Note: The url must contain the protocol prefix such as http:// or https://.
2050
+ * @remarks The url must contain the protocol prefix such as http:// or https://.
1615
2051
  * @param url - The URL to navigate the WebContents to.
1616
2052
  *
1617
2053
  * @example
@@ -1641,10 +2077,6 @@ class WebContents extends base_1$k.EmitterBase {
1641
2077
  * navigate().then(() => console.log('Navigate to tutorial')).catch(err => console.log(err));
1642
2078
  * ```
1643
2079
  * @experimental
1644
- * @remarks
1645
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1646
- * We do not expose an explicit superclass for this functionality, but it does have its own
1647
- * {@link OpenFin.WebContentsEvents event namespace}.
1648
2080
  */
1649
2081
  navigate(url) {
1650
2082
  return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
@@ -1672,10 +2104,6 @@ class WebContents extends base_1$k.EmitterBase {
1672
2104
  * }
1673
2105
  * navigateBack().then(() => console.log('Navigated back')).catch(err => console.log(err));
1674
2106
  * ```
1675
- * @remarks
1676
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1677
- * We do not expose an explicit superclass for this functionality, but it does have its own
1678
- * {@link OpenFin.WebContentsEvents event namespace}.
1679
2107
  */
1680
2108
  navigateBack() {
1681
2109
  return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
@@ -1705,10 +2133,6 @@ class WebContents extends base_1$k.EmitterBase {
1705
2133
  * }
1706
2134
  * navigateForward().then(() => console.log('Navigated forward')).catch(err => console.log(err));
1707
2135
  * ```
1708
- * @remarks
1709
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1710
- * We do not expose an explicit superclass for this functionality, but it does have its own
1711
- * {@link OpenFin.WebContentsEvents event namespace}.
1712
2136
  */
1713
2137
  async navigateForward() {
1714
2138
  await this.wire.sendAction('navigate-window-forward', { ...this.identity });
@@ -1736,10 +2160,6 @@ class WebContents extends base_1$k.EmitterBase {
1736
2160
  * }
1737
2161
  * stopNavigation().then(() => console.log('you shall not navigate')).catch(err => console.log(err));
1738
2162
  * ```
1739
- * @remarks
1740
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1741
- * We do not expose an explicit superclass for this functionality, but it does have its own
1742
- * {@link OpenFin.WebContentsEvents event namespace}.
1743
2163
  */
1744
2164
  stopNavigation() {
1745
2165
  return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
@@ -1777,10 +2197,6 @@ class WebContents extends base_1$k.EmitterBase {
1777
2197
  * console.log('Reloaded window')
1778
2198
  * }).catch(err => console.log(err));
1779
2199
  * ```
1780
- * @remarks
1781
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1782
- * We do not expose an explicit superclass for this functionality, but it does have its own
1783
- * {@link OpenFin.WebContentsEvents event namespace}.
1784
2200
  */
1785
2201
  reload(ignoreCache = false) {
1786
2202
  return this.wire
@@ -1794,7 +2210,7 @@ class WebContents extends base_1$k.EmitterBase {
1794
2210
  * Prints the WebContents.
1795
2211
  * @param options Printer Options
1796
2212
  *
1797
- * Note: When `silent` is set to `true`, the API will pick the system's default printer if deviceName
2213
+ * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName
1798
2214
  * is empty and the default settings for printing.
1799
2215
  *
1800
2216
  * Use the CSS style `page-break-before: always;` to force print to a new page.
@@ -1807,10 +2223,6 @@ class WebContents extends base_1$k.EmitterBase {
1807
2223
  * console.log('print call has been sent to the system');
1808
2224
  * });
1809
2225
  * ```
1810
- * @remarks
1811
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1812
- * We do not expose an explicit superclass for this functionality, but it does have its own
1813
- * {@link OpenFin.WebContentsEvents event namespace}.
1814
2226
  */
1815
2227
  print(options = {}) {
1816
2228
  return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
@@ -1820,7 +2232,7 @@ class WebContents extends base_1$k.EmitterBase {
1820
2232
  * @param searchTerm Term to find in page
1821
2233
  * @param options Search options
1822
2234
  *
1823
- * Note: By default, each subsequent call will highlight the next text that matches the search term.
2235
+ * @remarks By default, each subsequent call will highlight the next text that matches the search term.
1824
2236
  *
1825
2237
  * Returns a promise with the results for the request. By subscribing to the
1826
2238
  * found-in-page event, you can get the results of this call as well.
@@ -1855,10 +2267,6 @@ class WebContents extends base_1$k.EmitterBase {
1855
2267
  * console.log(result)
1856
2268
  * });
1857
2269
  * ```
1858
- * @remarks
1859
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1860
- * We do not expose an explicit superclass for this functionality, but it does have its own
1861
- * {@link OpenFin.WebContentsEvents event namespace}.
1862
2270
  */
1863
2271
  findInPage(searchTerm, options) {
1864
2272
  return this.wire
@@ -1902,10 +2310,6 @@ class WebContents extends base_1$k.EmitterBase {
1902
2310
  * console.log(results);
1903
2311
  * });
1904
2312
  * ```
1905
- * @remarks
1906
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1907
- * We do not expose an explicit superclass for this functionality, but it does have its own
1908
- * {@link OpenFin.WebContentsEvents event namespace}.
1909
2313
  */
1910
2314
  stopFindInPage(action) {
1911
2315
  return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
@@ -1948,10 +2352,6 @@ class WebContents extends base_1$k.EmitterBase {
1948
2352
  * console.log(err);
1949
2353
  * });
1950
2354
  * ```
1951
- * @remarks
1952
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1953
- * We do not expose an explicit superclass for this functionality, but it does have its own
1954
- * {@link OpenFin.WebContentsEvents event namespace}.
1955
2355
  */
1956
2356
  getPrinters() {
1957
2357
  return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
@@ -1974,10 +2374,6 @@ class WebContents extends base_1$k.EmitterBase {
1974
2374
  *
1975
2375
  * focusWindow().then(() => console.log('Window focused')).catch(err => console.log(err));
1976
2376
  * ```
1977
- * @remarks
1978
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
1979
- * We do not expose an explicit superclass for this functionality, but it does have its own
1980
- * {@link OpenFin.WebContentsEvents event namespace}.
1981
2377
  */
1982
2378
  async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
1983
2379
  await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
@@ -2009,10 +2405,6 @@ class WebContents extends base_1$k.EmitterBase {
2009
2405
  * .then(() => console.log('Showing dev tools'))
2010
2406
  * .catch(err => console.error(err));
2011
2407
  * ```
2012
- * @remarks
2013
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
2014
- * We do not expose an explicit superclass for this functionality, but it does have its own
2015
- * {@link OpenFin.WebContentsEvents event namespace}.
2016
2408
  */
2017
2409
  async showDeveloperTools() {
2018
2410
  // Note this hits the system action map in core state for legacy reasons.
@@ -2021,7 +2413,7 @@ class WebContents extends base_1$k.EmitterBase {
2021
2413
  /**
2022
2414
  * Retrieves the process information associated with a WebContents.
2023
2415
  *
2024
- * Note: This includes any iframes associated with the WebContents
2416
+ * @remarks This includes any iframes associated with the WebContents
2025
2417
  *
2026
2418
  * @example
2027
2419
  * View:
@@ -2035,10 +2427,6 @@ class WebContents extends base_1$k.EmitterBase {
2035
2427
  * const win = await fin.Window.getCurrent();
2036
2428
  * const processInfo = await win.getProcessInfo();
2037
2429
  * ```
2038
- * @remarks
2039
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
2040
- * We do not expose an explicit superclass for this functionality, but it does have its own
2041
- * {@link OpenFin.WebContentsEvents event namespace}.
2042
2430
  */
2043
2431
  async getProcessInfo() {
2044
2432
  const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
@@ -2074,10 +2462,6 @@ class WebContents extends base_1$k.EmitterBase {
2074
2462
  * const win = await fin.Window.create(winOption);
2075
2463
  * const sharedWorkers = await win.getSharedWorkers();
2076
2464
  * ```
2077
- * @remarks
2078
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
2079
- * We do not expose an explicit superclass for this functionality, but it does have its own
2080
- * {@link OpenFin.WebContentsEvents event namespace}.
2081
2465
  */
2082
2466
  async getSharedWorkers() {
2083
2467
  return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
@@ -2112,10 +2496,6 @@ class WebContents extends base_1$k.EmitterBase {
2112
2496
  * const win = await fin.Window.create(winOption);
2113
2497
  * await win.inspectSharedWorker();
2114
2498
  * ```
2115
- * @remarks
2116
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
2117
- * We do not expose an explicit superclass for this functionality, but it does have its own
2118
- * {@link OpenFin.WebContentsEvents event namespace}.
2119
2499
  */
2120
2500
  async inspectSharedWorker() {
2121
2501
  await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
@@ -2153,10 +2533,6 @@ class WebContents extends base_1$k.EmitterBase {
2153
2533
  * const sharedWorkers = await win.getSharedWorkers();
2154
2534
  * await win.inspectSharedWorkerById(sharedWorkers[0].id);
2155
2535
  * ```
2156
- * @remarks
2157
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
2158
- * We do not expose an explicit superclass for this functionality, but it does have its own
2159
- * {@link OpenFin.WebContentsEvents event namespace}.
2160
2536
  */
2161
2537
  async inspectSharedWorkerById(workerId) {
2162
2538
  await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
@@ -2191,10 +2567,6 @@ class WebContents extends base_1$k.EmitterBase {
2191
2567
  * const win = await fin.Window.create(winOption);
2192
2568
  * await win.inspectServiceWorker();
2193
2569
  * ```
2194
- * @remarks
2195
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
2196
- * We do not expose an explicit superclass for this functionality, but it does have its own
2197
- * {@link OpenFin.WebContentsEvents event namespace}.
2198
2570
  */
2199
2571
  async inspectServiceWorker() {
2200
2572
  await this.wire.sendAction('inspect-service-worker', { ...this.identity });
@@ -2202,7 +2574,7 @@ class WebContents extends base_1$k.EmitterBase {
2202
2574
  /**
2203
2575
  * Shows a popup window.
2204
2576
  *
2205
- * Note: If this WebContents is a view and its attached window has a popup open, this will close it.
2577
+ * @remarks If this WebContents is a view and its attached window has a popup open, this will close it.
2206
2578
  *
2207
2579
  * Shows a popup window. Including a `name` in `options` will attempt to show an existing window as a popup, if
2208
2580
  * that window doesn't exist or no `name` is included a window will be created. If the caller view or the caller
@@ -2210,7 +2582,7 @@ class WebContents extends base_1$k.EmitterBase {
2210
2582
  * open popup window before showing the new popup window. Also, if the caller view is destroyed or detached, the popup
2211
2583
  * will be dismissed.
2212
2584
  *
2213
- * Note: in the case where the window being shown as a popup needs to be created, it is a child of the caller view's parent window.
2585
+ * NOTE: in the case where the window being shown as a popup needs to be created, it is a child of the caller view's parent window.
2214
2586
  *
2215
2587
  * @example
2216
2588
  *
@@ -2405,16 +2777,12 @@ class WebContents extends base_1$k.EmitterBase {
2405
2777
  * onPopupReady: popupWindowCallback;
2406
2778
  * });
2407
2779
  * ```
2408
- * @remarks
2409
- * `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
2410
- * We do not expose an explicit superclass for this functionality, but it does have its own
2411
- * {@link OpenFin.WebContentsEvents event namespace}.
2412
2780
  */
2413
2781
  async showPopupWindow(options) {
2414
2782
  this.wire.sendAction(`${this.entityType}-show-popup-window`, this.identity).catch(() => {
2415
2783
  // we do not want to expose this error, just continue if this analytics-only call fails
2416
2784
  });
2417
- if (options?.onPopupReady) {
2785
+ if (options === null || options === void 0 ? void 0 : options.onPopupReady) {
2418
2786
  const readyListener = async ({ popupName }) => {
2419
2787
  try {
2420
2788
  const popupWindow = this.fin.Window.wrapSync({ uuid: this.fin.me.uuid, name: popupName });
@@ -2433,8 +2801,8 @@ class WebContents extends base_1$k.EmitterBase {
2433
2801
  ...options,
2434
2802
  // Internal use only.
2435
2803
  // @ts-expect-error
2436
- hasResultCallback: !!options?.onPopupResult,
2437
- hasReadyCallback: !!options?.onPopupReady
2804
+ hasResultCallback: !!(options === null || options === void 0 ? void 0 : options.onPopupResult),
2805
+ hasReadyCallback: !!(options === null || options === void 0 ? void 0 : options.onPopupReady)
2438
2806
  },
2439
2807
  ...this.identity
2440
2808
  });
@@ -2459,7 +2827,7 @@ class WebContents extends base_1$k.EmitterBase {
2459
2827
  }
2460
2828
  return popupResult;
2461
2829
  };
2462
- if (options?.onPopupResult) {
2830
+ if (options === null || options === void 0 ? void 0 : options.onPopupResult) {
2463
2831
  const dispatchResultListener = async (payload) => {
2464
2832
  await options.onPopupResult(normalizePopupResult(payload));
2465
2833
  };
@@ -2785,49 +3153,6 @@ function requireInstance$2 () {
2785
3153
  this.show = async () => {
2786
3154
  await this.wire.sendAction('show-view', { ...this.identity });
2787
3155
  };
2788
- /**
2789
- * Sets the bounds (top, left, width, height) of the view relative to its window and shows it if it is hidden.
2790
- * This method ensures the view is both positioned and showing. It will reposition a visible view and both show and reposition a hidden view.
2791
- *
2792
- * @remarks View position is relative to the bounds of the window.
2793
- * ({top: 0, left: 0} represents the top left corner of the window)
2794
- *
2795
- * @example
2796
- * ```js
2797
- * let view;
2798
- * async function createView() {
2799
- * const me = await fin.Window.getCurrent();
2800
- * return fin.View.create({
2801
- * name: 'viewNameSetBounds',
2802
- * target: me.identity,
2803
- * bounds: {top: 10, left: 10, width: 200, height: 200}
2804
- * });
2805
- * }
2806
- *
2807
- * async function showViewAt() {
2808
- * view = await createView();
2809
- * console.log('View created.');
2810
- *
2811
- * await view.navigate('https://google.com');
2812
- * console.log('View navigated to given url.');
2813
- *
2814
- * await view.showAt({
2815
- * top: 100,
2816
- * left: 100,
2817
- * width: 300,
2818
- * height: 300
2819
- * });
2820
- * }
2821
- *
2822
- * showViewAt()
2823
- * .then(() => console.log('View set to new bounds and shown.'))
2824
- * .catch(err => console.log(err));
2825
- * ```
2826
- * @experimental
2827
- */
2828
- this.showAt = async (bounds) => {
2829
- await this.wire.sendAction('show-view-at', { bounds, ...this.identity });
2830
- };
2831
3156
  /**
2832
3157
  * Hides the current view if it is currently visible.
2833
3158
  *
@@ -2987,24 +3312,8 @@ function requireInstance$2 () {
2987
3312
  this.wire.sendAction('view-get-parent-layout', { ...this.identity }).catch(() => {
2988
3313
  // don't expose
2989
3314
  });
2990
- const layoutWindow = await this.getCurrentWindow();
2991
- try {
2992
- const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
2993
- const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
2994
- const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
2995
- return this.fin.Platform.Layout.wrap(layoutIdentity);
2996
- }
2997
- catch (e) {
2998
- const allowedErrors = [
2999
- 'No action registered at target for',
3000
- 'getLayoutIdentityForViewOrThrow is not a function'
3001
- ];
3002
- if (!allowedErrors.some((m) => e.message.includes(m))) {
3003
- throw e;
3004
- }
3005
- // fallback logic for missing endpoint
3006
- return this.fin.Platform.Layout.wrap(layoutWindow.identity);
3007
- }
3315
+ const currentWindow = await this.getCurrentWindow();
3316
+ return currentWindow.getLayout();
3008
3317
  };
3009
3318
  /**
3010
3319
  * Gets the View's options.
@@ -3219,7 +3528,7 @@ function requireInstance$2 () {
3219
3528
  var hasRequiredView;
3220
3529
 
3221
3530
  function requireView () {
3222
- if (hasRequiredView) return view$1;
3531
+ if (hasRequiredView) return view;
3223
3532
  hasRequiredView = 1;
3224
3533
  (function (exports) {
3225
3534
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -3238,9 +3547,9 @@ function requireView () {
3238
3547
  };
3239
3548
  Object.defineProperty(exports, "__esModule", { value: true });
3240
3549
  /**
3241
- * Entry points for the OpenFin `View` API (`fin.View`).
3550
+ * Entry points for the OpenFin `View` API.
3242
3551
  *
3243
- * * {@link ViewModule} contains static members of the `View` API, accessible through `fin.View`.
3552
+ * * {@link ViewModule} contains static methods relating to the `View` type, accessible through `fin.View`.
3244
3553
  * * {@link View} describes an instance of an OpenFin View, e.g. as returned by `fin.View.getCurrent`.
3245
3554
  *
3246
3555
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -3249,9 +3558,9 @@ function requireView () {
3249
3558
  * @packageDocumentation
3250
3559
  */
3251
3560
  __exportStar(requireFactory$3(), exports);
3252
- __exportStar(requireInstance$2(), exports);
3253
- } (view$1));
3254
- return view$1;
3561
+ __exportStar(requireInstance$2(), exports);
3562
+ } (view));
3563
+ return view;
3255
3564
  }
3256
3565
 
3257
3566
  var hasRequiredInstance$1;
@@ -3262,7 +3571,7 @@ function requireInstance$1 () {
3262
3571
  Object.defineProperty(Instance$6, "__esModule", { value: true });
3263
3572
  Instance$6.Application = void 0;
3264
3573
  /* eslint-disable import/prefer-default-export */
3265
- const base_1 = base$1;
3574
+ const base_1 = base;
3266
3575
  const window_1 = requireWindow();
3267
3576
  const view_1 = requireView();
3268
3577
  /**
@@ -3737,7 +4046,6 @@ function requireInstance$1 () {
3737
4046
  /**
3738
4047
  * Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
3739
4048
  * If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
3740
- *
3741
4049
  * Note: If the "name" property is omitted it defaults to "tasks".
3742
4050
  * @param jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
3743
4051
  *
@@ -4038,7 +4346,6 @@ function requireInstance$1 () {
4038
4346
  }
4039
4347
  /**
4040
4348
  * Sets file auto download location. It's only allowed in the same application.
4041
- *
4042
4349
  * Note: This method is restricted by default and must be enabled via
4043
4350
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
4044
4351
  * @param downloadLocation file auto download location
@@ -4064,7 +4371,6 @@ function requireInstance$1 () {
4064
4371
  }
4065
4372
  /**
4066
4373
  * Gets file auto download location. It's only allowed in the same application. If file auto download location is not set, it will return the default location.
4067
- *
4068
4374
  * Note: This method is restricted by default and must be enabled via
4069
4375
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
4070
4376
  *
@@ -4092,7 +4398,7 @@ function requireFactory$2 () {
4092
4398
  hasRequiredFactory$2 = 1;
4093
4399
  Object.defineProperty(Factory$7, "__esModule", { value: true });
4094
4400
  Factory$7.ApplicationModule = void 0;
4095
- const base_1 = base$1;
4401
+ const base_1 = base;
4096
4402
  const validate_1 = validate;
4097
4403
  const Instance_1 = requireInstance$1();
4098
4404
  /**
@@ -4360,7 +4666,7 @@ function requireFactory$2 () {
4360
4666
  var hasRequiredApplication;
4361
4667
 
4362
4668
  function requireApplication () {
4363
- if (hasRequiredApplication) return application$1;
4669
+ if (hasRequiredApplication) return application;
4364
4670
  hasRequiredApplication = 1;
4365
4671
  (function (exports) {
4366
4672
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -4379,9 +4685,9 @@ function requireApplication () {
4379
4685
  };
4380
4686
  Object.defineProperty(exports, "__esModule", { value: true });
4381
4687
  /**
4382
- * Entry points for the OpenFin `Application` API (`fin.Application`).
4688
+ * Entry points for the OpenFin `Application` API.
4383
4689
  *
4384
- * * {@link ApplicationModule} contains static members of the `Application` API, accessible through `fin.Application`.
4690
+ * * {@link ApplicationModule} contains static methods relating to the `Application` type, accessible through `fin.Application`.
4385
4691
  * * {@link Application} describes an instance of an OpenFin Application, e.g. as returned by `fin.Application.getCurrent`.
4386
4692
  *
4387
4693
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -4390,9 +4696,9 @@ function requireApplication () {
4390
4696
  * @packageDocumentation
4391
4697
  */
4392
4698
  __exportStar(requireFactory$2(), exports);
4393
- __exportStar(requireInstance$1(), exports);
4394
- } (application$1));
4395
- return application$1;
4699
+ __exportStar(requireInstance$1(), exports);
4700
+ } (application));
4701
+ return application;
4396
4702
  }
4397
4703
 
4398
4704
  var hasRequiredInstance;
@@ -4409,7 +4715,6 @@ function requireInstance () {
4409
4715
  const application_1 = requireApplication();
4410
4716
  const main_1 = main;
4411
4717
  const view_1 = requireView();
4412
- const warnings_1 = warnings;
4413
4718
  /**
4414
4719
  * @PORTED
4415
4720
  * @typedef { object } Margins
@@ -4894,6 +5199,7 @@ function requireInstance () {
4894
5199
  */
4895
5200
  constructor(wire, identity) {
4896
5201
  super(wire, identity, 'window');
5202
+ this.identity = identity;
4897
5203
  }
4898
5204
  /**
4899
5205
  * Adds a listener to the end of the listeners array for the specified event.
@@ -5019,7 +5325,6 @@ function requireInstance () {
5019
5325
  if (options.autoShow === undefined) {
5020
5326
  options.autoShow = true;
5021
5327
  }
5022
- (0, warnings_1.handleDeprecatedWarnings)(options);
5023
5328
  const windowCreation = this.wire.environment.createChildContent({ entityType: 'window', options });
5024
5329
  Promise.all([pageResponse, windowCreation])
5025
5330
  .then((resolvedArr) => {
@@ -5436,15 +5741,15 @@ function requireInstance () {
5436
5741
  * ```
5437
5742
  * @experimental
5438
5743
  */
5439
- async getLayout(layoutIdentity) {
5744
+ async getLayout() {
5440
5745
  this.wire.sendAction('window-get-layout', this.identity).catch((e) => {
5441
5746
  // don't expose
5442
5747
  });
5443
5748
  const opts = await this.getOptions();
5444
- if (!opts.layout || !opts.layoutSnapshot) {
5749
+ if (!opts.layout) {
5445
5750
  throw new Error('Window does not have a Layout');
5446
5751
  }
5447
- return this.fin.Platform.Layout.wrap(layoutIdentity ?? this.identity);
5752
+ return this.fin.Platform.Layout.wrap(this.identity);
5448
5753
  }
5449
5754
  /**
5450
5755
  * Gets the current settings of the window.
@@ -6073,10 +6378,7 @@ function requireInstance () {
6073
6378
  * Calling this method will close previously opened menus.
6074
6379
  * @experimental
6075
6380
  * @param options
6076
- * @typeParam Data User-defined shape for data returned upon menu item click. Should be a
6077
- * [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
6078
- * of all possible data shapes for the entire menu, and the click handler should process
6079
- * these with a "reducer" pattern.
6381
+ *
6080
6382
  * @example
6081
6383
  * This could be used to show a drop down menu over views in a platform window:
6082
6384
  * ```js
@@ -6166,7 +6468,6 @@ function requireInstance () {
6166
6468
  return this.wire.sendAction('close-popup-menu', { ...this.identity }).then(() => undefined);
6167
6469
  }
6168
6470
  /**
6169
- * @PORTED
6170
6471
  * @typedef {object} PopupOptions
6171
6472
  * @property {string} [name] - If a window with this `name` exists, it will be shown as a popup. Otherwise, a new window with this `name` will be created. If this `name` is undefined, `initialOptions.name` will be used. If this `name` and `intialOptions.name` are both undefined, a `name` will be generated.
6172
6473
  * @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
@@ -6184,7 +6485,6 @@ function requireInstance () {
6184
6485
  * @property {boolean} [hideOnClose] - Hide the popup window instead of closing whenever `close` is called on it. Note: if this is `true` and `blurBehavior` and/or `resultDispatchBehavior` are set to `close`, the window will be hidden.
6185
6486
  */
6186
6487
  /**
6187
- * @PORTED
6188
6488
  * @typedef {object} PopupResult
6189
6489
  * @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
6190
6490
  * @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
@@ -6275,7 +6575,7 @@ function requireFactory$1 () {
6275
6575
  hasRequiredFactory$1 = 1;
6276
6576
  Object.defineProperty(Factory$8, "__esModule", { value: true });
6277
6577
  Factory$8._WindowModule = void 0;
6278
- const base_1 = base$1;
6578
+ const base_1 = base;
6279
6579
  const validate_1 = validate;
6280
6580
  const Instance_1 = requireInstance();
6281
6581
  /**
@@ -6417,7 +6717,7 @@ function requireFactory$1 () {
6417
6717
  var hasRequiredWindow;
6418
6718
 
6419
6719
  function requireWindow () {
6420
- if (hasRequiredWindow) return window$2;
6720
+ if (hasRequiredWindow) return window$1;
6421
6721
  hasRequiredWindow = 1;
6422
6722
  (function (exports) {
6423
6723
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -6436,9 +6736,9 @@ function requireWindow () {
6436
6736
  };
6437
6737
  Object.defineProperty(exports, "__esModule", { value: true });
6438
6738
  /**
6439
- * Entry points for the OpenFin `Window` API (`fin.Window`).
6739
+ * Entry points for the OpenFin `Window` API.
6440
6740
  *
6441
- * * {@link _WindowModule} contains static members of the `Window` API, accessible through `fin.Window`.
6741
+ * * {@link _WindowModule} contains static methods relating to the `Window` type, accessible through `fin.Window`.
6442
6742
  * * {@link _Window} describes an instance of an OpenFin Window, e.g. as returned by `fin.Window.getCurrent`.
6443
6743
  *
6444
6744
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -6449,24 +6749,17 @@ function requireWindow () {
6449
6749
  * @packageDocumentation
6450
6750
  */
6451
6751
  __exportStar(requireFactory$1(), exports);
6452
- __exportStar(requireInstance(), exports);
6453
- } (window$2));
6454
- return window$2;
6752
+ __exportStar(requireInstance(), exports);
6753
+ } (window$1));
6754
+ return window$1;
6455
6755
  }
6456
6756
 
6457
- /**
6458
- * Entry point for the OpenFin `System` API (`fin.System`).
6459
- *
6460
- * * {@link System} contains static members of the `System` API (available under `fin.System`)
6461
- *
6462
- * @packageDocumentation
6463
- */
6464
- Object.defineProperty(system$1, "__esModule", { value: true });
6465
- system$1.System = void 0;
6466
- const base_1$j = base$1;
6757
+ Object.defineProperty(system, "__esModule", { value: true });
6758
+ system.System = void 0;
6759
+ const base_1$j = base;
6467
6760
  const transport_errors_1$2 = transportErrors;
6468
6761
  const window_1 = requireWindow();
6469
- const events_1$6 = require$$0;
6762
+ const events_1$6 = eventsExports;
6470
6763
  /**
6471
6764
  * An object representing the core of OpenFin Runtime. Allows the developer
6472
6765
  * to perform system-level actions, such as accessing logs, viewing processes,
@@ -7436,59 +7729,6 @@ class System extends base_1$j.EmitterBase {
7436
7729
  openUrlWithBrowser(url) {
7437
7730
  return this.wire.sendAction('open-url-with-browser', { url }).then(() => undefined);
7438
7731
  }
7439
- /**
7440
- * Creates a new registry entry under the HKCU root Windows registry key if the given custom protocol name doesn't exist or
7441
- * overwrites the existing registry entry if the given custom protocol name already exists.
7442
- *
7443
- * Note: This method is restricted by default and must be enabled via
7444
- * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
7445
- *
7446
- *
7447
- * @remarks These protocols are reserved and cannot be registered:
7448
- * - fin
7449
- * - fins
7450
- * - openfin
7451
- * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
7452
- *
7453
- * @throws if a given custom protocol failed to be registered.
7454
- * @throws if a manifest URL contains the '%1' string.
7455
- * @throws if a manifest URL contains a query string parameter which name equals to the Protocol Launch Request Parameter Name.
7456
- * @throws if the full length of the command string that is to be written to the registry exceeds 2048 bytes.
7457
- *
7458
- * @example
7459
- * ```js
7460
- * fin.System.registerCustomProtocol({protocolName:'protocol1'}).then(console.log).catch(console.error);
7461
- * ```
7462
- */
7463
- async registerCustomProtocol(options) {
7464
- if (typeof options !== 'object') {
7465
- throw new Error('Must provide an object with a `protocolName` property having a string value.');
7466
- }
7467
- await this.wire.sendAction('register-custom-protocol', options);
7468
- }
7469
- /**
7470
- * Removes the registry entry for a given custom protocol.
7471
- *
7472
- * Note: This method is restricted by default and must be enabled via
7473
- * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
7474
- *
7475
- *
7476
- * @remarks These protocols are reserved and cannot be unregistered:
7477
- * - fin
7478
- * - fins
7479
- * - openfin
7480
- * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
7481
- *
7482
- * @throws if a protocol entry failed to be removed in registry.
7483
- *
7484
- * @example
7485
- * ```js
7486
- * await fin.System.unregisterCustomProtocol('protocol1');
7487
- * ```
7488
- */
7489
- async unregisterCustomProtocol(protocolName) {
7490
- await this.wire.sendAction('unregister-custom-protocol', { protocolName });
7491
- }
7492
7732
  /**
7493
7733
  * Removes the process entry for the passed UUID obtained from a prior call
7494
7734
  * of fin.System.launchExternalProcess().
@@ -7521,8 +7761,7 @@ class System extends base_1$j.EmitterBase {
7521
7761
  }
7522
7762
  /**
7523
7763
  * Attempt to close an external process. The process will be terminated if it
7524
- * has not closed after the elapsed timeout in milliseconds.
7525
- *
7764
+ * has not closed after the elapsed timeout in milliseconds.<br>
7526
7765
  * Note: This method is restricted by default and must be enabled via
7527
7766
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
7528
7767
  * @param options A object defined in the TerminateExternalRequestType interface
@@ -7558,8 +7797,7 @@ class System extends base_1$j.EmitterBase {
7558
7797
  return this.wire.sendAction('update-proxy', options).then(() => undefined);
7559
7798
  }
7560
7799
  /**
7561
- * Downloads the given application asset.
7562
- *
7800
+ * Downloads the given application asset<br>
7563
7801
  * Note: This method is restricted by default and must be enabled via
7564
7802
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
7565
7803
  * @param appAsset App asset object
@@ -8362,7 +8600,7 @@ class System extends base_1$j.EmitterBase {
8362
8600
  await this.wire.sendAction('set-domain-settings', { domainSettings, ...this.identity });
8363
8601
  }
8364
8602
  }
8365
- system$1.System = System;
8603
+ system.System = System;
8366
8604
 
8367
8605
  var interappbus = {};
8368
8606
 
@@ -8453,7 +8691,7 @@ class ChannelBase {
8453
8691
  try {
8454
8692
  const mainAction = this.subscriptions.has(topic)
8455
8693
  ? this.subscriptions.get(topic)
8456
- : (currentPayload, id) => (this.defaultAction ?? ChannelBase.defaultAction)(topic, currentPayload, id);
8694
+ : (currentPayload, id) => { var _a; return ((_a = this.defaultAction) !== null && _a !== void 0 ? _a : ChannelBase.defaultAction)(topic, currentPayload, id); };
8457
8695
  const preActionProcessed = this.preAction ? await this.preAction(topic, payload, senderIdentity) : payload;
8458
8696
  const actionProcessed = await mainAction(preActionProcessed, senderIdentity);
8459
8697
  return this.postAction ? await this.postAction(topic, actionProcessed, senderIdentity) : actionProcessed;
@@ -8986,6 +9224,7 @@ class ClassicStrategy {
8986
9224
  // connection problems occur
8987
9225
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map);
8988
9226
  this.send = async (endpointId, action, payload) => {
9227
+ var _a;
8989
9228
  const to = __classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
8990
9229
  if (!to) {
8991
9230
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
@@ -9005,12 +9244,13 @@ class ClassicStrategy {
9005
9244
  action,
9006
9245
  payload
9007
9246
  });
9008
- __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
9247
+ (_a = __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)) === null || _a === void 0 ? void 0 : _a.add(p);
9009
9248
  const raw = await p.catch((error) => {
9010
9249
  throw new Error(error.message);
9011
9250
  }).finally(() => {
9251
+ var _a;
9012
9252
  // clean up the pending promise
9013
- __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
9253
+ (_a = __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)) === null || _a === void 0 ? void 0 : _a.delete(p);
9014
9254
  });
9015
9255
  return raw.payload.data.result;
9016
9256
  };
@@ -9031,8 +9271,8 @@ class ClassicStrategy {
9031
9271
  const id = __classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
9032
9272
  __classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
9033
9273
  const pendingSet = __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
9034
- pendingSet?.forEach((p) => {
9035
- const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
9274
+ pendingSet === null || pendingSet === void 0 ? void 0 : pendingSet.forEach((p) => {
9275
+ const errorMsg = `Channel connection with identity uuid: ${id === null || id === void 0 ? void 0 : id.uuid} / name: ${id === null || id === void 0 ? void 0 : id.name} / endpointId: ${endpointId} no longer connected.`;
9036
9276
  p.cancel(new Error(errorMsg));
9037
9277
  });
9038
9278
  }
@@ -9044,8 +9284,9 @@ class ClassicStrategy {
9044
9284
  __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
9045
9285
  }
9046
9286
  isValidEndpointPayload(payload) {
9047
- return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
9048
- typeof payload?.endpointIdentity?.channelId === 'string');
9287
+ var _a, _b;
9288
+ return (typeof ((_a = payload === null || payload === void 0 ? void 0 : payload.endpointIdentity) === null || _a === void 0 ? void 0 : _a.endpointId) === 'string' ||
9289
+ typeof ((_b = payload === null || payload === void 0 ? void 0 : payload.endpointIdentity) === null || _b === void 0 ? void 0 : _b.channelId) === 'string');
9049
9290
  }
9050
9291
  }
9051
9292
  strategy$2.ClassicStrategy = ClassicStrategy;
@@ -9122,12 +9363,13 @@ class RTCEndpoint {
9122
9363
  this.rtc.rtcClient.close();
9123
9364
  };
9124
9365
  this.rtc.channels.response.addEventListener('message', (e) => {
9366
+ var _a;
9125
9367
  let { data } = e;
9126
9368
  if (e.data instanceof ArrayBuffer) {
9127
9369
  data = new TextDecoder().decode(e.data);
9128
9370
  }
9129
9371
  const { messageId, payload, success, error } = JSON.parse(data);
9130
- const { resolve, reject } = this.responseMap.get(messageId) ?? {};
9372
+ const { resolve, reject } = (_a = this.responseMap.get(messageId)) !== null && _a !== void 0 ? _a : {};
9131
9373
  if (resolve && reject) {
9132
9374
  this.responseMap.delete(messageId);
9133
9375
  if (success) {
@@ -9300,7 +9542,7 @@ var iceManager = {};
9300
9542
 
9301
9543
  Object.defineProperty(iceManager, "__esModule", { value: true });
9302
9544
  iceManager.RTCICEManager = void 0;
9303
- const base_1$i = base$1;
9545
+ const base_1$i = base;
9304
9546
  /*
9305
9547
  Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
9306
9548
  */
@@ -9376,8 +9618,9 @@ class RTCICEManager extends base_1$i.EmitterBase {
9376
9618
  const rtcConnectionId = Math.random().toString();
9377
9619
  const rtcClient = this.createRtcPeer();
9378
9620
  rtcClient.addEventListener('icecandidate', async (e) => {
9621
+ var _a;
9379
9622
  if (e.candidate) {
9380
- await this.raiseClientIce(rtcConnectionId, { candidate: e.candidate?.toJSON() });
9623
+ await this.raiseClientIce(rtcConnectionId, { candidate: (_a = e.candidate) === null || _a === void 0 ? void 0 : _a.toJSON() });
9381
9624
  }
9382
9625
  });
9383
9626
  await this.listenForProviderIce(rtcConnectionId, async (payload) => {
@@ -9402,8 +9645,9 @@ class RTCICEManager extends base_1$i.EmitterBase {
9402
9645
  const requestChannelPromise = RTCICEManager.createDataChannelPromise('request', rtcClient);
9403
9646
  const responseChannelPromise = RTCICEManager.createDataChannelPromise('response', rtcClient);
9404
9647
  rtcClient.addEventListener('icecandidate', async (e) => {
9648
+ var _a;
9405
9649
  if (e.candidate) {
9406
- await this.raiseProviderIce(rtcConnectionId, { candidate: e.candidate?.toJSON() });
9650
+ await this.raiseProviderIce(rtcConnectionId, { candidate: (_a = e.candidate) === null || _a === void 0 ? void 0 : _a.toJSON() });
9407
9651
  }
9408
9652
  });
9409
9653
  await this.listenForClientIce(rtcConnectionId, async (payload) => {
@@ -9585,7 +9829,8 @@ class ChannelProvider extends channel_1.ChannelBase {
9585
9829
  * ```
9586
9830
  */
9587
9831
  dispatch(to, action, payload) {
9588
- const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
9832
+ var _a;
9833
+ const endpointId = (_a = to.endpointId) !== null && _a !== void 0 ? _a : this.getEndpointIdForOpenFinId(to, action);
9589
9834
  if (endpointId && __classPrivateFieldGet$9(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
9590
9835
  return __classPrivateFieldGet$9(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload);
9591
9836
  }
@@ -9761,12 +10006,13 @@ class ChannelProvider extends channel_1.ChannelBase {
9761
10006
  }
9762
10007
  }
9763
10008
  getEndpointIdForOpenFinId(clientIdentity, action) {
10009
+ var _a;
9764
10010
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
9765
10011
  if (matchingConnections.length >= 2) {
9766
10012
  const protectedObj = __classPrivateFieldGet$9(this, _ChannelProvider_protectedObj, "f");
9767
10013
  const { uuid, name } = clientIdentity;
9768
- const providerUuid = protectedObj?.providerIdentity.uuid;
9769
- const providerName = protectedObj?.providerIdentity.name;
10014
+ const providerUuid = protectedObj === null || protectedObj === void 0 ? void 0 : protectedObj.providerIdentity.uuid;
10015
+ const providerName = protectedObj === null || protectedObj === void 0 ? void 0 : protectedObj.providerIdentity.name;
9770
10016
  // eslint-disable-next-line no-console
9771
10017
  console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the
9772
10018
  "endpointId" parameter. The identity you are dispatching to ({uuid: ${uuid}, name: ${name}})
@@ -9774,7 +10020,7 @@ class ChannelProvider extends channel_1.ChannelBase {
9774
10020
  ({uuid: ${providerUuid}, name: ${providerName}}) will only be processed by the most recently-created client.`);
9775
10021
  }
9776
10022
  // Pop to return the most recently created endpointId.
9777
- return matchingConnections.pop()?.endpointId;
10023
+ return (_a = matchingConnections.pop()) === null || _a === void 0 ? void 0 : _a.endpointId;
9778
10024
  }
9779
10025
  // eslint-disable-next-line class-methods-use-this
9780
10026
  static clientIdentityIncludesEndpointId(subscriptionIdentity) {
@@ -9791,12 +10037,12 @@ _ChannelProvider_connections = new WeakMap(), _ChannelProvider_protectedObj = ne
9791
10037
  // static #removalMap = new WeakMap<ChannelProvider, Function>();
9792
10038
  ChannelProvider.removalMap = new WeakMap();
9793
10039
 
9794
- var messageReceiver$1 = {};
10040
+ var messageReceiver = {};
9795
10041
 
9796
- Object.defineProperty(messageReceiver$1, "__esModule", { value: true });
9797
- messageReceiver$1.MessageReceiver = void 0;
10042
+ Object.defineProperty(messageReceiver, "__esModule", { value: true });
10043
+ messageReceiver.MessageReceiver = void 0;
9798
10044
  const client_1$1 = client;
9799
- const base_1$h = base$1;
10045
+ const base_1$h = base;
9800
10046
  /*
9801
10047
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
9802
10048
  It needs to be a singleton because there can only be one per wire. It tracks both clients and providers' processAction passed in via the strategy.
@@ -9817,10 +10063,9 @@ class MessageReceiver extends base_1$h.Base {
9817
10063
  wire.registerMessageHandler(this.onmessage.bind(this));
9818
10064
  }
9819
10065
  async processChannelMessage(msg) {
10066
+ var _a, _b;
9820
10067
  const { senderIdentity, providerIdentity, action, ackToSender, payload, intendedTargetIdentity } = msg.payload;
9821
- const key = intendedTargetIdentity.channelId ?? // The recipient is a provider
9822
- intendedTargetIdentity.endpointId ?? // The recipient is a client
9823
- this.latestEndpointIdByChannelId.get(providerIdentity.channelId); // No endpointId was passed, make best attempt
10068
+ const key = (_b = (_a = intendedTargetIdentity.channelId) !== null && _a !== void 0 ? _a : intendedTargetIdentity.endpointId) !== null && _b !== void 0 ? _b : this.latestEndpointIdByChannelId.get(providerIdentity.channelId); // No endpointId was passed, make best attempt
9824
10069
  const handler = this.endpointMap.get(key);
9825
10070
  if (!handler) {
9826
10071
  ackToSender.payload.success = false;
@@ -9865,7 +10110,7 @@ class MessageReceiver extends base_1$h.Base {
9865
10110
  }
9866
10111
  }
9867
10112
  }
9868
- messageReceiver$1.MessageReceiver = MessageReceiver;
10113
+ messageReceiver.MessageReceiver = MessageReceiver;
9869
10114
 
9870
10115
  var protocolManager = {};
9871
10116
 
@@ -9900,9 +10145,12 @@ class ProtocolManager {
9900
10145
  return supported;
9901
10146
  };
9902
10147
  this.getCompatibleProtocols = (providerProtocols, clientOffer) => {
9903
- const supported = clientOffer.supportedProtocols.filter((clientProtocol) => providerProtocols.some((providerProtocol) => providerProtocol.type === clientProtocol.type &&
9904
- clientProtocol.version >= providerProtocol.minimumVersion &&
9905
- providerProtocol.version >= (clientProtocol.minimumVersion ?? 0)));
10148
+ const supported = clientOffer.supportedProtocols.filter((clientProtocol) => providerProtocols.some((providerProtocol) => {
10149
+ var _a;
10150
+ return providerProtocol.type === clientProtocol.type &&
10151
+ clientProtocol.version >= providerProtocol.minimumVersion &&
10152
+ providerProtocol.version >= ((_a = clientProtocol.minimumVersion) !== null && _a !== void 0 ? _a : 0);
10153
+ }));
9906
10154
  return supported.slice(0, clientOffer.maxProtocols);
9907
10155
  };
9908
10156
  }
@@ -9984,12 +10232,12 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
9984
10232
  Object.defineProperty(connectionManager, "__esModule", { value: true });
9985
10233
  connectionManager.ConnectionManager = void 0;
9986
10234
  const exhaustive_1 = exhaustive;
9987
- const base_1$g = base$1;
10235
+ const base_1$g = base;
9988
10236
  const strategy_1 = strategy$2;
9989
10237
  const strategy_2 = strategy$1;
9990
10238
  const ice_manager_1 = iceManager;
9991
10239
  const provider_1$1 = provider;
9992
- const message_receiver_1 = messageReceiver$1;
10240
+ const message_receiver_1 = messageReceiver;
9993
10241
  const protocol_manager_1 = protocolManager;
9994
10242
  const strategy_3 = strategy;
9995
10243
  class ConnectionManager extends base_1$g.Base {
@@ -10027,7 +10275,7 @@ class ConnectionManager extends base_1$g.Base {
10027
10275
  }
10028
10276
  createProvider(options, providerIdentity) {
10029
10277
  const opts = Object.assign(this.wire.environment.getDefaultChannelOptions().create, options || {});
10030
- const protocols = this.protocolManager.getProviderProtocols(opts?.protocols);
10278
+ const protocols = this.protocolManager.getProviderProtocols(opts === null || opts === void 0 ? void 0 : opts.protocols);
10031
10279
  const createSingleStrategy = (stratType) => {
10032
10280
  switch (stratType) {
10033
10281
  case 'rtc':
@@ -10064,7 +10312,7 @@ class ConnectionManager extends base_1$g.Base {
10064
10312
  return channel;
10065
10313
  }
10066
10314
  async createClientOffer(options) {
10067
- const protocols = this.protocolManager.getClientProtocols(options?.protocols);
10315
+ const protocols = this.protocolManager.getClientProtocols(options === null || options === void 0 ? void 0 : options.protocols);
10068
10316
  let rtcPacket;
10069
10317
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
10070
10318
  switch (type) {
@@ -10092,13 +10340,14 @@ class ConnectionManager extends base_1$g.Base {
10092
10340
  };
10093
10341
  }
10094
10342
  async createClientStrategy(rtcPacket, routingInfo) {
10343
+ var _a;
10095
10344
  if (!routingInfo.endpointId) {
10096
10345
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
10097
10346
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
10098
10347
  // clients that are in the same context as the newly-connected client.
10099
10348
  __classPrivateFieldGet$8(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
10100
10349
  }
10101
- const answer = routingInfo.answer ?? {
10350
+ const answer = (_a = routingInfo.answer) !== null && _a !== void 0 ? _a : {
10102
10351
  supportedProtocols: [{ type: 'classic', version: 1 }]
10103
10352
  };
10104
10353
  const createStrategyFromAnswer = async (protocol) => {
@@ -10156,7 +10405,7 @@ class ConnectionManager extends base_1$g.Base {
10156
10405
  if (!(provider instanceof provider_1$1.ChannelProvider)) {
10157
10406
  throw Error('Cannot connect to a channel client');
10158
10407
  }
10159
- const offer = clientOffer ?? {
10408
+ const offer = clientOffer !== null && clientOffer !== void 0 ? clientOffer : {
10160
10409
  supportedProtocols: [{ type: 'classic', version: 1 }],
10161
10410
  maxProtocols: 1
10162
10411
  };
@@ -10214,15 +10463,6 @@ class ConnectionManager extends base_1$g.Base {
10214
10463
  connectionManager.ConnectionManager = ConnectionManager;
10215
10464
  _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnectionManager = new WeakMap();
10216
10465
 
10217
- /**
10218
- * Entry points for the `Channel` subset of the `InterApplicationBus` API (`fin.InterApplicationBus.Channel`).
10219
- *
10220
- * * {@link Channel} contains static members of the `Channel` API, accessible through `fin.InterApplicationBus.Channel`.
10221
- * * {@link OpenFin.ChannelClient} describes a client of a channel, e.g. as returned by `fin.InterApplicationBus.Channel.connect`.
10222
- * * {@link OpenFin.ChannelProvider} describes a provider of a channel, e.g. as returned by `fin.InterApplicationBus.Channel.create`.
10223
- *
10224
- * @packageDocumentation
10225
- */
10226
10466
  var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10227
10467
  if (kind === "m") throw new TypeError("Private method is not writable");
10228
10468
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -10238,9 +10478,9 @@ var _Channel_connectionManager, _Channel_internalEmitter, _Channel_readyToConnec
10238
10478
  Object.defineProperty(channel$1, "__esModule", { value: true });
10239
10479
  channel$1.Channel = void 0;
10240
10480
  /* eslint-disable no-console */
10241
- const events_1$5 = require$$0;
10481
+ const events_1$5 = eventsExports;
10242
10482
  const lazy_1$1 = lazy;
10243
- const base_1$f = base$1;
10483
+ const base_1$f = base;
10244
10484
  const client_1 = client;
10245
10485
  const connection_manager_1 = connectionManager;
10246
10486
  const provider_1 = provider;
@@ -10558,15 +10798,8 @@ _Channel_connectionManager = new WeakMap(), _Channel_internalEmitter = new WeakM
10558
10798
 
10559
10799
  Object.defineProperty(interappbus, "__esModule", { value: true });
10560
10800
  interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
10561
- /**
10562
- * Entry point for the OpenFin `InterApplicationBus` API (`fin.InterApplicationBus`).
10563
- *
10564
- * * {@link InterApplicationBus} contains static members of the `InterApplicationBus` API, accessible through `fin.InterApplicationBus`.
10565
- *
10566
- * @packageDocumentation
10567
- */
10568
- const events_1$4 = require$$0;
10569
- const base_1$e = base$1;
10801
+ const events_1$4 = eventsExports;
10802
+ const base_1$e = base;
10570
10803
  const ref_counter_1 = refCounter;
10571
10804
  const index_1$2 = channel$1;
10572
10805
  const validate_1$3 = validate;
@@ -10773,16 +11006,9 @@ function createKey(...toHash) {
10773
11006
 
10774
11007
  var clipboard = {};
10775
11008
 
10776
- /**
10777
- * Entry point for the OpenFin `Clipboard` API (`fin.Clipboard`).
10778
- *
10779
- * * {@link Clipboard} contains static members of the `Clipboard` API, accessible through `fin.Clipboard`.
10780
- *
10781
- * @packageDocumentation
10782
- */
10783
11009
  Object.defineProperty(clipboard, "__esModule", { value: true });
10784
11010
  clipboard.Clipboard = void 0;
10785
- const base_1$d = base$1;
11011
+ const base_1$d = base;
10786
11012
  /**
10787
11013
  * @PORTED
10788
11014
  * WriteRequestType interface
@@ -10981,7 +11207,7 @@ class Clipboard extends base_1$d.Base {
10981
11207
  }
10982
11208
  clipboard.Clipboard = Clipboard;
10983
11209
 
10984
- var externalApplication$1 = {};
11210
+ var externalApplication = {};
10985
11211
 
10986
11212
  var Factory$5 = {};
10987
11213
 
@@ -10990,7 +11216,7 @@ var Instance$4 = {};
10990
11216
  Object.defineProperty(Instance$4, "__esModule", { value: true });
10991
11217
  Instance$4.ExternalApplication = void 0;
10992
11218
  /* eslint-disable import/prefer-default-export */
10993
- const base_1$c = base$1;
11219
+ const base_1$c = base;
10994
11220
  /**
10995
11221
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
10996
11222
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -11106,7 +11332,7 @@ Instance$4.ExternalApplication = ExternalApplication;
11106
11332
 
11107
11333
  Object.defineProperty(Factory$5, "__esModule", { value: true });
11108
11334
  Factory$5.ExternalApplicationModule = void 0;
11109
- const base_1$b = base$1;
11335
+ const base_1$b = base;
11110
11336
  const Instance_1$4 = Instance$4;
11111
11337
  /**
11112
11338
  * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
@@ -11170,9 +11396,9 @@ Factory$5.ExternalApplicationModule = ExternalApplicationModule;
11170
11396
  };
11171
11397
  Object.defineProperty(exports, "__esModule", { value: true });
11172
11398
  /**
11173
- * Entry points for the OpenFin `ExternalApplication` API (`fin.ExternalApplication`).
11399
+ * Entry points for the OpenFin `ExternalApplication` API.
11174
11400
  *
11175
- * * {@link ExternalApplicationModule} contains static members of the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
11401
+ * * {@link ExternalApplicationModule} contains static methods relating to the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
11176
11402
  * * {@link ExternalApplication} describes an instance of an OpenFin ExternalApplication, e.g. as returned by `fin.ExternalApplication.getCurrent`.
11177
11403
  *
11178
11404
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -11181,10 +11407,10 @@ Factory$5.ExternalApplicationModule = ExternalApplicationModule;
11181
11407
  * @packageDocumentation
11182
11408
  */
11183
11409
  __exportStar(Factory$5, exports);
11184
- __exportStar(Instance$4, exports);
11185
- } (externalApplication$1));
11410
+ __exportStar(Instance$4, exports);
11411
+ } (externalApplication));
11186
11412
 
11187
- var frame$1 = {};
11413
+ var frame = {};
11188
11414
 
11189
11415
  var Factory$4 = {};
11190
11416
 
@@ -11193,7 +11419,7 @@ var Instance$3 = {};
11193
11419
  Object.defineProperty(Instance$3, "__esModule", { value: true });
11194
11420
  Instance$3._Frame = void 0;
11195
11421
  /* eslint-disable import/prefer-default-export */
11196
- const base_1$a = base$1;
11422
+ const base_1$a = base;
11197
11423
  /**
11198
11424
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
11199
11425
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
@@ -11335,7 +11561,7 @@ Instance$3._Frame = _Frame;
11335
11561
 
11336
11562
  Object.defineProperty(Factory$4, "__esModule", { value: true });
11337
11563
  Factory$4._FrameModule = void 0;
11338
- const base_1$9 = base$1;
11564
+ const base_1$9 = base;
11339
11565
  const validate_1$2 = validate;
11340
11566
  const Instance_1$3 = Instance$3;
11341
11567
  /**
@@ -11421,9 +11647,9 @@ Factory$4._FrameModule = _FrameModule;
11421
11647
 
11422
11648
  (function (exports) {
11423
11649
  /**
11424
- * Entry points for the OpenFin `Frame` API (`fin.Frame`).
11650
+ * Entry points for the OpenFin `Frame` API.
11425
11651
  *
11426
- * * {@link _FrameModule} contains static members of the `Frame` API, accessible through `fin.Frame`.
11652
+ * * {@link _FrameModule} contains static methods relating to the `Frame` type, accessible through `fin.Frame`.
11427
11653
  * * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
11428
11654
  *
11429
11655
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -11449,14 +11675,14 @@ Factory$4._FrameModule = _FrameModule;
11449
11675
  };
11450
11676
  Object.defineProperty(exports, "__esModule", { value: true });
11451
11677
  __exportStar(Factory$4, exports);
11452
- __exportStar(Instance$3, exports);
11453
- } (frame$1));
11678
+ __exportStar(Instance$3, exports);
11679
+ } (frame));
11454
11680
 
11455
- var globalHotkey$1 = {};
11681
+ var globalHotkey = {};
11456
11682
 
11457
- Object.defineProperty(globalHotkey$1, "__esModule", { value: true });
11458
- globalHotkey$1.GlobalHotkey = void 0;
11459
- const base_1$8 = base$1;
11683
+ Object.defineProperty(globalHotkey, "__esModule", { value: true });
11684
+ globalHotkey.GlobalHotkey = void 0;
11685
+ const base_1$8 = base;
11460
11686
  /**
11461
11687
  * The GlobalHotkey module can register/unregister a global hotkeys.
11462
11688
  *
@@ -11472,8 +11698,6 @@ class GlobalHotkey extends base_1$8.EmitterBase {
11472
11698
  * Registers a global hotkey with the operating system.
11473
11699
  * @param hotkey a hotkey string
11474
11700
  * @param listener called when the registered hotkey is pressed by the user.
11475
- * @throws If the `hotkey` is reserved, see list below.
11476
- * @throws if the `hotkey` is already registered by another application.
11477
11701
  *
11478
11702
  * @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
11479
11703
  * If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
@@ -11566,7 +11790,7 @@ class GlobalHotkey extends base_1$8.EmitterBase {
11566
11790
  return undefined;
11567
11791
  }
11568
11792
  /**
11569
- * Checks if a given hotkey has been registered by an application within the current runtime.
11793
+ * Checks if a given hotkey has been registered
11570
11794
  * @param hotkey a hotkey string
11571
11795
  *
11572
11796
  * @example
@@ -11587,9 +11811,9 @@ class GlobalHotkey extends base_1$8.EmitterBase {
11587
11811
  return data;
11588
11812
  }
11589
11813
  }
11590
- globalHotkey$1.GlobalHotkey = GlobalHotkey;
11814
+ globalHotkey.GlobalHotkey = GlobalHotkey;
11591
11815
 
11592
- var platform$1 = {};
11816
+ var platform = {};
11593
11817
 
11594
11818
  var Factory$3 = {};
11595
11819
 
@@ -11604,14 +11828,16 @@ var _Platform_connectToProvider;
11604
11828
  Object.defineProperty(Instance$2, "__esModule", { value: true });
11605
11829
  Instance$2.Platform = void 0;
11606
11830
  /* eslint-disable import/prefer-default-export, no-undef */
11607
- const base_1$7 = base$1;
11831
+ const base_1$7 = base;
11608
11832
  const validate_1$1 = validate;
11609
11833
  // Reuse clients to avoid overwriting already-registered client in provider
11610
11834
  const clientMap = new Map();
11611
11835
  /** Manages the life cycle of windows and views in the application.
11612
11836
  *
11613
- * Enables taking snapshots of itself and applying them to restore a previous configuration
11837
+ * Enables taking snapshots of itself and applyi
11838
+ * ng them to restore a previous configuration
11614
11839
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
11840
+ *
11615
11841
  */
11616
11842
  class Platform extends base_1$7.EmitterBase {
11617
11843
  /**
@@ -11970,13 +12196,15 @@ class Platform extends base_1$7.EmitterBase {
11970
12196
  });
11971
12197
  }
11972
12198
  /**
11973
- * ***DEPRECATED - please use {@link Platform.createView Platform.createView}.***
12199
+ * ***DEPRECATED - please use Platform.createView.***
11974
12200
  * Reparents a specified view in a new target window.
11975
12201
  * @param viewIdentity View identity
11976
12202
  * @param target new owner window identity
11977
12203
  *
12204
+ * @tutorial Platform.createView
11978
12205
  */
11979
12206
  async reparentView(viewIdentity, target) {
12207
+ var _a;
11980
12208
  // eslint-disable-next-line no-console
11981
12209
  console.warn('Platform.reparentView has been deprecated, please use Platform.createView');
11982
12210
  this.wire.sendAction('platform-reparent-view', this.identity).catch((e) => {
@@ -11984,7 +12212,7 @@ class Platform extends base_1$7.EmitterBase {
11984
12212
  });
11985
12213
  const normalizedViewIdentity = {
11986
12214
  ...viewIdentity,
11987
- uuid: viewIdentity.uuid ?? this.identity.uuid
12215
+ uuid: (_a = viewIdentity.uuid) !== null && _a !== void 0 ? _a : this.identity.uuid
11988
12216
  };
11989
12217
  const view = await this.fin.View.wrap(normalizedViewIdentity);
11990
12218
  const viewOptions = await view.getOptions();
@@ -12463,7 +12691,7 @@ Object.defineProperty(Instance$1, "__esModule", { value: true });
12463
12691
  Instance$1.Layout = void 0;
12464
12692
  const lazy_1 = lazy;
12465
12693
  const validate_1 = validate;
12466
- const base_1$6 = base$1;
12694
+ const base_1$6 = base;
12467
12695
  const common_utils_1 = commonUtils;
12468
12696
  const layout_entities_1 = layoutEntities;
12469
12697
  const layout_constants_1 = layout_constants;
@@ -12772,30 +13000,10 @@ class Layout extends base_1$6.Base {
12772
13000
  // don't expose
12773
13001
  });
12774
13002
  const client = await this.platform.getClient();
12775
- console.log(`Layout::toConfig() called!`);
12776
13003
  return client.dispatch('get-frame-snapshot', {
12777
13004
  target: this.identity
12778
13005
  });
12779
13006
  }
12780
- /**
12781
- * Retrieves the attached views in current window layout.
12782
- *
12783
- * @example
12784
- * ```js
12785
- * const layout = fin.Platform.Layout.getCurrentSync();
12786
- * const views = await layout.getCurrentViews();
12787
- * ```
12788
- */
12789
- async getCurrentViews() {
12790
- this.wire.sendAction('layout-get-views').catch((e) => {
12791
- // don't expose
12792
- });
12793
- const client = await this.platform.getClient();
12794
- const viewIdentities = await client.dispatch('get-layout-views', {
12795
- target: this.identity
12796
- });
12797
- return viewIdentities.map((identity) => this.fin.View.wrapSync(identity));
12798
- }
12799
13007
  /**
12800
13008
  * Retrieves the top level content item of the layout.
12801
13009
  *
@@ -12822,7 +13030,7 @@ class Layout extends base_1$6.Base {
12822
13030
  // don't expose
12823
13031
  });
12824
13032
  const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
12825
- const root = await client.getRoot(this.identity);
13033
+ const root = await client.getRoot();
12826
13034
  return layout_entities_1.LayoutNode.getEntity(root, client);
12827
13035
  }
12828
13036
  }
@@ -12840,11 +13048,11 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12840
13048
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
12841
13049
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12842
13050
  };
12843
- var _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager;
13051
+ var _LayoutModule_layoutInitializationAttempted;
12844
13052
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12845
13053
  Factory$2.LayoutModule = void 0;
12846
13054
  /* eslint-disable no-undef, import/prefer-default-export */
12847
- const base_1$5 = base$1;
13055
+ const base_1$5 = base;
12848
13056
  const Instance_1$2 = Instance$1;
12849
13057
  /**
12850
13058
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
@@ -12853,7 +13061,6 @@ class LayoutModule extends base_1$5.Base {
12853
13061
  constructor() {
12854
13062
  super(...arguments);
12855
13063
  _LayoutModule_layoutInitializationAttempted.set(this, false);
12856
- _LayoutModule_layoutManager.set(this, null);
12857
13064
  /**
12858
13065
  * Initialize the window's Layout.
12859
13066
  *
@@ -12903,17 +13110,7 @@ class LayoutModule extends base_1$5.Base {
12903
13110
  throw new Error('Layout for this window already initialized, please use Layout.replace call to replace the layout.');
12904
13111
  }
12905
13112
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12906
- // TODO: remove this.wire and always use this.fin
12907
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayout(this.fin, this.wire, options), "f");
12908
- // TODO: if create() wasn't called, warn!! aka, if lm.getLayouts().length === 0
12909
- const layoutInstance = await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").resolveLayout();
12910
- const layout = this.wrapSync(layoutInstance.identity);
12911
- // Adding this to the returned instance undocumented/typed for Browser
12912
- // TODO: if not overridden, then return layoutManager: layoutInstance
12913
- return Object.assign(layout, { layoutManager: layoutInstance });
12914
- };
12915
- this.getCurrentLayoutManagerSync = () => {
12916
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
13113
+ return this.wire.environment.initLayout(this.fin, this.wire, options);
12917
13114
  };
12918
13115
  }
12919
13116
  /**
@@ -13011,13 +13208,13 @@ class LayoutModule extends base_1$5.Base {
13011
13208
  }
13012
13209
  }
13013
13210
  Factory$2.LayoutModule = LayoutModule;
13014
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap();
13211
+ _LayoutModule_layoutInitializationAttempted = new WeakMap();
13015
13212
 
13016
13213
  (function (exports) {
13017
13214
  /**
13018
- * Entry point for the OpenFin `Layout` subset of the `Platform` API (`fin.Platform.Layout`).
13215
+ * Entry point for the OpenFin `Layout` namespace.
13019
13216
  *
13020
- * * {@link LayoutModule} contains static members of the `Layout` API, accessible through `fin.Platform.Layout`.
13217
+ * * {@link LayoutModule} contains static methods relating to the `Layout` type, accessible through `fin.Platform.Layout`.
13021
13218
  * * {@link Layout} describes an instance of an OpenFin Layout, e.g. as returned by `fin.Platform.Layout.getCurrent`.
13022
13219
  *
13023
13220
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -13042,12 +13239,12 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
13042
13239
  };
13043
13240
  Object.defineProperty(exports, "__esModule", { value: true });
13044
13241
  __exportStar(Factory$2, exports);
13045
- __exportStar(Instance$1, exports);
13242
+ __exportStar(Instance$1, exports);
13046
13243
  } (layout));
13047
13244
 
13048
13245
  Object.defineProperty(Factory$3, "__esModule", { value: true });
13049
13246
  Factory$3.PlatformModule = void 0;
13050
- const base_1$4 = base$1;
13247
+ const base_1$4 = base;
13051
13248
  const Instance_1$1 = Instance$2;
13052
13249
  const index_1$1 = layout;
13053
13250
  /**
@@ -13296,9 +13493,9 @@ Factory$3.PlatformModule = PlatformModule;
13296
13493
  };
13297
13494
  Object.defineProperty(exports, "__esModule", { value: true });
13298
13495
  /**
13299
- * Entry points for the OpenFin `Platform` API (`fin.Platform`)
13496
+ * Entry points for the OpenFin `Platform` API.
13300
13497
  *
13301
- * * {@link PlatformModule} contains static members of the `Platform` API, accessible through `fin.Platform`.
13498
+ * * {@link PlatformModule} contains static methods relating to the `Platform` type, accessible through `fin.Platform`.
13302
13499
  * * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
13303
13500
  *
13304
13501
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -13307,8 +13504,8 @@ Factory$3.PlatformModule = PlatformModule;
13307
13504
  * @packageDocumentation
13308
13505
  */
13309
13506
  __exportStar(Factory$3, exports);
13310
- __exportStar(Instance$2, exports);
13311
- } (platform$1));
13507
+ __exportStar(Instance$2, exports);
13508
+ } (platform));
13312
13509
 
13313
13510
  var me = {};
13314
13511
 
@@ -13316,9 +13513,9 @@ var me = {};
13316
13513
  Object.defineProperty(exports, "__esModule", { value: true });
13317
13514
  exports.getMe = exports.getBaseMe = exports.environmentUnsupportedMessage = void 0;
13318
13515
  const view_1 = requireView();
13319
- const frame_1 = frame$1;
13516
+ const frame_1 = frame;
13320
13517
  const window_1 = requireWindow();
13321
- const external_application_1 = externalApplication$1;
13518
+ const external_application_1 = externalApplication;
13322
13519
  exports.environmentUnsupportedMessage = 'You are not running in OpenFin.';
13323
13520
  function getBaseMe(entityType, uuid, name) {
13324
13521
  const entityTypeHelpers = {
@@ -13445,7 +13642,7 @@ var me = {};
13445
13642
  };
13446
13643
  }
13447
13644
  }
13448
- exports.getMe = getMe;
13645
+ exports.getMe = getMe;
13449
13646
  } (me));
13450
13647
 
13451
13648
  var interop = {};
@@ -13548,8 +13745,9 @@ function requireSessionContextGroupBroker () {
13548
13745
  this.lastContext = context;
13549
13746
  const clientSubscriptionStates = Array.from(this.clients.values());
13550
13747
  clientSubscriptionStates.forEach((client) => {
13748
+ var _a;
13551
13749
  // eslint-disable-next-line no-unused-expressions
13552
- client.contextHandlers.get(context.type)?.forEach((handlerId) => {
13750
+ (_a = client.contextHandlers.get(context.type)) === null || _a === void 0 ? void 0 : _a.forEach((handlerId) => {
13553
13751
  this.provider.dispatch(client.clientIdentity, handlerId, context);
13554
13752
  });
13555
13753
  if (client.globalHandler) {
@@ -13683,7 +13881,7 @@ var utils$1 = {};
13683
13881
  }
13684
13882
  };
13685
13883
  };
13686
- exports.wrapIntentHandler = wrapIntentHandler;
13884
+ exports.wrapIntentHandler = wrapIntentHandler;
13687
13885
  } (utils$1));
13688
13886
 
13689
13887
  var PrivateChannelProvider = {};
@@ -13978,7 +14176,7 @@ function requireInteropBroker () {
13978
14176
  hasRequiredInteropBroker = 1;
13979
14177
  Object.defineProperty(InteropBroker, "__esModule", { value: true });
13980
14178
  InteropBroker.InteropBroker = void 0;
13981
- const base_1 = base$1;
14179
+ const base_1 = base;
13982
14180
  const SessionContextGroupBroker_1 = requireSessionContextGroupBroker();
13983
14181
  const utils_1 = utils$1;
13984
14182
  const lodash_1 = require$$3;
@@ -14156,10 +14354,10 @@ function requireInteropBroker () {
14156
14354
  this.getProvider = getProvider;
14157
14355
  this.interopClients = new Map();
14158
14356
  this.contextGroupsById = new Map();
14159
- if (options?.contextGroups) {
14357
+ if (options === null || options === void 0 ? void 0 : options.contextGroups) {
14160
14358
  contextGroups = options.contextGroups;
14161
14359
  }
14162
- if (options?.logging) {
14360
+ if (options === null || options === void 0 ? void 0 : options.logging) {
14163
14361
  this.logging = options.logging;
14164
14362
  }
14165
14363
  this.intentClientMap = new Map();
@@ -14294,17 +14492,18 @@ function requireInteropBroker () {
14294
14492
  *
14295
14493
  */
14296
14494
  getCurrentContext(getCurrentContextOptions, clientIdentity) {
14495
+ var _a;
14297
14496
  this.wire.sendAction('interop-broker-get-current-context').catch((e) => {
14298
14497
  // don't expose, analytics-only call
14299
14498
  });
14300
14499
  const clientState = this.getClientState(clientIdentity);
14301
- if (!clientState?.contextGroupId) {
14500
+ if (!(clientState === null || clientState === void 0 ? void 0 : clientState.contextGroupId)) {
14302
14501
  throw new Error('You must be a member of a context group to call getCurrentContext');
14303
14502
  }
14304
14503
  const { contextGroupId } = clientState;
14305
14504
  const contextGroupState = this.contextGroupsById.get(contextGroupId);
14306
14505
  const lastContextType = this.lastContextMap.get(contextGroupId);
14307
- const contextType = getCurrentContextOptions?.contextType ?? lastContextType;
14506
+ const contextType = (_a = getCurrentContextOptions === null || getCurrentContextOptions === void 0 ? void 0 : getCurrentContextOptions.contextType) !== null && _a !== void 0 ? _a : lastContextType;
14308
14507
  return contextGroupState && contextType ? contextGroupState.get(contextType) : undefined;
14309
14508
  }
14310
14509
  /*
@@ -14955,9 +15154,10 @@ function requireInteropBroker () {
14955
15154
  }
14956
15155
  // Used to restore interop broker state in snapshots.
14957
15156
  applySnapshot(snapshot, options) {
14958
- const contextGroupStates = snapshot?.interopSnapshotDetails?.contextGroupStates;
15157
+ var _a;
15158
+ const contextGroupStates = (_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.interopSnapshotDetails) === null || _a === void 0 ? void 0 : _a.contextGroupStates;
14959
15159
  if (contextGroupStates) {
14960
- if (!options?.closeExistingWindows) {
15160
+ if (!(options === null || options === void 0 ? void 0 : options.closeExistingWindows)) {
14961
15161
  this.updateExistingClients(contextGroupStates);
14962
15162
  }
14963
15163
  this.rehydrateContextGroupStates(contextGroupStates);
@@ -15008,7 +15208,7 @@ function requireInteropBroker () {
15008
15208
  contextHandlerRegistered({ contextType, handlerId }, clientIdentity) {
15009
15209
  const handlerInfo = { contextType, handlerId };
15010
15210
  const clientState = this.getClientState(clientIdentity);
15011
- clientState?.contextHandlers.set(handlerId, handlerInfo);
15211
+ clientState === null || clientState === void 0 ? void 0 : clientState.contextHandlers.set(handlerId, handlerInfo);
15012
15212
  if (clientState && clientState.contextGroupId) {
15013
15213
  const { contextGroupId } = clientState;
15014
15214
  const contextGroupMap = this.contextGroupsById.get(contextGroupId);
@@ -15030,7 +15230,7 @@ function requireInteropBroker () {
15030
15230
  async intentHandlerRegistered(payload, clientIdentity) {
15031
15231
  const { handlerId } = payload;
15032
15232
  const clientIntentInfo = this.intentClientMap.get(clientIdentity.name);
15033
- const handlerInfo = clientIntentInfo?.get(handlerId);
15233
+ const handlerInfo = clientIntentInfo === null || clientIntentInfo === void 0 ? void 0 : clientIntentInfo.get(handlerId);
15034
15234
  if (!clientIntentInfo) {
15035
15235
  this.intentClientMap.set(clientIdentity.name, new Map());
15036
15236
  const newHandlerInfoMap = this.intentClientMap.get(clientIdentity.name);
@@ -15199,8 +15399,8 @@ function requireInteropBroker () {
15199
15399
  clientIdentity
15200
15400
  };
15201
15401
  // Only allow the client to join a contextGroup that actually exists.
15202
- if (payload?.currentContextGroup && this.contextGroupsById.has(payload.currentContextGroup)) {
15203
- clientSubscriptionState.contextGroupId = payload?.currentContextGroup;
15402
+ if ((payload === null || payload === void 0 ? void 0 : payload.currentContextGroup) && this.contextGroupsById.has(payload.currentContextGroup)) {
15403
+ clientSubscriptionState.contextGroupId = payload === null || payload === void 0 ? void 0 : payload.currentContextGroup;
15204
15404
  }
15205
15405
  this.interopClients.set(clientIdentity.endpointId, clientSubscriptionState);
15206
15406
  });
@@ -15218,15 +15418,17 @@ function requireInteropBroker () {
15218
15418
  this.clientDisconnected(clientIdentity);
15219
15419
  });
15220
15420
  channel.beforeAction(async (action, payload, clientIdentity) => {
15421
+ var _a, _b;
15221
15422
  if (!(await this.isActionAuthorized(action, payload, clientIdentity))) {
15222
15423
  throw new Error(`Action (${action}) not authorized for ${clientIdentity.uuid}, ${clientIdentity.name}`);
15223
15424
  }
15224
- if (this.logging?.beforeAction?.enabled) {
15425
+ if ((_b = (_a = this.logging) === null || _a === void 0 ? void 0 : _a.beforeAction) === null || _b === void 0 ? void 0 : _b.enabled) {
15225
15426
  console.log(action, payload, clientIdentity);
15226
15427
  }
15227
15428
  });
15228
15429
  channel.afterAction((action, payload, clientIdentity) => {
15229
- if (this.logging?.afterAction?.enabled) {
15430
+ var _a, _b;
15431
+ if ((_b = (_a = this.logging) === null || _a === void 0 ? void 0 : _a.afterAction) === null || _b === void 0 ? void 0 : _b.enabled) {
15230
15432
  console.log(action, payload, clientIdentity);
15231
15433
  }
15232
15434
  });
@@ -15308,7 +15510,7 @@ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateF
15308
15510
  };
15309
15511
  var _SessionContextGroupClient_clientPromise;
15310
15512
  Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
15311
- const base_1$3 = base$1;
15513
+ const base_1$3 = base;
15312
15514
  const utils_1$3 = utils$1;
15313
15515
  class SessionContextGroupClient extends base_1$3.Base {
15314
15516
  constructor(wire, client, id) {
@@ -15395,7 +15597,7 @@ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateF
15395
15597
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups;
15396
15598
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
15397
15599
  InteropClient$1.InteropClient = void 0;
15398
- const base_1$2 = base$1;
15600
+ const base_1$2 = base;
15399
15601
  const SessionContextGroupClient_1 = SessionContextGroupClient$1;
15400
15602
  const utils_1$2 = utils$1;
15401
15603
  /**
@@ -16075,8 +16277,9 @@ function requireOverrideCheck () {
16075
16277
  overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
16076
16278
  const InteropBroker_1 = requireInteropBroker();
16077
16279
  function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
16078
- const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
16079
- return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
16280
+ var _a, _b, _c, _d;
16281
+ const setVersion = (_c = (_b = (_a = manifest.platform) === null || _a === void 0 ? void 0 : _a.defaultViewOptions) === null || _b === void 0 ? void 0 : _b.fdc3InteropApi) !== null && _c !== void 0 ? _c : (_d = initialOptions.defaultViewOptions) === null || _d === void 0 ? void 0 : _d.fdc3InteropApi;
16282
+ return ['1.2', '2.0'].includes(setVersion !== null && setVersion !== void 0 ? setVersion : '') ? setVersion : undefined;
16080
16283
  }
16081
16284
  overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
16082
16285
  // TODO: Unit test this
@@ -16113,7 +16316,7 @@ function requireFactory () {
16113
16316
  Factory$1.InteropModule = void 0;
16114
16317
  const lodash_1 = require$$3;
16115
16318
  const inaccessibleObject_1 = inaccessibleObject;
16116
- const base_1 = base$1;
16319
+ const base_1 = base;
16117
16320
  const InteropBroker_1 = requireInteropBroker();
16118
16321
  const InteropClient_1 = InteropClient$1;
16119
16322
  const overrideCheck_1 = requireOverrideCheck();
@@ -16149,12 +16352,13 @@ function requireFactory () {
16149
16352
  * ```
16150
16353
  */
16151
16354
  async init(name, override = defaultOverride) {
16355
+ var _a;
16152
16356
  this.wire.sendAction('interop-init').catch(() => {
16153
16357
  // don't expose, analytics-only call
16154
16358
  });
16155
16359
  // Allows for manifest-level configuration, without having to override. (e.g. specifying custom context groups)
16156
16360
  const options = await this.fin.Application.getCurrentSync().getInfo();
16157
- const opts = options.initialOptions.interopBrokerConfiguration ?? {};
16361
+ const opts = (_a = options.initialOptions.interopBrokerConfiguration) !== null && _a !== void 0 ? _a : {};
16158
16362
  const objectThatThrows = (0, inaccessibleObject_1.createUnusableObject)(BrokerParamAccessError);
16159
16363
  const warningOptsClone = (0, inaccessibleObject_1.createWarningObject)(BrokerParamAccessError, (0, lodash_1.cloneDeep)(opts));
16160
16364
  let provider;
@@ -16222,9 +16426,9 @@ function requireInterop () {
16222
16426
  hasRequiredInterop = 1;
16223
16427
  (function (exports) {
16224
16428
  /**
16225
- * Entry point for the OpenFin `Interop` API (`fin.Interop`).
16429
+ * Entry point for the OpenFin Interop namespace.
16226
16430
  *
16227
- * * {@link InteropModule} contains static members of the `Interop` API (available under `fin.Interop`)
16431
+ * * {@link InteropModule} contains static members of the `Interop` namespace (available under `fin.Interop`)
16228
16432
  * * {@link InteropClient} and {@link InteropBroker} document instances of their respective classes.
16229
16433
  *
16230
16434
  * @packageDocumentation
@@ -16246,8 +16450,8 @@ function requireInterop () {
16246
16450
  Object.defineProperty(exports, "__esModule", { value: true });
16247
16451
  __exportStar(requireFactory(), exports);
16248
16452
  __exportStar(InteropClient$1, exports);
16249
- __exportStar(requireInteropBroker(), exports);
16250
- } (interop));
16453
+ __exportStar(requireInteropBroker(), exports);
16454
+ } (interop));
16251
16455
  return interop;
16252
16456
  }
16253
16457
 
@@ -16280,14 +16484,12 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
16280
16484
  Object.defineProperty(Instance, "__esModule", { value: true });
16281
16485
  Instance.SnapshotSource = void 0;
16282
16486
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
16283
- const base_1$1 = base$1;
16487
+ const base_1$1 = base;
16284
16488
  const utils_1$1 = utils;
16285
16489
  const connectionMap = new Map();
16286
16490
  /**
16287
16491
  * Enables configuring a SnapshotSource with custom getSnapshot and applySnapshot methods.
16288
16492
  *
16289
- * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
16290
- * custom snapshot implementations for legacy applications to define their own snapshot format.
16291
16493
  */
16292
16494
  class SnapshotSource extends base_1$1.Base {
16293
16495
  /**
@@ -16423,7 +16625,7 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
16423
16625
 
16424
16626
  Object.defineProperty(Factory, "__esModule", { value: true });
16425
16627
  Factory.SnapshotSourceModule = void 0;
16426
- const base_1 = base$1;
16628
+ const base_1 = base;
16427
16629
  const Instance_1 = Instance;
16428
16630
  const utils_1 = utils;
16429
16631
  /**
@@ -16433,9 +16635,6 @@ class SnapshotSourceModule extends base_1.Base {
16433
16635
  /**
16434
16636
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
16435
16637
  *
16436
- * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
16437
- * custom snapshot implementations for legacy applications to define their own snapshot format.
16438
- *
16439
16638
  * @example
16440
16639
  * ```js
16441
16640
  * const snapshotProvider = {
@@ -16451,7 +16650,6 @@ class SnapshotSourceModule extends base_1.Base {
16451
16650
  *
16452
16651
  * await fin.SnapshotSource.init(snapshotProvider);
16453
16652
  * ```
16454
- *
16455
16653
  */
16456
16654
  async init(provider) {
16457
16655
  this.wire.sendAction('snapshot-source-init').catch((e) => {
@@ -16506,9 +16704,9 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
16506
16704
 
16507
16705
  (function (exports) {
16508
16706
  /**
16509
- * Entry points for the OpenFin `SnapshotSource` API (`fin.SnapshotSource`).
16707
+ * Entry points for the OpenFin `SnapshotSource` API.
16510
16708
  *
16511
- * * {@link SnapshotSourceModule} contains static members of the `SnapshotSource` API, accessible through `fin.SnapshotSource`.
16709
+ * * {@link SnapshotSourceModule} contains static methods relating to the `SnapshotSource` type, accessible through `fin.SnapshotSource`.
16512
16710
  * * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
16513
16711
  *
16514
16712
  * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
@@ -16532,29 +16730,26 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
16532
16730
  };
16533
16731
  Object.defineProperty(exports, "__esModule", { value: true });
16534
16732
  __exportStar(Factory, exports);
16535
- __exportStar(Instance, exports);
16733
+ __exportStar(Instance, exports);
16536
16734
  } (snapshotSource));
16537
16735
 
16538
16736
  Object.defineProperty(fin, "__esModule", { value: true });
16539
16737
  fin.Fin = void 0;
16540
- const events_1$3 = require$$0;
16738
+ const events_1$3 = eventsExports;
16541
16739
  // Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
16542
- const index_1 = system$1;
16740
+ const index_1 = system;
16543
16741
  const index_2 = requireWindow();
16544
16742
  const index_3 = requireApplication();
16545
16743
  const index_4 = interappbus;
16546
16744
  const index_5 = clipboard;
16547
- const index_6 = externalApplication$1;
16548
- const index_7 = frame$1;
16549
- const index_8 = globalHotkey$1;
16745
+ const index_6 = externalApplication;
16746
+ const index_7 = frame;
16747
+ const index_8 = globalHotkey;
16550
16748
  const index_9 = requireView();
16551
- const index_10 = platform$1;
16749
+ const index_10 = platform;
16552
16750
  const me_1$1 = me;
16553
16751
  const interop_1 = requireInterop();
16554
16752
  const snapshot_source_1 = snapshotSource;
16555
- /**
16556
- * @internal
16557
- */
16558
16753
  class Fin extends events_1$3.EventEmitter {
16559
16754
  /**
16560
16755
  * @internal
@@ -16587,7 +16782,7 @@ fin.Fin = Fin;
16587
16782
  var wire = {};
16588
16783
 
16589
16784
  Object.defineProperty(wire, "__esModule", { value: true });
16590
- wire.isInternalConnectConfig = wire.isPortDiscoveryConfig = wire.isNewConnectConfig = wire.isConfigWithReceiver = wire.isRemoteConfig = wire.isExistingConnectConfig = wire.isExternalConfig = void 0;
16785
+ wire.isInternalConnectConfig = wire.isPortDiscoveryConfig = wire.isNewConnectConfig = wire.isRemoteConfig = wire.isExistingConnectConfig = wire.isExternalConfig = void 0;
16591
16786
  function isExternalConfig(config) {
16592
16787
  if (typeof config.manifestUrl === 'string') {
16593
16788
  return true;
@@ -16603,10 +16798,6 @@ function isRemoteConfig(config) {
16603
16798
  return isExistingConnectConfig(config) && typeof config.token === 'string';
16604
16799
  }
16605
16800
  wire.isRemoteConfig = isRemoteConfig;
16606
- function isConfigWithReceiver(config) {
16607
- return typeof config.receiver === 'object' && isRemoteConfig({ ...config, address: '' });
16608
- }
16609
- wire.isConfigWithReceiver = isConfigWithReceiver;
16610
16801
  function hasUuid(config) {
16611
16802
  return typeof config.uuid === 'string';
16612
16803
  }
@@ -16647,8 +16838,8 @@ var http = {};
16647
16838
  (function (exports) {
16648
16839
  Object.defineProperty(exports, "__esModule", { value: true });
16649
16840
  exports.fetchJson = exports.downloadFile = exports.fetch = exports.getRequestOptions = exports.getProxy = void 0;
16650
- const node_url_1 = require$$0$1; // This must explicitly use node builtin to avoid accidentally bundling npm:url.
16651
- const fs = require$$0$2;
16841
+ const node_url_1 = require$$0; // This must explicitly use node builtin to avoid accidentally bundling npm:url.
16842
+ const fs = require$$0$1;
16652
16843
  const getProxyVar = () => {
16653
16844
  return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy;
16654
16845
  };
@@ -16733,13 +16924,13 @@ var http = {};
16733
16924
  const res = await (0, exports.fetch)(url);
16734
16925
  return JSON.parse(res);
16735
16926
  };
16736
- exports.fetchJson = fetchJson;
16927
+ exports.fetchJson = fetchJson;
16737
16928
  } (http));
16738
16929
 
16739
16930
  Object.defineProperty(util, "__esModule", { value: true });
16740
16931
  util.resolveDir = util.first = util.resolveRuntimeVersion = util.rmDir = util.unzip = util.exists = void 0;
16741
- const path$1 = require$$0$3;
16742
- const fs$1 = require$$0$2;
16932
+ const path$1 = require$$0$2;
16933
+ const fs$1 = require$$0$1;
16743
16934
  const child_process_1$1 = require$$2;
16744
16935
  const promises_1$1 = promises;
16745
16936
  const http_1$1 = http;
@@ -16841,7 +17032,7 @@ async function resolveDir(base, paths) {
16841
17032
  util.resolveDir = resolveDir;
16842
17033
 
16843
17034
  Object.defineProperty(winLaunch, "__esModule", { value: true });
16844
- const path = require$$0$3;
17035
+ const path = require$$0$2;
16845
17036
  const child_process_1 = require$$2;
16846
17037
  const util_1 = util;
16847
17038
  function launchRVM(config, manifestLocation, namedPipeName, rvm) {
@@ -16863,7 +17054,7 @@ function launchRVM(config, manifestLocation, namedPipeName, rvm) {
16863
17054
  async function checkRvmPath() {
16864
17055
  let rvmPath = path.resolve(process.env.LOCALAPPDATA, 'OpenFin', 'OpenFinRVM.exe');
16865
17056
  if (!(await (0, util_1.exists)(rvmPath))) {
16866
- rvmPath = path.join(__dirname, '..', 'resources', 'win', 'OpenFinRVM.exe');
17057
+ rvmPath = path.join(__dirname, '..', '..', 'resources', 'win', 'OpenFinRVM.exe');
16867
17058
  }
16868
17059
  return rvmPath;
16869
17060
  }
@@ -16925,8 +17116,8 @@ function requireServices () {
16925
17116
  const startServices = async (services) => {
16926
17117
  await (0, promises_1.promiseMapSerial)(services, exports.launchService);
16927
17118
  };
16928
- exports.startServices = startServices;
16929
- } (services));
17119
+ exports.startServices = startServices;
17120
+ } (services));
16930
17121
  return services;
16931
17122
  }
16932
17123
 
@@ -16937,8 +17128,8 @@ function requireNixLaunch () {
16937
17128
  hasRequiredNixLaunch = 1;
16938
17129
  Object.defineProperty(nixLaunch, "__esModule", { value: true });
16939
17130
  nixLaunch.install = nixLaunch.getRuntimePath = nixLaunch.download = nixLaunch.getUrl = void 0;
16940
- const fs = require$$0$2;
16941
- const path = require$$0$3;
17131
+ const fs = require$$0$1;
17132
+ const path = require$$0$2;
16942
17133
  const child_process_1 = require$$2;
16943
17134
  const promises_1 = promises;
16944
17135
  const util_1 = util;
@@ -17045,8 +17236,8 @@ function requireLauncher () {
17045
17236
  if (hasRequiredLauncher) return launcher;
17046
17237
  hasRequiredLauncher = 1;
17047
17238
  Object.defineProperty(launcher, "__esModule", { value: true });
17048
- const os = require$$0$4;
17049
- const path = require$$0$3;
17239
+ const os = require$$0$3;
17240
+ const path = require$$0$2;
17050
17241
  const win_launch_1 = winLaunch;
17051
17242
  const nix_launch_1 = requireNixLaunch();
17052
17243
  class Launcher {
@@ -17121,10 +17312,10 @@ function requirePortDiscovery () {
17121
17312
  hasRequiredPortDiscovery = 1;
17122
17313
  Object.defineProperty(portDiscovery, "__esModule", { value: true });
17123
17314
  /* eslint-disable @typescript-eslint/naming-convention */
17124
- const fs = require$$0$2;
17315
+ const fs = require$$0$1;
17125
17316
  const net = require$$1;
17126
- const path = require$$0$3;
17127
- const os = require$$0$4;
17317
+ const path = require$$0$2;
17318
+ const os = require$$0$3;
17128
17319
  const timers_1 = require$$4;
17129
17320
  const wire_1 = wire;
17130
17321
  const launcher_1 = requireLauncher();
@@ -17399,17 +17590,12 @@ function requireNodeEnv () {
17399
17590
  hasRequiredNodeEnv = 1;
17400
17591
  Object.defineProperty(nodeEnv, "__esModule", { value: true });
17401
17592
  /* eslint-disable class-methods-use-this */
17402
- const fs_1 = require$$0$2;
17593
+ const fs_1 = require$$0$1;
17403
17594
  const crypto_1 = require$$1$1;
17404
- const _WS = require$$2$1;
17595
+ const WS = require$$2$1;
17405
17596
  const environment_1 = environment;
17406
17597
  const port_discovery_1 = requirePortDiscovery();
17407
17598
  const transport_errors_1 = transportErrors;
17408
- // Due to https://github.com/rollup/rollup/issues/1267, we need this guard
17409
- // to ensure the import works with and without the 'esModuleInterop' ts flag.
17410
- // This is due to our mocha tests not being compatible with esModuleInterop,
17411
- // whereas rollup enforces it.
17412
- const WS = _WS.default || _WS;
17413
17599
  class NodeEnvironment {
17414
17600
  constructor() {
17415
17601
  this.messageCounter = 0;
@@ -17484,7 +17670,7 @@ var emitterMap = {};
17484
17670
 
17485
17671
  Object.defineProperty(emitterMap, "__esModule", { value: true });
17486
17672
  emitterMap.EmitterMap = void 0;
17487
- const events_1$2 = require$$0;
17673
+ const events_1$2 = eventsExports;
17488
17674
  class EmitterMap {
17489
17675
  constructor() {
17490
17676
  this.storage = new Map();
@@ -17566,7 +17752,7 @@ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFie
17566
17752
  var _Transport_wire, _Transport_fin;
17567
17753
  Object.defineProperty(transport, "__esModule", { value: true });
17568
17754
  transport.Transport = void 0;
17569
- const events_1$1 = require$$0;
17755
+ const events_1$1 = eventsExports;
17570
17756
  const wire_1$1 = wire;
17571
17757
  const transport_errors_1$1 = transportErrors;
17572
17758
  const eventAggregator_1 = eventAggregator;
@@ -17608,13 +17794,13 @@ class Transport extends events_1$1.EventEmitter {
17608
17794
  }
17609
17795
  getFin() {
17610
17796
  if (!__classPrivateFieldGet(this, _Transport_fin, "f")) {
17611
- throw new Error('No Fin object registered for this transport');
17797
+ throw new Error("No Fin object registered for this transport");
17612
17798
  }
17613
17799
  return __classPrivateFieldGet(this, _Transport_fin, "f");
17614
17800
  }
17615
17801
  registerFin(_fin) {
17616
17802
  if (__classPrivateFieldGet(this, _Transport_fin, "f")) {
17617
- throw new Error('Fin object has already been registered for this transport');
17803
+ throw new Error("Fin object has already been registered for this transport");
17618
17804
  }
17619
17805
  __classPrivateFieldSet(this, _Transport_fin, _fin, "f");
17620
17806
  }
@@ -17623,10 +17809,6 @@ class Transport extends events_1$1.EventEmitter {
17623
17809
  return wire.shutdown();
17624
17810
  }
17625
17811
  async connect(config) {
17626
- if ((0, wire_1$1.isConfigWithReceiver)(config)) {
17627
- await __classPrivateFieldGet(this, _Transport_wire, "f").connect(config.receiver);
17628
- return this.authorize(config);
17629
- }
17630
17812
  if ((0, wire_1$1.isRemoteConfig)(config)) {
17631
17813
  return this.connectRemote(config);
17632
17814
  }
@@ -17640,14 +17822,14 @@ class Transport extends events_1$1.EventEmitter {
17640
17822
  return undefined;
17641
17823
  }
17642
17824
  async connectRemote(config) {
17643
- await __classPrivateFieldGet(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
17825
+ await __classPrivateFieldGet(this, _Transport_wire, "f").connect(config.address, this.environment.getWsConstructor());
17644
17826
  return this.authorize(config);
17645
17827
  }
17646
17828
  async connectByPort(config) {
17647
17829
  const { address, uuid } = config;
17648
17830
  const reqAuthPayload = { ...config, type: 'file-token' };
17649
17831
  const wire = __classPrivateFieldGet(this, _Transport_wire, "f");
17650
- await wire.connect(new (this.environment.getWsConstructor())(config.address));
17832
+ await wire.connect(address, this.environment.getWsConstructor());
17651
17833
  const requestExtAuthRet = await this.sendAction('request-external-authorization', {
17652
17834
  uuid,
17653
17835
  type: 'file-token'
@@ -17667,9 +17849,7 @@ class Transport extends events_1$1.EventEmitter {
17667
17849
  throw new transport_errors_1$1.RuntimeError(requestAuthRet.payload);
17668
17850
  }
17669
17851
  }
17670
- sendAction(action, payload = {}, uncorrelated = false
17671
- // specialResponse type is only used for 'requestAuthorization'
17672
- ) {
17852
+ sendAction(action, payload = {}, uncorrelated = false) {
17673
17853
  // eslint-disable-next-line @typescript-eslint/no-empty-function
17674
17854
  let cancel = () => { };
17675
17855
  // We want the callsite from the caller of this function, not from here.
@@ -17719,10 +17899,7 @@ class Transport extends events_1$1.EventEmitter {
17719
17899
  this.uncorrelatedListener = resolve;
17720
17900
  }
17721
17901
  else if (this.wireListeners.has(id)) {
17722
- handleNack({
17723
- reason: 'Duplicate handler id',
17724
- error: (0, errors_1.errorToPOJO)(new transport_errors_1$1.DuplicateCorrelationError(String(id)))
17725
- });
17902
+ handleNack({ reason: 'Duplicate handler id', error: (0, errors_1.errorToPOJO)(new transport_errors_1$1.DuplicateCorrelationError(String(id))) });
17726
17903
  }
17727
17904
  else {
17728
17905
  this.wireListeners.set(id, { resolve, handleNack });
@@ -17782,19 +17959,9 @@ _Transport_wire = new WeakMap(), _Transport_fin = new WeakMap();
17782
17959
 
17783
17960
  var websocket = {};
17784
17961
 
17785
- var messageReceiver = {};
17786
-
17787
- Object.defineProperty(messageReceiver, "__esModule", { value: true });
17788
- messageReceiver.isOpen = void 0;
17789
- function isOpen(receiver) {
17790
- return receiver.readyState === 'open' || receiver.readyState === 1;
17791
- }
17792
- messageReceiver.isOpen = isOpen;
17793
-
17794
17962
  Object.defineProperty(websocket, "__esModule", { value: true });
17795
- const events_1 = require$$0;
17963
+ const events_1 = eventsExports;
17796
17964
  const transport_errors_1 = transportErrors;
17797
- const messageReceiver_1 = messageReceiver;
17798
17965
  /* `READY_STATE` is an instance var set by `constructor` to reference the `WebTransportSocket.READY_STATE` enum.
17799
17966
  * This is syntactic sugar that makes the enum accessible through the `wire` property of the various `fin` singletons.
17800
17967
  * For example, `fin.system.wire.READY_STATE` is a shortcut to `fin.system.wire.wire.constructor.READY_STATE`.
@@ -17812,18 +17979,15 @@ var READY_STATE;
17812
17979
  class WebSocketTransport extends events_1.EventEmitter {
17813
17980
  constructor(onmessage) {
17814
17981
  super();
17815
- this.connect = (messageReceiver) => {
17982
+ this.connect = (address, WsConstructor) => {
17816
17983
  return new Promise((resolve, reject) => {
17817
- this.wire = messageReceiver;
17818
- this.wire.addEventListener('open', () => resolve());
17984
+ this.wire = new WsConstructor(address);
17985
+ this.wire.addEventListener('open', resolve);
17819
17986
  this.wire.addEventListener('error', reject);
17820
17987
  this.wire.addEventListener('message', (message) => this.onmessage.call(null, JSON.parse(message.data)));
17821
17988
  this.wire.addEventListener('close', () => {
17822
17989
  this.emit('disconnected');
17823
17990
  });
17824
- if ((0, messageReceiver_1.isOpen)(this.wire)) {
17825
- resolve();
17826
- }
17827
17991
  });
17828
17992
  };
17829
17993
  this.connectSync = () => {
@@ -17833,7 +17997,7 @@ class WebSocketTransport extends events_1.EventEmitter {
17833
17997
  }
17834
17998
  send(data, flags) {
17835
17999
  return new Promise((resolve, reject) => {
17836
- if (!(0, messageReceiver_1.isOpen)(this.wire)) {
18000
+ if (this.wire.readyState !== READY_STATE.OPEN) {
17837
18001
  reject(new transport_errors_1.DisconnectedError(READY_STATE[this.wire.readyState]));
17838
18002
  }
17839
18003
  else {
@@ -17847,7 +18011,6 @@ class WebSocketTransport extends events_1.EventEmitter {
17847
18011
  return Promise.resolve();
17848
18012
  }
17849
18013
  getPort() {
17850
- // @ts-expect-error
17851
18014
  return this.wire.url.split(':').slice(-1)[0];
17852
18015
  }
17853
18016
  }
@@ -17857,8 +18020,8 @@ var normalizeConfig$1 = {};
17857
18020
 
17858
18021
  Object.defineProperty(normalizeConfig$1, "__esModule", { value: true });
17859
18022
  normalizeConfig$1.validateConfig = normalizeConfig$1.normalizeConfig = void 0;
17860
- const fs = require$$0$2;
17861
- const node_url_1 = require$$0$1; // This must explicitly use node builtin to avoid accidentally bundling npm:url
18023
+ const fs = require$$0$1;
18024
+ const node_url_1 = require$$0; // This must explicitly use node builtin to avoid accidentally bundling npm:url
17862
18025
  const wire_1 = wire;
17863
18026
  const promises_1 = promises;
17864
18027
  const http_1 = http;
@@ -17927,9 +18090,9 @@ function requireMain () {
17927
18090
  Object.defineProperty(exports, "ChannelClient", { enumerable: true, get: function () { return client_1.ChannelClient; } });
17928
18091
  const provider_1 = provider;
17929
18092
  Object.defineProperty(exports, "ChannelProvider", { enumerable: true, get: function () { return provider_1.ChannelProvider; } });
17930
- const frame_1 = frame$1;
18093
+ const frame_1 = frame;
17931
18094
  Object.defineProperty(exports, "Frame", { enumerable: true, get: function () { return frame_1._Frame; } });
17932
- const system_1 = system$1;
18095
+ const system_1 = system;
17933
18096
  Object.defineProperty(exports, "System", { enumerable: true, get: function () { return system_1.System; } });
17934
18097
  const wire_1 = wire;
17935
18098
  const node_env_1 = requireNodeEnv();
@@ -17940,10 +18103,11 @@ function requireMain () {
17940
18103
  const environment = new node_env_1.default();
17941
18104
  // Connect to an OpenFin Runtime
17942
18105
  async function connect(config) {
18106
+ var _a;
17943
18107
  const normalized = await (0, normalize_config_1.validateConfig)(config);
17944
18108
  const wire = new transport_1.Transport(websocket_1.default, environment, {
17945
18109
  ...normalized,
17946
- name: normalized.name ?? normalized.uuid
18110
+ name: (_a = normalized.name) !== null && _a !== void 0 ? _a : normalized.uuid
17947
18111
  });
17948
18112
  await wire.connect(normalized);
17949
18113
  return new fin_1.Fin(wire);
@@ -17957,268 +18121,22 @@ function requireMain () {
17957
18121
  const pd = new port_discovery_1.default(normalized, environment);
17958
18122
  return pd.retrievePort();
17959
18123
  }
17960
- exports.launch = launch;
17961
- } (main$1));
18124
+ exports.launch = launch;
18125
+ } (main$1));
17962
18126
  return main$1;
17963
18127
  }
17964
18128
 
17965
18129
  var mainExports = requireMain();
17966
18130
 
17967
- var OpenFin$2 = {};
17968
-
17969
- var events = {};
17970
-
17971
- var application = {};
17972
-
17973
- /**
17974
- * Namespace for events that can be emitted by an {@link OpenFin.Application}. Includes events
17975
- * re-propagated from the {@link OpenFin.Window} (and, transitively, {@link OpenFin.View}) level, prefixed with `window-` (and also, if applicable, `view-`).
17976
- * For example, a view's "attached" event will fire as 'window-view-attached' at the application level.
17977
- *
17978
- * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
17979
- *
17980
- * This namespace contains only payload shapes for events that are unique to `Application`. Events that propagate to `Application` from
17981
- * child {@link OpenFin.Window windows} and {@link OpenFin.View views} are defined in the {@link OpenFin.WindowEvents} and
17982
- * {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all* application events, see {@link Application.on Application.on}.
17983
- *
17984
- * {@link ApplicationSourcedEvent Application-sourced events} (i.e. those that have not propagated from {@link OpenFin.ViewEvents Views}
17985
- * or {@link OpenFin.WindowEvents Windows} re-propagate to {@link OpenFin.SystemEvents System} with their type string prefixed with `application-`.
17986
- * {@link ApplicationWindowEvent Application events that are tied to Windows but do not propagate from them}
17987
- * are propagated to `System` without any type string prefixing.
17988
- *
17989
- * "Requested" events (e.g. {@link RunRequestedEvent}) do not propagate.
17990
- *
17991
- * @packageDocumentation
17992
- */
17993
- Object.defineProperty(application, "__esModule", { value: true });
17994
-
17995
- var base = {};
17996
-
17997
- /**
17998
- * Namespace for shared event payloads and utility types common to all event emitters.
17999
- *
18000
- * @packageDocumentation
18001
- */
18002
- Object.defineProperty(base, "__esModule", { value: true });
18003
-
18004
- var externalApplication = {};
18005
-
18006
- /**
18007
- * Namespace for events that can be transmitted by an {@link OpenFin.ExternalApplication}.
18008
- *
18009
- * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
18010
- *
18011
- * For a list of valid string keys for external application events, see {@link ExternalApplication.on ExternalApplication.on}.
18012
- *
18013
- * @packageDocumentation
18014
- */
18015
- Object.defineProperty(externalApplication, "__esModule", { value: true });
18016
-
18017
- var frame = {};
18018
-
18019
- Object.defineProperty(frame, "__esModule", { value: true });
18020
-
18021
- var globalHotkey = {};
18022
-
18023
- Object.defineProperty(globalHotkey, "__esModule", { value: true });
18024
-
18025
- var platform = {};
18026
-
18027
- /**
18028
- *
18029
- * Namespace for events that can emitted by a {@link OpenFin.Platform}.
18030
- *
18031
- * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
18032
- *
18033
- * The Platform `EventEmitter` is a superset of the {@link OpenFin.Application} `EventEmitter`,
18034
- * meaning it can listen to all {@link OpenFin.ApplicationEvents Application events} in addition to the
18035
- * Platform-specific events listed here. For a list of valid string keys for *all* platform events, see
18036
- * {@link Platform.on Platform.on}.
18037
- *
18038
- * @packageDocumentation
18039
- */
18040
- Object.defineProperty(platform, "__esModule", { value: true });
18041
-
18042
- var system = {};
18043
-
18044
- /**
18045
- * Namespace for runtime-wide OpenFin events emitted by {@link System.System}. Includes events
18046
- * re-propagated from {@link OpenFin.Application}, {@link OpenFin.Window}, and {@link OpenFin.View} (prefixed with `application-`, `window-`, and `view-`). All
18047
- * event propagations are visible at the System level. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
18048
- * transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
18049
- * of the application. For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
18050
- * will be visible as 'view-shown' at the system level, but *not* as `application-window-view-shown`.
18051
- *
18052
- * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
18053
- *
18054
- * This namespace contains only payload shapes for events that are unique to `System`. Events that propagate to `System` from
18055
- * child {@link OpenFin.Application applications}, {@link OpenFin.Window windows}, and {@link OpenFin.View views} are defined in the
18056
- * {@link OpenFin.ApplicationEvents}, {@link OpenFin.WindowEvents}, and {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all*
18057
- * system events, see {@link System.on System.on}.
18058
- *
18059
- * @packageDocumentation
18060
- */
18061
- Object.defineProperty(system, "__esModule", { value: true });
18062
-
18063
- var view = {};
18064
-
18065
- /**
18066
- * Namespace for events that can be emitted by a {@link OpenFin.View}.
18067
- *
18068
- * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
18069
- *
18070
- * This namespace contains only payload shapes for events that are unique to `View`. Events that are shared between all `WebContents`
18071
- * (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. For a list
18072
- * of valid string keys for *all* View events, see {@link View.on View.on}.
18073
- *
18074
- * View events propagate to their parent {@link OpenFin.WindowEvents Window}, {@link OpenFin.ApplicationEvents Application},
18075
- * and {@link OpenFin.SystemEvents System} with an added `viewIdentity` property and their event types prefixed with `'view-'`.
18076
- *
18077
- * @packageDocumentation
18078
- */
18079
- Object.defineProperty(view, "__esModule", { value: true });
18080
-
18081
- var webcontents = {};
18082
-
18083
- /**
18084
- * Namespace for events shared by all OpenFin WebContents elements (i.e. {@link OpenFin.Window},
18085
- * {@link OpenFin.View}).
18086
- *
18087
- * WebContents events are divided into two groups: {@link WillPropagateWebContentsEvent} and {@link NonPropagatedWebContentsEvent}. Propagating events
18088
- * will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
18089
- * parent window, and propagating events in a window will also be emitted on the window's parent {@link OpenFin.Application}.
18090
- *
18091
- * Non-propagating events will not re-emit on parent entities.
18092
- *
18093
- * @packageDocumentation
18094
- */
18095
- Object.defineProperty(webcontents, "__esModule", { value: true });
18096
-
18097
- var window$1 = {};
18098
-
18099
- /**
18100
- * Namespace for events that can be emitted by a {@link OpenFin.Window}.
18101
- *
18102
- * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
18103
- *
18104
- * This namespace contains only payload shapes for events that are unique to `Window`. Events that are shared between all `WebContents`
18105
- * (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. Events that
18106
- * propagate from `View` are defined in {@link OpenFin.ViewEvents}. For a list of valid string keys for *all* Window events, see
18107
- * {@link Window.on Window.on}
18108
- *
18109
- * {@link OpenFin.WindowEvents.WindowSourcedEvent Window-sourced events} (i.e. those that are not propagated from a
18110
- * {@link OpenFin.ViewEvents View}) propagate to their parent {@link OpenFin.ApplicationEvents Application} and
18111
- * {@link OpenFin.SystemEvents System} with their event types prefixed with `'window-'`).
18112
- *
18113
- * "Requested" events (e.g. {@link AuthRequestedEvent}) do not propagate to `System. The {@link OpenFin.WindowEvents.WindowCloseRequestedEvent}
18114
- * does not propagate at all.
18115
- *
18116
- * @packageDocumentation
18117
- */
18118
- Object.defineProperty(window$1, "__esModule", { value: true });
18119
-
18120
- /**
18121
- * Namespace for OpenFin event types. Each entity that emits OpenFin events has its own sub-namespace. Event payloads
18122
- * themselves are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
18123
- *
18124
- * #### Event emitters
18125
- *
18126
- * The following entities emit OpenFin events, and have corresponding sub-namespaces:
18127
- *
18128
- * * {@link OpenFin.Application}: {@link OpenFin.ApplicationEvents}
18129
- * * {@link OpenFin.ExternalApplication}: {@link OpenFin.ExternalApplicationEvents}
18130
- * * {@link OpenFin.Frame}: {@link OpenFin.FrameEvents}
18131
- * * {@link OpenFin.GlobalHotkey}: {@link OpenFin.GlobalHotkeyEvents}
18132
- * * {@link OpenFin.Platform}: {@link OpenFin.PlatformEvents}
18133
- * * {@link OpenFin.System}: {@link OpenFin.SystemEvents}
18134
- * * {@link OpenFin.View}: {@link OpenFin.ViewEvents}
18135
- * * {@link OpenFin.Window}: {@link OpenFin.WindowEvents}
18136
- *
18137
- * These `EventEmitter` entities share a common set of methods for interacting with the OpenFin event bus, which can be
18138
- * seen on the individual documentation pages for each entity type.
18139
- *
18140
- * Registering event handlers is an asynchronous operation. It is important to ensure that the returned Promises are awaited to reduce the
18141
- * risk of race conditions.
18142
- *
18143
- * When the `EventEmitter` receives an event from the browser process and emits on the renderer, all of the functions attached to that
18144
- * specific event are called synchronously. Any values returned by the called listeners are ignored and will be discarded. If the window document
18145
- * is destroyed by page navigation or reload, its registered event listeners will be removed.
18146
- *
18147
- * We recommend using Arrow Functions for event listeners to ensure the this scope is consistent with the original function context.
18148
- *
18149
- * Events re-propagate from smaller/more-local scopes to larger/more-global scopes. For example, an event emitted on a specific
18150
- * view will propagate to the window in which the view is embedded, and then to the application in which the window is running, and
18151
- * finally to the OpenFin runtime itself at the "system" level. For details on propagation semantics, see the namespace for
18152
- * the propagating (or propagated-to) entity.
18153
- *
18154
- * If you need the payload type for a specific type of event (especially propagated events), use the emitting topic's `Payload` generic
18155
- * (e.g. {@link WindowEvents.Payload}) with the event's `type` string. For example, the payload of
18156
- * a {@link ViewEvents.CreatedEvent} after it has propagated to its parent {@link WindowEvents Window} can be found with
18157
- * `WindowEvents.Payload<'view-created'>`.
18158
- *
18159
- * @packageDocumentation
18160
- */
18161
- Object.defineProperty(events, "__esModule", { value: true });
18162
- events.WindowEvents = events.WebContentsEvents = events.ViewEvents = events.SystemEvents = events.PlatformEvents = events.GlobalHotkeyEvents = events.FrameEvents = events.ExternalApplicationEvents = events.BaseEvents = events.ApplicationEvents = void 0;
18163
- const ApplicationEvents = application;
18164
- events.ApplicationEvents = ApplicationEvents;
18165
- const BaseEvents = base;
18166
- events.BaseEvents = BaseEvents;
18167
- const ExternalApplicationEvents = externalApplication;
18168
- events.ExternalApplicationEvents = ExternalApplicationEvents;
18169
- const FrameEvents = frame;
18170
- events.FrameEvents = FrameEvents;
18171
- const GlobalHotkeyEvents = globalHotkey;
18172
- events.GlobalHotkeyEvents = GlobalHotkeyEvents;
18173
- const PlatformEvents = platform;
18174
- events.PlatformEvents = PlatformEvents;
18175
- const SystemEvents = system;
18176
- events.SystemEvents = SystemEvents;
18177
- const ViewEvents = view;
18178
- events.ViewEvents = ViewEvents;
18179
- const WebContentsEvents = webcontents;
18180
- events.WebContentsEvents = WebContentsEvents;
18181
- const WindowEvents = window$1;
18182
- events.WindowEvents = WindowEvents;
18183
-
18184
- (function (exports) {
18185
- /**
18186
- * Top-level namespace for types referenced by the OpenFin API. Contains:
18187
- *
18188
- * * The type of the global `fin` entry point ({@link FinApi})
18189
- * * Classes that act as static namespaces returned from the `fin` global (e.g. {@link ApplicationModule}, accessible via `fin.Application`)
18190
- * * Instance classes that are returned from API calls (e.g. {@link Application}, accessible via `fin.Application.getCurrentSync()`)
18191
- * * Parameter shapes for API methods (e.g. {@link ApplicationOptions}, used in `fin.Application.start()`)
18192
- * * Event namespaces and payload union types (e.g. {@link ApplicationEvents} and {@link ApplicationEvent})
18193
- *
18194
- * @packageDocumentation
18195
- */
18196
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18197
- if (k2 === undefined) k2 = k;
18198
- var desc = Object.getOwnPropertyDescriptor(m, k);
18199
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18200
- desc = { enumerable: true, get: function() { return m[k]; } };
18201
- }
18202
- Object.defineProperty(o, k2, desc);
18203
- }) : (function(o, m, k, k2) {
18204
- if (k2 === undefined) k2 = k;
18205
- o[k2] = m[k];
18206
- }));
18207
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
18208
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18209
- };
18210
- Object.defineProperty(exports, "__esModule", { value: true });
18211
- // Deprecated shim to preserve v30 namespace names
18212
- __exportStar(events, exports);
18213
- } (OpenFin$2));
18131
+ var OpenFin$1 = {};
18214
18132
 
18215
- var OpenFin = /*@__PURE__*/getDefaultExportFromCjs(OpenFin$2);
18133
+ Object.defineProperty(OpenFin$1, "__esModule", { value: true });
18216
18134
 
18217
- var OpenFin$1 = /*#__PURE__*/_mergeNamespaces({
18135
+ var OpenFin = /*#__PURE__*/_mergeNamespaces({
18218
18136
  __proto__: null,
18219
- default: OpenFin
18220
- }, [OpenFin$2]);
18137
+ default: OpenFin$1
18138
+ }, [OpenFin$1]);
18221
18139
 
18222
18140
  exports.connect = mainExports.connect;
18223
- exports.default = OpenFin$1;
18141
+ exports.default = OpenFin;
18224
18142
  exports.launch = mainExports.launch;