@graphrefly/graphrefly 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/budget-gate-CmmVtasH.d.ts +115 -0
- package/dist/budget-gate-DiP_nK0n.d.cts +115 -0
- package/dist/{cascading-BsJ4GbnS.d.ts → cascading-BzuxW0_w.d.cts} +2 -2
- package/dist/{cascading-B25wxpRa.d.cts → cascading-g2_rhhaM.d.ts} +2 -2
- package/dist/chunk-35JTVPOX.js +1 -0
- package/dist/chunk-3G5U5QNE.js +5 -0
- package/dist/{chunk-PHXZRR6C.js → chunk-4I45FVQS.js} +1 -1
- package/dist/chunk-5LK7XMEV.js +1 -0
- package/dist/{chunk-FWGIZP3W.js → chunk-5XRI6RM3.js} +1 -1
- package/dist/chunk-73PBQNST.js +1 -0
- package/dist/chunk-7JRF5YEK.js +3 -0
- package/dist/{chunk-4BDQXBXE.js → chunk-7NZMZJMW.js} +1 -1
- package/dist/chunk-7QFRK3N3.js +84 -0
- package/dist/{chunk-POCWFIJ7.js → chunk-7SD73DS6.js} +1 -1
- package/dist/{chunk-NBGPXQSP.js → chunk-A6ZSKGUG.js} +1 -1
- package/dist/{chunk-7KZZLWZ6.js → chunk-AU7YTQX7.js} +1 -1
- package/dist/chunk-C72GO4IZ.js +1 -0
- package/dist/{chunk-B5S7KTGP.js → chunk-CGDMTXSY.js} +1 -1
- package/dist/chunk-D27JNOLZ.js +1 -0
- package/dist/chunk-D47YVDR5.js +1 -0
- package/dist/chunk-EWF7KCDJ.js +61 -0
- package/dist/{chunk-IBGE62GZ.js → chunk-GEAO3TL3.js} +1 -1
- package/dist/chunk-GX5LSSRE.js +1 -0
- package/dist/{chunk-O245YLM5.js → chunk-HAWKGIXM.js} +1 -1
- package/dist/chunk-HX3EGQ5Z.js +1 -0
- package/dist/{chunk-RZ5HKPGI.js → chunk-IA7DUNGB.js} +1 -1
- package/dist/{chunk-K5C67OGE.js → chunk-INH6FS2G.js} +2 -2
- package/dist/chunk-INHC33EH.js +1 -0
- package/dist/chunk-IUB4NYI2.js +1 -0
- package/dist/{chunk-UVLZX2OU.js → chunk-JNMC2WJ6.js} +1 -1
- package/dist/{chunk-O2BLVQU4.js → chunk-KD4NHLMU.js} +1 -1
- package/dist/chunk-L6NSJVJZ.js +1 -0
- package/dist/{chunk-6773HURD.js → chunk-L7WY6TZS.js} +1 -1
- package/dist/chunk-LQNOXGET.js +1 -0
- package/dist/chunk-MC4UYY2X.js +1 -0
- package/dist/{chunk-6KZZ6XQE.js → chunk-N7UIBZCW.js} +1 -1
- package/dist/chunk-NQI2C36M.js +1 -0
- package/dist/chunk-R75BMDLA.js +1 -0
- package/dist/chunk-RF3QZP6D.js +1 -0
- package/dist/{chunk-NV63VQHI.js → chunk-S2U57TFC.js} +1 -1
- package/dist/{chunk-SP5O2MIX.js → chunk-SC7BQDNP.js} +1 -1
- package/dist/{chunk-6VFC334U.js → chunk-TFPZLQ5H.js} +1 -1
- package/dist/chunk-VJJLIEAL.js +1 -0
- package/dist/{chunk-FAYEMS5M.js → chunk-WHIZM6JV.js} +1 -1
- package/dist/chunk-XEUANKBO.js +43 -0
- package/dist/{chunk-DSOVKKTI.js → chunk-XQ55HO5N.js} +1 -1
- package/dist/chunk-ZJ7SM3G2.js +1 -0
- package/dist/{chunk-TMVY7OWG.js → chunk-ZOX3LBRV.js} +1 -1
- package/dist/compat/index.cjs +9 -13
- package/dist/compat/index.d.cts +16 -16
- package/dist/compat/index.d.ts +16 -16
- package/dist/compat/index.js +1 -1
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nestjs/index.cjs +7 -11
- package/dist/compat/nestjs/index.d.cts +8 -8
- package/dist/compat/nestjs/index.d.ts +8 -8
- package/dist/compat/nestjs/index.js +1 -1
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/zustand/index.cjs +3 -7
- package/dist/compat/zustand/index.d.cts +4 -4
- package/dist/compat/zustand/index.d.ts +4 -4
- package/dist/compat/zustand/index.js +1 -1
- package/dist/{composite-CgG0MqHm.d.cts → composite-CKd0e2vz.d.cts} +2 -2
- package/dist/{composite-DTOlDuch.d.ts → composite-DGatA-JK.d.ts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +1 -1
- package/dist/extra/browser.d.cts +1 -1
- package/dist/extra/browser.d.ts +1 -1
- package/dist/extra/index.cjs +16 -20
- package/dist/extra/index.d.cts +11 -9
- package/dist/extra/index.d.ts +11 -9
- package/dist/extra/index.js +1 -1
- package/dist/extra/node.cjs +2 -2
- package/dist/extra/node.d.cts +1 -1
- package/dist/extra/node.d.ts +1 -1
- package/dist/extra/node.js +1 -1
- package/dist/extra/operators.cjs +1 -1
- package/dist/extra/operators.d.cts +1 -1
- package/dist/extra/operators.d.ts +1 -1
- package/dist/extra/operators.js +1 -1
- package/dist/extra/reactive.cjs +1 -1
- package/dist/extra/reactive.d.cts +3 -3
- package/dist/extra/reactive.d.ts +3 -3
- package/dist/extra/reactive.js +1 -1
- package/dist/extra/render/index.cjs +5 -0
- package/dist/extra/render/index.d.cts +183 -0
- package/dist/extra/render/index.d.ts +183 -0
- package/dist/extra/render/index.js +1 -0
- package/dist/extra/sources.cjs +1 -1
- package/dist/extra/sources.d.cts +1 -1
- package/dist/extra/sources.d.ts +1 -1
- package/dist/extra/sources.js +1 -1
- package/dist/extra/storage-browser.d.cts +1 -1
- package/dist/extra/storage-browser.d.ts +1 -1
- package/dist/{fallback-axI2cXwt.d.cts → fallback-8JYU8tlT.d.cts} +1 -1
- package/dist/{fallback-DuEXfA4F.d.ts → fallback-CMZl39L5.d.ts} +1 -1
- package/dist/graph/index.cjs +7 -7
- package/dist/graph/index.d.cts +5 -5
- package/dist/graph/index.d.ts +5 -5
- package/dist/graph/index.js +1 -1
- package/dist/{graph-BjW1taJl.d.ts → graph-30XSgtVX.d.ts} +76 -100
- package/dist/{graph-CHsVwf9S.d.cts → graph-BUwMAxJI.d.cts} +76 -100
- package/dist/{index-CIcu6fIR.d.ts → index-2n8Eai6M.d.ts} +1 -1
- package/dist/{index-CrlHFsiT.d.ts → index-89FczVZ_.d.ts} +41 -85
- package/dist/{index-CM-i58FY.d.cts → index-8R1vzNOx.d.cts} +9 -9
- package/dist/{index-CDvC1m5p.d.ts → index-B2RUoIUz.d.ts} +1 -1
- package/dist/{index-BFaALJxR.d.ts → index-B41Asm7D.d.ts} +10 -8
- package/dist/{index-D-HZ7sP4.d.ts → index-B9fmw5n2.d.ts} +4 -6
- package/dist/{index-Bn0uZEL4.d.ts → index-BAlaVimV.d.ts} +9 -9
- package/dist/{index-DJVQ-t07.d.ts → index-BC9VybQs.d.ts} +41 -48
- package/dist/{index-5dNRlW7J.d.ts → index-BEHmxORq.d.ts} +11 -11
- package/dist/{index-DJNAWzcH.d.cts → index-BJ26eEjs.d.cts} +26 -19
- package/dist/{index-BiomL7AW.d.ts → index-BJSZxSFX.d.ts} +1 -1
- package/dist/{index-Czk3r0yA.d.cts → index-BKMdnYnk.d.ts} +56 -54
- package/dist/{index-BsZk9T8y.d.ts → index-BM9szD8n.d.cts} +14 -6
- package/dist/{index-BmWuVdER.d.ts → index-BUPVld1w.d.ts} +2 -2
- package/dist/{index-BwOsJfLJ.d.ts → index-BXd6OMEy.d.ts} +3 -3
- package/dist/index-BhUaMYm_.d.ts +113 -0
- package/dist/{index-BpMZzX9P.d.cts → index-BndG0cpK.d.cts} +3 -3
- package/dist/{index-AUqWe_fX.d.ts → index-Br3WnqEn.d.ts} +81 -9
- package/dist/{index-BhzwpIJc.d.cts → index-BskfDoZ_.d.ts} +14 -6
- package/dist/{index-D9vBTuzo.d.ts → index-C19qqa38.d.ts} +4 -4
- package/dist/{index-B-ORMr3k.d.ts → index-C7VV_qOs.d.ts} +4 -4
- package/dist/{index-BWUMIt7J.d.cts → index-CIRG8Hxp.d.cts} +11 -11
- package/dist/{index-B3D_z0Z6.d.cts → index-CL7oilfm.d.cts} +1 -1
- package/dist/{index-ML6vHKXK.d.ts → index-CPhBvRJU.d.ts} +1 -1
- package/dist/{index-CQsqqEVz.d.cts → index-CWHtYmSh.d.cts} +1 -1
- package/dist/{index-DKrIuF-r.d.ts → index-Cey6VTnX.d.ts} +8 -5
- package/dist/{resilience-BWP2c7Af.d.cts → index-CmqiJZKM.d.ts} +141 -23
- package/dist/{index-JYtN9uqM.d.ts → index-CoM4rzyB.d.ts} +1 -1
- package/dist/{index-C56XZiDe.d.cts → index-CpLpJb6A.d.cts} +8 -5
- package/dist/{index-BjWZARLy.d.ts → index-Ctb7_2sG.d.ts} +1 -1
- package/dist/index-CusEP3Sv.d.ts +210 -0
- package/dist/{resilience-Bys63Cpd.d.ts → index-CwP_KAMS.d.cts} +141 -23
- package/dist/{index-BFuVcqL8.d.cts → index-D3ayz3hy.d.cts} +1 -1
- package/dist/{index-Bpr0Pwgl.d.cts → index-DCbE8fFM.d.cts} +3 -3
- package/dist/{index-CAbHN_rP.d.cts → index-DIHcMLr6.d.cts} +1 -1
- package/dist/index-DINuaZlJ.d.cts +210 -0
- package/dist/{index-9xhIaM-w.d.cts → index-DOBLxOti.d.cts} +1 -1
- package/dist/{index-Di7OdwlO.d.ts → index-DQUVq1_d.d.ts} +37 -90
- package/dist/{index-BgzPO43H.d.cts → index-DTtBpuQy.d.cts} +4 -6
- package/dist/{index-D_QQ_dTD.d.cts → index-DYTBbF8T.d.cts} +1 -1
- package/dist/{index-UsU9ptzs.d.cts → index-DlgHqQxW.d.cts} +81 -9
- package/dist/{index-DTDVDzhA.d.ts → index-DlrWu9Hs.d.cts} +56 -54
- package/dist/{index-B2IUcH13.d.cts → index-DoYc8BWK.d.cts} +41 -48
- package/dist/{index-BUFCHvOR.d.ts → index-DszPlZzK.d.ts} +3 -3
- package/dist/{index-BqcgiSQg.d.cts → index-DyM4tFAe.d.cts} +10 -8
- package/dist/{index-CAV-3RpJ.d.cts → index-FVoPvhAu.d.cts} +4 -4
- package/dist/{index-Ckil6miL.d.cts → index-H_I66pav.d.cts} +2 -2
- package/dist/{index-C-3UXnHT.d.cts → index-IwFqHxCs.d.cts} +2 -2
- package/dist/index-K-vl_c6A.d.cts +113 -0
- package/dist/{index-CijfwEWx.d.ts → index-KlZ_ZUip.d.cts} +3 -3
- package/dist/{index-Bub6x_D4.d.cts → index-L8XI8Zql.d.cts} +37 -90
- package/dist/{index-DeSsvHDD.d.cts → index-MxYuWOrf.d.cts} +3 -3
- package/dist/{index-CpZKtdMw.d.cts → index-PgwvGWa1.d.cts} +1 -1
- package/dist/{index-Vz7KPfgz.d.ts → index-PlJ3MraE.d.ts} +1 -1
- package/dist/{index-BI1wMfyc.d.ts → index-PqbnoScQ.d.ts} +3 -3
- package/dist/{index-BsgxnHN8.d.cts → index-PsVHpPwP.d.cts} +3 -3
- package/dist/{index-D-B7U42V.d.cts → index-WyFKER-c.d.ts} +3 -3
- package/dist/{index-DY2f2b9z.d.ts → index-eaQuGJnv.d.ts} +3 -3
- package/dist/{index-DqICM_I7.d.ts → index-iTX5IqSP.d.ts} +67 -9
- package/dist/{index-Byp771zP.d.ts → index-jKLph6cu.d.ts} +2 -2
- package/dist/{index-CEVzBWeB.d.ts → index-jr6PuSBt.d.ts} +26 -19
- package/dist/{index-BkQqf1EF.d.cts → index-mNwgxC21.d.cts} +67 -9
- package/dist/{index-BaSy4L6w.d.cts → index-pVDQcbar.d.cts} +41 -85
- package/dist/{index-D7-RSD93.d.cts → index-xZYcDqFH.d.cts} +4 -4
- package/dist/{index-8OxXae3g.d.ts → index-yLt-aPMp.d.ts} +1 -1
- package/dist/{index-CqSJ25A9.d.cts → index-z8WFPVI8.d.cts} +1 -1
- package/dist/index.cjs +63 -59
- package/dist/index.d.cts +48 -47
- package/dist/index.d.ts +48 -47
- package/dist/index.js +1 -1
- package/dist/{meta-DreaEM_a.d.cts → meta-Ct9nqQS5.d.cts} +11 -7
- package/dist/{meta-BYqlATmg.d.ts → meta-D8OyedKp.d.ts} +11 -7
- package/dist/{node-fSc-hCv8.d.cts → node-BYInONRr.d.cts} +3 -3
- package/dist/{node-fSc-hCv8.d.ts → node-BYInONRr.d.ts} +3 -3
- package/dist/{observable-Cqty11jG.d.cts → observable-DMIlYJV1.d.cts} +1 -1
- package/dist/{observable-EAV_rNfM.d.ts → observable-DO8DDEzv.d.ts} +1 -1
- package/dist/patterns/ai/browser.cjs +5 -5
- package/dist/patterns/ai/browser.d.cts +4 -4
- package/dist/patterns/ai/browser.d.ts +4 -4
- package/dist/patterns/ai/browser.js +1 -1
- package/dist/patterns/ai/index.cjs +16 -20
- package/dist/patterns/ai/index.d.cts +17 -17
- package/dist/patterns/ai/index.d.ts +17 -17
- package/dist/patterns/ai/index.js +1 -1
- package/dist/patterns/ai/node.cjs +1 -1
- package/dist/patterns/ai/node.d.cts +4 -4
- package/dist/patterns/ai/node.d.ts +4 -4
- package/dist/patterns/ai/node.js +1 -1
- package/dist/patterns/audit/index.cjs +3 -7
- package/dist/patterns/audit/index.d.cts +6 -6
- package/dist/patterns/audit/index.d.ts +6 -6
- package/dist/patterns/audit/index.js +1 -1
- package/dist/patterns/cqrs/index.cjs +3 -7
- package/dist/patterns/cqrs/index.d.cts +6 -6
- package/dist/patterns/cqrs/index.d.ts +6 -6
- package/dist/patterns/cqrs/index.js +1 -1
- package/dist/patterns/demo-shell/index.cjs +5 -8
- package/dist/patterns/demo-shell/index.d.cts +5 -5
- package/dist/patterns/demo-shell/index.d.ts +5 -5
- package/dist/patterns/demo-shell/index.js +1 -1
- package/dist/patterns/domain-templates/index.cjs +3 -7
- package/dist/patterns/domain-templates/index.d.cts +4 -4
- package/dist/patterns/domain-templates/index.d.ts +4 -4
- package/dist/patterns/domain-templates/index.js +1 -1
- package/dist/patterns/graphspec/index.cjs +37 -37
- package/dist/patterns/graphspec/index.d.cts +5 -5
- package/dist/patterns/graphspec/index.d.ts +5 -5
- package/dist/patterns/graphspec/index.js +1 -1
- package/dist/patterns/guarded-execution/index.cjs +3 -7
- package/dist/patterns/guarded-execution/index.d.cts +7 -7
- package/dist/patterns/guarded-execution/index.d.ts +7 -7
- package/dist/patterns/guarded-execution/index.js +1 -1
- package/dist/patterns/harness/index.cjs +8 -12
- package/dist/patterns/harness/index.d.cts +12 -12
- package/dist/patterns/harness/index.d.ts +12 -12
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +3 -7
- package/dist/patterns/job-queue/index.d.cts +6 -6
- package/dist/patterns/job-queue/index.d.ts +6 -6
- package/dist/patterns/job-queue/index.js +1 -1
- package/dist/patterns/lens/index.cjs +3 -7
- package/dist/patterns/lens/index.d.cts +6 -6
- package/dist/patterns/lens/index.d.ts +6 -6
- package/dist/patterns/lens/index.js +1 -1
- package/dist/patterns/memory/index.cjs +3 -7
- package/dist/patterns/memory/index.d.cts +6 -6
- package/dist/patterns/memory/index.d.ts +6 -6
- package/dist/patterns/memory/index.js +1 -1
- package/dist/patterns/messaging/index.cjs +3 -7
- package/dist/patterns/messaging/index.d.cts +5 -5
- package/dist/patterns/messaging/index.d.ts +5 -5
- package/dist/patterns/messaging/index.js +1 -1
- package/dist/patterns/orchestration/index.cjs +3 -7
- package/dist/patterns/orchestration/index.d.cts +8 -8
- package/dist/patterns/orchestration/index.d.ts +8 -8
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.cjs +1 -1
- package/dist/patterns/process/index.d.cts +7 -7
- package/dist/patterns/process/index.d.ts +7 -7
- package/dist/patterns/process/index.js +1 -1
- package/dist/patterns/reactive-layout/index.cjs +4 -8
- package/dist/patterns/reactive-layout/index.d.cts +5 -5
- package/dist/patterns/reactive-layout/index.d.ts +5 -5
- package/dist/patterns/reactive-layout/index.js +1 -1
- package/dist/patterns/reduction/index.cjs +3 -7
- package/dist/patterns/reduction/index.d.cts +4 -4
- package/dist/patterns/reduction/index.d.ts +4 -4
- package/dist/patterns/reduction/index.js +1 -1
- package/dist/patterns/refine-loop/index.cjs +5 -9
- package/dist/patterns/refine-loop/index.d.cts +6 -6
- package/dist/patterns/refine-loop/index.d.ts +6 -6
- package/dist/patterns/refine-loop/index.js +1 -1
- package/dist/patterns/resilient-pipeline/index.cjs +1 -1
- package/dist/patterns/resilient-pipeline/index.d.cts +4 -8
- package/dist/patterns/resilient-pipeline/index.d.ts +4 -8
- package/dist/patterns/resilient-pipeline/index.js +1 -1
- package/dist/patterns/surface/index.cjs +12 -16
- package/dist/patterns/surface/index.d.cts +6 -6
- package/dist/patterns/surface/index.d.ts +6 -6
- package/dist/patterns/surface/index.js +1 -1
- package/dist/{pipeline-graph-DuHpXSOn.d.cts → pipeline-graph-BQPr2Lqs.d.cts} +34 -17
- package/dist/{pipeline-graph-9JBbmRxA.d.ts → pipeline-graph-D8vKcO_p.d.ts} +34 -17
- package/dist/{reactive-layout-BMLDB4Vd.d.cts → reactive-layout-8CSc0tiA.d.cts} +2 -2
- package/dist/{reactive-layout-D-tRiNhg.d.ts → reactive-layout-DkTXxtSy.d.ts} +2 -2
- package/dist/{reactive-log-BgWSA1fg.d.ts → reactive-log-BlAsPLl2.d.ts} +2 -2
- package/dist/{reactive-log-C3IMAGpT.d.cts → reactive-log-_zeEnB9H.d.cts} +2 -2
- package/dist/{reactive-map-DmgeADH8.d.cts → reactive-map-B2qfD3hb.d.cts} +1 -1
- package/dist/{reactive-map-CHyeCf4D.d.ts → reactive-map-jFIsE6Kt.d.ts} +1 -1
- package/dist/resilience-HTF2LBRS.js +1 -0
- package/dist/{sugar-D13E2M_z.d.ts → sugar-BhfjgetH.d.ts} +1 -1
- package/dist/{sugar-DgaGJcI6.d.cts → sugar-DzePN5-g.d.cts} +1 -1
- package/dist/{topology-tree-jrZue3ao.d.cts → topology-tree-B5Ngw3j0.d.cts} +1 -1
- package/dist/{topology-tree-D47-nI6Z.d.ts → topology-tree-BtvbgMXJ.d.ts} +1 -1
- package/dist/{types-BMSGPlpO.d.cts → types-1Dhoi7HM.d.cts} +1 -1
- package/dist/{types-CidcBDuk.d.ts → types-39jk0kaV.d.ts} +1 -1
- package/package.json +11 -1
- package/dist/chunk-2YFDSYEF.js +0 -1
- package/dist/chunk-5BGFS2XH.js +0 -1
- package/dist/chunk-CMTN3KPT.js +0 -80
- package/dist/chunk-DQJLC6YY.js +0 -1
- package/dist/chunk-G7JN6LCB.js +0 -1
- package/dist/chunk-KJEAIIIY.js +0 -43
- package/dist/chunk-LV3ACS5J.js +0 -1
- package/dist/chunk-NN3QPJ6U.js +0 -1
- package/dist/chunk-NSAZ6PR6.js +0 -1
- package/dist/chunk-O32GJOUJ.js +0 -1
- package/dist/chunk-QEVSIVSF.js +0 -1
- package/dist/chunk-QMC2PLNM.js +0 -7
- package/dist/chunk-QOJFR6GS.js +0 -1
- package/dist/chunk-SFK7MN7S.js +0 -1
- package/dist/chunk-TB7JKSVS.js +0 -61
- package/dist/chunk-UAXFKMAG.js +0 -1
- package/dist/chunk-XIMFHEKV.js +0 -1
- package/dist/chunk-XLMYQB6F.js +0 -1
- package/dist/chunk-XLYF4LBH.js +0 -1
- package/dist/imperative-audit-ahAE65a9.d.cts +0 -28
- package/dist/imperative-audit-ahAE65a9.d.ts +0 -28
- package/dist/index-CpdnP-0y.d.cts +0 -186
- package/dist/index-DOU1Ee_k.d.ts +0 -186
- package/dist/resilience-LGBK236C.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import '../../node-
|
|
1
|
+
import '../../node-BYInONRr.js';
|
|
2
2
|
import '../../extra/sources.js';
|
|
3
|
-
import '../../graph-
|
|
4
|
-
import '../../index-
|
|
5
|
-
export { A as AnalyzeEvent, B as BlindVariationContext, d as BlindVariationOptions, C as ConvergenceOptions, D as DatasetItem, e as DecideEvent, f as ErrorCritiqueContext, g as ErrorCritiqueOptions, a as EvalResult, h as EvaluateEvent, E as Evaluator, F as Feedback, G as GenerateEvent, I as Iteration, j as RefineLoopGraph, b as RefineLoopOptions, c as RefineStatus, R as RefineStrategy, k as blindVariation, l as errorCritique, r as refineLoop } from '../../index-
|
|
6
|
-
import '../../meta-
|
|
3
|
+
import '../../graph-30XSgtVX.js';
|
|
4
|
+
import '../../index-DszPlZzK.js';
|
|
5
|
+
export { A as AnalyzeEvent, B as BlindVariationContext, d as BlindVariationOptions, C as ConvergenceOptions, D as DatasetItem, e as DecideEvent, f as ErrorCritiqueContext, g as ErrorCritiqueOptions, a as EvalResult, h as EvaluateEvent, E as Evaluator, F as Feedback, G as GenerateEvent, I as Iteration, j as RefineLoopGraph, b as RefineLoopOptions, c as RefineStatus, R as RefineStrategy, k as blindVariation, l as errorCritique, r as refineLoop } from '../../index-PqbnoScQ.js';
|
|
6
|
+
import '../../meta-D8OyedKp.js';
|
|
7
7
|
import '../../extra/storage-core.js';
|
|
8
8
|
import '../../extra/storage-tiers.js';
|
|
9
|
-
import '../../reactive-log-
|
|
9
|
+
import '../../reactive-log-BlAsPLl2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-HAWKGIXM.js";import"../../chunk-N7UIBZCW.js";import"../../chunk-R75BMDLA.js";import"../../chunk-3G5U5QNE.js";import"../../chunk-C72GO4IZ.js";import"../../chunk-4I45FVQS.js";import"../../chunk-L6NSJVJZ.js";import"../../chunk-7JRF5YEK.js";import"../../chunk-SGS4OJGS.js";import"../../chunk-ESMPEKEV.js";import"../../chunk-L7WY6TZS.js";import"../../chunk-4VVTGLXJ.js";import"../../chunk-35JTVPOX.js";import"../../chunk-AU7YTQX7.js";import"../../chunk-IA7DUNGB.js";import"../../chunk-LYCLF26R.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{b as blindVariation,c as errorCritique,a as refineLoop};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var he=Object.defineProperty;var _t=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var vt=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var Tt=(t,e)=>{for(var n in e)he(t,n,{get:e[n],enumerable:!0})},xt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of wt(e))!vt.call(t,o)&&o!==n&&he(t,o,{get:()=>e[o],enumerable:!(r=_t(e,o))||r.enumerable});return t};var kt=t=>xt(he({},"__esModule",{value:!0}),t);function I(t){return t<0?0:t}function Nt(t,e){return e==="none"?t:e==="full"?Math.random()*t:t/2+Math.random()*(t/2)}function Et(t,e){return t+Math.random()*(e-t)}function St(t){let e=I(t);return()=>e}function Rt(t,e){let n=I(t),r=e===void 0?n:I(e);return o=>n+r*Math.max(0,o)}function Ot(t){let e=I(t?.baseNs??1e8),n=t?.factor!==void 0&&t.factor<1?1:t?.factor??2,r=I(t?.maxDelayNs??30*1e9),o=t?.jitter??"none";return a=>{let s;if(e===0)s=0;else if(n===1)s=e;else{let i=r/e,u=1;for(let c=0;c<Math.max(0,a);c++){if(u>=i){u=i;break}u*=n}s=e*u,s>r&&(s=r)}return Nt(s,o)}}function At(t=100*1e6,e=30*1e9){let n=I(t),r=I(e);function o(a){if(a<=0)return 1;let s=1,i=2;for(let u=1;u<a;u++){let c=s+i;s=i,i=c}return i}return a=>{let s=o(a)*n;return s<=r?s:r}}function Mt(t=100*1e6,e=30*1e9){return(n,r,o)=>{let s=Math.min(e,(o??t)*3);return Et(t,s)}}function me(t){if(t==="constant")return St(1*1e9);if(t==="linear")return Rt(1*1e9);if(t==="exponential")return Ot();if(t==="fibonacci")return At();if(t==="decorrelatedJitter")return Mt();throw new Error(`Unknown backoff preset: "${String(t)}". Use one of: constant, linear, exponential, fibonacci, decorrelatedJitter`)}var A,F,ge=N(()=>{"use strict";A=1e6,F=1e9});function Fe(){return U>0||Q}function Le(){return U>0}function Pe(t){U>0?ee.push(t):t()}function be(t){U+=1;let e=!1;try{t()}catch(n){throw e=!0,n}finally{if(U-=1,U===0)if(e){if(!Q){let n=ee.splice(0);for(let r of n)try{r()}catch{}L.length=0,P.length=0,W.length=0}}else Ct()}}function Ct(){let t=!Q;t&&(Q=!0);let e=[],n=0;try{for(;L.length>0||P.length>0||W.length>0||t&&ee.length>0;){if(t&&ee.length>0){let a=ee.splice(0);for(let s of a)try{s()}catch(i){e.push(i)}continue}if(n+=1,n>1e3)throw L.length=0,P.length=0,W.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let o=(L.length>0?L:P.length>0?P:W).splice(0);for(let a of o)try{a()}catch(s){e.push(s)}}}finally{t&&(Q=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function oe(t,e,n){if(e.length===0)return;if(e.length===1){let c=n(e[0][0]);if(c<3||!Fe()){t(e);return}(c>=5?W:c===4?P:L).push(()=>t(e));return}let r=e.length,o=r,a=r,s=r,i=0;for(;i<r&&n(e[i][0])<3;)i++;for(o=i;i<r&&n(e[i][0])===3;)i++;for(a=i;i<r&&n(e[i][0])===4;)i++;s=i;let u=Fe();if(o>0){let c=e.slice(0,o);t(c)}if(a>o){let c=e.slice(o,a);u?L.push(()=>t(c)):t(c)}if(s>a){let c=e.slice(a,s);u?P.push(()=>t(c)):t(c)}if(r>s){let c=e.slice(s,r);u?W.push(()=>t(c)):t(c)}}var U,Q,L,P,W,ee,ye=N(()=>{"use strict";U=0,Q=!1,L=[],P=[],W=[],ee=[]});function $(){return Math.trunc(performance.now()*1e6)}function Be(){return Date.now()*1e6}var _e=N(()=>{"use strict"});var j,y,T,v,B,R,C,S,w,g,z,we,Dt,ve,It,Ft,Te,Ge,Ve,He,xe,q=N(()=>{"use strict";j=Symbol.for("graphrefly/START"),y=Symbol.for("graphrefly/DATA"),T=Symbol.for("graphrefly/DIRTY"),v=Symbol.for("graphrefly/RESOLVED"),B=Symbol.for("graphrefly/INVALIDATE"),R=Symbol.for("graphrefly/PAUSE"),C=Symbol.for("graphrefly/RESUME"),S=Symbol.for("graphrefly/TEARDOWN"),w=Symbol.for("graphrefly/COMPLETE"),g=Symbol.for("graphrefly/ERROR"),z=Object.freeze([T]),we=Object.freeze([v]),Dt=Object.freeze([B]),ve=Object.freeze([j]),It=Object.freeze([w]),Ft=Object.freeze([S]),Te=Object.freeze([z]),Ge=Object.freeze([we]),Ve=Object.freeze([Dt]),He=Object.freeze([It]),xe=Object.freeze([Ft])});var K,Ue=N(()=>{"use strict";K=class extends Error{actor;action;nodeName;constructor(e,n){super(n??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}}});function We(t){t.registerCodec(Lt)}var Lt,$e=N(()=>{"use strict";Lt={name:"json",version:1,contentType:"application/json",encode(t){let e=JSON.stringify(t);return new TextEncoder().encode(e)},decode(t,e){let n=new TextDecoder().decode(t);return JSON.parse(n)}}});function se(t){if(t==null)return Pt;let{type:e,id:n,...r}=t;return{type:e??"system",id:n??"",...r}}var Pt,je=N(()=>{"use strict";Pt={type:"system",id:""}});function ze(t){t.registerMessageType(j,{tier:0,wireCrossing:!1}),t.registerMessageType(T,{tier:1,wireCrossing:!1}),t.registerMessageType(B,{tier:1,wireCrossing:!1,metaPassthrough:!1}),t.registerMessageType(R,{tier:2,wireCrossing:!1}),t.registerMessageType(C,{tier:2,wireCrossing:!1}),t.registerMessageType(y,{tier:3,wireCrossing:!0}),t.registerMessageType(v,{tier:3,wireCrossing:!0}),t.registerMessageType(w,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(g,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(S,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var ie,qe=N(()=>{"use strict";q();ie=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=n=>{let r=this._messageTypes.get(n);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,n){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(e){let n=this._messageTypes.get(e);return n!=null?n.tier:1}isWireCrossing(e){let n=this._messageTypes.get(e);return n!=null?n.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let n=this._messageTypes.get(e);return n!=null?n.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}}});function ke(t){if(t===void 0)return null;if(typeof t=="number"){if(!Number.isFinite(t))throw new TypeError(`Cannot hash non-finite number: ${t}`);if(Number.isInteger(t)&&!Number.isSafeInteger(t))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${t}. Cross-language cid parity is not guaranteed for unsafe integers.`);return t}if(typeof t=="string"||typeof t=="boolean"||t===null)return t;if(Array.isArray(t))return t.map(ke);if(typeof t=="object"&&t!==null){let e={};for(let n of Object.keys(t).sort())e[n]=ke(t[n]);return e}return null}function Vt(t){let e=Gt.encode(t),n=e.length,r=n*8,o=n+9+63&-64,a=new Uint8Array(o);a.set(e),a[n]=128;let s=new DataView(a.buffer);s.setUint32(o-4,r>>>0,!1),s.setUint32(o-8,Math.floor(r/4294967296)>>>0,!1);let i=1779033703,u=3144134277,c=1013904242,d=2773480762,f=1359893119,b=2600822924,p=528734635,_=1541459225,h=new Uint32Array(64),l=(x,E)=>x>>>E|x<<32-E;for(let x=0;x<o;x+=64){for(let k=0;k<16;k++)h[k]=s.getUint32(x+k*4,!1);for(let k=16;k<64;k++){let X=h[k-15],Z=h[k-2],re=l(X,7)^l(X,18)^X>>>3,pe=l(Z,17)^l(Z,19)^Z>>>10;h[k]=h[k-16]+re+h[k-7]+pe>>>0}let E=i,Y=u,J=c,le=d,M=f,te=b,ne=p,fe=_;for(let k=0;k<64;k++){let X=l(M,6)^l(M,11)^l(M,25),Z=M&te^~M&ne,re=fe+X+Z+Bt[k]+h[k]>>>0,pe=l(E,2)^l(E,13)^l(E,22),bt=E&Y^E&J^Y&J,yt=pe+bt>>>0;fe=ne,ne=te,te=M,M=le+re>>>0,le=J,J=Y,Y=E,E=re+yt>>>0}i=i+E>>>0,u=u+Y>>>0,c=c+J>>>0,d=d+le>>>0,f=f+M>>>0,b=b+te>>>0,p=p+ne>>>0,_=_+fe>>>0}let m=x=>x.toString(16).padStart(8,"0");return m(i)+m(u)+m(c)+m(d)+m(f)+m(b)+m(p)+m(_)}function Ne(t){let e=ke(t??null),n=JSON.stringify(e);return Vt(n).slice(0,16)}function Ht(){let t=globalThis.crypto;if(t?.randomUUID)return t.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=e()+e()+e()+e();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function Ee(t,e,n){let r=n?.id??Ht();if(t===0)return{id:r,version:0};let a=(n?.hash??Ne)(e);return{id:r,version:0,cid:a,prev:null}}function Ke(t,e,n){t.version+=1,"cid"in t&&(t.prev=t.cid,t.cid=n(e))}var Bt,Gt,Ye=N(()=>{"use strict";Bt=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Gt=new TextEncoder});function Ze(t){return{node:t,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Se(t){t.prevData=void 0,t.dirty=!1,t.involvedThisWave=!1,t.dataBatch.length=0,t.terminal=void 0}function ae(t){return t.length===0?t:typeof t[0]=="symbol"?[t]:t}function G(t,e,n){let r=Qe(t)?t:[],o=typeof t=="function"?t:typeof e=="function"?e:void 0,a={};return Qe(t)?a=(Re(e)?e:n)??{}:Re(t)?a=t:a=(Re(e)?e:n)??{},new ue(r,o,a)}var Je,Xe,Ut,Wt,Oe,ue,Qe,Re,ce=N(()=>{"use strict";$e();je();ye();_e();qe();Ue();q();Ye();Je=()=>{},Xe=100;Ut=(t,e,n,r)=>{n.direction==="down-in"&&t._onDepMessage(n.depIndex,e)},Wt=(t,e,n,r)=>{let o=t;if(o._status==="completed"||o._status==="errored")return;let a=o._cached,s=a===void 0?[ve]:[ve,[y,a]];o._status==="dirty"&&s.push(z),oe(e,s,o._config.tierOf)},Oe=new ie({onMessage:Ut,onSubscribe:Wt});ze(Oe);We(Oe);ue=class t{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,n,r){this._config=r.config??Oe,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=n,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=e.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??Ne;let o=r.versioning??this._config.defaultVersioning;this._versioningLevel=o,this._versioning=o!=null?Ee(o,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ze);let a={};for(let[i,u]of Object.entries(r.meta??{})){let c={initial:u,name:`${r.name??"node"}:meta:${i}`,describeKind:"state",config:this._config};r.guard!=null&&(c.guard=r.guard),a[i]=new t([],void 0,c)}Object.freeze(a),this.meta=a,this._hasMeta=Object.keys(a).length>0;let s=this;this._actions={emit(i){s._emit([[y,i]])},down(i){s._emit(ae(i))},up(i){s._emitUp(ae(i))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let r=this._versioningLevel;if(r!=null&&e<=r)return;let o=n?.hash??this._hashFn;o!==this._hashFn&&(this._hashFn=o);let a=this._cached===void 0?void 0:this._cached,s=this._versioning,i=s?.id??n?.id,u=s?.version??0,c=Ee(e,a,{id:i,hash:o});c.version=u,this._versioning=c,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let n=se(e);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(n,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let n=this._guard!=null||this._extraGuards!=null,r=e?.actor!=null;if(!n&&!r)return;let o=se(e?.actor),a=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(o,a))throw new K({actor:o,action:a,nodeName:this.name});if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(o,a))throw new K({actor:o,action:a,nodeName:this.name})}this._lastMutation={actor:o,timestamp_ns:Be()}}down(e,n){let r=ae(e);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(e,n){this._checkGuard(n),this._emit([[y,e]])}up(e,n){if(this._deps.length===0)return;let r=ae(e);if(r.length===0)return;this._checkGuard(n);let o=n??{internal:!0};this._validateUpTiers(r);for(let a of this._deps)a.node.up?.(r,o)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let n of this._deps)n.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let n=this._config.tierOf;for(let r of e){let o=n(r[0]);if(o===3||o===4)throw new Error(`Node "${this.name}": tier-${o} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,n){if(n!=null&&this._guard!=null){let u=se(n);if(!this._guard(u,"observe"))throw new K({actor:u,action:"observe",nodeName:this.name})}let o=this._isTerminal&&this._resubscribable;if(o){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let u of this._deps)Se(u);if(this._partial===!1){for(let u of this._deps)if(u.prevData!==void 0||u.dataBatch.length!==0||u.terminal!==void 0||u.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let a;try{a=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:o},this._actions)}catch(u){throw this._sinkCount-=1,u}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let s=this._isTerminal;if(this._sinkCount===1&&!s)try{this._activate()}catch(u){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof a=="function")try{a()}catch{}throw u}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let i=!1;return()=>{i||(i=!0,this._sinkCount-=1,this._removeSink(e),typeof a=="function"&&a(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,n=0;try{for(let r=0;r<e;r++){let o=r,a=this._deps[r];a.unsub=Je,a.unsub=a.node.subscribe(s=>{if(a.unsub===null)return;let i=this._config.tierOf,u=!1;for(let c of s)i(c[0])>=3&&(u=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:o},this._actions);u&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let o=0;o<n;o++){let a=this._deps[o];if(a.unsub!=null){let s=a.unsub;a.unsub=null;try{s()}catch{}Se(a)}}throw this._dirtyDepCount=0,r}}_addDep(e){for(let o=0;o<this._deps.length;o++)if(this._deps[o].node===e)return o;let n=this._deps.length,r=Ze(e);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Te),r.unsub=Je;try{r.unsub=e.subscribe(o=>{if(r.unsub===null)return;let a=this._config.tierOf,s=!1;for(let i of o)a(i[0])>=3&&(s=!0),this._config.onMessage(this,i,{direction:"down-in",depIndex:n},this._actions);s&&this._maybeRunFnOnSettlement()})}catch(o){throw r.unsub=null,this._deps.pop(),this._dirtyDepCount--,o}return n}_deactivate(e=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(r){this._emit([[g,this._wrapFnError("cleanup threw",r)]])}else if(n!=null&&typeof n=="object"){let r=n.deactivate;if(typeof r=="function")try{r()}catch(o){this._emit([[g,this._wrapFnError("cleanup.deactivate threw",o)]])}}for(let r of this._deps){if(r.unsub!=null){let o=r.unsub;r.unsub=null;try{o()}catch{}}Se(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,n){let r=this._deps[e],o=n[0];if(this._inspectorHooks!=null){let a={kind:"dep_message",depIndex:e,message:n};for(let s of this._inspectorHooks)s(a)}if(o!==j){if(o===T){this._depDirtied(r);return}if(o===B){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(Ve);return}if(o===R||o===C){this._emit([n]);return}if(o===S){this._emit(xe);return}if(o===y)this._depSettledAsData(r,n[1]);else if(o===v)this._depSettledAsResolved(r);else if(o===w)this._depSettledAsTerminal(r,!0);else if(o===g)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(o===y||o===v)&&this._emit([n]),(o===w||o===g)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Te))}_depSettledAsData(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=n,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let n=this._deps[e];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(Ge),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(e!=null){this._autoError&&this._emit([[g,e.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit(He)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(s){this._emit([[g,this._wrapFnError("cleanup threw",s)]]);return}}else if(e!=null&&typeof e=="object"){let s=e.beforeRun;if(typeof s=="function"){e.beforeRun=void 0;try{s()}catch(i){this._emit([[g,this._wrapFnError("cleanup.beforeRun threw",i)]]);return}}}let n=this._deps.map(s=>s.involvedThisWave?s.dataBatch.length>0?[...s.dataBatch]:[]:void 0),r=this._deps.map(s=>s.prevData);for(let s=0;s<this._deps.length;s++){let i=n[s];i!=null&&i.length>0&&(this._deps[s].prevData=i[i.length-1])}let o=this._deps.map(s=>s.terminal),a={prevData:r,terminalDeps:o,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let s={kind:"run",batchData:n,prevData:r};for(let i of this._inspectorHooks)i(s)}this._isExecutingFn=!0;try{let s=this._fn(n,this._actions,a);if(typeof s=="function")this._cleanup=s;else if(s!=null&&typeof s=="object"){let i=s;(typeof i.beforeRun=="function"||typeof i.deactivate=="function"||typeof i.invalidate=="function")&&(this._cleanup=s)}}catch(s){this._emit([[g,this._wrapFnError("fn threw",s)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Xe?(this._rerunDepth=0,this._emit([[g,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Xe} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,n){let r=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${e}: ${r}`,{cause:n})}_frameBatch(e){let n=this._config.tierOf;if(e.length===1)return n(e[0][0])===3&&this._status!=="dirty"?[z,e[0]]:e;let r=!0,o=!1,a=!1,s=-1;for(let u of e){let c=n(u[0]);c<s&&(r=!1),c===3&&(o=!0),u[0]===T&&(a=!0),s=c}let i=e;if(!r){let u=e.map((c,d)=>({m:c,i:d,tier:n(c[0])}));u.sort((c,d)=>c.tier-d.tier||c.i-d.i),i=u.map(c=>c.m)}if(o&&!a&&this._status!=="dirty"){let u=0;for(;u<i.length&&n(i[u][0])===0;)u++;return u===0?[z,...i]:[...i.slice(0,u),z,...i.slice(u)]}return i}_emit(e){if(e.length===0)return;for(let i=0;i<e.length;i++){let u=e[i];if(u[0]===g&&u[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let n=e;if(this._isTerminal&&!this._resubscribable){let i=e.filter(u=>u[0]===S||u[0]===B);if(i.length===0)return;n=i}n=this._frameBatch(n);let o=null;for(let i=0;i<n.length;i++){let u=n[i],c=u[0];if(c!==R&&c!==C){o?.push(u);continue}if(u.length<2)throw new Error(`Node "${this.name}": [[${c===R?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let d=!0;if(this._pausable!==!1){let f=u[1];if(c===R)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(f),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(f))d=!1;else if(this._pauseLocks.delete(f),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let b=this._pauseBuffer;this._pauseBuffer=[],this._emit(b)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}d?o?.push(u):o==null&&(o=n.slice(0,i))}if(o!=null){if(o.length===0)return;n=o}if(this._hasMeta&&n.some(i=>i[0]===S))for(let i of Object.keys(this.meta))try{this.meta[i]._emit(xe)}catch{}let{finalMessages:a,equalsError:s}=this._updateState(n);if(a.length>0&&this._config.inspectorEnabled){let i=this._config.globalInspector;if(i!=null)try{i({kind:"emit",node:this,messages:a})}catch{}}if(a.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let i=this._config.tierOf,u=[];for(let c of a)i(c[0])===3?this._pauseBuffer.push(c):u.push(c);u.length>0&&this._dispatchOrAccumulate(u)}else this._dispatchOrAccumulate(a);s!=null&&this._emit([[g,s]])}_updateState(e){let n=this._config.tierOf,r,o,a=-1,s=0;for(let d of e)n(d[0])===3&&s++;let i=s<=1,u=-1;if(this._versioning!=null&&s>1){for(let d=e.length-1;d>=0;d--)if(e[d][0]===y){u=d;break}}for(let d=0;d<e.length;d++){let f=e[d],b=f[0];if(b===y){if(f.length>=2){let p=!1;if(i&&this._cached!==void 0)try{p=this._equals(this._cached,f[1])}catch(_){o=this._wrapFnError("equals threw",_),a=d;break}if(p){r==null&&(r=e.slice(0,d)),r.push(we),this._status="resolved";continue}this._cached=f[1],this._versioning!=null&&(u<0||d===u)&&Ke(this._versioning,f[1],this._hashFn)}this._status="settled",r?.push(f)}else if(r?.push(f),b===T)this._status="dirty";else if(b===v)this._status="resolved";else if(b===w){this._status="completed";{let p=this._config.rigorRecorder;if(p!=null)try{p.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(b===g){this._status="errored";{let p=this._config.rigorRecorder;if(p!=null)try{p.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(b===B){if(this._cached!==void 0){let _=this._config.rigorRecorder;if(_!=null)try{_.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let p=this._cleanup;if(typeof p=="function"){this._cleanup=void 0;try{p()}catch{}}else if(p!=null&&typeof p=="object"){let _=p.invalidate;if(typeof _=="function")try{_()}catch{}}}else b===S&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=a>=0?r??e.slice(0,a):r??e;return o!=null?{finalMessages:c,equalsError:o}:{finalMessages:c}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let n=[...this._sinks];for(let r of n)r(e)};_dispatchOrAccumulate(e){if(Le()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Pe(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}oe(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let n=this._frameBatch(e);oe(this._deliverToSinks,n,this._config.tierOf)}},Qe=t=>Array.isArray(t),Re=t=>typeof t=="object"&&t!=null&&!Array.isArray(t)});function D(t,e){let n={factory:t};return e!==void 0&&(n.factoryArgs=e),n}var et=N(()=>{"use strict"});function O(t,e){return G((r,o,a)=>t(o,a)??void 0,{describeKind:"producer",...e})}var Ae=N(()=>{"use strict";ce()});function Me(t){return{describeKind:"producer",...t}}function tt(t,e){return O(n=>{let r=!1;try{for(let o of t){if(r)return;n.emit(o)}r||n.down([[w]])}catch(o){r||n.down([[g,o]])}return()=>{r=!0}},Me(e))}function $t(t){return t!=null&&typeof t.then=="function"}function jt(t,e){let{signal:n,...r}=e??{};return O(o=>{let a=!1,s=()=>{a||(a=!0,o.down([[g,n.reason]]))};if(n?.aborted){s();return}return n?.addEventListener("abort",s,{once:!0}),Promise.resolve(t).then(i=>{a||(a=!0,n?.removeEventListener("abort",s),o.emit(i),o.down([[w]]))},i=>{a||(a=!0,n?.removeEventListener("abort",s),o.down([[g,i]]))}),()=>{a=!0,n?.removeEventListener("abort",s)}},Me(r))}function zt(t,e){let{signal:n,...r}=e??{};return O(o=>{let a=new AbortController,s=()=>a.abort(n?.reason);n?.aborted?a.abort(n.reason):n?.addEventListener("abort",s,{once:!0});let i=n??a.signal,u=!1,c=t[Symbol.asyncIterator](),d=()=>{u||i.aborted||Promise.resolve(c.next()).then(f=>{if(!(u||i.aborted)){if(f.done){o.down([[w]]);return}o.emit(f.value),d()}},f=>{!u&&!i.aborted&&o.down([[g,f]])})};return d(),()=>{u=!0,n?.removeEventListener("abort",s),a.abort(),Promise.resolve(c.return?.()).catch(()=>{})}},Me(r))}function qt(t){return t!=null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function"}function nt(t,e){if(qt(t))return t;if($t(t))return jt(t,e);if(t!=null){let n=t;if(typeof n[Symbol.asyncIterator]=="function")return zt(t,e);if(typeof n[Symbol.iterator]=="function")return tt(t,e)}return Kt(t)}function Kt(...t){return tt(t,void 0)}var rt=N(()=>{"use strict";q();Ae()});var V,ot=N(()=>{"use strict";V=class{_timer;_gen=0;start(e,n){this.cancel(),this._gen+=1;let r=this._gen;this._timer=setTimeout(()=>{this._timer=void 0,r===this._gen&&n()},e)}cancel(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}get pending(){return this._timer!==void 0}}});function H(t){return{describeKind:"derived",...t}}function Yt(t){return t<0?0:t}function de(t){return t[1]}function st(t){if(typeof t!="number"||!Number.isFinite(t))throw new TypeError("backoff strategy must return a finite number");return t<0?0:t}function it(t,e){return typeof t=="function"?Xt(t,e):Jt(t,e)}function at(t){let e={};return t?.count!==void 0&&(e.count=t.count),typeof t?.backoff=="string"&&(e.backoff=t.backoff),Object.keys(e).length>0?e:void 0}function Jt(t,e){let n=e?.count,r=e?.backoff,o=n!==void 0?n:r===void 0?0:2147483647;if(o<0)throw new RangeError("retry count must be >= 0");let a=r===void 0?null:typeof r=="string"?me(r):r;return O(s=>{let i=0,u=!1,c=null,d,f=new V;function b(){d?.(),d=void 0}function p(h){if(u)return;if(i>=o){b(),s.down([[g,h]]);return}let l=a===null?0:a(i,h,c);if(l==null){b(),s.down([[g,h]]);return}let m;try{m=st(l)}catch{b(),s.down([[g,h]]);return}c=m,i+=1,b();let x=m>0?m/1e6:1;f.start(x,()=>{u||_()})}function _(){f.cancel(),b(),d=t.subscribe(h=>{if(!u)for(let l of h){let m=l[0];if(m===T)s.down([[T]]);else if(m===y)i=0,c=null,s.emit(l[1]);else if(m===v)s.down([[v]]);else if(m===w)b(),s.down([[w]]);else if(m===g){p(de(l));return}else s.down([l])}})}return _(),()=>{u=!0,f.cancel(),b()}},{...H(),initial:t.cache,meta:{...D("retry",at(e))}})}function Xt(t,e){let n=e?.count,r=e?.backoff,o=n!==void 0?n:r===void 0?0:2147483647;if(o<0)throw new RangeError("retry count must be >= 0");let a=r===void 0?null:typeof r=="string"?me(r):r;return O(s=>{let i=0,u=!1,c=null,d,f=new V;function b(){d?.(),d=void 0}function p(h){if(u)return;if(i>=o){b(),s.down([[g,h]]);return}let l=a===null?0:a(i,h,c);if(l==null){b(),s.down([[g,h]]);return}let m;try{m=st(l)}catch{b(),s.down([[g,h]]);return}c=m,i+=1,b();let x=m>0?m/1e6:1;f.start(x,()=>{u||_()})}function _(){f.cancel(),b();let h;try{h=t()}catch(l){p(l);return}d=h.subscribe(l=>{if(!u)for(let m of l){let x=m[0];if(x===T)s.down([[T]]);else if(x===y)i=0,c=null,s.emit(m[1]);else if(x===v)s.down([[v]]);else if(x===w)b(),s.down([[w]]);else if(x===g){p(de(m));return}else s.down([m])}})}return _(),()=>{u=!0,f.cancel(),b()}},{...H(),initial:e?.initial,meta:{...D("retry",at(e))}})}function ut(t){let e=Math.max(1,t?.failureThreshold??5),n=Yt(t?.cooldownNs??30*1e9),r=t?.cooldown??null,o=Math.max(1,t?.halfOpenMax??1),a=t?.now??$,s="closed",i=0,u=0,c=0,d=n,f=0;function b(){if(!r)return n;let h=r(u);return h!==null?h:n}function p(){s="open",d=b(),c=a(),f=0}return{canExecute(){return s==="closed"?!0:s==="open"?a()-c>=d?(s="half-open",f=1,!0):!1:f<o?(f++,!0):!1},recordSuccess(){s==="half-open"?(s="closed",i=0,u=0):s==="closed"&&(i=0)},recordFailure(h){if(s==="half-open"){u++,p();return}s==="closed"&&(i++,i>=e&&p())},get state(){return s},get failureCount(){return i},reset(){s="closed",i=0,u=0,f=0}}}function ct(t,e){let n=e?.onOpen??"skip";return r=>{let o=G([],(a,s)=>{function i(){o.meta.breakerState.down([[y,t.state]])}let u=r.subscribe(c=>{for(let d of c){let f=d[0];f===T?s.down([[T]]):f===y?t.canExecute()?(i(),s.emit(d[1])):(i(),n==="error"?s.down([[g,new Ce]]):s.down([[v]])):f===v?s.down([[v]]):f===w?(t.recordSuccess(),i(),s.down([[w]])):f===g?(t.recordFailure(de(d)),i(),s.down([d])):s.down([d])}});return i(),u},{...H(),meta:{breakerState:t.state,...D("withBreaker",{onOpen:n})},completeWhenDepsComplete:!1,initial:r.cache});return{node:o,breakerState:o.meta.breakerState}}}function Zt(t,e){if(t<=0)throw new RangeError("capacity must be > 0");if(e<0)throw new RangeError("refillPerSecond must be >= 0");let n=t,r=$();function o(a){if(e>0){let s=a-r;n=Math.min(t,n+s/1e9*e)}r=a}return{available(){return o($()),n},tryConsume(a=1){if(a<=0)return!0;let s=$();return o(s),n>=a?(n-=a,!0):!1},putBack(a=1){a<=0||(o($()),n=Math.min(t,n+a))}}}function dt(t,e){let{maxEvents:n,windowNs:r}=e;if(n<=0)throw new RangeError("maxEvents must be > 0");if(r<=0)throw new RangeError("windowNs must be > 0");let o=e.maxBuffer;if(o!==void 0&&o<1)throw new RangeError("maxBuffer must be >= 1");let a=e.onOverflow??"drop-newest",s=n*1e9/r;return O(i=>{let u=Zt(n,s),c=[],d=new V,f=!1,b=1e9/s;function p(){for(;c.length>0;)if(u.tryConsume(1))i.emit(c.shift());else{d.start(Math.max(1,b/1e6),p);return}}let _=t.subscribe(h=>{for(let l of h){if(f)return;let m=l[0];if(m===T)i.down([[T]]);else if(m===y){if(o!==void 0&&c.length>=o){if(a!=="drop-newest")if(a==="drop-oldest")c.shift(),c.push(l[1]);else{f=!0,d.cancel(),c.length=0,i.down([[g,new De(o)]]);return}}else c.push(l[1]);p()}else if(m===v)i.down([[v]]);else if(m===w)f=!0,d.cancel(),c.length=0,i.down([[w]]);else if(m===g)f=!0,d.cancel(),c.length=0,i.down([l]);else if(m===S){f=!0,d.cancel(),c.length=0,i.down([l]);return}else i.down([l])}});return()=>{f=!0,d.cancel(),_()}},{...H(),initial:t.cache,meta:{...D("rateLimiter",e)}})}function lt(t,e){let n=e?.initialStatus??"pending",r=G([],(o,a)=>{let s=n;return r.meta.status.down([[y,n]]),r.meta.error.down([[y,null]]),t.subscribe(u=>{for(let c of u){let d=c[0];if(d===T)a.down([[T]]);else if(d===y)s==="errored"?be(()=>{r.meta.error.down([[y,null]]),r.meta.status.down([[y,"active"]])}):r.meta.status.down([[y,"active"]]),s="active",a.emit(c[1]);else if(d===v)a.down([[v]]);else if(d===w)r.meta.status.down([[y,"completed"]]),s="completed",a.down([[w]]);else if(d===g){let f=de(c);be(()=>{r.meta.error.down([[y,f]]),r.meta.status.down([[y,"errored"]])}),s="errored",a.down([c])}else a.down([c])}})},{...H(),meta:{status:n,error:null,...D("withStatus",{initialStatus:n})},completeWhenDepsComplete:!1,resubscribable:!0,initial:t.cache});return{node:r,status:r.meta.status,error:r.meta.error}}function Qt(t){return t!=null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function"}function en(t){return t!=null&&typeof t.then=="function"}function tn(t){return t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function"}function ft(t,e){return O(n=>{let r,o;function a(){o?.(),o=void 0,Qt(e)||en(e)||tn(e)?r=nt(e).subscribe(i=>{n.down(i)}):(n.emit(e),n.down([[w]]))}return o=t.subscribe(s=>{for(let i of s){let u=i[0];if(u===T)n.down([[T]]);else if(u===y)n.emit(i[1]);else if(u===v)n.down([[v]]);else if(u===w)n.down([[w]]);else if(u===g){a();return}else if(u===S){r?.(),n.down([i]);return}else n.down([i])}}),()=>{o?.(),r?.()}},{...H(),initial:t.cache,meta:{...D("fallback")}})}function pt(t,e){if(e<=0)throw new RangeError("timeoutNs must be > 0");return O(n=>{let r=!1,o=new V;function a(){let i=e/1e6;o.start(i,()=>{r||(r=!0,s(),n.down([[g,new Ie(e)]]))})}let s=t.subscribe(i=>{for(let u of i){if(r)return;let c=u[0];if(c===T)n.down([[T]]);else if(c===y)a(),n.emit(u[1]);else if(c===v)n.down([[v]]);else if(c===w){o.cancel(),r=!0,n.down([[w]]);return}else if(c===g){o.cancel(),r=!0,n.down([u]);return}else if(c===S){o.cancel(),r=!0,n.down([u]);return}else n.down([u])}});return a(),()=>{r=!0,o.cancel(),s()}},{...H(),initial:t.cache,meta:{...D("timeout",{timeoutNs:e})}})}var Ce,De,Ie,ht=N(()=>{"use strict";ye();_e();q();et();ce();Ae();ge();rt();ot();Ce=class extends Error{name="CircuitOpenError";constructor(){super("Circuit breaker is open")}};De=class extends Error{name="RateLimiterOverflowError";constructor(e){super(`rateLimiter buffer overflow (maxBuffer=${e})`)}};Ie=class extends Error{name="TimeoutError";constructor(e){super(`Timed out after ${e/1e6}ms`)}}});var on={};Tt(on,{NS_PER_MS:()=>A,NS_PER_SEC:()=>F,resilientPipeline:()=>rn});module.exports=kt(on);ge();ht();q();ce();function mt(t,e,n){return{[t]:!0,[`${t}_type`]:e,...n??{}}}function nn(t,e){return mt("reduction",t,e)}function gt(t,e,n){if(e.length===0)throw new RangeError("budgetGate requires at least one constraint");let r=e.map(p=>p.node),o=[t,...r],a=[],s=!1,i=!1,u=Symbol("budget-gate"),c=new Array(e.length);function d(){return e.every((p,_)=>p.check(c[_]))}function f(p){for(;a.length>0&&d();){let _=a[0];a=a.slice(1),p.emit(_)}a.length===0&&i&&(i=!1,p.down([[v]]))}return G([],(p,_)=>{for(let l=0;l<e.length;l++)c[l]=e[l].node.cache;let h=[];for(let l=0;l<o.length;l++){let m=o[l];h.push(m.subscribe(x=>{for(let E of x)b(E,l,_)}))}return()=>{for(let l of h)l()}},{...n,describeKind:"derived",meta:nn("budget_gate",n?.meta)});function b(p,_,h){let l=p[0];if(_===0){if(l===y)return d()&&a.length===0?h.emit(p[1]):(a.push(p[1]),s||(s=!0,h.up([[R,u]]))),!0;if(l===T)return h.down([[T]]),!0;if(l===v)return a.length===0?h.down([[v]]):i=!0,!0;if(l===w||l===g){for(let m of a)h.emit(m);return a=[],i=!1,s&&(s=!1,h.up([[C,u]])),h.down([p]),!0}return!1}return l===y&&(c[_-1]=p[1]),l===y||l===v?(d()&&a.length>0?(f(h),a.length===0&&s&&(s=!1,h.up([[C,u]]))):!d()&&!s&&a.length>0&&(s=!0,h.up([[R,u]])),!0):l===T?!0:l===g?(h.down([p]),!0):l===w}}function rn(t,e={}){let n=t;e.rateLimit!=null&&(n=dt(n,e.rateLimit)),e.budget!=null&&e.budget.length>0&&(n=gt(n,e.budget));let r;if(e.breaker!=null){let a=ut(e.breaker),s=e.breakerOnOpen??"skip",i=ct(a,{onOpen:s})(n);n=i.node,r=i.breakerState}if(e.timeoutMs!=null){if(e.timeoutMs<=0)throw new RangeError("timeoutMs must be > 0");if(e.timeoutMs>9e6)throw new RangeError("timeoutMs must be <= 9_000_000 (\u22482.5h) to stay within safe ns arithmetic");n=pt(n,e.timeoutMs*1e6)}e.retry!=null&&(n=it(n,e.retry)),e.fallback!==void 0&&(n=ft(n,e.fallback));let o=lt(n,{initialStatus:e.initialStatus??"pending"});return{node:o.node,status:o.status,error:o.error,breakerState:r}}0&&(module.exports={NS_PER_MS,NS_PER_SEC,resilientPipeline});
|
|
1
|
+
"use strict";var pe=Object.defineProperty;var St=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var Ot=Object.prototype.hasOwnProperty;var v=(n,e)=>()=>(n&&(e=n(n=0)),e);var At=(n,e)=>{for(var t in e)pe(n,t,{get:e[t],enumerable:!0})},Mt=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Rt(e))!Ot.call(n,o)&&o!==t&&pe(n,o,{get:()=>e[o],enumerable:!(r=St(e,o))||r.enumerable});return n};var Ct=n=>Mt(pe({},"__esModule",{value:!0}),n);function B(n){return n<0?0:n}function Dt(n,e){return e==="none"?n:e==="full"?Math.random()*n:n/2+Math.random()*(n/2)}function It(n,e){return n+Math.random()*(e-n)}function Ft(n){let e=B(n);return()=>e}function Lt(n,e){let t=B(n),r=e===void 0?t:B(e);return o=>t+r*Math.max(0,o)}function Bt(n){let e=B(n?.baseNs??1e8),t=n?.factor!==void 0&&n.factor<1?1:n?.factor??2,r=B(n?.maxDelayNs??30*1e9),o=n?.jitter??"none";return a=>{let i;if(e===0)i=0;else if(t===1)i=e;else{let s=r/e,u=1;for(let d=0;d<Math.max(0,a);d++){if(u>=s){u=s;break}u*=t}i=e*u,i>r&&(i=r)}return Dt(i,o)}}function Pt(n=100*1e6,e=30*1e9){let t=B(n),r=B(e);function o(a){if(a<=0)return 1;let i=1,s=2;for(let u=1;u<a;u++){let d=i+s;i=s,s=d}return s}return a=>{let i=o(a)*t;return i<=r?i:r}}function Gt(n=100*1e6,e=30*1e9){return(t,r,o)=>{let i=Math.min(e,(o??n)*3);return It(n,i)}}function Be(n){if(n==="constant")return Ft(1*1e9);if(n==="linear")return Lt(1*1e9);if(n==="exponential")return Bt();if(n==="fibonacci")return Pt();if(n==="decorrelatedJitter")return Gt();throw new Error(`Unknown backoff preset: "${String(n)}". Use one of: constant, linear, exponential, fibonacci, decorrelatedJitter`)}var D,P,he=v(()=>{"use strict";D=1e6,P=1e9});var W,b,T,w,G,M,I,R,_,h,j,me,Vt,be,Ht,zt,ge,Pe,Ge,Ve,ye,$=v(()=>{"use strict";W=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),T=Symbol.for("graphrefly/DIRTY"),w=Symbol.for("graphrefly/RESOLVED"),G=Symbol.for("graphrefly/INVALIDATE"),M=Symbol.for("graphrefly/PAUSE"),I=Symbol.for("graphrefly/RESUME"),R=Symbol.for("graphrefly/TEARDOWN"),_=Symbol.for("graphrefly/COMPLETE"),h=Symbol.for("graphrefly/ERROR"),j=Object.freeze([T]),me=Object.freeze([w]),Vt=Object.freeze([G]),be=Object.freeze([W]),Ht=Object.freeze([_]),zt=Object.freeze([R]),ge=Object.freeze([j]),Pe=Object.freeze([me]),Ge=Object.freeze([Vt]),Ve=Object.freeze([Ht]),ye=Object.freeze([zt])});function He(n){n.registerCodec(Ut)}var Ut,ze=v(()=>{"use strict";Ut={name:"json",version:1,contentType:"application/json",encode(n){let e=JSON.stringify(n);return new TextEncoder().encode(e)},decode(n,e){let t=new TextDecoder().decode(n);return JSON.parse(t)}}});function oe(n){if(n==null)return Wt;let{type:e,id:t,...r}=n;return{type:e??"system",id:t??"",...r}}var Wt,Ue=v(()=>{"use strict";Wt={type:"system",id:""}});function We(){return K>0||ee}function je(){return K>0}function $e(n){K>0?te.push(n):n()}function _e(n){K+=1;let e=!1;try{n()}catch(t){throw e=!0,t}finally{if(K-=1,K===0)if(e){if(!ee){let t=te.splice(0);for(let r of t)try{r()}catch{}V.length=0,H.length=0,q.length=0}}else jt()}}function jt(){let n=!ee;n&&(ee=!0);let e=[],t=0;try{for(;V.length>0||H.length>0||q.length>0||n&&te.length>0;){if(n&&te.length>0){let a=te.splice(0);for(let i of a)try{i()}catch(s){e.push(s)}continue}if(t+=1,t>1e3)throw V.length=0,H.length=0,q.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let o=(V.length>0?V:H.length>0?H:q).splice(0);for(let a of o)try{a()}catch(i){e.push(i)}}}finally{n&&(ee=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function ie(n,e,t){if(e.length===0)return;if(e.length===1){let d=t(e[0][0]);if(d<3||!We()){n(e);return}(d>=5?q:d===4?H:V).push(()=>n(e));return}let r=e.length,o=r,a=r,i=r,s=0;for(;s<r&&t(e[s][0])<3;)s++;for(o=s;s<r&&t(e[s][0])===3;)s++;for(a=s;s<r&&t(e[s][0])===4;)s++;i=s;let u=We();if(o>0){let d=e.slice(0,o);n(d)}if(a>o){let d=e.slice(o,a);u?V.push(()=>n(d)):n(d)}if(i>a){let d=e.slice(a,i);u?H.push(()=>n(d)):n(d)}if(r>i){let d=e.slice(i,r);u?q.push(()=>n(d)):n(d)}}var K,ee,V,H,q,te,we=v(()=>{"use strict";K=0,ee=!1,V=[],H=[],q=[],te=[]});function Te(){return Math.trunc(performance.now()*1e6)}function Ke(){return Date.now()*1e6}var ve=v(()=>{"use strict"});function qe(n){n.registerMessageType(W,{tier:0,wireCrossing:!1}),n.registerMessageType(T,{tier:1,wireCrossing:!1}),n.registerMessageType(G,{tier:1,wireCrossing:!1,metaPassthrough:!1}),n.registerMessageType(M,{tier:2,wireCrossing:!1}),n.registerMessageType(I,{tier:2,wireCrossing:!1}),n.registerMessageType(b,{tier:3,wireCrossing:!0}),n.registerMessageType(w,{tier:3,wireCrossing:!0}),n.registerMessageType(_,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(h,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(R,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var se,Ye=v(()=>{"use strict";$();se=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=t=>{let r=this._messageTypes.get(t);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,t){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:t.tier,wireCrossing:t.wireCrossing??t.tier>=3,metaPassthrough:t.metaPassthrough??!0}),this}messageTier(e){let t=this._messageTypes.get(e);return t!=null?t.tier:1}isWireCrossing(e){let t=this._messageTypes.get(e);return t!=null?t.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let t=this._messageTypes.get(e);return t!=null?t.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}}});var Y,Je=v(()=>{"use strict";Y=class extends Error{actor;action;nodeName;constructor(e,t){super(t??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}}});function xe(n){if(n===void 0)return null;if(typeof n=="number"){if(!Number.isFinite(n))throw new TypeError(`Cannot hash non-finite number: ${n}`);if(Number.isInteger(n)&&!Number.isSafeInteger(n))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${n}. Cross-language cid parity is not guaranteed for unsafe integers.`);return n}if(typeof n=="string"||typeof n=="boolean"||n===null)return n;if(Array.isArray(n))return n.map(xe);if(typeof n=="object"&&n!==null){let e={};for(let t of Object.keys(n).sort())e[t]=xe(n[t]);return e}return null}function qt(n){let e=Kt.encode(n),t=e.length,r=t*8,o=t+9+63&-64,a=new Uint8Array(o);a.set(e),a[t]=128;let i=new DataView(a.buffer);i.setUint32(o-4,r>>>0,!1),i.setUint32(o-8,Math.floor(r/4294967296)>>>0,!1);let s=1779033703,u=3144134277,d=1013904242,c=2773480762,l=1359893119,g=2600822924,f=528734635,m=1541459225,y=new Uint32Array(64),p=(S,x)=>S>>>x|S<<32-x;for(let S=0;S<o;S+=64){for(let N=0;N<16;N++)y[N]=i.getUint32(S+N*4,!1);for(let N=16;N<64;N++){let Q=y[N-15],Z=y[N-2],re=p(Q,7)^p(Q,18)^Q>>>3,fe=p(Z,17)^p(Z,19)^Z>>>10;y[N]=y[N-16]+re+y[N-7]+fe>>>0}let x=s,A=u,L=d,X=c,E=l,O=g,ne=f,le=m;for(let N=0;N<64;N++){let Q=p(E,6)^p(E,11)^p(E,25),Z=E&O^~E&ne,re=le+Q+Z+$t[N]+y[N]>>>0,fe=p(x,2)^p(x,13)^p(x,22),kt=x&A^x&L^A&L,Et=fe+kt>>>0;le=ne,ne=O,O=E,E=X+re>>>0,X=L,L=A,A=x,x=re+Et>>>0}s=s+x>>>0,u=u+A>>>0,d=d+L>>>0,c=c+X>>>0,l=l+E>>>0,g=g+O>>>0,f=f+ne>>>0,m=m+le>>>0}let k=S=>S.toString(16).padStart(8,"0");return k(s)+k(u)+k(d)+k(c)+k(l)+k(g)+k(f)+k(m)}function Ne(n){let e=xe(n??null),t=JSON.stringify(e);return qt(t).slice(0,16)}function Yt(){let n=globalThis.crypto;if(n?.randomUUID)return n.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),t=e()+e()+e()+e();return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-${(parseInt(t.slice(16,17),16)&3|8).toString(16)}${t.slice(17,20)}-${t.slice(20,32)}`}function ke(n,e,t){let r=t?.id??Yt();if(n===0)return{id:r,version:0};let a=(t?.hash??Ne)(e);return{id:r,version:0,cid:a,prev:null}}function Xe(n,e,t){n.version+=1,"cid"in n&&(n.prev=n.cid,n.cid=t(e))}var $t,Kt,Qe=v(()=>{"use strict";$t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Kt=new TextEncoder});function tt(n){return{node:n,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Ee(n){n.prevData=void 0,n.dirty=!1,n.involvedThisWave=!1,n.dataBatch.length=0,n.terminal=void 0}function ae(n){return n.length===0?n:typeof n[0]=="symbol"?[n]:n}function z(n,e,t){let r=nt(n)?n:[],o=typeof n=="function"?n:typeof e=="function"?e:void 0,a={};return nt(n)?a=(Se(e)?e:t)??{}:Se(n)?a=n:a=(Se(e)?e:t)??{},new ue(r,o,a)}var Ze,et,Jt,Xt,Re,ue,nt,Se,de=v(()=>{"use strict";ze();Ue();we();ve();Ye();Je();$();Qe();Ze=()=>{},et=100;Jt=(n,e,t,r)=>{t.direction==="down-in"&&n._onDepMessage(t.depIndex,e)},Xt=(n,e,t,r)=>{let o=n;if(o._status==="completed"||o._status==="errored")return;let a=o._cached,i=a===void 0?[be]:[be,[b,a]];o._status==="dirty"&&i.push(j),ie(e,i,o._config.tierOf)},Re=new se({onMessage:Jt,onSubscribe:Xt});qe(Re);He(Re);ue=class n{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,t,r){this._config=r.config??Re,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=t,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??Ne;let o=r.versioning??this._config.defaultVersioning;this._versioningLevel=o,this._versioning=o!=null?ke(o,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(tt);let a={};for(let[s,u]of Object.entries(r.meta??{})){let d={initial:u,name:`${r.name??"node"}:meta:${s}`,describeKind:"state",config:this._config};r.guard!=null&&(d.guard=r.guard),a[s]=new n([],void 0,d)}Object.freeze(a),this.meta=a,this._hasMeta=Object.keys(a).length>0;let i=this;this._actions={emit(s){i._emit([[b,s]])},down(s){i._emit(ae(s))},up(s){i._emitUp(ae(s))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,t){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let r=this._versioningLevel;if(r!=null&&e<=r)return;let o=t?.hash??this._hashFn;o!==this._hashFn&&(this._hashFn=o);let a=this._cached===void 0?void 0:this._cached,i=this._versioning,s=i?.id??t?.id,u=i?.version??0,d=ke(e,a,{id:s,hash:o});d.version=u,this._versioning=d,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let t=oe(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,r=e?.actor!=null;if(!t&&!r)return;let o=oe(e?.actor),a=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(o,a))throw new Y({actor:o,action:a,nodeName:this.name});if(this._extraGuards!=null){for(let i of this._extraGuards)if(!i(o,a))throw new Y({actor:o,action:a,nodeName:this.name})}this._lastMutation={actor:o,timestamp_ns:Ke()}}down(e,t){let r=ae(e);r.length!==0&&(this._checkGuard(t),this._emit(r))}emit(e,t){this._checkGuard(t),this._emit([[b,e]])}up(e,t){if(this._deps.length===0)return;let r=ae(e);if(r.length===0)return;this._checkGuard(t);let o=t??{internal:!0};this._validateUpTiers(r);for(let a of this._deps)a.node.up?.(r,o)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let t of this._deps)t.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let t=this._config.tierOf;for(let r of e){let o=t(r[0]);if(o===3||o===4)throw new Error(`Node "${this.name}": tier-${o} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,t){if(t!=null&&this._guard!=null){let u=oe(t);if(!this._guard(u,"observe"))throw new Y({actor:u,action:"observe",nodeName:this.name})}let o=this._isTerminal&&this._resubscribable;if(o){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let u of this._deps)Ee(u);if(this._partial===!1){for(let u of this._deps)if(u.prevData!==void 0||u.dataBatch.length!==0||u.terminal!==void 0||u.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let a;try{a=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:o},this._actions)}catch(u){throw this._sinkCount-=1,u}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let i=this._isTerminal;if(this._sinkCount===1&&!i)try{this._activate()}catch(u){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof a=="function")try{a()}catch{}throw u}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let s=!1;return()=>{s||(s=!0,this._sinkCount-=1,this._removeSink(e),typeof a=="function"&&a(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[t]=this._sinks;this._sinks=t}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,t=0;try{for(let r=0;r<e;r++){let o=r,a=this._deps[r];a.unsub=Ze,a.unsub=a.node.subscribe(i=>{if(a.unsub===null)return;let s=this._config.tierOf,u=!1;for(let d of i)s(d[0])>=3&&(u=!0),this._config.onMessage(this,d,{direction:"down-in",depIndex:o},this._actions);u&&this._maybeRunFnOnSettlement()}),t++}}catch(r){this._deps[t].unsub=null;for(let o=0;o<t;o++){let a=this._deps[o];if(a.unsub!=null){let i=a.unsub;a.unsub=null;try{i()}catch{}Ee(a)}}throw this._dirtyDepCount=0,r}}_addDep(e){for(let o=0;o<this._deps.length;o++)if(this._deps[o].node===e)return o;let t=this._deps.length,r=tt(e);if(this._deps.push(r),this._sinks==null)return t;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(ge),r.unsub=Ze;try{r.unsub=e.subscribe(o=>{if(r.unsub===null)return;let a=this._config.tierOf,i=!1;for(let s of o)a(s[0])>=3&&(i=!0),this._config.onMessage(this,s,{direction:"down-in",depIndex:t},this._actions);i&&this._maybeRunFnOnSettlement()})}catch(o){throw r.unsub=null,this._deps.pop(),this._dirtyDepCount--,o}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(r){this._emit([[h,this._wrapFnError("cleanup threw",r)]])}else if(t!=null&&typeof t=="object"){let r=t.deactivate;if(typeof r=="function")try{r()}catch(o){this._emit([[h,this._wrapFnError("cleanup.deactivate threw",o)]])}}for(let r of this._deps){if(r.unsub!=null){let o=r.unsub;r.unsub=null;try{o()}catch{}}Ee(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,t){let r=this._deps[e],o=t[0];if(this._inspectorHooks!=null){let a={kind:"dep_message",depIndex:e,message:t};for(let i of this._inspectorHooks)i(a)}if(o!==W){if(o===T){this._depDirtied(r);return}if(o===G){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(Ge);return}if(o===M||o===I){this._emit([t]);return}if(o===R){this._emit(ye);return}if(o===b)this._depSettledAsData(r,t[1]);else if(o===w)this._depSettledAsResolved(r);else if(o===_)this._depSettledAsTerminal(r,!0);else if(o===h)this._depSettledAsTerminal(r,t[1]);else{this._emit([t]);return}if(!this._fn){(o===b||o===w)&&this._emit([t]),(o===_||o===h)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(ge))}_depSettledAsData(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(t),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=t,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let t=this._deps[e];if(t.dataBatch.length===0&&t.prevData===void 0&&t.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(Pe),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(t=>t.terminal!==void 0&&t.terminal!==!0);if(e!=null){this._autoError&&this._emit([[h,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(Ve)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(i){this._emit([[h,this._wrapFnError("cleanup threw",i)]]);return}}else if(e!=null&&typeof e=="object"){let i=e.beforeRun;if(typeof i=="function"){e.beforeRun=void 0;try{i()}catch(s){this._emit([[h,this._wrapFnError("cleanup.beforeRun threw",s)]]);return}}}let t=this._deps.map(i=>i.involvedThisWave?i.dataBatch.length>0?[...i.dataBatch]:[]:void 0),r=this._deps.map(i=>i.prevData);for(let i=0;i<this._deps.length;i++){let s=t[i];s!=null&&s.length>0&&(this._deps[i].prevData=s[s.length-1])}let o=this._deps.map(i=>i.terminal),a={prevData:r,terminalDeps:o,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let i={kind:"run",batchData:t,prevData:r};for(let s of this._inspectorHooks)s(i)}this._isExecutingFn=!0;try{let i=this._fn(t,this._actions,a);if(typeof i=="function")this._cleanup=i;else if(i!=null&&typeof i=="object"){let s=i;(typeof s.beforeRun=="function"||typeof s.deactivate=="function"||typeof s.invalidate=="function")&&(this._cleanup=i)}}catch(i){this._emit([[h,this._wrapFnError("fn threw",i)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>et?(this._rerunDepth=0,this._emit([[h,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${et} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,t){let r=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${r}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[j,e[0]]:e;let r=!0,o=!1,a=!1,i=-1;for(let u of e){let d=t(u[0]);d<i&&(r=!1),d===3&&(o=!0),u[0]===T&&(a=!0),i=d}let s=e;if(!r){let u=e.map((d,c)=>({m:d,i:c,tier:t(d[0])}));u.sort((d,c)=>d.tier-c.tier||d.i-c.i),s=u.map(d=>d.m)}if(o&&!a&&this._status!=="dirty"){let u=0;for(;u<s.length&&t(s[u][0])===0;)u++;return u===0?[j,...s]:[...s.slice(0,u),j,...s.slice(u)]}return s}_emit(e){if(e.length===0)return;for(let s=0;s<e.length;s++){let u=e[s];if(u[0]===h&&u[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let t=e;if(this._isTerminal&&!this._resubscribable){let s=e.filter(u=>u[0]===R||u[0]===G);if(s.length===0)return;t=s}t=this._frameBatch(t);let o=null;for(let s=0;s<t.length;s++){let u=t[s],d=u[0];if(d!==M&&d!==I){o?.push(u);continue}if(u.length<2)throw new Error(`Node "${this.name}": [[${d===M?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let c=!0;if(this._pausable!==!1){let l=u[1];if(d===M)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(l),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(l))c=!1;else if(this._pauseLocks.delete(l),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let g=this._pauseBuffer;this._pauseBuffer=[],this._emit(g)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}c?o?.push(u):o==null&&(o=t.slice(0,s))}if(o!=null){if(o.length===0)return;t=o}if(this._hasMeta&&t.some(s=>s[0]===R))for(let s of Object.keys(this.meta))try{this.meta[s]._emit(ye)}catch{}let{finalMessages:a,equalsError:i}=this._updateState(t);if(a.length>0&&this._config.inspectorEnabled){let s=this._config.globalInspector;if(s!=null)try{s({kind:"emit",node:this,messages:a})}catch{}}if(a.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let s=this._config.tierOf,u=[];for(let d of a)s(d[0])===3?this._pauseBuffer.push(d):u.push(d);u.length>0&&this._dispatchOrAccumulate(u)}else this._dispatchOrAccumulate(a);i!=null&&this._emit([[h,i]])}_updateState(e){let t=this._config.tierOf,r,o,a=-1,i=0;for(let c of e)t(c[0])===3&&i++;let s=i<=1,u=-1;if(this._versioning!=null&&i>1){for(let c=e.length-1;c>=0;c--)if(e[c][0]===b){u=c;break}}for(let c=0;c<e.length;c++){let l=e[c],g=l[0];if(g===b){if(l.length>=2){let f=!1;if(s&&this._cached!==void 0)try{f=this._equals(this._cached,l[1])}catch(m){o=this._wrapFnError("equals threw",m),a=c;break}if(f){r==null&&(r=e.slice(0,c)),r.push(me),this._status="resolved";continue}this._cached=l[1],this._versioning!=null&&(u<0||c===u)&&Xe(this._versioning,l[1],this._hashFn)}this._status="settled",r?.push(l)}else if(r?.push(l),g===T)this._status="dirty";else if(g===w)this._status="resolved";else if(g===_){this._status="completed";{let f=this._config.rigorRecorder;if(f!=null)try{f.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===h){this._status="errored";{let f=this._config.rigorRecorder;if(f!=null)try{f.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===G){if(this._cached!==void 0){let m=this._config.rigorRecorder;if(m!=null)try{m.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let f=this._cleanup;if(typeof f=="function"){this._cleanup=void 0;try{f()}catch{}}else if(f!=null&&typeof f=="object"){let m=f.invalidate;if(typeof m=="function")try{m()}catch{}}}else g===R&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let d=a>=0?r??e.slice(0,a):r??e;return o!=null?{finalMessages:d,equalsError:o}:{finalMessages:d}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let r of t)r(e)};_dispatchOrAccumulate(e){if(je()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],$e(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}ie(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let t=this._frameBatch(e);ie(this._deliverToSinks,t,this._config.tierOf)}},nt=n=>Array.isArray(n),Se=n=>typeof n=="object"&&n!=null&&!Array.isArray(n)});function rt(n,e,t){return{[n]:!0,[`${n}_type`]:e,...t??{}}}var ot=v(()=>{"use strict"});function Ae(n,e,t){if(e.length===0)throw new RangeError("budgetGate requires at least one constraint");let r=e.map(f=>f.node),o=[n,...r],a=new Oe,i=!1,s=!1,u=Symbol("budget-gate"),d=new Array(e.length);function c(){return e.every((f,m)=>f.check(d[m]))}function l(f){for(;a.size>0&&c();){let m=a.shift();f.emit(m)}a.size===0&&s&&(s=!1,f.down([[w]]))}return z([],(f,m)=>{for(let p=0;p<e.length;p++)d[p]=e[p].node.cache;let y=[];for(let p=0;p<o.length;p++){let k=o[p];y.push(k.subscribe(S=>{for(let x of S)g(x,p,m)}))}return()=>{for(let p of y)p()}},{...t,describeKind:"derived",meta:rt("resilience","budget_gate",t?.meta)});function g(f,m,y){let p=f[0];if(m===0){if(p===b)return c()&&a.size===0?y.emit(f[1]):(a.push(f[1]),i||(i=!0,y.up([[M,u]]))),!0;if(p===T)return y.down([[T]]),!0;if(p===w)return a.size===0?y.down([[w]]):s=!0,!0;if(p===_||p===h){for(;a.size>0;)y.emit(a.shift());return s=!1,i&&(i=!1,y.up([[I,u]])),y.down([f]),!0}return!1}if(p===b&&(d[m-1]=f[1]),p===b||p===w){let k=c();return k&&a.size>0?(l(y),a.size===0&&i&&(i=!1,y.up([[I,u]]))):!k&&!i&&a.size>0&&(i=!0,y.up([[M,u]])),!0}return p===T?!0:p===h?(y.down([f]),!0):p===_}}var Oe,it=v(()=>{"use strict";$();de();ot();Oe=class{buf=[];head=0;get size(){return this.buf.length-this.head}push(e){this.buf.push(e)}shift(){if(this.head>=this.buf.length)return;let e=this.buf[this.head];return this.buf[this.head]=void 0,this.head++,this.head>32&&this.head*2>this.buf.length&&(this.buf=this.buf.slice(this.head),this.head=0),e}clear(){this.buf=[],this.head=0}}});function F(n,e){let t={factory:n};return e!==void 0&&(t.factoryArgs=e),t}var st=v(()=>{"use strict"});function C(n,e){return z((r,o,a)=>n(o,a)??void 0,{describeKind:"producer",...e})}var Me=v(()=>{"use strict";de()});function Ce(n){return{describeKind:"producer",...n}}function at(n,e){return C(t=>{let r=!1;try{for(let o of n){if(r)return;t.emit(o)}r||t.down([[_]])}catch(o){r||t.down([[h,o]])}return()=>{r=!0}},Ce(e))}function Qt(n){return n!=null&&typeof n.then=="function"}function Zt(n,e){let{signal:t,...r}=e??{};return C(o=>{let a=!1,i=()=>{a||(a=!0,o.down([[h,t.reason]]))};if(t?.aborted){i();return}return t?.addEventListener("abort",i,{once:!0}),Promise.resolve(n).then(s=>{a||(a=!0,t?.removeEventListener("abort",i),o.emit(s),o.down([[_]]))},s=>{a||(a=!0,t?.removeEventListener("abort",i),o.down([[h,s]]))}),()=>{a=!0,t?.removeEventListener("abort",i)}},Ce(r))}function en(n,e){let{signal:t,...r}=e??{};return C(o=>{let a=new AbortController,i=()=>a.abort(t?.reason);t?.aborted?a.abort(t.reason):t?.addEventListener("abort",i,{once:!0});let s=t??a.signal,u=!1,d=n[Symbol.asyncIterator](),c=()=>{u||s.aborted||Promise.resolve(d.next()).then(l=>{if(!(u||s.aborted)){if(l.done){o.down([[_]]);return}o.emit(l.value),c()}},l=>{!u&&!s.aborted&&o.down([[h,l]])})};return c(),()=>{u=!0,t?.removeEventListener("abort",i),a.abort(),Promise.resolve(d.return?.()).catch(()=>{})}},Ce(r))}function tn(n){return n!=null&&typeof n=="object"&&"cache"in n&&typeof n.subscribe=="function"}function ut(n,e){if(tn(n))return n;if(Qt(n))return Zt(n,e);if(n!=null){let t=n;if(typeof t[Symbol.asyncIterator]=="function")return en(n,e);if(typeof t[Symbol.iterator]=="function")return at(n,e)}return nn(n)}function nn(...n){return at(n,void 0)}var dt=v(()=>{"use strict";$();Me()});var ct=v(()=>{"use strict";dt()});var J,lt=v(()=>{"use strict";J=class{_timer;_gen=0;start(e,t){this.cancel(),this._gen+=1;let r=this._gen;this._timer=setTimeout(()=>{this._timer=void 0,r===this._gen&&t()},e)}cancel(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}get pending(){return this._timer!==void 0}}});var ce,ft=v(()=>{"use strict";ce=class{constructor(e){this.capacity=e;if(!Number.isInteger(e)||e<=0)throw new Error(`RingBuffer capacity must be a positive integer (got ${e})`);this.buf=new Array(e)}buf;head=0;_size=0;get size(){return this._size}get maxSize(){return this.capacity}push(e){let t=(this.head+this._size)%this.capacity;this.buf[t]=e,this._size<this.capacity?this._size++:this.head=(this.head+1)%this.capacity}shift(){if(this._size===0)return;let e=this.buf[this.head];return this.buf[this.head]=void 0,this.head=(this.head+1)%this.capacity,this._size--,e}at(e){if(this._size===0)return;let t=e<0?this._size+e:e;if(!(t<0||t>=this._size))return this.buf[(this.head+t)%this.capacity]}toArray(){let e=new Array(this._size);for(let t=0;t<this._size;t++)e[t]=this.buf[(this.head+t)%this.capacity];return e}clear(){for(let e=0;e<this._size;e++)this.buf[(this.head+e)%this.capacity]=void 0;this.head=0,this._size=0}}});function U(n){return{describeKind:"derived",...n}}function rn(n){return n<0?0:n}function Le(n){return n[1]}function on(n){if(typeof n!="number"||!Number.isFinite(n))throw new TypeError("backoff strategy must return a finite number");return n<0?0:n}function pt(n){let e=n?.count,t=n?.backoff;if(t!==void 0&&e===void 0)throw new RangeError("retry({ backoff }) requires explicit count to prevent unbounded retries; pass { count: <n>, backoff: ... }");let r=e!==void 0?e:0;if(r<0)throw new RangeError("retry count must be >= 0");let o=t===void 0?null:typeof t=="string"?Be(t):t;return{maxRetries:r,strategy:o}}function ht(n){let e={};return n?.count!==void 0&&(e.count=n.count),typeof n?.backoff=="string"&&(e.backoff=n.backoff),Object.keys(e).length>0?e:void 0}function mt(n,e,t){let r=0,o=!1,a=null,i,s=new J;function u(){i?.(),i=void 0}function d(l){if(o)return;if(r>=n.maxRetries){u(),t.down([[h,l]]);return}let g=n.strategy===null?0:n.strategy(r,l,a);if(g==null){u(),t.down([[h,l]]);return}let f;try{f=on(g)}catch{u(),t.down([[h,l]]);return}a=f,r+=1,u();let m=f>0?f/1e6:1;s.start(m,()=>{o||c()})}function c(){s.cancel(),u();let l;try{l=e()}catch(g){d(g);return}i=l.subscribe(g=>{if(!o)for(let f of g){let m=f[0];if(m===T)t.down([[T]]);else if(m===b)r=0,a=null,t.emit(f[1]);else if(m===w)t.down([[w]]);else if(m===_)u(),t.down([[_]]);else if(m===h){d(Le(f));return}else t.down([f])}})}return c(),()=>{o=!0,s.cancel(),u()}}function bt(n,e){return typeof n=="function"?an(n,e):sn(n,e)}function sn(n,e){let t=pt(e);return C(r=>mt(t,()=>n,r),{...U(),initial:n.cache,meta:{...F("retry",ht(e))}})}function an(n,e){let t=pt(e);return C(r=>mt(t,n,r),{...U(),initial:e?.initial,meta:{...F("retry",ht(e))}})}function gt(n){let e=Math.max(1,n?.failureThreshold??5),t=rn(n?.cooldownNs??30*1e9),r=n?.cooldown??null,o=Math.max(1,n?.halfOpenMax??1),a=n?.now??Te,i="closed",s=0,u=0,d=0,c=t,l=0;function g(){if(!r)return t;let y=r(u);return y!==null?y:t}function f(){i="open",c=g(),d=a(),l=0}return{canExecute(){return i==="closed"?!0:i==="open"?a()-d>=c?(i="half-open",l=1,!0):!1:l<o?(l++,!0):!1},recordSuccess(){i==="half-open"?(i="closed",s=0,u=0):i==="closed"&&(s=0)},recordFailure(y){if(i==="half-open"){u++,f();return}i==="closed"&&(s++,s>=e&&f())},get state(){return i},get failureCount(){return s},reset(){i="closed",s=0,u=0,l=0}}}function yt(n,e){let t=e?.onOpen??"skip";return r=>{let o=z([],(a,i)=>{function s(){o.meta.breakerState.down([[b,n.state]])}let u=r.subscribe(d=>{for(let c of d){let l=c[0];l===T?i.down([[T]]):l===b?n.canExecute()?(s(),i.emit(c[1])):(s(),t==="error"?i.down([[h,new De]]):i.down([[w]])):l===w?i.down([[w]]):l===_?(n.recordSuccess(),s(),i.down([[_]])):l===h?(n.recordFailure(Le(c)),s(),i.down([c])):i.down([c])}});return s(),u},{...U(),meta:{breakerState:n.state,...F("withBreaker",{onOpen:t})},completeWhenDepsComplete:!1,initial:r.cache});return{node:o,breakerState:o.meta.breakerState}}}function un(n,e,t){if(n<=0)throw new RangeError("capacity must be > 0");if(e<0)throw new RangeError("refillPerSecond must be >= 0");let r=t?.clock??Te,o=n,a=r();function i(s){if(e>0){let u=s-a;o=Math.min(n,o+u/1e9*e)}a=s}return{available(){return i(r()),o},tryConsume(s=1){if(s<=0)return!0;let u=r();return i(u),o>=s?(o-=s,!0):!1},putBack(s=1){s<=0||(i(r()),o=Math.min(n,o+s))}}}function _t(n,e){let{maxEvents:t,windowNs:r}=e;if(t<=0)throw new RangeError("maxEvents must be > 0");if(r<=0)throw new RangeError("windowNs must be > 0");let o=e.maxBuffer;if(o===void 0)throw new RangeError("rateLimiter requires explicit maxBuffer (use Infinity to opt in to unbounded)");let a=o===1/0;if(!a&&(!Number.isInteger(o)||o<1))throw new RangeError("maxBuffer must be a positive integer (or Infinity for unbounded)");let i=e.onOverflow??"drop-newest",s=t*1e9/r,u=C(d=>{let c=un(t,s),l=a?cn():dn(o),g=new J,f=!1,m=0,y=1e9/s,p=u.meta.droppedCount;function k(){p.emit(m)}p.cache!==0&&k();function S(){for(;l.size>0;)if(c.tryConsume(1))d.emit(l.shift());else{g.start(Math.max(1,y/1e6),S);return}}function x(){m+=1,k()}function A(){for(f=!0,g.cancel();l.size>0;)l.shift();m=0}let L=n.subscribe(X=>{for(let E of X){if(f)return;let O=E[0];if(O===T)d.down([[T]]);else if(O===b){if(!a&&l.size>=o)if(i==="drop-newest")x();else if(i==="drop-oldest")l.shift(),l.push(E[1]),x();else{x(),A(),d.down([[h,new Ie(o)]]);return}else l.push(E[1]);S()}else if(O===w)d.down([[w]]);else if(O===_)A(),d.down([[_]]);else if(O===h)A(),d.down([E]);else if(O===R){A(),d.down([E]);return}else d.down([E])}});return()=>{f=!0,g.cancel(),L()}},{...U(),initial:n.cache,meta:{droppedCount:0,...F("rateLimiter",e)}});return{node:u,droppedCount:u.meta.droppedCount}}function dn(n){let e=new ce(n);return{push:t=>e.push(t),shift:()=>e.shift(),get size(){return e.size}}}function cn(){let n=[];return{push:e=>{n.push(e)},shift:()=>n.shift(),get size(){return n.length}}}function wt(n,e){let t=e?.initialStatus??"pending",r=z([],(o,a)=>{let i=t;return r.meta.status.down([[b,t]]),r.meta.error.down([[b,null]]),n.subscribe(u=>{for(let d of u){let c=d[0];if(c===T)a.down([[T]]);else if(c===b)i==="errored"?_e(()=>{r.meta.error.down([[b,null]]),r.meta.status.down([[b,"running"]])}):r.meta.status.down([[b,"running"]]),i="running",a.emit(d[1]);else if(c===w)a.down([[w]]);else if(c===_)r.meta.status.down([[b,"completed"]]),i="completed",a.down([[_]]);else if(c===h){let l=Le(d);_e(()=>{r.meta.error.down([[b,l]]),r.meta.status.down([[b,"errored"]])}),i="errored",a.down([d])}else a.down([d])}})},{...U(),meta:{status:t,error:null,...F("withStatus",{initialStatus:t})},completeWhenDepsComplete:!1,resubscribable:!0,initial:n.cache});return{node:r,status:r.meta.status,error:r.meta.error}}function ln(n){return n!=null&&typeof n=="object"&&"cache"in n&&typeof n.subscribe=="function"}function fn(n){return n!=null&&typeof n.then=="function"}function pn(n){return n!=null&&typeof n=="object"&&typeof n[Symbol.asyncIterator]=="function"}function Tt(n,e){return C(t=>{let r,o;function a(){o?.(),o=void 0,ln(e)||fn(e)||pn(e)?r=ut(e).subscribe(s=>{t.down(s);for(let u of s){let d=u[0];if(d===_||d===h||d===R){r=void 0;return}}}):(t.emit(e),t.down([[_]]))}return o=n.subscribe(i=>{for(let s of i){let u=s[0];if(u===T)t.down([[T]]);else if(u===b)t.emit(s[1]);else if(u===w)t.down([[w]]);else if(u===_)t.down([[_]]);else if(u===h){a();return}else if(u===R){r?.(),t.down([s]);return}else t.down([s])}}),()=>{o?.(),r?.()}},{...U(),initial:n.cache,meta:{...F("fallback")}})}function vt(n,e){if(e<=0)throw new RangeError("timeoutNs must be > 0");return C(t=>{let r=!1,o=new J;function a(){let s=e/1e6;o.start(s,()=>{r||(r=!0,i(),t.down([[h,new Fe(e)]]))})}let i=n.subscribe(s=>{for(let u of s){if(r)return;let d=u[0];if(d===T)t.down([[T]]);else if(d===b)a(),t.emit(u[1]);else if(d===w)t.down([[w]]);else if(d===_){o.cancel(),r=!0,t.down([[_]]);return}else if(d===h){o.cancel(),r=!0,t.down([u]);return}else if(d===R){o.cancel(),r=!0,t.down([u]);return}else t.down([u])}});return a(),()=>{r=!0,o.cancel(),i()}},{...U(),initial:n.cache,meta:{...F("timeout",{timeoutNs:e})}})}var De,Ie,Fe,xt=v(()=>{"use strict";it();we();ve();$();st();de();Me();he();ct();lt();ft();De=class extends Error{name="CircuitOpenError";constructor(){super("Circuit breaker is open")}};Ie=class extends Error{name="RateLimiterOverflowError";constructor(e){super(`rateLimiter buffer overflow (maxBuffer=${e})`)}};Fe=class extends Error{name="TimeoutError";constructor(e){super(`Timed out after ${e/1e6}ms`)}}});var Nt=v(()=>{"use strict";xt()});var mn={};At(mn,{NS_PER_MS:()=>D,NS_PER_SEC:()=>P,resilientPipeline:()=>hn});module.exports=Ct(mn);he();Nt();function hn(n,e={}){let t=n;if(e.rateLimit!=null){let a={...e.rateLimit,maxBuffer:e.rateLimit.maxBuffer??1/0};t=_t(t,a).node}e.budget!=null&&e.budget.length>0&&(t=Ae(t,e.budget));let r;if(e.breaker!=null){let a=gt(e.breaker),i=e.breakerOnOpen??"skip",s=yt(a,{onOpen:i})(t);t=s.node,r=s.breakerState}if(e.timeoutMs!=null){if(e.timeoutMs<=0)throw new RangeError("timeoutMs must be > 0");if(e.timeoutMs>9e6)throw new RangeError("timeoutMs must be <= 9_000_000 (\u22482.5h) to stay within safe ns arithmetic");t=vt(t,e.timeoutMs*1e6)}e.retry!=null&&(t=bt(t,e.retry)),e.fallback!==void 0&&(t=Tt(t,e.fallback));let o=wt(t,{initialStatus:e.initialStatus??"pending"});return{node:o.node,status:o.status,error:o.error,breakerState:r}}0&&(module.exports={NS_PER_MS,NS_PER_SEC,resilientPipeline});
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import '../../node-
|
|
2
|
-
export { N as NS_PER_MS, c as NS_PER_SEC } from '../../
|
|
3
|
-
import '../../
|
|
4
|
-
export { R as ResilientPipelineBundle, a as ResilientPipelineOptions, r as resilientPipeline } from '../../index-
|
|
5
|
-
import '../../graph-CHsVwf9S.cjs';
|
|
6
|
-
import '../../meta-DreaEM_a.cjs';
|
|
7
|
-
import '../../extra/storage-core.cjs';
|
|
8
|
-
import '../../extra/storage-tiers.cjs';
|
|
1
|
+
import '../../node-BYInONRr.cjs';
|
|
2
|
+
export { N as NS_PER_MS, c as NS_PER_SEC } from '../../index-CwP_KAMS.cjs';
|
|
3
|
+
import '../../budget-gate-DiP_nK0n.cjs';
|
|
4
|
+
export { R as ResilientPipelineBundle, a as ResilientPipelineOptions, r as resilientPipeline } from '../../index-BM9szD8n.cjs';
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import '../../node-
|
|
2
|
-
export { N as NS_PER_MS, c as NS_PER_SEC } from '../../
|
|
3
|
-
import '../../
|
|
4
|
-
export { R as ResilientPipelineBundle, a as ResilientPipelineOptions, r as resilientPipeline } from '../../index-
|
|
5
|
-
import '../../graph-BjW1taJl.js';
|
|
6
|
-
import '../../meta-BYqlATmg.js';
|
|
7
|
-
import '../../extra/storage-core.js';
|
|
8
|
-
import '../../extra/storage-tiers.js';
|
|
1
|
+
import '../../node-BYInONRr.js';
|
|
2
|
+
export { N as NS_PER_MS, c as NS_PER_SEC } from '../../index-CmqiJZKM.js';
|
|
3
|
+
import '../../budget-gate-CmmVtasH.js';
|
|
4
|
+
export { R as ResilientPipelineBundle, a as ResilientPipelineOptions, r as resilientPipeline } from '../../index-BskfDoZ_.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"../../chunk-
|
|
1
|
+
import{a as c}from"../../chunk-MC4UYY2X.js";import"../../chunk-IUB4NYI2.js";import"../../chunk-L6NSJVJZ.js";import"../../chunk-SGS4OJGS.js";import"../../chunk-ESMPEKEV.js";import{a,b}from"../../chunk-4VVTGLXJ.js";import"../../chunk-35JTVPOX.js";import"../../chunk-IA7DUNGB.js";import"../../chunk-LYCLF26R.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{a as NS_PER_MS,b as NS_PER_SEC,c as resilientPipeline};
|