@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
|
@@ -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: () => document4,
|
|
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 document4 =
|
|
141
|
+
var window3 = globalThis;
|
|
142
|
+
var document4 = 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_globals3 = require_globals();
|
|
174
174
|
var isNode = (obj) => {
|
|
175
175
|
return (typeof Node === "object" ? obj instanceof import_globals3.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: () => isArray7,
|
|
@@ -218,7 +218,7 @@ var require_types = __commonJS({
|
|
|
218
218
|
isString: () => isString9,
|
|
219
219
|
isUndefined: () => isUndefined2
|
|
220
220
|
});
|
|
221
|
-
module2.exports =
|
|
221
|
+
module2.exports = __toCommonJS2(types_exports);
|
|
222
222
|
var import_node = require_node();
|
|
223
223
|
var isObject6 = (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_globals3 = 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 overwriteDeep2 = (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_utils26 = 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_utils26.document) || (0, import_types.isUndefined)(import_utils26.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_utils26.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_utils26.document) || (0, import_types.isUndefined)(import_utils26.document.cookie))
|
|
1296
1310
|
return;
|
|
1297
1311
|
const name = `${cname}=`;
|
|
1298
|
-
const decodedCookie = decodeURIComponent(
|
|
1312
|
+
const decodedCookie = decodeURIComponent(import_utils26.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,2029 +1530,2057 @@ 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: () => document4,
|
|
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 document4 =
|
|
1560
|
+
var window3 = globalThis;
|
|
1561
|
+
var document4 = window3.document;
|
|
1548
1562
|
}
|
|
1549
1563
|
});
|
|
1550
1564
|
|
|
1551
|
-
// src/transforms/index.js
|
|
1552
|
-
var transforms_exports = {};
|
|
1553
|
-
__export(transforms_exports, {
|
|
1554
|
-
checkIfBoxSize: () => checkIfBoxSize,
|
|
1555
|
-
splitTransition: () => splitTransition,
|
|
1556
|
-
transformBackgroundImage: () => transformBackgroundImage,
|
|
1557
|
-
transformBorder: () => transformBorder,
|
|
1558
|
-
transformBoxShadow: () => transformBoxShadow,
|
|
1559
|
-
transformDuration: () => transformDuration,
|
|
1560
|
-
transformShadow: () => transformShadow,
|
|
1561
|
-
transformSize: () => transformSize,
|
|
1562
|
-
transformSizeRatio: () => transformSizeRatio,
|
|
1563
|
-
transformTextStroke: () => transformTextStroke,
|
|
1564
|
-
transformTransition: () => transformTransition,
|
|
1565
|
-
transfromGap: () => transfromGap
|
|
1566
|
-
});
|
|
1567
|
-
module.exports = __toCommonJS(transforms_exports);
|
|
1568
|
-
var import_utils27 = __toESM(require_cjs(), 1);
|
|
1569
|
-
|
|
1570
|
-
// src/factory.js
|
|
1571
|
-
var import_utils = __toESM(require_cjs(), 1);
|
|
1572
|
-
|
|
1573
|
-
// src/defaultConfig/index.js
|
|
1574
|
-
var defaultConfig_exports = {};
|
|
1575
|
-
__export(defaultConfig_exports, {
|
|
1576
|
-
ANIMATION: () => ANIMATION,
|
|
1577
|
-
BREAKPOINTS: () => BREAKPOINTS,
|
|
1578
|
-
CASES: () => CASES,
|
|
1579
|
-
COLOR: () => COLOR,
|
|
1580
|
-
DEVICES: () => DEVICES,
|
|
1581
|
-
DOCUMENT: () => DOCUMENT,
|
|
1582
|
-
FONT: () => FONT,
|
|
1583
|
-
FONT_FACE: () => FONT_FACE,
|
|
1584
|
-
FONT_FAMILY: () => FONT_FAMILY,
|
|
1585
|
-
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
1586
|
-
GRADIENT: () => GRADIENT,
|
|
1587
|
-
GRID: () => GRID,
|
|
1588
|
-
ICONS: () => ICONS,
|
|
1589
|
-
MEDIA: () => MEDIA,
|
|
1590
|
-
RESET: () => RESET,
|
|
1591
|
-
SEMANTIC_ICONS: () => SEMANTIC_ICONS,
|
|
1592
|
-
SEQUENCE: () => SEQUENCE,
|
|
1593
|
-
SHADOW: () => SHADOW,
|
|
1594
|
-
SPACING: () => SPACING,
|
|
1595
|
-
SVG: () => SVG,
|
|
1596
|
-
SVG_DATA: () => SVG_DATA,
|
|
1597
|
-
TEMPLATES: () => TEMPLATES,
|
|
1598
|
-
THEME: () => THEME,
|
|
1599
|
-
TIMING: () => TIMING,
|
|
1600
|
-
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
1601
|
-
UNIT: () => UNIT
|
|
1602
|
-
});
|
|
1603
|
-
|
|
1604
|
-
// src/defaultConfig/sequence.js
|
|
1605
|
-
var SEQUENCE = {
|
|
1606
|
-
"minor-second": 1.067,
|
|
1607
|
-
"major-second": 1.125,
|
|
1608
|
-
"minor-third": 1.2,
|
|
1609
|
-
"major-third": 1.25,
|
|
1610
|
-
"perfect-fourth": 1.333,
|
|
1611
|
-
"augmented-fourth": 1.414,
|
|
1612
|
-
"perfect-fifth": 1.5,
|
|
1613
|
-
"minor-sixth": 1.6,
|
|
1614
|
-
phi: 1.618,
|
|
1615
|
-
// golden-ratio
|
|
1616
|
-
"major-sixth": 1.667,
|
|
1617
|
-
"square-root-3": 1.732,
|
|
1618
|
-
// theodorus
|
|
1619
|
-
"minor-seventh": 1.778,
|
|
1620
|
-
"major-seventh": 1.875,
|
|
1621
|
-
octave: 2,
|
|
1622
|
-
"square-root-5": 2.23,
|
|
1623
|
-
// pythagoras
|
|
1624
|
-
"major-tenth": 2.5,
|
|
1625
|
-
"major-eleventh": 2.667,
|
|
1626
|
-
"major-twelfth": 3,
|
|
1627
|
-
pi: 3.14,
|
|
1628
|
-
// archimedes
|
|
1629
|
-
"double-octave": 4
|
|
1630
|
-
};
|
|
1631
|
-
|
|
1632
|
-
// src/defaultConfig/unit.js
|
|
1633
|
-
var UNIT = {
|
|
1634
|
-
default: "em"
|
|
1635
|
-
};
|
|
1636
|
-
|
|
1637
|
-
// src/defaultConfig/typography.js
|
|
1638
|
-
var defaultProps = {
|
|
1639
|
-
browserDefault: 16,
|
|
1640
|
-
base: 16,
|
|
1641
|
-
type: "font-size",
|
|
1642
|
-
ratio: SEQUENCE["minor-third"],
|
|
1643
|
-
range: [-3, 12],
|
|
1644
|
-
h1Matches: 6,
|
|
1645
|
-
lineHeight: 1.5,
|
|
1646
|
-
subSequence: true,
|
|
1647
|
-
mediaRegenerate: false,
|
|
1648
|
-
unit: "em",
|
|
1649
|
-
templates: {},
|
|
1650
|
-
sequence: {},
|
|
1651
|
-
scales: {},
|
|
1652
|
-
vars: {}
|
|
1653
|
-
};
|
|
1654
|
-
var TYPOGRAPHY = defaultProps;
|
|
1655
|
-
|
|
1656
|
-
// src/defaultConfig/font.js
|
|
1657
|
-
var FONT = {};
|
|
1658
|
-
|
|
1659
|
-
// src/defaultConfig/font-family.js
|
|
1660
|
-
var FONT_FAMILY = {};
|
|
1661
|
-
var FONT_FAMILY_TYPES = {
|
|
1662
|
-
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
1663
|
-
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
1664
|
-
monospace: "Courier New, monospace, --system-default"
|
|
1665
|
-
};
|
|
1666
|
-
var FONT_FACE = {};
|
|
1667
|
-
|
|
1668
|
-
// src/defaultConfig/media.js
|
|
1669
|
-
var MEDIA = {
|
|
1670
|
-
tv: "(min-width: 2780px)",
|
|
1671
|
-
light: "(prefers-color-scheme: light)",
|
|
1672
|
-
dark: "(prefers-color-scheme: dark)",
|
|
1673
|
-
print: "print"
|
|
1674
|
-
};
|
|
1675
|
-
|
|
1676
|
-
// src/defaultConfig/spacing.js
|
|
1677
|
-
var defaultProps2 = {
|
|
1678
|
-
base: TYPOGRAPHY.base,
|
|
1679
|
-
type: "spacing",
|
|
1680
|
-
ratio: SEQUENCE.phi,
|
|
1681
|
-
range: [-5, 15],
|
|
1682
|
-
subSequence: true,
|
|
1683
|
-
mediaRegenerate: false,
|
|
1684
|
-
unit: "em",
|
|
1685
|
-
sequence: {},
|
|
1686
|
-
scales: {},
|
|
1687
|
-
vars: {}
|
|
1688
|
-
};
|
|
1689
|
-
var SPACING = defaultProps2;
|
|
1690
|
-
|
|
1691
|
-
// src/defaultConfig/color.js
|
|
1692
|
-
var COLOR = {};
|
|
1693
|
-
var GRADIENT = {};
|
|
1694
|
-
|
|
1695
|
-
// src/defaultConfig/theme.js
|
|
1696
|
-
var THEME = {};
|
|
1697
|
-
|
|
1698
|
-
// src/defaultConfig/shadow.js
|
|
1699
|
-
var SHADOW = {};
|
|
1700
|
-
|
|
1701
|
-
// src/defaultConfig/icons.js
|
|
1702
|
-
var ICONS = {};
|
|
1703
|
-
var SEMANTIC_ICONS = {};
|
|
1704
|
-
|
|
1705
|
-
// src/defaultConfig/timing.js
|
|
1706
|
-
var defaultProps3 = {
|
|
1707
|
-
default: 150,
|
|
1708
|
-
base: 150,
|
|
1709
|
-
type: "timing",
|
|
1710
|
-
ratio: SEQUENCE["perfect-fourth"],
|
|
1711
|
-
range: [-3, 12],
|
|
1712
|
-
mediaRegenerate: false,
|
|
1713
|
-
unit: "ms",
|
|
1714
|
-
sequence: {},
|
|
1715
|
-
scales: {},
|
|
1716
|
-
vars: {}
|
|
1717
|
-
};
|
|
1718
|
-
var TIMING = defaultProps3;
|
|
1719
|
-
|
|
1720
|
-
// src/defaultConfig/document.js
|
|
1721
|
-
var DOCUMENT = {};
|
|
1722
|
-
|
|
1723
|
-
// src/defaultConfig/responsive.js
|
|
1724
|
-
var BREAKPOINTS = {
|
|
1725
|
-
screenL: 1920,
|
|
1726
|
-
screenM: 1680,
|
|
1727
|
-
screenS: 1440,
|
|
1728
|
-
tabletL: 1366,
|
|
1729
|
-
tabletM: 1280,
|
|
1730
|
-
tabletS: 1024,
|
|
1731
|
-
mobileL: 768,
|
|
1732
|
-
mobileM: 560,
|
|
1733
|
-
mobileS: 480,
|
|
1734
|
-
mobileXS: 375
|
|
1735
|
-
};
|
|
1736
|
-
var DEVICES = {
|
|
1737
|
-
screenL: [1920, 1024],
|
|
1738
|
-
screenM: [1680, 1024],
|
|
1739
|
-
screenS: [1440, 978],
|
|
1740
|
-
tabletL: [1366, 926],
|
|
1741
|
-
tabletM: [1280, 768],
|
|
1742
|
-
tabletS: [1024, 768],
|
|
1743
|
-
mobileL: [768, 375],
|
|
1744
|
-
mobileM: [560, 768],
|
|
1745
|
-
mobileS: [480, 768],
|
|
1746
|
-
mobileXS: [375, 768]
|
|
1747
|
-
};
|
|
1748
|
-
|
|
1749
|
-
// src/defaultConfig/cases.js
|
|
1750
|
-
var CASES = {};
|
|
1751
|
-
|
|
1752
|
-
// src/defaultConfig/animation.js
|
|
1753
|
-
var ANIMATION = {};
|
|
1754
|
-
|
|
1755
|
-
// src/defaultConfig/svg.js
|
|
1756
|
-
var SVG = {};
|
|
1757
|
-
var SVG_DATA = {};
|
|
1758
|
-
|
|
1759
|
-
// src/defaultConfig/templates.js
|
|
1760
|
-
var TEMPLATES = {};
|
|
1761
|
-
|
|
1762
|
-
// src/defaultConfig/grid.js
|
|
1763
|
-
var defaultProps4 = {};
|
|
1764
|
-
var GRID = defaultProps4;
|
|
1765
|
-
|
|
1766
|
-
// src/defaultConfig/index.js
|
|
1767
|
-
var RESET = {};
|
|
1768
|
-
|
|
1769
|
-
// src/factory.js
|
|
1770
|
-
var CSS_VARS = {};
|
|
1771
|
-
var CONFIG = {
|
|
1772
|
-
verbose: false,
|
|
1773
|
-
useVariable: true,
|
|
1774
|
-
useReset: true,
|
|
1775
|
-
CSS_VARS,
|
|
1776
|
-
...defaultConfig_exports
|
|
1777
|
-
};
|
|
1778
|
-
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
1779
|
-
var FACTORY = {
|
|
1780
|
-
active: "0",
|
|
1781
|
-
0: CONFIG
|
|
1782
|
-
};
|
|
1783
|
-
var getActiveConfig = (def) => {
|
|
1784
|
-
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
1785
|
-
};
|
|
1786
|
-
|
|
1787
|
-
// src/system/color.js
|
|
1788
|
-
var import_utils8 = __toESM(require_cjs(), 1);
|
|
1789
|
-
|
|
1790
|
-
// src/utils/unit.js
|
|
1791
|
-
var isScalingUnit = (unit) => {
|
|
1792
|
-
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
1793
|
-
};
|
|
1794
|
-
|
|
1795
|
-
// src/utils/color.js
|
|
1796
|
-
var import_globals = __toESM(require_cjs2(), 1);
|
|
1797
|
-
var import_utils2 = __toESM(require_cjs(), 1);
|
|
1798
|
-
var colorStringToRgbaArray = (color) => {
|
|
1799
|
-
if (color === "")
|
|
1800
|
-
return [0, 0, 0, 0];
|
|
1801
|
-
if (color.toLowerCase() === "transparent")
|
|
1802
|
-
return [0, 0, 0, 0];
|
|
1803
|
-
if (color[0] === "#") {
|
|
1804
|
-
if (color.length < 7) {
|
|
1805
|
-
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
1806
|
-
}
|
|
1807
|
-
return [
|
|
1808
|
-
parseInt(color.substr(1, 2), 16),
|
|
1809
|
-
parseInt(color.substr(3, 2), 16),
|
|
1810
|
-
parseInt(color.substr(5, 2), 16),
|
|
1811
|
-
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
1812
|
-
];
|
|
1813
|
-
}
|
|
1814
|
-
if (color.indexOf("rgb") === -1) {
|
|
1815
|
-
if (import_globals.document && import_globals.window) {
|
|
1816
|
-
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
1817
|
-
const flag = "rgb(1, 2, 3)";
|
|
1818
|
-
elem.style.color = flag;
|
|
1819
|
-
if (elem.style.color !== flag) {
|
|
1820
|
-
import_globals.document.body.removeChild(elem);
|
|
1821
|
-
return;
|
|
1822
|
-
}
|
|
1823
|
-
elem.style.color = color;
|
|
1824
|
-
if (elem.style.color === flag || elem.style.color === "") {
|
|
1825
|
-
import_globals.document.body.removeChild(elem);
|
|
1826
|
-
return [0, 0, 0, 0];
|
|
1827
|
-
}
|
|
1828
|
-
color = import_globals.window.getComputedStyle(elem).color;
|
|
1829
|
-
import_globals.document.body.removeChild(elem);
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
if (color.indexOf("rgb") === 0) {
|
|
1833
|
-
if (color.indexOf("rgba") === -1)
|
|
1834
|
-
color = `${color}, 1`;
|
|
1835
|
-
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
1836
|
-
}
|
|
1837
|
-
return [0, 0, 0, 0];
|
|
1838
|
-
};
|
|
1839
|
-
var hexToRgbArray = (hex, alpha = 1) => {
|
|
1840
|
-
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1841
|
-
return [r, g, b];
|
|
1842
|
-
};
|
|
1843
|
-
var rgbArrayToHex = ([r, g, b]) => {
|
|
1844
|
-
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
1845
|
-
};
|
|
1846
|
-
var rgbToHSL = (r, g, b) => {
|
|
1847
|
-
const a = Math.max(r, g, b);
|
|
1848
|
-
const n = a - Math.min(r, g, b);
|
|
1849
|
-
const f = 1 - Math.abs(a + a - n - 1);
|
|
1850
|
-
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
1851
|
-
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
1852
|
-
};
|
|
1853
|
-
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
1854
|
-
Math.min(k - 3, 9 - k, 1),
|
|
1855
|
-
-1
|
|
1856
|
-
)) => [f(0), f(8), f(4)];
|
|
1857
|
-
var getColorShade = (col, amt) => {
|
|
1858
|
-
const num = parseInt(col, 16);
|
|
1859
|
-
let r = (num >> 16) + amt;
|
|
1860
|
-
if (r > 255)
|
|
1861
|
-
r = 255;
|
|
1862
|
-
else if (r < 0)
|
|
1863
|
-
r = 0;
|
|
1864
|
-
let b = (num >> 8 & 255) + amt;
|
|
1865
|
-
if (b > 255)
|
|
1866
|
-
b = 255;
|
|
1867
|
-
else if (b < 0)
|
|
1868
|
-
b = 0;
|
|
1869
|
-
let g = (num & 255) + amt;
|
|
1870
|
-
if (g > 255)
|
|
1871
|
-
g = 255;
|
|
1872
|
-
else if (g < 0)
|
|
1873
|
-
g = 0;
|
|
1874
|
-
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
1875
|
-
};
|
|
1876
|
-
var getRgbTone = (rgb, tone) => {
|
|
1877
|
-
if ((0, import_utils2.isString)(rgb) && rgb.includes("rgb"))
|
|
1878
|
-
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
1879
|
-
if ((0, import_utils2.isString)(rgb))
|
|
1880
|
-
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
1881
|
-
if ((0, import_utils2.isNumber)(tone))
|
|
1882
|
-
tone += "";
|
|
1883
|
-
const toHex = rgbArrayToHex(rgb);
|
|
1884
|
-
const abs = tone.slice(0, 1);
|
|
1885
|
-
if (abs === "-" || abs === "+") {
|
|
1886
|
-
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
1887
|
-
return hexToRgbArray(colorShade).join(", ");
|
|
1888
|
-
} else {
|
|
1889
|
-
const [r, g, b] = rgb;
|
|
1890
|
-
const hsl = rgbToHSL(r, g, b);
|
|
1891
|
-
const [h, s, l] = hsl;
|
|
1892
|
-
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
1893
|
-
return newRgb;
|
|
1894
|
-
}
|
|
1895
|
-
};
|
|
1896
|
-
|
|
1897
|
-
// src/utils/sequence.js
|
|
1898
|
-
var import_utils4 = __toESM(require_cjs(), 1);
|
|
1899
|
-
|
|
1900
1565
|
// ../utils/dist/cjs/index.js
|
|
1901
|
-
var
|
|
1902
|
-
|
|
1903
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1904
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1905
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1906
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1907
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1908
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1909
|
-
};
|
|
1910
|
-
var __export2 = (target, all) => {
|
|
1911
|
-
for (var name in all)
|
|
1912
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1913
|
-
};
|
|
1914
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
1915
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1916
|
-
for (let key of __getOwnPropNames2(from))
|
|
1917
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1918
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1919
|
-
}
|
|
1920
|
-
return to;
|
|
1921
|
-
};
|
|
1922
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1923
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1924
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1925
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1926
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1927
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1928
|
-
mod
|
|
1929
|
-
));
|
|
1930
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1931
|
-
var require_key2 = __commonJS2({
|
|
1932
|
-
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1566
|
+
var require_cjs3 = __commonJS({
|
|
1567
|
+
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
1933
1568
|
"use strict";
|
|
1934
|
-
var
|
|
1935
|
-
var
|
|
1936
|
-
var
|
|
1937
|
-
var
|
|
1938
|
-
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) => {
|
|
1939
1579
|
for (var name in all)
|
|
1940
|
-
|
|
1580
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1941
1581
|
};
|
|
1942
|
-
var
|
|
1582
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1943
1583
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1944
|
-
for (let key of
|
|
1945
|
-
if (!
|
|
1946
|
-
|
|
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 });
|
|
1947
1587
|
}
|
|
1948
1588
|
return to;
|
|
1949
1589
|
};
|
|
1950
|
-
var
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
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;
|
|
1962
1634
|
}
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
var
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1635
|
+
});
|
|
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];
|
|
1984
1670
|
}
|
|
1985
|
-
return to;
|
|
1986
|
-
};
|
|
1987
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1988
|
-
var env_exports = {};
|
|
1989
|
-
__export22(env_exports, {
|
|
1990
|
-
NODE_ENV: () => NODE_ENV,
|
|
1991
|
-
getNev: () => getNev,
|
|
1992
|
-
isDevelopment: () => isDevelopment,
|
|
1993
|
-
isProduction: () => isProduction,
|
|
1994
|
-
isTest: () => isTest
|
|
1995
1671
|
});
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
var
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
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;
|
|
2020
1704
|
}
|
|
2021
|
-
return to;
|
|
2022
|
-
};
|
|
2023
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2024
|
-
var globals_exports = {};
|
|
2025
|
-
__export22(globals_exports, {
|
|
2026
|
-
document: () => document22,
|
|
2027
|
-
global: () => global,
|
|
2028
|
-
self: () => self,
|
|
2029
|
-
window: () => window2
|
|
2030
1705
|
});
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
var
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
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_globals3 = require_globals2();
|
|
1733
|
+
var isNode = (obj) => {
|
|
1734
|
+
return (typeof Node === "object" ? obj instanceof import_globals3.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_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1738
|
+
};
|
|
2054
1739
|
}
|
|
2055
|
-
return to;
|
|
2056
|
-
};
|
|
2057
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2058
|
-
var node_exports = {};
|
|
2059
|
-
__export22(node_exports, {
|
|
2060
|
-
isHtmlElement: () => isHtmlElement,
|
|
2061
|
-
isNode: () => isNode
|
|
2062
1740
|
});
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
});
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
__defProp22(
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
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: () => isNull2,
|
|
1772
|
+
isNumber: () => isNumber2,
|
|
1773
|
+
isObject: () => isObject32,
|
|
1774
|
+
isObjectLike: () => isObjectLike3,
|
|
1775
|
+
isString: () => isString22,
|
|
1776
|
+
isUndefined: () => isUndefined2
|
|
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 isNull2 = (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) || isNull2(arg);
|
|
1799
|
+
};
|
|
1800
|
+
var isUndefined2 = (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: isNull2,
|
|
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
|
+
};
|
|
2089
1827
|
}
|
|
2090
|
-
return to;
|
|
2091
|
-
};
|
|
2092
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2093
|
-
var types_exports = {};
|
|
2094
|
-
__export22(types_exports, {
|
|
2095
|
-
TYPES: () => TYPES,
|
|
2096
|
-
is: () => is,
|
|
2097
|
-
isArray: () => isArray32,
|
|
2098
|
-
isBoolean: () => isBoolean,
|
|
2099
|
-
isDate: () => isDate,
|
|
2100
|
-
isDefined: () => isDefined2,
|
|
2101
|
-
isFunction: () => isFunction,
|
|
2102
|
-
isNot: () => isNot,
|
|
2103
|
-
isNull: () => isNull2,
|
|
2104
|
-
isNumber: () => isNumber2,
|
|
2105
|
-
isObject: () => isObject32,
|
|
2106
|
-
isObjectLike: () => isObjectLike3,
|
|
2107
|
-
isString: () => isString22,
|
|
2108
|
-
isUndefined: () => isUndefined2
|
|
2109
1828
|
});
|
|
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
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
}
|
|
2262
|
-
if (index === arr.length - 1 && lastValue) {
|
|
2263
|
-
obj[value] = lastValue;
|
|
2264
|
-
}
|
|
2265
|
-
return obj[value];
|
|
2266
|
-
}, nestedObject);
|
|
2267
|
-
return nestedObject;
|
|
2268
|
-
};
|
|
2269
|
-
var removeValueFromArray = (arr, value) => {
|
|
2270
|
-
const index = arr.indexOf(value);
|
|
2271
|
-
if (index > -1) {
|
|
2272
|
-
const newArray = [...arr];
|
|
2273
|
-
newArray.splice(index, 1);
|
|
2274
|
-
return newArray;
|
|
2275
|
-
}
|
|
2276
|
-
return arr;
|
|
2277
|
-
};
|
|
2278
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
2279
|
-
return arr.filter((item) => item !== value);
|
|
2280
|
-
};
|
|
2281
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
2282
|
-
const result = [];
|
|
2283
|
-
for (let i = 0; i < array.length; i++) {
|
|
2284
|
-
result.push(array[i]);
|
|
2285
|
-
if (i < array.length - 1) {
|
|
2286
|
-
result.push(item);
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
return result;
|
|
2290
|
-
};
|
|
2291
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
2292
|
-
const newArray = [...array];
|
|
2293
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
2294
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
2295
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
2296
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
2297
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
2298
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
2299
|
-
}
|
|
2300
|
-
return newArray;
|
|
2301
|
-
};
|
|
2302
|
-
var arraysEqual = (arr1, arr2) => {
|
|
2303
|
-
if (arr1.length !== arr2.length) {
|
|
2304
|
-
return false;
|
|
2305
|
-
}
|
|
2306
|
-
for (let i = 0; i < arr1.length; i++) {
|
|
2307
|
-
if (arr1[i] !== arr2[i]) {
|
|
2308
|
-
return false;
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
return true;
|
|
2312
|
-
};
|
|
2313
|
-
}
|
|
2314
|
-
});
|
|
2315
|
-
var require_string2 = __commonJS2({
|
|
2316
|
-
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
2317
|
-
"use strict";
|
|
2318
|
-
var __defProp22 = Object.defineProperty;
|
|
2319
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2320
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2321
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2322
|
-
var __export22 = (target, all) => {
|
|
2323
|
-
for (var name in all)
|
|
2324
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2325
|
-
};
|
|
2326
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2327
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2328
|
-
for (let key of __getOwnPropNames22(from))
|
|
2329
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2330
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2331
|
-
}
|
|
2332
|
-
return to;
|
|
2333
|
-
};
|
|
2334
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2335
|
-
var string_exports = {};
|
|
2336
|
-
__export22(string_exports, {
|
|
2337
|
-
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2338
|
-
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2339
|
-
findKeyPosition: () => findKeyPosition,
|
|
2340
|
-
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2341
|
-
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2342
|
-
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2343
|
-
stringIncludesAny: () => stringIncludesAny,
|
|
2344
|
-
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2345
|
-
});
|
|
2346
|
-
module2.exports = __toCommonJS22(string_exports);
|
|
2347
|
-
var stringIncludesAny = (str, characters) => {
|
|
2348
|
-
for (const char of characters) {
|
|
2349
|
-
if (str.includes(char)) {
|
|
2350
|
-
return true;
|
|
2351
|
-
}
|
|
2352
|
-
}
|
|
2353
|
-
return false;
|
|
2354
|
-
};
|
|
2355
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
2356
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2357
|
-
return str.replace(pattern, "");
|
|
2358
|
-
};
|
|
2359
|
-
var brackRegex = {
|
|
2360
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2361
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2362
|
-
};
|
|
2363
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2364
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2365
|
-
return str;
|
|
2366
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
2367
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
2368
|
-
if (parentPath) {
|
|
2369
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2370
|
-
let parentState = state;
|
|
2371
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
2372
|
-
parentState = parentState.parent;
|
|
2373
|
-
if (!parentState) {
|
|
2374
|
-
return "";
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
const value = parentState[variable.trim()];
|
|
2378
|
-
return value !== void 0 ? `${value}` : "";
|
|
2379
|
-
} else {
|
|
2380
|
-
const value = state[variable.trim()];
|
|
2381
|
-
return value !== void 0 ? `${value}` : "";
|
|
2382
|
-
}
|
|
2383
|
-
});
|
|
2384
|
-
};
|
|
2385
|
-
var lowercaseFirstLetter = (inputString) => {
|
|
2386
|
-
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2387
|
-
};
|
|
2388
|
-
var findKeyPosition = (str, key) => {
|
|
2389
|
-
const lines = str.split("\n");
|
|
2390
|
-
let startLineNumber = -1;
|
|
2391
|
-
let endLineNumber = -1;
|
|
2392
|
-
let startColumn = -1;
|
|
2393
|
-
let endColumn = -1;
|
|
2394
|
-
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2395
|
-
let braceCount = 0;
|
|
2396
|
-
let foundKey = false;
|
|
2397
|
-
for (let i = 0; i < lines.length; i++) {
|
|
2398
|
-
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2399
|
-
foundKey = true;
|
|
2400
|
-
startLineNumber = i + 1;
|
|
2401
|
-
startColumn = lines[i].indexOf(key) + 1;
|
|
2402
|
-
if (lines[i].includes("{}")) {
|
|
2403
|
-
endLineNumber = startLineNumber;
|
|
2404
|
-
endColumn = lines[i].indexOf("{}") + 3;
|
|
2405
|
-
break;
|
|
2406
|
-
}
|
|
2407
|
-
const line = lines[i].slice(startColumn + key.length);
|
|
2408
|
-
if (line.includes("{") || line.includes("[")) {
|
|
2409
|
-
braceCount = 1;
|
|
2410
|
-
} else {
|
|
2411
|
-
endLineNumber = i + 1;
|
|
2412
|
-
endColumn = lines[i].length + 1;
|
|
2413
|
-
break;
|
|
2414
|
-
}
|
|
2415
|
-
} else if (foundKey) {
|
|
2416
|
-
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2417
|
-
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2418
|
-
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2419
|
-
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2420
|
-
if (braceCount === 0) {
|
|
2421
|
-
endLineNumber = i + 1;
|
|
2422
|
-
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2423
|
-
break;
|
|
2424
|
-
}
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
return {
|
|
2428
|
-
startColumn,
|
|
2429
|
-
endColumn,
|
|
2430
|
-
startLineNumber,
|
|
2431
|
-
endLineNumber
|
|
2432
|
-
};
|
|
2433
|
-
};
|
|
2434
|
-
var replaceOctalEscapeSequences = (str) => {
|
|
2435
|
-
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2436
|
-
return str.replace(octalRegex, (match, p1) => {
|
|
2437
|
-
const octalValue = parseInt(p1, 8);
|
|
2438
|
-
const char = String.fromCharCode(octalValue);
|
|
2439
|
-
return char;
|
|
2440
|
-
});
|
|
2441
|
-
};
|
|
2442
|
-
var customEncodeURIComponent = (str) => {
|
|
2443
|
-
return str.split("").map((char) => {
|
|
2444
|
-
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2445
|
-
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2446
|
-
}
|
|
2447
|
-
return char;
|
|
2448
|
-
}).join("");
|
|
2449
|
-
};
|
|
2450
|
-
var customDecodeURIComponent = (encodedStr) => {
|
|
2451
|
-
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2452
|
-
};
|
|
2453
|
-
}
|
|
2454
|
-
});
|
|
2455
|
-
var require_object2 = __commonJS2({
|
|
2456
|
-
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2457
|
-
"use strict";
|
|
2458
|
-
var __defProp22 = Object.defineProperty;
|
|
2459
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2460
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2461
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2462
|
-
var __export22 = (target, all) => {
|
|
2463
|
-
for (var name in all)
|
|
2464
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2465
|
-
};
|
|
2466
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2467
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2468
|
-
for (let key of __getOwnPropNames22(from))
|
|
2469
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2470
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2471
|
-
}
|
|
2472
|
-
return to;
|
|
2473
|
-
};
|
|
2474
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2475
|
-
var object_exports = {};
|
|
2476
|
-
__export22(object_exports, {
|
|
2477
|
-
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2478
|
-
clone: () => clone,
|
|
2479
|
-
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2480
|
-
deepClone: () => deepClone2,
|
|
2481
|
-
deepCloneExclude: () => deepCloneExclude,
|
|
2482
|
-
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2483
|
-
deepContains: () => deepContains,
|
|
2484
|
-
deepDestringify: () => deepDestringify,
|
|
2485
|
-
deepDiff: () => deepDiff,
|
|
2486
|
-
deepMerge: () => deepMerge3,
|
|
2487
|
-
deepStringify: () => deepStringify,
|
|
2488
|
-
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2489
|
-
diff: () => diff,
|
|
2490
|
-
diffArrays: () => diffArrays,
|
|
2491
|
-
diffObjects: () => diffObjects,
|
|
2492
|
-
exec: () => exec,
|
|
2493
|
-
flattenRecursive: () => flattenRecursive,
|
|
2494
|
-
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2495
|
-
getExtendsInElement: () => getExtendsInElement,
|
|
2496
|
-
hasOwnProperty: () => hasOwnProperty,
|
|
2497
|
-
isEmpty: () => isEmpty,
|
|
2498
|
-
isEmptyObject: () => isEmptyObject,
|
|
2499
|
-
isEqualDeep: () => isEqualDeep,
|
|
2500
|
-
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2501
|
-
map: () => map,
|
|
2502
|
-
merge: () => merge5,
|
|
2503
|
-
mergeArrayExclude: () => mergeArrayExclude,
|
|
2504
|
-
mergeIfExisted: () => mergeIfExisted,
|
|
2505
|
-
objectToString: () => objectToString,
|
|
2506
|
-
overwrite: () => overwrite,
|
|
2507
|
-
overwriteDeep: () => overwriteDeep2,
|
|
2508
|
-
overwriteShallow: () => overwriteShallow,
|
|
2509
|
-
removeFromObject: () => removeFromObject,
|
|
2510
|
-
stringToObject: () => stringToObject
|
|
2511
|
-
});
|
|
2512
|
-
module2.exports = __toCommonJS22(object_exports);
|
|
2513
|
-
var import_globals3 = require_globals2();
|
|
2514
|
-
var import_types = require_types2();
|
|
2515
|
-
var import_array = require_array2();
|
|
2516
|
-
var import_string = require_string2();
|
|
2517
|
-
var exec = (param, element, state, context) => {
|
|
2518
|
-
if ((0, import_types.isFunction)(param)) {
|
|
2519
|
-
return param(
|
|
2520
|
-
element,
|
|
2521
|
-
state || element.state,
|
|
2522
|
-
context || element.context
|
|
2523
|
-
);
|
|
2524
|
-
}
|
|
2525
|
-
return param;
|
|
2526
|
-
};
|
|
2527
|
-
var map = (obj, extention, element) => {
|
|
2528
|
-
for (const e in extention) {
|
|
2529
|
-
obj[e] = exec(extention[e], element);
|
|
2530
|
-
}
|
|
2531
|
-
};
|
|
2532
|
-
var merge5 = (element, obj, excludeFrom = []) => {
|
|
2533
|
-
for (const e in obj) {
|
|
2534
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2535
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2536
|
-
continue;
|
|
2537
|
-
const elementProp = element[e];
|
|
2538
|
-
const objProp = obj[e];
|
|
2539
|
-
if (elementProp === void 0) {
|
|
2540
|
-
element[e] = objProp;
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
return element;
|
|
2544
|
-
};
|
|
2545
|
-
var deepMerge3 = (element, extend, excludeFrom = []) => {
|
|
2546
|
-
for (const e in extend) {
|
|
2547
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2548
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2549
|
-
continue;
|
|
2550
|
-
const elementProp = element[e];
|
|
2551
|
-
const extendProp = extend[e];
|
|
2552
|
-
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2553
|
-
deepMerge3(elementProp, extendProp, excludeFrom);
|
|
2554
|
-
} else if (elementProp === void 0) {
|
|
2555
|
-
element[e] = extendProp;
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
return element;
|
|
2559
|
-
};
|
|
2560
|
-
var clone = (obj, excludeFrom = []) => {
|
|
2561
|
-
const o = {};
|
|
2562
|
-
for (const prop in obj) {
|
|
2563
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2564
|
-
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2565
|
-
continue;
|
|
2566
|
-
o[prop] = obj[prop];
|
|
2567
|
-
}
|
|
2568
|
-
return o;
|
|
2569
|
-
};
|
|
2570
|
-
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2571
|
-
if ((0, import_types.isArray)(obj)) {
|
|
2572
|
-
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2573
|
-
}
|
|
2574
|
-
const o = {};
|
|
2575
|
-
for (const k in obj) {
|
|
2576
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2577
|
-
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2578
|
-
continue;
|
|
2579
|
-
let v = obj[k];
|
|
2580
|
-
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2581
|
-
v = mergeArrayExclude(v, excludeFrom);
|
|
2582
|
-
}
|
|
2583
|
-
if ((0, import_types.isArray)(v)) {
|
|
2584
|
-
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2585
|
-
} else if ((0, import_types.isObject)(v)) {
|
|
2586
|
-
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2587
|
-
} else
|
|
2588
|
-
o[k] = v;
|
|
2589
|
-
}
|
|
2590
|
-
return o;
|
|
2591
|
-
};
|
|
2592
|
-
var mergeArrayExclude = (arr, excl = []) => {
|
|
2593
|
-
return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
|
|
2594
|
-
};
|
|
2595
|
-
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2596
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2597
|
-
for (const prop in obj) {
|
|
2598
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2599
|
-
continue;
|
|
2600
|
-
if (prop === "__proto__")
|
|
2601
|
-
continue;
|
|
2602
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2603
|
-
continue;
|
|
2604
|
-
let objProp = obj[prop];
|
|
2605
|
-
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2606
|
-
continue;
|
|
2607
|
-
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2608
|
-
objProp = (0, import_array.mergeArray)(objProp);
|
|
2609
|
-
}
|
|
2610
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2611
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2612
|
-
} else
|
|
2613
|
-
o[prop] = objProp;
|
|
2614
|
-
}
|
|
2615
|
-
return o;
|
|
2616
|
-
};
|
|
2617
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2618
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2619
|
-
for (const prop in obj) {
|
|
2620
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2621
|
-
continue;
|
|
2622
|
-
const objProp = obj[prop];
|
|
2623
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2624
|
-
continue;
|
|
2625
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2626
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2627
|
-
} else
|
|
2628
|
-
o[prop] = objProp;
|
|
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
|
+
};
|
|
2629
1981
|
}
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
1982
|
+
});
|
|
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}` : "";
|
|
2648
2047
|
} else {
|
|
2649
|
-
|
|
2048
|
+
const value = state[variable.trim()];
|
|
2049
|
+
return value !== void 0 ? `${value}` : "";
|
|
2650
2050
|
}
|
|
2651
2051
|
});
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
|
|
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
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
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
|
+
};
|
|
2655
2121
|
}
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
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: () => deepMerge3,
|
|
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: () => merge5,
|
|
2171
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2172
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2173
|
+
objectToString: () => objectToString,
|
|
2174
|
+
overwrite: () => overwrite,
|
|
2175
|
+
overwriteDeep: () => overwriteDeep2,
|
|
2176
|
+
overwriteShallow: () => overwriteShallow,
|
|
2177
|
+
removeFromObject: () => removeFromObject,
|
|
2178
|
+
stringToObject: () => stringToObject
|
|
2179
|
+
});
|
|
2180
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
2181
|
+
var import_globals3 = 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 merge5 = (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 deepMerge3 = (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
|
+
deepMerge3(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) => deepMerge3(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
|
+
});
|
|
2674
2320
|
} else {
|
|
2675
|
-
|
|
2676
|
-
`;
|
|
2321
|
+
stringified[prop] = objProp;
|
|
2677
2322
|
}
|
|
2678
2323
|
}
|
|
2679
|
-
|
|
2680
|
-
}
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
str
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
if ((0, import_types.
|
|
2704
|
-
|
|
2705
|
-
if ((0, import_types.
|
|
2706
|
-
|
|
2707
|
-
detachFunctionsFromObject(v, detached[prop][i]);
|
|
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}'`;
|
|
2708
2352
|
} else {
|
|
2709
|
-
|
|
2353
|
+
str += value;
|
|
2710
2354
|
}
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2355
|
+
str += ",\n";
|
|
2356
|
+
}
|
|
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;
|
|
2732
2382
|
}
|
|
2733
|
-
} else {
|
|
2734
|
-
destringified[prop] = objProp;
|
|
2735
2383
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
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("[")) {
|
|
2741
2394
|
try {
|
|
2742
|
-
const evalProp = import_globals3.window.eval(`(${
|
|
2743
|
-
destringified[prop]
|
|
2395
|
+
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
2396
|
+
destringified[prop] = evalProp;
|
|
2744
2397
|
} catch (e) {
|
|
2745
2398
|
if (e)
|
|
2746
|
-
destringified[prop]
|
|
2399
|
+
destringified[prop] = objProp;
|
|
2747
2400
|
}
|
|
2748
2401
|
} else {
|
|
2749
|
-
destringified[prop]
|
|
2402
|
+
destringified[prop] = objProp;
|
|
2750
2403
|
}
|
|
2751
|
-
} else if ((0, import_types.
|
|
2752
|
-
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_globals3.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]);
|
|
2753
2427
|
} else {
|
|
2754
|
-
destringified[prop]
|
|
2428
|
+
destringified[prop] = objProp;
|
|
2755
2429
|
}
|
|
2756
|
-
});
|
|
2757
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2758
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2759
|
-
} else {
|
|
2760
|
-
destringified[prop] = objProp;
|
|
2761
|
-
}
|
|
2762
|
-
}
|
|
2763
|
-
return destringified;
|
|
2764
|
-
};
|
|
2765
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2766
|
-
try {
|
|
2767
|
-
return import_globals3.window.eval("(" + str + ")");
|
|
2768
|
-
} catch (e) {
|
|
2769
|
-
if (opts.verbose)
|
|
2770
|
-
console.warn(e);
|
|
2771
|
-
}
|
|
2772
|
-
};
|
|
2773
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
2774
|
-
for (const e in objToDiff) {
|
|
2775
|
-
if (e === "ref")
|
|
2776
|
-
continue;
|
|
2777
|
-
const originalProp = original[e];
|
|
2778
|
-
const objToDiffProp = objToDiff[e];
|
|
2779
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2780
|
-
cache[e] = {};
|
|
2781
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
2782
|
-
} else if (objToDiffProp !== void 0) {
|
|
2783
|
-
cache[e] = objToDiffProp;
|
|
2784
|
-
}
|
|
2785
|
-
}
|
|
2786
|
-
return cache;
|
|
2787
|
-
};
|
|
2788
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
2789
|
-
if (original.length !== objToDiff.length) {
|
|
2790
|
-
cache = objToDiff;
|
|
2791
|
-
} else {
|
|
2792
|
-
const diffArr = [];
|
|
2793
|
-
for (let i = 0; i < original.length; i++) {
|
|
2794
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
2795
|
-
if (Object.keys(diffObj).length > 0) {
|
|
2796
|
-
diffArr.push(diffObj);
|
|
2797
2430
|
}
|
|
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
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2431
|
+
return destringified;
|
|
2432
|
+
};
|
|
2433
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2434
|
+
try {
|
|
2435
|
+
return import_globals3.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 overwriteDeep2 = (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
|
+
overwriteDeep2(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 deepMerge3(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) {
|
|
2933
2580
|
return false;
|
|
2934
2581
|
}
|
|
2935
|
-
for (
|
|
2936
|
-
if (!
|
|
2582
|
+
for (const key of keysParam) {
|
|
2583
|
+
if (!keysElement.includes(key)) {
|
|
2584
|
+
return false;
|
|
2585
|
+
}
|
|
2586
|
+
const paramProp = param[key];
|
|
2587
|
+
const elementProp = element[key];
|
|
2588
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2937
2589
|
return false;
|
|
2938
2590
|
}
|
|
2939
2591
|
}
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
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
|
+
}
|
|
2614
|
+
}
|
|
2945
2615
|
}
|
|
2616
|
+
} else {
|
|
2617
|
+
return obj2 === obj1;
|
|
2946
2618
|
}
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2970
|
-
for (const key in obj) {
|
|
2971
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2972
|
-
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2973
|
-
}
|
|
2974
|
-
}
|
|
2975
|
-
return newObj;
|
|
2976
|
-
};
|
|
2977
|
-
var checkIfKeyIsComponent = (key) => {
|
|
2978
|
-
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2979
|
-
if (!isFirstKeyString)
|
|
2980
|
-
return;
|
|
2981
|
-
const firstCharKey = key.slice(0, 1);
|
|
2982
|
-
return /^[A-Z]*$/.test(firstCharKey);
|
|
2983
|
-
};
|
|
2984
|
-
var getChildrenComponentsByKey = (key, el) => {
|
|
2985
|
-
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2986
|
-
return el;
|
|
2987
|
-
}
|
|
2988
|
-
if (el.extend) {
|
|
2989
|
-
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2990
|
-
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2991
|
-
if (foundString || foundInArray)
|
|
2992
|
-
return el;
|
|
2993
|
-
}
|
|
2994
|
-
};
|
|
2995
|
-
var getExtendsInElement = (obj) => {
|
|
2996
|
-
let result = [];
|
|
2997
|
-
function traverse(o) {
|
|
2998
|
-
for (const key in o) {
|
|
2999
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
3000
|
-
if (checkIfKeyIsComponent(key)) {
|
|
3001
|
-
result.push(key);
|
|
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]);
|
|
3002
2641
|
}
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
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
|
+
}
|
|
3008
2687
|
}
|
|
3009
2688
|
}
|
|
3010
|
-
if (typeof o[key] === "object" && o[key] !== null) {
|
|
3011
|
-
traverse(o[key]);
|
|
3012
|
-
}
|
|
3013
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
|
+
};
|
|
3014
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
|
+
};
|
|
3015
2766
|
}
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
var
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
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
|
+
};
|
|
3037
2805
|
}
|
|
3038
|
-
return to;
|
|
3039
|
-
};
|
|
3040
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3041
|
-
var function_exports = {};
|
|
3042
|
-
__export22(function_exports, {
|
|
3043
|
-
debounce: () => debounce,
|
|
3044
|
-
debounceOnContext: () => debounceOnContext,
|
|
3045
|
-
isStringFunction: () => isStringFunction,
|
|
3046
|
-
memoize: () => memoize
|
|
3047
2806
|
});
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
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 "";
|
|
3058
2859
|
};
|
|
3059
|
-
const callNow = immediate && !timeout;
|
|
3060
|
-
clearTimeout(timeout);
|
|
3061
|
-
timeout = setTimeout(later, wait);
|
|
3062
|
-
if (callNow)
|
|
3063
|
-
func.apply(context, args);
|
|
3064
|
-
};
|
|
3065
|
-
}
|
|
3066
|
-
var debounceOnContext = (element, func, timeout = 300) => {
|
|
3067
|
-
let timer;
|
|
3068
|
-
return (...args) => {
|
|
3069
|
-
clearTimeout(timer);
|
|
3070
|
-
timer = setTimeout(() => {
|
|
3071
|
-
func.apply(element, args);
|
|
3072
|
-
}, timeout);
|
|
3073
|
-
};
|
|
3074
|
-
};
|
|
3075
|
-
var memoize = (fn) => {
|
|
3076
|
-
const cache = {};
|
|
3077
|
-
return (...args) => {
|
|
3078
|
-
const n = args[0];
|
|
3079
|
-
if (n in cache) {
|
|
3080
|
-
return cache[n];
|
|
3081
|
-
} else {
|
|
3082
|
-
const result = fn(n);
|
|
3083
|
-
cache[n] = result;
|
|
3084
|
-
return result;
|
|
3085
|
-
}
|
|
3086
|
-
};
|
|
3087
|
-
};
|
|
3088
|
-
var isStringFunction = (inputString) => {
|
|
3089
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
3090
|
-
return functionRegex.test(inputString);
|
|
3091
|
-
};
|
|
3092
|
-
}
|
|
3093
|
-
});
|
|
3094
|
-
var require_log2 = __commonJS2({
|
|
3095
|
-
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
3096
|
-
"use strict";
|
|
3097
|
-
var __defProp22 = Object.defineProperty;
|
|
3098
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3099
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3100
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3101
|
-
var __export22 = (target, all) => {
|
|
3102
|
-
for (var name in all)
|
|
3103
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3104
|
-
};
|
|
3105
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
3106
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
3107
|
-
for (let key of __getOwnPropNames22(from))
|
|
3108
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3109
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3110
2860
|
}
|
|
3111
|
-
return to;
|
|
3112
|
-
};
|
|
3113
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3114
|
-
var log_exports = {};
|
|
3115
|
-
__export22(log_exports, {
|
|
3116
|
-
logGroupIf: () => logGroupIf,
|
|
3117
|
-
logIf: () => logIf
|
|
3118
2861
|
});
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
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);
|
|
3129
3026
|
}
|
|
3130
|
-
};
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
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);
|
|
3149
3059
|
}
|
|
3150
|
-
return to;
|
|
3151
|
-
};
|
|
3152
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3153
|
-
var cookie_exports = {};
|
|
3154
|
-
__export22(cookie_exports, {
|
|
3155
|
-
getCookie: () => getCookie,
|
|
3156
|
-
isMobile: () => isMobile,
|
|
3157
|
-
setCookie: () => setCookie
|
|
3158
3060
|
});
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3061
|
+
var src_exports = {};
|
|
3062
|
+
__export2(src_exports, {
|
|
3063
|
+
arrayzeValue: () => arrayzeValue3,
|
|
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: () => toCamelCase2,
|
|
3076
|
+
toDashCase: () => toDashCase2,
|
|
3077
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3078
|
+
toTitleCase: () => toTitleCase,
|
|
3079
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3080
|
+
});
|
|
3081
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
3082
|
+
var import_utils26 = __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();
|
|
3183
3092
|
}
|
|
3184
|
-
return "";
|
|
3185
3093
|
};
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
var
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3094
|
+
var import_utils27 = __toESM2(require_cjs4(), 1);
|
|
3095
|
+
var findClosestNumber = (number, arr) => {
|
|
3096
|
+
return ((0, import_utils27.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3097
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3098
|
+
});
|
|
3099
|
+
};
|
|
3100
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3101
|
+
val = parseFloat(val);
|
|
3102
|
+
if ((0, import_utils27.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
|
+
});
|
|
3198
3145
|
};
|
|
3199
|
-
var
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
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}`);
|
|
3204
3159
|
}
|
|
3205
|
-
return to;
|
|
3206
3160
|
};
|
|
3207
|
-
var
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
"style"
|
|
3224
|
-
],
|
|
3225
|
-
body: [
|
|
3226
|
-
"string",
|
|
3227
|
-
"fragment",
|
|
3228
|
-
"a",
|
|
3229
|
-
"abbr",
|
|
3230
|
-
"acronym",
|
|
3231
|
-
"address",
|
|
3232
|
-
"applet",
|
|
3233
|
-
"area",
|
|
3234
|
-
"article",
|
|
3235
|
-
"aside",
|
|
3236
|
-
"audio",
|
|
3237
|
-
"b",
|
|
3238
|
-
"basefont",
|
|
3239
|
-
"bdi",
|
|
3240
|
-
"bdo",
|
|
3241
|
-
"big",
|
|
3242
|
-
"blockquote",
|
|
3243
|
-
"br",
|
|
3244
|
-
"button",
|
|
3245
|
-
"canvas",
|
|
3246
|
-
"caption",
|
|
3247
|
-
"center",
|
|
3248
|
-
"cite",
|
|
3249
|
-
"code",
|
|
3250
|
-
"search",
|
|
3251
|
-
"col",
|
|
3252
|
-
"colgroup",
|
|
3253
|
-
"data",
|
|
3254
|
-
"datalist",
|
|
3255
|
-
"dd",
|
|
3256
|
-
"del",
|
|
3257
|
-
"details",
|
|
3258
|
-
"dfn",
|
|
3259
|
-
"dialog",
|
|
3260
|
-
"dir",
|
|
3261
|
-
"div",
|
|
3262
|
-
"dl",
|
|
3263
|
-
"dt",
|
|
3264
|
-
"em",
|
|
3265
|
-
"embed",
|
|
3266
|
-
"fieldset",
|
|
3267
|
-
"figcaption",
|
|
3268
|
-
"figure",
|
|
3269
|
-
"font",
|
|
3270
|
-
"footer",
|
|
3271
|
-
"form",
|
|
3272
|
-
"frame",
|
|
3273
|
-
"frameset",
|
|
3274
|
-
"h1",
|
|
3275
|
-
"h2",
|
|
3276
|
-
"h3",
|
|
3277
|
-
"h4",
|
|
3278
|
-
"h5",
|
|
3279
|
-
"h6",
|
|
3280
|
-
"head",
|
|
3281
|
-
"header",
|
|
3282
|
-
"hr",
|
|
3283
|
-
"i",
|
|
3284
|
-
"iframe",
|
|
3285
|
-
"img",
|
|
3286
|
-
"input",
|
|
3287
|
-
"ins",
|
|
3288
|
-
"kbd",
|
|
3289
|
-
"label",
|
|
3290
|
-
"legend",
|
|
3291
|
-
"li",
|
|
3292
|
-
"link",
|
|
3293
|
-
"main",
|
|
3294
|
-
"map",
|
|
3295
|
-
"mark",
|
|
3296
|
-
"meter",
|
|
3297
|
-
"nav",
|
|
3298
|
-
"noframes",
|
|
3299
|
-
"noscript",
|
|
3300
|
-
"object",
|
|
3301
|
-
"ol",
|
|
3302
|
-
"optgroup",
|
|
3303
|
-
"option",
|
|
3304
|
-
"output",
|
|
3305
|
-
"p",
|
|
3306
|
-
"param",
|
|
3307
|
-
"picture",
|
|
3308
|
-
"pre",
|
|
3309
|
-
"progress",
|
|
3310
|
-
"hgroup",
|
|
3311
|
-
"q",
|
|
3312
|
-
"rp",
|
|
3313
|
-
"rt",
|
|
3314
|
-
"ruby",
|
|
3315
|
-
"s",
|
|
3316
|
-
"samp",
|
|
3317
|
-
"script",
|
|
3318
|
-
"section",
|
|
3319
|
-
"select",
|
|
3320
|
-
"small",
|
|
3321
|
-
"source",
|
|
3322
|
-
"span",
|
|
3323
|
-
"strike",
|
|
3324
|
-
"strong",
|
|
3325
|
-
"sub",
|
|
3326
|
-
"summary",
|
|
3327
|
-
"sup",
|
|
3328
|
-
"table",
|
|
3329
|
-
"tbody",
|
|
3330
|
-
"td",
|
|
3331
|
-
"template",
|
|
3332
|
-
"hgroup",
|
|
3333
|
-
"textarea",
|
|
3334
|
-
"tfoot",
|
|
3335
|
-
"th",
|
|
3336
|
-
"thead",
|
|
3337
|
-
"time",
|
|
3338
|
-
"tr",
|
|
3339
|
-
"track",
|
|
3340
|
-
"tt",
|
|
3341
|
-
"u",
|
|
3342
|
-
"ul",
|
|
3343
|
-
"var",
|
|
3344
|
-
"video",
|
|
3345
|
-
"wbr",
|
|
3346
|
-
// SVG
|
|
3347
|
-
"svg",
|
|
3348
|
-
"path"
|
|
3349
|
-
]
|
|
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
|
+
});
|
|
3350
3177
|
};
|
|
3351
|
-
var
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
3362
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
3363
|
-
for (let key of __getOwnPropNames22(from))
|
|
3364
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3365
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
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);
|
|
3366
3188
|
}
|
|
3367
|
-
return to;
|
|
3368
3189
|
};
|
|
3369
|
-
var
|
|
3370
|
-
var
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
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 toCamelCase2 = (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 arrayzeValue3 = (val) => {
|
|
3223
|
+
if ((0, import_utils26.isArray)(val))
|
|
3224
|
+
return val;
|
|
3225
|
+
if ((0, import_utils26.isString)(val))
|
|
3226
|
+
return val.split(" ");
|
|
3227
|
+
if ((0, import_utils26.isObject)(val))
|
|
3228
|
+
return Object.values(val);
|
|
3229
|
+
if ((0, import_utils26.isNumber)(val))
|
|
3230
|
+
return [val];
|
|
3231
|
+
};
|
|
3385
3232
|
}
|
|
3386
3233
|
});
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
toTitleCase: () => toTitleCase,
|
|
3404
|
-
toggleFullscreen: () => toggleFullscreen
|
|
3234
|
+
|
|
3235
|
+
// src/transforms/index.js
|
|
3236
|
+
var transforms_exports = {};
|
|
3237
|
+
__export(transforms_exports, {
|
|
3238
|
+
checkIfBoxSize: () => checkIfBoxSize,
|
|
3239
|
+
splitTransition: () => splitTransition,
|
|
3240
|
+
transformBackgroundImage: () => transformBackgroundImage,
|
|
3241
|
+
transformBorder: () => transformBorder,
|
|
3242
|
+
transformBoxShadow: () => transformBoxShadow,
|
|
3243
|
+
transformDuration: () => transformDuration,
|
|
3244
|
+
transformShadow: () => transformShadow,
|
|
3245
|
+
transformSize: () => transformSize,
|
|
3246
|
+
transformSizeRatio: () => transformSizeRatio,
|
|
3247
|
+
transformTextStroke: () => transformTextStroke,
|
|
3248
|
+
transformTransition: () => transformTransition,
|
|
3249
|
+
transfromGap: () => transfromGap
|
|
3405
3250
|
});
|
|
3406
|
-
module.exports =
|
|
3407
|
-
var
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3251
|
+
module.exports = __toCommonJS(transforms_exports);
|
|
3252
|
+
var import_utils25 = __toESM(require_cjs(), 1);
|
|
3253
|
+
|
|
3254
|
+
// src/factory.js
|
|
3255
|
+
var import_utils = __toESM(require_cjs(), 1);
|
|
3256
|
+
|
|
3257
|
+
// src/defaultConfig/index.js
|
|
3258
|
+
var defaultConfig_exports = {};
|
|
3259
|
+
__export(defaultConfig_exports, {
|
|
3260
|
+
ANIMATION: () => ANIMATION,
|
|
3261
|
+
BREAKPOINTS: () => BREAKPOINTS,
|
|
3262
|
+
CASES: () => CASES,
|
|
3263
|
+
COLOR: () => COLOR,
|
|
3264
|
+
DEVICES: () => DEVICES,
|
|
3265
|
+
DOCUMENT: () => DOCUMENT,
|
|
3266
|
+
FONT: () => FONT,
|
|
3267
|
+
FONT_FACE: () => FONT_FACE,
|
|
3268
|
+
FONT_FAMILY: () => FONT_FAMILY,
|
|
3269
|
+
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
3270
|
+
GRADIENT: () => GRADIENT,
|
|
3271
|
+
GRID: () => GRID,
|
|
3272
|
+
ICONS: () => ICONS,
|
|
3273
|
+
MEDIA: () => MEDIA,
|
|
3274
|
+
RESET: () => RESET,
|
|
3275
|
+
SEMANTIC_ICONS: () => SEMANTIC_ICONS,
|
|
3276
|
+
SEQUENCE: () => SEQUENCE,
|
|
3277
|
+
SHADOW: () => SHADOW,
|
|
3278
|
+
SPACING: () => SPACING,
|
|
3279
|
+
SVG: () => SVG,
|
|
3280
|
+
SVG_DATA: () => SVG_DATA,
|
|
3281
|
+
TEMPLATES: () => TEMPLATES,
|
|
3282
|
+
THEME: () => THEME,
|
|
3283
|
+
TIMING: () => TIMING,
|
|
3284
|
+
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
3285
|
+
UNIT: () => UNIT
|
|
3286
|
+
});
|
|
3287
|
+
|
|
3288
|
+
// src/defaultConfig/sequence.js
|
|
3289
|
+
var SEQUENCE = {
|
|
3290
|
+
"minor-second": 1.067,
|
|
3291
|
+
"major-second": 1.125,
|
|
3292
|
+
"minor-third": 1.2,
|
|
3293
|
+
"major-third": 1.25,
|
|
3294
|
+
"perfect-fourth": 1.333,
|
|
3295
|
+
"augmented-fourth": 1.414,
|
|
3296
|
+
"perfect-fifth": 1.5,
|
|
3297
|
+
"minor-sixth": 1.6,
|
|
3298
|
+
phi: 1.618,
|
|
3299
|
+
// golden-ratio
|
|
3300
|
+
"major-sixth": 1.667,
|
|
3301
|
+
"square-root-3": 1.732,
|
|
3302
|
+
// theodorus
|
|
3303
|
+
"minor-seventh": 1.778,
|
|
3304
|
+
"major-seventh": 1.875,
|
|
3305
|
+
octave: 2,
|
|
3306
|
+
"square-root-5": 2.23,
|
|
3307
|
+
// pythagoras
|
|
3308
|
+
"major-tenth": 2.5,
|
|
3309
|
+
"major-eleventh": 2.667,
|
|
3310
|
+
"major-twelfth": 3,
|
|
3311
|
+
pi: 3.14,
|
|
3312
|
+
// archimedes
|
|
3313
|
+
"double-octave": 4
|
|
3314
|
+
};
|
|
3315
|
+
|
|
3316
|
+
// src/defaultConfig/unit.js
|
|
3317
|
+
var UNIT = {
|
|
3318
|
+
default: "em"
|
|
3319
|
+
};
|
|
3320
|
+
|
|
3321
|
+
// src/defaultConfig/typography.js
|
|
3322
|
+
var defaultProps = {
|
|
3323
|
+
browserDefault: 16,
|
|
3324
|
+
base: 16,
|
|
3325
|
+
type: "font-size",
|
|
3326
|
+
ratio: SEQUENCE["minor-third"],
|
|
3327
|
+
range: [-3, 12],
|
|
3328
|
+
h1Matches: 6,
|
|
3329
|
+
lineHeight: 1.5,
|
|
3330
|
+
subSequence: true,
|
|
3331
|
+
mediaRegenerate: false,
|
|
3332
|
+
unit: "em",
|
|
3333
|
+
templates: {},
|
|
3334
|
+
sequence: {},
|
|
3335
|
+
scales: {},
|
|
3336
|
+
vars: {}
|
|
3416
3337
|
};
|
|
3417
|
-
var
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3338
|
+
var TYPOGRAPHY = defaultProps;
|
|
3339
|
+
|
|
3340
|
+
// src/defaultConfig/font.js
|
|
3341
|
+
var FONT = {};
|
|
3342
|
+
|
|
3343
|
+
// src/defaultConfig/font-family.js
|
|
3344
|
+
var FONT_FAMILY = {};
|
|
3345
|
+
var FONT_FAMILY_TYPES = {
|
|
3346
|
+
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
3347
|
+
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
3348
|
+
monospace: "Courier New, monospace, --system-default"
|
|
3422
3349
|
};
|
|
3423
|
-
var
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3350
|
+
var FONT_FACE = {};
|
|
3351
|
+
|
|
3352
|
+
// src/defaultConfig/media.js
|
|
3353
|
+
var MEDIA = {
|
|
3354
|
+
tv: "(min-width: 2780px)",
|
|
3355
|
+
light: "(prefers-color-scheme: light)",
|
|
3356
|
+
dark: "(prefers-color-scheme: dark)",
|
|
3357
|
+
print: "print"
|
|
3428
3358
|
};
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3359
|
+
|
|
3360
|
+
// src/defaultConfig/spacing.js
|
|
3361
|
+
var defaultProps2 = {
|
|
3362
|
+
base: TYPOGRAPHY.base,
|
|
3363
|
+
type: "spacing",
|
|
3364
|
+
ratio: SEQUENCE.phi,
|
|
3365
|
+
range: [-5, 15],
|
|
3366
|
+
subSequence: true,
|
|
3367
|
+
mediaRegenerate: false,
|
|
3368
|
+
unit: "em",
|
|
3369
|
+
sequence: {},
|
|
3370
|
+
scales: {},
|
|
3371
|
+
vars: {}
|
|
3437
3372
|
};
|
|
3438
|
-
var
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3373
|
+
var SPACING = defaultProps2;
|
|
3374
|
+
|
|
3375
|
+
// src/defaultConfig/color.js
|
|
3376
|
+
var COLOR = {};
|
|
3377
|
+
var GRADIENT = {};
|
|
3378
|
+
|
|
3379
|
+
// src/defaultConfig/theme.js
|
|
3380
|
+
var THEME = {};
|
|
3381
|
+
|
|
3382
|
+
// src/defaultConfig/shadow.js
|
|
3383
|
+
var SHADOW = {};
|
|
3384
|
+
|
|
3385
|
+
// src/defaultConfig/icons.js
|
|
3386
|
+
var ICONS = {};
|
|
3387
|
+
var SEMANTIC_ICONS = {};
|
|
3388
|
+
|
|
3389
|
+
// src/defaultConfig/timing.js
|
|
3390
|
+
var defaultProps3 = {
|
|
3391
|
+
default: 150,
|
|
3392
|
+
base: 150,
|
|
3393
|
+
type: "timing",
|
|
3394
|
+
ratio: SEQUENCE["perfect-fourth"],
|
|
3395
|
+
range: [-3, 12],
|
|
3396
|
+
mediaRegenerate: false,
|
|
3397
|
+
unit: "ms",
|
|
3398
|
+
sequence: {},
|
|
3399
|
+
scales: {},
|
|
3400
|
+
vars: {}
|
|
3444
3401
|
};
|
|
3445
|
-
var
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
});
|
|
3463
|
-
doc.body.appendChild(scriptEle);
|
|
3464
|
-
} catch (error) {
|
|
3465
|
-
reject(error);
|
|
3466
|
-
}
|
|
3467
|
-
});
|
|
3402
|
+
var TIMING = defaultProps3;
|
|
3403
|
+
|
|
3404
|
+
// src/defaultConfig/document.js
|
|
3405
|
+
var DOCUMENT = {};
|
|
3406
|
+
|
|
3407
|
+
// src/defaultConfig/responsive.js
|
|
3408
|
+
var BREAKPOINTS = {
|
|
3409
|
+
screenL: 1920,
|
|
3410
|
+
screenM: 1680,
|
|
3411
|
+
screenS: 1440,
|
|
3412
|
+
tabletL: 1366,
|
|
3413
|
+
tabletM: 1280,
|
|
3414
|
+
tabletS: 1024,
|
|
3415
|
+
mobileL: 768,
|
|
3416
|
+
mobileM: 560,
|
|
3417
|
+
mobileS: 480,
|
|
3418
|
+
mobileXS: 375
|
|
3468
3419
|
};
|
|
3469
|
-
var
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
doc.head.appendChild(linkElem);
|
|
3481
|
-
} catch (error) {
|
|
3482
|
-
reject(error);
|
|
3483
|
-
}
|
|
3484
|
-
});
|
|
3420
|
+
var DEVICES = {
|
|
3421
|
+
screenL: [1920, 1024],
|
|
3422
|
+
screenM: [1680, 1024],
|
|
3423
|
+
screenS: [1440, 978],
|
|
3424
|
+
tabletL: [1366, 926],
|
|
3425
|
+
tabletM: [1280, 768],
|
|
3426
|
+
tabletS: [1024, 768],
|
|
3427
|
+
mobileL: [768, 375],
|
|
3428
|
+
mobileM: [560, 768],
|
|
3429
|
+
mobileS: [480, 768],
|
|
3430
|
+
mobileXS: [375, 768]
|
|
3485
3431
|
};
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3432
|
+
|
|
3433
|
+
// src/defaultConfig/cases.js
|
|
3434
|
+
var CASES = {};
|
|
3435
|
+
|
|
3436
|
+
// src/defaultConfig/animation.js
|
|
3437
|
+
var ANIMATION = {};
|
|
3438
|
+
|
|
3439
|
+
// src/defaultConfig/svg.js
|
|
3440
|
+
var SVG = {};
|
|
3441
|
+
var SVG_DATA = {};
|
|
3442
|
+
|
|
3443
|
+
// src/defaultConfig/templates.js
|
|
3444
|
+
var TEMPLATES = {};
|
|
3445
|
+
|
|
3446
|
+
// src/defaultConfig/grid.js
|
|
3447
|
+
var defaultProps4 = {};
|
|
3448
|
+
var GRID = defaultProps4;
|
|
3449
|
+
|
|
3450
|
+
// src/defaultConfig/index.js
|
|
3451
|
+
var RESET = {};
|
|
3452
|
+
|
|
3453
|
+
// src/factory.js
|
|
3454
|
+
var CSS_VARS = {};
|
|
3455
|
+
var CONFIG = {
|
|
3456
|
+
verbose: false,
|
|
3457
|
+
useVariable: true,
|
|
3458
|
+
useReset: true,
|
|
3459
|
+
CSS_VARS,
|
|
3460
|
+
...defaultConfig_exports
|
|
3497
3461
|
};
|
|
3498
|
-
var
|
|
3499
|
-
var
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
el.setAttribute("readonly", "");
|
|
3503
|
-
el.style = { position: "absolute", left: "-9999px" };
|
|
3504
|
-
document.body.appendChild(el);
|
|
3505
|
-
el.select();
|
|
3506
|
-
document.execCommand("copy");
|
|
3507
|
-
document.body.removeChild(el);
|
|
3462
|
+
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
3463
|
+
var FACTORY = {
|
|
3464
|
+
active: "0",
|
|
3465
|
+
0: CONFIG
|
|
3508
3466
|
};
|
|
3509
|
-
var
|
|
3510
|
-
return
|
|
3467
|
+
var getActiveConfig = (def) => {
|
|
3468
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3511
3469
|
};
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3470
|
+
|
|
3471
|
+
// src/system/color.js
|
|
3472
|
+
var import_utils7 = __toESM(require_cjs(), 1);
|
|
3473
|
+
|
|
3474
|
+
// src/utils/unit.js
|
|
3475
|
+
var isScalingUnit = (unit) => {
|
|
3476
|
+
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
3516
3477
|
};
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3478
|
+
|
|
3479
|
+
// src/utils/color.js
|
|
3480
|
+
var import_globals = __toESM(require_cjs2(), 1);
|
|
3481
|
+
var import_utils2 = __toESM(require_cjs(), 1);
|
|
3482
|
+
var colorStringToRgbaArray = (color) => {
|
|
3483
|
+
if (color === "")
|
|
3484
|
+
return [0, 0, 0, 0];
|
|
3485
|
+
if (color.toLowerCase() === "transparent")
|
|
3486
|
+
return [0, 0, 0, 0];
|
|
3487
|
+
if (color[0] === "#") {
|
|
3488
|
+
if (color.length < 7) {
|
|
3489
|
+
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
3490
|
+
}
|
|
3491
|
+
return [
|
|
3492
|
+
parseInt(color.substr(1, 2), 16),
|
|
3493
|
+
parseInt(color.substr(3, 2), 16),
|
|
3494
|
+
parseInt(color.substr(5, 2), 16),
|
|
3495
|
+
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
3496
|
+
];
|
|
3521
3497
|
}
|
|
3522
|
-
)
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3498
|
+
if (color.indexOf("rgb") === -1) {
|
|
3499
|
+
if (import_globals.document && import_globals.window) {
|
|
3500
|
+
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
3501
|
+
const flag = "rgb(1, 2, 3)";
|
|
3502
|
+
elem.style.color = flag;
|
|
3503
|
+
if (elem.style.color !== flag) {
|
|
3504
|
+
import_globals.document.body.removeChild(elem);
|
|
3505
|
+
return;
|
|
3506
|
+
}
|
|
3507
|
+
elem.style.color = color;
|
|
3508
|
+
if (elem.style.color === flag || elem.style.color === "") {
|
|
3509
|
+
import_globals.document.body.removeChild(elem);
|
|
3510
|
+
return [0, 0, 0, 0];
|
|
3511
|
+
}
|
|
3512
|
+
color = import_globals.window.getComputedStyle(elem).color;
|
|
3513
|
+
import_globals.document.body.removeChild(elem);
|
|
3514
|
+
}
|
|
3515
|
+
}
|
|
3516
|
+
if (color.indexOf("rgb") === 0) {
|
|
3517
|
+
if (color.indexOf("rgba") === -1)
|
|
3518
|
+
color = `${color}, 1`;
|
|
3519
|
+
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
3520
|
+
}
|
|
3521
|
+
return [0, 0, 0, 0];
|
|
3522
|
+
};
|
|
3523
|
+
var hexToRgbArray = (hex, alpha = 1) => {
|
|
3524
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
3525
|
+
return [r, g, b];
|
|
3526
|
+
};
|
|
3527
|
+
var rgbArrayToHex = ([r, g, b]) => {
|
|
3528
|
+
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
3529
|
+
};
|
|
3530
|
+
var rgbToHSL = (r, g, b) => {
|
|
3531
|
+
const a = Math.max(r, g, b);
|
|
3532
|
+
const n = a - Math.min(r, g, b);
|
|
3533
|
+
const f = 1 - Math.abs(a + a - n - 1);
|
|
3534
|
+
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
3535
|
+
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
3536
|
+
};
|
|
3537
|
+
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
3538
|
+
Math.min(k - 3, 9 - k, 1),
|
|
3539
|
+
-1
|
|
3540
|
+
)) => [f(0), f(8), f(4)];
|
|
3541
|
+
var getColorShade = (col, amt) => {
|
|
3542
|
+
const num = parseInt(col, 16);
|
|
3543
|
+
let r = (num >> 16) + amt;
|
|
3544
|
+
if (r > 255)
|
|
3545
|
+
r = 255;
|
|
3546
|
+
else if (r < 0)
|
|
3547
|
+
r = 0;
|
|
3548
|
+
let b = (num >> 8 & 255) + amt;
|
|
3549
|
+
if (b > 255)
|
|
3550
|
+
b = 255;
|
|
3551
|
+
else if (b < 0)
|
|
3552
|
+
b = 0;
|
|
3553
|
+
let g = (num & 255) + amt;
|
|
3554
|
+
if (g > 255)
|
|
3555
|
+
g = 255;
|
|
3556
|
+
else if (g < 0)
|
|
3557
|
+
g = 0;
|
|
3558
|
+
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
3529
3559
|
};
|
|
3530
|
-
var
|
|
3531
|
-
if ((0,
|
|
3532
|
-
|
|
3533
|
-
if ((0,
|
|
3534
|
-
|
|
3535
|
-
if ((0,
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3560
|
+
var getRgbTone = (rgb, tone) => {
|
|
3561
|
+
if ((0, import_utils2.isString)(rgb) && rgb.includes("rgb"))
|
|
3562
|
+
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
3563
|
+
if ((0, import_utils2.isString)(rgb))
|
|
3564
|
+
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
3565
|
+
if ((0, import_utils2.isNumber)(tone))
|
|
3566
|
+
tone += "";
|
|
3567
|
+
const toHex = rgbArrayToHex(rgb);
|
|
3568
|
+
const abs = tone.slice(0, 1);
|
|
3569
|
+
if (abs === "-" || abs === "+") {
|
|
3570
|
+
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
3571
|
+
return hexToRgbArray(colorShade).join(", ");
|
|
3572
|
+
} else {
|
|
3573
|
+
const [r, g, b] = rgb;
|
|
3574
|
+
const hsl = rgbToHSL(r, g, b);
|
|
3575
|
+
const [h, s, l] = hsl;
|
|
3576
|
+
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
3577
|
+
return newRgb;
|
|
3578
|
+
}
|
|
3539
3579
|
};
|
|
3540
3580
|
|
|
3541
3581
|
// src/utils/sequence.js
|
|
3582
|
+
var import_utils3 = __toESM(require_cjs(), 1);
|
|
3583
|
+
var import_utils4 = __toESM(require_cjs3(), 1);
|
|
3542
3584
|
var numToLetterMap = {
|
|
3543
3585
|
"-6": "U",
|
|
3544
3586
|
"-5": "V",
|
|
@@ -3680,9 +3722,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3680
3722
|
unit = UNIT2.default,
|
|
3681
3723
|
useVariable
|
|
3682
3724
|
} = sequenceProps;
|
|
3683
|
-
if ((0,
|
|
3725
|
+
if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
|
|
3684
3726
|
return `var(${value})`;
|
|
3685
|
-
const prefix = `--${(
|
|
3727
|
+
const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
3686
3728
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
3687
3729
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
3688
3730
|
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
|
|
@@ -3728,7 +3770,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3728
3770
|
};
|
|
3729
3771
|
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
3730
3772
|
if (typeof value !== "string") {
|
|
3731
|
-
|
|
3773
|
+
const CONFIG2 = getActiveConfig();
|
|
3774
|
+
if (CONFIG2.verbose)
|
|
3775
|
+
console.warn(propertyName, value, "is not a string");
|
|
3732
3776
|
return { [propertyName]: value };
|
|
3733
3777
|
}
|
|
3734
3778
|
if (value === "-" || value === "")
|
|
@@ -3737,7 +3781,7 @@ var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
|
3737
3781
|
};
|
|
3738
3782
|
|
|
3739
3783
|
// src/utils/var.js
|
|
3740
|
-
var
|
|
3784
|
+
var import_utils5 = __toESM(require_cjs(), 1);
|
|
3741
3785
|
var applySequenceGlobalVars = (vars, obj, options) => {
|
|
3742
3786
|
const CONFIG2 = getActiveConfig();
|
|
3743
3787
|
const { UNIT: UNIT2 } = CONFIG2;
|
|
@@ -3779,12 +3823,12 @@ var applySequenceVars = (FACTORY2, options = {}) => {
|
|
|
3779
3823
|
};
|
|
3780
3824
|
|
|
3781
3825
|
// src/utils/sprite.js
|
|
3782
|
-
var
|
|
3826
|
+
var import_utils6 = __toESM(require_cjs(), 1);
|
|
3783
3827
|
|
|
3784
3828
|
// src/system/color.js
|
|
3785
3829
|
var getColor = (value, key, config) => {
|
|
3786
3830
|
const CONFIG2 = config || getActiveConfig();
|
|
3787
|
-
if (!(0,
|
|
3831
|
+
if (!(0, import_utils7.isString)(value)) {
|
|
3788
3832
|
if (CONFIG2.verbose)
|
|
3789
3833
|
console.warn(value, "- type for color is not valid");
|
|
3790
3834
|
return;
|
|
@@ -3793,7 +3837,7 @@ var getColor = (value, key, config) => {
|
|
|
3793
3837
|
return `var(${value})`;
|
|
3794
3838
|
if (key && value[key])
|
|
3795
3839
|
value = value[key];
|
|
3796
|
-
const [name, alpha, tone] = (0,
|
|
3840
|
+
const [name, alpha, tone] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
|
|
3797
3841
|
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
|
|
3798
3842
|
let val = COLOR2[name] || GRADIENT2[name];
|
|
3799
3843
|
if (!val) {
|
|
@@ -3825,17 +3869,17 @@ var getMediaColor = (value, globalTheme, config) => {
|
|
|
3825
3869
|
const CONFIG2 = config || getActiveConfig();
|
|
3826
3870
|
if (!globalTheme)
|
|
3827
3871
|
globalTheme = CONFIG2.globalTheme;
|
|
3828
|
-
if (!(0,
|
|
3872
|
+
if (!(0, import_utils7.isString)(value)) {
|
|
3829
3873
|
if (CONFIG2.verbose)
|
|
3830
3874
|
console.warn(value, "- type for color is not valid");
|
|
3831
3875
|
return;
|
|
3832
3876
|
}
|
|
3833
3877
|
if (value.slice(0, 2) === "--")
|
|
3834
3878
|
return `var(${value})`;
|
|
3835
|
-
const [name] = (0,
|
|
3879
|
+
const [name] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
|
|
3836
3880
|
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
|
|
3837
3881
|
const val = COLOR2[name] || GRADIENT2[name];
|
|
3838
|
-
const isObj = (0,
|
|
3882
|
+
const isObj = (0, import_utils7.isObject)(val);
|
|
3839
3883
|
if (isObj && val.value)
|
|
3840
3884
|
return getColor(value, `@${globalTheme}`, config);
|
|
3841
3885
|
else if (isObj) {
|
|
@@ -3858,16 +3902,18 @@ var getMediaColor = (value, globalTheme, config) => {
|
|
|
3858
3902
|
};
|
|
3859
3903
|
|
|
3860
3904
|
// src/system/theme.js
|
|
3861
|
-
var
|
|
3905
|
+
var import_utils9 = __toESM(require_cjs(), 1);
|
|
3862
3906
|
|
|
3863
3907
|
// src/system/font.js
|
|
3864
|
-
var
|
|
3908
|
+
var import_utils10 = __toESM(require_cjs(), 1);
|
|
3909
|
+
var import_utils11 = __toESM(require_cjs3(), 1);
|
|
3865
3910
|
|
|
3866
3911
|
// src/system/typography.js
|
|
3867
|
-
var
|
|
3912
|
+
var import_utils13 = __toESM(require_cjs(), 1);
|
|
3868
3913
|
|
|
3869
3914
|
// src/system/spacing.js
|
|
3870
|
-
var
|
|
3915
|
+
var import_utils15 = __toESM(require_cjs3(), 1);
|
|
3916
|
+
var import_utils16 = __toESM(require_cjs(), 1);
|
|
3871
3917
|
var getSequence = (sequenceProps) => {
|
|
3872
3918
|
const CONFIG2 = getActiveConfig();
|
|
3873
3919
|
const { SPACING: SPACING2 } = CONFIG2;
|
|
@@ -3878,11 +3924,11 @@ var getSequence = (sequenceProps) => {
|
|
|
3878
3924
|
};
|
|
3879
3925
|
var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
|
|
3880
3926
|
const sequence = getSequence(sequenceProps);
|
|
3881
|
-
if ((0,
|
|
3927
|
+
if ((0, import_utils16.isString)(value) && (value.includes("calc") || value.includes("var"))) {
|
|
3882
3928
|
return { [propertyName]: value };
|
|
3883
3929
|
}
|
|
3884
|
-
const stack = (
|
|
3885
|
-
if (!(0,
|
|
3930
|
+
const stack = (0, import_utils15.arrayzeValue)(value);
|
|
3931
|
+
if (!(0, import_utils16.isArray)(stack))
|
|
3886
3932
|
return;
|
|
3887
3933
|
if (stack.length > 1) {
|
|
3888
3934
|
let suffix = "";
|
|
@@ -3917,7 +3963,7 @@ var getSpacingBasedOnRatio = (props, propertyName, val) => {
|
|
|
3917
3963
|
let sequenceProps = SPACING2[spacingRatio];
|
|
3918
3964
|
if (!sequenceProps) {
|
|
3919
3965
|
const { type, base, range, subSequence } = SPACING2;
|
|
3920
|
-
sequenceProps = SPACING2[spacingRatio] = (0,
|
|
3966
|
+
sequenceProps = SPACING2[spacingRatio] = (0, import_utils16.merge)({
|
|
3921
3967
|
ratio: spacingRatio,
|
|
3922
3968
|
type: type + "-" + spacingRatio,
|
|
3923
3969
|
unit,
|
|
@@ -3940,22 +3986,22 @@ var getSpacingBasedOnRatio = (props, propertyName, val) => {
|
|
|
3940
3986
|
};
|
|
3941
3987
|
|
|
3942
3988
|
// src/system/shadow.js
|
|
3943
|
-
var
|
|
3989
|
+
var import_utils18 = __toESM(require_cjs(), 1);
|
|
3944
3990
|
var getShadow = (value, globalTheme) => {
|
|
3945
3991
|
const CONFIG2 = getActiveConfig();
|
|
3946
3992
|
if (!globalTheme)
|
|
3947
3993
|
globalTheme = CONFIG2.globalTheme;
|
|
3948
|
-
if (!(0,
|
|
3994
|
+
if (!(0, import_utils18.isString)(value)) {
|
|
3949
3995
|
if (CONFIG2.verbose)
|
|
3950
3996
|
console.warn(value, "- type for color is not valid");
|
|
3951
3997
|
return;
|
|
3952
3998
|
}
|
|
3953
3999
|
if (value.slice(0, 2) === "--")
|
|
3954
4000
|
return `var(${value})`;
|
|
3955
|
-
const [name] = (0,
|
|
4001
|
+
const [name] = (0, import_utils18.isArray)(value) ? value : value.split(" ");
|
|
3956
4002
|
const { SHADOW: SHADOW2 } = CONFIG2;
|
|
3957
4003
|
const val = SHADOW2[name];
|
|
3958
|
-
const isObj = (0,
|
|
4004
|
+
const isObj = (0, import_utils18.isObject)(val);
|
|
3959
4005
|
if (!val) {
|
|
3960
4006
|
if (CONFIG2.verbose)
|
|
3961
4007
|
console.warn("Can't find color ", name);
|
|
@@ -3984,10 +4030,11 @@ var getShadow = (value, globalTheme) => {
|
|
|
3984
4030
|
};
|
|
3985
4031
|
|
|
3986
4032
|
// src/system/timing.js
|
|
4033
|
+
var import_utils19 = __toESM(require_cjs3(), 1);
|
|
3987
4034
|
var getTimingFunction = (value) => {
|
|
3988
4035
|
const CONFIG2 = getActiveConfig();
|
|
3989
4036
|
const { TIMING: TIMING2 } = CONFIG2;
|
|
3990
|
-
return TIMING2[value] || TIMING2[(
|
|
4037
|
+
return TIMING2[value] || TIMING2[(0, import_utils19.toCamelCase)(value)] || value;
|
|
3991
4038
|
};
|
|
3992
4039
|
var getTimingByKey = (value, property = "timing") => {
|
|
3993
4040
|
const CONFIG2 = getActiveConfig();
|
|
@@ -4000,13 +4047,13 @@ var getTimingByKey = (value, property = "timing") => {
|
|
|
4000
4047
|
};
|
|
4001
4048
|
|
|
4002
4049
|
// src/system/document.js
|
|
4003
|
-
var
|
|
4050
|
+
var import_utils21 = __toESM(require_cjs(), 1);
|
|
4004
4051
|
|
|
4005
4052
|
// src/system/svg.js
|
|
4006
4053
|
var import_globals2 = __toESM(require_cjs2(), 1);
|
|
4007
4054
|
|
|
4008
4055
|
// src/system/reset.js
|
|
4009
|
-
var
|
|
4056
|
+
var import_utils24 = __toESM(require_cjs(), 1);
|
|
4010
4057
|
|
|
4011
4058
|
// src/transforms/index.js
|
|
4012
4059
|
var isBorderStyle = (str) => [
|
|
@@ -4080,7 +4127,7 @@ var transformBackgroundImage = (backgroundImage, globalTheme) => {
|
|
|
4080
4127
|
return v;
|
|
4081
4128
|
}).join(" ");
|
|
4082
4129
|
};
|
|
4083
|
-
var transfromGap = (gap) => (0,
|
|
4130
|
+
var transfromGap = (gap) => (0, import_utils25.isString)(gap) && gap.split(" ").map((v) => getSpacingByKey(v, "gap").gap).join(" ");
|
|
4084
4131
|
var transformTransition = (transition) => {
|
|
4085
4132
|
const arr = transition.split(" ");
|
|
4086
4133
|
if (!arr.length)
|
|
@@ -4098,7 +4145,7 @@ var transformTransition = (transition) => {
|
|
|
4098
4145
|
}).join(" ");
|
|
4099
4146
|
};
|
|
4100
4147
|
var transformDuration = (duration, props, propertyName) => {
|
|
4101
|
-
if (!(0,
|
|
4148
|
+
if (!(0, import_utils25.isString)(duration))
|
|
4102
4149
|
return;
|
|
4103
4150
|
return duration.split(",").map((v) => getTimingByKey(v).timing || v).join(",");
|
|
4104
4151
|
};
|
|
@@ -4114,11 +4161,11 @@ var checkIfBoxSize = (propertyName) => {
|
|
|
4114
4161
|
};
|
|
4115
4162
|
var transformSize = (propertyName, val, props = {}, opts = {}) => {
|
|
4116
4163
|
let value = val || props[propertyName];
|
|
4117
|
-
if ((0,
|
|
4164
|
+
if ((0, import_utils25.isUndefined)(value) && (0, import_utils25.isNull)(value))
|
|
4118
4165
|
return;
|
|
4119
4166
|
const shouldScaleBoxSize = props.scaleBoxSize;
|
|
4120
4167
|
const isBoxSize = checkIfBoxSize(propertyName);
|
|
4121
|
-
if (!shouldScaleBoxSize && isBoxSize && (0,
|
|
4168
|
+
if (!shouldScaleBoxSize && isBoxSize && (0, import_utils25.isString)(value)) {
|
|
4122
4169
|
value = value.split(" ").map((v) => {
|
|
4123
4170
|
const isSingleLetter = v.length < 3 && /[A-Z]/.test(v);
|
|
4124
4171
|
const hasUnits = ["%", "vw", "vh", "ch"].some((unit) => value.includes(unit));
|