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