mutts 1.0.10 → 1.0.12

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.
Files changed (61) hide show
  1. package/README.md +3 -3
  2. package/dist/browser.cjs +244 -3199
  3. package/dist/browser.cjs.map +1 -1
  4. package/dist/browser.d.ts +2 -2
  5. package/dist/browser.dev.cjs +51 -50
  6. package/dist/browser.dev.cjs.map +1 -1
  7. package/dist/browser.dev.d.ts +2 -2
  8. package/dist/browser.dev.esm.js +2 -2
  9. package/dist/browser.esm.js +15 -13
  10. package/dist/browser.esm.js.map +1 -1
  11. package/dist/chunks/{index-CaaQQlPJ.esm.js → index-BUop6B2U.esm.js} +384 -981
  12. package/dist/chunks/index-BUop6B2U.esm.js.map +1 -0
  13. package/dist/chunks/index-yK0HVxHv.cjs +2612 -0
  14. package/dist/chunks/index-yK0HVxHv.cjs.map +1 -0
  15. package/dist/chunks/{node-nKJBk8iJ.esm.js → node-Bo7WU5S2.esm.js} +2 -2
  16. package/dist/chunks/{node-nKJBk8iJ.esm.js.map → node-Bo7WU5S2.esm.js.map} +1 -1
  17. package/dist/chunks/{async-node-3PrbVAbB.cjs → node-Dd0esp5F.cjs} +4 -4
  18. package/dist/chunks/node-Dd0esp5F.cjs.map +1 -0
  19. package/dist/chunks/{proxy-Dtg-bJ3T.cjs → proxy-BvM4yewA.cjs} +441 -342
  20. package/dist/chunks/proxy-BvM4yewA.cjs.map +1 -0
  21. package/dist/chunks/{proxy-r7lARftl.esm.js → proxy-D2C49sXH.esm.js} +401 -330
  22. package/dist/chunks/proxy-D2C49sXH.esm.js.map +1 -0
  23. package/dist/debug.cjs +17 -4
  24. package/dist/debug.cjs.map +1 -1
  25. package/dist/debug.d.ts +2 -2
  26. package/dist/debug.esm.js +17 -3
  27. package/dist/debug.esm.js.map +1 -1
  28. package/dist/index.d.ts +84 -209
  29. package/dist/mutts.umd.js +842 -1362
  30. package/dist/mutts.umd.js.map +1 -1
  31. package/dist/mutts.umd.min.js +1 -1
  32. package/dist/mutts.umd.min.js.map +1 -1
  33. package/dist/node.cjs +51 -49
  34. package/dist/node.cjs.map +1 -1
  35. package/dist/node.d.ts +2 -2
  36. package/dist/node.dev.cjs +51 -49
  37. package/dist/node.dev.cjs.map +1 -1
  38. package/dist/node.dev.d.ts +2 -2
  39. package/dist/node.dev.esm.js +3 -3
  40. package/dist/node.esm.js +3 -3
  41. package/dist/{types-W5vD6m2n.d.ts → types-Bx2PhORg.d.ts} +38 -47
  42. package/docs/ai/api-reference.md +0 -14
  43. package/docs/ai/manual.md +2 -22
  44. package/docs/reactive/advanced.md +13 -14
  45. package/docs/reactive/attend.md +1 -2
  46. package/docs/reactive/collections.md +2 -149
  47. package/docs/reactive/core.md +218 -96
  48. package/docs/reactive/debugging.md +2 -2
  49. package/docs/reactive/resource.md +1 -1
  50. package/docs/reactive.md +1 -3
  51. package/docs/zone.md +1 -1
  52. package/package.json +18 -9
  53. package/dist/chunks/async-browser-BU_IfxYD.cjs +0 -216
  54. package/dist/chunks/async-browser-BU_IfxYD.cjs.map +0 -1
  55. package/dist/chunks/async-core-CRLKP3l-.cjs +0 -29
  56. package/dist/chunks/async-core-CRLKP3l-.cjs.map +0 -1
  57. package/dist/chunks/async-node-3PrbVAbB.cjs.map +0 -1
  58. package/dist/chunks/index-CaaQQlPJ.esm.js.map +0 -1
  59. package/dist/chunks/proxy-Dtg-bJ3T.cjs.map +0 -1
  60. package/dist/chunks/proxy-r7lARftl.esm.js.map +0 -1
  61. package/docs/reactive/scan.md +0 -324
package/dist/browser.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Register, Resource, Restorer, ScanResult, addBatchCleanup, allocated, allocatedValues, arrayDiff, arrayEquals, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, caught, chainPromise, cleanedBy, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, immutables, isCached, isConstructor, isNonReactive, isObject, legacyDecorator, lift, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, register, reset, resource, root, scan, setAt, tag, throttle, touched, touched1, unreactive, untracked, watch, when, zip } from './index.js';
2
- export { A as AZone, h as CleanupReason, e as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, F as FunctionWrapper, P as PropTrigger, R as ReactiveError, i as ReactiveErrorCode, S as ScopedCallback, j as Zone, Z as ZoneAggregator, k as ZoneHistory, l as asyncZone, c as cleanup, m as formatCleanupReason, n as isReactive, o as objectToProxy, p as proxyToObject, q as reactiveOptions, s as stopped, u as unwrap } from './types-W5vD6m2n.js';
1
+ export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Resource, Restorer, addBatchCleanup, addUnreactiveProps, allocated, allocatedValues, arrayDiff, arrayEquals, assertUntracked, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, captured, caught, chainPromise, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, isCached, isConstructor, isDev, isNonReactive, isObject, isProd, isTest, legacyDecorator, lift, link, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, reset, resource, root, setAt, tag, throttle, touched, touched1, unlink, unreactive, untracked, watch, when, zip } from './index.js';
2
+ export { A as AZone, C as CleanupReason, c as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, G as GetterWrapper, H as HistoryValue, P as PropTrigger, R as ReactiveError, h as ReactiveErrorCode, S as ScopedCallback, i as Zone, Z as ZoneAggregator, j as ZoneHistory, k as asyncZone, l as debugPreset, m as devPreset, n as formatCleanupReason, o as isReactive, p as objectToProxy, q as prodPreset, r as proxyToObject, s as reactiveOptions, u as unwrap } from './types-Bx2PhORg.js';
@@ -1,52 +1,46 @@
1
1
  'use strict';
