@graphrefly/graphrefly 0.42.0 → 0.44.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/{cascading-CH-_VwG9.d.cts → cascading-BglDkMdX.d.cts} +2 -2
- package/dist/{cascading-OgKQZjsa.d.ts → cascading-MFgxu7Yo.d.ts} +2 -2
- package/dist/chunk-2T7U5EU6.js +1 -0
- package/dist/chunk-5M4CCMMD.js +45 -0
- package/dist/{chunk-YGL7FPVQ.js → chunk-5XJ6B66J.js} +1 -1
- package/dist/{chunk-NWXQIOIB.js → chunk-6X7AFUJV.js} +1 -1
- package/dist/chunk-7K6PWTDQ.js +1 -0
- package/dist/{chunk-D27JNOLZ.js → chunk-7LIAPXJB.js} +1 -1
- package/dist/{chunk-CLD3F4R5.js → chunk-7WPU3UHQ.js} +1 -1
- package/dist/{chunk-NNKJUORL.js → chunk-A5WCQ5NO.js} +1 -1
- package/dist/chunk-APPIWSGD.js +84 -0
- package/dist/{chunk-TZQPPQEQ.js → chunk-BEZWM2SY.js} +1 -1
- package/dist/{chunk-5QRRKBUT.js → chunk-CB676TKJ.js} +1 -1
- package/dist/{chunk-KT5DTRBP.js → chunk-CE6TI2TL.js} +1 -1
- package/dist/{chunk-6YFZMUMR.js → chunk-CLVB32RD.js} +1 -1
- package/dist/{chunk-2K5RXLAH.js → chunk-CRVT7D2P.js} +1 -1
- package/dist/chunk-D7GPHKFH.js +1 -0
- package/dist/{chunk-FUZ6S2DY.js → chunk-DHRX7JX4.js} +1 -1
- package/dist/chunk-FZMYDOWV.js +1 -0
- package/dist/{chunk-35JTVPOX.js → chunk-GHBWHMRZ.js} +1 -1
- package/dist/{chunk-KGKJCHEK.js → chunk-GLERH466.js} +1 -1
- package/dist/{chunk-CISGGAIF.js → chunk-HIDYF36O.js} +1 -1
- package/dist/chunk-HITNVN6B.js +3 -0
- package/dist/{chunk-7ARY3Y3T.js → chunk-HY4DJBA7.js} +1 -1
- package/dist/chunk-KZIEYVXN.js +1 -0
- package/dist/{chunk-IZM3UEH3.js → chunk-N4MQX6JU.js} +1 -1
- package/dist/{chunk-FDZAZNRO.js → chunk-N7FHEL4D.js} +1 -1
- package/dist/chunk-NTEURFZH.js +1 -0
- package/dist/{chunk-4QH6VJF4.js → chunk-OIVP6KFV.js} +1 -1
- package/dist/{chunk-KCACBSJH.js → chunk-OPHBU3LG.js} +1 -1
- package/dist/{chunk-Q7QQQA3I.js → chunk-OYQOZP2F.js} +1 -1
- package/dist/{chunk-7B7ELAT2.js → chunk-PTZK576G.js} +1 -1
- package/dist/{chunk-DEJTNNQC.js → chunk-ST7UXLWR.js} +1 -1
- package/dist/chunk-SVY7VUYU.js +1 -0
- package/dist/{chunk-WHMUB5QB.js → chunk-TK3NWWD4.js} +1 -1
- package/dist/chunk-UNGSTR4X.js +61 -0
- package/dist/{chunk-VRALOYRD.js → chunk-VV4N5P64.js} +1 -1
- package/dist/chunk-W3I423PS.js +1 -0
- package/dist/{chunk-HZKW2AAB.js → chunk-WJR24TAG.js} +1 -1
- package/dist/{chunk-F3IGTWCQ.js → chunk-XTGKMHSW.js} +1 -1
- package/dist/{chunk-LDQ3IUIP.js → chunk-YBB7ZGTY.js} +1 -1
- package/dist/{chunk-G5VBJ5K6.js → chunk-Z4NPUARF.js} +1 -1
- package/dist/{chunk-KRH66M4O.js → chunk-ZGNQRPDT.js} +1 -1
- package/dist/{chunk-AGNM6RS6.js → chunk-ZKPSFFKU.js} +1 -1
- package/dist/{chunk-KY2LMAXU.js → chunk-ZLV5SQSX.js} +1 -1
- package/dist/compat/index.cjs +5 -5
- 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.cjs +1 -1
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/jotai/index.js +1 -1
- package/dist/compat/nanostores/index.cjs +1 -1
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nanostores/index.js +1 -1
- package/dist/compat/nestjs/index.cjs +5 -5
- 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 -3
- 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/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -4
- package/dist/core/index.d.ts +3 -4
- package/dist/core/index.js +1 -1
- package/dist/{decay-CdEBmDIs.d.ts → decay-BvOWTZ00.d.ts} +2 -2
- package/dist/{decay-2ZukgQ4o.d.cts → decay-CFlLvXUT.d.cts} +2 -2
- package/dist/extra/browser.cjs +1 -1
- package/dist/extra/browser.d.cts +1 -1
- package/dist/extra/browser.d.ts +1 -1
- package/dist/extra/browser.js +1 -1
- package/dist/extra/index.cjs +15 -15
- package/dist/extra/index.d.cts +10 -10
- package/dist/extra/index.d.ts +10 -10
- 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 +9 -1
- package/dist/extra/operators.d.ts +9 -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.d.cts +3 -3
- package/dist/extra/render/index.d.ts +3 -3
- package/dist/extra/sources.cjs +3 -3
- 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.cjs +1 -1
- package/dist/extra/storage-browser.d.cts +1 -1
- package/dist/extra/storage-browser.d.ts +1 -1
- package/dist/extra/storage-browser.js +1 -1
- package/dist/{fallback-Ctlj2tMY.d.cts → fallback-74oxi34l.d.cts} +1 -1
- package/dist/{fallback-CqYVLL6X.d.ts → fallback-DUyyBTBK.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-C4SHb3Ly.d.cts → graph-CWvEUQAq.d.cts} +196 -3
- package/dist/{graph-7VguS7a4.d.ts → graph-D9LFnda9.d.ts} +196 -3
- package/dist/{index-LIpQQE9f.d.cts → index-5k1T6jl0.d.cts} +9 -9
- package/dist/{index-CPNSy-U0.d.cts → index-9770hRuQ.d.cts} +23 -4
- package/dist/{index-CEMx8n40.d.cts → index-B-_tFaqV.d.cts} +4 -4
- package/dist/{index-2B7u2pVn.d.cts → index-B17QddL1.d.cts} +4 -4
- package/dist/{index-B-i4_g3k.d.ts → index-B1F8Enjf.d.ts} +61 -8
- package/dist/{index-DBevwHj_.d.ts → index-B5S8ULbU.d.ts} +3 -3
- package/dist/{index-Dgs8zcj7.d.ts → index-B8YnZpIR.d.ts} +2 -2
- package/dist/{index-B3OTH1dV.d.ts → index-BHskSB8v.d.ts} +28 -17
- package/dist/{index-sl4NyzQx.d.cts → index-BIYAkbAi.d.cts} +1 -1
- package/dist/{index-C9kSENB4.d.cts → index-BQSKmbuG.d.cts} +1 -1
- package/dist/{index-tJoTcnHh.d.cts → index-BaQaY_IQ.d.cts} +2 -2
- package/dist/{index-CJK1JkYy.d.ts → index-BmZXHqkE.d.ts} +1 -1
- package/dist/{index-pT8sCpOJ.d.ts → index-BoJ5JHxI.d.ts} +12 -3
- package/dist/{index-BeT2r7sk.d.ts → index-BocU7pqs.d.ts} +23 -4
- package/dist/{index-ChOyVLKm.d.cts → index-BrPrLl4e.d.cts} +1 -1
- package/dist/{index-D-Xs74HZ.d.cts → index-BxNs2HB9.d.cts} +33 -9
- package/dist/{index-Bf7eqeSF.d.ts → index-Byu-OpX_.d.ts} +2 -2
- package/dist/{index-BoLv_OfD.d.cts → index-C1T3d7V-.d.cts} +61 -8
- package/dist/{index-BTQtTb_H.d.cts → index-C5ri2Axc.d.cts} +3 -3
- package/dist/{index-z96luz5O.d.cts → index-C5stwKcw.d.cts} +1 -1
- package/dist/{index-CZmcDtFn.d.ts → index-C9l6OEBL.d.ts} +1 -1
- package/dist/{index-CCq87F7t.d.ts → index-CBBLl_rc.d.ts} +1 -1
- package/dist/{index-D6egPFAL.d.ts → index-CBGUK09R.d.ts} +4 -4
- package/dist/{index-C0-Jv1kP.d.cts → index-CC-AvFTy.d.cts} +12 -3
- package/dist/{index-DQo8xBgd.d.ts → index-CJF1URuX.d.ts} +9 -9
- package/dist/{index-BJX94aud.d.cts → index-CK29LV56.d.cts} +1 -1
- package/dist/{index-BP8a88zx.d.ts → index-CMh5Rz1y.d.ts} +4 -4
- package/dist/{index-CvrqGfNS.d.ts → index-CPQlGA29.d.ts} +1 -1
- package/dist/{index-Bbkgpt5t.d.ts → index-CR8QpwX8.d.ts} +49 -24
- package/dist/{index-Du7u1lSf.d.cts → index-CS0LTlB8.d.cts} +4 -4
- package/dist/{index-Bc41FuHp.d.cts → index-CSOmP7xT.d.cts} +2 -2
- package/dist/{index-BsT7F2et.d.ts → index-CYq8vAyV.d.ts} +2 -2
- package/dist/{index-Bn4zHYLj.d.ts → index-CZ3r5Rxp.d.ts} +4 -4
- package/dist/{index-HoU88d5U.d.cts → index-CasX6Pfq.d.cts} +68 -9
- package/dist/{index-BG0BN3PB.d.ts → index-CdAlHFEt.d.ts} +1 -1
- package/dist/{index-CpyNFqkB.d.ts → index-CdTelp1M.d.ts} +8 -4
- package/dist/{index-D8l8hNXn.d.ts → index-CeFiHtAg.d.ts} +4 -4
- package/dist/{index-DmAgG5CI.d.cts → index-Cj3WohTd.d.cts} +8 -4
- package/dist/{index-BtAsBp8K.d.cts → index-Climxqsu.d.cts} +4 -4
- package/dist/{index-CJIuLu2f.d.cts → index-Co7uli2l.d.cts} +28 -17
- package/dist/{index-DIOoAZUX.d.ts → index-CviRnE4K.d.ts} +1 -1
- package/dist/{index-Dhc7a7Xo.d.cts → index-Cwv0KWcU.d.cts} +2 -2
- package/dist/{index-Dn-wI9g4.d.ts → index-CzLVrjxn.d.ts} +2 -2
- package/dist/{index-DO9XxMzS.d.ts → index-D0aciIex.d.cts} +3 -18
- package/dist/{index-4Uz-e_fL.d.ts → index-DHen9Klo.d.ts} +33 -9
- package/dist/{index-3NmAfcH0.d.cts → index-DV_1YuVk.d.cts} +40 -8
- package/dist/{index-BdGtBX-X.d.cts → index-Dc4AYqrJ.d.cts} +3 -3
- package/dist/{index-Dmqp7KjD.d.ts → index-Dgl1HpPn.d.ts} +1 -1
- package/dist/{index-CJQm0g38.d.ts → index-DisjX8a-.d.ts} +40 -8
- package/dist/{index-B11anra4.d.cts → index-UPSiS-X7.d.cts} +49 -24
- package/dist/{index-DBIqYS43.d.cts → index-Yq60JP3s.d.ts} +3 -18
- package/dist/{index-f5IivDUX.d.cts → index-ZVQhLa2i.d.cts} +1 -1
- package/dist/{index-hHcaFlJX.d.cts → index-_6ODbuOu.d.cts} +1 -1
- package/dist/{index-BVpm6noz.d.cts → index-hcDJ8PSI.d.cts} +1 -1
- package/dist/{index-DBHK8O6H.d.ts → index-nozs3fFC.d.ts} +3 -3
- package/dist/{index-BUYXac2c.d.ts → index-p09KSrTN.d.ts} +68 -9
- package/dist/{index-C7O6r5fV.d.ts → index-sqkqlb1p.d.ts} +1 -1
- package/dist/{index-CZjOhcBy.d.cts → index-tRCxuAXF.d.cts} +2 -2
- package/dist/index.cjs +48 -48
- package/dist/index.d.cts +42 -43
- package/dist/index.d.ts +42 -43
- package/dist/index.js +1 -1
- package/dist/{node-ClS5yC-B.d.cts → node-kK3CvTrR.d.cts} +1 -1
- package/dist/{node-ClS5yC-B.d.ts → node-kK3CvTrR.d.ts} +1 -1
- package/dist/{observable-BsBzUrcI.d.ts → observable-DWjNfLvC.d.ts} +1 -1
- package/dist/{observable-DLGPPtb8.d.cts → observable-e3eiPPFy.d.cts} +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 -16
- package/dist/patterns/ai/index.d.cts +16 -17
- package/dist/patterns/ai/index.d.ts +16 -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/cqrs/index.cjs +3 -3
- 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 -5
- 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 -3
- 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 +16 -16
- 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/harness/index.cjs +9 -9
- package/dist/patterns/harness/index.d.cts +10 -11
- package/dist/patterns/harness/index.d.ts +10 -11
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/inspect/index.cjs +3 -3
- package/dist/patterns/inspect/index.d.cts +7 -7
- package/dist/patterns/inspect/index.d.ts +7 -7
- package/dist/patterns/inspect/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +3 -3
- 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/memory/index.cjs +3 -3
- 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 -3
- 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 -3
- package/dist/patterns/orchestration/index.d.cts +6 -7
- package/dist/patterns/orchestration/index.d.ts +6 -7
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.cjs +3 -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 -4
- 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 -3
- 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/surface/index.cjs +10 -10
- 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-WBlobVhU.d.cts → pipeline-graph-CIKhynsF.d.cts} +11 -6
- package/dist/{pipeline-graph-v8fMvqNk.d.ts → pipeline-graph-Sgj0gCwn.d.ts} +11 -6
- package/dist/{reactive-layout-v7KPvxoc.d.ts → reactive-layout-DOTs9P3X.d.ts} +2 -2
- package/dist/{reactive-layout-Dsvob4zD.d.cts → reactive-layout-DgctbqZo.d.cts} +2 -2
- package/dist/{reactive-log-BezYsbA_.d.ts → reactive-log-BKALbfal.d.ts} +1 -1
- package/dist/{reactive-log-B00laMSQ.d.cts → reactive-log-DIGdYqQ6.d.cts} +1 -1
- package/dist/{reactive-map-48mnZ-nu.d.cts → reactive-map-CEFGp8TK.d.cts} +1 -1
- package/dist/{reactive-map-BVVPdvmi.d.ts → reactive-map-DS_SIAxv.d.ts} +1 -1
- package/dist/resilience-6LYQJAC5.js +1 -0
- package/dist/sugar-DQjFmVqb.d.cts +399 -0
- package/dist/sugar-fhLIE7TT.d.ts +399 -0
- package/dist/{topology-tree-BSdfSwMi.d.cts → topology-tree-Bcz27hpF.d.cts} +1 -1
- package/dist/{topology-tree-BNGvuG82.d.ts → topology-tree-xvaD0fOX.d.ts} +1 -1
- package/dist/{types-B1jDWVsM.d.cts → types-C0_yquda.d.cts} +1 -1
- package/dist/{types-DkzUUs0H.d.ts → types-CWFysE9E.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3ERTUW2J.js +0 -45
- package/dist/chunk-3K7HA4Y6.js +0 -1
- package/dist/chunk-3ZZX7M25.js +0 -1
- package/dist/chunk-4I45FVQS.js +0 -1
- package/dist/chunk-5ST42ESJ.js +0 -1
- package/dist/chunk-7VKFXLZQ.js +0 -84
- package/dist/chunk-ACMJ2ZPS.js +0 -3
- package/dist/chunk-AS3TV2TV.js +0 -1
- package/dist/chunk-LPRWATHB.js +0 -61
- package/dist/chunk-LYCLF26R.js +0 -1
- package/dist/chunk-VE5SIZEM.js +0 -1
- package/dist/chunk-XLQPNNIC.js +0 -1
- package/dist/meta-BgVAsg9j.d.ts +0 -102
- package/dist/meta-vE8bxW1E.d.cts +0 -102
- package/dist/resilience-445VFFXQ.js +0 -1
- package/dist/sugar-CH-2ZY90.d.ts +0 -203
- package/dist/sugar-DStZfUEK.d.cts +0 -203
package/dist/core/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _e=Object.defineProperty;var Xe=Object.getOwnPropertyDescriptor;var Ze=Object.getOwnPropertyNames;var Qe=Object.prototype.hasOwnProperty;var et=(n,e)=>{for(var t in e)_e(n,t,{get:e[t],enumerable:!0})},tt=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ze(e))!Qe.call(n,r)&&r!==t&&_e(n,r,{get:()=>e[r],enumerable:!(s=Xe(e,r))||s.enumerable});return n};var nt=n=>tt(_e({},"__esModule",{value:!0}),n);var gt={};et(gt,{COMPLETE:()=>k,COMPLETE_MSG:()=>be,COMPLETE_ONLY_BATCH:()=>ce,DATA:()=>y,DEFAULT_ACTOR:()=>ke,DIRTY:()=>w,DIRTY_MSG:()=>R,DIRTY_ONLY_BATCH:()=>Z,ERROR:()=>p,GraphReFlyConfig:()=>W,GuardDenied:()=>F,INVALIDATE:()=>T,INVALIDATE_MSG:()=>ye,INVALIDATE_ONLY_BATCH:()=>de,NodeImpl:()=>V,PAUSE:()=>N,RESOLVED:()=>x,RESOLVED_MSG:()=>J,RESOLVED_ONLY_BATCH:()=>ae,RESUME:()=>I,START:()=>C,START_MSG:()=>X,TEARDOWN:()=>v,TEARDOWN_MSG:()=>me,TEARDOWN_ONLY_BATCH:()=>Q,accessHintForGuard:()=>at,advanceVersion:()=>ue,autoTrackNode:()=>Ye,batch:()=>Me,configure:()=>He,createVersioning:()=>te,defaultConfig:()=>G,defaultHash:()=>ee,derived:()=>Ne,downWithBatch:()=>U,dynamicNode:()=>$e,effect:()=>ze,factoryTag:()=>We,isBatching:()=>oe,isV1:()=>Ce,monotonicNs:()=>Re,node:()=>H,normalizeActor:()=>Y,pipe:()=>qe,placeholderArgs:()=>Pe,policy:()=>De,policyFromRules:()=>ot,producer:()=>je,registerBuiltins:()=>le,resolveDescribeFields:()=>Le,state:()=>Be,wallClockNs:()=>ie});module.exports=nt(gt);var ke={type:"system",id:""};function Y(n){if(n==null)return ke;let{type:e,id:t,...s}=n;return{type:e??"system",id:t??"",...s}}var L=0,q=!1,D=[],O=[],P=[],K=[];function oe(){return L>0||q}function Ae(){return L>0}function Ee(n){L>0?K.push(n):n()}function Me(n){L+=1;let e=!1;try{n()}catch(t){throw e=!0,t}finally{if(L-=1,L===0)if(e){if(!q){let t=K.splice(0);for(let s of t)try{s()}catch{}D.length=0,O.length=0,P.length=0}}else st()}}function st(){let n=!q;n&&(q=!0);let e=[],t=0;try{for(;D.length>0||O.length>0||P.length>0||n&&K.length>0;){if(n&&K.length>0){let i=K.splice(0);for(let a of i)try{a()}catch(o){e.push(o)}continue}if(t+=1,t>1e3)throw D.length=0,O.length=0,P.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let r=(D.length>0?D:O.length>0?O:P).splice(0);for(let i of r)try{i()}catch(a){e.push(a)}}}finally{n&&(q=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function U(n,e,t){if(e.length===0)return;if(e.length===1){let c=t(e[0][0]);if(c<3||!oe()){n(e);return}(c>=5?P:c===4?O:D).push(()=>n(e));return}let s=e.length,r=s,i=s,a=s,o=0;for(;o<s&&t(e[o][0])<3;)o++;for(r=o;o<s&&t(e[o][0])===3;)o++;for(i=o;o<s&&t(e[o][0])===4;)o++;a=o;let d=oe();if(r>0){let c=e.slice(0,r);n(c)}if(i>r){let c=e.slice(r,i);d?D.push(()=>n(c)):n(c)}if(a>i){let c=e.slice(i,a);d?O.push(()=>n(c)):n(c)}if(s>a){let c=e.slice(a,s);d?P.push(()=>n(c)):n(c)}}function Re(){return Math.trunc(performance.now()*1e6)}function ie(){return Date.now()*1e6}var C=Symbol.for("graphrefly/START"),y=Symbol.for("graphrefly/DATA"),w=Symbol.for("graphrefly/DIRTY"),x=Symbol.for("graphrefly/RESOLVED"),T=Symbol.for("graphrefly/INVALIDATE"),N=Symbol.for("graphrefly/PAUSE"),I=Symbol.for("graphrefly/RESUME"),v=Symbol.for("graphrefly/TEARDOWN"),k=Symbol.for("graphrefly/COMPLETE"),p=Symbol.for("graphrefly/ERROR"),R=Object.freeze([w]),J=Object.freeze([x]),ye=Object.freeze([T]),X=Object.freeze([C]),be=Object.freeze([k]),me=Object.freeze([v]),Z=Object.freeze([R]),ae=Object.freeze([J]),de=Object.freeze([ye]),ce=Object.freeze([be]),Q=Object.freeze([me]);var W=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 s=this._messageTypes.get(t);return s!=null?s.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.")}};function le(n){n.registerMessageType(C,{tier:0,wireCrossing:!1}),n.registerMessageType(w,{tier:1,wireCrossing:!1}),n.registerMessageType(T,{tier:1,wireCrossing:!1,metaPassthrough:!1}),n.registerMessageType(N,{tier:2,wireCrossing:!1}),n.registerMessageType(I,{tier:2,wireCrossing:!1}),n.registerMessageType(y,{tier:3,wireCrossing:!0}),n.registerMessageType(x,{tier:3,wireCrossing:!0}),n.registerMessageType(k,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(p,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(v,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var F=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 Se(n){return Array.isArray(n)?[...n]:[n]}function rt(n,e){return n.has(e)||n.has("*")}function De(n){let e=[];return n((r,i)=>{e.push({kind:"allow",actions:new Set(Se(r)),where:i?.where??(()=>!0)})},(r,i)=>{e.push({kind:"deny",actions:new Set(Se(r)),where:i?.where??(()=>!0)})}),(r,i)=>{let a=!1,o=!1;for(let d of e)rt(d.actions,i)&&d.where(r)&&(d.kind==="deny"?a=!0:o=!0);return a?!1:o}}function ot(n){return De((e,t)=>{for(let s of n){let r=s.actorType==null?null:new Set(Array.isArray(s.actorType)?s.actorType:[s.actorType]),i=s.actorId==null?null:new Set(Array.isArray(s.actorId)?s.actorId:[s.actorId]),a=Object.entries(s.claims??{}),o=d=>{if(r!==null&&!r.has(String(d.type))||i!==null&&!i.has(String(d.id??"")))return!1;for(let[c,l]of a)if(d[c]!==l)return!1;return!0};s.effect==="deny"?t(s.action,{where:o}):e(s.action,{where:o})}})}var it=["human","llm","wallet","system"];function at(n){let e=it.filter(t=>n({type:t,id:""},"write"));return e.length===0?"restricted":e.includes("human")&&e.includes("llm")&&e.every(t=>t==="human"||t==="llm"||t==="system")?"both":e.length===1?e[0]:e.join("+")}var dt={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){n.registerCodec(dt)}function ve(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(ve);if(typeof n=="object"&&n!==null){let e={};for(let t of Object.keys(n).sort())e[t]=ve(n[t]);return e}return null}var ct=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]),lt=new TextEncoder;function ut(n){let e=lt.encode(n),t=e.length,s=t*8,r=t+9+63&-64,i=new Uint8Array(r);i.set(e),i[t]=128;let a=new DataView(i.buffer);a.setUint32(r-4,s>>>0,!1),a.setUint32(r-8,Math.floor(s/4294967296)>>>0,!1);let o=1779033703,d=3144134277,c=1013904242,l=2773480762,f=1359893119,g=2600822924,u=528734635,_=1541459225,S=new Uint32Array(64),m=(E,b)=>E>>>b|E<<32-b;for(let E=0;E<r;E+=64){for(let h=0;h<16;h++)S[h]=a.getUint32(E+h*4,!1);for(let h=16;h<64;h++){let z=S[h-15],$=S[h-2],re=m(z,7)^m(z,18)^z>>>3,ge=m($,17)^m($,19)^$>>>10;S[h]=S[h-16]+re+S[h-7]+ge>>>0}let b=o,B=d,j=c,he=l,M=f,ne=g,se=u,pe=_;for(let h=0;h<64;h++){let z=m(M,6)^m(M,11)^m(M,25),$=M&ne^~M&se,re=pe+z+$+ct[h]+S[h]>>>0,ge=m(b,2)^m(b,13)^m(b,22),Ke=b&B^b&j^B&j,Je=ge+Ke>>>0;pe=se,se=ne,ne=M,M=he+re>>>0,he=j,j=B,B=b,b=re+Je>>>0}o=o+b>>>0,d=d+B>>>0,c=c+j>>>0,l=l+he>>>0,f=f+M>>>0,g=g+ne>>>0,u=u+se>>>0,_=_+pe>>>0}let A=E=>E.toString(16).padStart(8,"0");return A(o)+A(d)+A(c)+A(l)+A(f)+A(g)+A(u)+A(_)}function ee(n){let e=ve(n??null),t=JSON.stringify(e);return ut(t).slice(0,16)}function ft(){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 te(n,e,t){let s=t?.id??ft();if(n===0)return{id:s,version:0};let i=(t?.hash??ee)(e);return{id:s,version:0,cid:i,prev:null}}function ue(n,e,t){n.version+=1,"cid"in n&&(n.prev=n.cid,n.cid=t(e))}function Ce(n){return"cid"in n}var Ie=()=>{},Fe=100;function Ge(n){return{node:n,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function we(n){n.prevData=void 0,n.dirty=!1,n.involvedThisWave=!1,n.dataBatch.length=0,n.terminal=void 0}function fe(n){return n.length===0?n:typeof n[0]=="symbol"?[n]:n}var ht=(n,e,t,s)=>{t.direction==="down-in"&&n._onDepMessage(t.depIndex,e)},pt=(n,e,t,s)=>{let r=n;if(r._status==="completed"||r._status==="errored")return;let i=r._cached,a=i===void 0?[X]:[X,[y,i]];r._status==="dirty"&&a.push(R),U(e,a,r._config.tierOf)},G=new W({onMessage:ht,onSubscribe:pt});le(G);Oe(G);function He(n){if(G._isFrozen())throw new Error("configure() called after a node was created \u2014 the default GraphReFlyConfig is frozen. Call configure(...) at application startup, before any node factories run.");n(G)}var V=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,s){this._config=s.config??G,this._config.onMessage,this._optsName=s.name,this._describeKind=s.describeKind,this._equals=s.equals??Object.is,this._resubscribable=s.resubscribable??!1,this._resetOnTeardown=s.resetOnTeardown??!1,this._autoComplete=s.completeWhenDepsComplete??!0,this._autoError=s.errorWhenDepsError??!0,this._pausable=s.pausable??!0,this._guard=s.guard,this._fn=t,this._partial=s.partial??!1,this._cached=s.initial!==void 0?s.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=s.versioningHash??this._config.defaultHashFn??ee;let r=s.versioning??this._config.defaultVersioning;this._versioningLevel=r,this._versioning=r!=null?te(r,this._cached===void 0?void 0:this._cached,{id:s.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ge);let i={};for(let[o,d]of Object.entries(s.meta??{})){let c={initial:d,name:`${s.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};s.guard!=null&&(c.guard=s.guard),i[o]=new n([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[y,o]])},down(o){a._emit(fe(o))},up(o){a._emitUp(fe(o))}},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 s=this._versioningLevel;if(s!=null&&e<=s)return;let r=t?.hash??this._hashFn;r!==this._hashFn&&(this._hashFn=r);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??t?.id,d=a?.version??0,c=te(e,i,{id:o,hash:r});c.version=d,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 t=Y(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,s=e?.actor!=null;if(!t&&!s)return;let r=Y(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(r,i))throw new F({actor:r,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(r,i))throw new F({actor:r,action:i,nodeName:this.name})}this._lastMutation={actor:r,timestamp_ns:ie()}}down(e,t){let s=fe(e);s.length!==0&&(this._checkGuard(t),this._emit(s))}emit(e,t){this._checkGuard(t),this._emit([[y,e]])}up(e,t){if(this._deps.length===0)return;let s=fe(e);if(s.length===0)return;this._checkGuard(t);let r=t??{internal:!0};this._validateUpTiers(s);for(let i of this._deps)i.node.up?.(s,r)}_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 s of e){let r=t(s[0]);if(r===3||r===4)throw new Error(`Node "${this.name}": tier-${r} 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 d=Y(t);if(!this._guard(d,"observe"))throw new F({actor:d,action:"observe",nodeName:this.name})}let r=this._isTerminal&&this._resubscribable;if(r){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 d of this._deps)we(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:r},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let o=!1;return()=>{o||(o=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),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 s=0;s<e;s++){let r=s,i=this._deps[s];i.unsub=Ie,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,d=!1;for(let c of a)o(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:r},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(s){this._deps[t].unsub=null;for(let r=0;r<t;r++){let i=this._deps[r];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}we(i)}}throw this._dirtyDepCount=0,s}}_addDep(e){for(let r=0;r<this._deps.length;r++)if(this._deps[r].node===e)return r;let t=this._deps.length,s=Ge(e);if(this._deps.push(s),this._sinks==null)return t;s.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z),s.unsub=Ie;try{s.unsub=e.subscribe(r=>{if(s.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of r)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:t},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(r){throw s.unsub=null,this._deps.pop(),this._dirtyDepCount--,r}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(s){this._emit([[p,this._wrapFnError("cleanup threw",s)]])}else if(t!=null&&typeof t=="object"){let s=t.deactivate;if(typeof s=="function")try{s()}catch(r){this._emit([[p,this._wrapFnError("cleanup.deactivate threw",r)]])}}for(let s of this._deps){if(s.unsub!=null){let r=s.unsub;s.unsub=null;try{r()}catch{}}we(s)}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 s=this._deps[e],r=t[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:t};for(let a of this._inspectorHooks)a(i)}if(r!==C){if(r===w){this._depDirtied(s);return}if(r===T){if(this._depInvalidated(s),this._cached===void 0)return;this._emit(de);return}if(r===N||r===I){this._emit([t]);return}if(r===v){this._emit(Q);return}if(r===y)this._depSettledAsData(s,t[1]);else if(r===x)this._depSettledAsResolved(s);else if(r===k)this._depSettledAsTerminal(s,!0);else if(r===p)this._depSettledAsTerminal(s,t[1]);else{this._emit([t]);return}if(!this._fn){(r===y||r===x)&&this._emit([t]),(r===k||r===p)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z))}_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(ae),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([[p,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(ce)}_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(a){this._emit([[p,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(o){this._emit([[p,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let t=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),s=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let o=t[a];o!=null&&o.length>0&&(this._deps[a].prevData=o[o.length-1])}let r=this._deps.map(a=>a.terminal),i={prevData:s,terminalDeps:r,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:t,prevData:s};for(let o of this._inspectorHooks)o(a)}this._isExecutingFn=!0;try{let a=this._fn(t,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let o=a;(typeof o.beforeRun=="function"||typeof o.deactivate=="function"||typeof o.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[p,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Fe?(this._rerunDepth=0,this._emit([[p,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Fe} \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 s=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${s}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[R,e[0]]:e;let s=!0,r=!1,i=!1,a=-1;for(let d of e){let c=t(d[0]);c<a&&(s=!1),c===3&&(r=!0),d[0]===w&&(i=!0),a=c}let o=e;if(!s){let d=e.map((c,l)=>({m:c,i:l,tier:t(c[0])}));d.sort((c,l)=>c.tier-l.tier||c.i-l.i),o=d.map(c=>c.m)}if(r&&!i&&this._status!=="dirty"){let d=0;for(;d<o.length&&t(o[d][0])===0;)d++;return d===0?[R,...o]:[...o.slice(0,d),R,...o.slice(d)]}return o}_emit(e){if(e.length===0)return;for(let o=0;o<e.length;o++){let d=e[o];if(d[0]===p&&d[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 o=e.filter(d=>d[0]===v||d[0]===T);if(o.length===0)return;t=o}t=this._frameBatch(t);let r=null;for(let o=0;o<t.length;o++){let d=t[o],c=d[0];if(c!==N&&c!==I){r?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===N?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let l=!0;if(this._pausable!==!1){let f=d[1];if(c===N)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))l=!1;else if(this._pauseLocks.delete(f),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())}}l?r?.push(d):r==null&&(r=t.slice(0,o))}if(r!=null){if(r.length===0)return;t=r}if(this._hasMeta&&t.some(o=>o[0]===v))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(Q)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(t);if(i.length>0&&this._config.inspectorEnabled){let o=this._config.globalInspector;if(o!=null)try{o({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let o=this._config.tierOf,d=[];for(let c of i)o(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[p,a]])}_updateState(e){let t=this._config.tierOf,s,r,i=-1,a=0;for(let l of e)t(l[0])===3&&a++;let o=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let l=e.length-1;l>=0;l--)if(e[l][0]===y){d=l;break}}for(let l=0;l<e.length;l++){let f=e[l],g=f[0];if(g===y){if(f.length>=2){let u=!1;if(o&&this._cached!==void 0)try{u=this._equals(this._cached,f[1])}catch(_){r=this._wrapFnError("equals threw",_),i=l;break}if(u){s==null&&(s=e.slice(0,l)),s.push(J),this._status="resolved";continue}this._cached=f[1],this._versioning!=null&&(d<0||l===d)&&ue(this._versioning,f[1],this._hashFn)}this._status="settled",s?.push(f)}else if(s?.push(f),g===w)this._status="dirty";else if(g===x)this._status="resolved";else if(g===k){this._status="completed";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===p){this._status="errored";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===T){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 u=this._cleanup;if(typeof u=="function"){this._cleanup=void 0;try{u()}catch{}}else if(u!=null&&typeof u=="object"){let _=u.invalidate;if(typeof _=="function")try{_()}catch{}}}else g===v&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?s??e.slice(0,i):s??e;return r!=null?{finalMessages:c,equalsError:r}:{finalMessages:c}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let s of t)s(e)};_dispatchOrAccumulate(e){if(Ae()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Ee(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}U(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);U(this._deliverToSinks,t,this._config.tierOf)}},Ve=n=>Array.isArray(n),xe=n=>typeof n=="object"&&n!=null&&!Array.isArray(n);function H(n,e,t){let s=Ve(n)?n:[],r=typeof n=="function"?n:typeof e=="function"?e:void 0,i={};return Ve(n)?i=(xe(e)?e:t)??{}:xe(n)?i=n:i=(xe(e)?e:t)??{},new V(s,r,i)}function Le(n,e){if(e!=null&&e.length>0)return new Set(e);switch(n){case"standard":return new Set(["type","status","value","deps","meta","v"]);case"full":return null;case"spec":return new Set(["type","deps","meta","value"]);default:return new Set(["type","deps"])}}function Pe(n){let e=new WeakSet,t={};for(let[s,r]of Ue(n))t[s]=Te(r,e);return t}function Te(n,e){if(n==null)return n;let t=typeof n;if(t==="boolean"||t==="number"||t==="string")return n;if(t==="function")return"<function>";if(Array.isArray(n))return e.has(n)?"<cycle>":(e.add(n),n.map(s=>Te(s,e)));if(t==="object"){let s=n;if(e.has(s))return"<cycle>";e.add(s);try{if(typeof s.subscribe=="function"&&"cache"in s)return"<Node>"}catch{return"<unserializable>"}let r={};for(let[i,a]of Ue(s))r[i]=Te(a,e);return r}return"<unserializable>"}function Ue(n){let e=[],t;try{t=Object.keys(n)}catch{return e}for(let s of t)try{e.push([s,n[s]])}catch{e.push([s,"<unserializable>"])}return e}function We(n,e){let t={factory:n};return e!==void 0&&(t.factoryArgs=e),t}function Be(n,e){return H([],{...e,initial:n})}function je(n,e){return H((s,r,i)=>n(r,i)??void 0,{describeKind:"producer",...e})}function Ne(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);i.emit(e(o,a))},{describeKind:"derived",...t})}function ze(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);return e(o,i,a)??void 0},{describeKind:"effect",...t})}function $e(n,e,t){let s=new Map;return n.forEach((r,i)=>{s.set(r,i)}),Ne(n,(r,i)=>e(o=>{let d=s.get(o);if(d==null)throw new Error(`dynamicNode: untracked dep "${o.name??"<unnamed>"}"`);return r[d]},i),t)}function Ye(n,e){let t,s=new Map,r=(i,a,o)=>{let d=!1,c=l=>{let f=s.get(l);if(f!==void 0){if(f<i.length){let u=i[f];return u!=null&&u.length>0?u.at(-1):o.prevData[f]}return l.cache}d=!0;let g=t._addDep(l);return s.set(l,g),l.cache};try{let l=n(c,o);d||(a.emit(l),o.store.__autoTrackLastDiscoveryError!=null&&delete o.store.__autoTrackLastDiscoveryError)}catch(l){if(!d)throw l;o.store.__autoTrackLastDiscoveryError=l}};return t=new V([],r,{describeKind:"derived",...e}),t}function qe(n,...e){let t=n;for(let s of e)t=s(t);return t}0&&(module.exports={COMPLETE,COMPLETE_MSG,COMPLETE_ONLY_BATCH,DATA,DEFAULT_ACTOR,DIRTY,DIRTY_MSG,DIRTY_ONLY_BATCH,ERROR,GraphReFlyConfig,GuardDenied,INVALIDATE,INVALIDATE_MSG,INVALIDATE_ONLY_BATCH,NodeImpl,PAUSE,RESOLVED,RESOLVED_MSG,RESOLVED_ONLY_BATCH,RESUME,START,START_MSG,TEARDOWN,TEARDOWN_MSG,TEARDOWN_ONLY_BATCH,accessHintForGuard,advanceVersion,autoTrackNode,batch,configure,createVersioning,defaultConfig,defaultHash,derived,downWithBatch,dynamicNode,effect,factoryTag,isBatching,isV1,monotonicNs,node,normalizeActor,pipe,placeholderArgs,policy,policyFromRules,producer,registerBuiltins,resolveDescribeFields,state,wallClockNs});
|
|
1
|
+
"use strict";var ye=Object.defineProperty;var Qe=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.prototype.hasOwnProperty;var nt=(n,e)=>{for(var t in e)ye(n,t,{get:e[t],enumerable:!0})},st=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of et(e))!tt.call(n,r)&&r!==t&&ye(n,r,{get:()=>e[r],enumerable:!(s=Qe(e,r))||s.enumerable});return n};var rt=n=>st(ye({},"__esModule",{value:!0}),n);var yt={};nt(yt,{COMPLETE:()=>k,COMPLETE_MSG:()=>me,COMPLETE_ONLY_BATCH:()=>ce,DATA:()=>y,DEFAULT_ACTOR:()=>Ae,DIRTY:()=>w,DIRTY_MSG:()=>D,DIRTY_ONLY_BATCH:()=>Z,ERROR:()=>p,GraphReFlyConfig:()=>W,GuardDenied:()=>I,INVALIDATE:()=>x,INVALIDATE_MSG:()=>be,INVALIDATE_ONLY_BATCH:()=>de,NodeImpl:()=>V,PAUSE:()=>N,RESOLVED:()=>T,RESOLVED_MSG:()=>J,RESOLVED_ONLY_BATCH:()=>ae,RESUME:()=>F,START:()=>C,START_MSG:()=>X,TEARDOWN:()=>v,TEARDOWN_MSG:()=>ve,TEARDOWN_ONLY_BATCH:()=>Q,accessHintForGuard:()=>ct,advanceVersion:()=>ue,autoTrackNode:()=>qe,batch:()=>De,configure:()=>Le,createVersioning:()=>te,defaultConfig:()=>G,defaultHash:()=>ee,derived:()=>he,derivedT:()=>$e,downWithBatch:()=>U,dynamicNode:()=>Ke,effect:()=>ke,effectT:()=>Ye,factoryTag:()=>Be,isBatching:()=>oe,isV1:()=>Fe,monotonicNs:()=>Re,node:()=>H,normalizeActor:()=>Y,pipe:()=>Je,placeholderArgs:()=>Ue,policy:()=>Se,policyFromRules:()=>at,producer:()=>ze,registerBuiltins:()=>le,resolveDescribeFields:()=>Pe,state:()=>je,wallClockNs:()=>ie});module.exports=rt(yt);var Ae={type:"system",id:""};function Y(n){if(n==null)return Ae;let{type:e,id:t,...s}=n;return{type:e??"system",id:t??"",...s}}var L=0,K=!1,O=[],S=[],P=[],q=[];function oe(){return L>0||K}function Ee(){return L>0}function Me(n){L>0?q.push(n):n()}function De(n){L+=1;let e=!1;try{n()}catch(t){throw e=!0,t}finally{if(L-=1,L===0)if(e){if(!K){let t=q.splice(0);for(let s of t)try{s()}catch{}O.length=0,S.length=0,P.length=0}}else ot()}}function ot(){let n=!K;n&&(K=!0);let e=[],t=0;try{for(;O.length>0||S.length>0||P.length>0||n&&q.length>0;){if(n&&q.length>0){let i=q.splice(0);for(let a of i)try{a()}catch(o){e.push(o)}continue}if(t+=1,t>1e3)throw O.length=0,S.length=0,P.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let r=(O.length>0?O:S.length>0?S:P).splice(0);for(let i of r)try{i()}catch(a){e.push(a)}}}finally{n&&(K=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function U(n,e,t){if(e.length===0)return;if(e.length===1){let c=t(e[0][0]);if(c<3||!oe()){n(e);return}(c>=5?P:c===4?S:O).push(()=>n(e));return}let s=e.length,r=s,i=s,a=s,o=0;for(;o<s&&t(e[o][0])<3;)o++;for(r=o;o<s&&t(e[o][0])===3;)o++;for(i=o;o<s&&t(e[o][0])===4;)o++;a=o;let d=oe();if(r>0){let c=e.slice(0,r);n(c)}if(i>r){let c=e.slice(r,i);d?O.push(()=>n(c)):n(c)}if(a>i){let c=e.slice(i,a);d?S.push(()=>n(c)):n(c)}if(s>a){let c=e.slice(a,s);d?P.push(()=>n(c)):n(c)}}function Re(){return Math.trunc(performance.now()*1e6)}function ie(){return Date.now()*1e6}var C=Symbol.for("graphrefly/START"),y=Symbol.for("graphrefly/DATA"),w=Symbol.for("graphrefly/DIRTY"),T=Symbol.for("graphrefly/RESOLVED"),x=Symbol.for("graphrefly/INVALIDATE"),N=Symbol.for("graphrefly/PAUSE"),F=Symbol.for("graphrefly/RESUME"),v=Symbol.for("graphrefly/TEARDOWN"),k=Symbol.for("graphrefly/COMPLETE"),p=Symbol.for("graphrefly/ERROR"),D=Object.freeze([w]),J=Object.freeze([T]),be=Object.freeze([x]),X=Object.freeze([C]),me=Object.freeze([k]),ve=Object.freeze([v]),Z=Object.freeze([D]),ae=Object.freeze([J]),de=Object.freeze([be]),ce=Object.freeze([me]),Q=Object.freeze([ve]);var W=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 s=this._messageTypes.get(t);return s!=null?s.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.")}};function le(n){n.registerMessageType(C,{tier:0,wireCrossing:!1}),n.registerMessageType(w,{tier:1,wireCrossing:!1}),n.registerMessageType(x,{tier:1,wireCrossing:!1,metaPassthrough:!1}),n.registerMessageType(N,{tier:2,wireCrossing:!1}),n.registerMessageType(F,{tier:2,wireCrossing:!1}),n.registerMessageType(y,{tier:3,wireCrossing:!0}),n.registerMessageType(T,{tier:3,wireCrossing:!0}),n.registerMessageType(k,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(p,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(v,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var I=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 Oe(n){return Array.isArray(n)?[...n]:[n]}function it(n,e){return n.has(e)||n.has("*")}function Se(n){let e=[];return n((r,i)=>{e.push({kind:"allow",actions:new Set(Oe(r)),where:i?.where??(()=>!0)})},(r,i)=>{e.push({kind:"deny",actions:new Set(Oe(r)),where:i?.where??(()=>!0)})}),(r,i)=>{let a=!1,o=!1;for(let d of e)it(d.actions,i)&&d.where(r)&&(d.kind==="deny"?a=!0:o=!0);return a?!1:o}}function at(n){return Se((e,t)=>{for(let s of n){let r=s.actorType==null?null:new Set(Array.isArray(s.actorType)?s.actorType:[s.actorType]),i=s.actorId==null?null:new Set(Array.isArray(s.actorId)?s.actorId:[s.actorId]),a=Object.entries(s.claims??{}),o=d=>{if(r!==null&&!r.has(String(d.type))||i!==null&&!i.has(String(d.id??"")))return!1;for(let[c,l]of a)if(d[c]!==l)return!1;return!0};s.effect==="deny"?t(s.action,{where:o}):e(s.action,{where:o})}})}var dt=["human","llm","wallet","system"];function ct(n){let e=dt.filter(t=>n({type:t,id:""},"write"));return e.length===0?"restricted":e.includes("human")&&e.includes("llm")&&e.every(t=>t==="human"||t==="llm"||t==="system")?"both":e.length===1?e[0]:e.join("+")}var lt={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 Ce(n){n.registerCodec(lt)}function we(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(we);if(typeof n=="object"&&n!==null){let e={};for(let t of Object.keys(n).sort())e[t]=we(n[t]);return e}return null}var ut=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]),ft=new TextEncoder;function ht(n){let e=ft.encode(n),t=e.length,s=t*8,r=t+9+63&-64,i=new Uint8Array(r);i.set(e),i[t]=128;let a=new DataView(i.buffer);a.setUint32(r-4,s>>>0,!1),a.setUint32(r-8,Math.floor(s/4294967296)>>>0,!1);let o=1779033703,d=3144134277,c=1013904242,l=2773480762,f=1359893119,g=2600822924,u=528734635,_=1541459225,R=new Uint32Array(64),m=(E,b)=>E>>>b|E<<32-b;for(let E=0;E<r;E+=64){for(let h=0;h<16;h++)R[h]=a.getUint32(E+h*4,!1);for(let h=16;h<64;h++){let z=R[h-15],$=R[h-2],re=m(z,7)^m(z,18)^z>>>3,_e=m($,17)^m($,19)^$>>>10;R[h]=R[h-16]+re+R[h-7]+_e>>>0}let b=o,B=d,j=c,pe=l,M=f,ne=g,se=u,ge=_;for(let h=0;h<64;h++){let z=m(M,6)^m(M,11)^m(M,25),$=M&ne^~M&se,re=ge+z+$+ut[h]+R[h]>>>0,_e=m(b,2)^m(b,13)^m(b,22),Xe=b&B^b&j^B&j,Ze=_e+Xe>>>0;ge=se,se=ne,ne=M,M=pe+re>>>0,pe=j,j=B,B=b,b=re+Ze>>>0}o=o+b>>>0,d=d+B>>>0,c=c+j>>>0,l=l+pe>>>0,f=f+M>>>0,g=g+ne>>>0,u=u+se>>>0,_=_+ge>>>0}let A=E=>E.toString(16).padStart(8,"0");return A(o)+A(d)+A(c)+A(l)+A(f)+A(g)+A(u)+A(_)}function ee(n){let e=we(n??null),t=JSON.stringify(e);return ht(t).slice(0,16)}function pt(){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 te(n,e,t){let s=t?.id??pt();if(n===0)return{id:s,version:0};let i=(t?.hash??ee)(e);return{id:s,version:0,cid:i,prev:null}}function ue(n,e,t){n.version+=1,"cid"in n&&(n.prev=n.cid,n.cid=t(e))}function Fe(n){return"cid"in n}var Ie=()=>{},Ge=100;function Ve(n){return{node:n,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Te(n){n.prevData=void 0,n.dirty=!1,n.involvedThisWave=!1,n.dataBatch.length=0,n.terminal=void 0}function fe(n){return n.length===0?n:typeof n[0]=="symbol"?[n]:n}var gt=(n,e,t,s)=>{t.direction==="down-in"&&n._onDepMessage(t.depIndex,e)},_t=(n,e,t,s)=>{let r=n;if(r._status==="completed"||r._status==="errored")return;let i=r._cached,a=i===void 0?[X]:[X,[y,i]];r._status==="dirty"&&a.push(D),U(e,a,r._config.tierOf)},G=new W({onMessage:gt,onSubscribe:_t});le(G);Ce(G);function Le(n){if(G._isFrozen())throw new Error("configure() called after a node was created \u2014 the default GraphReFlyConfig is frozen. Call configure(...) at application startup, before any node factories run.");n(G)}var V=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,s){this._config=s.config??G,this._config.onMessage,this._optsName=s.name,this._describeKind=s.describeKind,this._equals=s.equals??Object.is,this._resubscribable=s.resubscribable??!1,this._resetOnTeardown=s.resetOnTeardown??!1,this._autoComplete=s.completeWhenDepsComplete??!0,this._autoError=s.errorWhenDepsError??!0,this._pausable=s.pausable??!0,this._guard=s.guard,this._fn=t,this._partial=s.partial??!1,this._cached=s.initial!==void 0?s.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=s.versioningHash??this._config.defaultHashFn??ee;let r=s.versioning??this._config.defaultVersioning;this._versioningLevel=r,this._versioning=r!=null?te(r,this._cached===void 0?void 0:this._cached,{id:s.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ve);let i={};for(let[o,d]of Object.entries(s.meta??{})){let c={initial:d,name:`${s.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};s.guard!=null&&(c.guard=s.guard),s.resubscribable===!0&&(c.resubscribable=!0),i[o]=new n([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[y,o]])},down(o){a._emit(fe(o))},up(o){a._emitUp(fe(o))}},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 s=this._versioningLevel;if(s!=null&&e<=s)return;let r=t?.hash??this._hashFn;r!==this._hashFn&&(this._hashFn=r);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??t?.id,d=a?.version??0,c=te(e,i,{id:o,hash:r});c.version=d,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 t=Y(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,s=e?.actor!=null;if(!t&&!s)return;let r=Y(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(r,i))throw new I({actor:r,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(r,i))throw new I({actor:r,action:i,nodeName:this.name})}this._lastMutation={actor:r,timestamp_ns:ie()}}down(e,t){let s=fe(e);s.length!==0&&(this._checkGuard(t),this._emit(s))}emit(e,t){this._checkGuard(t),this._emit([[y,e]])}up(e,t){if(this._deps.length===0)return;let s=fe(e);if(s.length===0)return;this._checkGuard(t);let r=t??{internal:!0};this._validateUpTiers(s);for(let i of this._deps)i.node.up?.(s,r)}_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 s of e){let r=t(s[0]);if(r===3||r===4)throw new Error(`Node "${this.name}": tier-${r} 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 d=Y(t);if(!this._guard(d,"observe"))throw new I({actor:d,action:"observe",nodeName:this.name})}let r=this._isTerminal&&this._resubscribable;if(r){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 d of this._deps)Te(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:r},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let o=!1;return()=>{o||(o=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),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 s=0;s<e;s++){let r=s,i=this._deps[s];i.unsub=Ie,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,d=!1;for(let c of a)o(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:r},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(s){this._deps[t].unsub=null;for(let r=0;r<t;r++){let i=this._deps[r];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}Te(i)}}throw this._dirtyDepCount=0,s}}_addDep(e){for(let r=0;r<this._deps.length;r++)if(this._deps[r].node===e)return r;let t=this._deps.length,s=Ve(e);if(this._deps.push(s),this._sinks==null)return t;s.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z),s.unsub=Ie;try{s.unsub=e.subscribe(r=>{if(s.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of r)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:t},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(r){throw s.unsub=null,this._deps.pop(),this._dirtyDepCount--,r}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(s){this._emit([[p,this._wrapFnError("cleanup threw",s)]])}else if(t!=null&&typeof t=="object"){let s=t.deactivate;if(typeof s=="function")try{s()}catch(r){this._emit([[p,this._wrapFnError("cleanup.deactivate threw",r)]])}}for(let s of this._deps){if(s.unsub!=null){let r=s.unsub;s.unsub=null;try{r()}catch{}}Te(s)}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 s=this._deps[e],r=t[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:t};for(let a of this._inspectorHooks)a(i)}if(r!==C){if(r===w){this._depDirtied(s);return}if(r===x){if(this._depInvalidated(s),this._cached===void 0)return;this._emit(de);return}if(r===N||r===F){this._emit([t]);return}if(r===v){this._emit(Q);return}if(r===y)this._depSettledAsData(s,t[1]);else if(r===T)this._depSettledAsResolved(s);else if(r===k)this._depSettledAsTerminal(s,!0);else if(r===p)this._depSettledAsTerminal(s,t[1]);else{this._emit([t]);return}if(!this._fn){(r===y||r===T)&&this._emit([t]),(r===k||r===p)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z))}_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(ae),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([[p,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(ce)}_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(a){this._emit([[p,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(o){this._emit([[p,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let t=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),s=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let o=t[a];o!=null&&o.length>0&&(this._deps[a].prevData=o[o.length-1])}let r=this._deps.map(a=>a.terminal),i={prevData:s,terminalDeps:r,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:t,prevData:s};for(let o of this._inspectorHooks)o(a)}this._isExecutingFn=!0;try{let a=this._fn(t,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let o=a;(typeof o.beforeRun=="function"||typeof o.deactivate=="function"||typeof o.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[p,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Ge?(this._rerunDepth=0,this._emit([[p,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Ge} \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 s=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${s}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[D,e[0]]:e;let s=!0,r=!1,i=!1,a=-1;for(let d of e){let c=t(d[0]);c<a&&(s=!1),c===3&&(r=!0),d[0]===w&&(i=!0),a=c}let o=e;if(!s){let d=e.map((c,l)=>({m:c,i:l,tier:t(c[0])}));d.sort((c,l)=>c.tier-l.tier||c.i-l.i),o=d.map(c=>c.m)}if(r&&!i&&this._status!=="dirty"){let d=0;for(;d<o.length&&t(o[d][0])===0;)d++;return d===0?[D,...o]:[...o.slice(0,d),D,...o.slice(d)]}return o}_emit(e){if(e.length===0)return;for(let o=0;o<e.length;o++){let d=e[o];if(d[0]===p&&d[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 o=e.filter(d=>d[0]===v||d[0]===x);if(o.length===0)return;t=o}t=this._frameBatch(t);let r=null;for(let o=0;o<t.length;o++){let d=t[o],c=d[0];if(c!==N&&c!==F){r?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===N?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let l=!0;if(this._pausable!==!1){let f=d[1];if(c===N)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))l=!1;else if(this._pauseLocks.delete(f),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())}}l?r?.push(d):r==null&&(r=t.slice(0,o))}if(r!=null){if(r.length===0)return;t=r}if(this._hasMeta&&t.some(o=>o[0]===v))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(Q)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(t);if(i.length>0&&this._config.inspectorEnabled){let o=this._config.globalInspector;if(o!=null)try{o({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let o=this._config.tierOf,d=[];for(let c of i)o(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[p,a]])}_updateState(e){let t=this._config.tierOf,s,r,i=-1,a=0;for(let l of e)t(l[0])===3&&a++;let o=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let l=e.length-1;l>=0;l--)if(e[l][0]===y){d=l;break}}for(let l=0;l<e.length;l++){let f=e[l],g=f[0];if(g===y){if(f.length>=2){let u=!1;if(o&&this._cached!==void 0)try{u=this._equals(this._cached,f[1])}catch(_){r=this._wrapFnError("equals threw",_),i=l;break}if(u){s==null&&(s=e.slice(0,l)),s.push(J),this._status="resolved";continue}this._cached=f[1],this._versioning!=null&&(d<0||l===d)&&ue(this._versioning,f[1],this._hashFn)}this._status="settled",s?.push(f)}else if(s?.push(f),g===w)this._status="dirty";else if(g===T)this._status="resolved";else if(g===k){this._status="completed";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===p){this._status="errored";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===x){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 u=this._cleanup;if(typeof u=="function"){this._cleanup=void 0;try{u()}catch{}}else if(u!=null&&typeof u=="object"){let _=u.invalidate;if(typeof _=="function")try{_()}catch{}}}else g===v&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?s??e.slice(0,i):s??e;return r!=null?{finalMessages:c,equalsError:r}:{finalMessages:c}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let s of t)s(e)};_dispatchOrAccumulate(e){if(Ee()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Me(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}U(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);U(this._deliverToSinks,t,this._config.tierOf)}},He=n=>Array.isArray(n),xe=n=>typeof n=="object"&&n!=null&&!Array.isArray(n);function H(n,e,t){let s=He(n)?n:[],r=typeof n=="function"?n:typeof e=="function"?e:void 0,i={};return He(n)?i=(xe(e)?e:t)??{}:xe(n)?i=n:i=(xe(e)?e:t)??{},new V(s,r,i)}function Pe(n,e){if(e!=null&&e.length>0)return new Set(e);switch(n){case"standard":return new Set(["type","status","value","deps","meta","v"]);case"full":return null;case"spec":return new Set(["type","deps","meta","value"]);default:return new Set(["type","deps"])}}function Ue(n){let e=new WeakSet,t={};for(let[s,r]of We(n))t[s]=Ne(r,e);return t}function Ne(n,e){if(n==null)return n;let t=typeof n;if(t==="boolean"||t==="number"||t==="string")return n;if(t==="function")return"<function>";if(Array.isArray(n))return e.has(n)?"<cycle>":(e.add(n),n.map(s=>Ne(s,e)));if(t==="object"){let s=n;if(e.has(s))return"<cycle>";e.add(s);try{if(typeof s.subscribe=="function"&&"cache"in s)return"<Node>"}catch{return"<unserializable>"}let r={};for(let[i,a]of We(s))r[i]=Ne(a,e);return r}return"<unserializable>"}function We(n){let e=[],t;try{t=Object.keys(n)}catch{return e}for(let s of t)try{e.push([s,n[s]])}catch{e.push([s,"<unserializable>"])}return e}function Be(n,e){let t={factory:n};return e!==void 0&&(t.factoryArgs=e),t}function je(n,e){return H([],{...e,initial:n})}function ze(n,e){return H((s,r,i)=>n(r,i)??void 0,{describeKind:"producer",...e})}function he(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);i.emit(e(o,a))},{describeKind:"derived",...t})}function $e(n,e,t){return he(n,e,t)}function Ye(n,e,t){return ke(n,e,t)}function ke(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);return e(o,i,a)??void 0},{describeKind:"effect",...t})}function Ke(n,e,t){let s=new Map;return n.forEach((r,i)=>{s.set(r,i)}),he(n,(r,i)=>e(o=>{let d=s.get(o);if(d==null)throw new Error(`dynamicNode: untracked dep "${o.name??"<unnamed>"}"`);return r[d]},i),t)}function qe(n,e){let t,s=new Map,r=(i,a,o)=>{let d=!1,c=l=>{let f=s.get(l);if(f!==void 0){if(f<i.length){let u=i[f];return u!=null&&u.length>0?u.at(-1):o.prevData[f]}return l.cache}d=!0;let g=t._addDep(l);return s.set(l,g),l.cache};try{let l=n(c,o);d||(a.emit(l),o.store.__autoTrackLastDiscoveryError!=null&&delete o.store.__autoTrackLastDiscoveryError)}catch(l){if(!d)throw l;o.store.__autoTrackLastDiscoveryError=l}};return t=new V([],r,{describeKind:"derived",...e}),t}function Je(n,...e){let t=n;for(let s of e)t=s(t);return t}0&&(module.exports={COMPLETE,COMPLETE_MSG,COMPLETE_ONLY_BATCH,DATA,DEFAULT_ACTOR,DIRTY,DIRTY_MSG,DIRTY_ONLY_BATCH,ERROR,GraphReFlyConfig,GuardDenied,INVALIDATE,INVALIDATE_MSG,INVALIDATE_ONLY_BATCH,NodeImpl,PAUSE,RESOLVED,RESOLVED_MSG,RESOLVED_ONLY_BATCH,RESUME,START,START_MSG,TEARDOWN,TEARDOWN_MSG,TEARDOWN_ONLY_BATCH,accessHintForGuard,advanceVersion,autoTrackNode,batch,configure,createVersioning,defaultConfig,defaultHash,derived,derivedT,downWithBatch,dynamicNode,effect,effectT,factoryTag,isBatching,isV1,monotonicNs,node,normalizeActor,pipe,placeholderArgs,policy,policyFromRules,producer,registerBuiltins,resolveDescribeFields,state,wallClockNs});
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { A as Actor, C as COMPLETE,
|
|
2
|
-
export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-
|
|
3
|
-
export { a as
|
|
4
|
-
export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from '../sugar-DStZfUEK.cjs';
|
|
1
|
+
export { A as Actor, C as COMPLETE, d as COMPLETE_MSG, e as COMPLETE_ONLY_BATCH, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DIRTY_MSG, i as DIRTY_ONLY_BATCH, j as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, m as GuardAction, n as GuardDenied, o as GuardDeniedDetails, H as HashFn, I as INVALIDATE, p as INVALIDATE_MSG, q as INVALIDATE_ONLY_BATCH, r as Message, s as MessageContext, t as MessageTypeRegistration, u as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, v as NodeCtx, w as NodeDescribeKind, x as NodeFn, y as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-kK3CvTrR.cjs';
|
|
2
|
+
export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-Cj3WohTd.cjs';
|
|
3
|
+
export { A as AutoTrackOptions, a as DerivedFn, b as DerivedTFn, c as DescribeDetail, d as DescribeField, D as DescribeNodeOutput, e as DynamicFn, E as EffectFn, f as EffectTFn, N as NodeValues, P as PipeOperator, g as ProducerFn, T as TrackFn, h as autoTrackNode, i as derived, j as derivedT, k as dynamicNode, l as effect, m as effectT, n as factoryTag, p as pipe, o as placeholderArgs, q as producer, r as resolveDescribeFields, s as state } from '../sugar-DQjFmVqb.cjs';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { A as Actor, C as COMPLETE,
|
|
2
|
-
export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-
|
|
3
|
-
export { a as
|
|
4
|
-
export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from '../sugar-CH-2ZY90.js';
|
|
1
|
+
export { A as Actor, C as COMPLETE, d as COMPLETE_MSG, e as COMPLETE_ONLY_BATCH, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DIRTY_MSG, i as DIRTY_ONLY_BATCH, j as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, m as GuardAction, n as GuardDenied, o as GuardDeniedDetails, H as HashFn, I as INVALIDATE, p as INVALIDATE_MSG, q as INVALIDATE_ONLY_BATCH, r as Message, s as MessageContext, t as MessageTypeRegistration, u as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, v as NodeCtx, w as NodeDescribeKind, x as NodeFn, y as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-kK3CvTrR.js';
|
|
2
|
+
export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-CdTelp1M.js';
|
|
3
|
+
export { A as AutoTrackOptions, a as DerivedFn, b as DerivedTFn, c as DescribeDetail, d as DescribeField, D as DescribeNodeOutput, e as DynamicFn, E as EffectFn, f as EffectTFn, N as NodeValues, P as PipeOperator, g as ProducerFn, T as TrackFn, h as autoTrackNode, i as derived, j as derivedT, k as dynamicNode, l as effect, m as effectT, n as factoryTag, p as pipe, o as placeholderArgs, q as producer, r as resolveDescribeFields, s as state } from '../sugar-fhLIE7TT.js';
|
package/dist/core/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-KZIEYVXN.js";import{a as Z,b as _,c as $}from"../chunk-GHBWHMRZ.js";import{A as M,B as N,C as O,D as P,E as Q,F as R,G as S,H as T,I as U,J as V,K as W,L as X,M as Y,i as v,j as w,k as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"../chunk-NTEURFZH.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{i as COMPLETE,o as COMPLETE_MSG,t as COMPLETE_ONLY_BATCH,b as DATA,v as DEFAULT_ACTOR,c as DIRTY,k as DIRTY_MSG,q as DIRTY_ONLY_BATCH,j as ERROR,C as GraphReFlyConfig,E as GuardDenied,e as INVALIDATE,m as INVALIDATE_MSG,s as INVALIDATE_ONLY_BATCH,O as NodeImpl,f as PAUSE,d as RESOLVED,l as RESOLVED_MSG,r as RESOLVED_ONLY_BATCH,g as RESUME,a as START,n as START_MSG,h as TEARDOWN,p as TEARDOWN_MSG,u as TEARDOWN_ONLY_BATCH,H as accessHintForGuard,K as advanceVersion,X as autoTrackNode,y as batch,N as configure,J as createVersioning,M as defaultConfig,I as defaultHash,S as derived,T as derivedT,z as downWithBatch,W as dynamicNode,V as effect,U as effectT,$ as factoryTag,x as isBatching,L as isV1,A as monotonicNs,P as node,w as normalizeActor,Y as pipe,_ as placeholderArgs,F as policy,G as policyFromRules,R as producer,D as registerBuiltins,Z as resolveDescribeFields,Q as state,B as wallClockNs};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Node, a as NodeOptions } from './node-
|
|
2
|
-
import { R as ReactiveMapBundle, b as ReactiveMapOptions } from './reactive-map-
|
|
1
|
+
import { N as Node, a as NodeOptions } from './node-kK3CvTrR.js';
|
|
2
|
+
import { R as ReactiveMapBundle, b as ReactiveMapOptions } from './reactive-map-DS_SIAxv.js';
|
|
3
3
|
import { NodeInput } from './extra/sources.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Node, a as NodeOptions } from './node-
|
|
2
|
-
import { R as ReactiveMapBundle, b as ReactiveMapOptions } from './reactive-map-
|
|
1
|
+
import { N as Node, a as NodeOptions } from './node-kK3CvTrR.cjs';
|
|
2
|
+
import { R as ReactiveMapBundle, b as ReactiveMapOptions } from './reactive-map-CEFGp8TK.cjs';
|
|
3
3
|
import { NodeInput } from './extra/sources.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/extra/browser.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var J=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var We=(t,e)=>{for(var n in e)J(t,n,{get:e[n],enumerable:!0})},je=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ve(e))!Ue.call(t,o)&&o!==n&&J(t,o,{get:()=>e[o],enumerable:!(r=He(e,o))||r.enumerable});return t};var ze=t=>je(J({},"__esModule",{value:!0}),t);var cn={};We(cn,{fromIDBRequest:()=>Me,fromIDBTransaction:()=>Oe,indexedDbAppendLog:()=>Pe,indexedDbBackend:()=>G,indexedDbKv:()=>Le,indexedDbSnapshot:()=>Fe});module.exports=ze(cn);var P=Symbol.for("graphrefly/START"),w=Symbol.for("graphrefly/DATA"),E=Symbol.for("graphrefly/DIRTY"),M=Symbol.for("graphrefly/RESOLVED"),O=Symbol.for("graphrefly/INVALIDATE"),D=Symbol.for("graphrefly/PAUSE"),L=Symbol.for("graphrefly/RESUME"),S=Symbol.for("graphrefly/TEARDOWN"),x=Symbol.for("graphrefly/COMPLETE"),y=Symbol.for("graphrefly/ERROR"),R=Object.freeze([E]),X=Object.freeze([M]),$e=Object.freeze([O]),Z=Object.freeze([P]),Ke=Object.freeze([x]),qe=Object.freeze([S]),Q=Object.freeze([R]),ue=Object.freeze([X]),fe=Object.freeze([$e]),he=Object.freeze([Ke]),ee=Object.freeze([qe]);var Ye={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 pe(t){t.registerCodec(Ye)}var Je={type:"system",id:""};function U(t){if(t==null)return Je;let{type:e,id:n,...r}=t;return{type:e??"system",id:n??"",...r}}var ne=0,Xe=!1,ge=[],ye=[],_e=[],Ze=[];function me(){return ne>0||Xe}function be(){return ne>0}function ve(t){ne>0?Ze.push(t):t()}function W(t,e,n){if(e.length===0)return;if(e.length===1){let c=n(e[0][0]);if(c<3||!me()){t(e);return}(c>=5?_e:c===4?ye:ge).push(()=>t(e));return}let r=e.length,o=r,i=r,a=r,s=0;for(;s<r&&n(e[s][0])<3;)s++;for(o=s;s<r&&n(e[s][0])===3;)s++;for(i=s;s<r&&n(e[s][0])===4;)s++;a=s;let d=me();if(o>0){let c=e.slice(0,o);t(c)}if(i>o){let c=e.slice(o,i);d?ge.push(()=>t(c)):t(c)}if(a>i){let c=e.slice(i,a);d?ye.push(()=>t(c)):t(c)}if(r>a){let c=e.slice(a,r);d?_e.push(()=>t(c)):t(c)}}function Te(){return Date.now()*1e6}var j=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 we(t){t.registerMessageType(P,{tier:0,wireCrossing:!1}),t.registerMessageType(E,{tier:1,wireCrossing:!1}),t.registerMessageType(O,{tier:1,wireCrossing:!1,metaPassthrough:!1}),t.registerMessageType(D,{tier:2,wireCrossing:!1}),t.registerMessageType(L,{tier:2,wireCrossing:!1}),t.registerMessageType(w,{tier:3,wireCrossing:!0}),t.registerMessageType(M,{tier:3,wireCrossing:!0}),t.registerMessageType(x,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(y,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(S,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var C=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 te(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(te);if(typeof t=="object"&&t!==null){let e={};for(let n of Object.keys(t).sort())e[n]=te(t[n]);return e}return null}var Qe=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]),en=new TextEncoder;function nn(t){let e=en.encode(t),n=e.length,r=n*8,o=n+9+63&-64,i=new Uint8Array(o);i.set(e),i[n]=128;let a=new DataView(i.buffer);a.setUint32(o-4,r>>>0,!1),a.setUint32(o-8,Math.floor(r/4294967296)>>>0,!1);let s=1779033703,d=3144134277,c=1013904242,l=2773480762,h=1359893119,f=2600822924,u=528734635,p=1541459225,_=new Uint32Array(64),b=(g,T)=>g>>>T|g<<32-T;for(let g=0;g<o;g+=64){for(let m=0;m<16;m++)_[m]=a.getUint32(g+m*4,!1);for(let m=16;m<64;m++){let I=_[m-15],F=_[m-2],V=b(I,7)^b(I,18)^I>>>3,Y=b(F,17)^b(F,19)^F>>>10;_[m]=_[m-16]+V+_[m-7]+Y>>>0}let T=s,N=d,A=c,K=l,k=h,B=f,H=u,q=p;for(let m=0;m<64;m++){let I=b(k,6)^b(k,11)^b(k,25),F=k&B^~k&H,V=q+I+F+Qe[m]+_[m]>>>0,Y=b(T,2)^b(T,13)^b(T,22),Ge=T&N^T&A^N&A,Be=Y+Ge>>>0;q=H,H=B,B=k,k=K+V>>>0,K=A,A=N,N=T,T=V+Be>>>0}s=s+T>>>0,d=d+N>>>0,c=c+A>>>0,l=l+K>>>0,h=h+k>>>0,f=f+B>>>0,u=u+H>>>0,p=p+q>>>0}let v=g=>g.toString(16).padStart(8,"0");return v(s)+v(d)+v(c)+v(l)+v(h)+v(f)+v(u)+v(p)}function re(t){let e=te(t??null),n=JSON.stringify(e);return nn(n).slice(0,16)}function tn(){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 oe(t,e,n){let r=n?.id??tn();if(t===0)return{id:r,version:0};let i=(n?.hash??re)(e);return{id:r,version:0,cid:i,prev:null}}function xe(t,e,n){t.version+=1,"cid"in t&&(t.prev=t.cid,t.cid=n(e))}var ke=()=>{},Se=100;function Ne(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 z(t){return t.length===0?t:typeof t[0]=="symbol"?[t]:t}var rn=(t,e,n,r)=>{n.direction==="down-in"&&t._onDepMessage(n.depIndex,e)},on=(t,e,n,r)=>{let o=t;if(o._status==="completed"||o._status==="errored")return;let i=o._cached,a=i===void 0?[Z]:[Z,[w,i]];o._status==="dirty"&&a.push(R),W(e,a,o._config.tierOf)},ae=new j({onMessage:rn,onSubscribe:on});we(ae);pe(ae);var $=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??ae,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??re;let o=r.versioning??this._config.defaultVersioning;this._versioningLevel=o,this._versioning=o!=null?oe(o,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ne);let i={};for(let[s,d]of Object.entries(r.meta??{})){let c={initial:d,name:`${r.name??"node"}:meta:${s}`,describeKind:"state",config:this._config};r.guard!=null&&(c.guard=r.guard),i[s]=new t([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(s){a._emit([[w,s]])},down(s){a._emit(z(s))},up(s){a._emitUp(z(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,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 i=this._cached===void 0?void 0:this._cached,a=this._versioning,s=a?.id??n?.id,d=a?.version??0,c=oe(e,i,{id:s,hash:o});c.version=d,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=U(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=U(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(o,i))throw new C({actor:o,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(o,i))throw new C({actor:o,action:i,nodeName:this.name})}this._lastMutation={actor:o,timestamp_ns:Te()}}down(e,n){let r=z(e);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(e,n){this._checkGuard(n),this._emit([[w,e]])}up(e,n){if(this._deps.length===0)return;let r=z(e);if(r.length===0)return;this._checkGuard(n);let o=n??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.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 d=U(n);if(!this._guard(d,"observe"))throw new C({actor:d,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 d of this._deps)se(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:o},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let s=!1;return()=>{s||(s=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),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,i=this._deps[r];i.unsub=ke,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let s=this._config.tierOf,d=!1;for(let c of a)s(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:o},this._actions);d&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let o=0;o<n;o++){let i=this._deps[o];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}se(i)}}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=Ne(e);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Q),r.unsub=ke;try{r.unsub=e.subscribe(o=>{if(r.unsub===null)return;let i=this._config.tierOf,a=!1;for(let s of o)i(s[0])>=3&&(a=!0),this._config.onMessage(this,s,{direction:"down-in",depIndex:n},this._actions);a&&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([[y,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([[y,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 i={kind:"dep_message",depIndex:e,message:n};for(let a of this._inspectorHooks)a(i)}if(o!==P){if(o===E){this._depDirtied(r);return}if(o===O){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(fe);return}if(o===D||o===L){this._emit([n]);return}if(o===S){this._emit(ee);return}if(o===w)this._depSettledAsData(r,n[1]);else if(o===M)this._depSettledAsResolved(r);else if(o===x)this._depSettledAsTerminal(r,!0);else if(o===y)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(o===w||o===M)&&this._emit([n]),(o===x||o===y)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Q))}_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(ue),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([[y,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(a){this._emit([[y,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(s){this._emit([[y,this._wrapFnError("cleanup.beforeRun threw",s)]]);return}}}let n=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),r=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let s=n[a];s!=null&&s.length>0&&(this._deps[a].prevData=s[s.length-1])}let o=this._deps.map(a=>a.terminal),i={prevData:r,terminalDeps:o,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:n,prevData:r};for(let s of this._inspectorHooks)s(a)}this._isExecutingFn=!0;try{let a=this._fn(n,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let s=a;(typeof s.beforeRun=="function"||typeof s.deactivate=="function"||typeof s.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[y,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Se?(this._rerunDepth=0,this._emit([[y,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Se} \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"?[R,e[0]]:e;let r=!0,o=!1,i=!1,a=-1;for(let d of e){let c=n(d[0]);c<a&&(r=!1),c===3&&(o=!0),d[0]===E&&(i=!0),a=c}let s=e;if(!r){let d=e.map((c,l)=>({m:c,i:l,tier:n(c[0])}));d.sort((c,l)=>c.tier-l.tier||c.i-l.i),s=d.map(c=>c.m)}if(o&&!i&&this._status!=="dirty"){let d=0;for(;d<s.length&&n(s[d][0])===0;)d++;return d===0?[R,...s]:[...s.slice(0,d),R,...s.slice(d)]}return s}_emit(e){if(e.length===0)return;for(let s=0;s<e.length;s++){let d=e[s];if(d[0]===y&&d[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 s=e.filter(d=>d[0]===S||d[0]===O);if(s.length===0)return;n=s}n=this._frameBatch(n);let o=null;for(let s=0;s<n.length;s++){let d=n[s],c=d[0];if(c!==D&&c!==L){o?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===D?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let l=!0;if(this._pausable!==!1){let h=d[1];if(c===D)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(h),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(h))l=!1;else if(this._pauseLocks.delete(h),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let f=this._pauseBuffer;this._pauseBuffer=[],this._emit(f)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}l?o?.push(d):o==null&&(o=n.slice(0,s))}if(o!=null){if(o.length===0)return;n=o}if(this._hasMeta&&n.some(s=>s[0]===S))for(let s of Object.keys(this.meta))try{this.meta[s]._emit(ee)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(n);if(i.length>0&&this._config.inspectorEnabled){let s=this._config.globalInspector;if(s!=null)try{s({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let s=this._config.tierOf,d=[];for(let c of i)s(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[y,a]])}_updateState(e){let n=this._config.tierOf,r,o,i=-1,a=0;for(let l of e)n(l[0])===3&&a++;let s=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let l=e.length-1;l>=0;l--)if(e[l][0]===w){d=l;break}}for(let l=0;l<e.length;l++){let h=e[l],f=h[0];if(f===w){if(h.length>=2){let u=!1;if(s&&this._cached!==void 0)try{u=this._equals(this._cached,h[1])}catch(p){o=this._wrapFnError("equals threw",p),i=l;break}if(u){r==null&&(r=e.slice(0,l)),r.push(X),this._status="resolved";continue}this._cached=h[1],this._versioning!=null&&(d<0||l===d)&&xe(this._versioning,h[1],this._hashFn)}this._status="settled",r?.push(h)}else if(r?.push(h),f===E)this._status="dirty";else if(f===M)this._status="resolved";else if(f===x){this._status="completed";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===y){this._status="errored";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===O){if(this._cached!==void 0){let p=this._config.rigorRecorder;if(p!=null)try{p.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let u=this._cleanup;if(typeof u=="function"){this._cleanup=void 0;try{u()}catch{}}else if(u!=null&&typeof u=="object"){let p=u.invalidate;if(typeof p=="function")try{p()}catch{}}}else f===S&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?r??e.slice(0,i):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(be()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],ve(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}W(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);W(this._deliverToSinks,n,this._config.tierOf)}},Ae=t=>Array.isArray(t),ie=t=>typeof t=="object"&&t!=null&&!Array.isArray(t);function Ee(t,e,n){let r=Ae(t)?t:[],o=typeof t=="function"?t:typeof e=="function"?e:void 0,i={};return Ae(t)?i=(ie(e)?e:n)??{}:ie(t)?i=t:i=(ie(e)?e:n)??{},new $(r,o,i)}function de(t,e){return Ee((r,o,i)=>t(o,i)??void 0,{describeKind:"producer",...e})}function Me(t){return de(e=>{let n=!1,r=()=>{t.onsuccess=null,t.onerror=null};return t.onsuccess=()=>{n||(n=!0,r(),e.down([[w,t.result],[x]]))},t.onerror=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB request failed")]]))},()=>{n=!0,r()}})}function Oe(t){return de(e=>{let n=!1,r=()=>{t.oncomplete=null,t.onerror=null,t.onabort=null};return t.oncomplete=()=>{n||(n=!0,r(),e.down([[w,void 0],[x]]))},t.onerror=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB transaction failed")]]))},t.onabort=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB transaction aborted")]]))},()=>{n=!0,r()}})}function ce(t){if(t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(ce);let e=t,n=Object.keys(e).sort(),r={};for(let o of n)r[o]=ce(e[o]);return r}function De(t){return JSON.stringify(ce(t),void 0,0)}var sn=new TextEncoder,an=new TextDecoder("utf-8",{fatal:!0}),le={name:"json",version:1,encode(t){return sn.encode(De(t))},decode(t){return JSON.parse(an.decode(t))}};function Re(t,e={}){let n=e.codec??le,r=e.name??t.name??"snapshot",o=e.keyOf??(h=>h.name??e.name??t.name??"snapshot"),i,a=0,s=e.compactEvery,d,c={name:r,debounceMs:e.debounceMs,compactEvery:s,filter:e.filter,keyOf:o,save(h){if(!(e.filter&&!e.filter(h))&&(i={snapshot:h},a+=1,s!==void 0&&a%s===0||!e.debounceMs))return l()},load(){let h=d??r,f=t.read(h);if(f!==void 0)return f instanceof Uint8Array?f.length===0?void 0:n.decode(f):Promise.resolve(f).then(u=>u===void 0||u.length===0?void 0:n.decode(u))},async flush(){await l()},async rollback(){i=void 0}};function l(){let h=i;if(!h)return;i=void 0;let f=o(h.snapshot),u=n.encode(h.snapshot),p=t.write(f,u);if(p instanceof Promise)return p.then(()=>{d=f});d=f}return c}function Ce(t,e={}){let n=e.codec??le,r=e.name??t.name??"append-log",o=e.keyOf??(f=>r),i=e.compactEvery,a=new Map,s=0,d,c={name:r,debounceMs:e.debounceMs,compactEvery:i,keyOf:o,appendEntries(f){if(f.length!==0){for(let u of f){let p=o(u),_=a.get(p);_||(_=[],a.set(p,_)),_.push(u)}if(s+=f.length,i!==void 0&&s%i===0||!e.debounceMs)return l()}},async loadEntries(f){let u=f?.keyFilter,p=t.list===void 0?u!==void 0?[u]:[r]:await Promise.resolve(t.list(u)),_=[];for(let b of p){let v=await Promise.resolve(t.read(b));if(v===void 0||v.length===0)continue;let g=n.decode(v);Array.isArray(g)&&_.push(...g)}return{entries:_,cursor:void 0}},async flush(){await l()},async rollback(){a=new Map}};function l(){if(a.size===0)return;let f=a;a=new Map;let u=(d??Promise.resolve()).then(()=>{let p=h(f);return p instanceof Promise?p:Promise.resolve()},()=>{let p=h(f);return p instanceof Promise?p:Promise.resolve()});return d=u.finally(()=>{d===u&&(d=void 0)}),d}function h(f){let u=[];for(let[p,_]of f){let b=t.read(p),v=g=>{let N=[...g===void 0||g.length===0?[]:n.decode(g)??[],..._],A=n.encode(N);return t.write(p,A)};if(b instanceof Promise)u.push(b.then(async g=>{let T=v(g);T instanceof Promise&&await T}));else{let g=v(b);g instanceof Promise&&u.push(g)}}if(u.length>0)return Promise.all(u).then(()=>{})}return c}function Ie(t,e={}){let n=e.codec??le,r=e.name??t.name??"kv",o=e.compactEvery,i=new Map,a=0,s={name:r,debounceMs:e.debounceMs,compactEvery:o,filter:e.filter,save(c,l){if(!(e.filter&&!e.filter(c,l))&&(i.set(c,l),a+=1,o!==void 0&&a%o===0||!e.debounceMs))return d()},load(c){let l=t.read(c);if(l!==void 0)return l instanceof Uint8Array?l.length===0?void 0:n.decode(l):Promise.resolve(l).then(h=>h===void 0||h.length===0?void 0:n.decode(h))},delete(c){if(i.delete(c),!!t.delete)return t.delete(c)},list(c){return t.list?t.list(c):[]},async flush(){await d()},async rollback(){i=new Map}};function d(){if(i.size===0)return;let c=i;i=new Map;let l=[];for(let[h,f]of c){let u=n.encode(f),p=t.write(h,u);p instanceof Promise&&l.push(p)}if(l.length>0)return Promise.all(l).then(()=>{})}return s}function dn(t){return new Promise((e,n)=>{if(typeof indexedDB>"u"){n(new TypeError("indexedDB is not available in this environment"));return}let r=indexedDB.open(t.dbName,t.version??1);r.onupgradeneeded=()=>{let o=r.result;o.objectStoreNames.contains(t.storeName)||o.createObjectStore(t.storeName)},r.onsuccess=()=>e(r.result),r.onerror=()=>n(r.error??new Error(`indexedDbBackend: open(${t.dbName}) failed`))})}function G(t){let e=dn(t);return{name:`idb:${t.dbName}/${t.storeName}`,async read(n){let r=await e;return new Promise((o,i)=>{let d=r.transaction(t.storeName,"readonly").objectStore(t.storeName).get(n);d.onsuccess=()=>{let c=d.result;c==null?o(void 0):c instanceof Uint8Array?o(c):c instanceof ArrayBuffer?o(new Uint8Array(c)):o(void 0)},d.onerror=()=>i(d.error)})},async write(n,r){let o=await e;await new Promise((i,a)=>{let s=o.transaction(t.storeName,"readwrite");s.objectStore(t.storeName).put(r,n),s.oncomplete=()=>i(),s.onerror=()=>a(s.error),s.onabort=()=>a(s.error??new Error("indexedDbBackend: write aborted"))})},async delete(n){let r=await e;await new Promise((o,i)=>{let a=r.transaction(t.storeName,"readwrite");a.objectStore(t.storeName).delete(n),a.oncomplete=()=>o(),a.onerror=()=>i(a.error)})},async list(n){let r=await e;return new Promise((o,i)=>{let d=r.transaction(t.storeName,"readonly").objectStore(t.storeName).getAllKeys();d.onsuccess=()=>{let c=d.result.map(l=>String(l));o(n===void 0?c.sort():c.filter(l=>l.startsWith(n)).sort())},d.onerror=()=>i(d.error)})}}}function Fe(t,e){return Re(G(t),e)}function Pe(t,e){return Ce(G(t),e)}function Le(t,e){return Ie(G(t),e)}0&&(module.exports={fromIDBRequest,fromIDBTransaction,indexedDbAppendLog,indexedDbBackend,indexedDbKv,indexedDbSnapshot});
|
|
1
|
+
"use strict";var J=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var We=(t,e)=>{for(var n in e)J(t,n,{get:e[n],enumerable:!0})},je=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of He(e))!Ue.call(t,o)&&o!==n&&J(t,o,{get:()=>e[o],enumerable:!(r=Be(e,o))||r.enumerable});return t};var ze=t=>je(J({},"__esModule",{value:!0}),t);var cn={};We(cn,{fromIDBRequest:()=>Me,fromIDBTransaction:()=>Oe,indexedDbAppendLog:()=>Pe,indexedDbBackend:()=>G,indexedDbKv:()=>Le,indexedDbSnapshot:()=>Ie});module.exports=ze(cn);var P=Symbol.for("graphrefly/START"),w=Symbol.for("graphrefly/DATA"),E=Symbol.for("graphrefly/DIRTY"),M=Symbol.for("graphrefly/RESOLVED"),O=Symbol.for("graphrefly/INVALIDATE"),D=Symbol.for("graphrefly/PAUSE"),L=Symbol.for("graphrefly/RESUME"),N=Symbol.for("graphrefly/TEARDOWN"),x=Symbol.for("graphrefly/COMPLETE"),y=Symbol.for("graphrefly/ERROR"),R=Object.freeze([E]),X=Object.freeze([M]),$e=Object.freeze([O]),Z=Object.freeze([P]),Ke=Object.freeze([x]),qe=Object.freeze([N]),Q=Object.freeze([R]),le=Object.freeze([X]),fe=Object.freeze([$e]),he=Object.freeze([Ke]),ee=Object.freeze([qe]);var Ye={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 pe(t){t.registerCodec(Ye)}var Je={type:"system",id:""};function U(t){if(t==null)return Je;let{type:e,id:n,...r}=t;return{type:e??"system",id:n??"",...r}}var ne=0,Xe=!1,ge=[],ye=[],_e=[],Ze=[];function me(){return ne>0||Xe}function be(){return ne>0}function ve(t){ne>0?Ze.push(t):t()}function W(t,e,n){if(e.length===0)return;if(e.length===1){let c=n(e[0][0]);if(c<3||!me()){t(e);return}(c>=5?_e:c===4?ye:ge).push(()=>t(e));return}let r=e.length,o=r,i=r,a=r,s=0;for(;s<r&&n(e[s][0])<3;)s++;for(o=s;s<r&&n(e[s][0])===3;)s++;for(i=s;s<r&&n(e[s][0])===4;)s++;a=s;let d=me();if(o>0){let c=e.slice(0,o);t(c)}if(i>o){let c=e.slice(o,i);d?ge.push(()=>t(c)):t(c)}if(a>i){let c=e.slice(i,a);d?ye.push(()=>t(c)):t(c)}if(r>a){let c=e.slice(a,r);d?_e.push(()=>t(c)):t(c)}}function Te(){return Date.now()*1e6}var j=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 we(t){t.registerMessageType(P,{tier:0,wireCrossing:!1}),t.registerMessageType(E,{tier:1,wireCrossing:!1}),t.registerMessageType(O,{tier:1,wireCrossing:!1,metaPassthrough:!1}),t.registerMessageType(D,{tier:2,wireCrossing:!1}),t.registerMessageType(L,{tier:2,wireCrossing:!1}),t.registerMessageType(w,{tier:3,wireCrossing:!0}),t.registerMessageType(M,{tier:3,wireCrossing:!0}),t.registerMessageType(x,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(y,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(N,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var C=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 te(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(te);if(typeof t=="object"&&t!==null){let e={};for(let n of Object.keys(t).sort())e[n]=te(t[n]);return e}return null}var Qe=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]),en=new TextEncoder;function nn(t){let e=en.encode(t),n=e.length,r=n*8,o=n+9+63&-64,i=new Uint8Array(o);i.set(e),i[n]=128;let a=new DataView(i.buffer);a.setUint32(o-4,r>>>0,!1),a.setUint32(o-8,Math.floor(r/4294967296)>>>0,!1);let s=1779033703,d=3144134277,c=1013904242,u=2773480762,h=1359893119,f=2600822924,l=528734635,p=1541459225,_=new Uint32Array(64),b=(g,T)=>g>>>T|g<<32-T;for(let g=0;g<o;g+=64){for(let m=0;m<16;m++)_[m]=a.getUint32(g+m*4,!1);for(let m=16;m<64;m++){let F=_[m-15],I=_[m-2],H=b(F,7)^b(F,18)^F>>>3,Y=b(I,17)^b(I,19)^I>>>10;_[m]=_[m-16]+H+_[m-7]+Y>>>0}let T=s,S=d,A=c,K=u,k=h,V=f,B=l,q=p;for(let m=0;m<64;m++){let F=b(k,6)^b(k,11)^b(k,25),I=k&V^~k&B,H=q+F+I+Qe[m]+_[m]>>>0,Y=b(T,2)^b(T,13)^b(T,22),Ge=T&S^T&A^S&A,Ve=Y+Ge>>>0;q=B,B=V,V=k,k=K+H>>>0,K=A,A=S,S=T,T=H+Ve>>>0}s=s+T>>>0,d=d+S>>>0,c=c+A>>>0,u=u+K>>>0,h=h+k>>>0,f=f+V>>>0,l=l+B>>>0,p=p+q>>>0}let v=g=>g.toString(16).padStart(8,"0");return v(s)+v(d)+v(c)+v(u)+v(h)+v(f)+v(l)+v(p)}function re(t){let e=te(t??null),n=JSON.stringify(e);return nn(n).slice(0,16)}function tn(){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 oe(t,e,n){let r=n?.id??tn();if(t===0)return{id:r,version:0};let i=(n?.hash??re)(e);return{id:r,version:0,cid:i,prev:null}}function xe(t,e,n){t.version+=1,"cid"in t&&(t.prev=t.cid,t.cid=n(e))}var ke=()=>{},Ne=100;function Se(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 z(t){return t.length===0?t:typeof t[0]=="symbol"?[t]:t}var rn=(t,e,n,r)=>{n.direction==="down-in"&&t._onDepMessage(n.depIndex,e)},on=(t,e,n,r)=>{let o=t;if(o._status==="completed"||o._status==="errored")return;let i=o._cached,a=i===void 0?[Z]:[Z,[w,i]];o._status==="dirty"&&a.push(R),W(e,a,o._config.tierOf)},ae=new j({onMessage:rn,onSubscribe:on});we(ae);pe(ae);var $=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??ae,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??re;let o=r.versioning??this._config.defaultVersioning;this._versioningLevel=o,this._versioning=o!=null?oe(o,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Se);let i={};for(let[s,d]of Object.entries(r.meta??{})){let c={initial:d,name:`${r.name??"node"}:meta:${s}`,describeKind:"state",config:this._config};r.guard!=null&&(c.guard=r.guard),r.resubscribable===!0&&(c.resubscribable=!0),i[s]=new t([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(s){a._emit([[w,s]])},down(s){a._emit(z(s))},up(s){a._emitUp(z(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,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 i=this._cached===void 0?void 0:this._cached,a=this._versioning,s=a?.id??n?.id,d=a?.version??0,c=oe(e,i,{id:s,hash:o});c.version=d,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=U(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=U(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(o,i))throw new C({actor:o,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(o,i))throw new C({actor:o,action:i,nodeName:this.name})}this._lastMutation={actor:o,timestamp_ns:Te()}}down(e,n){let r=z(e);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(e,n){this._checkGuard(n),this._emit([[w,e]])}up(e,n){if(this._deps.length===0)return;let r=z(e);if(r.length===0)return;this._checkGuard(n);let o=n??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.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 d=U(n);if(!this._guard(d,"observe"))throw new C({actor:d,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 d of this._deps)se(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:o},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let s=!1;return()=>{s||(s=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),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,i=this._deps[r];i.unsub=ke,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let s=this._config.tierOf,d=!1;for(let c of a)s(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:o},this._actions);d&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let o=0;o<n;o++){let i=this._deps[o];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}se(i)}}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=Se(e);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Q),r.unsub=ke;try{r.unsub=e.subscribe(o=>{if(r.unsub===null)return;let i=this._config.tierOf,a=!1;for(let s of o)i(s[0])>=3&&(a=!0),this._config.onMessage(this,s,{direction:"down-in",depIndex:n},this._actions);a&&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([[y,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([[y,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 i={kind:"dep_message",depIndex:e,message:n};for(let a of this._inspectorHooks)a(i)}if(o!==P){if(o===E){this._depDirtied(r);return}if(o===O){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(fe);return}if(o===D||o===L){this._emit([n]);return}if(o===N){this._emit(ee);return}if(o===w)this._depSettledAsData(r,n[1]);else if(o===M)this._depSettledAsResolved(r);else if(o===x)this._depSettledAsTerminal(r,!0);else if(o===y)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(o===w||o===M)&&this._emit([n]),(o===x||o===y)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Q))}_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(le),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([[y,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(a){this._emit([[y,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(s){this._emit([[y,this._wrapFnError("cleanup.beforeRun threw",s)]]);return}}}let n=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),r=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let s=n[a];s!=null&&s.length>0&&(this._deps[a].prevData=s[s.length-1])}let o=this._deps.map(a=>a.terminal),i={prevData:r,terminalDeps:o,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:n,prevData:r};for(let s of this._inspectorHooks)s(a)}this._isExecutingFn=!0;try{let a=this._fn(n,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let s=a;(typeof s.beforeRun=="function"||typeof s.deactivate=="function"||typeof s.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[y,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Ne?(this._rerunDepth=0,this._emit([[y,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Ne} \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"?[R,e[0]]:e;let r=!0,o=!1,i=!1,a=-1;for(let d of e){let c=n(d[0]);c<a&&(r=!1),c===3&&(o=!0),d[0]===E&&(i=!0),a=c}let s=e;if(!r){let d=e.map((c,u)=>({m:c,i:u,tier:n(c[0])}));d.sort((c,u)=>c.tier-u.tier||c.i-u.i),s=d.map(c=>c.m)}if(o&&!i&&this._status!=="dirty"){let d=0;for(;d<s.length&&n(s[d][0])===0;)d++;return d===0?[R,...s]:[...s.slice(0,d),R,...s.slice(d)]}return s}_emit(e){if(e.length===0)return;for(let s=0;s<e.length;s++){let d=e[s];if(d[0]===y&&d[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 s=e.filter(d=>d[0]===N||d[0]===O);if(s.length===0)return;n=s}n=this._frameBatch(n);let o=null;for(let s=0;s<n.length;s++){let d=n[s],c=d[0];if(c!==D&&c!==L){o?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===D?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let u=!0;if(this._pausable!==!1){let h=d[1];if(c===D)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(h),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(h))u=!1;else if(this._pauseLocks.delete(h),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let f=this._pauseBuffer;this._pauseBuffer=[],this._emit(f)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}u?o?.push(d):o==null&&(o=n.slice(0,s))}if(o!=null){if(o.length===0)return;n=o}if(this._hasMeta&&n.some(s=>s[0]===N))for(let s of Object.keys(this.meta))try{this.meta[s]._emit(ee)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(n);if(i.length>0&&this._config.inspectorEnabled){let s=this._config.globalInspector;if(s!=null)try{s({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let s=this._config.tierOf,d=[];for(let c of i)s(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[y,a]])}_updateState(e){let n=this._config.tierOf,r,o,i=-1,a=0;for(let u of e)n(u[0])===3&&a++;let s=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let u=e.length-1;u>=0;u--)if(e[u][0]===w){d=u;break}}for(let u=0;u<e.length;u++){let h=e[u],f=h[0];if(f===w){if(h.length>=2){let l=!1;if(s&&this._cached!==void 0)try{l=this._equals(this._cached,h[1])}catch(p){o=this._wrapFnError("equals threw",p),i=u;break}if(l){r==null&&(r=e.slice(0,u)),r.push(X),this._status="resolved";continue}this._cached=h[1],this._versioning!=null&&(d<0||u===d)&&xe(this._versioning,h[1],this._hashFn)}this._status="settled",r?.push(h)}else if(r?.push(h),f===E)this._status="dirty";else if(f===M)this._status="resolved";else if(f===x){this._status="completed";{let l=this._config.rigorRecorder;if(l!=null)try{l.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===y){this._status="errored";{let l=this._config.rigorRecorder;if(l!=null)try{l.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===O){if(this._cached!==void 0){let p=this._config.rigorRecorder;if(p!=null)try{p.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let l=this._cleanup;if(typeof l=="function"){this._cleanup=void 0;try{l()}catch{}}else if(l!=null&&typeof l=="object"){let p=l.invalidate;if(typeof p=="function")try{p()}catch{}}}else f===N&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?r??e.slice(0,i):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(be()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],ve(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}W(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);W(this._deliverToSinks,n,this._config.tierOf)}},Ae=t=>Array.isArray(t),ie=t=>typeof t=="object"&&t!=null&&!Array.isArray(t);function Ee(t,e,n){let r=Ae(t)?t:[],o=typeof t=="function"?t:typeof e=="function"?e:void 0,i={};return Ae(t)?i=(ie(e)?e:n)??{}:ie(t)?i=t:i=(ie(e)?e:n)??{},new $(r,o,i)}function de(t,e){return Ee((r,o,i)=>t(o,i)??void 0,{describeKind:"producer",...e})}function Me(t){return de(e=>{let n=!1,r=()=>{t.onsuccess=null,t.onerror=null};return t.onsuccess=()=>{n||(n=!0,r(),e.down([[w,t.result],[x]]))},t.onerror=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB request failed")]]))},()=>{n=!0,r()}})}function Oe(t){return de(e=>{let n=!1,r=()=>{t.oncomplete=null,t.onerror=null,t.onabort=null};return t.oncomplete=()=>{n||(n=!0,r(),e.down([[w,void 0],[x]]))},t.onerror=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB transaction failed")]]))},t.onabort=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB transaction aborted")]]))},()=>{n=!0,r()}})}function ce(t){if(t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(ce);let e=t,n=Object.keys(e).sort(),r={};for(let o of n)r[o]=ce(e[o]);return r}function De(t){return JSON.stringify(ce(t),void 0,0)}var sn=new TextEncoder,an=new TextDecoder("utf-8",{fatal:!0}),ue={name:"json",version:1,encode(t){return sn.encode(De(t))},decode(t){return JSON.parse(an.decode(t))}};function Re(t,e={}){let n=e.codec??ue,r=e.name??t.name??"snapshot",o=e.keyOf??(h=>h.name??e.name??t.name??"snapshot"),i,a=0,s=e.compactEvery,d,c={name:r,debounceMs:e.debounceMs,compactEvery:s,filter:e.filter,keyOf:o,save(h){if(!(e.filter&&!e.filter(h))&&(i={snapshot:h},a+=1,s!==void 0&&a%s===0||!e.debounceMs))return u()},load(){let h=d??r,f=t.read(h);if(f!==void 0)return f instanceof Uint8Array?f.length===0?void 0:n.decode(f):Promise.resolve(f).then(l=>l===void 0||l.length===0?void 0:n.decode(l))},async flush(){await u()},async rollback(){i=void 0}};function u(){let h=i;if(!h)return;i=void 0;let f=o(h.snapshot),l=n.encode(h.snapshot),p=t.write(f,l);if(p instanceof Promise)return p.then(()=>{d=f});d=f}return c}function Ce(t,e={}){let n=e.codec??ue,r=e.name??t.name??"append-log",o=e.keyOf??(f=>r),i=e.compactEvery,a=new Map,s=0,d,c={name:r,debounceMs:e.debounceMs,compactEvery:i,keyOf:o,appendEntries(f){if(f.length!==0){for(let l of f){let p=o(l),_=a.get(p);_||(_=[],a.set(p,_)),_.push(l)}if(s+=f.length,i!==void 0&&s%i===0||!e.debounceMs)return u()}},async loadEntries(f){let l=f?.keyFilter,p=t.list===void 0?l!==void 0?[l]:[r]:await Promise.resolve(t.list(l)),_=[];for(let b of p){let v=await Promise.resolve(t.read(b));if(v===void 0||v.length===0)continue;let g=n.decode(v);Array.isArray(g)&&_.push(...g)}return{entries:_,cursor:void 0}},async flush(){await u()},async rollback(){a=new Map}};function u(){if(a.size===0)return;let f=a;a=new Map;let l=(d??Promise.resolve()).then(()=>{let p=h(f);return p instanceof Promise?p:Promise.resolve()},()=>{let p=h(f);return p instanceof Promise?p:Promise.resolve()});return d=l.finally(()=>{d===l&&(d=void 0)}),d}function h(f){let l=[];for(let[p,_]of f){let b=t.read(p),v=g=>{let S=[...g===void 0||g.length===0?[]:n.decode(g)??[],..._],A=n.encode(S);return t.write(p,A)};if(b instanceof Promise)l.push(b.then(async g=>{let T=v(g);T instanceof Promise&&await T}));else{let g=v(b);g instanceof Promise&&l.push(g)}}if(l.length>0)return Promise.all(l).then(()=>{})}return c}function Fe(t,e={}){let n=e.codec??ue,r=e.name??t.name??"kv",o=e.compactEvery,i=new Map,a=0,s={name:r,debounceMs:e.debounceMs,compactEvery:o,filter:e.filter,save(c,u){if(!(e.filter&&!e.filter(c,u))&&(i.set(c,u),a+=1,o!==void 0&&a%o===0||!e.debounceMs))return d()},load(c){let u=t.read(c);if(u!==void 0)return u instanceof Uint8Array?u.length===0?void 0:n.decode(u):Promise.resolve(u).then(h=>h===void 0||h.length===0?void 0:n.decode(h))},delete(c){if(i.delete(c),!!t.delete)return t.delete(c)},list(c){return t.list?t.list(c):[]},async flush(){await d()},async rollback(){i=new Map}};function d(){if(i.size===0)return;let c=i;i=new Map;let u=[];for(let[h,f]of c){let l=n.encode(f),p=t.write(h,l);p instanceof Promise&&u.push(p)}if(u.length>0)return Promise.all(u).then(()=>{})}return s}function dn(t){return new Promise((e,n)=>{if(typeof indexedDB>"u"){n(new TypeError("indexedDB is not available in this environment"));return}let r=indexedDB.open(t.dbName,t.version??1);r.onupgradeneeded=()=>{let o=r.result;o.objectStoreNames.contains(t.storeName)||o.createObjectStore(t.storeName)},r.onsuccess=()=>e(r.result),r.onerror=()=>n(r.error??new Error(`indexedDbBackend: open(${t.dbName}) failed`))})}function G(t){let e=dn(t);return{name:`idb:${t.dbName}/${t.storeName}`,async read(n){let r=await e;return new Promise((o,i)=>{let d=r.transaction(t.storeName,"readonly").objectStore(t.storeName).get(n);d.onsuccess=()=>{let c=d.result;c==null?o(void 0):c instanceof Uint8Array?o(c):c instanceof ArrayBuffer?o(new Uint8Array(c)):o(void 0)},d.onerror=()=>i(d.error)})},async write(n,r){let o=await e;await new Promise((i,a)=>{let s=o.transaction(t.storeName,"readwrite");s.objectStore(t.storeName).put(r,n),s.oncomplete=()=>i(),s.onerror=()=>a(s.error),s.onabort=()=>a(s.error??new Error("indexedDbBackend: write aborted"))})},async delete(n){let r=await e;await new Promise((o,i)=>{let a=r.transaction(t.storeName,"readwrite");a.objectStore(t.storeName).delete(n),a.oncomplete=()=>o(),a.onerror=()=>i(a.error)})},async list(n){let r=await e;return new Promise((o,i)=>{let d=r.transaction(t.storeName,"readonly").objectStore(t.storeName).getAllKeys();d.onsuccess=()=>{let c=d.result.map(u=>String(u));o(n===void 0?c.sort():c.filter(u=>u.startsWith(n)).sort())},d.onerror=()=>i(d.error)})}}}function Ie(t,e){return Re(G(t),e)}function Pe(t,e){return Ce(G(t),e)}function Le(t,e){return Fe(G(t),e)}0&&(module.exports={fromIDBRequest,fromIDBTransaction,indexedDbAppendLog,indexedDbBackend,indexedDbKv,indexedDbSnapshot});
|
package/dist/extra/browser.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { fromIDBRequest, fromIDBTransaction } from './storage-browser.cjs';
|
|
2
2
|
export { IndexedDbBackendSpec, indexedDbAppendLog, indexedDbBackend, indexedDbKv, indexedDbSnapshot } from './storage-tiers-browser.cjs';
|
|
3
|
-
import '../node-
|
|
3
|
+
import '../node-kK3CvTrR.cjs';
|
|
4
4
|
import './storage-tiers.cjs';
|
package/dist/extra/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { fromIDBRequest, fromIDBTransaction } from './storage-browser.js';
|
|
2
2
|
export { IndexedDbBackendSpec, indexedDbAppendLog, indexedDbBackend, indexedDbKv, indexedDbSnapshot } from './storage-tiers-browser.js';
|
|
3
|
-
import '../node-
|
|
3
|
+
import '../node-kK3CvTrR.js';
|
|
4
4
|
import './storage-tiers.js';
|
package/dist/extra/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as d}from"../chunk-
|
|
1
|
+
import{a as e,b as d}from"../chunk-XTGKMHSW.js";import{a as n,b as o,c as p,d as r}from"../chunk-F672GV32.js";import"../chunk-D5RFJOZ2.js";import"../chunk-CE72X3WO.js";import"../chunk-NTEURFZH.js";import"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{e as fromIDBRequest,d as fromIDBTransaction,p as indexedDbAppendLog,n as indexedDbBackend,r as indexedDbKv,o as indexedDbSnapshot};
|