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