2
2
 
3
3
  require('./debug.cjs');
4
- require('./chunks/async-browser-BU_IfxYD.cjs');
5
- var browser = require('./browser.cjs');
6
- var proxy = require('./chunks/proxy-Dtg-bJ3T.cjs');
7
- var asyncCore = require('./chunks/async-core-CRLKP3l-.cjs');
8
- require('./chunks/async-node-3PrbVAbB.cjs');
9
- require('node:async_hooks');
4
+ require('./browser.cjs');
5
+ var index = require('./chunks/index-yK0HVxHv.cjs');
6
+ var proxy = require('./chunks/proxy-BvM4yewA.cjs');
10
7
 
11
8
 
12
9
 
13
- exports.ArrayReadForward = browser.ArrayReadForward;
14
- exports.Destroyable = browser.Destroyable;
15
- exports.DestructionError = browser.DestructionError;
16
- exports.Eventful = browser.Eventful;
17
- exports.Indexable = browser.Indexable;
18
- exports.Register = browser.Register;
19
- exports.allocated = browser.allocated;
20
- exports.allocatedValues = browser.allocatedValues;
21
- exports.arrayDiff = browser.arrayDiff;
22
- exports.attend = browser.attend;
23
- exports.cache = browser.cache;
24
- exports.cached = browser.cached;
25
- exports.callOnGC = browser.callOnGC;
26
- exports.chainPromise = browser.chainPromise;
27
- exports.debounce = browser.debounce;
28
- exports.deepWatch = browser.deepWatch;
29
- exports.deprecated = browser.deprecated;
30
- exports.descriptor = browser.descriptor;
31
- exports.destructor = browser.destructor;
32
- exports.forwardArray = browser.forwardArray;
33
- exports.getAt = browser.getAt;
34
- exports.isCached = browser.isCached;
35
- exports.lift = browser.lift;
36
- exports.memoize = browser.memoize;
37
- exports.morph = browser.morph;
38
- exports.organize = browser.organize;
39
- exports.organized = browser.organized;
40
- exports.profileInfo = browser.profileInfo;
41
- exports.project = browser.morph;
42
- exports.register = browser.register;
43
- exports.resource = browser.resource;
44
- exports.scan = browser.scan;
45
- exports.setAt = browser.setAt;
46
- exports.throttle = browser.throttle;
47
- exports.unreactive = browser.unreactive;
48
- exports.watch = browser.watch;
49
- exports.when = browser.when;
10
+ exports.ArrayReadForward = index.ArrayReadForward;
11
+ exports.Destroyable = index.Destroyable;
12
+ exports.DestructionError = index.DestructionError;
13
+ exports.Eventful = index.Eventful;
14
+ exports.Indexable = index.Indexable;
15
+ exports.allocated = index.allocated;
16
+ exports.allocatedValues = index.allocatedValues;
17
+ exports.arrayDiff = index.arrayDiff;
18
+ exports.attend = index.attend;
19
+ exports.cache = index.cache;
20
+ exports.cached = index.cached;
21
+ exports.callOnGC = index.callOnGC;
22
+ exports.chainPromise = index.chainPromise;
23
+ exports.debounce = index.debounce;
24
+ exports.deepWatch = index.deepWatch;
25
+ exports.deprecated = index.deprecated;
26
+ exports.descriptor = index.descriptor;
27
+ exports.destructor = index.destructor;
28
+ exports.forwardArray = index.forwardArray;
29
+ exports.getAt = index.getAt;
30
+ exports.isCached = index.isCached;
31
+ exports.lift = index.lift;
32
+ exports.memoize = index.memoize;
33
+ exports.morph = index.morph;
34
+ exports.organize = index.organize;
35
+ exports.organized = index.organized;
36
+ exports.profileInfo = index.profileInfo;
37
+ exports.project = index.morph;
38
+ exports.resource = index.resource;
39
+ exports.setAt = index.setAt;
40
+ exports.throttle = index.throttle;
41
+ exports.unreactive = index.unreactive;
42
+ exports.watch = index.watch;
43
+ exports.when = index.when;
50
44
  exports.AZone = proxy.AZone;
51
45
  exports.DecoratorError = proxy.DecoratorError;
52
46
  exports.IterableWeakMap = proxy.IterableWeakMap;
@@ -61,18 +55,23 @@ exports.Zone = proxy.Zone;
61
55
  exports.ZoneAggregator = proxy.ZoneAggregator;
62
56
  exports.ZoneHistory = proxy.ZoneHistory;
63
57
  exports.addBatchCleanup = proxy.addBatchCleanup;
58
+ exports.addUnreactiveProps = proxy.addUnreactiveProps;
64
59
  exports.arrayEquals = proxy.arrayEquals;
