@symbo.ls/scratch 2.28.54 → 2.28.56

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.
@@ -113,13 +113,14 @@ var deepClone = (obj, options = {}) => {
113
113
  visited = /* @__PURE__ */ new WeakMap(),
114
114
  handleExtend = false
115
115
  } = options;
116
+ const contentWindow = targetWindow || window2 || globalThis;
116
117
  if (!isObjectLike(obj) || isDOMNode(obj)) {
117
118
  return obj;
118
119
  }
119
120
  if (visited.has(obj)) {
120
121
  return visited.get(obj);
121
122
  }
122
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
123
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
123
124
  visited.set(obj, clone2);
124
125
  for (const key in obj) {
125
126
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -136,8 +137,8 @@ var deepClone = (obj, options = {}) => {
136
137
  clone2[key] = mergeArray(value, exclude);
137
138
  continue;
138
139
  }
139
- if (isFunction(value) && targetWindow) {
140
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
140
+ if (isFunction(value) && options.window) {
141
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
141
142
  continue;
142
143
  }
143
144
  if (isObjectLike(value)) {
package/dist/cjs/index.js CHANGED
@@ -594,13 +594,14 @@ var deepClone = (obj, options = {}) => {
594
594
  visited = /* @__PURE__ */ new WeakMap(),
595
595
  handleExtend = false
596
596
  } = options;
597
+ const contentWindow = targetWindow || window2 || globalThis;
597
598
  if (!isObjectLike(obj) || isDOMNode(obj)) {
598
599
  return obj;
599
600
  }
600
601
  if (visited.has(obj)) {
601
602
  return visited.get(obj);
602
603
  }
603
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
604
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
604
605
  visited.set(obj, clone2);
605
606
  for (const key in obj) {
606
607
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -617,8 +618,8 @@ var deepClone = (obj, options = {}) => {
617
618
  clone2[key] = mergeArray(value, exclude);
618
619
  continue;
619
620
  }
620
- if (isFunction(value) && targetWindow) {
621
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
621
+ if (isFunction(value) && options.window) {
622
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
622
623
  continue;
623
624
  }
624
625
  if (isObjectLike(value)) {
package/dist/cjs/set.js CHANGED
@@ -415,13 +415,14 @@ var deepClone = (obj, options = {}) => {
415
415
  visited = /* @__PURE__ */ new WeakMap(),
416
416
  handleExtend = false
417
417
  } = options;
418
+ const contentWindow = targetWindow || window2 || globalThis;
418
419
  if (!isObjectLike(obj) || isDOMNode(obj)) {
419
420
  return obj;
420
421
  }
421
422
  if (visited.has(obj)) {
422
423
  return visited.get(obj);
423
424
  }
424
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
425
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
425
426
  visited.set(obj, clone2);
426
427
  for (const key in obj) {
427
428
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -438,8 +439,8 @@ var deepClone = (obj, options = {}) => {
438
439
  clone2[key] = mergeArray(value, exclude);
439
440
  continue;
440
441
  }
441
- if (isFunction(value) && targetWindow) {
442
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
442
+ if (isFunction(value) && options.window) {
443
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
443
444
  continue;
444
445
  }
445
446
  if (isObjectLike(value)) {
@@ -402,13 +402,14 @@ var deepClone = (obj, options = {}) => {
402
402
  visited = /* @__PURE__ */ new WeakMap(),
403
403
  handleExtend = false
404
404
  } = options;
405
+ const contentWindow = targetWindow || window2 || globalThis;
405
406
  if (!isObjectLike(obj) || isDOMNode(obj)) {
406
407
  return obj;
407
408
  }
408
409
  if (visited.has(obj)) {
409
410
  return visited.get(obj);
410
411
  }
411
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
412
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
412
413
  visited.set(obj, clone2);
413
414
  for (const key in obj) {
414
415
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -425,8 +426,8 @@ var deepClone = (obj, options = {}) => {
425
426
  clone2[key] = mergeArray(value, exclude);
426
427
  continue;
427
428
  }
428
- if (isFunction(value) && targetWindow) {
429
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
429
+ if (isFunction(value) && options.window) {
430
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
430
431
  continue;
431
432
  }
432
433
  if (isObjectLike(value)) {
@@ -406,13 +406,14 @@ var deepClone = (obj, options = {}) => {
406
406
  visited = /* @__PURE__ */ new WeakMap(),
407
407
  handleExtend = false
408
408
  } = options;
409
+ const contentWindow = targetWindow || window2 || globalThis;
409
410
  if (!isObjectLike(obj) || isDOMNode(obj)) {
410
411
  return obj;
411
412
  }
412
413
  if (visited.has(obj)) {
413
414
  return visited.get(obj);
414
415
  }
415
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
416
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
416
417
  visited.set(obj, clone2);
417
418
  for (const key in obj) {
418
419
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -429,8 +430,8 @@ var deepClone = (obj, options = {}) => {
429
430
  clone2[key] = mergeArray(value, exclude);
430
431
  continue;
431
432
  }
432
- if (isFunction(value) && targetWindow) {
433
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
433
+ if (isFunction(value) && options.window) {
434
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
434
435
  continue;
435
436
  }
436
437
  if (isObjectLike(value)) {
@@ -399,13 +399,14 @@ var deepClone = (obj, options = {}) => {
399
399
  visited = /* @__PURE__ */ new WeakMap(),
400
400
  handleExtend = false
401
401
  } = options;
402
+ const contentWindow = targetWindow || window2 || globalThis;
402
403
  if (!isObjectLike(obj) || isDOMNode(obj)) {
403
404
  return obj;
404
405
  }
405
406
  if (visited.has(obj)) {
406
407
  return visited.get(obj);
407
408
  }
408
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
409
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
409
410
  visited.set(obj, clone2);
410
411
  for (const key in obj) {
411
412
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -422,8 +423,8 @@ var deepClone = (obj, options = {}) => {
422
423
  clone2[key] = mergeArray(value, exclude);
423
424
  continue;
424
425
  }
425
- if (isFunction(value) && targetWindow) {
426
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
426
+ if (isFunction(value) && options.window) {
427
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
427
428
  continue;
428
429
  }
429
430
  if (isObjectLike(value)) {
@@ -440,13 +440,14 @@ var deepClone = (obj, options = {}) => {
440
440
  visited = /* @__PURE__ */ new WeakMap(),
441
441
  handleExtend = false
442
442
  } = options;
443
+ const contentWindow = targetWindow || window2 || globalThis;
443
444
  if (!isObjectLike(obj) || isDOMNode(obj)) {
444
445
  return obj;
445
446
  }
446
447
  if (visited.has(obj)) {
447
448
  return visited.get(obj);
448
449
  }
449
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
450
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
450
451
  visited.set(obj, clone2);
451
452
  for (const key in obj) {
452
453
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -463,8 +464,8 @@ var deepClone = (obj, options = {}) => {
463
464
  clone2[key] = mergeArray(value, exclude);
464
465
  continue;
465
466
  }
466
- if (isFunction(value) && targetWindow) {
467
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
467
+ if (isFunction(value) && options.window) {
468
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
468
469
  continue;
469
470
  }
470
471
  if (isObjectLike(value)) {
@@ -407,13 +407,14 @@ var deepClone = (obj, options = {}) => {
407
407
  visited = /* @__PURE__ */ new WeakMap(),
408
408
  handleExtend = false
409
409
  } = options;
410
+ const contentWindow = targetWindow || window2 || globalThis;
410
411
  if (!isObjectLike(obj) || isDOMNode(obj)) {
411
412
  return obj;
412
413
  }
413
414
  if (visited.has(obj)) {
414
415
  return visited.get(obj);
415
416
  }
416
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
417
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
417
418
  visited.set(obj, clone2);
418
419
  for (const key in obj) {
419
420
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -430,8 +431,8 @@ var deepClone = (obj, options = {}) => {
430
431
  clone2[key] = mergeArray(value, exclude);
431
432
  continue;
432
433
  }
433
- if (isFunction(value) && targetWindow) {
434
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
434
+ if (isFunction(value) && options.window) {
435
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
435
436
  continue;
436
437
  }
437
438
  if (isObjectLike(value)) {
@@ -400,13 +400,14 @@ var deepClone = (obj, options = {}) => {
400
400
  visited = /* @__PURE__ */ new WeakMap(),
401
401
  handleExtend = false
402
402
  } = options;
403
+ const contentWindow = targetWindow || window2 || globalThis;
403
404
  if (!isObjectLike(obj) || isDOMNode(obj)) {
404
405
  return obj;
405
406
  }
406
407
  if (visited.has(obj)) {
407
408
  return visited.get(obj);
408
409
  }
409
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
410
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
410
411
  visited.set(obj, clone2);
411
412
  for (const key in obj) {
412
413
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -423,8 +424,8 @@ var deepClone = (obj, options = {}) => {
423
424
  clone2[key] = mergeArray(value, exclude);
424
425
  continue;
425
426
  }
426
- if (isFunction(value) && targetWindow) {
427
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
427
+ if (isFunction(value) && options.window) {
428
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
428
429
  continue;
429
430
  }
430
431
  if (isObjectLike(value)) {
@@ -410,13 +410,14 @@ var deepClone = (obj, options = {}) => {
410
410
  visited = /* @__PURE__ */ new WeakMap(),
411
411
  handleExtend = false
412
412
  } = options;
413
+ const contentWindow = targetWindow || window2 || globalThis;
413
414
  if (!isObjectLike(obj) || isDOMNode(obj)) {
414
415
  return obj;
415
416
  }
416
417
  if (visited.has(obj)) {
417
418
  return visited.get(obj);
418
419
  }
419
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
420
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
420
421
  visited.set(obj, clone2);
421
422
  for (const key in obj) {
422
423
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -433,8 +434,8 @@ var deepClone = (obj, options = {}) => {
433
434
  clone2[key] = mergeArray(value, exclude);
434
435
  continue;
435
436
  }
436
- if (isFunction(value) && targetWindow) {
437
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
437
+ if (isFunction(value) && options.window) {
438
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
438
439
  continue;
439
440
  }
440
441
  if (isObjectLike(value)) {
@@ -397,13 +397,14 @@ var deepClone = (obj, options = {}) => {
397
397
  visited = /* @__PURE__ */ new WeakMap(),
398
398
  handleExtend = false
399
399
  } = options;
400
+ const contentWindow = targetWindow || window2 || globalThis;
400
401
  if (!isObjectLike(obj) || isDOMNode(obj)) {
401
402
  return obj;
402
403
  }
403
404
  if (visited.has(obj)) {
404
405
  return visited.get(obj);
405
406
  }
406
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
407
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
407
408
  visited.set(obj, clone2);
408
409
  for (const key in obj) {
409
410
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -420,8 +421,8 @@ var deepClone = (obj, options = {}) => {
420
421
  clone2[key] = mergeArray(value, exclude);
421
422
  continue;
422
423
  }
423
- if (isFunction(value) && targetWindow) {
424
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
424
+ if (isFunction(value) && options.window) {
425
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
425
426
  continue;
426
427
  }
427
428
  if (isObjectLike(value)) {
@@ -402,13 +402,14 @@ var deepClone = (obj, options = {}) => {
402
402
  visited = /* @__PURE__ */ new WeakMap(),
403
403
  handleExtend = false
404
404
  } = options;
405
+ const contentWindow = targetWindow || window2 || globalThis;
405
406
  if (!isObjectLike(obj) || isDOMNode(obj)) {
406
407
  return obj;
407
408
  }
408
409
  if (visited.has(obj)) {
409
410
  return visited.get(obj);
410
411
  }
411
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
412
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
412
413
  visited.set(obj, clone2);
413
414
  for (const key in obj) {
414
415
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -425,8 +426,8 @@ var deepClone = (obj, options = {}) => {
425
426
  clone2[key] = mergeArray(value, exclude);
426
427
  continue;
427
428
  }
428
- if (isFunction(value) && targetWindow) {
429
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
429
+ if (isFunction(value) && options.window) {
430
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
430
431
  continue;
431
432
  }
432
433
  if (isObjectLike(value)) {
@@ -397,13 +397,14 @@ var deepClone = (obj, options = {}) => {
397
397
  visited = /* @__PURE__ */ new WeakMap(),
398
398
  handleExtend = false
399
399
  } = options;
400
+ const contentWindow = targetWindow || window2 || globalThis;
400
401
  if (!isObjectLike(obj) || isDOMNode(obj)) {
401
402
  return obj;
402
403
  }
403
404
  if (visited.has(obj)) {
404
405
  return visited.get(obj);
405
406
  }
406
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
407
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
407
408
  visited.set(obj, clone2);
408
409
  for (const key in obj) {
409
410
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -420,8 +421,8 @@ var deepClone = (obj, options = {}) => {
420
421
  clone2[key] = mergeArray(value, exclude);
421
422
  continue;
422
423
  }
423
- if (isFunction(value) && targetWindow) {
424
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
424
+ if (isFunction(value) && options.window) {
425
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
425
426
  continue;
426
427
  }
427
428
  if (isObjectLike(value)) {
@@ -410,13 +410,14 @@ var deepClone = (obj, options = {}) => {
410
410
  visited = /* @__PURE__ */ new WeakMap(),
411
411
  handleExtend = false
412
412
  } = options;
413
+ const contentWindow = targetWindow || window2 || globalThis;
413
414
  if (!isObjectLike(obj) || isDOMNode(obj)) {
414
415
  return obj;
415
416
  }
416
417
  if (visited.has(obj)) {
417
418
  return visited.get(obj);
418
419
  }
419
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
420
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
420
421
  visited.set(obj, clone2);
421
422
  for (const key in obj) {
422
423
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -433,8 +434,8 @@ var deepClone = (obj, options = {}) => {
433
434
  clone2[key] = mergeArray(value, exclude);
434
435
  continue;
435
436
  }
436
- if (isFunction(value) && targetWindow) {
437
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
437
+ if (isFunction(value) && options.window) {
438
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
438
439
  continue;
439
440
  }
440
441
  if (isObjectLike(value)) {
@@ -423,13 +423,14 @@ var deepClone = (obj, options = {}) => {
423
423
  visited = /* @__PURE__ */ new WeakMap(),
424
424
  handleExtend = false
425
425
  } = options;
426
+ const contentWindow = targetWindow || window2 || globalThis;
426
427
  if (!isObjectLike(obj) || isDOMNode(obj)) {
427
428
  return obj;
428
429
  }
429
430
  if (visited.has(obj)) {
430
431
  return visited.get(obj);
431
432
  }
432
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
433
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
433
434
  visited.set(obj, clone2);
434
435
  for (const key in obj) {
435
436
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -446,8 +447,8 @@ var deepClone = (obj, options = {}) => {
446
447
  clone2[key] = mergeArray(value, exclude);
447
448
  continue;
448
449
  }
449
- if (isFunction(value) && targetWindow) {
450
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
450
+ if (isFunction(value) && options.window) {
451
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
451
452
  continue;
452
453
  }
453
454
  if (isObjectLike(value)) {
@@ -443,13 +443,14 @@ var deepClone = (obj, options = {}) => {
443
443
  visited = /* @__PURE__ */ new WeakMap(),
444
444
  handleExtend = false
445
445
  } = options;
446
+ const contentWindow = targetWindow || window2 || globalThis;
446
447
  if (!isObjectLike(obj) || isDOMNode(obj)) {
447
448
  return obj;
448
449
  }
449
450
  if (visited.has(obj)) {
450
451
  return visited.get(obj);
451
452
  }
452
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
453
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
453
454
  visited.set(obj, clone2);
454
455
  for (const key in obj) {
455
456
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -466,8 +467,8 @@ var deepClone = (obj, options = {}) => {
466
467
  clone2[key] = mergeArray(value, exclude);
467
468
  continue;
468
469
  }
469
- if (isFunction(value) && targetWindow) {
470
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
470
+ if (isFunction(value) && options.window) {
471
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
471
472
  continue;
472
473
  }
473
474
  if (isObjectLike(value)) {
@@ -400,13 +400,14 @@ var deepClone = (obj, options = {}) => {
400
400
  visited = /* @__PURE__ */ new WeakMap(),
401
401
  handleExtend = false
402
402
  } = options;
403
+ const contentWindow = targetWindow || window2 || globalThis;
403
404
  if (!isObjectLike(obj) || isDOMNode(obj)) {
404
405
  return obj;
405
406
  }
406
407
  if (visited.has(obj)) {
407
408
  return visited.get(obj);
408
409
  }
409
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
410
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
410
411
  visited.set(obj, clone2);
411
412
  for (const key in obj) {
412
413
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -423,8 +424,8 @@ var deepClone = (obj, options = {}) => {
423
424
  clone2[key] = mergeArray(value, exclude);
424
425
  continue;
425
426
  }
426
- if (isFunction(value) && targetWindow) {
427
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
427
+ if (isFunction(value) && options.window) {
428
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
428
429
  continue;
429
430
  }
430
431
  if (isObjectLike(value)) {
@@ -104,13 +104,14 @@ var deepClone = (obj, options = {}) => {
104
104
  visited = /* @__PURE__ */ new WeakMap(),
105
105
  handleExtend = false
106
106
  } = options;
107
+ const contentWindow = targetWindow || window2 || globalThis;
107
108
  if (!isObjectLike(obj) || isDOMNode(obj)) {
108
109
  return obj;
109
110
  }
110
111
  if (visited.has(obj)) {
111
112
  return visited.get(obj);
112
113
  }
113
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
114
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
114
115
  visited.set(obj, clone2);
115
116
  for (const key in obj) {
116
117
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -127,8 +128,8 @@ var deepClone = (obj, options = {}) => {
127
128
  clone2[key] = mergeArray(value, exclude);
128
129
  continue;
129
130
  }
130
- if (isFunction(value) && targetWindow) {
131
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
131
+ if (isFunction(value) && options.window) {
132
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
132
133
  continue;
133
134
  }
134
135
  if (isObjectLike(value)) {
@@ -391,13 +391,14 @@ var deepClone = (obj, options = {}) => {
391
391
  visited = /* @__PURE__ */ new WeakMap(),
392
392
  handleExtend = false
393
393
  } = options;
394
+ const contentWindow = targetWindow || window2 || globalThis;
394
395
  if (!isObjectLike(obj) || isDOMNode(obj)) {
395
396
  return obj;
396
397
  }
397
398
  if (visited.has(obj)) {
398
399
  return visited.get(obj);
399
400
  }
400
- const clone2 = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
401
+ const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
401
402
  visited.set(obj, clone2);
402
403
  for (const key in obj) {
403
404
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
@@ -414,8 +415,8 @@ var deepClone = (obj, options = {}) => {
414
415
  clone2[key] = mergeArray(value, exclude);
415
416
  continue;
416
417
  }
417
- if (isFunction(value) && targetWindow) {
418
- clone2[key] = targetWindow.eval("(" + value.toString() + ")");
418
+ if (isFunction(value) && options.window) {
419
+ clone2[key] = contentWindow.eval("(" + value.toString() + ")");
419
420
  continue;
420
421
  }
421
422
  if (isObjectLike(value)) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/scratch",
3
3
  "description": "Φ / CSS framework and methodology.",
4
4
  "author": "symbo.ls",
5
- "version": "2.28.54",
5
+ "version": "2.28.56",
6
6
  "files": [
7
7
  "src",
8
8
  "dist"
@@ -25,9 +25,9 @@
25
25
  "prepublish": "rimraf -I dist && npm run build && npm run copy:package:cjs"
26
26
  },
27
27
  "dependencies": {
28
- "@domql/utils": "^2.28.54",
29
- "@symbo.ls/utils": "^2.28.54",
28
+ "@domql/utils": "^2.28.56",
29
+ "@symbo.ls/utils": "^2.28.56",
30
30
  "color-contrast-checker": "^1.5.0"
31
31
  },
32
- "gitHead": "947717d4d20d1ca8c1b66c6f823a767b4843020a"
32
+ "gitHead": "b70ae48a0599b6ae8b5f691c82f27ca0b860a3c6"
33
33
  }