@symbo.ls/scratch 2.11.360 → 2.11.373

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/set.js CHANGED
@@ -205,32 +205,32 @@ var require_types = __commonJS({
205
205
  __export2(types_exports, {
206
206
  TYPES: () => TYPES,
207
207
  is: () => is,
208
- isArray: () => isArray9,
208
+ isArray: () => isArray7,
209
209
  isBoolean: () => isBoolean,
210
210
  isDate: () => isDate,
211
211
  isDefined: () => isDefined2,
212
212
  isFunction: () => isFunction2,
213
213
  isNot: () => isNot,
214
214
  isNull: () => isNull,
215
- isNumber: () => isNumber3,
216
- isObject: () => isObject8,
215
+ isNumber: () => isNumber2,
216
+ isObject: () => isObject6,
217
217
  isObjectLike: () => isObjectLike3,
218
- isString: () => isString9,
218
+ isString: () => isString8,
219
219
  isUndefined: () => isUndefined
220
220
  });
221
221
  module2.exports = __toCommonJS2(types_exports);
222
222
  var import_node = require_node();
223
- var isObject8 = (arg) => {
223
+ var isObject6 = (arg) => {
224
224
  if (arg === null)
225
225
  return false;
226
226
  return typeof arg === "object" && arg.constructor === Object;
227
227
  };
228
- var isString9 = (arg) => typeof arg === "string";
229
- var isNumber3 = (arg) => typeof arg === "number";
228
+ var isString8 = (arg) => typeof arg === "string";
229
+ var isNumber2 = (arg) => typeof arg === "number";
230
230
  var isFunction2 = (arg) => typeof arg === "function";
231
231
  var isBoolean = (arg) => arg === true || arg === false;
232
232
  var isNull = (arg) => arg === null;
233
- var isArray9 = (arg) => Array.isArray(arg);
233
+ var isArray7 = (arg) => Array.isArray(arg);
234
234
  var isDate = (d) => d instanceof Date;
235
235
  var isObjectLike3 = (arg) => {
236
236
  if (arg === null)
@@ -238,18 +238,18 @@ var require_types = __commonJS({
238
238
  return typeof arg === "object";
239
239
  };
240
240
  var isDefined2 = (arg) => {
241
- return isObject8(arg) || isObjectLike3(arg) || isString9(arg) || isNumber3(arg) || isFunction2(arg) || isArray9(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
241
+ return isObject6(arg) || isObjectLike3(arg) || isString8(arg) || isNumber2(arg) || isFunction2(arg) || isArray7(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
242
242
  };
243
243
  var isUndefined = (arg) => {
244
244
  return arg === void 0;
245
245
  };
246
246
  var TYPES = {
247
247
  boolean: isBoolean,
248
- array: isArray9,
249
- object: isObject8,
250
- string: isString9,
248
+ array: isArray7,
249
+ object: isObject6,
250
+ string: isString8,
251
251
  date: isDate,
252
- number: isNumber3,
252
+ number: isNumber2,
253
253
  null: isNull,
254
254
  function: isFunction2,
255
255
  objectLike: isObjectLike3,
@@ -297,6 +297,7 @@ var require_array = __commonJS({
297
297
  createNestedObject: () => createNestedObject,
298
298
  cutArrayAfterValue: () => cutArrayAfterValue,
299
299
  cutArrayBeforeValue: () => cutArrayBeforeValue,
300
+ getFrequencyInArray: () => getFrequencyInArray,
300
301
  joinArrays: () => joinArrays,
301
302
  mergeAndCloneIfArray: () => mergeAndCloneIfArray,
302
303
  mergeArray: () => mergeArray,
@@ -311,6 +312,11 @@ var require_array = __commonJS({
311
312
  var arrayContainsOtherArray = (arr1, arr2) => {
312
313
  return arr2.every((val) => arr1.includes(val));
313
314
  };
315
+ var getFrequencyInArray = (arr, value) => {
316
+ return arr.reduce((count, currentValue) => {
317
+ return currentValue === value ? count + 1 : count;
318
+ }, 0);
319
+ };
314
320
  var removeFromArray = (arr, index) => {
315
321
  if ((0, import_types.isString)(index))
316
322
  index = parseInt(index);
@@ -377,7 +383,7 @@ var require_array = __commonJS({
377
383
  newArray.splice(index, 1);
378
384
  return newArray;
379
385
  }
380
- return arr.slice();
386
+ return arr;
381
387
  };
382
388
  var removeValueFromArrayAll = (arr, value) => {
383
389
  return arr.filter((item) => item !== value);
@@ -725,7 +731,7 @@ var require_object = __commonJS({
725
731
  continue;
726
732
  const objProp = obj[prop];
727
733
  if ((0, import_types.isString)(objProp)) {
728
- if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
734
+ if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
729
735
  try {
730
736
  const evalProp = import_globals3.window.eval(`(${objProp})`);
731
737
  destringified[prop] = evalProp;
@@ -765,11 +771,11 @@ var require_object = __commonJS({
765
771
  }
766
772
  return destringified;
767
773
  };
768
- var stringToObject = (str, verbose) => {
774
+ var stringToObject = (str, opts = { verbose: true }) => {
769
775
  try {
770
776
  return import_globals3.window.eval("(" + str + ")");
771
777
  } catch (e) {
772
- if (verbose)
778
+ if (opts.verbose)
773
779
  console.warn(e);
774
780
  }
775
781
  };
@@ -1379,6 +1385,1454 @@ var require_cjs2 = __commonJS({
1379
1385
  }
1380
1386
  });
1381
1387
 
1388
+ // ../utils/dist/cjs/index.js
1389
+ var require_cjs3 = __commonJS({
1390
+ "../utils/dist/cjs/index.js"(exports, module2) {
1391
+ "use strict";
1392
+ var __create2 = Object.create;
1393
+ var __defProp2 = Object.defineProperty;
1394
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1395
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1396
+ var __getProtoOf2 = Object.getPrototypeOf;
1397
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1398
+ var __commonJS2 = (cb, mod) => function __require() {
1399
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
1400
+ };
1401
+ var __export2 = (target, all) => {
1402
+ for (var name in all)
1403
+ __defProp2(target, name, { get: all[name], enumerable: true });
1404
+ };
1405
+ var __copyProps2 = (to, from, except, desc) => {
1406
+ if (from && typeof from === "object" || typeof from === "function") {
1407
+ for (let key of __getOwnPropNames2(from))
1408
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1409
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1410
+ }
1411
+ return to;
1412
+ };
1413
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
1414
+ // If the importer is in node compatibility mode or this is not an ESM
1415
+ // file that has been converted to a CommonJS file using a Babel-
1416
+ // compatible transform (i.e. "__esModule" has not been set), then set
1417
+ // "default" to the CommonJS "module.exports" for node compatibility.
1418
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
1419
+ mod
1420
+ ));
1421
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1422
+ var require_key2 = __commonJS2({
1423
+ "../../node_modules/@domql/utils/dist/cjs/key.js"(exports2, module22) {
1424
+ "use strict";
1425
+ var __defProp22 = Object.defineProperty;
1426
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1427
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1428
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1429
+ var __export22 = (target, all) => {
1430
+ for (var name in all)
1431
+ __defProp22(target, name, { get: all[name], enumerable: true });
1432
+ };
1433
+ var __copyProps22 = (to, from, except, desc) => {
1434
+ if (from && typeof from === "object" || typeof from === "function") {
1435
+ for (let key of __getOwnPropNames22(from))
1436
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1437
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1438
+ }
1439
+ return to;
1440
+ };
1441
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1442
+ var key_exports = {};
1443
+ __export22(key_exports, {
1444
+ createSnapshotId: () => createSnapshotId,
1445
+ generateKey: () => generateKey
1446
+ });
1447
+ module22.exports = __toCommonJS22(key_exports);
1448
+ var generateKey = /* @__PURE__ */ function() {
1449
+ let index = 0;
1450
+ function newId() {
1451
+ index++;
1452
+ return index;
1453
+ }
1454
+ return newId;
1455
+ }();
1456
+ var createSnapshotId = generateKey;
1457
+ }
1458
+ });
1459
+ var require_env2 = __commonJS2({
1460
+ "../../node_modules/@domql/utils/dist/cjs/env.js"(exports2, module22) {
1461
+ "use strict";
1462
+ var __defProp22 = Object.defineProperty;
1463
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1464
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1465
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1466
+ var __export22 = (target, all) => {
1467
+ for (var name in all)
1468
+ __defProp22(target, name, { get: all[name], enumerable: true });
1469
+ };
1470
+ var __copyProps22 = (to, from, except, desc) => {
1471
+ if (from && typeof from === "object" || typeof from === "function") {
1472
+ for (let key of __getOwnPropNames22(from))
1473
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1474
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1475
+ }
1476
+ return to;
1477
+ };
1478
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1479
+ var env_exports = {};
1480
+ __export22(env_exports, {
1481
+ NODE_ENV: () => NODE_ENV,
1482
+ getNev: () => getNev,
1483
+ isDevelopment: () => isDevelopment,
1484
+ isProduction: () => isProduction,
1485
+ isTest: () => isTest
1486
+ });
1487
+ module22.exports = __toCommonJS22(env_exports);
1488
+ var NODE_ENV = "development";
1489
+ var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
1490
+ var isTest = (env = NODE_ENV) => env === "test";
1491
+ var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
1492
+ var getNev = (key, env = NODE_ENV) => env[key];
1493
+ }
1494
+ });
1495
+ var require_globals2 = __commonJS2({
1496
+ "../../node_modules/@domql/utils/dist/cjs/globals.js"(exports2, module22) {
1497
+ "use strict";
1498
+ var __defProp22 = Object.defineProperty;
1499
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1500
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1501
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1502
+ var __export22 = (target, all) => {
1503
+ for (var name in all)
1504
+ __defProp22(target, name, { get: all[name], enumerable: true });
1505
+ };
1506
+ var __copyProps22 = (to, from, except, desc) => {
1507
+ if (from && typeof from === "object" || typeof from === "function") {
1508
+ for (let key of __getOwnPropNames22(from))
1509
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1510
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1511
+ }
1512
+ return to;
1513
+ };
1514
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1515
+ var globals_exports = {};
1516
+ __export22(globals_exports, {
1517
+ document: () => document22,
1518
+ global: () => global,
1519
+ self: () => self,
1520
+ window: () => window2
1521
+ });
1522
+ module22.exports = __toCommonJS22(globals_exports);
1523
+ var global = globalThis;
1524
+ var self = globalThis;
1525
+ var window2 = globalThis;
1526
+ var document22 = window2.document;
1527
+ }
1528
+ });
1529
+ var require_node2 = __commonJS2({
1530
+ "../../node_modules/@domql/utils/dist/cjs/node.js"(exports2, module22) {
1531
+ "use strict";
1532
+ var __defProp22 = Object.defineProperty;
1533
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1534
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1535
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1536
+ var __export22 = (target, all) => {
1537
+ for (var name in all)
1538
+ __defProp22(target, name, { get: all[name], enumerable: true });
1539
+ };
1540
+ var __copyProps22 = (to, from, except, desc) => {
1541
+ if (from && typeof from === "object" || typeof from === "function") {
1542
+ for (let key of __getOwnPropNames22(from))
1543
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1544
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1545
+ }
1546
+ return to;
1547
+ };
1548
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1549
+ var node_exports = {};
1550
+ __export22(node_exports, {
1551
+ isHtmlElement: () => isHtmlElement,
1552
+ isNode: () => isNode
1553
+ });
1554
+ module22.exports = __toCommonJS22(node_exports);
1555
+ var import_globals3 = require_globals2();
1556
+ var isNode = (obj) => {
1557
+ return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
1558
+ };
1559
+ var isHtmlElement = (obj) => {
1560
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
1561
+ };
1562
+ }
1563
+ });
1564
+ var require_types2 = __commonJS2({
1565
+ "../../node_modules/@domql/utils/dist/cjs/types.js"(exports2, module22) {
1566
+ "use strict";
1567
+ var __defProp22 = Object.defineProperty;
1568
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1569
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1570
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1571
+ var __export22 = (target, all) => {
1572
+ for (var name in all)
1573
+ __defProp22(target, name, { get: all[name], enumerable: true });
1574
+ };
1575
+ var __copyProps22 = (to, from, except, desc) => {
1576
+ if (from && typeof from === "object" || typeof from === "function") {
1577
+ for (let key of __getOwnPropNames22(from))
1578
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1579
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1580
+ }
1581
+ return to;
1582
+ };
1583
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1584
+ var types_exports = {};
1585
+ __export22(types_exports, {
1586
+ TYPES: () => TYPES,
1587
+ is: () => is,
1588
+ isArray: () => isArray32,
1589
+ isBoolean: () => isBoolean,
1590
+ isDate: () => isDate,
1591
+ isDefined: () => isDefined2,
1592
+ isFunction: () => isFunction2,
1593
+ isNot: () => isNot,
1594
+ isNull: () => isNull,
1595
+ isNumber: () => isNumber2,
1596
+ isObject: () => isObject32,
1597
+ isObjectLike: () => isObjectLike3,
1598
+ isString: () => isString22,
1599
+ isUndefined: () => isUndefined
1600
+ });
1601
+ module22.exports = __toCommonJS22(types_exports);
1602
+ var import_node = require_node2();
1603
+ var isObject32 = (arg) => {
1604
+ if (arg === null)
1605
+ return false;
1606
+ return typeof arg === "object" && arg.constructor === Object;
1607
+ };
1608
+ var isString22 = (arg) => typeof arg === "string";
1609
+ var isNumber2 = (arg) => typeof arg === "number";
1610
+ var isFunction2 = (arg) => typeof arg === "function";
1611
+ var isBoolean = (arg) => arg === true || arg === false;
1612
+ var isNull = (arg) => arg === null;
1613
+ var isArray32 = (arg) => Array.isArray(arg);
1614
+ var isDate = (d) => d instanceof Date;
1615
+ var isObjectLike3 = (arg) => {
1616
+ if (arg === null)
1617
+ return false;
1618
+ return typeof arg === "object";
1619
+ };
1620
+ var isDefined2 = (arg) => {
1621
+ return isObject32(arg) || isObjectLike3(arg) || isString22(arg) || isNumber2(arg) || isFunction2(arg) || isArray32(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
1622
+ };
1623
+ var isUndefined = (arg) => {
1624
+ return arg === void 0;
1625
+ };
1626
+ var TYPES = {
1627
+ boolean: isBoolean,
1628
+ array: isArray32,
1629
+ object: isObject32,
1630
+ string: isString22,
1631
+ date: isDate,
1632
+ number: isNumber2,
1633
+ null: isNull,
1634
+ function: isFunction2,
1635
+ objectLike: isObjectLike3,
1636
+ node: import_node.isNode,
1637
+ htmlElement: import_node.isHtmlElement,
1638
+ defined: isDefined2
1639
+ };
1640
+ var is = (arg) => {
1641
+ return (...args) => {
1642
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
1643
+ };
1644
+ };
1645
+ var isNot = (arg) => {
1646
+ return (...args) => {
1647
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
1648
+ };
1649
+ };
1650
+ }
1651
+ });
1652
+ var require_array2 = __commonJS2({
1653
+ "../../node_modules/@domql/utils/dist/cjs/array.js"(exports2, module22) {
1654
+ "use strict";
1655
+ var __defProp22 = Object.defineProperty;
1656
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1657
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1658
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1659
+ var __export22 = (target, all) => {
1660
+ for (var name in all)
1661
+ __defProp22(target, name, { get: all[name], enumerable: true });
1662
+ };
1663
+ var __copyProps22 = (to, from, except, desc) => {
1664
+ if (from && typeof from === "object" || typeof from === "function") {
1665
+ for (let key of __getOwnPropNames22(from))
1666
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1667
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1668
+ }
1669
+ return to;
1670
+ };
1671
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1672
+ var array_exports = {};
1673
+ __export22(array_exports, {
1674
+ arrayContainsOtherArray: () => arrayContainsOtherArray,
1675
+ createNestedObject: () => createNestedObject,
1676
+ cutArrayAfterValue: () => cutArrayAfterValue,
1677
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
1678
+ getFrequencyInArray: () => getFrequencyInArray,
1679
+ joinArrays: () => joinArrays,
1680
+ mergeAndCloneIfArray: () => mergeAndCloneIfArray,
1681
+ mergeArray: () => mergeArray,
1682
+ removeFromArray: () => removeFromArray,
1683
+ removeValueFromArray: () => removeValueFromArray,
1684
+ removeValueFromArrayAll: () => removeValueFromArrayAll,
1685
+ swapItemsInArray: () => swapItemsInArray
1686
+ });
1687
+ module22.exports = __toCommonJS22(array_exports);
1688
+ var import_object = require_object2();
1689
+ var import_types = require_types2();
1690
+ var arrayContainsOtherArray = (arr1, arr2) => {
1691
+ return arr2.every((val) => arr1.includes(val));
1692
+ };
1693
+ var getFrequencyInArray = (arr, value) => {
1694
+ return arr.reduce((count, currentValue) => {
1695
+ return currentValue === value ? count + 1 : count;
1696
+ }, 0);
1697
+ };
1698
+ var removeFromArray = (arr, index) => {
1699
+ if ((0, import_types.isString)(index))
1700
+ index = parseInt(index);
1701
+ if ((0, import_types.isNumber)(index)) {
1702
+ if (index < 0 || index >= arr.length || isNaN(index)) {
1703
+ throw new Error("Invalid index");
1704
+ }
1705
+ arr.splice(index, 1);
1706
+ } else if ((0, import_types.isArray)(index)) {
1707
+ index.forEach((idx) => removeFromArray(arr, idx));
1708
+ } else {
1709
+ throw new Error("Invalid index");
1710
+ }
1711
+ return arr;
1712
+ };
1713
+ var swapItemsInArray = (arr, i, j) => {
1714
+ [arr[i], arr[j]] = [arr[j], arr[i]];
1715
+ };
1716
+ var joinArrays = (...arrays) => {
1717
+ return [].concat(...arrays);
1718
+ };
1719
+ var mergeArray = (arr, excludeFrom = []) => {
1720
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
1721
+ };
1722
+ var mergeAndCloneIfArray = (obj) => {
1723
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
1724
+ };
1725
+ var cutArrayBeforeValue = (arr, value) => {
1726
+ const index = arr.indexOf(value);
1727
+ if (index !== -1) {
1728
+ return arr.slice(0, index);
1729
+ }
1730
+ return arr;
1731
+ };
1732
+ var cutArrayAfterValue = (arr, value) => {
1733
+ if (!(0, import_types.isArray)(arr))
1734
+ return;
1735
+ const index = arr.indexOf(value);
1736
+ if (index !== -1) {
1737
+ return arr.slice(index + 1);
1738
+ }
1739
+ return arr;
1740
+ };
1741
+ var createNestedObject = (arr, lastValue) => {
1742
+ const nestedObject = {};
1743
+ if (arr.length === 0) {
1744
+ return lastValue;
1745
+ }
1746
+ arr.reduce((obj, value, index) => {
1747
+ if (!obj[value]) {
1748
+ obj[value] = {};
1749
+ }
1750
+ if (index === arr.length - 1 && lastValue) {
1751
+ obj[value] = lastValue;
1752
+ }
1753
+ return obj[value];
1754
+ }, nestedObject);
1755
+ return nestedObject;
1756
+ };
1757
+ var removeValueFromArray = (arr, value) => {
1758
+ const index = arr.indexOf(value);
1759
+ if (index > -1) {
1760
+ const newArray = [...arr];
1761
+ newArray.splice(index, 1);
1762
+ return newArray;
1763
+ }
1764
+ return arr;
1765
+ };
1766
+ var removeValueFromArrayAll = (arr, value) => {
1767
+ return arr.filter((item) => item !== value);
1768
+ };
1769
+ }
1770
+ });
1771
+ var require_string2 = __commonJS2({
1772
+ "../../node_modules/@domql/utils/dist/cjs/string.js"(exports2, module22) {
1773
+ "use strict";
1774
+ var __defProp22 = Object.defineProperty;
1775
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1776
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1777
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1778
+ var __export22 = (target, all) => {
1779
+ for (var name in all)
1780
+ __defProp22(target, name, { get: all[name], enumerable: true });
1781
+ };
1782
+ var __copyProps22 = (to, from, except, desc) => {
1783
+ if (from && typeof from === "object" || typeof from === "function") {
1784
+ for (let key of __getOwnPropNames22(from))
1785
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1786
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1787
+ }
1788
+ return to;
1789
+ };
1790
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1791
+ var string_exports = {};
1792
+ __export22(string_exports, {
1793
+ lowercaseFirstLetter: () => lowercaseFirstLetter,
1794
+ replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
1795
+ stringIncludesAny: () => stringIncludesAny,
1796
+ trimStringFromSymbols: () => trimStringFromSymbols
1797
+ });
1798
+ module22.exports = __toCommonJS22(string_exports);
1799
+ var stringIncludesAny = (str, characters) => {
1800
+ for (const char of characters) {
1801
+ if (str.includes(char)) {
1802
+ return true;
1803
+ }
1804
+ }
1805
+ return false;
1806
+ };
1807
+ var trimStringFromSymbols = (str, characters) => {
1808
+ const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
1809
+ return str.replace(pattern, "");
1810
+ };
1811
+ var brackRegex = {
1812
+ 2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
1813
+ 3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
1814
+ };
1815
+ var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
1816
+ if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
1817
+ return str;
1818
+ const reg = brackRegex[options.bracketsLength || 2];
1819
+ return str.replace(reg, (_, parentPath, variable) => {
1820
+ if (parentPath) {
1821
+ const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
1822
+ let parentState = state;
1823
+ for (let i = 0; i < parentLevels; i++) {
1824
+ parentState = parentState.parent;
1825
+ if (!parentState) {
1826
+ return "";
1827
+ }
1828
+ }
1829
+ const value = parentState[variable.trim()];
1830
+ return value !== void 0 ? `${value}` : "";
1831
+ } else {
1832
+ const value = state[variable.trim()];
1833
+ return value !== void 0 ? `${value}` : "";
1834
+ }
1835
+ });
1836
+ };
1837
+ var lowercaseFirstLetter = (inputString) => {
1838
+ return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
1839
+ };
1840
+ }
1841
+ });
1842
+ var require_object2 = __commonJS2({
1843
+ "../../node_modules/@domql/utils/dist/cjs/object.js"(exports2, module22) {
1844
+ "use strict";
1845
+ var __defProp22 = Object.defineProperty;
1846
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1847
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1848
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1849
+ var __export22 = (target, all) => {
1850
+ for (var name in all)
1851
+ __defProp22(target, name, { get: all[name], enumerable: true });
1852
+ };
1853
+ var __copyProps22 = (to, from, except, desc) => {
1854
+ if (from && typeof from === "object" || typeof from === "function") {
1855
+ for (let key of __getOwnPropNames22(from))
1856
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1857
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1858
+ }
1859
+ return to;
1860
+ };
1861
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1862
+ var object_exports = {};
1863
+ __export22(object_exports, {
1864
+ clone: () => clone,
1865
+ deepClone: () => deepClone2,
1866
+ deepCloneExclude: () => deepCloneExclude,
1867
+ deepCloneWithExtend: () => deepCloneWithExtend,
1868
+ deepContains: () => deepContains,
1869
+ deepDestringify: () => deepDestringify,
1870
+ deepDiff: () => deepDiff,
1871
+ deepMerge: () => deepMerge3,
1872
+ deepStringify: () => deepStringify,
1873
+ detachFunctionsFromObject: () => detachFunctionsFromObject,
1874
+ diff: () => diff,
1875
+ diffArrays: () => diffArrays,
1876
+ diffObjects: () => diffObjects,
1877
+ exec: () => exec,
1878
+ flattenRecursive: () => flattenRecursive,
1879
+ hasOwnProperty: () => hasOwnProperty,
1880
+ isEmpty: () => isEmpty,
1881
+ isEmptyObject: () => isEmptyObject,
1882
+ isEqualDeep: () => isEqualDeep,
1883
+ makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
1884
+ map: () => map,
1885
+ merge: () => merge5,
1886
+ mergeArrayExclude: () => mergeArrayExclude,
1887
+ mergeIfExisted: () => mergeIfExisted,
1888
+ objectToString: () => objectToString,
1889
+ overwrite: () => overwrite,
1890
+ overwriteDeep: () => overwriteDeep2,
1891
+ overwriteShallow: () => overwriteShallow,
1892
+ removeFromObject: () => removeFromObject,
1893
+ stringToObject: () => stringToObject
1894
+ });
1895
+ module22.exports = __toCommonJS22(object_exports);
1896
+ var import_globals3 = require_globals2();
1897
+ var import_types = require_types2();
1898
+ var import_array = require_array2();
1899
+ var import_string = require_string2();
1900
+ var exec = (param, element, state, context) => {
1901
+ if ((0, import_types.isFunction)(param)) {
1902
+ return param(
1903
+ element,
1904
+ state || element.state,
1905
+ context || element.context
1906
+ );
1907
+ }
1908
+ return param;
1909
+ };
1910
+ var map = (obj, extention, element) => {
1911
+ for (const e in extention) {
1912
+ obj[e] = exec(extention[e], element);
1913
+ }
1914
+ };
1915
+ var merge5 = (element, obj, excludeFrom = []) => {
1916
+ for (const e in obj) {
1917
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
1918
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
1919
+ continue;
1920
+ const elementProp = element[e];
1921
+ const objProp = obj[e];
1922
+ if (elementProp === void 0) {
1923
+ element[e] = objProp;
1924
+ }
1925
+ }
1926
+ return element;
1927
+ };
1928
+ var deepMerge3 = (element, extend, excludeFrom = []) => {
1929
+ for (const e in extend) {
1930
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
1931
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
1932
+ continue;
1933
+ const elementProp = element[e];
1934
+ const extendProp = extend[e];
1935
+ if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
1936
+ deepMerge3(elementProp, extendProp, excludeFrom);
1937
+ } else if (elementProp === void 0) {
1938
+ element[e] = extendProp;
1939
+ }
1940
+ }
1941
+ return element;
1942
+ };
1943
+ var clone = (obj, excludeFrom = []) => {
1944
+ const o = {};
1945
+ for (const prop in obj) {
1946
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
1947
+ if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
1948
+ continue;
1949
+ o[prop] = obj[prop];
1950
+ }
1951
+ return o;
1952
+ };
1953
+ var deepCloneExclude = (obj, excludeFrom = []) => {
1954
+ if ((0, import_types.isArray)(obj)) {
1955
+ return obj.map((x) => deepCloneExclude(x, excludeFrom));
1956
+ }
1957
+ const o = {};
1958
+ for (const k in obj) {
1959
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
1960
+ if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
1961
+ continue;
1962
+ let v = obj[k];
1963
+ if (k === "extend" && (0, import_types.isArray)(v)) {
1964
+ v = mergeArrayExclude(v, excludeFrom);
1965
+ }
1966
+ if ((0, import_types.isArray)(v)) {
1967
+ o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
1968
+ } else if ((0, import_types.isObject)(v)) {
1969
+ o[k] = deepCloneExclude(v, excludeFrom);
1970
+ } else
1971
+ o[k] = v;
1972
+ }
1973
+ return o;
1974
+ };
1975
+ var mergeArrayExclude = (arr, excl = []) => {
1976
+ return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
1977
+ };
1978
+ var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
1979
+ const o = (0, import_types.isArray)(obj) ? [] : {};
1980
+ for (const prop in obj) {
1981
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
1982
+ continue;
1983
+ if (prop === "__proto__")
1984
+ continue;
1985
+ if (excludeFrom.includes(prop) || prop.startsWith("__"))
1986
+ continue;
1987
+ let objProp = obj[prop];
1988
+ if (cleanUndefined && (0, import_types.isUndefined)(objProp))
1989
+ continue;
1990
+ if (prop === "extend" && (0, import_types.isArray)(objProp)) {
1991
+ objProp = (0, import_array.mergeArray)(objProp);
1992
+ }
1993
+ if ((0, import_types.isObjectLike)(objProp)) {
1994
+ o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
1995
+ } else
1996
+ o[prop] = objProp;
1997
+ }
1998
+ return o;
1999
+ };
2000
+ var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
2001
+ const o = (0, import_types.isArray)(obj) ? [] : {};
2002
+ for (const prop in obj) {
2003
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
2004
+ continue;
2005
+ const objProp = obj[prop];
2006
+ if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
2007
+ continue;
2008
+ if ((0, import_types.isObjectLike)(objProp)) {
2009
+ o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
2010
+ } else
2011
+ o[prop] = objProp;
2012
+ }
2013
+ return o;
2014
+ };
2015
+ var deepStringify = (obj, stringified = {}) => {
2016
+ for (const prop in obj) {
2017
+ const objProp = obj[prop];
2018
+ if ((0, import_types.isFunction)(objProp)) {
2019
+ stringified[prop] = objProp.toString();
2020
+ } else if ((0, import_types.isObject)(objProp)) {
2021
+ stringified[prop] = {};
2022
+ deepStringify(objProp, stringified[prop]);
2023
+ } else if ((0, import_types.isArray)(objProp)) {
2024
+ stringified[prop] = [];
2025
+ objProp.forEach((v, i) => {
2026
+ if ((0, import_types.isObject)(v)) {
2027
+ stringified[prop][i] = {};
2028
+ deepStringify(v, stringified[prop][i]);
2029
+ } else if ((0, import_types.isFunction)(v)) {
2030
+ stringified[prop][i] = v.toString();
2031
+ } else {
2032
+ stringified[prop][i] = v;
2033
+ }
2034
+ });
2035
+ } else {
2036
+ stringified[prop] = objProp;
2037
+ }
2038
+ }
2039
+ return stringified;
2040
+ };
2041
+ var objectToString = (obj, indent = 0) => {
2042
+ const spaces = " ".repeat(indent);
2043
+ let str = "{\n";
2044
+ for (const [key, value] of Object.entries(obj)) {
2045
+ const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
2046
+ const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
2047
+ str += `${spaces} ${stringedKey}: `;
2048
+ if ((0, import_types.isArray)(value)) {
2049
+ str += "[\n";
2050
+ for (const element of value) {
2051
+ if ((0, import_types.isObject)(element) && element !== null) {
2052
+ str += `${spaces} ${objectToString(element, indent + 2)},
2053
+ `;
2054
+ } else if ((0, import_types.isString)(element)) {
2055
+ str += `${spaces} '${element}',
2056
+ `;
2057
+ } else {
2058
+ str += `${spaces} ${element},
2059
+ `;
2060
+ }
2061
+ }
2062
+ str += `${spaces} ]`;
2063
+ } else if ((0, import_types.isObjectLike)(value)) {
2064
+ str += objectToString(value, indent + 1);
2065
+ } else if ((0, import_types.isString)(value)) {
2066
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
2067
+ } else {
2068
+ str += value;
2069
+ }
2070
+ str += ",\n";
2071
+ }
2072
+ str += `${spaces}}`;
2073
+ return str;
2074
+ };
2075
+ var detachFunctionsFromObject = (obj, detached = {}) => {
2076
+ for (const prop in obj) {
2077
+ const objProp = obj[prop];
2078
+ if ((0, import_types.isFunction)(objProp))
2079
+ continue;
2080
+ else if ((0, import_types.isObject)(objProp)) {
2081
+ detached[prop] = {};
2082
+ deepStringify(objProp, detached[prop]);
2083
+ } else if ((0, import_types.isArray)(objProp)) {
2084
+ detached[prop] = [];
2085
+ objProp.forEach((v, i) => {
2086
+ if ((0, import_types.isFunction)(v))
2087
+ return;
2088
+ if ((0, import_types.isObject)(v)) {
2089
+ detached[prop][i] = {};
2090
+ detachFunctionsFromObject(v, detached[prop][i]);
2091
+ } else {
2092
+ detached[prop][i] = v;
2093
+ }
2094
+ });
2095
+ } else {
2096
+ detached[prop] = objProp;
2097
+ }
2098
+ }
2099
+ return detached;
2100
+ };
2101
+ var deepDestringify = (obj, destringified = {}) => {
2102
+ for (const prop in obj) {
2103
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
2104
+ if (!hasOwnProperty2)
2105
+ continue;
2106
+ const objProp = obj[prop];
2107
+ if ((0, import_types.isString)(objProp)) {
2108
+ if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2109
+ try {
2110
+ const evalProp = import_globals3.window.eval(`(${objProp})`);
2111
+ destringified[prop] = evalProp;
2112
+ } catch (e) {
2113
+ if (e)
2114
+ destringified[prop] = objProp;
2115
+ }
2116
+ } else {
2117
+ destringified[prop] = objProp;
2118
+ }
2119
+ } else if ((0, import_types.isArray)(objProp)) {
2120
+ destringified[prop] = [];
2121
+ objProp.forEach((arrProp) => {
2122
+ if ((0, import_types.isString)(arrProp)) {
2123
+ if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
2124
+ try {
2125
+ const evalProp = import_globals3.window.eval(`(${arrProp})`);
2126
+ destringified[prop].push(evalProp);
2127
+ } catch (e) {
2128
+ if (e)
2129
+ destringified[prop].push(arrProp);
2130
+ }
2131
+ } else {
2132
+ destringified[prop].push(arrProp);
2133
+ }
2134
+ } else if ((0, import_types.isObject)(arrProp)) {
2135
+ destringified[prop].push(deepDestringify(arrProp));
2136
+ } else {
2137
+ destringified[prop].push(arrProp);
2138
+ }
2139
+ });
2140
+ } else if ((0, import_types.isObject)(objProp)) {
2141
+ destringified[prop] = deepDestringify(objProp, destringified[prop]);
2142
+ } else {
2143
+ destringified[prop] = objProp;
2144
+ }
2145
+ }
2146
+ return destringified;
2147
+ };
2148
+ var stringToObject = (str, opts = { verbose: true }) => {
2149
+ try {
2150
+ return import_globals3.window.eval("(" + str + ")");
2151
+ } catch (e) {
2152
+ if (opts.verbose)
2153
+ console.warn(e);
2154
+ }
2155
+ };
2156
+ var diffObjects = (original, objToDiff, cache) => {
2157
+ for (const e in objToDiff) {
2158
+ if (e === "ref")
2159
+ continue;
2160
+ const originalProp = original[e];
2161
+ const objToDiffProp = objToDiff[e];
2162
+ if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
2163
+ cache[e] = {};
2164
+ diff(originalProp, objToDiffProp, cache[e]);
2165
+ } else if (objToDiffProp !== void 0) {
2166
+ cache[e] = objToDiffProp;
2167
+ }
2168
+ }
2169
+ return cache;
2170
+ };
2171
+ var diffArrays = (original, objToDiff, cache) => {
2172
+ if (original.length !== objToDiff.length) {
2173
+ cache = objToDiff;
2174
+ } else {
2175
+ const diffArr = [];
2176
+ for (let i = 0; i < original.length; i++) {
2177
+ const diffObj = diff(original[i], objToDiff[i]);
2178
+ if (Object.keys(diffObj).length > 0) {
2179
+ diffArr.push(diffObj);
2180
+ }
2181
+ }
2182
+ if (diffArr.length > 0) {
2183
+ cache = diffArr;
2184
+ }
2185
+ }
2186
+ return cache;
2187
+ };
2188
+ var diff = (original, objToDiff, cache = {}) => {
2189
+ if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
2190
+ cache = [];
2191
+ diffArrays(original, objToDiff, cache);
2192
+ } else {
2193
+ diffObjects(original, objToDiff, cache);
2194
+ }
2195
+ return cache;
2196
+ };
2197
+ var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
2198
+ var isEmpty = (o) => Object.keys(o).length === 0;
2199
+ var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
2200
+ var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
2201
+ var deepDiff = (lhs, rhs) => {
2202
+ if (lhs === rhs)
2203
+ return {};
2204
+ if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
2205
+ return rhs;
2206
+ const deletedValues = Object.keys(lhs).reduce((acc, key) => {
2207
+ if (!hasOwnProperty(rhs, key)) {
2208
+ acc[key] = void 0;
2209
+ }
2210
+ return acc;
2211
+ }, makeObjectWithoutPrototype());
2212
+ if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
2213
+ if (lhs.valueOf() === rhs.valueOf())
2214
+ return {};
2215
+ return rhs;
2216
+ }
2217
+ return Object.keys(rhs).reduce((acc, key) => {
2218
+ if (!hasOwnProperty(lhs, key)) {
2219
+ acc[key] = rhs[key];
2220
+ return acc;
2221
+ }
2222
+ const difference = diff(lhs[key], rhs[key]);
2223
+ if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
2224
+ return acc;
2225
+ }
2226
+ acc[key] = difference;
2227
+ return acc;
2228
+ }, deletedValues);
2229
+ };
2230
+ var overwrite = (element, params, excludeFrom = []) => {
2231
+ const { ref } = element;
2232
+ const changes = {};
2233
+ for (const e in params) {
2234
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2235
+ continue;
2236
+ const elementProp = element[e];
2237
+ const paramsProp = params[e];
2238
+ if (paramsProp) {
2239
+ ref.__cache[e] = changes[e] = elementProp;
2240
+ ref[e] = paramsProp;
2241
+ }
2242
+ }
2243
+ return changes;
2244
+ };
2245
+ var overwriteShallow = (obj, params, excludeFrom = []) => {
2246
+ for (const e in params) {
2247
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2248
+ continue;
2249
+ obj[e] = params[e];
2250
+ }
2251
+ return obj;
2252
+ };
2253
+ var overwriteDeep2 = (obj, params, excludeFrom = []) => {
2254
+ for (const e in params) {
2255
+ if (e === "__proto__")
2256
+ continue;
2257
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2258
+ continue;
2259
+ const objProp = obj[e];
2260
+ const paramsProp = params[e];
2261
+ if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
2262
+ overwriteDeep2(objProp, paramsProp);
2263
+ } else if (paramsProp !== void 0) {
2264
+ obj[e] = paramsProp;
2265
+ }
2266
+ }
2267
+ return obj;
2268
+ };
2269
+ var mergeIfExisted = (a, b) => {
2270
+ if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
2271
+ return deepMerge3(a, b);
2272
+ return a || b;
2273
+ };
2274
+ var flattenRecursive = (param, prop, stack = []) => {
2275
+ const objectized = (0, import_array.mergeAndCloneIfArray)(param);
2276
+ stack.push(objectized);
2277
+ const extendOfExtend = objectized[prop];
2278
+ if (extendOfExtend)
2279
+ flattenRecursive(extendOfExtend, prop, stack);
2280
+ delete objectized[prop];
2281
+ return stack;
2282
+ };
2283
+ var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
2284
+ if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
2285
+ return param === element;
2286
+ }
2287
+ if (visited.has(param) || visited.has(element)) {
2288
+ return true;
2289
+ }
2290
+ visited.add(param);
2291
+ visited.add(element);
2292
+ const keysParam = Object.keys(param);
2293
+ const keysElement = Object.keys(element);
2294
+ if (keysParam.length !== keysElement.length) {
2295
+ return false;
2296
+ }
2297
+ for (const key of keysParam) {
2298
+ if (!keysElement.includes(key)) {
2299
+ return false;
2300
+ }
2301
+ const paramProp = param[key];
2302
+ const elementProp = element[key];
2303
+ if (!isEqualDeep(paramProp, elementProp, visited)) {
2304
+ return false;
2305
+ }
2306
+ }
2307
+ return true;
2308
+ };
2309
+ var deepContains = (obj1, obj2) => {
2310
+ if (typeof obj1 !== typeof obj2) {
2311
+ return false;
2312
+ }
2313
+ if ((0, import_types.isObjectLike)(obj1)) {
2314
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
2315
+ if (obj1.length !== obj2.length) {
2316
+ return false;
2317
+ }
2318
+ for (let i = 0; i < obj1.length; i++) {
2319
+ if (!deepContains(obj1[i], obj2[i])) {
2320
+ return false;
2321
+ }
2322
+ }
2323
+ } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
2324
+ for (const key in obj1) {
2325
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
2326
+ if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
2327
+ return false;
2328
+ }
2329
+ }
2330
+ }
2331
+ } else {
2332
+ return obj2 === obj1;
2333
+ }
2334
+ return true;
2335
+ };
2336
+ var removeFromObject = (obj, props) => {
2337
+ if (props === void 0 || props === null)
2338
+ return obj;
2339
+ if ((0, import_types.is)(props)("string", "number")) {
2340
+ delete obj[props];
2341
+ } else if ((0, import_types.isArray)(props)) {
2342
+ props.forEach((prop) => delete obj[prop]);
2343
+ } else {
2344
+ throw new Error("Invalid input: props must be a string or an array of strings");
2345
+ }
2346
+ return obj;
2347
+ };
2348
+ }
2349
+ });
2350
+ var require_function2 = __commonJS2({
2351
+ "../../node_modules/@domql/utils/dist/cjs/function.js"(exports2, module22) {
2352
+ "use strict";
2353
+ var __defProp22 = Object.defineProperty;
2354
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2355
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2356
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2357
+ var __export22 = (target, all) => {
2358
+ for (var name in all)
2359
+ __defProp22(target, name, { get: all[name], enumerable: true });
2360
+ };
2361
+ var __copyProps22 = (to, from, except, desc) => {
2362
+ if (from && typeof from === "object" || typeof from === "function") {
2363
+ for (let key of __getOwnPropNames22(from))
2364
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2365
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2366
+ }
2367
+ return to;
2368
+ };
2369
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2370
+ var function_exports = {};
2371
+ __export22(function_exports, {
2372
+ debounce: () => debounce,
2373
+ debounceOnContext: () => debounceOnContext,
2374
+ isStringFunction: () => isStringFunction,
2375
+ memoize: () => memoize
2376
+ });
2377
+ module22.exports = __toCommonJS22(function_exports);
2378
+ function debounce(func, wait, immediate) {
2379
+ let timeout;
2380
+ return function() {
2381
+ const context = this;
2382
+ const args = arguments;
2383
+ const later = function() {
2384
+ timeout = null;
2385
+ if (!immediate)
2386
+ func.apply(context, args);
2387
+ };
2388
+ const callNow = immediate && !timeout;
2389
+ clearTimeout(timeout);
2390
+ timeout = setTimeout(later, wait);
2391
+ if (callNow)
2392
+ func.apply(context, args);
2393
+ };
2394
+ }
2395
+ var debounceOnContext = (element, func, timeout = 300) => {
2396
+ let timer;
2397
+ return (...args) => {
2398
+ clearTimeout(timer);
2399
+ timer = setTimeout(() => {
2400
+ func.apply(element, args);
2401
+ }, timeout);
2402
+ };
2403
+ };
2404
+ var memoize = (fn) => {
2405
+ const cache = {};
2406
+ return (...args) => {
2407
+ const n = args[0];
2408
+ if (n in cache) {
2409
+ return cache[n];
2410
+ } else {
2411
+ const result = fn(n);
2412
+ cache[n] = result;
2413
+ return result;
2414
+ }
2415
+ };
2416
+ };
2417
+ var isStringFunction = (inputString) => {
2418
+ const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
2419
+ return functionRegex.test(inputString);
2420
+ };
2421
+ }
2422
+ });
2423
+ var require_log2 = __commonJS2({
2424
+ "../../node_modules/@domql/utils/dist/cjs/log.js"(exports2, module22) {
2425
+ "use strict";
2426
+ var __defProp22 = Object.defineProperty;
2427
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2428
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2429
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2430
+ var __export22 = (target, all) => {
2431
+ for (var name in all)
2432
+ __defProp22(target, name, { get: all[name], enumerable: true });
2433
+ };
2434
+ var __copyProps22 = (to, from, except, desc) => {
2435
+ if (from && typeof from === "object" || typeof from === "function") {
2436
+ for (let key of __getOwnPropNames22(from))
2437
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2438
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2439
+ }
2440
+ return to;
2441
+ };
2442
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2443
+ var log_exports = {};
2444
+ __export22(log_exports, {
2445
+ logGroupIf: () => logGroupIf,
2446
+ logIf: () => logIf
2447
+ });
2448
+ module22.exports = __toCommonJS22(log_exports);
2449
+ var logIf = (bool, ...arg) => {
2450
+ if (bool)
2451
+ arg.map((v) => console.log(v));
2452
+ };
2453
+ var logGroupIf = (bool, key, ...arg) => {
2454
+ if (bool) {
2455
+ console.group(key);
2456
+ arg.map((v) => console.log(v));
2457
+ console.groupEnd(key);
2458
+ }
2459
+ };
2460
+ }
2461
+ });
2462
+ var require_cookie2 = __commonJS2({
2463
+ "../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports2, module22) {
2464
+ "use strict";
2465
+ var __defProp22 = Object.defineProperty;
2466
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2467
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2468
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2469
+ var __export22 = (target, all) => {
2470
+ for (var name in all)
2471
+ __defProp22(target, name, { get: all[name], enumerable: true });
2472
+ };
2473
+ var __copyProps22 = (to, from, except, desc) => {
2474
+ if (from && typeof from === "object" || typeof from === "function") {
2475
+ for (let key of __getOwnPropNames22(from))
2476
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2477
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2478
+ }
2479
+ return to;
2480
+ };
2481
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2482
+ var cookie_exports = {};
2483
+ __export22(cookie_exports, {
2484
+ getCookie: () => getCookie,
2485
+ isMobile: () => isMobile,
2486
+ setCookie: () => setCookie
2487
+ });
2488
+ module22.exports = __toCommonJS22(cookie_exports);
2489
+ var import_types = require_types2();
2490
+ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
2491
+ var setCookie = (cname, cvalue, exdays = 365) => {
2492
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2493
+ return;
2494
+ const d = /* @__PURE__ */ new Date();
2495
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
2496
+ const expires = `expires=${d.toUTCString()}`;
2497
+ document.cookie = `${cname}=${cvalue};${expires};path=/`;
2498
+ };
2499
+ var getCookie = (cname) => {
2500
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2501
+ return;
2502
+ const name = `${cname}=`;
2503
+ const decodedCookie = decodeURIComponent(document.cookie);
2504
+ const ca = decodedCookie.split(";");
2505
+ for (let i = 0; i < ca.length; i++) {
2506
+ let c = ca[i];
2507
+ while (c.charAt(0) === " ")
2508
+ c = c.substring(1);
2509
+ if (c.indexOf(name) === 0)
2510
+ return c.substring(name.length, c.length);
2511
+ }
2512
+ return "";
2513
+ };
2514
+ }
2515
+ });
2516
+ var require_tags2 = __commonJS2({
2517
+ "../../node_modules/@domql/utils/dist/cjs/tags.js"(exports2, module22) {
2518
+ "use strict";
2519
+ var __defProp22 = Object.defineProperty;
2520
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2521
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2522
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2523
+ var __export22 = (target, all) => {
2524
+ for (var name in all)
2525
+ __defProp22(target, name, { get: all[name], enumerable: true });
2526
+ };
2527
+ var __copyProps22 = (to, from, except, desc) => {
2528
+ if (from && typeof from === "object" || typeof from === "function") {
2529
+ for (let key of __getOwnPropNames22(from))
2530
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2531
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2532
+ }
2533
+ return to;
2534
+ };
2535
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2536
+ var tags_exports = {};
2537
+ __export22(tags_exports, {
2538
+ HTML_TAGS: () => HTML_TAGS,
2539
+ isValidHtmlTag: () => isValidHtmlTag
2540
+ });
2541
+ module22.exports = __toCommonJS22(tags_exports);
2542
+ var HTML_TAGS = {
2543
+ root: [
2544
+ "body",
2545
+ "html"
2546
+ ],
2547
+ head: [
2548
+ "title",
2549
+ "base",
2550
+ "meta",
2551
+ "style"
2552
+ ],
2553
+ body: [
2554
+ "string",
2555
+ "fragment",
2556
+ "a",
2557
+ "abbr",
2558
+ "acronym",
2559
+ "address",
2560
+ "applet",
2561
+ "area",
2562
+ "article",
2563
+ "aside",
2564
+ "audio",
2565
+ "b",
2566
+ "basefont",
2567
+ "bdi",
2568
+ "bdo",
2569
+ "big",
2570
+ "blockquote",
2571
+ "br",
2572
+ "button",
2573
+ "canvas",
2574
+ "caption",
2575
+ "center",
2576
+ "cite",
2577
+ "code",
2578
+ "search",
2579
+ "col",
2580
+ "colgroup",
2581
+ "data",
2582
+ "datalist",
2583
+ "dd",
2584
+ "del",
2585
+ "details",
2586
+ "dfn",
2587
+ "dialog",
2588
+ "dir",
2589
+ "div",
2590
+ "dl",
2591
+ "dt",
2592
+ "em",
2593
+ "embed",
2594
+ "fieldset",
2595
+ "figcaption",
2596
+ "figure",
2597
+ "font",
2598
+ "footer",
2599
+ "form",
2600
+ "frame",
2601
+ "frameset",
2602
+ "h1",
2603
+ "h2",
2604
+ "h3",
2605
+ "h4",
2606
+ "h5",
2607
+ "h6",
2608
+ "head",
2609
+ "header",
2610
+ "hr",
2611
+ "i",
2612
+ "iframe",
2613
+ "img",
2614
+ "input",
2615
+ "ins",
2616
+ "kbd",
2617
+ "label",
2618
+ "legend",
2619
+ "li",
2620
+ "link",
2621
+ "main",
2622
+ "map",
2623
+ "mark",
2624
+ "meter",
2625
+ "nav",
2626
+ "noframes",
2627
+ "noscript",
2628
+ "object",
2629
+ "ol",
2630
+ "optgroup",
2631
+ "option",
2632
+ "output",
2633
+ "p",
2634
+ "param",
2635
+ "picture",
2636
+ "pre",
2637
+ "progress",
2638
+ "hgroup",
2639
+ "q",
2640
+ "rp",
2641
+ "rt",
2642
+ "ruby",
2643
+ "s",
2644
+ "samp",
2645
+ "script",
2646
+ "section",
2647
+ "select",
2648
+ "small",
2649
+ "source",
2650
+ "span",
2651
+ "strike",
2652
+ "strong",
2653
+ "sub",
2654
+ "summary",
2655
+ "sup",
2656
+ "table",
2657
+ "tbody",
2658
+ "td",
2659
+ "template",
2660
+ "hgroup",
2661
+ "textarea",
2662
+ "tfoot",
2663
+ "th",
2664
+ "thead",
2665
+ "time",
2666
+ "tr",
2667
+ "track",
2668
+ "tt",
2669
+ "u",
2670
+ "ul",
2671
+ "var",
2672
+ "video",
2673
+ "wbr",
2674
+ // SVG
2675
+ "svg",
2676
+ "path"
2677
+ ]
2678
+ };
2679
+ var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
2680
+ }
2681
+ });
2682
+ var require_cjs4 = __commonJS2({
2683
+ "../../node_modules/@domql/utils/dist/cjs/index.js"(exports2, module22) {
2684
+ "use strict";
2685
+ var __defProp22 = Object.defineProperty;
2686
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2687
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2688
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2689
+ var __copyProps22 = (to, from, except, desc) => {
2690
+ if (from && typeof from === "object" || typeof from === "function") {
2691
+ for (let key of __getOwnPropNames22(from))
2692
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2693
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2694
+ }
2695
+ return to;
2696
+ };
2697
+ var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
2698
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2699
+ var utils_exports = {};
2700
+ module22.exports = __toCommonJS22(utils_exports);
2701
+ __reExport(utils_exports, require_key2(), module22.exports);
2702
+ __reExport(utils_exports, require_env2(), module22.exports);
2703
+ __reExport(utils_exports, require_types2(), module22.exports);
2704
+ __reExport(utils_exports, require_object2(), module22.exports);
2705
+ __reExport(utils_exports, require_function2(), module22.exports);
2706
+ __reExport(utils_exports, require_array2(), module22.exports);
2707
+ __reExport(utils_exports, require_node2(), module22.exports);
2708
+ __reExport(utils_exports, require_log2(), module22.exports);
2709
+ __reExport(utils_exports, require_string2(), module22.exports);
2710
+ __reExport(utils_exports, require_globals2(), module22.exports);
2711
+ __reExport(utils_exports, require_cookie2(), module22.exports);
2712
+ __reExport(utils_exports, require_tags2(), module22.exports);
2713
+ }
2714
+ });
2715
+ var src_exports = {};
2716
+ __export2(src_exports, {
2717
+ arrayzeValue: () => arrayzeValue3,
2718
+ copyStringToClipboard: () => copyStringToClipboard,
2719
+ fibonacciNumberByIndex: () => fibonacciNumberByIndex,
2720
+ findClosestNumber: () => findClosestNumber,
2721
+ findClosestNumberInFactory: () => findClosestNumberInFactory,
2722
+ formatDate: () => formatDate,
2723
+ loadJavascriptFile: () => loadJavascriptFile,
2724
+ removeChars: () => removeChars,
2725
+ toCamelCase: () => toCamelCase2,
2726
+ toDashCase: () => toDashCase2,
2727
+ toDescriptionCase: () => toDescriptionCase,
2728
+ toTitleCase: () => toTitleCase,
2729
+ toggleFullscreen: () => toggleFullscreen
2730
+ });
2731
+ module2.exports = __toCommonJS2(src_exports);
2732
+ var import_utils26 = __toESM2(require_cjs4(), 1);
2733
+ var toggleFullscreen = (el) => {
2734
+ if (!document.fullscreenElement) {
2735
+ el.node.requestFullscreen().catch((err) => {
2736
+ console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
2737
+ });
2738
+ } else {
2739
+ document.exitFullscreen();
2740
+ }
2741
+ };
2742
+ var import_utils27 = __toESM2(require_cjs4(), 1);
2743
+ var findClosestNumber = (number, arr) => {
2744
+ return ((0, import_utils27.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
2745
+ return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
2746
+ });
2747
+ };
2748
+ var findClosestNumberInFactory = (val, factory) => {
2749
+ val = parseFloat(val);
2750
+ if ((0, import_utils27.isObject)(factory))
2751
+ factory = Object.values(factory);
2752
+ return findClosestNumber(val, factory);
2753
+ };
2754
+ var formatDate = (timestamp) => {
2755
+ if (!timestamp)
2756
+ return "";
2757
+ const d = new Date(timestamp);
2758
+ const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
2759
+ const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
2760
+ const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
2761
+ return `${da} ${mo}, ${ye}`;
2762
+ };
2763
+ var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
2764
+ const fib = [0, 1];
2765
+ for (let i = 2; i <= n; i++) {
2766
+ fib[i] = fib[i - 1] + fib[i - 2];
2767
+ }
2768
+ return fib[n];
2769
+ };
2770
+ var loadJavascriptFile = (FILE_URL, async = true, doc = document, type = "text/javascript") => {
2771
+ return new Promise((resolve, reject) => {
2772
+ try {
2773
+ const scriptEle = doc.createElement("script");
2774
+ scriptEle.type = type;
2775
+ scriptEle.async = async;
2776
+ scriptEle.src = FILE_URL;
2777
+ scriptEle.addEventListener("load", (ev) => {
2778
+ resolve({
2779
+ status: true
2780
+ });
2781
+ });
2782
+ scriptEle.addEventListener("error", (ev) => {
2783
+ reject({
2784
+ status: false,
2785
+ message: `Failed to load the script ${FILE_URL}`
2786
+ });
2787
+ });
2788
+ doc.body.appendChild(scriptEle);
2789
+ } catch (error) {
2790
+ reject(error);
2791
+ }
2792
+ });
2793
+ };
2794
+ var copyStringToClipboard = (str) => {
2795
+ const el = document.createElement("textarea");
2796
+ el.value = str;
2797
+ el.setAttribute("readonly", "");
2798
+ el.style = { position: "absolute", left: "-9999px" };
2799
+ document.body.appendChild(el);
2800
+ el.select();
2801
+ document.execCommand("copy");
2802
+ document.body.removeChild(el);
2803
+ };
2804
+ var removeChars = (str) => {
2805
+ return str.replace(/[^a-zA-Z0-9_]/g, "");
2806
+ };
2807
+ var toCamelCase2 = (str) => {
2808
+ return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
2809
+ return index === 0 ? word.toLowerCase() : word.toUpperCase();
2810
+ }).replaceAll(/\s+/g, "");
2811
+ };
2812
+ var toTitleCase = (str) => str && str.replace(
2813
+ /\w\S*/g,
2814
+ (txt) => {
2815
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
2816
+ }
2817
+ );
2818
+ var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
2819
+ var toDescriptionCase = (str = "") => {
2820
+ const result = str.replace(/([A-Z])/g, " $1");
2821
+ return result.charAt(0).toUpperCase() + result.slice(1);
2822
+ };
2823
+ var arrayzeValue3 = (val) => {
2824
+ if ((0, import_utils26.isArray)(val))
2825
+ return val;
2826
+ if ((0, import_utils26.isString)(val))
2827
+ return val.split(" ");
2828
+ if ((0, import_utils26.isObject)(val))
2829
+ return Object.values(val);
2830
+ if ((0, import_utils26.isNumber)(val))
2831
+ return [val];
2832
+ };
2833
+ }
2834
+ });
2835
+
1382
2836
  // src/set.js