60
+ exports.assertUntracked = proxy.assertUntracked;
61
+ exports.asyncHook = proxy.asyncHook;
62
+ exports.asyncHooks = proxy.asyncHooks;
65
63
  exports.asyncZone = proxy.asyncZone;
66
64
  exports.atom = proxy.atom;
67
65
  exports.atomic = proxy.atomic;
68
66
  exports.biDi = proxy.biDi;
67
+ exports.captured = proxy.captured;
69
68
  exports.caught = proxy.caught;
70
- exports.cleanedBy = proxy.cleanedBy;
71
- exports.cleanup = proxy.cleanup;
72
69
  exports.createFlavor = proxy.createFlavor;
70
+ exports.debugPreset = proxy.debugPreset;
73
71
  exports.decorator = proxy.decorator;
74
72
  exports.deepCompare = proxy.deepCompare;
75
73
  exports.defer = proxy.defer;
74
+ exports.devPreset = proxy.devPreset;
76
75
  exports.effect = proxy.effect;
77
76
  exports.effectAggregator = proxy.effectAggregator;
78
77
  exports.flavorOptions = proxy.flavorOptions;
@@ -81,30 +80,32 @@ exports.formatCleanupReason = proxy.formatCleanupReason;
81
80
  exports.getActivationLog = proxy.getActivationLog;
82
81
  exports.getActiveEffect = proxy.getActiveEffect;
83
82
  exports.getState = proxy.getState;
84
- exports.immutables = proxy.immutables;
83
+ exports.hooks = proxy.hooks;
85
84
  exports.isConstructor = proxy.isConstructor;
85
+ exports.isDev = proxy.isDev;
86
86
  exports.isNonReactive = proxy.isNonReactive;
87
87
  exports.isObject = proxy.isObject;
88
+ exports.isProd = proxy.isProd;
88
89
  exports.isReactive = proxy.isReactive;
90
+ exports.isTest = proxy.isTest;
89
91
  exports.legacyDecorator = proxy.legacyDecorator;
92
+ exports.link = proxy.link;
90
93
  exports.mixin = proxy.mixin;
91
94
  exports.modernDecorator = proxy.modernDecorator;
92
95
  exports.named = proxy.named;
93
96
  exports.objectToProxy = proxy.objectToProxy;
94
97
  exports.onEffectThrow = proxy.onEffectThrow;
98
+ exports.prodPreset = proxy.prodPreset;
95
99
  exports.proxyToObject = proxy.proxyToObject;
96
100
  exports.reactive = proxy.reactive;
97
101
  exports.reactiveOptions = proxy.options;
98
102
  exports.reset = proxy.reset;
99
103
  exports.root = proxy.root;
100
- exports.stopped = proxy.stopped;
101
104
  exports.tag = proxy.tag;
102
105
  exports.touched = proxy.touched;
103
106
  exports.touched1 = proxy.touched1;
107
+ exports.unlink = proxy.unlink;
104
108
  exports.untracked = proxy.untracked;
105
109
  exports.unwrap = proxy.unwrap;
106
110
  exports.zip = proxy.zip;
107
- exports.asyncHook = asyncCore.asyncHook;
108
- exports.asyncHooks = asyncCore.asyncHooks;
109
- exports.hooks = asyncCore.hooks;
110
111
  //# sourceMappingURL=browser.dev.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"browser.dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- export { A as AZone, h as CleanupReason, e as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, F as FunctionWrapper, P as PropTrigger, R as ReactiveError, i as ReactiveErrorCode, S as ScopedCallback, j as Zone, Z as ZoneAggregator, k as ZoneHistory, l as asyncZone, c as cleanup, m as formatCleanupReason, n as isReactive, o as objectToProxy, p as proxyToObject, q as reactiveOptions, s as stopped, u as unwrap } from './types-W5vD6m2n.js';
2
- export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Register, Resource, Restorer, ScanResult, addBatchCleanup, allocated, allocatedValues, arrayDiff, arrayEquals, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, caught, chainPromise, cleanedBy, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, immutables, isCached, isConstructor, isNonReactive, isObject, legacyDecorator, lift, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, register, reset, resource, root, scan, setAt, tag, throttle, touched, touched1, unreactive, untracked, watch, when, zip } from './index.js';
1
+ export { A as AZone, C as CleanupReason, c as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, G as GetterWrapper, H as HistoryValue, P as PropTrigger, R as ReactiveError, h as ReactiveErrorCode, S as ScopedCallback, i as Zone, Z as ZoneAggregator, j as ZoneHistory, k as asyncZone, l as debugPreset, m as devPreset, n as formatCleanupReason, o as isReactive, p as objectToProxy, q as prodPreset, r as proxyToObject, s as reactiveOptions, u as unwrap } from './types-Bx2PhORg.js';
2
+ export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Resource, Restorer, addBatchCleanup, addUnreactiveProps, allocated, allocatedValues, arrayDiff, arrayEquals, assertUntracked, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, captured, caught, chainPromise, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, isCached, isConstructor, isDev, isNonReactive, isObject, isProd, isTest, legacyDecorator, lift, link, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, reset, resource, root, setAt, tag, throttle, touched, touched1, unlink, unreactive, untracked, watch, when, zip } from './index.js';
@@ -1,5 +1,5 @@
1
1
  import './debug.esm.js';
2
2
  import './browser.esm.js';
