@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.
@@ -241,32 +241,32 @@ var require_types = __commonJS({
241
241
  __export2(types_exports, {
242
242
  TYPES: () => TYPES,
243
243
  is: () => is,
244
- isArray: () => isArray4,
244
+ isArray: () => isArray2,
245
245
  isBoolean: () => isBoolean,
246
246
  isDate: () => isDate,
247
247
  isDefined: () => isDefined2,
248
248
  isFunction: () => isFunction,
249
249
  isNot: () => isNot,
250
250
  isNull: () => isNull,
251
- isNumber: () => isNumber3,
252
- isObject: () => isObject4,
251
+ isNumber: () => isNumber2,
252
+ isObject: () => isObject2,
253
253
  isObjectLike: () => isObjectLike2,
254
- isString: () => isString5,
254
+ isString: () => isString4,
255
255
  isUndefined: () => isUndefined
256
256
  });
257
257
  module2.exports = __toCommonJS2(types_exports);
258
258
  var import_node = require_node();
259
- var isObject4 = (arg) => {
259
+ var isObject2 = (arg) => {
260
260
  if (arg === null)
261
261
  return false;
262
262
  return typeof arg === "object" && arg.constructor === Object;
263
263
  };
264
- var isString5 = (arg) => typeof arg === "string";
265
- var isNumber3 = (arg) => typeof arg === "number";
264
+ var isString4 = (arg) => typeof arg === "string";
265
+ var isNumber2 = (arg) => typeof arg === "number";
266
266
  var isFunction = (arg) => typeof arg === "function";
267
267
  var isBoolean = (arg) => arg === true || arg === false;
268
268
  var isNull = (arg) => arg === null;
269
- var isArray4 = (arg) => Array.isArray(arg);
269
+ var isArray2 = (arg) => Array.isArray(arg);
270
270
  var isDate = (d) => d instanceof Date;
271
271
  var isObjectLike2 = (arg) => {
272
272
  if (arg === null)
@@ -274,18 +274,18 @@ var require_types = __commonJS({
274
274
  return typeof arg === "object";
275
275
  };
276
276
  var isDefined2 = (arg) => {
277
- return isObject4(arg) || isObjectLike2(arg) || isString5(arg) || isNumber3(arg) || isFunction(arg) || isArray4(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
277
+ return isObject2(arg) || isObjectLike2(arg) || isString4(arg) || isNumber2(arg) || isFunction(arg) || isArray2(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
278
278
  };
279
279
  var isUndefined = (arg) => {
280
280
  return arg === void 0;
281
281
  };
282
282
  var TYPES = {
283
283
  boolean: isBoolean,
284
- array: isArray4,
285
- object: isObject4,
286
- string: isString5,
284
+ array: isArray2,
285
+ object: isObject2,
286
+ string: isString4,
287
287
  date: isDate,
288
- number: isNumber3,
288
+ number: isNumber2,
289
289
  null: isNull,
290
290
  function: isFunction,
291
291
  objectLike: isObjectLike2,
@@ -333,6 +333,7 @@ var require_array = __commonJS({
333
333
  createNestedObject: () => createNestedObject,
334
334
  cutArrayAfterValue: () => cutArrayAfterValue,
335
335
  cutArrayBeforeValue: () => cutArrayBeforeValue,
336
+ getFrequencyInArray: () => getFrequencyInArray,
336
337
  joinArrays: () => joinArrays,
337
338
  mergeAndCloneIfArray: () => mergeAndCloneIfArray,
338
339
  mergeArray: () => mergeArray,
@@ -347,6 +348,11 @@ var require_array = __commonJS({
347
348
  var arrayContainsOtherArray = (arr1, arr2) => {
348
349
  return arr2.every((val) => arr1.includes(val));
349
350
  };
351
+ var getFrequencyInArray = (arr, value) => {
352
+ return arr.reduce((count, currentValue) => {
353
+ return currentValue === value ? count + 1 : count;
354
+ }, 0);
355
+ };
350
356
  var removeFromArray = (arr, index) => {
351
357
  if ((0, import_types.isString)(index))
352
358
  index = parseInt(index);
@@ -413,7 +419,7 @@ var require_array = __commonJS({
413
419
  newArray.splice(index, 1);
414
420
  return newArray;
415
421
  }
416
- return arr.slice();
422
+ return arr;
417
423
  };
418
424
  var removeValueFromArrayAll = (arr, value) => {
419
425
  return arr.filter((item) => item !== value);
@@ -761,7 +767,7 @@ var require_object = __commonJS({
761
767
  continue;
762
768
  const objProp = obj[prop];
763
769
  if ((0, import_types.isString)(objProp)) {
764
- if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
770
+ if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
765
771
  try {
766
772
  const evalProp = import_globals2.window.eval(`(${objProp})`);
767
773
  destringified[prop] = evalProp;
@@ -801,11 +807,11 @@ var require_object = __commonJS({
801
807
  }
802
808
  return destringified;
803
809
  };
804
- var stringToObject = (str, verbose) => {
810
+ var stringToObject = (str, opts = { verbose: true }) => {
805
811
  try {
806
812
  return import_globals2.window.eval("(" + str + ")");
807
813
  } catch (e) {
808
- if (verbose)
814
+ if (opts.verbose)
809
815
  console.warn(e);
810
816
  }
811
817
  };
@@ -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_globals2 = require_globals2();
1556
+ var isNode = (obj) => {
1557
+ return (typeof Node === "object" ? obj instanceof import_globals2.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_globals2.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: () => isArray3,
1589
+ isBoolean: () => isBoolean,
1590
+ isDate: () => isDate,
1591
+ isDefined: () => isDefined2,
1592
+ isFunction: () => isFunction,
1593
+ isNot: () => isNot,
1594
+ isNull: () => isNull,
1595
+ isNumber: () => isNumber2,
1596
+ isObject: () => isObject3,
1597
+ isObjectLike: () => isObjectLike2,
1598
+ isString: () => isString22,
1599
+ isUndefined: () => isUndefined
1600
+ });
1601
+ module22.exports = __toCommonJS22(types_exports);
1602
+ var import_node = require_node2();
1603
+ var isObject3 = (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 isFunction = (arg) => typeof arg === "function";
1611
+ var isBoolean = (arg) => arg === true || arg === false;
1612
+ var isNull = (arg) => arg === null;
1613
+ var isArray3 = (arg) => Array.isArray(arg);
1614
+ var isDate = (d) => d instanceof Date;
1615
+ var isObjectLike2 = (arg) => {
1616
+ if (arg === null)
1617
+ return false;
1618
+ return typeof arg === "object";
1619
+ };
1620
+ var isDefined2 = (arg) => {
1621
+ return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(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: isArray3,
1629
+ object: isObject3,
1630
+ string: isString22,
1631
+ date: isDate,
1632
+ number: isNumber2,
1633
+ null: isNull,
1634
+ function: isFunction,
1635
+ objectLike: isObjectLike2,
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: () => deepMerge2,
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: () => merge,
1886
+ mergeArrayExclude: () => mergeArrayExclude,
1887
+ mergeIfExisted: () => mergeIfExisted,
1888
+ objectToString: () => objectToString,
1889
+ overwrite: () => overwrite,
1890
+ overwriteDeep: () => overwriteDeep,
1891
+ overwriteShallow: () => overwriteShallow,
1892
+ removeFromObject: () => removeFromObject,
1893
+ stringToObject: () => stringToObject
1894
+ });
1895
+ module22.exports = __toCommonJS22(object_exports);
1896
+ var import_globals2 = 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 merge = (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 deepMerge2 = (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
+ deepMerge2(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) => deepMerge2(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_globals2.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_globals2.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_globals2.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 overwriteDeep = (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
+ overwriteDeep(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 deepMerge2(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_exports2 = {};
2700
+ module22.exports = __toCommonJS22(utils_exports2);
2701
+ __reExport(utils_exports2, require_key2(), module22.exports);
2702
+ __reExport(utils_exports2, require_env2(), module22.exports);
2703
+ __reExport(utils_exports2, require_types2(), module22.exports);
2704
+ __reExport(utils_exports2, require_object2(), module22.exports);
2705
+ __reExport(utils_exports2, require_function2(), module22.exports);
2706
+ __reExport(utils_exports2, require_array2(), module22.exports);
2707
+ __reExport(utils_exports2, require_node2(), module22.exports);
2708
+ __reExport(utils_exports2, require_log2(), module22.exports);
2709
+ __reExport(utils_exports2, require_string2(), module22.exports);
2710
+ __reExport(utils_exports2, require_globals2(), module22.exports);
2711
+ __reExport(utils_exports2, require_cookie2(), module22.exports);
2712
+ __reExport(utils_exports2, require_tags2(), module22.exports);
2713
+ }
2714
+ });
2715
+ var src_exports = {};
2716
+ __export2(src_exports, {
2717
+ arrayzeValue: () => arrayzeValue,
2718
+ copyStringToClipboard: () => copyStringToClipboard,
2719
+ fibonacciNumberByIndex: () => fibonacciNumberByIndex,
2720
+ findClosestNumber: () => findClosestNumber,
2721
+ findClosestNumberInFactory: () => findClosestNumberInFactory,
2722
+ formatDate: () => formatDate,
2723
+ loadJavascriptFile: () => loadJavascriptFile,
2724
+ removeChars: () => removeChars,
2725
+ toCamelCase: () => toCamelCase,
2726
+ toDashCase: () => toDashCase2,
2727
+ toDescriptionCase: () => toDescriptionCase,
2728
+ toTitleCase: () => toTitleCase,
2729
+ toggleFullscreen: () => toggleFullscreen
2730
+ });
2731
+ module2.exports = __toCommonJS2(src_exports);
2732
+ var import_utils22 = __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_utils7 = __toESM2(require_cjs4(), 1);
2743
+ var findClosestNumber = (number, arr) => {
2744
+ return ((0, import_utils7.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_utils7.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 toCamelCase = (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 arrayzeValue = (val) => {
2824
+ if ((0, import_utils22.isArray)(val))
2825
+ return val;
2826
+ if ((0, import_utils22.isString)(val))
2827
+ return val.split(" ");
2828
+ if ((0, import_utils22.isObject)(val))
2829
+ return Object.values(val);
2830
+ if ((0, import_utils22.isNumber)(val))
2831
+ return [val];
2832
+ };
2833
+ }
2834
+ });
2835
+
1382
2836
  // src/utils/index.js
1383
2837
  var utils_exports = {};
1384
2838
  __export(utils_exports, {
@@ -1640,19 +3094,11 @@ var getFontFaceString = (LIBRARY) => {
1640
3094
  };
1641
3095
 
1642
3096
  // src/utils/sequence.js
1643
- var import_utils5 = __toESM(require_cjs2(), 1);
1644
-
1645
- // ../utils/src/index.js
1646
- var import_utils3 = __toESM(require_cjs2());
1647
-
1648
- // ../utils/src/scaling.js
1649
- var import_utils2 = __toESM(require_cjs2());
1650
-
1651
- // ../utils/src/index.js
1652
- var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
3097
+ var import_utils3 = __toESM(require_cjs2(), 1);
3098
+ var import_utils4 = __toESM(require_cjs3(), 1);
1653
3099
 
1654
3100
  // src/factory.js
1655
- var import_utils4 = __toESM(require_cjs2(), 1);
3101
+ var import_utils2 = __toESM(require_cjs2(), 1);
1656
3102
 
1657
3103
  // src/defaultConfig/index.js
1658
3104
  var defaultConfig_exports = {};
@@ -1857,7 +3303,7 @@ var CONFIG = {
1857
3303
  CSS_VARS,
1858
3304
  ...defaultConfig_exports
1859
3305
  };
1860
- var cachedConfig = (0, import_utils4.deepClone)(CONFIG);
3306
+ var cachedConfig = (0, import_utils2.deepClone)(CONFIG);
1861
3307
  var FACTORY = {
1862
3308
  active: "0",
1863
3309
  0: CONFIG
@@ -2008,9 +3454,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
2008
3454
  unit = UNIT2.default,
2009
3455
  useVariable
2010
3456
  } = sequenceProps;
2011
- if ((0, import_utils5.isString)(value) && value.slice(0, 2) === "--")
3457
+ if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
2012
3458
  return `var(${value})`;
2013
- const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
3459
+ const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
2014
3460
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
2015
3461
  const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
2016
3462
  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)
@@ -2073,11 +3519,11 @@ var findHeadings = (propertyNames) => {
2073
3519
  };
2074
3520
 
2075
3521
  // src/utils/var.js
2076
- var import_utils7 = __toESM(require_cjs2(), 1);
3522
+ var import_utils5 = __toESM(require_cjs2(), 1);
2077
3523
  var setVariables = (result, key) => {
2078
3524
  const CONFIG2 = getActiveConfig();
2079
3525
  const { CSS_VARS: CSS_VARS2 } = CONFIG2;
2080
- if ((0, import_utils7.isObjectLike)(result.value)) {
3526
+ if ((0, import_utils5.isObjectLike)(result.value)) {
2081
3527
  } else {
2082
3528
  CSS_VARS2[result.var] = result.value;
2083
3529
  }
@@ -2152,7 +3598,7 @@ var applyMediaSequenceVars = (FACTORY2, media, options = {}) => {
2152
3598
  };
2153
3599
 
2154
3600
  // src/utils/sprite.js
2155
- var import_utils8 = __toESM(require_cjs2(), 1);
3601
+ var import_utils6 = __toESM(require_cjs2(), 1);
2156
3602
  var generateSprite = (icons) => {
2157
3603
  const CONFIG2 = getActiveConfig();
2158
3604
  let sprite = "";
@@ -2166,7 +3612,7 @@ var generateSprite = (icons) => {
2166
3612
  return sprite;
2167
3613
  };
2168
3614
  var parseRootAttributes = (htmlString) => {
2169
- if (!(0, import_utils8.isString)(htmlString)) {
3615
+ if (!(0, import_utils6.isString)(htmlString)) {
2170
3616
  return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
2171
3617
  }
2172
3618
  const match = htmlString.match(/<svg\s+(.*?)>/);
@@ -2186,7 +3632,7 @@ var replaceIdsAndUrls = (code, key) => {
2186
3632
  const urlRegex = /url\(#([^)]*)\)/g;
2187
3633
  const matches = code.match(/id="([^"]*)"/g);
2188
3634
  let replacedCode = code;
2189
- if ((0, import_utils8.isArray)(matches)) {
3635
+ if ((0, import_utils6.isArray)(matches)) {
2190
3636
  matches.forEach(() => {
2191
3637
  const randomKey = Math.floor(Math.random() * 1e5);
2192
3638
  replacedCode = code.replace(idRegex, `id="${key}-${randomKey}"`).replace(urlRegex, `url(#${key}-${randomKey})`);