@symbo.ls/scratch 2.11.397 → 2.11.410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/factory.js +165 -26
- package/dist/cjs/index.js +2413 -2123
- package/dist/cjs/set.js +2184 -1892
- package/dist/cjs/system/color.js +2009 -1716
- package/dist/cjs/system/document.js +1999 -1706
- package/dist/cjs/system/font.js +1954 -1662
- package/dist/cjs/system/index.js +2211 -1919
- package/dist/cjs/system/reset.js +2010 -1717
- package/dist/cjs/system/shadow.js +2163 -1869
- package/dist/cjs/system/spacing.js +2003 -1709
- package/dist/cjs/system/svg.js +1950 -1657
- package/dist/cjs/system/theme.js +2016 -1723
- package/dist/cjs/system/timing.js +2002 -1710
- package/dist/cjs/system/typography.js +2199 -1904
- package/dist/cjs/transforms/index.js +2189 -1897
- package/dist/cjs/utils/color.js +165 -26
- package/dist/cjs/utils/index.js +2200 -1907
- package/dist/cjs/utils/sequence.js +1935 -1642
- package/dist/cjs/utils/sprite.js +165 -26
- package/dist/cjs/utils/var.js +1981 -1688
- package/package.json +2 -2
package/dist/cjs/utils/index.js
CHANGED
|
@@ -34,31 +34,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_cjs = __commonJS({
|
|
35
35
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
37
|
+
var __defProp3 = Object.defineProperty;
|
|
38
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
39
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
40
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
41
|
+
var __export3 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
|
-
var
|
|
45
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
46
46
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
47
|
-
for (let key of
|
|
48
|
-
if (!
|
|
49
|
-
|
|
47
|
+
for (let key of __getOwnPropNames3(from))
|
|
48
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
49
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var
|
|
53
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var globals_exports = {};
|
|
55
|
-
|
|
55
|
+
__export3(globals_exports, {
|
|
56
56
|
document: () => document3,
|
|
57
57
|
global: () => global,
|
|
58
58
|
self: () => self,
|
|
59
59
|
window: () => window2
|
|
60
60
|
});
|
|
61
|
-
module2.exports =
|
|
61
|
+
module2.exports = __toCommonJS3(globals_exports);
|
|
62
62
|
var global = globalThis;
|
|
63
63
|
var self = globalThis;
|
|
64
64
|
var window2 = globalThis;
|
|
@@ -66,33 +66,33 @@ var require_cjs = __commonJS({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// ../../../domql/packages/utils/dist/cjs/key.js
|
|
70
70
|
var require_key = __commonJS({
|
|
71
|
-
"
|
|
71
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
72
72
|
"use strict";
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
73
|
+
var __defProp3 = Object.defineProperty;
|
|
74
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
75
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
76
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
77
|
+
var __export3 = (target, all) => {
|
|
78
78
|
for (var name in all)
|
|
79
|
-
|
|
79
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
80
80
|
};
|
|
81
|
-
var
|
|
81
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
82
82
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
83
|
-
for (let key of
|
|
84
|
-
if (!
|
|
85
|
-
|
|
83
|
+
for (let key of __getOwnPropNames3(from))
|
|
84
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
85
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
86
86
|
}
|
|
87
87
|
return to;
|
|
88
88
|
};
|
|
89
|
-
var
|
|
89
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
90
90
|
var key_exports = {};
|
|
91
|
-
|
|
91
|
+
__export3(key_exports, {
|
|
92
92
|
createSnapshotId: () => createSnapshotId,
|
|
93
93
|
generateKey: () => generateKey
|
|
94
94
|
});
|
|
95
|
-
module2.exports =
|
|
95
|
+
module2.exports = __toCommonJS3(key_exports);
|
|
96
96
|
var generateKey = /* @__PURE__ */ function() {
|
|
97
97
|
let index = 0;
|
|
98
98
|
function newId() {
|
|
@@ -105,36 +105,36 @@ var require_key = __commonJS({
|
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
//
|
|
108
|
+
// ../../../domql/packages/utils/dist/cjs/env.js
|
|
109
109
|
var require_env = __commonJS({
|
|
110
|
-
"
|
|
110
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
111
111
|
"use strict";
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
112
|
+
var __defProp3 = Object.defineProperty;
|
|
113
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
114
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
115
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
116
|
+
var __export3 = (target, all) => {
|
|
117
117
|
for (var name in all)
|
|
118
|
-
|
|
118
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
119
119
|
};
|
|
120
|
-
var
|
|
120
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
121
121
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
122
|
-
for (let key of
|
|
123
|
-
if (!
|
|
124
|
-
|
|
122
|
+
for (let key of __getOwnPropNames3(from))
|
|
123
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
124
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
125
125
|
}
|
|
126
126
|
return to;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
128
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
129
129
|
var env_exports = {};
|
|
130
|
-
|
|
130
|
+
__export3(env_exports, {
|
|
131
131
|
NODE_ENV: () => NODE_ENV,
|
|
132
132
|
getNev: () => getNev,
|
|
133
133
|
isDevelopment: () => isDevelopment,
|
|
134
134
|
isProduction: () => isProduction,
|
|
135
135
|
isTest: () => isTest
|
|
136
136
|
});
|
|
137
|
-
module2.exports =
|
|
137
|
+
module2.exports = __toCommonJS3(env_exports);
|
|
138
138
|
var NODE_ENV = "development";
|
|
139
139
|
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
140
140
|
var isTest = (env = NODE_ENV) => env === "test";
|
|
@@ -143,35 +143,35 @@ var require_env = __commonJS({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// ../../../domql/packages/utils/dist/cjs/globals.js
|
|
147
147
|
var require_globals = __commonJS({
|
|
148
|
-
"
|
|
148
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
var
|
|
154
|
-
var
|
|
150
|
+
var __defProp3 = Object.defineProperty;
|
|
151
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
152
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
153
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __export3 = (target, all) => {
|
|
155
155
|
for (var name in all)
|
|
156
|
-
|
|
156
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
157
157
|
};
|
|
158
|
-
var
|
|
158
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
159
159
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
160
|
-
for (let key of
|
|
161
|
-
if (!
|
|
162
|
-
|
|
160
|
+
for (let key of __getOwnPropNames3(from))
|
|
161
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
162
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
163
163
|
}
|
|
164
164
|
return to;
|
|
165
165
|
};
|
|
166
|
-
var
|
|
166
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
167
167
|
var globals_exports = {};
|
|
168
|
-
|
|
168
|
+
__export3(globals_exports, {
|
|
169
169
|
document: () => document3,
|
|
170
170
|
global: () => global,
|
|
171
171
|
self: () => self,
|
|
172
172
|
window: () => window2
|
|
173
173
|
});
|
|
174
|
-
module2.exports =
|
|
174
|
+
module2.exports = __toCommonJS3(globals_exports);
|
|
175
175
|
var global = globalThis;
|
|
176
176
|
var self = globalThis;
|
|
177
177
|
var window2 = globalThis;
|
|
@@ -179,33 +179,33 @@ var require_globals = __commonJS({
|
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
-
//
|
|
182
|
+
// ../../../domql/packages/utils/dist/cjs/node.js
|
|
183
183
|
var require_node = __commonJS({
|
|
184
|
-
"
|
|
184
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
185
185
|
"use strict";
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
186
|
+
var __defProp3 = Object.defineProperty;
|
|
187
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
188
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
189
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
190
|
+
var __export3 = (target, all) => {
|
|
191
191
|
for (var name in all)
|
|
192
|
-
|
|
192
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
193
193
|
};
|
|
194
|
-
var
|
|
194
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
195
195
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
196
|
-
for (let key of
|
|
197
|
-
if (!
|
|
198
|
-
|
|
196
|
+
for (let key of __getOwnPropNames3(from))
|
|
197
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
198
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
199
199
|
}
|
|
200
200
|
return to;
|
|
201
201
|
};
|
|
202
|
-
var
|
|
202
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
203
203
|
var node_exports = {};
|
|
204
|
-
|
|
204
|
+
__export3(node_exports, {
|
|
205
205
|
isHtmlElement: () => isHtmlElement,
|
|
206
206
|
isNode: () => isNode
|
|
207
207
|
});
|
|
208
|
-
module2.exports =
|
|
208
|
+
module2.exports = __toCommonJS3(node_exports);
|
|
209
209
|
var import_globals2 = require_globals();
|
|
210
210
|
var isNode = (obj) => {
|
|
211
211
|
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -216,29 +216,29 @@ var require_node = __commonJS({
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
-
//
|
|
219
|
+
// ../../../domql/packages/utils/dist/cjs/types.js
|
|
220
220
|
var require_types = __commonJS({
|
|
221
|
-
"
|
|
221
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
222
222
|
"use strict";
|
|
223
|
-
var
|
|
224
|
-
var
|
|
225
|
-
var
|
|
226
|
-
var
|
|
227
|
-
var
|
|
223
|
+
var __defProp3 = Object.defineProperty;
|
|
224
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
225
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
226
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
227
|
+
var __export3 = (target, all) => {
|
|
228
228
|
for (var name in all)
|
|
229
|
-
|
|
229
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
230
230
|
};
|
|
231
|
-
var
|
|
231
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
232
232
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
233
|
-
for (let key of
|
|
234
|
-
if (!
|
|
235
|
-
|
|
233
|
+
for (let key of __getOwnPropNames3(from))
|
|
234
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
235
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
236
236
|
}
|
|
237
237
|
return to;
|
|
238
238
|
};
|
|
239
|
-
var
|
|
239
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
240
240
|
var types_exports = {};
|
|
241
|
-
|
|
241
|
+
__export3(types_exports, {
|
|
242
242
|
TYPES: () => TYPES,
|
|
243
243
|
is: () => is,
|
|
244
244
|
isArray: () => isArray2,
|
|
@@ -254,7 +254,7 @@ var require_types = __commonJS({
|
|
|
254
254
|
isString: () => isString4,
|
|
255
255
|
isUndefined: () => isUndefined
|
|
256
256
|
});
|
|
257
|
-
module2.exports =
|
|
257
|
+
module2.exports = __toCommonJS3(types_exports);
|
|
258
258
|
var import_node = require_node();
|
|
259
259
|
var isObject2 = (arg) => {
|
|
260
260
|
if (arg === null)
|
|
@@ -306,31 +306,32 @@ var require_types = __commonJS({
|
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
//
|
|
309
|
+
// ../../../domql/packages/utils/dist/cjs/array.js
|
|
310
310
|
var require_array = __commonJS({
|
|
311
|
-
"
|
|
311
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
312
312
|
"use strict";
|
|
313
|
-
var
|
|
314
|
-
var
|
|
315
|
-
var
|
|
316
|
-
var
|
|
317
|
-
var
|
|
313
|
+
var __defProp3 = Object.defineProperty;
|
|
314
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
315
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
316
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
317
|
+
var __export3 = (target, all) => {
|
|
318
318
|
for (var name in all)
|
|
319
|
-
|
|
319
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
320
320
|
};
|
|
321
|
-
var
|
|
321
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
322
322
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
323
|
-
for (let key of
|
|
324
|
-
if (!
|
|
325
|
-
|
|
323
|
+
for (let key of __getOwnPropNames3(from))
|
|
324
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
325
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
326
326
|
}
|
|
327
327
|
return to;
|
|
328
328
|
};
|
|
329
|
-
var
|
|
329
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
330
330
|
var array_exports = {};
|
|
331
|
-
|
|
331
|
+
__export3(array_exports, {
|
|
332
332
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
333
333
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
334
|
+
arraysEqual: () => arraysEqual,
|
|
334
335
|
createNestedObject: () => createNestedObject,
|
|
335
336
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
336
337
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
@@ -344,7 +345,7 @@ var require_array = __commonJS({
|
|
|
344
345
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
345
346
|
swapItemsInArray: () => swapItemsInArray
|
|
346
347
|
});
|
|
347
|
-
module2.exports =
|
|
348
|
+
module2.exports = __toCommonJS3(array_exports);
|
|
348
349
|
var import_object = require_object();
|
|
349
350
|
var import_types = require_types();
|
|
350
351
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -447,38 +448,53 @@ var require_array = __commonJS({
|
|
|
447
448
|
}
|
|
448
449
|
return newArray;
|
|
449
450
|
};
|
|
451
|
+
var arraysEqual = (arr1, arr2) => {
|
|
452
|
+
if (arr1.length !== arr2.length) {
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
456
|
+
if (arr1[i] !== arr2[i]) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return true;
|
|
461
|
+
};
|
|
450
462
|
}
|
|
451
463
|
});
|
|
452
464
|
|
|
453
|
-
//
|
|
465
|
+
// ../../../domql/packages/utils/dist/cjs/string.js
|
|
454
466
|
var require_string = __commonJS({
|
|
455
|
-
"
|
|
467
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
456
468
|
"use strict";
|
|
457
|
-
var
|
|
458
|
-
var
|
|
459
|
-
var
|
|
460
|
-
var
|
|
461
|
-
var
|
|
469
|
+
var __defProp3 = Object.defineProperty;
|
|
470
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
471
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
472
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
473
|
+
var __export3 = (target, all) => {
|
|
462
474
|
for (var name in all)
|
|
463
|
-
|
|
475
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
464
476
|
};
|
|
465
|
-
var
|
|
477
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
466
478
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
467
|
-
for (let key of
|
|
468
|
-
if (!
|
|
469
|
-
|
|
479
|
+
for (let key of __getOwnPropNames3(from))
|
|
480
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
481
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
470
482
|
}
|
|
471
483
|
return to;
|
|
472
484
|
};
|
|
473
|
-
var
|
|
485
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
474
486
|
var string_exports = {};
|
|
475
|
-
|
|
487
|
+
__export3(string_exports, {
|
|
488
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
489
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
490
|
+
findKeyPosition: () => findKeyPosition,
|
|
476
491
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
477
492
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
493
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
478
494
|
stringIncludesAny: () => stringIncludesAny,
|
|
479
495
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
480
496
|
});
|
|
481
|
-
module2.exports =
|
|
497
|
+
module2.exports = __toCommonJS3(string_exports);
|
|
482
498
|
var stringIncludesAny = (str, characters) => {
|
|
483
499
|
for (const char of characters) {
|
|
484
500
|
if (str.includes(char)) {
|
|
@@ -520,33 +536,100 @@ var require_string = __commonJS({
|
|
|
520
536
|
var lowercaseFirstLetter = (inputString) => {
|
|
521
537
|
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
522
538
|
};
|
|
539
|
+
var findKeyPosition = (str, key) => {
|
|
540
|
+
const lines = str.split("\n");
|
|
541
|
+
let startLineNumber = -1;
|
|
542
|
+
let endLineNumber = -1;
|
|
543
|
+
let startColumn = -1;
|
|
544
|
+
let endColumn = -1;
|
|
545
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
546
|
+
let braceCount = 0;
|
|
547
|
+
let foundKey = false;
|
|
548
|
+
for (let i = 0; i < lines.length; i++) {
|
|
549
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
550
|
+
foundKey = true;
|
|
551
|
+
startLineNumber = i + 1;
|
|
552
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
553
|
+
if (lines[i].includes("{}")) {
|
|
554
|
+
endLineNumber = startLineNumber;
|
|
555
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
559
|
+
if (line.includes("{") || line.includes("[")) {
|
|
560
|
+
braceCount = 1;
|
|
561
|
+
} else {
|
|
562
|
+
endLineNumber = i + 1;
|
|
563
|
+
endColumn = lines[i].length + 1;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
} else if (foundKey) {
|
|
567
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
568
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
569
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
570
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
571
|
+
if (braceCount === 0) {
|
|
572
|
+
endLineNumber = i + 1;
|
|
573
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
return {
|
|
579
|
+
startColumn,
|
|
580
|
+
endColumn,
|
|
581
|
+
startLineNumber,
|
|
582
|
+
endLineNumber
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
586
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
587
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
588
|
+
const octalValue = parseInt(p1, 8);
|
|
589
|
+
const char = String.fromCharCode(octalValue);
|
|
590
|
+
return char;
|
|
591
|
+
});
|
|
592
|
+
};
|
|
593
|
+
var customEncodeURIComponent = (str) => {
|
|
594
|
+
return str.split("").map((char) => {
|
|
595
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
596
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
597
|
+
}
|
|
598
|
+
return char;
|
|
599
|
+
}).join("");
|
|
600
|
+
};
|
|
601
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
602
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
603
|
+
};
|
|
523
604
|
}
|
|
524
605
|
});
|
|
525
606
|
|
|
526
|
-
//
|
|
607
|
+
// ../../../domql/packages/utils/dist/cjs/object.js
|
|
527
608
|
var require_object = __commonJS({
|
|
528
|
-
"
|
|
609
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
529
610
|
"use strict";
|
|
530
|
-
var
|
|
531
|
-
var
|
|
532
|
-
var
|
|
533
|
-
var
|
|
534
|
-
var
|
|
611
|
+
var __defProp3 = Object.defineProperty;
|
|
612
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
613
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
614
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
615
|
+
var __export3 = (target, all) => {
|
|
535
616
|
for (var name in all)
|
|
536
|
-
|
|
617
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
537
618
|
};
|
|
538
|
-
var
|
|
619
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
539
620
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
540
|
-
for (let key of
|
|
541
|
-
if (!
|
|
542
|
-
|
|
621
|
+
for (let key of __getOwnPropNames3(from))
|
|
622
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
623
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
543
624
|
}
|
|
544
625
|
return to;
|
|
545
626
|
};
|
|
546
|
-
var
|
|
627
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
547
628
|
var object_exports = {};
|
|
548
|
-
|
|
629
|
+
__export3(object_exports, {
|
|
630
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
549
631
|
clone: () => clone,
|
|
632
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
550
633
|
deepClone: () => deepClone2,
|
|
551
634
|
deepCloneExclude: () => deepCloneExclude,
|
|
552
635
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
@@ -561,6 +644,8 @@ var require_object = __commonJS({
|
|
|
561
644
|
diffObjects: () => diffObjects,
|
|
562
645
|
exec: () => exec,
|
|
563
646
|
flattenRecursive: () => flattenRecursive,
|
|
647
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
648
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
564
649
|
hasOwnProperty: () => hasOwnProperty,
|
|
565
650
|
isEmpty: () => isEmpty,
|
|
566
651
|
isEmptyObject: () => isEmptyObject,
|
|
@@ -577,7 +662,7 @@ var require_object = __commonJS({
|
|
|
577
662
|
removeFromObject: () => removeFromObject,
|
|
578
663
|
stringToObject: () => stringToObject
|
|
579
664
|
});
|
|
580
|
-
module2.exports =
|
|
665
|
+
module2.exports = __toCommonJS3(object_exports);
|
|
581
666
|
var import_globals2 = require_globals();
|
|
582
667
|
var import_types = require_types();
|
|
583
668
|
var import_array = require_array();
|
|
@@ -1030,38 +1115,92 @@ var require_object = __commonJS({
|
|
|
1030
1115
|
}
|
|
1031
1116
|
return obj;
|
|
1032
1117
|
};
|
|
1118
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
1119
|
+
if (obj === null || typeof obj !== "object") {
|
|
1120
|
+
return obj;
|
|
1121
|
+
}
|
|
1122
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
1123
|
+
for (const key in obj) {
|
|
1124
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
1125
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
return newObj;
|
|
1129
|
+
};
|
|
1130
|
+
var checkIfKeyIsComponent = (key) => {
|
|
1131
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
1132
|
+
if (!isFirstKeyString)
|
|
1133
|
+
return;
|
|
1134
|
+
const firstCharKey = key.slice(0, 1);
|
|
1135
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
1136
|
+
};
|
|
1137
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
1138
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
1139
|
+
return el;
|
|
1140
|
+
}
|
|
1141
|
+
if (el.extend) {
|
|
1142
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
1143
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
1144
|
+
if (foundString || foundInArray)
|
|
1145
|
+
return el;
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
var getExtendsInElement = (obj) => {
|
|
1149
|
+
let result = [];
|
|
1150
|
+
function traverse(o) {
|
|
1151
|
+
for (const key in o) {
|
|
1152
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
1153
|
+
if (checkIfKeyIsComponent(key)) {
|
|
1154
|
+
result.push(key);
|
|
1155
|
+
}
|
|
1156
|
+
if (key === "extend") {
|
|
1157
|
+
if (typeof o[key] === "string") {
|
|
1158
|
+
result.push(o[key]);
|
|
1159
|
+
} else if (Array.isArray(o[key])) {
|
|
1160
|
+
result = result.concat(o[key]);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
1164
|
+
traverse(o[key]);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
traverse(obj);
|
|
1170
|
+
return result;
|
|
1171
|
+
};
|
|
1033
1172
|
}
|
|
1034
1173
|
});
|
|
1035
1174
|
|
|
1036
|
-
//
|
|
1175
|
+
// ../../../domql/packages/utils/dist/cjs/function.js
|
|
1037
1176
|
var require_function = __commonJS({
|
|
1038
|
-
"
|
|
1177
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
1039
1178
|
"use strict";
|
|
1040
|
-
var
|
|
1041
|
-
var
|
|
1042
|
-
var
|
|
1043
|
-
var
|
|
1044
|
-
var
|
|
1179
|
+
var __defProp3 = Object.defineProperty;
|
|
1180
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1181
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1182
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1183
|
+
var __export3 = (target, all) => {
|
|
1045
1184
|
for (var name in all)
|
|
1046
|
-
|
|
1185
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1047
1186
|
};
|
|
1048
|
-
var
|
|
1187
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1049
1188
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1050
|
-
for (let key of
|
|
1051
|
-
if (!
|
|
1052
|
-
|
|
1189
|
+
for (let key of __getOwnPropNames3(from))
|
|
1190
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1191
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1053
1192
|
}
|
|
1054
1193
|
return to;
|
|
1055
1194
|
};
|
|
1056
|
-
var
|
|
1195
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1057
1196
|
var function_exports = {};
|
|
1058
|
-
|
|
1197
|
+
__export3(function_exports, {
|
|
1059
1198
|
debounce: () => debounce,
|
|
1060
1199
|
debounceOnContext: () => debounceOnContext,
|
|
1061
1200
|
isStringFunction: () => isStringFunction,
|
|
1062
1201
|
memoize: () => memoize
|
|
1063
1202
|
});
|
|
1064
|
-
module2.exports =
|
|
1203
|
+
module2.exports = __toCommonJS3(function_exports);
|
|
1065
1204
|
function debounce(func, wait, immediate) {
|
|
1066
1205
|
let timeout;
|
|
1067
1206
|
return function() {
|
|
@@ -1108,33 +1247,33 @@ var require_function = __commonJS({
|
|
|
1108
1247
|
}
|
|
1109
1248
|
});
|
|
1110
1249
|
|
|
1111
|
-
//
|
|
1250
|
+
// ../../../domql/packages/utils/dist/cjs/log.js
|
|
1112
1251
|
var require_log = __commonJS({
|
|
1113
|
-
"
|
|
1252
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1114
1253
|
"use strict";
|
|
1115
|
-
var
|
|
1116
|
-
var
|
|
1117
|
-
var
|
|
1118
|
-
var
|
|
1119
|
-
var
|
|
1254
|
+
var __defProp3 = Object.defineProperty;
|
|
1255
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1256
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1257
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1258
|
+
var __export3 = (target, all) => {
|
|
1120
1259
|
for (var name in all)
|
|
1121
|
-
|
|
1260
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1122
1261
|
};
|
|
1123
|
-
var
|
|
1262
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1124
1263
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1125
|
-
for (let key of
|
|
1126
|
-
if (!
|
|
1127
|
-
|
|
1264
|
+
for (let key of __getOwnPropNames3(from))
|
|
1265
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1266
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1128
1267
|
}
|
|
1129
1268
|
return to;
|
|
1130
1269
|
};
|
|
1131
|
-
var
|
|
1270
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1132
1271
|
var log_exports = {};
|
|
1133
|
-
|
|
1272
|
+
__export3(log_exports, {
|
|
1134
1273
|
logGroupIf: () => logGroupIf,
|
|
1135
1274
|
logIf: () => logIf
|
|
1136
1275
|
});
|
|
1137
|
-
module2.exports =
|
|
1276
|
+
module2.exports = __toCommonJS3(log_exports);
|
|
1138
1277
|
var logIf = (bool, ...arg) => {
|
|
1139
1278
|
if (bool)
|
|
1140
1279
|
arg.map((v) => console.log(v));
|
|
@@ -1149,50 +1288,50 @@ var require_log = __commonJS({
|
|
|
1149
1288
|
}
|
|
1150
1289
|
});
|
|
1151
1290
|
|
|
1152
|
-
//
|
|
1291
|
+
// ../../../domql/packages/utils/dist/cjs/cookie.js
|
|
1153
1292
|
var require_cookie = __commonJS({
|
|
1154
|
-
"
|
|
1293
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1155
1294
|
"use strict";
|
|
1156
|
-
var
|
|
1157
|
-
var
|
|
1158
|
-
var
|
|
1159
|
-
var
|
|
1160
|
-
var
|
|
1295
|
+
var __defProp3 = Object.defineProperty;
|
|
1296
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1297
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1298
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1299
|
+
var __export3 = (target, all) => {
|
|
1161
1300
|
for (var name in all)
|
|
1162
|
-
|
|
1301
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1163
1302
|
};
|
|
1164
|
-
var
|
|
1303
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1165
1304
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1166
|
-
for (let key of
|
|
1167
|
-
if (!
|
|
1168
|
-
|
|
1305
|
+
for (let key of __getOwnPropNames3(from))
|
|
1306
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1307
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1169
1308
|
}
|
|
1170
1309
|
return to;
|
|
1171
1310
|
};
|
|
1172
|
-
var
|
|
1311
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1173
1312
|
var cookie_exports = {};
|
|
1174
|
-
|
|
1313
|
+
__export3(cookie_exports, {
|
|
1175
1314
|
getCookie: () => getCookie,
|
|
1176
1315
|
isMobile: () => isMobile,
|
|
1177
1316
|
setCookie: () => setCookie
|
|
1178
1317
|
});
|
|
1179
|
-
module2.exports =
|
|
1318
|
+
module2.exports = __toCommonJS3(cookie_exports);
|
|
1180
1319
|
var import_types = require_types();
|
|
1181
|
-
var
|
|
1320
|
+
var import_utils9 = require_cjs2();
|
|
1182
1321
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1183
1322
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1184
|
-
if ((0, import_types.isUndefined)(
|
|
1323
|
+
if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
|
|
1185
1324
|
return;
|
|
1186
1325
|
const d = /* @__PURE__ */ new Date();
|
|
1187
1326
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1188
1327
|
const expires = `expires=${d.toUTCString()}`;
|
|
1189
|
-
|
|
1328
|
+
import_utils9.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1190
1329
|
};
|
|
1191
1330
|
var getCookie = (cname) => {
|
|
1192
|
-
if ((0, import_types.isUndefined)(
|
|
1331
|
+
if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
|
|
1193
1332
|
return;
|
|
1194
1333
|
const name = `${cname}=`;
|
|
1195
|
-
const decodedCookie = decodeURIComponent(
|
|
1334
|
+
const decodedCookie = decodeURIComponent(import_utils9.document.cookie);
|
|
1196
1335
|
const ca = decodedCookie.split(";");
|
|
1197
1336
|
for (let i = 0; i < ca.length; i++) {
|
|
1198
1337
|
let c = ca[i];
|
|
@@ -1206,33 +1345,33 @@ var require_cookie = __commonJS({
|
|
|
1206
1345
|
}
|
|
1207
1346
|
});
|
|
1208
1347
|
|
|
1209
|
-
//
|
|
1348
|
+
// ../../../domql/packages/utils/dist/cjs/tags.js
|
|
1210
1349
|
var require_tags = __commonJS({
|
|
1211
|
-
"
|
|
1350
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1212
1351
|
"use strict";
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1215
|
-
var
|
|
1216
|
-
var
|
|
1217
|
-
var
|
|
1352
|
+
var __defProp3 = Object.defineProperty;
|
|
1353
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1354
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1355
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1356
|
+
var __export3 = (target, all) => {
|
|
1218
1357
|
for (var name in all)
|
|
1219
|
-
|
|
1358
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1220
1359
|
};
|
|
1221
|
-
var
|
|
1360
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1222
1361
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1223
|
-
for (let key of
|
|
1224
|
-
if (!
|
|
1225
|
-
|
|
1362
|
+
for (let key of __getOwnPropNames3(from))
|
|
1363
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1364
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1226
1365
|
}
|
|
1227
1366
|
return to;
|
|
1228
1367
|
};
|
|
1229
|
-
var
|
|
1368
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1230
1369
|
var tags_exports = {};
|
|
1231
|
-
|
|
1370
|
+
__export3(tags_exports, {
|
|
1232
1371
|
HTML_TAGS: () => HTML_TAGS,
|
|
1233
1372
|
isValidHtmlTag: () => isValidHtmlTag
|
|
1234
1373
|
});
|
|
1235
|
-
module2.exports =
|
|
1374
|
+
module2.exports = __toCommonJS3(tags_exports);
|
|
1236
1375
|
var HTML_TAGS = {
|
|
1237
1376
|
root: [
|
|
1238
1377
|
"body",
|
|
@@ -1374,26 +1513,26 @@ var require_tags = __commonJS({
|
|
|
1374
1513
|
}
|
|
1375
1514
|
});
|
|
1376
1515
|
|
|
1377
|
-
//
|
|
1516
|
+
// ../../../domql/packages/utils/dist/cjs/index.js
|
|
1378
1517
|
var require_cjs2 = __commonJS({
|
|
1379
|
-
"
|
|
1518
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1380
1519
|
"use strict";
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1383
|
-
var
|
|
1384
|
-
var
|
|
1385
|
-
var
|
|
1520
|
+
var __defProp3 = Object.defineProperty;
|
|
1521
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1522
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1523
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1524
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1386
1525
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1387
|
-
for (let key of
|
|
1388
|
-
if (!
|
|
1389
|
-
|
|
1526
|
+
for (let key of __getOwnPropNames3(from))
|
|
1527
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1528
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1390
1529
|
}
|
|
1391
1530
|
return to;
|
|
1392
1531
|
};
|
|
1393
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
1394
|
-
var
|
|
1532
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
|
|
1533
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1395
1534
|
var utils_exports2 = {};
|
|
1396
|
-
module2.exports =
|
|
1535
|
+
module2.exports = __toCommonJS3(utils_exports2);
|
|
1397
1536
|
__reExport(utils_exports2, require_key(), module2.exports);
|
|
1398
1537
|
__reExport(utils_exports2, require_env(), module2.exports);
|
|
1399
1538
|
__reExport(utils_exports2, require_types(), module2.exports);
|
|
@@ -1409,1758 +1548,1912 @@ var require_cjs2 = __commonJS({
|
|
|
1409
1548
|
}
|
|
1410
1549
|
});
|
|
1411
1550
|
|
|
1412
|
-
//
|
|
1413
|
-
var
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1495
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1496
|
-
for (let key of __getOwnPropNames22(from))
|
|
1497
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1498
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1499
|
-
}
|
|
1500
|
-
return to;
|
|
1501
|
-
};
|
|
1502
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1503
|
-
var env_exports = {};
|
|
1504
|
-
__export22(env_exports, {
|
|
1505
|
-
NODE_ENV: () => NODE_ENV,
|
|
1506
|
-
getNev: () => getNev,
|
|
1507
|
-
isDevelopment: () => isDevelopment,
|
|
1508
|
-
isProduction: () => isProduction,
|
|
1509
|
-
isTest: () => isTest
|
|
1510
|
-
});
|
|
1511
|
-
module22.exports = __toCommonJS22(env_exports);
|
|
1512
|
-
var NODE_ENV = "development";
|
|
1513
|
-
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1514
|
-
var isTest = (env = NODE_ENV) => env === "test";
|
|
1515
|
-
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1516
|
-
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1517
|
-
}
|
|
1518
|
-
});
|
|
1519
|
-
var require_globals2 = __commonJS2({
|
|
1520
|
-
"../../node_modules/@domql/utils/dist/cjs/globals.js"(exports2, module22) {
|
|
1521
|
-
"use strict";
|
|
1522
|
-
var __defProp22 = Object.defineProperty;
|
|
1523
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1524
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1525
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1526
|
-
var __export22 = (target, all) => {
|
|
1527
|
-
for (var name in all)
|
|
1528
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1529
|
-
};
|
|
1530
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1531
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1532
|
-
for (let key of __getOwnPropNames22(from))
|
|
1533
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1534
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1535
|
-
}
|
|
1536
|
-
return to;
|
|
1537
|
-
};
|
|
1538
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1539
|
-
var globals_exports = {};
|
|
1540
|
-
__export22(globals_exports, {
|
|
1541
|
-
document: () => document22,
|
|
1542
|
-
global: () => global,
|
|
1543
|
-
self: () => self,
|
|
1544
|
-
window: () => window2
|
|
1545
|
-
});
|
|
1546
|
-
module22.exports = __toCommonJS22(globals_exports);
|
|
1547
|
-
var global = globalThis;
|
|
1548
|
-
var self = globalThis;
|
|
1549
|
-
var window2 = globalThis;
|
|
1550
|
-
var document22 = window2.document;
|
|
1551
|
-
}
|
|
1552
|
-
});
|
|
1553
|
-
var require_node2 = __commonJS2({
|
|
1554
|
-
"../../node_modules/@domql/utils/dist/cjs/node.js"(exports2, module22) {
|
|
1555
|
-
"use strict";
|
|
1556
|
-
var __defProp22 = Object.defineProperty;
|
|
1557
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1558
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1559
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1560
|
-
var __export22 = (target, all) => {
|
|
1561
|
-
for (var name in all)
|
|
1562
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1563
|
-
};
|
|
1564
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1565
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1566
|
-
for (let key of __getOwnPropNames22(from))
|
|
1567
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1568
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1569
|
-
}
|
|
1570
|
-
return to;
|
|
1571
|
-
};
|
|
1572
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1573
|
-
var node_exports = {};
|
|
1574
|
-
__export22(node_exports, {
|
|
1575
|
-
isHtmlElement: () => isHtmlElement,
|
|
1576
|
-
isNode: () => isNode
|
|
1577
|
-
});
|
|
1578
|
-
module22.exports = __toCommonJS22(node_exports);
|
|
1579
|
-
var import_globals2 = require_globals2();
|
|
1580
|
-
var isNode = (obj) => {
|
|
1581
|
-
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1582
|
-
};
|
|
1583
|
-
var isHtmlElement = (obj) => {
|
|
1584
|
-
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
|
-
});
|
|
1588
|
-
var require_types2 = __commonJS2({
|
|
1589
|
-
"../../node_modules/@domql/utils/dist/cjs/types.js"(exports2, module22) {
|
|
1590
|
-
"use strict";
|
|
1591
|
-
var __defProp22 = Object.defineProperty;
|
|
1592
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1593
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1594
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1595
|
-
var __export22 = (target, all) => {
|
|
1596
|
-
for (var name in all)
|
|
1597
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1598
|
-
};
|
|
1599
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1600
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1601
|
-
for (let key of __getOwnPropNames22(from))
|
|
1602
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1603
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1604
|
-
}
|
|
1605
|
-
return to;
|
|
1606
|
-
};
|
|
1607
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1608
|
-
var types_exports = {};
|
|
1609
|
-
__export22(types_exports, {
|
|
1610
|
-
TYPES: () => TYPES,
|
|
1611
|
-
is: () => is,
|
|
1612
|
-
isArray: () => isArray3,
|
|
1613
|
-
isBoolean: () => isBoolean,
|
|
1614
|
-
isDate: () => isDate,
|
|
1615
|
-
isDefined: () => isDefined2,
|
|
1616
|
-
isFunction: () => isFunction,
|
|
1617
|
-
isNot: () => isNot,
|
|
1618
|
-
isNull: () => isNull,
|
|
1619
|
-
isNumber: () => isNumber2,
|
|
1620
|
-
isObject: () => isObject3,
|
|
1621
|
-
isObjectLike: () => isObjectLike2,
|
|
1622
|
-
isString: () => isString22,
|
|
1623
|
-
isUndefined: () => isUndefined
|
|
1624
|
-
});
|
|
1625
|
-
module22.exports = __toCommonJS22(types_exports);
|
|
1626
|
-
var import_node = require_node2();
|
|
1627
|
-
var isObject3 = (arg) => {
|
|
1628
|
-
if (arg === null)
|
|
1629
|
-
return false;
|
|
1630
|
-
return typeof arg === "object" && arg.constructor === Object;
|
|
1631
|
-
};
|
|
1632
|
-
var isString22 = (arg) => typeof arg === "string";
|
|
1633
|
-
var isNumber2 = (arg) => typeof arg === "number";
|
|
1634
|
-
var isFunction = (arg) => typeof arg === "function";
|
|
1635
|
-
var isBoolean = (arg) => arg === true || arg === false;
|
|
1636
|
-
var isNull = (arg) => arg === null;
|
|
1637
|
-
var isArray3 = (arg) => Array.isArray(arg);
|
|
1638
|
-
var isDate = (d) => d instanceof Date;
|
|
1639
|
-
var isObjectLike2 = (arg) => {
|
|
1640
|
-
if (arg === null)
|
|
1641
|
-
return false;
|
|
1642
|
-
return typeof arg === "object";
|
|
1643
|
-
};
|
|
1644
|
-
var isDefined2 = (arg) => {
|
|
1645
|
-
return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1646
|
-
};
|
|
1647
|
-
var isUndefined = (arg) => {
|
|
1648
|
-
return arg === void 0;
|
|
1649
|
-
};
|
|
1650
|
-
var TYPES = {
|
|
1651
|
-
boolean: isBoolean,
|
|
1652
|
-
array: isArray3,
|
|
1653
|
-
object: isObject3,
|
|
1654
|
-
string: isString22,
|
|
1655
|
-
date: isDate,
|
|
1656
|
-
number: isNumber2,
|
|
1657
|
-
null: isNull,
|
|
1658
|
-
function: isFunction,
|
|
1659
|
-
objectLike: isObjectLike2,
|
|
1660
|
-
node: import_node.isNode,
|
|
1661
|
-
htmlElement: import_node.isHtmlElement,
|
|
1662
|
-
defined: isDefined2
|
|
1663
|
-
};
|
|
1664
|
-
var is = (arg) => {
|
|
1665
|
-
return (...args) => {
|
|
1666
|
-
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1667
|
-
};
|
|
1668
|
-
};
|
|
1669
|
-
var isNot = (arg) => {
|
|
1670
|
-
return (...args) => {
|
|
1671
|
-
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1672
|
-
};
|
|
1673
|
-
};
|
|
1674
|
-
}
|
|
1675
|
-
});
|
|
1676
|
-
var require_array2 = __commonJS2({
|
|
1677
|
-
"../../node_modules/@domql/utils/dist/cjs/array.js"(exports2, module22) {
|
|
1678
|
-
"use strict";
|
|
1679
|
-
var __defProp22 = Object.defineProperty;
|
|
1680
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1681
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1682
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1683
|
-
var __export22 = (target, all) => {
|
|
1684
|
-
for (var name in all)
|
|
1685
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1686
|
-
};
|
|
1687
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1688
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1689
|
-
for (let key of __getOwnPropNames22(from))
|
|
1690
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1691
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1692
|
-
}
|
|
1693
|
-
return to;
|
|
1694
|
-
};
|
|
1695
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1696
|
-
var array_exports = {};
|
|
1697
|
-
__export22(array_exports, {
|
|
1698
|
-
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1699
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1700
|
-
createNestedObject: () => createNestedObject,
|
|
1701
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1702
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1703
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
1704
|
-
joinArrays: () => joinArrays,
|
|
1705
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1706
|
-
mergeArray: () => mergeArray,
|
|
1707
|
-
removeFromArray: () => removeFromArray,
|
|
1708
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
1709
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1710
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
1711
|
-
swapItemsInArray: () => swapItemsInArray
|
|
1712
|
-
});
|
|
1713
|
-
module22.exports = __toCommonJS22(array_exports);
|
|
1714
|
-
var import_object = require_object2();
|
|
1715
|
-
var import_types = require_types2();
|
|
1716
|
-
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1717
|
-
return arr2.every((val) => arr1.includes(val));
|
|
1718
|
-
};
|
|
1719
|
-
var getFrequencyInArray = (arr, value) => {
|
|
1720
|
-
return arr.reduce((count, currentValue) => {
|
|
1721
|
-
return currentValue === value ? count + 1 : count;
|
|
1722
|
-
}, 0);
|
|
1723
|
-
};
|
|
1724
|
-
var removeFromArray = (arr, index) => {
|
|
1725
|
-
if ((0, import_types.isString)(index))
|
|
1726
|
-
index = parseInt(index);
|
|
1727
|
-
if ((0, import_types.isNumber)(index)) {
|
|
1728
|
-
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1729
|
-
throw new Error("Invalid index");
|
|
1730
|
-
}
|
|
1731
|
-
arr.splice(index, 1);
|
|
1732
|
-
} else if ((0, import_types.isArray)(index)) {
|
|
1733
|
-
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1734
|
-
} else {
|
|
1735
|
-
throw new Error("Invalid index");
|
|
1736
|
-
}
|
|
1737
|
-
return arr;
|
|
1738
|
-
};
|
|
1739
|
-
var swapItemsInArray = (arr, i, j) => {
|
|
1740
|
-
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1741
|
-
};
|
|
1742
|
-
var joinArrays = (...arrays) => {
|
|
1743
|
-
return [].concat(...arrays);
|
|
1744
|
-
};
|
|
1745
|
-
var mergeArray = (arr, excludeFrom = []) => {
|
|
1746
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1747
|
-
};
|
|
1748
|
-
var mergeAndCloneIfArray = (obj) => {
|
|
1749
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1750
|
-
};
|
|
1751
|
-
var cutArrayBeforeValue = (arr, value) => {
|
|
1752
|
-
const index = arr.indexOf(value);
|
|
1753
|
-
if (index !== -1) {
|
|
1754
|
-
return arr.slice(0, index);
|
|
1755
|
-
}
|
|
1756
|
-
return arr;
|
|
1757
|
-
};
|
|
1758
|
-
var cutArrayAfterValue = (arr, value) => {
|
|
1759
|
-
if (!(0, import_types.isArray)(arr))
|
|
1760
|
-
return;
|
|
1761
|
-
const index = arr.indexOf(value);
|
|
1762
|
-
if (index !== -1) {
|
|
1763
|
-
return arr.slice(index + 1);
|
|
1764
|
-
}
|
|
1765
|
-
return arr;
|
|
1766
|
-
};
|
|
1767
|
-
var createNestedObject = (arr, lastValue) => {
|
|
1768
|
-
const nestedObject = {};
|
|
1769
|
-
if (arr.length === 0) {
|
|
1770
|
-
return lastValue;
|
|
1771
|
-
}
|
|
1772
|
-
arr.reduce((obj, value, index) => {
|
|
1773
|
-
if (!obj[value]) {
|
|
1774
|
-
obj[value] = {};
|
|
1775
|
-
}
|
|
1776
|
-
if (index === arr.length - 1 && lastValue) {
|
|
1777
|
-
obj[value] = lastValue;
|
|
1778
|
-
}
|
|
1779
|
-
return obj[value];
|
|
1780
|
-
}, nestedObject);
|
|
1781
|
-
return nestedObject;
|
|
1782
|
-
};
|
|
1783
|
-
var removeValueFromArray = (arr, value) => {
|
|
1784
|
-
const index = arr.indexOf(value);
|
|
1785
|
-
if (index > -1) {
|
|
1786
|
-
const newArray = [...arr];
|
|
1787
|
-
newArray.splice(index, 1);
|
|
1788
|
-
return newArray;
|
|
1789
|
-
}
|
|
1790
|
-
return arr;
|
|
1791
|
-
};
|
|
1792
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
1793
|
-
return arr.filter((item) => item !== value);
|
|
1794
|
-
};
|
|
1795
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
1796
|
-
const result = [];
|
|
1797
|
-
for (let i = 0; i < array.length; i++) {
|
|
1798
|
-
result.push(array[i]);
|
|
1799
|
-
if (i < array.length - 1) {
|
|
1800
|
-
result.push(item);
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
return result;
|
|
1804
|
-
};
|
|
1805
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1806
|
-
const newArray = [...array];
|
|
1807
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
1808
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1809
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1810
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1811
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1812
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
1813
|
-
}
|
|
1814
|
-
return newArray;
|
|
1815
|
-
};
|
|
1551
|
+
// src/utils/index.js
|
|
1552
|
+
var utils_exports = {};
|
|
1553
|
+
__export(utils_exports, {
|
|
1554
|
+
applyMediaSequenceVars: () => applyMediaSequenceVars,
|
|
1555
|
+
applySequenceGlobalVars: () => applySequenceGlobalVars,
|
|
1556
|
+
applySequenceVars: () => applySequenceVars,
|
|
1557
|
+
changeLightness: () => changeLightness,
|
|
1558
|
+
colorStringToRgbaArray: () => colorStringToRgbaArray,
|
|
1559
|
+
convertSvgToSymbol: () => convertSvgToSymbol,
|
|
1560
|
+
findHeadingLetter: () => findHeadingLetter,
|
|
1561
|
+
findHeadings: () => findHeadings,
|
|
1562
|
+
generateSequence: () => generateSequence,
|
|
1563
|
+
generateSprite: () => generateSprite,
|
|
1564
|
+
generateSubSequence: () => generateSubSequence,
|
|
1565
|
+
getColorShade: () => getColorShade,
|
|
1566
|
+
getDefaultOrFirstKey: () => getDefaultOrFirstKey,
|
|
1567
|
+
getFontFace: () => getFontFace,
|
|
1568
|
+
getFontFaceEach: () => getFontFaceEach,
|
|
1569
|
+
getFontFaceEachString: () => getFontFaceEachString,
|
|
1570
|
+
getFontFaceString: () => getFontFaceString,
|
|
1571
|
+
getFontFormat: () => getFontFormat,
|
|
1572
|
+
getRgbTone: () => getRgbTone,
|
|
1573
|
+
getSequenceValue: () => getSequenceValue,
|
|
1574
|
+
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
1575
|
+
getSubratio: () => getSubratio,
|
|
1576
|
+
getSubratioDifference: () => getSubratioDifference,
|
|
1577
|
+
hexToRgb: () => hexToRgb,
|
|
1578
|
+
hexToRgbArray: () => hexToRgbArray,
|
|
1579
|
+
hexToRgba: () => hexToRgba,
|
|
1580
|
+
hslToRgb: () => hslToRgb,
|
|
1581
|
+
isScalingUnit: () => isScalingUnit,
|
|
1582
|
+
mixTwoColors: () => mixTwoColors,
|
|
1583
|
+
mixTwoRgb: () => mixTwoRgb,
|
|
1584
|
+
mixTwoRgba: () => mixTwoRgba,
|
|
1585
|
+
numToLetterMap: () => numToLetterMap,
|
|
1586
|
+
opacify: () => opacify,
|
|
1587
|
+
returnSubThemeOrDefault: () => returnSubThemeOrDefault,
|
|
1588
|
+
rgbArrayToHex: () => rgbArrayToHex,
|
|
1589
|
+
rgbToHSL: () => rgbToHSL,
|
|
1590
|
+
rgbToHex: () => rgbToHex,
|
|
1591
|
+
setCustomFont: () => setCustomFont,
|
|
1592
|
+
setCustomFontMedia: () => setCustomFontMedia,
|
|
1593
|
+
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
1594
|
+
setScalingVar: () => setScalingVar,
|
|
1595
|
+
setSubScalingVar: () => setSubScalingVar,
|
|
1596
|
+
setVariables: () => setVariables
|
|
1597
|
+
});
|
|
1598
|
+
module.exports = __toCommonJS(utils_exports);
|
|
1599
|
+
|
|
1600
|
+
// src/utils/unit.js
|
|
1601
|
+
var isScalingUnit = (unit) => {
|
|
1602
|
+
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
1603
|
+
};
|
|
1604
|
+
|
|
1605
|
+
// src/utils/color.js
|
|
1606
|
+
var import_globals = __toESM(require_cjs(), 1);
|
|
1607
|
+
var import_utils = __toESM(require_cjs2(), 1);
|
|
1608
|
+
var ENV = "development";
|
|
1609
|
+
var colorStringToRgbaArray = (color) => {
|
|
1610
|
+
if (color === "")
|
|
1611
|
+
return [0, 0, 0, 0];
|
|
1612
|
+
if (color.toLowerCase() === "transparent")
|
|
1613
|
+
return [0, 0, 0, 0];
|
|
1614
|
+
if (color[0] === "#") {
|
|
1615
|
+
if (color.length < 7) {
|
|
1616
|
+
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
1617
|
+
}
|
|
1618
|
+
return [
|
|
1619
|
+
parseInt(color.substr(1, 2), 16),
|
|
1620
|
+
parseInt(color.substr(3, 2), 16),
|
|
1621
|
+
parseInt(color.substr(5, 2), 16),
|
|
1622
|
+
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
1623
|
+
];
|
|
1624
|
+
}
|
|
1625
|
+
if (color.indexOf("rgb") === -1) {
|
|
1626
|
+
if (import_globals.document && import_globals.window) {
|
|
1627
|
+
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
1628
|
+
const flag = "rgb(1, 2, 3)";
|
|
1629
|
+
elem.style.color = flag;
|
|
1630
|
+
if (elem.style.color !== flag) {
|
|
1631
|
+
import_globals.document.body.removeChild(elem);
|
|
1632
|
+
return;
|
|
1816
1633
|
}
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
var __defProp22 = Object.defineProperty;
|
|
1822
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1823
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1824
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1825
|
-
var __export22 = (target, all) => {
|
|
1826
|
-
for (var name in all)
|
|
1827
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1828
|
-
};
|
|
1829
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1830
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1831
|
-
for (let key of __getOwnPropNames22(from))
|
|
1832
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1833
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1834
|
-
}
|
|
1835
|
-
return to;
|
|
1836
|
-
};
|
|
1837
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1838
|
-
var string_exports = {};
|
|
1839
|
-
__export22(string_exports, {
|
|
1840
|
-
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
1841
|
-
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
1842
|
-
stringIncludesAny: () => stringIncludesAny,
|
|
1843
|
-
trimStringFromSymbols: () => trimStringFromSymbols
|
|
1844
|
-
});
|
|
1845
|
-
module22.exports = __toCommonJS22(string_exports);
|
|
1846
|
-
var stringIncludesAny = (str, characters) => {
|
|
1847
|
-
for (const char of characters) {
|
|
1848
|
-
if (str.includes(char)) {
|
|
1849
|
-
return true;
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
return false;
|
|
1853
|
-
};
|
|
1854
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
1855
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
1856
|
-
return str.replace(pattern, "");
|
|
1857
|
-
};
|
|
1858
|
-
var brackRegex = {
|
|
1859
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
1860
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
1861
|
-
};
|
|
1862
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
1863
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
1864
|
-
return str;
|
|
1865
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
1866
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
1867
|
-
if (parentPath) {
|
|
1868
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
1869
|
-
let parentState = state;
|
|
1870
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
1871
|
-
parentState = parentState.parent;
|
|
1872
|
-
if (!parentState) {
|
|
1873
|
-
return "";
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
const value = parentState[variable.trim()];
|
|
1877
|
-
return value !== void 0 ? `${value}` : "";
|
|
1878
|
-
} else {
|
|
1879
|
-
const value = state[variable.trim()];
|
|
1880
|
-
return value !== void 0 ? `${value}` : "";
|
|
1881
|
-
}
|
|
1882
|
-
});
|
|
1883
|
-
};
|
|
1884
|
-
var lowercaseFirstLetter = (inputString) => {
|
|
1885
|
-
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
1886
|
-
};
|
|
1634
|
+
elem.style.color = color;
|
|
1635
|
+
if (elem.style.color === flag || elem.style.color === "") {
|
|
1636
|
+
import_globals.document.body.removeChild(elem);
|
|
1637
|
+
return [0, 0, 0, 0];
|
|
1887
1638
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
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
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
1639
|
+
color = import_globals.window.getComputedStyle(elem).color;
|
|
1640
|
+
import_globals.document.body.removeChild(elem);
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
if (color.indexOf("rgb") === 0) {
|
|
1644
|
+
if (color.indexOf("rgba") === -1)
|
|
1645
|
+
color = `${color}, 1`;
|
|
1646
|
+
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
1647
|
+
}
|
|
1648
|
+
return [0, 0, 0, 0];
|
|
1649
|
+
};
|
|
1650
|
+
var mixTwoColors = (colorA, colorB, range = 0.5) => {
|
|
1651
|
+
colorA = colorStringToRgbaArray(colorA);
|
|
1652
|
+
colorB = colorStringToRgbaArray(colorB);
|
|
1653
|
+
return mixTwoRgba(colorA, colorB, range);
|
|
1654
|
+
};
|
|
1655
|
+
var hexToRgb = (hex, alpha = 1) => {
|
|
1656
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1657
|
+
return `rgb(${r},${g},${b})`;
|
|
1658
|
+
};
|
|
1659
|
+
var hexToRgbArray = (hex, alpha = 1) => {
|
|
1660
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1661
|
+
return [r, g, b];
|
|
1662
|
+
};
|
|
1663
|
+
var rgbToHex = (r, g, b) => {
|
|
1664
|
+
return "#" + (1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1);
|
|
1665
|
+
};
|
|
1666
|
+
var rgbArrayToHex = ([r, g, b]) => {
|
|
1667
|
+
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
1668
|
+
};
|
|
1669
|
+
var hexToRgba = (hex, alpha = 1) => {
|
|
1670
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1671
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
1672
|
+
};
|
|
1673
|
+
var mixTwoRgb = (colorA, colorB, range = 0.5) => {
|
|
1674
|
+
const arr = [];
|
|
1675
|
+
for (let i = 0; i < 3; i++) {
|
|
1676
|
+
arr[i] = ~~(colorA[i] + (colorB[i] - colorA[i]) * range);
|
|
1677
|
+
}
|
|
1678
|
+
return `rgb(${arr})`;
|
|
1679
|
+
};
|
|
1680
|
+
var changeLightness = (delta, hsl) => {
|
|
1681
|
+
const [hue, saturation, lightness] = hsl;
|
|
1682
|
+
const newLightness = Math.max(
|
|
1683
|
+
0,
|
|
1684
|
+
Math.min(100, lightness + parseFloat(delta))
|
|
1685
|
+
);
|
|
1686
|
+
return [hue, saturation, newLightness];
|
|
1687
|
+
};
|
|
1688
|
+
var rgbToHSL = (r, g, b) => {
|
|
1689
|
+
const a = Math.max(r, g, b);
|
|
1690
|
+
const n = a - Math.min(r, g, b);
|
|
1691
|
+
const f = 1 - Math.abs(a + a - n - 1);
|
|
1692
|
+
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
1693
|
+
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
1694
|
+
};
|
|
1695
|
+
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
1696
|
+
Math.min(k - 3, 9 - k, 1),
|
|
1697
|
+
-1
|
|
1698
|
+
)) => [f(0), f(8), f(4)];
|
|
1699
|
+
var getColorShade = (col, amt) => {
|
|
1700
|
+
const num = parseInt(col, 16);
|
|
1701
|
+
let r = (num >> 16) + amt;
|
|
1702
|
+
if (r > 255)
|
|
1703
|
+
r = 255;
|
|
1704
|
+
else if (r < 0)
|
|
1705
|
+
r = 0;
|
|
1706
|
+
let b = (num >> 8 & 255) + amt;
|
|
1707
|
+
if (b > 255)
|
|
1708
|
+
b = 255;
|
|
1709
|
+
else if (b < 0)
|
|
1710
|
+
b = 0;
|
|
1711
|
+
let g = (num & 255) + amt;
|
|
1712
|
+
if (g > 255)
|
|
1713
|
+
g = 255;
|
|
1714
|
+
else if (g < 0)
|
|
1715
|
+
g = 0;
|
|
1716
|
+
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
1717
|
+
};
|
|
1718
|
+
var mixTwoRgba = (colorA, colorB, range = 0.5) => {
|
|
1719
|
+
const arr = [];
|
|
1720
|
+
for (let i = 0; i < 4; i++) {
|
|
1721
|
+
const round = i === 3 ? (x) => x : Math.round;
|
|
1722
|
+
arr[i] = round(
|
|
1723
|
+
colorA[i] + (colorB[i] - colorA[i]) * range
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1726
|
+
return `rgba(${arr})`;
|
|
1727
|
+
};
|
|
1728
|
+
var opacify = (color, opacity) => {
|
|
1729
|
+
const arr = colorStringToRgbaArray(color);
|
|
1730
|
+
if (!arr) {
|
|
1731
|
+
if (ENV === "test" || ENV === "development")
|
|
1732
|
+
console.warn(color + " color is not rgba");
|
|
1733
|
+
return;
|
|
1734
|
+
}
|
|
1735
|
+
arr[3] = opacity;
|
|
1736
|
+
return `rgba(${arr})`;
|
|
1737
|
+
};
|
|
1738
|
+
var getRgbTone = (rgb, tone) => {
|
|
1739
|
+
if ((0, import_utils.isString)(rgb) && rgb.includes("rgb"))
|
|
1740
|
+
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
1741
|
+
if ((0, import_utils.isString)(rgb))
|
|
1742
|
+
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
1743
|
+
if ((0, import_utils.isNumber)(tone))
|
|
1744
|
+
tone += "";
|
|
1745
|
+
const toHex = rgbArrayToHex(rgb);
|
|
1746
|
+
const abs = tone.slice(0, 1);
|
|
1747
|
+
if (abs === "-" || abs === "+") {
|
|
1748
|
+
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
1749
|
+
return hexToRgbArray(colorShade).join(", ");
|
|
1750
|
+
} else {
|
|
1751
|
+
const [r, g, b] = rgb;
|
|
1752
|
+
const hsl = rgbToHSL(r, g, b);
|
|
1753
|
+
const [h, s, l] = hsl;
|
|
1754
|
+
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
1755
|
+
return newRgb;
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
|
|
1759
|
+
// src/utils/theme.js
|
|
1760
|
+
var returnSubThemeOrDefault = (orig, theme) => {
|
|
1761
|
+
if (!orig)
|
|
1762
|
+
return;
|
|
1763
|
+
if (orig.themes && orig.themes[theme])
|
|
1764
|
+
return orig.themes[theme];
|
|
1765
|
+
if (orig[theme])
|
|
1766
|
+
return [orig, orig[theme]];
|
|
1767
|
+
return orig;
|
|
1768
|
+
};
|
|
1769
|
+
|
|
1770
|
+
// src/utils/font.js
|
|
1771
|
+
var getDefaultOrFirstKey = (LIBRARY, key) => {
|
|
1772
|
+
if (LIBRARY[key])
|
|
1773
|
+
return LIBRARY[key].value;
|
|
1774
|
+
if (LIBRARY.default)
|
|
1775
|
+
return LIBRARY[LIBRARY.default].value;
|
|
1776
|
+
const hasValue = Object.keys(LIBRARY)[0];
|
|
1777
|
+
return hasValue && LIBRARY[hasValue] && LIBRARY[hasValue].value;
|
|
1778
|
+
};
|
|
1779
|
+
var getFontFormat = (url) => url.split(/[#?]/)[0].split(".").pop().trim();
|
|
1780
|
+
var setInCustomFontMedia = (str) => `@font-face { ${str} }`;
|
|
1781
|
+
var setCustomFont = (name, url, weight) => `
|
|
1782
|
+
font-family: '${name}';
|
|
1783
|
+
font-style: normal;
|
|
1784
|
+
${weight && `font-weight: ${weight};`}
|
|
1785
|
+
src: url('${url}') format('${getFontFormat(url)}');`;
|
|
1786
|
+
var setCustomFontMedia = (name, url, weight) => `@font-face {
|
|
1787
|
+
${setCustomFont(name, url, weight)}
|
|
1788
|
+
}`;
|
|
1789
|
+
var getFontFaceEach = (name, weights) => {
|
|
1790
|
+
const keys = Object.keys(weights);
|
|
1791
|
+
return keys.map((key) => {
|
|
1792
|
+
const { url, fontWeight } = weights[key];
|
|
1793
|
+
return setCustomFont(name, url, fontWeight);
|
|
1794
|
+
});
|
|
1795
|
+
};
|
|
1796
|
+
var getFontFace = (LIBRARY) => {
|
|
1797
|
+
const keys = Object.keys(LIBRARY);
|
|
1798
|
+
return keys.map((key) => getFontFaceEach(key, LIBRARY[key].value));
|
|
1799
|
+
};
|
|
1800
|
+
var getFontFaceEachString = (name, weights) => {
|
|
1801
|
+
const isArr = weights[0];
|
|
1802
|
+
if (isArr)
|
|
1803
|
+
return getFontFaceEach(name, weights).map(setInCustomFontMedia);
|
|
1804
|
+
return setCustomFontMedia(name, weights.url);
|
|
1805
|
+
};
|
|
1806
|
+
var getFontFaceString = (LIBRARY) => {
|
|
1807
|
+
const keys = Object.keys(LIBRARY);
|
|
1808
|
+
return keys.map((key) => getFontFaceEachString(key, LIBRARY[key].value));
|
|
1809
|
+
};
|
|
1810
|
+
|
|
1811
|
+
// src/utils/sequence.js
|
|
1812
|
+
var import_utils5 = __toESM(require_cjs2(), 1);
|
|
1813
|
+
|
|
1814
|
+
// ../utils/dist/cjs/index.js
|
|
1815
|
+
var __create2 = Object.create;
|
|
1816
|
+
var __defProp2 = Object.defineProperty;
|
|
1817
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1818
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1819
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1820
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1821
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
1822
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1823
|
+
};
|
|
1824
|
+
var __export2 = (target, all) => {
|
|
1825
|
+
for (var name in all)
|
|
1826
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1827
|
+
};
|
|
1828
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1829
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1830
|
+
for (let key of __getOwnPropNames2(from))
|
|
1831
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1832
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1833
|
+
}
|
|
1834
|
+
return to;
|
|
1835
|
+
};
|
|
1836
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1837
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1838
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1839
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1840
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1841
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1842
|
+
mod
|
|
1843
|
+
));
|
|
1844
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1845
|
+
var require_key2 = __commonJS2({
|
|
1846
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
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 key_exports = {};
|
|
1866
|
+
__export22(key_exports, {
|
|
1867
|
+
createSnapshotId: () => createSnapshotId,
|
|
1868
|
+
generateKey: () => generateKey
|
|
1869
|
+
});
|
|
1870
|
+
module2.exports = __toCommonJS22(key_exports);
|
|
1871
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
1872
|
+
let index = 0;
|
|
1873
|
+
function newId() {
|
|
1874
|
+
index++;
|
|
1875
|
+
return index;
|
|
1876
|
+
}
|
|
1877
|
+
return newId;
|
|
1878
|
+
}();
|
|
1879
|
+
var createSnapshotId = generateKey;
|
|
1880
|
+
}
|
|
1881
|
+
});
|
|
1882
|
+
var require_env2 = __commonJS2({
|
|
1883
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
1884
|
+
"use strict";
|
|
1885
|
+
var __defProp22 = Object.defineProperty;
|
|
1886
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1887
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1888
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1889
|
+
var __export22 = (target, all) => {
|
|
1890
|
+
for (var name in all)
|
|
1891
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1892
|
+
};
|
|
1893
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1894
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1895
|
+
for (let key of __getOwnPropNames22(from))
|
|
1896
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1897
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1898
|
+
}
|
|
1899
|
+
return to;
|
|
1900
|
+
};
|
|
1901
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1902
|
+
var env_exports = {};
|
|
1903
|
+
__export22(env_exports, {
|
|
1904
|
+
NODE_ENV: () => NODE_ENV,
|
|
1905
|
+
getNev: () => getNev,
|
|
1906
|
+
isDevelopment: () => isDevelopment,
|
|
1907
|
+
isProduction: () => isProduction,
|
|
1908
|
+
isTest: () => isTest
|
|
1909
|
+
});
|
|
1910
|
+
module2.exports = __toCommonJS22(env_exports);
|
|
1911
|
+
var NODE_ENV = "development";
|
|
1912
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1913
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
1914
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1915
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
var require_globals2 = __commonJS2({
|
|
1919
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
1920
|
+
"use strict";
|
|
1921
|
+
var __defProp22 = Object.defineProperty;
|
|
1922
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1923
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1924
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1925
|
+
var __export22 = (target, all) => {
|
|
1926
|
+
for (var name in all)
|
|
1927
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1928
|
+
};
|
|
1929
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1930
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1931
|
+
for (let key of __getOwnPropNames22(from))
|
|
1932
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1933
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1934
|
+
}
|
|
1935
|
+
return to;
|
|
1936
|
+
};
|
|
1937
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1938
|
+
var globals_exports = {};
|
|
1939
|
+
__export22(globals_exports, {
|
|
1940
|
+
document: () => document22,
|
|
1941
|
+
global: () => global,
|
|
1942
|
+
self: () => self,
|
|
1943
|
+
window: () => window2
|
|
1944
|
+
});
|
|
1945
|
+
module2.exports = __toCommonJS22(globals_exports);
|
|
1946
|
+
var global = globalThis;
|
|
1947
|
+
var self = globalThis;
|
|
1948
|
+
var window2 = globalThis;
|
|
1949
|
+
var document22 = window2.document;
|
|
1950
|
+
}
|
|
1951
|
+
});
|
|
1952
|
+
var require_node2 = __commonJS2({
|
|
1953
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
1954
|
+
"use strict";
|
|
1955
|
+
var __defProp22 = Object.defineProperty;
|
|
1956
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1957
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1958
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1959
|
+
var __export22 = (target, all) => {
|
|
1960
|
+
for (var name in all)
|
|
1961
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1962
|
+
};
|
|
1963
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1964
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1965
|
+
for (let key of __getOwnPropNames22(from))
|
|
1966
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1967
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1968
|
+
}
|
|
1969
|
+
return to;
|
|
1970
|
+
};
|
|
1971
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1972
|
+
var node_exports = {};
|
|
1973
|
+
__export22(node_exports, {
|
|
1974
|
+
isHtmlElement: () => isHtmlElement,
|
|
1975
|
+
isNode: () => isNode
|
|
1976
|
+
});
|
|
1977
|
+
module2.exports = __toCommonJS22(node_exports);
|
|
1978
|
+
var import_globals2 = require_globals2();
|
|
1979
|
+
var isNode = (obj) => {
|
|
1980
|
+
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1981
|
+
};
|
|
1982
|
+
var isHtmlElement = (obj) => {
|
|
1983
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1984
|
+
};
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1987
|
+
var require_types2 = __commonJS2({
|
|
1988
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
1989
|
+
"use strict";
|
|
1990
|
+
var __defProp22 = Object.defineProperty;
|
|
1991
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1992
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1993
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1994
|
+
var __export22 = (target, all) => {
|
|
1995
|
+
for (var name in all)
|
|
1996
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1997
|
+
};
|
|
1998
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1999
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2000
|
+
for (let key of __getOwnPropNames22(from))
|
|
2001
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2002
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2003
|
+
}
|
|
2004
|
+
return to;
|
|
2005
|
+
};
|
|
2006
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2007
|
+
var types_exports = {};
|
|
2008
|
+
__export22(types_exports, {
|
|
2009
|
+
TYPES: () => TYPES,
|
|
2010
|
+
is: () => is,
|
|
2011
|
+
isArray: () => isArray3,
|
|
2012
|
+
isBoolean: () => isBoolean,
|
|
2013
|
+
isDate: () => isDate,
|
|
2014
|
+
isDefined: () => isDefined2,
|
|
2015
|
+
isFunction: () => isFunction,
|
|
2016
|
+
isNot: () => isNot,
|
|
2017
|
+
isNull: () => isNull,
|
|
2018
|
+
isNumber: () => isNumber2,
|
|
2019
|
+
isObject: () => isObject3,
|
|
2020
|
+
isObjectLike: () => isObjectLike2,
|
|
2021
|
+
isString: () => isString22,
|
|
2022
|
+
isUndefined: () => isUndefined
|
|
2023
|
+
});
|
|
2024
|
+
module2.exports = __toCommonJS22(types_exports);
|
|
2025
|
+
var import_node = require_node2();
|
|
2026
|
+
var isObject3 = (arg) => {
|
|
2027
|
+
if (arg === null)
|
|
2028
|
+
return false;
|
|
2029
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
2030
|
+
};
|
|
2031
|
+
var isString22 = (arg) => typeof arg === "string";
|
|
2032
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
2033
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
2034
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
2035
|
+
var isNull = (arg) => arg === null;
|
|
2036
|
+
var isArray3 = (arg) => Array.isArray(arg);
|
|
2037
|
+
var isDate = (d) => d instanceof Date;
|
|
2038
|
+
var isObjectLike2 = (arg) => {
|
|
2039
|
+
if (arg === null)
|
|
2040
|
+
return false;
|
|
2041
|
+
return typeof arg === "object";
|
|
2042
|
+
};
|
|
2043
|
+
var isDefined2 = (arg) => {
|
|
2044
|
+
return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
2045
|
+
};
|
|
2046
|
+
var isUndefined = (arg) => {
|
|
2047
|
+
return arg === void 0;
|
|
2048
|
+
};
|
|
2049
|
+
var TYPES = {
|
|
2050
|
+
boolean: isBoolean,
|
|
2051
|
+
array: isArray3,
|
|
2052
|
+
object: isObject3,
|
|
2053
|
+
string: isString22,
|
|
2054
|
+
date: isDate,
|
|
2055
|
+
number: isNumber2,
|
|
2056
|
+
null: isNull,
|
|
2057
|
+
function: isFunction,
|
|
2058
|
+
objectLike: isObjectLike2,
|
|
2059
|
+
node: import_node.isNode,
|
|
2060
|
+
htmlElement: import_node.isHtmlElement,
|
|
2061
|
+
defined: isDefined2
|
|
2062
|
+
};
|
|
2063
|
+
var is = (arg) => {
|
|
2064
|
+
return (...args) => {
|
|
2065
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
2066
|
+
};
|
|
2067
|
+
};
|
|
2068
|
+
var isNot = (arg) => {
|
|
2069
|
+
return (...args) => {
|
|
2070
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
2071
|
+
};
|
|
2072
|
+
};
|
|
2073
|
+
}
|
|
2074
|
+
});
|
|
2075
|
+
var require_array2 = __commonJS2({
|
|
2076
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
2077
|
+
"use strict";
|
|
2078
|
+
var __defProp22 = Object.defineProperty;
|
|
2079
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2080
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2081
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2082
|
+
var __export22 = (target, all) => {
|
|
2083
|
+
for (var name in all)
|
|
2084
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2085
|
+
};
|
|
2086
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2087
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2088
|
+
for (let key of __getOwnPropNames22(from))
|
|
2089
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2090
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2091
|
+
}
|
|
2092
|
+
return to;
|
|
2093
|
+
};
|
|
2094
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2095
|
+
var array_exports = {};
|
|
2096
|
+
__export22(array_exports, {
|
|
2097
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
2098
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
2099
|
+
arraysEqual: () => arraysEqual,
|
|
2100
|
+
createNestedObject: () => createNestedObject,
|
|
2101
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
2102
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
2103
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
2104
|
+
joinArrays: () => joinArrays,
|
|
2105
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
2106
|
+
mergeArray: () => mergeArray,
|
|
2107
|
+
removeFromArray: () => removeFromArray,
|
|
2108
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
2109
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
2110
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
2111
|
+
swapItemsInArray: () => swapItemsInArray
|
|
2112
|
+
});
|
|
2113
|
+
module2.exports = __toCommonJS22(array_exports);
|
|
2114
|
+
var import_object = require_object2();
|
|
2115
|
+
var import_types = require_types2();
|
|
2116
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
2117
|
+
return arr2.every((val) => arr1.includes(val));
|
|
2118
|
+
};
|
|
2119
|
+
var getFrequencyInArray = (arr, value) => {
|
|
2120
|
+
return arr.reduce((count, currentValue) => {
|
|
2121
|
+
return currentValue === value ? count + 1 : count;
|
|
2122
|
+
}, 0);
|
|
2123
|
+
};
|
|
2124
|
+
var removeFromArray = (arr, index) => {
|
|
2125
|
+
if ((0, import_types.isString)(index))
|
|
2126
|
+
index = parseInt(index);
|
|
2127
|
+
if ((0, import_types.isNumber)(index)) {
|
|
2128
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
2129
|
+
throw new Error("Invalid index");
|
|
2130
|
+
}
|
|
2131
|
+
arr.splice(index, 1);
|
|
2132
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
2133
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
2134
|
+
} else {
|
|
2135
|
+
throw new Error("Invalid index");
|
|
2136
|
+
}
|
|
2137
|
+
return arr;
|
|
2138
|
+
};
|
|
2139
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
2140
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
2141
|
+
};
|
|
2142
|
+
var joinArrays = (...arrays) => {
|
|
2143
|
+
return [].concat(...arrays);
|
|
2144
|
+
};
|
|
2145
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
2146
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
2147
|
+
};
|
|
2148
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
2149
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
2150
|
+
};
|
|
2151
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
2152
|
+
const index = arr.indexOf(value);
|
|
2153
|
+
if (index !== -1) {
|
|
2154
|
+
return arr.slice(0, index);
|
|
2155
|
+
}
|
|
2156
|
+
return arr;
|
|
2157
|
+
};
|
|
2158
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
2159
|
+
if (!(0, import_types.isArray)(arr))
|
|
2160
|
+
return;
|
|
2161
|
+
const index = arr.indexOf(value);
|
|
2162
|
+
if (index !== -1) {
|
|
2163
|
+
return arr.slice(index + 1);
|
|
2164
|
+
}
|
|
2165
|
+
return arr;
|
|
2166
|
+
};
|
|
2167
|
+
var createNestedObject = (arr, lastValue) => {
|
|
2168
|
+
const nestedObject = {};
|
|
2169
|
+
if (arr.length === 0) {
|
|
2170
|
+
return lastValue;
|
|
2171
|
+
}
|
|
2172
|
+
arr.reduce((obj, value, index) => {
|
|
2173
|
+
if (!obj[value]) {
|
|
2174
|
+
obj[value] = {};
|
|
2175
|
+
}
|
|
2176
|
+
if (index === arr.length - 1 && lastValue) {
|
|
2177
|
+
obj[value] = lastValue;
|
|
2178
|
+
}
|
|
2179
|
+
return obj[value];
|
|
2180
|
+
}, nestedObject);
|
|
2181
|
+
return nestedObject;
|
|
2182
|
+
};
|
|
2183
|
+
var removeValueFromArray = (arr, value) => {
|
|
2184
|
+
const index = arr.indexOf(value);
|
|
2185
|
+
if (index > -1) {
|
|
2186
|
+
const newArray = [...arr];
|
|
2187
|
+
newArray.splice(index, 1);
|
|
2188
|
+
return newArray;
|
|
2189
|
+
}
|
|
2190
|
+
return arr;
|
|
2191
|
+
};
|
|
2192
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
2193
|
+
return arr.filter((item) => item !== value);
|
|
2194
|
+
};
|
|
2195
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
2196
|
+
const result = [];
|
|
2197
|
+
for (let i = 0; i < array.length; i++) {
|
|
2198
|
+
result.push(array[i]);
|
|
2199
|
+
if (i < array.length - 1) {
|
|
2200
|
+
result.push(item);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
return result;
|
|
2204
|
+
};
|
|
2205
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
2206
|
+
const newArray = [...array];
|
|
2207
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
2208
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
2209
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
2210
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
2211
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
2212
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
2213
|
+
}
|
|
2214
|
+
return newArray;
|
|
2215
|
+
};
|
|
2216
|
+
var arraysEqual = (arr1, arr2) => {
|
|
2217
|
+
if (arr1.length !== arr2.length) {
|
|
2218
|
+
return false;
|
|
2219
|
+
}
|
|
2220
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
2221
|
+
if (arr1[i] !== arr2[i]) {
|
|
2222
|
+
return false;
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
return true;
|
|
2226
|
+
};
|
|
2227
|
+
}
|
|
2228
|
+
});
|
|
2229
|
+
var require_string2 = __commonJS2({
|
|
2230
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
2231
|
+
"use strict";
|
|
2232
|
+
var __defProp22 = Object.defineProperty;
|
|
2233
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2234
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2235
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2236
|
+
var __export22 = (target, all) => {
|
|
2237
|
+
for (var name in all)
|
|
2238
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2239
|
+
};
|
|
2240
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2241
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2242
|
+
for (let key of __getOwnPropNames22(from))
|
|
2243
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2244
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2245
|
+
}
|
|
2246
|
+
return to;
|
|
2247
|
+
};
|
|
2248
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2249
|
+
var string_exports = {};
|
|
2250
|
+
__export22(string_exports, {
|
|
2251
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2252
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2253
|
+
findKeyPosition: () => findKeyPosition,
|
|
2254
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2255
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2256
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2257
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
2258
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2259
|
+
});
|
|
2260
|
+
module2.exports = __toCommonJS22(string_exports);
|
|
2261
|
+
var stringIncludesAny = (str, characters) => {
|
|
2262
|
+
for (const char of characters) {
|
|
2263
|
+
if (str.includes(char)) {
|
|
2264
|
+
return true;
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
return false;
|
|
2268
|
+
};
|
|
2269
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
2270
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2271
|
+
return str.replace(pattern, "");
|
|
2272
|
+
};
|
|
2273
|
+
var brackRegex = {
|
|
2274
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2275
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2276
|
+
};
|
|
2277
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2278
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2279
|
+
return str;
|
|
2280
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
2281
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
2282
|
+
if (parentPath) {
|
|
2283
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2284
|
+
let parentState = state;
|
|
2285
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
2286
|
+
parentState = parentState.parent;
|
|
2287
|
+
if (!parentState) {
|
|
2288
|
+
return "";
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
const value = parentState[variable.trim()];
|
|
2292
|
+
return value !== void 0 ? `${value}` : "";
|
|
2293
|
+
} else {
|
|
2294
|
+
const value = state[variable.trim()];
|
|
2295
|
+
return value !== void 0 ? `${value}` : "";
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2298
|
+
};
|
|
2299
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
2300
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2301
|
+
};
|
|
2302
|
+
var findKeyPosition = (str, key) => {
|
|
2303
|
+
const lines = str.split("\n");
|
|
2304
|
+
let startLineNumber = -1;
|
|
2305
|
+
let endLineNumber = -1;
|
|
2306
|
+
let startColumn = -1;
|
|
2307
|
+
let endColumn = -1;
|
|
2308
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2309
|
+
let braceCount = 0;
|
|
2310
|
+
let foundKey = false;
|
|
2311
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2312
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2313
|
+
foundKey = true;
|
|
2314
|
+
startLineNumber = i + 1;
|
|
2315
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
2316
|
+
if (lines[i].includes("{}")) {
|
|
2317
|
+
endLineNumber = startLineNumber;
|
|
2318
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
2319
|
+
break;
|
|
2320
|
+
}
|
|
2321
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
2322
|
+
if (line.includes("{") || line.includes("[")) {
|
|
2323
|
+
braceCount = 1;
|
|
2324
|
+
} else {
|
|
2325
|
+
endLineNumber = i + 1;
|
|
2326
|
+
endColumn = lines[i].length + 1;
|
|
2327
|
+
break;
|
|
2328
|
+
}
|
|
2329
|
+
} else if (foundKey) {
|
|
2330
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2331
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2332
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2333
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2334
|
+
if (braceCount === 0) {
|
|
2335
|
+
endLineNumber = i + 1;
|
|
2336
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2337
|
+
break;
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
return {
|
|
2342
|
+
startColumn,
|
|
2343
|
+
endColumn,
|
|
2344
|
+
startLineNumber,
|
|
2345
|
+
endLineNumber
|
|
2346
|
+
};
|
|
2347
|
+
};
|
|
2348
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
2349
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2350
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
2351
|
+
const octalValue = parseInt(p1, 8);
|
|
2352
|
+
const char = String.fromCharCode(octalValue);
|
|
2353
|
+
return char;
|
|
2354
|
+
});
|
|
2355
|
+
};
|
|
2356
|
+
var customEncodeURIComponent = (str) => {
|
|
2357
|
+
return str.split("").map((char) => {
|
|
2358
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2359
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2360
|
+
}
|
|
2361
|
+
return char;
|
|
2362
|
+
}).join("");
|
|
2363
|
+
};
|
|
2364
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
2365
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2366
|
+
};
|
|
2367
|
+
}
|
|
2368
|
+
});
|
|
2369
|
+
var require_object2 = __commonJS2({
|
|
2370
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2371
|
+
"use strict";
|
|
2372
|
+
var __defProp22 = Object.defineProperty;
|
|
2373
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2374
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2375
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2376
|
+
var __export22 = (target, all) => {
|
|
2377
|
+
for (var name in all)
|
|
2378
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2379
|
+
};
|
|
2380
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2381
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2382
|
+
for (let key of __getOwnPropNames22(from))
|
|
2383
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2384
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2385
|
+
}
|
|
2386
|
+
return to;
|
|
2387
|
+
};
|
|
2388
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2389
|
+
var object_exports = {};
|
|
2390
|
+
__export22(object_exports, {
|
|
2391
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2392
|
+
clone: () => clone,
|
|
2393
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2394
|
+
deepClone: () => deepClone2,
|
|
2395
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
2396
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2397
|
+
deepContains: () => deepContains,
|
|
2398
|
+
deepDestringify: () => deepDestringify,
|
|
2399
|
+
deepDiff: () => deepDiff,
|
|
2400
|
+
deepMerge: () => deepMerge2,
|
|
2401
|
+
deepStringify: () => deepStringify,
|
|
2402
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2403
|
+
diff: () => diff,
|
|
2404
|
+
diffArrays: () => diffArrays,
|
|
2405
|
+
diffObjects: () => diffObjects,
|
|
2406
|
+
exec: () => exec,
|
|
2407
|
+
flattenRecursive: () => flattenRecursive,
|
|
2408
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2409
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
2410
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
2411
|
+
isEmpty: () => isEmpty,
|
|
2412
|
+
isEmptyObject: () => isEmptyObject,
|
|
2413
|
+
isEqualDeep: () => isEqualDeep,
|
|
2414
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2415
|
+
map: () => map,
|
|
2416
|
+
merge: () => merge,
|
|
2417
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2418
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2419
|
+
objectToString: () => objectToString,
|
|
2420
|
+
overwrite: () => overwrite,
|
|
2421
|
+
overwriteDeep: () => overwriteDeep,
|
|
2422
|
+
overwriteShallow: () => overwriteShallow,
|
|
2423
|
+
removeFromObject: () => removeFromObject,
|
|
2424
|
+
stringToObject: () => stringToObject
|
|
2425
|
+
});
|
|
2426
|
+
module2.exports = __toCommonJS22(object_exports);
|
|
2427
|
+
var import_globals2 = require_globals2();
|
|
2428
|
+
var import_types = require_types2();
|
|
2429
|
+
var import_array = require_array2();
|
|
2430
|
+
var import_string = require_string2();
|
|
2431
|
+
var exec = (param, element, state, context) => {
|
|
2432
|
+
if ((0, import_types.isFunction)(param)) {
|
|
2433
|
+
return param(
|
|
2434
|
+
element,
|
|
2435
|
+
state || element.state,
|
|
2436
|
+
context || element.context
|
|
2437
|
+
);
|
|
2438
|
+
}
|
|
2439
|
+
return param;
|
|
2440
|
+
};
|
|
2441
|
+
var map = (obj, extention, element) => {
|
|
2442
|
+
for (const e in extention) {
|
|
2443
|
+
obj[e] = exec(extention[e], element);
|
|
2444
|
+
}
|
|
2445
|
+
};
|
|
2446
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
2447
|
+
for (const e in obj) {
|
|
2448
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2449
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2450
|
+
continue;
|
|
2451
|
+
const elementProp = element[e];
|
|
2452
|
+
const objProp = obj[e];
|
|
2453
|
+
if (elementProp === void 0) {
|
|
2454
|
+
element[e] = objProp;
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
return element;
|
|
2458
|
+
};
|
|
2459
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2460
|
+
for (const e in extend) {
|
|
2461
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2462
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2463
|
+
continue;
|
|
2464
|
+
const elementProp = element[e];
|
|
2465
|
+
const extendProp = extend[e];
|
|
2466
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2467
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2468
|
+
} else if (elementProp === void 0) {
|
|
2469
|
+
element[e] = extendProp;
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
return element;
|
|
2473
|
+
};
|
|
2474
|
+
var clone = (obj, excludeFrom = []) => {
|
|
2475
|
+
const o = {};
|
|
2476
|
+
for (const prop in obj) {
|
|
2477
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2478
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2479
|
+
continue;
|
|
2480
|
+
o[prop] = obj[prop];
|
|
2481
|
+
}
|
|
2482
|
+
return o;
|
|
2483
|
+
};
|
|
2484
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2485
|
+
if ((0, import_types.isArray)(obj)) {
|
|
2486
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2487
|
+
}
|
|
2488
|
+
const o = {};
|
|
2489
|
+
for (const k in obj) {
|
|
2490
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2491
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2492
|
+
continue;
|
|
2493
|
+
let v = obj[k];
|
|
2494
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2495
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
2496
|
+
}
|
|
2497
|
+
if ((0, import_types.isArray)(v)) {
|
|
2498
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2499
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
2500
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2501
|
+
} else
|
|
2502
|
+
o[k] = v;
|
|
2503
|
+
}
|
|
2504
|
+
return o;
|
|
2505
|
+
};
|
|
2506
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
2507
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2508
|
+
};
|
|
2509
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2510
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2511
|
+
for (const prop in obj) {
|
|
2512
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2513
|
+
continue;
|
|
2514
|
+
if (prop === "__proto__")
|
|
2515
|
+
continue;
|
|
2516
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2517
|
+
continue;
|
|
2518
|
+
let objProp = obj[prop];
|
|
2519
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2520
|
+
continue;
|
|
2521
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2522
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
2523
|
+
}
|
|
2524
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2525
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2526
|
+
} else
|
|
2527
|
+
o[prop] = objProp;
|
|
2528
|
+
}
|
|
2529
|
+
return o;
|
|
2530
|
+
};
|
|
2531
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2532
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2533
|
+
for (const prop in obj) {
|
|
2534
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2535
|
+
continue;
|
|
2536
|
+
const objProp = obj[prop];
|
|
2537
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2538
|
+
continue;
|
|
2539
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2540
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2541
|
+
} else
|
|
2542
|
+
o[prop] = objProp;
|
|
2543
|
+
}
|
|
2544
|
+
return o;
|
|
2545
|
+
};
|
|
2546
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
2547
|
+
for (const prop in obj) {
|
|
2548
|
+
const objProp = obj[prop];
|
|
2549
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
2550
|
+
stringified[prop] = objProp.toString();
|
|
2551
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2552
|
+
stringified[prop] = {};
|
|
2553
|
+
deepStringify(objProp, stringified[prop]);
|
|
2554
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2555
|
+
stringified[prop] = [];
|
|
2556
|
+
objProp.forEach((v, i) => {
|
|
2557
|
+
if ((0, import_types.isObject)(v)) {
|
|
2558
|
+
stringified[prop][i] = {};
|
|
2559
|
+
deepStringify(v, stringified[prop][i]);
|
|
2560
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
2561
|
+
stringified[prop][i] = v.toString();
|
|
2562
|
+
} else {
|
|
2563
|
+
stringified[prop][i] = v;
|
|
2564
|
+
}
|
|
2565
|
+
});
|
|
2566
|
+
} else {
|
|
2567
|
+
stringified[prop] = objProp;
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
return stringified;
|
|
2571
|
+
};
|
|
2572
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
2573
|
+
const spaces = " ".repeat(indent);
|
|
2574
|
+
let str = "{\n";
|
|
2575
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
2576
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2577
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2578
|
+
str += `${spaces} ${stringedKey}: `;
|
|
2579
|
+
if ((0, import_types.isArray)(value)) {
|
|
2580
|
+
str += "[\n";
|
|
2581
|
+
for (const element of value) {
|
|
2582
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2583
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2584
|
+
`;
|
|
2585
|
+
} else if ((0, import_types.isString)(element)) {
|
|
2586
|
+
str += `${spaces} '${element}',
|
|
2587
|
+
`;
|
|
2114
2588
|
} else {
|
|
2115
|
-
str +=
|
|
2589
|
+
str += `${spaces} ${element},
|
|
2590
|
+
`;
|
|
2116
2591
|
}
|
|
2117
|
-
str += ",\n";
|
|
2118
2592
|
}
|
|
2119
|
-
str += `${spaces}
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2593
|
+
str += `${spaces} ]`;
|
|
2594
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2595
|
+
str += objectToString(value, indent + 1);
|
|
2596
|
+
} else if ((0, import_types.isString)(value)) {
|
|
2597
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2598
|
+
} else {
|
|
2599
|
+
str += value;
|
|
2600
|
+
}
|
|
2601
|
+
str += ",\n";
|
|
2602
|
+
}
|
|
2603
|
+
str += `${spaces}}`;
|
|
2604
|
+
return str;
|
|
2605
|
+
};
|
|
2606
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
2607
|
+
for (const prop in obj) {
|
|
2608
|
+
const objProp = obj[prop];
|
|
2609
|
+
if ((0, import_types.isFunction)(objProp))
|
|
2610
|
+
continue;
|
|
2611
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
2612
|
+
detached[prop] = {};
|
|
2613
|
+
deepStringify(objProp, detached[prop]);
|
|
2614
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2615
|
+
detached[prop] = [];
|
|
2616
|
+
objProp.forEach((v, i) => {
|
|
2617
|
+
if ((0, import_types.isFunction)(v))
|
|
2618
|
+
return;
|
|
2619
|
+
if ((0, import_types.isObject)(v)) {
|
|
2620
|
+
detached[prop][i] = {};
|
|
2621
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
2142
2622
|
} else {
|
|
2143
|
-
detached[prop] =
|
|
2623
|
+
detached[prop][i] = v;
|
|
2624
|
+
}
|
|
2625
|
+
});
|
|
2626
|
+
} else {
|
|
2627
|
+
detached[prop] = objProp;
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
return detached;
|
|
2631
|
+
};
|
|
2632
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
2633
|
+
for (const prop in obj) {
|
|
2634
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2635
|
+
if (!hasOwnProperty2)
|
|
2636
|
+
continue;
|
|
2637
|
+
const objProp = obj[prop];
|
|
2638
|
+
if ((0, import_types.isString)(objProp)) {
|
|
2639
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2640
|
+
try {
|
|
2641
|
+
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2642
|
+
destringified[prop] = evalProp;
|
|
2643
|
+
} catch (e) {
|
|
2644
|
+
if (e)
|
|
2645
|
+
destringified[prop] = objProp;
|
|
2144
2646
|
}
|
|
2647
|
+
} else {
|
|
2648
|
+
destringified[prop] = objProp;
|
|
2145
2649
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
if (!hasOwnProperty2)
|
|
2152
|
-
continue;
|
|
2153
|
-
const objProp = obj[prop];
|
|
2154
|
-
if ((0, import_types.isString)(objProp)) {
|
|
2155
|
-
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2650
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2651
|
+
destringified[prop] = [];
|
|
2652
|
+
objProp.forEach((arrProp) => {
|
|
2653
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
2654
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2156
2655
|
try {
|
|
2157
|
-
const evalProp = import_globals2.window.eval(`(${
|
|
2158
|
-
destringified[prop]
|
|
2656
|
+
const evalProp = import_globals2.window.eval(`(${arrProp})`);
|
|
2657
|
+
destringified[prop].push(evalProp);
|
|
2159
2658
|
} catch (e) {
|
|
2160
2659
|
if (e)
|
|
2161
|
-
destringified[prop]
|
|
2660
|
+
destringified[prop].push(arrProp);
|
|
2162
2661
|
}
|
|
2163
2662
|
} else {
|
|
2164
|
-
destringified[prop]
|
|
2663
|
+
destringified[prop].push(arrProp);
|
|
2165
2664
|
}
|
|
2166
|
-
} else if ((0, import_types.
|
|
2167
|
-
destringified[prop]
|
|
2168
|
-
objProp.forEach((arrProp) => {
|
|
2169
|
-
if ((0, import_types.isString)(arrProp)) {
|
|
2170
|
-
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2171
|
-
try {
|
|
2172
|
-
const evalProp = import_globals2.window.eval(`(${arrProp})`);
|
|
2173
|
-
destringified[prop].push(evalProp);
|
|
2174
|
-
} catch (e) {
|
|
2175
|
-
if (e)
|
|
2176
|
-
destringified[prop].push(arrProp);
|
|
2177
|
-
}
|
|
2178
|
-
} else {
|
|
2179
|
-
destringified[prop].push(arrProp);
|
|
2180
|
-
}
|
|
2181
|
-
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2182
|
-
destringified[prop].push(deepDestringify(arrProp));
|
|
2183
|
-
} else {
|
|
2184
|
-
destringified[prop].push(arrProp);
|
|
2185
|
-
}
|
|
2186
|
-
});
|
|
2187
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2188
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2665
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2666
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
2189
2667
|
} else {
|
|
2190
|
-
destringified[prop]
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
return destringified;
|
|
2194
|
-
};
|
|
2195
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2196
|
-
try {
|
|
2197
|
-
return import_globals2.window.eval("(" + str + ")");
|
|
2198
|
-
} catch (e) {
|
|
2199
|
-
if (opts.verbose)
|
|
2200
|
-
console.warn(e);
|
|
2201
|
-
}
|
|
2202
|
-
};
|
|
2203
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
2204
|
-
for (const e in objToDiff) {
|
|
2205
|
-
if (e === "ref")
|
|
2206
|
-
continue;
|
|
2207
|
-
const originalProp = original[e];
|
|
2208
|
-
const objToDiffProp = objToDiff[e];
|
|
2209
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2210
|
-
cache[e] = {};
|
|
2211
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
2212
|
-
} else if (objToDiffProp !== void 0) {
|
|
2213
|
-
cache[e] = objToDiffProp;
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
return cache;
|
|
2217
|
-
};
|
|
2218
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
2219
|
-
if (original.length !== objToDiff.length) {
|
|
2220
|
-
cache = objToDiff;
|
|
2221
|
-
} else {
|
|
2222
|
-
const diffArr = [];
|
|
2223
|
-
for (let i = 0; i < original.length; i++) {
|
|
2224
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
2225
|
-
if (Object.keys(diffObj).length > 0) {
|
|
2226
|
-
diffArr.push(diffObj);
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
if (diffArr.length > 0) {
|
|
2230
|
-
cache = diffArr;
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
return cache;
|
|
2234
|
-
};
|
|
2235
|
-
var diff = (original, objToDiff, cache = {}) => {
|
|
2236
|
-
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2237
|
-
cache = [];
|
|
2238
|
-
diffArrays(original, objToDiff, cache);
|
|
2239
|
-
} else {
|
|
2240
|
-
diffObjects(original, objToDiff, cache);
|
|
2241
|
-
}
|
|
2242
|
-
return cache;
|
|
2243
|
-
};
|
|
2244
|
-
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2245
|
-
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2246
|
-
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2247
|
-
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2248
|
-
var deepDiff = (lhs, rhs) => {
|
|
2249
|
-
if (lhs === rhs)
|
|
2250
|
-
return {};
|
|
2251
|
-
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2252
|
-
return rhs;
|
|
2253
|
-
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2254
|
-
if (!hasOwnProperty(rhs, key)) {
|
|
2255
|
-
acc[key] = void 0;
|
|
2256
|
-
}
|
|
2257
|
-
return acc;
|
|
2258
|
-
}, makeObjectWithoutPrototype());
|
|
2259
|
-
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2260
|
-
if (lhs.valueOf() === rhs.valueOf())
|
|
2261
|
-
return {};
|
|
2262
|
-
return rhs;
|
|
2263
|
-
}
|
|
2264
|
-
return Object.keys(rhs).reduce((acc, key) => {
|
|
2265
|
-
if (!hasOwnProperty(lhs, key)) {
|
|
2266
|
-
acc[key] = rhs[key];
|
|
2267
|
-
return acc;
|
|
2268
|
-
}
|
|
2269
|
-
const difference = diff(lhs[key], rhs[key]);
|
|
2270
|
-
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2271
|
-
return acc;
|
|
2272
|
-
}
|
|
2273
|
-
acc[key] = difference;
|
|
2274
|
-
return acc;
|
|
2275
|
-
}, deletedValues);
|
|
2276
|
-
};
|
|
2277
|
-
var overwrite = (element, params, excludeFrom = []) => {
|
|
2278
|
-
const { ref } = element;
|
|
2279
|
-
const changes = {};
|
|
2280
|
-
for (const e in params) {
|
|
2281
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2282
|
-
continue;
|
|
2283
|
-
const elementProp = element[e];
|
|
2284
|
-
const paramsProp = params[e];
|
|
2285
|
-
if (paramsProp) {
|
|
2286
|
-
ref.__cache[e] = changes[e] = elementProp;
|
|
2287
|
-
ref[e] = paramsProp;
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
return changes;
|
|
2291
|
-
};
|
|
2292
|
-
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2293
|
-
for (const e in params) {
|
|
2294
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2295
|
-
continue;
|
|
2296
|
-
obj[e] = params[e];
|
|
2297
|
-
}
|
|
2298
|
-
return obj;
|
|
2299
|
-
};
|
|
2300
|
-
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2301
|
-
for (const e in params) {
|
|
2302
|
-
if (e === "__proto__")
|
|
2303
|
-
continue;
|
|
2304
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2305
|
-
continue;
|
|
2306
|
-
const objProp = obj[e];
|
|
2307
|
-
const paramsProp = params[e];
|
|
2308
|
-
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2309
|
-
overwriteDeep(objProp, paramsProp);
|
|
2310
|
-
} else if (paramsProp !== void 0) {
|
|
2311
|
-
obj[e] = paramsProp;
|
|
2668
|
+
destringified[prop].push(arrProp);
|
|
2312
2669
|
}
|
|
2670
|
+
});
|
|
2671
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2672
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2673
|
+
} else {
|
|
2674
|
+
destringified[prop] = objProp;
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
return destringified;
|
|
2678
|
+
};
|
|
2679
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2680
|
+
try {
|
|
2681
|
+
return import_globals2.window.eval("(" + str + ")");
|
|
2682
|
+
} catch (e) {
|
|
2683
|
+
if (opts.verbose)
|
|
2684
|
+
console.warn(e);
|
|
2685
|
+
}
|
|
2686
|
+
};
|
|
2687
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
2688
|
+
for (const e in objToDiff) {
|
|
2689
|
+
if (e === "ref")
|
|
2690
|
+
continue;
|
|
2691
|
+
const originalProp = original[e];
|
|
2692
|
+
const objToDiffProp = objToDiff[e];
|
|
2693
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2694
|
+
cache[e] = {};
|
|
2695
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
2696
|
+
} else if (objToDiffProp !== void 0) {
|
|
2697
|
+
cache[e] = objToDiffProp;
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
return cache;
|
|
2701
|
+
};
|
|
2702
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
2703
|
+
if (original.length !== objToDiff.length) {
|
|
2704
|
+
cache = objToDiff;
|
|
2705
|
+
} else {
|
|
2706
|
+
const diffArr = [];
|
|
2707
|
+
for (let i = 0; i < original.length; i++) {
|
|
2708
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
2709
|
+
if (Object.keys(diffObj).length > 0) {
|
|
2710
|
+
diffArr.push(diffObj);
|
|
2313
2711
|
}
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2712
|
+
}
|
|
2713
|
+
if (diffArr.length > 0) {
|
|
2714
|
+
cache = diffArr;
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
return cache;
|
|
2718
|
+
};
|
|
2719
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
2720
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2721
|
+
cache = [];
|
|
2722
|
+
diffArrays(original, objToDiff, cache);
|
|
2723
|
+
} else {
|
|
2724
|
+
diffObjects(original, objToDiff, cache);
|
|
2725
|
+
}
|
|
2726
|
+
return cache;
|
|
2727
|
+
};
|
|
2728
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2729
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2730
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2731
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2732
|
+
var deepDiff = (lhs, rhs) => {
|
|
2733
|
+
if (lhs === rhs)
|
|
2734
|
+
return {};
|
|
2735
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2736
|
+
return rhs;
|
|
2737
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2738
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
2739
|
+
acc[key] = void 0;
|
|
2740
|
+
}
|
|
2741
|
+
return acc;
|
|
2742
|
+
}, makeObjectWithoutPrototype());
|
|
2743
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2744
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
2745
|
+
return {};
|
|
2746
|
+
return rhs;
|
|
2747
|
+
}
|
|
2748
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
2749
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
2750
|
+
acc[key] = rhs[key];
|
|
2751
|
+
return acc;
|
|
2752
|
+
}
|
|
2753
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
2754
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2755
|
+
return acc;
|
|
2756
|
+
}
|
|
2757
|
+
acc[key] = difference;
|
|
2758
|
+
return acc;
|
|
2759
|
+
}, deletedValues);
|
|
2760
|
+
};
|
|
2761
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
2762
|
+
const { ref } = element;
|
|
2763
|
+
const changes = {};
|
|
2764
|
+
for (const e in params) {
|
|
2765
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2766
|
+
continue;
|
|
2767
|
+
const elementProp = element[e];
|
|
2768
|
+
const paramsProp = params[e];
|
|
2769
|
+
if (paramsProp) {
|
|
2770
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
2771
|
+
ref[e] = paramsProp;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
return changes;
|
|
2775
|
+
};
|
|
2776
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2777
|
+
for (const e in params) {
|
|
2778
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2779
|
+
continue;
|
|
2780
|
+
obj[e] = params[e];
|
|
2781
|
+
}
|
|
2782
|
+
return obj;
|
|
2783
|
+
};
|
|
2784
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2785
|
+
for (const e in params) {
|
|
2786
|
+
if (e === "__proto__")
|
|
2787
|
+
continue;
|
|
2788
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2789
|
+
continue;
|
|
2790
|
+
const objProp = obj[e];
|
|
2791
|
+
const paramsProp = params[e];
|
|
2792
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2793
|
+
overwriteDeep(objProp, paramsProp);
|
|
2794
|
+
} else if (paramsProp !== void 0) {
|
|
2795
|
+
obj[e] = paramsProp;
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
return obj;
|
|
2799
|
+
};
|
|
2800
|
+
var mergeIfExisted = (a, b) => {
|
|
2801
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2802
|
+
return deepMerge2(a, b);
|
|
2803
|
+
return a || b;
|
|
2804
|
+
};
|
|
2805
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
2806
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2807
|
+
stack.push(objectized);
|
|
2808
|
+
const extendOfExtend = objectized[prop];
|
|
2809
|
+
if (extendOfExtend)
|
|
2810
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
2811
|
+
delete objectized[prop];
|
|
2812
|
+
return stack;
|
|
2813
|
+
};
|
|
2814
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2815
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2816
|
+
return param === element;
|
|
2817
|
+
}
|
|
2818
|
+
if (visited.has(param) || visited.has(element)) {
|
|
2819
|
+
return true;
|
|
2820
|
+
}
|
|
2821
|
+
visited.add(param);
|
|
2822
|
+
visited.add(element);
|
|
2823
|
+
const keysParam = Object.keys(param);
|
|
2824
|
+
const keysElement = Object.keys(element);
|
|
2825
|
+
if (keysParam.length !== keysElement.length) {
|
|
2826
|
+
return false;
|
|
2827
|
+
}
|
|
2828
|
+
for (const key of keysParam) {
|
|
2829
|
+
if (!keysElement.includes(key)) {
|
|
2830
|
+
return false;
|
|
2831
|
+
}
|
|
2832
|
+
const paramProp = param[key];
|
|
2833
|
+
const elementProp = element[key];
|
|
2834
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2835
|
+
return false;
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
return true;
|
|
2839
|
+
};
|
|
2840
|
+
var deepContains = (obj1, obj2) => {
|
|
2841
|
+
if (typeof obj1 !== typeof obj2) {
|
|
2842
|
+
return false;
|
|
2843
|
+
}
|
|
2844
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2845
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2846
|
+
if (obj1.length !== obj2.length) {
|
|
2342
2847
|
return false;
|
|
2343
2848
|
}
|
|
2344
|
-
for (
|
|
2345
|
-
if (!
|
|
2346
|
-
return false;
|
|
2347
|
-
}
|
|
2348
|
-
const paramProp = param[key];
|
|
2349
|
-
const elementProp = element[key];
|
|
2350
|
-
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2849
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
2850
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
2351
2851
|
return false;
|
|
2352
2852
|
}
|
|
2353
2853
|
}
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
}
|
|
2360
|
-
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2361
|
-
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2362
|
-
if (obj1.length !== obj2.length) {
|
|
2363
|
-
return false;
|
|
2364
|
-
}
|
|
2365
|
-
for (let i = 0; i < obj1.length; i++) {
|
|
2366
|
-
if (!deepContains(obj1[i], obj2[i])) {
|
|
2367
|
-
return false;
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2371
|
-
for (const key in obj1) {
|
|
2372
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2373
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2374
|
-
return false;
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2854
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2855
|
+
for (const key in obj1) {
|
|
2856
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2857
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2858
|
+
return false;
|
|
2377
2859
|
}
|
|
2378
|
-
} else {
|
|
2379
|
-
return obj2 === obj1;
|
|
2380
|
-
}
|
|
2381
|
-
return true;
|
|
2382
|
-
};
|
|
2383
|
-
var removeFromObject = (obj, props) => {
|
|
2384
|
-
if (props === void 0 || props === null)
|
|
2385
|
-
return obj;
|
|
2386
|
-
if ((0, import_types.is)(props)("string", "number")) {
|
|
2387
|
-
delete obj[props];
|
|
2388
|
-
} else if ((0, import_types.isArray)(props)) {
|
|
2389
|
-
props.forEach((prop) => delete obj[prop]);
|
|
2390
|
-
} else {
|
|
2391
|
-
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2392
2860
|
}
|
|
2393
|
-
return obj;
|
|
2394
|
-
};
|
|
2395
|
-
}
|
|
2396
|
-
});
|
|
2397
|
-
var require_function2 = __commonJS2({
|
|
2398
|
-
"../../node_modules/@domql/utils/dist/cjs/function.js"(exports2, module22) {
|
|
2399
|
-
"use strict";
|
|
2400
|
-
var __defProp22 = Object.defineProperty;
|
|
2401
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2402
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2403
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2404
|
-
var __export22 = (target, all) => {
|
|
2405
|
-
for (var name in all)
|
|
2406
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2407
|
-
};
|
|
2408
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2409
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2410
|
-
for (let key of __getOwnPropNames22(from))
|
|
2411
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2412
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2413
|
-
}
|
|
2414
|
-
return to;
|
|
2415
|
-
};
|
|
2416
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2417
|
-
var function_exports = {};
|
|
2418
|
-
__export22(function_exports, {
|
|
2419
|
-
debounce: () => debounce,
|
|
2420
|
-
debounceOnContext: () => debounceOnContext,
|
|
2421
|
-
isStringFunction: () => isStringFunction,
|
|
2422
|
-
memoize: () => memoize
|
|
2423
|
-
});
|
|
2424
|
-
module22.exports = __toCommonJS22(function_exports);
|
|
2425
|
-
function debounce(func, wait, immediate) {
|
|
2426
|
-
let timeout;
|
|
2427
|
-
return function() {
|
|
2428
|
-
const context = this;
|
|
2429
|
-
const args = arguments;
|
|
2430
|
-
const later = function() {
|
|
2431
|
-
timeout = null;
|
|
2432
|
-
if (!immediate)
|
|
2433
|
-
func.apply(context, args);
|
|
2434
|
-
};
|
|
2435
|
-
const callNow = immediate && !timeout;
|
|
2436
|
-
clearTimeout(timeout);
|
|
2437
|
-
timeout = setTimeout(later, wait);
|
|
2438
|
-
if (callNow)
|
|
2439
|
-
func.apply(context, args);
|
|
2440
|
-
};
|
|
2441
2861
|
}
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
return (...args) => {
|
|
2445
|
-
clearTimeout(timer);
|
|
2446
|
-
timer = setTimeout(() => {
|
|
2447
|
-
func.apply(element, args);
|
|
2448
|
-
}, timeout);
|
|
2449
|
-
};
|
|
2450
|
-
};
|
|
2451
|
-
var memoize = (fn) => {
|
|
2452
|
-
const cache = {};
|
|
2453
|
-
return (...args) => {
|
|
2454
|
-
const n = args[0];
|
|
2455
|
-
if (n in cache) {
|
|
2456
|
-
return cache[n];
|
|
2457
|
-
} else {
|
|
2458
|
-
const result = fn(n);
|
|
2459
|
-
cache[n] = result;
|
|
2460
|
-
return result;
|
|
2461
|
-
}
|
|
2462
|
-
};
|
|
2463
|
-
};
|
|
2464
|
-
var isStringFunction = (inputString) => {
|
|
2465
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2466
|
-
return functionRegex.test(inputString);
|
|
2467
|
-
};
|
|
2862
|
+
} else {
|
|
2863
|
+
return obj2 === obj1;
|
|
2468
2864
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
};
|
|
2481
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2482
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2483
|
-
for (let key of __getOwnPropNames22(from))
|
|
2484
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2485
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2486
|
-
}
|
|
2487
|
-
return to;
|
|
2488
|
-
};
|
|
2489
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2490
|
-
var log_exports = {};
|
|
2491
|
-
__export22(log_exports, {
|
|
2492
|
-
logGroupIf: () => logGroupIf,
|
|
2493
|
-
logIf: () => logIf
|
|
2494
|
-
});
|
|
2495
|
-
module22.exports = __toCommonJS22(log_exports);
|
|
2496
|
-
var logIf = (bool, ...arg) => {
|
|
2497
|
-
if (bool)
|
|
2498
|
-
arg.map((v) => console.log(v));
|
|
2499
|
-
};
|
|
2500
|
-
var logGroupIf = (bool, key, ...arg) => {
|
|
2501
|
-
if (bool) {
|
|
2502
|
-
console.group(key);
|
|
2503
|
-
arg.map((v) => console.log(v));
|
|
2504
|
-
console.groupEnd(key);
|
|
2505
|
-
}
|
|
2506
|
-
};
|
|
2865
|
+
return true;
|
|
2866
|
+
};
|
|
2867
|
+
var removeFromObject = (obj, props) => {
|
|
2868
|
+
if (props === void 0 || props === null)
|
|
2869
|
+
return obj;
|
|
2870
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
2871
|
+
delete obj[props];
|
|
2872
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
2873
|
+
props.forEach((prop) => delete obj[prop]);
|
|
2874
|
+
} else {
|
|
2875
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2507
2876
|
}
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2514
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2515
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2516
|
-
var __export22 = (target, all) => {
|
|
2517
|
-
for (var name in all)
|
|
2518
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2519
|
-
};
|
|
2520
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2521
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2522
|
-
for (let key of __getOwnPropNames22(from))
|
|
2523
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2524
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2525
|
-
}
|
|
2526
|
-
return to;
|
|
2527
|
-
};
|
|
2528
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2529
|
-
var cookie_exports = {};
|
|
2530
|
-
__export22(cookie_exports, {
|
|
2531
|
-
getCookie: () => getCookie,
|
|
2532
|
-
isMobile: () => isMobile,
|
|
2533
|
-
setCookie: () => setCookie
|
|
2534
|
-
});
|
|
2535
|
-
module22.exports = __toCommonJS22(cookie_exports);
|
|
2536
|
-
var import_types = require_types2();
|
|
2537
|
-
var import_utils32 = require_cjs4();
|
|
2538
|
-
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2539
|
-
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2540
|
-
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2541
|
-
return;
|
|
2542
|
-
const d = /* @__PURE__ */ new Date();
|
|
2543
|
-
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2544
|
-
const expires = `expires=${d.toUTCString()}`;
|
|
2545
|
-
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2546
|
-
};
|
|
2547
|
-
var getCookie = (cname) => {
|
|
2548
|
-
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2549
|
-
return;
|
|
2550
|
-
const name = `${cname}=`;
|
|
2551
|
-
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2552
|
-
const ca = decodedCookie.split(";");
|
|
2553
|
-
for (let i = 0; i < ca.length; i++) {
|
|
2554
|
-
let c = ca[i];
|
|
2555
|
-
while (c.charAt(0) === " ")
|
|
2556
|
-
c = c.substring(1);
|
|
2557
|
-
if (c.indexOf(name) === 0)
|
|
2558
|
-
return c.substring(name.length, c.length);
|
|
2559
|
-
}
|
|
2560
|
-
return "";
|
|
2561
|
-
};
|
|
2877
|
+
return obj;
|
|
2878
|
+
};
|
|
2879
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
2880
|
+
if (obj === null || typeof obj !== "object") {
|
|
2881
|
+
return obj;
|
|
2562
2882
|
}
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2883
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2884
|
+
for (const key in obj) {
|
|
2885
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2886
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
return newObj;
|
|
2890
|
+
};
|
|
2891
|
+
var checkIfKeyIsComponent = (key) => {
|
|
2892
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2893
|
+
if (!isFirstKeyString)
|
|
2894
|
+
return;
|
|
2895
|
+
const firstCharKey = key.slice(0, 1);
|
|
2896
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
2897
|
+
};
|
|
2898
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
2899
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2900
|
+
return el;
|
|
2901
|
+
}
|
|
2902
|
+
if (el.extend) {
|
|
2903
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2904
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2905
|
+
if (foundString || foundInArray)
|
|
2906
|
+
return el;
|
|
2907
|
+
}
|
|
2908
|
+
};
|
|
2909
|
+
var getExtendsInElement = (obj) => {
|
|
2910
|
+
let result = [];
|
|
2911
|
+
function traverse(o) {
|
|
2912
|
+
for (const key in o) {
|
|
2913
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
2914
|
+
if (checkIfKeyIsComponent(key)) {
|
|
2915
|
+
result.push(key);
|
|
2916
|
+
}
|
|
2917
|
+
if (key === "extend") {
|
|
2918
|
+
if (typeof o[key] === "string") {
|
|
2919
|
+
result.push(o[key]);
|
|
2920
|
+
} else if (Array.isArray(o[key])) {
|
|
2921
|
+
result = result.concat(o[key]);
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
2925
|
+
traverse(o[key]);
|
|
2926
|
+
}
|
|
2580
2927
|
}
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
"a",
|
|
2605
|
-
"abbr",
|
|
2606
|
-
"acronym",
|
|
2607
|
-
"address",
|
|
2608
|
-
"applet",
|
|
2609
|
-
"area",
|
|
2610
|
-
"article",
|
|
2611
|
-
"aside",
|
|
2612
|
-
"audio",
|
|
2613
|
-
"b",
|
|
2614
|
-
"basefont",
|
|
2615
|
-
"bdi",
|
|
2616
|
-
"bdo",
|
|
2617
|
-
"big",
|
|
2618
|
-
"blockquote",
|
|
2619
|
-
"br",
|
|
2620
|
-
"button",
|
|
2621
|
-
"canvas",
|
|
2622
|
-
"caption",
|
|
2623
|
-
"center",
|
|
2624
|
-
"cite",
|
|
2625
|
-
"code",
|
|
2626
|
-
"search",
|
|
2627
|
-
"col",
|
|
2628
|
-
"colgroup",
|
|
2629
|
-
"data",
|
|
2630
|
-
"datalist",
|
|
2631
|
-
"dd",
|
|
2632
|
-
"del",
|
|
2633
|
-
"details",
|
|
2634
|
-
"dfn",
|
|
2635
|
-
"dialog",
|
|
2636
|
-
"dir",
|
|
2637
|
-
"div",
|
|
2638
|
-
"dl",
|
|
2639
|
-
"dt",
|
|
2640
|
-
"em",
|
|
2641
|
-
"embed",
|
|
2642
|
-
"fieldset",
|
|
2643
|
-
"figcaption",
|
|
2644
|
-
"figure",
|
|
2645
|
-
"font",
|
|
2646
|
-
"footer",
|
|
2647
|
-
"form",
|
|
2648
|
-
"frame",
|
|
2649
|
-
"frameset",
|
|
2650
|
-
"h1",
|
|
2651
|
-
"h2",
|
|
2652
|
-
"h3",
|
|
2653
|
-
"h4",
|
|
2654
|
-
"h5",
|
|
2655
|
-
"h6",
|
|
2656
|
-
"head",
|
|
2657
|
-
"header",
|
|
2658
|
-
"hr",
|
|
2659
|
-
"i",
|
|
2660
|
-
"iframe",
|
|
2661
|
-
"img",
|
|
2662
|
-
"input",
|
|
2663
|
-
"ins",
|
|
2664
|
-
"kbd",
|
|
2665
|
-
"label",
|
|
2666
|
-
"legend",
|
|
2667
|
-
"li",
|
|
2668
|
-
"link",
|
|
2669
|
-
"main",
|
|
2670
|
-
"map",
|
|
2671
|
-
"mark",
|
|
2672
|
-
"meter",
|
|
2673
|
-
"nav",
|
|
2674
|
-
"noframes",
|
|
2675
|
-
"noscript",
|
|
2676
|
-
"object",
|
|
2677
|
-
"ol",
|
|
2678
|
-
"optgroup",
|
|
2679
|
-
"option",
|
|
2680
|
-
"output",
|
|
2681
|
-
"p",
|
|
2682
|
-
"param",
|
|
2683
|
-
"picture",
|
|
2684
|
-
"pre",
|
|
2685
|
-
"progress",
|
|
2686
|
-
"hgroup",
|
|
2687
|
-
"q",
|
|
2688
|
-
"rp",
|
|
2689
|
-
"rt",
|
|
2690
|
-
"ruby",
|
|
2691
|
-
"s",
|
|
2692
|
-
"samp",
|
|
2693
|
-
"script",
|
|
2694
|
-
"section",
|
|
2695
|
-
"select",
|
|
2696
|
-
"small",
|
|
2697
|
-
"source",
|
|
2698
|
-
"span",
|
|
2699
|
-
"strike",
|
|
2700
|
-
"strong",
|
|
2701
|
-
"sub",
|
|
2702
|
-
"summary",
|
|
2703
|
-
"sup",
|
|
2704
|
-
"table",
|
|
2705
|
-
"tbody",
|
|
2706
|
-
"td",
|
|
2707
|
-
"template",
|
|
2708
|
-
"hgroup",
|
|
2709
|
-
"textarea",
|
|
2710
|
-
"tfoot",
|
|
2711
|
-
"th",
|
|
2712
|
-
"thead",
|
|
2713
|
-
"time",
|
|
2714
|
-
"tr",
|
|
2715
|
-
"track",
|
|
2716
|
-
"tt",
|
|
2717
|
-
"u",
|
|
2718
|
-
"ul",
|
|
2719
|
-
"var",
|
|
2720
|
-
"video",
|
|
2721
|
-
"wbr",
|
|
2722
|
-
// SVG
|
|
2723
|
-
"svg",
|
|
2724
|
-
"path"
|
|
2725
|
-
]
|
|
2726
|
-
};
|
|
2727
|
-
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
traverse(obj);
|
|
2931
|
+
return result;
|
|
2932
|
+
};
|
|
2933
|
+
}
|
|
2934
|
+
});
|
|
2935
|
+
var require_function2 = __commonJS2({
|
|
2936
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
2937
|
+
"use strict";
|
|
2938
|
+
var __defProp22 = Object.defineProperty;
|
|
2939
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2940
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2941
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2942
|
+
var __export22 = (target, all) => {
|
|
2943
|
+
for (var name in all)
|
|
2944
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2945
|
+
};
|
|
2946
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2947
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2948
|
+
for (let key of __getOwnPropNames22(from))
|
|
2949
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2950
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2728
2951
|
}
|
|
2952
|
+
return to;
|
|
2953
|
+
};
|
|
2954
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2955
|
+
var function_exports = {};
|
|
2956
|
+
__export22(function_exports, {
|
|
2957
|
+
debounce: () => debounce,
|
|
2958
|
+
debounceOnContext: () => debounceOnContext,
|
|
2959
|
+
isStringFunction: () => isStringFunction,
|
|
2960
|
+
memoize: () => memoize
|
|
2729
2961
|
});
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
if (
|
|
2739
|
-
|
|
2740
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2741
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2742
|
-
}
|
|
2743
|
-
return to;
|
|
2962
|
+
module2.exports = __toCommonJS22(function_exports);
|
|
2963
|
+
function debounce(func, wait, immediate) {
|
|
2964
|
+
let timeout;
|
|
2965
|
+
return function() {
|
|
2966
|
+
const context = this;
|
|
2967
|
+
const args = arguments;
|
|
2968
|
+
const later = function() {
|
|
2969
|
+
timeout = null;
|
|
2970
|
+
if (!immediate)
|
|
2971
|
+
func.apply(context, args);
|
|
2744
2972
|
};
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2973
|
+
const callNow = immediate && !timeout;
|
|
2974
|
+
clearTimeout(timeout);
|
|
2975
|
+
timeout = setTimeout(later, wait);
|
|
2976
|
+
if (callNow)
|
|
2977
|
+
func.apply(context, args);
|
|
2978
|
+
};
|
|
2979
|
+
}
|
|
2980
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2981
|
+
let timer;
|
|
2982
|
+
return (...args) => {
|
|
2983
|
+
clearTimeout(timer);
|
|
2984
|
+
timer = setTimeout(() => {
|
|
2985
|
+
func.apply(element, args);
|
|
2986
|
+
}, timeout);
|
|
2987
|
+
};
|
|
2988
|
+
};
|
|
2989
|
+
var memoize = (fn) => {
|
|
2990
|
+
const cache = {};
|
|
2991
|
+
return (...args) => {
|
|
2992
|
+
const n = args[0];
|
|
2993
|
+
if (n in cache) {
|
|
2994
|
+
return cache[n];
|
|
2995
|
+
} else {
|
|
2996
|
+
const result = fn(n);
|
|
2997
|
+
cache[n] = result;
|
|
2998
|
+
return result;
|
|
2999
|
+
}
|
|
3000
|
+
};
|
|
3001
|
+
};
|
|
3002
|
+
var isStringFunction = (inputString) => {
|
|
3003
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
3004
|
+
return functionRegex.test(inputString);
|
|
3005
|
+
};
|
|
3006
|
+
}
|
|
3007
|
+
});
|
|
3008
|
+
var require_log2 = __commonJS2({
|
|
3009
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
3010
|
+
"use strict";
|
|
3011
|
+
var __defProp22 = Object.defineProperty;
|
|
3012
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3013
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3014
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3015
|
+
var __export22 = (target, all) => {
|
|
3016
|
+
for (var name in all)
|
|
3017
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3018
|
+
};
|
|
3019
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3020
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3021
|
+
for (let key of __getOwnPropNames22(from))
|
|
3022
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3023
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2761
3024
|
}
|
|
3025
|
+
return to;
|
|
3026
|
+
};
|
|
3027
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3028
|
+
var log_exports = {};
|
|
3029
|
+
__export22(log_exports, {
|
|
3030
|
+
logGroupIf: () => logGroupIf,
|
|
3031
|
+
logIf: () => logIf
|
|
2762
3032
|
});
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
2768
|
-
findClosestNumber: () => findClosestNumber,
|
|
2769
|
-
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2770
|
-
formatDate: () => formatDate,
|
|
2771
|
-
loadJavascript: () => loadJavascript,
|
|
2772
|
-
loadJavascriptFile: () => loadJavascriptFile,
|
|
2773
|
-
removeChars: () => removeChars,
|
|
2774
|
-
toCamelCase: () => toCamelCase,
|
|
2775
|
-
toDashCase: () => toDashCase2,
|
|
2776
|
-
toDescriptionCase: () => toDescriptionCase,
|
|
2777
|
-
toTitleCase: () => toTitleCase,
|
|
2778
|
-
toggleFullscreen: () => toggleFullscreen
|
|
2779
|
-
});
|
|
2780
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
2781
|
-
var import_utils22 = __toESM2(require_cjs4(), 1);
|
|
2782
|
-
var toggleFullscreen = (el) => {
|
|
2783
|
-
if (!document.fullscreenElement) {
|
|
2784
|
-
el.node.requestFullscreen().catch((err) => {
|
|
2785
|
-
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
2786
|
-
});
|
|
2787
|
-
} else {
|
|
2788
|
-
document.exitFullscreen();
|
|
2789
|
-
}
|
|
3033
|
+
module2.exports = __toCommonJS22(log_exports);
|
|
3034
|
+
var logIf = (bool, ...arg) => {
|
|
3035
|
+
if (bool)
|
|
3036
|
+
arg.map((v) => console.log(v));
|
|
2790
3037
|
};
|
|
2791
|
-
var
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
3038
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
3039
|
+
if (bool) {
|
|
3040
|
+
console.group(key);
|
|
3041
|
+
arg.map((v) => console.log(v));
|
|
3042
|
+
console.groupEnd(key);
|
|
3043
|
+
}
|
|
2796
3044
|
};
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
var
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
2810
|
-
return `${da} ${mo}, ${ye}`;
|
|
2811
|
-
};
|
|
2812
|
-
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
2813
|
-
const fib = [0, 1];
|
|
2814
|
-
for (let i = 2; i <= n; i++) {
|
|
2815
|
-
fib[i] = fib[i - 1] + fib[i - 2];
|
|
2816
|
-
}
|
|
2817
|
-
return fib[n];
|
|
2818
|
-
};
|
|
2819
|
-
var loadJavascriptFile = (FILE_URL, async = true, doc = document, type = "text/javascript") => {
|
|
2820
|
-
return new Promise((resolve, reject) => {
|
|
2821
|
-
try {
|
|
2822
|
-
const scriptEle = doc.createElement("script");
|
|
2823
|
-
scriptEle.type = type;
|
|
2824
|
-
scriptEle.async = async;
|
|
2825
|
-
scriptEle.src = FILE_URL;
|
|
2826
|
-
scriptEle.addEventListener("load", (ev) => {
|
|
2827
|
-
resolve({
|
|
2828
|
-
status: true
|
|
2829
|
-
});
|
|
2830
|
-
});
|
|
2831
|
-
scriptEle.addEventListener("error", (ev) => {
|
|
2832
|
-
reject({
|
|
2833
|
-
status: false,
|
|
2834
|
-
message: `Failed to load the script ${FILE_URL}`
|
|
2835
|
-
});
|
|
2836
|
-
});
|
|
2837
|
-
doc.body.appendChild(scriptEle);
|
|
2838
|
-
} catch (error) {
|
|
2839
|
-
reject(error);
|
|
2840
|
-
}
|
|
2841
|
-
});
|
|
3045
|
+
}
|
|
3046
|
+
});
|
|
3047
|
+
var require_cookie2 = __commonJS2({
|
|
3048
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
3049
|
+
"use strict";
|
|
3050
|
+
var __defProp22 = Object.defineProperty;
|
|
3051
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3052
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3053
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3054
|
+
var __export22 = (target, all) => {
|
|
3055
|
+
for (var name in all)
|
|
3056
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2842
3057
|
};
|
|
2843
|
-
var
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
scriptEle.innerHTML = body;
|
|
2849
|
-
doc.body.appendChild(scriptEle);
|
|
2850
|
-
} catch (error) {
|
|
2851
|
-
console.warn(error);
|
|
2852
|
-
}
|
|
2853
|
-
};
|
|
2854
|
-
var copyStringToClipboard = (str) => {
|
|
2855
|
-
const el = document.createElement("textarea");
|
|
2856
|
-
el.value = str;
|
|
2857
|
-
el.setAttribute("readonly", "");
|
|
2858
|
-
el.style = { position: "absolute", left: "-9999px" };
|
|
2859
|
-
document.body.appendChild(el);
|
|
2860
|
-
el.select();
|
|
2861
|
-
document.execCommand("copy");
|
|
2862
|
-
document.body.removeChild(el);
|
|
2863
|
-
};
|
|
2864
|
-
var removeChars = (str) => {
|
|
2865
|
-
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
2866
|
-
};
|
|
2867
|
-
var toCamelCase = (str) => {
|
|
2868
|
-
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
2869
|
-
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
2870
|
-
}).replaceAll(/\s+/g, "");
|
|
2871
|
-
};
|
|
2872
|
-
var toTitleCase = (str) => str && str.replace(
|
|
2873
|
-
/\w\S*/g,
|
|
2874
|
-
(txt) => {
|
|
2875
|
-
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3058
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3059
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3060
|
+
for (let key of __getOwnPropNames22(from))
|
|
3061
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3062
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2876
3063
|
}
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
var
|
|
2880
|
-
|
|
3064
|
+
return to;
|
|
3065
|
+
};
|
|
3066
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3067
|
+
var cookie_exports = {};
|
|
3068
|
+
__export22(cookie_exports, {
|
|
3069
|
+
getCookie: () => getCookie,
|
|
3070
|
+
isMobile: () => isMobile,
|
|
3071
|
+
setCookie: () => setCookie
|
|
3072
|
+
});
|
|
3073
|
+
module2.exports = __toCommonJS22(cookie_exports);
|
|
3074
|
+
var import_types = require_types2();
|
|
3075
|
+
var import_utils32 = require_cjs3();
|
|
3076
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
3077
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
3078
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
3079
|
+
return;
|
|
3080
|
+
const d = /* @__PURE__ */ new Date();
|
|
3081
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
3082
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
3083
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
3084
|
+
};
|
|
3085
|
+
var getCookie = (cname) => {
|
|
3086
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2881
3087
|
return;
|
|
2882
|
-
const
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
return [val];
|
|
3088
|
+
const name = `${cname}=`;
|
|
3089
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
3090
|
+
const ca = decodedCookie.split(";");
|
|
3091
|
+
for (let i = 0; i < ca.length; i++) {
|
|
3092
|
+
let c = ca[i];
|
|
3093
|
+
while (c.charAt(0) === " ")
|
|
3094
|
+
c = c.substring(1);
|
|
3095
|
+
if (c.indexOf(name) === 0)
|
|
3096
|
+
return c.substring(name.length, c.length);
|
|
3097
|
+
}
|
|
3098
|
+
return "";
|
|
2894
3099
|
};
|
|
2895
3100
|
}
|
|
2896
3101
|
});
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
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
|
-
|
|
2970
|
-
|
|
3102
|
+
var require_tags2 = __commonJS2({
|
|
3103
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
3104
|
+
"use strict";
|
|
3105
|
+
var __defProp22 = Object.defineProperty;
|
|
3106
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3107
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3108
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3109
|
+
var __export22 = (target, all) => {
|
|
3110
|
+
for (var name in all)
|
|
3111
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3112
|
+
};
|
|
3113
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3114
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3115
|
+
for (let key of __getOwnPropNames22(from))
|
|
3116
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3117
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3118
|
+
}
|
|
3119
|
+
return to;
|
|
3120
|
+
};
|
|
3121
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3122
|
+
var tags_exports = {};
|
|
3123
|
+
__export22(tags_exports, {
|
|
3124
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
3125
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
3126
|
+
});
|
|
3127
|
+
module2.exports = __toCommonJS22(tags_exports);
|
|
3128
|
+
var HTML_TAGS = {
|
|
3129
|
+
root: [
|
|
3130
|
+
"body",
|
|
3131
|
+
"html"
|
|
3132
|
+
],
|
|
3133
|
+
head: [
|
|
3134
|
+
"title",
|
|
3135
|
+
"base",
|
|
3136
|
+
"meta",
|
|
3137
|
+
"style"
|
|
3138
|
+
],
|
|
3139
|
+
body: [
|
|
3140
|
+
"string",
|
|
3141
|
+
"fragment",
|
|
3142
|
+
"a",
|
|
3143
|
+
"abbr",
|
|
3144
|
+
"acronym",
|
|
3145
|
+
"address",
|
|
3146
|
+
"applet",
|
|
3147
|
+
"area",
|
|
3148
|
+
"article",
|
|
3149
|
+
"aside",
|
|
3150
|
+
"audio",
|
|
3151
|
+
"b",
|
|
3152
|
+
"basefont",
|
|
3153
|
+
"bdi",
|
|
3154
|
+
"bdo",
|
|
3155
|
+
"big",
|
|
3156
|
+
"blockquote",
|
|
3157
|
+
"br",
|
|
3158
|
+
"button",
|
|
3159
|
+
"canvas",
|
|
3160
|
+
"caption",
|
|
3161
|
+
"center",
|
|
3162
|
+
"cite",
|
|
3163
|
+
"code",
|
|
3164
|
+
"search",
|
|
3165
|
+
"col",
|
|
3166
|
+
"colgroup",
|
|
3167
|
+
"data",
|
|
3168
|
+
"datalist",
|
|
3169
|
+
"dd",
|
|
3170
|
+
"del",
|
|
3171
|
+
"details",
|
|
3172
|
+
"dfn",
|
|
3173
|
+
"dialog",
|
|
3174
|
+
"dir",
|
|
3175
|
+
"div",
|
|
3176
|
+
"dl",
|
|
3177
|
+
"dt",
|
|
3178
|
+
"em",
|
|
3179
|
+
"embed",
|
|
3180
|
+
"fieldset",
|
|
3181
|
+
"figcaption",
|
|
3182
|
+
"figure",
|
|
3183
|
+
"font",
|
|
3184
|
+
"footer",
|
|
3185
|
+
"form",
|
|
3186
|
+
"frame",
|
|
3187
|
+
"frameset",
|
|
3188
|
+
"h1",
|
|
3189
|
+
"h2",
|
|
3190
|
+
"h3",
|
|
3191
|
+
"h4",
|
|
3192
|
+
"h5",
|
|
3193
|
+
"h6",
|
|
3194
|
+
"head",
|
|
3195
|
+
"header",
|
|
3196
|
+
"hr",
|
|
3197
|
+
"i",
|
|
3198
|
+
"iframe",
|
|
3199
|
+
"img",
|
|
3200
|
+
"input",
|
|
3201
|
+
"ins",
|
|
3202
|
+
"kbd",
|
|
3203
|
+
"label",
|
|
3204
|
+
"legend",
|
|
3205
|
+
"li",
|
|
3206
|
+
"link",
|
|
3207
|
+
"main",
|
|
3208
|
+
"map",
|
|
3209
|
+
"mark",
|
|
3210
|
+
"meter",
|
|
3211
|
+
"nav",
|
|
3212
|
+
"noframes",
|
|
3213
|
+
"noscript",
|
|
3214
|
+
"object",
|
|
3215
|
+
"ol",
|
|
3216
|
+
"optgroup",
|
|
3217
|
+
"option",
|
|
3218
|
+
"output",
|
|
3219
|
+
"p",
|
|
3220
|
+
"param",
|
|
3221
|
+
"picture",
|
|
3222
|
+
"pre",
|
|
3223
|
+
"progress",
|
|
3224
|
+
"hgroup",
|
|
3225
|
+
"q",
|
|
3226
|
+
"rp",
|
|
3227
|
+
"rt",
|
|
3228
|
+
"ruby",
|
|
3229
|
+
"s",
|
|
3230
|
+
"samp",
|
|
3231
|
+
"script",
|
|
3232
|
+
"section",
|
|
3233
|
+
"select",
|
|
3234
|
+
"small",
|
|
3235
|
+
"source",
|
|
3236
|
+
"span",
|
|
3237
|
+
"strike",
|
|
3238
|
+
"strong",
|
|
3239
|
+
"sub",
|
|
3240
|
+
"summary",
|
|
3241
|
+
"sup",
|
|
3242
|
+
"table",
|
|
3243
|
+
"tbody",
|
|
3244
|
+
"td",
|
|
3245
|
+
"template",
|
|
3246
|
+
"hgroup",
|
|
3247
|
+
"textarea",
|
|
3248
|
+
"tfoot",
|
|
3249
|
+
"th",
|
|
3250
|
+
"thead",
|
|
3251
|
+
"time",
|
|
3252
|
+
"tr",
|
|
3253
|
+
"track",
|
|
3254
|
+
"tt",
|
|
3255
|
+
"u",
|
|
3256
|
+
"ul",
|
|
3257
|
+
"var",
|
|
3258
|
+
"video",
|
|
3259
|
+
"wbr",
|
|
3260
|
+
// SVG
|
|
3261
|
+
"svg",
|
|
3262
|
+
"path"
|
|
3263
|
+
]
|
|
3264
|
+
};
|
|
3265
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
2971
3266
|
}
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
3267
|
+
});
|
|
3268
|
+
var require_cjs3 = __commonJS2({
|
|
3269
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
3270
|
+
"use strict";
|
|
3271
|
+
var __defProp22 = Object.defineProperty;
|
|
3272
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3273
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3274
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3275
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3276
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3277
|
+
for (let key of __getOwnPropNames22(from))
|
|
3278
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3279
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2985
3280
|
}
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3281
|
+
return to;
|
|
3282
|
+
};
|
|
3283
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3284
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3285
|
+
var utils_exports2 = {};
|
|
3286
|
+
module2.exports = __toCommonJS22(utils_exports2);
|
|
3287
|
+
__reExport(utils_exports2, require_key2(), module2.exports);
|
|
3288
|
+
__reExport(utils_exports2, require_env2(), module2.exports);
|
|
3289
|
+
__reExport(utils_exports2, require_types2(), module2.exports);
|
|
3290
|
+
__reExport(utils_exports2, require_object2(), module2.exports);
|
|
3291
|
+
__reExport(utils_exports2, require_function2(), module2.exports);
|
|
3292
|
+
__reExport(utils_exports2, require_array2(), module2.exports);
|
|
3293
|
+
__reExport(utils_exports2, require_node2(), module2.exports);
|
|
3294
|
+
__reExport(utils_exports2, require_log2(), module2.exports);
|
|
3295
|
+
__reExport(utils_exports2, require_string2(), module2.exports);
|
|
3296
|
+
__reExport(utils_exports2, require_globals2(), module2.exports);
|
|
3297
|
+
__reExport(utils_exports2, require_cookie2(), module2.exports);
|
|
3298
|
+
__reExport(utils_exports2, require_tags2(), module2.exports);
|
|
2989
3299
|
}
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
3300
|
+
});
|
|
3301
|
+
var src_exports = {};
|
|
3302
|
+
__export2(src_exports, {
|
|
3303
|
+
arrayzeValue: () => arrayzeValue,
|
|
3304
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
3305
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3306
|
+
findClosestNumber: () => findClosestNumber,
|
|
3307
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3308
|
+
formatDate: () => formatDate,
|
|
3309
|
+
isPhoto: () => isPhoto,
|
|
3310
|
+
loadCssFile: () => loadCssFile,
|
|
3311
|
+
loadJavascript: () => loadJavascript,
|
|
3312
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
3313
|
+
removeChars: () => removeChars,
|
|
3314
|
+
toCamelCase: () => toCamelCase,
|
|
3315
|
+
toDashCase: () => toDashCase,
|
|
3316
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3317
|
+
toTitleCase: () => toTitleCase,
|
|
3318
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3319
|
+
});
|
|
3320
|
+
module.exports = __toCommonJS2(src_exports);
|
|
3321
|
+
var import_utils2 = __toESM2(require_cjs3(), 1);
|
|
3322
|
+
var toggleFullscreen = (el) => {
|
|
3323
|
+
if (!document.fullscreenElement) {
|
|
3324
|
+
el.node.requestFullscreen().catch((err) => {
|
|
3325
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3326
|
+
});
|
|
3327
|
+
} else {
|
|
3328
|
+
document.exitFullscreen();
|
|
2994
3329
|
}
|
|
2995
|
-
return [0, 0, 0, 0];
|
|
2996
3330
|
};
|
|
2997
|
-
var
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3331
|
+
var import_utils3 = __toESM2(require_cjs3(), 1);
|
|
3332
|
+
var findClosestNumber = (number, arr) => {
|
|
3333
|
+
return ((0, import_utils3.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3334
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3335
|
+
});
|
|
3001
3336
|
};
|
|
3002
|
-
var
|
|
3003
|
-
|
|
3004
|
-
|
|
3337
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3338
|
+
val = parseFloat(val);
|
|
3339
|
+
if ((0, import_utils3.isObject)(factory))
|
|
3340
|
+
factory = Object.values(factory);
|
|
3341
|
+
return findClosestNumber(val, factory);
|
|
3005
3342
|
};
|
|
3006
|
-
var
|
|
3007
|
-
|
|
3008
|
-
|
|
3343
|
+
var formatDate = (timestamp) => {
|
|
3344
|
+
if (!timestamp)
|
|
3345
|
+
return "";
|
|
3346
|
+
const d = new Date(timestamp);
|
|
3347
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3348
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3349
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3350
|
+
return `${da} ${mo}, ${ye}`;
|
|
3009
3351
|
};
|
|
3010
|
-
var
|
|
3011
|
-
|
|
3352
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3353
|
+
const fib = [0, 1];
|
|
3354
|
+
for (let i = 2; i <= n; i++) {
|
|
3355
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3356
|
+
}
|
|
3357
|
+
return fib[n];
|
|
3012
3358
|
};
|
|
3013
|
-
var
|
|
3014
|
-
return
|
|
3359
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3360
|
+
return new Promise((resolve, reject) => {
|
|
3361
|
+
try {
|
|
3362
|
+
const scriptEle = doc.createElement("script");
|
|
3363
|
+
scriptEle.type = type;
|
|
3364
|
+
scriptEle.async = async;
|
|
3365
|
+
scriptEle.src = FILE_URL;
|
|
3366
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
3367
|
+
resolve({
|
|
3368
|
+
status: true
|
|
3369
|
+
});
|
|
3370
|
+
});
|
|
3371
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
3372
|
+
reject({
|
|
3373
|
+
status: false,
|
|
3374
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
3375
|
+
});
|
|
3376
|
+
});
|
|
3377
|
+
doc.body.appendChild(scriptEle);
|
|
3378
|
+
} catch (error) {
|
|
3379
|
+
reject(error);
|
|
3380
|
+
}
|
|
3381
|
+
});
|
|
3015
3382
|
};
|
|
3016
|
-
var
|
|
3017
|
-
|
|
3018
|
-
|
|
3383
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3384
|
+
return new Promise((resolve, reject) => {
|
|
3385
|
+
try {
|
|
3386
|
+
const linkElem = doc.createElement("link");
|
|
3387
|
+
linkElem.rel = "stylesheet";
|
|
3388
|
+
linkElem.href = FILE_URL;
|
|
3389
|
+
linkElem.addEventListener("load", (ev) => {
|
|
3390
|
+
resolve({
|
|
3391
|
+
status: true
|
|
3392
|
+
});
|
|
3393
|
+
});
|
|
3394
|
+
doc.head.appendChild(linkElem);
|
|
3395
|
+
} catch (error) {
|
|
3396
|
+
reject(error);
|
|
3397
|
+
}
|
|
3398
|
+
});
|
|
3019
3399
|
};
|
|
3020
|
-
var
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3400
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3401
|
+
try {
|
|
3402
|
+
const scriptEle = doc.createElement("script");
|
|
3403
|
+
scriptEle.type = type;
|
|
3404
|
+
scriptEle.async = async;
|
|
3405
|
+
scriptEle.id = id;
|
|
3406
|
+
scriptEle.innerHTML = body;
|
|
3407
|
+
doc.body.appendChild(scriptEle);
|
|
3408
|
+
} catch (error) {
|
|
3409
|
+
console.warn(error);
|
|
3024
3410
|
}
|
|
3025
|
-
return `rgb(${arr})`;
|
|
3026
|
-
};
|
|
3027
|
-
var changeLightness = (delta, hsl) => {
|
|
3028
|
-
const [hue, saturation, lightness] = hsl;
|
|
3029
|
-
const newLightness = Math.max(
|
|
3030
|
-
0,
|
|
3031
|
-
Math.min(100, lightness + parseFloat(delta))
|
|
3032
|
-
);
|
|
3033
|
-
return [hue, saturation, newLightness];
|
|
3034
|
-
};
|
|
3035
|
-
var rgbToHSL = (r, g, b) => {
|
|
3036
|
-
const a = Math.max(r, g, b);
|
|
3037
|
-
const n = a - Math.min(r, g, b);
|
|
3038
|
-
const f = 1 - Math.abs(a + a - n - 1);
|
|
3039
|
-
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
3040
|
-
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
3041
3411
|
};
|
|
3042
|
-
var
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
r = 0;
|
|
3053
|
-
let b = (num >> 8 & 255) + amt;
|
|
3054
|
-
if (b > 255)
|
|
3055
|
-
b = 255;
|
|
3056
|
-
else if (b < 0)
|
|
3057
|
-
b = 0;
|
|
3058
|
-
let g = (num & 255) + amt;
|
|
3059
|
-
if (g > 255)
|
|
3060
|
-
g = 255;
|
|
3061
|
-
else if (g < 0)
|
|
3062
|
-
g = 0;
|
|
3063
|
-
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
3412
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3413
|
+
var copyStringToClipboard = (str) => {
|
|
3414
|
+
const el = document.createElement("textarea");
|
|
3415
|
+
el.value = str;
|
|
3416
|
+
el.setAttribute("readonly", "");
|
|
3417
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
3418
|
+
document.body.appendChild(el);
|
|
3419
|
+
el.select();
|
|
3420
|
+
document.execCommand("copy");
|
|
3421
|
+
document.body.removeChild(el);
|
|
3064
3422
|
};
|
|
3065
|
-
var
|
|
3066
|
-
|
|
3067
|
-
for (let i = 0; i < 4; i++) {
|
|
3068
|
-
const round = i === 3 ? (x) => x : Math.round;
|
|
3069
|
-
arr[i] = round(
|
|
3070
|
-
colorA[i] + (colorB[i] - colorA[i]) * range
|
|
3071
|
-
);
|
|
3072
|
-
}
|
|
3073
|
-
return `rgba(${arr})`;
|
|
3423
|
+
var removeChars = (str) => {
|
|
3424
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3074
3425
|
};
|
|
3075
|
-
var
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
console.warn(color + " color is not rgba");
|
|
3080
|
-
return;
|
|
3081
|
-
}
|
|
3082
|
-
arr[3] = opacity;
|
|
3083
|
-
return `rgba(${arr})`;
|
|
3426
|
+
var toCamelCase = (str) => {
|
|
3427
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3428
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3429
|
+
}).replaceAll(/\s+/g, "");
|
|
3084
3430
|
};
|
|
3085
|
-
var
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
3090
|
-
if ((0, import_utils.isNumber)(tone))
|
|
3091
|
-
tone += "";
|
|
3092
|
-
const toHex = rgbArrayToHex(rgb);
|
|
3093
|
-
const abs = tone.slice(0, 1);
|
|
3094
|
-
if (abs === "-" || abs === "+") {
|
|
3095
|
-
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
3096
|
-
return hexToRgbArray(colorShade).join(", ");
|
|
3097
|
-
} else {
|
|
3098
|
-
const [r, g, b] = rgb;
|
|
3099
|
-
const hsl = rgbToHSL(r, g, b);
|
|
3100
|
-
const [h, s, l] = hsl;
|
|
3101
|
-
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
3102
|
-
return newRgb;
|
|
3431
|
+
var toTitleCase = (str) => str && str.replace(
|
|
3432
|
+
/\w\S*/g,
|
|
3433
|
+
(txt) => {
|
|
3434
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3103
3435
|
}
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
if (!orig)
|
|
3436
|
+
);
|
|
3437
|
+
var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3438
|
+
var toDescriptionCase = (str = "") => {
|
|
3439
|
+
if (typeof str !== "string")
|
|
3109
3440
|
return;
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
if (orig[theme])
|
|
3113
|
-
return [orig, orig[theme]];
|
|
3114
|
-
return orig;
|
|
3115
|
-
};
|
|
3116
|
-
|
|
3117
|
-
// src/utils/font.js
|
|
3118
|
-
var getDefaultOrFirstKey = (LIBRARY, key) => {
|
|
3119
|
-
if (LIBRARY[key])
|
|
3120
|
-
return LIBRARY[key].value;
|
|
3121
|
-
if (LIBRARY.default)
|
|
3122
|
-
return LIBRARY[LIBRARY.default].value;
|
|
3123
|
-
const hasValue = Object.keys(LIBRARY)[0];
|
|
3124
|
-
return hasValue && LIBRARY[hasValue] && LIBRARY[hasValue].value;
|
|
3125
|
-
};
|
|
3126
|
-
var getFontFormat = (url) => url.split(/[#?]/)[0].split(".").pop().trim();
|
|
3127
|
-
var setInCustomFontMedia = (str) => `@font-face { ${str} }`;
|
|
3128
|
-
var setCustomFont = (name, url, weight) => `
|
|
3129
|
-
font-family: '${name}';
|
|
3130
|
-
font-style: normal;
|
|
3131
|
-
${weight && `font-weight: ${weight};`}
|
|
3132
|
-
src: url('${url}') format('${getFontFormat(url)}');`;
|
|
3133
|
-
var setCustomFontMedia = (name, url, weight) => `@font-face {
|
|
3134
|
-
${setCustomFont(name, url, weight)}
|
|
3135
|
-
}`;
|
|
3136
|
-
var getFontFaceEach = (name, weights) => {
|
|
3137
|
-
const keys = Object.keys(weights);
|
|
3138
|
-
return keys.map((key) => {
|
|
3139
|
-
const { url, fontWeight } = weights[key];
|
|
3140
|
-
return setCustomFont(name, url, fontWeight);
|
|
3141
|
-
});
|
|
3441
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
3442
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3142
3443
|
};
|
|
3143
|
-
var
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
};
|
|
3153
|
-
var getFontFaceString = (LIBRARY) => {
|
|
3154
|
-
const keys = Object.keys(LIBRARY);
|
|
3155
|
-
return keys.map((key) => getFontFaceEachString(key, LIBRARY[key].value));
|
|
3444
|
+
var arrayzeValue = (val) => {
|
|
3445
|
+
if ((0, import_utils2.isArray)(val))
|
|
3446
|
+
return val;
|
|
3447
|
+
if ((0, import_utils2.isString)(val))
|
|
3448
|
+
return val.split(" ");
|
|
3449
|
+
if ((0, import_utils2.isObject)(val))
|
|
3450
|
+
return Object.values(val);
|
|
3451
|
+
if ((0, import_utils2.isNumber)(val))
|
|
3452
|
+
return [val];
|
|
3156
3453
|
};
|
|
3157
3454
|
|
|
3158
|
-
// src/utils/sequence.js
|
|
3159
|
-
var import_utils3 = __toESM(require_cjs2(), 1);
|
|
3160
|
-
var import_utils4 = __toESM(require_cjs3(), 1);
|
|
3161
|
-
|
|
3162
3455
|
// src/factory.js
|
|
3163
|
-
var
|
|
3456
|
+
var import_utils4 = __toESM(require_cjs2(), 1);
|
|
3164
3457
|
|
|
3165
3458
|
// src/defaultConfig/index.js
|
|
3166
3459
|
var defaultConfig_exports = {};
|
|
@@ -3367,7 +3660,7 @@ var CONFIG = {
|
|
|
3367
3660
|
CSS_VARS,
|
|
3368
3661
|
...defaultConfig_exports
|
|
3369
3662
|
};
|
|
3370
|
-
var cachedConfig = (0,
|
|
3663
|
+
var cachedConfig = (0, import_utils4.deepClone)(CONFIG);
|
|
3371
3664
|
var FACTORY = {
|
|
3372
3665
|
active: "0",
|
|
3373
3666
|
0: CONFIG
|
|
@@ -3518,9 +3811,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3518
3811
|
unit = UNIT2.default,
|
|
3519
3812
|
useVariable
|
|
3520
3813
|
} = sequenceProps;
|
|
3521
|
-
if ((0,
|
|
3814
|
+
if ((0, import_utils5.isString)(value) && value.slice(0, 2) === "--")
|
|
3522
3815
|
return `var(${value})`;
|
|
3523
|
-
const prefix = `--${(0
|
|
3816
|
+
const prefix = `--${(void 0)(sequenceProps.type.replace(".", "-"))}-`;
|
|
3524
3817
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
3525
3818
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
3526
3819
|
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
|
|
@@ -3583,11 +3876,11 @@ var findHeadings = (propertyNames) => {
|
|
|
3583
3876
|
};
|
|
3584
3877
|
|
|
3585
3878
|
// src/utils/var.js
|
|
3586
|
-
var
|
|
3879
|
+
var import_utils7 = __toESM(require_cjs2(), 1);
|
|
3587
3880
|
var setVariables = (result, key) => {
|
|
3588
3881
|
const CONFIG2 = getActiveConfig();
|
|
3589
3882
|
const { CSS_VARS: CSS_VARS2 } = CONFIG2;
|
|
3590
|
-
if ((0,
|
|
3883
|
+
if ((0, import_utils7.isObjectLike)(result.value)) {
|
|
3591
3884
|
} else {
|
|
3592
3885
|
CSS_VARS2[result.var] = result.value;
|
|
3593
3886
|
}
|
|
@@ -3662,7 +3955,7 @@ var applyMediaSequenceVars = (FACTORY2, media, options = {}) => {
|
|
|
3662
3955
|
};
|
|
3663
3956
|
|
|
3664
3957
|
// src/utils/sprite.js
|
|
3665
|
-
var
|
|
3958
|
+
var import_utils8 = __toESM(require_cjs2(), 1);
|
|
3666
3959
|
var generateSprite = (icons) => {
|
|
3667
3960
|
const CONFIG2 = getActiveConfig();
|
|
3668
3961
|
let sprite = "";
|
|
@@ -3676,7 +3969,7 @@ var generateSprite = (icons) => {
|
|
|
3676
3969
|
return sprite;
|
|
3677
3970
|
};
|
|
3678
3971
|
var parseRootAttributes = (htmlString) => {
|
|
3679
|
-
if (!(0,
|
|
3972
|
+
if (!(0, import_utils8.isString)(htmlString)) {
|
|
3680
3973
|
return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
|
|
3681
3974
|
}
|
|
3682
3975
|
const match = htmlString.match(/<svg\s+(.*?)>/);
|
|
@@ -3696,7 +3989,7 @@ var replaceIdsAndUrls = (code, key) => {
|
|
|
3696
3989
|
const urlRegex = /url\(#([^)]*)\)/g;
|
|
3697
3990
|
const matches = code.match(/id="([^"]*)"/g);
|
|
3698
3991
|
let replacedCode = code;
|
|
3699
|
-
if ((0,
|
|
3992
|
+
if ((0, import_utils8.isArray)(matches)) {
|
|
3700
3993
|
matches.forEach(() => {
|
|
3701
3994
|
const randomKey = Math.floor(Math.random() * 1e5);
|
|
3702
3995
|
replacedCode = code.replace(idRegex, `id="${key}-${randomKey}"`).replace(urlRegex, `url(#${key}-${randomKey})`);
|