3
- export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, R as Register, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as register, y as resource, z as scan, B as setAt, C as throttle, F as unreactive, G as watch, H as when } from './chunks/index-CaaQQlPJ.esm.js';
4
- export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as arrayEquals, h as asyncHook, i as asyncHooks, j as asyncZone, k as atom, l as atomic, m as biDi, n as caught, o as cleanedBy, p as cleanup, q as createFlavor, r as decorator, s as deepCompare, t as defer, u as effect, v as effectAggregator, w as flavorOptions, x as flavored, y as formatCleanupReason, z as getActivationLog, B as getActiveEffect, C as getState, E as hooks, F as immutables, G as isConstructor, H as isNonReactive, J as isObject, K as isReactive, L as legacyDecorator, M as mixin, N as modernDecorator, O as named, P as objectToProxy, Q as onEffectThrow, S as proxyToObject, T as reactive, U as reactiveOptions, V as reset, W as root, X as stopped, Y as tag, _ as touched, $ as touched1, a0 as untracked, a1 as unwrap, a2 as zip } from './chunks/proxy-r7lARftl.esm.js';
3
+ export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as resource, y as setAt, z as throttle, B as unreactive, C as watch, F as when } from './chunks/index-BUop6B2U.esm.js';
4
+ export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as addUnreactiveProps, h as arrayEquals, i as assertUntracked, j as asyncHook, k as asyncHooks, l as asyncZone, m as atom, n as atomic, o as biDi, p as captured, q as caught, r as createFlavor, s as debugPreset, t as decorator, u as deepCompare, v as defer, w as devPreset, x as effect, y as effectAggregator, z as flavorOptions, B as flavored, C as formatCleanupReason, E as getActivationLog, F as getActiveEffect, G as getState, H as hooks, J as isConstructor, K as isDev, L as isNonReactive, M as isObject, N as isProd, O as isReactive, P as isTest, Q as legacyDecorator, S as link, T as mixin, U as modernDecorator, V as named, W as objectToProxy, X as onEffectThrow, Y as prodPreset, _ as proxyToObject, $ as reactive, a0 as reactiveOptions, a1 as reset, a2 as root, a3 as tag, a4 as touched, a5 as touched1, a6 as unlink, a7 as untracked, a8 as unwrap, a9 as zip } from './chunks/proxy-D2C49sXH.esm.js';
5
5
  //# sourceMappingURL=browser.dev.esm.js.map
@@ -1,6 +1,6 @@
1
- import { E as hooks, i as asyncHooks } from './chunks/proxy-r7lARftl.esm.js';
2
- export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as arrayEquals, h as asyncHook, j as asyncZone, k as atom, l as atomic, m as biDi, n as caught, o as cleanedBy, p as cleanup, q as createFlavor, r as decorator, s as deepCompare, t as defer, u as effect, v as effectAggregator, w as flavorOptions, x as flavored, y as formatCleanupReason, z as getActivationLog, B as getActiveEffect, C as getState, F as immutables, G as isConstructor, H as isNonReactive, J as isObject, K as isReactive, L as legacyDecorator, M as mixin, N as modernDecorator, O as named, P as objectToProxy, Q as onEffectThrow, S as proxyToObject, T as reactive, U as reactiveOptions, V as reset, W as root, X as stopped, Y as tag, _ as touched, $ as touched1, a0 as untracked, a1 as unwrap, a2 as zip } from './chunks/proxy-r7lARftl.esm.js';
3
- export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, R as Register, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as register, y as resource, z as scan, B as setAt, C as throttle, F as unreactive, G as watch, H as when } from './chunks/index-CaaQQlPJ.esm.js';
1
+ import { H as hooks, k as asyncHooks } from './chunks/proxy-D2C49sXH.esm.js';
2
+ export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as addUnreactiveProps, h as arrayEquals, i as assertUntracked, j as asyncHook, l as asyncZone, m as atom, n as atomic, o as biDi, p as captured, q as caught, r as createFlavor, s as debugPreset, t as decorator, u as deepCompare, v as defer, w as devPreset, x as effect, y as effectAggregator, z as flavorOptions, B as flavored, C as formatCleanupReason, E as getActivationLog, F as getActiveEffect, G as getState, J as isConstructor, K as isDev, L as isNonReactive, M as isObject, N as isProd, O as isReactive, P as isTest, Q as legacyDecorator, S as link, T as mixin, U as modernDecorator, V as named, W as objectToProxy, X as onEffectThrow, Y as prodPreset, _ as proxyToObject, $ as reactive, a0 as reactiveOptions, a1 as reset, a2 as root, a3 as tag, a4 as touched, a5 as touched1, a6 as unlink, a7 as untracked, a8 as unwrap, a9 as zip } from './chunks/proxy-D2C49sXH.esm.js';
3
+ export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as resource, y as setAt, z as throttle, B as unreactive, C as watch, F as when } from './chunks/index-BUop6B2U.esm.js';
4
4
 
5
5
  const promiseContexts = new WeakMap();
6
6
  // [HACK]: Sanitization
@@ -39,21 +39,23 @@ function wrap(fn, capturedRestorers) {
39
39
  return fn.apply(this, args);
40
40
  }
