@openfin/remote-adapter 45.100.71 → 45.100.73

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.
Files changed (2) hide show
  1. package/out/remote-adapter.js +410 -276
  2. package/package.json +2 -2
@@ -7,13 +7,13 @@ var crypto = require('crypto');
7
7
  var backchannel = require('./backchannel.js');
8
8
  var constants = require('./constants.js');
9
9
 
10
- var __classPrivateFieldSet$i = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10
+ var __classPrivateFieldSet$k = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11
11
  if (kind === "m") throw new TypeError("Private method is not writable");
12
12
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13
13
  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");
14
14
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15
15
  };
16
- var __classPrivateFieldGet$j = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16
+ var __classPrivateFieldGet$l = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17
17
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
18
18
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
19
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -94,9 +94,9 @@ class EmitterBase extends Base {
94
94
  this.emit = (eventType, payload, ...args) => {
95
95
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
96
96
  };
97
- this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$j(this, _EmitterBase_emitterAccessor, "f"));
97
+ this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$l(this, _EmitterBase_emitterAccessor, "f"));
98
98
  this.getOrCreateEmitter = () => {
99
- return this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$j(this, _EmitterBase_emitterAccessor, "f"));
99
+ return this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$l(this, _EmitterBase_emitterAccessor, "f"));
100
100
  };
101
101
  this.listeners = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(type) : [];
102
102
  this.listenerCount = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listenerCount(type) : 0;
@@ -134,8 +134,8 @@ class EmitterBase extends Base {
134
134
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
135
135
  return Promise.resolve();
136
136
  };
