@symbo.ls/scratch 2.11.397 → 2.11.410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/factory.js +165 -26
- package/dist/cjs/index.js +2413 -2123
- package/dist/cjs/set.js +2184 -1892
- package/dist/cjs/system/color.js +2009 -1716
- package/dist/cjs/system/document.js +1999 -1706
- package/dist/cjs/system/font.js +1954 -1662
- package/dist/cjs/system/index.js +2211 -1919
- package/dist/cjs/system/reset.js +2010 -1717
- package/dist/cjs/system/shadow.js +2163 -1869
- package/dist/cjs/system/spacing.js +2003 -1709
- package/dist/cjs/system/svg.js +1950 -1657
- package/dist/cjs/system/theme.js +2016 -1723
- package/dist/cjs/system/timing.js +2002 -1710
- package/dist/cjs/system/typography.js +2199 -1904
- package/dist/cjs/transforms/index.js +2189 -1897
- package/dist/cjs/utils/color.js +165 -26
- package/dist/cjs/utils/index.js +2200 -1907
- package/dist/cjs/utils/sequence.js +1935 -1642
- package/dist/cjs/utils/sprite.js +165 -26
- package/dist/cjs/utils/var.js +1981 -1688
- package/package.json +2 -2
|
@@ -30,33 +30,33 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// ../../../domql/packages/utils/dist/cjs/key.js
|
|
34
34
|
var require_key = __commonJS({
|
|
35
|
-
"
|
|
35
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
37
|
+
var __defProp3 = Object.defineProperty;
|
|
38
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
39
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
40
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
41
|
+
var __export3 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
|
-
var
|
|
45
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
46
46
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
47
|
-
for (let key of
|
|
48
|
-
if (!
|
|
49
|
-
|
|
47
|
+
for (let key of __getOwnPropNames3(from))
|
|
48
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
49
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var
|
|
53
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var key_exports = {};
|
|
55
|
-
|
|
55
|
+
__export3(key_exports, {
|
|
56
56
|
createSnapshotId: () => createSnapshotId,
|
|
57
57
|
generateKey: () => generateKey
|
|
58
58
|
});
|
|
59
|
-
module2.exports =
|
|
59
|
+
module2.exports = __toCommonJS3(key_exports);
|
|
60
60
|
var generateKey = /* @__PURE__ */ function() {
|
|
61
61
|
let index = 0;
|
|
62
62
|
function newId() {
|
|
@@ -69,36 +69,36 @@ var require_key = __commonJS({
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
//
|
|
72
|
+
// ../../../domql/packages/utils/dist/cjs/env.js
|
|
73
73
|
var require_env = __commonJS({
|
|
74
|
-
"
|
|
74
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
75
75
|
"use strict";
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
76
|
+
var __defProp3 = Object.defineProperty;
|
|
77
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
78
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
79
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
80
|
+
var __export3 = (target, all) => {
|
|
81
81
|
for (var name in all)
|
|
82
|
-
|
|
82
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
83
83
|
};
|
|
84
|
-
var
|
|
84
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
85
85
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
86
|
-
for (let key of
|
|
87
|
-
if (!
|
|
88
|
-
|
|
86
|
+
for (let key of __getOwnPropNames3(from))
|
|
87
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
88
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
89
89
|
}
|
|
90
90
|
return to;
|
|
91
91
|
};
|
|
92
|
-
var
|
|
92
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
93
93
|
var env_exports = {};
|
|
94
|
-
|
|
94
|
+
__export3(env_exports, {
|
|
95
95
|
NODE_ENV: () => NODE_ENV,
|
|
96
96
|
getNev: () => getNev,
|
|
97
97
|
isDevelopment: () => isDevelopment,
|
|
98
98
|
isProduction: () => isProduction,
|
|
99
99
|
isTest: () => isTest
|
|
100
100
|
});
|
|
101
|
-
module2.exports =
|
|
101
|
+
module2.exports = __toCommonJS3(env_exports);
|
|
102
102
|
var NODE_ENV = "development";
|
|
103
103
|
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
104
104
|
var isTest = (env = NODE_ENV) => env === "test";
|
|
@@ -107,35 +107,35 @@ var require_env = __commonJS({
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// ../../../domql/packages/utils/dist/cjs/globals.js
|
|
111
111
|
var require_globals = __commonJS({
|
|
112
|
-
"
|
|
112
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
113
113
|
"use strict";
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
var
|
|
118
|
-
var
|
|
114
|
+
var __defProp3 = Object.defineProperty;
|
|
115
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
116
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
117
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
118
|
+
var __export3 = (target, all) => {
|
|
119
119
|
for (var name in all)
|
|
120
|
-
|
|
120
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
121
121
|
};
|
|
122
|
-
var
|
|
122
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
123
123
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
124
|
-
for (let key of
|
|
125
|
-
if (!
|
|
126
|
-
|
|
124
|
+
for (let key of __getOwnPropNames3(from))
|
|
125
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
126
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
127
127
|
}
|
|
128
128
|
return to;
|
|
129
129
|
};
|
|
130
|
-
var
|
|
130
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
131
131
|
var globals_exports = {};
|
|
132
|
-
|
|
132
|
+
__export3(globals_exports, {
|
|
133
133
|
document: () => document2,
|
|
134
134
|
global: () => global,
|
|
135
135
|
self: () => self,
|
|
136
136
|
window: () => window
|
|
137
137
|
});
|
|
138
|
-
module2.exports =
|
|
138
|
+
module2.exports = __toCommonJS3(globals_exports);
|
|
139
139
|
var global = globalThis;
|
|
140
140
|
var self = globalThis;
|
|
141
141
|
var window = globalThis;
|
|
@@ -143,33 +143,33 @@ var require_globals = __commonJS({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// ../../../domql/packages/utils/dist/cjs/node.js
|
|
147
147
|
var require_node = __commonJS({
|
|
148
|
-
"
|
|
148
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
var
|
|
154
|
-
var
|
|
150
|
+
var __defProp3 = Object.defineProperty;
|
|
151
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
152
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
153
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __export3 = (target, all) => {
|
|
155
155
|
for (var name in all)
|
|
156
|
-
|
|
156
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
157
157
|
};
|
|
158
|
-
var
|
|
158
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
159
159
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
160
|
-
for (let key of
|
|
161
|
-
if (!
|
|
162
|
-
|
|
160
|
+
for (let key of __getOwnPropNames3(from))
|
|
161
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
162
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
163
163
|
}
|
|
164
164
|
return to;
|
|
165
165
|
};
|
|
166
|
-
var
|
|
166
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
167
167
|
var node_exports = {};
|
|
168
|
-
|
|
168
|
+
__export3(node_exports, {
|
|
169
169
|
isHtmlElement: () => isHtmlElement,
|
|
170
170
|
isNode: () => isNode
|
|
171
171
|
});
|
|
172
|
-
module2.exports =
|
|
172
|
+
module2.exports = __toCommonJS3(node_exports);
|
|
173
173
|
var import_globals = require_globals();
|
|
174
174
|
var isNode = (obj) => {
|
|
175
175
|
return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -180,29 +180,29 @@ var require_node = __commonJS({
|
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
|
|
183
|
-
//
|
|
183
|
+
// ../../../domql/packages/utils/dist/cjs/types.js
|
|
184
184
|
var require_types = __commonJS({
|
|
185
|
-
"
|
|
185
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
186
186
|
"use strict";
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
var
|
|
187
|
+
var __defProp3 = Object.defineProperty;
|
|
188
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
189
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
190
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
191
|
+
var __export3 = (target, all) => {
|
|
192
192
|
for (var name in all)
|
|
193
|
-
|
|
193
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
194
194
|
};
|
|
195
|
-
var
|
|
195
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
196
196
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
197
|
-
for (let key of
|
|
198
|
-
if (!
|
|
199
|
-
|
|
197
|
+
for (let key of __getOwnPropNames3(from))
|
|
198
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
199
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
200
200
|
}
|
|
201
201
|
return to;
|
|
202
202
|
};
|
|
203
|
-
var
|
|
203
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
204
204
|
var types_exports = {};
|
|
205
|
-
|
|
205
|
+
__export3(types_exports, {
|
|
206
206
|
TYPES: () => TYPES,
|
|
207
207
|
is: () => is,
|
|
208
208
|
isArray: () => isArray,
|
|
@@ -218,7 +218,7 @@ var require_types = __commonJS({
|
|
|
218
218
|
isString: () => isString2,
|
|
219
219
|
isUndefined: () => isUndefined
|
|
220
220
|
});
|
|
221
|
-
module2.exports =
|
|
221
|
+
module2.exports = __toCommonJS3(types_exports);
|
|
222
222
|
var import_node = require_node();
|
|
223
223
|
var isObject2 = (arg) => {
|
|
224
224
|
if (arg === null)
|
|
@@ -270,31 +270,32 @@ var require_types = __commonJS({
|
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
|
|
273
|
-
//
|
|
273
|
+
// ../../../domql/packages/utils/dist/cjs/array.js
|
|
274
274
|
var require_array = __commonJS({
|
|
275
|
-
"
|
|
275
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
276
276
|
"use strict";
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
var
|
|
280
|
-
var
|
|
281
|
-
var
|
|
277
|
+
var __defProp3 = Object.defineProperty;
|
|
278
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
279
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
280
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
281
|
+
var __export3 = (target, all) => {
|
|
282
282
|
for (var name in all)
|
|
283
|
-
|
|
283
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
284
284
|
};
|
|
285
|
-
var
|
|
285
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
286
286
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
287
|
-
for (let key of
|
|
288
|
-
if (!
|
|
289
|
-
|
|
287
|
+
for (let key of __getOwnPropNames3(from))
|
|
288
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
289
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
290
290
|
}
|
|
291
291
|
return to;
|
|
292
292
|
};
|
|
293
|
-
var
|
|
293
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
294
294
|
var array_exports = {};
|
|
295
|
-
|
|
295
|
+
__export3(array_exports, {
|
|
296
296
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
297
297
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
298
|
+
arraysEqual: () => arraysEqual,
|
|
298
299
|
createNestedObject: () => createNestedObject,
|
|
299
300
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
300
301
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
@@ -308,7 +309,7 @@ var require_array = __commonJS({
|
|
|
308
309
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
309
310
|
swapItemsInArray: () => swapItemsInArray
|
|
310
311
|
});
|
|
311
|
-
module2.exports =
|
|
312
|
+
module2.exports = __toCommonJS3(array_exports);
|
|
312
313
|
var import_object = require_object();
|
|
313
314
|
var import_types = require_types();
|
|
314
315
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -411,38 +412,53 @@ var require_array = __commonJS({
|
|
|
411
412
|
}
|
|
412
413
|
return newArray;
|
|
413
414
|
};
|
|
415
|
+
var arraysEqual = (arr1, arr2) => {
|
|
416
|
+
if (arr1.length !== arr2.length) {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
420
|
+
if (arr1[i] !== arr2[i]) {
|
|
421
|
+
return false;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return true;
|
|
425
|
+
};
|
|
414
426
|
}
|
|
415
427
|
});
|
|
416
428
|
|
|
417
|
-
//
|
|
429
|
+
// ../../../domql/packages/utils/dist/cjs/string.js
|
|
418
430
|
var require_string = __commonJS({
|
|
419
|
-
"
|
|
431
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
420
432
|
"use strict";
|
|
421
|
-
var
|
|
422
|
-
var
|
|
423
|
-
var
|
|
424
|
-
var
|
|
425
|
-
var
|
|
433
|
+
var __defProp3 = Object.defineProperty;
|
|
434
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
435
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
436
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
437
|
+
var __export3 = (target, all) => {
|
|
426
438
|
for (var name in all)
|
|
427
|
-
|
|
439
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
428
440
|
};
|
|
429
|
-
var
|
|
441
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
430
442
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
431
|
-
for (let key of
|
|
432
|
-
if (!
|
|
433
|
-
|
|
443
|
+
for (let key of __getOwnPropNames3(from))
|
|
444
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
445
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
434
446
|
}
|
|
435
447
|
return to;
|
|
436
448
|
};
|
|
437
|
-
var
|
|
449
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
438
450
|
var string_exports = {};
|
|
439
|
-
|
|
451
|
+
__export3(string_exports, {
|
|
452
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
453
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
454
|
+
findKeyPosition: () => findKeyPosition,
|
|
440
455
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
441
456
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
457
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
442
458
|
stringIncludesAny: () => stringIncludesAny,
|
|
443
459
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
444
460
|
});
|
|
445
|
-
module2.exports =
|
|
461
|
+
module2.exports = __toCommonJS3(string_exports);
|
|
446
462
|
var stringIncludesAny = (str, characters) => {
|
|
447
463
|
for (const char of characters) {
|
|
448
464
|
if (str.includes(char)) {
|
|
@@ -484,33 +500,100 @@ var require_string = __commonJS({
|
|
|
484
500
|
var lowercaseFirstLetter = (inputString) => {
|
|
485
501
|
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
486
502
|
};
|
|
503
|
+
var findKeyPosition = (str, key) => {
|
|
504
|
+
const lines = str.split("\n");
|
|
505
|
+
let startLineNumber = -1;
|
|
506
|
+
let endLineNumber = -1;
|
|
507
|
+
let startColumn = -1;
|
|
508
|
+
let endColumn = -1;
|
|
509
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
510
|
+
let braceCount = 0;
|
|
511
|
+
let foundKey = false;
|
|
512
|
+
for (let i = 0; i < lines.length; i++) {
|
|
513
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
514
|
+
foundKey = true;
|
|
515
|
+
startLineNumber = i + 1;
|
|
516
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
517
|
+
if (lines[i].includes("{}")) {
|
|
518
|
+
endLineNumber = startLineNumber;
|
|
519
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
523
|
+
if (line.includes("{") || line.includes("[")) {
|
|
524
|
+
braceCount = 1;
|
|
525
|
+
} else {
|
|
526
|
+
endLineNumber = i + 1;
|
|
527
|
+
endColumn = lines[i].length + 1;
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
} else if (foundKey) {
|
|
531
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
532
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
533
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
534
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
535
|
+
if (braceCount === 0) {
|
|
536
|
+
endLineNumber = i + 1;
|
|
537
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
return {
|
|
543
|
+
startColumn,
|
|
544
|
+
endColumn,
|
|
545
|
+
startLineNumber,
|
|
546
|
+
endLineNumber
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
550
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
551
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
552
|
+
const octalValue = parseInt(p1, 8);
|
|
553
|
+
const char = String.fromCharCode(octalValue);
|
|
554
|
+
return char;
|
|
555
|
+
});
|
|
556
|
+
};
|
|
557
|
+
var customEncodeURIComponent = (str) => {
|
|
558
|
+
return str.split("").map((char) => {
|
|
559
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
560
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
561
|
+
}
|
|
562
|
+
return char;
|
|
563
|
+
}).join("");
|
|
564
|
+
};
|
|
565
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
566
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
567
|
+
};
|
|
487
568
|
}
|
|
488
569
|
});
|
|
489
570
|
|
|
490
|
-
//
|
|
571
|
+
// ../../../domql/packages/utils/dist/cjs/object.js
|
|
491
572
|
var require_object = __commonJS({
|
|
492
|
-
"
|
|
573
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
493
574
|
"use strict";
|
|
494
|
-
var
|
|
495
|
-
var
|
|
496
|
-
var
|
|
497
|
-
var
|
|
498
|
-
var
|
|
575
|
+
var __defProp3 = Object.defineProperty;
|
|
576
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
577
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
578
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
579
|
+
var __export3 = (target, all) => {
|
|
499
580
|
for (var name in all)
|
|
500
|
-
|
|
581
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
501
582
|
};
|
|
502
|
-
var
|
|
583
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
503
584
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
504
|
-
for (let key of
|
|
505
|
-
if (!
|
|
506
|
-
|
|
585
|
+
for (let key of __getOwnPropNames3(from))
|
|
586
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
587
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
507
588
|
}
|
|
508
589
|
return to;
|
|
509
590
|
};
|
|
510
|
-
var
|
|
591
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
511
592
|
var object_exports = {};
|
|
512
|
-
|
|
593
|
+
__export3(object_exports, {
|
|
594
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
513
595
|
clone: () => clone,
|
|
596
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
514
597
|
deepClone: () => deepClone2,
|
|
515
598
|
deepCloneExclude: () => deepCloneExclude,
|
|
516
599
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
@@ -525,6 +608,8 @@ var require_object = __commonJS({
|
|
|
525
608
|
diffObjects: () => diffObjects,
|
|
526
609
|
exec: () => exec,
|
|
527
610
|
flattenRecursive: () => flattenRecursive,
|
|
611
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
612
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
528
613
|
hasOwnProperty: () => hasOwnProperty,
|
|
529
614
|
isEmpty: () => isEmpty,
|
|
530
615
|
isEmptyObject: () => isEmptyObject,
|
|
@@ -541,7 +626,7 @@ var require_object = __commonJS({
|
|
|
541
626
|
removeFromObject: () => removeFromObject,
|
|
542
627
|
stringToObject: () => stringToObject
|
|
543
628
|
});
|
|
544
|
-
module2.exports =
|
|
629
|
+
module2.exports = __toCommonJS3(object_exports);
|
|
545
630
|
var import_globals = require_globals();
|
|
546
631
|
var import_types = require_types();
|
|
547
632
|
var import_array = require_array();
|
|
@@ -994,38 +1079,92 @@ var require_object = __commonJS({
|
|
|
994
1079
|
}
|
|
995
1080
|
return obj;
|
|
996
1081
|
};
|
|
1082
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
1083
|
+
if (obj === null || typeof obj !== "object") {
|
|
1084
|
+
return obj;
|
|
1085
|
+
}
|
|
1086
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
1087
|
+
for (const key in obj) {
|
|
1088
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
1089
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
return newObj;
|
|
1093
|
+
};
|
|
1094
|
+
var checkIfKeyIsComponent = (key) => {
|
|
1095
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
1096
|
+
if (!isFirstKeyString)
|
|
1097
|
+
return;
|
|
1098
|
+
const firstCharKey = key.slice(0, 1);
|
|
1099
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
1100
|
+
};
|
|
1101
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
1102
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
1103
|
+
return el;
|
|
1104
|
+
}
|
|
1105
|
+
if (el.extend) {
|
|
1106
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
1107
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
1108
|
+
if (foundString || foundInArray)
|
|
1109
|
+
return el;
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1112
|
+
var getExtendsInElement = (obj) => {
|
|
1113
|
+
let result = [];
|
|
1114
|
+
function traverse(o) {
|
|
1115
|
+
for (const key in o) {
|
|
1116
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
1117
|
+
if (checkIfKeyIsComponent(key)) {
|
|
1118
|
+
result.push(key);
|
|
1119
|
+
}
|
|
1120
|
+
if (key === "extend") {
|
|
1121
|
+
if (typeof o[key] === "string") {
|
|
1122
|
+
result.push(o[key]);
|
|
1123
|
+
} else if (Array.isArray(o[key])) {
|
|
1124
|
+
result = result.concat(o[key]);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
1128
|
+
traverse(o[key]);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
traverse(obj);
|
|
1134
|
+
return result;
|
|
1135
|
+
};
|
|
997
1136
|
}
|
|
998
1137
|
});
|
|
999
1138
|
|
|
1000
|
-
//
|
|
1139
|
+
// ../../../domql/packages/utils/dist/cjs/function.js
|
|
1001
1140
|
var require_function = __commonJS({
|
|
1002
|
-
"
|
|
1141
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
1003
1142
|
"use strict";
|
|
1004
|
-
var
|
|
1005
|
-
var
|
|
1006
|
-
var
|
|
1007
|
-
var
|
|
1008
|
-
var
|
|
1143
|
+
var __defProp3 = Object.defineProperty;
|
|
1144
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1145
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1146
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1147
|
+
var __export3 = (target, all) => {
|
|
1009
1148
|
for (var name in all)
|
|
1010
|
-
|
|
1149
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1011
1150
|
};
|
|
1012
|
-
var
|
|
1151
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1013
1152
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1014
|
-
for (let key of
|
|
1015
|
-
if (!
|
|
1016
|
-
|
|
1153
|
+
for (let key of __getOwnPropNames3(from))
|
|
1154
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1155
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1017
1156
|
}
|
|
1018
1157
|
return to;
|
|
1019
1158
|
};
|
|
1020
|
-
var
|
|
1159
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1021
1160
|
var function_exports = {};
|
|
1022
|
-
|
|
1161
|
+
__export3(function_exports, {
|
|
1023
1162
|
debounce: () => debounce,
|
|
1024
1163
|
debounceOnContext: () => debounceOnContext,
|
|
1025
1164
|
isStringFunction: () => isStringFunction,
|
|
1026
1165
|
memoize: () => memoize
|
|
1027
1166
|
});
|
|
1028
|
-
module2.exports =
|
|
1167
|
+
module2.exports = __toCommonJS3(function_exports);
|
|
1029
1168
|
function debounce(func, wait, immediate) {
|
|
1030
1169
|
let timeout;
|
|
1031
1170
|
return function() {
|
|
@@ -1072,33 +1211,33 @@ var require_function = __commonJS({
|
|
|
1072
1211
|
}
|
|
1073
1212
|
});
|
|
1074
1213
|
|
|
1075
|
-
//
|
|
1214
|
+
// ../../../domql/packages/utils/dist/cjs/log.js
|
|
1076
1215
|
var require_log = __commonJS({
|
|
1077
|
-
"
|
|
1216
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1078
1217
|
"use strict";
|
|
1079
|
-
var
|
|
1080
|
-
var
|
|
1081
|
-
var
|
|
1082
|
-
var
|
|
1083
|
-
var
|
|
1218
|
+
var __defProp3 = Object.defineProperty;
|
|
1219
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1220
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1221
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1222
|
+
var __export3 = (target, all) => {
|
|
1084
1223
|
for (var name in all)
|
|
1085
|
-
|
|
1224
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1086
1225
|
};
|
|
1087
|
-
var
|
|
1226
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1088
1227
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1089
|
-
for (let key of
|
|
1090
|
-
if (!
|
|
1091
|
-
|
|
1228
|
+
for (let key of __getOwnPropNames3(from))
|
|
1229
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1230
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1092
1231
|
}
|
|
1093
1232
|
return to;
|
|
1094
1233
|
};
|
|
1095
|
-
var
|
|
1234
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1096
1235
|
var log_exports = {};
|
|
1097
|
-
|
|
1236
|
+
__export3(log_exports, {
|
|
1098
1237
|
logGroupIf: () => logGroupIf,
|
|
1099
1238
|
logIf: () => logIf
|
|
1100
1239
|
});
|
|
1101
|
-
module2.exports =
|
|
1240
|
+
module2.exports = __toCommonJS3(log_exports);
|
|
1102
1241
|
var logIf = (bool, ...arg) => {
|
|
1103
1242
|
if (bool)
|
|
1104
1243
|
arg.map((v) => console.log(v));
|
|
@@ -1113,50 +1252,50 @@ var require_log = __commonJS({
|
|
|
1113
1252
|
}
|
|
1114
1253
|
});
|
|
1115
1254
|
|
|
1116
|
-
//
|
|
1255
|
+
// ../../../domql/packages/utils/dist/cjs/cookie.js
|
|
1117
1256
|
var require_cookie = __commonJS({
|
|
1118
|
-
"
|
|
1257
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1119
1258
|
"use strict";
|
|
1120
|
-
var
|
|
1121
|
-
var
|
|
1122
|
-
var
|
|
1123
|
-
var
|
|
1124
|
-
var
|
|
1259
|
+
var __defProp3 = Object.defineProperty;
|
|
1260
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1261
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1262
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1263
|
+
var __export3 = (target, all) => {
|
|
1125
1264
|
for (var name in all)
|
|
1126
|
-
|
|
1265
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1127
1266
|
};
|
|
1128
|
-
var
|
|
1267
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1129
1268
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1130
|
-
for (let key of
|
|
1131
|
-
if (!
|
|
1132
|
-
|
|
1269
|
+
for (let key of __getOwnPropNames3(from))
|
|
1270
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1271
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1133
1272
|
}
|
|
1134
1273
|
return to;
|
|
1135
1274
|
};
|
|
1136
|
-
var
|
|
1275
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1137
1276
|
var cookie_exports = {};
|
|
1138
|
-
|
|
1277
|
+
__export3(cookie_exports, {
|
|
1139
1278
|
getCookie: () => getCookie,
|
|
1140
1279
|
isMobile: () => isMobile,
|
|
1141
1280
|
setCookie: () => setCookie
|
|
1142
1281
|
});
|
|
1143
|
-
module2.exports =
|
|
1282
|
+
module2.exports = __toCommonJS3(cookie_exports);
|
|
1144
1283
|
var import_types = require_types();
|
|
1145
|
-
var
|
|
1284
|
+
var import_utils6 = require_cjs();
|
|
1146
1285
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1147
1286
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1148
|
-
if ((0, import_types.isUndefined)(
|
|
1287
|
+
if ((0, import_types.isUndefined)(import_utils6.document) || (0, import_types.isUndefined)(import_utils6.document.cookie))
|
|
1149
1288
|
return;
|
|
1150
1289
|
const d = /* @__PURE__ */ new Date();
|
|
1151
1290
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1152
1291
|
const expires = `expires=${d.toUTCString()}`;
|
|
1153
|
-
|
|
1292
|
+
import_utils6.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1154
1293
|
};
|
|
1155
1294
|
var getCookie = (cname) => {
|
|
1156
|
-
if ((0, import_types.isUndefined)(
|
|
1295
|
+
if ((0, import_types.isUndefined)(import_utils6.document) || (0, import_types.isUndefined)(import_utils6.document.cookie))
|
|
1157
1296
|
return;
|
|
1158
1297
|
const name = `${cname}=`;
|
|
1159
|
-
const decodedCookie = decodeURIComponent(
|
|
1298
|
+
const decodedCookie = decodeURIComponent(import_utils6.document.cookie);
|
|
1160
1299
|
const ca = decodedCookie.split(";");
|
|
1161
1300
|
for (let i = 0; i < ca.length; i++) {
|
|
1162
1301
|
let c = ca[i];
|
|
@@ -1170,33 +1309,33 @@ var require_cookie = __commonJS({
|
|
|
1170
1309
|
}
|
|
1171
1310
|
});
|
|
1172
1311
|
|
|
1173
|
-
//
|
|
1312
|
+
// ../../../domql/packages/utils/dist/cjs/tags.js
|
|
1174
1313
|
var require_tags = __commonJS({
|
|
1175
|
-
"
|
|
1314
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1176
1315
|
"use strict";
|
|
1177
|
-
var
|
|
1178
|
-
var
|
|
1179
|
-
var
|
|
1180
|
-
var
|
|
1181
|
-
var
|
|
1316
|
+
var __defProp3 = Object.defineProperty;
|
|
1317
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1318
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1319
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1320
|
+
var __export3 = (target, all) => {
|
|
1182
1321
|
for (var name in all)
|
|
1183
|
-
|
|
1322
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1184
1323
|
};
|
|
1185
|
-
var
|
|
1324
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1186
1325
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1187
|
-
for (let key of
|
|
1188
|
-
if (!
|
|
1189
|
-
|
|
1326
|
+
for (let key of __getOwnPropNames3(from))
|
|
1327
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1328
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1190
1329
|
}
|
|
1191
1330
|
return to;
|
|
1192
1331
|
};
|
|
1193
|
-
var
|
|
1332
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1194
1333
|
var tags_exports = {};
|
|
1195
|
-
|
|
1334
|
+
__export3(tags_exports, {
|
|
1196
1335
|
HTML_TAGS: () => HTML_TAGS,
|
|
1197
1336
|
isValidHtmlTag: () => isValidHtmlTag
|
|
1198
1337
|
});
|
|
1199
|
-
module2.exports =
|
|
1338
|
+
module2.exports = __toCommonJS3(tags_exports);
|
|
1200
1339
|
var HTML_TAGS = {
|
|
1201
1340
|
root: [
|
|
1202
1341
|
"body",
|
|
@@ -1338,26 +1477,26 @@ var require_tags = __commonJS({
|
|
|
1338
1477
|
}
|
|
1339
1478
|
});
|
|
1340
1479
|
|
|
1341
|
-
//
|
|
1480
|
+
// ../../../domql/packages/utils/dist/cjs/index.js
|
|
1342
1481
|
var require_cjs = __commonJS({
|
|
1343
|
-
"
|
|
1482
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1344
1483
|
"use strict";
|
|
1345
|
-
var
|
|
1346
|
-
var
|
|
1347
|
-
var
|
|
1348
|
-
var
|
|
1349
|
-
var
|
|
1484
|
+
var __defProp3 = Object.defineProperty;
|
|
1485
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1486
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1487
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1488
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1350
1489
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1351
|
-
for (let key of
|
|
1352
|
-
if (!
|
|
1353
|
-
|
|
1490
|
+
for (let key of __getOwnPropNames3(from))
|
|
1491
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1492
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1354
1493
|
}
|
|
1355
1494
|
return to;
|
|
1356
1495
|
};
|
|
1357
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
1358
|
-
var
|
|
1496
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
|
|
1497
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1359
1498
|
var utils_exports = {};
|
|
1360
|
-
module2.exports =
|
|
1499
|
+
module2.exports = __toCommonJS3(utils_exports);
|
|
1361
1500
|
__reExport(utils_exports, require_key(), module2.exports);
|
|
1362
1501
|
__reExport(utils_exports, require_env(), module2.exports);
|
|
1363
1502
|
__reExport(utils_exports, require_types(), module2.exports);
|
|
@@ -1373,1513 +1512,1667 @@ var require_cjs = __commonJS({
|
|
|
1373
1512
|
}
|
|
1374
1513
|
});
|
|
1375
1514
|
|
|
1376
|
-
//
|
|
1377
|
-
var
|
|
1378
|
-
|
|
1515
|
+
// src/utils/sequence.js
|
|
1516
|
+
var sequence_exports = {};
|
|
1517
|
+
__export(sequence_exports, {
|
|
1518
|
+
findHeadingLetter: () => findHeadingLetter,
|
|
1519
|
+
findHeadings: () => findHeadings,
|
|
1520
|
+
generateSequence: () => generateSequence,
|
|
1521
|
+
generateSubSequence: () => generateSubSequence,
|
|
1522
|
+
getSequenceValue: () => getSequenceValue,
|
|
1523
|
+
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
1524
|
+
getSubratio: () => getSubratio,
|
|
1525
|
+
getSubratioDifference: () => getSubratioDifference,
|
|
1526
|
+
numToLetterMap: () => numToLetterMap,
|
|
1527
|
+
setScalingVar: () => setScalingVar,
|
|
1528
|
+
setSubScalingVar: () => setSubScalingVar
|
|
1529
|
+
});
|
|
1530
|
+
module.exports = __toCommonJS(sequence_exports);
|
|
1531
|
+
var import_utils4 = __toESM(require_cjs(), 1);
|
|
1532
|
+
|
|
1533
|
+
// ../utils/dist/cjs/index.js
|
|
1534
|
+
var __create2 = Object.create;
|
|
1535
|
+
var __defProp2 = Object.defineProperty;
|
|
1536
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1537
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1538
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1539
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1540
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
1541
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1542
|
+
};
|
|
1543
|
+
var __export2 = (target, all) => {
|
|
1544
|
+
for (var name in all)
|
|
1545
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1546
|
+
};
|
|
1547
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1548
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1549
|
+
for (let key of __getOwnPropNames2(from))
|
|
1550
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1551
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1552
|
+
}
|
|
1553
|
+
return to;
|
|
1554
|
+
};
|
|
1555
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1556
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1557
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1558
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1559
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1560
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1561
|
+
mod
|
|
1562
|
+
));
|
|
1563
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1564
|
+
var require_key2 = __commonJS2({
|
|
1565
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1379
1566
|
"use strict";
|
|
1380
|
-
var
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1383
|
-
var
|
|
1384
|
-
var
|
|
1385
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1386
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1387
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1388
|
-
};
|
|
1389
|
-
var __export2 = (target, all) => {
|
|
1567
|
+
var __defProp22 = Object.defineProperty;
|
|
1568
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1569
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1570
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1571
|
+
var __export22 = (target, all) => {
|
|
1390
1572
|
for (var name in all)
|
|
1391
|
-
|
|
1573
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1392
1574
|
};
|
|
1393
|
-
var
|
|
1575
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1394
1576
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1395
|
-
for (let key of
|
|
1396
|
-
if (!
|
|
1397
|
-
|
|
1577
|
+
for (let key of __getOwnPropNames22(from))
|
|
1578
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1579
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1398
1580
|
}
|
|
1399
1581
|
return to;
|
|
1400
1582
|
};
|
|
1401
|
-
var
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1407
|
-
mod
|
|
1408
|
-
));
|
|
1409
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1410
|
-
var require_key2 = __commonJS2({
|
|
1411
|
-
"../../node_modules/@domql/utils/dist/cjs/key.js"(exports2, module22) {
|
|
1412
|
-
"use strict";
|
|
1413
|
-
var __defProp22 = Object.defineProperty;
|
|
1414
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1415
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1416
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1417
|
-
var __export22 = (target, all) => {
|
|
1418
|
-
for (var name in all)
|
|
1419
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1420
|
-
};
|
|
1421
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1422
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1423
|
-
for (let key of __getOwnPropNames22(from))
|
|
1424
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1425
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1426
|
-
}
|
|
1427
|
-
return to;
|
|
1428
|
-
};
|
|
1429
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1430
|
-
var key_exports = {};
|
|
1431
|
-
__export22(key_exports, {
|
|
1432
|
-
createSnapshotId: () => createSnapshotId,
|
|
1433
|
-
generateKey: () => generateKey
|
|
1434
|
-
});
|
|
1435
|
-
module22.exports = __toCommonJS22(key_exports);
|
|
1436
|
-
var generateKey = /* @__PURE__ */ function() {
|
|
1437
|
-
let index = 0;
|
|
1438
|
-
function newId() {
|
|
1439
|
-
index++;
|
|
1440
|
-
return index;
|
|
1441
|
-
}
|
|
1442
|
-
return newId;
|
|
1443
|
-
}();
|
|
1444
|
-
var createSnapshotId = generateKey;
|
|
1445
|
-
}
|
|
1446
|
-
});
|
|
1447
|
-
var require_env2 = __commonJS2({
|
|
1448
|
-
"../../node_modules/@domql/utils/dist/cjs/env.js"(exports2, module22) {
|
|
1449
|
-
"use strict";
|
|
1450
|
-
var __defProp22 = Object.defineProperty;
|
|
1451
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1452
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1453
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1454
|
-
var __export22 = (target, all) => {
|
|
1455
|
-
for (var name in all)
|
|
1456
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1457
|
-
};
|
|
1458
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1459
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1460
|
-
for (let key of __getOwnPropNames22(from))
|
|
1461
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1462
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1463
|
-
}
|
|
1464
|
-
return to;
|
|
1465
|
-
};
|
|
1466
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1467
|
-
var env_exports = {};
|
|
1468
|
-
__export22(env_exports, {
|
|
1469
|
-
NODE_ENV: () => NODE_ENV,
|
|
1470
|
-
getNev: () => getNev,
|
|
1471
|
-
isDevelopment: () => isDevelopment,
|
|
1472
|
-
isProduction: () => isProduction,
|
|
1473
|
-
isTest: () => isTest
|
|
1474
|
-
});
|
|
1475
|
-
module22.exports = __toCommonJS22(env_exports);
|
|
1476
|
-
var NODE_ENV = "development";
|
|
1477
|
-
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1478
|
-
var isTest = (env = NODE_ENV) => env === "test";
|
|
1479
|
-
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1480
|
-
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1481
|
-
}
|
|
1583
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1584
|
+
var key_exports = {};
|
|
1585
|
+
__export22(key_exports, {
|
|
1586
|
+
createSnapshotId: () => createSnapshotId,
|
|
1587
|
+
generateKey: () => generateKey
|
|
1482
1588
|
});
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1490
|
-
var __export22 = (target, all) => {
|
|
1491
|
-
for (var name in all)
|
|
1492
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1493
|
-
};
|
|
1494
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1495
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1496
|
-
for (let key of __getOwnPropNames22(from))
|
|
1497
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1498
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1499
|
-
}
|
|
1500
|
-
return to;
|
|
1501
|
-
};
|
|
1502
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1503
|
-
var globals_exports = {};
|
|
1504
|
-
__export22(globals_exports, {
|
|
1505
|
-
document: () => document2,
|
|
1506
|
-
global: () => global,
|
|
1507
|
-
self: () => self,
|
|
1508
|
-
window: () => window
|
|
1509
|
-
});
|
|
1510
|
-
module22.exports = __toCommonJS22(globals_exports);
|
|
1511
|
-
var global = globalThis;
|
|
1512
|
-
var self = globalThis;
|
|
1513
|
-
var window = globalThis;
|
|
1514
|
-
var document2 = window.document;
|
|
1589
|
+
module2.exports = __toCommonJS22(key_exports);
|
|
1590
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
1591
|
+
let index = 0;
|
|
1592
|
+
function newId() {
|
|
1593
|
+
index++;
|
|
1594
|
+
return index;
|
|
1515
1595
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
var node_exports = {};
|
|
1538
|
-
__export22(node_exports, {
|
|
1539
|
-
isHtmlElement: () => isHtmlElement,
|
|
1540
|
-
isNode: () => isNode
|
|
1541
|
-
});
|
|
1542
|
-
module22.exports = __toCommonJS22(node_exports);
|
|
1543
|
-
var import_globals = require_globals2();
|
|
1544
|
-
var isNode = (obj) => {
|
|
1545
|
-
return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1546
|
-
};
|
|
1547
|
-
var isHtmlElement = (obj) => {
|
|
1548
|
-
return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1549
|
-
};
|
|
1596
|
+
return newId;
|
|
1597
|
+
}();
|
|
1598
|
+
var createSnapshotId = generateKey;
|
|
1599
|
+
}
|
|
1600
|
+
});
|
|
1601
|
+
var require_env2 = __commonJS2({
|
|
1602
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
1603
|
+
"use strict";
|
|
1604
|
+
var __defProp22 = Object.defineProperty;
|
|
1605
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1606
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1607
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1608
|
+
var __export22 = (target, all) => {
|
|
1609
|
+
for (var name in all)
|
|
1610
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1611
|
+
};
|
|
1612
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1613
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1614
|
+
for (let key of __getOwnPropNames22(from))
|
|
1615
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1616
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1550
1617
|
}
|
|
1618
|
+
return to;
|
|
1619
|
+
};
|
|
1620
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1621
|
+
var env_exports = {};
|
|
1622
|
+
__export22(env_exports, {
|
|
1623
|
+
NODE_ENV: () => NODE_ENV,
|
|
1624
|
+
getNev: () => getNev,
|
|
1625
|
+
isDevelopment: () => isDevelopment,
|
|
1626
|
+
isProduction: () => isProduction,
|
|
1627
|
+
isTest: () => isTest
|
|
1551
1628
|
});
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
isArray: () => isArray3,
|
|
1577
|
-
isBoolean: () => isBoolean,
|
|
1578
|
-
isDate: () => isDate,
|
|
1579
|
-
isDefined: () => isDefined2,
|
|
1580
|
-
isFunction: () => isFunction,
|
|
1581
|
-
isNot: () => isNot,
|
|
1582
|
-
isNull: () => isNull,
|
|
1583
|
-
isNumber: () => isNumber2,
|
|
1584
|
-
isObject: () => isObject3,
|
|
1585
|
-
isObjectLike: () => isObjectLike,
|
|
1586
|
-
isString: () => isString2,
|
|
1587
|
-
isUndefined: () => isUndefined
|
|
1588
|
-
});
|
|
1589
|
-
module22.exports = __toCommonJS22(types_exports);
|
|
1590
|
-
var import_node = require_node2();
|
|
1591
|
-
var isObject3 = (arg) => {
|
|
1592
|
-
if (arg === null)
|
|
1593
|
-
return false;
|
|
1594
|
-
return typeof arg === "object" && arg.constructor === Object;
|
|
1595
|
-
};
|
|
1596
|
-
var isString2 = (arg) => typeof arg === "string";
|
|
1597
|
-
var isNumber2 = (arg) => typeof arg === "number";
|
|
1598
|
-
var isFunction = (arg) => typeof arg === "function";
|
|
1599
|
-
var isBoolean = (arg) => arg === true || arg === false;
|
|
1600
|
-
var isNull = (arg) => arg === null;
|
|
1601
|
-
var isArray3 = (arg) => Array.isArray(arg);
|
|
1602
|
-
var isDate = (d) => d instanceof Date;
|
|
1603
|
-
var isObjectLike = (arg) => {
|
|
1604
|
-
if (arg === null)
|
|
1605
|
-
return false;
|
|
1606
|
-
return typeof arg === "object";
|
|
1607
|
-
};
|
|
1608
|
-
var isDefined2 = (arg) => {
|
|
1609
|
-
return isObject3(arg) || isObjectLike(arg) || isString2(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1610
|
-
};
|
|
1611
|
-
var isUndefined = (arg) => {
|
|
1612
|
-
return arg === void 0;
|
|
1613
|
-
};
|
|
1614
|
-
var TYPES = {
|
|
1615
|
-
boolean: isBoolean,
|
|
1616
|
-
array: isArray3,
|
|
1617
|
-
object: isObject3,
|
|
1618
|
-
string: isString2,
|
|
1619
|
-
date: isDate,
|
|
1620
|
-
number: isNumber2,
|
|
1621
|
-
null: isNull,
|
|
1622
|
-
function: isFunction,
|
|
1623
|
-
objectLike: isObjectLike,
|
|
1624
|
-
node: import_node.isNode,
|
|
1625
|
-
htmlElement: import_node.isHtmlElement,
|
|
1626
|
-
defined: isDefined2
|
|
1627
|
-
};
|
|
1628
|
-
var is = (arg) => {
|
|
1629
|
-
return (...args) => {
|
|
1630
|
-
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1631
|
-
};
|
|
1632
|
-
};
|
|
1633
|
-
var isNot = (arg) => {
|
|
1634
|
-
return (...args) => {
|
|
1635
|
-
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1636
|
-
};
|
|
1637
|
-
};
|
|
1629
|
+
module2.exports = __toCommonJS22(env_exports);
|
|
1630
|
+
var NODE_ENV = "development";
|
|
1631
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1632
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
1633
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1634
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1635
|
+
}
|
|
1636
|
+
});
|
|
1637
|
+
var require_globals2 = __commonJS2({
|
|
1638
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
1639
|
+
"use strict";
|
|
1640
|
+
var __defProp22 = Object.defineProperty;
|
|
1641
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1642
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1643
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1644
|
+
var __export22 = (target, all) => {
|
|
1645
|
+
for (var name in all)
|
|
1646
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1647
|
+
};
|
|
1648
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1649
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1650
|
+
for (let key of __getOwnPropNames22(from))
|
|
1651
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1652
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1638
1653
|
}
|
|
1654
|
+
return to;
|
|
1655
|
+
};
|
|
1656
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1657
|
+
var globals_exports = {};
|
|
1658
|
+
__export22(globals_exports, {
|
|
1659
|
+
document: () => document2,
|
|
1660
|
+
global: () => global,
|
|
1661
|
+
self: () => self,
|
|
1662
|
+
window: () => window
|
|
1639
1663
|
});
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1664
|
-
createNestedObject: () => createNestedObject,
|
|
1665
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1666
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1667
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
1668
|
-
joinArrays: () => joinArrays,
|
|
1669
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1670
|
-
mergeArray: () => mergeArray,
|
|
1671
|
-
removeFromArray: () => removeFromArray,
|
|
1672
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
1673
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1674
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
1675
|
-
swapItemsInArray: () => swapItemsInArray
|
|
1676
|
-
});
|
|
1677
|
-
module22.exports = __toCommonJS22(array_exports);
|
|
1678
|
-
var import_object = require_object2();
|
|
1679
|
-
var import_types = require_types2();
|
|
1680
|
-
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1681
|
-
return arr2.every((val) => arr1.includes(val));
|
|
1682
|
-
};
|
|
1683
|
-
var getFrequencyInArray = (arr, value) => {
|
|
1684
|
-
return arr.reduce((count, currentValue) => {
|
|
1685
|
-
return currentValue === value ? count + 1 : count;
|
|
1686
|
-
}, 0);
|
|
1687
|
-
};
|
|
1688
|
-
var removeFromArray = (arr, index) => {
|
|
1689
|
-
if ((0, import_types.isString)(index))
|
|
1690
|
-
index = parseInt(index);
|
|
1691
|
-
if ((0, import_types.isNumber)(index)) {
|
|
1692
|
-
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1693
|
-
throw new Error("Invalid index");
|
|
1694
|
-
}
|
|
1695
|
-
arr.splice(index, 1);
|
|
1696
|
-
} else if ((0, import_types.isArray)(index)) {
|
|
1697
|
-
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1698
|
-
} else {
|
|
1699
|
-
throw new Error("Invalid index");
|
|
1700
|
-
}
|
|
1701
|
-
return arr;
|
|
1702
|
-
};
|
|
1703
|
-
var swapItemsInArray = (arr, i, j) => {
|
|
1704
|
-
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1705
|
-
};
|
|
1706
|
-
var joinArrays = (...arrays) => {
|
|
1707
|
-
return [].concat(...arrays);
|
|
1708
|
-
};
|
|
1709
|
-
var mergeArray = (arr, excludeFrom = []) => {
|
|
1710
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1711
|
-
};
|
|
1712
|
-
var mergeAndCloneIfArray = (obj) => {
|
|
1713
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1714
|
-
};
|
|
1715
|
-
var cutArrayBeforeValue = (arr, value) => {
|
|
1716
|
-
const index = arr.indexOf(value);
|
|
1717
|
-
if (index !== -1) {
|
|
1718
|
-
return arr.slice(0, index);
|
|
1719
|
-
}
|
|
1720
|
-
return arr;
|
|
1721
|
-
};
|
|
1722
|
-
var cutArrayAfterValue = (arr, value) => {
|
|
1723
|
-
if (!(0, import_types.isArray)(arr))
|
|
1724
|
-
return;
|
|
1725
|
-
const index = arr.indexOf(value);
|
|
1726
|
-
if (index !== -1) {
|
|
1727
|
-
return arr.slice(index + 1);
|
|
1728
|
-
}
|
|
1729
|
-
return arr;
|
|
1730
|
-
};
|
|
1731
|
-
var createNestedObject = (arr, lastValue) => {
|
|
1732
|
-
const nestedObject = {};
|
|
1733
|
-
if (arr.length === 0) {
|
|
1734
|
-
return lastValue;
|
|
1735
|
-
}
|
|
1736
|
-
arr.reduce((obj, value, index) => {
|
|
1737
|
-
if (!obj[value]) {
|
|
1738
|
-
obj[value] = {};
|
|
1739
|
-
}
|
|
1740
|
-
if (index === arr.length - 1 && lastValue) {
|
|
1741
|
-
obj[value] = lastValue;
|
|
1742
|
-
}
|
|
1743
|
-
return obj[value];
|
|
1744
|
-
}, nestedObject);
|
|
1745
|
-
return nestedObject;
|
|
1746
|
-
};
|
|
1747
|
-
var removeValueFromArray = (arr, value) => {
|
|
1748
|
-
const index = arr.indexOf(value);
|
|
1749
|
-
if (index > -1) {
|
|
1750
|
-
const newArray = [...arr];
|
|
1751
|
-
newArray.splice(index, 1);
|
|
1752
|
-
return newArray;
|
|
1753
|
-
}
|
|
1754
|
-
return arr;
|
|
1755
|
-
};
|
|
1756
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
1757
|
-
return arr.filter((item) => item !== value);
|
|
1758
|
-
};
|
|
1759
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
1760
|
-
const result = [];
|
|
1761
|
-
for (let i = 0; i < array.length; i++) {
|
|
1762
|
-
result.push(array[i]);
|
|
1763
|
-
if (i < array.length - 1) {
|
|
1764
|
-
result.push(item);
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
return result;
|
|
1768
|
-
};
|
|
1769
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1770
|
-
const newArray = [...array];
|
|
1771
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
1772
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1773
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1774
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1775
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1776
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
1777
|
-
}
|
|
1778
|
-
return newArray;
|
|
1779
|
-
};
|
|
1664
|
+
module2.exports = __toCommonJS22(globals_exports);
|
|
1665
|
+
var global = globalThis;
|
|
1666
|
+
var self = globalThis;
|
|
1667
|
+
var window = globalThis;
|
|
1668
|
+
var document2 = window.document;
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
var require_node2 = __commonJS2({
|
|
1672
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
1673
|
+
"use strict";
|
|
1674
|
+
var __defProp22 = Object.defineProperty;
|
|
1675
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1676
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1677
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1678
|
+
var __export22 = (target, all) => {
|
|
1679
|
+
for (var name in all)
|
|
1680
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1681
|
+
};
|
|
1682
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1683
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1684
|
+
for (let key of __getOwnPropNames22(from))
|
|
1685
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1686
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1780
1687
|
}
|
|
1688
|
+
return to;
|
|
1689
|
+
};
|
|
1690
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1691
|
+
var node_exports = {};
|
|
1692
|
+
__export22(node_exports, {
|
|
1693
|
+
isHtmlElement: () => isHtmlElement,
|
|
1694
|
+
isNode: () => isNode
|
|
1781
1695
|
});
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
});
|
|
1809
|
-
module22.exports = __toCommonJS22(string_exports);
|
|
1810
|
-
var stringIncludesAny = (str, characters) => {
|
|
1811
|
-
for (const char of characters) {
|
|
1812
|
-
if (str.includes(char)) {
|
|
1813
|
-
return true;
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
return false;
|
|
1817
|
-
};
|
|
1818
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
1819
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
1820
|
-
return str.replace(pattern, "");
|
|
1821
|
-
};
|
|
1822
|
-
var brackRegex = {
|
|
1823
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
1824
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
1825
|
-
};
|
|
1826
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
1827
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
1828
|
-
return str;
|
|
1829
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
1830
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
1831
|
-
if (parentPath) {
|
|
1832
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
1833
|
-
let parentState = state;
|
|
1834
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
1835
|
-
parentState = parentState.parent;
|
|
1836
|
-
if (!parentState) {
|
|
1837
|
-
return "";
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
const value = parentState[variable.trim()];
|
|
1841
|
-
return value !== void 0 ? `${value}` : "";
|
|
1842
|
-
} else {
|
|
1843
|
-
const value = state[variable.trim()];
|
|
1844
|
-
return value !== void 0 ? `${value}` : "";
|
|
1845
|
-
}
|
|
1846
|
-
});
|
|
1847
|
-
};
|
|
1848
|
-
var lowercaseFirstLetter = (inputString) => {
|
|
1849
|
-
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
1850
|
-
};
|
|
1696
|
+
module2.exports = __toCommonJS22(node_exports);
|
|
1697
|
+
var import_globals = require_globals2();
|
|
1698
|
+
var isNode = (obj) => {
|
|
1699
|
+
return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1700
|
+
};
|
|
1701
|
+
var isHtmlElement = (obj) => {
|
|
1702
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
var require_types2 = __commonJS2({
|
|
1707
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
1708
|
+
"use strict";
|
|
1709
|
+
var __defProp22 = Object.defineProperty;
|
|
1710
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1711
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1712
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1713
|
+
var __export22 = (target, all) => {
|
|
1714
|
+
for (var name in all)
|
|
1715
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1716
|
+
};
|
|
1717
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1718
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1719
|
+
for (let key of __getOwnPropNames22(from))
|
|
1720
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1721
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1851
1722
|
}
|
|
1723
|
+
return to;
|
|
1724
|
+
};
|
|
1725
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1726
|
+
var types_exports = {};
|
|
1727
|
+
__export22(types_exports, {
|
|
1728
|
+
TYPES: () => TYPES,
|
|
1729
|
+
is: () => is,
|
|
1730
|
+
isArray: () => isArray3,
|
|
1731
|
+
isBoolean: () => isBoolean,
|
|
1732
|
+
isDate: () => isDate,
|
|
1733
|
+
isDefined: () => isDefined2,
|
|
1734
|
+
isFunction: () => isFunction,
|
|
1735
|
+
isNot: () => isNot,
|
|
1736
|
+
isNull: () => isNull,
|
|
1737
|
+
isNumber: () => isNumber2,
|
|
1738
|
+
isObject: () => isObject3,
|
|
1739
|
+
isObjectLike: () => isObjectLike,
|
|
1740
|
+
isString: () => isString2,
|
|
1741
|
+
isUndefined: () => isUndefined
|
|
1852
1742
|
});
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
1743
|
+
module2.exports = __toCommonJS22(types_exports);
|
|
1744
|
+
var import_node = require_node2();
|
|
1745
|
+
var isObject3 = (arg) => {
|
|
1746
|
+
if (arg === null)
|
|
1747
|
+
return false;
|
|
1748
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
1749
|
+
};
|
|
1750
|
+
var isString2 = (arg) => typeof arg === "string";
|
|
1751
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
1752
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
1753
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
1754
|
+
var isNull = (arg) => arg === null;
|
|
1755
|
+
var isArray3 = (arg) => Array.isArray(arg);
|
|
1756
|
+
var isDate = (d) => d instanceof Date;
|
|
1757
|
+
var isObjectLike = (arg) => {
|
|
1758
|
+
if (arg === null)
|
|
1759
|
+
return false;
|
|
1760
|
+
return typeof arg === "object";
|
|
1761
|
+
};
|
|
1762
|
+
var isDefined2 = (arg) => {
|
|
1763
|
+
return isObject3(arg) || isObjectLike(arg) || isString2(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1764
|
+
};
|
|
1765
|
+
var isUndefined = (arg) => {
|
|
1766
|
+
return arg === void 0;
|
|
1767
|
+
};
|
|
1768
|
+
var TYPES = {
|
|
1769
|
+
boolean: isBoolean,
|
|
1770
|
+
array: isArray3,
|
|
1771
|
+
object: isObject3,
|
|
1772
|
+
string: isString2,
|
|
1773
|
+
date: isDate,
|
|
1774
|
+
number: isNumber2,
|
|
1775
|
+
null: isNull,
|
|
1776
|
+
function: isFunction,
|
|
1777
|
+
objectLike: isObjectLike,
|
|
1778
|
+
node: import_node.isNode,
|
|
1779
|
+
htmlElement: import_node.isHtmlElement,
|
|
1780
|
+
defined: isDefined2
|
|
1781
|
+
};
|
|
1782
|
+
var is = (arg) => {
|
|
1783
|
+
return (...args) => {
|
|
1784
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1785
|
+
};
|
|
1786
|
+
};
|
|
1787
|
+
var isNot = (arg) => {
|
|
1788
|
+
return (...args) => {
|
|
1789
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1790
|
+
};
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
});
|
|
1794
|
+
var require_array2 = __commonJS2({
|
|
1795
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
1796
|
+
"use strict";
|
|
1797
|
+
var __defProp22 = Object.defineProperty;
|
|
1798
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1799
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1800
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1801
|
+
var __export22 = (target, all) => {
|
|
1802
|
+
for (var name in all)
|
|
1803
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1804
|
+
};
|
|
1805
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1806
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1807
|
+
for (let key of __getOwnPropNames22(from))
|
|
1808
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1809
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1810
|
+
}
|
|
1811
|
+
return to;
|
|
1812
|
+
};
|
|
1813
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1814
|
+
var array_exports = {};
|
|
1815
|
+
__export22(array_exports, {
|
|
1816
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1817
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1818
|
+
arraysEqual: () => arraysEqual,
|
|
1819
|
+
createNestedObject: () => createNestedObject,
|
|
1820
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1821
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1822
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1823
|
+
joinArrays: () => joinArrays,
|
|
1824
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1825
|
+
mergeArray: () => mergeArray,
|
|
1826
|
+
removeFromArray: () => removeFromArray,
|
|
1827
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
1828
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1829
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
1830
|
+
swapItemsInArray: () => swapItemsInArray
|
|
1831
|
+
});
|
|
1832
|
+
module2.exports = __toCommonJS22(array_exports);
|
|
1833
|
+
var import_object = require_object2();
|
|
1834
|
+
var import_types = require_types2();
|
|
1835
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1836
|
+
return arr2.every((val) => arr1.includes(val));
|
|
1837
|
+
};
|
|
1838
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1839
|
+
return arr.reduce((count, currentValue) => {
|
|
1840
|
+
return currentValue === value ? count + 1 : count;
|
|
1841
|
+
}, 0);
|
|
1842
|
+
};
|
|
1843
|
+
var removeFromArray = (arr, index) => {
|
|
1844
|
+
if ((0, import_types.isString)(index))
|
|
1845
|
+
index = parseInt(index);
|
|
1846
|
+
if ((0, import_types.isNumber)(index)) {
|
|
1847
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1848
|
+
throw new Error("Invalid index");
|
|
1849
|
+
}
|
|
1850
|
+
arr.splice(index, 1);
|
|
1851
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
1852
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1853
|
+
} else {
|
|
1854
|
+
throw new Error("Invalid index");
|
|
1855
|
+
}
|
|
1856
|
+
return arr;
|
|
1857
|
+
};
|
|
1858
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
1859
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1860
|
+
};
|
|
1861
|
+
var joinArrays = (...arrays) => {
|
|
1862
|
+
return [].concat(...arrays);
|
|
1863
|
+
};
|
|
1864
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
1865
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1866
|
+
};
|
|
1867
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
1868
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1869
|
+
};
|
|
1870
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
1871
|
+
const index = arr.indexOf(value);
|
|
1872
|
+
if (index !== -1) {
|
|
1873
|
+
return arr.slice(0, index);
|
|
1874
|
+
}
|
|
1875
|
+
return arr;
|
|
1876
|
+
};
|
|
1877
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
1878
|
+
if (!(0, import_types.isArray)(arr))
|
|
1879
|
+
return;
|
|
1880
|
+
const index = arr.indexOf(value);
|
|
1881
|
+
if (index !== -1) {
|
|
1882
|
+
return arr.slice(index + 1);
|
|
1883
|
+
}
|
|
1884
|
+
return arr;
|
|
1885
|
+
};
|
|
1886
|
+
var createNestedObject = (arr, lastValue) => {
|
|
1887
|
+
const nestedObject = {};
|
|
1888
|
+
if (arr.length === 0) {
|
|
1889
|
+
return lastValue;
|
|
1890
|
+
}
|
|
1891
|
+
arr.reduce((obj, value, index) => {
|
|
1892
|
+
if (!obj[value]) {
|
|
1893
|
+
obj[value] = {};
|
|
1894
|
+
}
|
|
1895
|
+
if (index === arr.length - 1 && lastValue) {
|
|
1896
|
+
obj[value] = lastValue;
|
|
1897
|
+
}
|
|
1898
|
+
return obj[value];
|
|
1899
|
+
}, nestedObject);
|
|
1900
|
+
return nestedObject;
|
|
1901
|
+
};
|
|
1902
|
+
var removeValueFromArray = (arr, value) => {
|
|
1903
|
+
const index = arr.indexOf(value);
|
|
1904
|
+
if (index > -1) {
|
|
1905
|
+
const newArray = [...arr];
|
|
1906
|
+
newArray.splice(index, 1);
|
|
1907
|
+
return newArray;
|
|
1908
|
+
}
|
|
1909
|
+
return arr;
|
|
1910
|
+
};
|
|
1911
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
1912
|
+
return arr.filter((item) => item !== value);
|
|
1913
|
+
};
|
|
1914
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
1915
|
+
const result = [];
|
|
1916
|
+
for (let i = 0; i < array.length; i++) {
|
|
1917
|
+
result.push(array[i]);
|
|
1918
|
+
if (i < array.length - 1) {
|
|
1919
|
+
result.push(item);
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
return result;
|
|
1923
|
+
};
|
|
1924
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1925
|
+
const newArray = [...array];
|
|
1926
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
1927
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1928
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1929
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1930
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1931
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
1932
|
+
}
|
|
1933
|
+
return newArray;
|
|
1934
|
+
};
|
|
1935
|
+
var arraysEqual = (arr1, arr2) => {
|
|
1936
|
+
if (arr1.length !== arr2.length) {
|
|
1937
|
+
return false;
|
|
1938
|
+
}
|
|
1939
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
1940
|
+
if (arr1[i] !== arr2[i]) {
|
|
1941
|
+
return false;
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return true;
|
|
1945
|
+
};
|
|
1946
|
+
}
|
|
1947
|
+
});
|
|
1948
|
+
var require_string2 = __commonJS2({
|
|
1949
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
1950
|
+
"use strict";
|
|
1951
|
+
var __defProp22 = Object.defineProperty;
|
|
1952
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1953
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1954
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1955
|
+
var __export22 = (target, all) => {
|
|
1956
|
+
for (var name in all)
|
|
1957
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1958
|
+
};
|
|
1959
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1960
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1961
|
+
for (let key of __getOwnPropNames22(from))
|
|
1962
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1963
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1964
|
+
}
|
|
1965
|
+
return to;
|
|
1966
|
+
};
|
|
1967
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1968
|
+
var string_exports = {};
|
|
1969
|
+
__export22(string_exports, {
|
|
1970
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
1971
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
1972
|
+
findKeyPosition: () => findKeyPosition,
|
|
1973
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
1974
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
1975
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
1976
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
1977
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
1978
|
+
});
|
|
1979
|
+
module2.exports = __toCommonJS22(string_exports);
|
|
1980
|
+
var stringIncludesAny = (str, characters) => {
|
|
1981
|
+
for (const char of characters) {
|
|
1982
|
+
if (str.includes(char)) {
|
|
1983
|
+
return true;
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
return false;
|
|
1987
|
+
};
|
|
1988
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
1989
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
1990
|
+
return str.replace(pattern, "");
|
|
1991
|
+
};
|
|
1992
|
+
var brackRegex = {
|
|
1993
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
1994
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
1995
|
+
};
|
|
1996
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
1997
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
1998
|
+
return str;
|
|
1999
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
2000
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
2001
|
+
if (parentPath) {
|
|
2002
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2003
|
+
let parentState = state;
|
|
2004
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
2005
|
+
parentState = parentState.parent;
|
|
2006
|
+
if (!parentState) {
|
|
2007
|
+
return "";
|
|
2008
|
+
}
|
|
2023
2009
|
}
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2010
|
+
const value = parentState[variable.trim()];
|
|
2011
|
+
return value !== void 0 ? `${value}` : "";
|
|
2012
|
+
} else {
|
|
2013
|
+
const value = state[variable.trim()];
|
|
2014
|
+
return value !== void 0 ? `${value}` : "";
|
|
2015
|
+
}
|
|
2016
|
+
});
|
|
2017
|
+
};
|
|
2018
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
2019
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2020
|
+
};
|
|
2021
|
+
var findKeyPosition = (str, key) => {
|
|
2022
|
+
const lines = str.split("\n");
|
|
2023
|
+
let startLineNumber = -1;
|
|
2024
|
+
let endLineNumber = -1;
|
|
2025
|
+
let startColumn = -1;
|
|
2026
|
+
let endColumn = -1;
|
|
2027
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2028
|
+
let braceCount = 0;
|
|
2029
|
+
let foundKey = false;
|
|
2030
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2031
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2032
|
+
foundKey = true;
|
|
2033
|
+
startLineNumber = i + 1;
|
|
2034
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
2035
|
+
if (lines[i].includes("{}")) {
|
|
2036
|
+
endLineNumber = startLineNumber;
|
|
2037
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
2038
|
+
break;
|
|
2039
|
+
}
|
|
2040
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
2041
|
+
if (line.includes("{") || line.includes("[")) {
|
|
2042
|
+
braceCount = 1;
|
|
2043
|
+
} else {
|
|
2044
|
+
endLineNumber = i + 1;
|
|
2045
|
+
endColumn = lines[i].length + 1;
|
|
2046
|
+
break;
|
|
2047
|
+
}
|
|
2048
|
+
} else if (foundKey) {
|
|
2049
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2050
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2051
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2052
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2053
|
+
if (braceCount === 0) {
|
|
2054
|
+
endLineNumber = i + 1;
|
|
2055
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2056
|
+
break;
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
return {
|
|
2061
|
+
startColumn,
|
|
2062
|
+
endColumn,
|
|
2063
|
+
startLineNumber,
|
|
2064
|
+
endLineNumber
|
|
2065
|
+
};
|
|
2066
|
+
};
|
|
2067
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
2068
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2069
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
2070
|
+
const octalValue = parseInt(p1, 8);
|
|
2071
|
+
const char = String.fromCharCode(octalValue);
|
|
2072
|
+
return char;
|
|
2073
|
+
});
|
|
2074
|
+
};
|
|
2075
|
+
var customEncodeURIComponent = (str) => {
|
|
2076
|
+
return str.split("").map((char) => {
|
|
2077
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2078
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2079
|
+
}
|
|
2080
|
+
return char;
|
|
2081
|
+
}).join("");
|
|
2082
|
+
};
|
|
2083
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
2084
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2085
|
+
};
|
|
2086
|
+
}
|
|
2087
|
+
});
|
|
2088
|
+
var require_object2 = __commonJS2({
|
|
2089
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2090
|
+
"use strict";
|
|
2091
|
+
var __defProp22 = Object.defineProperty;
|
|
2092
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2093
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2094
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2095
|
+
var __export22 = (target, all) => {
|
|
2096
|
+
for (var name in all)
|
|
2097
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2098
|
+
};
|
|
2099
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2100
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2101
|
+
for (let key of __getOwnPropNames22(from))
|
|
2102
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2103
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2104
|
+
}
|
|
2105
|
+
return to;
|
|
2106
|
+
};
|
|
2107
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2108
|
+
var object_exports = {};
|
|
2109
|
+
__export22(object_exports, {
|
|
2110
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2111
|
+
clone: () => clone,
|
|
2112
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2113
|
+
deepClone: () => deepClone2,
|
|
2114
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
2115
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2116
|
+
deepContains: () => deepContains,
|
|
2117
|
+
deepDestringify: () => deepDestringify,
|
|
2118
|
+
deepDiff: () => deepDiff,
|
|
2119
|
+
deepMerge: () => deepMerge2,
|
|
2120
|
+
deepStringify: () => deepStringify,
|
|
2121
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2122
|
+
diff: () => diff,
|
|
2123
|
+
diffArrays: () => diffArrays,
|
|
2124
|
+
diffObjects: () => diffObjects,
|
|
2125
|
+
exec: () => exec,
|
|
2126
|
+
flattenRecursive: () => flattenRecursive,
|
|
2127
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2128
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
2129
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
2130
|
+
isEmpty: () => isEmpty,
|
|
2131
|
+
isEmptyObject: () => isEmptyObject,
|
|
2132
|
+
isEqualDeep: () => isEqualDeep,
|
|
2133
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2134
|
+
map: () => map,
|
|
2135
|
+
merge: () => merge,
|
|
2136
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2137
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2138
|
+
objectToString: () => objectToString,
|
|
2139
|
+
overwrite: () => overwrite,
|
|
2140
|
+
overwriteDeep: () => overwriteDeep,
|
|
2141
|
+
overwriteShallow: () => overwriteShallow,
|
|
2142
|
+
removeFromObject: () => removeFromObject,
|
|
2143
|
+
stringToObject: () => stringToObject
|
|
2144
|
+
});
|
|
2145
|
+
module2.exports = __toCommonJS22(object_exports);
|
|
2146
|
+
var import_globals = require_globals2();
|
|
2147
|
+
var import_types = require_types2();
|
|
2148
|
+
var import_array = require_array2();
|
|
2149
|
+
var import_string = require_string2();
|
|
2150
|
+
var exec = (param, element, state, context) => {
|
|
2151
|
+
if ((0, import_types.isFunction)(param)) {
|
|
2152
|
+
return param(
|
|
2153
|
+
element,
|
|
2154
|
+
state || element.state,
|
|
2155
|
+
context || element.context
|
|
2156
|
+
);
|
|
2157
|
+
}
|
|
2158
|
+
return param;
|
|
2159
|
+
};
|
|
2160
|
+
var map = (obj, extention, element) => {
|
|
2161
|
+
for (const e in extention) {
|
|
2162
|
+
obj[e] = exec(extention[e], element);
|
|
2163
|
+
}
|
|
2164
|
+
};
|
|
2165
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
2166
|
+
for (const e in obj) {
|
|
2167
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2168
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2169
|
+
continue;
|
|
2170
|
+
const elementProp = element[e];
|
|
2171
|
+
const objProp = obj[e];
|
|
2172
|
+
if (elementProp === void 0) {
|
|
2173
|
+
element[e] = objProp;
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
return element;
|
|
2177
|
+
};
|
|
2178
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2179
|
+
for (const e in extend) {
|
|
2180
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2181
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2182
|
+
continue;
|
|
2183
|
+
const elementProp = element[e];
|
|
2184
|
+
const extendProp = extend[e];
|
|
2185
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2186
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2187
|
+
} else if (elementProp === void 0) {
|
|
2188
|
+
element[e] = extendProp;
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
return element;
|
|
2192
|
+
};
|
|
2193
|
+
var clone = (obj, excludeFrom = []) => {
|
|
2194
|
+
const o = {};
|
|
2195
|
+
for (const prop in obj) {
|
|
2196
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2197
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2198
|
+
continue;
|
|
2199
|
+
o[prop] = obj[prop];
|
|
2200
|
+
}
|
|
2201
|
+
return o;
|
|
2202
|
+
};
|
|
2203
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2204
|
+
if ((0, import_types.isArray)(obj)) {
|
|
2205
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2206
|
+
}
|
|
2207
|
+
const o = {};
|
|
2208
|
+
for (const k in obj) {
|
|
2209
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2210
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2211
|
+
continue;
|
|
2212
|
+
let v = obj[k];
|
|
2213
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2214
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
2215
|
+
}
|
|
2216
|
+
if ((0, import_types.isArray)(v)) {
|
|
2217
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2218
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
2219
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2220
|
+
} else
|
|
2221
|
+
o[k] = v;
|
|
2222
|
+
}
|
|
2223
|
+
return o;
|
|
2224
|
+
};
|
|
2225
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
2226
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2227
|
+
};
|
|
2228
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2229
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2230
|
+
for (const prop in obj) {
|
|
2231
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2232
|
+
continue;
|
|
2233
|
+
if (prop === "__proto__")
|
|
2234
|
+
continue;
|
|
2235
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2236
|
+
continue;
|
|
2237
|
+
let objProp = obj[prop];
|
|
2238
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2239
|
+
continue;
|
|
2240
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2241
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
2242
|
+
}
|
|
2243
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2244
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2245
|
+
} else
|
|
2246
|
+
o[prop] = objProp;
|
|
2247
|
+
}
|
|
2248
|
+
return o;
|
|
2249
|
+
};
|
|
2250
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2251
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2252
|
+
for (const prop in obj) {
|
|
2253
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2254
|
+
continue;
|
|
2255
|
+
const objProp = obj[prop];
|
|
2256
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2257
|
+
continue;
|
|
2258
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2259
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2260
|
+
} else
|
|
2261
|
+
o[prop] = objProp;
|
|
2262
|
+
}
|
|
2263
|
+
return o;
|
|
2264
|
+
};
|
|
2265
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
2266
|
+
for (const prop in obj) {
|
|
2267
|
+
const objProp = obj[prop];
|
|
2268
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
2269
|
+
stringified[prop] = objProp.toString();
|
|
2270
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2271
|
+
stringified[prop] = {};
|
|
2272
|
+
deepStringify(objProp, stringified[prop]);
|
|
2273
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2274
|
+
stringified[prop] = [];
|
|
2275
|
+
objProp.forEach((v, i) => {
|
|
2276
|
+
if ((0, import_types.isObject)(v)) {
|
|
2277
|
+
stringified[prop][i] = {};
|
|
2278
|
+
deepStringify(v, stringified[prop][i]);
|
|
2279
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
2280
|
+
stringified[prop][i] = v.toString();
|
|
2046
2281
|
} else {
|
|
2047
|
-
stringified[prop] =
|
|
2282
|
+
stringified[prop][i] = v;
|
|
2048
2283
|
}
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2284
|
+
});
|
|
2285
|
+
} else {
|
|
2286
|
+
stringified[prop] = objProp;
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
return stringified;
|
|
2290
|
+
};
|
|
2291
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
2292
|
+
const spaces = " ".repeat(indent);
|
|
2293
|
+
let str = "{\n";
|
|
2294
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
2295
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2296
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2297
|
+
str += `${spaces} ${stringedKey}: `;
|
|
2298
|
+
if ((0, import_types.isArray)(value)) {
|
|
2299
|
+
str += "[\n";
|
|
2300
|
+
for (const element of value) {
|
|
2301
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2302
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2067
2303
|
`;
|
|
2068
|
-
|
|
2069
|
-
|
|
2304
|
+
} else if ((0, import_types.isString)(element)) {
|
|
2305
|
+
str += `${spaces} '${element}',
|
|
2070
2306
|
`;
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
str += `${spaces} ]`;
|
|
2074
|
-
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2075
|
-
str += objectToString(value, indent + 1);
|
|
2076
|
-
} else if ((0, import_types.isString)(value)) {
|
|
2077
|
-
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2078
2307
|
} else {
|
|
2079
|
-
str +=
|
|
2308
|
+
str += `${spaces} ${element},
|
|
2309
|
+
`;
|
|
2080
2310
|
}
|
|
2081
|
-
str += ",\n";
|
|
2082
2311
|
}
|
|
2083
|
-
str += `${spaces}
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2312
|
+
str += `${spaces} ]`;
|
|
2313
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2314
|
+
str += objectToString(value, indent + 1);
|
|
2315
|
+
} else if ((0, import_types.isString)(value)) {
|
|
2316
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2317
|
+
} else {
|
|
2318
|
+
str += value;
|
|
2319
|
+
}
|
|
2320
|
+
str += ",\n";
|
|
2321
|
+
}
|
|
2322
|
+
str += `${spaces}}`;
|
|
2323
|
+
return str;
|
|
2324
|
+
};
|
|
2325
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
2326
|
+
for (const prop in obj) {
|
|
2327
|
+
const objProp = obj[prop];
|
|
2328
|
+
if ((0, import_types.isFunction)(objProp))
|
|
2329
|
+
continue;
|
|
2330
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
2331
|
+
detached[prop] = {};
|
|
2332
|
+
deepStringify(objProp, detached[prop]);
|
|
2333
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2334
|
+
detached[prop] = [];
|
|
2335
|
+
objProp.forEach((v, i) => {
|
|
2336
|
+
if ((0, import_types.isFunction)(v))
|
|
2337
|
+
return;
|
|
2338
|
+
if ((0, import_types.isObject)(v)) {
|
|
2339
|
+
detached[prop][i] = {};
|
|
2340
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
2106
2341
|
} else {
|
|
2107
|
-
detached[prop] =
|
|
2342
|
+
detached[prop][i] = v;
|
|
2343
|
+
}
|
|
2344
|
+
});
|
|
2345
|
+
} else {
|
|
2346
|
+
detached[prop] = objProp;
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
return detached;
|
|
2350
|
+
};
|
|
2351
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
2352
|
+
for (const prop in obj) {
|
|
2353
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2354
|
+
if (!hasOwnProperty2)
|
|
2355
|
+
continue;
|
|
2356
|
+
const objProp = obj[prop];
|
|
2357
|
+
if ((0, import_types.isString)(objProp)) {
|
|
2358
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2359
|
+
try {
|
|
2360
|
+
const evalProp = import_globals.window.eval(`(${objProp})`);
|
|
2361
|
+
destringified[prop] = evalProp;
|
|
2362
|
+
} catch (e) {
|
|
2363
|
+
if (e)
|
|
2364
|
+
destringified[prop] = objProp;
|
|
2108
2365
|
}
|
|
2366
|
+
} else {
|
|
2367
|
+
destringified[prop] = objProp;
|
|
2109
2368
|
}
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
if (!hasOwnProperty2)
|
|
2116
|
-
continue;
|
|
2117
|
-
const objProp = obj[prop];
|
|
2118
|
-
if ((0, import_types.isString)(objProp)) {
|
|
2119
|
-
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2369
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2370
|
+
destringified[prop] = [];
|
|
2371
|
+
objProp.forEach((arrProp) => {
|
|
2372
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
2373
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2120
2374
|
try {
|
|
2121
|
-
const evalProp = import_globals.window.eval(`(${
|
|
2122
|
-
destringified[prop]
|
|
2375
|
+
const evalProp = import_globals.window.eval(`(${arrProp})`);
|
|
2376
|
+
destringified[prop].push(evalProp);
|
|
2123
2377
|
} catch (e) {
|
|
2124
2378
|
if (e)
|
|
2125
|
-
destringified[prop]
|
|
2379
|
+
destringified[prop].push(arrProp);
|
|
2126
2380
|
}
|
|
2127
2381
|
} else {
|
|
2128
|
-
destringified[prop]
|
|
2382
|
+
destringified[prop].push(arrProp);
|
|
2129
2383
|
}
|
|
2130
|
-
} else if ((0, import_types.
|
|
2131
|
-
destringified[prop]
|
|
2132
|
-
objProp.forEach((arrProp) => {
|
|
2133
|
-
if ((0, import_types.isString)(arrProp)) {
|
|
2134
|
-
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2135
|
-
try {
|
|
2136
|
-
const evalProp = import_globals.window.eval(`(${arrProp})`);
|
|
2137
|
-
destringified[prop].push(evalProp);
|
|
2138
|
-
} catch (e) {
|
|
2139
|
-
if (e)
|
|
2140
|
-
destringified[prop].push(arrProp);
|
|
2141
|
-
}
|
|
2142
|
-
} else {
|
|
2143
|
-
destringified[prop].push(arrProp);
|
|
2144
|
-
}
|
|
2145
|
-
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2146
|
-
destringified[prop].push(deepDestringify(arrProp));
|
|
2147
|
-
} else {
|
|
2148
|
-
destringified[prop].push(arrProp);
|
|
2149
|
-
}
|
|
2150
|
-
});
|
|
2151
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2152
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2384
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2385
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
2153
2386
|
} else {
|
|
2154
|
-
destringified[prop]
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
return destringified;
|
|
2158
|
-
};
|
|
2159
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2160
|
-
try {
|
|
2161
|
-
return import_globals.window.eval("(" + str + ")");
|
|
2162
|
-
} catch (e) {
|
|
2163
|
-
if (opts.verbose)
|
|
2164
|
-
console.warn(e);
|
|
2165
|
-
}
|
|
2166
|
-
};
|
|
2167
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
2168
|
-
for (const e in objToDiff) {
|
|
2169
|
-
if (e === "ref")
|
|
2170
|
-
continue;
|
|
2171
|
-
const originalProp = original[e];
|
|
2172
|
-
const objToDiffProp = objToDiff[e];
|
|
2173
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2174
|
-
cache[e] = {};
|
|
2175
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
2176
|
-
} else if (objToDiffProp !== void 0) {
|
|
2177
|
-
cache[e] = objToDiffProp;
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
return cache;
|
|
2181
|
-
};
|
|
2182
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
2183
|
-
if (original.length !== objToDiff.length) {
|
|
2184
|
-
cache = objToDiff;
|
|
2185
|
-
} else {
|
|
2186
|
-
const diffArr = [];
|
|
2187
|
-
for (let i = 0; i < original.length; i++) {
|
|
2188
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
2189
|
-
if (Object.keys(diffObj).length > 0) {
|
|
2190
|
-
diffArr.push(diffObj);
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
if (diffArr.length > 0) {
|
|
2194
|
-
cache = diffArr;
|
|
2195
|
-
}
|
|
2196
|
-
}
|
|
2197
|
-
return cache;
|
|
2198
|
-
};
|
|
2199
|
-
var diff = (original, objToDiff, cache = {}) => {
|
|
2200
|
-
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2201
|
-
cache = [];
|
|
2202
|
-
diffArrays(original, objToDiff, cache);
|
|
2203
|
-
} else {
|
|
2204
|
-
diffObjects(original, objToDiff, cache);
|
|
2205
|
-
}
|
|
2206
|
-
return cache;
|
|
2207
|
-
};
|
|
2208
|
-
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2209
|
-
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2210
|
-
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2211
|
-
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2212
|
-
var deepDiff = (lhs, rhs) => {
|
|
2213
|
-
if (lhs === rhs)
|
|
2214
|
-
return {};
|
|
2215
|
-
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2216
|
-
return rhs;
|
|
2217
|
-
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2218
|
-
if (!hasOwnProperty(rhs, key)) {
|
|
2219
|
-
acc[key] = void 0;
|
|
2220
|
-
}
|
|
2221
|
-
return acc;
|
|
2222
|
-
}, makeObjectWithoutPrototype());
|
|
2223
|
-
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2224
|
-
if (lhs.valueOf() === rhs.valueOf())
|
|
2225
|
-
return {};
|
|
2226
|
-
return rhs;
|
|
2227
|
-
}
|
|
2228
|
-
return Object.keys(rhs).reduce((acc, key) => {
|
|
2229
|
-
if (!hasOwnProperty(lhs, key)) {
|
|
2230
|
-
acc[key] = rhs[key];
|
|
2231
|
-
return acc;
|
|
2232
|
-
}
|
|
2233
|
-
const difference = diff(lhs[key], rhs[key]);
|
|
2234
|
-
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2235
|
-
return acc;
|
|
2236
|
-
}
|
|
2237
|
-
acc[key] = difference;
|
|
2238
|
-
return acc;
|
|
2239
|
-
}, deletedValues);
|
|
2240
|
-
};
|
|
2241
|
-
var overwrite = (element, params, excludeFrom = []) => {
|
|
2242
|
-
const { ref } = element;
|
|
2243
|
-
const changes = {};
|
|
2244
|
-
for (const e in params) {
|
|
2245
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2246
|
-
continue;
|
|
2247
|
-
const elementProp = element[e];
|
|
2248
|
-
const paramsProp = params[e];
|
|
2249
|
-
if (paramsProp) {
|
|
2250
|
-
ref.__cache[e] = changes[e] = elementProp;
|
|
2251
|
-
ref[e] = paramsProp;
|
|
2252
|
-
}
|
|
2253
|
-
}
|
|
2254
|
-
return changes;
|
|
2255
|
-
};
|
|
2256
|
-
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2257
|
-
for (const e in params) {
|
|
2258
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2259
|
-
continue;
|
|
2260
|
-
obj[e] = params[e];
|
|
2261
|
-
}
|
|
2262
|
-
return obj;
|
|
2263
|
-
};
|
|
2264
|
-
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2265
|
-
for (const e in params) {
|
|
2266
|
-
if (e === "__proto__")
|
|
2267
|
-
continue;
|
|
2268
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2269
|
-
continue;
|
|
2270
|
-
const objProp = obj[e];
|
|
2271
|
-
const paramsProp = params[e];
|
|
2272
|
-
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2273
|
-
overwriteDeep(objProp, paramsProp);
|
|
2274
|
-
} else if (paramsProp !== void 0) {
|
|
2275
|
-
obj[e] = paramsProp;
|
|
2387
|
+
destringified[prop].push(arrProp);
|
|
2276
2388
|
}
|
|
2389
|
+
});
|
|
2390
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2391
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2392
|
+
} else {
|
|
2393
|
+
destringified[prop] = objProp;
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
return destringified;
|
|
2397
|
+
};
|
|
2398
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2399
|
+
try {
|
|
2400
|
+
return import_globals.window.eval("(" + str + ")");
|
|
2401
|
+
} catch (e) {
|
|
2402
|
+
if (opts.verbose)
|
|
2403
|
+
console.warn(e);
|
|
2404
|
+
}
|
|
2405
|
+
};
|
|
2406
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
2407
|
+
for (const e in objToDiff) {
|
|
2408
|
+
if (e === "ref")
|
|
2409
|
+
continue;
|
|
2410
|
+
const originalProp = original[e];
|
|
2411
|
+
const objToDiffProp = objToDiff[e];
|
|
2412
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2413
|
+
cache[e] = {};
|
|
2414
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
2415
|
+
} else if (objToDiffProp !== void 0) {
|
|
2416
|
+
cache[e] = objToDiffProp;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
return cache;
|
|
2420
|
+
};
|
|
2421
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
2422
|
+
if (original.length !== objToDiff.length) {
|
|
2423
|
+
cache = objToDiff;
|
|
2424
|
+
} else {
|
|
2425
|
+
const diffArr = [];
|
|
2426
|
+
for (let i = 0; i < original.length; i++) {
|
|
2427
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
2428
|
+
if (Object.keys(diffObj).length > 0) {
|
|
2429
|
+
diffArr.push(diffObj);
|
|
2277
2430
|
}
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2431
|
+
}
|
|
2432
|
+
if (diffArr.length > 0) {
|
|
2433
|
+
cache = diffArr;
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
return cache;
|
|
2437
|
+
};
|
|
2438
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
2439
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2440
|
+
cache = [];
|
|
2441
|
+
diffArrays(original, objToDiff, cache);
|
|
2442
|
+
} else {
|
|
2443
|
+
diffObjects(original, objToDiff, cache);
|
|
2444
|
+
}
|
|
2445
|
+
return cache;
|
|
2446
|
+
};
|
|
2447
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2448
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2449
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2450
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2451
|
+
var deepDiff = (lhs, rhs) => {
|
|
2452
|
+
if (lhs === rhs)
|
|
2453
|
+
return {};
|
|
2454
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2455
|
+
return rhs;
|
|
2456
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2457
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
2458
|
+
acc[key] = void 0;
|
|
2459
|
+
}
|
|
2460
|
+
return acc;
|
|
2461
|
+
}, makeObjectWithoutPrototype());
|
|
2462
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2463
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
2464
|
+
return {};
|
|
2465
|
+
return rhs;
|
|
2466
|
+
}
|
|
2467
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
2468
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
2469
|
+
acc[key] = rhs[key];
|
|
2470
|
+
return acc;
|
|
2471
|
+
}
|
|
2472
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
2473
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2474
|
+
return acc;
|
|
2475
|
+
}
|
|
2476
|
+
acc[key] = difference;
|
|
2477
|
+
return acc;
|
|
2478
|
+
}, deletedValues);
|
|
2479
|
+
};
|
|
2480
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
2481
|
+
const { ref } = element;
|
|
2482
|
+
const changes = {};
|
|
2483
|
+
for (const e in params) {
|
|
2484
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2485
|
+
continue;
|
|
2486
|
+
const elementProp = element[e];
|
|
2487
|
+
const paramsProp = params[e];
|
|
2488
|
+
if (paramsProp) {
|
|
2489
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
2490
|
+
ref[e] = paramsProp;
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
return changes;
|
|
2494
|
+
};
|
|
2495
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2496
|
+
for (const e in params) {
|
|
2497
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2498
|
+
continue;
|
|
2499
|
+
obj[e] = params[e];
|
|
2500
|
+
}
|
|
2501
|
+
return obj;
|
|
2502
|
+
};
|
|
2503
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2504
|
+
for (const e in params) {
|
|
2505
|
+
if (e === "__proto__")
|
|
2506
|
+
continue;
|
|
2507
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2508
|
+
continue;
|
|
2509
|
+
const objProp = obj[e];
|
|
2510
|
+
const paramsProp = params[e];
|
|
2511
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2512
|
+
overwriteDeep(objProp, paramsProp);
|
|
2513
|
+
} else if (paramsProp !== void 0) {
|
|
2514
|
+
obj[e] = paramsProp;
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
return obj;
|
|
2518
|
+
};
|
|
2519
|
+
var mergeIfExisted = (a, b) => {
|
|
2520
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2521
|
+
return deepMerge2(a, b);
|
|
2522
|
+
return a || b;
|
|
2523
|
+
};
|
|
2524
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
2525
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2526
|
+
stack.push(objectized);
|
|
2527
|
+
const extendOfExtend = objectized[prop];
|
|
2528
|
+
if (extendOfExtend)
|
|
2529
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
2530
|
+
delete objectized[prop];
|
|
2531
|
+
return stack;
|
|
2532
|
+
};
|
|
2533
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2534
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2535
|
+
return param === element;
|
|
2536
|
+
}
|
|
2537
|
+
if (visited.has(param) || visited.has(element)) {
|
|
2538
|
+
return true;
|
|
2539
|
+
}
|
|
2540
|
+
visited.add(param);
|
|
2541
|
+
visited.add(element);
|
|
2542
|
+
const keysParam = Object.keys(param);
|
|
2543
|
+
const keysElement = Object.keys(element);
|
|
2544
|
+
if (keysParam.length !== keysElement.length) {
|
|
2545
|
+
return false;
|
|
2546
|
+
}
|
|
2547
|
+
for (const key of keysParam) {
|
|
2548
|
+
if (!keysElement.includes(key)) {
|
|
2549
|
+
return false;
|
|
2550
|
+
}
|
|
2551
|
+
const paramProp = param[key];
|
|
2552
|
+
const elementProp = element[key];
|
|
2553
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2554
|
+
return false;
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
return true;
|
|
2558
|
+
};
|
|
2559
|
+
var deepContains = (obj1, obj2) => {
|
|
2560
|
+
if (typeof obj1 !== typeof obj2) {
|
|
2561
|
+
return false;
|
|
2562
|
+
}
|
|
2563
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2564
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2565
|
+
if (obj1.length !== obj2.length) {
|
|
2306
2566
|
return false;
|
|
2307
2567
|
}
|
|
2308
|
-
for (
|
|
2309
|
-
if (!
|
|
2310
|
-
return false;
|
|
2311
|
-
}
|
|
2312
|
-
const paramProp = param[key];
|
|
2313
|
-
const elementProp = element[key];
|
|
2314
|
-
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2568
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
2569
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
2315
2570
|
return false;
|
|
2316
2571
|
}
|
|
2317
2572
|
}
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
}
|
|
2324
|
-
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2325
|
-
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2326
|
-
if (obj1.length !== obj2.length) {
|
|
2327
|
-
return false;
|
|
2328
|
-
}
|
|
2329
|
-
for (let i = 0; i < obj1.length; i++) {
|
|
2330
|
-
if (!deepContains(obj1[i], obj2[i])) {
|
|
2331
|
-
return false;
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2335
|
-
for (const key in obj1) {
|
|
2336
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2337
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2338
|
-
return false;
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2573
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2574
|
+
for (const key in obj1) {
|
|
2575
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2576
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2577
|
+
return false;
|
|
2341
2578
|
}
|
|
2342
|
-
} else {
|
|
2343
|
-
return obj2 === obj1;
|
|
2344
|
-
}
|
|
2345
|
-
return true;
|
|
2346
|
-
};
|
|
2347
|
-
var removeFromObject = (obj, props) => {
|
|
2348
|
-
if (props === void 0 || props === null)
|
|
2349
|
-
return obj;
|
|
2350
|
-
if ((0, import_types.is)(props)("string", "number")) {
|
|
2351
|
-
delete obj[props];
|
|
2352
|
-
} else if ((0, import_types.isArray)(props)) {
|
|
2353
|
-
props.forEach((prop) => delete obj[prop]);
|
|
2354
|
-
} else {
|
|
2355
|
-
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2356
2579
|
}
|
|
2357
|
-
|
|
2358
|
-
|
|
2580
|
+
}
|
|
2581
|
+
} else {
|
|
2582
|
+
return obj2 === obj1;
|
|
2359
2583
|
}
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
__export22(function_exports, {
|
|
2383
|
-
debounce: () => debounce,
|
|
2384
|
-
debounceOnContext: () => debounceOnContext,
|
|
2385
|
-
isStringFunction: () => isStringFunction,
|
|
2386
|
-
memoize: () => memoize
|
|
2387
|
-
});
|
|
2388
|
-
module22.exports = __toCommonJS22(function_exports);
|
|
2389
|
-
function debounce(func, wait, immediate) {
|
|
2390
|
-
let timeout;
|
|
2391
|
-
return function() {
|
|
2392
|
-
const context = this;
|
|
2393
|
-
const args = arguments;
|
|
2394
|
-
const later = function() {
|
|
2395
|
-
timeout = null;
|
|
2396
|
-
if (!immediate)
|
|
2397
|
-
func.apply(context, args);
|
|
2398
|
-
};
|
|
2399
|
-
const callNow = immediate && !timeout;
|
|
2400
|
-
clearTimeout(timeout);
|
|
2401
|
-
timeout = setTimeout(later, wait);
|
|
2402
|
-
if (callNow)
|
|
2403
|
-
func.apply(context, args);
|
|
2404
|
-
};
|
|
2584
|
+
return true;
|
|
2585
|
+
};
|
|
2586
|
+
var removeFromObject = (obj, props) => {
|
|
2587
|
+
if (props === void 0 || props === null)
|
|
2588
|
+
return obj;
|
|
2589
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
2590
|
+
delete obj[props];
|
|
2591
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
2592
|
+
props.forEach((prop) => delete obj[prop]);
|
|
2593
|
+
} else {
|
|
2594
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2595
|
+
}
|
|
2596
|
+
return obj;
|
|
2597
|
+
};
|
|
2598
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
2599
|
+
if (obj === null || typeof obj !== "object") {
|
|
2600
|
+
return obj;
|
|
2601
|
+
}
|
|
2602
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2603
|
+
for (const key in obj) {
|
|
2604
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2605
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2405
2606
|
}
|
|
2406
|
-
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2407
|
-
let timer;
|
|
2408
|
-
return (...args) => {
|
|
2409
|
-
clearTimeout(timer);
|
|
2410
|
-
timer = setTimeout(() => {
|
|
2411
|
-
func.apply(element, args);
|
|
2412
|
-
}, timeout);
|
|
2413
|
-
};
|
|
2414
|
-
};
|
|
2415
|
-
var memoize = (fn) => {
|
|
2416
|
-
const cache = {};
|
|
2417
|
-
return (...args) => {
|
|
2418
|
-
const n = args[0];
|
|
2419
|
-
if (n in cache) {
|
|
2420
|
-
return cache[n];
|
|
2421
|
-
} else {
|
|
2422
|
-
const result = fn(n);
|
|
2423
|
-
cache[n] = result;
|
|
2424
|
-
return result;
|
|
2425
|
-
}
|
|
2426
|
-
};
|
|
2427
|
-
};
|
|
2428
|
-
var isStringFunction = (inputString) => {
|
|
2429
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2430
|
-
return functionRegex.test(inputString);
|
|
2431
|
-
};
|
|
2432
2607
|
}
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2608
|
+
return newObj;
|
|
2609
|
+
};
|
|
2610
|
+
var checkIfKeyIsComponent = (key) => {
|
|
2611
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2612
|
+
if (!isFirstKeyString)
|
|
2613
|
+
return;
|
|
2614
|
+
const firstCharKey = key.slice(0, 1);
|
|
2615
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
2616
|
+
};
|
|
2617
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
2618
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2619
|
+
return el;
|
|
2620
|
+
}
|
|
2621
|
+
if (el.extend) {
|
|
2622
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2623
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2624
|
+
if (foundString || foundInArray)
|
|
2625
|
+
return el;
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
var getExtendsInElement = (obj) => {
|
|
2629
|
+
let result = [];
|
|
2630
|
+
function traverse(o) {
|
|
2631
|
+
for (const key in o) {
|
|
2632
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
2633
|
+
if (checkIfKeyIsComponent(key)) {
|
|
2634
|
+
result.push(key);
|
|
2635
|
+
}
|
|
2636
|
+
if (key === "extend") {
|
|
2637
|
+
if (typeof o[key] === "string") {
|
|
2638
|
+
result.push(o[key]);
|
|
2639
|
+
} else if (Array.isArray(o[key])) {
|
|
2640
|
+
result = result.concat(o[key]);
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
2644
|
+
traverse(o[key]);
|
|
2645
|
+
}
|
|
2469
2646
|
}
|
|
2470
|
-
}
|
|
2647
|
+
}
|
|
2471
2648
|
}
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
var cookie_exports = {};
|
|
2494
|
-
__export22(cookie_exports, {
|
|
2495
|
-
getCookie: () => getCookie,
|
|
2496
|
-
isMobile: () => isMobile,
|
|
2497
|
-
setCookie: () => setCookie
|
|
2498
|
-
});
|
|
2499
|
-
module22.exports = __toCommonJS22(cookie_exports);
|
|
2500
|
-
var import_types = require_types2();
|
|
2501
|
-
var import_utils32 = require_cjs3();
|
|
2502
|
-
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2503
|
-
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2504
|
-
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2505
|
-
return;
|
|
2506
|
-
const d = /* @__PURE__ */ new Date();
|
|
2507
|
-
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2508
|
-
const expires = `expires=${d.toUTCString()}`;
|
|
2509
|
-
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2510
|
-
};
|
|
2511
|
-
var getCookie = (cname) => {
|
|
2512
|
-
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2513
|
-
return;
|
|
2514
|
-
const name = `${cname}=`;
|
|
2515
|
-
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2516
|
-
const ca = decodedCookie.split(";");
|
|
2517
|
-
for (let i = 0; i < ca.length; i++) {
|
|
2518
|
-
let c = ca[i];
|
|
2519
|
-
while (c.charAt(0) === " ")
|
|
2520
|
-
c = c.substring(1);
|
|
2521
|
-
if (c.indexOf(name) === 0)
|
|
2522
|
-
return c.substring(name.length, c.length);
|
|
2523
|
-
}
|
|
2524
|
-
return "";
|
|
2525
|
-
};
|
|
2649
|
+
traverse(obj);
|
|
2650
|
+
return result;
|
|
2651
|
+
};
|
|
2652
|
+
}
|
|
2653
|
+
});
|
|
2654
|
+
var require_function2 = __commonJS2({
|
|
2655
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
2656
|
+
"use strict";
|
|
2657
|
+
var __defProp22 = Object.defineProperty;
|
|
2658
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2659
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2660
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2661
|
+
var __export22 = (target, all) => {
|
|
2662
|
+
for (var name in all)
|
|
2663
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2664
|
+
};
|
|
2665
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2666
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2667
|
+
for (let key of __getOwnPropNames22(from))
|
|
2668
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2669
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2526
2670
|
}
|
|
2671
|
+
return to;
|
|
2672
|
+
};
|
|
2673
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2674
|
+
var function_exports = {};
|
|
2675
|
+
__export22(function_exports, {
|
|
2676
|
+
debounce: () => debounce,
|
|
2677
|
+
debounceOnContext: () => debounceOnContext,
|
|
2678
|
+
isStringFunction: () => isStringFunction,
|
|
2679
|
+
memoize: () => memoize
|
|
2527
2680
|
});
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
};
|
|
2539
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2540
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2541
|
-
for (let key of __getOwnPropNames22(from))
|
|
2542
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2543
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2544
|
-
}
|
|
2545
|
-
return to;
|
|
2546
|
-
};
|
|
2547
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2548
|
-
var tags_exports = {};
|
|
2549
|
-
__export22(tags_exports, {
|
|
2550
|
-
HTML_TAGS: () => HTML_TAGS,
|
|
2551
|
-
isValidHtmlTag: () => isValidHtmlTag
|
|
2552
|
-
});
|
|
2553
|
-
module22.exports = __toCommonJS22(tags_exports);
|
|
2554
|
-
var HTML_TAGS = {
|
|
2555
|
-
root: [
|
|
2556
|
-
"body",
|
|
2557
|
-
"html"
|
|
2558
|
-
],
|
|
2559
|
-
head: [
|
|
2560
|
-
"title",
|
|
2561
|
-
"base",
|
|
2562
|
-
"meta",
|
|
2563
|
-
"style"
|
|
2564
|
-
],
|
|
2565
|
-
body: [
|
|
2566
|
-
"string",
|
|
2567
|
-
"fragment",
|
|
2568
|
-
"a",
|
|
2569
|
-
"abbr",
|
|
2570
|
-
"acronym",
|
|
2571
|
-
"address",
|
|
2572
|
-
"applet",
|
|
2573
|
-
"area",
|
|
2574
|
-
"article",
|
|
2575
|
-
"aside",
|
|
2576
|
-
"audio",
|
|
2577
|
-
"b",
|
|
2578
|
-
"basefont",
|
|
2579
|
-
"bdi",
|
|
2580
|
-
"bdo",
|
|
2581
|
-
"big",
|
|
2582
|
-
"blockquote",
|
|
2583
|
-
"br",
|
|
2584
|
-
"button",
|
|
2585
|
-
"canvas",
|
|
2586
|
-
"caption",
|
|
2587
|
-
"center",
|
|
2588
|
-
"cite",
|
|
2589
|
-
"code",
|
|
2590
|
-
"search",
|
|
2591
|
-
"col",
|
|
2592
|
-
"colgroup",
|
|
2593
|
-
"data",
|
|
2594
|
-
"datalist",
|
|
2595
|
-
"dd",
|
|
2596
|
-
"del",
|
|
2597
|
-
"details",
|
|
2598
|
-
"dfn",
|
|
2599
|
-
"dialog",
|
|
2600
|
-
"dir",
|
|
2601
|
-
"div",
|
|
2602
|
-
"dl",
|
|
2603
|
-
"dt",
|
|
2604
|
-
"em",
|
|
2605
|
-
"embed",
|
|
2606
|
-
"fieldset",
|
|
2607
|
-
"figcaption",
|
|
2608
|
-
"figure",
|
|
2609
|
-
"font",
|
|
2610
|
-
"footer",
|
|
2611
|
-
"form",
|
|
2612
|
-
"frame",
|
|
2613
|
-
"frameset",
|
|
2614
|
-
"h1",
|
|
2615
|
-
"h2",
|
|
2616
|
-
"h3",
|
|
2617
|
-
"h4",
|
|
2618
|
-
"h5",
|
|
2619
|
-
"h6",
|
|
2620
|
-
"head",
|
|
2621
|
-
"header",
|
|
2622
|
-
"hr",
|
|
2623
|
-
"i",
|
|
2624
|
-
"iframe",
|
|
2625
|
-
"img",
|
|
2626
|
-
"input",
|
|
2627
|
-
"ins",
|
|
2628
|
-
"kbd",
|
|
2629
|
-
"label",
|
|
2630
|
-
"legend",
|
|
2631
|
-
"li",
|
|
2632
|
-
"link",
|
|
2633
|
-
"main",
|
|
2634
|
-
"map",
|
|
2635
|
-
"mark",
|
|
2636
|
-
"meter",
|
|
2637
|
-
"nav",
|
|
2638
|
-
"noframes",
|
|
2639
|
-
"noscript",
|
|
2640
|
-
"object",
|
|
2641
|
-
"ol",
|
|
2642
|
-
"optgroup",
|
|
2643
|
-
"option",
|
|
2644
|
-
"output",
|
|
2645
|
-
"p",
|
|
2646
|
-
"param",
|
|
2647
|
-
"picture",
|
|
2648
|
-
"pre",
|
|
2649
|
-
"progress",
|
|
2650
|
-
"hgroup",
|
|
2651
|
-
"q",
|
|
2652
|
-
"rp",
|
|
2653
|
-
"rt",
|
|
2654
|
-
"ruby",
|
|
2655
|
-
"s",
|
|
2656
|
-
"samp",
|
|
2657
|
-
"script",
|
|
2658
|
-
"section",
|
|
2659
|
-
"select",
|
|
2660
|
-
"small",
|
|
2661
|
-
"source",
|
|
2662
|
-
"span",
|
|
2663
|
-
"strike",
|
|
2664
|
-
"strong",
|
|
2665
|
-
"sub",
|
|
2666
|
-
"summary",
|
|
2667
|
-
"sup",
|
|
2668
|
-
"table",
|
|
2669
|
-
"tbody",
|
|
2670
|
-
"td",
|
|
2671
|
-
"template",
|
|
2672
|
-
"hgroup",
|
|
2673
|
-
"textarea",
|
|
2674
|
-
"tfoot",
|
|
2675
|
-
"th",
|
|
2676
|
-
"thead",
|
|
2677
|
-
"time",
|
|
2678
|
-
"tr",
|
|
2679
|
-
"track",
|
|
2680
|
-
"tt",
|
|
2681
|
-
"u",
|
|
2682
|
-
"ul",
|
|
2683
|
-
"var",
|
|
2684
|
-
"video",
|
|
2685
|
-
"wbr",
|
|
2686
|
-
// SVG
|
|
2687
|
-
"svg",
|
|
2688
|
-
"path"
|
|
2689
|
-
]
|
|
2681
|
+
module2.exports = __toCommonJS22(function_exports);
|
|
2682
|
+
function debounce(func, wait, immediate) {
|
|
2683
|
+
let timeout;
|
|
2684
|
+
return function() {
|
|
2685
|
+
const context = this;
|
|
2686
|
+
const args = arguments;
|
|
2687
|
+
const later = function() {
|
|
2688
|
+
timeout = null;
|
|
2689
|
+
if (!immediate)
|
|
2690
|
+
func.apply(context, args);
|
|
2690
2691
|
};
|
|
2691
|
-
|
|
2692
|
+
const callNow = immediate && !timeout;
|
|
2693
|
+
clearTimeout(timeout);
|
|
2694
|
+
timeout = setTimeout(later, wait);
|
|
2695
|
+
if (callNow)
|
|
2696
|
+
func.apply(context, args);
|
|
2697
|
+
};
|
|
2698
|
+
}
|
|
2699
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2700
|
+
let timer;
|
|
2701
|
+
return (...args) => {
|
|
2702
|
+
clearTimeout(timer);
|
|
2703
|
+
timer = setTimeout(() => {
|
|
2704
|
+
func.apply(element, args);
|
|
2705
|
+
}, timeout);
|
|
2706
|
+
};
|
|
2707
|
+
};
|
|
2708
|
+
var memoize = (fn) => {
|
|
2709
|
+
const cache = {};
|
|
2710
|
+
return (...args) => {
|
|
2711
|
+
const n = args[0];
|
|
2712
|
+
if (n in cache) {
|
|
2713
|
+
return cache[n];
|
|
2714
|
+
} else {
|
|
2715
|
+
const result = fn(n);
|
|
2716
|
+
cache[n] = result;
|
|
2717
|
+
return result;
|
|
2718
|
+
}
|
|
2719
|
+
};
|
|
2720
|
+
};
|
|
2721
|
+
var isStringFunction = (inputString) => {
|
|
2722
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2723
|
+
return functionRegex.test(inputString);
|
|
2724
|
+
};
|
|
2725
|
+
}
|
|
2726
|
+
});
|
|
2727
|
+
var require_log2 = __commonJS2({
|
|
2728
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
2729
|
+
"use strict";
|
|
2730
|
+
var __defProp22 = Object.defineProperty;
|
|
2731
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2732
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2733
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2734
|
+
var __export22 = (target, all) => {
|
|
2735
|
+
for (var name in all)
|
|
2736
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2737
|
+
};
|
|
2738
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2739
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2740
|
+
for (let key of __getOwnPropNames22(from))
|
|
2741
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2742
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2692
2743
|
}
|
|
2744
|
+
return to;
|
|
2745
|
+
};
|
|
2746
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2747
|
+
var log_exports = {};
|
|
2748
|
+
__export22(log_exports, {
|
|
2749
|
+
logGroupIf: () => logGroupIf,
|
|
2750
|
+
logIf: () => logIf
|
|
2693
2751
|
});
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2705
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2706
|
-
}
|
|
2707
|
-
return to;
|
|
2708
|
-
};
|
|
2709
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
2710
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2711
|
-
var utils_exports = {};
|
|
2712
|
-
module22.exports = __toCommonJS22(utils_exports);
|
|
2713
|
-
__reExport(utils_exports, require_key2(), module22.exports);
|
|
2714
|
-
__reExport(utils_exports, require_env2(), module22.exports);
|
|
2715
|
-
__reExport(utils_exports, require_types2(), module22.exports);
|
|
2716
|
-
__reExport(utils_exports, require_object2(), module22.exports);
|
|
2717
|
-
__reExport(utils_exports, require_function2(), module22.exports);
|
|
2718
|
-
__reExport(utils_exports, require_array2(), module22.exports);
|
|
2719
|
-
__reExport(utils_exports, require_node2(), module22.exports);
|
|
2720
|
-
__reExport(utils_exports, require_log2(), module22.exports);
|
|
2721
|
-
__reExport(utils_exports, require_string2(), module22.exports);
|
|
2722
|
-
__reExport(utils_exports, require_globals2(), module22.exports);
|
|
2723
|
-
__reExport(utils_exports, require_cookie2(), module22.exports);
|
|
2724
|
-
__reExport(utils_exports, require_tags2(), module22.exports);
|
|
2752
|
+
module2.exports = __toCommonJS22(log_exports);
|
|
2753
|
+
var logIf = (bool, ...arg) => {
|
|
2754
|
+
if (bool)
|
|
2755
|
+
arg.map((v) => console.log(v));
|
|
2756
|
+
};
|
|
2757
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
2758
|
+
if (bool) {
|
|
2759
|
+
console.group(key);
|
|
2760
|
+
arg.map((v) => console.log(v));
|
|
2761
|
+
console.groupEnd(key);
|
|
2725
2762
|
}
|
|
2763
|
+
};
|
|
2764
|
+
}
|
|
2765
|
+
});
|
|
2766
|
+
var require_cookie2 = __commonJS2({
|
|
2767
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
2768
|
+
"use strict";
|
|
2769
|
+
var __defProp22 = Object.defineProperty;
|
|
2770
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2771
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2772
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2773
|
+
var __export22 = (target, all) => {
|
|
2774
|
+
for (var name in all)
|
|
2775
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2776
|
+
};
|
|
2777
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2778
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2779
|
+
for (let key of __getOwnPropNames22(from))
|
|
2780
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2781
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2782
|
+
}
|
|
2783
|
+
return to;
|
|
2784
|
+
};
|
|
2785
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2786
|
+
var cookie_exports = {};
|
|
2787
|
+
__export22(cookie_exports, {
|
|
2788
|
+
getCookie: () => getCookie,
|
|
2789
|
+
isMobile: () => isMobile,
|
|
2790
|
+
setCookie: () => setCookie
|
|
2726
2791
|
});
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
} else {
|
|
2752
|
-
document.exitFullscreen();
|
|
2792
|
+
module2.exports = __toCommonJS22(cookie_exports);
|
|
2793
|
+
var import_types = require_types2();
|
|
2794
|
+
var import_utils32 = require_cjs2();
|
|
2795
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2796
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2797
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2798
|
+
return;
|
|
2799
|
+
const d = /* @__PURE__ */ new Date();
|
|
2800
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2801
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
2802
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2803
|
+
};
|
|
2804
|
+
var getCookie = (cname) => {
|
|
2805
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2806
|
+
return;
|
|
2807
|
+
const name = `${cname}=`;
|
|
2808
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2809
|
+
const ca = decodedCookie.split(";");
|
|
2810
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2811
|
+
let c = ca[i];
|
|
2812
|
+
while (c.charAt(0) === " ")
|
|
2813
|
+
c = c.substring(1);
|
|
2814
|
+
if (c.indexOf(name) === 0)
|
|
2815
|
+
return c.substring(name.length, c.length);
|
|
2753
2816
|
}
|
|
2817
|
+
return "";
|
|
2754
2818
|
};
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2819
|
+
}
|
|
2820
|
+
});
|
|
2821
|
+
var require_tags2 = __commonJS2({
|
|
2822
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
2823
|
+
"use strict";
|
|
2824
|
+
var __defProp22 = Object.defineProperty;
|
|
2825
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2826
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2827
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2828
|
+
var __export22 = (target, all) => {
|
|
2829
|
+
for (var name in all)
|
|
2830
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2760
2831
|
};
|
|
2761
|
-
var
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
if (!timestamp)
|
|
2769
|
-
return "";
|
|
2770
|
-
const d = new Date(timestamp);
|
|
2771
|
-
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
2772
|
-
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
2773
|
-
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
2774
|
-
return `${da} ${mo}, ${ye}`;
|
|
2775
|
-
};
|
|
2776
|
-
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
2777
|
-
const fib = [0, 1];
|
|
2778
|
-
for (let i = 2; i <= n; i++) {
|
|
2779
|
-
fib[i] = fib[i - 1] + fib[i - 2];
|
|
2780
|
-
}
|
|
2781
|
-
return fib[n];
|
|
2782
|
-
};
|
|
2783
|
-
var loadJavascriptFile = (FILE_URL, async = true, doc = document, type = "text/javascript") => {
|
|
2784
|
-
return new Promise((resolve, reject) => {
|
|
2785
|
-
try {
|
|
2786
|
-
const scriptEle = doc.createElement("script");
|
|
2787
|
-
scriptEle.type = type;
|
|
2788
|
-
scriptEle.async = async;
|
|
2789
|
-
scriptEle.src = FILE_URL;
|
|
2790
|
-
scriptEle.addEventListener("load", (ev) => {
|
|
2791
|
-
resolve({
|
|
2792
|
-
status: true
|
|
2793
|
-
});
|
|
2794
|
-
});
|
|
2795
|
-
scriptEle.addEventListener("error", (ev) => {
|
|
2796
|
-
reject({
|
|
2797
|
-
status: false,
|
|
2798
|
-
message: `Failed to load the script ${FILE_URL}`
|
|
2799
|
-
});
|
|
2800
|
-
});
|
|
2801
|
-
doc.body.appendChild(scriptEle);
|
|
2802
|
-
} catch (error) {
|
|
2803
|
-
reject(error);
|
|
2804
|
-
}
|
|
2805
|
-
});
|
|
2832
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2833
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2834
|
+
for (let key of __getOwnPropNames22(from))
|
|
2835
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2836
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2837
|
+
}
|
|
2838
|
+
return to;
|
|
2806
2839
|
};
|
|
2807
|
-
var
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2840
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2841
|
+
var tags_exports = {};
|
|
2842
|
+
__export22(tags_exports, {
|
|
2843
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
2844
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
2845
|
+
});
|
|
2846
|
+
module2.exports = __toCommonJS22(tags_exports);
|
|
2847
|
+
var HTML_TAGS = {
|
|
2848
|
+
root: [
|
|
2849
|
+
"body",
|
|
2850
|
+
"html"
|
|
2851
|
+
],
|
|
2852
|
+
head: [
|
|
2853
|
+
"title",
|
|
2854
|
+
"base",
|
|
2855
|
+
"meta",
|
|
2856
|
+
"style"
|
|
2857
|
+
],
|
|
2858
|
+
body: [
|
|
2859
|
+
"string",
|
|
2860
|
+
"fragment",
|
|
2861
|
+
"a",
|
|
2862
|
+
"abbr",
|
|
2863
|
+
"acronym",
|
|
2864
|
+
"address",
|
|
2865
|
+
"applet",
|
|
2866
|
+
"area",
|
|
2867
|
+
"article",
|
|
2868
|
+
"aside",
|
|
2869
|
+
"audio",
|
|
2870
|
+
"b",
|
|
2871
|
+
"basefont",
|
|
2872
|
+
"bdi",
|
|
2873
|
+
"bdo",
|
|
2874
|
+
"big",
|
|
2875
|
+
"blockquote",
|
|
2876
|
+
"br",
|
|
2877
|
+
"button",
|
|
2878
|
+
"canvas",
|
|
2879
|
+
"caption",
|
|
2880
|
+
"center",
|
|
2881
|
+
"cite",
|
|
2882
|
+
"code",
|
|
2883
|
+
"search",
|
|
2884
|
+
"col",
|
|
2885
|
+
"colgroup",
|
|
2886
|
+
"data",
|
|
2887
|
+
"datalist",
|
|
2888
|
+
"dd",
|
|
2889
|
+
"del",
|
|
2890
|
+
"details",
|
|
2891
|
+
"dfn",
|
|
2892
|
+
"dialog",
|
|
2893
|
+
"dir",
|
|
2894
|
+
"div",
|
|
2895
|
+
"dl",
|
|
2896
|
+
"dt",
|
|
2897
|
+
"em",
|
|
2898
|
+
"embed",
|
|
2899
|
+
"fieldset",
|
|
2900
|
+
"figcaption",
|
|
2901
|
+
"figure",
|
|
2902
|
+
"font",
|
|
2903
|
+
"footer",
|
|
2904
|
+
"form",
|
|
2905
|
+
"frame",
|
|
2906
|
+
"frameset",
|
|
2907
|
+
"h1",
|
|
2908
|
+
"h2",
|
|
2909
|
+
"h3",
|
|
2910
|
+
"h4",
|
|
2911
|
+
"h5",
|
|
2912
|
+
"h6",
|
|
2913
|
+
"head",
|
|
2914
|
+
"header",
|
|
2915
|
+
"hr",
|
|
2916
|
+
"i",
|
|
2917
|
+
"iframe",
|
|
2918
|
+
"img",
|
|
2919
|
+
"input",
|
|
2920
|
+
"ins",
|
|
2921
|
+
"kbd",
|
|
2922
|
+
"label",
|
|
2923
|
+
"legend",
|
|
2924
|
+
"li",
|
|
2925
|
+
"link",
|
|
2926
|
+
"main",
|
|
2927
|
+
"map",
|
|
2928
|
+
"mark",
|
|
2929
|
+
"meter",
|
|
2930
|
+
"nav",
|
|
2931
|
+
"noframes",
|
|
2932
|
+
"noscript",
|
|
2933
|
+
"object",
|
|
2934
|
+
"ol",
|
|
2935
|
+
"optgroup",
|
|
2936
|
+
"option",
|
|
2937
|
+
"output",
|
|
2938
|
+
"p",
|
|
2939
|
+
"param",
|
|
2940
|
+
"picture",
|
|
2941
|
+
"pre",
|
|
2942
|
+
"progress",
|
|
2943
|
+
"hgroup",
|
|
2944
|
+
"q",
|
|
2945
|
+
"rp",
|
|
2946
|
+
"rt",
|
|
2947
|
+
"ruby",
|
|
2948
|
+
"s",
|
|
2949
|
+
"samp",
|
|
2950
|
+
"script",
|
|
2951
|
+
"section",
|
|
2952
|
+
"select",
|
|
2953
|
+
"small",
|
|
2954
|
+
"source",
|
|
2955
|
+
"span",
|
|
2956
|
+
"strike",
|
|
2957
|
+
"strong",
|
|
2958
|
+
"sub",
|
|
2959
|
+
"summary",
|
|
2960
|
+
"sup",
|
|
2961
|
+
"table",
|
|
2962
|
+
"tbody",
|
|
2963
|
+
"td",
|
|
2964
|
+
"template",
|
|
2965
|
+
"hgroup",
|
|
2966
|
+
"textarea",
|
|
2967
|
+
"tfoot",
|
|
2968
|
+
"th",
|
|
2969
|
+
"thead",
|
|
2970
|
+
"time",
|
|
2971
|
+
"tr",
|
|
2972
|
+
"track",
|
|
2973
|
+
"tt",
|
|
2974
|
+
"u",
|
|
2975
|
+
"ul",
|
|
2976
|
+
"var",
|
|
2977
|
+
"video",
|
|
2978
|
+
"wbr",
|
|
2979
|
+
// SVG
|
|
2980
|
+
"svg",
|
|
2981
|
+
"path"
|
|
2982
|
+
]
|
|
2858
2983
|
};
|
|
2984
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
2859
2985
|
}
|
|
2860
2986
|
});
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2987
|
+
var require_cjs2 = __commonJS2({
|
|
2988
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
2989
|
+
"use strict";
|
|
2990
|
+
var __defProp22 = Object.defineProperty;
|
|
2991
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2992
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2993
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2994
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2995
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2996
|
+
for (let key of __getOwnPropNames22(from))
|
|
2997
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2998
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2999
|
+
}
|
|
3000
|
+
return to;
|
|
3001
|
+
};
|
|
3002
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3003
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3004
|
+
var utils_exports = {};
|
|
3005
|
+
module2.exports = __toCommonJS22(utils_exports);
|
|
3006
|
+
__reExport(utils_exports, require_key2(), module2.exports);
|
|
3007
|
+
__reExport(utils_exports, require_env2(), module2.exports);
|
|
3008
|
+
__reExport(utils_exports, require_types2(), module2.exports);
|
|
3009
|
+
__reExport(utils_exports, require_object2(), module2.exports);
|
|
3010
|
+
__reExport(utils_exports, require_function2(), module2.exports);
|
|
3011
|
+
__reExport(utils_exports, require_array2(), module2.exports);
|
|
3012
|
+
__reExport(utils_exports, require_node2(), module2.exports);
|
|
3013
|
+
__reExport(utils_exports, require_log2(), module2.exports);
|
|
3014
|
+
__reExport(utils_exports, require_string2(), module2.exports);
|
|
3015
|
+
__reExport(utils_exports, require_globals2(), module2.exports);
|
|
3016
|
+
__reExport(utils_exports, require_cookie2(), module2.exports);
|
|
3017
|
+
__reExport(utils_exports, require_tags2(), module2.exports);
|
|
3018
|
+
}
|
|
2876
3019
|
});
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
3020
|
+
var src_exports = {};
|
|
3021
|
+
__export2(src_exports, {
|
|
3022
|
+
arrayzeValue: () => arrayzeValue,
|
|
3023
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
3024
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3025
|
+
findClosestNumber: () => findClosestNumber,
|
|
3026
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3027
|
+
formatDate: () => formatDate,
|
|
3028
|
+
isPhoto: () => isPhoto,
|
|
3029
|
+
loadCssFile: () => loadCssFile,
|
|
3030
|
+
loadJavascript: () => loadJavascript,
|
|
3031
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
3032
|
+
removeChars: () => removeChars,
|
|
3033
|
+
toCamelCase: () => toCamelCase,
|
|
3034
|
+
toDashCase: () => toDashCase,
|
|
3035
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3036
|
+
toTitleCase: () => toTitleCase,
|
|
3037
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3038
|
+
});
|
|
3039
|
+
module.exports = __toCommonJS2(src_exports);
|
|
3040
|
+
var import_utils2 = __toESM2(require_cjs2(), 1);
|
|
3041
|
+
var toggleFullscreen = (el) => {
|
|
3042
|
+
if (!document.fullscreenElement) {
|
|
3043
|
+
el.node.requestFullscreen().catch((err) => {
|
|
3044
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3045
|
+
});
|
|
3046
|
+
} else {
|
|
3047
|
+
document.exitFullscreen();
|
|
3048
|
+
}
|
|
3049
|
+
};
|
|
3050
|
+
var import_utils = __toESM2(require_cjs2(), 1);
|
|
3051
|
+
var findClosestNumber = (number, arr) => {
|
|
3052
|
+
return ((0, import_utils.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3053
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3054
|
+
});
|
|
3055
|
+
};
|
|
3056
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3057
|
+
val = parseFloat(val);
|
|
3058
|
+
if ((0, import_utils.isObject)(factory))
|
|
3059
|
+
factory = Object.values(factory);
|
|
3060
|
+
return findClosestNumber(val, factory);
|
|
3061
|
+
};
|
|
3062
|
+
var formatDate = (timestamp) => {
|
|
3063
|
+
if (!timestamp)
|
|
3064
|
+
return "";
|
|
3065
|
+
const d = new Date(timestamp);
|
|
3066
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3067
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3068
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3069
|
+
return `${da} ${mo}, ${ye}`;
|
|
3070
|
+
};
|
|
3071
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3072
|
+
const fib = [0, 1];
|
|
3073
|
+
for (let i = 2; i <= n; i++) {
|
|
3074
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3075
|
+
}
|
|
3076
|
+
return fib[n];
|
|
3077
|
+
};
|
|
3078
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3079
|
+
return new Promise((resolve, reject) => {
|
|
3080
|
+
try {
|
|
3081
|
+
const scriptEle = doc.createElement("script");
|
|
3082
|
+
scriptEle.type = type;
|
|
3083
|
+
scriptEle.async = async;
|
|
3084
|
+
scriptEle.src = FILE_URL;
|
|
3085
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
3086
|
+
resolve({
|
|
3087
|
+
status: true
|
|
3088
|
+
});
|
|
3089
|
+
});
|
|
3090
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
3091
|
+
reject({
|
|
3092
|
+
status: false,
|
|
3093
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
3094
|
+
});
|
|
3095
|
+
});
|
|
3096
|
+
doc.body.appendChild(scriptEle);
|
|
3097
|
+
} catch (error) {
|
|
3098
|
+
reject(error);
|
|
3099
|
+
}
|
|
3100
|
+
});
|
|
3101
|
+
};
|
|
3102
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3103
|
+
return new Promise((resolve, reject) => {
|
|
3104
|
+
try {
|
|
3105
|
+
const linkElem = doc.createElement("link");
|
|
3106
|
+
linkElem.rel = "stylesheet";
|
|
3107
|
+
linkElem.href = FILE_URL;
|
|
3108
|
+
linkElem.addEventListener("load", (ev) => {
|
|
3109
|
+
resolve({
|
|
3110
|
+
status: true
|
|
3111
|
+
});
|
|
3112
|
+
});
|
|
3113
|
+
doc.head.appendChild(linkElem);
|
|
3114
|
+
} catch (error) {
|
|
3115
|
+
reject(error);
|
|
3116
|
+
}
|
|
3117
|
+
});
|
|
3118
|
+
};
|
|
3119
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3120
|
+
try {
|
|
3121
|
+
const scriptEle = doc.createElement("script");
|
|
3122
|
+
scriptEle.type = type;
|
|
3123
|
+
scriptEle.async = async;
|
|
3124
|
+
scriptEle.id = id;
|
|
3125
|
+
scriptEle.innerHTML = body;
|
|
3126
|
+
doc.body.appendChild(scriptEle);
|
|
3127
|
+
} catch (error) {
|
|
3128
|
+
console.warn(error);
|
|
3129
|
+
}
|
|
3130
|
+
};
|
|
3131
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3132
|
+
var copyStringToClipboard = (str) => {
|
|
3133
|
+
const el = document.createElement("textarea");
|
|
3134
|
+
el.value = str;
|
|
3135
|
+
el.setAttribute("readonly", "");
|
|
3136
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
3137
|
+
document.body.appendChild(el);
|
|
3138
|
+
el.select();
|
|
3139
|
+
document.execCommand("copy");
|
|
3140
|
+
document.body.removeChild(el);
|
|
3141
|
+
};
|
|
3142
|
+
var removeChars = (str) => {
|
|
3143
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3144
|
+
};
|
|
3145
|
+
var toCamelCase = (str) => {
|
|
3146
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3147
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3148
|
+
}).replaceAll(/\s+/g, "");
|
|
3149
|
+
};
|
|
3150
|
+
var toTitleCase = (str) => str && str.replace(
|
|
3151
|
+
/\w\S*/g,
|
|
3152
|
+
(txt) => {
|
|
3153
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3154
|
+
}
|
|
3155
|
+
);
|
|
3156
|
+
var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3157
|
+
var toDescriptionCase = (str = "") => {
|
|
3158
|
+
if (typeof str !== "string")
|
|
3159
|
+
return;
|
|
3160
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
3161
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3162
|
+
};
|
|
3163
|
+
var arrayzeValue = (val) => {
|
|
3164
|
+
if ((0, import_utils2.isArray)(val))
|
|
3165
|
+
return val;
|
|
3166
|
+
if ((0, import_utils2.isString)(val))
|
|
3167
|
+
return val.split(" ");
|
|
3168
|
+
if ((0, import_utils2.isObject)(val))
|
|
3169
|
+
return Object.values(val);
|
|
3170
|
+
if ((0, import_utils2.isNumber)(val))
|
|
3171
|
+
return [val];
|
|
3172
|
+
};
|
|
2880
3173
|
|
|
2881
3174
|
// src/factory.js
|
|
2882
|
-
var
|
|
3175
|
+
var import_utils3 = __toESM(require_cjs(), 1);
|
|
2883
3176
|
|
|
2884
3177
|
// src/defaultConfig/index.js
|
|
2885
3178
|
var defaultConfig_exports = {};
|
|
@@ -3086,7 +3379,7 @@ var CONFIG = {
|
|
|
3086
3379
|
CSS_VARS,
|
|
3087
3380
|
...defaultConfig_exports
|
|
3088
3381
|
};
|
|
3089
|
-
var cachedConfig = (0,
|
|
3382
|
+
var cachedConfig = (0, import_utils3.deepClone)(CONFIG);
|
|
3090
3383
|
var FACTORY = {
|
|
3091
3384
|
active: "0",
|
|
3092
3385
|
0: CONFIG
|
|
@@ -3242,9 +3535,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3242
3535
|
unit = UNIT2.default,
|
|
3243
3536
|
useVariable
|
|
3244
3537
|
} = sequenceProps;
|
|
3245
|
-
if ((0,
|
|
3538
|
+
if ((0, import_utils4.isString)(value) && value.slice(0, 2) === "--")
|
|
3246
3539
|
return `var(${value})`;
|
|
3247
|
-
const prefix = `--${(0
|
|
3540
|
+
const prefix = `--${(void 0)(sequenceProps.type.replace(".", "-"))}-`;
|
|
3248
3541
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
3249
3542
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
3250
3543
|
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
|