41
41
  finally {
42
+ /* cf BROWSER_ASYNC_POLYFILL.md
43
+ // Note: my fear about this code: in between 2~3~4 microtask waits, some other microtasks might have started, stopped, ...
44
+ // We might be in the middle of another promise hook trying to setup the zone
45
+ // TODO We might wish to have a flag :asyncZone.acquired - like a semaphore - that we falsify here and set back when we setup the zone
46
+ // - but this might perhaps be an overkill creating more problems than it solves
42
47
  if (originals.queueMicrotask) {
43
48
  // Double microtask ensures we run after the first await resumption microtask
44
49
  originals.queueMicrotask.call(globalThis, () => {
45
50
  originals.queueMicrotask.call(globalThis, () => {
46
51
  originals.queueMicrotask.call(globalThis, () => {
47
- for (let i = undoers.length - 1; i >= 0; i--)
48
- undoers[i]();
49
- });
50
- });
51
- });
52
- }
53
- else {
54
- for (let i = undoers.length - 1; i >= 0; i--)
55
- undoers[i]();
56
- }
52
+ for (let i = undoers.length - 1; i >= 0; i--) undoers[i]()
53
+ })
54
+ })
55
+ })
56
+ } else {
57
+ for (let i = undoers.length - 1; i >= 0; i--) undoers[i]()
58
+ }*/
57
59
  }
58
60
  };
