@ixon-cdk/iframe-adapter 1.11.0 → 1.12.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,54 +1,59 @@
1
- var k = Object.defineProperty;
2
- var B = (t, e, a) => e in t ? k(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
3
- var u = (t, e, a) => (B(t, typeof e != "symbol" ? e + "" : e, a), a);
4
- const l = "cdk:cmpctx:", s = {
1
+ var Z = Object.defineProperty;
2
+ var ee = (t, e, n) => e in t ? Z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var y = (t, e, n) => (ee(t, typeof e != "symbol" ? e + "" : e, n), n);
4
+ const c = "cdk:cmpctx:", o = {
5
5
  // Lifecycle
6
- Create: `${l}create`,
7
- Created: `${l}created`,
8
- Destroy: `${l}destroy`,
6
+ Create: `${c}create`,
7
+ Created: `${c}created`,
8
+ Destroy: `${c}destroy`,
9
9
  // BackendComponentClient
10
- BackendComponentClientCreate: `${l}bcc:create`,
11
- BackendComponentClientDestroy: `${l}bcc:destroy`,
12
- BackendComponentClientCall: `${l}bcc:call`,
13
- BackendComponentClientCallResult: `${l}bcc:callresult`,
10
+ BackendComponentClientCreate: `${c}bcc:create`,
11
+ BackendComponentClientDestroy: `${c}bcc:destroy`,
12
+ BackendComponentClientCall: `${c}bcc:call`,
13
+ BackendComponentClientCallResult: `${c}bcc:callresult`,
14
14
  // LoggingDataClient
15
- LoggingDataClientCreate: `${l}ldc:create`,
16
- LoggingDataClientDestroy: `${l}ldc:destroy`,
17
- LoggingDataClientQuery: `${l}ldc:query`,
18
- LoggingDataClientQueryResult: `${l}ldc:queryresult`,
15
+ LoggingDataClientCreate: `${c}ldc:create`,
16
+ LoggingDataClientDestroy: `${c}ldc:destroy`,
17
+ LoggingDataClientQuery: `${c}ldc:query`,
18
+ LoggingDataClientQueryResult: `${c}ldc:queryresult`,
19
19
  // ResourceDataClient
20
- ResourceDataClientCreate: `${l}rdc:create`,
21
- ResourceDataClientDestroy: `${l}rdc:destroy`,
22
- ResourceDataClientQuery: `${l}rdc:query`,
23
- ResourceDataClientQueryResult: `${l}rdc:queryresult`,
24
- ResourceDataClientRender: `${l}rdc:render`,
25
- ResourceDataClientRenderResult: `${l}rdc:renderresult`,
26
- ResourceDataClientUpdate: `${l}rdc:update`,
27
- ResourceDataClientUpdated: `${l}rdc:updated`,
20
+ ResourceDataClientCreate: `${c}rdc:create`,
21
+ ResourceDataClientDestroy: `${c}rdc:destroy`,
22
+ ResourceDataClientQuery: `${c}rdc:query`,
23
+ ResourceDataClientQueryResult: `${c}rdc:queryresult`,
24
+ ResourceDataClientRender: `${c}rdc:render`,
25
+ ResourceDataClientRenderResult: `${c}rdc:renderresult`,
26
+ ResourceDataClientUpdate: `${c}rdc:update`,
27
+ ResourceDataClientUpdated: `${c}rdc:updated`,
28
+ // ActionMenu
29
+ OpenActionMenu: `${c}openactionmenu`,
30
+ OpenActionMenuResult: `${c}openactionmenuresult`,
28
31
  // ActionBottomSheet
29
- OpenActionBottomSheet: `${l}openactionbottomsheet`,
30
- OpenActionBottomSheetResult: `${l}openactionbottomsheetresult`,
32
+ OpenActionBottomSheet: `${c}openactionbottomsheet`,
33
+ OpenActionBottomSheetResult: `${c}openactionbottomsheetresult`,
31
34
  // Dialogs
32
- OpenAlertDialog: `${l}openalertdialog`,
33
- OpenAlertDialogResult: `${l}openalertdialogresult`,
34
- OpenConfirmDialog: `${l}openconfirmdialog`,
35
- OpenConfirmDialogResult: `${l}openconfirmdialogresult`,
36
- OpenFormDialog: `${l}openformdialog`,
37
- OpenFormDialogResult: `${l}openformdialogresult`,
35
+ OpenAlertDialog: `${c}openalertdialog`,
36
+ OpenAlertDialogResult: `${c}openalertdialogresult`,
37
+ OpenConfirmDialog: `${c}openconfirmdialog`,
38
+ OpenConfirmDialogResult: `${c}openconfirmdialogresult`,
39
+ OpenContentDialog: `${c}opencontentdialog`,
40
+ OpenContentDialogResult: `${c}opencontentdialogresult`,
41
+ OpenFormDialog: `${c}openformdialog`,
42
+ OpenFormDialogResult: `${c}openformdialogresult`,
38
43
  // VPN
39
- ShowVpnStatusDetails: `${l}showvpnstatusdetails`,
40
- ToggleVpn: `${l}togglevpn`,
41
- VpnClientStatusChange: `${l}vpnclientstatuschange`,
44
+ ShowVpnStatusDetails: `${c}showvpnstatusdetails`,
45
+ ToggleVpn: `${c}togglevpn`,
46
+ VpnClientStatusChange: `${c}vpnclientstatuschange`,
42
47
  // Miscellaneous
43
- NavigateByUrl: `${l}navigatebyurl`,
44
- SetTimeRange: `${l}settimerange`,
45
- TimeRangeChange: `${l}timerangechange`
48
+ NavigateByUrl: `${c}navigatebyurl`,
49
+ SetTimeRange: `${c}settimerange`,
50
+ TimeRangeChange: `${c}timerangechange`
46
51
  };
47
- function at({ iframe: t, context: e }) {
48
- return window.addEventListener("message", n, !1), e.ontimerangechange = (...r) => {
52
+ function Ot({ iframe: t, context: e }) {
53
+ return window.addEventListener("message", a, !1), e.ontimerangechange = (...r) => {
49
54
  t.contentWindow && t.contentWindow.postMessage(
50
55
  {
51
- type: s.TimeRangeChange,
56
+ type: o.TimeRangeChange,
52
57
  payload: r
53
58
  },
54
59
  "*"
@@ -56,17 +61,17 @@ function at({ iframe: t, context: e }) {
56
61
  }, e.onvpnclientstatuschange = (...r) => {
57
62
  t.contentWindow && t.contentWindow.postMessage(
58
63
  {
59
- type: s.VpnClientStatusChange,
64
+ type: o.VpnClientStatusChange,
60
65
  payload: r
61
66
  },
62
67
  "*"
63
68
  );
64
69
  }, {
65
70
  destroy() {
66
- window.removeEventListener("message", n, !1);
71
+ window.removeEventListener("message", a, !1);
67
72
  }
68
73
  };
69
- function a(r) {
74
+ function n(r) {
70
75
  return {
71
76
  _apiLinkEntries: [...r._getApiLinks().entries()],
72
77
  appData: r.appData,
@@ -79,214 +84,234 @@ function at({ iframe: t, context: e }) {
79
84
  vpnClientStatus: r.vpnClientStatus
80
85
  };
81
86
  }
82
- function n(r) {
83
- if (n._clients = n._clients || /* @__PURE__ */ new Map([]), r.source === t.contentWindow)
87
+ function a(r) {
88
+ if (a._clients = a._clients || /* @__PURE__ */ new Map([]), r.source === t.contentWindow)
84
89
  switch (r.data.type) {
85
- case s.Create:
90
+ case o.Create:
86
91
  t.contentWindow.postMessage(
87
92
  {
88
- type: s.Created,
89
- payload: a(e)
93
+ type: o.Created,
94
+ payload: n(e)
90
95
  },
91
96
  "*"
92
97
  );
93
98
  break;
94
- case s.Destroy:
99
+ case o.Destroy:
95
100
  e.destroy();
96
101
  break;
97
- case s.BackendComponentClientCreate: {
98
- const { clientId: o } = r.data.payload, i = e.createBackendComponentClient(o);
99
- n._clients.set(o, i);
102
+ case o.BackendComponentClientCreate: {
103
+ const { clientId: i } = r.data.payload, l = e.createBackendComponentClient(i);
104
+ a._clients.set(i, l);
100
105
  break;
101
106
  }
102
- case s.BackendComponentClientDestroy: {
103
- const { clientId: o } = r.data.payload;
104
- n._clients.has(o) && (n._clients.get(o).destroy(), n._clients.delete(o));
107
+ case o.BackendComponentClientDestroy: {
108
+ const { clientId: i } = r.data.payload;
109
+ a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
105
110
  break;
106
111
  }
107
- case s.BackendComponentClientCall: {
108
- const { clientId: o, callId: i, functionName: c, functionArguments: d } = r.data.payload;
109
- let p = n._clients.get(o);
110
- p && !p._destroyed && p.call(c, d).then((b) => {
111
- p && !p.destroyed && t.contentWindow.postMessage(
112
+ case o.BackendComponentClientCall: {
113
+ const { clientId: i, callId: l, functionName: p, functionArguments: d } = r.data.payload;
114
+ let g = a._clients.get(i);
115
+ g && !g._destroyed && g.call(p, d).then((N) => {
116
+ g && !g.destroyed && t.contentWindow.postMessage(
112
117
  {
113
- type: s.BackendComponentClientCallResult,
114
- payload: { callId: i, result: b }
118
+ type: o.BackendComponentClientCallResult,
119
+ payload: { callId: l, result: N }
115
120
  },
116
121
  "*"
117
122
  );
118
123
  });
119
124
  break;
120
125
  }
121
- case s.LoggingDataClientCreate: {
122
- const { clientId: o } = r.data.payload, i = e.createLoggingDataClient(o);
123
- n._clients.set(o, i);
126
+ case o.LoggingDataClientCreate: {
127
+ const { clientId: i } = r.data.payload, l = e.createLoggingDataClient(i);
128
+ a._clients.set(i, l);
124
129
  break;
125
130
  }
126
- case s.LoggingDataClientDestroy: {
127
- const { clientId: o } = r.data.payload;
128
- n._clients.has(o) && (n._clients.get(o).destroy(), n._clients.delete(o));
131
+ case o.LoggingDataClientDestroy: {
132
+ const { clientId: i } = r.data.payload;
133
+ a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
129
134
  break;
130
135
  }
131
- case s.LoggingDataClientQuery: {
132
- const { clientId: o, queryId: i, query: c } = r.data.payload;
133
- let d = n._clients.get(o);
134
- d && !d._destroyed && d.query(c, (p) => {
136
+ case o.LoggingDataClientQuery: {
137
+ const { clientId: i, queryId: l, query: p } = r.data.payload;
138
+ let d = a._clients.get(i);
139
+ d && !d._destroyed && d.query(p, (g) => {
135
140
  d._destroyed || t.contentWindow.postMessage(
136
141
  {
137
- type: s.LoggingDataClientQueryResult,
138
- payload: { queryId: i, results: p }
142
+ type: o.LoggingDataClientQueryResult,
143
+ payload: { queryId: l, results: g }
139
144
  },
140
145
  "*"
141
146
  );
142
147
  });
143
148
  break;
144
149
  }
145
- case s.ResourceDataClientCreate: {
146
- const { clientId: o } = r.data.payload, i = e.createResourceDataClient(o);
147
- n._clients.set(o, i);
150
+ case o.ResourceDataClientCreate: {
151
+ const { clientId: i } = r.data.payload, l = e.createResourceDataClient(i);
152
+ a._clients.set(i, l);
148
153
  break;
149
154
  }
150
- case s.ResourceDataClientDestroy: {
151
- const { clientId: o } = r.data.payload;
152
- n._clients.has(o) && (n._clients.get(o).destroy(), n._clients.delete(o));
155
+ case o.ResourceDataClientDestroy: {
156
+ const { clientId: i } = r.data.payload;
157
+ a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
153
158
  break;
154
159
  }
155
- case s.ResourceDataClientQuery: {
156
- const { clientId: o, queryId: i, query: c } = r.data.payload;
157
- let d = n._clients.get(o);
158
- d && !d._destroyed && d.query(c, (p) => {
160
+ case o.ResourceDataClientQuery: {
161
+ const { clientId: i, queryId: l, query: p } = r.data.payload;
162
+ let d = a._clients.get(i);
163
+ d && !d._destroyed && d.query(p, (g) => {
159
164
  d._destroyed || t.contentWindow.postMessage(
160
165
  {
161
- type: s.ResourceDataClientQueryResult,
162
- payload: { queryId: i, results: p }
166
+ type: o.ResourceDataClientQueryResult,
167
+ payload: { queryId: l, results: g }
163
168
  },
164
169
  "*"
165
170
  );
166
171
  });
167
172
  break;
168
173
  }
169
- case s.ResourceDataClientRender: {
170
- const { clientId: o, queryId: i, query: c } = r.data.payload;
171
- let d = n._clients.get(o);
172
- d && !d._destroyed && d.render(c, (p) => {
174
+ case o.ResourceDataClientRender: {
175
+ const { clientId: i, queryId: l, query: p } = r.data.payload;
176
+ let d = a._clients.get(i);
177
+ d && !d._destroyed && d.render(p, (g) => {
173
178
  d._destroyed || t.contentWindow.postMessage(
174
179
  {
175
- type: s.ResourceDataClientRenderResult,
176
- payload: { queryId: i, results: p }
180
+ type: o.ResourceDataClientRenderResult,
181
+ payload: { queryId: l, results: g }
177
182
  },
178
183
  "*"
179
184
  );
180
185
  });
181
186
  break;
182
187
  }
183
- case s.ResourceDataClientUpdate: {
184
- const { clientId: o, updateId: i, update: c } = r.data.payload;
185
- let d = n._clients.get(o);
186
- d && !d._destroyed && d.update(c).then(() => {
188
+ case o.ResourceDataClientUpdate: {
189
+ const { clientId: i, updateId: l, update: p } = r.data.payload;
190
+ let d = a._clients.get(i);
191
+ d && !d._destroyed && d.update(p).then(() => {
187
192
  d && !d._destroyed && t.contentWindow.postMessage(
188
193
  {
189
- type: s.ResourceDataClientUpdated,
190
- payload: { updateId: i }
194
+ type: o.ResourceDataClientUpdated,
195
+ payload: { updateId: l }
191
196
  },
192
197
  "*"
193
198
  );
194
199
  });
195
200
  break;
196
201
  }
197
- case s.OpenActionBottomSheet:
198
- e.openActionBottomSheet(r.data.payload.options).then((o) => {
199
- t.contentWindow.postMessage({ type: s.OpenActionBottomSheetResult, payload: { result: o } }, "*");
202
+ case o.OpenActionBottomSheet:
203
+ e.openActionBottomSheet(r.data.payload.options).then((i) => {
204
+ t.contentWindow.postMessage({ type: o.OpenActionBottomSheetResult, payload: { result: i } }, "*");
205
+ });
206
+ break;
207
+ case o.OpenActionMenu:
208
+ const s = t.contentDocument.querySelector(r.data.payload.selector), u = {
209
+ getBoundingClientRect: () => {
210
+ const i = t.getBoundingClientRect(), l = s.getBoundingClientRect();
211
+ return {
212
+ ...JSON.parse(JSON.stringify(l)),
213
+ top: i.top + l.top,
214
+ x: i.x + l.x
215
+ };
216
+ }
217
+ };
218
+ e.openActionMenu(u, r.data.payload.options).then((i) => {
219
+ t.contentWindow.postMessage({ type: o.OpenActionMenuResult, payload: { result: i } }, "*");
220
+ });
221
+ break;
222
+ case o.OpenAlertDialog:
223
+ e.openAlertDialog(r.data.payload.options).then((i) => {
224
+ t.contentWindow.postMessage({ type: o.OpenAlertDialogResult, payload: { result: i } }, "*");
200
225
  });
201
226
  break;
202
- case s.OpenAlertDialog:
203
- e.openAlertDialog(r.data.payload.options).then((o) => {
204
- t.contentWindow.postMessage({ type: s.OpenAlertDialogResult, payload: { result: o } }, "*");
227
+ case o.OpenConfirmDialog:
228
+ e.openConfirmDialog(r.data.payload.options).then((i) => {
229
+ t.contentWindow.postMessage({ type: o.OpenConfirmDialogResult, payload: { result: i } }, "*");
205
230
  });
206
231
  break;
207
- case s.OpenConfirmDialog:
208
- e.openConfirmDialog(r.data.payload.options).then((o) => {
209
- t.contentWindow.postMessage({ type: s.OpenConfirmDialogResult, payload: { result: o } }, "*");
232
+ case o.OpenContentDialog:
233
+ e.openContentDialog(r.data.payload.options).then((i) => {
234
+ t.contentWindow.postMessage({ type: o.OpenContentDialogResult, payload: { result: i } }, "*");
210
235
  });
211
236
  break;
212
- case s.OpenFormDialog:
213
- e.openFormDialog(r.data.payload.options).then((o) => {
214
- t.contentWindow.postMessage({ type: s.OpenFormDialogResult, payload: { result: o } }, "*");
237
+ case o.OpenFormDialog:
238
+ e.openFormDialog(r.data.payload.options).then((i) => {
239
+ t.contentWindow.postMessage({ type: o.OpenFormDialogResult, payload: { result: i } }, "*");
215
240
  });
216
241
  break;
217
- case s.ShowVpnStatusDetails:
242
+ case o.ShowVpnStatusDetails:
218
243
  e.showVpnStatusDetails(r.data.payload.agentId);
219
244
  break;
220
- case s.ToggleVpn:
245
+ case o.ToggleVpn:
221
246
  e.toggleVpn(r.data.payload.agentId);
222
247
  break;
223
- case s.NavigateByUrl:
248
+ case o.NavigateByUrl:
224
249
  e.navigateByUrl(r.data.payload.url);
225
250
  break;
226
- case s.SetTimeRange:
251
+ case o.SetTimeRange:
227
252
  e.setTimeRange(r.data.payload.timeRange);
228
253
  break;
229
254
  }
230
255
  }
231
256
  }
232
- class F {
233
- constructor(e, a, n, r) {
234
- this.query = e, this.variable = a, this.tag = n, this._onCancel = r, Object.freeze(this);
257
+ class te {
258
+ constructor(e, n, a, r) {
259
+ this.query = e, this.variable = n, this.tag = a, this._onCancel = r, Object.freeze(this);
235
260
  }
236
261
  cancel() {
237
262
  this._onCancel && this._onCancel();
238
263
  }
239
264
  }
240
- var V = typeof global == "object" && global && global.Object === Object && global;
241
- const P = V;
242
- var H = typeof self == "object" && self && self.Object === Object && self, N = P || H || Function("return this")();
243
- const $ = N;
244
- var W = $.Symbol;
245
- const _ = W;
246
- var E = Object.prototype, Q = E.hasOwnProperty, z = E.toString, w = _ ? _.toStringTag : void 0;
247
- function G(t) {
248
- var e = Q.call(t, w), a = t[w];
265
+ var ne = typeof global == "object" && global && global.Object === Object && global;
266
+ const ae = ne;
267
+ var re = typeof self == "object" && self && self.Object === Object && self, oe = ae || re || Function("return this")();
268
+ const q = oe;
269
+ var se = q.Symbol;
270
+ const S = se;
271
+ var H = Object.prototype, ie = H.hasOwnProperty, le = H.toString, _ = S ? S.toStringTag : void 0;
272
+ function ce(t) {
273
+ var e = ie.call(t, _), n = t[_];
249
274
  try {
250
- t[w] = void 0;
251
- var n = !0;
275
+ t[_] = void 0;
276
+ var a = !0;
252
277
  } catch {
253
278
  }
254
- var r = z.call(t);
255
- return n && (e ? t[w] = a : delete t[w]), r;
279
+ var r = le.call(t);
280
+ return a && (e ? t[_] = n : delete t[_]), r;
256
281
  }
257
- var J = Object.prototype, K = J.toString;
258
- function X(t) {
259
- return K.call(t);
282
+ var de = Object.prototype, ue = de.toString;
283
+ function pe(t) {
284
+ return ue.call(t);
260
285
  }
261
- var Y = "[object Null]", Z = "[object Undefined]", O = _ ? _.toStringTag : void 0;
262
- function x(t) {
263
- return t == null ? t === void 0 ? Z : Y : O && O in Object(t) ? G(t) : X(t);
286
+ var ge = "[object Null]", ye = "[object Undefined]", j = S ? S.toStringTag : void 0;
287
+ function fe(t) {
288
+ return t == null ? t === void 0 ? ye : ge : j && j in Object(t) ? ce(t) : pe(t);
264
289
  }
265
- function U(t) {
290
+ function W(t) {
266
291
  var e = typeof t;
267
292
  return t != null && (e == "object" || e == "function");
268
293
  }
269
- var ee = "[object AsyncFunction]", te = "[object Function]", ae = "[object GeneratorFunction]", ne = "[object Proxy]";
270
- function re(t) {
271
- if (!U(t))
294
+ var he = "[object AsyncFunction]", me = "[object Function]", we = "[object GeneratorFunction]", Ce = "[object Proxy]";
295
+ function _e(t) {
296
+ if (!W(t))
272
297
  return !1;
273
- var e = x(t);
274
- return e == te || e == ae || e == ee || e == ne;
298
+ var e = fe(t);
299
+ return e == me || e == we || e == he || e == Ce;
275
300
  }
276
- var oe = $["__core-js_shared__"];
277
- const I = oe;
278
- var L = function() {
279
- var t = /[^.]+$/.exec(I && I.keys && I.keys.IE_PROTO || "");
301
+ var De = q["__core-js_shared__"];
302
+ const E = De;
303
+ var B = function() {
304
+ var t = /[^.]+$/.exec(E && E.keys && E.keys.IE_PROTO || "");
280
305
  return t ? "Symbol(src)_1." + t : "";
281
306
  }();
282
- function se(t) {
283
- return !!L && L in t;
307
+ function Re(t) {
308
+ return !!B && B in t;
284
309
  }
285
- var ie = Function.prototype, le = ie.toString;
286
- function de(t) {
310
+ var be = Function.prototype, ve = be.toString;
311
+ function Se(t) {
287
312
  if (t != null) {
288
313
  try {
289
- return le.call(t);
314
+ return ve.call(t);
290
315
  } catch {
291
316
  }
292
317
  try {
@@ -296,166 +321,166 @@ function de(t) {
296
321
  }
297
322
  return "";
298
323
  }
299
- var ce = /[\\^$.*+?()[\]{}|]/g, pe = /^\[object .+?Constructor\]$/, ue = Function.prototype, ge = Object.prototype, ye = ue.toString, he = ge.hasOwnProperty, fe = RegExp(
300
- "^" + ye.call(he).replace(ce, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
324
+ var Oe = /[\\^$.*+?()[\]{}|]/g, $e = /^\[object .+?Constructor\]$/, Me = Function.prototype, Ie = Object.prototype, Ee = Me.toString, Le = Ie.hasOwnProperty, Te = RegExp(
325
+ "^" + Ee.call(Le).replace(Oe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
301
326
  );
302
- function we(t) {
303
- if (!U(t) || se(t))
327
+ function qe(t) {
328
+ if (!W(t) || Re(t))
304
329
  return !1;
305
- var e = re(t) ? fe : pe;
306
- return e.test(de(t));
330
+ var e = _e(t) ? Te : $e;
331
+ return e.test(Se(t));
307
332
  }
308
- function me(t, e) {
333
+ function Ae(t, e) {
309
334
  return t == null ? void 0 : t[e];
310
335
  }
311
- function q(t, e) {
312
- var a = me(t, e);
313
- return we(a) ? a : void 0;
336
+ function z(t, e) {
337
+ var n = Ae(t, e);
338
+ return qe(n) ? n : void 0;
314
339
  }
315
- function _e(t, e) {
340
+ function Ue(t, e) {
316
341
  return t === e || t !== t && e !== e;
317
342
  }
318
- var Ce = q(Object, "create");
319
- const m = Ce;
320
- function De() {
321
- this.__data__ = m ? m(null) : {}, this.size = 0;
343
+ var Ne = z(Object, "create");
344
+ const D = Ne;
345
+ function je() {
346
+ this.__data__ = D ? D(null) : {}, this.size = 0;
322
347
  }
323
- function Re(t) {
348
+ function Be(t) {
324
349
  var e = this.has(t) && delete this.__data__[t];
325
350
  return this.size -= e ? 1 : 0, e;
326
351
  }
327
- var be = "__lodash_hash_undefined__", Ie = Object.prototype, ve = Ie.hasOwnProperty;
328
- function $e(t) {
352
+ var ke = "__lodash_hash_undefined__", Fe = Object.prototype, Pe = Fe.hasOwnProperty;
353
+ function Ve(t) {
329
354
  var e = this.__data__;
330
- if (m) {
331
- var a = e[t];
332
- return a === be ? void 0 : a;
355
+ if (D) {
356
+ var n = e[t];
357
+ return n === ke ? void 0 : n;
333
358
  }
334
- return ve.call(e, t) ? e[t] : void 0;
359
+ return Pe.call(e, t) ? e[t] : void 0;
335
360
  }
336
- var Se = Object.prototype, Oe = Se.hasOwnProperty;
337
- function Le(t) {
361
+ var He = Object.prototype, We = He.hasOwnProperty;
362
+ function ze(t) {
338
363
  var e = this.__data__;
339
- return m ? e[t] !== void 0 : Oe.call(e, t);
340
- }
341
- var Me = "__lodash_hash_undefined__";
342
- function Ee(t, e) {
343
- var a = this.__data__;
344
- return this.size += this.has(t) ? 0 : 1, a[t] = m && e === void 0 ? Me : e, this;
345
- }
346
- function g(t) {
347
- var e = -1, a = t == null ? 0 : t.length;
348
- for (this.clear(); ++e < a; ) {
349
- var n = t[e];
350
- this.set(n[0], n[1]);
351
- }
352
- }
353
- g.prototype.clear = De;
354
- g.prototype.delete = Re;
355
- g.prototype.get = $e;
356
- g.prototype.has = Le;
357
- g.prototype.set = Ee;
358
- function Ue() {
364
+ return D ? e[t] !== void 0 : We.call(e, t);
365
+ }
366
+ var Qe = "__lodash_hash_undefined__";
367
+ function Ge(t, e) {
368
+ var n = this.__data__;
369
+ return this.size += this.has(t) ? 0 : 1, n[t] = D && e === void 0 ? Qe : e, this;
370
+ }
371
+ function m(t) {
372
+ var e = -1, n = t == null ? 0 : t.length;
373
+ for (this.clear(); ++e < n; ) {
374
+ var a = t[e];
375
+ this.set(a[0], a[1]);
376
+ }
377
+ }
378
+ m.prototype.clear = je;
379
+ m.prototype.delete = Be;
380
+ m.prototype.get = Ve;
381
+ m.prototype.has = ze;
382
+ m.prototype.set = Ge;
383
+ function Je() {
359
384
  this.__data__ = [], this.size = 0;
360
385
  }
361
- function C(t, e) {
362
- for (var a = t.length; a--; )
363
- if (_e(t[a][0], e))
364
- return a;
386
+ function O(t, e) {
387
+ for (var n = t.length; n--; )
388
+ if (Ue(t[n][0], e))
389
+ return n;
365
390
  return -1;
366
391
  }
367
- var qe = Array.prototype, Te = qe.splice;
368
- function Ae(t) {
369
- var e = this.__data__, a = C(e, t);
370
- if (a < 0)
392
+ var Ke = Array.prototype, Xe = Ke.splice;
393
+ function xe(t) {
394
+ var e = this.__data__, n = O(e, t);
395
+ if (n < 0)
371
396
  return !1;
372
- var n = e.length - 1;
373
- return a == n ? e.pop() : Te.call(e, a, 1), --this.size, !0;
374
- }
375
- function je(t) {
376
- var e = this.__data__, a = C(e, t);
377
- return a < 0 ? void 0 : e[a][1];
378
- }
379
- function ke(t) {
380
- return C(this.__data__, t) > -1;
381
- }
382
- function Be(t, e) {
383
- var a = this.__data__, n = C(a, t);
384
- return n < 0 ? (++this.size, a.push([t, e])) : a[n][1] = e, this;
385
- }
386
- function f(t) {
387
- var e = -1, a = t == null ? 0 : t.length;
388
- for (this.clear(); ++e < a; ) {
389
- var n = t[e];
390
- this.set(n[0], n[1]);
391
- }
392
- }
393
- f.prototype.clear = Ue;
394
- f.prototype.delete = Ae;
395
- f.prototype.get = je;
396
- f.prototype.has = ke;
397
- f.prototype.set = Be;
398
- var Fe = q($, "Map");
399
- const Ve = Fe;
400
- function Pe() {
397
+ var a = e.length - 1;
398
+ return n == a ? e.pop() : Xe.call(e, n, 1), --this.size, !0;
399
+ }
400
+ function Ye(t) {
401
+ var e = this.__data__, n = O(e, t);
402
+ return n < 0 ? void 0 : e[n][1];
403
+ }
404
+ function Ze(t) {
405
+ return O(this.__data__, t) > -1;
406
+ }
407
+ function et(t, e) {
408
+ var n = this.__data__, a = O(n, t);
409
+ return a < 0 ? (++this.size, n.push([t, e])) : n[a][1] = e, this;
410
+ }
411
+ function C(t) {
412
+ var e = -1, n = t == null ? 0 : t.length;
413
+ for (this.clear(); ++e < n; ) {
414
+ var a = t[e];
415
+ this.set(a[0], a[1]);
416
+ }
417
+ }
418
+ C.prototype.clear = Je;
419
+ C.prototype.delete = xe;
420
+ C.prototype.get = Ye;
421
+ C.prototype.has = Ze;
422
+ C.prototype.set = et;
423
+ var tt = z(q, "Map");
424
+ const nt = tt;
425
+ function at() {
401
426
  this.size = 0, this.__data__ = {
402
- hash: new g(),
403
- map: new (Ve || f)(),
404
- string: new g()
427
+ hash: new m(),
428
+ map: new (nt || C)(),
429
+ string: new m()
405
430
  };
406
431
  }
407
- function He(t) {
432
+ function rt(t) {
408
433
  var e = typeof t;
409
434
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
410
435
  }
411
- function D(t, e) {
412
- var a = t.__data__;
413
- return He(e) ? a[typeof e == "string" ? "string" : "hash"] : a.map;
436
+ function $(t, e) {
437
+ var n = t.__data__;
438
+ return rt(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
414
439
  }
415
- function Ne(t) {
416
- var e = D(this, t).delete(t);
440
+ function ot(t) {
441
+ var e = $(this, t).delete(t);
417
442
  return this.size -= e ? 1 : 0, e;
418
443
  }
419
- function We(t) {
420
- return D(this, t).get(t);
444
+ function st(t) {
445
+ return $(this, t).get(t);
421
446
  }
422
- function Qe(t) {
423
- return D(this, t).has(t);
447
+ function it(t) {
448
+ return $(this, t).has(t);
424
449
  }
425
- function ze(t, e) {
426
- var a = D(this, t), n = a.size;
427
- return a.set(t, e), this.size += a.size == n ? 0 : 1, this;
450
+ function lt(t, e) {
451
+ var n = $(this, t), a = n.size;
452
+ return n.set(t, e), this.size += n.size == a ? 0 : 1, this;
428
453
  }
429
- function y(t) {
430
- var e = -1, a = t == null ? 0 : t.length;
431
- for (this.clear(); ++e < a; ) {
432
- var n = t[e];
433
- this.set(n[0], n[1]);
454
+ function w(t) {
455
+ var e = -1, n = t == null ? 0 : t.length;
456
+ for (this.clear(); ++e < n; ) {
457
+ var a = t[e];
458
+ this.set(a[0], a[1]);
434
459
  }
435
460
  }
436
- y.prototype.clear = Pe;
437
- y.prototype.delete = Ne;
438
- y.prototype.get = We;
439
- y.prototype.has = Qe;
440
- y.prototype.set = ze;
441
- var Ge = "Expected a function";
442
- function S(t, e) {
461
+ w.prototype.clear = at;
462
+ w.prototype.delete = ot;
463
+ w.prototype.get = st;
464
+ w.prototype.has = it;
465
+ w.prototype.set = lt;
466
+ var ct = "Expected a function";
467
+ function A(t, e) {
443
468
  if (typeof t != "function" || e != null && typeof e != "function")
444
- throw new TypeError(Ge);
445
- var a = function() {
446
- var n = arguments, r = e ? e.apply(this, n) : n[0], o = a.cache;
447
- if (o.has(r))
448
- return o.get(r);
449
- var i = t.apply(this, n);
450
- return a.cache = o.set(r, i) || o, i;
469
+ throw new TypeError(ct);
470
+ var n = function() {
471
+ var a = arguments, r = e ? e.apply(this, a) : a[0], s = n.cache;
472
+ if (s.has(r))
473
+ return s.get(r);
474
+ var u = t.apply(this, a);
475
+ return n.cache = s.set(r, u) || s, u;
451
476
  };
452
- return a.cache = new (S.Cache || y)(), a;
477
+ return n.cache = new (A.Cache || w)(), n;
453
478
  }
454
- S.Cache = y;
455
- const Je = 2, T = 1, A = "";
456
- class R {
457
- constructor(e, a, n) {
458
- this.locale = e, this.queryRef = a, this.rawValue = n;
479
+ A.Cache = w;
480
+ const dt = 2, Q = 1, G = "";
481
+ class M {
482
+ constructor(e, n, a) {
483
+ this.locale = e, this.queryRef = n, this.rawValue = a;
459
484
  }
460
485
  /**
461
486
  * Creates a LoggingDataValue.
@@ -464,19 +489,19 @@ class R {
464
489
  * @param queryRef a reference to the query that produced this value
465
490
  * @param rawValue the raw value
466
491
  */
467
- static create(e, a, n) {
468
- return a.query.postAggr === "count" ? new Ke(e, a, n) : new R(e, a, n);
492
+ static create(e, n, a) {
493
+ return n.query.postAggr === "count" ? new ut(e, n, a) : new M(e, n, a);
469
494
  }
470
- getDecimals(e = Je) {
495
+ getDecimals(e = dt) {
471
496
  return this.decimals ?? this.queryRef.query.decimals ?? e;
472
497
  }
473
498
  getFactor() {
474
- var e, a, n;
475
- return this.factor ?? this.queryRef.query.factor ?? ((a = (e = this.queryRef.tag) == null ? void 0 : e.variable) != null && a.factor ? parseFloat(this.queryRef.tag.variable.factor) : null) ?? ((n = this.queryRef.variable) != null && n.factor ? parseFloat(this.queryRef.variable.factor) : null) ?? T;
499
+ var e, n, a;
500
+ return this.factor ?? this.queryRef.query.factor ?? ((n = (e = this.queryRef.tag) == null ? void 0 : e.variable) != null && n.factor ? parseFloat(this.queryRef.tag.variable.factor) : null) ?? ((a = this.queryRef.variable) != null && a.factor ? parseFloat(this.queryRef.variable.factor) : null) ?? Q;
476
501
  }
477
502
  getUnit() {
478
- var e, a, n;
479
- return this.unit ?? this.queryRef.query.unit ?? ((a = (e = this.queryRef.tag) == null ? void 0 : e.variable) == null ? void 0 : a.unit) ?? ((n = this.queryRef.variable) == null ? void 0 : n.unit) ?? A;
503
+ var e, n, a;
504
+ return this.unit ?? this.queryRef.query.unit ?? ((n = (e = this.queryRef.tag) == null ? void 0 : e.variable) == null ? void 0 : n.unit) ?? ((a = this.queryRef.variable) == null ? void 0 : a.unit) ?? G;
480
505
  }
481
506
  setDecimals(e) {
482
507
  this.decimals = e;
@@ -492,69 +517,244 @@ class R {
492
517
  return this.rawValue;
493
518
  }
494
519
  toString() {
495
- var n, r, o, i;
496
- const e = this.locale ?? void 0, a = S((c, d, p, b) => {
497
- const j = {
520
+ var a, r, s, u;
521
+ const e = this.locale ?? void 0, n = A((i, l, p, d) => {
522
+ const g = {
498
523
  style: "decimal",
499
- minimumFractionDigits: Math.floor(d),
500
- maximumFractionDigits: Math.floor(d)
524
+ minimumFractionDigits: Math.floor(l),
525
+ maximumFractionDigits: Math.floor(l)
501
526
  };
502
- return `${new Intl.NumberFormat(b, j).format(c)}${p ? " " + p : ""}`;
527
+ return `${new Intl.NumberFormat(d, g).format(i)}${p ? " " + p : ""}`;
503
528
  });
504
- return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ? a(this.rawValue, this.getDecimals(0), this.unit ?? this.queryRef.query.unit, e) : ((n = this.queryRef.variable) == null ? void 0 : n.type) === "str" ? this.rawValue : ((r = this.queryRef.variable) == null ? void 0 : r.type) === "bool" ? this.rawValue ? "True" : "False" : ((o = this.queryRef.variable) == null ? void 0 : o.type) === "int" ? a(
529
+ return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ? n(this.rawValue, this.getDecimals(0), this.unit ?? this.queryRef.query.unit, e) : ((a = this.queryRef.variable) == null ? void 0 : a.type) === "str" ? this.rawValue : ((r = this.queryRef.variable) == null ? void 0 : r.type) === "bool" ? this.rawValue ? "True" : "False" : ((s = this.queryRef.variable) == null ? void 0 : s.type) === "int" ? n(
505
530
  this.rawValue,
506
531
  Number.isInteger(this.getFactor()) ? this.getDecimals(0) : this.getDecimals(),
507
532
  this.getUnit(),
508
533
  e
509
- ) : ((i = this.queryRef.variable) == null ? void 0 : i.type) === "float" ? a(this.rawValue, this.getDecimals(), this.getUnit(), e) : String(this.getValue());
534
+ ) : ((u = this.queryRef.variable) == null ? void 0 : u.type) === "float" ? n(this.rawValue, this.getDecimals(), this.getUnit(), e) : String(this.getValue());
510
535
  }
511
536
  }
512
- class Ke extends R {
537
+ class ut extends M {
513
538
  getFactor() {
514
- return this.factor ?? this.queryRef.query.factor ?? T;
539
+ return this.factor ?? this.queryRef.query.factor ?? Q;
515
540
  }
516
541
  getUnit() {
517
- return this.unit ?? this.queryRef.query.unit ?? A;
542
+ return this.unit ?? this.queryRef.query.unit ?? G;
518
543
  }
519
544
  }
520
- function M(t) {
521
- return t.map(({ queryRef: a, time: n, value: r }) => {
522
- const o = new F(a.query, a.variable, a.tag), i = R.create(r.locale, o, r.rawValue);
545
+ function k(t) {
546
+ return t.map(({ queryRef: n, time: a, value: r }) => {
547
+ const s = new te(n.query, n.variable, n.tag), u = M.create(r.locale, s, r.rawValue);
523
548
  return {
524
- queryRef: o,
525
- time: n,
526
- value: i
549
+ queryRef: s,
550
+ time: a,
551
+ value: u
527
552
  };
528
553
  });
529
554
  }
555
+ let f, U, J;
556
+ function pt(t, e) {
557
+ if (J = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
558
+ throw new Error("Can't generate CSS selector for non-element node type.");
559
+ if (t.tagName.toLowerCase() === "html")
560
+ return "html";
561
+ const n = {
562
+ root: document.body,
563
+ idName: (r) => !0,
564
+ className: (r) => !0,
565
+ tagName: (r) => !0,
566
+ attr: (r, s) => !1,
567
+ seedMinLength: 1,
568
+ optimizedMinLength: 2,
569
+ threshold: 1e3,
570
+ maxNumberOfTries: 1e4,
571
+ timeoutMs: void 0
572
+ };
573
+ f = { ...n, ...e }, U = gt(f.root, n);
574
+ let a = R(t, "all", () => R(t, "two", () => R(t, "one", () => R(t, "none"))));
575
+ if (a) {
576
+ const r = x(Y(a, t));
577
+ return r.length > 0 && (a = r[0]), I(a);
578
+ } else
579
+ throw new Error("Selector was not found.");
580
+ }
581
+ function gt(t, e) {
582
+ return t.nodeType === Node.DOCUMENT_NODE ? t : t === e.root ? t.ownerDocument : t;
583
+ }
584
+ function R(t, e, n) {
585
+ let a = null, r = [], s = t, u = 0;
586
+ for (; s; ) {
587
+ const i = (/* @__PURE__ */ new Date()).getTime() - J.getTime();
588
+ if (f.timeoutMs !== void 0 && i > f.timeoutMs)
589
+ throw new Error(`Timeout: Can't find a unique selector after ${i}ms`);
590
+ let l = v(yt(s)) || v(...ft(s)) || v(...ht(s)) || v(mt(s)) || [V()];
591
+ const p = wt(s);
592
+ if (e == "all")
593
+ p && (l = l.concat(l.filter(L).map((d) => b(d, p))));
594
+ else if (e == "two")
595
+ l = l.slice(0, 1), p && (l = l.concat(l.filter(L).map((d) => b(d, p))));
596
+ else if (e == "one") {
597
+ const [d] = l = l.slice(0, 1);
598
+ p && L(d) && (l = [b(d, p)]);
599
+ } else
600
+ e == "none" && (l = [V()], p && (l = [b(l[0], p)]));
601
+ for (let d of l)
602
+ d.level = u;
603
+ if (r.push(l), r.length >= f.seedMinLength && (a = F(r, n), a))
604
+ break;
605
+ s = s.parentElement, u++;
606
+ }
607
+ return a || (a = F(r, n)), !a && n ? n() : a;
608
+ }
609
+ function F(t, e) {
610
+ const n = x(X(t));
611
+ if (n.length > f.threshold)
612
+ return e ? e() : null;
613
+ for (let a of n)
614
+ if (K(a))
615
+ return a;
616
+ return null;
617
+ }
618
+ function I(t) {
619
+ let e = t[0], n = e.name;
620
+ for (let a = 1; a < t.length; a++) {
621
+ const r = t[a].level || 0;
622
+ e.level === r - 1 ? n = `${t[a].name} > ${n}` : n = `${t[a].name} ${n}`, e = t[a];
623
+ }
624
+ return n;
625
+ }
626
+ function P(t) {
627
+ return t.map((e) => e.penalty).reduce((e, n) => e + n, 0);
628
+ }
629
+ function K(t) {
630
+ const e = I(t);
631
+ switch (U.querySelectorAll(e).length) {
632
+ case 0:
633
+ throw new Error(`Can't select any node with this selector: ${e}`);
634
+ case 1:
635
+ return !0;
636
+ default:
637
+ return !1;
638
+ }
639
+ }
640
+ function yt(t) {
641
+ const e = t.getAttribute("id");
642
+ return e && f.idName(e) ? {
643
+ name: "#" + CSS.escape(e),
644
+ penalty: 0
645
+ } : null;
646
+ }
647
+ function ft(t) {
648
+ return Array.from(t.attributes).filter((n) => f.attr(n.name, n.value)).map((n) => ({
649
+ name: `[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,
650
+ penalty: 0.5
651
+ }));
652
+ }
653
+ function ht(t) {
654
+ return Array.from(t.classList).filter(f.className).map((n) => ({
655
+ name: "." + CSS.escape(n),
656
+ penalty: 1
657
+ }));
658
+ }
659
+ function mt(t) {
660
+ const e = t.tagName.toLowerCase();
661
+ return f.tagName(e) ? {
662
+ name: e,
663
+ penalty: 2
664
+ } : null;
665
+ }
666
+ function V() {
667
+ return {
668
+ name: "*",
669
+ penalty: 3
670
+ };
671
+ }
672
+ function wt(t) {
673
+ const e = t.parentNode;
674
+ if (!e)
675
+ return null;
676
+ let n = e.firstChild;
677
+ if (!n)
678
+ return null;
679
+ let a = 0;
680
+ for (; n && (n.nodeType === Node.ELEMENT_NODE && a++, n !== t); )
681
+ n = n.nextSibling;
682
+ return a;
683
+ }
684
+ function b(t, e) {
685
+ return {
686
+ name: t.name + `:nth-child(${e})`,
687
+ penalty: t.penalty + 1
688
+ };
689
+ }
690
+ function L(t) {
691
+ return t.name !== "html" && !t.name.startsWith("#");
692
+ }
693
+ function v(...t) {
694
+ const e = t.filter(Ct);
695
+ return e.length > 0 ? e : null;
696
+ }
697
+ function Ct(t) {
698
+ return t != null;
699
+ }
700
+ function* X(t, e = []) {
701
+ if (t.length > 0)
702
+ for (let n of t[0])
703
+ yield* X(t.slice(1, t.length), e.concat(n));
704
+ else
705
+ yield e;
706
+ }
707
+ function x(t) {
708
+ return [...t].sort((e, n) => P(e) - P(n));
709
+ }
710
+ function* Y(t, e, n = {
711
+ counter: 0,
712
+ visited: /* @__PURE__ */ new Map()
713
+ }) {
714
+ if (t.length > 2 && t.length > f.optimizedMinLength)
715
+ for (let a = 1; a < t.length - 1; a++) {
716
+ if (n.counter > f.maxNumberOfTries)
717
+ return;
718
+ n.counter += 1;
719
+ const r = [...t];
720
+ r.splice(a, 1);
721
+ const s = I(r);
722
+ if (n.visited.has(s))
723
+ return;
724
+ K(r) && _t(r, e) && (yield r, n.visited.set(s, !0), yield* Y(r, e, n));
725
+ }
726
+ }
727
+ function _t(t, e) {
728
+ return U.querySelector(I(t)) === e;
729
+ }
530
730
  class h extends Error {
531
- constructor() {
532
- super("Method is not implemented"), this.name = "NotImplementedError", this.message = "Method is not implemented", this.stack = "NotImplementedError: Method is not implemented";
731
+ constructor(e = "Method is not implemented") {
732
+ super(e), this.name = "NotImplementedError", this.message = e, this.stack = `NotImplementedError: ${e}`;
533
733
  }
534
734
  }
535
- class Xe {
735
+ class Dt {
536
736
  constructor(e) {
537
- u(this, "ontimerangechange", null);
538
- u(this, "onvpnclientstatuschange", null);
539
- u(this, "_getApiLinks");
540
- u(this, "appData");
541
- u(this, "componentBaseUrl");
542
- u(this, "destroyed");
543
- u(this, "mode");
544
- u(this, "inputs");
545
- u(this, "inputMap");
546
- u(this, "timeRange");
547
- u(this, "timeRangeIsAdjustable");
548
- u(this, "vpnClientStatus");
737
+ y(this, "ontimerangechange", null);
738
+ y(this, "onvpnclientstatuschange", null);
739
+ y(this, "_getApiLinks");
740
+ y(this, "appData");
741
+ y(this, "componentBaseUrl");
742
+ y(this, "destroyed");
743
+ y(this, "mode");
744
+ y(this, "inputs");
745
+ y(this, "inputMap");
746
+ y(this, "timeRange");
747
+ y(this, "timeRangeIsAdjustable");
748
+ y(this, "vpnClientStatus");
549
749
  this._getApiLinks = () => new Map(e._apiLinkEntries), this.appData = e.appData, this.componentBaseUrl = e.componentBaseUrl, this.destroyed = e.destroyed, this.mode = e.mode, this.inputs = e.inputs, this.inputMap = new Map(Object.entries(this.inputs)), this.timeRange = e.timeRange, this.timeRangeIsAdjustable = e.timeRangeIsAdjustable, this.vpnClientStatus = e.vpnClientStatus, this._messageHandler = this._messageHandler.bind(this), window.addEventListener("message", this._messageHandler, !1);
550
750
  }
551
751
  _messageHandler(e) {
552
752
  if (e.source === window.parent)
553
753
  switch (e.data.type) {
554
- case s.TimeRangeChange:
754
+ case o.TimeRangeChange:
555
755
  this.ontimerangechange && this.ontimerangechange(...e.data.payload);
556
756
  break;
557
- case s.VpnClientStatusChange:
757
+ case o.VpnClientStatusChange:
558
758
  this.onvpnclientstatuschange && this.onvpnclientstatuschange(...e.data.payload);
559
759
  break;
560
760
  }
@@ -563,21 +763,21 @@ class Xe {
563
763
  const e = crypto.randomUUID();
564
764
  return window.parent.postMessage(
565
765
  {
566
- type: s.BackendComponentClientCreate,
766
+ type: o.BackendComponentClientCreate,
567
767
  payload: { clientId: e }
568
768
  },
569
769
  "*"
570
- ), new Ye(e);
770
+ ), new Rt(e);
571
771
  }
572
772
  createLoggingDataClient() {
573
773
  const e = crypto.randomUUID();
574
774
  return window.parent.postMessage(
575
775
  {
576
- type: s.LoggingDataClientCreate,
776
+ type: o.LoggingDataClientCreate,
577
777
  payload: { clientId: e }
578
778
  },
579
779
  "*"
580
- ), new Ze(e);
780
+ ), new bt(e);
581
781
  }
582
782
  createObjectStorageClient() {
583
783
  throw new h();
@@ -586,71 +786,102 @@ class Xe {
586
786
  const e = crypto.randomUUID();
587
787
  return window.parent.postMessage(
588
788
  {
589
- type: s.ResourceDataClientCreate,
789
+ type: o.ResourceDataClientCreate,
590
790
  payload: { clientId: e }
591
791
  },
592
792
  "*"
593
- ), new xe(e);
793
+ ), new vt(e);
594
794
  }
595
795
  createTooltip() {
596
796
  throw new h();
597
797
  }
598
798
  destroy() {
599
- window.parent.postMessage({ type: s.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
799
+ window.parent.postMessage({ type: o.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
600
800
  }
601
- getApiUrl(e, a) {
602
- const n = this._getApiLinks().get(e);
603
- if (!n)
801
+ getApiUrl(e, n) {
802
+ const a = this._getApiLinks().get(e);
803
+ if (!a)
604
804
  throw new Error("IxApiError: entry not found");
605
- return a ? Object.keys(a).sort().reduce((r, o) => {
606
- if (r.includes(`{${o}}`))
607
- return r.replace(`{${o}}`, a[o]);
608
- const i = new URL(r);
609
- return i.searchParams.set(o, a[o]), decodeURIComponent(i.href);
610
- }, n.href) : n.href;
805
+ return n ? Object.keys(n).sort().reduce((r, s) => {
806
+ if (r.includes(`{${s}}`))
807
+ return r.replace(`{${s}}`, n[s]);
808
+ const u = new URL(r);
809
+ return u.searchParams.set(s, n[s]), decodeURIComponent(u.href);
810
+ }, a.href) : a.href;
611
811
  }
612
812
  navigateByUrl(e) {
613
- window.parent.postMessage({ type: s.NavigateByUrl, payload: { url: e } }, "*");
813
+ window.parent.postMessage({ type: o.NavigateByUrl, payload: { url: e } }, "*");
614
814
  }
615
815
  openActionBottomSheet(e) {
816
+ return new Promise((n) => {
817
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenActionBottomSheet, payload: { options: e } }, "*");
818
+ function a(r) {
819
+ r.source === window.parent && r.data.type === o.OpenActionBottomSheetResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
820
+ }
821
+ });
822
+ }
823
+ openActionMenu(e, n) {
616
824
  return new Promise((a) => {
617
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenActionBottomSheet, payload: { options: e } }, "*");
618
- function n(r) {
619
- r.source === window.parent && r.data.type === s.OpenActionBottomSheetResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
825
+ window.addEventListener("message", r, !1), window.parent.postMessage({ type: o.OpenActionMenu, payload: { selector: pt(e), options: n } }, "*");
826
+ function r(s) {
827
+ s.source === window.parent && s.data.type === o.OpenActionMenuResult && (window.removeEventListener("message", r, !1), a(s.data.payload.result));
620
828
  }
621
829
  });
622
830
  }
623
831
  openAlertDialog(e) {
624
- return new Promise((a) => {
625
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenAlertDialog, payload: { options: e } }, "*");
626
- function n(r) {
627
- r.source === window.parent && r.data.type === s.OpenAlertDialogResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
832
+ return new Promise((n) => {
833
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenAlertDialog, payload: { options: e } }, "*");
834
+ function a(r) {
835
+ r.source === window.parent && r.data.type === o.OpenAlertDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
628
836
  }
629
837
  });
630
838
  }
631
839
  openConfirmDialog(e) {
632
- return new Promise((a) => {
633
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenConfirmDialog, payload: { options: e } }, "*");
634
- function n(r) {
635
- r.source === window.parent && r.data.type === s.OpenConfirmDialogResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
840
+ return new Promise((n) => {
841
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenConfirmDialog, payload: { options: e } }, "*");
842
+ function a(r) {
843
+ r.source === window.parent && r.data.type === o.OpenConfirmDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
844
+ }
845
+ });
846
+ }
847
+ openContentDialog(e) {
848
+ if (typeof e.onopened == "function")
849
+ throw new h('The "onopened" option is not implemented');
850
+ if (typeof e.onclose == "function")
851
+ throw new h('The "onclose" option is not implemented');
852
+ return new Promise((n) => {
853
+ window.addEventListener("message", a, !1), window.parent.postMessage(
854
+ {
855
+ type: o.OpenContentDialog,
856
+ payload: {
857
+ options: e.htmlContent && typeof e.htmlContent != "string" ? { ...e, htmlContent: e.htmlContent.cloneNode(!0).outerHTML } : e
858
+ }
859
+ },
860
+ "*"
861
+ );
862
+ function a(r) {
863
+ r.source === window.parent && r.data.type === o.OpenContentDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
636
864
  }
637
865
  });
638
866
  }
639
867
  openFormDialog(e) {
640
- return new Promise((a) => {
641
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenFormDialog, payload: { options: e } }, "*");
642
- function n(r) {
643
- r.source === window.parent && r.data.type === s.OpenFormDialogResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
868
+ return new Promise((n) => {
869
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenFormDialog, payload: { options: e } }, "*");
870
+ function a(r) {
871
+ r.source === window.parent && r.data.type === o.OpenFormDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
644
872
  }
645
873
  });
646
874
  }
875
+ sanitizeHtml() {
876
+ throw new h();
877
+ }
647
878
  saveAsFile() {
648
879
  throw new h();
649
880
  }
650
881
  setTimeRange(e) {
651
882
  window.parent.postMessage(
652
883
  {
653
- type: s.SetTimeRange,
884
+ type: o.SetTimeRange,
654
885
  payload: { timeRange: e }
655
886
  },
656
887
  "*"
@@ -659,7 +890,7 @@ class Xe {
659
890
  showVpnStatusDetails(e) {
660
891
  window.parent.postMessage(
661
892
  {
662
- type: s.ShowVpnStatusDetails,
893
+ type: o.ShowVpnStatusDetails,
663
894
  payload: { agentId: e }
664
895
  },
665
896
  "*"
@@ -669,70 +900,70 @@ class Xe {
669
900
  throw new h();
670
901
  }
671
902
  toggleVpn(e) {
672
- window.parent.postMessage({ type: s.ToggleVpn, payload: { agentId: e } }, "*");
903
+ window.parent.postMessage({ type: o.ToggleVpn, payload: { agentId: e } }, "*");
673
904
  }
674
905
  translate() {
675
906
  throw new h();
676
907
  }
677
908
  }
678
- class Ye {
909
+ class Rt {
679
910
  constructor(e) {
680
911
  this.id = e;
681
912
  }
682
- call(e, a) {
683
- return new Promise((n) => {
913
+ call(e, n) {
914
+ return new Promise((a) => {
684
915
  const r = crypto.randomUUID();
685
- window.addEventListener("message", o, !1), window.parent.postMessage({
686
- type: s.BackendComponentClientCall,
916
+ window.addEventListener("message", s, !1), window.parent.postMessage({
917
+ type: o.BackendComponentClientCall,
687
918
  payload: {
688
919
  clientId: this.id,
689
920
  callId: r,
690
921
  functionName: e,
691
- functionArguments: a
922
+ functionArguments: n
692
923
  }
693
924
  });
694
- function o(i) {
695
- i.source === window.parent && i.data.type === s.BackendComponentClientCallResult && i.data.payload.callId === r && (window.removeEventListener("message", o, !1), n(i.data.payload.result));
925
+ function s(u) {
926
+ u.source === window.parent && u.data.type === o.BackendComponentClientCallResult && u.data.payload.callId === r && (window.removeEventListener("message", s, !1), a(u.data.payload.result));
696
927
  }
697
928
  });
698
929
  }
699
930
  destroy() {
700
931
  window.parent.postMessage(
701
932
  {
702
- type: s.BackendComponentClientDestroy,
933
+ type: o.BackendComponentClientDestroy,
703
934
  payload: { clientId: this.id }
704
935
  },
705
936
  "*"
706
937
  );
707
938
  }
708
939
  }
709
- class Ze {
940
+ class bt {
710
941
  constructor(e) {
711
942
  this.id = e;
712
943
  }
713
- query(e, a) {
714
- const n = crypto.randomUUID();
944
+ query(e, n) {
945
+ const a = crypto.randomUUID();
715
946
  return window.addEventListener("message", r, !1), window.parent.postMessage(
716
947
  {
717
- type: s.LoggingDataClientQuery,
718
- payload: { clientId: this.id, queryId: n, query: e }
948
+ type: o.LoggingDataClientQuery,
949
+ payload: { clientId: this.id, queryId: a, query: e }
719
950
  },
720
951
  "*"
721
952
  ), () => {
722
953
  window.removeEventListener("message", r, !1);
723
954
  };
724
- function r(o) {
725
- if (o.source === window.parent && o.data.type === s.LoggingDataClientQueryResult && o.data.payload.queryId === n) {
726
- const { results: i } = o.data.payload;
955
+ function r(s) {
956
+ if (s.source === window.parent && s.data.type === o.LoggingDataClientQueryResult && s.data.payload.queryId === a) {
957
+ const { results: u } = s.data.payload;
727
958
  if (e.length)
728
959
  if (!e.queries || e.format !== "csv") {
729
- const c = i.map((d) => M(d));
730
- a(c);
960
+ const i = u.map((l) => k(l));
961
+ n(i);
731
962
  } else
732
963
  throw new h();
733
964
  else {
734
- const c = M(i);
735
- a(c);
965
+ const i = k(u);
966
+ n(i);
736
967
  }
737
968
  }
738
969
  }
@@ -740,90 +971,90 @@ class Ze {
740
971
  destroy() {
741
972
  window.parent.postMessage(
742
973
  {
743
- type: s.LoggingDataClientDestroy,
974
+ type: o.LoggingDataClientDestroy,
744
975
  payload: { clientId: this.id }
745
976
  },
746
977
  "*"
747
978
  );
748
979
  }
749
980
  }
750
- class xe {
981
+ class vt {
751
982
  constructor(e) {
752
983
  this.id = e;
753
984
  }
754
- query(e, a) {
755
- const n = crypto.randomUUID();
985
+ query(e, n) {
986
+ const a = crypto.randomUUID();
756
987
  return window.addEventListener("message", r, !1), window.parent.postMessage(
757
988
  {
758
- type: s.ResourceDataClientQuery,
759
- payload: { clientId: this.id, queryId: n, query: e }
989
+ type: o.ResourceDataClientQuery,
990
+ payload: { clientId: this.id, queryId: a, query: e }
760
991
  },
761
992
  "*"
762
993
  ), () => {
763
994
  window.removeEventListener("message", r, !1);
764
995
  };
765
- function r(o) {
766
- o.source === window.parent && o.data.type === s.ResourceDataClientQueryResult && o.data.payload.queryId === n && a(o.data.payload.results);
996
+ function r(s) {
997
+ s.source === window.parent && s.data.type === o.ResourceDataClientQueryResult && s.data.payload.queryId === a && n(s.data.payload.results);
767
998
  }
768
999
  }
769
1000
  update(e) {
770
- return new Promise((a) => {
771
- const n = crypto.randomUUID();
1001
+ return new Promise((n) => {
1002
+ const a = crypto.randomUUID();
772
1003
  window.addEventListener("message", r, !1), window.parent.postMessage(
773
1004
  {
774
- type: s.ResourceDataClientUpdate,
775
- payload: { clientId: this.id, updateId: n, update: e }
1005
+ type: o.ResourceDataClientUpdate,
1006
+ payload: { clientId: this.id, updateId: a, update: e }
776
1007
  },
777
1008
  "*"
778
1009
  );
779
- function r(o) {
780
- o.source === window.parent && o.data.type === s.ResourceDataClientUpdated && o.data.payload.updateId === n && (window.removeEventListener("message", r, !1), a());
1010
+ function r(s) {
1011
+ s.source === window.parent && s.data.type === o.ResourceDataClientUpdated && s.data.payload.updateId === a && (window.removeEventListener("message", r, !1), n());
781
1012
  }
782
1013
  });
783
1014
  }
784
- render(e, a) {
785
- const n = crypto.randomUUID();
1015
+ render(e, n) {
1016
+ const a = crypto.randomUUID();
786
1017
  return window.addEventListener("message", r, !1), window.parent.postMessage(
787
1018
  {
788
- type: s.ResourceDataClientRender,
789
- payload: { clientId: this.id, queryId: n, query: e }
1019
+ type: o.ResourceDataClientRender,
1020
+ payload: { clientId: this.id, queryId: a, query: e }
790
1021
  },
791
1022
  "*"
792
1023
  ), () => {
793
1024
  window.removeEventListener("message", r, !1);
794
1025
  };
795
- function r(o) {
796
- o.source === window.parent && o.data.type === s.ResourceDataClientRenderResult && o.data.payload.queryId === n && a(o.data.payload.results);
1026
+ function r(s) {
1027
+ s.source === window.parent && s.data.type === o.ResourceDataClientRenderResult && s.data.payload.queryId === a && n(s.data.payload.results);
797
1028
  }
798
1029
  }
799
1030
  destroy() {
800
1031
  window.parent.postMessage(
801
1032
  {
802
- type: s.ResourceDataClientDestroy,
1033
+ type: o.ResourceDataClientDestroy,
803
1034
  payload: { clientId: this.id }
804
1035
  },
805
1036
  "*"
806
1037
  );
807
1038
  }
808
1039
  }
809
- function v(t) {
1040
+ function T(t) {
810
1041
  const e = !!(t && t.migrateInputs);
811
- return !e && v.__cache__ ? Promise.resolve(v.__cache__) : new Promise((a) => {
1042
+ return !e && T.__cache__ ? Promise.resolve(T.__cache__) : new Promise((n) => {
812
1043
  window.addEventListener(
813
1044
  "message",
814
- function n(r) {
815
- if (r.source === window.parent && r.data && r.data.type === s.Created) {
816
- let o = r.data.payload;
817
- e && (o.inputs = t.migrateInputs(o.inputs, null));
818
- const i = new Xe(o);
819
- a(i), e || (v.__cache__ = i), window.removeEventListener("message", n, !1);
1045
+ function a(r) {
1046
+ if (r.source === window.parent && r.data && r.data.type === o.Created) {
1047
+ let s = r.data.payload;
1048
+ e && (s.inputs = t.migrateInputs(s.inputs, null));
1049
+ const u = new Dt(s);
1050
+ n(u), e || (T.__cache__ = u), window.removeEventListener("message", a, !1);
820
1051
  }
821
1052
  },
822
1053
  !1
823
- ), window.parent.postMessage({ type: s.Create }, "*");
1054
+ ), window.parent.postMessage({ type: o.Create }, "*");
824
1055
  });
825
1056
  }
826
1057
  export {
827
- at as connect,
828
- v as getComponentContext
1058
+ Ot as connect,
1059
+ T as getComponentContext
829
1060
  };