@ixon-cdk/iframe-adapter 1.13.0-next.0 → 1.13.0-next.2
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 +174 -172
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Z = Object.defineProperty;
|
|
2
2
|
var ee = (t, e, n) => e in t ? Z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var y = (t, e, n) => (ee(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
-
const c = "cdk:cmpctx:",
|
|
4
|
+
const c = "cdk:cmpctx:", r = {
|
|
5
5
|
// Lifecycle
|
|
6
6
|
Create: `${c}create`,
|
|
7
7
|
Created: `${c}created`,
|
|
@@ -50,19 +50,19 @@ const c = "cdk:cmpctx:", o = {
|
|
|
50
50
|
TimeRangeChange: `${c}timerangechange`
|
|
51
51
|
};
|
|
52
52
|
function Ot({ iframe: t, context: e }) {
|
|
53
|
-
return window.addEventListener("message", a, !1), e.ontimerangechange = (...
|
|
53
|
+
return window.addEventListener("message", a, !1), e.ontimerangechange = (...o) => {
|
|
54
54
|
t.contentWindow && t.contentWindow.postMessage(
|
|
55
55
|
{
|
|
56
|
-
type:
|
|
57
|
-
payload:
|
|
56
|
+
type: r.TimeRangeChange,
|
|
57
|
+
payload: o
|
|
58
58
|
},
|
|
59
59
|
"*"
|
|
60
60
|
);
|
|
61
|
-
}, e.onvpnclientstatuschange = (...
|
|
61
|
+
}, e.onvpnclientstatuschange = (...o) => {
|
|
62
62
|
t.contentWindow && t.contentWindow.postMessage(
|
|
63
63
|
{
|
|
64
|
-
type:
|
|
65
|
-
payload:
|
|
64
|
+
type: r.VpnClientStatusChange,
|
|
65
|
+
payload: o
|
|
66
66
|
},
|
|
67
67
|
"*"
|
|
68
68
|
);
|
|
@@ -71,51 +71,51 @@ function Ot({ iframe: t, context: e }) {
|
|
|
71
71
|
window.removeEventListener("message", a, !1);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
function n(
|
|
74
|
+
function n(o) {
|
|
75
75
|
return {
|
|
76
|
-
_apiLinkEntries: [...
|
|
77
|
-
appData:
|
|
78
|
-
componentBaseUrl:
|
|
79
|
-
destroyed:
|
|
80
|
-
mode:
|
|
81
|
-
inputs:
|
|
82
|
-
timeRange:
|
|
83
|
-
timeRangeIsAdjustable:
|
|
84
|
-
vpnClientStatus:
|
|
76
|
+
_apiLinkEntries: [...o._getApiLinks().entries()],
|
|
77
|
+
appData: o.appData,
|
|
78
|
+
componentBaseUrl: o.componentBaseUrl,
|
|
79
|
+
destroyed: o.destroyed,
|
|
80
|
+
mode: o.mode,
|
|
81
|
+
inputs: o.inputs,
|
|
82
|
+
timeRange: o.timeRange,
|
|
83
|
+
timeRangeIsAdjustable: o.timeRangeIsAdjustable,
|
|
84
|
+
vpnClientStatus: o.vpnClientStatus
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function a(
|
|
88
|
-
if (a._clients = a._clients || /* @__PURE__ */ new Map([]),
|
|
89
|
-
switch (
|
|
90
|
-
case
|
|
87
|
+
function a(o) {
|
|
88
|
+
if (a._clients = a._clients || /* @__PURE__ */ new Map([]), o.source === t.contentWindow)
|
|
89
|
+
switch (o.data.type) {
|
|
90
|
+
case r.Create:
|
|
91
91
|
t.contentWindow.postMessage(
|
|
92
92
|
{
|
|
93
|
-
type:
|
|
93
|
+
type: r.Created,
|
|
94
94
|
payload: n(e)
|
|
95
95
|
},
|
|
96
96
|
"*"
|
|
97
97
|
);
|
|
98
98
|
break;
|
|
99
|
-
case
|
|
99
|
+
case r.Destroy:
|
|
100
100
|
e.destroy();
|
|
101
101
|
break;
|
|
102
|
-
case
|
|
103
|
-
const { clientId: i } =
|
|
102
|
+
case r.BackendComponentClientCreate: {
|
|
103
|
+
const { clientId: i } = o.data.payload, l = e.createBackendComponentClient(i);
|
|
104
104
|
a._clients.set(i, l);
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
|
-
case
|
|
108
|
-
const { clientId: i } =
|
|
107
|
+
case r.BackendComponentClientDestroy: {
|
|
108
|
+
const { clientId: i } = o.data.payload;
|
|
109
109
|
a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
|
|
110
110
|
break;
|
|
111
111
|
}
|
|
112
|
-
case
|
|
113
|
-
const { clientId: i, callId: l, functionName: p, functionArguments: d } =
|
|
112
|
+
case r.BackendComponentClientCall: {
|
|
113
|
+
const { clientId: i, callId: l, functionName: p, functionArguments: d } = o.data.payload;
|
|
114
114
|
let g = a._clients.get(i);
|
|
115
115
|
g && !g._destroyed && g.call(p, d).then((N) => {
|
|
116
116
|
g && !g.destroyed && t.contentWindow.postMessage(
|
|
117
117
|
{
|
|
118
|
-
type:
|
|
118
|
+
type: r.BackendComponentClientCallResult,
|
|
119
119
|
payload: { callId: l, result: N }
|
|
120
120
|
},
|
|
121
121
|
"*"
|
|
@@ -123,23 +123,23 @@ function Ot({ iframe: t, context: e }) {
|
|
|
123
123
|
});
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
|
-
case
|
|
127
|
-
const { clientId: i } =
|
|
126
|
+
case r.LoggingDataClientCreate: {
|
|
127
|
+
const { clientId: i } = o.data.payload, l = e.createLoggingDataClient(i);
|
|
128
128
|
a._clients.set(i, l);
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
|
-
case
|
|
132
|
-
const { clientId: i } =
|
|
131
|
+
case r.LoggingDataClientDestroy: {
|
|
132
|
+
const { clientId: i } = o.data.payload;
|
|
133
133
|
a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
|
|
134
134
|
break;
|
|
135
135
|
}
|
|
136
|
-
case
|
|
137
|
-
const { clientId: i, queryId: l, query: p } =
|
|
136
|
+
case r.LoggingDataClientQuery: {
|
|
137
|
+
const { clientId: i, queryId: l, query: p } = o.data.payload;
|
|
138
138
|
let d = a._clients.get(i);
|
|
139
139
|
d && !d._destroyed && d.query(p, (g) => {
|
|
140
140
|
d._destroyed || t.contentWindow.postMessage(
|
|
141
141
|
{
|
|
142
|
-
type:
|
|
142
|
+
type: r.LoggingDataClientQueryResult,
|
|
143
143
|
payload: { queryId: l, results: g }
|
|
144
144
|
},
|
|
145
145
|
"*"
|
|
@@ -147,23 +147,23 @@ function Ot({ iframe: t, context: e }) {
|
|
|
147
147
|
});
|
|
148
148
|
break;
|
|
149
149
|
}
|
|
150
|
-
case
|
|
151
|
-
const { clientId: i } =
|
|
150
|
+
case r.ResourceDataClientCreate: {
|
|
151
|
+
const { clientId: i } = o.data.payload, l = e.createResourceDataClient(i);
|
|
152
152
|
a._clients.set(i, l);
|
|
153
153
|
break;
|
|
154
154
|
}
|
|
155
|
-
case
|
|
156
|
-
const { clientId: i } =
|
|
155
|
+
case r.ResourceDataClientDestroy: {
|
|
156
|
+
const { clientId: i } = o.data.payload;
|
|
157
157
|
a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
|
|
158
158
|
break;
|
|
159
159
|
}
|
|
160
|
-
case
|
|
161
|
-
const { clientId: i, queryId: l, query: p } =
|
|
160
|
+
case r.ResourceDataClientQuery: {
|
|
161
|
+
const { clientId: i, queryId: l, query: p } = o.data.payload;
|
|
162
162
|
let d = a._clients.get(i);
|
|
163
163
|
d && !d._destroyed && d.query(p, (g) => {
|
|
164
164
|
d._destroyed || t.contentWindow.postMessage(
|
|
165
165
|
{
|
|
166
|
-
type:
|
|
166
|
+
type: r.ResourceDataClientQueryResult,
|
|
167
167
|
payload: { queryId: l, results: g }
|
|
168
168
|
},
|
|
169
169
|
"*"
|
|
@@ -171,13 +171,13 @@ function Ot({ iframe: t, context: e }) {
|
|
|
171
171
|
});
|
|
172
172
|
break;
|
|
173
173
|
}
|
|
174
|
-
case
|
|
175
|
-
const { clientId: i, queryId: l, query: p } =
|
|
174
|
+
case r.ResourceDataClientRender: {
|
|
175
|
+
const { clientId: i, queryId: l, query: p } = o.data.payload;
|
|
176
176
|
let d = a._clients.get(i);
|
|
177
177
|
d && !d._destroyed && d.render(p, (g) => {
|
|
178
178
|
d._destroyed || t.contentWindow.postMessage(
|
|
179
179
|
{
|
|
180
|
-
type:
|
|
180
|
+
type: r.ResourceDataClientRenderResult,
|
|
181
181
|
payload: { queryId: l, results: g }
|
|
182
182
|
},
|
|
183
183
|
"*"
|
|
@@ -185,13 +185,13 @@ function Ot({ iframe: t, context: e }) {
|
|
|
185
185
|
});
|
|
186
186
|
break;
|
|
187
187
|
}
|
|
188
|
-
case
|
|
189
|
-
const { clientId: i, updateId: l, update: p } =
|
|
188
|
+
case r.ResourceDataClientUpdate: {
|
|
189
|
+
const { clientId: i, updateId: l, update: p } = o.data.payload;
|
|
190
190
|
let d = a._clients.get(i);
|
|
191
191
|
d && !d._destroyed && d.update(p).then(() => {
|
|
192
192
|
d && !d._destroyed && t.contentWindow.postMessage(
|
|
193
193
|
{
|
|
194
|
-
type:
|
|
194
|
+
type: r.ResourceDataClientUpdated,
|
|
195
195
|
payload: { updateId: l }
|
|
196
196
|
},
|
|
197
197
|
"*"
|
|
@@ -199,13 +199,13 @@ function Ot({ iframe: t, context: e }) {
|
|
|
199
199
|
});
|
|
200
200
|
break;
|
|
201
201
|
}
|
|
202
|
-
case
|
|
203
|
-
e.openActionBottomSheet(
|
|
204
|
-
t.contentWindow.postMessage({ type:
|
|
202
|
+
case r.OpenActionBottomSheet:
|
|
203
|
+
e.openActionBottomSheet(o.data.payload.options).then((i) => {
|
|
204
|
+
t.contentWindow.postMessage({ type: r.OpenActionBottomSheetResult, payload: { result: i } }, "*");
|
|
205
205
|
});
|
|
206
206
|
break;
|
|
207
|
-
case
|
|
208
|
-
const s = t.contentDocument.querySelector(
|
|
207
|
+
case r.OpenActionMenu:
|
|
208
|
+
const s = t.contentDocument.querySelector(o.data.payload.selector), u = {
|
|
209
209
|
getBoundingClientRect: () => {
|
|
210
210
|
const i = t.getBoundingClientRect(), l = s.getBoundingClientRect();
|
|
211
211
|
return {
|
|
@@ -215,48 +215,48 @@ function Ot({ iframe: t, context: e }) {
|
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
e.openActionMenu(u,
|
|
219
|
-
t.contentWindow.postMessage({ type:
|
|
218
|
+
e.openActionMenu(u, o.data.payload.options).then((i) => {
|
|
219
|
+
t.contentWindow.postMessage({ type: r.OpenActionMenuResult, payload: { result: i } }, "*");
|
|
220
220
|
});
|
|
221
221
|
break;
|
|
222
|
-
case
|
|
223
|
-
e.openAlertDialog(
|
|
224
|
-
t.contentWindow.postMessage({ type:
|
|
222
|
+
case r.OpenAlertDialog:
|
|
223
|
+
e.openAlertDialog(o.data.payload.options).then((i) => {
|
|
224
|
+
t.contentWindow.postMessage({ type: r.OpenAlertDialogResult, payload: { result: i } }, "*");
|
|
225
225
|
});
|
|
226
226
|
break;
|
|
227
|
-
case
|
|
228
|
-
e.openConfirmDialog(
|
|
229
|
-
t.contentWindow.postMessage({ type:
|
|
227
|
+
case r.OpenConfirmDialog:
|
|
228
|
+
e.openConfirmDialog(o.data.payload.options).then((i) => {
|
|
229
|
+
t.contentWindow.postMessage({ type: r.OpenConfirmDialogResult, payload: { result: i } }, "*");
|
|
230
230
|
});
|
|
231
231
|
break;
|
|
232
|
-
case
|
|
233
|
-
e.openContentDialog(
|
|
234
|
-
t.contentWindow.postMessage({ type:
|
|
232
|
+
case r.OpenContentDialog:
|
|
233
|
+
e.openContentDialog(o.data.payload.options).then((i) => {
|
|
234
|
+
t.contentWindow.postMessage({ type: r.OpenContentDialogResult, payload: { result: i } }, "*");
|
|
235
235
|
});
|
|
236
236
|
break;
|
|
237
|
-
case
|
|
238
|
-
e.openFormDialog(
|
|
239
|
-
t.contentWindow.postMessage({ type:
|
|
237
|
+
case r.OpenFormDialog:
|
|
238
|
+
e.openFormDialog(o.data.payload.options).then((i) => {
|
|
239
|
+
t.contentWindow.postMessage({ type: r.OpenFormDialogResult, payload: { result: i } }, "*");
|
|
240
240
|
});
|
|
241
241
|
break;
|
|
242
|
-
case
|
|
243
|
-
e.showVpnStatusDetails(
|
|
242
|
+
case r.ShowVpnStatusDetails:
|
|
243
|
+
e.showVpnStatusDetails(o.data.payload.agentId);
|
|
244
244
|
break;
|
|
245
|
-
case
|
|
246
|
-
e.toggleVpn(
|
|
245
|
+
case r.ToggleVpn:
|
|
246
|
+
e.toggleVpn(o.data.payload.agentId);
|
|
247
247
|
break;
|
|
248
|
-
case
|
|
249
|
-
e.navigateByUrl(
|
|
248
|
+
case r.NavigateByUrl:
|
|
249
|
+
e.navigateByUrl(o.data.payload.url);
|
|
250
250
|
break;
|
|
251
|
-
case
|
|
252
|
-
e.setTimeRange(
|
|
251
|
+
case r.SetTimeRange:
|
|
252
|
+
e.setTimeRange(o.data.payload.timeRange);
|
|
253
253
|
break;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
class te {
|
|
258
|
-
constructor(e, n, a,
|
|
259
|
-
this.query = e, this.variable = n, this.tag = a, this._onCancel =
|
|
258
|
+
constructor(e, n, a, o) {
|
|
259
|
+
this.query = e, this.variable = n, this.tag = a, this._onCancel = o, Object.freeze(this);
|
|
260
260
|
}
|
|
261
261
|
cancel() {
|
|
262
262
|
this._onCancel && this._onCancel();
|
|
@@ -264,8 +264,8 @@ class te {
|
|
|
264
264
|
}
|
|
265
265
|
var ne = typeof global == "object" && global && global.Object === Object && global;
|
|
266
266
|
const ae = ne;
|
|
267
|
-
var
|
|
268
|
-
const q =
|
|
267
|
+
var oe = typeof self == "object" && self && self.Object === Object && self, re = ae || oe || Function("return this")();
|
|
268
|
+
const q = re;
|
|
269
269
|
var se = q.Symbol;
|
|
270
270
|
const S = se;
|
|
271
271
|
var H = Object.prototype, ie = H.hasOwnProperty, le = H.toString, _ = S ? S.toStringTag : void 0;
|
|
@@ -276,8 +276,8 @@ function ce(t) {
|
|
|
276
276
|
var a = !0;
|
|
277
277
|
} catch {
|
|
278
278
|
}
|
|
279
|
-
var
|
|
280
|
-
return a && (e ? t[_] = n : delete t[_]),
|
|
279
|
+
var o = le.call(t);
|
|
280
|
+
return a && (e ? t[_] = n : delete t[_]), o;
|
|
281
281
|
}
|
|
282
282
|
var de = Object.prototype, ue = de.toString;
|
|
283
283
|
function pe(t) {
|
|
@@ -429,15 +429,15 @@ function at() {
|
|
|
429
429
|
string: new m()
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function ot(t) {
|
|
433
433
|
var e = typeof t;
|
|
434
434
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
435
435
|
}
|
|
436
436
|
function $(t, e) {
|
|
437
437
|
var n = t.__data__;
|
|
438
|
-
return
|
|
438
|
+
return ot(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function rt(t) {
|
|
441
441
|
var e = $(this, t).delete(t);
|
|
442
442
|
return this.size -= e ? 1 : 0, e;
|
|
443
443
|
}
|
|
@@ -459,7 +459,7 @@ function w(t) {
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
w.prototype.clear = at;
|
|
462
|
-
w.prototype.delete =
|
|
462
|
+
w.prototype.delete = rt;
|
|
463
463
|
w.prototype.get = st;
|
|
464
464
|
w.prototype.has = it;
|
|
465
465
|
w.prototype.set = lt;
|
|
@@ -468,11 +468,11 @@ function A(t, e) {
|
|
|
468
468
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
469
469
|
throw new TypeError(ct);
|
|
470
470
|
var n = function() {
|
|
471
|
-
var a = arguments,
|
|
472
|
-
if (s.has(
|
|
473
|
-
return s.get(
|
|
471
|
+
var a = arguments, o = e ? e.apply(this, a) : a[0], s = n.cache;
|
|
472
|
+
if (s.has(o))
|
|
473
|
+
return s.get(o);
|
|
474
474
|
var u = t.apply(this, a);
|
|
475
|
-
return n.cache = s.set(
|
|
475
|
+
return n.cache = s.set(o, u) || s, u;
|
|
476
476
|
};
|
|
477
477
|
return n.cache = new (A.Cache || w)(), n;
|
|
478
478
|
}
|
|
@@ -517,7 +517,7 @@ class M {
|
|
|
517
517
|
return this.rawValue;
|
|
518
518
|
}
|
|
519
519
|
toString() {
|
|
520
|
-
var a,
|
|
520
|
+
var a, o, s, u;
|
|
521
521
|
const e = this.locale ?? void 0, n = A((i, l, p, d) => {
|
|
522
522
|
const g = {
|
|
523
523
|
style: "decimal",
|
|
@@ -526,7 +526,7 @@ class M {
|
|
|
526
526
|
};
|
|
527
527
|
return `${new Intl.NumberFormat(d, g).format(i)}${p ? " " + p : ""}`;
|
|
528
528
|
});
|
|
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 : ((
|
|
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 : ((o = this.queryRef.variable) == null ? void 0 : o.type) === "bool" ? this.rawValue ? "True" : "False" : ((s = this.queryRef.variable) == null ? void 0 : s.type) === "int" ? n(
|
|
530
530
|
this.rawValue,
|
|
531
531
|
Number.isInteger(this.getFactor()) ? this.getDecimals(0) : this.getDecimals(),
|
|
532
532
|
this.getUnit(),
|
|
@@ -543,8 +543,8 @@ class ut extends M {
|
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
function k(t) {
|
|
546
|
-
return t.map(({ queryRef: n, time: a, value:
|
|
547
|
-
const s = new te(n.query, n.variable, n.tag), u = M.create(
|
|
546
|
+
return t.map(({ queryRef: n, time: a, value: o }) => {
|
|
547
|
+
const s = new te(n.query, n.variable, n.tag), u = M.create(o.locale, s, o.rawValue);
|
|
548
548
|
return {
|
|
549
549
|
queryRef: s,
|
|
550
550
|
time: a,
|
|
@@ -560,10 +560,10 @@ function pt(t, e) {
|
|
|
560
560
|
return "html";
|
|
561
561
|
const n = {
|
|
562
562
|
root: document.body,
|
|
563
|
-
idName: (
|
|
564
|
-
className: (
|
|
565
|
-
tagName: (
|
|
566
|
-
attr: (
|
|
563
|
+
idName: (o) => !0,
|
|
564
|
+
className: (o) => !0,
|
|
565
|
+
tagName: (o) => !0,
|
|
566
|
+
attr: (o, s) => !1,
|
|
567
567
|
seedMinLength: 1,
|
|
568
568
|
optimizedMinLength: 2,
|
|
569
569
|
threshold: 1e3,
|
|
@@ -573,8 +573,8 @@ function pt(t, e) {
|
|
|
573
573
|
f = { ...n, ...e }, U = gt(f.root, n);
|
|
574
574
|
let a = R(t, "all", () => R(t, "two", () => R(t, "one", () => R(t, "none"))));
|
|
575
575
|
if (a) {
|
|
576
|
-
const
|
|
577
|
-
return
|
|
576
|
+
const o = x(Y(a, t));
|
|
577
|
+
return o.length > 0 && (a = o[0]), I(a);
|
|
578
578
|
} else
|
|
579
579
|
throw new Error("Selector was not found.");
|
|
580
580
|
}
|
|
@@ -582,7 +582,7 @@ function gt(t, e) {
|
|
|
582
582
|
return t.nodeType === Node.DOCUMENT_NODE ? t : t === e.root ? t.ownerDocument : t;
|
|
583
583
|
}
|
|
584
584
|
function R(t, e, n) {
|
|
585
|
-
let a = null,
|
|
585
|
+
let a = null, o = [], s = t, u = 0;
|
|
586
586
|
for (; s; ) {
|
|
587
587
|
const i = (/* @__PURE__ */ new Date()).getTime() - J.getTime();
|
|
588
588
|
if (f.timeoutMs !== void 0 && i > f.timeoutMs)
|
|
@@ -600,11 +600,11 @@ function R(t, e, n) {
|
|
|
600
600
|
e == "none" && (l = [V()], p && (l = [b(l[0], p)]));
|
|
601
601
|
for (let d of l)
|
|
602
602
|
d.level = u;
|
|
603
|
-
if (
|
|
603
|
+
if (o.push(l), o.length >= f.seedMinLength && (a = F(o, n), a))
|
|
604
604
|
break;
|
|
605
605
|
s = s.parentElement, u++;
|
|
606
606
|
}
|
|
607
|
-
return a || (a = F(
|
|
607
|
+
return a || (a = F(o, n)), !a && n ? n() : a;
|
|
608
608
|
}
|
|
609
609
|
function F(t, e) {
|
|
610
610
|
const n = x(X(t));
|
|
@@ -618,8 +618,8 @@ function F(t, e) {
|
|
|
618
618
|
function I(t) {
|
|
619
619
|
let e = t[0], n = e.name;
|
|
620
620
|
for (let a = 1; a < t.length; a++) {
|
|
621
|
-
const
|
|
622
|
-
e.level ===
|
|
621
|
+
const o = t[a].level || 0;
|
|
622
|
+
e.level === o - 1 ? n = `${t[a].name} > ${n}` : n = `${t[a].name} ${n}`, e = t[a];
|
|
623
623
|
}
|
|
624
624
|
return n;
|
|
625
625
|
}
|
|
@@ -716,12 +716,12 @@ function* Y(t, e, n = {
|
|
|
716
716
|
if (n.counter > f.maxNumberOfTries)
|
|
717
717
|
return;
|
|
718
718
|
n.counter += 1;
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
const s = I(
|
|
719
|
+
const o = [...t];
|
|
720
|
+
o.splice(a, 1);
|
|
721
|
+
const s = I(o);
|
|
722
722
|
if (n.visited.has(s))
|
|
723
723
|
return;
|
|
724
|
-
K(
|
|
724
|
+
K(o) && _t(o, e) && (yield o, n.visited.set(s, !0), yield* Y(o, e, n));
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
function _t(t, e) {
|
|
@@ -751,10 +751,10 @@ class Dt {
|
|
|
751
751
|
_messageHandler(e) {
|
|
752
752
|
if (e.source === window.parent)
|
|
753
753
|
switch (e.data.type) {
|
|
754
|
-
case
|
|
754
|
+
case r.TimeRangeChange:
|
|
755
755
|
this.ontimerangechange && this.ontimerangechange(...e.data.payload);
|
|
756
756
|
break;
|
|
757
|
-
case
|
|
757
|
+
case r.VpnClientStatusChange:
|
|
758
758
|
this.onvpnclientstatuschange && this.onvpnclientstatuschange(...e.data.payload);
|
|
759
759
|
break;
|
|
760
760
|
}
|
|
@@ -763,7 +763,7 @@ class Dt {
|
|
|
763
763
|
const e = crypto.randomUUID();
|
|
764
764
|
return window.parent.postMessage(
|
|
765
765
|
{
|
|
766
|
-
type:
|
|
766
|
+
type: r.BackendComponentClientCreate,
|
|
767
767
|
payload: { clientId: e }
|
|
768
768
|
},
|
|
769
769
|
"*"
|
|
@@ -773,7 +773,7 @@ class Dt {
|
|
|
773
773
|
const e = crypto.randomUUID();
|
|
774
774
|
return window.parent.postMessage(
|
|
775
775
|
{
|
|
776
|
-
type:
|
|
776
|
+
type: r.LoggingDataClientCreate,
|
|
777
777
|
payload: { clientId: e }
|
|
778
778
|
},
|
|
779
779
|
"*"
|
|
@@ -786,7 +786,7 @@ class Dt {
|
|
|
786
786
|
const e = crypto.randomUUID();
|
|
787
787
|
return window.parent.postMessage(
|
|
788
788
|
{
|
|
789
|
-
type:
|
|
789
|
+
type: r.ResourceDataClientCreate,
|
|
790
790
|
payload: { clientId: e }
|
|
791
791
|
},
|
|
792
792
|
"*"
|
|
@@ -796,51 +796,51 @@ class Dt {
|
|
|
796
796
|
throw new h();
|
|
797
797
|
}
|
|
798
798
|
destroy() {
|
|
799
|
-
window.parent.postMessage({ type:
|
|
799
|
+
window.parent.postMessage({ type: r.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
|
|
800
800
|
}
|
|
801
801
|
getApiUrl(e, n) {
|
|
802
802
|
const a = this._getApiLinks().get(e);
|
|
803
803
|
if (!a)
|
|
804
804
|
throw new Error("IxApiError: entry not found");
|
|
805
|
-
return n ? Object.keys(n).sort().reduce((
|
|
806
|
-
if (
|
|
807
|
-
return
|
|
808
|
-
const u = new URL(
|
|
805
|
+
return n ? Object.keys(n).sort().reduce((o, s) => {
|
|
806
|
+
if (o.includes(`{${s}}`))
|
|
807
|
+
return o.replace(`{${s}}`, n[s]);
|
|
808
|
+
const u = new URL(o);
|
|
809
809
|
return u.searchParams.set(s, n[s]), decodeURIComponent(u.href);
|
|
810
810
|
}, a.href) : a.href;
|
|
811
811
|
}
|
|
812
812
|
navigateByUrl(e) {
|
|
813
|
-
window.parent.postMessage({ type:
|
|
813
|
+
window.parent.postMessage({ type: r.NavigateByUrl, payload: { url: e } }, "*");
|
|
814
814
|
}
|
|
815
815
|
openActionBottomSheet(e) {
|
|
816
816
|
return new Promise((n) => {
|
|
817
|
-
window.addEventListener("message", a, !1), window.parent.postMessage({ type:
|
|
818
|
-
function a(
|
|
819
|
-
|
|
817
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: r.OpenActionBottomSheet, payload: { options: e } }, "*");
|
|
818
|
+
function a(o) {
|
|
819
|
+
o.source === window.parent && o.data.type === r.OpenActionBottomSheetResult && (window.removeEventListener("message", a, !1), n(o.data.payload.result));
|
|
820
820
|
}
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
823
|
openActionMenu(e, n) {
|
|
824
824
|
return new Promise((a) => {
|
|
825
|
-
window.addEventListener("message",
|
|
826
|
-
function
|
|
827
|
-
s.source === window.parent && s.data.type ===
|
|
825
|
+
window.addEventListener("message", o, !1), window.parent.postMessage({ type: r.OpenActionMenu, payload: { selector: pt(e), options: n } }, "*");
|
|
826
|
+
function o(s) {
|
|
827
|
+
s.source === window.parent && s.data.type === r.OpenActionMenuResult && (window.removeEventListener("message", o, !1), a(s.data.payload.result));
|
|
828
828
|
}
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
831
|
openAlertDialog(e) {
|
|
832
832
|
return new Promise((n) => {
|
|
833
|
-
window.addEventListener("message", a, !1), window.parent.postMessage({ type:
|
|
834
|
-
function a(
|
|
835
|
-
|
|
833
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: r.OpenAlertDialog, payload: { options: e } }, "*");
|
|
834
|
+
function a(o) {
|
|
835
|
+
o.source === window.parent && o.data.type === r.OpenAlertDialogResult && (window.removeEventListener("message", a, !1), n(o.data.payload.result));
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
839
|
openConfirmDialog(e) {
|
|
840
840
|
return new Promise((n) => {
|
|
841
|
-
window.addEventListener("message", a, !1), window.parent.postMessage({ type:
|
|
842
|
-
function a(
|
|
843
|
-
|
|
841
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: r.OpenConfirmDialog, payload: { options: e } }, "*");
|
|
842
|
+
function a(o) {
|
|
843
|
+
o.source === window.parent && o.data.type === r.OpenConfirmDialogResult && (window.removeEventListener("message", a, !1), n(o.data.payload.result));
|
|
844
844
|
}
|
|
845
845
|
});
|
|
846
846
|
}
|
|
@@ -849,26 +849,28 @@ class Dt {
|
|
|
849
849
|
throw new h('The "onopened" option is not implemented');
|
|
850
850
|
if (typeof e.onclose == "function")
|
|
851
851
|
throw new h('The "onclose" option is not implemented');
|
|
852
|
+
if (e.pagination)
|
|
853
|
+
throw new h('The "pagination" option is not implemented');
|
|
852
854
|
return new Promise((n) => {
|
|
853
855
|
window.addEventListener("message", a, !1), window.parent.postMessage(
|
|
854
856
|
{
|
|
855
|
-
type:
|
|
857
|
+
type: r.OpenContentDialog,
|
|
856
858
|
payload: {
|
|
857
859
|
options: e.htmlContent && typeof e.htmlContent != "string" ? { ...e, htmlContent: e.htmlContent.cloneNode(!0).outerHTML } : e
|
|
858
860
|
}
|
|
859
861
|
},
|
|
860
862
|
"*"
|
|
861
863
|
);
|
|
862
|
-
function a(
|
|
863
|
-
|
|
864
|
+
function a(o) {
|
|
865
|
+
o.source === window.parent && o.data.type === r.OpenContentDialogResult && (window.removeEventListener("message", a, !1), n(o.data.payload.result));
|
|
864
866
|
}
|
|
865
867
|
});
|
|
866
868
|
}
|
|
867
869
|
openFormDialog(e) {
|
|
868
870
|
return new Promise((n) => {
|
|
869
|
-
window.addEventListener("message", a, !1), window.parent.postMessage({ type:
|
|
870
|
-
function a(
|
|
871
|
-
|
|
871
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: r.OpenFormDialog, payload: { options: e } }, "*");
|
|
872
|
+
function a(o) {
|
|
873
|
+
o.source === window.parent && o.data.type === r.OpenFormDialogResult && (window.removeEventListener("message", a, !1), n(o.data.payload.result));
|
|
872
874
|
}
|
|
873
875
|
});
|
|
874
876
|
}
|
|
@@ -881,7 +883,7 @@ class Dt {
|
|
|
881
883
|
setTimeRange(e) {
|
|
882
884
|
window.parent.postMessage(
|
|
883
885
|
{
|
|
884
|
-
type:
|
|
886
|
+
type: r.SetTimeRange,
|
|
885
887
|
payload: { timeRange: e }
|
|
886
888
|
},
|
|
887
889
|
"*"
|
|
@@ -890,7 +892,7 @@ class Dt {
|
|
|
890
892
|
showVpnStatusDetails(e) {
|
|
891
893
|
window.parent.postMessage(
|
|
892
894
|
{
|
|
893
|
-
type:
|
|
895
|
+
type: r.ShowVpnStatusDetails,
|
|
894
896
|
payload: { agentId: e }
|
|
895
897
|
},
|
|
896
898
|
"*"
|
|
@@ -900,7 +902,7 @@ class Dt {
|
|
|
900
902
|
throw new h();
|
|
901
903
|
}
|
|
902
904
|
toggleVpn(e) {
|
|
903
|
-
window.parent.postMessage({ type:
|
|
905
|
+
window.parent.postMessage({ type: r.ToggleVpn, payload: { agentId: e } }, "*");
|
|
904
906
|
}
|
|
905
907
|
translate() {
|
|
906
908
|
throw new h();
|
|
@@ -912,25 +914,25 @@ class Rt {
|
|
|
912
914
|
}
|
|
913
915
|
call(e, n) {
|
|
914
916
|
return new Promise((a) => {
|
|
915
|
-
const
|
|
917
|
+
const o = crypto.randomUUID();
|
|
916
918
|
window.addEventListener("message", s, !1), window.parent.postMessage({
|
|
917
|
-
type:
|
|
919
|
+
type: r.BackendComponentClientCall,
|
|
918
920
|
payload: {
|
|
919
921
|
clientId: this.id,
|
|
920
|
-
callId:
|
|
922
|
+
callId: o,
|
|
921
923
|
functionName: e,
|
|
922
924
|
functionArguments: n
|
|
923
925
|
}
|
|
924
926
|
});
|
|
925
927
|
function s(u) {
|
|
926
|
-
u.source === window.parent && u.data.type ===
|
|
928
|
+
u.source === window.parent && u.data.type === r.BackendComponentClientCallResult && u.data.payload.callId === o && (window.removeEventListener("message", s, !1), a(u.data.payload.result));
|
|
927
929
|
}
|
|
928
930
|
});
|
|
929
931
|
}
|
|
930
932
|
destroy() {
|
|
931
933
|
window.parent.postMessage(
|
|
932
934
|
{
|
|
933
|
-
type:
|
|
935
|
+
type: r.BackendComponentClientDestroy,
|
|
934
936
|
payload: { clientId: this.id }
|
|
935
937
|
},
|
|
936
938
|
"*"
|
|
@@ -943,17 +945,17 @@ class bt {
|
|
|
943
945
|
}
|
|
944
946
|
query(e, n) {
|
|
945
947
|
const a = crypto.randomUUID();
|
|
946
|
-
return window.addEventListener("message",
|
|
948
|
+
return window.addEventListener("message", o, !1), window.parent.postMessage(
|
|
947
949
|
{
|
|
948
|
-
type:
|
|
950
|
+
type: r.LoggingDataClientQuery,
|
|
949
951
|
payload: { clientId: this.id, queryId: a, query: e }
|
|
950
952
|
},
|
|
951
953
|
"*"
|
|
952
954
|
), () => {
|
|
953
|
-
window.removeEventListener("message",
|
|
955
|
+
window.removeEventListener("message", o, !1);
|
|
954
956
|
};
|
|
955
|
-
function
|
|
956
|
-
if (s.source === window.parent && s.data.type ===
|
|
957
|
+
function o(s) {
|
|
958
|
+
if (s.source === window.parent && s.data.type === r.LoggingDataClientQueryResult && s.data.payload.queryId === a) {
|
|
957
959
|
const { results: u } = s.data.payload;
|
|
958
960
|
if (e.length)
|
|
959
961
|
if (!e.queries || e.format !== "csv") {
|
|
@@ -971,7 +973,7 @@ class bt {
|
|
|
971
973
|
destroy() {
|
|
972
974
|
window.parent.postMessage(
|
|
973
975
|
{
|
|
974
|
-
type:
|
|
976
|
+
type: r.LoggingDataClientDestroy,
|
|
975
977
|
payload: { clientId: this.id }
|
|
976
978
|
},
|
|
977
979
|
"*"
|
|
@@ -984,53 +986,53 @@ class vt {
|
|
|
984
986
|
}
|
|
985
987
|
query(e, n) {
|
|
986
988
|
const a = crypto.randomUUID();
|
|
987
|
-
return window.addEventListener("message",
|
|
989
|
+
return window.addEventListener("message", o, !1), window.parent.postMessage(
|
|
988
990
|
{
|
|
989
|
-
type:
|
|
991
|
+
type: r.ResourceDataClientQuery,
|
|
990
992
|
payload: { clientId: this.id, queryId: a, query: e }
|
|
991
993
|
},
|
|
992
994
|
"*"
|
|
993
995
|
), () => {
|
|
994
|
-
window.removeEventListener("message",
|
|
996
|
+
window.removeEventListener("message", o, !1);
|
|
995
997
|
};
|
|
996
|
-
function
|
|
997
|
-
s.source === window.parent && s.data.type ===
|
|
998
|
+
function o(s) {
|
|
999
|
+
s.source === window.parent && s.data.type === r.ResourceDataClientQueryResult && s.data.payload.queryId === a && n(s.data.payload.results);
|
|
998
1000
|
}
|
|
999
1001
|
}
|
|
1000
1002
|
update(e) {
|
|
1001
1003
|
return new Promise((n) => {
|
|
1002
1004
|
const a = crypto.randomUUID();
|
|
1003
|
-
window.addEventListener("message",
|
|
1005
|
+
window.addEventListener("message", o, !1), window.parent.postMessage(
|
|
1004
1006
|
{
|
|
1005
|
-
type:
|
|
1007
|
+
type: r.ResourceDataClientUpdate,
|
|
1006
1008
|
payload: { clientId: this.id, updateId: a, update: e }
|
|
1007
1009
|
},
|
|
1008
1010
|
"*"
|
|
1009
1011
|
);
|
|
1010
|
-
function
|
|
1011
|
-
s.source === window.parent && s.data.type ===
|
|
1012
|
+
function o(s) {
|
|
1013
|
+
s.source === window.parent && s.data.type === r.ResourceDataClientUpdated && s.data.payload.updateId === a && (window.removeEventListener("message", o, !1), n());
|
|
1012
1014
|
}
|
|
1013
1015
|
});
|
|
1014
1016
|
}
|
|
1015
1017
|
render(e, n) {
|
|
1016
1018
|
const a = crypto.randomUUID();
|
|
1017
|
-
return window.addEventListener("message",
|
|
1019
|
+
return window.addEventListener("message", o, !1), window.parent.postMessage(
|
|
1018
1020
|
{
|
|
1019
|
-
type:
|
|
1021
|
+
type: r.ResourceDataClientRender,
|
|
1020
1022
|
payload: { clientId: this.id, queryId: a, query: e }
|
|
1021
1023
|
},
|
|
1022
1024
|
"*"
|
|
1023
1025
|
), () => {
|
|
1024
|
-
window.removeEventListener("message",
|
|
1026
|
+
window.removeEventListener("message", o, !1);
|
|
1025
1027
|
};
|
|
1026
|
-
function
|
|
1027
|
-
s.source === window.parent && s.data.type ===
|
|
1028
|
+
function o(s) {
|
|
1029
|
+
s.source === window.parent && s.data.type === r.ResourceDataClientRenderResult && s.data.payload.queryId === a && n(s.data.payload.results);
|
|
1028
1030
|
}
|
|
1029
1031
|
}
|
|
1030
1032
|
destroy() {
|
|
1031
1033
|
window.parent.postMessage(
|
|
1032
1034
|
{
|
|
1033
|
-
type:
|
|
1035
|
+
type: r.ResourceDataClientDestroy,
|
|
1034
1036
|
payload: { clientId: this.id }
|
|
1035
1037
|
},
|
|
1036
1038
|
"*"
|
|
@@ -1042,16 +1044,16 @@ function T(t) {
|
|
|
1042
1044
|
return !e && T.__cache__ ? Promise.resolve(T.__cache__) : new Promise((n) => {
|
|
1043
1045
|
window.addEventListener(
|
|
1044
1046
|
"message",
|
|
1045
|
-
function a(
|
|
1046
|
-
if (
|
|
1047
|
-
let s =
|
|
1047
|
+
function a(o) {
|
|
1048
|
+
if (o.source === window.parent && o.data && o.data.type === r.Created) {
|
|
1049
|
+
let s = o.data.payload;
|
|
1048
1050
|
e && (s.inputs = t.migrateInputs(s.inputs, null));
|
|
1049
1051
|
const u = new Dt(s);
|
|
1050
1052
|
n(u), e || (T.__cache__ = u), window.removeEventListener("message", a, !1);
|
|
1051
1053
|
}
|
|
1052
1054
|
},
|
|
1053
1055
|
!1
|
|
1054
|
-
), window.parent.postMessage({ type:
|
|
1056
|
+
), window.parent.postMessage({ type: r.Create }, "*");
|
|
1055
1057
|
});
|
|
1056
1058
|
}
|
|
1057
1059
|
export {
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(g,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(g=typeof globalThis<"u"?globalThis:g||self,l(g["@ixon-cdk/iframe-adapter"]={}))})(this,function(g){"use strict";var St=Object.defineProperty;var Ot=(g,l,r)=>l in g?St(g,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):g[l]=r;var y=(g,l,r)=>(Ot(g,typeof l!="symbol"?l+"":l,r),r);const l="cdk:cmpctx:",r={Create:`${l}create`,Created:`${l}created`,Destroy:`${l}destroy`,BackendComponentClientCreate:`${l}bcc:create`,BackendComponentClientDestroy:`${l}bcc:destroy`,BackendComponentClientCall:`${l}bcc:call`,BackendComponentClientCallResult:`${l}bcc:callresult`,LoggingDataClientCreate:`${l}ldc:create`,LoggingDataClientDestroy:`${l}ldc:destroy`,LoggingDataClientQuery:`${l}ldc:query`,LoggingDataClientQueryResult:`${l}ldc:queryresult`,ResourceDataClientCreate:`${l}rdc:create`,ResourceDataClientDestroy:`${l}rdc:destroy`,ResourceDataClientQuery:`${l}rdc:query`,ResourceDataClientQueryResult:`${l}rdc:queryresult`,ResourceDataClientRender:`${l}rdc:render`,ResourceDataClientRenderResult:`${l}rdc:renderresult`,ResourceDataClientUpdate:`${l}rdc:update`,ResourceDataClientUpdated:`${l}rdc:updated`,OpenActionMenu:`${l}openactionmenu`,OpenActionMenuResult:`${l}openactionmenuresult`,OpenActionBottomSheet:`${l}openactionbottomsheet`,OpenActionBottomSheetResult:`${l}openactionbottomsheetresult`,OpenAlertDialog:`${l}openalertdialog`,OpenAlertDialogResult:`${l}openalertdialogresult`,OpenConfirmDialog:`${l}openconfirmdialog`,OpenConfirmDialogResult:`${l}openconfirmdialogresult`,OpenContentDialog:`${l}opencontentdialog`,OpenContentDialogResult:`${l}opencontentdialogresult`,OpenFormDialog:`${l}openformdialog`,OpenFormDialogResult:`${l}openformdialogresult`,ShowVpnStatusDetails:`${l}showvpnstatusdetails`,ToggleVpn:`${l}togglevpn`,VpnClientStatusChange:`${l}vpnclientstatuschange`,NavigateByUrl:`${l}navigatebyurl`,SetTimeRange:`${l}settimerange`,TimeRangeChange:`${l}timerangechange`};function ee({iframe:t,context:e}){return window.addEventListener("message",a,!1),e.ontimerangechange=(...o)=>{t.contentWindow&&t.contentWindow.postMessage({type:r.TimeRangeChange,payload:o},"*")},e.onvpnclientstatuschange=(...o)=>{t.contentWindow&&t.contentWindow.postMessage({type:r.VpnClientStatusChange,payload:o},"*")},{destroy(){window.removeEventListener("message",a,!1)}};function n(o){return{_apiLinkEntries:[...o._getApiLinks().entries()],appData:o.appData,componentBaseUrl:o.componentBaseUrl,destroyed:o.destroyed,mode:o.mode,inputs:o.inputs,timeRange:o.timeRange,timeRangeIsAdjustable:o.timeRangeIsAdjustable,vpnClientStatus:o.vpnClientStatus}}function a(o){if(a._clients=a._clients||new Map([]),o.source===t.contentWindow)switch(o.data.type){case r.Create:t.contentWindow.postMessage({type:r.Created,payload:n(e)},"*");break;case r.Destroy:e.destroy();break;case r.BackendComponentClientCreate:{const{clientId:i}=o.data.payload,d=e.createBackendComponentClient(i);a._clients.set(i,d);break}case r.BackendComponentClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.BackendComponentClientCall:{const{clientId:i,callId:d,functionName:p,functionArguments:c}=o.data.payload;let f=a._clients.get(i);f&&!f._destroyed&&f.call(p,c).then(Z=>{f&&!f.destroyed&&t.contentWindow.postMessage({type:r.BackendComponentClientCallResult,payload:{callId:d,result:Z}},"*")});break}case r.LoggingDataClientCreate:{const{clientId:i}=o.data.payload,d=e.createLoggingDataClient(i);a._clients.set(i,d);break}case r.LoggingDataClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.LoggingDataClientQuery:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.query(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.LoggingDataClientQueryResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientCreate:{const{clientId:i}=o.data.payload,d=e.createResourceDataClient(i);a._clients.set(i,d);break}case r.ResourceDataClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.ResourceDataClientQuery:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.query(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.ResourceDataClientQueryResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientRender:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.render(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.ResourceDataClientRenderResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientUpdate:{const{clientId:i,updateId:d,update:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.update(p).then(()=>{c&&!c._destroyed&&t.contentWindow.postMessage({type:r.ResourceDataClientUpdated,payload:{updateId:d}},"*")});break}case r.OpenActionBottomSheet:e.openActionBottomSheet(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenActionBottomSheetResult,payload:{result:i}},"*")});break;case r.OpenActionMenu:const s=t.contentDocument.querySelector(o.data.payload.selector),u={getBoundingClientRect:()=>{const i=t.getBoundingClientRect(),d=s.getBoundingClientRect();return{...JSON.parse(JSON.stringify(d)),top:i.top+d.top,x:i.x+d.x}}};e.openActionMenu(u,o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenActionMenuResult,payload:{result:i}},"*")});break;case r.OpenAlertDialog:e.openAlertDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenAlertDialogResult,payload:{result:i}},"*")});break;case r.OpenConfirmDialog:e.openConfirmDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenConfirmDialogResult,payload:{result:i}},"*")});break;case r.OpenContentDialog:e.openContentDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenContentDialogResult,payload:{result:i}},"*")});break;case r.OpenFormDialog:e.openFormDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenFormDialogResult,payload:{result:i}},"*")});break;case r.ShowVpnStatusDetails:e.showVpnStatusDetails(o.data.payload.agentId);break;case r.ToggleVpn:e.toggleVpn(o.data.payload.agentId);break;case r.NavigateByUrl:e.navigateByUrl(o.data.payload.url);break;case r.SetTimeRange:e.setTimeRange(o.data.payload.timeRange);break}}}class te{constructor(e,n,a,o){this.query=e,this.variable=n,this.tag=a,this._onCancel=o,Object.freeze(this)}cancel(){this._onCancel&&this._onCancel()}}var ne=typeof global=="object"&&global&&global.Object===Object&&global;const ae=ne;var oe=typeof self=="object"&&self&&self.Object===Object&&self,re=ae||oe||Function("return this")();const T=re;var se=T.Symbol;const b=se;var j=Object.prototype,ie=j.hasOwnProperty,le=j.toString,D=b?b.toStringTag:void 0;function de(t){var e=ie.call(t,D),n=t[D];try{t[D]=void 0;var a=!0}catch{}var o=le.call(t);return a&&(e?t[D]=n:delete t[D]),o}var ce=Object.prototype,ue=ce.toString;function pe(t){return ue.call(t)}var ge="[object Null]",fe="[object Undefined]",k=b?b.toStringTag:void 0;function ye(t){return t==null?t===void 0?fe:ge:k&&k in Object(t)?de(t):pe(t)}function B(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var he="[object AsyncFunction]",me="[object Function]",we="[object GeneratorFunction]",Ce="[object Proxy]";function _e(t){if(!B(t))return!1;var e=ye(t);return e==me||e==we||e==he||e==Ce}var De=T["__core-js_shared__"];const q=De;var F=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Re(t){return!!F&&F in t}var be=Function.prototype,ve=be.toString;function Se(t){if(t!=null){try{return ve.call(t)}catch{}try{return t+""}catch{}}return""}var Oe=/[\\^$.*+?()[\]{}|]/g,Me=/^\[object .+?Constructor\]$/,$e=Function.prototype,Ie=Object.prototype,Ee=$e.toString,Le=Ie.hasOwnProperty,Te=RegExp("^"+Ee.call(Le).replace(Oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qe(t){if(!B(t)||Re(t))return!1;var e=_e(t)?Te:Me;return e.test(Se(t))}function Ae(t,e){return t==null?void 0:t[e]}function P(t,e){var n=Ae(t,e);return qe(n)?n:void 0}function Ue(t,e){return t===e||t!==t&&e!==e}var Ne=P(Object,"create");const R=Ne;function je(){this.__data__=R?R(null):{},this.size=0}function ke(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Be="__lodash_hash_undefined__",Fe=Object.prototype,Pe=Fe.hasOwnProperty;function Ve(t){var e=this.__data__;if(R){var n=e[t];return n===Be?void 0:n}return Pe.call(e,t)?e[t]:void 0}var He=Object.prototype,We=He.hasOwnProperty;function ze(t){var e=this.__data__;return R?e[t]!==void 0:We.call(e,t)}var Qe="__lodash_hash_undefined__";function Ge(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=R&&e===void 0?Qe:e,this}function w(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}w.prototype.clear=je,w.prototype.delete=ke,w.prototype.get=Ve,w.prototype.has=ze,w.prototype.set=Ge;function Je(){this.__data__=[],this.size=0}function v(t,e){for(var n=t.length;n--;)if(Ue(t[n][0],e))return n;return-1}var Ke=Array.prototype,xe=Ke.splice;function Xe(t){var e=this.__data__,n=v(e,t);if(n<0)return!1;var a=e.length-1;return n==a?e.pop():xe.call(e,n,1),--this.size,!0}function Ye(t){var e=this.__data__,n=v(e,t);return n<0?void 0:e[n][1]}function Ze(t){return v(this.__data__,t)>-1}function et(t,e){var n=this.__data__,a=v(n,t);return a<0?(++this.size,n.push([t,e])):n[a][1]=e,this}function _(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}_.prototype.clear=Je,_.prototype.delete=Xe,_.prototype.get=Ye,_.prototype.has=Ze,_.prototype.set=et;var tt=P(T,"Map");const nt=tt;function at(){this.size=0,this.__data__={hash:new w,map:new(nt||_),string:new w}}function ot(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function S(t,e){var n=t.__data__;return ot(e)?n[typeof e=="string"?"string":"hash"]:n.map}function rt(t){var e=S(this,t).delete(t);return this.size-=e?1:0,e}function st(t){return S(this,t).get(t)}function it(t){return S(this,t).has(t)}function lt(t,e){var n=S(this,t),a=n.size;return n.set(t,e),this.size+=n.size==a?0:1,this}function C(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}C.prototype.clear=at,C.prototype.delete=rt,C.prototype.get=st,C.prototype.has=it,C.prototype.set=lt;var dt="Expected a function";function A(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(dt);var n=function(){var a=arguments,o=e?e.apply(this,a):a[0],s=n.cache;if(s.has(o))return s.get(o);var u=t.apply(this,a);return n.cache=s.set(o,u)||s,u};return n.cache=new(A.Cache||C),n}A.Cache=C;const ct=2,V=1,H="";class O{constructor(e,n,a){this.locale=e,this.queryRef=n,this.rawValue=a}static create(e,n,a){return n.query.postAggr==="count"?new ut(e,n,a):new O(e,n,a)}getDecimals(e=ct){return this.decimals??this.queryRef.query.decimals??e}getFactor(){var e,n,a;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)??V}getUnit(){var e,n,a;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)??H}setDecimals(e){this.decimals=e}setFactor(e){this.factor=e}setUnit(e){this.unit=e}getValue(){return this.rawValue}toString(){var a,o,s,u;const e=this.locale??void 0,n=A((i,d,p,c)=>{const f={style:"decimal",minimumFractionDigits:Math.floor(d),maximumFractionDigits:Math.floor(d)};return`${new Intl.NumberFormat(c,f).format(i)}${p?" "+p:""}`});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:((o=this.queryRef.variable)==null?void 0:o.type)==="bool"?this.rawValue?"True":"False":((s=this.queryRef.variable)==null?void 0:s.type)==="int"?n(this.rawValue,Number.isInteger(this.getFactor())?this.getDecimals(0):this.getDecimals(),this.getUnit(),e):((u=this.queryRef.variable)==null?void 0:u.type)==="float"?n(this.rawValue,this.getDecimals(),this.getUnit(),e):String(this.getValue())}}class ut extends O{getFactor(){return this.factor??this.queryRef.query.factor??V}getUnit(){return this.unit??this.queryRef.query.unit??H}}function W(t){return t.map(({queryRef:n,time:a,value:o})=>{const s=new te(n.query,n.variable,n.tag),u=O.create(o.locale,s,o.rawValue);return{queryRef:s,time:a,value:u}})}let h,U,z;function pt(t,e){if(z=new Date,t.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(t.tagName.toLowerCase()==="html")return"html";const n={root:document.body,idName:o=>!0,className:o=>!0,tagName:o=>!0,attr:(o,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};h={...n,...e},U=gt(h.root,n);let a=M(t,"all",()=>M(t,"two",()=>M(t,"one",()=>M(t,"none"))));if(a){const o=X(Y(a,t));return o.length>0&&(a=o[0]),$(a)}else throw new Error("Selector was not found.")}function gt(t,e){return t.nodeType===Node.DOCUMENT_NODE?t:t===e.root?t.ownerDocument:t}function M(t,e,n){let a=null,o=[],s=t,u=0;for(;s;){const i=new Date().getTime()-z.getTime();if(h.timeoutMs!==void 0&&i>h.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${i}ms`);let d=E(ft(s))||E(...yt(s))||E(...ht(s))||E(mt(s))||[K()];const p=wt(s);if(e=="all")p&&(d=d.concat(d.filter(N).map(c=>I(c,p))));else if(e=="two")d=d.slice(0,1),p&&(d=d.concat(d.filter(N).map(c=>I(c,p))));else if(e=="one"){const[c]=d=d.slice(0,1);p&&N(c)&&(d=[I(c,p)])}else e=="none"&&(d=[K()],p&&(d=[I(d[0],p)]));for(let c of d)c.level=u;if(o.push(d),o.length>=h.seedMinLength&&(a=Q(o,n),a))break;s=s.parentElement,u++}return a||(a=Q(o,n)),!a&&n?n():a}function Q(t,e){const n=X(x(t));if(n.length>h.threshold)return e?e():null;for(let a of n)if(J(a))return a;return null}function $(t){let e=t[0],n=e.name;for(let a=1;a<t.length;a++){const o=t[a].level||0;e.level===o-1?n=`${t[a].name} > ${n}`:n=`${t[a].name} ${n}`,e=t[a]}return n}function G(t){return t.map(e=>e.penalty).reduce((e,n)=>e+n,0)}function J(t){const e=$(t);switch(U.querySelectorAll(e).length){case 0:throw new Error(`Can't select any node with this selector: ${e}`);case 1:return!0;default:return!1}}function ft(t){const e=t.getAttribute("id");return e&&h.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null}function yt(t){return Array.from(t.attributes).filter(n=>h.attr(n.name,n.value)).map(n=>({name:`[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,penalty:.5}))}function ht(t){return Array.from(t.classList).filter(h.className).map(n=>({name:"."+CSS.escape(n),penalty:1}))}function mt(t){const e=t.tagName.toLowerCase();return h.tagName(e)?{name:e,penalty:2}:null}function K(){return{name:"*",penalty:3}}function wt(t){const e=t.parentNode;if(!e)return null;let n=e.firstChild;if(!n)return null;let a=0;for(;n&&(n.nodeType===Node.ELEMENT_NODE&&a++,n!==t);)n=n.nextSibling;return a}function I(t,e){return{name:t.name+`:nth-child(${e})`,penalty:t.penalty+1}}function N(t){return t.name!=="html"&&!t.name.startsWith("#")}function E(...t){const e=t.filter(Ct);return e.length>0?e:null}function Ct(t){return t!=null}function*x(t,e=[]){if(t.length>0)for(let n of t[0])yield*x(t.slice(1,t.length),e.concat(n));else yield e}function X(t){return[...t].sort((e,n)=>G(e)-G(n))}function*Y(t,e,n={counter:0,visited:new Map}){if(t.length>2&&t.length>h.optimizedMinLength)for(let a=1;a<t.length-1;a++){if(n.counter>h.maxNumberOfTries)return;n.counter+=1;const o=[...t];o.splice(a,1);const s=$(o);if(n.visited.has(s))return;J(o)&&_t(o,e)&&(yield o,n.visited.set(s,!0),yield*Y(o,e,n))}}function _t(t,e){return U.querySelector($(t))===e}class m extends Error{constructor(e="Method is not implemented"){super(e),this.name="NotImplementedError",this.message=e,this.stack=`NotImplementedError: ${e}`}}class Dt{constructor(e){y(this,"ontimerangechange",null);y(this,"onvpnclientstatuschange",null);y(this,"_getApiLinks");y(this,"appData");y(this,"componentBaseUrl");y(this,"destroyed");y(this,"mode");y(this,"inputs");y(this,"inputMap");y(this,"timeRange");y(this,"timeRangeIsAdjustable");y(this,"vpnClientStatus");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)}_messageHandler(e){if(e.source===window.parent)switch(e.data.type){case r.TimeRangeChange:this.ontimerangechange&&this.ontimerangechange(...e.data.payload);break;case r.VpnClientStatusChange:this.onvpnclientstatuschange&&this.onvpnclientstatuschange(...e.data.payload);break}}createBackendComponentClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.BackendComponentClientCreate,payload:{clientId:e}},"*"),new Rt(e)}createLoggingDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.LoggingDataClientCreate,payload:{clientId:e}},"*"),new bt(e)}createObjectStorageClient(){throw new m}createResourceDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.ResourceDataClientCreate,payload:{clientId:e}},"*"),new vt(e)}createTooltip(){throw new m}destroy(){window.parent.postMessage({type:r.Destroy},"*"),window.removeEventListener("message",this._messageHandler,!1),this.destroyed=!0}getApiUrl(e,n){const a=this._getApiLinks().get(e);if(!a)throw new Error("IxApiError: entry not found");return n?Object.keys(n).sort().reduce((o,s)=>{if(o.includes(`{${s}}`))return o.replace(`{${s}}`,n[s]);const u=new URL(o);return u.searchParams.set(s,n[s]),decodeURIComponent(u.href)},a.href):a.href}navigateByUrl(e){window.parent.postMessage({type:r.NavigateByUrl,payload:{url:e}},"*")}openActionBottomSheet(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenActionBottomSheet,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenActionBottomSheetResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openActionMenu(e,n){return new Promise(a=>{window.addEventListener("message",o,!1),window.parent.postMessage({type:r.OpenActionMenu,payload:{selector:pt(e),options:n}},"*");function o(s){s.source===window.parent&&s.data.type===r.OpenActionMenuResult&&(window.removeEventListener("message",o,!1),a(s.data.payload.result))}})}openAlertDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenAlertDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenAlertDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openConfirmDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenConfirmDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenConfirmDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openContentDialog(e){if(typeof e.onopened=="function")throw new m('The "onopened" option is not implemented');if(typeof e.onclose=="function")throw new m('The "onclose" option is not implemented');return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenContentDialog,payload:{options:e.htmlContent&&typeof e.htmlContent!="string"?{...e,htmlContent:e.htmlContent.cloneNode(!0).outerHTML}:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenContentDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openFormDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenFormDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenFormDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}sanitizeHtml(){throw new m}saveAsFile(){throw new m}setTimeRange(e){window.parent.postMessage({type:r.SetTimeRange,payload:{timeRange:e}},"*")}showVpnStatusDetails(e){window.parent.postMessage({type:r.ShowVpnStatusDetails,payload:{agentId:e}},"*")}testVpnAccess(){throw new m}toggleVpn(e){window.parent.postMessage({type:r.ToggleVpn,payload:{agentId:e}},"*")}translate(){throw new m}}class Rt{constructor(e){this.id=e}call(e,n){return new Promise(a=>{const o=crypto.randomUUID();window.addEventListener("message",s,!1),window.parent.postMessage({type:r.BackendComponentClientCall,payload:{clientId:this.id,callId:o,functionName:e,functionArguments:n}});function s(u){u.source===window.parent&&u.data.type===r.BackendComponentClientCallResult&&u.data.payload.callId===o&&(window.removeEventListener("message",s,!1),a(u.data.payload.result))}})}destroy(){window.parent.postMessage({type:r.BackendComponentClientDestroy,payload:{clientId:this.id}},"*")}}class bt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.LoggingDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){if(s.source===window.parent&&s.data.type===r.LoggingDataClientQueryResult&&s.data.payload.queryId===a){const{results:u}=s.data.payload;if(e.length)if(!e.queries||e.format!=="csv"){const i=u.map(d=>W(d));n(i)}else throw new m;else{const i=W(u);n(i)}}}}destroy(){window.parent.postMessage({type:r.LoggingDataClientDestroy,payload:{clientId:this.id}},"*")}}class vt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientQueryResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}update(e){return new Promise(n=>{const a=crypto.randomUUID();window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientUpdate,payload:{clientId:this.id,updateId:a,update:e}},"*");function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientUpdated&&s.data.payload.updateId===a&&(window.removeEventListener("message",o,!1),n())}})}render(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientRender,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientRenderResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}destroy(){window.parent.postMessage({type:r.ResourceDataClientDestroy,payload:{clientId:this.id}},"*")}}function L(t){const e=!!(t&&t.migrateInputs);return!e&&L.__cache__?Promise.resolve(L.__cache__):new Promise(n=>{window.addEventListener("message",function a(o){if(o.source===window.parent&&o.data&&o.data.type===r.Created){let s=o.data.payload;e&&(s.inputs=t.migrateInputs(s.inputs,null));const u=new Dt(s);n(u),e||(L.__cache__=u),window.removeEventListener("message",a,!1)}},!1),window.parent.postMessage({type:r.Create},"*")})}g.connect=ee,g.getComponentContext=L,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(g,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(g=typeof globalThis<"u"?globalThis:g||self,l(g["@ixon-cdk/iframe-adapter"]={}))})(this,function(g){"use strict";var St=Object.defineProperty;var Ot=(g,l,r)=>l in g?St(g,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):g[l]=r;var y=(g,l,r)=>(Ot(g,typeof l!="symbol"?l+"":l,r),r);const l="cdk:cmpctx:",r={Create:`${l}create`,Created:`${l}created`,Destroy:`${l}destroy`,BackendComponentClientCreate:`${l}bcc:create`,BackendComponentClientDestroy:`${l}bcc:destroy`,BackendComponentClientCall:`${l}bcc:call`,BackendComponentClientCallResult:`${l}bcc:callresult`,LoggingDataClientCreate:`${l}ldc:create`,LoggingDataClientDestroy:`${l}ldc:destroy`,LoggingDataClientQuery:`${l}ldc:query`,LoggingDataClientQueryResult:`${l}ldc:queryresult`,ResourceDataClientCreate:`${l}rdc:create`,ResourceDataClientDestroy:`${l}rdc:destroy`,ResourceDataClientQuery:`${l}rdc:query`,ResourceDataClientQueryResult:`${l}rdc:queryresult`,ResourceDataClientRender:`${l}rdc:render`,ResourceDataClientRenderResult:`${l}rdc:renderresult`,ResourceDataClientUpdate:`${l}rdc:update`,ResourceDataClientUpdated:`${l}rdc:updated`,OpenActionMenu:`${l}openactionmenu`,OpenActionMenuResult:`${l}openactionmenuresult`,OpenActionBottomSheet:`${l}openactionbottomsheet`,OpenActionBottomSheetResult:`${l}openactionbottomsheetresult`,OpenAlertDialog:`${l}openalertdialog`,OpenAlertDialogResult:`${l}openalertdialogresult`,OpenConfirmDialog:`${l}openconfirmdialog`,OpenConfirmDialogResult:`${l}openconfirmdialogresult`,OpenContentDialog:`${l}opencontentdialog`,OpenContentDialogResult:`${l}opencontentdialogresult`,OpenFormDialog:`${l}openformdialog`,OpenFormDialogResult:`${l}openformdialogresult`,ShowVpnStatusDetails:`${l}showvpnstatusdetails`,ToggleVpn:`${l}togglevpn`,VpnClientStatusChange:`${l}vpnclientstatuschange`,NavigateByUrl:`${l}navigatebyurl`,SetTimeRange:`${l}settimerange`,TimeRangeChange:`${l}timerangechange`};function ee({iframe:t,context:e}){return window.addEventListener("message",a,!1),e.ontimerangechange=(...o)=>{t.contentWindow&&t.contentWindow.postMessage({type:r.TimeRangeChange,payload:o},"*")},e.onvpnclientstatuschange=(...o)=>{t.contentWindow&&t.contentWindow.postMessage({type:r.VpnClientStatusChange,payload:o},"*")},{destroy(){window.removeEventListener("message",a,!1)}};function n(o){return{_apiLinkEntries:[...o._getApiLinks().entries()],appData:o.appData,componentBaseUrl:o.componentBaseUrl,destroyed:o.destroyed,mode:o.mode,inputs:o.inputs,timeRange:o.timeRange,timeRangeIsAdjustable:o.timeRangeIsAdjustable,vpnClientStatus:o.vpnClientStatus}}function a(o){if(a._clients=a._clients||new Map([]),o.source===t.contentWindow)switch(o.data.type){case r.Create:t.contentWindow.postMessage({type:r.Created,payload:n(e)},"*");break;case r.Destroy:e.destroy();break;case r.BackendComponentClientCreate:{const{clientId:i}=o.data.payload,d=e.createBackendComponentClient(i);a._clients.set(i,d);break}case r.BackendComponentClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.BackendComponentClientCall:{const{clientId:i,callId:d,functionName:p,functionArguments:c}=o.data.payload;let f=a._clients.get(i);f&&!f._destroyed&&f.call(p,c).then(Z=>{f&&!f.destroyed&&t.contentWindow.postMessage({type:r.BackendComponentClientCallResult,payload:{callId:d,result:Z}},"*")});break}case r.LoggingDataClientCreate:{const{clientId:i}=o.data.payload,d=e.createLoggingDataClient(i);a._clients.set(i,d);break}case r.LoggingDataClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.LoggingDataClientQuery:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.query(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.LoggingDataClientQueryResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientCreate:{const{clientId:i}=o.data.payload,d=e.createResourceDataClient(i);a._clients.set(i,d);break}case r.ResourceDataClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.ResourceDataClientQuery:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.query(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.ResourceDataClientQueryResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientRender:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.render(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.ResourceDataClientRenderResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientUpdate:{const{clientId:i,updateId:d,update:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.update(p).then(()=>{c&&!c._destroyed&&t.contentWindow.postMessage({type:r.ResourceDataClientUpdated,payload:{updateId:d}},"*")});break}case r.OpenActionBottomSheet:e.openActionBottomSheet(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenActionBottomSheetResult,payload:{result:i}},"*")});break;case r.OpenActionMenu:const s=t.contentDocument.querySelector(o.data.payload.selector),u={getBoundingClientRect:()=>{const i=t.getBoundingClientRect(),d=s.getBoundingClientRect();return{...JSON.parse(JSON.stringify(d)),top:i.top+d.top,x:i.x+d.x}}};e.openActionMenu(u,o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenActionMenuResult,payload:{result:i}},"*")});break;case r.OpenAlertDialog:e.openAlertDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenAlertDialogResult,payload:{result:i}},"*")});break;case r.OpenConfirmDialog:e.openConfirmDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenConfirmDialogResult,payload:{result:i}},"*")});break;case r.OpenContentDialog:e.openContentDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenContentDialogResult,payload:{result:i}},"*")});break;case r.OpenFormDialog:e.openFormDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenFormDialogResult,payload:{result:i}},"*")});break;case r.ShowVpnStatusDetails:e.showVpnStatusDetails(o.data.payload.agentId);break;case r.ToggleVpn:e.toggleVpn(o.data.payload.agentId);break;case r.NavigateByUrl:e.navigateByUrl(o.data.payload.url);break;case r.SetTimeRange:e.setTimeRange(o.data.payload.timeRange);break}}}class te{constructor(e,n,a,o){this.query=e,this.variable=n,this.tag=a,this._onCancel=o,Object.freeze(this)}cancel(){this._onCancel&&this._onCancel()}}var ne=typeof global=="object"&&global&&global.Object===Object&&global;const ae=ne;var oe=typeof self=="object"&&self&&self.Object===Object&&self,re=ae||oe||Function("return this")();const T=re;var se=T.Symbol;const b=se;var j=Object.prototype,ie=j.hasOwnProperty,le=j.toString,D=b?b.toStringTag:void 0;function de(t){var e=ie.call(t,D),n=t[D];try{t[D]=void 0;var a=!0}catch{}var o=le.call(t);return a&&(e?t[D]=n:delete t[D]),o}var ce=Object.prototype,ue=ce.toString;function pe(t){return ue.call(t)}var ge="[object Null]",fe="[object Undefined]",k=b?b.toStringTag:void 0;function ye(t){return t==null?t===void 0?fe:ge:k&&k in Object(t)?de(t):pe(t)}function B(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var he="[object AsyncFunction]",me="[object Function]",we="[object GeneratorFunction]",Ce="[object Proxy]";function _e(t){if(!B(t))return!1;var e=ye(t);return e==me||e==we||e==he||e==Ce}var De=T["__core-js_shared__"];const q=De;var F=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Re(t){return!!F&&F in t}var be=Function.prototype,ve=be.toString;function Se(t){if(t!=null){try{return ve.call(t)}catch{}try{return t+""}catch{}}return""}var Oe=/[\\^$.*+?()[\]{}|]/g,Me=/^\[object .+?Constructor\]$/,$e=Function.prototype,Ie=Object.prototype,Ee=$e.toString,Le=Ie.hasOwnProperty,Te=RegExp("^"+Ee.call(Le).replace(Oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qe(t){if(!B(t)||Re(t))return!1;var e=_e(t)?Te:Me;return e.test(Se(t))}function Ae(t,e){return t==null?void 0:t[e]}function P(t,e){var n=Ae(t,e);return qe(n)?n:void 0}function Ue(t,e){return t===e||t!==t&&e!==e}var Ne=P(Object,"create");const R=Ne;function je(){this.__data__=R?R(null):{},this.size=0}function ke(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Be="__lodash_hash_undefined__",Fe=Object.prototype,Pe=Fe.hasOwnProperty;function Ve(t){var e=this.__data__;if(R){var n=e[t];return n===Be?void 0:n}return Pe.call(e,t)?e[t]:void 0}var He=Object.prototype,We=He.hasOwnProperty;function ze(t){var e=this.__data__;return R?e[t]!==void 0:We.call(e,t)}var Qe="__lodash_hash_undefined__";function Ge(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=R&&e===void 0?Qe:e,this}function w(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}w.prototype.clear=je,w.prototype.delete=ke,w.prototype.get=Ve,w.prototype.has=ze,w.prototype.set=Ge;function Je(){this.__data__=[],this.size=0}function v(t,e){for(var n=t.length;n--;)if(Ue(t[n][0],e))return n;return-1}var Ke=Array.prototype,xe=Ke.splice;function Xe(t){var e=this.__data__,n=v(e,t);if(n<0)return!1;var a=e.length-1;return n==a?e.pop():xe.call(e,n,1),--this.size,!0}function Ye(t){var e=this.__data__,n=v(e,t);return n<0?void 0:e[n][1]}function Ze(t){return v(this.__data__,t)>-1}function et(t,e){var n=this.__data__,a=v(n,t);return a<0?(++this.size,n.push([t,e])):n[a][1]=e,this}function _(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}_.prototype.clear=Je,_.prototype.delete=Xe,_.prototype.get=Ye,_.prototype.has=Ze,_.prototype.set=et;var tt=P(T,"Map");const nt=tt;function at(){this.size=0,this.__data__={hash:new w,map:new(nt||_),string:new w}}function ot(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function S(t,e){var n=t.__data__;return ot(e)?n[typeof e=="string"?"string":"hash"]:n.map}function rt(t){var e=S(this,t).delete(t);return this.size-=e?1:0,e}function st(t){return S(this,t).get(t)}function it(t){return S(this,t).has(t)}function lt(t,e){var n=S(this,t),a=n.size;return n.set(t,e),this.size+=n.size==a?0:1,this}function C(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}C.prototype.clear=at,C.prototype.delete=rt,C.prototype.get=st,C.prototype.has=it,C.prototype.set=lt;var dt="Expected a function";function A(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(dt);var n=function(){var a=arguments,o=e?e.apply(this,a):a[0],s=n.cache;if(s.has(o))return s.get(o);var u=t.apply(this,a);return n.cache=s.set(o,u)||s,u};return n.cache=new(A.Cache||C),n}A.Cache=C;const ct=2,V=1,H="";class O{constructor(e,n,a){this.locale=e,this.queryRef=n,this.rawValue=a}static create(e,n,a){return n.query.postAggr==="count"?new ut(e,n,a):new O(e,n,a)}getDecimals(e=ct){return this.decimals??this.queryRef.query.decimals??e}getFactor(){var e,n,a;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)??V}getUnit(){var e,n,a;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)??H}setDecimals(e){this.decimals=e}setFactor(e){this.factor=e}setUnit(e){this.unit=e}getValue(){return this.rawValue}toString(){var a,o,s,u;const e=this.locale??void 0,n=A((i,d,p,c)=>{const f={style:"decimal",minimumFractionDigits:Math.floor(d),maximumFractionDigits:Math.floor(d)};return`${new Intl.NumberFormat(c,f).format(i)}${p?" "+p:""}`});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:((o=this.queryRef.variable)==null?void 0:o.type)==="bool"?this.rawValue?"True":"False":((s=this.queryRef.variable)==null?void 0:s.type)==="int"?n(this.rawValue,Number.isInteger(this.getFactor())?this.getDecimals(0):this.getDecimals(),this.getUnit(),e):((u=this.queryRef.variable)==null?void 0:u.type)==="float"?n(this.rawValue,this.getDecimals(),this.getUnit(),e):String(this.getValue())}}class ut extends O{getFactor(){return this.factor??this.queryRef.query.factor??V}getUnit(){return this.unit??this.queryRef.query.unit??H}}function W(t){return t.map(({queryRef:n,time:a,value:o})=>{const s=new te(n.query,n.variable,n.tag),u=O.create(o.locale,s,o.rawValue);return{queryRef:s,time:a,value:u}})}let h,U,z;function pt(t,e){if(z=new Date,t.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(t.tagName.toLowerCase()==="html")return"html";const n={root:document.body,idName:o=>!0,className:o=>!0,tagName:o=>!0,attr:(o,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};h={...n,...e},U=gt(h.root,n);let a=M(t,"all",()=>M(t,"two",()=>M(t,"one",()=>M(t,"none"))));if(a){const o=X(Y(a,t));return o.length>0&&(a=o[0]),$(a)}else throw new Error("Selector was not found.")}function gt(t,e){return t.nodeType===Node.DOCUMENT_NODE?t:t===e.root?t.ownerDocument:t}function M(t,e,n){let a=null,o=[],s=t,u=0;for(;s;){const i=new Date().getTime()-z.getTime();if(h.timeoutMs!==void 0&&i>h.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${i}ms`);let d=E(ft(s))||E(...yt(s))||E(...ht(s))||E(mt(s))||[K()];const p=wt(s);if(e=="all")p&&(d=d.concat(d.filter(N).map(c=>I(c,p))));else if(e=="two")d=d.slice(0,1),p&&(d=d.concat(d.filter(N).map(c=>I(c,p))));else if(e=="one"){const[c]=d=d.slice(0,1);p&&N(c)&&(d=[I(c,p)])}else e=="none"&&(d=[K()],p&&(d=[I(d[0],p)]));for(let c of d)c.level=u;if(o.push(d),o.length>=h.seedMinLength&&(a=Q(o,n),a))break;s=s.parentElement,u++}return a||(a=Q(o,n)),!a&&n?n():a}function Q(t,e){const n=X(x(t));if(n.length>h.threshold)return e?e():null;for(let a of n)if(J(a))return a;return null}function $(t){let e=t[0],n=e.name;for(let a=1;a<t.length;a++){const o=t[a].level||0;e.level===o-1?n=`${t[a].name} > ${n}`:n=`${t[a].name} ${n}`,e=t[a]}return n}function G(t){return t.map(e=>e.penalty).reduce((e,n)=>e+n,0)}function J(t){const e=$(t);switch(U.querySelectorAll(e).length){case 0:throw new Error(`Can't select any node with this selector: ${e}`);case 1:return!0;default:return!1}}function ft(t){const e=t.getAttribute("id");return e&&h.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null}function yt(t){return Array.from(t.attributes).filter(n=>h.attr(n.name,n.value)).map(n=>({name:`[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,penalty:.5}))}function ht(t){return Array.from(t.classList).filter(h.className).map(n=>({name:"."+CSS.escape(n),penalty:1}))}function mt(t){const e=t.tagName.toLowerCase();return h.tagName(e)?{name:e,penalty:2}:null}function K(){return{name:"*",penalty:3}}function wt(t){const e=t.parentNode;if(!e)return null;let n=e.firstChild;if(!n)return null;let a=0;for(;n&&(n.nodeType===Node.ELEMENT_NODE&&a++,n!==t);)n=n.nextSibling;return a}function I(t,e){return{name:t.name+`:nth-child(${e})`,penalty:t.penalty+1}}function N(t){return t.name!=="html"&&!t.name.startsWith("#")}function E(...t){const e=t.filter(Ct);return e.length>0?e:null}function Ct(t){return t!=null}function*x(t,e=[]){if(t.length>0)for(let n of t[0])yield*x(t.slice(1,t.length),e.concat(n));else yield e}function X(t){return[...t].sort((e,n)=>G(e)-G(n))}function*Y(t,e,n={counter:0,visited:new Map}){if(t.length>2&&t.length>h.optimizedMinLength)for(let a=1;a<t.length-1;a++){if(n.counter>h.maxNumberOfTries)return;n.counter+=1;const o=[...t];o.splice(a,1);const s=$(o);if(n.visited.has(s))return;J(o)&&_t(o,e)&&(yield o,n.visited.set(s,!0),yield*Y(o,e,n))}}function _t(t,e){return U.querySelector($(t))===e}class m extends Error{constructor(e="Method is not implemented"){super(e),this.name="NotImplementedError",this.message=e,this.stack=`NotImplementedError: ${e}`}}class Dt{constructor(e){y(this,"ontimerangechange",null);y(this,"onvpnclientstatuschange",null);y(this,"_getApiLinks");y(this,"appData");y(this,"componentBaseUrl");y(this,"destroyed");y(this,"mode");y(this,"inputs");y(this,"inputMap");y(this,"timeRange");y(this,"timeRangeIsAdjustable");y(this,"vpnClientStatus");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)}_messageHandler(e){if(e.source===window.parent)switch(e.data.type){case r.TimeRangeChange:this.ontimerangechange&&this.ontimerangechange(...e.data.payload);break;case r.VpnClientStatusChange:this.onvpnclientstatuschange&&this.onvpnclientstatuschange(...e.data.payload);break}}createBackendComponentClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.BackendComponentClientCreate,payload:{clientId:e}},"*"),new Rt(e)}createLoggingDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.LoggingDataClientCreate,payload:{clientId:e}},"*"),new bt(e)}createObjectStorageClient(){throw new m}createResourceDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.ResourceDataClientCreate,payload:{clientId:e}},"*"),new vt(e)}createTooltip(){throw new m}destroy(){window.parent.postMessage({type:r.Destroy},"*"),window.removeEventListener("message",this._messageHandler,!1),this.destroyed=!0}getApiUrl(e,n){const a=this._getApiLinks().get(e);if(!a)throw new Error("IxApiError: entry not found");return n?Object.keys(n).sort().reduce((o,s)=>{if(o.includes(`{${s}}`))return o.replace(`{${s}}`,n[s]);const u=new URL(o);return u.searchParams.set(s,n[s]),decodeURIComponent(u.href)},a.href):a.href}navigateByUrl(e){window.parent.postMessage({type:r.NavigateByUrl,payload:{url:e}},"*")}openActionBottomSheet(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenActionBottomSheet,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenActionBottomSheetResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openActionMenu(e,n){return new Promise(a=>{window.addEventListener("message",o,!1),window.parent.postMessage({type:r.OpenActionMenu,payload:{selector:pt(e),options:n}},"*");function o(s){s.source===window.parent&&s.data.type===r.OpenActionMenuResult&&(window.removeEventListener("message",o,!1),a(s.data.payload.result))}})}openAlertDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenAlertDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenAlertDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openConfirmDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenConfirmDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenConfirmDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openContentDialog(e){if(typeof e.onopened=="function")throw new m('The "onopened" option is not implemented');if(typeof e.onclose=="function")throw new m('The "onclose" option is not implemented');if(e.pagination)throw new m('The "pagination" option is not implemented');return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenContentDialog,payload:{options:e.htmlContent&&typeof e.htmlContent!="string"?{...e,htmlContent:e.htmlContent.cloneNode(!0).outerHTML}:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenContentDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openFormDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenFormDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenFormDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}sanitizeHtml(){throw new m}saveAsFile(){throw new m}setTimeRange(e){window.parent.postMessage({type:r.SetTimeRange,payload:{timeRange:e}},"*")}showVpnStatusDetails(e){window.parent.postMessage({type:r.ShowVpnStatusDetails,payload:{agentId:e}},"*")}testVpnAccess(){throw new m}toggleVpn(e){window.parent.postMessage({type:r.ToggleVpn,payload:{agentId:e}},"*")}translate(){throw new m}}class Rt{constructor(e){this.id=e}call(e,n){return new Promise(a=>{const o=crypto.randomUUID();window.addEventListener("message",s,!1),window.parent.postMessage({type:r.BackendComponentClientCall,payload:{clientId:this.id,callId:o,functionName:e,functionArguments:n}});function s(u){u.source===window.parent&&u.data.type===r.BackendComponentClientCallResult&&u.data.payload.callId===o&&(window.removeEventListener("message",s,!1),a(u.data.payload.result))}})}destroy(){window.parent.postMessage({type:r.BackendComponentClientDestroy,payload:{clientId:this.id}},"*")}}class bt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.LoggingDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){if(s.source===window.parent&&s.data.type===r.LoggingDataClientQueryResult&&s.data.payload.queryId===a){const{results:u}=s.data.payload;if(e.length)if(!e.queries||e.format!=="csv"){const i=u.map(d=>W(d));n(i)}else throw new m;else{const i=W(u);n(i)}}}}destroy(){window.parent.postMessage({type:r.LoggingDataClientDestroy,payload:{clientId:this.id}},"*")}}class vt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientQueryResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}update(e){return new Promise(n=>{const a=crypto.randomUUID();window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientUpdate,payload:{clientId:this.id,updateId:a,update:e}},"*");function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientUpdated&&s.data.payload.updateId===a&&(window.removeEventListener("message",o,!1),n())}})}render(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientRender,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientRenderResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}destroy(){window.parent.postMessage({type:r.ResourceDataClientDestroy,payload:{clientId:this.id}},"*")}}function L(t){const e=!!(t&&t.migrateInputs);return!e&&L.__cache__?Promise.resolve(L.__cache__):new Promise(n=>{window.addEventListener("message",function a(o){if(o.source===window.parent&&o.data&&o.data.type===r.Created){let s=o.data.payload;e&&(s.inputs=t.migrateInputs(s.inputs,null));const u=new Dt(s);n(u),e||(L.__cache__=u),window.removeEventListener("message",a,!1)}},!1),window.parent.postMessage({type:r.Create},"*")})}g.connect=ee,g.getComponentContext=L,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixon-cdk/iframe-adapter",
|
|
3
|
-
"version": "1.13.0-next.
|
|
3
|
+
"version": "1.13.0-next.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@medv/finder": "3.2.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@ixon-cdk/types": "^1.13.0-next.
|
|
20
|
+
"@ixon-cdk/types": "^1.13.0-next.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "~5.1.6",
|