59
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"browser.esm.js","sources":["../src/async/browser.ts"],"sourcesContent":["import { asyncHooks, hooks, type Restorer } from '.'\n\nconst promiseContexts = new WeakMap<Promise<any>, Set<Restorer>>()\n\n// [HACK]: Sanitization\n// If a Promise is created inside the zone, it carries the \"Sticky\" zone context.\n// If returned to the outer scope, that context leaks. We wrap it in a new Promise\n// created here (in the outer scope) to break the chain and sanitize the return value.\n// See BROWSER_ASYNC_POLYFILL.md for full details.\nasyncHooks.sanitizePromise = (res: any) => {\n\tif (res && typeof (res as any).then === 'function') {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\t;(res as any).then(resolve, reject)\n\t\t\t}, 0)\n\t\t})\n\t}\n\treturn res\n}\n\nfunction captureRestorers() {\n\tconst restorers = new Set<Restorer>()\n\tfor (const hook of hooks) {\n\t\tconst restorer = hook()\n\t\tif (restorer) restorers.add(restorer)\n\t}\n\treturn restorers\n}\n\nfunction wrap<Args extends any[], R>(\n\tfn: ((...args: Args) => R) | null | undefined,\n\tcapturedRestorers?: Set<Restorer>\n) {\n\tif (typeof fn !== 'function') return fn\n\tconst restorers = capturedRestorers || captureRestorers()\n\treturn function (this: any, ...args: Args) {\n\t\tconst undoers: (() => void)[] = []\n\t\tfor (const restore of restorers) undoers.push(restore())\n\t\ttry {\n\t\t\treturn fn.apply(this, args)\n\t\t} finally {\n\t\t\tif (originals.queueMicrotask) {\n\t\t\t\t// Double microtask ensures we run after the first await resumption microtask\n\t\t\t\toriginals.queueMicrotask.call(globalThis, () => {\n\t\t\t\t\toriginals.queueMicrotask.call(globalThis, () => {\n\t\t\t\t\t\toriginals.queueMicrotask.call(globalThis, () => {\n\t\t\t\t\t\t\tfor (let i = undoers.length - 1; i >= 0; i--) undoers[i]()\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tfor (let i = undoers.length - 1; i >= 0; i--) undoers[i]()\n\t\t\t}\n\t\t}\n\t}\n}\n\nconst GLOBAL_ORIGINALS = Symbol.for('mutts.originals')\nconst GLOBAL_PROMISE = Symbol.for('mutts.OriginalPromise')\n\nlet originals: any\nlet OriginalPromise: any\n\nif ((globalThis as any)[GLOBAL_ORIGINALS]) {\n\toriginals = (globalThis as any)[GLOBAL_ORIGINALS]\n\tOriginalPromise = (globalThis as any)[GLOBAL_PROMISE]\n} else {\n\tOriginalPromise = globalThis.Promise\n\toriginals = {\n\t\t// biome-ignore lint/suspicious/noThenProperty: Intentional Promise.prototype patching\n\t\tthen: OriginalPromise.prototype.then,\n\t\tcatch: OriginalPromise.prototype.catch,\n\t\tfinally: OriginalPromise.prototype.finally,\n\t\tresolve: OriginalPromise.resolve,\n\t\treject: OriginalPromise.reject,\n\t\tall: OriginalPromise.all,\n\t\tallSettled: (OriginalPromise as any).allSettled,\n\t\trace: OriginalPromise.race,\n\t\tany: (OriginalPromise as any).any,\n\t\tsetTimeout: globalThis.setTimeout,\n\t\tsetInterval: globalThis.setInterval,\n\t\tsetImmediate: (globalThis as any).setImmediate,\n\t\trequestAnimationFrame: (globalThis as any).requestAnimationFrame,\n\t\tqueueMicrotask: globalThis.queueMicrotask,\n\t}\n\t;(globalThis as any)[GLOBAL_ORIGINALS] = originals\n\t;(globalThis as any)[GLOBAL_PROMISE] = OriginalPromise\n}\n\n// Ensure modern statics are captured even if originals was cached from an older version\nif (!originals.allSettled) originals.allSettled = (OriginalPromise as any).allSettled\nif (!originals.any) originals.any = (OriginalPromise as any).any\nif (!originals.race) originals.race = OriginalPromise.race\n\nfunction patchedThen(this: any, onFulfilled: any, onRejected: any) {\n\tconst context = promiseContexts.get(this) || captureRestorers()\n\tconst nextPromise = originals.then.call(\n\t\tthis,\n\t\twrap(onFulfilled, context),\n\t\twrap(onRejected, context)\n\t)\n\tif (context.size > 0) promiseContexts.set(nextPromise, context)\n\treturn nextPromise\n}\n\nfunction patchedCatch(this: any, onRejected: any) {\n\tconst context = promiseContexts.get(this) || captureRestorers()\n\tconst nextPromise = originals.catch.call(this, wrap(onRejected, context))\n\tif (context.size > 0) promiseContexts.set(nextPromise, context)\n\treturn nextPromise\n}\n\nfunction patchedFinally(this: any, onFinally: any) {\n\tconst context = promiseContexts.get(this) || captureRestorers()\n\tconst nextPromise = originals.finally.call(this, wrap(onFinally, context))\n\tif (context.size > 0) promiseContexts.set(nextPromise, context)\n\treturn nextPromise\n}\n\nfunction PatchedPromise<T>(\n\tthis: any,\n\texecutor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void\n) {\n\tif (typeof executor === 'function') {\n\t\tconst p = new OriginalPromise((resolve, reject) => {\n\t\t\tconst wrappedResolve = wrap(resolve)\n\t\t\tconst wrappedReject = wrap(reject)\n\t\t\texecutor(wrappedResolve, wrappedReject)\n\t\t})\n\t\tconst context = captureRestorers()\n\t\tpromiseContexts.set(p, context) // Always set, even if empty (Sticky Root)\n\t\treturn p\n\t}\n\treturn new OriginalPromise(executor)\n}\n\n// Copy statics\nObject.assign(PatchedPromise, OriginalPromise as any)\n\n// Inherit prototype for instanceof checks\nPatchedPromise.prototype = OriginalPromise.prototype\n\nPatchedPromise.resolve = (<T>(value?: T | PromiseLike<T>): Promise<T> => {\n\tconst p = originals.resolve.call(OriginalPromise, value) as Promise<T>\n\tconst context = captureRestorers()\n\t// Ensure we don't overwrite if it already has context (e.g. from constructor)\n\tif (context.size > 0 && !promiseContexts.has(p)) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.reject = (<T = never>(reason?: any): Promise<T> => {\n\tconst p = originals.reject.call(OriginalPromise, reason) as Promise<T>\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.all = (<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]> => {\n\tconst p = originals.all.call(OriginalPromise, values) as Promise<Awaited<T>[]>\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.allSettled = (<T>(\n\tvalues: Iterable<T | PromiseLike<T>>\n): Promise<PromiseSettledResult<Awaited<T>>[]> => {\n\tconst p = (originals.allSettled as any).call(OriginalPromise, values)\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.race = (<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>> => {\n\tconst p = originals.race.call(OriginalPromise, values) as Promise<Awaited<T>>\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.any = (<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>> => {\n\tconst p = (originals.any as any).call(OriginalPromise, values)\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\n// Only apply patches if not already applied (or re-apply safely)\n// Note: OriginalPromise.prototype might be shared if we used the global one.\n// We must ensure we don't patch it twice if it's the SAME object.\nif (OriginalPromise.prototype.then !== patchedThen) {\n\t// biome-ignore lint/suspicious/noThenProperty: Intentional Promise.prototype patching\n\tOriginalPromise.prototype.then = patchedThen as any\n\tOriginalPromise.prototype.catch = patchedCatch as any\n\tOriginalPromise.prototype.finally = patchedFinally as any\n}\n\ntry {\n\tObject.defineProperty(OriginalPromise, Symbol.species, {\n\t\tget: () => PatchedPromise,\n\t\tconfigurable: true,\n\t})\n} catch (_e) {}\n\n;(globalThis as any).Promise = PatchedPromise\n\nglobalThis.setTimeout = ((callback: Function, ...args: any[]) => {\n\treturn originals.setTimeout.call(globalThis, wrap(callback as any), ...args)\n}) as any\n\nglobalThis.setInterval = ((callback: Function, ...args: any[]) => {\n\treturn originals.setInterval.call(globalThis, wrap(callback as any), ...args)\n}) as any\n\nif (originals.setImmediate) {\n\t;(globalThis as any).setImmediate = ((callback: Function, ...args: any[]) => {\n\t\treturn originals.setImmediate.call(globalThis, wrap(callback as any), ...args)\n\t}) as any\n}\n\nif (originals.requestAnimationFrame) {\n\tglobalThis.requestAnimationFrame = (callback: FrameRequestCallback) => {\n\t\treturn originals.requestAnimationFrame.call(globalThis, wrap(callback))\n\t}\n}\n\nif (originals.queueMicrotask) {\n\tglobalThis.queueMicrotask = (callback: VoidFunction): void => {\n\t\toriginals.queueMicrotask.call(globalThis, wrap(callback))\n\t}\n}\n"],"names":[],"mappings":";;;;AAEA,MAAM,eAAe,GAAG,IAAI,OAAO,EAA+B;AAElE;AACA;AACA;AACA;AACA;AACA,UAAU,CAAC,eAAe,GAAG,CAAC,GAAQ,KAAI;IACzC,IAAI,GAAG,IAAI,OAAQ,GAAW,CAAC,IAAI,KAAK,UAAU,EAAE;QACnD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;YACtC,UAAU,CAAC,MAAK;AACb,gBAAA,GAAW,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;YACpC,CAAC,EAAE,CAAC,CAAC;AACN,QAAA,CAAC,CAAC;IACH;AACA,IAAA,OAAO,GAAG;AACX,CAAC;AAED,SAAS,gBAAgB,GAAA;AACxB,IAAA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAY;AACrC,IAAA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9E,CAAC,CAAQ;AAET,IAAI,SAAS,CAAC,YAAY,EAAE;IACzB,UAAkB,CAAC,YAAY,IAAI,CAAC,QAAkB,EAAE,GAAG,IAAW,KAAI;AAC3E,QAAA,OAAO,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAe,CAAC,EAAE,GAAG,IAAI,CAAC;AAC/E,IAAA,CAAC,CAAQ;AACV;AAEA,IAAI,SAAS,CAAC,qBAAqB,EAAE;AACpC,IAAA,UAAU,CAAC,qBAAqB,GAAG,CAAC,QAA8B,KAAI;AACrE,QAAA,OAAO,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;AACxE,IAAA,CAAC;AACF;AAEA,IAAI,SAAS,CAAC,cAAc,EAAE;AAC7B,IAAA,UAAU,CAAC,cAAc,GAAG,CAAC,QAAsB,KAAU;AAC5D,QAAA,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC1D,IAAA,CAAC;AACF;;;;"}
1
+ {"version":3,"file":"browser.esm.js","sources":["../src/async/browser.ts"],"sourcesContent":["import { asyncHooks, hooks, type Restorer } from '.'\n\nconst promiseContexts = new WeakMap<Promise<any>, Set<Restorer>>()\n\n// [HACK]: Sanitization\n// If a Promise is created inside the zone, it carries the \"Sticky\" zone context.\n// If returned to the outer scope, that context leaks. We wrap it in a new Promise\n// created here (in the outer scope) to break the chain and sanitize the return value.\n// See BROWSER_ASYNC_POLYFILL.md for full details.\nasyncHooks.sanitizePromise = (res: any) => {\n\tif (res && typeof (res as any).then === 'function') {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\t;(res as any).then(resolve, reject)\n\t\t\t}, 0)\n\t\t})\n\t}\n\treturn res\n}\n\nfunction captureRestorers() {\n\tconst restorers = new Set<Restorer>()\n\tfor (const hook of hooks) {\n\t\tconst restorer = hook()\n\t\tif (restorer) restorers.add(restorer)\n\t}\n\treturn restorers\n}\n\nfunction wrap<Args extends any[], R>(\n\tfn: ((...args: Args) => R) | null | undefined,\n\tcapturedRestorers?: Set<Restorer>\n) {\n\tif (typeof fn !== 'function') return fn\n\tconst restorers = capturedRestorers || captureRestorers()\n\treturn function (this: any, ...args: Args) {\n\t\tconst undoers: (() => void)[] = []\n\t\tfor (const restore of restorers) undoers.push(restore())\n\t\ttry {\n\t\t\treturn fn.apply(this, args)\n\t\t} finally {\n\t\t\t/* cf BROWSER_ASYNC_POLYFILL.md\n\t\t\t// Note: my fear about this code: in between 2~3~4 microtask waits, some other microtasks might have started, stopped, ...\n\t\t\t// We might be in the middle of another promise hook trying to setup the zone\n\t\t\t// TODO We might wish to have a flag :asyncZone.acquired - like a semaphore - that we falsify here and set back when we setup the zone\n\t\t\t// - but this might perhaps be an overkill creating more problems than it solves\n\t\t\tif (originals.queueMicrotask) {\n\t\t\t\t// Double microtask ensures we run after the first await resumption microtask\n\t\t\t\toriginals.queueMicrotask.call(globalThis, () => {\n\t\t\t\t\toriginals.queueMicrotask.call(globalThis, () => {\n\t\t\t\t\t\toriginals.queueMicrotask.call(globalThis, () => {\n\t\t\t\t\t\t\tfor (let i = undoers.length - 1; i >= 0; i--) undoers[i]()\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tfor (let i = undoers.length - 1; i >= 0; i--) undoers[i]()\n\t\t\t}*/\n\t\t}\n\t}\n}\n\nconst GLOBAL_ORIGINALS = Symbol.for('mutts.originals')\nconst GLOBAL_PROMISE = Symbol.for('mutts.OriginalPromise')\n\nlet originals: any\nlet OriginalPromise: any\n\nif ((globalThis as any)[GLOBAL_ORIGINALS]) {\n\toriginals = (globalThis as any)[GLOBAL_ORIGINALS]\n\tOriginalPromise = (globalThis as any)[GLOBAL_PROMISE]\n} else {\n\tOriginalPromise = globalThis.Promise\n\toriginals = {\n\t\t// biome-ignore lint/suspicious/noThenProperty: Intentional Promise.prototype patching\n\t\tthen: OriginalPromise.prototype.then,\n\t\tcatch: OriginalPromise.prototype.catch,\n\t\tfinally: OriginalPromise.prototype.finally,\n\t\tresolve: OriginalPromise.resolve,\n\t\treject: OriginalPromise.reject,\n\t\tall: OriginalPromise.all,\n\t\tallSettled: (OriginalPromise as any).allSettled,\n\t\trace: OriginalPromise.race,\n\t\tany: (OriginalPromise as any).any,\n\t\tsetTimeout: globalThis.setTimeout,\n\t\tsetInterval: globalThis.setInterval,\n\t\tsetImmediate: (globalThis as any).setImmediate,\n\t\trequestAnimationFrame: (globalThis as any).requestAnimationFrame,\n\t\tqueueMicrotask: globalThis.queueMicrotask,\n\t}\n\t;(globalThis as any)[GLOBAL_ORIGINALS] = originals\n\t;(globalThis as any)[GLOBAL_PROMISE] = OriginalPromise\n}\n\n// Ensure modern statics are captured even if originals was cached from an older version\nif (!originals.allSettled) originals.allSettled = (OriginalPromise as any).allSettled\nif (!originals.any) originals.any = (OriginalPromise as any).any\nif (!originals.race) originals.race = OriginalPromise.race\n\nfunction patchedThen(this: any, onFulfilled: any, onRejected: any) {\n\tconst context = promiseContexts.get(this) || captureRestorers()\n\tconst nextPromise = originals.then.call(\n\t\tthis,\n\t\twrap(onFulfilled, context),\n\t\twrap(onRejected, context)\n\t)\n\tif (context.size > 0) promiseContexts.set(nextPromise, context)\n\treturn nextPromise\n}\n\nfunction patchedCatch(this: any, onRejected: any) {\n\tconst context = promiseContexts.get(this) || captureRestorers()\n\tconst nextPromise = originals.catch.call(this, wrap(onRejected, context))\n\tif (context.size > 0) promiseContexts.set(nextPromise, context)\n\treturn nextPromise\n}\n\nfunction patchedFinally(this: any, onFinally: any) {\n\tconst context = promiseContexts.get(this) || captureRestorers()\n\tconst nextPromise = originals.finally.call(this, wrap(onFinally, context))\n\tif (context.size > 0) promiseContexts.set(nextPromise, context)\n\treturn nextPromise\n}\n\nfunction PatchedPromise<T>(\n\tthis: any,\n\texecutor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void\n) {\n\tif (typeof executor === 'function') {\n\t\tconst p = new OriginalPromise((resolve, reject) => {\n\t\t\tconst wrappedResolve = wrap(resolve)\n\t\t\tconst wrappedReject = wrap(reject)\n\t\t\texecutor(wrappedResolve, wrappedReject)\n\t\t})\n\t\tconst context = captureRestorers()\n\t\tpromiseContexts.set(p, context) // Always set, even if empty (Sticky Root)\n\t\treturn p\n\t}\n\treturn new OriginalPromise(executor)\n}\n\n// Copy statics\nObject.assign(PatchedPromise, OriginalPromise as any)\n\n// Inherit prototype for instanceof checks\nPatchedPromise.prototype = OriginalPromise.prototype\n\nPatchedPromise.resolve = (<T>(value?: T | PromiseLike<T>): Promise<T> => {\n\tconst p = originals.resolve.call(OriginalPromise, value) as Promise<T>\n\tconst context = captureRestorers()\n\t// Ensure we don't overwrite if it already has context (e.g. from constructor)\n\tif (context.size > 0 && !promiseContexts.has(p)) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.reject = (<T = never>(reason?: any): Promise<T> => {\n\tconst p = originals.reject.call(OriginalPromise, reason) as Promise<T>\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.all = (<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]> => {\n\tconst p = originals.all.call(OriginalPromise, values) as Promise<Awaited<T>[]>\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.allSettled = (<T>(\n\tvalues: Iterable<T | PromiseLike<T>>\n): Promise<PromiseSettledResult<Awaited<T>>[]> => {\n\tconst p = (originals.allSettled as any).call(OriginalPromise, values)\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.race = (<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>> => {\n\tconst p = originals.race.call(OriginalPromise, values) as Promise<Awaited<T>>\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\nPatchedPromise.any = (<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>> => {\n\tconst p = (originals.any as any).call(OriginalPromise, values)\n\tconst context = captureRestorers()\n\tif (context.size > 0) promiseContexts.set(p, context)\n\treturn p\n}) as any\n\n// Only apply patches if not already applied (or re-apply safely)\n// Note: OriginalPromise.prototype might be shared if we used the global one.\n// We must ensure we don't patch it twice if it's the SAME object.\nif (OriginalPromise.prototype.then !== patchedThen) {\n\t// biome-ignore lint/suspicious/noThenProperty: Intentional Promise.prototype patching\n\tOriginalPromise.prototype.then = patchedThen as any\n\tOriginalPromise.prototype.catch = patchedCatch as any\n\tOriginalPromise.prototype.finally = patchedFinally as any\n}\n\ntry {\n\tObject.defineProperty(OriginalPromise, Symbol.species, {\n\t\tget: () => PatchedPromise,\n\t\tconfigurable: true,\n\t})\n} catch (_e) {}\n\n;(globalThis as any).Promise = PatchedPromise\n\nglobalThis.setTimeout = ((callback: Function, ...args: any[]) => {\n\treturn originals.setTimeout.call(globalThis, wrap(callback as any), ...args)\n}) as any\n\nglobalThis.setInterval = ((callback: Function, ...args: any[]) => {\n\treturn originals.setInterval.call(globalThis, wrap(callback as any), ...args)\n}) as any\n\nif (originals.setImmediate) {\n\t;(globalThis as any).setImmediate = ((callback: Function, ...args: any[]) => {\n\t\treturn originals.setImmediate.call(globalThis, wrap(callback as any), ...args)\n\t}) as any\n}\n\nif (originals.requestAnimationFrame) {\n\tglobalThis.requestAnimationFrame = (callback: FrameRequestCallback) => {\n\t\treturn originals.requestAnimationFrame.call(globalThis, wrap(callback))\n\t}\n}\n\nif (originals.queueMicrotask) {\n\tglobalThis.queueMicrotask = (callback: VoidFunction): void => {\n\t\toriginals.queueMicrotask.call(globalThis, wrap(callback))\n\t}\n}\n"],"names":[],"mappings":";;;;AAEA,MAAM,eAAe,GAAG,IAAI,OA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