1383
2837
  var set_exports = {};
1384
2838
  __export(set_exports, {
@@ -1612,7 +3066,7 @@ var setActiveConfig = (newConfig) => {
1612
3066
  };
1613
3067
 
1614
3068
  // src/system/color.js
1615
- var import_utils9 = __toESM(require_cjs(), 1);
3069
+ var import_utils7 = __toESM(require_cjs(), 1);
1616
3070
 
1617
3071
  // src/utils/unit.js
1618
3072
  var isScalingUnit = (unit) => {
@@ -1748,28 +3202,8 @@ var getFontFaceEach = (name, weights) => {
1748
3202
  };
1749
3203
 
1750
3204
  // src/utils/sequence.js
1751
- var import_utils5 = __toESM(require_cjs(), 1);
1752
-
1753
- // ../utils/src/index.js
1754
- var import_utils4 = __toESM(require_cjs());
1755
-
1756
- // ../utils/src/scaling.js
1757
- var import_utils3 = __toESM(require_cjs());
1758
-
1759
- // ../utils/src/index.js
1760
- var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
1761
- var arrayzeValue = (val) => {
1762
- if ((0, import_utils4.isArray)(val))
1763
- return val;
1764
- if ((0, import_utils4.isString)(val))
1765
- return val.split(" ");
1766
- if ((0, import_utils4.isObject)(val))
1767
- return Object.values(val);
1768
- if ((0, import_utils4.isNumber)(val))
1769
- return [val];
1770
- };
1771
-
1772
- // src/utils/sequence.js
3205
+ var import_utils3 = __toESM(require_cjs(), 1);
3206
+ var import_utils4 = __toESM(require_cjs3(), 1);
1773
3207
  var numToLetterMap = {
1774
3208
  "-6": "U",
1775
3209
  "-5": "V",
@@ -1911,9 +3345,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
1911
3345
  unit = UNIT2.default,
1912
3346
  useVariable
1913
3347
  } = sequenceProps;
1914
- if ((0, import_utils5.isString)(value) && value.slice(0, 2) === "--")
3348
+ if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
1915
3349
  return `var(${value})`;
1916
- const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
3350
+ const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
1917
3351
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
1918
3352
  const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
1919
3353
  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)
@@ -1976,7 +3410,7 @@ var findHeadings = (propertyNames) => {
1976
3410
  };
1977
3411
 
1978
3412
  // src/utils/var.js
1979
- var import_utils7 = __toESM(require_cjs(), 1);
3413
+ var import_utils5 = __toESM(require_cjs(), 1);
1980
3414
  var applySequenceGlobalVars = (vars, obj, options) => {
1981
3415
  const CONFIG2 = getActiveConfig();
1982
3416
  const { UNIT: UNIT2 } = CONFIG2;
@@ -2047,9 +3481,9 @@ var applyMediaSequenceVars = (FACTORY2, media, options = {}) => {
2047
3481
  };
2048
3482
 
2049
3483
  // src/utils/sprite.js
2050
- var import_utils8 = __toESM(require_cjs(), 1);
3484
+ var import_utils6 = __toESM(require_cjs(), 1);
2051
3485
  var parseRootAttributes = (htmlString) => {
2052
- if (!(0, import_utils8.isString)(htmlString)) {
3486
+ if (!(0, import_utils6.isString)(htmlString)) {
2053
3487
  return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
2054
3488
  }
2055
3489
  const match = htmlString.match(/<svg\s+(.*?)>/);
@@ -2069,7 +3503,7 @@ var replaceIdsAndUrls = (code, key) => {
2069
3503
  const urlRegex = /url\(#([^)]*)\)/g;
2070
3504
  const matches = code.match(/id="([^"]*)"/g);
2071
3505
  let replacedCode = code;
2072
- if ((0, import_utils8.isArray)(matches)) {
3506
+ if ((0, import_utils6.isArray)(matches)) {
2073
3507
  matches.forEach(() => {
2074
3508
  const randomKey = Math.floor(Math.random() * 1e5);
2075
3509
  replacedCode = code.replace(idRegex, `id="${key}-${randomKey}"`).replace(urlRegex, `url(#${key}-${randomKey})`);
@@ -2096,7 +3530,7 @@ var convertSvgToSymbol = (key, code) => {
2096
3530
  // src/system/color.js
2097
3531
  var getColor = (value, key, config) => {
2098
3532
  const CONFIG2 = config || getActiveConfig();
2099
- if (!(0, import_utils9.isString)(value)) {
3533
+ if (!(0, import_utils7.isString)(value)) {
2100
3534
  if (CONFIG2.verbose)
2101
3535
  console.warn(value, "- type for color is not valid");
2102
3536
  return;
@@ -2105,7 +3539,7 @@ var getColor = (value, key, config) => {
2105
3539
  return `var(${value})`;
2106
3540
  if (key && value[key])
2107
3541
  value = value[key];
2108
- const [name, alpha, tone] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
3542
+ const [name, alpha, tone] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
2109
3543
  const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
2110
3544
  let val = COLOR2[name] || GRADIENT2[name];
2111
3545
  if (!val) {
@@ -2135,7 +3569,7 @@ var getColor = (value, key, config) => {
2135
3569
  };
2136
3570
  var setColor = (val, key, suffix) => {
2137
3571
  const CONFIG2 = getActiveConfig();
2138
- if ((0, import_utils9.isString)(val) && val.slice(0, 2) === "--") {
3572
+ if ((0, import_utils7.isString)(val) && val.slice(0, 2) === "--") {
2139
3573
  val = getColor(val.slice(2));
2140
3574
  if (!(val.includes("rgb") || val.includes("var") || val.includes("#"))) {
2141
3575
  if (CONFIG2.verbose)
@@ -2143,13 +3577,13 @@ var setColor = (val, key, suffix) => {
2143
3577
  val = val.split(" ")[0];
2144
3578
  }
2145
3579
  }
2146
- if ((0, import_utils9.isArray)(val)) {
3580
+ if ((0, import_utils7.isArray)(val)) {
2147
3581
  return {
2148
3582
  "@light": setColor(val[0], key, "light"),
2149
3583
  "@dark": setColor(val[1], key, "dark")
2150
3584
  };
2151
3585
  }
2152
- if ((0, import_utils9.isObject)(val)) {
3586
+ if ((0, import_utils7.isObject)(val)) {
2153
3587
  const obj = {};
2154
3588
  for (const variant in val) {
2155
3589
  obj[variant] = setColor(
@@ -2178,15 +3612,15 @@ var setColor = (val, key, suffix) => {
2178
3612
  };
2179
3613
  var setGradient = (val, key, suffix) => {
2180
3614
  const CONFIG2 = getActiveConfig();
2181
- if ((0, import_utils9.isString)(val) && val.slice(0, 2) === "--")
3615
+ if ((0, import_utils7.isString)(val) && val.slice(0, 2) === "--")
2182
3616
  val = getColor(val.slice(2));
2183
- if ((0, import_utils9.isArray)(val)) {
3617
+ if ((0, import_utils7.isArray)(val)) {
2184
3618
  return {
2185
3619
  "@light": setGradient(val[0], key, "light"),
2186
3620
  "@dark": setGradient(val[0], key, "dark")
2187
3621
  };
2188
3622
  }
2189
- if ((0, import_utils9.isObject)(val)) {
3623
+ if ((0, import_utils7.isObject)(val)) {
2190
3624
  const obj = {};
2191
3625
  for (const variant in val)
2192
3626
  obj[variant] = setGradient(val[variant], key, variant.slice(0, 1) === "@" ? variant.slice(1) : variant);
@@ -2203,7 +3637,7 @@ var setGradient = (val, key, suffix) => {
2203
3637
  };
2204
3638
 
2205
3639
  // src/system/theme.js
2206
- var import_utils11 = __toESM(require_cjs(), 1);
3640
+ var import_utils9 = __toESM(require_cjs(), 1);
2207
3641
  var setThemeValue = (theme) => {
2208
3642
  const value = {};
2209
3643
  const { state, media, helpers, ...rest } = theme;
@@ -2226,7 +3660,7 @@ var getTheme = (value, modifier) => {
2226
3660
  if (CONFIG2.useVariable)
2227
3661
  return getMediaTheme(value, modifier);
2228
3662
  const { THEME: THEME2 } = CONFIG2;
2229
- if ((0, import_utils11.isString)(value)) {
3663
+ if ((0, import_utils9.isString)(value)) {
2230
3664
  const [theme, subtheme] = value.split(" ");
2231
3665
  const isOurTheme = THEME2[theme];
2232
3666
  if (isOurTheme) {
@@ -2235,7 +3669,7 @@ var getTheme = (value, modifier) => {
2235
3669
  value = [theme, subtheme || modifier];
2236
3670
  }
2237
3671
  }
2238
- if ((0, import_utils11.isObjectLike)(value) && value[1]) {
3672
+ if ((0, import_utils9.isObjectLike)(value) && value[1]) {
2239
3673
  const themeName = value[0];
2240
3674
  const subThemeName = value[1];
2241
3675
  const { helpers, media, state } = THEME2[themeName];
@@ -2245,11 +3679,11 @@ var getTheme = (value, modifier) => {
2245
3679
  return getThemeValue(helpers[subThemeName]);
2246
3680
  if (state && state[subThemeName])
2247
3681
  return getThemeValue(state[subThemeName]);
2248
- } else if ((0, import_utils11.isObject)(value))
3682
+ } else if ((0, import_utils9.isObject)(value))
2249
3683
  return setThemeValue(value);
2250
3684
  };
2251
3685
  var setInverseTheme = (theme, variant, value) => {
2252
- if ((0, import_utils11.isObject)(variant)) {
3686
+ if ((0, import_utils9.isObject)(variant)) {
2253
3687
  theme.variants.inverse.value = setThemeValue(variant);
2254
3688
  } else if (variant === true) {
2255
3689
  const { color, background } = value;
@@ -2264,7 +3698,7 @@ var setInverseTheme = (theme, variant, value) => {
2264
3698
  var setPseudo = (theme, key, variant, themeValue) => {
2265
3699
  const result = getTheme(variant);
2266
3700
  themeValue[`&:${key}`] = result;
2267
- if ((0, import_utils11.isObject)(variant) && !variant.value)
3701
+ if ((0, import_utils9.isObject)(variant) && !variant.value)
2268
3702
  variant.value = result;
2269
3703
  };
2270
3704
  var setSelectors = (theme, value) => {
@@ -2282,7 +3716,7 @@ var setSelectors = (theme, value) => {
2282
3716
  var setPrefersScheme = (theme, key, variant, themeValue) => {
2283
3717
  const result = getTheme(variant);
2284
3718
  themeValue[`@media (prefers-color-scheme: ${key})`] = result;
2285
- if ((0, import_utils11.isObject)(variant) && !variant.value)
3719
+ if ((0, import_utils9.isObject)(variant) && !variant.value)
2286
3720
  variant.value = result;
2287
3721
  };
2288
3722
  var setMedia = (theme, value) => {
@@ -2308,7 +3742,7 @@ var setHelpers = (theme, value) => {
2308
3742
  const keys = Object.keys(helpers);
2309
3743
  keys.map((key) => {
2310
3744
  const helper = helpers[key];
2311
- if ((0, import_utils11.isString)(helper))
3745
+ if ((0, import_utils9.isString)(helper))
2312
3746
  helpers[key] = CONFIG2.THEME[helper];
2313
3747
  else
2314
3748
  getThemeValue(helpers[key]);
@@ -2332,7 +3766,7 @@ var setMediaTheme = (val, key, suffix, prefers) => {
2332
3766
  const CONFIG2 = getActiveConfig();
2333
3767
  const { CSS_VARS: CSS_VARS2 } = CONFIG2;
2334
3768
  const theme = { value: val };
2335
- if ((0, import_utils11.isObjectLike)(val)) {
3769
+ if ((0, import_utils9.isObjectLike)(val)) {
2336
3770
  for (const param in val) {
2337
3771
  const symb = param.slice(0, 1);
2338
3772
  const value = val[param];
@@ -2360,7 +3794,7 @@ var setMediaTheme = (val, key, suffix, prefers) => {
2360
3794
  };
2361
3795
  }
2362
3796
  }
2363
- if ((0, import_utils11.isString)(val) && val.slice(0, 2) === "--") {
3797
+ if ((0, import_utils9.isString)(val) && val.slice(0, 2) === "--") {
2364
3798
  const { THEME: THEME2 } = CONFIG2;
2365
3799
  const value = THEME2[val.slice(2)];
2366
3800
  const getReferenced = getMediaTheme(value, prefers);
@@ -2373,7 +3807,7 @@ var recursiveTheme = (val) => {
2373
3807
  const obj = {};
2374
3808
  for (const param in val) {
2375
3809
  const symb = param.slice(0, 1);
2376
- if ((0, import_utils11.isObjectLike)(val[param])) {
3810
+ if ((0, import_utils9.isObjectLike)(val[param])) {
2377
3811
  if (symb === "@") {
2378
3812
  const query = CONFIG2.MEDIA[param.slice(1)];
2379
3813
  const media = `@media screen and ${query}`;
@@ -2393,25 +3827,25 @@ var findModifierFromArray = (val, modifierArray) => {
2393
3827
  return val;
2394
3828
  };
2395
3829
  var findModifier = (val, modifier) => {
2396
- if ((0, import_utils11.isArray)(modifier))
3830
+ if ((0, import_utils9.isArray)(modifier))
2397
3831
  return findModifierFromArray(val, modifier);
2398
- else if ((0, import_utils11.isString)(modifier) && val[modifier])
3832
+ else if ((0, import_utils9.isString)(modifier) && val[modifier])
2399
3833
  return val[modifier];
2400
3834
  else
2401
3835
  return val;
2402
3836
  };
2403
3837
  var getMediaTheme = (value, modifier) => {
2404
3838
  const activeConfig = getActiveConfig();
2405
- if ((0, import_utils11.isString)(value) && value.slice(0, 2) === "--") {
3839
+ if ((0, import_utils9.isString)(value) && value.slice(0, 2) === "--") {
2406
3840
  value = getMediaTheme(value.slice(2));
2407
3841
  }
2408
- if (!value || !(0, import_utils11.isString)(value)) {
3842
+ if (!value || !(0, import_utils9.isString)(value)) {
2409
3843
  if (activeConfig.verbose) {
2410
3844
  console.warn(`${value} - Theme is not a string`);
2411
3845
  }
2412
3846
  return;
2413
3847
  }
2414
- const [themeName, ...themeModifiers] = (0, import_utils11.isArray)(value) ? value : value.split(" ");
3848
+ const [themeName, ...themeModifiers] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
2415
3849
  let themeValue = activeConfig.THEME[themeName];
2416
3850
  if (themeValue && (themeModifiers || modifier)) {
2417
3851
  themeValue = findModifier(themeValue, themeModifiers.length ? themeModifiers : modifier);
@@ -2421,10 +3855,11 @@ var getMediaTheme = (value, modifier) => {
2421
3855
  };
2422
3856
 
2423
3857
  // src/system/font.js
2424
- var import_utils12 = __toESM(require_cjs(), 1);
3858
+ var import_utils10 = __toESM(require_cjs(), 1);
3859
+ var import_utils11 = __toESM(require_cjs3(), 1);
2425
3860
  var setFont = (val, key) => {
2426
3861
  const CSSvar = `--font-${key}`;
2427
- if (!val || (0, import_utils12.isArray)(val) && !val[0])
3862
+ if (!val || (0, import_utils10.isArray)(val) && !val[0])
2428
3863
  return;
2429
3864
  const fontFace = val[0] ? getFontFaceEach(key, val) : setCustomFontMedia(key, val.url);
2430
3865
  return { var: CSSvar, value: val, fontFace };
@@ -2435,15 +3870,15 @@ var setFontFamily = (val, key) => {
2435
3870
  let { value, type } = val;
2436
3871
  if (val.isDefault)
2437
3872
  FONT_FAMILY2.default = key;
2438
- if ((0, import_utils12.isObject)(value))
2439
- value = arrayzeValue(value);
3873
+ if ((0, import_utils10.isObject)(value))
3874
+ value = (0, import_utils11.arrayzeValue)(value);
2440
3875
  const CSSvar = `--font-family-${key}`;
2441
3876
  const str = `${value.join(", ")}, ${FONT_FAMILY_TYPES2[type]}`;
2442
3877
  return { var: CSSvar, value: str, arr: value, type };
2443
3878
  };
2444
3879
 
2445
3880
  // src/system/typography.js
2446
- var import_utils15 = __toESM(require_cjs(), 1);
3881
+ var import_utils13 = __toESM(require_cjs(), 1);
2447
3882
  var runThroughMedia = (FACTORY2) => {
2448
3883
  const CONFIG2 = getActiveConfig();
2449
3884
  const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } = CONFIG2;
@@ -2463,7 +3898,7 @@ var runThroughMedia = (FACTORY2) => {
2463
3898
  h1Matches,
2464
3899
  unit
2465
3900
  } = FACTORY2;
2466
- (0, import_utils15.merge)(mediaValue, {
3901
+ (0, import_utils13.merge)(mediaValue, {
2467
3902
  type,
2468
3903
  base,
2469
3904
  ratio,
@@ -2480,7 +3915,7 @@ var runThroughMedia = (FACTORY2) => {
2480
3915
  applyMediaSequenceVars(FACTORY2, prop);
2481
3916
  continue;
2482
3917
  }
2483
- (0, import_utils15.merge)(mediaValue, {
3918
+ (0, import_utils13.merge)(mediaValue, {
2484
3919
  sequence: {},
2485
3920
  scales: {},
2486
3921
  templates: {},
@@ -2519,7 +3954,8 @@ var applyTypographySequence = () => {
2519
3954
  };
2520
3955
 
2521
3956
  // src/system/spacing.js
2522
- var import_utils18 = __toESM(require_cjs(), 1);
3957
+ var import_utils15 = __toESM(require_cjs3(), 1);
3958
+ var import_utils16 = __toESM(require_cjs(), 1);
2523
3959
  var runThroughMedia2 = (FACTORY2) => {
2524
3960
  for (const prop in FACTORY2) {
2525
3961
  const mediaProps = FACTORY2[prop];
@@ -2535,7 +3971,7 @@ var runThroughMedia2 = (FACTORY2) => {
2535
3971
  h1Matches,
2536
3972
  unit
2537
3973
  } = FACTORY2;
2538
- (0, import_utils18.merge)(mediaProps, {
3974
+ (0, import_utils16.merge)(mediaProps, {
2539
3975
  type,
2540
3976
  base,
2541
3977
  ratio,
@@ -2569,11 +4005,11 @@ var getSequence = (sequenceProps) => {
2569
4005
  };
2570
4006
  var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
2571
4007
  const sequence = getSequence(sequenceProps);
2572
- if ((0, import_utils18.isString)(value) && (value.includes("calc") || value.includes("var"))) {
4008
+ if ((0, import_utils16.isString)(value) && (value.includes("calc") || value.includes("var"))) {
2573
4009
  return { [propertyName]: value };
2574
4010
  }
2575
- const stack = arrayzeValue(value);
2576
- if (!(0, import_utils18.isArray)(stack))
4011
+ const stack = (0, import_utils15.arrayzeValue)(value);
4012
+ if (!(0, import_utils16.isArray)(stack))
2577
4013
  return;
2578
4014
  if (stack.length > 1) {
2579
4015
  let suffix = "";
@@ -2601,16 +4037,16 @@ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
2601
4037
  };
2602
4038
 
2603
4039
  // src/system/shadow.js
2604
- var import_utils20 = __toESM(require_cjs(), 1);
4040
+ var import_utils18 = __toESM(require_cjs(), 1);
2605
4041
  var setShadow = (value, key, suffix, prefers) => {
2606
4042
  const CONFIG2 = getActiveConfig();
2607
- if ((0, import_utils20.isArray)(value)) {
4043
+ if ((0, import_utils18.isArray)(value)) {
2608
4044
  return {
2609
4045
  "@light": setShadow(value[0], key, "light"),
2610
4046
  "@dark": setShadow(value[1], key, "dark")
2611
4047
  };
2612
4048
  }
2613
- if ((0, import_utils20.isObject)(value)) {
4049
+ if ((0, import_utils18.isObject)(value)) {
2614
4050
  const obj = {};
2615
4051
  for (const variant in value) {
2616
4052
  obj[variant] = setShadow(
@@ -2621,7 +4057,7 @@ var setShadow = (value, key, suffix, prefers) => {
2621
4057
  }
2622
4058
  return obj;
2623
4059
  }
2624
- if ((0, import_utils20.isString)(value) && value.includes(",")) {
4060
+ if ((0, import_utils18.isString)(value) && value.includes(",")) {
2625
4061
  value = value.split(",").map((v) => {
2626
4062
  v = v.trim();
2627
4063
  if (v.startsWith("--"))
@@ -2647,6 +4083,7 @@ var setShadow = (value, key, suffix, prefers) => {
2647
4083
  };
2648
4084
 
2649
4085
  // src/system/timing.js
4086
+ var import_utils19 = __toESM(require_cjs3(), 1);
2650
4087
  var applyTimingSequence = () => {
2651
4088
  const CONFIG2 = getActiveConfig();
2652
4089
  const { TIMING: TIMING2 } = CONFIG2;
@@ -2655,11 +4092,11 @@ var applyTimingSequence = () => {
2655
4092
  };
2656
4093
 
2657
4094
  // src/system/document.js
2658
- var import_utils23 = __toESM(require_cjs(), 1);
4095
+ var import_utils21 = __toESM(require_cjs(), 1);
2659
4096
  var applyDocument = () => {
2660
4097
  const CONFIG2 = getActiveConfig();
2661
4098
  const { DOCUMENT: DOCUMENT2, FONT_FAMILY: FONT_FAMILY2, THEME: THEME2, TYPOGRAPHY: TYPOGRAPHY2 } = CONFIG2;
2662
- return (0, import_utils23.merge)(DOCUMENT2, {
4099
+ return (0, import_utils21.merge)(DOCUMENT2, {
2663
4100
  theme: THEME2.document,
2664
4101
  fontFamily: getDefaultOrFirstKey(FONT_FAMILY2),
2665
4102
  fontSize: TYPOGRAPHY2.base,
@@ -2690,7 +4127,7 @@ var setIcon = (val, key) => {
2690
4127
  };
2691
4128
 
2692
4129
  // src/system/reset.js
2693
- var import_utils26 = __toESM(require_cjs(), 1);
4130
+ var import_utils24 = __toESM(require_cjs(), 1);
2694
4131
  var applyReset = (reset = {}) => {
2695
4132
  const CONFIG2 = getActiveConfig();
2696
4133
  const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG2;
@@ -2712,8 +4149,8 @@ var applyReset = (reset = {}) => {
2712
4149
  const { body, ...templates } = TYPOGRAPHY2.templates;
2713
4150
  const globalTheme = CONFIG2.useDocumentTheme ? getMediaTheme("document", `@${CONFIG2.globalTheme}`) : {};
2714
4151
  if (RESET2.html)
2715
- (0, import_utils26.overwriteDeep)(RESET2.html, globalTheme);
2716
- return (0, import_utils26.deepMerge)((0, import_utils26.merge)(RESET2, reset), {
4152
+ (0, import_utils24.overwriteDeep)(RESET2.html, globalTheme);
4153
+ return (0, import_utils24.deepMerge)((0, import_utils24.merge)(RESET2, reset), {
2717
4154
  html: {
2718
4155
  position: "absolute",
2719
4156
  // overflow: 'hidden',
@@ -2752,9 +4189,9 @@ var applyReset = (reset = {}) => {
2752
4189
  };
2753
4190
 
2754
4191
  // src/set.js
2755
- var import_utils27 = __toESM(require_cjs(), 1);
4192
+ var import_utils25 = __toESM(require_cjs(), 1);
2756
4193
  var setCases = (val, key) => {
2757
- if ((0, import_utils27.isFunction)(val))
4194
+ if ((0, import_utils25.isFunction)(val))
2758
4195
  return val();
2759
4196
  return val;
2760
4197
  };