@symbo.ls/scratch 2.11.410 → 2.11.429
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 +18 -4
- package/dist/cjs/index.js +2297 -2248
- package/dist/cjs/set.js +2234 -2187
- package/dist/cjs/system/color.js +2145 -2101
- package/dist/cjs/system/document.js +2072 -2028
- package/dist/cjs/system/font.js +1846 -1801
- package/dist/cjs/system/index.js +2277 -2230
- package/dist/cjs/system/reset.js +2057 -2013
- package/dist/cjs/system/shadow.js +2154 -2109
- package/dist/cjs/system/spacing.js +1907 -1862
- package/dist/cjs/system/svg.js +1837 -1793
- package/dist/cjs/system/theme.js +2153 -2109
- package/dist/cjs/system/timing.js +1908 -1861
- package/dist/cjs/system/typography.js +2065 -2021
- package/dist/cjs/transforms/index.js +2176 -2129
- package/dist/cjs/utils/color.js +18 -4
- package/dist/cjs/utils/index.js +2082 -2036
- package/dist/cjs/utils/sequence.js +1820 -1774
- package/dist/cjs/utils/sprite.js +18 -4
- package/dist/cjs/utils/var.js +2033 -1989
- package/package.json +2 -2
- package/src/utils/sequence.js +2 -1
package/dist/cjs/system/theme.js
CHANGED
|
@@ -34,29 +34,29 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
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 __defProp2 = Object.defineProperty;
|
|
38
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
39
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
40
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
41
|
+
var __export2 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
|
-
var
|
|
45
|
+
var __copyProps2 = (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 __getOwnPropNames2(from))
|
|
48
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
49
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var
|
|
53
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var key_exports = {};
|
|
55
|
-
|
|
55
|
+
__export2(key_exports, {
|
|
56
56
|
createSnapshotId: () => createSnapshotId,
|
|
57
57
|
generateKey: () => generateKey
|
|
58
58
|
});
|
|
59
|
-
module2.exports =
|
|
59
|
+
module2.exports = __toCommonJS2(key_exports);
|
|
60
60
|
var generateKey = /* @__PURE__ */ function() {
|
|
61
61
|
let index = 0;
|
|
62
62
|
function newId() {
|
|
@@ -73,32 +73,32 @@ var require_key = __commonJS({
|
|
|
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 __defProp2 = Object.defineProperty;
|
|
77
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
78
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
79
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
80
|
+
var __export2 = (target, all) => {
|
|
81
81
|
for (var name in all)
|
|
82
|
-
|
|
82
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
83
83
|
};
|
|
84
|
-
var
|
|
84
|
+
var __copyProps2 = (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 __getOwnPropNames2(from))
|
|
87
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
88
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
89
89
|
}
|
|
90
90
|
return to;
|
|
91
91
|
};
|
|
92
|
-
var
|
|
92
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
93
93
|
var env_exports = {};
|
|
94
|
-
|
|
94
|
+
__export2(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 = __toCommonJS2(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";
|
|
@@ -111,35 +111,35 @@ var require_env = __commonJS({
|
|
|
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 __defProp2 = Object.defineProperty;
|
|
115
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
116
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
117
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118
|
+
var __export2 = (target, all) => {
|
|
119
119
|
for (var name in all)
|
|
120
|
-
|
|
120
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
121
121
|
};
|
|
122
|
-
var
|
|
122
|
+
var __copyProps2 = (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 __getOwnPropNames2(from))
|
|
125
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
126
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
127
127
|
}
|
|
128
128
|
return to;
|
|
129
129
|
};
|
|
130
|
-
var
|
|
130
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
131
131
|
var globals_exports = {};
|
|
132
|
-
|
|
132
|
+
__export2(globals_exports, {
|
|
133
133
|
document: () => document3,
|
|
134
134
|
global: () => global,
|
|
135
135
|
self: () => self,
|
|
136
|
-
window: () =>
|
|
136
|
+
window: () => window3
|
|
137
137
|
});
|
|
138
|
-
module2.exports =
|
|
138
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
139
139
|
var global = globalThis;
|
|
140
140
|
var self = globalThis;
|
|
141
|
-
var
|
|
142
|
-
var document3 =
|
|
141
|
+
var window3 = globalThis;
|
|
142
|
+
var document3 = window3.document;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
@@ -147,29 +147,29 @@ var require_globals = __commonJS({
|
|
|
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 __defProp2 = Object.defineProperty;
|
|
151
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
152
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
153
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __export2 = (target, all) => {
|
|
155
155
|
for (var name in all)
|
|
156
|
-
|
|
156
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
157
157
|
};
|
|
158
|
-
var
|
|
158
|
+
var __copyProps2 = (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 __getOwnPropNames2(from))
|
|
161
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
162
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
163
163
|
}
|
|
164
164
|
return to;
|
|
165
165
|
};
|
|
166
|
-
var
|
|
166
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
167
167
|
var node_exports = {};
|
|
168
|
-
|
|
168
|
+
__export2(node_exports, {
|
|
169
169
|
isHtmlElement: () => isHtmlElement,
|
|
170
170
|
isNode: () => isNode
|
|
171
171
|
});
|
|
172
|
-
module2.exports =
|
|
172
|
+
module2.exports = __toCommonJS2(node_exports);
|
|
173
173
|
var import_globals2 = require_globals();
|
|
174
174
|
var isNode = (obj) => {
|
|
175
175
|
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -184,25 +184,25 @@ var require_node = __commonJS({
|
|
|
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 __defProp2 = Object.defineProperty;
|
|
188
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
189
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
190
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
191
|
+
var __export2 = (target, all) => {
|
|
192
192
|
for (var name in all)
|
|
193
|
-
|
|
193
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
194
194
|
};
|
|
195
|
-
var
|
|
195
|
+
var __copyProps2 = (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 __getOwnPropNames2(from))
|
|
198
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
199
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
200
200
|
}
|
|
201
201
|
return to;
|
|
202
202
|
};
|
|
203
|
-
var
|
|
203
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
204
204
|
var types_exports = {};
|
|
205
|
-
|
|
205
|
+
__export2(types_exports, {
|
|
206
206
|
TYPES: () => TYPES,
|
|
207
207
|
is: () => is,
|
|
208
208
|
isArray: () => isArray4,
|
|
@@ -218,7 +218,7 @@ var require_types = __commonJS({
|
|
|
218
218
|
isString: () => isString6,
|
|
219
219
|
isUndefined: () => isUndefined
|
|
220
220
|
});
|
|
221
|
-
module2.exports =
|
|
221
|
+
module2.exports = __toCommonJS2(types_exports);
|
|
222
222
|
var import_node = require_node();
|
|
223
223
|
var isObject4 = (arg) => {
|
|
224
224
|
if (arg === null)
|
|
@@ -274,25 +274,25 @@ var require_types = __commonJS({
|
|
|
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 __defProp2 = Object.defineProperty;
|
|
278
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
279
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
280
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
281
|
+
var __export2 = (target, all) => {
|
|
282
282
|
for (var name in all)
|
|
283
|
-
|
|
283
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
284
284
|
};
|
|
285
|
-
var
|
|
285
|
+
var __copyProps2 = (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 __getOwnPropNames2(from))
|
|
288
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
289
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
290
290
|
}
|
|
291
291
|
return to;
|
|
292
292
|
};
|
|
293
|
-
var
|
|
293
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
294
294
|
var array_exports = {};
|
|
295
|
-
|
|
295
|
+
__export2(array_exports, {
|
|
296
296
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
297
297
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
298
298
|
arraysEqual: () => arraysEqual,
|
|
@@ -309,7 +309,7 @@ var require_array = __commonJS({
|
|
|
309
309
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
310
310
|
swapItemsInArray: () => swapItemsInArray
|
|
311
311
|
});
|
|
312
|
-
module2.exports =
|
|
312
|
+
module2.exports = __toCommonJS2(array_exports);
|
|
313
313
|
var import_object = require_object();
|
|
314
314
|
var import_types = require_types();
|
|
315
315
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -342,10 +342,10 @@ var require_array = __commonJS({
|
|
|
342
342
|
return [].concat(...arrays);
|
|
343
343
|
};
|
|
344
344
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
345
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
345
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
346
346
|
};
|
|
347
347
|
var mergeAndCloneIfArray = (obj) => {
|
|
348
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
348
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
349
349
|
};
|
|
350
350
|
var cutArrayBeforeValue = (arr, value) => {
|
|
351
351
|
const index = arr.indexOf(value);
|
|
@@ -430,27 +430,29 @@ var require_array = __commonJS({
|
|
|
430
430
|
var require_string = __commonJS({
|
|
431
431
|
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
432
432
|
"use strict";
|
|
433
|
-
var
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
433
|
+
var __defProp2 = Object.defineProperty;
|
|
434
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
435
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
436
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
437
|
+
var __export2 = (target, all) => {
|
|
438
438
|
for (var name in all)
|
|
439
|
-
|
|
439
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
440
440
|
};
|
|
441
|
-
var
|
|
441
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
442
442
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
443
|
-
for (let key of
|
|
444
|
-
if (!
|
|
445
|
-
|
|
443
|
+
for (let key of __getOwnPropNames2(from))
|
|
444
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
445
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
446
446
|
}
|
|
447
447
|
return to;
|
|
448
448
|
};
|
|
449
|
-
var
|
|
449
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
450
450
|
var string_exports = {};
|
|
451
|
-
|
|
451
|
+
__export2(string_exports, {
|
|
452
452
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
453
453
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
454
|
+
decodeNewlines: () => decodeNewlines,
|
|
455
|
+
encodeNewlines: () => encodeNewlines,
|
|
454
456
|
findKeyPosition: () => findKeyPosition,
|
|
455
457
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
456
458
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -458,7 +460,7 @@ var require_string = __commonJS({
|
|
|
458
460
|
stringIncludesAny: () => stringIncludesAny,
|
|
459
461
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
460
462
|
});
|
|
461
|
-
module2.exports =
|
|
463
|
+
module2.exports = __toCommonJS2(string_exports);
|
|
462
464
|
var stringIncludesAny = (str, characters) => {
|
|
463
465
|
for (const char of characters) {
|
|
464
466
|
if (str.includes(char)) {
|
|
@@ -554,6 +556,12 @@ var require_string = __commonJS({
|
|
|
554
556
|
return char;
|
|
555
557
|
});
|
|
556
558
|
};
|
|
559
|
+
var encodeNewlines = (str) => {
|
|
560
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
561
|
+
};
|
|
562
|
+
var decodeNewlines = (encodedStr) => {
|
|
563
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
564
|
+
};
|
|
557
565
|
var customEncodeURIComponent = (str) => {
|
|
558
566
|
return str.split("").map((char) => {
|
|
559
567
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -572,25 +580,25 @@ var require_string = __commonJS({
|
|
|
572
580
|
var require_object = __commonJS({
|
|
573
581
|
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
574
582
|
"use strict";
|
|
575
|
-
var
|
|
576
|
-
var
|
|
577
|
-
var
|
|
578
|
-
var
|
|
579
|
-
var
|
|
583
|
+
var __defProp2 = Object.defineProperty;
|
|
584
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
585
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
586
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
587
|
+
var __export2 = (target, all) => {
|
|
580
588
|
for (var name in all)
|
|
581
|
-
|
|
589
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
582
590
|
};
|
|
583
|
-
var
|
|
591
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
584
592
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
585
|
-
for (let key of
|
|
586
|
-
if (!
|
|
587
|
-
|
|
593
|
+
for (let key of __getOwnPropNames2(from))
|
|
594
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
595
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
588
596
|
}
|
|
589
597
|
return to;
|
|
590
598
|
};
|
|
591
|
-
var
|
|
599
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
592
600
|
var object_exports = {};
|
|
593
|
-
|
|
601
|
+
__export2(object_exports, {
|
|
594
602
|
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
595
603
|
clone: () => clone,
|
|
596
604
|
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
@@ -626,7 +634,7 @@ var require_object = __commonJS({
|
|
|
626
634
|
removeFromObject: () => removeFromObject,
|
|
627
635
|
stringToObject: () => stringToObject
|
|
628
636
|
});
|
|
629
|
-
module2.exports =
|
|
637
|
+
module2.exports = __toCommonJS2(object_exports);
|
|
630
638
|
var import_globals2 = require_globals();
|
|
631
639
|
var import_types = require_types();
|
|
632
640
|
var import_array = require_array();
|
|
@@ -732,7 +740,7 @@ var require_object = __commonJS({
|
|
|
732
740
|
return o;
|
|
733
741
|
};
|
|
734
742
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
743
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
744
|
for (const prop in obj) {
|
|
737
745
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
746
|
continue;
|
|
@@ -986,7 +994,7 @@ var require_object = __commonJS({
|
|
|
986
994
|
};
|
|
987
995
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
988
996
|
for (const e in params) {
|
|
989
|
-
if (e === "
|
|
997
|
+
if (e === "__ref")
|
|
990
998
|
continue;
|
|
991
999
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
992
1000
|
continue;
|
|
@@ -1108,6 +1116,12 @@ var require_object = __commonJS({
|
|
|
1108
1116
|
if (foundString || foundInArray)
|
|
1109
1117
|
return el;
|
|
1110
1118
|
}
|
|
1119
|
+
if (el.parent && el.parent.childExtend) {
|
|
1120
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1121
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1122
|
+
if (foundString || foundInArray)
|
|
1123
|
+
return el;
|
|
1124
|
+
}
|
|
1111
1125
|
};
|
|
1112
1126
|
var getExtendsInElement = (obj) => {
|
|
1113
1127
|
let result = [];
|
|
@@ -1140,31 +1154,31 @@ var require_object = __commonJS({
|
|
|
1140
1154
|
var require_function = __commonJS({
|
|
1141
1155
|
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
1142
1156
|
"use strict";
|
|
1143
|
-
var
|
|
1144
|
-
var
|
|
1145
|
-
var
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1157
|
+
var __defProp2 = Object.defineProperty;
|
|
1158
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1159
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1160
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1161
|
+
var __export2 = (target, all) => {
|
|
1148
1162
|
for (var name in all)
|
|
1149
|
-
|
|
1163
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1150
1164
|
};
|
|
1151
|
-
var
|
|
1165
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1152
1166
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1153
|
-
for (let key of
|
|
1154
|
-
if (!
|
|
1155
|
-
|
|
1167
|
+
for (let key of __getOwnPropNames2(from))
|
|
1168
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1169
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1156
1170
|
}
|
|
1157
1171
|
return to;
|
|
1158
1172
|
};
|
|
1159
|
-
var
|
|
1173
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1160
1174
|
var function_exports = {};
|
|
1161
|
-
|
|
1175
|
+
__export2(function_exports, {
|
|
1162
1176
|
debounce: () => debounce,
|
|
1163
1177
|
debounceOnContext: () => debounceOnContext,
|
|
1164
1178
|
isStringFunction: () => isStringFunction,
|
|
1165
1179
|
memoize: () => memoize
|
|
1166
1180
|
});
|
|
1167
|
-
module2.exports =
|
|
1181
|
+
module2.exports = __toCommonJS2(function_exports);
|
|
1168
1182
|
function debounce(func, wait, immediate) {
|
|
1169
1183
|
let timeout;
|
|
1170
1184
|
return function() {
|
|
@@ -1215,29 +1229,29 @@ var require_function = __commonJS({
|
|
|
1215
1229
|
var require_log = __commonJS({
|
|
1216
1230
|
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1217
1231
|
"use strict";
|
|
1218
|
-
var
|
|
1219
|
-
var
|
|
1220
|
-
var
|
|
1221
|
-
var
|
|
1222
|
-
var
|
|
1232
|
+
var __defProp2 = Object.defineProperty;
|
|
1233
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1234
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1235
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1236
|
+
var __export2 = (target, all) => {
|
|
1223
1237
|
for (var name in all)
|
|
1224
|
-
|
|
1238
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1225
1239
|
};
|
|
1226
|
-
var
|
|
1240
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1227
1241
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1228
|
-
for (let key of
|
|
1229
|
-
if (!
|
|
1230
|
-
|
|
1242
|
+
for (let key of __getOwnPropNames2(from))
|
|
1243
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1244
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1231
1245
|
}
|
|
1232
1246
|
return to;
|
|
1233
1247
|
};
|
|
1234
|
-
var
|
|
1248
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1235
1249
|
var log_exports = {};
|
|
1236
|
-
|
|
1250
|
+
__export2(log_exports, {
|
|
1237
1251
|
logGroupIf: () => logGroupIf,
|
|
1238
1252
|
logIf: () => logIf
|
|
1239
1253
|
});
|
|
1240
|
-
module2.exports =
|
|
1254
|
+
module2.exports = __toCommonJS2(log_exports);
|
|
1241
1255
|
var logIf = (bool, ...arg) => {
|
|
1242
1256
|
if (bool)
|
|
1243
1257
|
arg.map((v) => console.log(v));
|
|
@@ -1256,46 +1270,46 @@ var require_log = __commonJS({
|
|
|
1256
1270
|
var require_cookie = __commonJS({
|
|
1257
1271
|
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1258
1272
|
"use strict";
|
|
1259
|
-
var
|
|
1260
|
-
var
|
|
1261
|
-
var
|
|
1262
|
-
var
|
|
1263
|
-
var
|
|
1273
|
+
var __defProp2 = Object.defineProperty;
|
|
1274
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1275
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1276
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1277
|
+
var __export2 = (target, all) => {
|
|
1264
1278
|
for (var name in all)
|
|
1265
|
-
|
|
1279
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1266
1280
|
};
|
|
1267
|
-
var
|
|
1281
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1268
1282
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1269
|
-
for (let key of
|
|
1270
|
-
if (!
|
|
1271
|
-
|
|
1283
|
+
for (let key of __getOwnPropNames2(from))
|
|
1284
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1285
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1272
1286
|
}
|
|
1273
1287
|
return to;
|
|
1274
1288
|
};
|
|
1275
|
-
var
|
|
1289
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1276
1290
|
var cookie_exports = {};
|
|
1277
|
-
|
|
1291
|
+
__export2(cookie_exports, {
|
|
1278
1292
|
getCookie: () => getCookie,
|
|
1279
1293
|
isMobile: () => isMobile,
|
|
1280
1294
|
setCookie: () => setCookie
|
|
1281
1295
|
});
|
|
1282
|
-
module2.exports =
|
|
1296
|
+
module2.exports = __toCommonJS2(cookie_exports);
|
|
1283
1297
|
var import_types = require_types();
|
|
1284
|
-
var
|
|
1298
|
+
var import_utils10 = require_cjs();
|
|
1285
1299
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1286
1300
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1287
|
-
if ((0, import_types.isUndefined)(
|
|
1301
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1288
1302
|
return;
|
|
1289
1303
|
const d = /* @__PURE__ */ new Date();
|
|
1290
1304
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1291
1305
|
const expires = `expires=${d.toUTCString()}`;
|
|
1292
|
-
|
|
1306
|
+
import_utils10.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1293
1307
|
};
|
|
1294
1308
|
var getCookie = (cname) => {
|
|
1295
|
-
if ((0, import_types.isUndefined)(
|
|
1309
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1296
1310
|
return;
|
|
1297
1311
|
const name = `${cname}=`;
|
|
1298
|
-
const decodedCookie = decodeURIComponent(
|
|
1312
|
+
const decodedCookie = decodeURIComponent(import_utils10.document.cookie);
|
|
1299
1313
|
const ca = decodedCookie.split(";");
|
|
1300
1314
|
for (let i = 0; i < ca.length; i++) {
|
|
1301
1315
|
let c = ca[i];
|
|
@@ -1313,29 +1327,29 @@ var require_cookie = __commonJS({
|
|
|
1313
1327
|
var require_tags = __commonJS({
|
|
1314
1328
|
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1315
1329
|
"use strict";
|
|
1316
|
-
var
|
|
1317
|
-
var
|
|
1318
|
-
var
|
|
1319
|
-
var
|
|
1320
|
-
var
|
|
1330
|
+
var __defProp2 = Object.defineProperty;
|
|
1331
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1332
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1333
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1334
|
+
var __export2 = (target, all) => {
|
|
1321
1335
|
for (var name in all)
|
|
1322
|
-
|
|
1336
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1323
1337
|
};
|
|
1324
|
-
var
|
|
1338
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1325
1339
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1326
|
-
for (let key of
|
|
1327
|
-
if (!
|
|
1328
|
-
|
|
1340
|
+
for (let key of __getOwnPropNames2(from))
|
|
1341
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1342
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1329
1343
|
}
|
|
1330
1344
|
return to;
|
|
1331
1345
|
};
|
|
1332
|
-
var
|
|
1346
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1333
1347
|
var tags_exports = {};
|
|
1334
|
-
|
|
1348
|
+
__export2(tags_exports, {
|
|
1335
1349
|
HTML_TAGS: () => HTML_TAGS,
|
|
1336
1350
|
isValidHtmlTag: () => isValidHtmlTag
|
|
1337
1351
|
});
|
|
1338
|
-
module2.exports =
|
|
1352
|
+
module2.exports = __toCommonJS2(tags_exports);
|
|
1339
1353
|
var HTML_TAGS = {
|
|
1340
1354
|
root: [
|
|
1341
1355
|
"body",
|
|
@@ -1481,22 +1495,22 @@ var require_tags = __commonJS({
|
|
|
1481
1495
|
var require_cjs = __commonJS({
|
|
1482
1496
|
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1483
1497
|
"use strict";
|
|
1484
|
-
var
|
|
1485
|
-
var
|
|
1486
|
-
var
|
|
1487
|
-
var
|
|
1488
|
-
var
|
|
1498
|
+
var __defProp2 = Object.defineProperty;
|
|
1499
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1500
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1501
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1502
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1489
1503
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1490
|
-
for (let key of
|
|
1491
|
-
if (!
|
|
1492
|
-
|
|
1504
|
+
for (let key of __getOwnPropNames2(from))
|
|
1505
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1506
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1493
1507
|
}
|
|
1494
1508
|
return to;
|
|
1495
1509
|
};
|
|
1496
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
1497
|
-
var
|
|
1510
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
1511
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1498
1512
|
var utils_exports = {};
|
|
1499
|
-
module2.exports =
|
|
1513
|
+
module2.exports = __toCommonJS2(utils_exports);
|
|
1500
1514
|
__reExport(utils_exports, require_key(), module2.exports);
|
|
1501
1515
|
__reExport(utils_exports, require_env(), module2.exports);
|
|
1502
1516
|
__reExport(utils_exports, require_types(), module2.exports);
|
|
@@ -1516,2024 +1530,2054 @@ var require_cjs = __commonJS({
|
|
|
1516
1530
|
var require_cjs2 = __commonJS({
|
|
1517
1531
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
1518
1532
|
"use strict";
|
|
1519
|
-
var
|
|
1520
|
-
var
|
|
1521
|
-
var
|
|
1522
|
-
var
|
|
1523
|
-
var
|
|
1533
|
+
var __defProp2 = Object.defineProperty;
|
|
1534
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1535
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1536
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1537
|
+
var __export2 = (target, all) => {
|
|
1524
1538
|
for (var name in all)
|
|
1525
|
-
|
|
1539
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1526
1540
|
};
|
|
1527
|
-
var
|
|
1541
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1528
1542
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1529
|
-
for (let key of
|
|
1530
|
-
if (!
|
|
1531
|
-
|
|
1543
|
+
for (let key of __getOwnPropNames2(from))
|
|
1544
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1545
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1532
1546
|
}
|
|
1533
1547
|
return to;
|
|
1534
1548
|
};
|
|
1535
|
-
var
|
|
1549
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1536
1550
|
var globals_exports = {};
|
|
1537
|
-
|
|
1551
|
+
__export2(globals_exports, {
|
|
1538
1552
|
document: () => document3,
|
|
1539
1553
|
global: () => global,
|
|
1540
1554
|
self: () => self,
|
|
1541
|
-
window: () =>
|
|
1555
|
+
window: () => window3
|
|
1542
1556
|
});
|
|
1543
|
-
module2.exports =
|
|
1557
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
1544
1558
|
var global = globalThis;
|
|
1545
1559
|
var self = globalThis;
|
|
1546
|
-
var
|
|
1547
|
-
var document3 =
|
|
1560
|
+
var window3 = globalThis;
|
|
1561
|
+
var document3 = window3.document;
|
|
1548
1562
|
}
|
|
1549
1563
|
});
|
|
1550
1564
|
|
|
1551
|
-
// src/system/theme.js
|
|
1552
|
-
var theme_exports = {};
|
|
1553
|
-
__export(theme_exports, {
|
|
1554
|
-
getMediaTheme: () => getMediaTheme,
|
|
1555
|
-
getTheme: () => getTheme,
|
|
1556
|
-
setMediaTheme: () => setMediaTheme,
|
|
1557
|
-
setTheme: () => setTheme
|
|
1558
|
-
});
|
|
1559
|
-
module.exports = __toCommonJS(theme_exports);
|
|
1560
|
-
|
|
1561
|
-
// src/system/color.js
|
|
1562
|
-
var import_utils8 = __toESM(require_cjs(), 1);
|
|
1563
|
-
|
|
1564
|
-
// src/factory.js
|
|
1565
|
-
var import_utils = __toESM(require_cjs(), 1);
|
|
1566
|
-
|
|
1567
|
-
// src/defaultConfig/index.js
|
|
1568
|
-
var defaultConfig_exports = {};
|
|
1569
|
-
__export(defaultConfig_exports, {
|
|
1570
|
-
ANIMATION: () => ANIMATION,
|
|
1571
|
-
BREAKPOINTS: () => BREAKPOINTS,
|
|
1572
|
-
CASES: () => CASES,
|
|
1573
|
-
COLOR: () => COLOR,
|
|
1574
|
-
DEVICES: () => DEVICES,
|
|
1575
|
-
DOCUMENT: () => DOCUMENT,
|
|
1576
|
-
FONT: () => FONT,
|
|
1577
|
-
FONT_FACE: () => FONT_FACE,
|
|
1578
|
-
FONT_FAMILY: () => FONT_FAMILY,
|
|
1579
|
-
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
1580
|
-
GRADIENT: () => GRADIENT,
|
|
1581
|
-
GRID: () => GRID,
|
|
1582
|
-
ICONS: () => ICONS,
|
|
1583
|
-
MEDIA: () => MEDIA,
|
|
1584
|
-
RESET: () => RESET,
|
|
1585
|
-
SEMANTIC_ICONS: () => SEMANTIC_ICONS,
|
|
1586
|
-
SEQUENCE: () => SEQUENCE,
|
|
1587
|
-
SHADOW: () => SHADOW,
|
|
1588
|
-
SPACING: () => SPACING,
|
|
1589
|
-
SVG: () => SVG,
|
|
1590
|
-
SVG_DATA: () => SVG_DATA,
|
|
1591
|
-
TEMPLATES: () => TEMPLATES,
|
|
1592
|
-
THEME: () => THEME,
|
|
1593
|
-
TIMING: () => TIMING,
|
|
1594
|
-
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
1595
|
-
UNIT: () => UNIT
|
|
1596
|
-
});
|
|
1597
|
-
|
|
1598
|
-
// src/defaultConfig/sequence.js
|
|
1599
|
-
var SEQUENCE = {
|
|
1600
|
-
"minor-second": 1.067,
|
|
1601
|
-
"major-second": 1.125,
|
|
1602
|
-
"minor-third": 1.2,
|
|
1603
|
-
"major-third": 1.25,
|
|
1604
|
-
"perfect-fourth": 1.333,
|
|
1605
|
-
"augmented-fourth": 1.414,
|
|
1606
|
-
"perfect-fifth": 1.5,
|
|
1607
|
-
"minor-sixth": 1.6,
|
|
1608
|
-
phi: 1.618,
|
|
1609
|
-
// golden-ratio
|
|
1610
|
-
"major-sixth": 1.667,
|
|
1611
|
-
"square-root-3": 1.732,
|
|
1612
|
-
// theodorus
|
|
1613
|
-
"minor-seventh": 1.778,
|
|
1614
|
-
"major-seventh": 1.875,
|
|
1615
|
-
octave: 2,
|
|
1616
|
-
"square-root-5": 2.23,
|
|
1617
|
-
// pythagoras
|
|
1618
|
-
"major-tenth": 2.5,
|
|
1619
|
-
"major-eleventh": 2.667,
|
|
1620
|
-
"major-twelfth": 3,
|
|
1621
|
-
pi: 3.14,
|
|
1622
|
-
// archimedes
|
|
1623
|
-
"double-octave": 4
|
|
1624
|
-
};
|
|
1625
|
-
|
|
1626
|
-
// src/defaultConfig/unit.js
|
|
1627
|
-
var UNIT = {
|
|
1628
|
-
default: "em"
|
|
1629
|
-
};
|
|
1630
|
-
|
|
1631
|
-
// src/defaultConfig/typography.js
|
|
1632
|
-
var defaultProps = {
|
|
1633
|
-
browserDefault: 16,
|
|
1634
|
-
base: 16,
|
|
1635
|
-
type: "font-size",
|
|
1636
|
-
ratio: SEQUENCE["minor-third"],
|
|
1637
|
-
range: [-3, 12],
|
|
1638
|
-
h1Matches: 6,
|
|
1639
|
-
lineHeight: 1.5,
|
|
1640
|
-
subSequence: true,
|
|
1641
|
-
mediaRegenerate: false,
|
|
1642
|
-
unit: "em",
|
|
1643
|
-
templates: {},
|
|
1644
|
-
sequence: {},
|
|
1645
|
-
scales: {},
|
|
1646
|
-
vars: {}
|
|
1647
|
-
};
|
|
1648
|
-
var TYPOGRAPHY = defaultProps;
|
|
1649
|
-
|
|
1650
|
-
// src/defaultConfig/font.js
|
|
1651
|
-
var FONT = {};
|
|
1652
|
-
|
|
1653
|
-
// src/defaultConfig/font-family.js
|
|
1654
|
-
var FONT_FAMILY = {};
|
|
1655
|
-
var FONT_FAMILY_TYPES = {
|
|
1656
|
-
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
1657
|
-
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
1658
|
-
monospace: "Courier New, monospace, --system-default"
|
|
1659
|
-
};
|
|
1660
|
-
var FONT_FACE = {};
|
|
1661
|
-
|
|
1662
|
-
// src/defaultConfig/media.js
|
|
1663
|
-
var MEDIA = {
|
|
1664
|
-
tv: "(min-width: 2780px)",
|
|
1665
|
-
light: "(prefers-color-scheme: light)",
|
|
1666
|
-
dark: "(prefers-color-scheme: dark)",
|
|
1667
|
-
print: "print"
|
|
1668
|
-
};
|
|
1669
|
-
|
|
1670
|
-
// src/defaultConfig/spacing.js
|
|
1671
|
-
var defaultProps2 = {
|
|
1672
|
-
base: TYPOGRAPHY.base,
|
|
1673
|
-
type: "spacing",
|
|
1674
|
-
ratio: SEQUENCE.phi,
|
|
1675
|
-
range: [-5, 15],
|
|
1676
|
-
subSequence: true,
|
|
1677
|
-
mediaRegenerate: false,
|
|
1678
|
-
unit: "em",
|
|
1679
|
-
sequence: {},
|
|
1680
|
-
scales: {},
|
|
1681
|
-
vars: {}
|
|
1682
|
-
};
|
|
1683
|
-
var SPACING = defaultProps2;
|
|
1684
|
-
|
|
1685
|
-
// src/defaultConfig/color.js
|
|
1686
|
-
var COLOR = {};
|
|
1687
|
-
var GRADIENT = {};
|
|
1688
|
-
|
|
1689
|
-
// src/defaultConfig/theme.js
|
|
1690
|
-
var THEME = {};
|
|
1691
|
-
|
|
1692
|
-
// src/defaultConfig/shadow.js
|
|
1693
|
-
var SHADOW = {};
|
|
1694
|
-
|
|
1695
|
-
// src/defaultConfig/icons.js
|
|
1696
|
-
var ICONS = {};
|
|
1697
|
-
var SEMANTIC_ICONS = {};
|
|
1698
|
-
|
|
1699
|
-
// src/defaultConfig/timing.js
|
|
1700
|
-
var defaultProps3 = {
|
|
1701
|
-
default: 150,
|
|
1702
|
-
base: 150,
|
|
1703
|
-
type: "timing",
|
|
1704
|
-
ratio: SEQUENCE["perfect-fourth"],
|
|
1705
|
-
range: [-3, 12],
|
|
1706
|
-
mediaRegenerate: false,
|
|
1707
|
-
unit: "ms",
|
|
1708
|
-
sequence: {},
|
|
1709
|
-
scales: {},
|
|
1710
|
-
vars: {}
|
|
1711
|
-
};
|
|
1712
|
-
var TIMING = defaultProps3;
|
|
1713
|
-
|
|
1714
|
-
// src/defaultConfig/document.js
|
|
1715
|
-
var DOCUMENT = {};
|
|
1716
|
-
|
|
1717
|
-
// src/defaultConfig/responsive.js
|
|
1718
|
-
var BREAKPOINTS = {
|
|
1719
|
-
screenL: 1920,
|
|
1720
|
-
screenM: 1680,
|
|
1721
|
-
screenS: 1440,
|
|
1722
|
-
tabletL: 1366,
|
|
1723
|
-
tabletM: 1280,
|
|
1724
|
-
tabletS: 1024,
|
|
1725
|
-
mobileL: 768,
|
|
1726
|
-
mobileM: 560,
|
|
1727
|
-
mobileS: 480,
|
|
1728
|
-
mobileXS: 375
|
|
1729
|
-
};
|
|
1730
|
-
var DEVICES = {
|
|
1731
|
-
screenL: [1920, 1024],
|
|
1732
|
-
screenM: [1680, 1024],
|
|
1733
|
-
screenS: [1440, 978],
|
|
1734
|
-
tabletL: [1366, 926],
|
|
1735
|
-
tabletM: [1280, 768],
|
|
1736
|
-
tabletS: [1024, 768],
|
|
1737
|
-
mobileL: [768, 375],
|
|
1738
|
-
mobileM: [560, 768],
|
|
1739
|
-
mobileS: [480, 768],
|
|
1740
|
-
mobileXS: [375, 768]
|
|
1741
|
-
};
|
|
1742
|
-
|
|
1743
|
-
// src/defaultConfig/cases.js
|
|
1744
|
-
var CASES = {};
|
|
1745
|
-
|
|
1746
|
-
// src/defaultConfig/animation.js
|
|
1747
|
-
var ANIMATION = {};
|
|
1748
|
-
|
|
1749
|
-
// src/defaultConfig/svg.js
|
|
1750
|
-
var SVG = {};
|
|
1751
|
-
var SVG_DATA = {};
|
|
1752
|
-
|
|
1753
|
-
// src/defaultConfig/templates.js
|
|
1754
|
-
var TEMPLATES = {};
|
|
1755
|
-
|
|
1756
|
-
// src/defaultConfig/grid.js
|
|
1757
|
-
var defaultProps4 = {};
|
|
1758
|
-
var GRID = defaultProps4;
|
|
1759
|
-
|
|
1760
|
-
// src/defaultConfig/index.js
|
|
1761
|
-
var RESET = {};
|
|
1762
|
-
|
|
1763
|
-
// src/factory.js
|
|
1764
|
-
var CSS_VARS = {};
|
|
1765
|
-
var CONFIG = {
|
|
1766
|
-
verbose: false,
|
|
1767
|
-
useVariable: true,
|
|
1768
|
-
useReset: true,
|
|
1769
|
-
CSS_VARS,
|
|
1770
|
-
...defaultConfig_exports
|
|
1771
|
-
};
|
|
1772
|
-
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
1773
|
-
var FACTORY = {
|
|
1774
|
-
active: "0",
|
|
1775
|
-
0: CONFIG
|
|
1776
|
-
};
|
|
1777
|
-
var getActiveConfig = (def) => {
|
|
1778
|
-
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
1779
|
-
};
|
|
1780
|
-
|
|
1781
|
-
// src/utils/color.js
|
|
1782
|
-
var import_globals = __toESM(require_cjs2(), 1);
|
|
1783
|
-
var import_utils2 = __toESM(require_cjs(), 1);
|
|
1784
|
-
var colorStringToRgbaArray = (color) => {
|
|
1785
|
-
if (color === "")
|
|
1786
|
-
return [0, 0, 0, 0];
|
|
1787
|
-
if (color.toLowerCase() === "transparent")
|
|
1788
|
-
return [0, 0, 0, 0];
|
|
1789
|
-
if (color[0] === "#") {
|
|
1790
|
-
if (color.length < 7) {
|
|
1791
|
-
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
1792
|
-
}
|
|
1793
|
-
return [
|
|
1794
|
-
parseInt(color.substr(1, 2), 16),
|
|
1795
|
-
parseInt(color.substr(3, 2), 16),
|
|
1796
|
-
parseInt(color.substr(5, 2), 16),
|
|
1797
|
-
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
1798
|
-
];
|
|
1799
|
-
}
|
|
1800
|
-
if (color.indexOf("rgb") === -1) {
|
|
1801
|
-
if (import_globals.document && import_globals.window) {
|
|
1802
|
-
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
1803
|
-
const flag = "rgb(1, 2, 3)";
|
|
1804
|
-
elem.style.color = flag;
|
|
1805
|
-
if (elem.style.color !== flag) {
|
|
1806
|
-
import_globals.document.body.removeChild(elem);
|
|
1807
|
-
return;
|
|
1808
|
-
}
|
|
1809
|
-
elem.style.color = color;
|
|
1810
|
-
if (elem.style.color === flag || elem.style.color === "") {
|
|
1811
|
-
import_globals.document.body.removeChild(elem);
|
|
1812
|
-
return [0, 0, 0, 0];
|
|
1813
|
-
}
|
|
1814
|
-
color = import_globals.window.getComputedStyle(elem).color;
|
|
1815
|
-
import_globals.document.body.removeChild(elem);
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
if (color.indexOf("rgb") === 0) {
|
|
1819
|
-
if (color.indexOf("rgba") === -1)
|
|
1820
|
-
color = `${color}, 1`;
|
|
1821
|
-
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
1822
|
-
}
|
|
1823
|
-
return [0, 0, 0, 0];
|
|
1824
|
-
};
|
|
1825
|
-
var hexToRgbArray = (hex, alpha = 1) => {
|
|
1826
|
-
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1827
|
-
return [r, g, b];
|
|
1828
|
-
};
|
|
1829
|
-
var rgbArrayToHex = ([r, g, b]) => {
|
|
1830
|
-
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
1831
|
-
};
|
|
1832
|
-
var rgbToHSL = (r, g, b) => {
|
|
1833
|
-
const a = Math.max(r, g, b);
|
|
1834
|
-
const n = a - Math.min(r, g, b);
|
|
1835
|
-
const f = 1 - Math.abs(a + a - n - 1);
|
|
1836
|
-
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
1837
|
-
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
1838
|
-
};
|
|
1839
|
-
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
1840
|
-
Math.min(k - 3, 9 - k, 1),
|
|
1841
|
-
-1
|
|
1842
|
-
)) => [f(0), f(8), f(4)];
|
|
1843
|
-
var getColorShade = (col, amt) => {
|
|
1844
|
-
const num = parseInt(col, 16);
|
|
1845
|
-
let r = (num >> 16) + amt;
|
|
1846
|
-
if (r > 255)
|
|
1847
|
-
r = 255;
|
|
1848
|
-
else if (r < 0)
|
|
1849
|
-
r = 0;
|
|
1850
|
-
let b = (num >> 8 & 255) + amt;
|
|
1851
|
-
if (b > 255)
|
|
1852
|
-
b = 255;
|
|
1853
|
-
else if (b < 0)
|
|
1854
|
-
b = 0;
|
|
1855
|
-
let g = (num & 255) + amt;
|
|
1856
|
-
if (g > 255)
|
|
1857
|
-
g = 255;
|
|
1858
|
-
else if (g < 0)
|
|
1859
|
-
g = 0;
|
|
1860
|
-
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
1861
|
-
};
|
|
1862
|
-
var getRgbTone = (rgb, tone) => {
|
|
1863
|
-
if ((0, import_utils2.isString)(rgb) && rgb.includes("rgb"))
|
|
1864
|
-
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
1865
|
-
if ((0, import_utils2.isString)(rgb))
|
|
1866
|
-
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
1867
|
-
if ((0, import_utils2.isNumber)(tone))
|
|
1868
|
-
tone += "";
|
|
1869
|
-
const toHex = rgbArrayToHex(rgb);
|
|
1870
|
-
const abs = tone.slice(0, 1);
|
|
1871
|
-
if (abs === "-" || abs === "+") {
|
|
1872
|
-
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
1873
|
-
return hexToRgbArray(colorShade).join(", ");
|
|
1874
|
-
} else {
|
|
1875
|
-
const [r, g, b] = rgb;
|
|
1876
|
-
const hsl = rgbToHSL(r, g, b);
|
|
1877
|
-
const [h, s, l] = hsl;
|
|
1878
|
-
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
1879
|
-
return newRgb;
|
|
1880
|
-
}
|
|
1881
|
-
};
|
|
1882
|
-
|
|
1883
|
-
// src/utils/sequence.js
|
|
1884
|
-
var import_utils4 = __toESM(require_cjs(), 1);
|
|
1885
|
-
|
|
1886
1565
|
// ../utils/dist/cjs/index.js
|
|
1887
|
-
var
|
|
1888
|
-
|
|
1889
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1890
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1891
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1892
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1893
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1894
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1895
|
-
};
|
|
1896
|
-
var __export2 = (target, all) => {
|
|
1897
|
-
for (var name in all)
|
|
1898
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1899
|
-
};
|
|
1900
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
1901
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1902
|
-
for (let key of __getOwnPropNames2(from))
|
|
1903
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1904
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1905
|
-
}
|
|
1906
|
-
return to;
|
|
1907
|
-
};
|
|
1908
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1909
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1910
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1911
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1912
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1913
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1914
|
-
mod
|
|
1915
|
-
));
|
|
1916
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1917
|
-
var require_key2 = __commonJS2({
|
|
1918
|
-
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1566
|
+
var require_cjs3 = __commonJS({
|
|
1567
|
+
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
1919
1568
|
"use strict";
|
|
1920
|
-
var
|
|
1921
|
-
var
|
|
1922
|
-
var
|
|
1923
|
-
var
|
|
1924
|
-
var
|
|
1569
|
+
var __create2 = Object.create;
|
|
1570
|
+
var __defProp2 = Object.defineProperty;
|
|
1571
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1572
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1573
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1574
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1575
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
1576
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1577
|
+
};
|
|
1578
|
+
var __export2 = (target, all) => {
|
|
1925
1579
|
for (var name in all)
|
|
1926
|
-
|
|
1580
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1927
1581
|
};
|
|
1928
|
-
var
|
|
1582
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1929
1583
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1930
|
-
for (let key of
|
|
1931
|
-
if (!
|
|
1932
|
-
|
|
1584
|
+
for (let key of __getOwnPropNames2(from))
|
|
1585
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1586
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1933
1587
|
}
|
|
1934
1588
|
return to;
|
|
1935
1589
|
};
|
|
1936
|
-
var
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1590
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1591
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1592
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1593
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1594
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1595
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1596
|
+
mod
|
|
1597
|
+
));
|
|
1598
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1599
|
+
var require_key2 = __commonJS2({
|
|
1600
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports2, module22) {
|
|
1601
|
+
"use strict";
|
|
1602
|
+
var __defProp22 = Object.defineProperty;
|
|
1603
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1604
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1605
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1606
|
+
var __export22 = (target, all) => {
|
|
1607
|
+
for (var name in all)
|
|
1608
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1609
|
+
};
|
|
1610
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1611
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1612
|
+
for (let key of __getOwnPropNames22(from))
|
|
1613
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1614
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1615
|
+
}
|
|
1616
|
+
return to;
|
|
1617
|
+
};
|
|
1618
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1619
|
+
var key_exports = {};
|
|
1620
|
+
__export22(key_exports, {
|
|
1621
|
+
createSnapshotId: () => createSnapshotId,
|
|
1622
|
+
generateKey: () => generateKey
|
|
1623
|
+
});
|
|
1624
|
+
module22.exports = __toCommonJS22(key_exports);
|
|
1625
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
1626
|
+
let index = 0;
|
|
1627
|
+
function newId() {
|
|
1628
|
+
index++;
|
|
1629
|
+
return index;
|
|
1630
|
+
}
|
|
1631
|
+
return newId;
|
|
1632
|
+
}();
|
|
1633
|
+
var createSnapshotId = generateKey;
|
|
1634
|
+
}
|
|
1941
1635
|
});
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1636
|
+
var require_env2 = __commonJS2({
|
|
1637
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports2, module22) {
|
|
1638
|
+
"use strict";
|
|
1639
|
+
var __defProp22 = Object.defineProperty;
|
|
1640
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1641
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1642
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1643
|
+
var __export22 = (target, all) => {
|
|
1644
|
+
for (var name in all)
|
|
1645
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1646
|
+
};
|
|
1647
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1648
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1649
|
+
for (let key of __getOwnPropNames22(from))
|
|
1650
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1651
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1652
|
+
}
|
|
1653
|
+
return to;
|
|
1654
|
+
};
|
|
1655
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1656
|
+
var env_exports = {};
|
|
1657
|
+
__export22(env_exports, {
|
|
1658
|
+
NODE_ENV: () => NODE_ENV,
|
|
1659
|
+
getNev: () => getNev,
|
|
1660
|
+
isDevelopment: () => isDevelopment,
|
|
1661
|
+
isProduction: () => isProduction,
|
|
1662
|
+
isTest: () => isTest
|
|
1663
|
+
});
|
|
1664
|
+
module22.exports = __toCommonJS22(env_exports);
|
|
1665
|
+
var NODE_ENV = "development";
|
|
1666
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1667
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
1668
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1669
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1948
1670
|
}
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
var
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1671
|
+
});
|
|
1672
|
+
var require_globals2 = __commonJS2({
|
|
1673
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports2, module22) {
|
|
1674
|
+
"use strict";
|
|
1675
|
+
var __defProp22 = Object.defineProperty;
|
|
1676
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1677
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1678
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1679
|
+
var __export22 = (target, all) => {
|
|
1680
|
+
for (var name in all)
|
|
1681
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1682
|
+
};
|
|
1683
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1684
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1685
|
+
for (let key of __getOwnPropNames22(from))
|
|
1686
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1687
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1688
|
+
}
|
|
1689
|
+
return to;
|
|
1690
|
+
};
|
|
1691
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1692
|
+
var globals_exports = {};
|
|
1693
|
+
__export22(globals_exports, {
|
|
1694
|
+
document: () => document22,
|
|
1695
|
+
global: () => global,
|
|
1696
|
+
self: () => self,
|
|
1697
|
+
window: () => window22
|
|
1698
|
+
});
|
|
1699
|
+
module22.exports = __toCommonJS22(globals_exports);
|
|
1700
|
+
var global = globalThis;
|
|
1701
|
+
var self = globalThis;
|
|
1702
|
+
var window22 = globalThis;
|
|
1703
|
+
var document22 = window22.document;
|
|
1970
1704
|
}
|
|
1971
|
-
return to;
|
|
1972
|
-
};
|
|
1973
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1974
|
-
var env_exports = {};
|
|
1975
|
-
__export22(env_exports, {
|
|
1976
|
-
NODE_ENV: () => NODE_ENV,
|
|
1977
|
-
getNev: () => getNev,
|
|
1978
|
-
isDevelopment: () => isDevelopment,
|
|
1979
|
-
isProduction: () => isProduction,
|
|
1980
|
-
isTest: () => isTest
|
|
1981
1705
|
});
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
var
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
1706
|
+
var require_node2 = __commonJS2({
|
|
1707
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports2, module22) {
|
|
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 });
|
|
1722
|
+
}
|
|
1723
|
+
return to;
|
|
1724
|
+
};
|
|
1725
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1726
|
+
var node_exports = {};
|
|
1727
|
+
__export22(node_exports, {
|
|
1728
|
+
isHtmlElement: () => isHtmlElement,
|
|
1729
|
+
isNode: () => isNode
|
|
1730
|
+
});
|
|
1731
|
+
module22.exports = __toCommonJS22(node_exports);
|
|
1732
|
+
var import_globals2 = require_globals2();
|
|
1733
|
+
var isNode = (obj) => {
|
|
1734
|
+
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1735
|
+
};
|
|
1736
|
+
var isHtmlElement = (obj) => {
|
|
1737
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1738
|
+
};
|
|
2006
1739
|
}
|
|
2007
|
-
return to;
|
|
2008
|
-
};
|
|
2009
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2010
|
-
var globals_exports = {};
|
|
2011
|
-
__export22(globals_exports, {
|
|
2012
|
-
document: () => document22,
|
|
2013
|
-
global: () => global,
|
|
2014
|
-
self: () => self,
|
|
2015
|
-
window: () => window2
|
|
2016
1740
|
});
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
var
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
1741
|
+
var require_types2 = __commonJS2({
|
|
1742
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports2, module22) {
|
|
1743
|
+
"use strict";
|
|
1744
|
+
var __defProp22 = Object.defineProperty;
|
|
1745
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1746
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1747
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1748
|
+
var __export22 = (target, all) => {
|
|
1749
|
+
for (var name in all)
|
|
1750
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1751
|
+
};
|
|
1752
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1753
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1754
|
+
for (let key of __getOwnPropNames22(from))
|
|
1755
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1756
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1757
|
+
}
|
|
1758
|
+
return to;
|
|
1759
|
+
};
|
|
1760
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1761
|
+
var types_exports = {};
|
|
1762
|
+
__export22(types_exports, {
|
|
1763
|
+
TYPES: () => TYPES,
|
|
1764
|
+
is: () => is,
|
|
1765
|
+
isArray: () => isArray32,
|
|
1766
|
+
isBoolean: () => isBoolean,
|
|
1767
|
+
isDate: () => isDate,
|
|
1768
|
+
isDefined: () => isDefined2,
|
|
1769
|
+
isFunction: () => isFunction,
|
|
1770
|
+
isNot: () => isNot,
|
|
1771
|
+
isNull: () => isNull,
|
|
1772
|
+
isNumber: () => isNumber2,
|
|
1773
|
+
isObject: () => isObject32,
|
|
1774
|
+
isObjectLike: () => isObjectLike3,
|
|
1775
|
+
isString: () => isString22,
|
|
1776
|
+
isUndefined: () => isUndefined
|
|
1777
|
+
});
|
|
1778
|
+
module22.exports = __toCommonJS22(types_exports);
|
|
1779
|
+
var import_node = require_node2();
|
|
1780
|
+
var isObject32 = (arg) => {
|
|
1781
|
+
if (arg === null)
|
|
1782
|
+
return false;
|
|
1783
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
1784
|
+
};
|
|
1785
|
+
var isString22 = (arg) => typeof arg === "string";
|
|
1786
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
1787
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
1788
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
1789
|
+
var isNull = (arg) => arg === null;
|
|
1790
|
+
var isArray32 = (arg) => Array.isArray(arg);
|
|
1791
|
+
var isDate = (d) => d instanceof Date;
|
|
1792
|
+
var isObjectLike3 = (arg) => {
|
|
1793
|
+
if (arg === null)
|
|
1794
|
+
return false;
|
|
1795
|
+
return typeof arg === "object";
|
|
1796
|
+
};
|
|
1797
|
+
var isDefined2 = (arg) => {
|
|
1798
|
+
return isObject32(arg) || isObjectLike3(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray32(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1799
|
+
};
|
|
1800
|
+
var isUndefined = (arg) => {
|
|
1801
|
+
return arg === void 0;
|
|
1802
|
+
};
|
|
1803
|
+
var TYPES = {
|
|
1804
|
+
boolean: isBoolean,
|
|
1805
|
+
array: isArray32,
|
|
1806
|
+
object: isObject32,
|
|
1807
|
+
string: isString22,
|
|
1808
|
+
date: isDate,
|
|
1809
|
+
number: isNumber2,
|
|
1810
|
+
null: isNull,
|
|
1811
|
+
function: isFunction,
|
|
1812
|
+
objectLike: isObjectLike3,
|
|
1813
|
+
node: import_node.isNode,
|
|
1814
|
+
htmlElement: import_node.isHtmlElement,
|
|
1815
|
+
defined: isDefined2
|
|
1816
|
+
};
|
|
1817
|
+
var is = (arg) => {
|
|
1818
|
+
return (...args) => {
|
|
1819
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
var isNot = (arg) => {
|
|
1823
|
+
return (...args) => {
|
|
1824
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
2040
1827
|
}
|
|
2041
|
-
return to;
|
|
2042
|
-
};
|
|
2043
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2044
|
-
var node_exports = {};
|
|
2045
|
-
__export22(node_exports, {
|
|
2046
|
-
isHtmlElement: () => isHtmlElement,
|
|
2047
|
-
isNode: () => isNode
|
|
2048
1828
|
});
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
});
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
__defProp22(
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
1829
|
+
var require_array2 = __commonJS2({
|
|
1830
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports2, module22) {
|
|
1831
|
+
"use strict";
|
|
1832
|
+
var __defProp22 = Object.defineProperty;
|
|
1833
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1834
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1835
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1836
|
+
var __export22 = (target, all) => {
|
|
1837
|
+
for (var name in all)
|
|
1838
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1839
|
+
};
|
|
1840
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1841
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1842
|
+
for (let key of __getOwnPropNames22(from))
|
|
1843
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1844
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1845
|
+
}
|
|
1846
|
+
return to;
|
|
1847
|
+
};
|
|
1848
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1849
|
+
var array_exports = {};
|
|
1850
|
+
__export22(array_exports, {
|
|
1851
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1852
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1853
|
+
arraysEqual: () => arraysEqual,
|
|
1854
|
+
createNestedObject: () => createNestedObject,
|
|
1855
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1856
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1857
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1858
|
+
joinArrays: () => joinArrays,
|
|
1859
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1860
|
+
mergeArray: () => mergeArray,
|
|
1861
|
+
removeFromArray: () => removeFromArray,
|
|
1862
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
1863
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1864
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
1865
|
+
swapItemsInArray: () => swapItemsInArray
|
|
1866
|
+
});
|
|
1867
|
+
module22.exports = __toCommonJS22(array_exports);
|
|
1868
|
+
var import_object = require_object2();
|
|
1869
|
+
var import_types = require_types2();
|
|
1870
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1871
|
+
return arr2.every((val) => arr1.includes(val));
|
|
1872
|
+
};
|
|
1873
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1874
|
+
return arr.reduce((count, currentValue) => {
|
|
1875
|
+
return currentValue === value ? count + 1 : count;
|
|
1876
|
+
}, 0);
|
|
1877
|
+
};
|
|
1878
|
+
var removeFromArray = (arr, index) => {
|
|
1879
|
+
if ((0, import_types.isString)(index))
|
|
1880
|
+
index = parseInt(index);
|
|
1881
|
+
if ((0, import_types.isNumber)(index)) {
|
|
1882
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1883
|
+
throw new Error("Invalid index");
|
|
1884
|
+
}
|
|
1885
|
+
arr.splice(index, 1);
|
|
1886
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
1887
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1888
|
+
} else {
|
|
1889
|
+
throw new Error("Invalid index");
|
|
1890
|
+
}
|
|
1891
|
+
return arr;
|
|
1892
|
+
};
|
|
1893
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
1894
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1895
|
+
};
|
|
1896
|
+
var joinArrays = (...arrays) => {
|
|
1897
|
+
return [].concat(...arrays);
|
|
1898
|
+
};
|
|
1899
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
1900
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1901
|
+
};
|
|
1902
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
1903
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1904
|
+
};
|
|
1905
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
1906
|
+
const index = arr.indexOf(value);
|
|
1907
|
+
if (index !== -1) {
|
|
1908
|
+
return arr.slice(0, index);
|
|
1909
|
+
}
|
|
1910
|
+
return arr;
|
|
1911
|
+
};
|
|
1912
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
1913
|
+
if (!(0, import_types.isArray)(arr))
|
|
1914
|
+
return;
|
|
1915
|
+
const index = arr.indexOf(value);
|
|
1916
|
+
if (index !== -1) {
|
|
1917
|
+
return arr.slice(index + 1);
|
|
1918
|
+
}
|
|
1919
|
+
return arr;
|
|
1920
|
+
};
|
|
1921
|
+
var createNestedObject = (arr, lastValue) => {
|
|
1922
|
+
const nestedObject = {};
|
|
1923
|
+
if (arr.length === 0) {
|
|
1924
|
+
return lastValue;
|
|
1925
|
+
}
|
|
1926
|
+
arr.reduce((obj, value, index) => {
|
|
1927
|
+
if (!obj[value]) {
|
|
1928
|
+
obj[value] = {};
|
|
1929
|
+
}
|
|
1930
|
+
if (index === arr.length - 1 && lastValue) {
|
|
1931
|
+
obj[value] = lastValue;
|
|
1932
|
+
}
|
|
1933
|
+
return obj[value];
|
|
1934
|
+
}, nestedObject);
|
|
1935
|
+
return nestedObject;
|
|
1936
|
+
};
|
|
1937
|
+
var removeValueFromArray = (arr, value) => {
|
|
1938
|
+
const index = arr.indexOf(value);
|
|
1939
|
+
if (index > -1) {
|
|
1940
|
+
const newArray = [...arr];
|
|
1941
|
+
newArray.splice(index, 1);
|
|
1942
|
+
return newArray;
|
|
1943
|
+
}
|
|
1944
|
+
return arr;
|
|
1945
|
+
};
|
|
1946
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
1947
|
+
return arr.filter((item) => item !== value);
|
|
1948
|
+
};
|
|
1949
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
1950
|
+
const result = [];
|
|
1951
|
+
for (let i = 0; i < array.length; i++) {
|
|
1952
|
+
result.push(array[i]);
|
|
1953
|
+
if (i < array.length - 1) {
|
|
1954
|
+
result.push(item);
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
return result;
|
|
1958
|
+
};
|
|
1959
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1960
|
+
const newArray = [...array];
|
|
1961
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
1962
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1963
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1964
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1965
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1966
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
1967
|
+
}
|
|
1968
|
+
return newArray;
|
|
1969
|
+
};
|
|
1970
|
+
var arraysEqual = (arr1, arr2) => {
|
|
1971
|
+
if (arr1.length !== arr2.length) {
|
|
1972
|
+
return false;
|
|
1973
|
+
}
|
|
1974
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
1975
|
+
if (arr1[i] !== arr2[i]) {
|
|
1976
|
+
return false;
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
return true;
|
|
1980
|
+
};
|
|
2075
1981
|
}
|
|
2076
|
-
return to;
|
|
2077
|
-
};
|
|
2078
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2079
|
-
var types_exports = {};
|
|
2080
|
-
__export22(types_exports, {
|
|
2081
|
-
TYPES: () => TYPES,
|
|
2082
|
-
is: () => is,
|
|
2083
|
-
isArray: () => isArray32,
|
|
2084
|
-
isBoolean: () => isBoolean,
|
|
2085
|
-
isDate: () => isDate,
|
|
2086
|
-
isDefined: () => isDefined2,
|
|
2087
|
-
isFunction: () => isFunction,
|
|
2088
|
-
isNot: () => isNot,
|
|
2089
|
-
isNull: () => isNull,
|
|
2090
|
-
isNumber: () => isNumber2,
|
|
2091
|
-
isObject: () => isObject32,
|
|
2092
|
-
isObjectLike: () => isObjectLike3,
|
|
2093
|
-
isString: () => isString22,
|
|
2094
|
-
isUndefined: () => isUndefined
|
|
2095
1982
|
});
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
for (let key of __getOwnPropNames22(from))
|
|
2161
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2162
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2163
|
-
}
|
|
2164
|
-
return to;
|
|
2165
|
-
};
|
|
2166
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2167
|
-
var array_exports = {};
|
|
2168
|
-
__export22(array_exports, {
|
|
2169
|
-
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
2170
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
2171
|
-
arraysEqual: () => arraysEqual,
|
|
2172
|
-
createNestedObject: () => createNestedObject,
|
|
2173
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
2174
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
2175
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
2176
|
-
joinArrays: () => joinArrays,
|
|
2177
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
2178
|
-
mergeArray: () => mergeArray,
|
|
2179
|
-
removeFromArray: () => removeFromArray,
|
|
2180
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
2181
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
2182
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
2183
|
-
swapItemsInArray: () => swapItemsInArray
|
|
2184
|
-
});
|
|
2185
|
-
module2.exports = __toCommonJS22(array_exports);
|
|
2186
|
-
var import_object = require_object2();
|
|
2187
|
-
var import_types = require_types2();
|
|
2188
|
-
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
2189
|
-
return arr2.every((val) => arr1.includes(val));
|
|
2190
|
-
};
|
|
2191
|
-
var getFrequencyInArray = (arr, value) => {
|
|
2192
|
-
return arr.reduce((count, currentValue) => {
|
|
2193
|
-
return currentValue === value ? count + 1 : count;
|
|
2194
|
-
}, 0);
|
|
2195
|
-
};
|
|
2196
|
-
var removeFromArray = (arr, index) => {
|
|
2197
|
-
if ((0, import_types.isString)(index))
|
|
2198
|
-
index = parseInt(index);
|
|
2199
|
-
if ((0, import_types.isNumber)(index)) {
|
|
2200
|
-
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
2201
|
-
throw new Error("Invalid index");
|
|
2202
|
-
}
|
|
2203
|
-
arr.splice(index, 1);
|
|
2204
|
-
} else if ((0, import_types.isArray)(index)) {
|
|
2205
|
-
index.forEach((idx) => removeFromArray(arr, idx));
|
|
2206
|
-
} else {
|
|
2207
|
-
throw new Error("Invalid index");
|
|
2208
|
-
}
|
|
2209
|
-
return arr;
|
|
2210
|
-
};
|
|
2211
|
-
var swapItemsInArray = (arr, i, j) => {
|
|
2212
|
-
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
2213
|
-
};
|
|
2214
|
-
var joinArrays = (...arrays) => {
|
|
2215
|
-
return [].concat(...arrays);
|
|
2216
|
-
};
|
|
2217
|
-
var mergeArray = (arr, excludeFrom = []) => {
|
|
2218
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
2219
|
-
};
|
|
2220
|
-
var mergeAndCloneIfArray = (obj) => {
|
|
2221
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
2222
|
-
};
|
|
2223
|
-
var cutArrayBeforeValue = (arr, value) => {
|
|
2224
|
-
const index = arr.indexOf(value);
|
|
2225
|
-
if (index !== -1) {
|
|
2226
|
-
return arr.slice(0, index);
|
|
2227
|
-
}
|
|
2228
|
-
return arr;
|
|
2229
|
-
};
|
|
2230
|
-
var cutArrayAfterValue = (arr, value) => {
|
|
2231
|
-
if (!(0, import_types.isArray)(arr))
|
|
2232
|
-
return;
|
|
2233
|
-
const index = arr.indexOf(value);
|
|
2234
|
-
if (index !== -1) {
|
|
2235
|
-
return arr.slice(index + 1);
|
|
2236
|
-
}
|
|
2237
|
-
return arr;
|
|
2238
|
-
};
|
|
2239
|
-
var createNestedObject = (arr, lastValue) => {
|
|
2240
|
-
const nestedObject = {};
|
|
2241
|
-
if (arr.length === 0) {
|
|
2242
|
-
return lastValue;
|
|
2243
|
-
}
|
|
2244
|
-
arr.reduce((obj, value, index) => {
|
|
2245
|
-
if (!obj[value]) {
|
|
2246
|
-
obj[value] = {};
|
|
2247
|
-
}
|
|
2248
|
-
if (index === arr.length - 1 && lastValue) {
|
|
2249
|
-
obj[value] = lastValue;
|
|
2250
|
-
}
|
|
2251
|
-
return obj[value];
|
|
2252
|
-
}, nestedObject);
|
|
2253
|
-
return nestedObject;
|
|
2254
|
-
};
|
|
2255
|
-
var removeValueFromArray = (arr, value) => {
|
|
2256
|
-
const index = arr.indexOf(value);
|
|
2257
|
-
if (index > -1) {
|
|
2258
|
-
const newArray = [...arr];
|
|
2259
|
-
newArray.splice(index, 1);
|
|
2260
|
-
return newArray;
|
|
2261
|
-
}
|
|
2262
|
-
return arr;
|
|
2263
|
-
};
|
|
2264
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
2265
|
-
return arr.filter((item) => item !== value);
|
|
2266
|
-
};
|
|
2267
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
2268
|
-
const result = [];
|
|
2269
|
-
for (let i = 0; i < array.length; i++) {
|
|
2270
|
-
result.push(array[i]);
|
|
2271
|
-
if (i < array.length - 1) {
|
|
2272
|
-
result.push(item);
|
|
2273
|
-
}
|
|
2274
|
-
}
|
|
2275
|
-
return result;
|
|
2276
|
-
};
|
|
2277
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
2278
|
-
const newArray = [...array];
|
|
2279
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
2280
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
2281
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
2282
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
2283
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
2284
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
2285
|
-
}
|
|
2286
|
-
return newArray;
|
|
2287
|
-
};
|
|
2288
|
-
var arraysEqual = (arr1, arr2) => {
|
|
2289
|
-
if (arr1.length !== arr2.length) {
|
|
2290
|
-
return false;
|
|
2291
|
-
}
|
|
2292
|
-
for (let i = 0; i < arr1.length; i++) {
|
|
2293
|
-
if (arr1[i] !== arr2[i]) {
|
|
2294
|
-
return false;
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
return true;
|
|
2298
|
-
};
|
|
2299
|
-
}
|
|
2300
|
-
});
|
|
2301
|
-
var require_string2 = __commonJS2({
|
|
2302
|
-
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
2303
|
-
"use strict";
|
|
2304
|
-
var __defProp22 = Object.defineProperty;
|
|
2305
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2306
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2307
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2308
|
-
var __export22 = (target, all) => {
|
|
2309
|
-
for (var name in all)
|
|
2310
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2311
|
-
};
|
|
2312
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2313
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2314
|
-
for (let key of __getOwnPropNames22(from))
|
|
2315
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2316
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2317
|
-
}
|
|
2318
|
-
return to;
|
|
2319
|
-
};
|
|
2320
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2321
|
-
var string_exports = {};
|
|
2322
|
-
__export22(string_exports, {
|
|
2323
|
-
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2324
|
-
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2325
|
-
findKeyPosition: () => findKeyPosition,
|
|
2326
|
-
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2327
|
-
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2328
|
-
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2329
|
-
stringIncludesAny: () => stringIncludesAny,
|
|
2330
|
-
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2331
|
-
});
|
|
2332
|
-
module2.exports = __toCommonJS22(string_exports);
|
|
2333
|
-
var stringIncludesAny = (str, characters) => {
|
|
2334
|
-
for (const char of characters) {
|
|
2335
|
-
if (str.includes(char)) {
|
|
2336
|
-
return true;
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
return false;
|
|
2340
|
-
};
|
|
2341
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
2342
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2343
|
-
return str.replace(pattern, "");
|
|
2344
|
-
};
|
|
2345
|
-
var brackRegex = {
|
|
2346
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2347
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2348
|
-
};
|
|
2349
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2350
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2351
|
-
return str;
|
|
2352
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
2353
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
2354
|
-
if (parentPath) {
|
|
2355
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2356
|
-
let parentState = state;
|
|
2357
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
2358
|
-
parentState = parentState.parent;
|
|
2359
|
-
if (!parentState) {
|
|
2360
|
-
return "";
|
|
2361
|
-
}
|
|
2362
|
-
}
|
|
2363
|
-
const value = parentState[variable.trim()];
|
|
2364
|
-
return value !== void 0 ? `${value}` : "";
|
|
2365
|
-
} else {
|
|
2366
|
-
const value = state[variable.trim()];
|
|
2367
|
-
return value !== void 0 ? `${value}` : "";
|
|
2368
|
-
}
|
|
2369
|
-
});
|
|
2370
|
-
};
|
|
2371
|
-
var lowercaseFirstLetter = (inputString) => {
|
|
2372
|
-
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2373
|
-
};
|
|
2374
|
-
var findKeyPosition = (str, key) => {
|
|
2375
|
-
const lines = str.split("\n");
|
|
2376
|
-
let startLineNumber = -1;
|
|
2377
|
-
let endLineNumber = -1;
|
|
2378
|
-
let startColumn = -1;
|
|
2379
|
-
let endColumn = -1;
|
|
2380
|
-
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2381
|
-
let braceCount = 0;
|
|
2382
|
-
let foundKey = false;
|
|
2383
|
-
for (let i = 0; i < lines.length; i++) {
|
|
2384
|
-
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2385
|
-
foundKey = true;
|
|
2386
|
-
startLineNumber = i + 1;
|
|
2387
|
-
startColumn = lines[i].indexOf(key) + 1;
|
|
2388
|
-
if (lines[i].includes("{}")) {
|
|
2389
|
-
endLineNumber = startLineNumber;
|
|
2390
|
-
endColumn = lines[i].indexOf("{}") + 3;
|
|
2391
|
-
break;
|
|
2392
|
-
}
|
|
2393
|
-
const line = lines[i].slice(startColumn + key.length);
|
|
2394
|
-
if (line.includes("{") || line.includes("[")) {
|
|
2395
|
-
braceCount = 1;
|
|
2396
|
-
} else {
|
|
2397
|
-
endLineNumber = i + 1;
|
|
2398
|
-
endColumn = lines[i].length + 1;
|
|
2399
|
-
break;
|
|
2400
|
-
}
|
|
2401
|
-
} else if (foundKey) {
|
|
2402
|
-
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2403
|
-
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2404
|
-
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2405
|
-
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2406
|
-
if (braceCount === 0) {
|
|
2407
|
-
endLineNumber = i + 1;
|
|
2408
|
-
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2409
|
-
break;
|
|
2410
|
-
}
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
2413
|
-
return {
|
|
2414
|
-
startColumn,
|
|
2415
|
-
endColumn,
|
|
2416
|
-
startLineNumber,
|
|
2417
|
-
endLineNumber
|
|
2418
|
-
};
|
|
2419
|
-
};
|
|
2420
|
-
var replaceOctalEscapeSequences = (str) => {
|
|
2421
|
-
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2422
|
-
return str.replace(octalRegex, (match, p1) => {
|
|
2423
|
-
const octalValue = parseInt(p1, 8);
|
|
2424
|
-
const char = String.fromCharCode(octalValue);
|
|
2425
|
-
return char;
|
|
2426
|
-
});
|
|
2427
|
-
};
|
|
2428
|
-
var customEncodeURIComponent = (str) => {
|
|
2429
|
-
return str.split("").map((char) => {
|
|
2430
|
-
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2431
|
-
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2432
|
-
}
|
|
2433
|
-
return char;
|
|
2434
|
-
}).join("");
|
|
2435
|
-
};
|
|
2436
|
-
var customDecodeURIComponent = (encodedStr) => {
|
|
2437
|
-
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2438
|
-
};
|
|
2439
|
-
}
|
|
2440
|
-
});
|
|
2441
|
-
var require_object2 = __commonJS2({
|
|
2442
|
-
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2443
|
-
"use strict";
|
|
2444
|
-
var __defProp22 = Object.defineProperty;
|
|
2445
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2446
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2447
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2448
|
-
var __export22 = (target, all) => {
|
|
2449
|
-
for (var name in all)
|
|
2450
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2451
|
-
};
|
|
2452
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2453
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2454
|
-
for (let key of __getOwnPropNames22(from))
|
|
2455
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2456
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2457
|
-
}
|
|
2458
|
-
return to;
|
|
2459
|
-
};
|
|
2460
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2461
|
-
var object_exports = {};
|
|
2462
|
-
__export22(object_exports, {
|
|
2463
|
-
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2464
|
-
clone: () => clone,
|
|
2465
|
-
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2466
|
-
deepClone: () => deepClone2,
|
|
2467
|
-
deepCloneExclude: () => deepCloneExclude,
|
|
2468
|
-
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2469
|
-
deepContains: () => deepContains,
|
|
2470
|
-
deepDestringify: () => deepDestringify,
|
|
2471
|
-
deepDiff: () => deepDiff,
|
|
2472
|
-
deepMerge: () => deepMerge2,
|
|
2473
|
-
deepStringify: () => deepStringify,
|
|
2474
|
-
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2475
|
-
diff: () => diff,
|
|
2476
|
-
diffArrays: () => diffArrays,
|
|
2477
|
-
diffObjects: () => diffObjects,
|
|
2478
|
-
exec: () => exec,
|
|
2479
|
-
flattenRecursive: () => flattenRecursive,
|
|
2480
|
-
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2481
|
-
getExtendsInElement: () => getExtendsInElement,
|
|
2482
|
-
hasOwnProperty: () => hasOwnProperty,
|
|
2483
|
-
isEmpty: () => isEmpty,
|
|
2484
|
-
isEmptyObject: () => isEmptyObject,
|
|
2485
|
-
isEqualDeep: () => isEqualDeep,
|
|
2486
|
-
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2487
|
-
map: () => map,
|
|
2488
|
-
merge: () => merge,
|
|
2489
|
-
mergeArrayExclude: () => mergeArrayExclude,
|
|
2490
|
-
mergeIfExisted: () => mergeIfExisted,
|
|
2491
|
-
objectToString: () => objectToString,
|
|
2492
|
-
overwrite: () => overwrite,
|
|
2493
|
-
overwriteDeep: () => overwriteDeep,
|
|
2494
|
-
overwriteShallow: () => overwriteShallow,
|
|
2495
|
-
removeFromObject: () => removeFromObject,
|
|
2496
|
-
stringToObject: () => stringToObject
|
|
2497
|
-
});
|
|
2498
|
-
module2.exports = __toCommonJS22(object_exports);
|
|
2499
|
-
var import_globals2 = require_globals2();
|
|
2500
|
-
var import_types = require_types2();
|
|
2501
|
-
var import_array = require_array2();
|
|
2502
|
-
var import_string = require_string2();
|
|
2503
|
-
var exec = (param, element, state, context) => {
|
|
2504
|
-
if ((0, import_types.isFunction)(param)) {
|
|
2505
|
-
return param(
|
|
2506
|
-
element,
|
|
2507
|
-
state || element.state,
|
|
2508
|
-
context || element.context
|
|
2509
|
-
);
|
|
2510
|
-
}
|
|
2511
|
-
return param;
|
|
2512
|
-
};
|
|
2513
|
-
var map = (obj, extention, element) => {
|
|
2514
|
-
for (const e in extention) {
|
|
2515
|
-
obj[e] = exec(extention[e], element);
|
|
2516
|
-
}
|
|
2517
|
-
};
|
|
2518
|
-
var merge = (element, obj, excludeFrom = []) => {
|
|
2519
|
-
for (const e in obj) {
|
|
2520
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2521
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2522
|
-
continue;
|
|
2523
|
-
const elementProp = element[e];
|
|
2524
|
-
const objProp = obj[e];
|
|
2525
|
-
if (elementProp === void 0) {
|
|
2526
|
-
element[e] = objProp;
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
return element;
|
|
2530
|
-
};
|
|
2531
|
-
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2532
|
-
for (const e in extend) {
|
|
2533
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2534
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2535
|
-
continue;
|
|
2536
|
-
const elementProp = element[e];
|
|
2537
|
-
const extendProp = extend[e];
|
|
2538
|
-
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2539
|
-
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2540
|
-
} else if (elementProp === void 0) {
|
|
2541
|
-
element[e] = extendProp;
|
|
2542
|
-
}
|
|
2543
|
-
}
|
|
2544
|
-
return element;
|
|
2545
|
-
};
|
|
2546
|
-
var clone = (obj, excludeFrom = []) => {
|
|
2547
|
-
const o = {};
|
|
2548
|
-
for (const prop in obj) {
|
|
2549
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2550
|
-
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2551
|
-
continue;
|
|
2552
|
-
o[prop] = obj[prop];
|
|
2553
|
-
}
|
|
2554
|
-
return o;
|
|
2555
|
-
};
|
|
2556
|
-
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2557
|
-
if ((0, import_types.isArray)(obj)) {
|
|
2558
|
-
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2559
|
-
}
|
|
2560
|
-
const o = {};
|
|
2561
|
-
for (const k in obj) {
|
|
2562
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2563
|
-
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2564
|
-
continue;
|
|
2565
|
-
let v = obj[k];
|
|
2566
|
-
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2567
|
-
v = mergeArrayExclude(v, excludeFrom);
|
|
2568
|
-
}
|
|
2569
|
-
if ((0, import_types.isArray)(v)) {
|
|
2570
|
-
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2571
|
-
} else if ((0, import_types.isObject)(v)) {
|
|
2572
|
-
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2573
|
-
} else
|
|
2574
|
-
o[k] = v;
|
|
2575
|
-
}
|
|
2576
|
-
return o;
|
|
2577
|
-
};
|
|
2578
|
-
var mergeArrayExclude = (arr, excl = []) => {
|
|
2579
|
-
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2580
|
-
};
|
|
2581
|
-
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2582
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2583
|
-
for (const prop in obj) {
|
|
2584
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2585
|
-
continue;
|
|
2586
|
-
if (prop === "__proto__")
|
|
2587
|
-
continue;
|
|
2588
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2589
|
-
continue;
|
|
2590
|
-
let objProp = obj[prop];
|
|
2591
|
-
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2592
|
-
continue;
|
|
2593
|
-
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2594
|
-
objProp = (0, import_array.mergeArray)(objProp);
|
|
2595
|
-
}
|
|
2596
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2597
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2598
|
-
} else
|
|
2599
|
-
o[prop] = objProp;
|
|
2600
|
-
}
|
|
2601
|
-
return o;
|
|
2602
|
-
};
|
|
2603
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2604
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2605
|
-
for (const prop in obj) {
|
|
2606
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2607
|
-
continue;
|
|
2608
|
-
const objProp = obj[prop];
|
|
2609
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2610
|
-
continue;
|
|
2611
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2612
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2613
|
-
} else
|
|
2614
|
-
o[prop] = objProp;
|
|
2615
|
-
}
|
|
2616
|
-
return o;
|
|
2617
|
-
};
|
|
2618
|
-
var deepStringify = (obj, stringified = {}) => {
|
|
2619
|
-
for (const prop in obj) {
|
|
2620
|
-
const objProp = obj[prop];
|
|
2621
|
-
if ((0, import_types.isFunction)(objProp)) {
|
|
2622
|
-
stringified[prop] = objProp.toString();
|
|
2623
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2624
|
-
stringified[prop] = {};
|
|
2625
|
-
deepStringify(objProp, stringified[prop]);
|
|
2626
|
-
} else if ((0, import_types.isArray)(objProp)) {
|
|
2627
|
-
stringified[prop] = [];
|
|
2628
|
-
objProp.forEach((v, i) => {
|
|
2629
|
-
if ((0, import_types.isObject)(v)) {
|
|
2630
|
-
stringified[prop][i] = {};
|
|
2631
|
-
deepStringify(v, stringified[prop][i]);
|
|
2632
|
-
} else if ((0, import_types.isFunction)(v)) {
|
|
2633
|
-
stringified[prop][i] = v.toString();
|
|
1983
|
+
var require_string2 = __commonJS2({
|
|
1984
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports2, module22) {
|
|
1985
|
+
"use strict";
|
|
1986
|
+
var __defProp22 = Object.defineProperty;
|
|
1987
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1988
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1989
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1990
|
+
var __export22 = (target, all) => {
|
|
1991
|
+
for (var name in all)
|
|
1992
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1993
|
+
};
|
|
1994
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1995
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1996
|
+
for (let key of __getOwnPropNames22(from))
|
|
1997
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1998
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1999
|
+
}
|
|
2000
|
+
return to;
|
|
2001
|
+
};
|
|
2002
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2003
|
+
var string_exports = {};
|
|
2004
|
+
__export22(string_exports, {
|
|
2005
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2006
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2007
|
+
findKeyPosition: () => findKeyPosition,
|
|
2008
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2009
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2010
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2011
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
2012
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2013
|
+
});
|
|
2014
|
+
module22.exports = __toCommonJS22(string_exports);
|
|
2015
|
+
var stringIncludesAny = (str, characters) => {
|
|
2016
|
+
for (const char of characters) {
|
|
2017
|
+
if (str.includes(char)) {
|
|
2018
|
+
return true;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
return false;
|
|
2022
|
+
};
|
|
2023
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
2024
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2025
|
+
return str.replace(pattern, "");
|
|
2026
|
+
};
|
|
2027
|
+
var brackRegex = {
|
|
2028
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2029
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2030
|
+
};
|
|
2031
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2032
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2033
|
+
return str;
|
|
2034
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
2035
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
2036
|
+
if (parentPath) {
|
|
2037
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2038
|
+
let parentState = state;
|
|
2039
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
2040
|
+
parentState = parentState.parent;
|
|
2041
|
+
if (!parentState) {
|
|
2042
|
+
return "";
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
const value = parentState[variable.trim()];
|
|
2046
|
+
return value !== void 0 ? `${value}` : "";
|
|
2634
2047
|
} else {
|
|
2635
|
-
|
|
2048
|
+
const value = state[variable.trim()];
|
|
2049
|
+
return value !== void 0 ? `${value}` : "";
|
|
2636
2050
|
}
|
|
2637
2051
|
});
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2052
|
+
};
|
|
2053
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
2054
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2055
|
+
};
|
|
2056
|
+
var findKeyPosition = (str, key) => {
|
|
2057
|
+
const lines = str.split("\n");
|
|
2058
|
+
let startLineNumber = -1;
|
|
2059
|
+
let endLineNumber = -1;
|
|
2060
|
+
let startColumn = -1;
|
|
2061
|
+
let endColumn = -1;
|
|
2062
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2063
|
+
let braceCount = 0;
|
|
2064
|
+
let foundKey = false;
|
|
2065
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2066
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2067
|
+
foundKey = true;
|
|
2068
|
+
startLineNumber = i + 1;
|
|
2069
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
2070
|
+
if (lines[i].includes("{}")) {
|
|
2071
|
+
endLineNumber = startLineNumber;
|
|
2072
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
2073
|
+
break;
|
|
2074
|
+
}
|
|
2075
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
2076
|
+
if (line.includes("{") || line.includes("[")) {
|
|
2077
|
+
braceCount = 1;
|
|
2078
|
+
} else {
|
|
2079
|
+
endLineNumber = i + 1;
|
|
2080
|
+
endColumn = lines[i].length + 1;
|
|
2081
|
+
break;
|
|
2082
|
+
}
|
|
2083
|
+
} else if (foundKey) {
|
|
2084
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2085
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2086
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2087
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2088
|
+
if (braceCount === 0) {
|
|
2089
|
+
endLineNumber = i + 1;
|
|
2090
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2091
|
+
break;
|
|
2092
|
+
}
|
|
2663
2093
|
}
|
|
2664
2094
|
}
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2095
|
+
return {
|
|
2096
|
+
startColumn,
|
|
2097
|
+
endColumn,
|
|
2098
|
+
startLineNumber,
|
|
2099
|
+
endLineNumber
|
|
2100
|
+
};
|
|
2101
|
+
};
|
|
2102
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
2103
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2104
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
2105
|
+
const octalValue = parseInt(p1, 8);
|
|
2106
|
+
const char = String.fromCharCode(octalValue);
|
|
2107
|
+
return char;
|
|
2108
|
+
});
|
|
2109
|
+
};
|
|
2110
|
+
var customEncodeURIComponent = (str) => {
|
|
2111
|
+
return str.split("").map((char) => {
|
|
2112
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2113
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2114
|
+
}
|
|
2115
|
+
return char;
|
|
2116
|
+
}).join("");
|
|
2117
|
+
};
|
|
2118
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
2119
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2120
|
+
};
|
|
2674
2121
|
}
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2122
|
+
});
|
|
2123
|
+
var require_object2 = __commonJS2({
|
|
2124
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports2, module22) {
|
|
2125
|
+
"use strict";
|
|
2126
|
+
var __defProp22 = Object.defineProperty;
|
|
2127
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2128
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2129
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2130
|
+
var __export22 = (target, all) => {
|
|
2131
|
+
for (var name in all)
|
|
2132
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2133
|
+
};
|
|
2134
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2135
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2136
|
+
for (let key of __getOwnPropNames22(from))
|
|
2137
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2138
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2139
|
+
}
|
|
2140
|
+
return to;
|
|
2141
|
+
};
|
|
2142
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2143
|
+
var object_exports = {};
|
|
2144
|
+
__export22(object_exports, {
|
|
2145
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2146
|
+
clone: () => clone,
|
|
2147
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2148
|
+
deepClone: () => deepClone2,
|
|
2149
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
2150
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2151
|
+
deepContains: () => deepContains,
|
|
2152
|
+
deepDestringify: () => deepDestringify,
|
|
2153
|
+
deepDiff: () => deepDiff,
|
|
2154
|
+
deepMerge: () => deepMerge2,
|
|
2155
|
+
deepStringify: () => deepStringify,
|
|
2156
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2157
|
+
diff: () => diff,
|
|
2158
|
+
diffArrays: () => diffArrays,
|
|
2159
|
+
diffObjects: () => diffObjects,
|
|
2160
|
+
exec: () => exec,
|
|
2161
|
+
flattenRecursive: () => flattenRecursive,
|
|
2162
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2163
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
2164
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
2165
|
+
isEmpty: () => isEmpty,
|
|
2166
|
+
isEmptyObject: () => isEmptyObject,
|
|
2167
|
+
isEqualDeep: () => isEqualDeep,
|
|
2168
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2169
|
+
map: () => map,
|
|
2170
|
+
merge: () => merge,
|
|
2171
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2172
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2173
|
+
objectToString: () => objectToString,
|
|
2174
|
+
overwrite: () => overwrite,
|
|
2175
|
+
overwriteDeep: () => overwriteDeep,
|
|
2176
|
+
overwriteShallow: () => overwriteShallow,
|
|
2177
|
+
removeFromObject: () => removeFromObject,
|
|
2178
|
+
stringToObject: () => stringToObject
|
|
2179
|
+
});
|
|
2180
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
2181
|
+
var import_globals2 = require_globals2();
|
|
2182
|
+
var import_types = require_types2();
|
|
2183
|
+
var import_array = require_array2();
|
|
2184
|
+
var import_string = require_string2();
|
|
2185
|
+
var exec = (param, element, state, context) => {
|
|
2186
|
+
if ((0, import_types.isFunction)(param)) {
|
|
2187
|
+
return param(
|
|
2188
|
+
element,
|
|
2189
|
+
state || element.state,
|
|
2190
|
+
context || element.context
|
|
2191
|
+
);
|
|
2192
|
+
}
|
|
2193
|
+
return param;
|
|
2194
|
+
};
|
|
2195
|
+
var map = (obj, extention, element) => {
|
|
2196
|
+
for (const e in extention) {
|
|
2197
|
+
obj[e] = exec(extention[e], element);
|
|
2198
|
+
}
|
|
2199
|
+
};
|
|
2200
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
2201
|
+
for (const e in obj) {
|
|
2202
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2203
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2204
|
+
continue;
|
|
2205
|
+
const elementProp = element[e];
|
|
2206
|
+
const objProp = obj[e];
|
|
2207
|
+
if (elementProp === void 0) {
|
|
2208
|
+
element[e] = objProp;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
return element;
|
|
2212
|
+
};
|
|
2213
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2214
|
+
for (const e in extend) {
|
|
2215
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2216
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2217
|
+
continue;
|
|
2218
|
+
const elementProp = element[e];
|
|
2219
|
+
const extendProp = extend[e];
|
|
2220
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2221
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2222
|
+
} else if (elementProp === void 0) {
|
|
2223
|
+
element[e] = extendProp;
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
return element;
|
|
2227
|
+
};
|
|
2228
|
+
var clone = (obj, excludeFrom = []) => {
|
|
2229
|
+
const o = {};
|
|
2230
|
+
for (const prop in obj) {
|
|
2231
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2232
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2233
|
+
continue;
|
|
2234
|
+
o[prop] = obj[prop];
|
|
2235
|
+
}
|
|
2236
|
+
return o;
|
|
2237
|
+
};
|
|
2238
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2239
|
+
if ((0, import_types.isArray)(obj)) {
|
|
2240
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2241
|
+
}
|
|
2242
|
+
const o = {};
|
|
2243
|
+
for (const k in obj) {
|
|
2244
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2245
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2246
|
+
continue;
|
|
2247
|
+
let v = obj[k];
|
|
2248
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2249
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
2250
|
+
}
|
|
2251
|
+
if ((0, import_types.isArray)(v)) {
|
|
2252
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2253
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
2254
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2255
|
+
} else
|
|
2256
|
+
o[k] = v;
|
|
2257
|
+
}
|
|
2258
|
+
return o;
|
|
2259
|
+
};
|
|
2260
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
2261
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2262
|
+
};
|
|
2263
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2264
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2265
|
+
for (const prop in obj) {
|
|
2266
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2267
|
+
continue;
|
|
2268
|
+
if (prop === "__proto__")
|
|
2269
|
+
continue;
|
|
2270
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2271
|
+
continue;
|
|
2272
|
+
let objProp = obj[prop];
|
|
2273
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2274
|
+
continue;
|
|
2275
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2276
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
2277
|
+
}
|
|
2278
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2279
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2280
|
+
} else
|
|
2281
|
+
o[prop] = objProp;
|
|
2282
|
+
}
|
|
2283
|
+
return o;
|
|
2284
|
+
};
|
|
2285
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2286
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
2287
|
+
for (const prop in obj) {
|
|
2288
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2289
|
+
continue;
|
|
2290
|
+
const objProp = obj[prop];
|
|
2291
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2292
|
+
continue;
|
|
2293
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2294
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2295
|
+
} else
|
|
2296
|
+
o[prop] = objProp;
|
|
2297
|
+
}
|
|
2298
|
+
return o;
|
|
2299
|
+
};
|
|
2300
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
2301
|
+
for (const prop in obj) {
|
|
2302
|
+
const objProp = obj[prop];
|
|
2303
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
2304
|
+
stringified[prop] = objProp.toString();
|
|
2305
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2306
|
+
stringified[prop] = {};
|
|
2307
|
+
deepStringify(objProp, stringified[prop]);
|
|
2308
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2309
|
+
stringified[prop] = [];
|
|
2310
|
+
objProp.forEach((v, i) => {
|
|
2311
|
+
if ((0, import_types.isObject)(v)) {
|
|
2312
|
+
stringified[prop][i] = {};
|
|
2313
|
+
deepStringify(v, stringified[prop][i]);
|
|
2314
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
2315
|
+
stringified[prop][i] = v.toString();
|
|
2316
|
+
} else {
|
|
2317
|
+
stringified[prop][i] = v;
|
|
2318
|
+
}
|
|
2319
|
+
});
|
|
2694
2320
|
} else {
|
|
2695
|
-
|
|
2321
|
+
stringified[prop] = objProp;
|
|
2696
2322
|
}
|
|
2697
|
-
}
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
}
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2323
|
+
}
|
|
2324
|
+
return stringified;
|
|
2325
|
+
};
|
|
2326
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
2327
|
+
const spaces = " ".repeat(indent);
|
|
2328
|
+
let str = "{\n";
|
|
2329
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
2330
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2331
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2332
|
+
str += `${spaces} ${stringedKey}: `;
|
|
2333
|
+
if ((0, import_types.isArray)(value)) {
|
|
2334
|
+
str += "[\n";
|
|
2335
|
+
for (const element of value) {
|
|
2336
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2337
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2338
|
+
`;
|
|
2339
|
+
} else if ((0, import_types.isString)(element)) {
|
|
2340
|
+
str += `${spaces} '${element}',
|
|
2341
|
+
`;
|
|
2342
|
+
} else {
|
|
2343
|
+
str += `${spaces} ${element},
|
|
2344
|
+
`;
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
str += `${spaces} ]`;
|
|
2348
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2349
|
+
str += objectToString(value, indent + 1);
|
|
2350
|
+
} else if ((0, import_types.isString)(value)) {
|
|
2351
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2352
|
+
} else {
|
|
2353
|
+
str += value;
|
|
2718
2354
|
}
|
|
2719
|
-
|
|
2720
|
-
destringified[prop] = objProp;
|
|
2355
|
+
str += ",\n";
|
|
2721
2356
|
}
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2357
|
+
str += `${spaces}}`;
|
|
2358
|
+
return str;
|
|
2359
|
+
};
|
|
2360
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
2361
|
+
for (const prop in obj) {
|
|
2362
|
+
const objProp = obj[prop];
|
|
2363
|
+
if ((0, import_types.isFunction)(objProp))
|
|
2364
|
+
continue;
|
|
2365
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
2366
|
+
detached[prop] = {};
|
|
2367
|
+
deepStringify(objProp, detached[prop]);
|
|
2368
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2369
|
+
detached[prop] = [];
|
|
2370
|
+
objProp.forEach((v, i) => {
|
|
2371
|
+
if ((0, import_types.isFunction)(v))
|
|
2372
|
+
return;
|
|
2373
|
+
if ((0, import_types.isObject)(v)) {
|
|
2374
|
+
detached[prop][i] = {};
|
|
2375
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
2376
|
+
} else {
|
|
2377
|
+
detached[prop][i] = v;
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2380
|
+
} else {
|
|
2381
|
+
detached[prop] = objProp;
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
return detached;
|
|
2385
|
+
};
|
|
2386
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
2387
|
+
for (const prop in obj) {
|
|
2388
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2389
|
+
if (!hasOwnProperty2)
|
|
2390
|
+
continue;
|
|
2391
|
+
const objProp = obj[prop];
|
|
2392
|
+
if ((0, import_types.isString)(objProp)) {
|
|
2393
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2727
2394
|
try {
|
|
2728
|
-
const evalProp = import_globals2.window.eval(`(${
|
|
2729
|
-
destringified[prop]
|
|
2395
|
+
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2396
|
+
destringified[prop] = evalProp;
|
|
2730
2397
|
} catch (e) {
|
|
2731
2398
|
if (e)
|
|
2732
|
-
destringified[prop]
|
|
2399
|
+
destringified[prop] = objProp;
|
|
2733
2400
|
}
|
|
2734
2401
|
} else {
|
|
2735
|
-
destringified[prop]
|
|
2402
|
+
destringified[prop] = objProp;
|
|
2736
2403
|
}
|
|
2737
|
-
} else if ((0, import_types.
|
|
2738
|
-
destringified[prop]
|
|
2404
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2405
|
+
destringified[prop] = [];
|
|
2406
|
+
objProp.forEach((arrProp) => {
|
|
2407
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
2408
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2409
|
+
try {
|
|
2410
|
+
const evalProp = import_globals2.window.eval(`(${arrProp})`);
|
|
2411
|
+
destringified[prop].push(evalProp);
|
|
2412
|
+
} catch (e) {
|
|
2413
|
+
if (e)
|
|
2414
|
+
destringified[prop].push(arrProp);
|
|
2415
|
+
}
|
|
2416
|
+
} else {
|
|
2417
|
+
destringified[prop].push(arrProp);
|
|
2418
|
+
}
|
|
2419
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2420
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
2421
|
+
} else {
|
|
2422
|
+
destringified[prop].push(arrProp);
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2426
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2739
2427
|
} else {
|
|
2740
|
-
destringified[prop]
|
|
2428
|
+
destringified[prop] = objProp;
|
|
2741
2429
|
}
|
|
2742
|
-
});
|
|
2743
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2744
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2745
|
-
} else {
|
|
2746
|
-
destringified[prop] = objProp;
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
return destringified;
|
|
2750
|
-
};
|
|
2751
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2752
|
-
try {
|
|
2753
|
-
return import_globals2.window.eval("(" + str + ")");
|
|
2754
|
-
} catch (e) {
|
|
2755
|
-
if (opts.verbose)
|
|
2756
|
-
console.warn(e);
|
|
2757
|
-
}
|
|
2758
|
-
};
|
|
2759
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
2760
|
-
for (const e in objToDiff) {
|
|
2761
|
-
if (e === "ref")
|
|
2762
|
-
continue;
|
|
2763
|
-
const originalProp = original[e];
|
|
2764
|
-
const objToDiffProp = objToDiff[e];
|
|
2765
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2766
|
-
cache[e] = {};
|
|
2767
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
2768
|
-
} else if (objToDiffProp !== void 0) {
|
|
2769
|
-
cache[e] = objToDiffProp;
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
return cache;
|
|
2773
|
-
};
|
|
2774
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
2775
|
-
if (original.length !== objToDiff.length) {
|
|
2776
|
-
cache = objToDiff;
|
|
2777
|
-
} else {
|
|
2778
|
-
const diffArr = [];
|
|
2779
|
-
for (let i = 0; i < original.length; i++) {
|
|
2780
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
2781
|
-
if (Object.keys(diffObj).length > 0) {
|
|
2782
|
-
diffArr.push(diffObj);
|
|
2783
2430
|
}
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
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
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2431
|
+
return destringified;
|
|
2432
|
+
};
|
|
2433
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2434
|
+
try {
|
|
2435
|
+
return import_globals2.window.eval("(" + str + ")");
|
|
2436
|
+
} catch (e) {
|
|
2437
|
+
if (opts.verbose)
|
|
2438
|
+
console.warn(e);
|
|
2439
|
+
}
|
|
2440
|
+
};
|
|
2441
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
2442
|
+
for (const e in objToDiff) {
|
|
2443
|
+
if (e === "ref")
|
|
2444
|
+
continue;
|
|
2445
|
+
const originalProp = original[e];
|
|
2446
|
+
const objToDiffProp = objToDiff[e];
|
|
2447
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2448
|
+
cache[e] = {};
|
|
2449
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
2450
|
+
} else if (objToDiffProp !== void 0) {
|
|
2451
|
+
cache[e] = objToDiffProp;
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
return cache;
|
|
2455
|
+
};
|
|
2456
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
2457
|
+
if (original.length !== objToDiff.length) {
|
|
2458
|
+
cache = objToDiff;
|
|
2459
|
+
} else {
|
|
2460
|
+
const diffArr = [];
|
|
2461
|
+
for (let i = 0; i < original.length; i++) {
|
|
2462
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
2463
|
+
if (Object.keys(diffObj).length > 0) {
|
|
2464
|
+
diffArr.push(diffObj);
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
if (diffArr.length > 0) {
|
|
2468
|
+
cache = diffArr;
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
return cache;
|
|
2472
|
+
};
|
|
2473
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
2474
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2475
|
+
cache = [];
|
|
2476
|
+
diffArrays(original, objToDiff, cache);
|
|
2477
|
+
} else {
|
|
2478
|
+
diffObjects(original, objToDiff, cache);
|
|
2479
|
+
}
|
|
2480
|
+
return cache;
|
|
2481
|
+
};
|
|
2482
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2483
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2484
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2485
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2486
|
+
var deepDiff = (lhs, rhs) => {
|
|
2487
|
+
if (lhs === rhs)
|
|
2488
|
+
return {};
|
|
2489
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2490
|
+
return rhs;
|
|
2491
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2492
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
2493
|
+
acc[key] = void 0;
|
|
2494
|
+
}
|
|
2495
|
+
return acc;
|
|
2496
|
+
}, makeObjectWithoutPrototype());
|
|
2497
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2498
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
2499
|
+
return {};
|
|
2500
|
+
return rhs;
|
|
2501
|
+
}
|
|
2502
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
2503
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
2504
|
+
acc[key] = rhs[key];
|
|
2505
|
+
return acc;
|
|
2506
|
+
}
|
|
2507
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
2508
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2509
|
+
return acc;
|
|
2510
|
+
}
|
|
2511
|
+
acc[key] = difference;
|
|
2512
|
+
return acc;
|
|
2513
|
+
}, deletedValues);
|
|
2514
|
+
};
|
|
2515
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
2516
|
+
const { ref } = element;
|
|
2517
|
+
const changes = {};
|
|
2518
|
+
for (const e in params) {
|
|
2519
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2520
|
+
continue;
|
|
2521
|
+
const elementProp = element[e];
|
|
2522
|
+
const paramsProp = params[e];
|
|
2523
|
+
if (paramsProp) {
|
|
2524
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
2525
|
+
ref[e] = paramsProp;
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
return changes;
|
|
2529
|
+
};
|
|
2530
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2531
|
+
for (const e in params) {
|
|
2532
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2533
|
+
continue;
|
|
2534
|
+
obj[e] = params[e];
|
|
2535
|
+
}
|
|
2536
|
+
return obj;
|
|
2537
|
+
};
|
|
2538
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2539
|
+
for (const e in params) {
|
|
2540
|
+
if (e === "__proto__")
|
|
2541
|
+
continue;
|
|
2542
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2543
|
+
continue;
|
|
2544
|
+
const objProp = obj[e];
|
|
2545
|
+
const paramsProp = params[e];
|
|
2546
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2547
|
+
overwriteDeep(objProp, paramsProp);
|
|
2548
|
+
} else if (paramsProp !== void 0) {
|
|
2549
|
+
obj[e] = paramsProp;
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
return obj;
|
|
2553
|
+
};
|
|
2554
|
+
var mergeIfExisted = (a, b) => {
|
|
2555
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2556
|
+
return deepMerge2(a, b);
|
|
2557
|
+
return a || b;
|
|
2558
|
+
};
|
|
2559
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
2560
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2561
|
+
stack.push(objectized);
|
|
2562
|
+
const extendOfExtend = objectized[prop];
|
|
2563
|
+
if (extendOfExtend)
|
|
2564
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
2565
|
+
delete objectized[prop];
|
|
2566
|
+
return stack;
|
|
2567
|
+
};
|
|
2568
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2569
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2570
|
+
return param === element;
|
|
2571
|
+
}
|
|
2572
|
+
if (visited.has(param) || visited.has(element)) {
|
|
2573
|
+
return true;
|
|
2574
|
+
}
|
|
2575
|
+
visited.add(param);
|
|
2576
|
+
visited.add(element);
|
|
2577
|
+
const keysParam = Object.keys(param);
|
|
2578
|
+
const keysElement = Object.keys(element);
|
|
2579
|
+
if (keysParam.length !== keysElement.length) {
|
|
2919
2580
|
return false;
|
|
2920
2581
|
}
|
|
2921
|
-
for (
|
|
2922
|
-
if (!
|
|
2582
|
+
for (const key of keysParam) {
|
|
2583
|
+
if (!keysElement.includes(key)) {
|
|
2923
2584
|
return false;
|
|
2924
2585
|
}
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2929
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2586
|
+
const paramProp = param[key];
|
|
2587
|
+
const elementProp = element[key];
|
|
2588
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2930
2589
|
return false;
|
|
2931
2590
|
}
|
|
2932
2591
|
}
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2956
|
-
for (const key in obj) {
|
|
2957
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2958
|
-
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2959
|
-
}
|
|
2960
|
-
}
|
|
2961
|
-
return newObj;
|
|
2962
|
-
};
|
|
2963
|
-
var checkIfKeyIsComponent = (key) => {
|
|
2964
|
-
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2965
|
-
if (!isFirstKeyString)
|
|
2966
|
-
return;
|
|
2967
|
-
const firstCharKey = key.slice(0, 1);
|
|
2968
|
-
return /^[A-Z]*$/.test(firstCharKey);
|
|
2969
|
-
};
|
|
2970
|
-
var getChildrenComponentsByKey = (key, el) => {
|
|
2971
|
-
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2972
|
-
return el;
|
|
2973
|
-
}
|
|
2974
|
-
if (el.extend) {
|
|
2975
|
-
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2976
|
-
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2977
|
-
if (foundString || foundInArray)
|
|
2978
|
-
return el;
|
|
2979
|
-
}
|
|
2980
|
-
};
|
|
2981
|
-
var getExtendsInElement = (obj) => {
|
|
2982
|
-
let result = [];
|
|
2983
|
-
function traverse(o) {
|
|
2984
|
-
for (const key in o) {
|
|
2985
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
2986
|
-
if (checkIfKeyIsComponent(key)) {
|
|
2987
|
-
result.push(key);
|
|
2988
|
-
}
|
|
2989
|
-
if (key === "extend") {
|
|
2990
|
-
if (typeof o[key] === "string") {
|
|
2991
|
-
result.push(o[key]);
|
|
2992
|
-
} else if (Array.isArray(o[key])) {
|
|
2993
|
-
result = result.concat(o[key]);
|
|
2592
|
+
return true;
|
|
2593
|
+
};
|
|
2594
|
+
var deepContains = (obj1, obj2) => {
|
|
2595
|
+
if (typeof obj1 !== typeof obj2) {
|
|
2596
|
+
return false;
|
|
2597
|
+
}
|
|
2598
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2599
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2600
|
+
if (obj1.length !== obj2.length) {
|
|
2601
|
+
return false;
|
|
2602
|
+
}
|
|
2603
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
2604
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
2605
|
+
return false;
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2609
|
+
for (const key in obj1) {
|
|
2610
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2611
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2612
|
+
return false;
|
|
2613
|
+
}
|
|
2994
2614
|
}
|
|
2995
2615
|
}
|
|
2996
|
-
|
|
2997
|
-
|
|
2616
|
+
} else {
|
|
2617
|
+
return obj2 === obj1;
|
|
2618
|
+
}
|
|
2619
|
+
return true;
|
|
2620
|
+
};
|
|
2621
|
+
var removeFromObject = (obj, props) => {
|
|
2622
|
+
if (props === void 0 || props === null)
|
|
2623
|
+
return obj;
|
|
2624
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
2625
|
+
delete obj[props];
|
|
2626
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
2627
|
+
props.forEach((prop) => delete obj[prop]);
|
|
2628
|
+
} else {
|
|
2629
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2630
|
+
}
|
|
2631
|
+
return obj;
|
|
2632
|
+
};
|
|
2633
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
2634
|
+
if (obj === null || typeof obj !== "object") {
|
|
2635
|
+
return obj;
|
|
2636
|
+
}
|
|
2637
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2638
|
+
for (const key in obj) {
|
|
2639
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2640
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
return newObj;
|
|
2644
|
+
};
|
|
2645
|
+
var checkIfKeyIsComponent = (key) => {
|
|
2646
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2647
|
+
if (!isFirstKeyString)
|
|
2648
|
+
return;
|
|
2649
|
+
const firstCharKey = key.slice(0, 1);
|
|
2650
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
2651
|
+
};
|
|
2652
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
2653
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2654
|
+
return el;
|
|
2655
|
+
}
|
|
2656
|
+
if (el.extend) {
|
|
2657
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2658
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2659
|
+
if (foundString || foundInArray)
|
|
2660
|
+
return el;
|
|
2661
|
+
}
|
|
2662
|
+
if (el.parent && el.parent.childExtend) {
|
|
2663
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
2664
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
2665
|
+
if (foundString || foundInArray)
|
|
2666
|
+
return el;
|
|
2667
|
+
}
|
|
2668
|
+
};
|
|
2669
|
+
var getExtendsInElement = (obj) => {
|
|
2670
|
+
let result = [];
|
|
2671
|
+
function traverse(o) {
|
|
2672
|
+
for (const key in o) {
|
|
2673
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
2674
|
+
if (checkIfKeyIsComponent(key)) {
|
|
2675
|
+
result.push(key);
|
|
2676
|
+
}
|
|
2677
|
+
if (key === "extend") {
|
|
2678
|
+
if (typeof o[key] === "string") {
|
|
2679
|
+
result.push(o[key]);
|
|
2680
|
+
} else if (Array.isArray(o[key])) {
|
|
2681
|
+
result = result.concat(o[key]);
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
2685
|
+
traverse(o[key]);
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2998
2688
|
}
|
|
2999
2689
|
}
|
|
2690
|
+
traverse(obj);
|
|
2691
|
+
return result;
|
|
2692
|
+
};
|
|
2693
|
+
}
|
|
2694
|
+
});
|
|
2695
|
+
var require_function2 = __commonJS2({
|
|
2696
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports2, module22) {
|
|
2697
|
+
"use strict";
|
|
2698
|
+
var __defProp22 = Object.defineProperty;
|
|
2699
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2700
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2701
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2702
|
+
var __export22 = (target, all) => {
|
|
2703
|
+
for (var name in all)
|
|
2704
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2705
|
+
};
|
|
2706
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2707
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2708
|
+
for (let key of __getOwnPropNames22(from))
|
|
2709
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2710
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2711
|
+
}
|
|
2712
|
+
return to;
|
|
2713
|
+
};
|
|
2714
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2715
|
+
var function_exports = {};
|
|
2716
|
+
__export22(function_exports, {
|
|
2717
|
+
debounce: () => debounce,
|
|
2718
|
+
debounceOnContext: () => debounceOnContext,
|
|
2719
|
+
isStringFunction: () => isStringFunction,
|
|
2720
|
+
memoize: () => memoize
|
|
2721
|
+
});
|
|
2722
|
+
module22.exports = __toCommonJS22(function_exports);
|
|
2723
|
+
function debounce(func, wait, immediate) {
|
|
2724
|
+
let timeout;
|
|
2725
|
+
return function() {
|
|
2726
|
+
const context = this;
|
|
2727
|
+
const args = arguments;
|
|
2728
|
+
const later = function() {
|
|
2729
|
+
timeout = null;
|
|
2730
|
+
if (!immediate)
|
|
2731
|
+
func.apply(context, args);
|
|
2732
|
+
};
|
|
2733
|
+
const callNow = immediate && !timeout;
|
|
2734
|
+
clearTimeout(timeout);
|
|
2735
|
+
timeout = setTimeout(later, wait);
|
|
2736
|
+
if (callNow)
|
|
2737
|
+
func.apply(context, args);
|
|
2738
|
+
};
|
|
3000
2739
|
}
|
|
2740
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2741
|
+
let timer;
|
|
2742
|
+
return (...args) => {
|
|
2743
|
+
clearTimeout(timer);
|
|
2744
|
+
timer = setTimeout(() => {
|
|
2745
|
+
func.apply(element, args);
|
|
2746
|
+
}, timeout);
|
|
2747
|
+
};
|
|
2748
|
+
};
|
|
2749
|
+
var memoize = (fn) => {
|
|
2750
|
+
const cache = {};
|
|
2751
|
+
return (...args) => {
|
|
2752
|
+
const n = args[0];
|
|
2753
|
+
if (n in cache) {
|
|
2754
|
+
return cache[n];
|
|
2755
|
+
} else {
|
|
2756
|
+
const result = fn(n);
|
|
2757
|
+
cache[n] = result;
|
|
2758
|
+
return result;
|
|
2759
|
+
}
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2762
|
+
var isStringFunction = (inputString) => {
|
|
2763
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2764
|
+
return functionRegex.test(inputString);
|
|
2765
|
+
};
|
|
3001
2766
|
}
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
var
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
2767
|
+
});
|
|
2768
|
+
var require_log2 = __commonJS2({
|
|
2769
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports2, module22) {
|
|
2770
|
+
"use strict";
|
|
2771
|
+
var __defProp22 = Object.defineProperty;
|
|
2772
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2773
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2774
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2775
|
+
var __export22 = (target, all) => {
|
|
2776
|
+
for (var name in all)
|
|
2777
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2778
|
+
};
|
|
2779
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2780
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2781
|
+
for (let key of __getOwnPropNames22(from))
|
|
2782
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2783
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2784
|
+
}
|
|
2785
|
+
return to;
|
|
2786
|
+
};
|
|
2787
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2788
|
+
var log_exports = {};
|
|
2789
|
+
__export22(log_exports, {
|
|
2790
|
+
logGroupIf: () => logGroupIf,
|
|
2791
|
+
logIf: () => logIf
|
|
2792
|
+
});
|
|
2793
|
+
module22.exports = __toCommonJS22(log_exports);
|
|
2794
|
+
var logIf = (bool, ...arg) => {
|
|
2795
|
+
if (bool)
|
|
2796
|
+
arg.map((v) => console.log(v));
|
|
2797
|
+
};
|
|
2798
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
2799
|
+
if (bool) {
|
|
2800
|
+
console.group(key);
|
|
2801
|
+
arg.map((v) => console.log(v));
|
|
2802
|
+
console.groupEnd(key);
|
|
2803
|
+
}
|
|
2804
|
+
};
|
|
3023
2805
|
}
|
|
3024
|
-
return to;
|
|
3025
|
-
};
|
|
3026
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3027
|
-
var function_exports = {};
|
|
3028
|
-
__export22(function_exports, {
|
|
3029
|
-
debounce: () => debounce,
|
|
3030
|
-
debounceOnContext: () => debounceOnContext,
|
|
3031
|
-
isStringFunction: () => isStringFunction,
|
|
3032
|
-
memoize: () => memoize
|
|
3033
2806
|
});
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
2807
|
+
var require_cookie2 = __commonJS2({
|
|
2808
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports2, module22) {
|
|
2809
|
+
"use strict";
|
|
2810
|
+
var __defProp22 = Object.defineProperty;
|
|
2811
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2812
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2813
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2814
|
+
var __export22 = (target, all) => {
|
|
2815
|
+
for (var name in all)
|
|
2816
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2817
|
+
};
|
|
2818
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2819
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2820
|
+
for (let key of __getOwnPropNames22(from))
|
|
2821
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2822
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2823
|
+
}
|
|
2824
|
+
return to;
|
|
2825
|
+
};
|
|
2826
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2827
|
+
var cookie_exports = {};
|
|
2828
|
+
__export22(cookie_exports, {
|
|
2829
|
+
getCookie: () => getCookie,
|
|
2830
|
+
isMobile: () => isMobile,
|
|
2831
|
+
setCookie: () => setCookie
|
|
2832
|
+
});
|
|
2833
|
+
module22.exports = __toCommonJS22(cookie_exports);
|
|
2834
|
+
var import_types = require_types2();
|
|
2835
|
+
var import_utils32 = require_cjs4();
|
|
2836
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2837
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2838
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2839
|
+
return;
|
|
2840
|
+
const d = /* @__PURE__ */ new Date();
|
|
2841
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2842
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
2843
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2844
|
+
};
|
|
2845
|
+
var getCookie = (cname) => {
|
|
2846
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2847
|
+
return;
|
|
2848
|
+
const name = `${cname}=`;
|
|
2849
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2850
|
+
const ca = decodedCookie.split(";");
|
|
2851
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2852
|
+
let c = ca[i];
|
|
2853
|
+
while (c.charAt(0) === " ")
|
|
2854
|
+
c = c.substring(1);
|
|
2855
|
+
if (c.indexOf(name) === 0)
|
|
2856
|
+
return c.substring(name.length, c.length);
|
|
2857
|
+
}
|
|
2858
|
+
return "";
|
|
3044
2859
|
};
|
|
3045
|
-
const callNow = immediate && !timeout;
|
|
3046
|
-
clearTimeout(timeout);
|
|
3047
|
-
timeout = setTimeout(later, wait);
|
|
3048
|
-
if (callNow)
|
|
3049
|
-
func.apply(context, args);
|
|
3050
|
-
};
|
|
3051
|
-
}
|
|
3052
|
-
var debounceOnContext = (element, func, timeout = 300) => {
|
|
3053
|
-
let timer;
|
|
3054
|
-
return (...args) => {
|
|
3055
|
-
clearTimeout(timer);
|
|
3056
|
-
timer = setTimeout(() => {
|
|
3057
|
-
func.apply(element, args);
|
|
3058
|
-
}, timeout);
|
|
3059
|
-
};
|
|
3060
|
-
};
|
|
3061
|
-
var memoize = (fn) => {
|
|
3062
|
-
const cache = {};
|
|
3063
|
-
return (...args) => {
|
|
3064
|
-
const n = args[0];
|
|
3065
|
-
if (n in cache) {
|
|
3066
|
-
return cache[n];
|
|
3067
|
-
} else {
|
|
3068
|
-
const result = fn(n);
|
|
3069
|
-
cache[n] = result;
|
|
3070
|
-
return result;
|
|
3071
|
-
}
|
|
3072
|
-
};
|
|
3073
|
-
};
|
|
3074
|
-
var isStringFunction = (inputString) => {
|
|
3075
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
3076
|
-
return functionRegex.test(inputString);
|
|
3077
|
-
};
|
|
3078
|
-
}
|
|
3079
|
-
});
|
|
3080
|
-
var require_log2 = __commonJS2({
|
|
3081
|
-
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
3082
|
-
"use strict";
|
|
3083
|
-
var __defProp22 = Object.defineProperty;
|
|
3084
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3085
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3086
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3087
|
-
var __export22 = (target, all) => {
|
|
3088
|
-
for (var name in all)
|
|
3089
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3090
|
-
};
|
|
3091
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
3092
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
3093
|
-
for (let key of __getOwnPropNames22(from))
|
|
3094
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3095
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3096
2860
|
}
|
|
3097
|
-
return to;
|
|
3098
|
-
};
|
|
3099
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3100
|
-
var log_exports = {};
|
|
3101
|
-
__export22(log_exports, {
|
|
3102
|
-
logGroupIf: () => logGroupIf,
|
|
3103
|
-
logIf: () => logIf
|
|
3104
2861
|
});
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
2862
|
+
var require_tags2 = __commonJS2({
|
|
2863
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports2, module22) {
|
|
2864
|
+
"use strict";
|
|
2865
|
+
var __defProp22 = Object.defineProperty;
|
|
2866
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2867
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2868
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2869
|
+
var __export22 = (target, all) => {
|
|
2870
|
+
for (var name in all)
|
|
2871
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2872
|
+
};
|
|
2873
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2874
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2875
|
+
for (let key of __getOwnPropNames22(from))
|
|
2876
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2877
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2878
|
+
}
|
|
2879
|
+
return to;
|
|
2880
|
+
};
|
|
2881
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2882
|
+
var tags_exports = {};
|
|
2883
|
+
__export22(tags_exports, {
|
|
2884
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
2885
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
2886
|
+
});
|
|
2887
|
+
module22.exports = __toCommonJS22(tags_exports);
|
|
2888
|
+
var HTML_TAGS = {
|
|
2889
|
+
root: [
|
|
2890
|
+
"body",
|
|
2891
|
+
"html"
|
|
2892
|
+
],
|
|
2893
|
+
head: [
|
|
2894
|
+
"title",
|
|
2895
|
+
"base",
|
|
2896
|
+
"meta",
|
|
2897
|
+
"style"
|
|
2898
|
+
],
|
|
2899
|
+
body: [
|
|
2900
|
+
"string",
|
|
2901
|
+
"fragment",
|
|
2902
|
+
"a",
|
|
2903
|
+
"abbr",
|
|
2904
|
+
"acronym",
|
|
2905
|
+
"address",
|
|
2906
|
+
"applet",
|
|
2907
|
+
"area",
|
|
2908
|
+
"article",
|
|
2909
|
+
"aside",
|
|
2910
|
+
"audio",
|
|
2911
|
+
"b",
|
|
2912
|
+
"basefont",
|
|
2913
|
+
"bdi",
|
|
2914
|
+
"bdo",
|
|
2915
|
+
"big",
|
|
2916
|
+
"blockquote",
|
|
2917
|
+
"br",
|
|
2918
|
+
"button",
|
|
2919
|
+
"canvas",
|
|
2920
|
+
"caption",
|
|
2921
|
+
"center",
|
|
2922
|
+
"cite",
|
|
2923
|
+
"code",
|
|
2924
|
+
"search",
|
|
2925
|
+
"col",
|
|
2926
|
+
"colgroup",
|
|
2927
|
+
"data",
|
|
2928
|
+
"datalist",
|
|
2929
|
+
"dd",
|
|
2930
|
+
"del",
|
|
2931
|
+
"details",
|
|
2932
|
+
"dfn",
|
|
2933
|
+
"dialog",
|
|
2934
|
+
"dir",
|
|
2935
|
+
"div",
|
|
2936
|
+
"dl",
|
|
2937
|
+
"dt",
|
|
2938
|
+
"em",
|
|
2939
|
+
"embed",
|
|
2940
|
+
"fieldset",
|
|
2941
|
+
"figcaption",
|
|
2942
|
+
"figure",
|
|
2943
|
+
"font",
|
|
2944
|
+
"footer",
|
|
2945
|
+
"form",
|
|
2946
|
+
"frame",
|
|
2947
|
+
"frameset",
|
|
2948
|
+
"h1",
|
|
2949
|
+
"h2",
|
|
2950
|
+
"h3",
|
|
2951
|
+
"h4",
|
|
2952
|
+
"h5",
|
|
2953
|
+
"h6",
|
|
2954
|
+
"head",
|
|
2955
|
+
"header",
|
|
2956
|
+
"hr",
|
|
2957
|
+
"i",
|
|
2958
|
+
"iframe",
|
|
2959
|
+
"img",
|
|
2960
|
+
"input",
|
|
2961
|
+
"ins",
|
|
2962
|
+
"kbd",
|
|
2963
|
+
"label",
|
|
2964
|
+
"legend",
|
|
2965
|
+
"li",
|
|
2966
|
+
"link",
|
|
2967
|
+
"main",
|
|
2968
|
+
"map",
|
|
2969
|
+
"mark",
|
|
2970
|
+
"meter",
|
|
2971
|
+
"nav",
|
|
2972
|
+
"noframes",
|
|
2973
|
+
"noscript",
|
|
2974
|
+
"object",
|
|
2975
|
+
"ol",
|
|
2976
|
+
"optgroup",
|
|
2977
|
+
"option",
|
|
2978
|
+
"output",
|
|
2979
|
+
"p",
|
|
2980
|
+
"param",
|
|
2981
|
+
"picture",
|
|
2982
|
+
"pre",
|
|
2983
|
+
"progress",
|
|
2984
|
+
"hgroup",
|
|
2985
|
+
"q",
|
|
2986
|
+
"rp",
|
|
2987
|
+
"rt",
|
|
2988
|
+
"ruby",
|
|
2989
|
+
"s",
|
|
2990
|
+
"samp",
|
|
2991
|
+
"script",
|
|
2992
|
+
"section",
|
|
2993
|
+
"select",
|
|
2994
|
+
"small",
|
|
2995
|
+
"source",
|
|
2996
|
+
"span",
|
|
2997
|
+
"strike",
|
|
2998
|
+
"strong",
|
|
2999
|
+
"sub",
|
|
3000
|
+
"summary",
|
|
3001
|
+
"sup",
|
|
3002
|
+
"table",
|
|
3003
|
+
"tbody",
|
|
3004
|
+
"td",
|
|
3005
|
+
"template",
|
|
3006
|
+
"hgroup",
|
|
3007
|
+
"textarea",
|
|
3008
|
+
"tfoot",
|
|
3009
|
+
"th",
|
|
3010
|
+
"thead",
|
|
3011
|
+
"time",
|
|
3012
|
+
"tr",
|
|
3013
|
+
"track",
|
|
3014
|
+
"tt",
|
|
3015
|
+
"u",
|
|
3016
|
+
"ul",
|
|
3017
|
+
"var",
|
|
3018
|
+
"video",
|
|
3019
|
+
"wbr",
|
|
3020
|
+
// SVG
|
|
3021
|
+
"svg",
|
|
3022
|
+
"path"
|
|
3023
|
+
]
|
|
3024
|
+
};
|
|
3025
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
3115
3026
|
}
|
|
3116
|
-
};
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3027
|
+
});
|
|
3028
|
+
var require_cjs4 = __commonJS2({
|
|
3029
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports2, module22) {
|
|
3030
|
+
"use strict";
|
|
3031
|
+
var __defProp22 = Object.defineProperty;
|
|
3032
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3033
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3034
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3035
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3036
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3037
|
+
for (let key of __getOwnPropNames22(from))
|
|
3038
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3039
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3040
|
+
}
|
|
3041
|
+
return to;
|
|
3042
|
+
};
|
|
3043
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3044
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3045
|
+
var utils_exports = {};
|
|
3046
|
+
module22.exports = __toCommonJS22(utils_exports);
|
|
3047
|
+
__reExport(utils_exports, require_key2(), module22.exports);
|
|
3048
|
+
__reExport(utils_exports, require_env2(), module22.exports);
|
|
3049
|
+
__reExport(utils_exports, require_types2(), module22.exports);
|
|
3050
|
+
__reExport(utils_exports, require_object2(), module22.exports);
|
|
3051
|
+
__reExport(utils_exports, require_function2(), module22.exports);
|
|
3052
|
+
__reExport(utils_exports, require_array2(), module22.exports);
|
|
3053
|
+
__reExport(utils_exports, require_node2(), module22.exports);
|
|
3054
|
+
__reExport(utils_exports, require_log2(), module22.exports);
|
|
3055
|
+
__reExport(utils_exports, require_string2(), module22.exports);
|
|
3056
|
+
__reExport(utils_exports, require_globals2(), module22.exports);
|
|
3057
|
+
__reExport(utils_exports, require_cookie2(), module22.exports);
|
|
3058
|
+
__reExport(utils_exports, require_tags2(), module22.exports);
|
|
3135
3059
|
}
|
|
3136
|
-
return to;
|
|
3137
|
-
};
|
|
3138
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3139
|
-
var cookie_exports = {};
|
|
3140
|
-
__export22(cookie_exports, {
|
|
3141
|
-
getCookie: () => getCookie,
|
|
3142
|
-
isMobile: () => isMobile,
|
|
3143
|
-
setCookie: () => setCookie
|
|
3144
3060
|
});
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3061
|
+
var src_exports = {};
|
|
3062
|
+
__export2(src_exports, {
|
|
3063
|
+
arrayzeValue: () => arrayzeValue,
|
|
3064
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
3065
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3066
|
+
findClosestNumber: () => findClosestNumber,
|
|
3067
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3068
|
+
formatDate: () => formatDate,
|
|
3069
|
+
isPhoto: () => isPhoto,
|
|
3070
|
+
loadCssFile: () => loadCssFile,
|
|
3071
|
+
loadJavascript: () => loadJavascript,
|
|
3072
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
3073
|
+
loadJavascriptFileSync: () => loadJavascriptFileSync,
|
|
3074
|
+
removeChars: () => removeChars,
|
|
3075
|
+
toCamelCase: () => toCamelCase,
|
|
3076
|
+
toDashCase: () => toDashCase2,
|
|
3077
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3078
|
+
toTitleCase: () => toTitleCase,
|
|
3079
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3080
|
+
});
|
|
3081
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
3082
|
+
var import_utils22 = __toESM2(require_cjs4(), 1);
|
|
3083
|
+
var toggleFullscreen = async (el) => {
|
|
3084
|
+
if (!document.fullscreenElement) {
|
|
3085
|
+
try {
|
|
3086
|
+
await (el.node || document).requestFullscreen();
|
|
3087
|
+
} catch (err) {
|
|
3088
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3089
|
+
}
|
|
3090
|
+
} else {
|
|
3091
|
+
await document.exitFullscreen();
|
|
3169
3092
|
}
|
|
3170
|
-
return "";
|
|
3171
3093
|
};
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
var __defProp22 = Object.defineProperty;
|
|
3178
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3179
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3180
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3181
|
-
var __export22 = (target, all) => {
|
|
3182
|
-
for (var name in all)
|
|
3183
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3094
|
+
var import_utils10 = __toESM2(require_cjs4(), 1);
|
|
3095
|
+
var findClosestNumber = (number, arr) => {
|
|
3096
|
+
return ((0, import_utils10.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3097
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3098
|
+
});
|
|
3184
3099
|
};
|
|
3185
|
-
var
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3100
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3101
|
+
val = parseFloat(val);
|
|
3102
|
+
if ((0, import_utils10.isObject)(factory))
|
|
3103
|
+
factory = Object.values(factory);
|
|
3104
|
+
return findClosestNumber(val, factory);
|
|
3105
|
+
};
|
|
3106
|
+
var formatDate = (timestamp) => {
|
|
3107
|
+
if (!timestamp)
|
|
3108
|
+
return "";
|
|
3109
|
+
const d = new Date(timestamp);
|
|
3110
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3111
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3112
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3113
|
+
return `${da} ${mo}, ${ye}`;
|
|
3114
|
+
};
|
|
3115
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3116
|
+
const fib = [0, 1];
|
|
3117
|
+
for (let i = 2; i <= n; i++) {
|
|
3118
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3119
|
+
}
|
|
3120
|
+
return fib[n];
|
|
3121
|
+
};
|
|
3122
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3123
|
+
return new Promise((resolve, reject) => {
|
|
3124
|
+
try {
|
|
3125
|
+
const scriptEle = doc.createElement("script");
|
|
3126
|
+
scriptEle.type = type;
|
|
3127
|
+
scriptEle.async = async;
|
|
3128
|
+
scriptEle.src = FILE_URL;
|
|
3129
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
3130
|
+
resolve({
|
|
3131
|
+
status: true
|
|
3132
|
+
});
|
|
3133
|
+
});
|
|
3134
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
3135
|
+
reject(new Error({
|
|
3136
|
+
status: false,
|
|
3137
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
3138
|
+
}));
|
|
3139
|
+
});
|
|
3140
|
+
doc.body.appendChild(scriptEle);
|
|
3141
|
+
} catch (error) {
|
|
3142
|
+
reject(error);
|
|
3143
|
+
}
|
|
3144
|
+
});
|
|
3192
3145
|
};
|
|
3193
|
-
var
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
"
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
"basefont",
|
|
3225
|
-
"bdi",
|
|
3226
|
-
"bdo",
|
|
3227
|
-
"big",
|
|
3228
|
-
"blockquote",
|
|
3229
|
-
"br",
|
|
3230
|
-
"button",
|
|
3231
|
-
"canvas",
|
|
3232
|
-
"caption",
|
|
3233
|
-
"center",
|
|
3234
|
-
"cite",
|
|
3235
|
-
"code",
|
|
3236
|
-
"search",
|
|
3237
|
-
"col",
|
|
3238
|
-
"colgroup",
|
|
3239
|
-
"data",
|
|
3240
|
-
"datalist",
|
|
3241
|
-
"dd",
|
|
3242
|
-
"del",
|
|
3243
|
-
"details",
|
|
3244
|
-
"dfn",
|
|
3245
|
-
"dialog",
|
|
3246
|
-
"dir",
|
|
3247
|
-
"div",
|
|
3248
|
-
"dl",
|
|
3249
|
-
"dt",
|
|
3250
|
-
"em",
|
|
3251
|
-
"embed",
|
|
3252
|
-
"fieldset",
|
|
3253
|
-
"figcaption",
|
|
3254
|
-
"figure",
|
|
3255
|
-
"font",
|
|
3256
|
-
"footer",
|
|
3257
|
-
"form",
|
|
3258
|
-
"frame",
|
|
3259
|
-
"frameset",
|
|
3260
|
-
"h1",
|
|
3261
|
-
"h2",
|
|
3262
|
-
"h3",
|
|
3263
|
-
"h4",
|
|
3264
|
-
"h5",
|
|
3265
|
-
"h6",
|
|
3266
|
-
"head",
|
|
3267
|
-
"header",
|
|
3268
|
-
"hr",
|
|
3269
|
-
"i",
|
|
3270
|
-
"iframe",
|
|
3271
|
-
"img",
|
|
3272
|
-
"input",
|
|
3273
|
-
"ins",
|
|
3274
|
-
"kbd",
|
|
3275
|
-
"label",
|
|
3276
|
-
"legend",
|
|
3277
|
-
"li",
|
|
3278
|
-
"link",
|
|
3279
|
-
"main",
|
|
3280
|
-
"map",
|
|
3281
|
-
"mark",
|
|
3282
|
-
"meter",
|
|
3283
|
-
"nav",
|
|
3284
|
-
"noframes",
|
|
3285
|
-
"noscript",
|
|
3286
|
-
"object",
|
|
3287
|
-
"ol",
|
|
3288
|
-
"optgroup",
|
|
3289
|
-
"option",
|
|
3290
|
-
"output",
|
|
3291
|
-
"p",
|
|
3292
|
-
"param",
|
|
3293
|
-
"picture",
|
|
3294
|
-
"pre",
|
|
3295
|
-
"progress",
|
|
3296
|
-
"hgroup",
|
|
3297
|
-
"q",
|
|
3298
|
-
"rp",
|
|
3299
|
-
"rt",
|
|
3300
|
-
"ruby",
|
|
3301
|
-
"s",
|
|
3302
|
-
"samp",
|
|
3303
|
-
"script",
|
|
3304
|
-
"section",
|
|
3305
|
-
"select",
|
|
3306
|
-
"small",
|
|
3307
|
-
"source",
|
|
3308
|
-
"span",
|
|
3309
|
-
"strike",
|
|
3310
|
-
"strong",
|
|
3311
|
-
"sub",
|
|
3312
|
-
"summary",
|
|
3313
|
-
"sup",
|
|
3314
|
-
"table",
|
|
3315
|
-
"tbody",
|
|
3316
|
-
"td",
|
|
3317
|
-
"template",
|
|
3318
|
-
"hgroup",
|
|
3319
|
-
"textarea",
|
|
3320
|
-
"tfoot",
|
|
3321
|
-
"th",
|
|
3322
|
-
"thead",
|
|
3323
|
-
"time",
|
|
3324
|
-
"tr",
|
|
3325
|
-
"track",
|
|
3326
|
-
"tt",
|
|
3327
|
-
"u",
|
|
3328
|
-
"ul",
|
|
3329
|
-
"var",
|
|
3330
|
-
"video",
|
|
3331
|
-
"wbr",
|
|
3332
|
-
// SVG
|
|
3333
|
-
"svg",
|
|
3334
|
-
"path"
|
|
3335
|
-
]
|
|
3146
|
+
var loadJavascriptFileSync = (FILE_URL, doc = document, fallback, type = "text/javascript") => {
|
|
3147
|
+
const xhr = new window.XMLHttpRequest();
|
|
3148
|
+
xhr.open("GET", FILE_URL, false);
|
|
3149
|
+
xhr.send();
|
|
3150
|
+
if (xhr.status === 200) {
|
|
3151
|
+
const scriptEle = doc.createElement("script");
|
|
3152
|
+
scriptEle.type = type;
|
|
3153
|
+
scriptEle.text = xhr.responseText;
|
|
3154
|
+
doc.body.appendChild(scriptEle);
|
|
3155
|
+
if (typeof fallback === "function")
|
|
3156
|
+
fallback();
|
|
3157
|
+
} else {
|
|
3158
|
+
throw new Error(`Failed to load the script ${FILE_URL}`);
|
|
3159
|
+
}
|
|
3160
|
+
};
|
|
3161
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3162
|
+
return new Promise((resolve, reject) => {
|
|
3163
|
+
try {
|
|
3164
|
+
const linkElem = doc.createElement("link");
|
|
3165
|
+
linkElem.rel = "stylesheet";
|
|
3166
|
+
linkElem.href = FILE_URL;
|
|
3167
|
+
linkElem.addEventListener("load", (ev) => {
|
|
3168
|
+
resolve({
|
|
3169
|
+
status: true
|
|
3170
|
+
});
|
|
3171
|
+
});
|
|
3172
|
+
doc.head.appendChild(linkElem);
|
|
3173
|
+
} catch (error) {
|
|
3174
|
+
reject(error);
|
|
3175
|
+
}
|
|
3176
|
+
});
|
|
3336
3177
|
};
|
|
3337
|
-
var
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3178
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3179
|
+
try {
|
|
3180
|
+
const scriptEle = doc.createElement("script");
|
|
3181
|
+
scriptEle.type = type;
|
|
3182
|
+
scriptEle.async = async;
|
|
3183
|
+
scriptEle.id = id;
|
|
3184
|
+
scriptEle.innerHTML = body;
|
|
3185
|
+
doc.body.appendChild(scriptEle);
|
|
3186
|
+
} catch (error) {
|
|
3187
|
+
console.warn(error);
|
|
3188
|
+
}
|
|
3189
|
+
};
|
|
3190
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3191
|
+
var copyStringToClipboard = (str) => {
|
|
3192
|
+
const el = document.createElement("textarea");
|
|
3193
|
+
el.value = str;
|
|
3194
|
+
el.setAttribute("readonly", "");
|
|
3195
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
3196
|
+
document.body.appendChild(el);
|
|
3197
|
+
el.select();
|
|
3198
|
+
document.execCommand("copy");
|
|
3199
|
+
document.body.removeChild(el);
|
|
3200
|
+
};
|
|
3201
|
+
var removeChars = (str) => {
|
|
3202
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3203
|
+
};
|
|
3204
|
+
var toCamelCase = (str) => {
|
|
3205
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3206
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3207
|
+
}).replaceAll(/\s+/g, "");
|
|
3208
|
+
};
|
|
3209
|
+
var toTitleCase = (str) => str && str.replace(
|
|
3210
|
+
/\w\S*/g,
|
|
3211
|
+
(txt) => {
|
|
3212
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3213
|
+
}
|
|
3214
|
+
);
|
|
3215
|
+
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3216
|
+
var toDescriptionCase = (str = "") => {
|
|
3217
|
+
if (typeof str !== "string")
|
|
3218
|
+
return;
|
|
3219
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
3220
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3221
|
+
};
|
|
3222
|
+
var arrayzeValue = (val) => {
|
|
3223
|
+
if ((0, import_utils22.isArray)(val))
|
|
3224
|
+
return val;
|
|
3225
|
+
if ((0, import_utils22.isString)(val))
|
|
3226
|
+
return val.split(" ");
|
|
3227
|
+
if ((0, import_utils22.isObject)(val))
|
|
3228
|
+
return Object.values(val);
|
|
3229
|
+
if ((0, import_utils22.isNumber)(val))
|
|
3230
|
+
return [val];
|
|
3354
3231
|
};
|
|
3355
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3356
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3357
|
-
var utils_exports = {};
|
|
3358
|
-
module2.exports = __toCommonJS22(utils_exports);
|
|
3359
|
-
__reExport(utils_exports, require_key2(), module2.exports);
|
|
3360
|
-
__reExport(utils_exports, require_env2(), module2.exports);
|
|
3361
|
-
__reExport(utils_exports, require_types2(), module2.exports);
|
|
3362
|
-
__reExport(utils_exports, require_object2(), module2.exports);
|
|
3363
|
-
__reExport(utils_exports, require_function2(), module2.exports);
|
|
3364
|
-
__reExport(utils_exports, require_array2(), module2.exports);
|
|
3365
|
-
__reExport(utils_exports, require_node2(), module2.exports);
|
|
3366
|
-
__reExport(utils_exports, require_log2(), module2.exports);
|
|
3367
|
-
__reExport(utils_exports, require_string2(), module2.exports);
|
|
3368
|
-
__reExport(utils_exports, require_globals2(), module2.exports);
|
|
3369
|
-
__reExport(utils_exports, require_cookie2(), module2.exports);
|
|
3370
|
-
__reExport(utils_exports, require_tags2(), module2.exports);
|
|
3371
3232
|
}
|
|
3372
3233
|
});
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
isPhoto: () => isPhoto,
|
|
3382
|
-
loadCssFile: () => loadCssFile,
|
|
3383
|
-
loadJavascript: () => loadJavascript,
|
|
3384
|
-
loadJavascriptFile: () => loadJavascriptFile,
|
|
3385
|
-
removeChars: () => removeChars,
|
|
3386
|
-
toCamelCase: () => toCamelCase,
|
|
3387
|
-
toDashCase: () => toDashCase,
|
|
3388
|
-
toDescriptionCase: () => toDescriptionCase,
|
|
3389
|
-
toTitleCase: () => toTitleCase,
|
|
3390
|
-
toggleFullscreen: () => toggleFullscreen
|
|
3234
|
+
|
|
3235
|
+
// src/system/theme.js
|
|
3236
|
+
var theme_exports = {};
|
|
3237
|
+
__export(theme_exports, {
|
|
3238
|
+
getMediaTheme: () => getMediaTheme,
|
|
3239
|
+
getTheme: () => getTheme,
|
|
3240
|
+
setMediaTheme: () => setMediaTheme,
|
|
3241
|
+
setTheme: () => setTheme
|
|
3391
3242
|
});
|
|
3392
|
-
module.exports =
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3243
|
+
module.exports = __toCommonJS(theme_exports);
|
|
3244
|
+
|
|
3245
|
+
// src/system/color.js
|
|
3246
|
+
var import_utils7 = __toESM(require_cjs(), 1);
|
|
3247
|
+
|
|
3248
|
+
// src/factory.js
|
|
3249
|
+
var import_utils = __toESM(require_cjs(), 1);
|
|
3250
|
+
|
|
3251
|
+
// src/defaultConfig/index.js
|
|
3252
|
+
var defaultConfig_exports = {};
|
|
3253
|
+
__export(defaultConfig_exports, {
|
|
3254
|
+
ANIMATION: () => ANIMATION,
|
|
3255
|
+
BREAKPOINTS: () => BREAKPOINTS,
|
|
3256
|
+
CASES: () => CASES,
|
|
3257
|
+
COLOR: () => COLOR,
|
|
3258
|
+
DEVICES: () => DEVICES,
|
|
3259
|
+
DOCUMENT: () => DOCUMENT,
|
|
3260
|
+
FONT: () => FONT,
|
|
3261
|
+
FONT_FACE: () => FONT_FACE,
|
|
3262
|
+
FONT_FAMILY: () => FONT_FAMILY,
|
|
3263
|
+
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
3264
|
+
GRADIENT: () => GRADIENT,
|
|
3265
|
+
GRID: () => GRID,
|
|
3266
|
+
ICONS: () => ICONS,
|
|
3267
|
+
MEDIA: () => MEDIA,
|
|
3268
|
+
RESET: () => RESET,
|
|
3269
|
+
SEMANTIC_ICONS: () => SEMANTIC_ICONS,
|
|
3270
|
+
SEQUENCE: () => SEQUENCE,
|
|
3271
|
+
SHADOW: () => SHADOW,
|
|
3272
|
+
SPACING: () => SPACING,
|
|
3273
|
+
SVG: () => SVG,
|
|
3274
|
+
SVG_DATA: () => SVG_DATA,
|
|
3275
|
+
TEMPLATES: () => TEMPLATES,
|
|
3276
|
+
THEME: () => THEME,
|
|
3277
|
+
TIMING: () => TIMING,
|
|
3278
|
+
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
3279
|
+
UNIT: () => UNIT
|
|
3280
|
+
});
|
|
3281
|
+
|
|
3282
|
+
// src/defaultConfig/sequence.js
|
|
3283
|
+
var SEQUENCE = {
|
|
3284
|
+
"minor-second": 1.067,
|
|
3285
|
+
"major-second": 1.125,
|
|
3286
|
+
"minor-third": 1.2,
|
|
3287
|
+
"major-third": 1.25,
|
|
3288
|
+
"perfect-fourth": 1.333,
|
|
3289
|
+
"augmented-fourth": 1.414,
|
|
3290
|
+
"perfect-fifth": 1.5,
|
|
3291
|
+
"minor-sixth": 1.6,
|
|
3292
|
+
phi: 1.618,
|
|
3293
|
+
// golden-ratio
|
|
3294
|
+
"major-sixth": 1.667,
|
|
3295
|
+
"square-root-3": 1.732,
|
|
3296
|
+
// theodorus
|
|
3297
|
+
"minor-seventh": 1.778,
|
|
3298
|
+
"major-seventh": 1.875,
|
|
3299
|
+
octave: 2,
|
|
3300
|
+
"square-root-5": 2.23,
|
|
3301
|
+
// pythagoras
|
|
3302
|
+
"major-tenth": 2.5,
|
|
3303
|
+
"major-eleventh": 2.667,
|
|
3304
|
+
"major-twelfth": 3,
|
|
3305
|
+
pi: 3.14,
|
|
3306
|
+
// archimedes
|
|
3307
|
+
"double-octave": 4
|
|
3308
|
+
};
|
|
3309
|
+
|
|
3310
|
+
// src/defaultConfig/unit.js
|
|
3311
|
+
var UNIT = {
|
|
3312
|
+
default: "em"
|
|
3313
|
+
};
|
|
3314
|
+
|
|
3315
|
+
// src/defaultConfig/typography.js
|
|
3316
|
+
var defaultProps = {
|
|
3317
|
+
browserDefault: 16,
|
|
3318
|
+
base: 16,
|
|
3319
|
+
type: "font-size",
|
|
3320
|
+
ratio: SEQUENCE["minor-third"],
|
|
3321
|
+
range: [-3, 12],
|
|
3322
|
+
h1Matches: 6,
|
|
3323
|
+
lineHeight: 1.5,
|
|
3324
|
+
subSequence: true,
|
|
3325
|
+
mediaRegenerate: false,
|
|
3326
|
+
unit: "em",
|
|
3327
|
+
templates: {},
|
|
3328
|
+
sequence: {},
|
|
3329
|
+
scales: {},
|
|
3330
|
+
vars: {}
|
|
3402
3331
|
};
|
|
3403
|
-
var
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3332
|
+
var TYPOGRAPHY = defaultProps;
|
|
3333
|
+
|
|
3334
|
+
// src/defaultConfig/font.js
|
|
3335
|
+
var FONT = {};
|
|
3336
|
+
|
|
3337
|
+
// src/defaultConfig/font-family.js
|
|
3338
|
+
var FONT_FAMILY = {};
|
|
3339
|
+
var FONT_FAMILY_TYPES = {
|
|
3340
|
+
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
3341
|
+
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
3342
|
+
monospace: "Courier New, monospace, --system-default"
|
|
3408
3343
|
};
|
|
3409
|
-
var
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3344
|
+
var FONT_FACE = {};
|
|
3345
|
+
|
|
3346
|
+
// src/defaultConfig/media.js
|
|
3347
|
+
var MEDIA = {
|
|
3348
|
+
tv: "(min-width: 2780px)",
|
|
3349
|
+
light: "(prefers-color-scheme: light)",
|
|
3350
|
+
dark: "(prefers-color-scheme: dark)",
|
|
3351
|
+
print: "print"
|
|
3414
3352
|
};
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3353
|
+
|
|
3354
|
+
// src/defaultConfig/spacing.js
|
|
3355
|
+
var defaultProps2 = {
|
|
3356
|
+
base: TYPOGRAPHY.base,
|
|
3357
|
+
type: "spacing",
|
|
3358
|
+
ratio: SEQUENCE.phi,
|
|
3359
|
+
range: [-5, 15],
|
|
3360
|
+
subSequence: true,
|
|
3361
|
+
mediaRegenerate: false,
|
|
3362
|
+
unit: "em",
|
|
3363
|
+
sequence: {},
|
|
3364
|
+
scales: {},
|
|
3365
|
+
vars: {}
|
|
3423
3366
|
};
|
|
3424
|
-
var
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3367
|
+
var SPACING = defaultProps2;
|
|
3368
|
+
|
|
3369
|
+
// src/defaultConfig/color.js
|
|
3370
|
+
var COLOR = {};
|
|
3371
|
+
var GRADIENT = {};
|
|
3372
|
+
|
|
3373
|
+
// src/defaultConfig/theme.js
|
|
3374
|
+
var THEME = {};
|
|
3375
|
+
|
|
3376
|
+
// src/defaultConfig/shadow.js
|
|
3377
|
+
var SHADOW = {};
|
|
3378
|
+
|
|
3379
|
+
// src/defaultConfig/icons.js
|
|
3380
|
+
var ICONS = {};
|
|
3381
|
+
var SEMANTIC_ICONS = {};
|
|
3382
|
+
|
|
3383
|
+
// src/defaultConfig/timing.js
|
|
3384
|
+
var defaultProps3 = {
|
|
3385
|
+
default: 150,
|
|
3386
|
+
base: 150,
|
|
3387
|
+
type: "timing",
|
|
3388
|
+
ratio: SEQUENCE["perfect-fourth"],
|
|
3389
|
+
range: [-3, 12],
|
|
3390
|
+
mediaRegenerate: false,
|
|
3391
|
+
unit: "ms",
|
|
3392
|
+
sequence: {},
|
|
3393
|
+
scales: {},
|
|
3394
|
+
vars: {}
|
|
3430
3395
|
};
|
|
3431
|
-
var
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
});
|
|
3449
|
-
doc.body.appendChild(scriptEle);
|
|
3450
|
-
} catch (error) {
|
|
3451
|
-
reject(error);
|
|
3452
|
-
}
|
|
3453
|
-
});
|
|
3396
|
+
var TIMING = defaultProps3;
|
|
3397
|
+
|
|
3398
|
+
// src/defaultConfig/document.js
|
|
3399
|
+
var DOCUMENT = {};
|
|
3400
|
+
|
|
3401
|
+
// src/defaultConfig/responsive.js
|
|
3402
|
+
var BREAKPOINTS = {
|
|
3403
|
+
screenL: 1920,
|
|
3404
|
+
screenM: 1680,
|
|
3405
|
+
screenS: 1440,
|
|
3406
|
+
tabletL: 1366,
|
|
3407
|
+
tabletM: 1280,
|
|
3408
|
+
tabletS: 1024,
|
|
3409
|
+
mobileL: 768,
|
|
3410
|
+
mobileM: 560,
|
|
3411
|
+
mobileS: 480,
|
|
3412
|
+
mobileXS: 375
|
|
3454
3413
|
};
|
|
3455
|
-
var
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3414
|
+
var DEVICES = {
|
|
3415
|
+
screenL: [1920, 1024],
|
|
3416
|
+
screenM: [1680, 1024],
|
|
3417
|
+
screenS: [1440, 978],
|
|
3418
|
+
tabletL: [1366, 926],
|
|
3419
|
+
tabletM: [1280, 768],
|
|
3420
|
+
tabletS: [1024, 768],
|
|
3421
|
+
mobileL: [768, 375],
|
|
3422
|
+
mobileM: [560, 768],
|
|
3423
|
+
mobileS: [480, 768],
|
|
3424
|
+
mobileXS: [375, 768]
|
|
3425
|
+
};
|
|
3426
|
+
|
|
3427
|
+
// src/defaultConfig/cases.js
|
|
3428
|
+
var CASES = {};
|
|
3429
|
+
|
|
3430
|
+
// src/defaultConfig/animation.js
|
|
3431
|
+
var ANIMATION = {};
|
|
3432
|
+
|
|
3433
|
+
// src/defaultConfig/svg.js
|
|
3434
|
+
var SVG = {};
|
|
3435
|
+
var SVG_DATA = {};
|
|
3436
|
+
|
|
3437
|
+
// src/defaultConfig/templates.js
|
|
3438
|
+
var TEMPLATES = {};
|
|
3439
|
+
|
|
3440
|
+
// src/defaultConfig/grid.js
|
|
3441
|
+
var defaultProps4 = {};
|
|
3442
|
+
var GRID = defaultProps4;
|
|
3443
|
+
|
|
3444
|
+
// src/defaultConfig/index.js
|
|
3445
|
+
var RESET = {};
|
|
3446
|
+
|
|
3447
|
+
// src/factory.js
|
|
3448
|
+
var CSS_VARS = {};
|
|
3449
|
+
var CONFIG = {
|
|
3450
|
+
verbose: false,
|
|
3451
|
+
useVariable: true,
|
|
3452
|
+
useReset: true,
|
|
3453
|
+
CSS_VARS,
|
|
3454
|
+
...defaultConfig_exports
|
|
3455
|
+
};
|
|
3456
|
+
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
3457
|
+
var FACTORY = {
|
|
3458
|
+
active: "0",
|
|
3459
|
+
0: CONFIG
|
|
3460
|
+
};
|
|
3461
|
+
var getActiveConfig = (def) => {
|
|
3462
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3471
3463
|
};
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3464
|
+
|
|
3465
|
+
// src/utils/color.js
|
|
3466
|
+
var import_globals = __toESM(require_cjs2(), 1);
|
|
3467
|
+
var import_utils2 = __toESM(require_cjs(), 1);
|
|
3468
|
+
var colorStringToRgbaArray = (color) => {
|
|
3469
|
+
if (color === "")
|
|
3470
|
+
return [0, 0, 0, 0];
|
|
3471
|
+
if (color.toLowerCase() === "transparent")
|
|
3472
|
+
return [0, 0, 0, 0];
|
|
3473
|
+
if (color[0] === "#") {
|
|
3474
|
+
if (color.length < 7) {
|
|
3475
|
+
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
3476
|
+
}
|
|
3477
|
+
return [
|
|
3478
|
+
parseInt(color.substr(1, 2), 16),
|
|
3479
|
+
parseInt(color.substr(3, 2), 16),
|
|
3480
|
+
parseInt(color.substr(5, 2), 16),
|
|
3481
|
+
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
3482
|
+
];
|
|
3483
|
+
}
|
|
3484
|
+
if (color.indexOf("rgb") === -1) {
|
|
3485
|
+
if (import_globals.document && import_globals.window) {
|
|
3486
|
+
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
3487
|
+
const flag = "rgb(1, 2, 3)";
|
|
3488
|
+
elem.style.color = flag;
|
|
3489
|
+
if (elem.style.color !== flag) {
|
|
3490
|
+
import_globals.document.body.removeChild(elem);
|
|
3491
|
+
return;
|
|
3492
|
+
}
|
|
3493
|
+
elem.style.color = color;
|
|
3494
|
+
if (elem.style.color === flag || elem.style.color === "") {
|
|
3495
|
+
import_globals.document.body.removeChild(elem);
|
|
3496
|
+
return [0, 0, 0, 0];
|
|
3497
|
+
}
|
|
3498
|
+
color = import_globals.window.getComputedStyle(elem).color;
|
|
3499
|
+
import_globals.document.body.removeChild(elem);
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
if (color.indexOf("rgb") === 0) {
|
|
3503
|
+
if (color.indexOf("rgba") === -1)
|
|
3504
|
+
color = `${color}, 1`;
|
|
3505
|
+
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
3482
3506
|
}
|
|
3507
|
+
return [0, 0, 0, 0];
|
|
3483
3508
|
};
|
|
3484
|
-
var
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
el.value = str;
|
|
3488
|
-
el.setAttribute("readonly", "");
|
|
3489
|
-
el.style = { position: "absolute", left: "-9999px" };
|
|
3490
|
-
document.body.appendChild(el);
|
|
3491
|
-
el.select();
|
|
3492
|
-
document.execCommand("copy");
|
|
3493
|
-
document.body.removeChild(el);
|
|
3509
|
+
var hexToRgbArray = (hex, alpha = 1) => {
|
|
3510
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
3511
|
+
return [r, g, b];
|
|
3494
3512
|
};
|
|
3495
|
-
var
|
|
3496
|
-
return
|
|
3513
|
+
var rgbArrayToHex = ([r, g, b]) => {
|
|
3514
|
+
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
3497
3515
|
};
|
|
3498
|
-
var
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3516
|
+
var rgbToHSL = (r, g, b) => {
|
|
3517
|
+
const a = Math.max(r, g, b);
|
|
3518
|
+
const n = a - Math.min(r, g, b);
|
|
3519
|
+
const f = 1 - Math.abs(a + a - n - 1);
|
|
3520
|
+
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
3521
|
+
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
3502
3522
|
};
|
|
3503
|
-
var
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
);
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3523
|
+
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
3524
|
+
Math.min(k - 3, 9 - k, 1),
|
|
3525
|
+
-1
|
|
3526
|
+
)) => [f(0), f(8), f(4)];
|
|
3527
|
+
var getColorShade = (col, amt) => {
|
|
3528
|
+
const num = parseInt(col, 16);
|
|
3529
|
+
let r = (num >> 16) + amt;
|
|
3530
|
+
if (r > 255)
|
|
3531
|
+
r = 255;
|
|
3532
|
+
else if (r < 0)
|
|
3533
|
+
r = 0;
|
|
3534
|
+
let b = (num >> 8 & 255) + amt;
|
|
3535
|
+
if (b > 255)
|
|
3536
|
+
b = 255;
|
|
3537
|
+
else if (b < 0)
|
|
3538
|
+
b = 0;
|
|
3539
|
+
let g = (num & 255) + amt;
|
|
3540
|
+
if (g > 255)
|
|
3541
|
+
g = 255;
|
|
3542
|
+
else if (g < 0)
|
|
3543
|
+
g = 0;
|
|
3544
|
+
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
3515
3545
|
};
|
|
3516
|
-
var
|
|
3517
|
-
if ((0,
|
|
3518
|
-
|
|
3519
|
-
if ((0,
|
|
3520
|
-
|
|
3521
|
-
if ((0,
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3546
|
+
var getRgbTone = (rgb, tone) => {
|
|
3547
|
+
if ((0, import_utils2.isString)(rgb) && rgb.includes("rgb"))
|
|
3548
|
+
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
3549
|
+
if ((0, import_utils2.isString)(rgb))
|
|
3550
|
+
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
3551
|
+
if ((0, import_utils2.isNumber)(tone))
|
|
3552
|
+
tone += "";
|
|
3553
|
+
const toHex = rgbArrayToHex(rgb);
|
|
3554
|
+
const abs = tone.slice(0, 1);
|
|
3555
|
+
if (abs === "-" || abs === "+") {
|
|
3556
|
+
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
3557
|
+
return hexToRgbArray(colorShade).join(", ");
|
|
3558
|
+
} else {
|
|
3559
|
+
const [r, g, b] = rgb;
|
|
3560
|
+
const hsl = rgbToHSL(r, g, b);
|
|
3561
|
+
const [h, s, l] = hsl;
|
|
3562
|
+
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
3563
|
+
return newRgb;
|
|
3564
|
+
}
|
|
3525
3565
|
};
|
|
3526
3566
|
|
|
3567
|
+
// src/utils/sequence.js
|
|
3568
|
+
var import_utils3 = __toESM(require_cjs(), 1);
|
|
3569
|
+
var import_utils4 = __toESM(require_cjs3(), 1);
|
|
3570
|
+
|
|
3527
3571
|
// src/utils/var.js
|
|
3528
|
-
var
|
|
3572
|
+
var import_utils5 = __toESM(require_cjs(), 1);
|
|
3529
3573
|
|
|
3530
3574
|
// src/utils/sprite.js
|
|
3531
|
-
var
|
|
3575
|
+
var import_utils6 = __toESM(require_cjs(), 1);
|
|
3532
3576
|
|
|
3533
3577
|
// src/system/color.js
|
|
3534
3578
|
var getColor = (value, key, config) => {
|
|
3535
3579
|
const CONFIG2 = config || getActiveConfig();
|
|
3536
|
-
if (!(0,
|
|
3580
|
+
if (!(0, import_utils7.isString)(value)) {
|
|
3537
3581
|
if (CONFIG2.verbose)
|
|
3538
3582
|
console.warn(value, "- type for color is not valid");
|
|
3539
3583
|
return;
|
|
@@ -3542,7 +3586,7 @@ var getColor = (value, key, config) => {
|
|
|
3542
3586
|
return `var(${value})`;
|
|
3543
3587
|
if (key && value[key])
|
|
3544
3588
|
value = value[key];
|
|
3545
|
-
const [name, alpha, tone] = (0,
|
|
3589
|
+
const [name, alpha, tone] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
|
|
3546
3590
|
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
|
|
3547
3591
|
let val = COLOR2[name] || GRADIENT2[name];
|
|
3548
3592
|
if (!val) {
|
|
@@ -3572,7 +3616,7 @@ var getColor = (value, key, config) => {
|
|
|
3572
3616
|
};
|
|
3573
3617
|
|
|
3574
3618
|
// src/system/theme.js
|
|
3575
|
-
var
|
|
3619
|
+
var import_utils9 = __toESM(require_cjs(), 1);
|
|
3576
3620
|
var setThemeValue = (theme) => {
|
|
3577
3621
|
const value = {};
|
|
3578
3622
|
const { state, media, helpers, ...rest } = theme;
|
|
@@ -3595,7 +3639,7 @@ var getTheme = (value, modifier) => {
|
|
|
3595
3639
|
if (CONFIG2.useVariable)
|
|
3596
3640
|
return getMediaTheme(value, modifier);
|
|
3597
3641
|
const { THEME: THEME2 } = CONFIG2;
|
|
3598
|
-
if ((0,
|
|
3642
|
+
if ((0, import_utils9.isString)(value)) {
|
|
3599
3643
|
const [theme, subtheme] = value.split(" ");
|
|
3600
3644
|
const isOurTheme = THEME2[theme];
|
|
3601
3645
|
if (isOurTheme) {
|
|
@@ -3604,7 +3648,7 @@ var getTheme = (value, modifier) => {
|
|
|
3604
3648
|
value = [theme, subtheme || modifier];
|
|
3605
3649
|
}
|
|
3606
3650
|
}
|
|
3607
|
-
if ((0,
|
|
3651
|
+
if ((0, import_utils9.isObjectLike)(value) && value[1]) {
|
|
3608
3652
|
const themeName = value[0];
|
|
3609
3653
|
const subThemeName = value[1];
|
|
3610
3654
|
const { helpers, media, state } = THEME2[themeName];
|
|
@@ -3614,11 +3658,11 @@ var getTheme = (value, modifier) => {
|
|
|
3614
3658
|
return getThemeValue(helpers[subThemeName]);
|
|
3615
3659
|
if (state && state[subThemeName])
|
|
3616
3660
|
return getThemeValue(state[subThemeName]);
|
|
3617
|
-
} else if ((0,
|
|
3661
|
+
} else if ((0, import_utils9.isObject)(value))
|
|
3618
3662
|
return setThemeValue(value);
|
|
3619
3663
|
};
|
|
3620
3664
|
var setInverseTheme = (theme, variant, value) => {
|
|
3621
|
-
if ((0,
|
|
3665
|
+
if ((0, import_utils9.isObject)(variant)) {
|
|
3622
3666
|
theme.variants.inverse.value = setThemeValue(variant);
|
|
3623
3667
|
} else if (variant === true) {
|
|
3624
3668
|
const { color, background } = value;
|
|
@@ -3633,7 +3677,7 @@ var setInverseTheme = (theme, variant, value) => {
|
|
|
3633
3677
|
var setPseudo = (theme, key, variant, themeValue) => {
|
|
3634
3678
|
const result = getTheme(variant);
|
|
3635
3679
|
themeValue[`&:${key}`] = result;
|
|
3636
|
-
if ((0,
|
|
3680
|
+
if ((0, import_utils9.isObject)(variant) && !variant.value)
|
|
3637
3681
|
variant.value = result;
|
|
3638
3682
|
};
|
|
3639
3683
|
var setSelectors = (theme, value) => {
|
|
@@ -3651,7 +3695,7 @@ var setSelectors = (theme, value) => {
|
|
|
3651
3695
|
var setPrefersScheme = (theme, key, variant, themeValue) => {
|
|
3652
3696
|
const result = getTheme(variant);
|
|
3653
3697
|
themeValue[`@media (prefers-color-scheme: ${key})`] = result;
|
|
3654
|
-
if ((0,
|
|
3698
|
+
if ((0, import_utils9.isObject)(variant) && !variant.value)
|
|
3655
3699
|
variant.value = result;
|
|
3656
3700
|
};
|
|
3657
3701
|
var setMedia = (theme, value) => {
|
|
@@ -3677,7 +3721,7 @@ var setHelpers = (theme, value) => {
|
|
|
3677
3721
|
const keys = Object.keys(helpers);
|
|
3678
3722
|
keys.map((key) => {
|
|
3679
3723
|
const helper = helpers[key];
|
|
3680
|
-
if ((0,
|
|
3724
|
+
if ((0, import_utils9.isString)(helper))
|
|
3681
3725
|
helpers[key] = CONFIG2.THEME[helper];
|
|
3682
3726
|
else
|
|
3683
3727
|
getThemeValue(helpers[key]);
|
|
@@ -3701,7 +3745,7 @@ var setMediaTheme = (val, key, suffix, prefers) => {
|
|
|
3701
3745
|
const CONFIG2 = getActiveConfig();
|
|
3702
3746
|
const { CSS_VARS: CSS_VARS2 } = CONFIG2;
|
|
3703
3747
|
const theme = { value: val };
|
|
3704
|
-
if ((0,
|
|
3748
|
+
if ((0, import_utils9.isObjectLike)(val)) {
|
|
3705
3749
|
for (const param in val) {
|
|
3706
3750
|
const symb = param.slice(0, 1);
|
|
3707
3751
|
const value = val[param];
|
|
@@ -3729,7 +3773,7 @@ var setMediaTheme = (val, key, suffix, prefers) => {
|
|
|
3729
3773
|
};
|
|
3730
3774
|
}
|
|
3731
3775
|
}
|
|
3732
|
-
if ((0,
|
|
3776
|
+
if ((0, import_utils9.isString)(val) && val.slice(0, 2) === "--") {
|
|
3733
3777
|
const { THEME: THEME2 } = CONFIG2;
|
|
3734
3778
|
const value = THEME2[val.slice(2)];
|
|
3735
3779
|
const getReferenced = getMediaTheme(value, prefers);
|
|
@@ -3742,7 +3786,7 @@ var recursiveTheme = (val) => {
|
|
|
3742
3786
|
const obj = {};
|
|
3743
3787
|
for (const param in val) {
|
|
3744
3788
|
const symb = param.slice(0, 1);
|
|
3745
|
-
if ((0,
|
|
3789
|
+
if ((0, import_utils9.isObjectLike)(val[param])) {
|
|
3746
3790
|
if (symb === "@") {
|
|
3747
3791
|
const query = CONFIG2.MEDIA[param.slice(1)];
|
|
3748
3792
|
const media = `@media screen and ${query}`;
|
|
@@ -3762,25 +3806,25 @@ var findModifierFromArray = (val, modifierArray) => {
|
|
|
3762
3806
|
return val;
|
|
3763
3807
|
};
|
|
3764
3808
|
var findModifier = (val, modifier) => {
|
|
3765
|
-
if ((0,
|
|
3809
|
+
if ((0, import_utils9.isArray)(modifier))
|
|
3766
3810
|
return findModifierFromArray(val, modifier);
|
|
3767
|
-
else if ((0,
|
|
3811
|
+
else if ((0, import_utils9.isString)(modifier) && val[modifier])
|
|
3768
3812
|
return val[modifier];
|
|
3769
3813
|
else
|
|
3770
3814
|
return val;
|
|
3771
3815
|
};
|
|
3772
3816
|
var getMediaTheme = (value, modifier) => {
|
|
3773
3817
|
const activeConfig = getActiveConfig();
|
|
3774
|
-
if ((0,
|
|
3818
|
+
if ((0, import_utils9.isString)(value) && value.slice(0, 2) === "--") {
|
|
3775
3819
|
value = getMediaTheme(value.slice(2));
|
|
3776
3820
|
}
|
|
3777
|
-
if (!value || !(0,
|
|
3821
|
+
if (!value || !(0, import_utils9.isString)(value)) {
|
|
3778
3822
|
if (activeConfig.verbose) {
|
|
3779
3823
|
console.warn(`${value} - Theme is not a string`);
|
|
3780
3824
|
}
|
|
3781
3825
|
return;
|
|
3782
3826
|
}
|
|
3783
|
-
const [themeName, ...themeModifiers] = (0,
|
|
3827
|
+
const [themeName, ...themeModifiers] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
|
|
3784
3828
|
let themeValue = activeConfig.THEME[themeName];
|
|
3785
3829
|
if (themeValue && (themeModifiers || modifier)) {
|
|
3786
3830
|
themeValue = findModifier(themeValue, themeModifiers.length ? themeModifiers : modifier);
|