137
- __classPrivateFieldSet$i(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
138
- __classPrivateFieldSet$i(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
137
+ __classPrivateFieldSet$k(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
138
+ __classPrivateFieldSet$k(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
139
139
  }
140
140
  /**
141
141
  * Adds a listener to the end of the listeners array for the specified event.
@@ -163,7 +163,7 @@ class EmitterBase extends Base {
163
163
  */
164
164
  async once(eventType, listener, options) {
165
165
  const deregister = () => this.deregisterEventListener(eventType);
166
- __classPrivateFieldGet$j(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
166
+ __classPrivateFieldGet$l(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
167
167
  await this.registerEventListener(eventType, options, (emitter) => {
168
168
  emitter.once(eventType, deregister);
169
169
  emitter.once(eventType, listener);
@@ -194,7 +194,7 @@ class EmitterBase extends Base {
194
194
  */
195
195
  async prependOnceListener(eventType, listener, options) {
196
196
  const deregister = () => this.deregisterEventListener(eventType);
197
- __classPrivateFieldGet$j(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
197
+ __classPrivateFieldGet$l(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
198
198
  await this.registerEventListener(eventType, options, (emitter) => {
199
199
  emitter.prependOnceListener(eventType, listener);
200
200
  emitter.once(eventType, deregister);
@@ -213,7 +213,7 @@ class EmitterBase extends Base {
213
213
  const emitter = await this.deregisterEventListener(eventType, options);
214
214
  if (emitter) {
215
215
  emitter.removeListener(eventType, listener);
216
- const deregister = __classPrivateFieldGet$j(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
216
+ const deregister = __classPrivateFieldGet$l(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
217
217
  if (deregister) {
218
218
  emitter.removeListener(eventType, deregister);
219
219
  }
@@ -259,7 +259,7 @@ class EmitterBase extends Base {
259
259
  deleteEmitterIfNothingRegistered(emitter) {
260
260
  // TODO: maybe emitterMap should clean up itself..
261
261
  if (emitter.eventNames().length === 0) {
262
- this.wire.eventAggregator.delete(__classPrivateFieldGet$j(this, _EmitterBase_emitterAccessor, "f"));
262
+ this.wire.eventAggregator.delete(__classPrivateFieldGet$l(this, _EmitterBase_emitterAccessor, "f"));
263
263
  }
264
264
  }
265
265
  }
@@ -758,13 +758,13 @@ class AsyncRetryableLazy {
758
758
  }
759
759
  }
760
760
 
761
- var __classPrivateFieldSet$h = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
761
+ var __classPrivateFieldSet$j = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
762
762
  if (kind === "m") throw new TypeError("Private method is not writable");
763
763
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
764
764
  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");
765
765
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
766
766
  };
767
- var __classPrivateFieldGet$i = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
767
+ var __classPrivateFieldGet$k = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
768
768
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
769
769
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
770
770
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -944,12 +944,12 @@ class InteropBroker extends Base {
944
944
  _InteropBroker_contextGroups.set(this, void 0);
945
945
  _InteropBroker_providerPromise.set(this, void 0);
946
946
  this.getProvider = () => {
947
- return __classPrivateFieldGet$i(this, _InteropBroker_providerPromise, "f").getValue();
947
+ return __classPrivateFieldGet$k(this, _InteropBroker_providerPromise, "f").getValue();
948
948
  };
949
949
  this.interopClients = new Map();
950
950
  this.contextGroupsById = new Map();
951
- __classPrivateFieldSet$h(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
952
- __classPrivateFieldSet$h(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
951
+ __classPrivateFieldSet$j(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
952
+ __classPrivateFieldSet$j(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
953
953
  if (options?.logging) {
954
954
  this.logging = options.logging;
955
955
  }
@@ -957,7 +957,7 @@ class InteropBroker extends Base {
957
957
  this.lastContextMap = new Map();
958
958
  this.sessionContextGroupMap = new Map();
959
959
  this.privateChannelProviderMap = new Map();
960
- __classPrivateFieldSet$h(this, _InteropBroker_providerPromise, new Lazy(createProvider), "f");
960
+ __classPrivateFieldSet$j(this, _InteropBroker_providerPromise, new Lazy(createProvider), "f");
961
961
  this.setContextGroupMap();
962
962
  this.setupChannelProvider();
963
963
  }
@@ -1240,7 +1240,7 @@ class InteropBroker extends Base {
1240
1240
  // don't expose, analytics-only call
1241
1241
  });
1242
1242
  // Create copy for immutability
1243
- return __classPrivateFieldGet$i(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1243
+ return __classPrivateFieldGet$k(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1244
1244
  return { ...contextGroup };
1245
1245
  });
1246
1246
  }
@@ -1651,7 +1651,7 @@ class InteropBroker extends Base {
1651
1651
  const { fdc3Version } = payload;
1652
1652
  return {
1653
1653
  fdc3Version,
1654
- ...__classPrivateFieldGet$i(this, _InteropBroker_fdc3Info, "f"),
1654
+ ...__classPrivateFieldGet$k(this, _InteropBroker_fdc3Info, "f"),
1655
1655
  optionalFeatures: {
1656
1656
  OriginatingAppMetadata: false,
1657
1657
  UserChannelMembershipAPIs: true
@@ -7078,13 +7078,13 @@ function errorToPOJO(error) {
7078
7078
  return errorObj;
7079
7079
  }
7080
7080
 
7081
- var __classPrivateFieldSet$g = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7081
+ var __classPrivateFieldSet$i = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7082
7082
  if (kind === "m") throw new TypeError("Private method is not writable");
7083
7083
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7084
7084
  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");
7085
7085
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7086
7086
  };
7087
- var __classPrivateFieldGet$h = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7087
+ var __classPrivateFieldGet$j = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7088
7088
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7089
7089
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7090
7090
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7105,27 +7105,27 @@ class Transport extends events.EventEmitter {
7105
7105
  // Typing as unknown to avoid circular dependency, should not be used directly.
7106
7106
  _Transport_fin.set(this, void 0);
7107
7107
  this.connectSync = () => {
7108
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7108
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7109
7109
  wire.connectSync();
7110
7110
  };
7111
7111
  // This function is only used in our tests.
7112
7112
  this.getPort = () => {
7113
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7113
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7114
7114
  return wire.getPort();
7115
7115
  };
7116
- __classPrivateFieldSet$g(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7116
+ __classPrivateFieldSet$i(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7117
7117
  this.environment = environment;
7118
- __classPrivateFieldSet$g(this, _Transport_analyticsEnabled, config.apiDiagnostics !== false, "f");
7119
- this.sendRaw = __classPrivateFieldGet$h(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$h(this, _Transport_wire, "f"));
7118
+ __classPrivateFieldSet$i(this, _Transport_analyticsEnabled, config.apiDiagnostics !== false, "f");
7119
+ this.sendRaw = __classPrivateFieldGet$j(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$j(this, _Transport_wire, "f"));
7120
7120
  this.registerMessageHandler(this.handleMessage.bind(this));
7121
- __classPrivateFieldGet$h(this, _Transport_wire, "f").on('disconnected', () => {
7121
+ __classPrivateFieldGet$j(this, _Transport_wire, "f").on('disconnected', () => {
7122
7122
  for (const [, { handleNack }] of this.wireListeners) {
7123
7123
  handleNack({ reason: 'Remote connection has closed' });
7124
7124
  }
7125
7125
  this.wireListeners.clear();
7126
- clearTimeout(__classPrivateFieldGet$h(this, _Transport_analyticsFlushTimeout, "f"));
7127
- __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, undefined, "f");
7128
- __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").clear();
7126
+ clearTimeout(__classPrivateFieldGet$j(this, _Transport_analyticsFlushTimeout, "f"));
7127
+ __classPrivateFieldSet$i(this, _Transport_analyticsFlushTimeout, undefined, "f");
7128
+ __classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").clear();
7129
7129
  this.emit('disconnected');
7130
7130
  });
7131
7131
  const { uuid, name } = config;
@@ -7133,36 +7133,36 @@ class Transport extends events.EventEmitter {
7133
7133
  this.me = getBaseMe(entityType, uuid, name);
7134
7134
  }
7135
7135
  getFin() {
7136
- if (!__classPrivateFieldGet$h(this, _Transport_fin, "f")) {
7136
+ if (!__classPrivateFieldGet$j(this, _Transport_fin, "f")) {
7137
7137
  throw new Error('No Fin object registered for this transport');
7138
7138
  }
7139
- return __classPrivateFieldGet$h(this, _Transport_fin, "f");
7139
+ return __classPrivateFieldGet$j(this, _Transport_fin, "f");
7140
7140
  }
7141
7141
  registerFin(_fin) {
7142
- if (__classPrivateFieldGet$h(this, _Transport_fin, "f")) {
7142
+ if (__classPrivateFieldGet$j(this, _Transport_fin, "f")) {
7143
7143
  throw new Error('Fin object has already been registered for this transport');
7144
7144
  }
7145
- __classPrivateFieldSet$g(this, _Transport_fin, _fin, "f");
7145
+ __classPrivateFieldSet$i(this, _Transport_fin, _fin, "f");
7146
7146
  }
7147
7147
  recordAnalytic(action) {
7148
- if (!__classPrivateFieldGet$h(this, _Transport_analyticsEnabled, "f"))
7148
+ if (!__classPrivateFieldGet$j(this, _Transport_analyticsEnabled, "f"))
7149
7149
  return;
7150
- __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").set(action, (__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").get(action) ?? 0) + 1);
7151
- if (__classPrivateFieldGet$h(this, _Transport_analyticsFlushTimeout, "f") === undefined) {
7152
- const timeout = setTimeout(() => __classPrivateFieldGet$h(this, _Transport_instances, "m", _Transport_flushAnalytics).call(this), 30000);
7150
+ __classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").set(action, (__classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").get(action) ?? 0) + 1);
7151
+ if (__classPrivateFieldGet$j(this, _Transport_analyticsFlushTimeout, "f") === undefined) {
7152
+ const timeout = setTimeout(() => __classPrivateFieldGet$j(this, _Transport_instances, "m", _Transport_flushAnalytics).call(this), 30000);
7153
7153
  if (typeof timeout === 'object' && timeout !== null) {
7154
7154
  timeout.unref?.();
7155
7155
  }
7156
- __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, timeout, "f");
7156
+ __classPrivateFieldSet$i(this, _Transport_analyticsFlushTimeout, timeout, "f");
7157
7157
  }
7158
7158
  }
7159
7159
  shutdown() {
7160
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7160
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7161
7161
  return wire.shutdown();
7162
7162
  }
7163
7163
  async connect(config) {
7164
7164
  if (isConfigWithReceiver(config)) {
7165
- await __classPrivateFieldGet$h(this, _Transport_wire, "f").connect(config.receiver);
7165
+ await __classPrivateFieldGet$j(this, _Transport_wire, "f").connect(config.receiver);
7166
7166
  return this.authorize(config);
7167
7167
  }
7168
7168
  if (isRemoteConfig(config)) {
@@ -7178,13 +7178,13 @@ class Transport extends events.EventEmitter {
7178
7178
  return undefined;
7179
7179
  }
7180
7180
  async connectRemote(config) {
7181
- await __classPrivateFieldGet$h(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7181
+ await __classPrivateFieldGet$j(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7182
7182
  return this.authorize(config);
7183
7183
  }
7184
7184
  async connectByPort(config) {
7185
7185
  const { address, uuid } = config;
7186
7186
  const reqAuthPayload = { ...config, type: 'file-token' };
7187
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7187
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7188
7188
  await wire.connect(new (this.environment.getWsConstructor())(config.address));
7189
7189
  const requestExtAuthRet = await this.sendAction('request-external-authorization', {
7190
7190
  uuid,
@@ -7220,7 +7220,7 @@ class Transport extends events.EventEmitter {
7220
7220
  payload,
7221
7221
  messageId
7222
7222
  };
7223
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7223
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7224
7224
  this.addWireListener(messageId, resolve, (payload) => this.nackHandler(payload, reject, callSites), uncorrelated);
7225
7225
  return wire.send(msg).catch(reject);
7226
7226
  });
@@ -7242,7 +7242,7 @@ class Transport extends events.EventEmitter {
7242
7242
  const resolver = (data) => {
7243
7243
  resolve(data.payload);
7244
7244
  };
7245
- const wire = __classPrivateFieldGet$h(this, _Transport_wire, "f");
7245
+ const wire = __classPrivateFieldGet$j(this, _Transport_wire, "f");
7246
7246
  return wire
7247
7247
  .send(origData)
7248
7248
  .then(() => this.addWireListener(id, resolver, (payload) => this.nackHandler(payload, reject), false))
@@ -7319,11 +7319,11 @@ class Transport extends events.EventEmitter {
7319
7319
  }
7320
7320
  }
7321
7321
  _Transport_wire = new WeakMap(), _Transport_analyticsEnabled = new WeakMap(), _Transport_analyticsBuffer = new WeakMap(), _Transport_analyticsFlushTimeout = new WeakMap(), _Transport_fin = new WeakMap(), _Transport_instances = new WeakSet(), _Transport_flushAnalytics = function _Transport_flushAnalytics() {
7322
- __classPrivateFieldSet$g(this, _Transport_analyticsFlushTimeout, undefined, "f");
7323
- if (__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").size === 0)
7322
+ __classPrivateFieldSet$i(this, _Transport_analyticsFlushTimeout, undefined, "f");
7323
+ if (__classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").size === 0)
7324
7324
  return;
7325
- const counts = Object.fromEntries(__classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f"));
7326
- __classPrivateFieldGet$h(this, _Transport_analyticsBuffer, "f").clear();
7325
+ const counts = Object.fromEntries(__classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f"));
7326
+ __classPrivateFieldGet$j(this, _Transport_analyticsBuffer, "f").clear();
7327
7327
  this.sendAction('send-analytics-batch', { counts }).catch(() => {
7328
7328
  // analytics flush failure is non-fatal, counts are already cleared
7329
7329
  });
@@ -7563,13 +7563,15 @@ class System extends EmitterBase {
7563
7563
  * * cookies: browser [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
7564
7564
  * * localStorage: browser data that can be used across sessions ([local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage))
7565
7565
  * * appcache: html5 [application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache)
7566
+ * * windowState: clears data written for windows using `saveWindowState`; after clearing, previously saved bounds and state will not be restored until new state is written
7566
7567
  * @example
7567
7568
  * ```js
7568
7569
  * const clearCacheOptions = {
7569
7570
  * appcache: true,
7570
7571
  * cache: true,
7571
7572
  * cookies: true,
7572
- * localStorage: true
7573
+ * localStorage: true,
7574
+ * windowState: true
7573
7575
  * };
7574
7576
  * fin.System.clearCache(clearCacheOptions).then(() => console.log('Cache cleared')).catch(err => console.log(err));
7575
7577
  * ```
@@ -7598,12 +7600,16 @@ class System extends EmitterBase {
7598
7600
  *
7599
7601
  * @param options - Optional configuration for what data to clear
7600
7602
  *
7603
+ * @remarks Set `windowState: true` to also clear data written for windows using `saveWindowState`.
7604
+ * After this data is cleared, previously saved bounds and state will not be restored until new state is written again.
7605
+ *
7601
7606
  * @example
7602
7607
  * ```js
7603
7608
  * // Clear only cookies and localStorage for a specific origin
7604
7609
  * await fin.System.clearCacheData({
7605
7610
  * dataTypes: ['cookies', 'localStorage'],
7606
- * origins: ['http://localhost:8081']
7611
+ * origins: ['http://localhost:8081'],
7612
+ * windowState: true
7607
7613
  * });
7608
7614
  *
7609
7615
  * // Clear everything except for a specific origin
@@ -9948,12 +9954,12 @@ let ChannelError$1 = class ChannelError extends Error {
9948
9954
  }
9949
9955
  };
9950
9956
 
9951
- var __classPrivateFieldGet$g = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9957
+ var __classPrivateFieldGet$i = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9952
9958
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9953
9959
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
9954
9960
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
9955
9961
  };
9956
- var __classPrivateFieldSet$f = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9962
+ var __classPrivateFieldSet$h = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9957
9963
  if (kind === "m") throw new TypeError("Private method is not writable");
9958
9964
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9959
9965
  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");
@@ -9992,7 +9998,7 @@ class ChannelClient extends ChannelBase {
9992
9998
  static closeChannelByEndpointId(id) {
9993
9999
  const channel = channelClientsByEndpointId.get(id);
9994
10000
  if (channel) {
9995
- __classPrivateFieldGet$g(channel, _ChannelClient_close, "f").call(channel);
10001
+ __classPrivateFieldGet$i(channel, _ChannelClient_close, "f").call(channel);
9996
10002
  }
9997
10003
  }
9998
10004
  /**
@@ -10003,7 +10009,7 @@ class ChannelClient extends ChannelBase {
10003
10009
  for (const channelClient of channelClientsByEndpointId.values()) {
10004
10010
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
10005
10011
  channelClient.disconnectListener(eventPayload);
10006
- __classPrivateFieldGet$g(channelClient, _ChannelClient_close, "f").call(channelClient);
10012
+ __classPrivateFieldGet$i(channelClient, _ChannelClient_close, "f").call(channelClient);
10007
10013
  }
10008
10014
  }
10009
10015
  }
@@ -10018,12 +10024,12 @@ class ChannelClient extends ChannelBase {
10018
10024
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
10019
10025
  _ChannelClient_close.set(this, () => {
10020
10026
  channelClientsByEndpointId.delete(this.endpointId);
10021
- __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").close();
10027
+ __classPrivateFieldGet$i(this, _ChannelClient_strategy, "f").close();
10022
10028
  });
10023
- __classPrivateFieldSet$f(this, _ChannelClient_protectedObj, new ProtectedItems(routingInfo, close), "f");
10029
+ __classPrivateFieldSet$h(this, _ChannelClient_protectedObj, new ProtectedItems(routingInfo, close), "f");
10024
10030
  this.disconnectListener = () => undefined;
10025
10031
  this.endpointId = routingInfo.endpointId;
10026
- __classPrivateFieldSet$f(this, _ChannelClient_strategy, strategy, "f");
10032
+ __classPrivateFieldSet$h(this, _ChannelClient_strategy, strategy, "f");
10027
10033
  channelClientsByEndpointId.set(this.endpointId, this);
10028
10034
  strategy.receive(this.processAction);
10029
10035
  }
@@ -10031,7 +10037,7 @@ class ChannelClient extends ChannelBase {
10031
10037
  * a read-only provider identity
10032
10038
  */
10033
10039
  get providerIdentity() {
10034
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
10040
+ const protectedObj = __classPrivateFieldGet$i(this, _ChannelClient_protectedObj, "f");
10035
10041
  return protectedObj.providerIdentity;
10036
10042
  }
10037
10043
  /**
@@ -10060,9 +10066,9 @@ class ChannelClient extends ChannelBase {
10060
10066
  * ```
10061
10067
  */
10062
10068
  async dispatch(action, payload) {
10063
- if (__classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10069
+ if (__classPrivateFieldGet$i(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10064
10070
  const callSites = RuntimeError.getCallSite();
10065
- return __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10071
+ return __classPrivateFieldGet$i(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10066
10072
  throw new ChannelError$1(e, action, payload, callSites);
10067
10073
  });
10068
10074
  }
@@ -10114,10 +10120,10 @@ class ChannelClient extends ChannelBase {
10114
10120
  */
10115
10121
  async disconnect() {
10116
10122
  await this.sendDisconnectAction();
10117
- __classPrivateFieldGet$g(this, _ChannelClient_close, "f").call(this);
10123
+ __classPrivateFieldGet$i(this, _ChannelClient_close, "f").call(this);
10118
10124
  }
10119
10125
  async sendDisconnectAction() {
10120
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
10126
+ const protectedObj = __classPrivateFieldGet$i(this, _ChannelClient_protectedObj, "f");
10121
10127
  await protectedObj.close();
10122
10128
  }
10123
10129
  /**
@@ -10140,13 +10146,13 @@ function exhaustiveCheck(value, allowed) {
10140
10146
  throw new Error(`Unsupported value: ${value}${allowed ? `\n Supported values are: ${allowed.join('')}` : ''}`);
10141
10147
  }
10142
10148
 
10143
- var __classPrivateFieldSet$e = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10149
+ var __classPrivateFieldSet$g = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10144
10150
  if (kind === "m") throw new TypeError("Private method is not writable");
10145
10151
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10146
10152
  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");
10147
10153
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10148
10154
  };
10149
- var __classPrivateFieldGet$f = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10155
+ var __classPrivateFieldGet$h = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10150
10156
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10151
10157
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10152
10158
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10169,7 +10175,7 @@ class ClassicStrategy {
10169
10175
  // connection problems occur
10170
10176
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
10171
10177
  this.send = async (endpointId, action, payload) => {
10172
- const to = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10178
+ const to = __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10173
10179
  if (!to) {
10174
10180
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
10175
10181
  }
@@ -10181,13 +10187,13 @@ class ClassicStrategy {
10181
10187
  }
10182
10188
  delete cleanId.isLocalEndpointId;
10183
10189
  // grab the promise before awaiting it to save in our pending messages map
10184
- const p = __classPrivateFieldGet$f(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10190
+ const p = __classPrivateFieldGet$h(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10185
10191
  ...cleanId,
10186
10192
  providerIdentity: this.providerIdentity,
10187
10193
  action,
10188
10194
  payload
10189
10195
  });
10190
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10196
+ __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10191
10197
  const raw = await p
10192
10198
  .catch((error) => {
10193
10199
  if ('cause' in error) {
@@ -10197,16 +10203,16 @@ class ClassicStrategy {
10197
10203
  })
10198
10204
  .finally(() => {
10199
10205
  // clean up the pending promise
10200
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10206
+ __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10201
10207
  });
10202
10208
  return raw.payload.data.result;
10203
10209
  };
10204
10210
  this.close = async () => {
10205
10211
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
10206
- [...__classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10207
- __classPrivateFieldSet$e(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10212
+ [...__classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10213
+ __classPrivateFieldSet$g(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10208
10214
  };
10209
- __classPrivateFieldSet$e(this, _ClassicStrategy_wire, wire, "f");
10215
+ __classPrivateFieldSet$g(this, _ClassicStrategy_wire, wire, "f");
10210
10216
  }
10211
10217
  onEndpointDisconnect(endpointId, listener) {
10212
10218
  // Never fires for 'classic'.
@@ -10215,20 +10221,20 @@ class ClassicStrategy {
10215
10221
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
10216
10222
  }
10217
10223
  async closeEndpoint(endpointId) {
10218
- const id = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10219
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10220
- const pendingSet = __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10224
+ const id = __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10225
+ __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10226
+ const pendingSet = __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10221
10227
  pendingSet?.forEach((p) => {
10222
10228
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
10223
10229
  p.cancel(new Error(errorMsg));
10224
10230
  });
10225
10231
  }
10226
10232
  isEndpointConnected(endpointId) {
10227
- return __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10233
+ return __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10228
10234
  }
10229
10235
  addEndpoint(endpointId, payload) {
10230
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10231
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10236
+ __classPrivateFieldGet$h(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10237
+ __classPrivateFieldGet$h(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10232
10238
  }
10233
10239
  isValidEndpointPayload(payload) {
10234
10240
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -10239,12 +10245,12 @@ _ClassicStrategy_wire = new WeakMap(), _ClassicStrategy_endpointIdentityMap = ne
10239
10245
  // Arbitrarily starting at 5 to leave the door open to backfilling pre endpointId etc.
10240
10246
  const ClassicInfo = { version: 5, minimumVersion: 0, type: 'classic' };
10241
10247
 
10242
- var __classPrivateFieldGet$e = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10248
+ var __classPrivateFieldGet$g = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10243
10249
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10244
10250
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10245
10251
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10246
10252
  };
10247
- var __classPrivateFieldSet$d = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10253
+ var __classPrivateFieldSet$f = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10248
10254
  if (kind === "m") throw new TypeError("Private method is not writable");
10249
10255
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10250
10256
  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");
@@ -10275,8 +10281,8 @@ class RTCEndpoint {
10275
10281
  if (this.rtc.rtcClient.connectionState !== 'connected') {
10276
10282
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
10277
10283
  this.close();
10278
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
10279
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
10284
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f")) {
10285
+ __classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f").call(this);
10280
10286
  }
10281
10287
  }
10282
10288
  };
@@ -10324,9 +10330,9 @@ class RTCEndpoint {
10324
10330
  data = new TextDecoder().decode(e.data);
10325
10331
  }
10326
10332
  const { messageId, action, payload } = JSON.parse(data);
10327
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
10333
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_processAction, "f")) {
10328
10334
  try {
10329
- const res = await __classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10335
+ const res = await __classPrivateFieldGet$g(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10330
10336
  this.rtc.channels.response.send(JSON.stringify({
10331
10337
  messageId,
10332
10338
  payload: res,
@@ -10360,25 +10366,25 @@ class RTCEndpoint {
10360
10366
  datachannel.onclose = (e) => {
10361
10367
  [...this.responseMap.values()].forEach((promise) => promise.reject(new Error('RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.')));
10362
10368
  this.close();
10363
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
10364
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
10369
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f")) {
10370
+ __classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f").call(this);
10365
10371
  }
10366
10372
  };
10367
10373
  });
10368
10374
  }
10369
10375
  onDisconnect(listener) {
10370
- if (!__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
10371
- __classPrivateFieldSet$d(this, _RTCEndpoint_disconnectListener, listener, "f");
10376
+ if (!__classPrivateFieldGet$g(this, _RTCEndpoint_disconnectListener, "f")) {
10377
+ __classPrivateFieldSet$f(this, _RTCEndpoint_disconnectListener, listener, "f");
10372
10378
  }
10373
10379
  else {
10374
10380
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
10375
10381
  }
10376
10382
  }
10377
10383
  receive(listener) {
10378
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
10384
+ if (__classPrivateFieldGet$g(this, _RTCEndpoint_processAction, "f")) {
10379
10385
  throw new Error('You have already set a listener for this RTC Endpoint.');
10380
10386
  }
10381
- __classPrivateFieldSet$d(this, _RTCEndpoint_processAction, listener, "f");
10387
+ __classPrivateFieldSet$f(this, _RTCEndpoint_processAction, listener, "f");
10382
10388
  }
10383
10389
  get connected() {
10384
10390
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -10386,12 +10392,12 @@ class RTCEndpoint {
10386
10392
  }
10387
10393
  _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = new WeakMap();
10388
10394
 
10389
- var __classPrivateFieldGet$d = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10395
+ var __classPrivateFieldGet$f = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10390
10396
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10391
10397
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10392
10398
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10393
10399
  };
10394
- var __classPrivateFieldSet$c = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10400
+ var __classPrivateFieldSet$e = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10395
10401
  if (kind === "m") throw new TypeError("Private method is not writable");
10396
10402
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10397
10403
  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");
@@ -10410,11 +10416,11 @@ class EndpointStrategy {
10410
10416
  return this.getEndpointById(endpointId).send(action, payload);
10411
10417
  };
10412
10418
  this.close = async () => {
10413
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
10414
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10415
- __classPrivateFieldSet$c(this, _EndpointStrategy_endpointMap, new Map(), "f");
10419
+ if (__classPrivateFieldGet$f(this, _EndpointStrategy_connected, "f")) {
10420
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10421
+ __classPrivateFieldSet$e(this, _EndpointStrategy_endpointMap, new Map(), "f");
10416
10422
  }
10417
- __classPrivateFieldSet$c(this, _EndpointStrategy_connected, false, "f");
10423
+ __classPrivateFieldSet$e(this, _EndpointStrategy_connected, false, "f");
10418
10424
  };
10419
10425
  this.isValidEndpointPayload = validateEndpoint;
10420
10426
  }
@@ -10422,39 +10428,39 @@ class EndpointStrategy {
10422
10428
  this.getEndpointById(endpointId).onDisconnect(listener);
10423
10429
  }
10424
10430
  receive(listener) {
10425
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
10431
+ if (__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f")) {
10426
10432
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
10427
10433
  }
10428
- __classPrivateFieldSet$c(this, _EndpointStrategy_processAction, listener, "f");
10434
+ __classPrivateFieldSet$e(this, _EndpointStrategy_processAction, listener, "f");
10429
10435
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10430
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")));
10436
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f")));
10431
10437
  }
10432
10438
  getEndpointById(endpointId) {
10433
- const endpoint = __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10439
+ const endpoint = __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10434
10440
  if (!endpoint) {
10435
10441
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
10436
10442
  }
10437
10443
  return endpoint;
10438
10444
  }
10439
10445
  get connected() {
10440
- return __classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f");
10446
+ return __classPrivateFieldGet$f(this, _EndpointStrategy_connected, "f");
10441
10447
  }
10442
10448
  isEndpointConnected(endpointId) {
10443
- return __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10449
+ return __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10444
10450
  }
10445
10451
  addEndpoint(endpointId, payload) {
10446
- if (!__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
10452
+ if (!__classPrivateFieldGet$f(this, _EndpointStrategy_connected, "f")) {
10447
10453
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
10448
10454
  return;
10449
10455
  }
10450
10456
  const clientStrat = new this.EndpointType(payload);
10451
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
10452
- clientStrat.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f"));
10457
+ if (__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f")) {
10458
+ clientStrat.receive(__classPrivateFieldGet$f(this, _EndpointStrategy_processAction, "f"));
10453
10459
  }
10454
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10460
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10455
10461
  }
10456
10462
  async closeEndpoint(endpointId) {
10457
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10463
+ __classPrivateFieldGet$f(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10458
10464
  }
10459
10465
  }
10460
10466
  _EndpointStrategy_processAction = new WeakMap(), _EndpointStrategy_endpointMap = new WeakMap(), _EndpointStrategy_connected = new WeakMap();
@@ -10615,12 +10621,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
10615
10621
  return meetsMinimumRuntimeVersion(runtimeVersion, minVersion);
10616
10622
  }
10617
10623
 
10618
- var __classPrivateFieldGet$c = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10624
+ var __classPrivateFieldGet$e = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10619
10625
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10620
10626
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10621
10627
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10622
10628
  };
10623
- var __classPrivateFieldSet$b = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10629
+ var __classPrivateFieldSet$d = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10624
10630
  if (kind === "m") throw new TypeError("Private method is not writable");
10625
10631
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10626
10632
  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");
@@ -10658,19 +10664,19 @@ class ChannelProvider extends ChannelBase {
10658
10664
  * a read-only array containing all the identities of connecting clients.
10659
10665
  */
10660
10666
  get connections() {
10661
- return [...__classPrivateFieldGet$c(this, _ChannelProvider_connections, "f")];
10667
+ return [...__classPrivateFieldGet$e(this, _ChannelProvider_connections, "f")];
10662
10668
  }
10663
10669
  static handleClientDisconnection(channel, payload) {
10664
10670
  if (payload?.endpointId) {
10665
10671
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
10666
- __classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10672
+ __classPrivateFieldGet$e(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10667
10673
  }
10668
10674
  else {
10669
10675
  // this is here to support older runtimes that did not have endpointId
10670
10676
  const multipleRemoves = channel.connections.filter((identity) => {
10671
10677
  return identity.uuid === payload.uuid && identity.name === payload.name;
10672
10678
  });
10673
- multipleRemoves.forEach(__classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f"));
10679
+ multipleRemoves.forEach(__classPrivateFieldGet$e(channel, _ChannelProvider_removeEndpoint, "f"));
10674
10680
  }
10675
10681
  channel.disconnectListener(payload);
10676
10682
  }
@@ -10687,8 +10693,8 @@ class ChannelProvider extends ChannelBase {
10687
10693
  _ChannelProvider_strategy.set(this, void 0);
10688
10694
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
10689
10695
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
10690
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
10691
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, remainingConnections, "f");
10696
+ __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
10697
+ __classPrivateFieldSet$d(this, _ChannelProvider_connections, remainingConnections, "f");
10692
10698
  });
10693
10699
  // Must be bound.
10694
10700
  this.processAction = async (action, payload, senderIdentity) => {
@@ -10702,17 +10708,17 @@ class ChannelProvider extends ChannelBase {
10702
10708
  return super.processAction(action, payload, senderIdentity);
10703
10709
  };
10704
10710
  _ChannelProvider_close.set(this, () => {
10705
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").close();
10711
+ __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").close();
10706
10712
  const remove = ChannelProvider.removalMap.get(this);
10707
10713
  if (remove) {
10708
10714
  remove();
10709
10715
  }
10710
10716
  });
10711
- __classPrivateFieldSet$b(this, _ChannelProvider_protectedObj, new ProtectedItems(providerIdentity, close), "f");
10717
+ __classPrivateFieldSet$d(this, _ChannelProvider_protectedObj, new ProtectedItems(providerIdentity, close), "f");
10712
10718
  this.connectListener = () => undefined;
10713
10719
  this.disconnectListener = () => undefined;
10714
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
10715
- __classPrivateFieldSet$b(this, _ChannelProvider_strategy, strategy, "f");
10720
+ __classPrivateFieldSet$d(this, _ChannelProvider_connections, [], "f");
10721
+ __classPrivateFieldSet$d(this, _ChannelProvider_strategy, strategy, "f");
10716
10722
  strategy.receive(this.processAction);
10717
10723
  }
10718
10724
  /**
@@ -10743,16 +10749,16 @@ class ChannelProvider extends ChannelBase {
10743
10749
  */
10744
10750
  dispatch(to, action, payload) {
10745
10751
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
10746
- if (endpointId && __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
10752
+ if (endpointId && __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
10747
10753
  const callSites = RuntimeError.getCallSite();
10748
- return __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
10754
+ return __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
10749
10755
  throw new ChannelError$1(e, action, payload, callSites);
10750
10756
  });
10751
10757
  }
10752
10758
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
10753
10759
  }
10754
10760
  async processConnection(senderId, payload) {
10755
- __classPrivateFieldGet$c(this, _ChannelProvider_connections, "f").push(senderId);
10761
+ __classPrivateFieldGet$e(this, _ChannelProvider_connections, "f").push(senderId);
10756
10762
  return this.connectListener(senderId, payload);
10757
10763
  }
10758
10764
  /**
@@ -10775,7 +10781,7 @@ class ChannelProvider extends ChannelBase {
10775
10781
  * ```
10776
10782
  */
10777
10783
  publish(action, payload) {
10778
- return this.connections.map((to) => __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
10784
+ return this.connections.map((to) => __classPrivateFieldGet$e(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
10779
10785
  }
10780
10786
  /**
10781
10787
  * Register a listener that is called on every new client connection.
@@ -10849,11 +10855,11 @@ class ChannelProvider extends ChannelBase {
10849
10855
  * ```
10850
10856
  */
10851
10857
  async destroy() {
10852
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
10858
+ const protectedObj = __classPrivateFieldGet$e(this, _ChannelProvider_protectedObj, "f");
10853
10859
  protectedObj.providerIdentity;
10854
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
10860
+ __classPrivateFieldSet$d(this, _ChannelProvider_connections, [], "f");
10855
10861
  await protectedObj.close();
10856
- __classPrivateFieldGet$c(this, _ChannelProvider_close, "f").call(this);
10862
+ __classPrivateFieldGet$e(this, _ChannelProvider_close, "f").call(this);
10857
10863
  }
10858
10864
  /**
10859
10865
  * Returns an array with info on every Client connected to the Provider
@@ -10923,7 +10929,7 @@ class ChannelProvider extends ChannelBase {
10923
10929
  getEndpointIdForOpenFinId(clientIdentity, action) {
10924
10930
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
10925
10931
  if (matchingConnections.length >= 2) {
10926
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
10932
+ const protectedObj = __classPrivateFieldGet$e(this, _ChannelProvider_protectedObj, "f");
10927
10933
  const { uuid, name } = clientIdentity;
10928
10934
  const providerUuid = protectedObj?.providerIdentity.uuid;
10929
10935
  const providerName = protectedObj?.providerIdentity.name;
@@ -11117,13 +11123,13 @@ class CombinedStrategy {
11117
11123
  }
11118
11124
  }
11119
11125
 
11120
- var __classPrivateFieldSet$a = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11126
+ var __classPrivateFieldSet$c = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11121
11127
  if (kind === "m") throw new TypeError("Private method is not writable");
11122
11128
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11123
11129
  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");
11124
11130
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11125
11131
  };
11126
- var __classPrivateFieldGet$b = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11132
+ var __classPrivateFieldGet$d = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11127
11133
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11128
11134
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11129
11135
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11158,8 +11164,8 @@ class ConnectionManager extends Base {
11158
11164
  };
11159
11165
  this.providerMap = new Map();
11160
11166
  this.protocolManager = new ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
11161
- __classPrivateFieldSet$a(this, _ConnectionManager_messageReceiver, new MessageReceiver(wire), "f");
11162
- __classPrivateFieldSet$a(this, _ConnectionManager_rtcConnectionManager, new RTCICEManager(wire), "f");
11167
+ __classPrivateFieldSet$c(this, _ConnectionManager_messageReceiver, new MessageReceiver(wire), "f");
11168
+ __classPrivateFieldSet$c(this, _ConnectionManager_rtcConnectionManager, new RTCICEManager(wire), "f");
11163
11169
  wire.registerMessageHandler(this.onmessage.bind(this));
11164
11170
  }
11165
11171
  createProvider(options, providerIdentity) {
@@ -11170,7 +11176,7 @@ class ConnectionManager extends Base {
11170
11176
  case 'rtc':
11171
11177
  return new RTCStrategy();
11172
11178
  case 'classic':
11173
- return new ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"),
11179
+ return new ClassicStrategy(this.wire, __classPrivateFieldGet$d(this, _ConnectionManager_messageReceiver, "f"),
11174
11180
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
11175
11181
  providerIdentity.channelId, providerIdentity);
11176
11182
  default:
@@ -11206,7 +11212,7 @@ class ConnectionManager extends Base {
11206
11212
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
11207
11213
  switch (type) {
11208
11214
  case 'rtc': {
11209
- const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11215
+ const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$d(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11210
11216
  rtcPacket = { rtcClient, channels, channelsOpened };
11211
11217
  return {
11212
11218
  type: 'rtc',
@@ -11233,18 +11239,18 @@ class ConnectionManager extends Base {
11233
11239
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
11234
11240
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
11235
11241
  // clients that are in the same context as the newly-connected client.
11236
- __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11242
+ __classPrivateFieldGet$d(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11237
11243
  }
11238
11244
  const answer = routingInfo.answer ?? {
11239
11245
  supportedProtocols: [{ type: 'classic', version: 1 }]
11240
11246
  };
11241
11247
  const createStrategyFromAnswer = async (protocol) => {
11242
11248
  if (protocol.type === 'rtc' && rtcPacket) {
11243
- await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11249
+ await __classPrivateFieldGet$d(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11244
11250
  return new RTCStrategy();
11245
11251
  }
11246
11252
  if (protocol.type === 'classic') {
11247
- return new ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11253
+ return new ClassicStrategy(this.wire, __classPrivateFieldGet$d(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11248
11254
  }
11249
11255
  return null;
11250
11256
  };
@@ -11312,7 +11318,7 @@ class ConnectionManager extends Base {
11312
11318
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
11313
11319
  const answer = await accumP;
11314
11320
  if (protocolToUse.type === 'rtc') {
11315
- const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11321
+ const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$d(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11316
11322
  answer.supportedProtocols.push({
11317
11323
  type: 'rtc',
11318
11324
  version: RTCInfo.version,
@@ -11359,13 +11365,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
11359
11365
  *
11360
11366
  * @packageDocumentation
11361
11367
  */
11362
- var __classPrivateFieldSet$9 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11368
+ var __classPrivateFieldSet$b = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11363
11369
  if (kind === "m") throw new TypeError("Private method is not writable");
11364
11370
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11365
11371
  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");
11366
11372
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11367
11373
  };
11368
- var __classPrivateFieldGet$a = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11374
+ var __classPrivateFieldGet$c = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11369
11375
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11370
11376
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11371
11377
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11413,11 +11419,11 @@ class Channel extends EmitterBase {
11413
11419
  ChannelClient.handleProviderDisconnect(eventPayload);
11414
11420
  }),
11415
11421
  this.on('connected', (...args) => {
11416
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11422
+ __classPrivateFieldGet$c(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11417
11423
  })
11418
11424
  ]).catch(() => new Error('error setting up channel connection listeners'));
11419
11425
  }));
11420
- __classPrivateFieldSet$9(this, _Channel_connectionManager, new ConnectionManager(wire), "f");
11426
+ __classPrivateFieldSet$b(this, _Channel_connectionManager, new ConnectionManager(wire), "f");
11421
11427
  }
11422
11428
  /**
11423
11429
  *
@@ -11492,7 +11498,7 @@ class Channel extends EmitterBase {
11492
11498
  resolve(true);
11493
11499
  }
11494
11500
  };
11495
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11501
+ __classPrivateFieldGet$c(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11496
11502
  });
11497
11503
  try {
11498
11504
  if (retryInfo.count > 0) {
@@ -11524,7 +11530,7 @@ class Channel extends EmitterBase {
11524
11530
  finally {
11525
11531
  retryInfo.count += 1;
11526
11532
  // in case of other errors, remove our listener
11527
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11533
+ __classPrivateFieldGet$c(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11528
11534
  }
11529
11535
  } while (shouldWait); // If we're waiting we retry the above loop
11530
11536
  // Should wait was false, no channel was found.
@@ -11583,12 +11589,12 @@ class Channel extends EmitterBase {
11583
11589
  async connect(channelName, options = {}) {
11584
11590
  // Make sure we don't connect before listeners are set up
11585
11591
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
11586
- await __classPrivateFieldGet$a(this, _Channel_readyToConnect, "f").getValue();
11592
+ await __classPrivateFieldGet$c(this, _Channel_readyToConnect, "f").getValue();
11587
11593
  if (!channelName || typeof channelName !== 'string') {
11588
11594
  throw new Error('Please provide a channelName string to connect to a channel.');
11589
11595
  }
11590
11596
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
11591
- const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientOffer(opts);
11597
+ const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$c(this, _Channel_connectionManager, "f").createClientOffer(opts);
11592
11598
  let connectionUrl;
11593
11599
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
11594
11600
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -11600,7 +11606,7 @@ class Channel extends EmitterBase {
11600
11606
  connectionUrl
11601
11607
  };
11602
11608
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
11603
- const strategy = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11609
+ const strategy = await __classPrivateFieldGet$c(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11604
11610
  const channel = new ChannelClient(routingInfo, () => ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
11605
11611
  // It is the client's responsibility to handle endpoint disconnection to the provider.
11606
11612
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -11669,7 +11675,7 @@ class Channel extends EmitterBase {
11669
11675
  throw new Error('Please provide a channelName to create a channel');
11670
11676
  }
11671
11677
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
11672
- const channel = __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
11678
+ const channel = __classPrivateFieldGet$c(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
11673
11679
  // TODO: fix typing (internal)
11674
11680
  // @ts-expect-error
11675
11681
  this.on('client-disconnected', (eventPayload) => {
@@ -12208,13 +12214,13 @@ class GlobalHotkey extends EmitterBase {
12208
12214
  }
12209
12215
  }
12210
12216
 
12211
- var __classPrivateFieldSet$8 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12217
+ var __classPrivateFieldSet$a = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12212
12218
  if (kind === "m") throw new TypeError("Private method is not writable");
12213
12219
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12214
12220
  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");
12215
12221
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12216
12222
  };
12217
- var __classPrivateFieldGet$9 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12223
+ var __classPrivateFieldGet$b = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12218
12224
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12219
12225
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12220
12226
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12246,24 +12252,24 @@ class Platform extends EmitterBase {
12246
12252
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
12247
12253
  // don't expose
12248
12254
  });
12249
- if (!Platform.clientMap.has(__classPrivateFieldGet$9(this, _Platform_channelName, "f"))) {
12250
- const clientPromise = __classPrivateFieldGet$9(this, _Platform_connectToProvider, "f").call(this);
12251
- Platform.clientMap.set(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), clientPromise);
12255
+ if (!Platform.clientMap.has(__classPrivateFieldGet$b(this, _Platform_channelName, "f"))) {
12256
+ const clientPromise = __classPrivateFieldGet$b(this, _Platform_connectToProvider, "f").call(this);
12257
+ Platform.clientMap.set(__classPrivateFieldGet$b(this, _Platform_channelName, "f"), clientPromise);
12252
12258
  }
12253
12259
  // we set it above
12254
12260
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12255
- return Platform.clientMap.get(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
12261
+ return Platform.clientMap.get(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12256
12262
  };
12257
12263
  _Platform_connectToProvider.set(this, async () => {
12258
12264
  try {
12259
- const client = await this._channel.connect(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), { wait: false });
12265
+ const client = await this._channel.connect(__classPrivateFieldGet$b(this, _Platform_channelName, "f"), { wait: false });
12260
12266
  client.onDisconnection(() => {
12261
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
12267
+ Platform.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12262
12268
  });
12263
12269
  return client;
12264
12270
  }
12265
12271
  catch (e) {
12266
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
12272
+ Platform.clientMap.delete(__classPrivateFieldGet$b(this, _Platform_channelName, "f"));
12267
12273
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
12268
12274
  }
12269
12275
  });
@@ -12276,7 +12282,7 @@ class Platform extends EmitterBase {
12276
12282
  if (errorMsg) {
12277
12283
  throw new Error(errorMsg);
12278
12284
  }
12279
- __classPrivateFieldSet$8(this, _Platform_channelName, channelName, "f");
12285
+ __classPrivateFieldSet$a(this, _Platform_channelName, channelName, "f");
12280
12286
  this._channel = this.fin.InterApplicationBus.Channel;
12281
12287
  this.identity = { uuid: identity.uuid };
12282
12288
  this.Layout = this.fin.Platform.Layout;
@@ -13132,13 +13138,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
13132
13138
  }
13133
13139
  };
13134
13140
 
13135
- var __classPrivateFieldSet$7 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13141
+ var __classPrivateFieldSet$9 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13136
13142
  if (kind === "m") throw new TypeError("Private method is not writable");
13137
13143
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13138
13144
  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");
13139
13145
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13140
13146
  };
13141
- var __classPrivateFieldGet$8 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13147
+ var __classPrivateFieldGet$a = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13142
13148
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13143
13149
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13144
13150
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13188,7 +13194,7 @@ class LayoutNode {
13188
13194
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
13189
13195
  * ```
13190
13196
  */
13191
- this.isRoot = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").isRoot(this.entityId);
13197
+ this.isRoot = () => __classPrivateFieldGet$a(this, _LayoutNode_client, "f").isRoot(this.entityId);
13192
13198
  /**
13193
13199
  * Checks if the TabStack or ColumnOrRow exists
13194
13200
  *
@@ -13208,7 +13214,7 @@ class LayoutNode {
13208
13214
  * console.log(`The entity exists: ${exists}`);
13209
13215
  * ```
13210
13216
  */
13211
- this.exists = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").exists(this.entityId);
13217
+ this.exists = () => __classPrivateFieldGet$a(this, _LayoutNode_client, "f").exists(this.entityId);
13212
13218
  /**
13213
13219
  * Retrieves the parent of the TabStack or ColumnOrRow
13214
13220
  *
@@ -13229,11 +13235,11 @@ class LayoutNode {
13229
13235
  * ```
13230
13236
  */
13231
13237
  this.getParent = async () => {
13232
- const parent = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getParent(this.entityId);
13238
+ const parent = await __classPrivateFieldGet$a(this, _LayoutNode_client, "f").getParent(this.entityId);
13233
13239
  if (!parent) {
13234
13240
  return undefined;
13235
13241
  }
13236
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
13242
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13237
13243
  };
13238
13244
  /**
13239
13245
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -13284,8 +13290,8 @@ class LayoutNode {
13284
13290
  * @experimental
13285
13291
  */
13286
13292
  this.createAdjacentStack = async (views, options) => {
13287
- const entityId = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13288
- return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
13293
+ const entityId = await __classPrivateFieldGet$a(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13294
+ return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$a(this, _LayoutNode_client, "f"));
13289
13295
  };
13290
13296
  /**
13291
13297
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -13313,16 +13319,16 @@ class LayoutNode {
13313
13319
  * @experimental
13314
13320
  */
13315
13321
  this.getAdjacentStacks = async (edge) => {
13316
- const adjacentStacks = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getAdjacentStacks({
13322
+ const adjacentStacks = await __classPrivateFieldGet$a(this, _LayoutNode_client, "f").getAdjacentStacks({
13317
13323
  targetId: this.entityId,
13318
13324
  edge
13319
13325
  });
13320
13326
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
13321
13327
  type: 'stack',
13322
13328
  entityId: stack.entityId
13323
- }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f")));
13329
+ }, __classPrivateFieldGet$a(this, _LayoutNode_client, "f")));
13324
13330
  };
13325
- __classPrivateFieldSet$7(this, _LayoutNode_client, client, "f");
13331
+ __classPrivateFieldSet$9(this, _LayoutNode_client, client, "f");
13326
13332
  this.entityId = entityId;
13327
13333
  }
13328
13334
  }
@@ -13395,7 +13401,7 @@ class TabStack extends LayoutNode {
13395
13401
  * ```
13396
13402
  * @experimental
13397
13403
  */
13398
- this.getViews = () => __classPrivateFieldGet$8(this, _TabStack_client, "f").getStackViews(this.entityId);
13404
+ this.getViews = () => __classPrivateFieldGet$a(this, _TabStack_client, "f").getStackViews(this.entityId);
13399
13405
  /**
13400
13406
  * Adds or creates a view in this {@link TabStack}.
13401
13407
  *
@@ -13426,7 +13432,7 @@ class TabStack extends LayoutNode {
13426
13432
  * ```
13427
13433
  * @experimental
13428
13434
  */
13429
- this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$8(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
13435
+ this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$a(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
13430
13436
  /**
13431
13437
  * Removes a view from this {@link TabStack}.
13432
13438
  *
@@ -13456,7 +13462,7 @@ class TabStack extends LayoutNode {
13456
13462
  * ```
13457
13463
  */
13458
13464
  this.removeView = async (view) => {
13459
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
13465
+ await __classPrivateFieldGet$a(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
13460
13466
  };
13461
13467
  /**
13462
13468
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -13480,9 +13486,9 @@ class TabStack extends LayoutNode {
13480
13486
  * @experimental
13481
13487
  */
13482
13488
  this.setActiveView = async (view) => {
13483
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
13489
+ await __classPrivateFieldGet$a(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
13484
13490
  };
13485
- __classPrivateFieldSet$7(this, _TabStack_client, client, "f");
13491
+ __classPrivateFieldSet$9(this, _TabStack_client, client, "f");
13486
13492
  }
13487
13493
  }
13488
13494
  _TabStack_client = new WeakMap();
@@ -13520,10 +13526,10 @@ class ColumnOrRow extends LayoutNode {
13520
13526
  * ```
13521
13527
  */
13522
13528
  this.getContent = async () => {
13523
- const contentItemEntities = await __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f").getContent(this.entityId);
13524
- return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f")));
13529
+ const contentItemEntities = await __classPrivateFieldGet$a(this, _ColumnOrRow_client, "f").getContent(this.entityId);
13530
+ return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$a(this, _ColumnOrRow_client, "f")));
13525
13531
  };
13526
- __classPrivateFieldSet$7(this, _ColumnOrRow_client, client, "f");
13532
+ __classPrivateFieldSet$9(this, _ColumnOrRow_client, client, "f");
13527
13533
  this.type = type;
13528
13534
  }
13529
13535
  }
@@ -13533,7 +13539,7 @@ const LAYOUT_CONTROLLER_ID = 'layout-entities';
13533
13539
  // TODO: eventually export this somehow
13534
13540
  const DEFAULT_LAYOUT_KEY = '__default__';
13535
13541
 
13536
- var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13542
+ var __classPrivateFieldGet$9 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13537
13543
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13538
13544
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13539
13545
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13676,7 +13682,7 @@ class Layout extends Base {
13676
13682
  * @internal
13677
13683
  */
13678
13684
  static getClient(layout) {
13679
- return __classPrivateFieldGet$7(layout, _Layout_layoutClient, "f").getValue();
13685
+ return __classPrivateFieldGet$9(layout, _Layout_layoutClient, "f").getValue();
13680
13686
  }
13681
13687
  /**
13682
13688
  * @internal
@@ -13899,7 +13905,7 @@ class Layout extends Base {
13899
13905
  this.wire.sendAction('layout-get-root-item').catch(() => {
13900
13906
  // don't expose
13901
13907
  });
13902
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
13908
+ const client = await __classPrivateFieldGet$9(this, _Layout_layoutClient, "f").getValue();
13903
13909
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
13904
13910
  return LayoutNode.getEntity(root, client);
13905
13911
  }
@@ -13917,7 +13923,7 @@ class Layout extends Base {
13917
13923
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
13918
13924
  // don't expose
13919
13925
  });
13920
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
13926
+ const client = await __classPrivateFieldGet$9(this, _Layout_layoutClient, "f").getValue();
13921
13927
  const stack = await client.getStackByView(identity);
13922
13928
  if (!stack) {
13923
13929
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -13937,7 +13943,7 @@ class Layout extends Base {
13937
13943
  this.wire.sendAction('layout-add-view').catch((e) => {
13938
13944
  // don't expose
13939
13945
  });
13940
- const { identity } = await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
13946
+ const { identity } = await __classPrivateFieldGet$9(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
13941
13947
  viewOptions,
13942
13948
  location,
13943
13949
  targetView
@@ -13955,7 +13961,7 @@ class Layout extends Base {
13955
13961
  this.wire.sendAction('layout-close-view').catch((e) => {
13956
13962
  // don't expose
13957
13963
  });
13958
- await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
13964
+ await __classPrivateFieldGet$9(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
13959
13965
  }
13960
13966
  }
13961
13967
  _Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
@@ -13968,12 +13974,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
13968
13974
  return client.dispatch(action, { target: this.identity, opts: payload });
13969
13975
  };
13970
13976
 
13971
- var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13977
+ var __classPrivateFieldGet$8 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13972
13978
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13973
13979
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13974
13980
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13975
13981
  };
13976
- var __classPrivateFieldSet$6 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13982
+ var __classPrivateFieldSet$8 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13977
13983
  if (kind === "m") throw new TypeError("Private method is not writable");
13978
13984
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13979
13985
  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");
@@ -14032,23 +14038,23 @@ class LayoutModule extends Base {
14032
14038
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
14033
14039
  throw new Error('Layout.init can only be called from a Window context.');
14034
14040
  }
14035
- if (__classPrivateFieldGet$6(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14041
+ if (__classPrivateFieldGet$8(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14036
14042
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
14037
14043
  }
14038
14044
  if (this.wire.environment.type === 'openfin') {
14039
14045
  // preload the client
14040
14046
  await this.fin.Platform.getCurrentSync().getClient();
14041
14047
  }
14042
- __classPrivateFieldSet$6(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14048
+ __classPrivateFieldSet$8(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14043
14049
  // TODO: rename to createLayoutManager
14044
- __classPrivateFieldSet$6(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14045
- await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f"), options);
14050
+ __classPrivateFieldSet$8(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14051
+ await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$8(this, _LayoutModule_layoutManager, "f"), options);
14046
14052
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
14047
14053
  if (!options.layoutManagerOverride) {
14048
14054
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
14049
14055
  // in single-layout case, we return the undocumented layoutManager type
14050
14056
  const layoutIdentity = { layoutName: DEFAULT_LAYOUT_KEY, ...meIdentity };
14051
- return __classPrivateFieldGet$6(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14057
+ return __classPrivateFieldGet$8(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14052
14058
  }
14053
14059
  return this.wrapSync(meIdentity);
14054
14060
  };
@@ -14077,13 +14083,13 @@ class LayoutModule extends Base {
14077
14083
  * @returns
14078
14084
  */
14079
14085
  this.getCurrentLayoutManagerSync = () => {
14080
- return __classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14086
+ return __classPrivateFieldGet$8(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14081
14087
  };
14082
14088
  this.create = async (options) => {
14083
- return this.wire.environment.createLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14089
+ return this.wire.environment.createLayout(__classPrivateFieldGet$8(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14084
14090
  };
14085
14091
  this.destroy = async (layoutIdentity) => {
14086
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14092
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$8(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14087
14093
  };
14088
14094
  }
14089
14095
  /**
@@ -14213,10 +14219,10 @@ class LayoutModule extends Base {
14213
14219
  }
14214
14220
  }
14215
14221
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
14216
- if (!__classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f")) {
14222
+ if (!__classPrivateFieldGet$8(this, _LayoutModule_layoutManager, "f")) {
14217
14223
  throw new Error(`You must call init before using the API ${method}`);
14218
14224
  }
14219
- return __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f");
14225
+ return __classPrivateFieldGet$8(this, _LayoutModule_layoutManager, "f");
14220
14226
  };
14221
14227
 
14222
14228
  /**
@@ -14483,13 +14489,13 @@ function createWarningObject(message, obj) {
14483
14489
  });
14484
14490
  }
14485
14491
 
14486
- var __classPrivateFieldSet$5 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14492
+ var __classPrivateFieldSet$7 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14487
14493
  if (kind === "m") throw new TypeError("Private method is not writable");
14488
14494
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14489
14495
  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");
14490
14496
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14491
14497
  };
14492
- var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14498
+ var __classPrivateFieldGet$7 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14493
14499
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14494
14500
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14495
14501
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14500,7 +14506,7 @@ class SessionContextGroupClient extends Base {
14500
14506
  super(wire);
14501
14507
  _SessionContextGroupClient_clientPromise.set(this, void 0);
14502
14508
  this.id = id;
14503
- __classPrivateFieldSet$5(this, _SessionContextGroupClient_clientPromise, client, "f");
14509
+ __classPrivateFieldSet$7(this, _SessionContextGroupClient_clientPromise, client, "f");
14504
14510
  }
14505
14511
  /**
14506
14512
  * Sets a context for the session context group.
@@ -14512,7 +14518,7 @@ class SessionContextGroupClient extends Base {
14512
14518
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
14513
14519
  // don't expose, analytics-only call
14514
14520
  });
14515
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14521
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14516
14522
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
14517
14523
  sessionContextGroupId: this.id,
14518
14524
  context
@@ -14522,7 +14528,7 @@ class SessionContextGroupClient extends Base {
14522
14528
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
14523
14529
  // don't expose, analytics-only call
14524
14530
  });
14525
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14531
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14526
14532
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
14527
14533
  sessionContextGroupId: this.id,
14528
14534
  type
@@ -14535,7 +14541,7 @@ class SessionContextGroupClient extends Base {
14535
14541
  if (typeof contextHandler !== 'function') {
14536
14542
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
14537
14543
  }
14538
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14544
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14539
14545
  let handlerId;
14540
14546
  if (contextType) {
14541
14547
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${generateId()}`;
@@ -14548,7 +14554,7 @@ class SessionContextGroupClient extends Base {
14548
14554
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
14549
14555
  }
14550
14556
  async createUnsubscribeCb(handlerId) {
14551
- const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14557
+ const client = await __classPrivateFieldGet$7(this, _SessionContextGroupClient_clientPromise, "f");
14552
14558
  return async () => {
14553
14559
  client.remove(handlerId);
14554
14560
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -14565,13 +14571,13 @@ class SessionContextGroupClient extends Base {
14565
14571
  }
14566
14572
  _SessionContextGroupClient_clientPromise = new WeakMap();
14567
14573
 
14568
- var __classPrivateFieldSet$4 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14574
+ var __classPrivateFieldSet$6 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14569
14575
  if (kind === "m") throw new TypeError("Private method is not writable");
14570
14576
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14571
14577
  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");
14572
14578
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14573
14579
  };
14574
- var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14580
+ var __classPrivateFieldGet$6 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14575
14581
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14576
14582
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14577
14583
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14589,11 +14595,11 @@ class ChannelEvents {
14589
14595
  _ChannelEvents_channelClient.set(this, void 0);
14590
14596
  _ChannelEvents_isChannelReady.set(this, false);
14591
14597
  _ChannelEvents_getActions.set(this, async () => {
14592
- const channelClient = await __classPrivateFieldGet$4(this, _ChannelEvents_channelClient, "f");
14593
- let actions = __classPrivateFieldGet$4(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
14598
+ const channelClient = await __classPrivateFieldGet$6(this, _ChannelEvents_channelClient, "f");
14599
+ let actions = __classPrivateFieldGet$6(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
14594
14600
  if (!actions) {
14595
14601
  actions = {};
14596
- __classPrivateFieldGet$4(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
14602
+ __classPrivateFieldGet$6(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
14597
14603
  }
14598
14604
  return actions;
14599
14605
  });
@@ -14610,7 +14616,7 @@ class ChannelEvents {
14610
14616
  if (index >= 0) {
14611
14617
  callbacks.splice(index, 1);
14612
14618
  if (callbacks.length === 0) {
14613
- const client = await __classPrivateFieldGet$4(this, _ChannelEvents_channelClient, "f");
14619
+ const client = await __classPrivateFieldGet$6(this, _ChannelEvents_channelClient, "f");
14614
14620
  client.remove(actionId);
14615
14621
  }
14616
14622
  }
@@ -14619,7 +14625,7 @@ class ChannelEvents {
14619
14625
  // Use lazy eval to only setup and register the channel on first attempt.
14620
14626
  if (!registrationPromise) {
14621
14627
  registrationPromise = (async () => {
14622
- const client = await __classPrivateFieldGet$4(this, _ChannelEvents_channelClient, "f");
14628
+ const client = await __classPrivateFieldGet$6(this, _ChannelEvents_channelClient, "f");
14623
14629
  await client.register(actionId, onChannelAction);
14624
14630
  })();
14625
14631
  }
@@ -14628,14 +14634,14 @@ class ChannelEvents {
14628
14634
  };
14629
14635
  });
14630
14636
  _ChannelEvents_getRegistration.set(this, async (actionId) => {
14631
- const actions = await __classPrivateFieldGet$4(this, _ChannelEvents_getActions, "f").call(this);
14637
+ const actions = await __classPrivateFieldGet$6(this, _ChannelEvents_getActions, "f").call(this);
14632
14638
  return actions[actionId];
14633
14639
  });
14634
14640
  _ChannelEvents_getOrCreateRegistration.set(this, async (actionId) => {
14635
- const actions = await __classPrivateFieldGet$4(this, _ChannelEvents_getActions, "f").call(this);
14636
- const registration = await __classPrivateFieldGet$4(this, _ChannelEvents_getRegistration, "f").call(this, actionId);
14641
+ const actions = await __classPrivateFieldGet$6(this, _ChannelEvents_getActions, "f").call(this);
14642
+ const registration = await __classPrivateFieldGet$6(this, _ChannelEvents_getRegistration, "f").call(this, actionId);
14637
14643
  if (!registration) {
14638
- actions[actionId] = __classPrivateFieldGet$4(this, _ChannelEvents_createRegistration, "f").call(this, actionId);
14644
+ actions[actionId] = __classPrivateFieldGet$6(this, _ChannelEvents_createRegistration, "f").call(this, actionId);
14639
14645
  }
14640
14646
  return actions[actionId];
14641
14647
  });
@@ -14650,7 +14656,7 @@ class ChannelEvents {
14650
14656
  * @param callback Callback to be called whenever the action is dispatched.
14651
14657
  */
14652
14658
  this.addListener = async (action, callback) => {
14653
- const event = await __classPrivateFieldGet$4(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14659
+ const event = await __classPrivateFieldGet$6(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14654
14660
  event.callbacks.push(callback);
14655
14661
  // This ensures we only resolve the subscription once the action is registered
14656
14662
  await event.waitForRegistration();
@@ -14664,19 +14670,19 @@ class ChannelEvents {
14664
14670
  * @param callback Callback to remove.
14665
14671
  */
14666
14672
  this.removeListener = async (action, callback) => {
14667
- if (!__classPrivateFieldGet$4(this, _ChannelEvents_isChannelReady, "f")) {
14673
+ if (!__classPrivateFieldGet$6(this, _ChannelEvents_isChannelReady, "f")) {
14668
14674
  return;
14669
14675
  }
14670
- const registration = await __classPrivateFieldGet$4(this, _ChannelEvents_getRegistration, "f").call(this, action);
14676
+ const registration = await __classPrivateFieldGet$6(this, _ChannelEvents_getRegistration, "f").call(this, action);
14671
14677
  if (registration) {
14672
- const event = await __classPrivateFieldGet$4(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14678
+ const event = await __classPrivateFieldGet$6(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
14673
14679
  await event.dispose(callback);
14674
14680
  }
14675
14681
  };
14676
- __classPrivateFieldSet$4(this, _ChannelEvents_channelClient, channelClient, "f");
14682
+ __classPrivateFieldSet$6(this, _ChannelEvents_channelClient, channelClient, "f");
14677
14683
  Promise.resolve(channelClient)
14678
14684
  .then(() => {
14679
- __classPrivateFieldSet$4(this, _ChannelEvents_isChannelReady, true, "f");
14685
+ __classPrivateFieldSet$6(this, _ChannelEvents_isChannelReady, true, "f");
14680
14686
  })
14681
14687
  .catch(() => {
14682
14688
  // eslint-disable-next-line
@@ -14693,13 +14699,13 @@ _a = ChannelEvents, _ChannelEvents_channelClient = new WeakMap(), _ChannelEvents
14693
14699
  */
14694
14700
  _ChannelEvents_actionsByClient = { value: new WeakMap() };
14695
14701
 
14696
- var __classPrivateFieldSet$3 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14702
+ var __classPrivateFieldSet$5 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14697
14703
  if (kind === "m") throw new TypeError("Private method is not writable");
14698
14704
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14699
14705
  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");
14700
14706
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14701
14707
  };
14702
- var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14708
+ var __classPrivateFieldGet$5 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14703
14709
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14704
14710
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14705
14711
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14775,7 +14781,7 @@ class InteropClient extends Base {
14775
14781
  */
14776
14782
  this.addListener = async (type, listener) => {
14777
14783
  try {
14778
- await __classPrivateFieldGet$3(this, _InteropClient_channelEvents, "f").addListener(type, listener);
14784
+ await __classPrivateFieldGet$5(this, _InteropClient_channelEvents, "f").addListener(type, listener);
14779
14785
  }
14780
14786
  catch (error) {
14781
14787
  throw new Error(`An unexpected error occurred when adding a listener to the event ${type}. \n${error.stack}.`);
@@ -14789,16 +14795,16 @@ class InteropClient extends Base {
14789
14795
  */
14790
14796
  this.removeListener = async (type, listener) => {
14791
14797
  try {
14792
- await __classPrivateFieldGet$3(this, _InteropClient_channelEvents, "f").removeListener(type, listener);
14798
+ await __classPrivateFieldGet$5(this, _InteropClient_channelEvents, "f").removeListener(type, listener);
14793
14799
  }
14794
14800
  catch (error) {
14795
14801
  throw new Error(`An unexpected error occurred when removing a listener for the event ${type}. \n${error.stack}.`);
14796
14802
  }
14797
14803
  };
14798
- __classPrivateFieldSet$3(this, _InteropClient_sessionContextGroups, new Map(), "f");
14799
- __classPrivateFieldSet$3(this, _InteropClient_clientPromise, clientPromise, "f");
14800
- __classPrivateFieldSet$3(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
14801
- __classPrivateFieldSet$3(this, _InteropClient_channelEvents, new ChannelEvents(clientPromise), "f");
14804
+ __classPrivateFieldSet$5(this, _InteropClient_sessionContextGroups, new Map(), "f");
14805
+ __classPrivateFieldSet$5(this, _InteropClient_clientPromise, clientPromise, "f");
14806
+ __classPrivateFieldSet$5(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
14807
+ __classPrivateFieldSet$5(this, _InteropClient_channelEvents, new ChannelEvents(clientPromise), "f");
14802
14808
  }
14803
14809
  /**
14804
14810
  * Sets a context for the context group of the current entity.
@@ -14823,7 +14829,7 @@ class InteropClient extends Base {
14823
14829
  this.wire.sendAction('interop-client-set-context').catch((e) => {
14824
14830
  // don't expose, analytics-only call
14825
14831
  });
14826
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14832
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14827
14833
  return client.dispatch('setContext', { context });
14828
14834
  }
14829
14835
  /**
@@ -14890,7 +14896,7 @@ class InteropClient extends Base {
14890
14896
  if (typeof handler !== 'function') {
14891
14897
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
14892
14898
  }
14893
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14899
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14894
14900
  let handlerId;
14895
14901
  if (contextType) {
14896
14902
  handlerId = `invokeContextHandler-${contextType}-${generateId()}`;
@@ -14930,7 +14936,7 @@ class InteropClient extends Base {
14930
14936
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
14931
14937
  // don't expose, analytics-only call
14932
14938
  });
14933
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14939
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14934
14940
  return client.dispatch('getContextGroups');
14935
14941
  }
14936
14942
  /**
@@ -14961,7 +14967,7 @@ class InteropClient extends Base {
14961
14967
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
14962
14968
  // don't expose, analytics-only call
14963
14969
  });
14964
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14970
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14965
14971
  if (!contextGroupId) {
14966
14972
  throw new Error('No contextGroupId specified for joinContextGroup.');
14967
14973
  }
@@ -14990,7 +14996,7 @@ class InteropClient extends Base {
14990
14996
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
14991
14997
  // don't expose, analytics-only call
14992
14998
  });
14993
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14999
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
14994
15000
  return client.dispatch('removeFromContextGroup', { target });
14995
15001
  }
14996
15002
  /**
@@ -15013,7 +15019,7 @@ class InteropClient extends Base {
15013
15019
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15014
15020
  // don't expose, analytics-only call
15015
15021
  });
15016
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15022
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15017
15023
  if (!contextGroupId) {
15018
15024
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15019
15025
  }
@@ -15038,7 +15044,7 @@ class InteropClient extends Base {
15038
15044
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15039
15045
  // don't expose, analytics-only call
15040
15046
  });
15041
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15047
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15042
15048
  if (!contextGroupId) {
15043
15049
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15044
15050
  }
@@ -15066,7 +15072,7 @@ class InteropClient extends Base {
15066
15072
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15067
15073
  // don't expose, this is only for api analytics purposes
15068
15074
  });
15069
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15075
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15070
15076
  return client.dispatch('fireIntent', intent);
15071
15077
  }
15072
15078
  /**
@@ -15093,7 +15099,7 @@ class InteropClient extends Base {
15093
15099
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15094
15100
  // don't expose, this is only for api analytics purposes
15095
15101
  });
15096
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15102
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15097
15103
  const handlerId = `intent-handler-${intentName}`;
15098
15104
  const wrappedHandler = wrapIntentHandler(handler, handlerId);
15099
15105
  try {
@@ -15131,7 +15137,7 @@ class InteropClient extends Base {
15131
15137
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15132
15138
  // don't expose, analytics-only call
15133
15139
  });
15134
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15140
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15135
15141
  return client.dispatch('getCurrentContext', { contextType });
15136
15142
  }
15137
15143
  /**
@@ -15151,7 +15157,7 @@ class InteropClient extends Base {
15151
15157
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15152
15158
  // don't expose, analytics-only call
15153
15159
  });
15154
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15160
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15155
15161
  return client.dispatch('getInfoForIntent', options);
15156
15162
  }
15157
15163
  /**
@@ -15182,7 +15188,7 @@ class InteropClient extends Base {
15182
15188
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15183
15189
  // don't expose, analytics-only call
15184
15190
  });
15185
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15191
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15186
15192
  return client.dispatch('getInfoForIntentsByContext', context);
15187
15193
  }
15188
15194
  /**
@@ -15214,7 +15220,7 @@ class InteropClient extends Base {
15214
15220
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15215
15221
  // don't expose, analytics-only call
15216
15222
  });
15217
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15223
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15218
15224
  return client.dispatch('fireIntentForContext', context);
15219
15225
  }
15220
15226
  /**
@@ -15251,19 +15257,19 @@ class InteropClient extends Base {
15251
15257
  */
15252
15258
  async joinSessionContextGroup(sessionContextGroupId) {
15253
15259
  try {
15254
- const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15260
+ const currentSessionContextGroup = __classPrivateFieldGet$5(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15255
15261
  if (currentSessionContextGroup) {
15256
15262
  return currentSessionContextGroup.getUserInstance();
15257
15263
  }
15258
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15264
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15259
15265
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15260
15266
  sessionContextGroupId
15261
15267
  });
15262
15268
  if (hasConflict) {
15263
15269
  console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
15264
15270
  }
15265
- const newSessionContextGroup = new SessionContextGroupClient(this.wire, __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15266
- __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15271
+ const newSessionContextGroup = new SessionContextGroupClient(this.wire, __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15272
+ __classPrivateFieldGet$5(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15267
15273
  return newSessionContextGroup.getUserInstance();
15268
15274
  }
15269
15275
  catch (error) {
@@ -15290,14 +15296,14 @@ class InteropClient extends Base {
15290
15296
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15291
15297
  // don't expose, analytics-only call
15292
15298
  });
15293
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15299
+ const client = await __classPrivateFieldGet$5(this, _InteropClient_clientPromise, "f");
15294
15300
  return client.onDisconnection((event) => {
15295
15301
  const { uuid } = event;
15296
15302
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15297
15303
  });
15298
15304
  }
15299
15305
  getFDC3Sync(version) {
15300
- return __classPrivateFieldGet$3(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15306
+ return __classPrivateFieldGet$5(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15301
15307
  }
15302
15308
  async getFDC3(version) {
15303
15309
  return this.getFDC3Sync(version);
@@ -15308,7 +15314,7 @@ class InteropClient extends Base {
15308
15314
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15309
15315
  */
15310
15316
  static async ferryFdc3Call(interopClient, action, payload) {
15311
- const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15317
+ const client = await __classPrivateFieldGet$5(interopClient, _InteropClient_clientPromise, "f");
15312
15318
  return client.dispatch(action, payload || null);
15313
15319
  }
15314
15320
  }
@@ -15645,12 +15651,12 @@ const getIntentResolution = async (interopModule, context, app, intent) => {
15645
15651
  return { ...intentResolutionInfoFromBroker, getResult };
15646
15652
  };
15647
15653
 
15648
- var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15654
+ var __classPrivateFieldGet$4 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15649
15655
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15650
15656
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
15651
15657
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15652
15658
  };
15653
- var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15659
+ var __classPrivateFieldSet$4 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15654
15660
  if (kind === "m") throw new TypeError("Private method is not writable");
15655
15661
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15656
15662
  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");
@@ -15659,7 +15665,7 @@ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) |
15659
15665
  var _FDC3ModuleBase_producer;
15660
15666
  class FDC3ModuleBase {
15661
15667
  get client() {
15662
- return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
15668
+ return __classPrivateFieldGet$4(this, _FDC3ModuleBase_producer, "f").call(this);
15663
15669
  }
15664
15670
  get fin() {
15665
15671
  return this.wire.getFin();
@@ -15668,7 +15674,7 @@ class FDC3ModuleBase {
15668
15674
  constructor(producer, wire) {
15669
15675
  this.wire = wire;
15670
15676
  _FDC3ModuleBase_producer.set(this, void 0);
15671
- __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
15677
+ __classPrivateFieldSet$4(this, _FDC3ModuleBase_producer, producer, "f");
15672
15678
  }
15673
15679
  /**
15674
15680
  * Broadcasts a context for the channel of the current entity.
@@ -16468,13 +16474,13 @@ class InteropModule extends Base {
16468
16474
  const channelPrefix = 'snapshot-source-provider-';
16469
16475
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
16470
16476
 
16471
- var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16477
+ var __classPrivateFieldSet$3 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16472
16478
  if (kind === "m") throw new TypeError("Private method is not writable");
16473
16479
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16474
16480
  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");
16475
16481
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16476
16482
  };
16477
- var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16483
+ var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16478
16484
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16479
16485
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16480
16486
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -16501,26 +16507,26 @@ class SnapshotSource extends Base {
16501
16507
  return connectionMap.get(this.identity.uuid);
16502
16508
  });
16503
16509
  _SnapshotSource_getClient.set(this, () => {
16504
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
16505
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$1(this, _SnapshotSource_startConnection, "f").call(this);
16510
+ if (!__classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
16511
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$3(this, _SnapshotSource_startConnection, "f").call(this);
16506
16512
  }
16507
- return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
16513
+ return __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
16508
16514
  });
16509
16515
  _SnapshotSource_startConnection.set(this, async () => {
16510
16516
  const channelName = getSnapshotSourceChannelName(this.identity);
16511
16517
  try {
16512
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
16513
- await __classPrivateFieldGet$1(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
16518
+ if (!__classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
16519
+ await __classPrivateFieldGet$3(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
16514
16520
  }
16515
16521
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
16516
16522
  client.onDisconnection(() => {
16517
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16518
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
16523
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16524
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
16519
16525
  });
16520
16526
  return client;
16521
16527
  }
16522
16528
  catch (e) {
16523
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16529
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16524
16530
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
16525
16531
  }
16526
16532
  });
@@ -16532,7 +16538,7 @@ class SnapshotSource extends Base {
16532
16538
  resolve = y;
16533
16539
  reject = n;
16534
16540
  });
16535
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
16541
+ __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
16536
16542
  const listener = async (e) => {
16537
16543
  try {
16538
16544
  if (e.channelName === channelName) {
@@ -16546,10 +16552,10 @@ class SnapshotSource extends Base {
16546
16552
  };
16547
16553
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
16548
16554
  });
16549
- __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
16555
+ __classPrivateFieldSet$3(this, _SnapshotSource_identity, id, "f");
16550
16556
  }
16551
16557
  get identity() {
16552
- return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
16558
+ return __classPrivateFieldGet$3(this, _SnapshotSource_identity, "f");
16553
16559
  }
16554
16560
  /**
16555
16561
  * Method to determine if the SnapshotSource has been initialized.
@@ -16583,11 +16589,11 @@ class SnapshotSource extends Base {
16583
16589
  // eslint-disable-next-line no-async-promise-executor
16584
16590
  try {
16585
16591
  // If getClient was already called before this, do we have a timing issue where the channel might have been created but we missed the event but this still fails?
16586
- await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16592
+ await __classPrivateFieldGet$3(this, _SnapshotSource_getClient, "f").call(this);
16587
16593
  }
16588
16594
  catch (e) {
16589
16595
  // it was not running.
16590
- await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
16596
+ await __classPrivateFieldGet$3(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
16591
16597
  }
16592
16598
  }
16593
16599
  /**
@@ -16596,7 +16602,7 @@ class SnapshotSource extends Base {
16596
16602
  */
16597
16603
  async getSnapshot() {
16598
16604
  this.wire.recordAnalytic('snapshot-source-get-snapshot');
16599
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16605
+ const client = await __classPrivateFieldGet$3(this, _SnapshotSource_getClient, "f").call(this);
16600
16606
  const response = (await client.dispatch('get-snapshot'));
16601
16607
  return (await response).snapshot;
16602
16608
  }
@@ -16606,7 +16612,7 @@ class SnapshotSource extends Base {
16606
16612
  */
16607
16613
  async applySnapshot(snapshot) {
16608
16614
  this.wire.recordAnalytic('snapshot-source-apply-snapshot');
16609
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16615
+ const client = await __classPrivateFieldGet$3(this, _SnapshotSource_getClient, "f").call(this);
16610
16616
  return client.dispatch('apply-snapshot', { snapshot });
16611
16617
  }
16612
16618
  }
@@ -16683,13 +16689,13 @@ class SnapshotSourceModule extends Base {
16683
16689
  }
16684
16690
  }
16685
16691
 
16686
- var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16692
+ var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16687
16693
  if (kind === "m") throw new TypeError("Private method is not writable");
16688
16694
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16689
16695
  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");
16690
16696
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16691
16697
  };
16692
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16698
+ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16693
16699
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16694
16700
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16695
16701
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -16718,11 +16724,11 @@ class NotificationManagerInstance {
16718
16724
  _NotificationManagerInstance_handler.set(this, void 0);
16719
16725
  _NotificationManagerInstance_id.set(this, void 0);
16720
16726
  _NotificationManagerInstance_isReceivingNotifications.set(this, new Lazy(async () => {
16721
- await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
16722
- if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f")) {
16727
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
16728
+ if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet$2(this, _NotificationManagerInstance_id, "f")) {
16723
16729
  const { notificationId, properties, documentUrl: url, notificationIcon: icon, badge, image } = message.payload;
16724
16730
  try {
16725
- __classPrivateFieldGet(this, _NotificationManagerInstance_handler, "f")?.call(this, {
16731
+ __classPrivateFieldGet$2(this, _NotificationManagerInstance_handler, "f")?.call(this, {
16726
16732
  properties,
16727
16733
  images: {
16728
16734
  image,
@@ -16760,8 +16766,8 @@ class NotificationManagerInstance {
16760
16766
  * ```
16761
16767
  */
16762
16768
  this.setNotificationHandler = async (handler) => {
16763
- await __classPrivateFieldGet(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
16764
- __classPrivateFieldSet(this, _NotificationManagerInstance_handler, handler, "f");
16769
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
16770
+ __classPrivateFieldSet$2(this, _NotificationManagerInstance_handler, handler, "f");
16765
16771
  };
16766
16772
  /**
16767
16773
  * Destroys the current NotificationManagerInstance.
@@ -16772,7 +16778,7 @@ class NotificationManagerInstance {
16772
16778
  * ```
16773
16779
  */
16774
16780
  this.destroy = async () => {
16775
- await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f") });
16781
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet$2(this, _NotificationManagerInstance_id, "f") });
16776
16782
  };
16777
16783
  /**
16778
16784
  * Dispatches a Notification lifecycle event ('close' | 'click' | 'show').
@@ -16798,13 +16804,13 @@ class NotificationManagerInstance {
16798
16804
  */
16799
16805
  this.dispatch = async (event) => {
16800
16806
  const { notificationId, type } = event;
16801
- await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
16807
+ await __classPrivateFieldGet$2(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
16802
16808
  notificationId,
16803
16809
  type
16804
16810
  });
16805
16811
  };
16806
- __classPrivateFieldSet(this, _NotificationManagerInstance_wire, wire, "f");
16807
- __classPrivateFieldSet(this, _NotificationManagerInstance_id, id, "f");
16812
+ __classPrivateFieldSet$2(this, _NotificationManagerInstance_wire, wire, "f");
16813
+ __classPrivateFieldSet$2(this, _NotificationManagerInstance_id, id, "f");
16808
16814
  }
16809
16815
  }
16810
16816
  _NotificationManagerInstance_wire = new WeakMap(), _NotificationManagerInstance_handler = new WeakMap(), _NotificationManagerInstance_id = new WeakMap(), _NotificationManagerInstance_isReceivingNotifications = new WeakMap();
@@ -16838,6 +16844,133 @@ class NotificationManagerModule extends Base {
16838
16844
  }
16839
16845
  }
16840
16846
 
16847
+ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16848
+ if (kind === "m") throw new TypeError("Private method is not writable");
16849
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16850
+ 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");
16851
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16852
+ };
16853
+ var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16854
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16855
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16856
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16857
+ };
16858
+ var _Writable_value, _Writable_listeners, _Writable_readonlyWrapper;
16859
+ /**
16860
+ * Internal, a mutable implementation of the observable pattern.
16861
+ * It strictly controls its internal state and provides a secure
16862
+ * read-only wrapper for public consumption.
16863
+ */
16864
+ class Writable {
16865
+ constructor(initialValue) {
16866
+ _Writable_value.set(this, void 0);
16867
+ _Writable_listeners.set(this, new Set());
16868
+ _Writable_readonlyWrapper.set(this, null);
16869
+ this.get = () => {
16870
+ return __classPrivateFieldGet$1(this, _Writable_value, "f");
16871
+ };
16872
+ this.set = (newValue) => {
16873
+ if (__classPrivateFieldGet$1(this, _Writable_value, "f") !== newValue) {
16874
+ __classPrivateFieldSet$1(this, _Writable_value, newValue, "f");
16875
+ // Snapshot listeners before invoking so subscribe/unsubscribe calls
16876
+ // made by a listener affect future emits, not the in-flight one.
16877
+ for (const listener of [...__classPrivateFieldGet$1(this, _Writable_listeners, "f")]) {
16878
+ try {
16879
+ listener();
16880
+ }
16881
+ catch (err) {
16882
+ // A throwing listener must not block later listeners; rethrow async
16883
+ // so the error surfaces via the host's unhandled-error reporter.
16884
+ setTimeout(() => {
16885
+ throw err;
16886
+ }, 0);
16887
+ }
16888
+ }
16889
+ }
16890
+ };
16891
+ this.subscribe = (listener) => {
16892
+ __classPrivateFieldGet$1(this, _Writable_listeners, "f").add(listener);
16893
+ return () => {
16894
+ __classPrivateFieldGet$1(this, _Writable_listeners, "f").delete(listener);
16895
+ };
16896
+ };
16897
+ __classPrivateFieldSet$1(this, _Writable_value, initialValue, "f");
16898
+ }
16899
+ get readonly() {
16900
+ if (!__classPrivateFieldGet$1(this, _Writable_readonlyWrapper, "f")) {
16901
+ __classPrivateFieldSet$1(this, _Writable_readonlyWrapper, {
16902
+ get: this.get,
16903
+ subscribe: this.subscribe
16904
+ }, "f");
16905
+ }
16906
+ return __classPrivateFieldGet$1(this, _Writable_readonlyWrapper, "f");
16907
+ }
16908
+ }
16909
+ _Writable_value = new WeakMap(), _Writable_listeners = new WeakMap(), _Writable_readonlyWrapper = new WeakMap();
16910
+
16911
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16912
+ if (kind === "m") throw new TypeError("Private method is not writable");
16913
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16914
+ 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");
16915
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16916
+ };
16917
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16918
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16919
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16920
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16921
+ };
16922
+ var _ChromeBrowserActionsImpl_wire, _ChromeBrowserActionsImpl_state;
16923
+ class ChromeBrowserActionsImpl {
16924
+ constructor(wire) {
16925
+ _ChromeBrowserActionsImpl_wire.set(this, void 0);
16926
+ _ChromeBrowserActionsImpl_state.set(this, new Writable([]));
16927
+ __classPrivateFieldSet(this, _ChromeBrowserActionsImpl_wire, wire, "f");
16928
+ }
16929
+ get state() {
16930
+ return __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_state, "f").readonly;
16931
+ }
16932
+ /**
16933
+ * @internal Wires up the runtime push-update handler. Called once at construction
16934
+ * for window contexts; views never receive these updates.
16935
+ */
16936
+ static activate(instance) {
16937
+ __classPrivateFieldGet(instance, _ChromeBrowserActionsImpl_wire, "f").registerMessageHandler((msg) => {
16938
+ if (msg?.action === 'chrome-browser-actions-update') {
16939
+ __classPrivateFieldGet(instance, _ChromeBrowserActionsImpl_state, "f").set(msg?.payload?.actions ?? []);
16940
+ return true;
16941
+ }
16942
+ return false;
16943
+ });
16944
+ }
16945
+ async getExtensionActions() {
16946
+ const ack = await __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_wire, "f").sendAction('chrome-browser-get-extension-actions', {});
16947
+ return ack.payload.data.actions;
16948
+ }
16949
+ async invokeExtensionAction(options) {
16950
+ await __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_wire, "f").sendAction('chrome-browser-invoke-extension-action', options);
16951
+ }
16952
+ async hideActiveExtensionPopup() {
16953
+ await __classPrivateFieldGet(this, _ChromeBrowserActionsImpl_wire, "f").sendAction('chrome-browser-hide-active-extension-popup', {});
16954
+ }
16955
+ }
16956
+ _ChromeBrowserActionsImpl_wire = new WeakMap(), _ChromeBrowserActionsImpl_state = new WeakMap();
16957
+
16958
+ /**
16959
+ * Client-side handle for the chrome-browser feature on the current window.
16960
+ *
16961
+ * The window must have been created with `chromeBrowser: true` for these APIs to do
16962
+ * anything meaningful — there is no separate `init()` step. From a view or a non
16963
+ * chrome-browser window, calls into `Actions` will resolve to empty results.
16964
+ */
16965
+ class ChromeBrowserModule {
16966
+ constructor(wire, isWindow) {
16967
+ this.Actions = new ChromeBrowserActionsImpl(wire);
16968
+ if (isWindow) {
16969
+ ChromeBrowserActionsImpl.activate(this.Actions);
16970
+ }
16971
+ }
16972
+ }
16973
+
16841
16974
  /**
16842
16975
  * @internal
16843
16976
  */
@@ -16861,6 +16994,7 @@ class Fin extends events.EventEmitter {
16861
16994
  this.Interop = new InteropModule(wire);
16862
16995
  this.SnapshotSource = new SnapshotSourceModule(wire);
16863
16996
  this.NotificationManager = new NotificationManagerModule(wire);
16997
+ this.ChromeBrowser = new ChromeBrowserModule(wire, wire.me.entityType === 'window');
16864
16998
  wire.registerFin(this);
16865
16999
  this.me = getMe(wire);
16866
17000
  // Handle disconnect events