@kizenapps/engine 0.0.1-b1f3597
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/LICENSE.md +674 -0
- package/README.md +160 -0
- package/dist/ThirdPartyScript-DdrF7zh7.d.ts +459 -0
- package/dist/automation-C8hsM_Rc.d.ts +36 -0
- package/dist/chunk-2MW4AGSN.js +2415 -0
- package/dist/chunk-2MW4AGSN.js.map +1 -0
- package/dist/chunk-3LDUYA57.js +61 -0
- package/dist/chunk-3LDUYA57.js.map +1 -0
- package/dist/chunk-5WRI5ZAA.js +29 -0
- package/dist/chunk-5WRI5ZAA.js.map +1 -0
- package/dist/chunk-727AYMPR.js +120 -0
- package/dist/chunk-727AYMPR.js.map +1 -0
- package/dist/chunk-GGGXYD3K.js +40 -0
- package/dist/chunk-GGGXYD3K.js.map +1 -0
- package/dist/chunk-LGJYUPYZ.js +3 -0
- package/dist/chunk-LGJYUPYZ.js.map +1 -0
- package/dist/chunk-NXLAROEM.js +730 -0
- package/dist/chunk-NXLAROEM.js.map +1 -0
- package/dist/chunk-P7GQBCEH.js +172 -0
- package/dist/chunk-P7GQBCEH.js.map +1 -0
- package/dist/chunk-UOTNQL56.js +46 -0
- package/dist/chunk-UOTNQL56.js.map +1 -0
- package/dist/chunk-VYBEGZLN.js +319 -0
- package/dist/chunk-VYBEGZLN.js.map +1 -0
- package/dist/chunk-XKKZPZMB.js +121 -0
- package/dist/chunk-XKKZPZMB.js.map +1 -0
- package/dist/communication.d.ts +13 -0
- package/dist/communication.js +6 -0
- package/dist/communication.js.map +1 -0
- package/dist/contexts/base.d.ts +99 -0
- package/dist/contexts/base.js +7 -0
- package/dist/contexts/base.js.map +1 -0
- package/dist/contexts/floatingFrame.d.ts +18 -0
- package/dist/contexts/floatingFrame.js +8 -0
- package/dist/contexts/floatingFrame.js.map +1 -0
- package/dist/contexts/recordDetail.d.ts +32 -0
- package/dist/contexts/recordDetail.js +8 -0
- package/dist/contexts/recordDetail.js.map +1 -0
- package/dist/floatingFrames-BzaoL7cq.d.ts +8 -0
- package/dist/generic-RiEgdDAq.d.ts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/merge-translations.js +28 -0
- package/dist/react.d.ts +367 -0
- package/dist/react.js +2732 -0
- package/dist/react.js.map +1 -0
- package/dist/routeScript-kttY2YZh.d.ts +303 -0
- package/dist/translation.json +8 -0
- package/dist/types.d.ts +90 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/util.d.ts +40 -0
- package/dist/util.js +87 -0
- package/dist/util.js.map +1 -0
- package/dist/vite.d.ts +11 -0
- package/dist/vite.js +19 -0
- package/dist/vite.js.map +1 -0
- package/dist/workers/calendarSource.worker.d.ts +2 -0
- package/dist/workers/calendarSource.worker.js +62 -0
- package/dist/workers/calendarSource.worker.js.map +1 -0
- package/dist/workers/expression.worker.d.ts +2 -0
- package/dist/workers/expression.worker.js +35 -0
- package/dist/workers/expression.worker.js.map +1 -0
- package/dist/workers/floatingFrame.worker.d.ts +2 -0
- package/dist/workers/floatingFrame.worker.js +57 -0
- package/dist/workers/floatingFrame.worker.js.map +1 -0
- package/dist/workers/generic.worker.d.ts +2 -0
- package/dist/workers/generic.worker.js +57 -0
- package/dist/workers/generic.worker.js.map +1 -0
- package/dist/workers/recordDetail.worker.d.ts +2 -0
- package/dist/workers/recordDetail.worker.js +59 -0
- package/dist/workers/recordDetail.worker.js.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,2415 @@
|
|
|
1
|
+
import { generateUUIDV4, getPartialLocation } from './chunk-XKKZPZMB.js';
|
|
2
|
+
import { IFRAME_PREFIX, ACTIONS, RESPONSES, COMMUNICATIONS, thirdPartyGlobalNames, getScriptIntegrationType, thirdPartySetupScripts, thirdPartyReadyPredicates } from './chunk-P7GQBCEH.js';
|
|
3
|
+
import { __commonJS, __toESM } from './chunk-5WRI5ZAA.js';
|
|
4
|
+
import DOMPurify from 'dompurify';
|
|
5
|
+
|
|
6
|
+
// node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/lib/parse.js
|
|
7
|
+
var require_parse = __commonJS({
|
|
8
|
+
"node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/lib/parse.js"(exports$1, module) {
|
|
9
|
+
var at;
|
|
10
|
+
var ch;
|
|
11
|
+
var escapee = {
|
|
12
|
+
'"': '"',
|
|
13
|
+
"\\": "\\",
|
|
14
|
+
"/": "/",
|
|
15
|
+
b: "\b",
|
|
16
|
+
f: "\f",
|
|
17
|
+
n: "\n",
|
|
18
|
+
r: "\r",
|
|
19
|
+
t: " "
|
|
20
|
+
};
|
|
21
|
+
var text;
|
|
22
|
+
function error(m) {
|
|
23
|
+
throw {
|
|
24
|
+
name: "SyntaxError",
|
|
25
|
+
message: m,
|
|
26
|
+
at,
|
|
27
|
+
text
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function next(c) {
|
|
31
|
+
if (c && c !== ch) {
|
|
32
|
+
error("Expected '" + c + "' instead of '" + ch + "'");
|
|
33
|
+
}
|
|
34
|
+
ch = text.charAt(at);
|
|
35
|
+
at += 1;
|
|
36
|
+
return ch;
|
|
37
|
+
}
|
|
38
|
+
function number() {
|
|
39
|
+
var num;
|
|
40
|
+
var str = "";
|
|
41
|
+
if (ch === "-") {
|
|
42
|
+
str = "-";
|
|
43
|
+
next("-");
|
|
44
|
+
}
|
|
45
|
+
while (ch >= "0" && ch <= "9") {
|
|
46
|
+
str += ch;
|
|
47
|
+
next();
|
|
48
|
+
}
|
|
49
|
+
if (ch === ".") {
|
|
50
|
+
str += ".";
|
|
51
|
+
while (next() && ch >= "0" && ch <= "9") {
|
|
52
|
+
str += ch;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (ch === "e" || ch === "E") {
|
|
56
|
+
str += ch;
|
|
57
|
+
next();
|
|
58
|
+
if (ch === "-" || ch === "+") {
|
|
59
|
+
str += ch;
|
|
60
|
+
next();
|
|
61
|
+
}
|
|
62
|
+
while (ch >= "0" && ch <= "9") {
|
|
63
|
+
str += ch;
|
|
64
|
+
next();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
num = Number(str);
|
|
68
|
+
if (!isFinite(num)) {
|
|
69
|
+
error("Bad number");
|
|
70
|
+
}
|
|
71
|
+
return num;
|
|
72
|
+
}
|
|
73
|
+
function string() {
|
|
74
|
+
var hex;
|
|
75
|
+
var i;
|
|
76
|
+
var str = "";
|
|
77
|
+
var uffff;
|
|
78
|
+
if (ch === '"') {
|
|
79
|
+
while (next()) {
|
|
80
|
+
if (ch === '"') {
|
|
81
|
+
next();
|
|
82
|
+
return str;
|
|
83
|
+
} else if (ch === "\\") {
|
|
84
|
+
next();
|
|
85
|
+
if (ch === "u") {
|
|
86
|
+
uffff = 0;
|
|
87
|
+
for (i = 0; i < 4; i += 1) {
|
|
88
|
+
hex = parseInt(next(), 16);
|
|
89
|
+
if (!isFinite(hex)) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
uffff = uffff * 16 + hex;
|
|
93
|
+
}
|
|
94
|
+
str += String.fromCharCode(uffff);
|
|
95
|
+
} else if (typeof escapee[ch] === "string") {
|
|
96
|
+
str += escapee[ch];
|
|
97
|
+
} else {
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
str += ch;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
error("Bad string");
|
|
106
|
+
}
|
|
107
|
+
function white() {
|
|
108
|
+
while (ch && ch <= " ") {
|
|
109
|
+
next();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function word() {
|
|
113
|
+
switch (ch) {
|
|
114
|
+
case "t":
|
|
115
|
+
next("t");
|
|
116
|
+
next("r");
|
|
117
|
+
next("u");
|
|
118
|
+
next("e");
|
|
119
|
+
return true;
|
|
120
|
+
case "f":
|
|
121
|
+
next("f");
|
|
122
|
+
next("a");
|
|
123
|
+
next("l");
|
|
124
|
+
next("s");
|
|
125
|
+
next("e");
|
|
126
|
+
return false;
|
|
127
|
+
case "n":
|
|
128
|
+
next("n");
|
|
129
|
+
next("u");
|
|
130
|
+
next("l");
|
|
131
|
+
next("l");
|
|
132
|
+
return null;
|
|
133
|
+
default:
|
|
134
|
+
error("Unexpected '" + ch + "'");
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function array() {
|
|
138
|
+
var arr = [];
|
|
139
|
+
if (ch === "[") {
|
|
140
|
+
next("[");
|
|
141
|
+
white();
|
|
142
|
+
if (ch === "]") {
|
|
143
|
+
next("]");
|
|
144
|
+
return arr;
|
|
145
|
+
}
|
|
146
|
+
while (ch) {
|
|
147
|
+
arr.push(value());
|
|
148
|
+
white();
|
|
149
|
+
if (ch === "]") {
|
|
150
|
+
next("]");
|
|
151
|
+
return arr;
|
|
152
|
+
}
|
|
153
|
+
next(",");
|
|
154
|
+
white();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
error("Bad array");
|
|
158
|
+
}
|
|
159
|
+
function object() {
|
|
160
|
+
var key;
|
|
161
|
+
var obj = {};
|
|
162
|
+
if (ch === "{") {
|
|
163
|
+
next("{");
|
|
164
|
+
white();
|
|
165
|
+
if (ch === "}") {
|
|
166
|
+
next("}");
|
|
167
|
+
return obj;
|
|
168
|
+
}
|
|
169
|
+
while (ch) {
|
|
170
|
+
key = string();
|
|
171
|
+
white();
|
|
172
|
+
next(":");
|
|
173
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
174
|
+
error('Duplicate key "' + key + '"');
|
|
175
|
+
}
|
|
176
|
+
obj[key] = value();
|
|
177
|
+
white();
|
|
178
|
+
if (ch === "}") {
|
|
179
|
+
next("}");
|
|
180
|
+
return obj;
|
|
181
|
+
}
|
|
182
|
+
next(",");
|
|
183
|
+
white();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
error("Bad object");
|
|
187
|
+
}
|
|
188
|
+
function value() {
|
|
189
|
+
white();
|
|
190
|
+
switch (ch) {
|
|
191
|
+
case "{":
|
|
192
|
+
return object();
|
|
193
|
+
case "[":
|
|
194
|
+
return array();
|
|
195
|
+
case '"':
|
|
196
|
+
return string();
|
|
197
|
+
case "-":
|
|
198
|
+
return number();
|
|
199
|
+
default:
|
|
200
|
+
return ch >= "0" && ch <= "9" ? number() : word();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
module.exports = function(source, reviver) {
|
|
204
|
+
var result;
|
|
205
|
+
text = source;
|
|
206
|
+
at = 0;
|
|
207
|
+
ch = " ";
|
|
208
|
+
result = value();
|
|
209
|
+
white();
|
|
210
|
+
if (ch) {
|
|
211
|
+
error("Syntax error");
|
|
212
|
+
}
|
|
213
|
+
return typeof reviver === "function" ? (function walk(holder, key) {
|
|
214
|
+
var k;
|
|
215
|
+
var v;
|
|
216
|
+
var val = holder[key];
|
|
217
|
+
if (val && typeof val === "object") {
|
|
218
|
+
for (k in value) {
|
|
219
|
+
if (Object.prototype.hasOwnProperty.call(val, k)) {
|
|
220
|
+
v = walk(val, k);
|
|
221
|
+
if (typeof v === "undefined") {
|
|
222
|
+
delete val[k];
|
|
223
|
+
} else {
|
|
224
|
+
val[k] = v;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return reviver.call(holder, key, val);
|
|
230
|
+
})({ "": result }, "") : result;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
// node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/lib/stringify.js
|
|
236
|
+
var require_stringify = __commonJS({
|
|
237
|
+
"node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/lib/stringify.js"(exports$1, module) {
|
|
238
|
+
var escapable = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
|
239
|
+
var gap;
|
|
240
|
+
var indent;
|
|
241
|
+
var meta = {
|
|
242
|
+
// table of character substitutions
|
|
243
|
+
"\b": "\\b",
|
|
244
|
+
" ": "\\t",
|
|
245
|
+
"\n": "\\n",
|
|
246
|
+
"\f": "\\f",
|
|
247
|
+
"\r": "\\r",
|
|
248
|
+
'"': '\\"',
|
|
249
|
+
"\\": "\\\\"
|
|
250
|
+
};
|
|
251
|
+
var rep;
|
|
252
|
+
function quote(string) {
|
|
253
|
+
escapable.lastIndex = 0;
|
|
254
|
+
return escapable.test(string) ? '"' + string.replace(escapable, function(a) {
|
|
255
|
+
var c = meta[a];
|
|
256
|
+
return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
|
|
257
|
+
}) + '"' : '"' + string + '"';
|
|
258
|
+
}
|
|
259
|
+
function str(key, holder) {
|
|
260
|
+
var i;
|
|
261
|
+
var k;
|
|
262
|
+
var v;
|
|
263
|
+
var length;
|
|
264
|
+
var mind = gap;
|
|
265
|
+
var partial;
|
|
266
|
+
var value = holder[key];
|
|
267
|
+
if (value && typeof value === "object" && typeof value.toJSON === "function") {
|
|
268
|
+
value = value.toJSON(key);
|
|
269
|
+
}
|
|
270
|
+
if (typeof rep === "function") {
|
|
271
|
+
value = rep.call(holder, key, value);
|
|
272
|
+
}
|
|
273
|
+
switch (typeof value) {
|
|
274
|
+
case "string":
|
|
275
|
+
return quote(value);
|
|
276
|
+
case "number":
|
|
277
|
+
return isFinite(value) ? String(value) : "null";
|
|
278
|
+
case "boolean":
|
|
279
|
+
case "null":
|
|
280
|
+
return String(value);
|
|
281
|
+
case "object":
|
|
282
|
+
if (!value) {
|
|
283
|
+
return "null";
|
|
284
|
+
}
|
|
285
|
+
gap += indent;
|
|
286
|
+
partial = [];
|
|
287
|
+
if (Object.prototype.toString.apply(value) === "[object Array]") {
|
|
288
|
+
length = value.length;
|
|
289
|
+
for (i = 0; i < length; i += 1) {
|
|
290
|
+
partial[i] = str(i, value) || "null";
|
|
291
|
+
}
|
|
292
|
+
v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]";
|
|
293
|
+
gap = mind;
|
|
294
|
+
return v;
|
|
295
|
+
}
|
|
296
|
+
if (rep && typeof rep === "object") {
|
|
297
|
+
length = rep.length;
|
|
298
|
+
for (i = 0; i < length; i += 1) {
|
|
299
|
+
k = rep[i];
|
|
300
|
+
if (typeof k === "string") {
|
|
301
|
+
v = str(k, value);
|
|
302
|
+
if (v) {
|
|
303
|
+
partial.push(quote(k) + (gap ? ": " : ":") + v);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
} else {
|
|
308
|
+
for (k in value) {
|
|
309
|
+
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
|
310
|
+
v = str(k, value);
|
|
311
|
+
if (v) {
|
|
312
|
+
partial.push(quote(k) + (gap ? ": " : ":") + v);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}";
|
|
318
|
+
gap = mind;
|
|
319
|
+
return v;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
module.exports = function(value, replacer, space) {
|
|
323
|
+
var i;
|
|
324
|
+
gap = "";
|
|
325
|
+
indent = "";
|
|
326
|
+
if (typeof space === "number") {
|
|
327
|
+
for (i = 0; i < space; i += 1) {
|
|
328
|
+
indent += " ";
|
|
329
|
+
}
|
|
330
|
+
} else if (typeof space === "string") {
|
|
331
|
+
indent = space;
|
|
332
|
+
}
|
|
333
|
+
rep = replacer;
|
|
334
|
+
if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) {
|
|
335
|
+
throw new Error("JSON.stringify");
|
|
336
|
+
}
|
|
337
|
+
return str("", { "": value });
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
// node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/index.js
|
|
343
|
+
var require_jsonify = __commonJS({
|
|
344
|
+
"node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/index.js"(exports$1) {
|
|
345
|
+
exports$1.parse = require_parse();
|
|
346
|
+
exports$1.stringify = require_stringify();
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
// node_modules/.pnpm/isarray@2.0.5/node_modules/isarray/index.js
|
|
351
|
+
var require_isarray = __commonJS({
|
|
352
|
+
"node_modules/.pnpm/isarray@2.0.5/node_modules/isarray/index.js"(exports$1, module) {
|
|
353
|
+
var toString = {}.toString;
|
|
354
|
+
module.exports = Array.isArray || function(arr) {
|
|
355
|
+
return toString.call(arr) == "[object Array]";
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js
|
|
361
|
+
var require_isArguments = __commonJS({
|
|
362
|
+
"node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js"(exports$1, module) {
|
|
363
|
+
var toStr = Object.prototype.toString;
|
|
364
|
+
module.exports = function isArguments(value) {
|
|
365
|
+
var str = toStr.call(value);
|
|
366
|
+
var isArgs = str === "[object Arguments]";
|
|
367
|
+
if (!isArgs) {
|
|
368
|
+
isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]";
|
|
369
|
+
}
|
|
370
|
+
return isArgs;
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
// node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js
|
|
376
|
+
var require_implementation = __commonJS({
|
|
377
|
+
"node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js"(exports$1, module) {
|
|
378
|
+
var keysShim;
|
|
379
|
+
if (!Object.keys) {
|
|
380
|
+
has = Object.prototype.hasOwnProperty;
|
|
381
|
+
toStr = Object.prototype.toString;
|
|
382
|
+
isArgs = require_isArguments();
|
|
383
|
+
isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
384
|
+
hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString");
|
|
385
|
+
hasProtoEnumBug = isEnumerable.call(function() {
|
|
386
|
+
}, "prototype");
|
|
387
|
+
dontEnums = [
|
|
388
|
+
"toString",
|
|
389
|
+
"toLocaleString",
|
|
390
|
+
"valueOf",
|
|
391
|
+
"hasOwnProperty",
|
|
392
|
+
"isPrototypeOf",
|
|
393
|
+
"propertyIsEnumerable",
|
|
394
|
+
"constructor"
|
|
395
|
+
];
|
|
396
|
+
equalsConstructorPrototype = function(o) {
|
|
397
|
+
var ctor = o.constructor;
|
|
398
|
+
return ctor && ctor.prototype === o;
|
|
399
|
+
};
|
|
400
|
+
excludedKeys = {
|
|
401
|
+
$applicationCache: true,
|
|
402
|
+
$console: true,
|
|
403
|
+
$external: true,
|
|
404
|
+
$frame: true,
|
|
405
|
+
$frameElement: true,
|
|
406
|
+
$frames: true,
|
|
407
|
+
$innerHeight: true,
|
|
408
|
+
$innerWidth: true,
|
|
409
|
+
$onmozfullscreenchange: true,
|
|
410
|
+
$onmozfullscreenerror: true,
|
|
411
|
+
$outerHeight: true,
|
|
412
|
+
$outerWidth: true,
|
|
413
|
+
$pageXOffset: true,
|
|
414
|
+
$pageYOffset: true,
|
|
415
|
+
$parent: true,
|
|
416
|
+
$scrollLeft: true,
|
|
417
|
+
$scrollTop: true,
|
|
418
|
+
$scrollX: true,
|
|
419
|
+
$scrollY: true,
|
|
420
|
+
$self: true,
|
|
421
|
+
$webkitIndexedDB: true,
|
|
422
|
+
$webkitStorageInfo: true,
|
|
423
|
+
$window: true
|
|
424
|
+
};
|
|
425
|
+
hasAutomationEqualityBug = (function() {
|
|
426
|
+
if (typeof window === "undefined") {
|
|
427
|
+
return false;
|
|
428
|
+
}
|
|
429
|
+
for (var k in window) {
|
|
430
|
+
try {
|
|
431
|
+
if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") {
|
|
432
|
+
try {
|
|
433
|
+
equalsConstructorPrototype(window[k]);
|
|
434
|
+
} catch (e) {
|
|
435
|
+
return true;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
} catch (e) {
|
|
439
|
+
return true;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return false;
|
|
443
|
+
})();
|
|
444
|
+
equalsConstructorPrototypeIfNotBuggy = function(o) {
|
|
445
|
+
if (typeof window === "undefined" || !hasAutomationEqualityBug) {
|
|
446
|
+
return equalsConstructorPrototype(o);
|
|
447
|
+
}
|
|
448
|
+
try {
|
|
449
|
+
return equalsConstructorPrototype(o);
|
|
450
|
+
} catch (e) {
|
|
451
|
+
return false;
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
keysShim = function keys(object) {
|
|
455
|
+
var isObject = object !== null && typeof object === "object";
|
|
456
|
+
var isFunction = toStr.call(object) === "[object Function]";
|
|
457
|
+
var isArguments = isArgs(object);
|
|
458
|
+
var isString = isObject && toStr.call(object) === "[object String]";
|
|
459
|
+
var theKeys = [];
|
|
460
|
+
if (!isObject && !isFunction && !isArguments) {
|
|
461
|
+
throw new TypeError("Object.keys called on a non-object");
|
|
462
|
+
}
|
|
463
|
+
var skipProto = hasProtoEnumBug && isFunction;
|
|
464
|
+
if (isString && object.length > 0 && !has.call(object, 0)) {
|
|
465
|
+
for (var i = 0; i < object.length; ++i) {
|
|
466
|
+
theKeys.push(String(i));
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if (isArguments && object.length > 0) {
|
|
470
|
+
for (var j = 0; j < object.length; ++j) {
|
|
471
|
+
theKeys.push(String(j));
|
|
472
|
+
}
|
|
473
|
+
} else {
|
|
474
|
+
for (var name in object) {
|
|
475
|
+
if (!(skipProto && name === "prototype") && has.call(object, name)) {
|
|
476
|
+
theKeys.push(String(name));
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
if (hasDontEnumBug) {
|
|
481
|
+
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
|
482
|
+
for (var k = 0; k < dontEnums.length; ++k) {
|
|
483
|
+
if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) {
|
|
484
|
+
theKeys.push(dontEnums[k]);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return theKeys;
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
var has;
|
|
492
|
+
var toStr;
|
|
493
|
+
var isArgs;
|
|
494
|
+
var isEnumerable;
|
|
495
|
+
var hasDontEnumBug;
|
|
496
|
+
var hasProtoEnumBug;
|
|
497
|
+
var dontEnums;
|
|
498
|
+
var equalsConstructorPrototype;
|
|
499
|
+
var excludedKeys;
|
|
500
|
+
var hasAutomationEqualityBug;
|
|
501
|
+
var equalsConstructorPrototypeIfNotBuggy;
|
|
502
|
+
module.exports = keysShim;
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
// node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js
|
|
507
|
+
var require_object_keys = __commonJS({
|
|
508
|
+
"node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js"(exports$1, module) {
|
|
509
|
+
var slice = Array.prototype.slice;
|
|
510
|
+
var isArgs = require_isArguments();
|
|
511
|
+
var origKeys = Object.keys;
|
|
512
|
+
var keysShim = origKeys ? function keys(o) {
|
|
513
|
+
return origKeys(o);
|
|
514
|
+
} : require_implementation();
|
|
515
|
+
var originalKeys = Object.keys;
|
|
516
|
+
keysShim.shim = function shimObjectKeys() {
|
|
517
|
+
if (Object.keys) {
|
|
518
|
+
var keysWorksWithArguments = (function() {
|
|
519
|
+
var args = Object.keys(arguments);
|
|
520
|
+
return args && args.length === arguments.length;
|
|
521
|
+
})(1, 2);
|
|
522
|
+
if (!keysWorksWithArguments) {
|
|
523
|
+
Object.keys = function keys(object) {
|
|
524
|
+
if (isArgs(object)) {
|
|
525
|
+
return originalKeys(slice.call(object));
|
|
526
|
+
}
|
|
527
|
+
return originalKeys(object);
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
} else {
|
|
531
|
+
Object.keys = keysShim;
|
|
532
|
+
}
|
|
533
|
+
return Object.keys || keysShim;
|
|
534
|
+
};
|
|
535
|
+
module.exports = keysShim;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
// node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js
|
|
540
|
+
var require_es_object_atoms = __commonJS({
|
|
541
|
+
"node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports$1, module) {
|
|
542
|
+
module.exports = Object;
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js
|
|
547
|
+
var require_es_errors = __commonJS({
|
|
548
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports$1, module) {
|
|
549
|
+
module.exports = Error;
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js
|
|
554
|
+
var require_eval = __commonJS({
|
|
555
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports$1, module) {
|
|
556
|
+
module.exports = EvalError;
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js
|
|
561
|
+
var require_range = __commonJS({
|
|
562
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports$1, module) {
|
|
563
|
+
module.exports = RangeError;
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js
|
|
568
|
+
var require_ref = __commonJS({
|
|
569
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports$1, module) {
|
|
570
|
+
module.exports = ReferenceError;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js
|
|
575
|
+
var require_syntax = __commonJS({
|
|
576
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports$1, module) {
|
|
577
|
+
module.exports = SyntaxError;
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
|
|
582
|
+
var require_type = __commonJS({
|
|
583
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports$1, module) {
|
|
584
|
+
module.exports = TypeError;
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js
|
|
589
|
+
var require_uri = __commonJS({
|
|
590
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports$1, module) {
|
|
591
|
+
module.exports = URIError;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js
|
|
596
|
+
var require_abs = __commonJS({
|
|
597
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports$1, module) {
|
|
598
|
+
module.exports = Math.abs;
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js
|
|
603
|
+
var require_floor = __commonJS({
|
|
604
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports$1, module) {
|
|
605
|
+
module.exports = Math.floor;
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
|
|
609
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js
|
|
610
|
+
var require_max = __commonJS({
|
|
611
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports$1, module) {
|
|
612
|
+
module.exports = Math.max;
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js
|
|
617
|
+
var require_min = __commonJS({
|
|
618
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports$1, module) {
|
|
619
|
+
module.exports = Math.min;
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js
|
|
624
|
+
var require_pow = __commonJS({
|
|
625
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports$1, module) {
|
|
626
|
+
module.exports = Math.pow;
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js
|
|
631
|
+
var require_round = __commonJS({
|
|
632
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports$1, module) {
|
|
633
|
+
module.exports = Math.round;
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js
|
|
638
|
+
var require_isNaN = __commonJS({
|
|
639
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports$1, module) {
|
|
640
|
+
module.exports = Number.isNaN || function isNaN2(a) {
|
|
641
|
+
return a !== a;
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
// node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js
|
|
647
|
+
var require_sign = __commonJS({
|
|
648
|
+
"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports$1, module) {
|
|
649
|
+
var $isNaN = require_isNaN();
|
|
650
|
+
module.exports = function sign(number) {
|
|
651
|
+
if ($isNaN(number) || number === 0) {
|
|
652
|
+
return number;
|
|
653
|
+
}
|
|
654
|
+
return number < 0 ? -1 : 1;
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
// node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js
|
|
660
|
+
var require_gOPD = __commonJS({
|
|
661
|
+
"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports$1, module) {
|
|
662
|
+
module.exports = Object.getOwnPropertyDescriptor;
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
// node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js
|
|
667
|
+
var require_gopd = __commonJS({
|
|
668
|
+
"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(exports$1, module) {
|
|
669
|
+
var $gOPD = require_gOPD();
|
|
670
|
+
if ($gOPD) {
|
|
671
|
+
try {
|
|
672
|
+
$gOPD([], "length");
|
|
673
|
+
} catch (e) {
|
|
674
|
+
$gOPD = null;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
module.exports = $gOPD;
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
// node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js
|
|
682
|
+
var require_es_define_property = __commonJS({
|
|
683
|
+
"node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(exports$1, module) {
|
|
684
|
+
var $defineProperty = Object.defineProperty || false;
|
|
685
|
+
if ($defineProperty) {
|
|
686
|
+
try {
|
|
687
|
+
$defineProperty({}, "a", { value: 1 });
|
|
688
|
+
} catch (e) {
|
|
689
|
+
$defineProperty = false;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
module.exports = $defineProperty;
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
|
|
696
|
+
// node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js
|
|
697
|
+
var require_shams = __commonJS({
|
|
698
|
+
"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(exports$1, module) {
|
|
699
|
+
module.exports = function hasSymbols() {
|
|
700
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
701
|
+
return false;
|
|
702
|
+
}
|
|
703
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
704
|
+
return true;
|
|
705
|
+
}
|
|
706
|
+
var obj = {};
|
|
707
|
+
var sym = /* @__PURE__ */ Symbol("test");
|
|
708
|
+
var symObj = Object(sym);
|
|
709
|
+
if (typeof sym === "string") {
|
|
710
|
+
return false;
|
|
711
|
+
}
|
|
712
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
713
|
+
return false;
|
|
714
|
+
}
|
|
715
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
716
|
+
return false;
|
|
717
|
+
}
|
|
718
|
+
var symVal = 42;
|
|
719
|
+
obj[sym] = symVal;
|
|
720
|
+
for (var _ in obj) {
|
|
721
|
+
return false;
|
|
722
|
+
}
|
|
723
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
724
|
+
return false;
|
|
725
|
+
}
|
|
726
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
727
|
+
return false;
|
|
728
|
+
}
|
|
729
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
730
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
731
|
+
return false;
|
|
732
|
+
}
|
|
733
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
734
|
+
return false;
|
|
735
|
+
}
|
|
736
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
737
|
+
var descriptor = (
|
|
738
|
+
/** @type {PropertyDescriptor} */
|
|
739
|
+
Object.getOwnPropertyDescriptor(obj, sym)
|
|
740
|
+
);
|
|
741
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
742
|
+
return false;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
return true;
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
// node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js
|
|
751
|
+
var require_has_symbols = __commonJS({
|
|
752
|
+
"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(exports$1, module) {
|
|
753
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
754
|
+
var hasSymbolSham = require_shams();
|
|
755
|
+
module.exports = function hasNativeSymbols() {
|
|
756
|
+
if (typeof origSymbol !== "function") {
|
|
757
|
+
return false;
|
|
758
|
+
}
|
|
759
|
+
if (typeof Symbol !== "function") {
|
|
760
|
+
return false;
|
|
761
|
+
}
|
|
762
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
763
|
+
return false;
|
|
764
|
+
}
|
|
765
|
+
if (typeof /* @__PURE__ */ Symbol("bar") !== "symbol") {
|
|
766
|
+
return false;
|
|
767
|
+
}
|
|
768
|
+
return hasSymbolSham();
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
|
|
773
|
+
// node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js
|
|
774
|
+
var require_Reflect_getPrototypeOf = __commonJS({
|
|
775
|
+
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports$1, module) {
|
|
776
|
+
module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
// node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js
|
|
781
|
+
var require_Object_getPrototypeOf = __commonJS({
|
|
782
|
+
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports$1, module) {
|
|
783
|
+
var $Object = require_es_object_atoms();
|
|
784
|
+
module.exports = $Object.getPrototypeOf || null;
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
|
|
788
|
+
// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
|
|
789
|
+
var require_implementation2 = __commonJS({
|
|
790
|
+
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports$1, module) {
|
|
791
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
792
|
+
var toStr = Object.prototype.toString;
|
|
793
|
+
var max = Math.max;
|
|
794
|
+
var funcType = "[object Function]";
|
|
795
|
+
var concatty = function concatty2(a, b) {
|
|
796
|
+
var arr = [];
|
|
797
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
798
|
+
arr[i] = a[i];
|
|
799
|
+
}
|
|
800
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
801
|
+
arr[j + a.length] = b[j];
|
|
802
|
+
}
|
|
803
|
+
return arr;
|
|
804
|
+
};
|
|
805
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
806
|
+
var arr = [];
|
|
807
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
808
|
+
arr[j] = arrLike[i];
|
|
809
|
+
}
|
|
810
|
+
return arr;
|
|
811
|
+
};
|
|
812
|
+
var joiny = function(arr, joiner) {
|
|
813
|
+
var str = "";
|
|
814
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
815
|
+
str += arr[i];
|
|
816
|
+
if (i + 1 < arr.length) {
|
|
817
|
+
str += joiner;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
return str;
|
|
821
|
+
};
|
|
822
|
+
module.exports = function bind(that) {
|
|
823
|
+
var target = this;
|
|
824
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
825
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
826
|
+
}
|
|
827
|
+
var args = slicy(arguments, 1);
|
|
828
|
+
var bound;
|
|
829
|
+
var binder = function() {
|
|
830
|
+
if (this instanceof bound) {
|
|
831
|
+
var result = target.apply(
|
|
832
|
+
this,
|
|
833
|
+
concatty(args, arguments)
|
|
834
|
+
);
|
|
835
|
+
if (Object(result) === result) {
|
|
836
|
+
return result;
|
|
837
|
+
}
|
|
838
|
+
return this;
|
|
839
|
+
}
|
|
840
|
+
return target.apply(
|
|
841
|
+
that,
|
|
842
|
+
concatty(args, arguments)
|
|
843
|
+
);
|
|
844
|
+
};
|
|
845
|
+
var boundLength = max(0, target.length - args.length);
|
|
846
|
+
var boundArgs = [];
|
|
847
|
+
for (var i = 0; i < boundLength; i++) {
|
|
848
|
+
boundArgs[i] = "$" + i;
|
|
849
|
+
}
|
|
850
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
851
|
+
if (target.prototype) {
|
|
852
|
+
var Empty = function Empty2() {
|
|
853
|
+
};
|
|
854
|
+
Empty.prototype = target.prototype;
|
|
855
|
+
bound.prototype = new Empty();
|
|
856
|
+
Empty.prototype = null;
|
|
857
|
+
}
|
|
858
|
+
return bound;
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
|
|
863
|
+
// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js
|
|
864
|
+
var require_function_bind = __commonJS({
|
|
865
|
+
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports$1, module) {
|
|
866
|
+
var implementation = require_implementation2();
|
|
867
|
+
module.exports = Function.prototype.bind || implementation;
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
|
|
871
|
+
// node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js
|
|
872
|
+
var require_functionCall = __commonJS({
|
|
873
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(exports$1, module) {
|
|
874
|
+
module.exports = Function.prototype.call;
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
// node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js
|
|
879
|
+
var require_functionApply = __commonJS({
|
|
880
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(exports$1, module) {
|
|
881
|
+
module.exports = Function.prototype.apply;
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
|
|
885
|
+
// node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js
|
|
886
|
+
var require_reflectApply = __commonJS({
|
|
887
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(exports$1, module) {
|
|
888
|
+
module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
// node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js
|
|
893
|
+
var require_actualApply = __commonJS({
|
|
894
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(exports$1, module) {
|
|
895
|
+
var bind = require_function_bind();
|
|
896
|
+
var $apply = require_functionApply();
|
|
897
|
+
var $call = require_functionCall();
|
|
898
|
+
var $reflectApply = require_reflectApply();
|
|
899
|
+
module.exports = $reflectApply || bind.call($call, $apply);
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
|
|
903
|
+
// node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js
|
|
904
|
+
var require_call_bind_apply_helpers = __commonJS({
|
|
905
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(exports$1, module) {
|
|
906
|
+
var bind = require_function_bind();
|
|
907
|
+
var $TypeError = require_type();
|
|
908
|
+
var $call = require_functionCall();
|
|
909
|
+
var $actualApply = require_actualApply();
|
|
910
|
+
module.exports = function callBindBasic(args) {
|
|
911
|
+
if (args.length < 1 || typeof args[0] !== "function") {
|
|
912
|
+
throw new $TypeError("a function is required");
|
|
913
|
+
}
|
|
914
|
+
return $actualApply(bind, $call, args);
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
|
|
919
|
+
// node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js
|
|
920
|
+
var require_get = __commonJS({
|
|
921
|
+
"node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(exports$1, module) {
|
|
922
|
+
var callBind = require_call_bind_apply_helpers();
|
|
923
|
+
var gOPD = require_gopd();
|
|
924
|
+
var hasProtoAccessor;
|
|
925
|
+
try {
|
|
926
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
927
|
+
[].__proto__ === Array.prototype;
|
|
928
|
+
} catch (e) {
|
|
929
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
930
|
+
throw e;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(
|
|
934
|
+
Object.prototype,
|
|
935
|
+
/** @type {keyof typeof Object.prototype} */
|
|
936
|
+
"__proto__"
|
|
937
|
+
);
|
|
938
|
+
var $Object = Object;
|
|
939
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
940
|
+
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
941
|
+
/** @type {import('./get')} */
|
|
942
|
+
function getDunder(value) {
|
|
943
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
944
|
+
}
|
|
945
|
+
) : false;
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
|
|
949
|
+
// node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js
|
|
950
|
+
var require_get_proto = __commonJS({
|
|
951
|
+
"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(exports$1, module) {
|
|
952
|
+
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
953
|
+
var originalGetProto = require_Object_getPrototypeOf();
|
|
954
|
+
var getDunderProto = require_get();
|
|
955
|
+
module.exports = reflectGetProto ? function getProto(O) {
|
|
956
|
+
return reflectGetProto(O);
|
|
957
|
+
} : originalGetProto ? function getProto(O) {
|
|
958
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
959
|
+
throw new TypeError("getProto: not an object");
|
|
960
|
+
}
|
|
961
|
+
return originalGetProto(O);
|
|
962
|
+
} : getDunderProto ? function getProto(O) {
|
|
963
|
+
return getDunderProto(O);
|
|
964
|
+
} : null;
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
|
|
968
|
+
// node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
|
|
969
|
+
var require_hasown = __commonJS({
|
|
970
|
+
"node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports$1, module) {
|
|
971
|
+
var call = Function.prototype.call;
|
|
972
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
973
|
+
var bind = require_function_bind();
|
|
974
|
+
module.exports = bind.call(call, $hasOwn);
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
|
|
978
|
+
// node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js
|
|
979
|
+
var require_get_intrinsic = __commonJS({
|
|
980
|
+
"node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(exports$1, module) {
|
|
981
|
+
var undefined2;
|
|
982
|
+
var $Object = require_es_object_atoms();
|
|
983
|
+
var $Error = require_es_errors();
|
|
984
|
+
var $EvalError = require_eval();
|
|
985
|
+
var $RangeError = require_range();
|
|
986
|
+
var $ReferenceError = require_ref();
|
|
987
|
+
var $SyntaxError = require_syntax();
|
|
988
|
+
var $TypeError = require_type();
|
|
989
|
+
var $URIError = require_uri();
|
|
990
|
+
var abs = require_abs();
|
|
991
|
+
var floor = require_floor();
|
|
992
|
+
var max = require_max();
|
|
993
|
+
var min = require_min();
|
|
994
|
+
var pow = require_pow();
|
|
995
|
+
var round = require_round();
|
|
996
|
+
var sign = require_sign();
|
|
997
|
+
var $Function = Function;
|
|
998
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
999
|
+
try {
|
|
1000
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
1001
|
+
} catch (e) {
|
|
1002
|
+
}
|
|
1003
|
+
};
|
|
1004
|
+
var $gOPD = require_gopd();
|
|
1005
|
+
var $defineProperty = require_es_define_property();
|
|
1006
|
+
var throwTypeError = function() {
|
|
1007
|
+
throw new $TypeError();
|
|
1008
|
+
};
|
|
1009
|
+
var ThrowTypeError = $gOPD ? (function() {
|
|
1010
|
+
try {
|
|
1011
|
+
arguments.callee;
|
|
1012
|
+
return throwTypeError;
|
|
1013
|
+
} catch (calleeThrows) {
|
|
1014
|
+
try {
|
|
1015
|
+
return $gOPD(arguments, "callee").get;
|
|
1016
|
+
} catch (gOPDthrows) {
|
|
1017
|
+
return throwTypeError;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
})() : throwTypeError;
|
|
1021
|
+
var hasSymbols = require_has_symbols()();
|
|
1022
|
+
var getProto = require_get_proto();
|
|
1023
|
+
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
1024
|
+
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
1025
|
+
var $apply = require_functionApply();
|
|
1026
|
+
var $call = require_functionCall();
|
|
1027
|
+
var needsEval = {};
|
|
1028
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
1029
|
+
var INTRINSICS = {
|
|
1030
|
+
__proto__: null,
|
|
1031
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
1032
|
+
"%Array%": Array,
|
|
1033
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
1034
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
1035
|
+
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
1036
|
+
"%AsyncFunction%": needsEval,
|
|
1037
|
+
"%AsyncGenerator%": needsEval,
|
|
1038
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
1039
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
1040
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
1041
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
1042
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
1043
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
1044
|
+
"%Boolean%": Boolean,
|
|
1045
|
+
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
1046
|
+
"%Date%": Date,
|
|
1047
|
+
"%decodeURI%": decodeURI,
|
|
1048
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
1049
|
+
"%encodeURI%": encodeURI,
|
|
1050
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
1051
|
+
"%Error%": $Error,
|
|
1052
|
+
"%eval%": eval,
|
|
1053
|
+
// eslint-disable-line no-eval
|
|
1054
|
+
"%EvalError%": $EvalError,
|
|
1055
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
|
|
1056
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
1057
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
1058
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
1059
|
+
"%Function%": $Function,
|
|
1060
|
+
"%GeneratorFunction%": needsEval,
|
|
1061
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
1062
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
1063
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
1064
|
+
"%isFinite%": isFinite,
|
|
1065
|
+
"%isNaN%": isNaN,
|
|
1066
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
1067
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
1068
|
+
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
1069
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
1070
|
+
"%Math%": Math,
|
|
1071
|
+
"%Number%": Number,
|
|
1072
|
+
"%Object%": $Object,
|
|
1073
|
+
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
1074
|
+
"%parseFloat%": parseFloat,
|
|
1075
|
+
"%parseInt%": parseInt,
|
|
1076
|
+
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
1077
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
1078
|
+
"%RangeError%": $RangeError,
|
|
1079
|
+
"%ReferenceError%": $ReferenceError,
|
|
1080
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
1081
|
+
"%RegExp%": RegExp,
|
|
1082
|
+
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
1083
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
1084
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
1085
|
+
"%String%": String,
|
|
1086
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
1087
|
+
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
1088
|
+
"%SyntaxError%": $SyntaxError,
|
|
1089
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
1090
|
+
"%TypedArray%": TypedArray,
|
|
1091
|
+
"%TypeError%": $TypeError,
|
|
1092
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
1093
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
1094
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
1095
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
1096
|
+
"%URIError%": $URIError,
|
|
1097
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
1098
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
1099
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
|
|
1100
|
+
"%Function.prototype.call%": $call,
|
|
1101
|
+
"%Function.prototype.apply%": $apply,
|
|
1102
|
+
"%Object.defineProperty%": $defineProperty,
|
|
1103
|
+
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
1104
|
+
"%Math.abs%": abs,
|
|
1105
|
+
"%Math.floor%": floor,
|
|
1106
|
+
"%Math.max%": max,
|
|
1107
|
+
"%Math.min%": min,
|
|
1108
|
+
"%Math.pow%": pow,
|
|
1109
|
+
"%Math.round%": round,
|
|
1110
|
+
"%Math.sign%": sign,
|
|
1111
|
+
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
1112
|
+
};
|
|
1113
|
+
if (getProto) {
|
|
1114
|
+
try {
|
|
1115
|
+
null.error;
|
|
1116
|
+
} catch (e) {
|
|
1117
|
+
errorProto = getProto(getProto(e));
|
|
1118
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
var errorProto;
|
|
1122
|
+
var doEval = function doEval2(name) {
|
|
1123
|
+
var value;
|
|
1124
|
+
if (name === "%AsyncFunction%") {
|
|
1125
|
+
value = getEvalledConstructor("async function () {}");
|
|
1126
|
+
} else if (name === "%GeneratorFunction%") {
|
|
1127
|
+
value = getEvalledConstructor("function* () {}");
|
|
1128
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
1129
|
+
value = getEvalledConstructor("async function* () {}");
|
|
1130
|
+
} else if (name === "%AsyncGenerator%") {
|
|
1131
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
1132
|
+
if (fn) {
|
|
1133
|
+
value = fn.prototype;
|
|
1134
|
+
}
|
|
1135
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
1136
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
1137
|
+
if (gen && getProto) {
|
|
1138
|
+
value = getProto(gen.prototype);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
INTRINSICS[name] = value;
|
|
1142
|
+
return value;
|
|
1143
|
+
};
|
|
1144
|
+
var LEGACY_ALIASES = {
|
|
1145
|
+
__proto__: null,
|
|
1146
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
1147
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
1148
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
1149
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
1150
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
1151
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
1152
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
1153
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
1154
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
1155
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
1156
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
1157
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
1158
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
1159
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
1160
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
1161
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
1162
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
1163
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
1164
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
1165
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
1166
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
1167
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
1168
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
1169
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
1170
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
1171
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
1172
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
1173
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
1174
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
1175
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
1176
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
1177
|
+
"%Promise_all%": ["Promise", "all"],
|
|
1178
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
1179
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
1180
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
1181
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
1182
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
1183
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
1184
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
1185
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
1186
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
1187
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
1188
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
1189
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
1190
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
1191
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
1192
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
1193
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
1194
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1195
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1196
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1197
|
+
};
|
|
1198
|
+
var bind = require_function_bind();
|
|
1199
|
+
var hasOwn = require_hasown();
|
|
1200
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
1201
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
1202
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
1203
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
1204
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
1205
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1206
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
1207
|
+
var stringToPath = function stringToPath2(string) {
|
|
1208
|
+
var first = $strSlice(string, 0, 1);
|
|
1209
|
+
var last = $strSlice(string, -1);
|
|
1210
|
+
if (first === "%" && last !== "%") {
|
|
1211
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
1212
|
+
} else if (last === "%" && first !== "%") {
|
|
1213
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
1214
|
+
}
|
|
1215
|
+
var result = [];
|
|
1216
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
1217
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
1218
|
+
});
|
|
1219
|
+
return result;
|
|
1220
|
+
};
|
|
1221
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
1222
|
+
var intrinsicName = name;
|
|
1223
|
+
var alias;
|
|
1224
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1225
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1226
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
1227
|
+
}
|
|
1228
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1229
|
+
var value = INTRINSICS[intrinsicName];
|
|
1230
|
+
if (value === needsEval) {
|
|
1231
|
+
value = doEval(intrinsicName);
|
|
1232
|
+
}
|
|
1233
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
1234
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
1235
|
+
}
|
|
1236
|
+
return {
|
|
1237
|
+
alias,
|
|
1238
|
+
name: intrinsicName,
|
|
1239
|
+
value
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
1243
|
+
};
|
|
1244
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
1245
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
1246
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
1247
|
+
}
|
|
1248
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
1249
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1250
|
+
}
|
|
1251
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1252
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1253
|
+
}
|
|
1254
|
+
var parts = stringToPath(name);
|
|
1255
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
1256
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
1257
|
+
var intrinsicRealName = intrinsic.name;
|
|
1258
|
+
var value = intrinsic.value;
|
|
1259
|
+
var skipFurtherCaching = false;
|
|
1260
|
+
var alias = intrinsic.alias;
|
|
1261
|
+
if (alias) {
|
|
1262
|
+
intrinsicBaseName = alias[0];
|
|
1263
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1264
|
+
}
|
|
1265
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1266
|
+
var part = parts[i];
|
|
1267
|
+
var first = $strSlice(part, 0, 1);
|
|
1268
|
+
var last = $strSlice(part, -1);
|
|
1269
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
1270
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
1271
|
+
}
|
|
1272
|
+
if (part === "constructor" || !isOwn) {
|
|
1273
|
+
skipFurtherCaching = true;
|
|
1274
|
+
}
|
|
1275
|
+
intrinsicBaseName += "." + part;
|
|
1276
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
1277
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1278
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1279
|
+
} else if (value != null) {
|
|
1280
|
+
if (!(part in value)) {
|
|
1281
|
+
if (!allowMissing) {
|
|
1282
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
1283
|
+
}
|
|
1284
|
+
return void undefined2;
|
|
1285
|
+
}
|
|
1286
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
1287
|
+
var desc = $gOPD(value, part);
|
|
1288
|
+
isOwn = !!desc;
|
|
1289
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
1290
|
+
value = desc.get;
|
|
1291
|
+
} else {
|
|
1292
|
+
value = value[part];
|
|
1293
|
+
}
|
|
1294
|
+
} else {
|
|
1295
|
+
isOwn = hasOwn(value, part);
|
|
1296
|
+
value = value[part];
|
|
1297
|
+
}
|
|
1298
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1299
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
return value;
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
|
|
1308
|
+
// node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js
|
|
1309
|
+
var require_define_data_property = __commonJS({
|
|
1310
|
+
"node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(exports$1, module) {
|
|
1311
|
+
var $defineProperty = require_es_define_property();
|
|
1312
|
+
var $SyntaxError = require_syntax();
|
|
1313
|
+
var $TypeError = require_type();
|
|
1314
|
+
var gopd = require_gopd();
|
|
1315
|
+
module.exports = function defineDataProperty(obj, property, value) {
|
|
1316
|
+
if (!obj || typeof obj !== "object" && typeof obj !== "function") {
|
|
1317
|
+
throw new $TypeError("`obj` must be an object or a function`");
|
|
1318
|
+
}
|
|
1319
|
+
if (typeof property !== "string" && typeof property !== "symbol") {
|
|
1320
|
+
throw new $TypeError("`property` must be a string or a symbol`");
|
|
1321
|
+
}
|
|
1322
|
+
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
|
|
1323
|
+
throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
|
|
1324
|
+
}
|
|
1325
|
+
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
|
|
1326
|
+
throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
|
|
1327
|
+
}
|
|
1328
|
+
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
|
|
1329
|
+
throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
|
|
1330
|
+
}
|
|
1331
|
+
if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
|
|
1332
|
+
throw new $TypeError("`loose`, if provided, must be a boolean");
|
|
1333
|
+
}
|
|
1334
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
1335
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
1336
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
1337
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
1338
|
+
var desc = !!gopd && gopd(obj, property);
|
|
1339
|
+
if ($defineProperty) {
|
|
1340
|
+
$defineProperty(obj, property, {
|
|
1341
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
1342
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
1343
|
+
value,
|
|
1344
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
1345
|
+
});
|
|
1346
|
+
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
1347
|
+
obj[property] = value;
|
|
1348
|
+
} else {
|
|
1349
|
+
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
1350
|
+
}
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
|
|
1355
|
+
// node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js
|
|
1356
|
+
var require_has_property_descriptors = __commonJS({
|
|
1357
|
+
"node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(exports$1, module) {
|
|
1358
|
+
var $defineProperty = require_es_define_property();
|
|
1359
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
1360
|
+
return !!$defineProperty;
|
|
1361
|
+
};
|
|
1362
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
1363
|
+
if (!$defineProperty) {
|
|
1364
|
+
return null;
|
|
1365
|
+
}
|
|
1366
|
+
try {
|
|
1367
|
+
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
1368
|
+
} catch (e) {
|
|
1369
|
+
return true;
|
|
1370
|
+
}
|
|
1371
|
+
};
|
|
1372
|
+
module.exports = hasPropertyDescriptors;
|
|
1373
|
+
}
|
|
1374
|
+
});
|
|
1375
|
+
|
|
1376
|
+
// node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
|
|
1377
|
+
var require_set_function_length = __commonJS({
|
|
1378
|
+
"node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports$1, module) {
|
|
1379
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1380
|
+
var define = require_define_data_property();
|
|
1381
|
+
var hasDescriptors = require_has_property_descriptors()();
|
|
1382
|
+
var gOPD = require_gopd();
|
|
1383
|
+
var $TypeError = require_type();
|
|
1384
|
+
var $floor = GetIntrinsic("%Math.floor%");
|
|
1385
|
+
module.exports = function setFunctionLength(fn, length) {
|
|
1386
|
+
if (typeof fn !== "function") {
|
|
1387
|
+
throw new $TypeError("`fn` is not a function");
|
|
1388
|
+
}
|
|
1389
|
+
if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
|
|
1390
|
+
throw new $TypeError("`length` must be a positive 32-bit integer");
|
|
1391
|
+
}
|
|
1392
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
1393
|
+
var functionLengthIsConfigurable = true;
|
|
1394
|
+
var functionLengthIsWritable = true;
|
|
1395
|
+
if ("length" in fn && gOPD) {
|
|
1396
|
+
var desc = gOPD(fn, "length");
|
|
1397
|
+
if (desc && !desc.configurable) {
|
|
1398
|
+
functionLengthIsConfigurable = false;
|
|
1399
|
+
}
|
|
1400
|
+
if (desc && !desc.writable) {
|
|
1401
|
+
functionLengthIsWritable = false;
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
1405
|
+
if (hasDescriptors) {
|
|
1406
|
+
define(
|
|
1407
|
+
/** @type {Parameters<define>[0]} */
|
|
1408
|
+
fn,
|
|
1409
|
+
"length",
|
|
1410
|
+
length,
|
|
1411
|
+
true,
|
|
1412
|
+
true
|
|
1413
|
+
);
|
|
1414
|
+
} else {
|
|
1415
|
+
define(
|
|
1416
|
+
/** @type {Parameters<define>[0]} */
|
|
1417
|
+
fn,
|
|
1418
|
+
"length",
|
|
1419
|
+
length
|
|
1420
|
+
);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
return fn;
|
|
1424
|
+
};
|
|
1425
|
+
}
|
|
1426
|
+
});
|
|
1427
|
+
|
|
1428
|
+
// node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js
|
|
1429
|
+
var require_applyBind = __commonJS({
|
|
1430
|
+
"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js"(exports$1, module) {
|
|
1431
|
+
var bind = require_function_bind();
|
|
1432
|
+
var $apply = require_functionApply();
|
|
1433
|
+
var actualApply = require_actualApply();
|
|
1434
|
+
module.exports = function applyBind() {
|
|
1435
|
+
return actualApply(bind, $apply, arguments);
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1438
|
+
});
|
|
1439
|
+
|
|
1440
|
+
// node_modules/.pnpm/call-bind@1.0.8/node_modules/call-bind/index.js
|
|
1441
|
+
var require_call_bind = __commonJS({
|
|
1442
|
+
"node_modules/.pnpm/call-bind@1.0.8/node_modules/call-bind/index.js"(exports$1, module) {
|
|
1443
|
+
var setFunctionLength = require_set_function_length();
|
|
1444
|
+
var $defineProperty = require_es_define_property();
|
|
1445
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
1446
|
+
var applyBind = require_applyBind();
|
|
1447
|
+
module.exports = function callBind(originalFunction) {
|
|
1448
|
+
var func = callBindBasic(arguments);
|
|
1449
|
+
var adjustedLength = originalFunction.length - (arguments.length - 1);
|
|
1450
|
+
return setFunctionLength(
|
|
1451
|
+
func,
|
|
1452
|
+
1 + (adjustedLength > 0 ? adjustedLength : 0),
|
|
1453
|
+
true
|
|
1454
|
+
);
|
|
1455
|
+
};
|
|
1456
|
+
if ($defineProperty) {
|
|
1457
|
+
$defineProperty(module.exports, "apply", { value: applyBind });
|
|
1458
|
+
} else {
|
|
1459
|
+
module.exports.apply = applyBind;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
|
|
1464
|
+
// node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js
|
|
1465
|
+
var require_call_bound = __commonJS({
|
|
1466
|
+
"node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(exports$1, module) {
|
|
1467
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1468
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
1469
|
+
var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
|
|
1470
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
1471
|
+
var intrinsic = (
|
|
1472
|
+
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
1473
|
+
GetIntrinsic(name, !!allowMissing)
|
|
1474
|
+
);
|
|
1475
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
1476
|
+
return callBindBasic(
|
|
1477
|
+
/** @type {const} */
|
|
1478
|
+
[intrinsic]
|
|
1479
|
+
);
|
|
1480
|
+
}
|
|
1481
|
+
return intrinsic;
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
});
|
|
1485
|
+
|
|
1486
|
+
// node_modules/.pnpm/json-stable-stringify@1.3.0/node_modules/json-stable-stringify/index.js
|
|
1487
|
+
var require_json_stable_stringify = __commonJS({
|
|
1488
|
+
"node_modules/.pnpm/json-stable-stringify@1.3.0/node_modules/json-stable-stringify/index.js"(exports$1, module) {
|
|
1489
|
+
var jsonStringify = (typeof JSON !== "undefined" ? JSON : require_jsonify()).stringify;
|
|
1490
|
+
var isArray = require_isarray();
|
|
1491
|
+
var objectKeys = require_object_keys();
|
|
1492
|
+
var callBind = require_call_bind();
|
|
1493
|
+
var callBound = require_call_bound();
|
|
1494
|
+
var $join = callBound("Array.prototype.join");
|
|
1495
|
+
var $indexOf = callBound("Array.prototype.indexOf");
|
|
1496
|
+
var $splice = callBound("Array.prototype.splice");
|
|
1497
|
+
var $sort = callBound("Array.prototype.sort");
|
|
1498
|
+
var strRepeat = function repeat(n, char) {
|
|
1499
|
+
var str = "";
|
|
1500
|
+
for (var i = 0; i < n; i += 1) {
|
|
1501
|
+
str += char;
|
|
1502
|
+
}
|
|
1503
|
+
return str;
|
|
1504
|
+
};
|
|
1505
|
+
var defaultReplacer = function(_parent, _key, value) {
|
|
1506
|
+
return value;
|
|
1507
|
+
};
|
|
1508
|
+
module.exports = function stableStringify(obj) {
|
|
1509
|
+
var opts = arguments.length > 1 ? arguments[1] : void 0;
|
|
1510
|
+
var space = opts && opts.space || "";
|
|
1511
|
+
if (typeof space === "number") {
|
|
1512
|
+
space = strRepeat(space, " ");
|
|
1513
|
+
}
|
|
1514
|
+
var cycles = !!opts && typeof opts.cycles === "boolean" && opts.cycles;
|
|
1515
|
+
var replacer = opts && opts.replacer ? callBind(opts.replacer) : defaultReplacer;
|
|
1516
|
+
if (opts && typeof opts.collapseEmpty !== "undefined" && typeof opts.collapseEmpty !== "boolean") {
|
|
1517
|
+
throw new TypeError("`collapseEmpty` must be a boolean, if provided");
|
|
1518
|
+
}
|
|
1519
|
+
var collapseEmpty = !!opts && opts.collapseEmpty;
|
|
1520
|
+
var cmpOpt = typeof opts === "function" ? opts : opts && opts.cmp;
|
|
1521
|
+
var cmp = cmpOpt && function(node) {
|
|
1522
|
+
var get = (
|
|
1523
|
+
/** @type {NonNullable<typeof cmpOpt>} */
|
|
1524
|
+
cmpOpt.length > 2 && /** @type {import('.').Getter['get']} */
|
|
1525
|
+
function get2(k) {
|
|
1526
|
+
return node[k];
|
|
1527
|
+
}
|
|
1528
|
+
);
|
|
1529
|
+
return function(a, b) {
|
|
1530
|
+
return (
|
|
1531
|
+
/** @type {NonNullable<typeof cmpOpt>} */
|
|
1532
|
+
cmpOpt(
|
|
1533
|
+
{ key: a, value: node[a] },
|
|
1534
|
+
{ key: b, value: node[b] },
|
|
1535
|
+
// @ts-expect-error TS doesn't understand the optimization used here
|
|
1536
|
+
get ? (
|
|
1537
|
+
/** @type {import('.').Getter} */
|
|
1538
|
+
{ __proto__: null, get }
|
|
1539
|
+
) : void 0
|
|
1540
|
+
)
|
|
1541
|
+
);
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
var seen = [];
|
|
1545
|
+
return (
|
|
1546
|
+
/** @type {(parent: import('.').Node, key: string | number, node: unknown, level: number) => string | undefined} */
|
|
1547
|
+
(function stringify2(parent, key, node, level) {
|
|
1548
|
+
var indent = space ? "\n" + strRepeat(level, space) : "";
|
|
1549
|
+
var colonSeparator = space ? ": " : ":";
|
|
1550
|
+
if (node && /** @type {{ toJSON?: unknown }} */
|
|
1551
|
+
node.toJSON && typeof /** @type {{ toJSON?: unknown }} */
|
|
1552
|
+
node.toJSON === "function") {
|
|
1553
|
+
node = /** @type {{ toJSON: Function }} */
|
|
1554
|
+
node.toJSON();
|
|
1555
|
+
}
|
|
1556
|
+
node = replacer(parent, key, node);
|
|
1557
|
+
if (node === void 0) {
|
|
1558
|
+
return;
|
|
1559
|
+
}
|
|
1560
|
+
if (typeof node !== "object" || node === null) {
|
|
1561
|
+
return jsonStringify(node);
|
|
1562
|
+
}
|
|
1563
|
+
var groupOutput = function(out2, brackets) {
|
|
1564
|
+
return collapseEmpty && out2.length === 0 ? brackets : (brackets === "[]" ? "[" : "{") + $join(out2, ",") + indent + (brackets === "[]" ? "]" : "}");
|
|
1565
|
+
};
|
|
1566
|
+
if (isArray(node)) {
|
|
1567
|
+
var out = [];
|
|
1568
|
+
for (var i = 0; i < node.length; i++) {
|
|
1569
|
+
var item = stringify2(node, i, node[i], level + 1) || jsonStringify(null);
|
|
1570
|
+
out[out.length] = indent + space + item;
|
|
1571
|
+
}
|
|
1572
|
+
return groupOutput(out, "[]");
|
|
1573
|
+
}
|
|
1574
|
+
if ($indexOf(seen, node) !== -1) {
|
|
1575
|
+
if (cycles) {
|
|
1576
|
+
return jsonStringify("__cycle__");
|
|
1577
|
+
}
|
|
1578
|
+
throw new TypeError("Converting circular structure to JSON");
|
|
1579
|
+
} else {
|
|
1580
|
+
seen[seen.length] = /** @type {import('.').NonArrayNode} */
|
|
1581
|
+
node;
|
|
1582
|
+
}
|
|
1583
|
+
var keys = $sort(objectKeys(node), cmp && cmp(
|
|
1584
|
+
/** @type {import('.').NonArrayNode} */
|
|
1585
|
+
node
|
|
1586
|
+
));
|
|
1587
|
+
var out = [];
|
|
1588
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1589
|
+
var key = keys[i];
|
|
1590
|
+
var value = stringify2(
|
|
1591
|
+
/** @type {import('.').Node} */
|
|
1592
|
+
node,
|
|
1593
|
+
key,
|
|
1594
|
+
/** @type {import('.').NonArrayNode} */
|
|
1595
|
+
node[key],
|
|
1596
|
+
level + 1
|
|
1597
|
+
);
|
|
1598
|
+
if (!value) {
|
|
1599
|
+
continue;
|
|
1600
|
+
}
|
|
1601
|
+
var keyValue = jsonStringify(key) + colonSeparator + value;
|
|
1602
|
+
out[out.length] = indent + space + keyValue;
|
|
1603
|
+
}
|
|
1604
|
+
$splice(seen, $indexOf(seen, node), 1);
|
|
1605
|
+
return groupOutput(out, "{}");
|
|
1606
|
+
})({ "": obj }, "", obj, 0)
|
|
1607
|
+
);
|
|
1608
|
+
};
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1611
|
+
|
|
1612
|
+
// src/util/encode.ts
|
|
1613
|
+
var import_json_stable_stringify = __toESM(require_json_stable_stringify(), 1);
|
|
1614
|
+
|
|
1615
|
+
// src/util/flags.ts
|
|
1616
|
+
var isFlagEnabled = (identifier) => {
|
|
1617
|
+
const flag = localStorage.getItem(`kizen-flag-${identifier}`);
|
|
1618
|
+
return flag === "true";
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
// src/util/encode.ts
|
|
1622
|
+
var getHash = (str = "") => {
|
|
1623
|
+
return str.split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0);
|
|
1624
|
+
};
|
|
1625
|
+
var getStableHash = (obj) => {
|
|
1626
|
+
try {
|
|
1627
|
+
return getHash((0, import_json_stable_stringify.default)(obj));
|
|
1628
|
+
} catch (ex) {
|
|
1629
|
+
const isDebug = isFlagEnabled("script-runner-logging");
|
|
1630
|
+
if (isDebug) {
|
|
1631
|
+
console.warn("Failed to stringify object for hashing:", ex);
|
|
1632
|
+
}
|
|
1633
|
+
return getHash(String(Math.random()));
|
|
1634
|
+
}
|
|
1635
|
+
};
|
|
1636
|
+
var isRelative = (url) => {
|
|
1637
|
+
return url.startsWith("/");
|
|
1638
|
+
};
|
|
1639
|
+
var allowedAllowValues = [
|
|
1640
|
+
"microphone",
|
|
1641
|
+
"speaker-selection",
|
|
1642
|
+
"autoplay",
|
|
1643
|
+
"camera",
|
|
1644
|
+
"display-capture",
|
|
1645
|
+
"hid"
|
|
1646
|
+
];
|
|
1647
|
+
var allowedSandboxValues = ["allow-popups", "allow-scripts", "allow-same-origin"];
|
|
1648
|
+
var refreshTimeout = 3e4;
|
|
1649
|
+
var refreshInterval = 100;
|
|
1650
|
+
var WorkerManager = class {
|
|
1651
|
+
worker;
|
|
1652
|
+
scriptUIRef;
|
|
1653
|
+
onStateChange;
|
|
1654
|
+
done;
|
|
1655
|
+
onError;
|
|
1656
|
+
waitForFrame = false;
|
|
1657
|
+
plugin;
|
|
1658
|
+
executionPlugin;
|
|
1659
|
+
frameId;
|
|
1660
|
+
onShowToast;
|
|
1661
|
+
onClearToasts;
|
|
1662
|
+
sessionData = {};
|
|
1663
|
+
setSessionData;
|
|
1664
|
+
pluginComponentId;
|
|
1665
|
+
onShowModal;
|
|
1666
|
+
onShowCreateRecordModal;
|
|
1667
|
+
onShowCreateRelatedRecordModal;
|
|
1668
|
+
onReleaseBlockingScript;
|
|
1669
|
+
pluginApiName;
|
|
1670
|
+
onNetworkError;
|
|
1671
|
+
onNetworkRequest;
|
|
1672
|
+
invalidateCache;
|
|
1673
|
+
// todo
|
|
1674
|
+
getPendingCacheCount;
|
|
1675
|
+
// todo
|
|
1676
|
+
createFileId;
|
|
1677
|
+
performFileUpload;
|
|
1678
|
+
pushHistory;
|
|
1679
|
+
appPath;
|
|
1680
|
+
constructor(args) {
|
|
1681
|
+
this.scriptUIRef = args.scriptUIRef;
|
|
1682
|
+
this.onStateChange = args.onStateChange;
|
|
1683
|
+
this.done = args.done;
|
|
1684
|
+
this.onError = args.onError;
|
|
1685
|
+
this.onReleaseBlockingScript = args.onReleaseBlockingScript;
|
|
1686
|
+
this.worker = args.worker;
|
|
1687
|
+
this.worker.onmessage = this.handleMessage;
|
|
1688
|
+
this.plugin = args.plugin;
|
|
1689
|
+
this.executionPlugin = args.executionPlugin;
|
|
1690
|
+
this.onShowToast = args.onShowToast;
|
|
1691
|
+
this.onClearToasts = args.onClearToasts;
|
|
1692
|
+
this.pluginComponentId = args.pluginComponentId;
|
|
1693
|
+
this.onShowModal = args.onShowModal;
|
|
1694
|
+
this.onShowCreateRecordModal = args.onShowCreateRecordModal;
|
|
1695
|
+
this.onShowCreateRelatedRecordModal = args.onShowCreateRelatedRecordModal;
|
|
1696
|
+
this.onNetworkError = args.onNetworkError;
|
|
1697
|
+
this.onNetworkRequest = args.onNetworkRequest;
|
|
1698
|
+
this.invalidateCache = args.invalidateCache;
|
|
1699
|
+
this.getPendingCacheCount = args.getPendingCacheCount;
|
|
1700
|
+
this.createFileId = args.createFileId;
|
|
1701
|
+
this.performFileUpload = args.performFileUpload;
|
|
1702
|
+
this.pushHistory = args.pushHistory;
|
|
1703
|
+
this.appPath = args.appPath;
|
|
1704
|
+
if (this.plugin) {
|
|
1705
|
+
this.frameId = `${IFRAME_PREFIX}-${this.plugin.plugin_api_name}-${this.plugin.api_name}`;
|
|
1706
|
+
}
|
|
1707
|
+
this.pluginApiName = this.executionPlugin?.plugin_api_name ?? this.plugin?.plugin_api_name ?? "";
|
|
1708
|
+
if (this.pluginApiName) {
|
|
1709
|
+
this.sessionData = args.sessionData[this.pluginApiName];
|
|
1710
|
+
this.setSessionData = (state) => {
|
|
1711
|
+
args.setSessionData?.(this.pluginApiName, state);
|
|
1712
|
+
};
|
|
1713
|
+
} else {
|
|
1714
|
+
this.setSessionData = () => {
|
|
1715
|
+
this.onError?.({
|
|
1716
|
+
message: "Script must be associated with a plugin to use session data"
|
|
1717
|
+
});
|
|
1718
|
+
};
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
handleMessage = async (rawEvent) => {
|
|
1722
|
+
const event = JSON.parse(rawEvent.data);
|
|
1723
|
+
const { action } = event;
|
|
1724
|
+
switch (action) {
|
|
1725
|
+
case ACTIONS.QUERY_REQUEST: {
|
|
1726
|
+
const consideredEvent = event;
|
|
1727
|
+
await this.handleQueryRequest(
|
|
1728
|
+
consideredEvent.id,
|
|
1729
|
+
consideredEvent.method,
|
|
1730
|
+
consideredEvent.url,
|
|
1731
|
+
consideredEvent.payload,
|
|
1732
|
+
consideredEvent.options
|
|
1733
|
+
);
|
|
1734
|
+
return;
|
|
1735
|
+
}
|
|
1736
|
+
case ACTIONS.UI_OUTPUT: {
|
|
1737
|
+
const consideredEvent = event;
|
|
1738
|
+
this.handleUIOutput(consideredEvent.markup);
|
|
1739
|
+
return;
|
|
1740
|
+
}
|
|
1741
|
+
case ACTIONS.IFRAME_OUTPUT: {
|
|
1742
|
+
const consideredEvent = event;
|
|
1743
|
+
this.handleIframeOutput(
|
|
1744
|
+
consideredEvent.url,
|
|
1745
|
+
consideredEvent.allow,
|
|
1746
|
+
consideredEvent.sandbox,
|
|
1747
|
+
consideredEvent.preserve
|
|
1748
|
+
);
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1751
|
+
case ACTIONS.POSTFORMDATA_REQUEST: {
|
|
1752
|
+
const consideredEvent = event;
|
|
1753
|
+
this.handleFormPostRequest(
|
|
1754
|
+
consideredEvent.id,
|
|
1755
|
+
consideredEvent.url,
|
|
1756
|
+
consideredEvent.payload,
|
|
1757
|
+
consideredEvent.createNewTab
|
|
1758
|
+
);
|
|
1759
|
+
return;
|
|
1760
|
+
}
|
|
1761
|
+
case ACTIONS.UPLOADFILE_REQUEST: {
|
|
1762
|
+
const consideredEvent = event;
|
|
1763
|
+
await this.handleUploadFileRequest(consideredEvent.id, consideredEvent.payload);
|
|
1764
|
+
return;
|
|
1765
|
+
}
|
|
1766
|
+
case ACTIONS.SETSTATE: {
|
|
1767
|
+
const consideredEvent = event;
|
|
1768
|
+
this.onStateChange?.(consideredEvent.state);
|
|
1769
|
+
return;
|
|
1770
|
+
}
|
|
1771
|
+
case ACTIONS.DONE: {
|
|
1772
|
+
const consideredEvent = event;
|
|
1773
|
+
this.handleDone(consideredEvent.preserve, consideredEvent.result);
|
|
1774
|
+
return;
|
|
1775
|
+
}
|
|
1776
|
+
case RESPONSES.ERROR: {
|
|
1777
|
+
const consideredEvent = event;
|
|
1778
|
+
this.onError?.({ message: consideredEvent.error });
|
|
1779
|
+
return;
|
|
1780
|
+
}
|
|
1781
|
+
case ACTIONS.OPEN_WINDOW: {
|
|
1782
|
+
const consideredEvent = event;
|
|
1783
|
+
this.handleOpenWindow(
|
|
1784
|
+
consideredEvent.url,
|
|
1785
|
+
consideredEvent.target,
|
|
1786
|
+
consideredEvent.features
|
|
1787
|
+
);
|
|
1788
|
+
return;
|
|
1789
|
+
}
|
|
1790
|
+
case ACTIONS.COMMUNICATE: {
|
|
1791
|
+
const consideredEvent = event;
|
|
1792
|
+
this.handleCommunication(
|
|
1793
|
+
consideredEvent.type,
|
|
1794
|
+
consideredEvent.recipient,
|
|
1795
|
+
consideredEvent.args,
|
|
1796
|
+
consideredEvent.params
|
|
1797
|
+
);
|
|
1798
|
+
return;
|
|
1799
|
+
}
|
|
1800
|
+
case ACTIONS.HIDE: {
|
|
1801
|
+
const consideredEvent = event;
|
|
1802
|
+
const { config } = consideredEvent;
|
|
1803
|
+
let triggerHidden = false;
|
|
1804
|
+
if (config.hideTrigger) {
|
|
1805
|
+
triggerHidden = true;
|
|
1806
|
+
}
|
|
1807
|
+
this.onStateChange?.({ hidden: true, triggerHidden });
|
|
1808
|
+
return;
|
|
1809
|
+
}
|
|
1810
|
+
case ACTIONS.SHOW: {
|
|
1811
|
+
const consideredEvent = event;
|
|
1812
|
+
const { config } = consideredEvent;
|
|
1813
|
+
let triggerHidden = false;
|
|
1814
|
+
if (config.showTrigger === false) {
|
|
1815
|
+
triggerHidden = true;
|
|
1816
|
+
}
|
|
1817
|
+
this.onStateChange?.({ hidden: false, triggerHidden });
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
case ACTIONS.EXPAND: {
|
|
1821
|
+
this.onStateChange?.({ minimized: false });
|
|
1822
|
+
return;
|
|
1823
|
+
}
|
|
1824
|
+
case ACTIONS.COLLAPSE: {
|
|
1825
|
+
this.onStateChange?.({ minimized: true });
|
|
1826
|
+
return;
|
|
1827
|
+
}
|
|
1828
|
+
case ACTIONS.HIDE_HEADER: {
|
|
1829
|
+
this.onStateChange?.({ hideHeader: true });
|
|
1830
|
+
return;
|
|
1831
|
+
}
|
|
1832
|
+
case ACTIONS.SHOW_HEADER: {
|
|
1833
|
+
this.onStateChange?.({ hideHeader: false });
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1836
|
+
case ACTIONS.COPY_TO_CLIPBOARD: {
|
|
1837
|
+
const consideredEvent = event;
|
|
1838
|
+
await this.copyToClipboard(consideredEvent.text);
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
case ACTIONS.OPEN_CREATE_RECORD_MODAL_REQUEST: {
|
|
1842
|
+
const consideredEvent = event;
|
|
1843
|
+
this.handleCreateRecordRequest(consideredEvent.id, consideredEvent.entityId);
|
|
1844
|
+
return;
|
|
1845
|
+
}
|
|
1846
|
+
case ACTIONS.OPEN_CREATE_RELATED_RECORD_MODAL_REQUEST: {
|
|
1847
|
+
const consideredEvent = event;
|
|
1848
|
+
this.handleCreateRelatedRecordRequest(
|
|
1849
|
+
consideredEvent.id,
|
|
1850
|
+
consideredEvent.objectId,
|
|
1851
|
+
consideredEvent.relatedEntityId
|
|
1852
|
+
);
|
|
1853
|
+
return;
|
|
1854
|
+
}
|
|
1855
|
+
case ACTIONS.SHOW_TOAST: {
|
|
1856
|
+
const consideredEvent = event;
|
|
1857
|
+
this.showToast(consideredEvent.message, consideredEvent.toastOptions);
|
|
1858
|
+
return;
|
|
1859
|
+
}
|
|
1860
|
+
case ACTIONS.CLEAR_TOASTS: {
|
|
1861
|
+
this.clearToasts();
|
|
1862
|
+
return;
|
|
1863
|
+
}
|
|
1864
|
+
case ACTIONS.REFRESH_TIMELINE: {
|
|
1865
|
+
const consideredEvent = event;
|
|
1866
|
+
this.handleRefreshTimeline(consideredEvent.entityId);
|
|
1867
|
+
return;
|
|
1868
|
+
}
|
|
1869
|
+
case ACTIONS.REFRESH_ENTITY: {
|
|
1870
|
+
const consideredEvent = event;
|
|
1871
|
+
await this.handleRefreshEntity(consideredEvent.entityId, consideredEvent.id);
|
|
1872
|
+
return;
|
|
1873
|
+
}
|
|
1874
|
+
case ACTIONS.UPDATE_SESSION_DATA: {
|
|
1875
|
+
const consideredEvent = event;
|
|
1876
|
+
this.handleSetSessionData(consideredEvent.update);
|
|
1877
|
+
return;
|
|
1878
|
+
}
|
|
1879
|
+
case ACTIONS.INSTALL_THIRD_PARTY_SCRIPT_REQUEST: {
|
|
1880
|
+
const consideredEvent = event;
|
|
1881
|
+
this.handleInstallThirdPartyScriptRequest(
|
|
1882
|
+
consideredEvent.id,
|
|
1883
|
+
consideredEvent.url,
|
|
1884
|
+
consideredEvent.args
|
|
1885
|
+
);
|
|
1886
|
+
return;
|
|
1887
|
+
}
|
|
1888
|
+
case ACTIONS.PROMPT_REQUEST: {
|
|
1889
|
+
const consideredEvent = event;
|
|
1890
|
+
this.handlePromptRequest(consideredEvent.id, consideredEvent.config, false);
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
case ACTIONS.DYNAMIC_PROMPT_REQUEST: {
|
|
1894
|
+
const consideredEvent = event;
|
|
1895
|
+
this.handlePromptRequest(consideredEvent.id, consideredEvent.config, true);
|
|
1896
|
+
return;
|
|
1897
|
+
}
|
|
1898
|
+
case ACTIONS.RELEASE_BLOCKING_SCRIPT: {
|
|
1899
|
+
this.handleReleaseBlockingScript();
|
|
1900
|
+
return;
|
|
1901
|
+
}
|
|
1902
|
+
case ACTIONS.AUTHORIZE: {
|
|
1903
|
+
const consideredEvent = event;
|
|
1904
|
+
this.handleAuthorize(consideredEvent.serviceName, consideredEvent.config);
|
|
1905
|
+
return;
|
|
1906
|
+
}
|
|
1907
|
+
default:
|
|
1908
|
+
return;
|
|
1909
|
+
}
|
|
1910
|
+
};
|
|
1911
|
+
handleCommunication = (type, recipient, args, params) => {
|
|
1912
|
+
if (type === COMMUNICATIONS.SEND_MESSAGE_TO_FRAME) {
|
|
1913
|
+
if (this.frameId) {
|
|
1914
|
+
const target = document.getElementById(this.frameId);
|
|
1915
|
+
if (target) {
|
|
1916
|
+
target.contentWindow?.postMessage(
|
|
1917
|
+
{
|
|
1918
|
+
...args?.payload ?? {},
|
|
1919
|
+
__kizen: {
|
|
1920
|
+
recipient,
|
|
1921
|
+
frameId: this.frameId
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
args?.path ?? "*"
|
|
1925
|
+
);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
} else if (type === COMMUNICATIONS.CALL_THIRD_PARTY_SCRIPT) {
|
|
1929
|
+
this.handleCallThirdPartyScript(recipient.type, params);
|
|
1930
|
+
} else {
|
|
1931
|
+
const pluginApiName = this.executionPlugin?.plugin_api_name ?? this.plugin?.plugin_api_name;
|
|
1932
|
+
const event = new CustomEvent(`integration:${type}`, {
|
|
1933
|
+
detail: {
|
|
1934
|
+
recipient: {
|
|
1935
|
+
...recipient,
|
|
1936
|
+
plugin: pluginApiName
|
|
1937
|
+
},
|
|
1938
|
+
args
|
|
1939
|
+
}
|
|
1940
|
+
});
|
|
1941
|
+
window.dispatchEvent(event);
|
|
1942
|
+
}
|
|
1943
|
+
};
|
|
1944
|
+
handleDone = (preserve, result) => {
|
|
1945
|
+
if (!this.waitForFrame) {
|
|
1946
|
+
this.done(preserve, result);
|
|
1947
|
+
}
|
|
1948
|
+
};
|
|
1949
|
+
postMessage = (action, data) => {
|
|
1950
|
+
this.worker.postMessage(
|
|
1951
|
+
JSON.stringify({
|
|
1952
|
+
action,
|
|
1953
|
+
...data
|
|
1954
|
+
})
|
|
1955
|
+
);
|
|
1956
|
+
};
|
|
1957
|
+
handleSetSessionData = (state) => {
|
|
1958
|
+
this.setSessionData(state);
|
|
1959
|
+
};
|
|
1960
|
+
handleQueryRequest = async (id, method, url, payload, options) => {
|
|
1961
|
+
try {
|
|
1962
|
+
const data = await this.onNetworkRequest?.(method, url, payload, options);
|
|
1963
|
+
this.postMessage(RESPONSES.QUERY_RESPONSE, { data, id });
|
|
1964
|
+
} catch (ex) {
|
|
1965
|
+
this.onNetworkError?.(ex);
|
|
1966
|
+
this.postMessage(RESPONSES.QUERY_RESPONSE, { error: ex, id });
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
handleUIOutput = (markup) => {
|
|
1970
|
+
if (this.scriptUIRef?.current) {
|
|
1971
|
+
const sanitizedMarkup = DOMPurify.sanitize(markup);
|
|
1972
|
+
this.scriptUIRef.current.innerHTML = sanitizedMarkup;
|
|
1973
|
+
}
|
|
1974
|
+
};
|
|
1975
|
+
onLoad = (payload) => {
|
|
1976
|
+
if (payload.iframe) {
|
|
1977
|
+
this.waitForFrame = false;
|
|
1978
|
+
this.handleDone(payload.preserve);
|
|
1979
|
+
}
|
|
1980
|
+
};
|
|
1981
|
+
handleIframeOutput = (url, allow = [], sandbox = [], preserve = false) => {
|
|
1982
|
+
if (this.scriptUIRef?.current) {
|
|
1983
|
+
const parsedAllowList = allow.filter((a) => allowedAllowValues.includes(a));
|
|
1984
|
+
const parsedSandboxList = sandbox.filter((s) => allowedSandboxValues.includes(s));
|
|
1985
|
+
this.waitForFrame = true;
|
|
1986
|
+
const element = document.createElement("iframe");
|
|
1987
|
+
element.src = url;
|
|
1988
|
+
element.allow = parsedAllowList.join("; ");
|
|
1989
|
+
parsedSandboxList.forEach((s) => {
|
|
1990
|
+
element.sandbox.add(s);
|
|
1991
|
+
});
|
|
1992
|
+
element.style.border = "none";
|
|
1993
|
+
element.style.width = "100%";
|
|
1994
|
+
element.style.height = "100%";
|
|
1995
|
+
element.onload = this.onLoad.bind(this, { iframe: element, preserve });
|
|
1996
|
+
if (this.frameId) {
|
|
1997
|
+
element.id = this.frameId;
|
|
1998
|
+
}
|
|
1999
|
+
this.scriptUIRef.current.replaceChildren(element);
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
2002
|
+
handleCreateRecordRequest = (promiseId, objectId) => {
|
|
2003
|
+
this.onShowCreateRecordModal?.(objectId, (result) => {
|
|
2004
|
+
this.postMessage(RESPONSES.CREATE_RECORD_RESPONSE, {
|
|
2005
|
+
id: promiseId,
|
|
2006
|
+
data: result
|
|
2007
|
+
});
|
|
2008
|
+
});
|
|
2009
|
+
};
|
|
2010
|
+
handleCreateRelatedRecordRequest = (promiseId, objectId, relatedEntityId) => {
|
|
2011
|
+
this.onShowCreateRelatedRecordModal?.(objectId, relatedEntityId, (result) => {
|
|
2012
|
+
this.postMessage(RESPONSES.CREATE_RELATED_RECORD_RESPONSE, {
|
|
2013
|
+
id: promiseId,
|
|
2014
|
+
data: result
|
|
2015
|
+
});
|
|
2016
|
+
});
|
|
2017
|
+
};
|
|
2018
|
+
showToast = (message, options) => {
|
|
2019
|
+
this.onShowToast?.({
|
|
2020
|
+
message,
|
|
2021
|
+
variant: options?.variant ?? "success",
|
|
2022
|
+
autohide: options?.autohide ?? true
|
|
2023
|
+
});
|
|
2024
|
+
};
|
|
2025
|
+
clearToasts = () => {
|
|
2026
|
+
this.onClearToasts?.();
|
|
2027
|
+
};
|
|
2028
|
+
copyToClipboard = async (text) => {
|
|
2029
|
+
try {
|
|
2030
|
+
await navigator.clipboard.writeText(text);
|
|
2031
|
+
} catch (err) {
|
|
2032
|
+
this.onError?.({
|
|
2033
|
+
message: err.message
|
|
2034
|
+
});
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
handleRefreshTimeline = (entityId) => {
|
|
2038
|
+
this.invalidateCache?.("timeline", entityId);
|
|
2039
|
+
};
|
|
2040
|
+
// When we refresh a set of react-query keys, we need to wait for the queries to settle and finish refetching
|
|
2041
|
+
waitForIdleState = (search) => {
|
|
2042
|
+
return new Promise((resolve) => {
|
|
2043
|
+
let count = 0;
|
|
2044
|
+
const interval = setInterval(() => {
|
|
2045
|
+
const fetchCount = this.getPendingCacheCount?.(search) ?? 0;
|
|
2046
|
+
if (fetchCount === 0) {
|
|
2047
|
+
clearInterval(interval);
|
|
2048
|
+
resolve(true);
|
|
2049
|
+
} else {
|
|
2050
|
+
count += 1;
|
|
2051
|
+
if (count > Math.floor(refreshTimeout / refreshInterval)) {
|
|
2052
|
+
clearInterval(interval);
|
|
2053
|
+
resolve(false);
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
}, refreshInterval);
|
|
2057
|
+
});
|
|
2058
|
+
};
|
|
2059
|
+
handleRefreshEntity = async (entityId, promiseId) => {
|
|
2060
|
+
this.invalidateCache?.("entity", entityId);
|
|
2061
|
+
const result = await this.waitForIdleState(entityId);
|
|
2062
|
+
this.postMessage(RESPONSES.REFRESH_ENTITY_RESPONSE, {
|
|
2063
|
+
id: promiseId,
|
|
2064
|
+
data: {
|
|
2065
|
+
success: result
|
|
2066
|
+
}
|
|
2067
|
+
});
|
|
2068
|
+
};
|
|
2069
|
+
handleFormPostRequest = (id, url, payload, createNewTab) => {
|
|
2070
|
+
const form = document.createElement("form");
|
|
2071
|
+
form.method = "POST";
|
|
2072
|
+
form.action = url;
|
|
2073
|
+
if (createNewTab) {
|
|
2074
|
+
form.target = "_blank";
|
|
2075
|
+
}
|
|
2076
|
+
for (const key in payload) {
|
|
2077
|
+
const field = document.createElement("input");
|
|
2078
|
+
field.type = "hidden";
|
|
2079
|
+
field.name = key;
|
|
2080
|
+
field.value = payload[key];
|
|
2081
|
+
form.appendChild(field);
|
|
2082
|
+
}
|
|
2083
|
+
document.body.appendChild(form);
|
|
2084
|
+
form.submit();
|
|
2085
|
+
if (createNewTab) {
|
|
2086
|
+
document.body.removeChild(form);
|
|
2087
|
+
}
|
|
2088
|
+
this.postMessage(RESPONSES.POSTFORMDATA_RESPONSE, { success: true, id });
|
|
2089
|
+
};
|
|
2090
|
+
handleUploadFileRequest = async (id, payload) => {
|
|
2091
|
+
if (!this.performFileUpload) {
|
|
2092
|
+
this.postMessage(RESPONSES.UPLOADFILE_RESPONSE, { error: "File upload not supported", id });
|
|
2093
|
+
return;
|
|
2094
|
+
}
|
|
2095
|
+
const { file: encodedFile, isPublic = false, fileName } = payload;
|
|
2096
|
+
const decodedFile = await fetch(encodedFile);
|
|
2097
|
+
const fileBlob = await decodedFile.blob();
|
|
2098
|
+
const file = new File([fileBlob], fileName ?? `upload-${(/* @__PURE__ */ new Date()).toISOString()}`, {
|
|
2099
|
+
type: fileBlob.type
|
|
2100
|
+
});
|
|
2101
|
+
file.$id = this.createFileId?.() ?? generateUUIDV4();
|
|
2102
|
+
const result = await this.performFileUpload({
|
|
2103
|
+
file,
|
|
2104
|
+
id: file.$id,
|
|
2105
|
+
publicFile: isPublic,
|
|
2106
|
+
source: "field_value",
|
|
2107
|
+
handleProgress: (p) => {
|
|
2108
|
+
this.postMessage(RESPONSES.UPLOADFILE_PROGRESS, {
|
|
2109
|
+
fileId: p.id,
|
|
2110
|
+
progress: p.progress
|
|
2111
|
+
});
|
|
2112
|
+
},
|
|
2113
|
+
businessId: void 0
|
|
2114
|
+
});
|
|
2115
|
+
this.postMessage(RESPONSES.UPLOADFILE_RESPONSE, { data: result, id });
|
|
2116
|
+
};
|
|
2117
|
+
waitForReadyState = (predicate, cb, iterations = 0) => {
|
|
2118
|
+
if (!predicate) {
|
|
2119
|
+
cb?.(true);
|
|
2120
|
+
}
|
|
2121
|
+
if (predicate?.()) {
|
|
2122
|
+
cb?.(true);
|
|
2123
|
+
} else if (iterations < 20) {
|
|
2124
|
+
setTimeout(() => {
|
|
2125
|
+
this.waitForReadyState(predicate, cb, iterations + 1);
|
|
2126
|
+
}, iterations * 50);
|
|
2127
|
+
} else {
|
|
2128
|
+
cb?.(false);
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2131
|
+
handleCallThirdPartyScript = (scriptType, args = []) => {
|
|
2132
|
+
if (scriptType && thirdPartyGlobalNames[scriptType]) {
|
|
2133
|
+
const globalName = thirdPartyGlobalNames[scriptType];
|
|
2134
|
+
const fn = window[globalName];
|
|
2135
|
+
fn?.(...args);
|
|
2136
|
+
}
|
|
2137
|
+
};
|
|
2138
|
+
handleReleaseBlockingScript = () => {
|
|
2139
|
+
return this.onReleaseBlockingScript?.(this.executionPlugin);
|
|
2140
|
+
};
|
|
2141
|
+
handlePromptRequest = (id, config, dynamic = false) => {
|
|
2142
|
+
if (this.onShowModal) {
|
|
2143
|
+
this.onShowModal(
|
|
2144
|
+
{
|
|
2145
|
+
...config,
|
|
2146
|
+
pluginApiName: this.pluginApiName ?? "",
|
|
2147
|
+
dynamic
|
|
2148
|
+
},
|
|
2149
|
+
(result = {}) => {
|
|
2150
|
+
this.postMessage(RESPONSES.PROMPT_RESPONSE, {
|
|
2151
|
+
id,
|
|
2152
|
+
data: result
|
|
2153
|
+
});
|
|
2154
|
+
}
|
|
2155
|
+
);
|
|
2156
|
+
} else {
|
|
2157
|
+
this.postMessage(RESPONSES.PROMPT_RESPONSE, {
|
|
2158
|
+
id,
|
|
2159
|
+
data: { canceled: true }
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
};
|
|
2163
|
+
handleInstallThirdPartyScriptRequest = (id, url, args = {}) => {
|
|
2164
|
+
const type = getScriptIntegrationType(url);
|
|
2165
|
+
if (!type) {
|
|
2166
|
+
this.postMessage(RESPONSES.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE, {
|
|
2167
|
+
data: { success: false, url },
|
|
2168
|
+
id
|
|
2169
|
+
});
|
|
2170
|
+
return;
|
|
2171
|
+
}
|
|
2172
|
+
const setupFn = thirdPartySetupScripts[type];
|
|
2173
|
+
setupFn(args);
|
|
2174
|
+
const script = document.createElement("script");
|
|
2175
|
+
script.onload = () => {
|
|
2176
|
+
this.waitForReadyState(thirdPartyReadyPredicates[type], (matched) => {
|
|
2177
|
+
this.postMessage(RESPONSES.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE, {
|
|
2178
|
+
data: { success: true, url, matched },
|
|
2179
|
+
id
|
|
2180
|
+
});
|
|
2181
|
+
});
|
|
2182
|
+
};
|
|
2183
|
+
script.onerror = () => {
|
|
2184
|
+
this.postMessage(RESPONSES.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE, {
|
|
2185
|
+
data: { success: false, url },
|
|
2186
|
+
id
|
|
2187
|
+
});
|
|
2188
|
+
};
|
|
2189
|
+
script.src = url;
|
|
2190
|
+
script.setAttribute("data-script-url", url);
|
|
2191
|
+
const exists = document.querySelectorAll('[data-script-url="' + url + '"]').length > 0;
|
|
2192
|
+
if (!exists) {
|
|
2193
|
+
document.documentElement.firstChild?.appendChild(script);
|
|
2194
|
+
} else {
|
|
2195
|
+
this.waitForReadyState(thirdPartyReadyPredicates[type], (matched) => {
|
|
2196
|
+
this.postMessage(RESPONSES.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE, {
|
|
2197
|
+
data: { success: true, url, reused: true, matched },
|
|
2198
|
+
id
|
|
2199
|
+
});
|
|
2200
|
+
});
|
|
2201
|
+
}
|
|
2202
|
+
};
|
|
2203
|
+
handleOpenWindow = (url, target, features) => {
|
|
2204
|
+
if (!isRelative(url) || target === "_blank" || !this.pushHistory) {
|
|
2205
|
+
window.open(url, target, features);
|
|
2206
|
+
} else {
|
|
2207
|
+
this.pushHistory(url);
|
|
2208
|
+
}
|
|
2209
|
+
};
|
|
2210
|
+
handleAuthorize = (serviceName, config = {}) => {
|
|
2211
|
+
const params = new URLSearchParams();
|
|
2212
|
+
if (config.successRedirectPath) {
|
|
2213
|
+
params.append("success_redirect_path", config.successRedirectPath);
|
|
2214
|
+
}
|
|
2215
|
+
if (config.errorRedirectPath) {
|
|
2216
|
+
params.append("error_redirect_path", config.errorRedirectPath);
|
|
2217
|
+
}
|
|
2218
|
+
if (!this.appPath) {
|
|
2219
|
+
this.onError?.({
|
|
2220
|
+
message: "App path is not defined."
|
|
2221
|
+
});
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
if (!this.pluginApiName) {
|
|
2225
|
+
this.onError?.({
|
|
2226
|
+
message: "Plugin API name is not defined."
|
|
2227
|
+
});
|
|
2228
|
+
return;
|
|
2229
|
+
}
|
|
2230
|
+
const paramString = params.toString();
|
|
2231
|
+
this.handleOpenWindow(
|
|
2232
|
+
`${this.appPath}/external-integrations/business-plugin-apps/${this.pluginApiName}/services/${encodeURIComponent(
|
|
2233
|
+
serviceName
|
|
2234
|
+
)}/authorize${paramString ? `?${paramString}` : ""}`,
|
|
2235
|
+
"_blank",
|
|
2236
|
+
""
|
|
2237
|
+
);
|
|
2238
|
+
};
|
|
2239
|
+
run = (scriptBody, setup, args) => {
|
|
2240
|
+
const location = getPartialLocation();
|
|
2241
|
+
this.postMessage(ACTIONS.RUN, {
|
|
2242
|
+
script: scriptBody,
|
|
2243
|
+
setup,
|
|
2244
|
+
args,
|
|
2245
|
+
sessionData: this.sessionData,
|
|
2246
|
+
pluginComponentId: this.pluginComponentId,
|
|
2247
|
+
pluginApiName: this.pluginApiName,
|
|
2248
|
+
location
|
|
2249
|
+
});
|
|
2250
|
+
};
|
|
2251
|
+
};
|
|
2252
|
+
|
|
2253
|
+
// src/run.ts
|
|
2254
|
+
var runScript = async ({
|
|
2255
|
+
scriptBody,
|
|
2256
|
+
user,
|
|
2257
|
+
teamMember,
|
|
2258
|
+
business,
|
|
2259
|
+
onError,
|
|
2260
|
+
onReleaseBlockingScript,
|
|
2261
|
+
setLoadingState,
|
|
2262
|
+
clientObject,
|
|
2263
|
+
scriptUIRef,
|
|
2264
|
+
onStateChange,
|
|
2265
|
+
workerName,
|
|
2266
|
+
context,
|
|
2267
|
+
args = "",
|
|
2268
|
+
plugin,
|
|
2269
|
+
onShowToast,
|
|
2270
|
+
onClearToasts,
|
|
2271
|
+
terminators,
|
|
2272
|
+
executionPlugin,
|
|
2273
|
+
sessionData,
|
|
2274
|
+
setSessionData,
|
|
2275
|
+
onShowModal,
|
|
2276
|
+
onShowCreateRecordModal,
|
|
2277
|
+
onShowCreateRelatedRecordModal,
|
|
2278
|
+
onNetworkError,
|
|
2279
|
+
onNetworkRequest,
|
|
2280
|
+
appPath,
|
|
2281
|
+
pushHistory,
|
|
2282
|
+
createFileId,
|
|
2283
|
+
performFileUpload,
|
|
2284
|
+
getPendingCacheCount,
|
|
2285
|
+
invalidateCache
|
|
2286
|
+
}) => {
|
|
2287
|
+
const isDebug = isFlagEnabled("script-runner-logging");
|
|
2288
|
+
let worker;
|
|
2289
|
+
if (workerName === "recordDetail") {
|
|
2290
|
+
worker = new Worker(new URL("./workers/recordDetail.worker.js", import.meta.url), {
|
|
2291
|
+
type: "module"
|
|
2292
|
+
});
|
|
2293
|
+
} else if (workerName === "genericPlugin") {
|
|
2294
|
+
worker = new Worker(new URL("./workers/generic.worker.js", import.meta.url), {
|
|
2295
|
+
type: "module"
|
|
2296
|
+
});
|
|
2297
|
+
} else if (workerName === "floatingFramePlugin") {
|
|
2298
|
+
worker = new Worker(new URL("./workers/floatingFrame.worker.js", import.meta.url), {
|
|
2299
|
+
type: "module"
|
|
2300
|
+
});
|
|
2301
|
+
} else {
|
|
2302
|
+
worker = new Worker(new URL("./workers/calendarSource.worker.js", import.meta.url), {
|
|
2303
|
+
type: "module"
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
return new Promise((resolve) => {
|
|
2307
|
+
const hashedScript = getHash(scriptBody);
|
|
2308
|
+
const hashedArgs = getHash(args);
|
|
2309
|
+
let workerId = `${plugin?.plugin_api_name ?? ""}-${plugin?.api_name ?? ""}-${String(hashedScript)}-${String(hashedArgs)}`;
|
|
2310
|
+
let componentId = `${plugin?.plugin_api_name ?? ""}-${plugin?.api_name ?? ""}`;
|
|
2311
|
+
if (executionPlugin?.field_type) {
|
|
2312
|
+
workerId = `${executionPlugin.plugin_api_name ?? ""}-${executionPlugin.field_type}-${String(hashedScript)}-${String(hashedArgs)}`;
|
|
2313
|
+
componentId = `${executionPlugin.plugin_api_name ?? ""}-${executionPlugin.field_type ?? executionPlugin.script_id}`;
|
|
2314
|
+
} else if (executionPlugin) {
|
|
2315
|
+
workerId = `${executionPlugin.plugin_api_name ?? ""}-${executionPlugin.api_name}-${String(hashedScript)}-${String(hashedArgs)}`;
|
|
2316
|
+
componentId = `${executionPlugin.plugin_api_name ?? ""}-${executionPlugin.api_name}`;
|
|
2317
|
+
}
|
|
2318
|
+
if (terminators.current[workerId]) {
|
|
2319
|
+
terminators.current[workerId]?.forEach((fn) => {
|
|
2320
|
+
fn();
|
|
2321
|
+
});
|
|
2322
|
+
terminators.current[workerId] = [];
|
|
2323
|
+
}
|
|
2324
|
+
terminators.current[workerId] ??= [];
|
|
2325
|
+
terminators.current[workerId]?.push(() => {
|
|
2326
|
+
worker.terminate();
|
|
2327
|
+
});
|
|
2328
|
+
const instance = new WorkerManager({
|
|
2329
|
+
worker,
|
|
2330
|
+
done: (preserve, result) => {
|
|
2331
|
+
setLoadingState(false);
|
|
2332
|
+
if (!preserve) {
|
|
2333
|
+
terminators.current[workerId]?.forEach((fn) => {
|
|
2334
|
+
fn();
|
|
2335
|
+
});
|
|
2336
|
+
terminators.current[workerId] = [];
|
|
2337
|
+
}
|
|
2338
|
+
resolve(result);
|
|
2339
|
+
},
|
|
2340
|
+
onError,
|
|
2341
|
+
onReleaseBlockingScript,
|
|
2342
|
+
scriptUIRef,
|
|
2343
|
+
onStateChange,
|
|
2344
|
+
plugin,
|
|
2345
|
+
executionPlugin,
|
|
2346
|
+
onShowToast,
|
|
2347
|
+
onClearToasts,
|
|
2348
|
+
sessionData,
|
|
2349
|
+
setSessionData,
|
|
2350
|
+
pluginComponentId: componentId,
|
|
2351
|
+
onShowModal,
|
|
2352
|
+
onShowCreateRecordModal,
|
|
2353
|
+
onShowCreateRelatedRecordModal,
|
|
2354
|
+
onNetworkError,
|
|
2355
|
+
pushHistory,
|
|
2356
|
+
onNetworkRequest,
|
|
2357
|
+
appPath,
|
|
2358
|
+
createFileId,
|
|
2359
|
+
performFileUpload,
|
|
2360
|
+
getPendingCacheCount,
|
|
2361
|
+
invalidateCache
|
|
2362
|
+
});
|
|
2363
|
+
setLoadingState(true);
|
|
2364
|
+
instance.run(
|
|
2365
|
+
scriptBody,
|
|
2366
|
+
{
|
|
2367
|
+
...context,
|
|
2368
|
+
user,
|
|
2369
|
+
teamMember,
|
|
2370
|
+
business,
|
|
2371
|
+
clientObject,
|
|
2372
|
+
appPath,
|
|
2373
|
+
isDebug
|
|
2374
|
+
},
|
|
2375
|
+
args
|
|
2376
|
+
);
|
|
2377
|
+
});
|
|
2378
|
+
};
|
|
2379
|
+
var runUnknownExpression = (expression, values) => {
|
|
2380
|
+
const worker = new Worker(new URL("./workers/expression.worker.js", import.meta.url), {
|
|
2381
|
+
type: "module"
|
|
2382
|
+
});
|
|
2383
|
+
return new Promise((resolve) => {
|
|
2384
|
+
worker.onmessage = (e) => {
|
|
2385
|
+
const data = JSON.parse(e.data);
|
|
2386
|
+
worker.terminate();
|
|
2387
|
+
resolve(data.result);
|
|
2388
|
+
};
|
|
2389
|
+
const isDebug = isFlagEnabled("script-runner-logging");
|
|
2390
|
+
worker.postMessage(JSON.stringify({ expression, args: values, isDebug }));
|
|
2391
|
+
});
|
|
2392
|
+
};
|
|
2393
|
+
var runExpression = async (expression, values) => {
|
|
2394
|
+
const result = await runUnknownExpression(expression, values);
|
|
2395
|
+
return result;
|
|
2396
|
+
};
|
|
2397
|
+
var runStringExpression = async (expression, values) => {
|
|
2398
|
+
const result = await runUnknownExpression(expression, values);
|
|
2399
|
+
return result;
|
|
2400
|
+
};
|
|
2401
|
+
var runOptionExpression = async (expression, values) => {
|
|
2402
|
+
const result = await runUnknownExpression(expression, values);
|
|
2403
|
+
return result;
|
|
2404
|
+
};
|
|
2405
|
+
var runObjectExpression = async (expression, values) => {
|
|
2406
|
+
const result = await runUnknownExpression(expression, values);
|
|
2407
|
+
return result;
|
|
2408
|
+
};
|
|
2409
|
+
|
|
2410
|
+
// src/index.ts
|
|
2411
|
+
var version = "0.0.1-b1f3597";
|
|
2412
|
+
|
|
2413
|
+
export { getHash, getStableHash, isFlagEnabled, runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version };
|
|
2414
|
+
//# sourceMappingURL=chunk-2MW4AGSN.js.map
|
|
2415
|
+
//# sourceMappingURL=chunk-2MW4AGSN.js.map
|