@symbo.ls/scratch 2.11.522 → 3.0.1

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.
@@ -29,19 +29,18 @@ __export(factory_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(factory_exports);
31
31
 
32
- // ../../node_modules/@domql/utils/dist/esm/globals.js
32
+ // node_modules/@domql/utils/dist/esm/globals.js
33
33
  var window2 = globalThis;
34
34
  var document2 = window2.document;
35
35
 
36
- // ../../node_modules/@domql/utils/dist/esm/node.js
36
+ // node_modules/@domql/utils/dist/esm/node.js
37
37
  var isDOMNode = (obj) => {
38
38
  return typeof window2 !== "undefined" && (obj instanceof window2.Node || obj instanceof window2.Window || obj === window2 || obj === document);
39
39
  };
40
40
 
41
- // ../../node_modules/@domql/utils/dist/esm/types.js
41
+ // node_modules/@domql/utils/dist/esm/types.js
42
42
  var isObject = (arg) => {
43
- if (arg === null)
44
- return false;
43
+ if (arg === null) return false;
45
44
  return typeof arg === "object" && arg.constructor === Object;
46
45
  };
47
46
  var isString = (arg) => typeof arg === "string";
@@ -52,8 +51,7 @@ var isNull = (arg) => arg === null;
52
51
  var isArray = (arg) => Array.isArray(arg);
53
52
  var isDate = (d) => d instanceof Date;
54
53
  var isObjectLike = (arg) => {
55
- if (arg === null)
56
- return false;
54
+ if (arg === null) return false;
57
55
  return typeof arg === "object";
58
56
  };
59
57
  var isDefined = (arg) => {
@@ -63,12 +61,12 @@ var isUndefined = (arg) => {
63
61
  return arg === void 0;
64
62
  };
65
63
 
66
- // ../../node_modules/@domql/utils/dist/esm/array.js
64
+ // node_modules/@domql/utils/dist/esm/array.js
67
65
  var mergeArray = (arr, exclude = []) => {
68
66
  return arr.reduce((a, c) => deepMerge(a, deepClone(c, { exclude }), exclude), {});
69
67
  };
70
68
 
71
- // ../../node_modules/@domql/utils/dist/esm/object.js
69
+ // node_modules/@domql/utils/dist/esm/object.js
72
70
  var __defProp2 = Object.defineProperty;
73
71
  var __defProps = Object.defineProperties;
74
72
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -91,8 +89,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
91
89
  var deepMerge = (element, extend, excludeFrom = []) => {
92
90
  for (const e in extend) {
93
91
  const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
94
- if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
95
- continue;
92
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__")) continue;
96
93
  const elementProp = element[e];
97
94
  const extendProp = extend[e];
98
95
  if (isObjectLike(elementProp) && isObjectLike(extendProp)) {
@@ -121,13 +118,10 @@ var deepClone = (obj, options = {}) => {
121
118
  const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
122
119
  visited.set(obj, clone2);
123
120
  for (const key in obj) {
124
- if (!Object.prototype.hasOwnProperty.call(obj, key))
125
- continue;
126
- if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
127
- continue;
121
+ if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
122
+ if (exclude.includes(key) || key.startsWith("__") || key === "__proto__") continue;
128
123
  const value = obj[key];
129
- if (cleanUndefined && isUndefined(value) || cleanNull && isNull(value))
130
- continue;
124
+ if (cleanUndefined && isUndefined(value) || cleanNull && isNull(value)) continue;
131
125
  if (isDOMNode(value)) {
132
126
  clone2[key] = value;
133
127
  continue;
@@ -151,7 +145,7 @@ var deepClone = (obj, options = {}) => {
151
145
  return clone2;
152
146
  };
153
147
 
154
- // ../../node_modules/@domql/utils/dist/esm/cookie.js
148
+ // node_modules/@domql/utils/dist/esm/cookie.js
155
149
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
156
150
 
157
151
  // src/defaultConfig/index.js
@@ -381,8 +375,7 @@ var getActiveConfig = (def) => {
381
375
  return FACTORY[def || FACTORY.active] || CONFIG;
382
376
  };
383
377
  var setActiveConfig = (newConfig) => {
384
- if (!isObject(newConfig))
385
- return;
378
+ if (!isObject(newConfig)) return;
386
379
  FACTORY.active = "1";
387
380
  FACTORY["1"] = deepMerge(newConfig, deepClone(cachedConfig));
388
381
  return newConfig;