@synnaxlabs/pluto 0.41.0 → 0.42.3
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/{Center-Dr9Np3yZ.js → Center-D0JeI7Ta.js} +2 -2
- package/dist/{Center-sJghNsrv.cjs → Center-DuI3XH-Q.cjs} +1 -1
- package/dist/{ContextMenu-GUed89mt.js → ContextMenu-BiNr7Gxv.js} +19 -20
- package/dist/ContextMenu-HpMLd1Ht.cjs +1 -0
- package/dist/DateTime-BsjSfOY-.cjs +1 -0
- package/dist/{DateTime-DEbT6v4l.js → DateTime-r6hocEmI.js} +2 -2
- package/dist/{Divider-Bpe7zJig.js → Divider-DqEkzRIY.js} +103 -97
- package/dist/{Divider-CloQr3vQ.cjs → Divider-Dut8qPee.cjs} +4 -4
- package/dist/Dropdown-BSSe1E1e.cjs +1 -0
- package/dist/{Dropdown-4Cti-bbQ.js → Dropdown-BrFL1eSc.js} +111 -112
- package/dist/Haul-C6i2oI7z.cjs +1 -0
- package/dist/{Haul-Bw54Yj6J.js → Haul-CEFSvdy9.js} +37 -38
- package/dist/{Item-9WCCzBv2.js → Item-C5SQraZM.js} +10 -11
- package/dist/Item-DSBs9VLu.cjs +1 -0
- package/dist/{Keyboard-CZFi6COK.cjs → Keyboard-Ca7TAAHK.cjs} +1 -1
- package/dist/{Keyboard-634856lT.js → Keyboard-Duo41pJL.js} +2 -2
- package/dist/{Link-fkoogssj.cjs → Link-B9ZGvoBU.cjs} +1 -1
- package/dist/{Link-BEheZd26.js → Link-C9GeoB0w.js} +1 -1
- package/dist/{Pack-DhZO_rza.js → Pack-BozAEHBp.js} +2 -2
- package/dist/{Pack-D6Z6WuZl.cjs → Pack-DeZUUdJM.cjs} +1 -1
- package/dist/{Provider-UAXPVomG.js → Provider-B86QO9NT.js} +301 -292
- package/dist/Provider-Cw0mSr2D.cjs +1 -0
- package/dist/{Space-DunsWl06.js → Space-CyTH97CN.js} +1 -1
- package/dist/{Space-BtaH1buB.cjs → Space-DvalhzRj.cjs} +1 -1
- package/dist/Text-8ps3Uw4T.js +35 -0
- package/dist/{Text-3PiRcn8q.js → Text-BR4FW9Hy.js} +75 -77
- package/dist/Text-C8GBHl-F.cjs +1 -0
- package/dist/Text-CMTkSEWx.cjs +4 -0
- package/dist/Text-DkA06TeT.cjs +1 -0
- package/dist/Text-sH_NOelc.js +137 -0
- package/dist/{Toggle-CZd8L4GI.js → Toggle-BRuUrO2N.js} +99 -101
- package/dist/Toggle-C0lZDyeo.cjs +1 -0
- package/dist/{Video-4XQ1qozd.js → Video-DWStbcmD.js} +1 -1
- package/dist/{Video-BM9uJLaQ.cjs → Video-DgjuFLiE.cjs} +1 -1
- package/dist/WithIcon-BgS5shNZ.cjs +1 -0
- package/dist/WithIcon-BhR6nwRh.js +98 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-9iEiTRNL.cjs +15 -0
- package/dist/css-Cnb9DQMD.js +4747 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/deep-BNa3STCp.cjs +1 -0
- package/dist/deep-P35D0Sz7.js +112 -0
- package/dist/dimensions-B6qmnzv3.js +19 -0
- package/dist/dimensions-By-vgVks.cjs +1 -0
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/eraser-BkqFgBRY.cjs +11 -0
- package/dist/eraser-CK8SwEJa.js +1148 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +67 -75
- package/dist/external-B1YsdhS4.js +432 -0
- package/dist/{external-BY2AjzRx.js → external-B7NxSklQ.js} +20 -19
- package/dist/external-B8uaUKhb.cjs +1 -0
- package/dist/external-BA_VOnV-.js +400 -0
- package/dist/{external-DNF8yEwq.js → external-BDkqwq72.js} +27 -28
- package/dist/external-BGBgNbe2.cjs +1 -0
- package/dist/{external-CVGidiDt.js → external-BOMdfX8_.js} +2 -2
- package/dist/{external-BIwhkj24.js → external-Bl8q9UBF.js} +1996 -2011
- package/dist/{external-BFOrrNde.js → external-BnK4UIFe.js} +3 -3
- package/dist/{external-CnxSp7fm.cjs → external-BwUa_5Vs.cjs} +1 -1
- package/dist/{external-BlUic3Vz.js → external-C0X4mXVG.js} +7 -8
- package/dist/{external-CH66YjTZ.js → external-C7yPkamb.js} +12 -13
- package/dist/external-CTc1n-JC.cjs +1 -0
- package/dist/{external-B-Cao-ae.cjs → external-CUgPP-JD.cjs} +1 -1
- package/dist/external-CzTBFiv_.cjs +1 -0
- package/dist/external-DGJ8YAe-.cjs +1 -0
- package/dist/{external-kZf9CjYn.cjs → external-DQwznOyH.cjs} +37 -37
- package/dist/external-DiLZ1dEk.cjs +1 -0
- package/dist/{external-BCUxzSzk.js → external-DissGp_3.js} +9 -10
- package/dist/{external-DVajt6X6.cjs → external-DmryCcwg.cjs} +1 -1
- package/dist/external-Dq8-cbf3.cjs +1 -0
- package/dist/{external-BbrPEGJw.js → external-_8qdWaAg.js} +2 -2
- package/dist/{external-C0ZRdtdj.js → external-bSUra-q7.js} +28 -28
- package/dist/external-zbKPQ9ls.cjs +46 -0
- package/dist/{font-BXKdXsr5.js → font-CjYcjBiv.js} +2 -2
- package/dist/{font-DCE90lco.cjs → font-XlUAG1-r.cjs} +1 -1
- package/dist/{fontString-C7Q9Laqk.js → fontString-BN1kd1AP.js} +1 -1
- package/dist/{fontString-BBvH9Ypy.cjs → fontString-Ddza50DF.cjs} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-B5aLaWzS.cjs +1 -0
- package/dist/hooks-DjznxGgm.js +296 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +8669 -8584
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/provider-aWtsGnV8.cjs +58 -0
- package/dist/provider-r5Ly36FI.js +12854 -0
- package/dist/src/aether/aether/aether.d.ts +17 -18
- package/dist/src/aether/aether/aether.d.ts.map +1 -1
- package/dist/src/aether/aether/aether.spec.spec.d.ts +1 -5
- package/dist/src/aether/aether/aether.spec.spec.d.ts.map +1 -1
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/aether/main.spec.d.ts +1 -5
- package/dist/src/aether/main.spec.d.ts.map +1 -1
- package/dist/src/aether/message.d.ts +11 -1
- package/dist/src/aether/message.d.ts.map +1 -1
- package/dist/src/alamos/aether/alamos.d.ts +19 -25
- package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +2 -2
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/button/color.d.ts +2 -2
- package/dist/src/button/color.d.ts.map +1 -1
- package/dist/src/channel/LinePlot.d.ts +4 -4
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/color/BaseSwatch.d.ts +3 -3
- package/dist/src/color/BaseSwatch.d.ts.map +1 -1
- package/dist/src/color/GradientPicker.d.ts +1 -2
- package/dist/src/color/GradientPicker.d.ts.map +1 -1
- package/dist/src/color/Picker.d.ts +1 -1
- package/dist/src/color/Picker.d.ts.map +1 -1
- package/dist/src/color/Provider.d.ts +10 -98
- package/dist/src/color/Provider.d.ts.map +1 -1
- package/dist/src/color/external.d.ts +0 -4
- package/dist/src/color/external.d.ts.map +1 -1
- package/dist/src/css/color.d.ts +2 -2
- package/dist/src/css/color.d.ts.map +1 -1
- package/dist/src/divider/Divider.d.ts +2 -1
- package/dist/src/divider/Divider.d.ts.map +1 -1
- package/dist/src/ether.d.ts +0 -1
- package/dist/src/ether.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +1 -1
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/haul/Haul.d.ts +7 -63
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/hooks/useResize.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +4 -4
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +6 -66
- package/dist/src/mosaic/types.d.ts.map +1 -1
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts +2 -3
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/state/state.d.ts +1 -2
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/status/Circle.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts +34 -96
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts +23 -27
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts +4 -0
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts +54 -388
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts +58 -418
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts +41 -152
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/Forms.d.ts.map +1 -1
- package/dist/src/table/cells/registry.d.ts +6 -3
- package/dist/src/table/cells/registry.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/types.d.ts +5 -38
- package/dist/src/tabs/types.d.ts.map +1 -1
- package/dist/src/tag/Tag.d.ts +3 -4
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/telem/aether/context.d.ts +8 -8
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/factory.d.ts +6 -2
- package/dist/src/telem/aether/factory.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/pipeline.d.ts +25 -215
- package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
- package/dist/src/telem/aether/provider.d.ts +7 -5
- package/dist/src/telem/aether/provider.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts +62 -183
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +23 -72
- package/dist/src/telem/aether/static.d.ts.map +1 -1
- package/dist/src/telem/aether/telem.d.ts +60 -284
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts +82 -318
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/client/cache/cache.d.ts +1 -1
- package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
- package/dist/src/telem/client/cache/dynamic.d.ts +5 -5
- package/dist/src/telem/client/cache/dynamic.d.ts.map +1 -1
- package/dist/src/telem/client/cache/static.d.ts +3 -3
- package/dist/src/telem/client/cache/static.d.ts.map +1 -1
- package/dist/src/telem/client/cache/unary.d.ts +3 -3
- package/dist/src/telem/client/cache/unary.d.ts.map +1 -1
- package/dist/src/telem/client/client.d.ts +8 -12
- package/dist/src/telem/client/client.d.ts.map +1 -1
- package/dist/src/telem/client/external.d.ts +0 -1
- package/dist/src/telem/client/external.d.ts.map +1 -1
- package/dist/src/telem/client/reader.d.ts +28 -10
- package/dist/src/telem/client/reader.d.ts.map +1 -1
- package/dist/src/telem/client/reader.spec.d.ts +6 -1
- package/dist/src/telem/client/reader.spec.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.d.ts +6 -6
- package/dist/src/telem/client/streamer.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.spec.d.ts +2 -0
- package/dist/src/telem/client/streamer.spec.d.ts.map +1 -0
- package/dist/src/telem/control/Indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +44 -232
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +36 -73
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +53 -253
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts +22 -128
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts +12 -42
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +5 -4
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/src/text/core/types.d.ts +17 -14
- package/dist/src/text/core/types.d.ts.map +1 -1
- package/dist/src/text/dimensions.d.ts +1 -0
- package/dist/src/text/dimensions.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +1156 -5764
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +558 -1740
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/theming/css.d.ts.map +1 -1
- package/dist/src/tree/Tree.d.ts +1 -1
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +248 -9
- package/dist/src/triggers/triggers.d.ts.map +1 -1
- package/dist/src/util/component.d.ts +7 -1
- package/dist/src/util/component.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +8 -1
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/axis.d.ts +21 -44
- package/dist/src/vis/axis/axis.d.ts.map +1 -1
- package/dist/src/vis/axis/canvas.d.ts +17 -20
- package/dist/src/vis/axis/canvas.d.ts.map +1 -1
- package/dist/src/vis/axis/preciseTimeScale.d.ts +1 -2
- package/dist/src/vis/axis/preciseTimeScale.d.ts.map +1 -1
- package/dist/src/vis/axis/ticks.d.ts +11 -11
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/button/aether/button.d.ts +10 -80
- package/dist/src/vis/button/aether/button.d.ts.map +1 -1
- package/dist/src/vis/canvas/Canvas.d.ts +2 -2
- package/dist/src/vis/canvas/Canvas.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts +45 -193
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +62 -469
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts +32 -246
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/Edge.d.ts +2 -3
- package/dist/src/vis/diagram/edge/Edge.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts +5 -8
- package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/paths.d.ts +3 -4
- package/dist/src/vis/diagram/edge/paths.d.ts.map +1 -1
- package/dist/src/vis/draw2d/canvas.d.ts +21 -3
- package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
- package/dist/src/vis/draw2d/index.d.ts +3 -4
- package/dist/src/vis/draw2d/index.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts +30 -170
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/grid/grid.d.ts +14 -24
- package/dist/src/vis/grid/grid.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts +42 -86
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +3 -4
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/light/aether/light.d.ts +10 -80
- package/dist/src/vis/light/aether/light.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +20 -99
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +2 -3
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts +35 -0
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +1 -0
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts +82 -489
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +63 -187
- package/dist/src/vis/lineplot/aether/XAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +61 -190
- package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts +33 -96
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/external.d.ts +1 -0
- package/dist/src/vis/lineplot/aether/external.d.ts.map +1 -1
- package/dist/src/vis/lineplot/external.d.ts +1 -0
- package/dist/src/vis/lineplot/external.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +15 -52
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts +43 -294
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +33 -138
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/lineplot/useBoundQuerier.d.ts +11 -0
- package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +1 -0
- package/dist/src/vis/log/aether/Log.d.ts +88 -455
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +40 -233
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/performance/Performance.d.ts +2 -0
- package/dist/src/vis/performance/Performance.d.ts.map +1 -0
- package/dist/src/vis/performance/aether/index.d.ts +2 -0
- package/dist/src/vis/performance/aether/index.d.ts.map +1 -0
- package/dist/src/vis/performance/aether/performance.d.ts +15 -0
- package/dist/src/vis/performance/aether/performance.d.ts.map +1 -0
- package/dist/src/vis/performance/index.d.ts +2 -0
- package/dist/src/vis/performance/index.d.ts.map +1 -0
- package/dist/src/vis/render/GLProgram.d.ts +1 -2
- package/dist/src/vis/render/GLProgram.d.ts.map +1 -1
- package/dist/src/vis/render/context.d.ts +1 -0
- package/dist/src/vis/render/context.d.ts.map +1 -1
- package/dist/src/vis/render/controller.d.ts +7 -12
- package/dist/src/vis/render/controller.d.ts.map +1 -1
- package/dist/src/vis/render/loop.d.ts +15 -5
- package/dist/src/vis/render/loop.d.ts.map +1 -1
- package/dist/src/vis/rule/Rule.d.ts +1 -1
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts +12 -53
- package/dist/src/vis/rule/aether/aether.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/Symbols.d.ts +3 -4
- package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +34 -35
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts +96 -1
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +16 -155
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/text/atlas.d.ts +32 -0
- package/dist/src/vis/text/atlas.d.ts.map +1 -0
- package/dist/src/vis/text/index.d.ts +2 -0
- package/dist/src/vis/text/index.d.ts.map +1 -0
- package/dist/src/vis/toggle/aether/toggle.d.ts +16 -150
- package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +150 -563
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts +59 -199
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/{state-Bd_8X2jl.cjs → state-_FFrG5nH.cjs} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/{toArray-Dvn9FA_3.js → toArray-B7nD2CTw.js} +1 -1
- package/dist/{toArray-DRKOku1s.cjs → toArray-BvVYuN_b.cjs} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/units-CX_coN92.cjs +1 -0
- package/dist/units-Ct3Xl5nK.js +11 -0
- package/dist/useClickOutside-CSff8yb-.cjs +1 -0
- package/dist/useClickOutside-DDCP7Fh-.js +106 -0
- package/dist/{useDebouncedCallback-Dg4BDGP-.js → useDebouncedCallback-BG4I7mbT.js} +1 -1
- package/dist/useDebouncedCallback-DnwYZzjR.cjs +1 -0
- package/dist/{useMemoCompare-BEDaTIXL.js → useMemoCompare-BViQehyd.js} +2 -2
- package/dist/useMemoCompare-C2X7Mzx8.cjs +1 -0
- package/dist/useVirtualCursorDragWebKit-DDmXE4RW.cjs +1 -0
- package/dist/{useVirtualCursorDragWebKit-BixysrXI.js → useVirtualCursorDragWebKit-DTU2tUmp.js} +22 -23
- package/dist/value-B6OlPXe1.js +5974 -0
- package/dist/value-Bq1w9UY8.cjs +57 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +9 -8
- package/dist/ContextMenu-DCxj35_j.cjs +0 -1
- package/dist/DateTime-D6J8sRSH.cjs +0 -1
- package/dist/Dropdown-C7Im-qW-.cjs +0 -1
- package/dist/Haul-hv7TLQ7N.cjs +0 -1
- package/dist/Item-piF6rFAm.cjs +0 -1
- package/dist/Provider-DNTq46b0.cjs +0 -1
- package/dist/Text-BTEov6di.cjs +0 -1
- package/dist/Text-CaRMYy3U.js +0 -135
- package/dist/Text-DNspRcte.js +0 -36
- package/dist/Text-DylGoRKw.cjs +0 -4
- package/dist/Text-X_BHez8W.cjs +0 -1
- package/dist/Toggle-BKKBcuTj.cjs +0 -1
- package/dist/WithIcon-CC-RSx6r.js +0 -93
- package/dist/WithIcon-Dn8eAoMj.cjs +0 -1
- package/dist/aggregator-74jWxDne.cjs +0 -1
- package/dist/aggregator-DMvP8cai.js +0 -83
- package/dist/css-Cj2UCGXB.cjs +0 -1
- package/dist/css-Dyt-QnKy.js +0 -1199
- package/dist/deep-Cvb4bVYY.js +0 -105
- package/dist/deep-ICSlPm58.cjs +0 -1
- package/dist/dimensions-Cc0z-IDd.js +0 -18
- package/dist/dimensions-Djqdrqi0.cjs +0 -1
- package/dist/eraser-9-LOWZvk.cjs +0 -11
- package/dist/eraser-BjtEI-1I.js +0 -823
- package/dist/external-B-UNCzPY.cjs +0 -1
- package/dist/external-B18FBGpk.cjs +0 -1
- package/dist/external-BG1mV1W8.cjs +0 -1
- package/dist/external-BWeX0nyq.js +0 -399
- package/dist/external-BbmpRAH3.cjs +0 -1
- package/dist/external-D2vS6j9c.cjs +0 -46
- package/dist/external-DHmQqAfL.js +0 -435
- package/dist/external-DRGfSFQT.cjs +0 -1
- package/dist/external-DX4m-5qT.cjs +0 -1
- package/dist/external-DlywBW-S.cjs +0 -1
- package/dist/hooks-BQJQyGWV.js +0 -293
- package/dist/hooks-ClXSlga9.cjs +0 -1
- package/dist/index-CSKP1UPN.js +0 -2343
- package/dist/index-Ch3utIMa.cjs +0 -15
- package/dist/provider-CH0eoGfz.js +0 -10358
- package/dist/provider-D054LCpB.cjs +0 -53
- package/dist/src/color/core/color.d.ts +0 -143
- package/dist/src/color/core/color.d.ts.map +0 -1
- package/dist/src/color/core/color.spec.d.ts +0 -2
- package/dist/src/color/core/color.spec.d.ts.map +0 -1
- package/dist/src/color/core/external.d.ts +0 -5
- package/dist/src/color/core/external.d.ts.map +0 -1
- package/dist/src/color/core/gradient.d.ts +0 -58
- package/dist/src/color/core/gradient.d.ts.map +0 -1
- package/dist/src/color/core/index.d.ts +0 -2
- package/dist/src/color/core/index.d.ts.map +0 -1
- package/dist/src/color/core/palette.d.ts +0 -74
- package/dist/src/color/core/palette.d.ts.map +0 -1
- package/dist/src/color/core/transformColorsToHex.d.ts +0 -6
- package/dist/src/color/core/transformColorsToHex.d.ts.map +0 -1
- package/dist/src/telem/client/types.d.ts +0 -20
- package/dist/src/telem/client/types.d.ts.map +0 -1
- package/dist/transformColorsToHex-DE7uEs1w.cjs +0 -1
- package/dist/transformColorsToHex-UBrryWh5.js +0 -14
- package/dist/units-DjoHPrqM.cjs +0 -1
- package/dist/units-MBd0L3ff.js +0 -8
- package/dist/useClickOutside-4k9PAT_i.cjs +0 -1
- package/dist/useClickOutside-BYjsXGgb.js +0 -107
- package/dist/useDebouncedCallback-BBsAgC9k.cjs +0 -1
- package/dist/useMemoCompare-DORTZbzY.cjs +0 -1
- package/dist/useVirtualCursorDragWebKit-BSafZVD_.cjs +0 -1
- package/dist/value-CudL8z5e.js +0 -5957
- package/dist/value-DT0qJqgQ.cjs +0 -57
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var kf=Object.defineProperty;var Mf=(e,t,n)=>t in e?kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var nt=(e,t,n)=>Mf(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-CITbqOLs.cjs"),g=require("react"),Z=require("./Divider-CloQr3vQ.cjs"),u=require("./css-Cj2UCGXB.cjs"),os=require("./external-BbmpRAH3.cjs"),st=require("./state-Bd_8X2jl.cjs"),fe=require("./index-Ch3utIMa.cjs"),_f=require("./Stack-BbwDtaE6.cjs"),je=require("./external-kZf9CjYn.cjs"),ne=require("./Space-BtaH1buB.cjs"),ze=require("./hooks-ClXSlga9.cjs"),Pf=require("./useVirtualCursorDragWebKit-BSafZVD_.cjs"),Q=require("./Provider-DNTq46b0.cjs"),Lf=require("./external-B-UNCzPY.cjs"),Ne=require("./external-B18FBGpk.cjs"),El=require("./external-DRGfSFQT.cjs"),Ls=require("./WithIcon-Dn8eAoMj.cjs"),_e=require("./toArray-DRKOku1s.cjs"),Nf=require("./external-DVajt6X6.cjs"),zn=require("./external-BG1mV1W8.cjs"),ge=require("./Toggle-BKKBcuTj.cjs"),mt=require("./Text-X_BHez8W.cjs"),ao=require("./aggregator-74jWxDne.cjs"),Ce=require("./Text-DylGoRKw.cjs"),Qt=require("./provider-D054LCpB.cjs"),B=require("./value-DT0qJqgQ.cjs"),me=require("./Haul-hv7TLQ7N.cjs"),Te=require("./useMemoCompare-DORTZbzY.cjs"),Xr=require("./dimensions-Djqdrqi0.cjs"),Xo=require("./font-DCE90lco.cjs"),Ke=require("./Dropdown-C7Im-qW-.cjs"),De=require("./deep-ICSlPm58.cjs"),xe=require("zod"),qe=require("./external-D2vS6j9c.cjs"),Ns=require("./Pack-D6Z6WuZl.cjs"),kt=require("./ContextMenu-DCxj35_j.cjs"),Tf=require("./Text-BTEov6di.cjs"),yl=require("./external-DlywBW-S.cjs");require("./Item-piF6rFAm.cjs");const Sl=require("react-dom"),Mt=require("./external-DX4m-5qT.cjs"),Rl=require("./units-DjoHPrqM.cjs"),$f=require("./useClickOutside-4k9PAT_i.cjs"),Uo=require("./useDebouncedCallback-BBsAgC9k.cjs"),Af=require("./external-B-Cao-ae.cjs"),Ur=require("./eraser-9-LOWZvk.cjs"),Mo=require("./DateTime-D6J8sRSH.cjs"),If=require("./external-CnxSp7fm.cjs"),zf=require("./Video-BM9uJLaQ.cjs"),Bf=(e,t,n=150)=>{const[s,r]=g.useState(e);return g.useEffect(()=>{const i=setTimeout(()=>r(t),n);return()=>clearTimeout(i)},[t,n]),s},Df=Object.freeze(Object.defineProperty({__proto__:null,Config:ge.Config,Dialog:ge.Dialog,chooseLocation:ge.chooseLocation,formatTip:ge.formatTip,useConfig:ge.useConfig,wrap:ge.wrap},Symbol.toStringTag,{value:"Module"})),Jo=({ref:e,location:t,style:n,size:s,className:r,children:i,onDragStart:l,sizeUnits:c="px",showHandle:a=!0,...x})=>{const d=u.K.construct(t),p=u.K.direction(d),m=u.g.dimension(p);return o.jsxRuntimeExports.jsxs(ne.Core,{className:u.CSS(u.CSS.B("resize"),u.CSS.loc(d),u.CSS.dir(p),r),style:{[m]:`${s}${c}`,...n},ref:e,...x,children:[i,a&&o.jsxRuntimeExports.jsx("div",{draggable:!0,className:u.CSS(u.CSS.BE("resize","handle"),u.CSS.bordered(u.K.swap(d))),onDragStart:l,onDrag:je.preventDefault,onDragEnd:je.preventDefault})]})},Qo=({onResize:e,count:t,initialSizes:n=[],minSize:s=100,direction:r="x"})=>{const i=g.useRef(null),[l,c]=g.useState({sizeDistribution:Of(n,t),root:null}),a=g.useCallback((p,m,f)=>{if(i.current==null)return;const h=u.$t.dim(u.$t.construct(i.current),r);c(j=>xo(j,h,p,s,m,f))},[s,c,r]);g.useEffect(()=>e==null?void 0:e(l.sizeDistribution),[l.sizeDistribution,e]);const x=g.useCallback((p,m)=>{p.preventDefault();const f=r==="x"?"clientX":"clientY",h=y=>a(m,y[f]),j=()=>{c(y=>({...y,root:null})),document.removeEventListener("mousemove",h)};c(y=>({...y,root:p[f]})),document.addEventListener("mousemove",h),document.addEventListener("mouseup",j,{once:!0})},[c,r,xo]);return{setSize:g.useCallback((p,m)=>a(p,void 0,m),[xo]),props:{direction:r,sizeDistribution:l.sizeDistribution,onDragHandle:x,ref:i}}},er=({ref:e,direction:t="x",children:n,sizeDistribution:s,onDragHandle:r,className:i,...l})=>{const c=u.g.construct(t),a=g.Children.toArray(n);return s=Vf(s),o.jsxRuntimeExports.jsx(ne.Space,{...l,ref:e,direction:c,className:u.CSS(u.CSS.B("resize-multiple"),i),empty:!0,grow:!0,children:a.map((x,d)=>o.jsxRuntimeExports.jsx(Jo,{onDragStart:p=>r(p,d),location:u.g.location(c),size:s[d]*100,sizeUnits:"%",showHandle:d!==a.length-1,children:x},d))})},Of=(e,t)=>{const n=e.reduce((r,i)=>r+i,0),s=t-e.length;if(s<=0)return e.slice(0,t).map(r=>r/n);if(e.every(r=>r<=1)){const r=1-n;return[...e,...Array(s).fill(r/s)]}return e.map(()=>1/t)},uo=.001,Vf=e=>e.every(t=>fe.be.closeTo(t,1/e.length),uo)?e.map((t,n)=>n%2===0?t+uo:n===e.length-1?t:t-uo):e,xo=(e,t,n,s,r,i)=>{const l=Cl(e,t,n,r,i),[c,a]=Ff(e.sizeDistribution,n,l,s/t),x=a?r??null:e.root;return{...e,sizeDistribution:c,root:x}},Cl=(e,t,n,s,r)=>{let i;if(r!=null)r>1&&(r/=t),i=r-e.sizeDistribution[n];else if(s!=null){if(e.root===null)throw new Error("resize root is null during handle drag");i=(s-e.root)/t}else throw new Error("must provide either a MouseEvent or a targetSize");return i},Ff=(e,t,n,s)=>{let r=t;for(;r>0&&e[r]+n<=s;)r--;const i=e[r]+n,l=Hf(r,e,s,n),c=e[l]-n;return i<s||c<s?[e,!1]:[e.map((a,x)=>x===r?i:x===l?c:a),!0]},Hf=(e,t,n,s)=>(e===t.length-1?Wf:Zf)(e,t,n,s),Zf=(e,t,n,s)=>{let r=e+1;for(;r<t.length-1&&t[r]-s<=n;)r++;return r},Wf=(e,t,n,s)=>{let r=e-1;for(;r>0&&t[r]-s<=n;)r--;return r},po=2,Yf=100,bl=({onCollapse:e,onResize:t,location:n="left",minSize:s,maxSize:r,initialSize:i=200,collapseThreshold:l=1/0,className:c,...a})=>{const[x,d]=g.useState(u.Y(i,s,r)),p=g.useRef(null),m=u.K.construct(n),f=g.useCallback(E=>{if(p.current===null)return 0;const C=u.$t.dim(E,u.K.direction(m),!0)*(1-2*Number(["bottom","right"].includes(m))),N=p.current+C,T=u.Y(N,s,r);return(T-N)/(s??Yf)>l?po:T},[m,s,r,l]),h=g.useRef(null),j=g.useCallback(E=>{const C=f(E);d(C),h.current!=null&&(t==null||t(C,u.$t.construct(h.current)))},[t,f]),y=g.useCallback(()=>d(E=>(p.current=E,E)),[d]),S=g.useCallback(E=>f(E)===po&&(e==null?void 0:e()),[e,f]);g.useEffect(()=>{s==null||r==null||d(E=>{const C=u.Y(E,s,r);return p.current=C,C})},[s,r]);const w=qe.useCursorDrag({onMove:j,onStart:y,onEnd:S});return o.jsxRuntimeExports.jsx(Jo,{ref:h,location:m,size:x,onDragStart:w,className:u.clsx(c,u.CSS.expanded(x!==po)),...a})},Gf=Object.freeze(Object.defineProperty({__proto__:null,Core:Jo,Multiple:er,Single:bl,calculateDiffPercentage:Cl,useMultiple:Qo},Symbol.toStringTag,{value:"Module"})),rs="y",Jr=28,Kf=32,qf=40,Xf=.5,Uf=({data:e,...t})=>{const{setSize:n,props:{sizeDistribution:s,ref:r,...i}}=Qo({direction:rs,count:e.length,minSize:Jr}),l=c=>{if(r.current==null)return;const a=u.$t.dim(u.$t.construct(r.current),rs);s[c]<qf/a?n(c,e[c].initialSize??Xf):n(c,Jr+1)};return o.jsxRuntimeExports.jsx(er,{empty:!0,className:u.CSS.B("accordion"),sizeDistribution:s,ref:r,...t,...i,children:e.map((c,a)=>g.createElement(eh,{...c,key:c.key,index:a,direction:rs,onExpand:l,parent:r,size:s[a]}))})},Jf=o.jsxRuntimeExports.jsx(Z.y4.Caret.Down,{"aria-label":"contract"}),Qf=o.jsxRuntimeExports.jsx(Z.y4.Caret.Right,{"aria-label":"expand"}),eh=({index:e,name:t,content:n,actions:s,size:r,parent:i,onExpand:l})=>{let c=!0;if(i.current!=null){const x=u.$t.dim(u.$t.construct(i.current),rs);c=r*x>Kf}const a=c?Jf:Qf;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(os.Header,{level:"p",className:u.CSS.expanded(c),empty:!0,children:[o.jsxRuntimeExports.jsx(os.ButtonTitle,{startIcon:a,onClick:()=>l(e),children:t}),s!=null&&o.jsxRuntimeExports.jsx(os.Actions,{children:s})]}),n]})},th=Object.freeze(Object.defineProperty({__proto__:null,Accordion:Uf},Symbol.toStringTag,{value:"Module"})),nh=(e,t)=>_e.A(e).map(s=>typeof s=="string"?s.split(t).map(r=>({label:r})):s).flat(),wl=({segments:e,shade:t,level:n,weight:s,separator:r,transform:i})=>{let c=nh(e,r);return i!=null&&(c=c.map(i)),c.map(({label:a,icon:x,href:d,...p},m)=>{const f=[o.jsxRuntimeExports.jsx(Z.y4.Caret.Right,{style:{transform:"scale(0.8) translateY(0.5px)",color:u.CSS.shade(t)}},`${a}-${m}`)];if(x!=null){const j=Ne.resolve(x);j!=null&&f.push(j)}const h={weight:s,shade:t,level:n,style:{marginLeft:x!=null?"0.5rem":"0"},children:a,...p};return d!=null?f.push(o.jsxRuntimeExports.jsx(El.Link,{...h,href:d},a)):f.push(o.jsxRuntimeExports.jsx(Z.Text,{...h},a)),f}).flat()},vl=({children:e,icon:t,shade:n=9,weight:s,size:r=.5,url:i,level:l="p",separator:c=".",className:a,hideFirst:x=!0,...d})=>{i!=null&&(e=i);const p=wl({segments:e,separator:c,shade:n,level:l,weight:s});return x&&p.shift(),o.jsxRuntimeExports.jsxs(Ls.WithIcon,{className:u.CSS(a,u.CSS.B("breadcrumb"),x&&u.CSS.M("hide-first")),level:l,shade:n,weight:s,size:r,x:!0,...d,children:[Ne.resolve(t),...p]})},sh=({url:e,className:t,level:n="p",separator:s="/",weight:r,shade:i=9})=>{const l=wl({segments:e,separator:s,shade:i,level:n,weight:r,transform:(c,a)=>({...c,label:c.label.split("-").map(x=>u.d.capitalize(x)).join(" "),href:`/${e.split(s).slice(0,a+1).join("/")}`})});return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(t,u.CSS.B("breadcrumb"),u.CSS.BM("breadcrumb","url")),x:!0,size:"small",align:"center",children:l})},oh=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:vl,URL:sh},Symbol.toStringTag,{value:"Module"})),kl=({variant:e="info",...t})=>o.jsxRuntimeExports.jsx(Z.y4.Circle,{color:Ce.VARIANT_COLORS[e],...t}),rh=({action:e})=>g.isValidElement(e)?e:g.createElement(ge.Button,{...e,key:e.key}),ih=({status:{key:e,time:t,count:n,message:s,description:r,variant:i},silence:l,actions:c,className:a,children:x,...d})=>{const p=g.useRef(null);return o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS(u.CSS.B("notification"),a),y:!0,empty:!0,ref:p,...d,children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,justify:"spaceBetween",grow:!0,style:{width:"100%"},children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",size:"small",children:[o.jsxRuntimeExports.jsx(kl,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),o.jsxRuntimeExports.jsx(Z.Text,{level:"small",shade:11,children:`x${n}`}),o.jsxRuntimeExports.jsx(Mo.DateTime,{className:u.CSS(u.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),o.jsxRuntimeExports.jsx(ge.Icon,{className:u.CSS(u.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>l(e),children:o.jsxRuntimeExports.jsx(Z.y4.Close,{})})]}),o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,align:"start",className:u.CSS(u.CSS.BE("notification","content")),size:"small",children:[x??o.jsxRuntimeExports.jsx(Z.Text,{className:u.CSS(u.CSS.BE("notification","message")),level:"p",style:{flexGrow:1},children:s}),r!=null&&o.jsxRuntimeExports.jsx(Z.Text,{className:u.CSS(u.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:r})]}),c!=null&&o.jsxRuntimeExports.jsx(ne.Space,{x:!0,align:"center",justify:"end",className:u.CSS(u.CSS.BE("notification","actions")),children:_e.A(c).map(m=>o.jsxRuntimeExports.jsx(rh,{action:m},m.key))})]},t.toString())},lh=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:Ce.Aggregator,Circle:kl,Notification:ih,Text:Ce.Text,VARIANTS:ao.VARIANTS,VARIANT_COLORS:Ce.VARIANT_COLORS,specZ:ao.specZ,useAdder:Ce.useAdder,useErrorHandler:Ce.useErrorHandler,useNotifications:Ce.useNotifications,variantZ:ao.variantZ},Symbol.toStringTag,{value:"Module"})),tr=({aetherKey:e,enabled:t=!0})=>{const{setState:n}=Q.useLifecycle({aetherKey:e,type:Ur.Eraser.TYPE,schema:Ur.eraserStateZ,initialState:{region:u.$t.ZERO,enabled:t}}),s=Z.useSyncedRef(t);return{erase:g.useCallback(i=>{n({enabled:s.current,region:i})},[n,s])}},ch=({aetherKey:e,children:t})=>{const{erase:n}=tr({aetherKey:e}),s=Ke.useResize(n);return o.jsxRuntimeExports.jsx("div",{ref:s,className:u.CSS(u.CSS.inheritDims()),children:t})},ah=Object.freeze(Object.defineProperty({__proto__:null,Eraser:ch,use:tr},Symbol.toStringTag,{value:"Module"})),uh=({items:e,initialKey:t})=>{const[n,s]=g.useState(t),r=l=>s(l===n?void 0:l),i=e.find(l=>l.key===n);return{onSelect:r,activeItem:i}},xh=({activeItem:e,children:t,onSelect:n,location:s="left",collapseThreshold:r=.65,className:i,onResize:l,onCollapse:c,eraseEnabled:a,...x})=>{const d=u.K.direction(s);a??(a=e!=null);const p=g.useCallback(()=>{c?c():e!=null&&(n==null||n(e.key))},[n,e==null?void 0:e.key,c]),{erase:m}=tr({enabled:a}),f=g.useCallback((w,E)=>{l==null||l(w,E),m(E)},[l,m]),{content:h,minSize:j,maxSize:y,initialSize:S=0}=e??{};return o.jsxRuntimeExports.jsx(bl,{className:u.CSS(u.CSS.B("nav-drawer"),u.CSS.dir(d),u.CSS.visible(e!=null),i),collapseThreshold:r,onCollapse:p,location:s,onResize:f,minSize:j,maxSize:y,initialSize:S,...x,children:h})},dh=Object.freeze(Object.defineProperty({__proto__:null,Bar:je.Bar,Drawer:xh,useDrawer:uh},Symbol.toStringTag,{value:"Module"})),Ml=g.createContext(B.ZERO_CONTEXT_VALUE),_l=()=>g.use(Ml),Xe=()=>_l().synnax,ph=()=>_l().state,Qr={connected:"success",connecting:"info",disconnected:"info",failed:"error"},Pl="serverVersionMismatch",mh=(e,t,n)=>`Cluster version ${n!=null?`${n} `:""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,Ll=({children:e,connParams:t})=>{const[n,s,r]=Z.useCombinedStateAndRef(B.ZERO_CONTEXT_VALUE),[{path:i},,l]=Q.use$1({type:B.Provider.TYPE,schema:B.Provider.stateZ,initialState:{props:t??null,state:null}}),c=Ce.useAdder(),a=g.useCallback(x=>{r.current.state.status!==x.status&&c({variant:Qr[x.status],message:x.message??u.d.capitalize(x.status)}),s(d=>({...d,state:x}))},[c]);return Q.useAsyncEffect(async()=>{if(n.synnax!=null&&n.synnax.close(),t==null)return s(B.ZERO_CONTEXT_VALUE);const x=new Qt.$p({...t,connectivityPollFrequency:Qt.S.seconds(5)});s({synnax:x,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:x.clientVersion}});const d=await x.connectivity.check();if(s({synnax:x,state:d}),c({variant:Qr[d.status],message:d.message??d.status.toUpperCase()}),d.status==="connected"&&!d.clientServerCompatible){const p=d.nodeVersion==null||fe._e.semVerOlder(d.nodeVersion,d.clientVersion),m=mh(p,d.clientVersion,d.nodeVersion);c({variant:"warning",message:"Incompatible cluster version",description:m,data:{type:Pl,oldServer:p,nodeVersion:d.nodeVersion,clientVersion:d.clientVersion}})}return x.connectivity.onChange(a),l({props:t,state:d}),()=>{x.close(),s(B.ZERO_CONTEXT_VALUE),l({props:null,state:null})}},[t,a]),o.jsxRuntimeExports.jsx(Ml,{value:n,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:i,children:e})})},fh=Object.freeze(Object.defineProperty({__proto__:null,Provider:Ll,SERVER_VERSION_MISMATCH:Pl,use:Xe,useConnectionState:ph},Symbol.toStringTag,{value:"Module"})),Nl=g.createContext({aliases:{},getName:async()=>await Promise.resolve(void 0),setAlias:null}),cn=()=>g.use(Nl),Tl=e=>cn().aliases[e]??null,Ts=()=>cn().aliases,$s=(e,t="")=>{const{getName:n}=cn(),[s,r]=g.useState(t);return Q.useAsyncEffect(async()=>{const i=await n(e);r(i)},[e,n]),s??t},nr=()=>cn().activeRange??void 0,$l=({activeRange:e,children:t})=>{const n=Xe(),[s,r]=g.useState({}),i=g.useCallback(a=>{r(x=>{const d={...x};return a.forEach(({variant:p,key:m,value:f})=>{const h=Number(m.split("---")[1]);p==="delete"?delete d[h]:d[f.channel]=f.alias}),d})},[r]),l=g.useCallback(async(a,x)=>{if(n==null||e==null)return;await(await n.ranges.retrieve(e)).setAlias(a,x)},[n,e]),c=g.useCallback(async a=>{if(n==null||a===0)return;const x=s[a];return x??(await n.channels.retrieve(a)).name},[s,n]);return Q.useAsyncEffect(async()=>{if(n==null||e==null){r({});return}const a=await n.ranges.retrieve(e),x=await a.listAliases();r(x);const d=await a.openAliasTracker(),p=d.onChange(i);return()=>{p(),d.close()}},[n,e]),o.jsxRuntimeExports.jsx(Nl,{value:{aliases:s,activeRange:e,setAlias:e!=null?l:null,getName:c},children:t})},hh=({channelKey:e,value:t,shadow:n,className:s,...r})=>{const[i,l]=g.useState(!1),{setAlias:c}=cn(),a=Tl(e),x=$s(e);let d=o.jsxRuntimeExports.jsx(Z.y4.Rename,{});i?d=o.jsxRuntimeExports.jsx(Z.y4.Loading,{}):a===t&&(d=o.jsxRuntimeExports.jsx(Z.y4.Check,{}));const p=c!=null&&!i&&a!==t&&e!==0,m=Ce.useErrorHandler(),f=()=>{p&&m(async()=>{l(!0),await c(e,t),l(!1)},"Failed to set channel alias")},h=()=>{var y;a!=null&&((y=r.onChange)==null||y.call(r,a))},j=()=>e===0?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):c==null?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):t.length===0?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):a===t?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Alias synced with this label"}):o.jsxRuntimeExports.jsxs(Z.Text,{level:"small",children:["Sync alias for ",x," with this label"]});return o.jsxRuntimeExports.jsxs(mt.Text,{value:t,...r,children:[p&&o.jsxRuntimeExports.jsx(ge.Icon,{onClick:h,tooltip:o.jsxRuntimeExports.jsxs(Z.Text,{level:"small",children:["Set ",x," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:o.jsxRuntimeExports.jsx(Z.y4.Sync,{})}),o.jsxRuntimeExports.jsx(ge.Icon,{onClick:f,disabled:!p,tooltip:o.jsxRuntimeExports.jsx(j,{}),tooltipLocation:{y:"top"},variant:"outlined",children:d})]})},ot="channel";var ei=180/Math.PI,_o={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Al(e,t,n,s,r,i){var l,c,a;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(a=e*n+t*s)&&(n-=e*a,s-=t*a),(c=Math.sqrt(n*n+s*s))&&(n/=c,s/=c,a/=c),e*s<t*n&&(e=-e,t=-t,a=-a,l=-l),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*ei,skewX:Math.atan(a)*ei,scaleX:l,scaleY:c}}var Kn;function gh(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?_o:Al(t.a,t.b,t.c,t.d,t.e,t.f)}function jh(e){return e==null||(Kn||(Kn=document.createElementNS("http://www.w3.org/2000/svg","g")),Kn.setAttribute("transform",e),!(e=Kn.transform.baseVal.consolidate()))?_o:(e=e.matrix,Al(e.a,e.b,e.c,e.d,e.e,e.f))}function Il(e,t,n,s){function r(x){return x.length?x.pop()+" ":""}function i(x,d,p,m,f,h){if(x!==p||d!==m){var j=f.push("translate(",null,t,null,n);h.push({i:j-4,x:B.interpolateNumber(x,p)},{i:j-2,x:B.interpolateNumber(d,m)})}else(p||m)&&f.push("translate("+p+t+m+n)}function l(x,d,p,m){x!==d?(x-d>180?d+=360:d-x>180&&(x+=360),m.push({i:p.push(r(p)+"rotate(",null,s)-2,x:B.interpolateNumber(x,d)})):d&&p.push(r(p)+"rotate("+d+s)}function c(x,d,p,m){x!==d?m.push({i:p.push(r(p)+"skewX(",null,s)-2,x:B.interpolateNumber(x,d)}):d&&p.push(r(p)+"skewX("+d+s)}function a(x,d,p,m,f,h){if(x!==p||d!==m){var j=f.push(r(f)+"scale(",null,",",null,")");h.push({i:j-4,x:B.interpolateNumber(x,p)},{i:j-2,x:B.interpolateNumber(d,m)})}else(p!==1||m!==1)&&f.push(r(f)+"scale("+p+","+m+")")}return function(x,d){var p=[],m=[];return x=e(x),d=e(d),i(x.translateX,x.translateY,d.translateX,d.translateY,p,m),l(x.rotate,d.rotate,p,m),c(x.skewX,d.skewX,p,m),a(x.scaleX,x.scaleY,d.scaleX,d.scaleY,p,m),x=d=null,function(f){for(var h=-1,j=m.length,y;++h<j;)p[(y=m[h]).i]=y.x(f);return p.join("")}}}var Eh=Il(gh,"px, ","px)","deg)"),yh=Il(jh,", ",")",")"),Sh=1e-12;function ti(e){return((e=Math.exp(e))+1/e)/2}function Rh(e){return((e=Math.exp(e))-1/e)/2}function Ch(e){return((e=Math.exp(2*e))-1)/(e+1)}const bh=function e(t,n,s){function r(i,l){var c=i[0],a=i[1],x=i[2],d=l[0],p=l[1],m=l[2],f=d-c,h=p-a,j=f*f+h*h,y,S;if(j<Sh)S=Math.log(m/x)/t,y=function(P){return[c+P*f,a+P*h,x*Math.exp(t*P*S)]};else{var w=Math.sqrt(j),E=(m*m-x*x+s*j)/(2*x*n*w),C=(m*m-x*x-s*j)/(2*m*n*w),N=Math.log(Math.sqrt(E*E+1)-E),T=Math.log(Math.sqrt(C*C+1)-C);S=(T-N)/t,y=function(P){var D=P*S,I=ti(N),z=x/(n*w)*(I*Ch(t*D+N)-Rh(N));return[c+z*f,a+z*h,x*I/ti(t*D+N)]}}return y.duration=S*1e3*t/Math.SQRT2,y}return r.rho=function(i){var l=Math.max(.001,+i),c=l*l,a=c*c;return e(l,c,a)},r}(Math.SQRT2,2,4),wh=Object.freeze(Object.defineProperty({__proto__:null,Canvas:B.Canvas,axisStateZ:B.axisStateZ,newTickFactory:B.newTickFactory,tickFactoryProps:B.tickFactoryProps,tickType:B.tickType},Symbol.toStringTag,{value:"Module"})),vh={region:u.$t.ZERO,dpr:1,os:fe.S.getOS()},kh={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},Mh=({children:e,resizeDebounce:t=100,className:n,...s})=>{const[{path:r},{bootstrapped:i,dpr:l},c]=Q.use$1({type:B.Canvas$1.TYPE,schema:B.canvasStateZ,initialState:vh}),a=g.useRef({...kh}),x=g.useRef(!1),d=g.useCallback(j=>{a.current.bootstrapped&&(c(()=>({bootstrapped:!0,region:j,dpr:window.devicePixelRatio,os:fe.S.getOS({default:"Windows"})})),x.current=!0)},[c]),p=g.useRef(null),m=Ke.useResize(d,{debounce:t}),f=Z.useCombinedRefs(p,m);g.useEffect(()=>{const j=()=>{window.devicePixelRatio===l||!a.current.bootstrapped||p.current==null||c(y=>({...y,region:u.$t.construct(p.current),dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",j,{once:!0})},[l]),g.useEffect(()=>{const j=()=>{!a.current.bootstrapped||p.current==null||c(y=>({...y,region:u.$t.construct(p.current),glCanvas:void 0,upper2dCanvas:void 0,lower2dCanvas:void 0}))};window.addEventListener("focus",j),window.addEventListener("blur",j)},[c]);const h=g.useCallback(j=>{if(j==null)return;j.className.includes("gl")?a.current.gl=j:j.className.includes("upper2d")?a.current.upper2d=j:a.current.lower2d=j;const{gl:y,lower2d:S,upper2d:w,bootstrapped:E}=a.current;if(y==null||S==null||w==null||E)return;a.current.bootstrapped=!0;const C=y.transferControlToOffscreen(),N=w.transferControlToOffscreen(),T=S.transferControlToOffscreen();c({glCanvas:C,upper2dCanvas:N,lower2dCanvas:T,bootstrap:!0,bootstrapped:!1,region:u.$t.construct(y),dpr:window.devicePixelRatio,os:fe.S.getOS({default:"Windows"})},[C,N,T])},[c]);return o.jsxRuntimeExports.jsxs("div",{ref:f,className:u.CSS(u.CSS.B("canvas-container"),n),...s,children:[o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","lower2d"))}),o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","gl"))}),o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","upper2d"))}),o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:i&&e})]})},Bn=(e,t)=>Ke.useResize(g.useCallback((n,s)=>{const r=document.querySelector(".pluto-canvas--lower2d");r!=null&&e(u.b.XY.translate(u.J.scale(u.$t.topLeft(r),-1)).box(n),s)},[e]),t),_h=Object.freeze(Object.defineProperty({__proto__:null,Canvas:Mh,useRegion:Bn},Symbol.toStringTag,{value:"Module"})),zl=g.createContext(null),rt=e=>{const t=g.use(zl);if(t==null)throw new Error(`Cannot to use ${e} as a non-child of LinePlot.`);return t},Bl=e=>{const t=rt("Viewport"),{addViewportHandler:n}=t;g.useEffect(()=>n(e),[n,e])},Dn=(e,t)=>{const{setGridEntry:n,removeGridEntry:s}=rt(t),{key:r}=e;return Q.useEffectCompare(()=>{u.K.outer.parse(e.loc),n(e)},([c],[a])=>De.I.equal(c,a),[e]),g.useEffect(()=>()=>s(r),[]),{gridArea:u.g.swap(u.K.direction(e.loc))==="x"?`axis-start-${r} / plot-start / axis-end-${r} / plot-end`:`plot-start / axis-start-${r} / plot-end / axis-end-${r}`}},Dl=({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:s=u.J.ZERO,children:r,hold:i=!1,onHold:l,visible:c,...a})=>{const[x,d]=g.useState([]),p=Te.useMemoDeepEqualProps({clearOverScan:s,hold:i,visible:c}),[{path:m},{grid:f},h]=Q.use$1({aetherKey:e,type:B.LinePlot.TYPE,schema:B.linePlotStateZ,initialState:{container:u.$t.ZERO,viewport:u.$t.DECIMAL,grid:{},...p}});g.useEffect(()=>h(O=>({...O,...p})),[p]);const j=g.useRef(new Map),y=g.useCallback(O=>(j.current.set(O,null),()=>j.current.delete(O)),[j]),S=g.useCallback(O=>{const{mode:M,box:R,stage:k}=O;(M==="pan"&&k!=="start"||M==="zoom"||M==="zoomReset"&&k==="start")&&h(v=>({...v,viewport:R})),j.current.forEach((v,_)=>_(O))},[h]),w=g.useCallback(O=>h(M=>({...M,container:O})),[h]),E=Bn(w,{debounce:n}),C=g.useCallback(O=>h(M=>({...M,grid:{...M.grid,[O.key]:O}})),[h]),N=g.useCallback(O=>h(M=>{const{[O]:R,...k}=M.grid;return{...M,grid:k}}),[h]),T=g.useCallback(O=>{d(M=>[...M.filter(({key:R})=>R!==O.key),O])},[d,S]),P=g.useCallback(O=>d(M=>M.filter(({key:R})=>R!==O)),[T]),D=g.useMemo(()=>Ph(f),[f]),I=g.useCallback(O=>{h(M=>({...M,hold:O})),l==null||l(O)},[h,l]),z=`line-plot-${e}`,F=g.useMemo(()=>({lines:x,setGridEntry:C,removeGridEntry:N,setLine:T,removeLine:P,setViewport:S,addViewportHandler:y,setHold:I,id:z}),[z,x,C,N,T,P,S,y,I]);return o.jsxRuntimeExports.jsx("div",{id:z,className:u.CSS.B("line-plot"),style:{...t,...D},ref:E,...a,children:o.jsxRuntimeExports.jsx(zl,{value:F,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:m,children:r})})})},Ph=e=>{const t=u.CSS.newGridBuilder();return B.regions("top",e).forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),t.row("plot-start","plot-end","minmax(0, 1fr)"),B.regions("bottom",e).reverse().forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),B.regions("left",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.col("plot-start","plot-end","minmax(0, 1fr)"),B.regions("right",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.build()},sr=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?B.XAxis.TYPE:B.YAxis.TYPE,s=`${e}-axis`,r=({aetherKey:i,children:l,location:c=t,label:a="",labelLevel:x="small",labelDirection:d=e,onLabelChange:p,color:m,labelSize:f,showGrid:h,type:j,bounds:y,className:S,tickSpacing:w,autoBounds:E,autoBoundUpdateInterval:C,onAutoBoundsChange:N,style:T,...P})=>{const D=((a==null?void 0:a.length)??0)>0,I=Q.useUniqueKey(i),z=Te.useMemoDeepEqualProps({location:c,showGrid:h,type:j,bounds:y,label:a,labelDirection:d,tickSpacing:w,autoBounds:E,autoBoundUpdateInterval:C}),[{path:F},{size:O,labelSize:M,...R},k]=Q.use$1({aetherKey:I,type:n,schema:B.coreAxisStateZ,initialState:z});g.useEffect(()=>k($=>({...$,...z})),[z]),g.useEffect(()=>{const{lower:$,upper:V}=B.parseAutoBounds(R.autoBounds);R.bounds!=null&&($&&(y==null?void 0:y.lower)!==R.bounds.lower||V&&(y==null?void 0:y.upper)!==R.bounds.upper)&&(N==null||N(R.bounds))},[R.autoBounds,R.bounds]);const v=Dn({loc:c,key:`${n}-${I}`,size:O+M,order:1},`${e.toUpperCase()}Axis`),_=Xo.useTypography(x).toString(),A=g.useRef(0);return g.useEffect(()=>{if(e==="y"){if(a==null)return;let V=Xr.dimensions(a,_)[u.g.dimension(u.g.construct(d))];V>0&&(V+=9),k(H=>({...H,labelSize:V}))}else{let V=Xr.dimensions(a,_).height*1.3;V>0&&(V+=12);const H=A.current;B.withinSizeThreshold(H,V)||(A.current=V,k(W=>({...W,labelSize:V})))}},[a,d,_]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(S,u.CSS.B("axis"),u.CSS.B(s),u.CSS.loc(c)),style:{...T,...v},align:"center",justify:c!=="left"?"end":"start",direction:u.g.swap(e),...P,children:D&&o.jsxRuntimeExports.jsx(Z.MaybeEditable,{className:u.CSS(u.CSS.BE("axis","label"),u.CSS.dir(d)),value:a,onChange:p,level:x})}),o.jsxRuntimeExports.jsx(Q.Composite,{path:F,children:l})]})};return r.displayName=`${e.toUpperCase()}Axis`,r},Ol=sr("x"),Vl=sr("y"),Fl=u.J.xy.extend({root:u.K.corner,units:xe.z.object({x:xe.z.enum(["px","decimal"]),y:xe.z.enum(["px","decimal"])})}),Lh=Fl.partial({root:!0,units:!0}),Nh=e=>{var n,s,r,i;const t={};return t[((n=e.root)==null?void 0:n.x)??"left"]=((s=e==null?void 0:e.units)==null?void 0:s.x)==="px"?`${e.x}px`:`${e.x*100}%`,t[((r=e.root)==null?void 0:r.y)??"top"]=((i=e==null?void 0:e.units)==null?void 0:i.y)==="px"?`${e.y}px`:`${e.y*100}%`,t},Th=(e,t)=>{var i,l,c,a,x,d;const n={x:e.x,y:e.y};if(t.current==null)return n;const s=u.$t.construct(t.current),r=u.$t.construct(t.current.parentElement);return((i=e.units)==null?void 0:i.x)==="decimal"?((l=e.root)==null?void 0:l.x)==="right"&&(n.x=1-e.x):((c=e.root)==null?void 0:c.x)==="right"?n.x=1-(e.x+u.$t.width(s))/u.$t.width(r):n.x/=u.$t.width(r),((a=e.units)==null?void 0:a.y)==="decimal"?((x=e.root)==null?void 0:x.y)==="bottom"&&(n.y=1-e.y):((d=e.root)==null?void 0:d.y)==="bottom"?n.y=1-(e.y+u.$t.height(s))/u.$t.height(r):n.y/=u.$t.height(r),n},Hl=(e,t)=>{if(t.current==null)return null;const n=u.$t.construct(t.current.parentElement),s=u.$t.construct(t.current),r={x:e.x,y:e.y,root:{...u.K.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(r.x=(1-e.x)*u.$t.width(n)-u.$t.width(s),r.root.x="right"):e.x<.2?r.x=e.x*u.$t.width(n):r.units.x="decimal",e.y>.8?(r.y=(1-e.y)*u.$t.height(n)-u.$t.height(s),r.root.y="bottom"):e.y<.2?r.y=e.y*u.$t.height(n):r.units.y="decimal",r.x=Math.round(r.x*100)/100,{...r,...u.J.truncate(r,3)}},ni=u.$t.reRoot(u.$t.DECIMAL,u.K.TOP_LEFT),or=g.memo(({className:e,value:t,onChange:n,style:s,draggable:r=!0,...i})=>{const[l,c]=st.usePurePassthrough({value:t,onChange:n,initial:{x:.1,y:.1,root:u.K.TOP_LEFT,units:{x:"decimal",y:"decimal"}}}),a=g.useRef(l),x=Z.useSyncedRef(r===!1),d=g.useRef(null);l!==null&&(s={...s,...Nh(l)});const p=g.useCallback(f=>{var C;if(((C=d.current)==null?void 0:C.parentElement)==null)return a.current;const h=u.$t.construct(d.current.parentElement),j=u.b.XY.scale(h).scale(ni),y=j.box(u.$t.construct(d.current)),S=u.b.XY.clamp(u.$t.construct(u.$t.topLeft(ni),{width:1-u.$t.width(y),height:1-u.$t.height(y)})),w=u.J.translate(u.J.construct(a.current),u.$t.signedDims(j.box(f))),E=S.pos(w);return Hl(E,d)},[]),m=qe.useCursorDrag({onStart:g.useCallback(()=>{a.current=Th(a.current,d)},[]),onMove:g.useCallback(f=>{if(x.current)return;const h=p(f);h!==null&&c(h)},[]),onEnd:g.useCallback(f=>{if(x.current)return;const h=p(f);h!==null&&(a.current=h)},[])});return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(e,u.CSS.B("legend")),bordered:!0,rounded:!0,style:s,onDragStart:m,draggable:r,borderShade:5,ref:d,...i,onDrag:je.preventDefault,onDragEnd:je.preventDefault,background:1})});or.displayName="Legend.Container";const rr=({data:e,onEntryChange:t,onVisibleChange:n,allowVisibleChange:s=!0,shade:r=1})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e.sort((i,l)=>i.label.localeCompare(l.label)).map(({key:i,color:l,label:c,visible:a=!0})=>o.jsxRuntimeExports.jsxs(ne.Space,{style:{cursor:"pointer"},x:!0,align:"center",size:"small",justify:"spaceBetween",grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",align:"center",size:"small",children:[o.jsxRuntimeExports.jsx(qe.Swatch,{value:l,onChange:x=>t==null?void 0:t({key:i,color:x,label:c,visible:a}),onVisibleChange:n,allowChange:t!=null,draggable:!1,size:"tiny"}),o.jsxRuntimeExports.jsx(Z.MaybeEditable,{level:"small",value:c,onChange:x=>t==null?void 0:t({key:i,color:l,label:x,visible:a}),noWrap:!0,shade:a?10:7,onDoubleClick:x=>x.stopPropagation()})]}),s&&o.jsxRuntimeExports.jsx(ge.Icon,{className:u.CSS.B("visible-toggle"),onClick:x=>{x.stopPropagation(),t==null||t({key:i,color:l,label:c,visible:!a})},onDoubleClick:x=>x.stopPropagation(),size:"tiny",shade:r,children:a?o.jsxRuntimeExports.jsx(Z.y4.Visible,{}):o.jsxRuntimeExports.jsx(Z.y4.Hidden,{})})]},i))}),ir=({data:e=[],onEntryChange:t,position:n,onPositionChange:s,allowVisibleChange:r=!0,...i})=>{const[l,c]=g.useState(!1);return e.length===0?null:o.jsxRuntimeExports.jsx(or,{...i,className:r?u.CSS.M("with-visible-toggle"):void 0,draggable:!l,value:n,onChange:s,empty:!0,children:o.jsxRuntimeExports.jsx(rr,{data:e,onEntryChange:t,onVisibleChange:c,allowVisibleChange:r})})},$h=Object.freeze(Object.defineProperty({__proto__:null,Container:or,LegendSwatches:rr,Simple:ir,calcStickyPos:Hl,completeStickyXYz:Fl,stickyXYz:Lh},Symbol.toStringTag,{value:"Module"})),lr=g.memo(({className:e,style:t,onLineChange:n,...s})=>{const{lines:r}=rt("Legend");return rt("Legend"),o.jsxRuntimeExports.jsx(ir,{data:r,onEntryChange:n,...s})});lr.displayName="FloatingLegend";const Ah=({onLineChange:e})=>{const{lines:t}=rt("Legend"),n=Q.useUniqueKey(),s=Dn({key:n,size:t.length>0?36:0,loc:"bottom",order:5},"Legend");return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS.BE("legend","container"),align:"center",x:!0,style:{...s,padding:"0 1rem",height:"var(--pluto-height-medium)",margin:"1rem 0 ",width:"fit-content"},children:o.jsxRuntimeExports.jsx(rr,{data:t,onEntryChange:e,shade:0})})},Zl=({variant:e="floating",...t})=>e==="floating"?o.jsxRuntimeExports.jsx(lr,{...t}):o.jsxRuntimeExports.jsx(Ah,{...t}),cr=g.memo(({aetherKey:e,...t})=>(Q.useUnidirectional({aetherKey:e,type:B.Line.TYPE,schema:B.stateZ,state:t}),null));cr.displayName="Line";const Ih=Object.freeze(Object.defineProperty({__proto__:null,Line:cr},Symbol.toStringTag,{value:"Module"})),ar=({aetherKey:e,color:t,label:n="",visible:s=!0,...r})=>{const i=Q.useUniqueKey(e),{setLine:l,removeLine:c}=rt("Line");return g.useEffect(()=>(l({key:i,color:t,label:n,visible:s}),()=>c(i)),[n,t,s]),o.jsxRuntimeExports.jsx(cr,{aetherKey:i,color:t,label:n,visible:s,...r})},Wl=({level:e="h2",...t})=>{const n=Q.useUniqueKey(),s=Xo.useTypography(e),r=Dn({key:n,size:(s.lineHeight+2)*s.baseSize,loc:"top",order:10},"Title");return o.jsxRuntimeExports.jsx(ne.Space,{justify:"center",align:"center",style:r,children:o.jsxRuntimeExports.jsx(Z.MaybeEditable,{...t,level:e})})},Yl=({aetherKey:e,...t})=>{const n=Q.useUniqueKey(e),[,,s]=Q.use$1({aetherKey:n,type:B.Tooltip.TYPE,schema:B.tooltipStateZ,initialState:{position:null,...t}}),r=g.useRef(null),i=g.useCallback(c=>{const a=document.querySelector(".pluto-canvas-container");if(a==null)return;const x=u.$t.topLeft(a);s({position:u.J.translation(x,u.J.construct(c))})},[s]),l=g.useCallback(()=>s({position:null}),[s]);return g.useEffect(()=>{if(r.current===null)return;const c=r.current.parentElement;if(c!=null)return c.addEventListener("mousemove",i),c.addEventListener("mouseleave",l),()=>{c.removeEventListener("mousemove",i),c.removeEventListener("mouseleave",l)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:r})},zh=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Yl},Symbol.toStringTag,{value:"Module"})),Bh={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer",cancel:"default"},Gl=({className:e,mode:t,maskBox:n,children:s,style:r,...i})=>o.jsxRuntimeExports.jsxs("div",{className:u.CSS(u.CSS.noSelect,u.CSS.BE("viewport-mask","container"),e),style:{cursor:Bh[t],...r},...i,children:[o.jsxRuntimeExports.jsx("div",{style:{...u.$t.css(n),display:u.$t.areaIsZero(n)?"none":"block"},className:u.CSS.BE("viewport-mask","selection")}),s]}),Dh=[],ur=({data:e,emptyContent:t,value:n,onChange:s,allowMultiple:r,allowNone:i,hideColumnHeader:l=!1,columns:c=Dh,visible:a,itemHeight:x=Ce.Column.itemHeight,listItem:d=ge.componentRenderProp(Ce.Column.Item),replaceOnSingle:p,omit:m,autoSelectOnNone:f,trigger:h,extraDialogContent:j,variant:y="connected",...S})=>{let w=o.jsxRuntimeExports.jsxs(Ce.Hover,{disabled:!a,children:[j,o.jsxRuntimeExports.jsx(Ce.Column.Header,{hide:l||d!=null,columns:c,children:o.jsxRuntimeExports.jsx(Ce.Core.Virtual,{itemHeight:x,children:d})})]});return y!=="connected"&&(w=o.jsxRuntimeExports.jsx(Ns.Pack,{y:!0,className:u.CSS.B("select-dialog-content"),children:w})),o.jsxRuntimeExports.jsx(Ce.List,{data:e,emptyContent:t,omit:m,children:o.jsxRuntimeExports.jsx(Ce.Selector,{value:n,onChange:s,allowMultiple:r,allowNone:i,replaceOnSingle:p,autoSelectOnNone:f,children:o.jsxRuntimeExports.jsxs(Ke.Dialog,{visible:a,className:u.CSS.B("select"),keepMounted:!1,variant:y,...S,children:[h,w]})})})},it=({children:e=Oh,value:t,onChange:n,entryRenderKey:s="key",allowNone:r=!1,allowMultiple:i=!1,data:l,replaceOnSingle:c,className:a,size:x="medium",actions:d,pack:p=!0,variant:m,...f})=>{const{onSelect:h}=Ce.useSelect({allowMultiple:i,allowNone:r,replaceOnSingle:c,data:l,value:t,onChange:n}),j=S=>{m!=="preview"&&h(S)},y=l==null?void 0:l.map(S=>e({key:S.key,onClick:()=>j(S.key),size:x,selected:S.key===t,entry:S,title:S[s]}));return p?o.jsxRuntimeExports.jsxs(Ns.Pack,{borderShade:5,className:u.CSS(u.CSS.B("select-button"),a),size:x,...f,children:[y,d]}):o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:y})},Oh=({key:e,onClick:t,selected:n,title:s,size:r})=>o.jsxRuntimeExports.jsx(ge.Button,{onClick:t,variant:n?"filled":"outlined",size:r,children:s},e),Kl=({selected:e,renderKey:t,toggle:n,visible:s,children:r,...i})=>o.jsxRuntimeExports.jsx(ge.Button,{className:u.CSS.B("select-dropdown-button"),onClick:n,variant:"outlined",endIcon:o.jsxRuntimeExports.jsx(zn.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:s}),...i,children:r??(e==null?void 0:e[t])}),ql=ge.componentRenderProp(Kl),As=({data:e,value:t,columns:n=[],children:s=ql,entryRenderKey:r="key",allowNone:i=!1,onChange:l,disabled:c,hideColumnHeader:a=!0,variant:x,dropdownVariant:d,...p})=>{const{close:m,visible:f,toggle:h}=Ke.use(),[j,y]=g.useState((e==null?void 0:e.find(E=>E.key===t))??null);g.useEffect(()=>{y((e==null?void 0:e.find(E=>E.key===t))??null)},[e,t]);const S=g.useCallback((E,C)=>{if(!(Array.isArray(E)||E===null)){if(m(),E==null)return y(null),l(t);y(C.entries[0]),l(E)}},[l,t,m,y]),w={selected:j,renderKey:r,toggle:h,visible:f,disabled:c};return x!=null&&(w.variant=x),o.jsxRuntimeExports.jsx(ur,{close:m,data:e,visible:f,value:t,onChange:S,allowMultiple:!1,allowNone:i,columns:n,hideColumnHeader:a,variant:d,trigger:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:s(w)}),...p})},Vh=[{key:"start",icon:o.jsxRuntimeExports.jsx(Z.y4.TextAlign.Left,{})},{key:"center",icon:o.jsxRuntimeExports.jsx(Z.y4.TextAlign.Center,{})},{key:"end",icon:o.jsxRuntimeExports.jsx(Z.y4.TextAlign.Right,{})}],Fh=({key:e,entry:t,onClick:n,selected:s})=>o.jsxRuntimeExports.jsx(ge.Icon,{variant:s?"filled":"outlined",onClick:n,children:t.icon},e),Is=({children:e=Fh,...t})=>o.jsxRuntimeExports.jsx(it,{...t,allowMultiple:!1,data:Vh,children:e}),Hh=[{key:"large",label:"L"},{key:"medium",label:"M"},{key:"small",label:"S"}],Xl=e=>o.jsxRuntimeExports.jsx(it,{...e,data:Hh,entryRenderKey:"label"}),Zh=new Set([fe.g$1.UUID,fe.g$1.JSON]),Ul=fe.g$1.ALL.filter(e=>e!==fe.g$1.UNKNOWN).map(e=>({key:e.toString(),name:Zh.has(e)?e.toString().toUpperCase():u.d.capitalize(e.toString())})),Wh=Ul.filter(e=>!new fe.g$1(e.key).isVariable),Yh=[{key:"name",name:"Name"}],Gh=({hideVariableDensity:e=!1,...t})=>o.jsxRuntimeExports.jsx(As,{...t,data:e?Wh:Ul,columns:Yh,entryRenderKey:"name"}),Kh=[{key:"x",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{})},{key:"y",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Up,{})}],qh=[{key:"x",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{})},{key:"y",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Down,{})}],Xh=({key:e,entry:t,onClick:n,selected:s})=>o.jsxRuntimeExports.jsx(ge.Icon,{variant:s?"filled":"outlined",onClick:n,children:t.icon},e),Jl=({children:e=Xh,yDirection:t="up",...n})=>o.jsxRuntimeExports.jsx(it,{...n,allowMultiple:!1,data:t==="up"?Kh:qh,children:e}),Ql=e=>o.jsxRuntimeExports.jsx(ge.Icon,{className:u.CSS.BE("select","clear"),variant:"outlined",...e,children:o.jsxRuntimeExports.jsx(Z.y4.Close,{"aria-label":"clear"})}),ft=({onChange:e,value:t,entryRenderKey:n="key",data:s,inputProps:r,allowNone:i=!0,searcher:l,className:c,variant:a="button",hideColumnHeader:x=!1,disabled:d,children:p,dropdownVariant:m="connected",placeholder:f=zs,inputPlaceholder:h=f,triggerTooltip:j,dropdownZIndex:y,filter:S,actions:w,...E})=>{const{visible:C,open:N,close:T,toggle:P}=Ke.use(),[D,I]=g.useState(null),z=l!=null;Q.useAsyncEffect(async()=>{if(Ce.selectValueIsZero(t))return I(null);if((D==null?void 0:D.key)===t)return;let k=null;if(z)try{[k]=await l.retrieve([t])}finally{k??(k=null)}else s!=null&&(k=s.find(v=>v.key===t)??null);I(k)},[l,t,s]);const F=g.useCallback((k,v)=>{Array.isArray(k)||(I(k==null?null:v.entries[0]),T(),e(k,v))},[e,i]),O=g.useMemo(()=>z?Mt.Search:Mt.Filter,[z]),M=o.jsxRuntimeExports.jsx(O,{searcher:l,filter:S,children:({onChange:k})=>o.jsxRuntimeExports.jsx(Uh,{...r,autoFocus:m==="modal",variant:a,onChange:k,onFocus:N,selected:D,entryRenderKey:n,visible:C,allowNone:i,className:c,dropdownVariant:m,disabled:d,placeholder:h,children:w})}),R=o.jsxRuntimeExports.jsx(ge.Button,{tooltip:j,variant:"outlined",onClick:P,disabled:d,children:D!=null?ec(n,D):f});return o.jsxRuntimeExports.jsx(ur,{close:T,zIndex:y,data:s,allowMultiple:!1,visible:C,value:t,hideColumnHeader:x,onChange:F,allowNone:i,listItem:p,variant:m,trigger:m!=="modal"?M:R,extraDialogContent:m==="modal"?M:void 0,keepMounted:!1,...E})},zs="Select",ec=(e,t)=>t==null?"":typeof e=="function"?e(t):t[e].toString(),Uh=({entryRenderKey:e,selected:t,visible:n,onChange:s,onFocus:r,allowNone:i=!0,placeholder:l=zs,className:c,disabled:a,dropdownVariant:x,children:d,...p})=>{const{clear:m}=Ce.useSelectionUtils(),[f,h]=g.useState("");g.useEffect(()=>{if(!n){if(fe.w$1(t==null?void 0:t.key))return h("");t!=null&&h(ec(e,t))}},[t,n,e]);const j=C=>{s(C),h(C)},y=()=>{f===""&&s(""),h(""),r==null||r()},S=C=>{n||(C.preventDefault(),r==null||r())},w=()=>{h(""),m==null||m()};let E;return x!=="modal"&&(E=o.jsxRuntimeExports.jsx(zn.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:n})),o.jsxRuntimeExports.jsxs(mt.Text,{className:u.CSS(u.CSS.BE("select","input"),c),value:f,onChange:j,onFocus:y,onKeyDown:ze.matchCallback([["Enter"]],C=>{C.preventDefault(),!n&&(r==null||r())}),endContent:E,style:{flexGrow:1},onClick:S,placeholder:l,disabled:a,...p,children:[d,i&&o.jsxRuntimeExports.jsx(Ql,{onClick:w,disabled:a})]})},kn=({children:e="",size:t="medium",color:n,icon:s,onClose:r,className:i,onDragStart:l,...c})=>{const a=u.cssString(n);s==null&&n!=null&&(s=o.jsxRuntimeExports.jsx(Z.y4.Circle,{fill:a}));const x=r==null?void 0:o.jsxRuntimeExports.jsx(ge.Icon,{"aria-label":"close",size:"small",className:u.CSS.BE("tag","close"),shade:1,sharp:!0,onClick:d=>{d.stopPropagation(),r()},children:o.jsxRuntimeExports.jsx(Z.y4.Close,{})});return o.jsxRuntimeExports.jsx(Ls.WithIcon,{startIcon:s,endIcon:x,className:u.CSS(i,u.CSS.B("tag"),u.CSS.size(t),r!=null&&u.CSS.BM("tag","closeable")),level:st.ComponentSizeLevels[t],noWrap:!0,align:"center",size:"small",onDragStart:l,...c,children:e})},Jh=Object.freeze(Object.defineProperty({__proto__:null,Tag:kn},Symbol.toStringTag,{value:"Module"})),xr=({entryKey:e,entryRenderKey:t,entry:n,loading:s,...r})=>{let i=e;return n!=null&&(i=typeof t=="function"?t(n):n[t]),g.createElement(kn,{size:"small",variant:"outlined",className:u.CSS(n==null&&!s&&u.CSS.BEM("select-multiple","tag","invalid")),draggable:!0,...r,key:e.toString()},fe.$e(i))},Qh=ge.componentRenderProp(xr),an=({onChange:e,value:t,className:n,data:s,columns:r=[],entryRenderKey:i="key",emptyContent:l,searcher:c,renderTag:a=Qh,placeholder:x,onTagDragStart:d,allowMultiple:p,allowNone:m,replaceOnSingle:f,onTagDragEnd:h,style:j,addPlaceholder:y="Add",children:S,dropdownVariant:w="connected",actions:E,...C})=>{const{visible:N,open:T,close:P}=Ke.use(),[D,I]=g.useState([]),[z,F]=g.useState(!1),O=c!=null;Q.useAsyncEffect(async()=>{F(!0),Ce.selectValueIsZero(t)&&I([]);const _=D.map(V=>V.key),A=_e.A(t);if(fe.F.unorderedPrimitiveArrays(_,A)===fe.F.EQUAL)return;let $=[];if(O)try{$=await c.retrieve(A)}finally{F(!1)}else s!=null&&($=s.filter(V=>A.includes(V.key)));I($)},[c,O,t,s]);const M=g.useCallback((_,A)=>{_!=null&&(I(A.entries),e(_e.A(_),A))},[e]),R=g.useMemo(()=>O?Mt.Search:Mt.Filter,[O]);let k,v;if(w==="connected")v=o.jsxRuntimeExports.jsx(R,{searcher:c,children:({onChange:_,value:A})=>o.jsxRuntimeExports.jsx(e1,{dropdownVariant:w,value:A,selectedKeys:t,className:n,onChange:_,loading:z,selected:D,onFocus:T,entryRenderKey:i,visible:N,renderTag:a,placeholder:x,onTagDragStart:d,onTagDragEnd:h,style:j,children:E})});else{const _=_e.A(t);v=o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",grow:!0,style:j,size:"small",children:[_.map(A=>{const $=D.find(V=>V.key===A);return a({key:A,entryKey:A,entryRenderKey:i,loading:z,entry:$,onClose:()=>{const V=_.filter(H=>H!==A);e(V,{clicked:null,clickedIndex:-1,entries:[]})},onDragStart:V=>d==null?void 0:d(V,A),onDragEnd:V=>h==null?void 0:h(V,A)})}),_.length>0?o.jsxRuntimeExports.jsx(ge.Icon,{onClick:T,children:o.jsxRuntimeExports.jsx(Z.y4.Add,{style:{color:"var(--pluto-gray-l9)"}})}):o.jsxRuntimeExports.jsx(ge.Button,{onClick:T,shade:0,textShade:9,startIcon:o.jsxRuntimeExports.jsx(Z.y4.Add,{}),variant:"text",children:y})]}),k=o.jsxRuntimeExports.jsx(R,{searcher:c,children:A=>o.jsxRuntimeExports.jsx(mt.Text,{autoFocus:!0,placeholder:"Search",...A,children:E})})}return o.jsxRuntimeExports.jsx(ur,{close:P,data:s,emptyContent:l,visible:N,value:t,onChange:M,allowNone:m,replaceOnSingle:f,columns:r,allowMultiple:!0,listItem:S,trigger:v,extraDialogContent:k,variant:w,...C})},e1=({selectedKeys:e,loading:t,selected:n,onChange:s,onFocus:r,visible:i,entryRenderKey:l,renderTag:c,placeholder:a=zs,onTagDragStart:x,onTagDragEnd:d,value:p,className:m,children:f,dropdownVariant:h,...j})=>{const{onSelect:y,clear:S}=Ce.useSelectionUtils(),w=g.useRef(null);g.useLayoutEffect(()=>{var P;i&&((P=w.current)==null||P.focus())},[i,n]);const E=()=>{i||s(""),r==null||r()},C=()=>{i||r==null||r()},N=()=>{i||s("")};let T;return h!=="modal"&&(T=o.jsxRuntimeExports.jsx(zn.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:i})),o.jsxRuntimeExports.jsxs(mt.Text,{ref:w,className:u.CSS(u.CSS.BE("select-multiple","input"),u.CSS.visible(i),m),onBlur:N,placeholder:a,value:p,onChange:s,onFocus:E,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",onClick:C,endContent:T,variant:"button",...j,children:[o.jsxRuntimeExports.jsx(ne.Space,{x:!0,className:u.CSS.BE("select-multiple","tags"),align:"center",grow:!0,size:"small",children:_e.A(e).map(P=>{const D=n.find(I=>I.key===P);return c({key:P,entryKey:P,entryRenderKey:l,loading:t,entry:D,onClose:()=>y==null?void 0:y(P),onDragStart:I=>x==null?void 0:x(I,P),onDragEnd:I=>d==null?void 0:d(I,P)})})}),f,o.jsxRuntimeExports.jsx(Ql,{onClick:S})]})},t1=[{key:"h2",label:"XL"},{key:"h3",label:"L"},{key:"h4",label:"M"},{key:"h5",label:"S"},{key:"small",label:"XS"}],un=e=>o.jsxRuntimeExports.jsx(it,{...e,data:t1,entryRenderKey:"label"}),n1=[{key:600,label:"Bold"},{key:500,label:"Medium"},{key:400,label:"Normal"},{key:250,label:"Light"}],tc=e=>o.jsxRuntimeExports.jsx(it,{...e,data:n1,entryRenderKey:"label"}),s1=Object.freeze(Object.defineProperty({__proto__:null,Level:un,Weight:tc},Symbol.toStringTag,{value:"Module"})),o1=Object.freeze(Object.defineProperty({__proto__:null,BaseButton:Kl,Button:it,ComponentSize:Xl,DEFAULT_PLACEHOLDER:zs,DataType:Gh,Direction:Jl,DropdownButton:As,Multiple:an,MultipleTag:xr,Single:ft,Text:s1,TextAlignment:Is,defaultButton:ql},Symbol.toStringTag,{value:"Module"})),r1=11,i1=6,l1=2,si=5,c1=e=>u.$t.width(e)<si&&u.$t.height(e)<si,En=e=>{const t=u.$t.width(e),n=u.$t.height(e);return Math.min(t,n)<.001?r1:i1},a1=["zoom","pan","select","zoomReset","cancel"],Cn=[...a1,"click"],u1=xe.z.enum(Cn),nc=["zoom","select"],yn={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},sc={defaultMode:"pan",pan:[["MouseLeft"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},oc={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]],cancel:[["Escape"]]},dr={zoom:yn,pan:sc,select:oc,zoomReset:yn,click:yn,cancel:yn},x1=e=>{const t=Object.entries(e);return Object.fromEntries(t.map(([n,s])=>n==="defaultMode"?[n,s]:[n,s.map(r=>r.filter(i=>i!=="MouseLeft")).filter(r=>r.length>0)]))},d1=u.$t.construct(0,0,1,1,u.K.TOP_LEFT),p1={width:30,height:50},rc=({onChange:e,triggers:t,initial:n=d1,threshold:s=p1,ref:r})=>{const i=(t==null?void 0:t.defaultMode)??"zoom",[l,c]=g.useState(u.$t.ZERO),[a,x]=g.useState(i),[d,p]=Z.useStateRef(n),m=g.useRef(u.J.ZERO),f=g.useRef(null),h=u._.construct(s);g.useEffect(()=>p(()=>u.$t.truncate(n,En(n))),[n]),g.useEffect(()=>x(i),[i]);const[j,y,S,w]=Te.useMemoCompare(()=>{const D={...dr[i],...t},I=ze.flattenConfig(D),z=x1(D);return[D,I,z,ze.flattenConfig(z)]},ze.compareModeConfigs,[t]),E=g.useCallback(({box:D,triggers:I,stage:z,cursor:F})=>{if(f.current==null)return;const O=ze.determineMode(j,I),M=u.$t.construct(f.current);if(O==null)return;if(O==="cancel"){c(u.$t.ZERO),e==null||e({box:d.current,mode:O,stage:z,cursor:F});return}if(O==="zoomReset")return c(u.$t.ZERO),e==null||e({box:u.$t.DECIMAL,mode:O,stage:z,cursor:F}),p(u.$t.DECIMAL);const R=c1(D);if(z==="end"){if(R){O==="zoom"&&c(u.$t.ZERO),e==null||e({box:d.current,mode:"click",stage:z,cursor:F});return}return p(v=>{if(O==="pan"){const A=oi(D,v,M);return A===null||u.$t.equals(A,v)?v:(e==null||e({box:A,mode:O,stage:z,cursor:F}),A)}const _=C(D,v,M);return _===null?v:(e==null||e({box:_,mode:O,stage:z,cursor:F}),O==="zoom"?(c(u.$t.ZERO),_):u.$t.truncate(v,En(v)))})}if(nc.includes(O))return R?void 0:c(u.b.XY.scale(M).clamp(M).translate({x:-u.$t.left(M),y:-u.$t.top(M)}).box(ri(h,D,M)));if(c(v=>u.$t.areaIsZero(v)?v:u.$t.ZERO),u.J.distance(F,m.current)<l1)return;m.current=F;const k=oi(D,d.current,M);e==null||e({box:k,mode:O,stage:z,cursor:F})},[c,x,e,j,s.height,s.width,p,f,En]);g.useImperativeHandle(r,()=>({reset:()=>{c(u.$t.ZERO),p(u.$t.DECIMAL),e==null||e({box:u.$t.DECIMAL,mode:"zoomReset",stage:"start",cursor:u.J.ZERO})}}),[e]);const C=g.useCallback((D,I,z)=>{const F=Po(I,z).box(ri(h,D,z));return u.$t.truncate(F,En(F))},[s]),N=ze.useHeldRef({triggers:[["Control"]]}),T=ze.useHeldRef({triggers:[["Alt"]]});g.useEffect(()=>{const D=I=>{if(f.current==null)return;let z=1;I.deltaY<0?z-=.035:z+=.035;const F=u.$t.construct(f.current),O=u.J.construct(I);if(Array.from(f.current.children).push(f.current),!u.$t.contains(F,O)||f.current!==I.target&&Ke.findParent(I.target,A=>A===f.current)==null)return;const k=Po(d.current,u.$t.construct(f.current)).pos(u.J.construct(I));let _=u.b.XY.magnify({x:N.current.held?1:z,y:T.current.held?1:z}).box(d.current);_=u.$t.translate(_,{x:N.current.held?0:k.x*(1-z),y:T.current.held?0:k.y*(1-z)}),p(_),e==null||e({stage:"end",box:_,cursor:u.J.construct(I),mode:"zoom"})};return window.addEventListener("wheel",D),()=>window.removeEventListener("wheel",D)},[p,e]),yl.useDrag({bound:f,onDrag:E,triggers:y,loose:!0});const P=g.useCallback(({triggers:D,stage:I})=>{if(I==="end")return x(i);const z=ze.determineMode(S,D);z!=null&&x(z)},[S,i,e]);return ze.use({triggers:w,callback:P,region:f}),{maskBox:l,ref:f,mode:a}},Po=(e,t)=>u.b.XY.scale(t).clamp(t).scale(e),oi=(e,t,n)=>{let s=u.$t.signedDims(Po(t,n).box(e));s={signedWidth:-s.signedWidth,signedHeight:-s.signedHeight};const r=u.b.XY.translate(u.J.construct(s)).box(t);return u.$t.truncate(r,En(r))},ri=(e,t,n)=>u.$t.height(t)<=e.height?u.$t.construct(u.$t.left(t),u.$t.top(n),u.$t.width(t),u.$t.height(n)):u.$t.width(t)<=e.width?u.$t.construct(u.$t.left(n),u.$t.top(t),u.$t.width(n),u.$t.height(t)):t,m1=({mode:e,triggers:t})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",children:[o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:u.d.capitalize(e)}),o.jsxRuntimeExports.jsx(ne.Space,{empty:!0,x:!0,align:"center",children:o.jsxRuntimeExports.jsx(Tf.Text,{trigger:t[0],level:"small"})})]}),f1={zoom:o.jsxRuntimeExports.jsx(Z.y4.Zoom,{}),pan:o.jsxRuntimeExports.jsx(Z.y4.Pan,{}),select:o.jsxRuntimeExports.jsx(Z.y4.Selection,{}),zoomReset:o.jsxRuntimeExports.jsx(Z.y4.Expand,{}),click:o.jsxRuntimeExports.jsx(Z.y4.Bolt,{})},h1=({triggers:e,disable:t=["zoomReset","click"],...n})=>{const s=[...t,"cancel"],r=Object.entries(e).filter(([i])=>!s.includes(i)&&Cn.includes(i)).map(([i,l])=>({key:i,icon:f1[i],tooltip:o.jsxRuntimeExports.jsx(m1,{mode:i,triggers:l})})).sort((i,l)=>Cn.indexOf(i.key)-Cn.indexOf(l.key));return o.jsxRuntimeExports.jsx(it,{...n,data:r,entryRenderKey:"icon",children:({title:i,entry:l,...c})=>g.createElement(ge.Icon,{...c,key:l.key,variant:c.selected?"filled":"outlined",size:"small",tooltip:l.tooltip,tooltipLocation:u.K.BOTTOM_LEFT},l.icon)})},g1=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:dr,MASK_MODES:nc,MODES:Cn,Mask:Gl,PAN_DEFAULT_TRIGGERS:sc,SELECT_DEFAULT_TRIGGERS:oc,SelectMode:h1,ZOOM_DEFAULT_TRIGGERS:yn,modeZ:u1,use:rc},Symbol.toStringTag,{value:"Module"})),j1=e=>e==null?null:e.closest(".pluto-line-plot__viewport")??null,ic=({ref:e,children:t,initial:n=u.$t.DECIMAL,onChange:s,...r})=>{const{setViewport:i}=rt("Viewport");g.useLayoutEffect(()=>{i({box:n,mode:"zoom",cursor:u.J.ZERO,stage:"start"})},[i,n]);const l=g.useCallback(a=>{i(a),s==null||s(a)},[s,i]),c=rc({onChange:l,initial:n,ref:e,...r});return o.jsxRuntimeExports.jsx(Gl,{className:u.CSS.BE("line-plot","viewport"),...c,children:t})},E1=Object.freeze(Object.defineProperty({__proto__:null,Floating:lr,Legend:Zl,Line:ar,LinePlot:Dl,Title:Wl,Tooltip:zh,Viewport:ic,XAxis:Ol,YAxis:Vl,axisFactory:sr,selectViewportEl:j1,useContext:rt,useGridEntry:Dn,useViewport:Bl},Symbol.toStringTag,{value:"Module"})),y1=({aetherKey:e,...t})=>(Q.use$1({aetherKey:e,type:B.Annotation.TYPE,schema:B.annotationStateZ,initialState:t}),null),lc=({aetherKey:e,menu:t,...n})=>{const s=Q.useUniqueKey(e),{setViewport:r,setHold:i}=rt("Range.Provider"),[,{hovered:l,count:c},a]=Q.use$1({aetherKey:s,type:B.Provider$1.TYPE,schema:B.providerStateZ,initialState:{...n,cursor:null,hovered:null,count:0}}),x=Dn({key:s,loc:"top",size:c>0?32:0,order:3},"Annotation.Provider"),d=kt.useContextMenu(),p=Z.useSyncedRef(d.visible),m=g.useCallback(f=>{const h=y=>{a(S=>({...S,cursor:{x:y.clientX,y:y.clientY}}))},j=f.currentTarget;j.addEventListener("mousemove",h),j.addEventListener("mouseleave",()=>{j.removeEventListener("mousemove",h),p.current||a(y=>({...y,cursor:null}))},{once:!0})},[a]);return o.jsxRuntimeExports.jsx(kt.ContextMenu,{style:{...x,cursor:l!=null?"pointer":"default"},...d,menu:()=>t==null||l==null?null:t(l),children:o.jsxRuntimeExports.jsx(ne.Space,{style:{width:"100%",height:"100%"},className:d.className,onClick:()=>{l!=null&&(r({box:u.$t.construct({x:l.viewport.lower,y:0},{x:l.viewport.upper,y:1}),mode:"zoom",cursor:u.J.ZERO,stage:"start"}),i(!0))},onMouseEnter:m})})},S1=Object.freeze(Object.defineProperty({__proto__:null,Annotation:y1,Provider:lc},Symbol.toStringTag,{value:"Module"})),cc={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},R1=ze.flattenConfig(cc),ac=({aetherKey:e})=>{const t=Q.useUniqueKey(e),[,,n]=Q.use$1({aetherKey:t,type:B.Measure.TYPE,schema:B.measureStateZ,initialState:{hover:null,one:null,two:null}}),s=g.useRef(null),r=ze.useHeldRef({triggers:R1,loose:!0}),i=g.useCallback(({mode:a,cursor:x})=>{if(a==="click"){const d=ze.determineMode(cc,r.current.triggers,{loose:!0});if(["one","two"].includes(d))return n(p=>({...p,[d]:x}));n(d==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??x,two:p.one!==null?x:p.two}))}},[n,r]);Bl(i);const l=g.useCallback(a=>n(x=>({...x,hover:u.J.construct(a)})),[n]),c=g.useCallback(()=>{n(a=>({...a,hover:null}))},[n]);return g.useEffect(()=>{if(s.current===null)return;const a=s.current.parentElement;if(a!=null)return a.addEventListener("mousemove",l),a.addEventListener("mouseleave",c),()=>{a.removeEventListener("mousemove",l),a.removeEventListener("mouseleave",c)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:s})},C1=Object.freeze(Object.defineProperty({__proto__:null,Measure:ac},Symbol.toStringTag,{value:"Module"})),pr=({aetherKey:e,label:t,position:n,onLabelChange:s,onPositionChange:r,onUnitsChange:i,units:l="",color:c,lineWidth:a,lineDash:x,className:d,onSelect:p,style:m,...f})=>{const[h,j]=st.usePurePassthrough({value:t,onChange:s,initial:""}),y=Z.useSyncedRef(r),[,{pixelPosition:S},w]=Q.use$1({aetherKey:e,type:B.Rule.TYPE,schema:B.ruleStateZ,initialState:{color:c,dragging:!1,position:n,lineWidth:a,lineDash:x},onAetherChange:g.useCallback(({position:M})=>{var R;M!=null&&((R=y.current)==null||R.call(y,M))},[y])}),E=g.useRef(S);S!==E.current&&(E.current=S);const{id:C}=rt("Rule"),N=document.getElementById(C),T=N==null?void 0:N.querySelector(".pluto-line-plot__viewport"),P=g.useRef(S);g.useEffect(()=>{w(M=>({...M,position:n,color:c,lineWidth:a,lineDash:x}))},[n,c,a,x]);const D=qe.useCursorDrag({onStart:g.useCallback(()=>{p==null||p(),w(M=>({...M,dragging:!0})),P.current=E.current},[]),onMove:M=>{w(R=>({...R,pixelPosition:(P.current??0)+u.$t.signedHeight(M)}))},onEnd:g.useCallback(()=>{w(M=>({...M,dragging:!1})),P.current=S},[])}),I=g.useRef(null);if(n==null||S==null)return null;const F=new u.Color(c).pickByContrast("#000000","#ffffff"),O=o.jsxRuntimeExports.jsxs("div",{ref:I,className:u.CSS.B("rule"),style:{top:`calc(${S}px - 0.5rem)`},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("rule","drag-handle"),onDragStart:D,draggable:!0}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",className:u.CSS(d,u.CSS.BE("rule","tag")),bordered:!0,onClick:p,size:1,rounded:!0,style:{borderColor:u.cssString(c),backgroundColor:new u.Color(c).setAlpha(.7).hex,...m},...f,children:[o.jsxRuntimeExports.jsx(Z.Editable,{className:u.CSS.B("label"),level:"small",value:h,onChange:j,color:F}),o.jsxRuntimeExports.jsx(Ls.Divider,{y:!0,style:{borderColor:u.cssString(c)}}),o.jsxRuntimeExports.jsxs(ne.Space,{size:"small",x:!0,align:"center",children:[o.jsxRuntimeExports.jsx(Z.Editable,{value:n.toFixed(2),onChange:M=>{const R=Number(M);isFinite(R)&&(r==null||r(R))},level:"small",color:F}),o.jsxRuntimeExports.jsx(Z.MaybeEditable,{level:"small",color:F,value:l,onChange:i})]})]})]});return T==null?O:Sl.createPortal(O,T)},b1=Object.freeze(Object.defineProperty({__proto__:null,Rule:pr},Symbol.toStringTag,{value:"Module"})),uc=me.canDropOfType(ot),w1=({lines:e,axes:t,showTitle:n=!0,title:s="",onTitleChange:r,showLegend:i=!0,legendPosition:l,onLegendPositionChange:c,titleLevel:a="h4",onLineChange:x,onRuleChange:d,onAxisChannelDrop:p,onAxisChange:m,rules:f,enableTooltip:h=!0,enableMeasure:j=!1,initialViewport:y=u.$t.DECIMAL,legendVariant:S,onViewportChange:w,viewportTriggers:E,annotationProvider:C,onSelectRule:N,children:T,...P})=>{var O;const D=t.filter(({location:M})=>u.K.isY(M)),I=g.useRef(null),z=Z.usePrevious(e.length),F=Z.usePrevious(P.hold);return(z===0&&e.length!==0||F===!0&&P.hold===!1)&&((O=I.current)==null||O.reset()),o.jsxRuntimeExports.jsxs(Dl,{...P,children:[D.map((M,R)=>{const k=e.filter(A=>A.axes.x===M.key),v=t.filter(({location:A})=>u.K.isX(A)),_=f==null?void 0:f.filter(A=>[...v.map(({key:$})=>$),M.key].includes(A.axis));return o.jsxRuntimeExports.jsx(v1,{axis:M,index:R,lines:k,yAxes:v,rules:_,onAxisChannelDrop:p,onAxisChange:m,annotationProvider:C,onRuleChange:d,onSelectRule:N},M.key)}),i&&o.jsxRuntimeExports.jsx(Zl,{onLineChange:x,position:l,onPositionChange:c,variant:S}),n&&o.jsxRuntimeExports.jsx(Wl,{value:s,onChange:r,level:a}),o.jsxRuntimeExports.jsxs(ic,{initial:y,onChange:w,triggers:E,ref:I,children:[h&&o.jsxRuntimeExports.jsx(Yl,{}),j&&o.jsxRuntimeExports.jsx(ac,{}),T]})]})},v1=({yAxes:e,lines:t,index:n,rules:s,onRuleChange:r,onSelectRule:i,onAxisChannelDrop:l,onAxisChange:c,axis:{location:a,key:x,showGrid:d,...p},annotationProvider:m})=>{const f=me.useDrop({type:"Channel.LinePlot.XAxis",canDrop:uc,onDrop:g.useCallback(({items:y})=>{const S=me.filterByType(ot,y);return l==null||l(x,S.map(({key:w})=>w)),S},[x,l])}),h=s==null?void 0:s.filter(y=>y.axis===x),j=me.useDraggingState();return o.jsxRuntimeExports.jsxs(Ol,{...p,...f,location:a,showGrid:d??n===0,className:u.CSS(u.CSS.dropRegion(me.canDropOfType(ot)(j))),onAutoBoundsChange:y=>c==null?void 0:c({key:x,bounds:y}),children:[e.map((y,S)=>{const w=t.filter(C=>C.axes.y===y.key),E=s==null?void 0:s.filter(C=>C.axis===y.key);return o.jsxRuntimeExports.jsx(M1,{axis:{...y,showGrid:d??(n===0&&S===0)},lines:w,rules:E,onRuleChange:r,onAxisChannelDrop:l,onAxisChange:c,onSelectRule:i},y.key)}),h==null?void 0:h.map(y=>g.createElement(pr,{aetherKey:y.key,...y,key:y.key,onLabelChange:S=>r==null?void 0:r({key:y.key,label:S}),onPositionChange:S=>r==null?void 0:r({key:y.key,position:S}),onUnitsChange:S=>r==null?void 0:r({key:y.key,units:S}),onSelect:()=>i==null?void 0:i(y.key)})),o.jsxRuntimeExports.jsx(lc,{...m})]})},k1=({channels:{x:e,y:t}})=>`${e??0}-${t}`,M1=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:s,onAxisChange:r,axis:{key:i,location:l,...c},onSelectRule:a})=>{const x=me.useDrop({type:"Channel.LinePlot.YAxis",canDrop:uc,onDrop:g.useCallback(({items:p})=>{const m=me.filterByType(ot,p);return s==null||s(i,m.map(({key:f})=>f)),m},[i,s])}),d=me.useDraggingState();return o.jsxRuntimeExports.jsxs(Vl,{...c,...x,location:l,className:u.CSS(u.CSS.dropRegion(me.canDropOfType(ot)(d))),onAutoBoundsChange:p=>r==null?void 0:r({key:i,bounds:p}),children:[e.map(p=>o.jsxRuntimeExports.jsx(_1,{line:p},k1(p))),t==null?void 0:t.map(p=>g.createElement(pr,{aetherKey:p.key,...p,key:p.key,onLabelChange:m=>n==null?void 0:n({key:p.key,label:m}),onPositionChange:m=>n==null?void 0:n({key:p.key,position:m}),onUnitsChange:m=>n==null?void 0:n({key:p.key,units:m}),onClick:()=>a==null?void 0:a(p.key)}))]})},_1=({line:e})=>e.variant==="static"?o.jsxRuntimeExports.jsx(L1,{line:e}):o.jsxRuntimeExports.jsx(P1,{line:e}),P1=({line:{key:e,timeSpan:t,channels:{x:n,y:s},axes:r,...i}})=>{const{xTelem:l,yTelem:c}=g.useMemo(()=>{const a=Number(t.valueOf())*3,x=B.streamChannelData({timeSpan:t,channel:s,keepFor:a}),d=n!=null&&n!==0;return{xTelem:B.streamChannelData({timeSpan:t,channel:d?n:s,useIndexOfChannel:!d,keepFor:a}),yTelem:x}},[t.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(ar,{aetherKey:e,y:c,x:l,...i})},L1=({line:{timeRange:e,key:t,channels:{x:n,y:s},...r}})=>{const{xTelem:i,yTelem:l}=g.useMemo(()=>{const c=B.channelData({timeRange:e,channel:s}),a=n!=null&&n!==0;return{xTelem:B.channelData({timeRange:e,channel:a?n:s,useIndexOfChannel:!a}),yTelem:c}},[e.start.valueOf(),e.end.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(ar,{aetherKey:t,y:l,x:i,...r})},ii=[{key:"name",name:"Name"},{key:"alias",name:"Alias"},{key:"rate",name:"Rate"},{key:"dataType",name:"Data Type"},{key:"index",name:"Index"},{key:"key",name:"Key"},{key:"isIndex",name:"Is Index"}],xs=({items:e},t)=>{const n=me.filterByType(ot,e);return n.length>0&&!n.every(s=>t.includes(s.key))},xc=["name","alias"],dc=e=>{const t=Ts();return g.useMemo(()=>e.length===0?ii:ii.filter(n=>e.includes(n.key)),[e,t])},pc=e=>{if(e==null)return Z.y4.Channel;if(Qt.nm.isCalculated(e))return Z.y4.Calculation;if(e.isIndex)return Z.y4.Index;const t=new fe.g$1(e.dataType);return t.isInteger?Z.y4.Binary:t.isFloat?Z.y4.Decimal:t.equals(fe.g$1.STRING)?Z.y4.String:t.equals(fe.g$1.JSON)?Z.y4.JSON:Z.y4.Channel},N1=({key:e,...t})=>{const n=pc(t.entry);return o.jsxRuntimeExports.jsx(xr,{icon:o.jsxRuntimeExports.jsx(n,{}),...t},e)},T1=({columns:e=xc,onChange:t,className:n,value:s,searchOptions:r,...i})=>{const l=Xe(),c=Ts(),a=dc(e),x=nr(),d=Te.useMemoDeepEqualProps(r),p=g.useMemo(()=>l==null?void 0:l.channels.newSearcherWithOptions({rangeKey:x,internal:!1,...d}),[l,x,d]),m=l!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:f,onDragEnd:h,...j}=me.useDragAndDrop({type:"Channel.SelectMultiple",canDrop:g.useCallback(C=>xs(C,_e.A(s)),[s]),onDrop:g.useCallback(({items:C})=>{const N=me.filterByType(ot,C);if(N.length===0)return[];const T=fe.c$1.unique([..._e.A(s),...N.map(P=>P.key)]);return t(T,{clickedIndex:null,clicked:null,entries:[]}),N},[t,s])}),y=me.useDraggingState(),S=g.useCallback(({dropped:C})=>{t(_e.A(s).filter(N=>!C.some(T=>T.key===N)),{clickedIndex:null,clicked:null,entries:[]})},[t,s]),w=g.useCallback((C,N)=>f([{key:N,type:ot}],S),[f,S]),E=g.useCallback(C=>c[C.key]??C.name,[c]);return o.jsxRuntimeExports.jsx(an,{className:u.CSS(n,u.CSS.dropRegion(xs(y,_e.A(s)))),value:s,onTagDragStart:w,onTagDragEnd:h,searcher:p,onChange:t,columns:a,emptyContent:m,entryRenderKey:E,renderTag:N1,...j,...i})},zt=({columns:e=xc,onChange:t,value:n,className:s,data:r,searchOptions:i,...l})=>{const c=Xe(),a=Ts(),x=dc(e),d=nr(),p=Te.useMemoDeepEqualProps(i),m=g.useMemo(()=>{if(!(r!=null&&r.length>0))return c==null?void 0:c.channels.newSearcherWithOptions({rangeKey:d,internal:!1,...p})},[c,d,r==null?void 0:r.length,p]),f=c!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),h=g.useId(),j=g.useMemo(()=>({key:h,type:"Channel.SelectMultiple"}),[h]),{startDrag:y,onDragEnd:S,...w}=me.useDragAndDrop({type:"Channel.SelectSingle",canDrop:g.useCallback(T=>xs(T,_e.o(n)),[n]),onDrop:g.useCallback(({items:T})=>{const P=me.filterByType(ot,T);return P.length===0?[]:(t(P[0].key,{clickedIndex:null,clicked:null,entries:[]}),P)},[j,t])}),E=me.useDraggingState(),C=g.useCallback(()=>n!=null&&y([{type:ot,key:n}]),[y,n]),N=g.useCallback(T=>a[T.key]??T.name,[a]);return o.jsxRuntimeExports.jsx(ft,{data:r,className:u.CSS(s,u.CSS.dropRegion(xs(E,_e.o(n)))),value:n,onDragStart:C,onDragEnd:S,onChange:t,searcher:m,columns:x,emptyContent:f,entryRenderKey:N,...w,...l})},$1=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:hh,AliasProvider:$l,LinePlot:w1,SelectMultiple:T1,SelectSingle:zt,resolveIcon:pc,useActiveRange:nr,useAlias:Tl,useAliases:Ts,useContext:cn,useName:$s},Symbol.toStringTag,{value:"Module"})),_t=({path:e,optional:t=!1,onChange:n})=>{const s=ht(),{get:r,bind:i,set:l,setStatus:c}=s,[a,x]=g.useState(r(e,{optional:t}));g.useEffect(()=>(x(r(e,{optional:t})),i({path:e,onChange:x,listenToChildren:!1})),[e,n,i,r]);const d=g.useCallback(f=>{n==null||n(f,{...s,path:e}),l(e,f)},[e,l,n]),p=g.useCallback(f=>c(e,f),[e,c]);if(a==null){if(!t)throw new Error(`Field state is null: ${e}`);return null}let m;return s.mode==="preview"&&(m="preview"),{onChange:d,setStatus:p,variant:m,...a}},mc=(e,t=!1,n)=>{const{get:s,bind:r}=ht(n),[,i]=g.useState(0);return g.useEffect(()=>(i(l=>l+1),r({path:e,onChange:()=>i(l=>l+1)})),[e,r]),s(e,{optional:t})??null},fc=(e,t=!1,n)=>{var l;const{get:s,bind:r}=ht(n),[,i]=g.useState(0);return g.useEffect(()=>(i(c=>c+1),r({path:e,onChange:()=>i(c=>c+1)})),[e,r]),((l=s(e,{optional:t}))==null?void 0:l.value)??null},A1=e=>{var t,n;return((n=(t=mc(e,!0))==null?void 0:t.status)==null?void 0:n.variant)==="success"},I1=({path:e,ctx:t,onChange:n})=>{const s=ht(t);g.useEffect(()=>s.bind({path:e,onChange:r=>n(r,s),listenToChildren:!1}),[e,s])},z1=({path:e,optional:t=!1})=>{const{bind:n,get:s}=ht(),[r,i]=g.useState(s(e,{optional:t}));if(g.useEffect(()=>(i(s(e,{optional:t})),n({path:e,onChange:l=>i({...l,value:fe.we(l.value)}),listenToChildren:!0})),[e,n,s]),r==null&&!t)throw new Error("Field state is null");return(r==null?void 0:r.value)??null},hc=(e,t)=>({add:(n,s)=>{const r=fe.we(e.get(t).value);r.splice(s,0,..._e.A(n)),e.set(t,r,{validateChildren:!1})},push:(n,s)=>{const r=fe.we(e.get(t).value);r.push(..._e.A(n)),s!=null&&r.sort(s),e.set(t,r,{validateChildren:!1})},remove:n=>{const s=e.get(t).value,r=new Set(_e.A(n));e.set(t,s.filter((i,l)=>!r.has(l)))},keepOnly:n=>{const s=e.get(t).value,r=new Set(_e.A(n));e.set(t,s.filter((i,l)=>r.has(l)))},set:n=>e.set(t,st.executeSetter(n,e.get(t).value)),sort:n=>{const s=fe.we(e.get(t).value);s.sort(n),e.set(t,s)}}),B1=({path:e,updateOnChildren:t=!1,ctx:n})=>{const s=ht(n),{bind:r,get:i}=s,[l,c]=g.useState(i(e).value);return g.useEffect(()=>(c(i(e).value),r({path:e,onChange:a=>{c(fe.we(a.value))},listenToChildren:t})),[e,r,i,c]),g.useMemo(()=>({value:l,...hc(s,e)}),[l,s,e])},gc=g.createContext({mode:"normal",bind:()=>()=>{},set:()=>{},reset:()=>{},remove:()=>{},get:()=>({value:void 0,status:{key:"",variant:"success",message:""},touched:!1,required:!1}),validate:()=>!1,validateAsync:()=>Promise.resolve(!1),value:()=>({}),has:()=>!1,setStatus:()=>{},clearStatuses:()=>{},setCurrentStateAsInitialValues:()=>{}}),ht=e=>{const t=g.use(gc);return e??t},li=e=>({key:e,variant:"success",message:""}),D1=e=>e.code===xe.z.ZodIssueCode.custom&&e.params!=null&&"variant"in e.params?e.params.variant:"error",jc=({values:e,sync:t=!1,schema:n,mode:s="normal",onChange:r,onHasTouched:i})=>{const l=Z.useInitializerRef(()=>({state:De.I.copy(e),statuses:new Map,touched:new Set,listeners:new Map,parentListeners:new Map})),c=Z.useSyncedRef(n),a=Z.useSyncedRef(r),x=Z.useSyncedRef(e),d=Z.useSyncedRef(i),p=Ce.useErrorHandler(),m=g.useCallback(()=>{x.current=De.I.copy(l.current.state),S()},[]),f=g.useCallback(({path:M,onChange:R,listenToChildren:k=!1})=>{var $;const{parentListeners:v,listeners:_}=l.current,A=k?v:_;return A.has(M)||A.set(M,new Set),($=A.get(M))==null||$.add(R),()=>{var V;return(V=A.get(M))==null?void 0:V.delete(R)}},[]),h=g.useCallback((M,{optional:R}={optional:!1})=>{const{state:k,statuses:v,touched:_}=l.current,A=De.I.get(k,M,{optional:R});if(A==null)return null;const $={value:A,status:v.get(M)??li(M),touched:_.has(M),required:!1};if(c.current==null)return $;const V=c.current,H=fe.L.getFieldSchema(V,M,{optional:!0});return H==null||($.required=!H.isOptional()),$},[]),j=g.useCallback(M=>{var _;const{touched:R}=l.current,k=R.size===0;R.add(M);const v=R.size===0;k!==v&&((_=d.current)==null||_.call(d,!v))},[]),y=g.useCallback(M=>{var _;const{touched:R}=l.current,k=R.size===0;R.delete(M);const v=R.size===0;k!==v&&((_=d.current)==null||_.call(d,!v))},[]),S=g.useCallback(()=>{var v;const{touched:M}=l.current,R=M.size===0;M.clear();const k=M.size===0;R!==k&&((v=d.current)==null||v.call(d,!k))},[]),w=g.useCallback(M=>{const{state:R,statuses:k,listeners:v,parentListeners:_}=l.current;De.I.remove(R,M),k.delete(M),y(M),v.delete(M),_.delete(M)},[]),E=g.useCallback(M=>{const{statuses:R}=l.current;l.current.state=M??De.I.copy(x.current),N(""),R.clear(),S()},[]),C=g.useCallback(M=>{var v;const{listeners:R}=l.current,k=h(M,{optional:!0});k!=null&&((v=R.get(M))==null||v.forEach(_=>_(k)))},[]),N=g.useCallback(M=>{const{listeners:R,parentListeners:k}=l.current,v=R.get(M);if(M==""&&([...R.keys()].forEach($=>{var H;const V=h($,{optional:!0});V!=null&&((H=R.get($))==null||H.forEach(W=>{W(V)}))}),[...k.keys()].forEach($=>{var H;const V=h($,{optional:!0});V!=null&&((H=k.get($))==null||H.forEach(W=>{W(V)}))})),v!=null){const _=h(M,{optional:!0});_!=null&&v.forEach(A=>{A(_)})}k.forEach((_,A)=>{if(De.I.pathsMatch(M,A)){const V=h(A,{optional:!0});V!=null&&_.forEach(H=>{H(V)})}})},[]),T=g.useCallback((M,R="",k=!0)=>{const{statuses:v,listeners:_}=l.current;if(M.success){const H=[...v.keys()];return v.clear(),H.forEach(W=>C(W)),!0}let A=!0;const $=new Set(M.error.issues.map(H=>H.path.join(".")));let V=(H,W)=>H===W;return k&&(V=(H,W)=>De.I.pathsMatch(H,W)),M.error.issues.forEach(H=>{var oe;const{message:W}=H,ee=H.path.join(".");if(!V(ee,R))return;const te=D1(H);te!=="warning"&&(A=!1),v.set(ee,{key:ee,variant:te,message:W}),j(ee);let se=h(ee,{optional:!0});se??(se={value:void 0,status:v.get(ee)??li(ee),touched:!1,required:!1}),(oe=_.get(ee))==null||oe.forEach(J=>J(se))}),v.forEach((H,W)=>{$.has(W)||(v.delete(W),C(W))}),A},[]),P=g.useCallback((M,R)=>{if(c.current==null)return!0;const{state:k}=l.current,v=c.current.safeParse(k);return T(v,M,R)},[T]),D=g.useCallback(async(M,R)=>{if(c.current==null)return!0;const{state:k}=l.current,v=await c.current.safeParseAsync(k);return T(v,M,R)},[T]),I=g.useCallback((M,R,k={})=>{const v=De.I.get(l.current.state,M,{optional:!0}),{validateChildren:_=!0}=k,{state:A}=l.current,$=De.I.get(x.current,M,{optional:!0});De.I.equal($,R)?y(M):j(M),M.length===0?l.current.state=R:De.I.set(A,M,R),N(M),p(async()=>{var W;let H;try{H=P(M,_)}catch{H=await D(M,_)}(W=a.current)==null||W.call(a,{values:l.current.state,path:M,prev:v,valid:H})},"Failed to validate form")},[]),z=g.useCallback(M=>De.I.has(l.current.state,M),[]),F=g.useCallback((M,R)=>{l.current.statuses.set(M,R),j(M),C(M)},[]),O=g.useCallback(()=>{const{statuses:M}=l.current;M.clear(),M.forEach((R,k)=>C(k))},[]);return g.useEffect(()=>{if(!t)return;const{listeners:M}=l.current;l.current.state=e,M.forEach((R,k)=>{const v=h(k,{optional:!0});v!=null&&R.forEach(_=>_(v))})},[t,e]),g.useMemo(()=>({bind:f,set:I,get:h,mode:s,validate:P,validateAsync:D,value:()=>l.current.state,has:z,remove:w,setStatus:F,clearStatuses:O,reset:E,setCurrentStateAsInitialValues:m}),[f,I,h,P,D,z,w,F,O,E,s,m])},O1=({children:e,...t})=>o.jsxRuntimeExports.jsx(gc,{value:t,children:e}),V1=ge.componentRenderProp(mt.Text),be=({path:e,children:t=V1,label:n,padHelpText:s=!0,visible:r=!0,hideIfNull:i=!1,optional:l,onChange:c,className:a,...x})=>{const d=_t({path:e,optional:l??i,onChange:c}),p=ht();if(d==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n??(n=u.d.capitalize(De.I.element(e,-1))),r=typeof r=="function"?r(d,p):r,!r)return null;const m=d.status.message,{onChange:f,value:h}=d,j={onChange:f,value:h};return d.variant!=null&&(j.variant=d.variant),o.jsxRuntimeExports.jsx(je.Item,{padHelpText:s,helpText:m,helpTextVariant:d.status.variant,label:n,required:d.required,className:u.CSS(a,u.CSS.BE("field",e.split(".").join("-")),u.CSS.M(d.status.variant)),...x,children:t(j)})},Pt=e=>({fieldKey:t,fieldProps:n,inputProps:s})=>{const r=({inputProps:i,path:l,fieldKey:c=t,...a})=>o.jsxRuntimeExports.jsx(be,{...n,...a,path:c?`${l}.${c}`:l,children:x=>o.jsxRuntimeExports.jsx(e,{...x,...s,...i})});return r.displayName=e.displayName,r},Ec=Pt(je.Numeric),We=Ec({}),yc=Pt(mt.Text),mr=yc({}),Sc=Pt(Q.Switch$1),Bs=Sc({}),F1=Pt(ft),H1=Pt(an),Z1=Pt(As),W1=Pt(it),fr=({key:e,open:t,onChange:n})=>{const s=Te.useMemoPrimitiveArray(e);Q.useAsyncEffect(async()=>{if(t==null)return;const r=await t();if(r==null)return;const i=r.onChange(n);return async()=>{i(),await r.close()}},[t==null,s])},Y1=({fetchInitialValue:e,...t})=>{const[n,s]=g.useState(void 0);return Q.useAsyncEffect(async()=>{s(await e())},[e]),fr({...t,onChange:s}),n},G1=Object.freeze(Object.defineProperty({__proto__:null,useListener:fr,useState:Y1},Symbol.toStringTag,{value:"Module"})),K1=({key:e,name:t,queryFn:n,values:s,openObservable:r,applyChanges:i,applyObservable:l,...c})=>{const a=Xe(),x=Ce.useErrorHandler(),d=Te.useMemoPrimitiveArray(e),p=jc({values:s,...c,sync:!1,onChange:h=>{a!=null&&x(async()=>{await(i==null?void 0:i({...h,client:a}))},`Failed to apply changes for ${t}`)}});Q.useAsyncEffect(async()=>{if(a!=null)try{const h=await n({client:a});p.set("",h)}catch(h){x(h,`Failed to retrieve ${t}`)}},[d,a==null?void 0:a.key]);const m=g.useCallback(async()=>{if(a!=null)return await(r==null?void 0:r(a))},[d,a==null?void 0:a.key]),f=g.useCallback(h=>l==null?void 0:l({changes:h,ctx:p}),[d,l]);return fr({key:d,open:m,onChange:f}),p},q1=Object.freeze(Object.defineProperty({__proto__:null,Field:be,Form:O1,NumericField:We,SwitchField:Bs,TextField:mr,buildButtonSelectField:W1,buildDropdownButtonSelectField:Z1,buildNumericField:Ec,buildSelectMultiField:H1,buildSelectSingleField:F1,buildSwitchField:Sc,buildTextField:yc,fieldArrayUtils:hc,fieldBuilder:Pt,use:jc,useChildFieldValues:z1,useContext:ht,useField:_t,useFieldArray:B1,useFieldListener:I1,useFieldState:mc,useFieldValid:A1,useFieldValue:fc,useSynced:K1},Symbol.toStringTag,{value:"Module"})),X1=[{key:"name",name:"Name"},{key:"location",name:"Location",render:({entry:{location:e,rackName:t}})=>o.jsxRuntimeExports.jsx(vl,{level:"small",shade:9,weight:450,style:{marginTop:"0.25rem"},size:"tiny",children:t?`${t}.${e}`:e})}],U1=({searchOptions:e,filter:t,...n})=>{const s=Xe();let r=s==null?void 0:s.hardware.devices;e!=null&&s!=null&&(r=s.hardware.devices.newSearcherWithOptions(e));const[i,l]=g.useState(new Map),c=g.useCallback(a=>((t==null?void 0:t(a))??a).map(d=>({...d,rackName:i.get(d.rack)})),[t,i]);return Q.useAsyncEffect(async()=>{if(s==null){l(new Map);return}const a=await s.hardware.racks.retrieve([]);l(new Map(a.map(({key:x,name:d})=>[x,d])))},[s==null?void 0:s.key]),o.jsxRuntimeExports.jsx(ft,{columns:X1,searcher:r,entryRenderKey:"name",filter:c,...n})},J1=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:U1},Symbol.toStringTag,{value:"Module"})),Q1=[{key:"name",name:"Name"},{key:"location",name:"Location"}],eg=e=>{const t=Xe();return o.jsxRuntimeExports.jsx(ft,{columns:Q1,searcher:t==null?void 0:t.hardware.racks,entryRenderKey:"name",...e})},tg=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:eg},Symbol.toStringTag,{value:"Module"})),en="label",hr=[{key:"color",name:"Color",render:({entry:e})=>o.jsxRuntimeExports.jsx(Z.y4.Circle,{name:"circle",color:e.color,style:{height:"2.5rem",width:"2.5rem"}})},{key:"name",name:"Name"}],ds=({items:e},t)=>{const n=me.filterByType(en,e);return n.length>0&&!n.every(s=>t.includes(s.key))},ng=({entry:e,loading:t,entryKey:n,entryRenderKey:s,...r})=>o.jsxRuntimeExports.jsx(kn,{color:e==null?void 0:e.color,...r,children:e==null?void 0:e.name}),sg=ge.componentRenderProp(ng),og=({onChange:e,className:t,value:n,...s})=>{const r=Xe(),i=r!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:l,onDragEnd:c,...a}=me.useDragAndDrop({type:"Label.SelectMultiple",canDrop:g.useCallback(m=>ds(m,_e.A(n)),[n]),onDrop:g.useCallback(({items:m})=>{const f=me.filterByType(en,m);if(f.length===0)return[];const h=fe.c$1.unique([..._e.A(n),...f.map(j=>j.key)]);return e(h,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),x=me.useDraggingState(),d=g.useCallback(({dropped:m})=>{e(_e.A(n).filter(f=>!m.some(h=>h.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),p=g.useCallback((m,f)=>l([{key:f,type:en}],d),[l,d]);return o.jsxRuntimeExports.jsx(an,{className:u.CSS(t,u.CSS.dropRegion(ds(x,_e.A(n)))),value:n,onTagDragStart:p,onTagDragEnd:c,searcher:r==null?void 0:r.labels,onChange:e,columns:hr,emptyContent:i,renderTag:sg,addPlaceholder:"Label",...a,...s})},Rc=({value:e,onChange:t})=>{const n=Xe(),s=n!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),r=g.useId(),i=g.useMemo(()=>({key:r,type:"Label.SelectMultiple"}),[r]),l=me.useDragAndDrop({type:"Label.SelectSingle",canDrop:g.useCallback(x=>ds(x,_e.o(e)),[e]),onDrop:g.useCallback(({items:x})=>{const d=me.filterByType(en,x);return d.length===0?[]:(t(d[0].key,{clickedIndex:null,clicked:null,entries:[]}),d)},[i,t])}),c=me.useDraggingState(),a=g.useCallback(()=>e!=null&&l.startDrag([{type:en,key:e}]),[l.startDrag,e]);return{emptyContent:s,dragging:c,...l,onDragStart:a,searcher:n==null?void 0:n.labels}},rg=({onChange:e,value:t,className:n,data:s,...r})=>{const{dragging:i,...l}=Rc({value:t,onChange:e});return o.jsxRuntimeExports.jsx(ft,{data:s,className:u.CSS(n,u.CSS.dropRegion(ds(i,_e.o(t)))),value:t,onChange:e,columns:hr,entryRenderKey:"name",...l,...r})},ig=({data:e,value:t,onChange:n,...s})=>{const{dragging:r,...i}=Rc({value:t,onChange:n});return o.jsxRuntimeExports.jsx(ft,{data:e,value:t,onChange:n,columns:hr,entryRenderKey:"name",...i,...s})},lg=Object.freeze(Object.defineProperty({__proto__:null,HAUL_TYPE:en,SelectButton:ig,SelectMultiple:og,SelectSingle:rg},Symbol.toStringTag,{value:"Module"})),Ds=new Error("Tab not found"),cg=new Error("Invalid Mosaic"),ps=(e,t,n="center",s,r)=>{if(e=lt(e),s===void 0)return Lo(e,t);const i=No(e,s);if(n==="center")return i.tabs||(i.tabs=[]),r!==void 0&&r>=0&&r<=i.tabs.length?i.tabs.splice(r,0,t):i.tabs.push(t),i.selected=t.tabKey,e;const l=i.key*2,c=i.key*2+1,a=n==="top"||n==="left"?l:c;if(No(e,a).key!==i.key)return ps(e,t,"center",a);if(i.tabs==null||i.tabs.length===0)return ps(e,t,"center",s);const[x,d,p]=mg(n);if(i.direction=p,i[x]={key:0,tabs:[t],selected:t.tabKey},i[d]={key:0,tabs:i.tabs,selected:i.selected},i.first==null||i.last==null)throw cg;return i.first.key=l,i.last.key=c,i.tabs=void 0,i.size=void 0,i.selected=void 0,e},ag=(e,t,n)=>{var i;e=lt(e);const[s,r]=Bt(e,t);if(s==null||r==null)throw Ds;return r.tabs=(i=r.tabs)==null?void 0:i.map(l=>l.tabKey===t?n(l):l),e},Lo=(e,t)=>(e=lt(e),e.tabs!=null?(e.tabs.push(t),e.selected=t.tabKey,e):(e.first!=null?e.first=Lo(e.first,t):e.last!=null&&(e.last=Lo(e.last,t)),e)),ms=e=>{e=lt(e);const t=[];if(e.tabs!=null&&(e.selected=Ne.resetSelection(e.selected,e.tabs),e.selected!=null&&t.push(e.selected)),e.first!=null){const[n,s]=ms(e.first);e.first=n,t.push(...s)}if(e.last!=null){const[n,s]=ms(e.last);e.last=n,t.push(...s)}return[e,t]},gr=(e,t)=>{var r;e=lt(e);const[,n]=Bt(e,t);if(n==null)return[e,null];n.tabs=(r=n.tabs)==null?void 0:r.filter(i=>i.tabKey!==t),n.selected=Ne.resetSelection(n.selected,n.tabs),e=pg(e);const s=n.selected??fs(e);return[e,s]},fs=e=>e.selected!=null?e.selected:e.first!=null?fs(e.first):e.last!=null?fs(e.last):null,Cc=(e,t)=>{e=lt(e);const[n,s]=Bt(e,t);if(n==null||s==null)throw Ds;return s.selected=t,e},bc=(e,t,n,s,r)=>{e=lt(e);const[i,l]=Bt(e,t);if(i==null||l==null)throw Ds;const[c,a]=gr(e,t);return[ps(c,i,n,s,r),a]},Mn=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=Mn(e.first,t);if(n!=null)return n}if(e.last!=null){const n=Mn(e.last,t);if(n!=null)return n}},wc=(e,t,n)=>{const s=hs(e,t);if(s==null)throw new Error("Node not found");return s.size=n,e},ug=(e,t,n)=>{e=lt(e);const s=Mn(e,t);if(s==null)throw new Error("Tab not found");if(s.tabs==null||s.tabs.length===0)throw new Error("Node has no tabs");const r=s.tabs.findIndex(d=>d.tabKey===t);if(r===-1)throw new Error("Tab not found in node");const i=s.tabs[r];s.tabs=s.tabs.filter(d=>d.tabKey!==t);const l=s.key*2,a={key:s.key*2+1,tabs:[i],selected:i.tabKey},x={key:l,tabs:s.tabs,selected:s.selected};return x.selected=Ne.resetSelection(x.selected,x.tabs),s.direction=n,s.first=x,s.last=a,s.tabs=void 0,s.selected=void 0,e},xg=(e,t)=>{const n=Mn(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},vc=(e,t,n)=>{e=lt(e);const[,s]=Bt(e,t);if((s==null?void 0:s.tabs)==null)throw Ds;return s.tabs=Ne.rename(t,n,(s==null?void 0:s.tabs)??[]),e},dg=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,No=(e,t)=>{const n=hs(e,t);if(n!=null)return n;const s=Math.floor(t/2);return s===0?e:No(e,s)},pg=e=>{let t=!0;for(;t;)[e,t]=To(e);return e=Ao(e,1),e},To=e=>{if(e.first==null||e.last==null)return[e,!1];if(ai(e.first))return[ci(e.last),!0];if(ai(e.last))return[ci(e.first),!0];let t,n;return[e.first,t]=To(e.first),[e.last,n]=To(e.last),[e,t||n]},ci=e=>(e.size=void 0,e),ai=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),Bt=(e,t)=>{if(e.tabs!=null){const l=e.tabs.find(c=>c.tabKey===t);if(l!=null)return[l,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,s]=Bt(e.first,t);if(n!=null&&s!=null)return[n,s];const[r,i]=Bt(e.last,t);return[r,i]},hs=(e,t)=>{if(e.key===t)return e;if(e.first==null||e.last==null)return;const n=hs(e.first,t);return n??hs(e.last,t)},mg=e=>{switch(e){case"top":return["first","last","y"];case"left":return["first","last","x"];case"bottom":return["last","first","y"];case"right":return["last","first","x"];case"center":throw new Error("cannot split a center placed tab")}},lt=e=>De.I.copy(e),gs=(e,t,n=[])=>(n.push(t(e)),e.first!=null&&gs(e.first,t,n),e.last!=null&&gs(e.last,t,n),n),$o=(e,t)=>{t(e),e.first!=null&&$o(e.first,t),e.last!=null&&$o(e.last,t)},Ao=(e,t)=>(e=lt(e),e.key=t,e.first!=null&&(e.first=Ao(e.first,t*2)),e.last!=null&&(e.last=Ao(e.last,t*2+1)),e);class kc{constructor(t={}){nt(this,"parent");nt(this,"stub");nt(this,"el");this.el=document.createElement("div"),Object.entries(t).forEach(([n,s])=>this.el.setAttribute(n,s))}mount(t,n){n!==this.stub&&(this.unmount(null),t.replaceChild(this.el,n),this.parent=t,this.stub=n)}unmount(t){t!=null&&t!==this.stub||this.parent==null||this.stub==null||(this.parent.replaceChild(this.stub,this.el),this.parent=void 0,this.stub=void 0)}}const fg=({node:e})=>{const t=g.createRef(),n=g.useRef(e);return g.useEffect(()=>{const s=t.current;if(s==null)return;const r=s.parentNode;if(r!=null)return e.mount(r,s),()=>{t.current!=null&&e.unmount(t.current)}},[]),g.useEffect(()=>{n.current!=null&&e!==n.current&&(n.current.unmount(t.current),n.current=e);const s=t.current;if(s==null)return;const r=s.parentNode;r!=null&&e.mount(r,s)},[e]),o.jsxRuntimeExports.jsx("div",{ref:t})},Mc=({node:e,children:t})=>Sl.createPortal(t,e.el),hg=Object.freeze(Object.defineProperty({__proto__:null,In:Mc,Node:kc,Out:fg},Symbol.toStringTag,{value:"Module"})),js=g.memo(({root:e,onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,activeTab:l,emptyContent:c,onSelect:a,onClose:x,onRename:d,onReorder:p,contextMenu:m,addTooltip:f,...h})=>{const{tabs:j,direction:y,first:S,last:w,key:E,size:C}=e,N={onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,onClose:x,contextMenu:m,onSelect:a,onRename:d,onReorder:p,activeTab:l,addTooltip:f},T=g.useCallback(([z])=>n(E,z),[n]),{props:P}=Qo({direction:y,onResize:T,count:2,initialSizes:C!=null?[C]:void 0});let D={};E==1&&(D={...h,className:u.CSS(u.CSS.B("mosaic"))});let I;return j!==void 0?I=o.jsxRuntimeExports.jsx(_c,{root:e,emptyContent:c,...D,...N}):S!=null&&w!=null?I=o.jsxRuntimeExports.jsxs(er,{id:`mosaic-${E}`,align:"stretch",...P,...D,children:[o.jsxRuntimeExports.jsx(js,{...N,root:S,onResize:n},S.key),o.jsxRuntimeExports.jsx(js,{...N,root:w,onResize:n},w.key)]}):(I=null,console.warn("Mosaic tree is malformed")),I});js.displayName="Mosaic";const Es="pluto-mosaic-tab-drop",jr="pluto-mosaic-tab-create",gg=(e,t,n)=>{if(me.filterByType(me.FILE_TYPE,t).length>0&&n)return!0;const r=me.filterByType(Es,t).map(c=>c.key),i=e.filter(c=>!r.includes(c.tabKey)).length>0;return me.filterByType(jr,t).length>0||r.length>0&&(i||e.length===0)},_c=g.memo(({root:e,onDrop:t,onCreate:n,activeTab:s,children:r,className:i,onReorder:l,onFileDrop:c,addTooltip:a,...x})=>{const{key:d,tabs:p}=e,[m,f]=g.useState(null),h=c!=null,j=g.useCallback(({items:I})=>gg(p,I,h),[p,h]),y=g.useCallback(({items:I,event:z})=>{if(z==null)return[];const F=Eg(z);f(null);const O=me.filterByType(me.FILE_TYPE,I).length>0,{percents:M}=ui(z),R=p.length===0?"center":xi(M);if(O)return c==null||c(d,R,z),I;const k=me.filterByType(Es,I);if(k.length>0){const _=k.map(({key:A})=>A)[0];t(d,_,R,F)}const v=me.filterByType(jr,I);if(v.length>0){const _=v.map(({key:A})=>A);n==null||n(d,R,_)}return k},[t,p.length]),S=g.useCallback(({event:I})=>{if(I==null)return;const{percents:z,inSelector:F}=ui(I);let O=null;F||(O=p.length===0?"center":xi(z)),f(O)},[p.length]),{startDrag:w,...E}=me.useDragAndDrop({type:"Mosaic",canDrop:j,onDrop:y,onDragOver:S}),C=j(me.useDraggingState()),N=g.useCallback(()=>f(null),[]),T=g.useCallback((I,{tabKey:z})=>{w([{key:z,type:Es,elementID:I.currentTarget.id}])},[w]),P=g.useCallback(()=>n==null?void 0:n(d,"center"),[d]),D=d==1&&p.length==0;return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:o.jsxRuntimeExports.jsxs(Ne.Tabs,{id:`tab-${d}`,tabs:p,className:u.CSS(i,D&&m!=null&&u.CSS.M("drag-over")),onDragLeave:N,selected:e.selected,selectedAltColor:s===e.selected,onDragStart:T,onCreate:P,addTooltip:a,...E,...x,children:[e.selected!=null&&r(p.find(I=>I.tabKey===e.selected)),C&&o.jsxRuntimeExports.jsx("div",{style:{zIndex:1e3,position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),m!=null&&o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("mosaic","mask"),style:jg[m]})]})})});_c.displayName="MosaicTabLeaf";const jg={top:{left:"0%",top:"0%",width:"100%",height:"50%"},bottom:{left:"0%",top:"50%",width:"100%",height:"50%"},left:{left:"0%",top:"0%",width:"50%",height:"100%"},right:{left:"50%",top:"0%",width:"50%",height:"100%"},center:{left:"0%",top:"0%",width:"100%",height:"100%"}},ui=e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,s=e.clientY-t.top;return s<24?{percents:{x:.5,y:.5},inSelector:!0}:{percents:{x:n/t.width,y:s/t.height},inSelector:!1}},Eg=e=>{var n;const t=e.target.closest(".pluto-tabs-selector__btn");if(t!=null)return Array.from(((n=t.parentElement)==null?void 0:n.children)??[]).indexOf(t)},yg=e=>e,Sg=e=>1-e,xi=({x:e,y:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,s]=[yg(e),Sg(e)];if(t>n&&t>s)return"bottom";if(t<n&&t<s)return"top";if(t>n&&t<s)return"left";if(t<n&&t>s)return"right";throw new Error("[bug] - invalid insert position")},Rg=({root:e,onSelect:t,children:n})=>{const s=g.useRef(new Map),r=new Set,i=gs(e,l=>{var c;return(c=l.tabs)==null?void 0:c.map(a=>{let x=s.current.get(a.tabKey);return a==null?null:(x==null&&(x=new kc({style:"width: 100%; height: 100%; position: relative;"}),x.el.addEventListener("click",()=>t==null?void 0:t(a.tabKey)),s.current.set(a.tabKey,x)),r.add(a.tabKey),o.jsxRuntimeExports.jsx(Mc,{node:x,children:n({...a,visible:a.tabKey===l.selected})},a.tabKey))})}).flat().filter(l=>l!=null);return s.current.forEach((l,c)=>!r.has(c)&&s.current.delete(c)),[s,i]},Cg=xe.z.object({key:xe.z.number(),tabs:xe.z.array(Ne.tabZ).optional(),selected:xe.z.string().optional(),direction:u.g.direction.optional(),size:xe.z.number().optional()}),Io=Cg.extend({first:xe.z.lazy(()=>Io).optional(),last:xe.z.lazy(()=>Io).optional()}),bg=({allowRename:e=!1,initialTree:t})=>{const[n,s]=g.useState(t);return g.useEffect(()=>s(ms(t)[0]),[t]),{root:n,onDrop:(x,d,p)=>s(m=>bc(m,d,p,x)[0]),onClose:x=>s(d=>gr(d,x)[0]),onSelect:x=>s(d=>Cc(d,x)),onResize:(x,d)=>s(p=>wc(p,x,d)),onRename:e?(x,d)=>s(p=>vc(p,x,d)):void 0}},wg=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:jr,HAUL_DROP_TYPE:Es,Mosaic:js,autoSelectTabs:ms,canSplit:xg,findSelected:fs,findTabNode:Mn,forEachNode:$o,insertTab:ps,isEmpty:dg,mapNodes:gs,moveTab:bc,nodeZ:Io,removeTab:gr,renameTab:vc,resizeNode:wc,selectTab:Cc,split:ug,updateTab:ag,use:bg,usePortal:Rg},Symbol.toStringTag,{value:"Module"})),vg=({variant:e,className:t,...n})=>o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(t,u.CSS.B("note"),u.CSS.M(e)),align:"stretch",empty:!0,...n}),kg=Object.freeze(Object.defineProperty({__proto__:null,Note:vg},Symbol.toStringTag,{value:"Module"})),mo={Close:o.jsxRuntimeExports.jsxs("svg",{width:"124",height:"124",viewBox:"0 0 124 124",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"88.3883",width:"87",height:"11",transform:"rotate(-45 26.8701 88.3883)",fill:"#7E0508"}),o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"34.6482",width:"11",height:"87",transform:"rotate(-45 26.8701 34.6482)",fill:"#7E0508"})]}),Minimize:o.jsxRuntimeExports.jsx("svg",{width:"87",height:"11",viewBox:"0 0 87 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsxRuntimeExports.jsx("rect",{x:"15",width:"60",height:"11",fill:"#985712"})}),Maximize:o.jsxRuntimeExports.jsxs("svg",{width:"143",height:"143",viewBox:"0 0 143 143",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("path",{d:"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z",fill:"#0B650D"}),o.jsxRuntimeExports.jsx("path",{d:"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z",fill:"#0B650D"})]})},Mg=({disabled:e=[],className:t,focused:n=!0,onMinimize:s,onMaximize:r,onFullscreen:i,onClose:l,...c})=>o.jsxRuntimeExports.jsxs(ne.Space,{size:1.5,x:!0,className:u.CSS(u.CSS.B("macos-controls"),!n&&u.CSS.BM("macos-controls","blurred"),t),...c,children:[o.jsxRuntimeExports.jsx(fo,{onClick:l,className:u.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:mo.Close}),o.jsxRuntimeExports.jsx(fo,{onClick:s,className:u.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:mo.Minimize}),o.jsxRuntimeExports.jsx(fo,{onClick:i,className:u.CSS.BM("macos-control","maximize"),disabled:e.includes("maximize"),children:mo.Maximize})]}),fo=({className:e,disabled:t,color:n,...s})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("macos-control"),u.CSS.disabled(t),e),tabIndex:-1,disabled:t,size:"",...s}),_g=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:s,onFullscreen:r,focused:i,shade:l=2,...c})=>o.jsxRuntimeExports.jsxs(Ns.Pack,{...c,children:[o.jsxRuntimeExports.jsx(ho,{className:u.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),shade:l,children:o.jsxRuntimeExports.jsx(Z.y4.Subtract,{})}),o.jsxRuntimeExports.jsx(ho,{className:u.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),shade:l,children:o.jsxRuntimeExports.jsx(Z.y4.Box,{})}),o.jsxRuntimeExports.jsx(ho,{onClick:s,className:u.CSS.BM("windows-control","close"),disabled:e.includes("close"),shade:l,children:o.jsxRuntimeExports.jsx(Z.y4.Close,{})})]}),ho=({disabled:e=!1,className:t,...n})=>e?null:o.jsxRuntimeExports.jsx(ge.Icon,{className:u.CSS(u.CSS.B("windows-control"),t),tabIndex:-1,...n}),Pc=fe.S.getOS,Pg="Windows",Lg=({forceOS:e,visibleIfOS:t,...n})=>{const s=Pc({force:e,default:Pg});if(t!=null&&t!==s)return null;const r=s==="macOS"?Mg:_g;return o.jsxRuntimeExports.jsx(r,{...n})},Ng=Object.freeze(Object.defineProperty({__proto__:null,Controls:Lg,use:Pc},Symbol.toStringTag,{value:"Module"})),Tg=(e,t)=>{const n=s=>o.jsxRuntimeExports.jsx(e,{...t,...s});return n.displayName=e.displayName,n},$g=Object.freeze(Object.defineProperty({__proto__:null,createComponent:Tg},Symbol.toStringTag,{value:"Module"}));g.createContext({instrumentation:Qt.B.NOOP});const Ag=({children:e,...t})=>{const{path:n}=Q.useUnidirectional({type:B.Provider$2.TYPE,schema:B.providerStateZ$1,state:t});return o.jsxRuntimeExports.jsx(Q.Composite,{path:n,children:e})},Ig="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjUgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",Lc=({children:e})=>{const[{path:t}]=Q.use$1({type:B.BaseProvider.TYPE,schema:B.providerStateZ$2,initialState:{}});return o.jsxRuntimeExports.jsx(Q.Composite,{path:t,children:e})},zg=Object.freeze(Object.defineProperty({__proto__:null,Provider:Lc},Symbol.toStringTag,{value:"Module"})),Bg=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:B.AcquireChannelControl,AuthoritySource:B.AuthoritySource,Chip:B.Chip,Controller:B.Controller$1,Indicator:B.Indicator,Legend:B.Legend,REGISTRY:B.REGISTRY$15,STATUSES:B.STATUSES,SetChannelValue:B.SetChannelValue,StateProvider:B.StateProvider,acquireChannelControl:B.acquireChannelControl,acquireChannelControlPropsZ:B.acquireChannelControlPropsZ,authoritySource:B.authoritySource,authoritySourceProps:B.authoritySourceProps,chipStateZ:B.chipStateZ,controllerStateZ:B.controllerStateZ,indicatorStateZ:B.indicatorStateZ,legendStateZ:B.legendStateZ,setChannelValue:B.setChannelValue,setChannelValuePropsZ:B.setChannelValuePropsZ,stateProviderStateZ:B.stateProviderStateZ,statusZ:B.statusZ,sugaredStateZ:B.sugaredStateZ},Symbol.toStringTag,{value:"Module"})),Dg=e=>{var t,n;switch(e.variant){case"disabled":return((t=e.data)==null?void 0:t.valid)===!0?{message:"Uncontrolled. Click to take control.",chipColor:"var(--pluto-gray-l12)"}:{message:"No channel connected. This element cannot be controlled.",chipColor:"var(--pluto-gray-l7)",disabled:!0};case"error":return{message:"Not controlled by you. Click to take absolute control.",chipColor:"var(--pluto-error-z)"};case"success":return((n=e.data)==null?void 0:n.authority)===Qt.fm.Authority.ABSOLUTE?{message:"You have absolute control. Click to release.",chipColor:"var(--pluto-secondary-z)",buttonStyle:{background:"var(--pluto-secondary-z-30)"}}:{message:"You're in control. Release P&ID to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},Nc=({source:e,sink:t,className:n,...s})=>{const r=Te.useMemoDeepEqualProps({source:e,sink:t}),[,{status:i},l]=Q.use$1({type:B.Chip.TYPE,schema:B.chipStateZ,initialState:{triggered:!1,...r,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:fe.m.now()}}});g.useEffect(()=>{l(m=>({...m,...r}))},[r,l]);const c=g.useCallback(()=>l(m=>({...m,triggered:!m.triggered})),[l]),{message:a,chipColor:x,buttonStyle:d,disabled:p}=Dg(i);return o.jsxRuntimeExports.jsx(ge.Icon,{variant:"text",className:u.CSS(u.CSS.B("control-chip"),n),disabled:p,onClick:c,tooltip:o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:a}),style:d,...s,children:o.jsxRuntimeExports.jsx(Z.y4.Circle,{color:x})})},Tc=g.createContext({needsControlOf:[]}),$c=()=>g.use(Tc),Og=({children:e,onStatusChange:t,...n})=>{const s=Te.useMemoDeepEqualProps(n),[{path:r},{status:i,needsControlOf:l},c]=Q.use$1({type:B.Controller$1.TYPE,schema:B.controllerStateZ,initialState:s});return g.useEffect(()=>{i!=null&&(t==null||t(i))},[i,t]),g.useEffect(()=>{c(a=>({...a,...s}))},[s,c]),g.useEffect(()=>()=>t==null?void 0:t("released"),[]),o.jsxRuntimeExports.jsxs(Tc,{value:{needsControlOf:l},children:[o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:e}),";"]})},Ac=({colorSource:e,statusSource:t})=>{var c;const n=Te.useMemoDeepEqualProps({colorSource:e,statusSource:t}),[,{color:s,status:r},i]=Q.use$1({type:B.Indicator.TYPE,initialState:{...n,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:fe.m.now()}},schema:B.indicatorStateZ});g.useEffect(()=>{i(a=>({...a,...n}))},[n,i]);let l;return((c=r.data)==null?void 0:c.color)!=null?l=u.Color.z.parse(r.data.color):s!=null&&!s.isZero?l=s:l="var(--pluto-gray-l10)",o.jsxRuntimeExports.jsxs(ge.Dialog,{location:{x:"center",y:"bottom"},children:[o.jsxRuntimeExports.jsx(Z.Text,{level:"p",children:r.message}),o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("indicator"),style:{backgroundColor:u.cssString(l),flexGrow:1}})]})},Vg=e=>{const{needsControlOf:t}=$c(),[,{states:n},s]=Q.use$1({type:B.Legend.TYPE,schema:B.legendStateZ,initialState:{states:[],needsControlOf:t}});g.useEffect(()=>{s(l=>({...l,needsControlOf:t}))},[t]);const i=fe.c$1.unique(n.map(l=>l.subject.key)).map(l=>{const c=n.find(a=>a.subject.key===l);if(c==null)throw new Qt.Ze("Legend subject not found");return{key:c.subject.key,label:c.subject.name,color:c.subjectColor}});return o.jsxRuntimeExports.jsx(ir,{data:i,...e})},Ic=({children:e})=>{const[{path:t}]=Q.use$1({type:B.StateProvider.TYPE,schema:B.stateProviderStateZ,initialState:{}});return o.jsxRuntimeExports.jsx(Q.Composite,{path:t,children:e})},Fg=Object.freeze(Object.defineProperty({__proto__:null,Chip:Nc,Controller:Og,Indicator:Ac,Legend:Vg,StateProvider:Ic,useContext:$c},Symbol.toStringTag,{value:"Module"})),zc=e=>{const t=({disabled:n=!1,...s})=>n?s.children:o.jsxRuntimeExports.jsx(e,{...s});return t.displayName=e.displayName,t},Hg=zc(Lc),Zg=zc(Q.Provider$2),Wg=({children:e,connParams:t,workerEnabled:n=!0,workerURL:s,theming:r,tooltip:i,triggers:l,alamos:c,haul:a,channelAlias:x,telem:d,color:p})=>o.jsxRuntimeExports.jsx(ze.Provider,{...l,children:o.jsxRuntimeExports.jsx(ge.Config,{...i,children:o.jsxRuntimeExports.jsx(me.Provider,{...a,children:o.jsxRuntimeExports.jsx(Q.Provider$1,{url:s??Ig,enabled:n,children:o.jsxRuntimeExports.jsx(Zg,{workerKey:"vis",children:o.jsxRuntimeExports.jsx(Ag,{...c,children:o.jsxRuntimeExports.jsx(Ce.Aggregator,{children:o.jsxRuntimeExports.jsx(Ll,{connParams:t,children:o.jsxRuntimeExports.jsx($l,{...x,children:o.jsxRuntimeExports.jsx(qe.Provider,{...p,children:o.jsxRuntimeExports.jsx(Q.Provider,{...r,children:o.jsxRuntimeExports.jsx(Hg,{...d,children:o.jsxRuntimeExports.jsx(Ic,{children:e})})})})})})})})})})})})}),Yg=Object.freeze(Object.defineProperty({__proto__:null,Provider:Wg},Symbol.toStringTag,{value:"Module"})),Gg=({value:e})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress"),children:o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress-bar"),style:{width:`${e}%`}})}),Kg=Object.freeze(Object.defineProperty({__proto__:null,Progress:Gg},Symbol.toStringTag,{value:"Module"})),_n="range",Er=[{key:"name",name:"Name"}],ys=({items:e},t)=>{const n=me.filterByType(_n,e);return n.length>0&&!n.every(s=>t.includes(s.key))},qg=({onChange:e,className:t,value:n,...s})=>{const r=Xe(),i=r!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:l,onDragEnd:c,...a}=me.useDragAndDrop({type:"Ranger.SelectMultiple",canDrop:g.useCallback(m=>ys(m,_e.A(n)),[n]),onDrop:g.useCallback(({items:m})=>{const f=me.filterByType(_n,m);if(f.length===0)return[];const h=fe.c$1.unique([..._e.A(n),...f.map(j=>j.key)]);return e(h,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),x=me.useDraggingState(),d=g.useCallback(({dropped:m})=>{e(_e.A(n).filter(f=>!m.some(h=>h.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),p=g.useCallback((m,f)=>l([{key:f,type:_n}],d),[l,d]);return o.jsxRuntimeExports.jsx(an,{className:u.CSS(t,u.CSS.dropRegion(ys(x,_e.A(n)))),value:n,onTagDragStart:p,onTagDragEnd:c,searcher:r==null?void 0:r.ranges,onChange:e,columns:Er,emptyContent:i,entryRenderKey:"name",...a,...s})},Bc=({value:e,onChange:t})=>{const n=Xe(),s=n!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),r=g.useId(),i=g.useMemo(()=>({key:r,type:"Ranger.SelectMultiple"}),[r]),{startDrag:l,...c}=me.useDragAndDrop({type:"Ranger.SelectSingle",canDrop:g.useCallback(d=>ys(d,_e.o(e)),[e]),onDrop:g.useCallback(({items:d})=>{const p=me.filterByType(_n,d);return p.length===0?[]:(t(p[0].key,{clickedIndex:null,clicked:null,entries:[]}),p)},[i,t])}),a=me.useDraggingState(),x=g.useCallback(()=>e!=null&&l([{type:_n,key:e}]),[l,e]);return{emptyContent:s,dragging:a,...c,onDragStart:x,searcher:n==null?void 0:n.ranges}},Xg=({onChange:e,value:t,className:n,data:s,...r})=>{const{dragging:i,...l}=Bc({value:t,onChange:e});return o.jsxRuntimeExports.jsx(ft,{data:s,className:u.CSS(n,u.CSS.dropRegion(ys(i,_e.o(t)))),value:t,onChange:e,columns:Er,entryRenderKey:"name",...l,...r})},Ug=({data:e,value:t,onChange:n,...s})=>{const{dragging:r,...i}=Bc({value:t,onChange:n});return o.jsxRuntimeExports.jsx(ft,{data:e,value:t,onChange:n,columns:Er,entryRenderKey:"name",...i,...s})},Jg=[{key:"color",name:"Color",width:50,render:e=>o.jsxRuntimeExports.jsx(Z.y4.Circle,{style:{fontSize:10,marginLeft:10,marginRight:30},color:e.entry.color})},{key:"name",name:"Name"}],Qg=e=>{const t=Xe();return o.jsxRuntimeExports.jsx(an,{...e,searcher:t==null?void 0:t.labels,columns:Jg,renderTag:n=>n.entry==null?o.jsxRuntimeExports.jsx(kn,{color:"gray",children:n.entryKey}):o.jsxRuntimeExports.jsx(kn,{color:n.entry.color,children:n.entry.name})})},e0=({timeRange:e,level:t="p",shade:n=9,showSpan:s=!1,labeled:r=!1,...i})=>{const l=new fe.m(e.start),c=l.isToday?"time":"dateTime",a=new fe.m(e.end),x=a.equals(fe.m.MAX),d=a.span(l)<fe.w.DAY?"time":"dateTime",p=l.span(a);let m=o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",size:"small",children:[l.isToday&&o.jsxRuntimeExports.jsx(Z.Text,{level:t,shade:n,weight:450,children:"Today"}),o.jsxRuntimeExports.jsx(Mo.DateTime,{level:t,displayTZ:"local",format:c,shade:n,weight:450,children:l})]}),f=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[x?o.jsxRuntimeExports.jsx(Z.Text,{level:t,children:"Now"}):o.jsxRuntimeExports.jsx(Mo.DateTime,{level:t,displayTZ:"local",format:d,shade:n,weight:450,children:a}),!p.isZero&&s&&o.jsxRuntimeExports.jsxs(Z.Text,{level:t,shade:n,weight:450,children:["(",l.span(a).truncate(fe.w.MILLISECOND).toString(),")"]})]});r&&(m=o.jsxRuntimeExports.jsx(je.Item,{label:"Start",showHelpText:!1,children:m}),f=o.jsxRuntimeExports.jsx(je.Item,{label:"End",showHelpText:!1,children:f}));const h=u.CSS.levelSizeVar(t);return o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,size:"small",className:u.CSS(u.CSS.B("time-range-chip")),align:"center",...i,children:[m,o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{color:"var(--pluto-gray-l9)",style:{width:h,height:h}}),f]})},t0=Object.freeze(Object.defineProperty({__proto__:null,SelectButton:Ug,SelectLabels:Qg,SelectMultiple:qg,SelectSingle:Xg,TimeRangeChip:e0},Symbol.toStringTag,{value:"Module"})),n0=({steps:e,value:t,onChange:n,...s})=>{const r=e.findIndex(i=>i.key===t);return o.jsxRuntimeExports.jsx(ne.Space,{x:!0,align:"center",className:u.CSS.B("steps"),...s,children:e.map((i,l)=>o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsxs(ge.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:l>r,children:[l+1,". ",i.title]},i.key),l!==e.length-1&&o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l10)"}})]},i.key))})},s0=Object.freeze(Object.defineProperty({__proto__:null,Steps:n0},Symbol.toStringTag,{value:"Module"})),o0=({children:e,className:t,visible:n,...s})=>{const[{path:r},,i]=Q.use$1({type:B.Table.TYPE,schema:B.Table.stateZ,initialState:{region:u.$t.ZERO,visible:n}});g.useEffect(()=>{i(c=>({...c,visible:n}))},[n]);const l=Bn(c=>i(a=>({...a,region:c})));return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{ref:l,style:{right:0,bottom:0,position:"absolute",top:6,left:6}}),o.jsxRuntimeExports.jsx("table",{className:u.CSS(u.CSS.B("table"),t),...s,children:o.jsxRuntimeExports.jsx("tbody",{children:o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:e})})})]})},r0=({children:e,className:t,size:n,index:s,onResize:r,onSelect:i,position:l,...c})=>o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),t),...c,children:[r!=null&&o.jsxRuntimeExports.jsx(Oc,{onSelect:i,index:s,value:n,onChange:r,position:l,direction:"y"}),e]}),yr=({ref:e,children:t,className:n,selected:s=!1,...r})=>o.jsxRuntimeExports.jsx("td",{ref:e,...r,className:u.CSS(u.CSS.BE("table","cell"),u.CSS.selected(s),n),children:t}),Dc="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i0=e=>Dc[e],Oc=({value:e,selected:t=!1,index:n,onChange:s,position:r,direction:i="x",onSelect:l})=>{const c=Z.useSyncedRef(e),a=g.useRef(e),x=qe.useCursorDrag({onStart:g.useCallback(()=>{a.current=c.current},[]),onMove:g.useCallback(d=>s(a.current+u.$t.dim(d,i,!0),n),[s,n])});return o.jsxRuntimeExports.jsxs("td",{id:`resizer-${i}-${n}`,className:u.CSS(u.CSS.BE("table","resizer"),u.CSS.dir(i),u.CSS.selected(t),kt.CONTEXT_TARGET,t&&kt.CONTEXT_SELECTED),style:{[u.g.dimension(i)]:e},onClick:()=>l(n),onContextMenu:()=>l(n),children:[o.jsxRuntimeExports.jsx(Z.Text,{level:"p",shade:11,style:{width:"100%",textAlign:"center"},children:i==="x"?Dc[n]:n+1}),o.jsxRuntimeExports.jsx("button",{onClick:d=>d.stopPropagation(),style:{[u.g.location(i)]:r+e},onDragStart:x,draggable:!0})]})},l0=({selected:e,onSelect:t,columns:n,onResize:s})=>{let r=15;return o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),u.CSS.BE("table","col-resizer")),children:[o.jsxRuntimeExports.jsx("td",{}),n.map((i,l)=>{const c=r;return r+=i,o.jsxRuntimeExports.jsx(Oc,{onSelect:t,position:c,selected:e.includes(l),index:l,value:i,onChange:a=>s(a,l),direction:"x"},l)})]})},c0=Object.freeze(Object.defineProperty({__proto__:null,Cell:yr,ColumnIndicators:l0,Row:r0,Table:o0,getCellColumn:i0},Symbol.toStringTag,{value:"Module"})),a0=[{key:"standard",name:"Standard"},{key:"scientific",name:"Scientific"},{key:"engineering",name:"Engineering"}],u0=e=>o.jsxRuntimeExports.jsx(it,{...e,entryRenderKey:"name",data:a0}),Vc=[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],Sr=({path:e})=>{var f;const{value:t,onChange:n}=_t({path:e}),s=B.sourcePipelinePropsZ.parse((f=t.telem)==null?void 0:f.props),r=B.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=B.stringifyNumberProps.parse(s.segments.stringifier.props),l=B.rollingAverageProps.parse(s.segments.rollingAverage.props),c=h=>{const j=B.sourcePipeline("string",{connections:Vc,segments:{valueStream:B.streamChannelValue({channel:r.channel}),stringifier:B.stringifyNumber({precision:i.precision??2,notation:i.notation}),rollingAverage:B.rollingAverage({windowSize:l.windowSize??1}),...h},outlet:"stringifier"});n({...t,telem:j})},a=h=>c({valueStream:B.streamChannelValue({channel:h??0})}),x=h=>c({stringifier:B.stringifyNumber({...i,notation:h})}),d=h=>c({stringifier:B.stringifyNumber({...i,precision:h})}),p=h=>c({rollingAverage:B.rollingAverage({windowSize:h})}),m=$s(r.channel);return g.useEffect(()=>n({...t,tooltip:[m]}),[m]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(je.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(zt,{value:r.channel,onChange:a})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(je.Item,{label:"Notation",children:o.jsxRuntimeExports.jsx(u0,{value:i.notation,onChange:x})}),o.jsxRuntimeExports.jsx(je.Item,{label:"Precision",align:"start",children:o.jsxRuntimeExports.jsx(je.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:d})}),o.jsxRuntimeExports.jsx(je.Item,{label:"Averaging Window",align:"start",children:o.jsxRuntimeExports.jsx(je.Numeric,{value:l.windowSize??1,bounds:{lower:1,upper:100},onChange:p})})]})]})},x0=B.Value.z.partial({color:!0}).extend({level:st.levelZ.optional()}),Rr=({aetherKey:e,box:t,telem:n,color:s,precision:r,minWidth:i,level:l="small",backgroundTelem:c,notation:a,location:x})=>{const d=Te.useMemoDeepEqualProps({box:t,telem:n,color:s,precision:r,level:l,minWidth:i,notation:a,backgroundTelem:c,location:x}),[,p,m]=Q.use$1({aetherKey:e,type:B.Value.TYPE,schema:B.Value.z,initialState:d});return g.useEffect(()=>m(f=>({...f,...d})),[d]),{width:p.width??p.minWidth}},d0=Object.freeze(Object.defineProperty({__proto__:null,TelemForm:Sr,VALUE_CONNECTIONS:Vc,corePropsZ:x0,use:Rr},Symbol.toStringTag,{value:"Module"})),p0=xe.z.object({value:xe.z.string(),level:st.levelZ,weight:st.weightZ,align:u.K.x.or(u.K.center),backgroundColor:u.crudeZ}),m0=({cellKey:e,onChange:t,value:n,selected:s,onSelect:r,align:i,level:l,weight:c,backgroundColor:a})=>{const x=p=>r(e,p),d=p=>t({level:l,value:p,weight:c,align:i,backgroundColor:a});return o.jsxRuntimeExports.jsx(yr,{id:e,className:u.CSS(kt.CONTEXT_TARGET,s&&kt.CONTEXT_SELECTED,u.CSS.BEM("table","cell","text")),selected:s,onClick:x,onContextMenu:x,style:{backgroundColor:u.cssString(a)},children:o.jsxRuntimeExports.jsx(Z.Editable,{level:l,value:n,weight:c,onChange:d,style:{justifyContent:i},allowEmpty:!0,outline:!1})})},f0=xe.z.object({telem:B.stringSourceSpecZ,redline:xe.z.object({bounds:u.G.bounds,gradient:u.gradientZ}),level:st.levelZ,color:xe.z.string(),units:xe.z.string()}),h0=({cellKey:e,telem:t,level:n,color:s,redline:{gradient:r,bounds:i},selected:l,box:c,onSelect:a})=>{const{width:x}=Rr({aetherKey:e,box:c,telem:t,level:n,color:s,backgroundTelem:B.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:t,scale:B.scaleNumber({scale:u.b.Scale.scale(i).scale(0,1).transform}),gradient:B.colorGradient({gradient:r})},outlet:"gradient"}),location:{x:"center",y:"center"}}),d=p=>a(e,p);return o.jsxRuntimeExports.jsx(yr,{id:e,selected:l,onClick:d,onContextMenu:d,style:{height:"5rem",width:x},className:u.CSS(kt.CONTEXT_TARGET,l&&kt.CONTEXT_SELECTED,u.CSS.BEM("table","cell","value"))})},g0=({onVariantChange:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"telem":return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsx(Sr,{path:""})});case"redline":return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsx(j0,{})});default:return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,grow:!0,empty:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(je.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Fc,{onChange:e,value:"value"})}),o.jsxRuntimeExports.jsx(be,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,path:"color",children:({value:r,onChange:i,variant:l,...c})=>o.jsxRuntimeExports.jsx(qe.Swatch,{value:r??u.ZERO.setAlpha(1).rgba255,onChange:a=>i(a.rgba255),...c,bordered:!0})}),o.jsxRuntimeExports.jsx(be,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:r=>o.jsxRuntimeExports.jsx(un,{...r})})]})})}},[]),n=Ne.useStatic({tabs:[{tabKey:"style",name:"Style"},{tabKey:"telem",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],content:t});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...n})},j0=()=>{const{set:e,get:t}=ht(),n=fc("redline.bounds"),s=u.b.Scale.scale(0,1).scale(n);return o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(We,{inputProps:{size:"small",showDragHandle:!1},style:{width:60},label:"Lower",path:"redline.bounds.lower"}),o.jsxRuntimeExports.jsx(be,{path:"redline.gradient",label:"Gradient",align:"start",padHelpText:!1,children:({value:r,onChange:i})=>o.jsxRuntimeExports.jsx(qe.GradientPicker,{value:De.I.copy(r),scale:s,onChange:l=>{const a={...t("redline.bounds").value},x=l.map(j=>j.position),d=s.pos(Math.max(...x)),p=s.pos(Math.min(...x)),m=d>a.upper,f=p<a.lower;m&&(l[l.length-1].position=1,a.upper=d),f&&(l[0].position=0,a.lower=p);const h=l.map(j=>({...j,color:new u.Color(j.color).hex}));m||f?e("redline",{bounds:a,gradient:h}):i(l.map(j=>({...j,color:new u.Color(j.color).hex})))}})}),o.jsxRuntimeExports.jsx(We,{inputProps:{size:"small",showDragHandle:!1},style:{width:60},label:"Upper",path:"redline.bounds.upper"})]})},E0=({onVariantChange:e})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,style:{padding:"2rem"},children:[o.jsxRuntimeExports.jsx(je.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Fc,{onChange:e,value:"text"})}),o.jsxRuntimeExports.jsx(mr,{path:"value",label:"Text"}),o.jsxRuntimeExports.jsx(be,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(un,{...t})}),o.jsxRuntimeExports.jsx(be,{path:"weight",label:"Weight",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(tc,{...t})}),o.jsxRuntimeExports.jsx(be,{path:"align",label:"Alignment",hideIfNull:!0,children:t=>o.jsxRuntimeExports.jsx(Is,{...t})}),o.jsxRuntimeExports.jsx(be,{path:"backgroundColor",label:"Background",align:"start",padHelpText:!1,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(qe.Swatch,{value:t,onChange:n})})]}),y0=[{key:"text",name:"Text"},{key:"value",name:"Value"}],Fc=e=>o.jsxRuntimeExports.jsx(it,{...e,data:y0,allowMultiple:!1,entryRenderKey:"name"}),S0=["text","value"],R0=xe.z.enum(S0),C0={key:"value",name:"Value",Form:g0,Cell:h0,defaultProps:e=>({telem:B.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:B.streamChannelValue({channel:0}),rollingAverage:B.rollingAverage({windowSize:1}),stringifier:B.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"}),redline:{bounds:{lower:0,upper:1},gradient:[]},color:e.colors.gray.l10.hex,level:"h5",units:""}),schema:f0},b0={key:"text",name:"Text",Form:E0,Cell:m0,defaultProps:()=>({value:"",level:"h5",units:"",weight:400,align:"center",backgroundColor:"#00000000"}),schema:p0},w0={text:b0,value:C0},v0=Object.freeze(Object.defineProperty({__proto__:null,CELLS:w0,variantZ:R0},Symbol.toStringTag,{value:"Module"})),di=({sourcePos:e,targetPos:t,next:n,prev:s})=>{const r=Tt(e,...n);return u.J.distance(r,t)<1?!0:(console.warn("Connector is out of sync with target"),console.log("Theoretical target",r),console.log("Actual target",t),console.log("Segments",n),console.log("Prev segments",s),!1)},pi=({sourceStumpTip:e,sourceOrientation:t,sourceBox:n,targetStumpTip:s,targetOrientation:r,targetBox:i})=>{if(!k0({sourcePos:e,sourceOrientation:t,targetPos:s}))return;const l=u.g.construct(t),c=u.g.swap(l);let a=At(c,s[c]-e[c]);const x=u.$t.loc(n,a);if(u.K.swap(t)===r){const d=u.$t.loc(i,u.K.swap(a));Math.abs(x-d)<He&&(a=u.K.swap(a))}return{direction:c,length:x-e[c]+Dt(a,He)}},zo=xe.z.object({direction:u.g.direction,length:xe.z.number()}),Tt=(e,...t)=>{let n=e;for(const s of t)n=u.J.translate(n,s.direction,s.length);return n},Hc=(e,t,n,s)=>{try{let r=e;const i=[e,...t.map(f=>(r=u.J.translate(r,f.direction,f.length),r))];if(!s)return i;const l=t[0],c=At(l.direction,l.length),a=mi(c),x=4*(2-n**.5);i[0]=u.J.translate(i[0],{[l.direction]:-1*a*x,[u.g.swap(l.direction)]:0});const d=t[t.length-1],p=At(d.direction,d.length),m=mi(p);return i[i.length-1]=u.J.translate(i[i.length-1],{[d.direction]:m*x,[u.g.swap(d.direction)]:0}),i}catch{return[]}},He=10,mi=e=>e==="top"||e==="left"?-1:1,Dt=(e,t)=>e==="top"||e==="left"?-t:t,At=(e,t)=>e==="x"?t>0?"right":"left":t>0?"bottom":"top",Ct=e=>At(e.direction,e.length),k0=({sourcePos:e,targetPos:t,sourceOrientation:n})=>{const s=u.g.construct(n),r=t[s]-e[s];return Dt(n,r)<0},qn=e=>({direction:u.g.construct(e),length:Dt(e,He)}),fi={top:qn("top"),bottom:qn("bottom"),left:qn("left"),right:qn("right")},M0=4,_0=.25,Os=e=>Bo(P0(Bo(e))),P0=e=>{const t=[...e],n=e.findIndex((s,r)=>{const i=Math.abs(s.length);if(i<M0){if(r===0||r===e.length-1)return!1;if(i<_0)return!0;if(e.length<=3)return!1;if(r+2<e.length){const l=t[r+2];if(l.direction!==s.direction)return!1;t[r+2]={...l,length:l.length+s.length}}else{const l=t[r-2];if(l.direction!==s.direction)return!1;t[r-2]={...l,length:l.length+s.length}}return!0}return!1});return n!==-1&&t.splice(n,1),t},Bo=e=>{const t=[...e];return e.findIndex((s,r)=>{const i=t[r-1];if(r===0||s.direction!==i.direction)return!1;if(r===1){const l=r-1,c=r,a=Ct(i),x=Ct(s);if(a===x)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(i.length)===He)return!1;const d=Dt(a,He),p=t[l].length-d,m=t[c].length+p;return Math.abs(m)<He?!1:(t[l]={...t[l],length:d},t[c]={...t[c],length:m},!0)}if(r===e.length-1){const l=r,c=r-1,a=Ct(s),x=Ct(i);if(a===x)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(s.length)===He)return!1;const d=Dt(a,He),p=t[l].length-d,m=t[c].length+p;return Math.abs(m)<He?!1:(t[l]={...t[l],length:d},t[c]={...t[c],length:m},!0)}return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0})!==-1?Bo(t):t},qt=e=>Os(L0(e)),L0=({sourceBox:e,targetBox:t,sourcePos:n,targetPos:s,targetOrientation:r,sourceOrientation:i})=>{let l=i,c=r,a={...fi[i]},x=Tt(n,a);const d={...fi[r]};let p=Tt(s,d);const m=Math.abs(x.x-p.x),f=Math.abs(x.y-p.y);m<2*He&&f<10&&(a.length-=m/2,d.length+=m/2,x=Tt(n,a),p=Tt(s,d));const h=[a],j=pi({sourceStumpTip:x,sourceOrientation:i,sourceBox:e,targetStumpTip:p,targetOrientation:r,targetBox:t});j!=null&&(h.push(j),x=Tt(x,j),l=Ct(j),a=j);const y=pi({sourceStumpTip:p,sourceOrientation:c,sourceBox:t,targetStumpTip:x,targetOrientation:l,targetBox:e});y!=null&&(p=Tt(p,y),c=At(y.direction,y.length));const S=()=>{y!=null&&(y.length*=-1,h.push(y)),d.length*=-1,h.push(d)};if(u.K.swap(l)===r){const P=u.g.construct(l),D=(p[P]-x[P])/2;h.push({direction:P,length:D});const I=u.g.swap(P);return h.push({direction:I,length:p[I]-x[I]}),h.push({direction:P,length:D}),S(),h}const w=p[a.direction]-x[a.direction];let E=u.g.swap(a.direction);const C=x[E]-p[E];let N;At(a.direction,w)===l&&At(E,C)===c?N={direction:a.direction,length:w}:(N={direction:E,length:p[E]-x[E]},E=u.g.swap(E)),h.push(N);const T={direction:E,length:p[E]-x[E]};return h.push(T),S(),h},N0=e=>Os(T0(e)),T0=({segments:e,index:t,magnitude:n})=>{const s=[...e],r=s[t],i=u.g.swap(r.direction),l=Ct(r);if(t===0){s.unshift({direction:i,length:n});const c=Dt(l,He);s.unshift({direction:r.direction,length:c}),t+=2,s[t]={...s[t],length:s[t].length-c}}else s[t-1]={direction:s[t-1].direction,length:s[t-1].length+n};if(t===s.length-1){s.push({direction:i,length:-n});const c=Dt(l,He);s.push({direction:r.direction,length:c}),s[t]={...s[t],length:s[t].length-c}}else s[t+1]={direction:s[t+1].direction,length:s[t+1].length-n};return s},$0=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1},A0=(e,t,n=!1,...s)=>{const r=(i,l)=>!s.includes(l)&&t(i,l);return n?$0(e,r):e.findIndex(r)},I0=({delta:e,segments:t})=>Os(Zc(e,t,!1)),z0=({delta:e,segments:t})=>Os(Zc(e,t,!0)),Zc=(e,t,n)=>{let s=[...t];return e.x!==0&&(s=gi("x",e,s,n)),e.y!==0&&(s=gi("y",e,s,n)),s},hi=(e,t,n)=>{if(t.direction!==e)return!1;const s={...t,length:t.length-n[e]},r=Ct(t),i=Ct(s),l=Math.abs(s.length),c=Math.abs(t.length);return(l>c||l>He)&&r===i},gi=(e,t,n,s)=>{const r=u.g.swap(e),i=s?n.length-1:0,l=n[i];if(hi(e,l,t)){const p=n[n.length-1];return p.direction===e&&Math.abs(l.length)<He?(n[n.length-1]={...p,length:p.length-t[e]},n):(n[i]={...l,length:l.length-t[e]},n)}const c=s?0:n.length-1,x=A0(n,p=>p.direction===e,s,i);if(x===c){const p=n[c];return hi(e,p,t)?(n[c]={...p,length:p.length-t[e]},n):(l.direction===e&&Math.abs(l.length)>p.length?n[i]={...l,length:l.length-t[e]}:n[c]={...p,length:p.length-t[e]},n)}if(x===-1)return n.length===1?n[0].direction===e?[{direction:e,length:n[0].length-t[e]}]:[{direction:r,length:n[0].length/2},{direction:e,length:-t[e]},{direction:r,length:n[0].length/2}]:l.direction===e?(n[i]={...l,length:l.length-t[e]},n):[{direction:r,length:n[0].length},{direction:e,length:-t[e]},...n.slice(1)];const d=n[x];return n[x]={...d,length:d.length-t[e]},n},B0=xe.z.object({position:u.J.xy,zoom:xe.z.number()}),Wc=xe.z.object({color:u.crudeZ,variant:xe.z.string().optional(),segments:xe.z.array(zo)}),D0=Wc.extend({key:xe.z.string(),source:xe.z.string(),target:xe.z.string(),segments:xe.z.array(zo),color:u.crudeZ,id:xe.z.string(),data:xe.z.object({segments:xe.z.array(zo),color:u.crudeZ,variant:xe.z.string().optional()}).optional(),selected:xe.z.boolean(),sourceHandle:xe.z.string().nullable().optional(),targetHandle:xe.z.string().nullable().optional()}),O0=xe.z.object({key:xe.z.string(),position:u.J.xy,selected:xe.z.boolean().optional(),zIndex:xe.z.number().optional(),type:xe.z.string().optional(),data:xe.z.record(xe.z.unknown()).optional(),measured:xe.z.object({width:xe.z.number().optional(),height:xe.z.number().optional()}).optional()}),Cr=e=>e.map(t=>({id:t.key,type:"custom",zIndex:t.zIndex,measured:{...t.measured},position:{...t.position},selected:t.selected,data:{}})),br=e=>e.map(({segments:t,color:n,variant:s,...r})=>({...r,id:r.key,data:{segments:t,color:n,variant:s}})),Yc=e=>e.map(t=>({key:t.id,...t})),Gc=(e,t)=>e.map(n=>{var s,r,i;return n.data??(n.data={segments:[],color:t,variant:"pipe"}),{key:n.id,segments:((s=n.data)==null?void 0:s.segments)??[],selected:n.selected??!1,color:((r=n.data)==null?void 0:r.color)??t,variant:((i=n.data)==null?void 0:i.variant)??"pipe",...n}}),Kc=e=>({...e.position,zoom:e.zoom}),qc=e=>({position:u.J.construct(e),zoom:e.zoom}),Xc=(e,t)=>Yc(t(Cr(e))),is=(e,t,n)=>Gc(t(br(e)),n),V0=(e,t="x")=>{if(e.length===0)return[];const n=u.K.construct(t),s=u.K.swap(n);return e.sort((r,i)=>u.$t.loc(r.box,n)-u.$t.loc(i.box,n)),e.forEach((r,i)=>{if(i===0)return;const c=e[i-1].handles.find(f=>f.orientation===s),a=r.handles.find(f=>f.orientation===n);if(c==null||a==null)return;const x=c.absolutePosition,d=a.absolutePosition,p=u.J.set(u.J.translation(d,x),t,0),m=u.J.translate(u.$t.topLeft(r.box),p);r.box=u.$t.construct(m,u.$t.dims(r.box))}),e};function Ie(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,s;n<e.length;n++)(s=Ie(e[n]))!==""&&(t+=(t&&" ")+s);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var F0={value:()=>{}};function Vs(){for(var e=0,t=arguments.length,n={},s;e<t;++e){if(!(s=arguments[e]+"")||s in n||/[\s.]/.test(s))throw new Error("illegal type: "+s);n[s]=[]}return new ls(n)}function ls(e){this._=e}function H0(e,t){return e.trim().split(/^|\s+/).map(function(n){var s="",r=n.indexOf(".");if(r>=0&&(s=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:s}})}ls.prototype=Vs.prototype={constructor:ls,on:function(e,t){var n=this._,s=H0(e+"",n),r,i=-1,l=s.length;if(arguments.length<2){for(;++i<l;)if((r=(e=s[i]).type)&&(r=Z0(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<l;)if(r=(e=s[i]).type)n[r]=ji(n[r],e.name,t);else if(t==null)for(r in n)n[r]=ji(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ls(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),s=0,r,i;s<r;++s)n[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],s=0,r=i.length;s<r;++s)i[s].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)}};function Z0(e,t){for(var n=0,s=e.length,r;n<s;++n)if((r=e[n]).name===t)return r.value}function ji(e,t,n){for(var s=0,r=e.length;s<r;++s)if(e[s].name===t){e[s]=F0,e=e.slice(0,s).concat(e.slice(s+1));break}return n!=null&&e.push({name:t,value:n}),e}var Do="http://www.w3.org/1999/xhtml";const Ei={svg:"http://www.w3.org/2000/svg",xhtml:Do,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fs(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ei.hasOwnProperty(t)?{space:Ei[t],local:e}:e}function W0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Do&&t.documentElement.namespaceURI===Do?t.createElement(e):t.createElementNS(n,e)}}function Y0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Uc(e){var t=Fs(e);return(t.local?Y0:W0)(t)}function G0(){}function wr(e){return e==null?G0:function(){return this.querySelector(e)}}function K0(e){typeof e!="function"&&(e=wr(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=new Array(l),a,x,d=0;d<l;++d)(a=i[d])&&(x=e.call(a,a.__data__,d,i))&&("__data__"in a&&(x.__data__=a.__data__),c[d]=x);return new Ge(s,this._parents)}function q0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function X0(){return[]}function Jc(e){return e==null?X0:function(){return this.querySelectorAll(e)}}function U0(e){return function(){return q0(e.apply(this,arguments))}}function J0(e){typeof e=="function"?e=U0(e):e=Jc(e);for(var t=this._groups,n=t.length,s=[],r=[],i=0;i<n;++i)for(var l=t[i],c=l.length,a,x=0;x<c;++x)(a=l[x])&&(s.push(e.call(a,a.__data__,x,l)),r.push(a));return new Ge(s,r)}function Qc(e){return function(){return this.matches(e)}}function ea(e){return function(t){return t.matches(e)}}var Q0=Array.prototype.find;function e2(e){return function(){return Q0.call(this.children,e)}}function t2(){return this.firstElementChild}function n2(e){return this.select(e==null?t2:e2(typeof e=="function"?e:ea(e)))}var s2=Array.prototype.filter;function o2(){return Array.from(this.children)}function r2(e){return function(){return s2.call(this.children,e)}}function i2(e){return this.selectAll(e==null?o2:r2(typeof e=="function"?e:ea(e)))}function l2(e){typeof e!="function"&&(e=Qc(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=[],a,x=0;x<l;++x)(a=i[x])&&e.call(a,a.__data__,x,i)&&c.push(a);return new Ge(s,this._parents)}function ta(e){return new Array(e.length)}function c2(){return new Ge(this._enter||this._groups.map(ta),this._parents)}function Ss(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ss.prototype={constructor:Ss,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function a2(e){return function(){return e}}function u2(e,t,n,s,r,i){for(var l=0,c,a=t.length,x=i.length;l<x;++l)(c=t[l])?(c.__data__=i[l],s[l]=c):n[l]=new Ss(e,i[l]);for(;l<a;++l)(c=t[l])&&(r[l]=c)}function x2(e,t,n,s,r,i,l){var c,a,x=new Map,d=t.length,p=i.length,m=new Array(d),f;for(c=0;c<d;++c)(a=t[c])&&(m[c]=f=l.call(a,a.__data__,c,t)+"",x.has(f)?r[c]=a:x.set(f,a));for(c=0;c<p;++c)f=l.call(e,i[c],c,i)+"",(a=x.get(f))?(s[c]=a,a.__data__=i[c],x.delete(f)):n[c]=new Ss(e,i[c]);for(c=0;c<d;++c)(a=t[c])&&x.get(m[c])===a&&(r[c]=a)}function d2(e){return e.__data__}function p2(e,t){if(!arguments.length)return Array.from(this,d2);var n=t?x2:u2,s=this._parents,r=this._groups;typeof e!="function"&&(e=a2(e));for(var i=r.length,l=new Array(i),c=new Array(i),a=new Array(i),x=0;x<i;++x){var d=s[x],p=r[x],m=p.length,f=m2(e.call(d,d&&d.__data__,x,s)),h=f.length,j=c[x]=new Array(h),y=l[x]=new Array(h),S=a[x]=new Array(m);n(d,p,j,y,S,f,t);for(var w=0,E=0,C,N;w<h;++w)if(C=j[w]){for(w>=E&&(E=w+1);!(N=y[E])&&++E<h;);C._next=N||null}}return l=new Ge(l,s),l._enter=c,l._exit=a,l}function m2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function f2(){return new Ge(this._exit||this._groups.map(ta),this._parents)}function h2(e,t,n){var s=this.enter(),r=this,i=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),s&&r?s.merge(r).order():r}function g2(e){for(var t=e.selection?e.selection():e,n=this._groups,s=t._groups,r=n.length,i=s.length,l=Math.min(r,i),c=new Array(r),a=0;a<l;++a)for(var x=n[a],d=s[a],p=x.length,m=c[a]=new Array(p),f,h=0;h<p;++h)(f=x[h]||d[h])&&(m[h]=f);for(;a<r;++a)c[a]=n[a];return new Ge(c,this._parents)}function j2(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var s=e[t],r=s.length-1,i=s[r],l;--r>=0;)(l=s[r])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function E2(e){e||(e=y2);function t(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var n=this._groups,s=n.length,r=new Array(s),i=0;i<s;++i){for(var l=n[i],c=l.length,a=r[i]=new Array(c),x,d=0;d<c;++d)(x=l[d])&&(a[d]=x);a.sort(t)}return new Ge(r,this._parents).order()}function y2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function S2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function R2(){return Array.from(this)}function C2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length;r<i;++r){var l=s[r];if(l)return l}return null}function b2(){let e=0;for(const t of this)++e;return e}function w2(){return!this.node()}function v2(e){for(var t=this._groups,n=0,s=t.length;n<s;++n)for(var r=t[n],i=0,l=r.length,c;i<l;++i)(c=r[i])&&e.call(c,c.__data__,i,r);return this}function k2(e){return function(){this.removeAttribute(e)}}function M2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _2(e,t){return function(){this.setAttribute(e,t)}}function P2(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function L2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function N2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function T2(e,t){var n=Fs(e);if(arguments.length<2){var s=this.node();return n.local?s.getAttributeNS(n.space,n.local):s.getAttribute(n)}return this.each((t==null?n.local?M2:k2:typeof t=="function"?n.local?N2:L2:n.local?P2:_2)(n,t))}function na(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function $2(e){return function(){this.style.removeProperty(e)}}function A2(e,t,n){return function(){this.style.setProperty(e,t,n)}}function I2(e,t,n){return function(){var s=t.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,n)}}function z2(e,t,n){return arguments.length>1?this.each((t==null?$2:typeof t=="function"?I2:A2)(e,t,n??"")):tn(this.node(),e)}function tn(e,t){return e.style.getPropertyValue(t)||na(e).getComputedStyle(e,null).getPropertyValue(t)}function B2(e){return function(){delete this[e]}}function D2(e,t){return function(){this[e]=t}}function O2(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function V2(e,t){return arguments.length>1?this.each((t==null?B2:typeof t=="function"?O2:D2)(e,t)):this.node()[e]}function sa(e){return e.trim().split(/^|\s+/)}function vr(e){return e.classList||new oa(e)}function oa(e){this._node=e,this._names=sa(e.getAttribute("class")||"")}oa.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ra(e,t){for(var n=vr(e),s=-1,r=t.length;++s<r;)n.add(t[s])}function ia(e,t){for(var n=vr(e),s=-1,r=t.length;++s<r;)n.remove(t[s])}function F2(e){return function(){ra(this,e)}}function H2(e){return function(){ia(this,e)}}function Z2(e,t){return function(){(t.apply(this,arguments)?ra:ia)(this,e)}}function W2(e,t){var n=sa(e+"");if(arguments.length<2){for(var s=vr(this.node()),r=-1,i=n.length;++r<i;)if(!s.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Z2:t?F2:H2)(n,t))}function Y2(){this.textContent=""}function G2(e){return function(){this.textContent=e}}function K2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function q2(e){return arguments.length?this.each(e==null?Y2:(typeof e=="function"?K2:G2)(e)):this.node().textContent}function X2(){this.innerHTML=""}function U2(e){return function(){this.innerHTML=e}}function J2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Q2(e){return arguments.length?this.each(e==null?X2:(typeof e=="function"?J2:U2)(e)):this.node().innerHTML}function e5(){this.nextSibling&&this.parentNode.appendChild(this)}function t5(){return this.each(e5)}function n5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function s5(){return this.each(n5)}function o5(e){var t=typeof e=="function"?e:Uc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function r5(){return null}function i5(e,t){var n=typeof e=="function"?e:Uc(e),s=t==null?r5:typeof t=="function"?t:wr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),s.apply(this,arguments)||null)})}function l5(){var e=this.parentNode;e&&e.removeChild(this)}function c5(){return this.each(l5)}function a5(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function u5(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function x5(e){return this.select(e?u5:a5)}function d5(e){return arguments.length?this.property("__data__",e):this.node().__data__}function p5(e){return function(t){e.call(this,t,this.__data__)}}function m5(e){return e.trim().split(/^|\s+/).map(function(t){var n="",s=t.indexOf(".");return s>=0&&(n=t.slice(s+1),t=t.slice(0,s)),{type:t,name:n}})}function f5(e){return function(){var t=this.__on;if(t){for(var n=0,s=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++s]=i;++s?t.length=s:delete this.__on}}}function h5(e,t,n){return function(){var s=this.__on,r,i=p5(t);if(s){for(var l=0,c=s.length;l<c;++l)if((r=s[l]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},s?s.push(r):this.__on=[r]}}function g5(e,t,n){var s=m5(e+""),r,i=s.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var a=0,x=c.length,d;a<x;++a)for(r=0,d=c[a];r<i;++r)if((l=s[r]).type===d.type&&l.name===d.name)return d.value}return}for(c=t?h5:f5,r=0;r<i;++r)this.each(c(s[r],t,n));return this}function la(e,t,n){var s=na(e),r=s.CustomEvent;typeof r=="function"?r=new r(t,n):(r=s.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function j5(e,t){return function(){return la(this,e,t)}}function E5(e,t){return function(){return la(this,e,t.apply(this,arguments))}}function y5(e,t){return this.each((typeof t=="function"?E5:j5)(e,t))}function*S5(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length,l;r<i;++r)(l=s[r])&&(yield l)}var ca=[null];function Ge(e,t){this._groups=e,this._parents=t}function On(){return new Ge([[document.documentElement]],ca)}function R5(){return this}Ge.prototype=On.prototype={constructor:Ge,select:K0,selectAll:J0,selectChild:n2,selectChildren:i2,filter:l2,data:p2,enter:c2,exit:f2,join:h2,merge:g2,selection:R5,order:j2,sort:E2,call:S2,nodes:R2,node:C2,size:b2,empty:w2,each:v2,attr:T2,style:z2,property:V2,classed:W2,text:q2,html:Q2,raise:t5,lower:s5,append:o5,insert:i5,remove:c5,clone:x5,datum:d5,on:g5,dispatch:y5,[Symbol.iterator]:S5};function Ye(e){return typeof e=="string"?new Ge([[document.querySelector(e)]],[document.documentElement]):new Ge([[e]],ca)}function C5(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Je(e,t){if(e=C5(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var s=n.createSVGPoint();return s.x=e.clientX,s.y=e.clientY,s=s.matrixTransform(t.getScreenCTM().inverse()),[s.x,s.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const b5={passive:!1},Pn={capture:!0,passive:!1};function go(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function aa(e){var t=e.document.documentElement,n=Ye(e).on("dragstart.drag",Jt,Pn);"onselectstart"in t?n.on("selectstart.drag",Jt,Pn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ua(e,t){var n=e.document.documentElement,s=Ye(e).on("dragstart.drag",null);t&&(s.on("click.drag",Jt,Pn),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in n?s.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Xn=e=>()=>e;function Oo(e,{sourceEvent:t,subject:n,target:s,identifier:r,active:i,x:l,y:c,dx:a,dy:x,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:x,enumerable:!0,configurable:!0},_:{value:d}})}Oo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function w5(e){return!e.ctrlKey&&!e.button}function v5(){return this.parentNode}function k5(e,t){return t??{x:e.x,y:e.y}}function M5(){return navigator.maxTouchPoints||"ontouchstart"in this}function xa(){var e=w5,t=v5,n=k5,s=M5,r={},i=Vs("start","drag","end"),l=0,c,a,x,d,p=0;function m(C){C.on("mousedown.drag",f).filter(s).on("touchstart.drag",y).on("touchmove.drag",S,b5).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(C,N){if(!(d||!e.call(this,C,N))){var T=E(this,t.call(this,C,N),C,N,"mouse");T&&(Ye(C.view).on("mousemove.drag",h,Pn).on("mouseup.drag",j,Pn),aa(C.view),go(C),x=!1,c=C.clientX,a=C.clientY,T("start",C))}}function h(C){if(Jt(C),!x){var N=C.clientX-c,T=C.clientY-a;x=N*N+T*T>p}r.mouse("drag",C)}function j(C){Ye(C.view).on("mousemove.drag mouseup.drag",null),ua(C.view,x),Jt(C),r.mouse("end",C)}function y(C,N){if(e.call(this,C,N)){var T=C.changedTouches,P=t.call(this,C,N),D=T.length,I,z;for(I=0;I<D;++I)(z=E(this,P,C,N,T[I].identifier,T[I]))&&(go(C),z("start",C,T[I]))}}function S(C){var N=C.changedTouches,T=N.length,P,D;for(P=0;P<T;++P)(D=r[N[P].identifier])&&(Jt(C),D("drag",C,N[P]))}function w(C){var N=C.changedTouches,T=N.length,P,D;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),P=0;P<T;++P)(D=r[N[P].identifier])&&(go(C),D("end",C,N[P]))}function E(C,N,T,P,D,I){var z=i.copy(),F=Je(I||T,N),O,M,R;if((R=n.call(C,new Oo("beforestart",{sourceEvent:T,target:m,identifier:D,active:l,x:F[0],y:F[1],dx:0,dy:0,dispatch:z}),P))!=null)return O=R.x-F[0]||0,M=R.y-F[1]||0,function k(v,_,A){var $=F,V;switch(v){case"start":r[D]=k,V=l++;break;case"end":delete r[D],--l;case"drag":F=Je(A||_,N),V=l;break}z.call(v,C,new Oo(v,{sourceEvent:_,subject:R,target:m,identifier:D,active:V,x:F[0]+O,y:F[1]+M,dx:F[0]-$[0],dy:F[1]-$[1],dispatch:z}),P)}}return m.filter=function(C){return arguments.length?(e=typeof C=="function"?C:Xn(!!C),m):e},m.container=function(C){return arguments.length?(t=typeof C=="function"?C:Xn(C),m):t},m.subject=function(C){return arguments.length?(n=typeof C=="function"?C:Xn(C),m):n},m.touchable=function(C){return arguments.length?(s=typeof C=="function"?C:Xn(!!C),m):s},m.on=function(){var C=i.on.apply(i,arguments);return C===i?m:C},m.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,m):Math.sqrt(p)},m}var nn=0,Sn=0,gn=0,da=1e3,Rs,Rn,Cs=0,Ot=0,Hs=0,Ln=typeof performance=="object"&&performance.now?performance:Date,pa=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kr(){return Ot||(pa(_5),Ot=Ln.now()+Hs)}function _5(){Ot=0}function bs(){this._call=this._time=this._next=null}bs.prototype=ma.prototype={constructor:bs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?kr():+n)+(t==null?0:+t),!this._next&&Rn!==this&&(Rn?Rn._next=this:Rs=this,Rn=this),this._call=e,this._time=n,Vo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vo())}};function ma(e,t,n){var s=new bs;return s.restart(e,t,n),s}function P5(){kr(),++nn;for(var e=Rs,t;e;)(t=Ot-e._time)>=0&&e._call.call(void 0,t),e=e._next;--nn}function yi(){Ot=(Cs=Ln.now())+Hs,nn=Sn=0;try{P5()}finally{nn=0,N5(),Ot=0}}function L5(){var e=Ln.now(),t=e-Cs;t>da&&(Hs-=t,Cs=e)}function N5(){for(var e,t=Rs,n,s=1/0;t;)t._call?(s>t._time&&(s=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Rs=n);Rn=e,Vo(s)}function Vo(e){if(!nn){Sn&&(Sn=clearTimeout(Sn));var t=e-Ot;t>24?(e<1/0&&(Sn=setTimeout(yi,e-Ln.now()-Hs)),gn&&(gn=clearInterval(gn))):(gn||(Cs=Ln.now(),gn=setInterval(L5,da)),nn=1,pa(yi))}}function Si(e,t,n){var s=new bs;return t=t==null?0:+t,s.restart(r=>{s.stop(),e(r+t)},t,n),s}var T5=Vs("start","end","cancel","interrupt"),$5=[],fa=0,Ri=1,Fo=2,cs=3,Ci=4,Ho=5,as=6;function Zs(e,t,n,s,r,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;A5(e,n,{name:t,index:s,group:r,on:T5,tween:$5,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:fa})}function Mr(e,t){var n=tt(e,t);if(n.state>fa)throw new Error("too late; already scheduled");return n}function ct(e,t){var n=tt(e,t);if(n.state>cs)throw new Error("too late; already running");return n}function tt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function A5(e,t,n){var s=e.__transition,r;s[t]=n,n.timer=ma(i,0,n.time);function i(x){n.state=Ri,n.timer.restart(l,n.delay,n.time),n.delay<=x&&l(x-n.delay)}function l(x){var d,p,m,f;if(n.state!==Ri)return a();for(d in s)if(f=s[d],f.name===n.name){if(f.state===cs)return Si(l);f.state===Ci?(f.state=as,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete s[d]):+d<t&&(f.state=as,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete s[d])}if(Si(function(){n.state===cs&&(n.state=Ci,n.timer.restart(c,n.delay,n.time),c(x))}),n.state=Fo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Fo){for(n.state=cs,r=new Array(m=n.tween.length),d=0,p=-1;d<m;++d)(f=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++p]=f);r.length=p+1}}function c(x){for(var d=x<n.duration?n.ease.call(null,x/n.duration):(n.timer.restart(a),n.state=Ho,1),p=-1,m=r.length;++p<m;)r[p].call(e,d);n.state===Ho&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=as,n.timer.stop(),delete s[t];for(var x in s)return;delete e.__transition}}function us(e,t){var n=e.__transition,s,r,i=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((s=n[l]).name!==t){i=!1;continue}r=s.state>Fo&&s.state<Ho,s.state=as,s.timer.stop(),s.on.call(r?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete n[l]}i&&delete e.__transition}}function I5(e){return this.each(function(){us(this,e)})}function z5(e,t){var n,s;return function(){var r=ct(this,e),i=r.tween;if(i!==n){s=n=i;for(var l=0,c=s.length;l<c;++l)if(s[l].name===t){s=s.slice(),s.splice(l,1);break}}r.tween=s}}function B5(e,t,n){var s,r;if(typeof n!="function")throw new Error;return function(){var i=ct(this,e),l=i.tween;if(l!==s){r=(s=l).slice();for(var c={name:t,value:n},a=0,x=r.length;a<x;++a)if(r[a].name===t){r[a]=c;break}a===x&&r.push(c)}i.tween=r}}function D5(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s=tt(this.node(),n).tween,r=0,i=s.length,l;r<i;++r)if((l=s[r]).name===e)return l.value;return null}return this.each((t==null?z5:B5)(n,e,t))}function _r(e,t,n){var s=e._id;return e.each(function(){var r=ct(this,s);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return tt(r,s).value[t]}}function ha(e,t){var n;return(typeof t=="number"?B.interpolateNumber:t instanceof B.color?B.interpolateRgb:(n=B.color(t))?(t=n,B.interpolateRgb):B.interpolateString)(e,t)}function O5(e){return function(){this.removeAttribute(e)}}function V5(e){return function(){this.removeAttributeNS(e.space,e.local)}}function F5(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttribute(e);return l===r?null:l===s?i:i=t(s=l,n)}}function H5(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttributeNS(e.space,e.local);return l===r?null:l===s?i:i=t(s=l,n)}}function Z5(e,t,n){var s,r,i;return function(){var l,c=n(this),a;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),a=c+"",l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c)))}}function W5(e,t,n){var s,r,i;return function(){var l,c=n(this),a;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),a=c+"",l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c)))}}function Y5(e,t){var n=Fs(e),s=n==="transform"?yh:ha;return this.attrTween(e,typeof t=="function"?(n.local?W5:Z5)(n,s,_r(this,"attr."+e,t)):t==null?(n.local?V5:O5)(n):(n.local?H5:F5)(n,s,t))}function G5(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function K5(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function q5(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&K5(e,i)),n}return r._value=t,r}function X5(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&G5(e,i)),n}return r._value=t,r}function U5(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var s=Fs(e);return this.tween(n,(s.local?q5:X5)(s,t))}function J5(e,t){return function(){Mr(this,e).delay=+t.apply(this,arguments)}}function Q5(e,t){return t=+t,function(){Mr(this,e).delay=t}}function ej(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?J5:Q5)(t,e)):tt(this.node(),t).delay}function tj(e,t){return function(){ct(this,e).duration=+t.apply(this,arguments)}}function nj(e,t){return t=+t,function(){ct(this,e).duration=t}}function sj(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?tj:nj)(t,e)):tt(this.node(),t).duration}function oj(e,t){if(typeof t!="function")throw new Error;return function(){ct(this,e).ease=t}}function rj(e){var t=this._id;return arguments.length?this.each(oj(t,e)):tt(this.node(),t).ease}function ij(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ct(this,e).ease=n}}function lj(e){if(typeof e!="function")throw new Error;return this.each(ij(this._id,e))}function cj(e){typeof e!="function"&&(e=Qc(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=[],a,x=0;x<l;++x)(a=i[x])&&e.call(a,a.__data__,x,i)&&c.push(a);return new pt(s,this._parents,this._name,this._id)}function aj(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,s=t.length,r=n.length,i=Math.min(s,r),l=new Array(s),c=0;c<i;++c)for(var a=t[c],x=n[c],d=a.length,p=l[c]=new Array(d),m,f=0;f<d;++f)(m=a[f]||x[f])&&(p[f]=m);for(;c<s;++c)l[c]=t[c];return new pt(l,this._parents,this._name,this._id)}function uj(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function xj(e,t,n){var s,r,i=uj(t)?Mr:ct;return function(){var l=i(this,e),c=l.on;c!==s&&(r=(s=c).copy()).on(t,n),l.on=r}}function dj(e,t){var n=this._id;return arguments.length<2?tt(this.node(),n).on.on(e):this.each(xj(n,e,t))}function pj(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function mj(){return this.on("end.remove",pj(this._id))}function fj(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wr(e));for(var s=this._groups,r=s.length,i=new Array(r),l=0;l<r;++l)for(var c=s[l],a=c.length,x=i[l]=new Array(a),d,p,m=0;m<a;++m)(d=c[m])&&(p=e.call(d,d.__data__,m,c))&&("__data__"in d&&(p.__data__=d.__data__),x[m]=p,Zs(x[m],t,n,m,x,tt(d,n)));return new pt(i,this._parents,t,n)}function hj(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Jc(e));for(var s=this._groups,r=s.length,i=[],l=[],c=0;c<r;++c)for(var a=s[c],x=a.length,d,p=0;p<x;++p)if(d=a[p]){for(var m=e.call(d,d.__data__,p,a),f,h=tt(d,n),j=0,y=m.length;j<y;++j)(f=m[j])&&Zs(f,t,n,j,m,h);i.push(m),l.push(d)}return new pt(i,l,t,n)}var gj=On.prototype.constructor;function jj(){return new gj(this._groups,this._parents)}function Ej(e,t){var n,s,r;return function(){var i=tn(this,e),l=(this.style.removeProperty(e),tn(this,e));return i===l?null:i===n&&l===s?r:r=t(n=i,s=l)}}function ga(e){return function(){this.style.removeProperty(e)}}function yj(e,t,n){var s,r=n+"",i;return function(){var l=tn(this,e);return l===r?null:l===s?i:i=t(s=l,n)}}function Sj(e,t,n){var s,r,i;return function(){var l=tn(this,e),c=n(this),a=c+"";return c==null&&(a=c=(this.style.removeProperty(e),tn(this,e))),l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c))}}function Rj(e,t){var n,s,r,i="style."+t,l="end."+i,c;return function(){var a=ct(this,e),x=a.on,d=a.value[i]==null?c||(c=ga(t)):void 0;(x!==n||r!==d)&&(s=(n=x).copy()).on(l,r=d),a.on=s}}function Cj(e,t,n){var s=(e+="")=="transform"?Eh:ha;return t==null?this.styleTween(e,Ej(e,s)).on("end.style."+e,ga(e)):typeof t=="function"?this.styleTween(e,Sj(e,s,_r(this,"style."+e,t))).each(Rj(this._id,e)):this.styleTween(e,yj(e,s,t),n).on("end.style."+e,null)}function bj(e,t,n){return function(s){this.style.setProperty(e,t.call(this,s),n)}}function wj(e,t,n){var s,r;function i(){var l=t.apply(this,arguments);return l!==r&&(s=(r=l)&&bj(e,l,n)),s}return i._value=t,i}function vj(e,t,n){var s="style."+(e+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(t==null)return this.tween(s,null);if(typeof t!="function")throw new Error;return this.tween(s,wj(e,t,n??""))}function kj(e){return function(){this.textContent=e}}function Mj(e){return function(){var t=e(this);this.textContent=t??""}}function _j(e){return this.tween("text",typeof e=="function"?Mj(_r(this,"text",e)):kj(e==null?"":e+""))}function Pj(e){return function(t){this.textContent=e.call(this,t)}}function Lj(e){var t,n;function s(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Pj(r)),t}return s._value=e,s}function Nj(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Lj(e))}function Tj(){for(var e=this._name,t=this._id,n=ja(),s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],c=l.length,a,x=0;x<c;++x)if(a=l[x]){var d=tt(a,t);Zs(a,e,n,x,l,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new pt(s,this._parents,e,n)}function $j(){var e,t,n=this,s=n._id,r=n.size();return new Promise(function(i,l){var c={value:l},a={value:function(){--r===0&&i()}};n.each(function(){var x=ct(this,s),d=x.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(a)),x.on=t}),r===0&&i()})}var Aj=0;function pt(e,t,n,s){this._groups=e,this._parents=t,this._name=n,this._id=s}function ja(){return++Aj}var ut=On.prototype;pt.prototype={constructor:pt,select:fj,selectAll:hj,selectChild:ut.selectChild,selectChildren:ut.selectChildren,filter:cj,merge:aj,selection:jj,transition:Tj,call:ut.call,nodes:ut.nodes,node:ut.node,size:ut.size,empty:ut.empty,each:ut.each,on:dj,attr:Y5,attrTween:U5,style:Cj,styleTween:vj,text:_j,textTween:Nj,remove:mj,tween:D5,delay:ej,duration:sj,ease:rj,easeVarying:lj,end:$j,[Symbol.iterator]:ut[Symbol.iterator]};function Ij(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var zj={time:null,delay:0,duration:250,ease:Ij};function Bj(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Dj(e){var t,n;e instanceof pt?(t=e._id,e=e._name):(t=ja(),(n=zj).time=kr(),e=e==null?null:e+"");for(var s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],c=l.length,a,x=0;x<c;++x)(a=l[x])&&Zs(a,e,t,x,l,n||Bj(a,t));return new pt(s,this._parents,e,t)}On.prototype.interrupt=I5;On.prototype.transition=Dj;const Un=e=>()=>e;function Oj(e,{sourceEvent:t,target:n,transform:s,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:r}})}function xt(e,t,n){this.k=e,this.x=t,this.y=n}xt.prototype={constructor:xt,scale:function(e){return e===1?this:new xt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new xt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ws=new xt(1,0,0);Ea.prototype=xt.prototype;function Ea(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ws;return e.__zoom}function jo(e){e.stopImmediatePropagation()}function jn(e){e.preventDefault(),e.stopImmediatePropagation()}function Vj(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Fj(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function bi(){return this.__zoom||Ws}function Hj(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Zj(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wj(e,t,n){var s=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function ya(){var e=Vj,t=Fj,n=Wj,s=Hj,r=Zj,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,a=bh,x=Vs("start","zoom","end"),d,p,m,f=500,h=150,j=0,y=10;function S(R){R.property("__zoom",bi).on("wheel.zoom",D,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",z).filter(r).on("touchstart.zoom",F).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(R,k,v,_){var A=R.selection?R.selection():R;A.property("__zoom",bi),R!==A?N(R,k,v,_):A.interrupt().each(function(){T(this,arguments).event(_).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},S.scaleBy=function(R,k,v,_){S.scaleTo(R,function(){var A=this.__zoom.k,$=typeof k=="function"?k.apply(this,arguments):k;return A*$},v,_)},S.scaleTo=function(R,k,v,_){S.transform(R,function(){var A=t.apply(this,arguments),$=this.__zoom,V=v==null?C(A):typeof v=="function"?v.apply(this,arguments):v,H=$.invert(V),W=typeof k=="function"?k.apply(this,arguments):k;return n(E(w($,W),V,H),A,l)},v,_)},S.translateBy=function(R,k,v,_){S.transform(R,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof v=="function"?v.apply(this,arguments):v),t.apply(this,arguments),l)},null,_)},S.translateTo=function(R,k,v,_,A){S.transform(R,function(){var $=t.apply(this,arguments),V=this.__zoom,H=_==null?C($):typeof _=="function"?_.apply(this,arguments):_;return n(Ws.translate(H[0],H[1]).scale(V.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof v=="function"?-v.apply(this,arguments):-v),$,l)},_,A)};function w(R,k){return k=Math.max(i[0],Math.min(i[1],k)),k===R.k?R:new xt(k,R.x,R.y)}function E(R,k,v){var _=k[0]-v[0]*R.k,A=k[1]-v[1]*R.k;return _===R.x&&A===R.y?R:new xt(R.k,_,A)}function C(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function N(R,k,v,_){R.on("start.zoom",function(){T(this,arguments).event(_).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(_).end()}).tween("zoom",function(){var A=this,$=arguments,V=T(A,$).event(_),H=t.apply(A,$),W=v==null?C(H):typeof v=="function"?v.apply(A,$):v,ee=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),te=A.__zoom,se=typeof k=="function"?k.apply(A,$):k,oe=a(te.invert(W).concat(ee/te.k),se.invert(W).concat(ee/se.k));return function(J){if(J===1)J=se;else{var le=oe(J),he=ee/le[2];J=new xt(he,W[0]-le[0]*he,W[1]-le[1]*he)}V.zoom(null,J)}})}function T(R,k,v){return!v&&R.__zooming||new P(R,k)}function P(R,k){this.that=R,this.args=k,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,k),this.taps=0}P.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,k){return this.mouse&&R!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var k=Ye(this.that).datum();x.call(R,this.that,new Oj(R,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:x}),k)}};function D(R,...k){if(!e.apply(this,arguments))return;var v=T(this,k).event(R),_=this.__zoom,A=Math.max(i[0],Math.min(i[1],_.k*Math.pow(2,s.apply(this,arguments)))),$=Je(R);if(v.wheel)(v.mouse[0][0]!==$[0]||v.mouse[0][1]!==$[1])&&(v.mouse[1]=_.invert(v.mouse[0]=$)),clearTimeout(v.wheel);else{if(_.k===A)return;v.mouse=[$,_.invert($)],us(this),v.start()}jn(R),v.wheel=setTimeout(V,h),v.zoom("mouse",n(E(w(_,A),v.mouse[0],v.mouse[1]),v.extent,l));function V(){v.wheel=null,v.end()}}function I(R,...k){if(m||!e.apply(this,arguments))return;var v=R.currentTarget,_=T(this,k,!0).event(R),A=Ye(R.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",ee,!0),$=Je(R,v),V=R.clientX,H=R.clientY;aa(R.view),jo(R),_.mouse=[$,this.__zoom.invert($)],us(this),_.start();function W(te){if(jn(te),!_.moved){var se=te.clientX-V,oe=te.clientY-H;_.moved=se*se+oe*oe>j}_.event(te).zoom("mouse",n(E(_.that.__zoom,_.mouse[0]=Je(te,v),_.mouse[1]),_.extent,l))}function ee(te){A.on("mousemove.zoom mouseup.zoom",null),ua(te.view,_.moved),jn(te),_.event(te).end()}}function z(R,...k){if(e.apply(this,arguments)){var v=this.__zoom,_=Je(R.changedTouches?R.changedTouches[0]:R,this),A=v.invert(_),$=v.k*(R.shiftKey?.5:2),V=n(E(w(v,$),_,A),t.apply(this,k),l);jn(R),c>0?Ye(this).transition().duration(c).call(N,V,_,R):Ye(this).call(S.transform,V,_,R)}}function F(R,...k){if(e.apply(this,arguments)){var v=R.touches,_=v.length,A=T(this,k,R.changedTouches.length===_).event(R),$,V,H,W;for(jo(R),V=0;V<_;++V)H=v[V],W=Je(H,this),W=[W,this.__zoom.invert(W),H.identifier],A.touch0?!A.touch1&&A.touch0[2]!==W[2]&&(A.touch1=W,A.taps=0):(A.touch0=W,$=!0,A.taps=1+!!d);d&&(d=clearTimeout(d)),$&&(A.taps<2&&(p=W[0],d=setTimeout(function(){d=null},f)),us(this),A.start())}}function O(R,...k){if(this.__zooming){var v=T(this,k).event(R),_=R.changedTouches,A=_.length,$,V,H,W;for(jn(R),$=0;$<A;++$)V=_[$],H=Je(V,this),v.touch0&&v.touch0[2]===V.identifier?v.touch0[0]=H:v.touch1&&v.touch1[2]===V.identifier&&(v.touch1[0]=H);if(V=v.that.__zoom,v.touch1){var ee=v.touch0[0],te=v.touch0[1],se=v.touch1[0],oe=v.touch1[1],J=(J=se[0]-ee[0])*J+(J=se[1]-ee[1])*J,le=(le=oe[0]-te[0])*le+(le=oe[1]-te[1])*le;V=w(V,Math.sqrt(J/le)),H=[(ee[0]+se[0])/2,(ee[1]+se[1])/2],W=[(te[0]+oe[0])/2,(te[1]+oe[1])/2]}else if(v.touch0)H=v.touch0[0],W=v.touch0[1];else return;v.zoom("touch",n(E(V,H,W),v.extent,l))}}function M(R,...k){if(this.__zooming){var v=T(this,k).event(R),_=R.changedTouches,A=_.length,$,V;for(jo(R),m&&clearTimeout(m),m=setTimeout(function(){m=null},f),$=0;$<A;++$)V=_[$],v.touch0&&v.touch0[2]===V.identifier?delete v.touch0:v.touch1&&v.touch1[2]===V.identifier&&delete v.touch1;if(v.touch1&&!v.touch0&&(v.touch0=v.touch1,delete v.touch1),v.touch0)v.touch0[1]=this.__zoom.invert(v.touch0[0]);else if(v.end(),v.taps===2&&(V=Je(V,this),Math.hypot(p[0]-V[0],p[1]-V[1])<y)){var H=Ye(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return S.wheelDelta=function(R){return arguments.length?(s=typeof R=="function"?R:Un(+R),S):s},S.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Un(!!R),S):e},S.touchable=function(R){return arguments.length?(r=typeof R=="function"?R:Un(!!R),S):r},S.extent=function(R){return arguments.length?(t=typeof R=="function"?R:Un([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),S):t},S.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],S):[i[0],i[1]]},S.translateExtent=function(R){return arguments.length?(l[0][0]=+R[0][0],l[1][0]=+R[1][0],l[0][1]=+R[0][1],l[1][1]=+R[1][1],S):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},S.constrain=function(R){return arguments.length?(n=R,S):n},S.duration=function(R){return arguments.length?(c=+R,S):c},S.interpolate=function(R){return arguments.length?(a=R,S):a},S.on=function(){var R=x.on.apply(x,arguments);return R===x?S:R},S.clickDistance=function(R){return arguments.length?(j=(R=+R)*R,S):Math.sqrt(j)},S.tapDistance=function(R){return arguments.length?(y=+R,S):y},S}const Oe={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:s})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:s}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Nn=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Sa=["Enter"," ","Escape"];var Vt;(function(e){e.Strict="strict",e.Loose="loose"})(Vt||(Vt={}));var It;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(It||(It={}));var sn;(function(e){e.Partial="partial",e.Full="full"})(sn||(sn={}));const Ra={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Rt;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Rt||(Rt={}));var ws;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ws||(ws={}));var U;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(U||(U={}));const wi={[U.Left]:U.Right,[U.Right]:U.Left,[U.Top]:U.Bottom,[U.Bottom]:U.Top};function Ca(e){return e===null?null:e?"valid":"invalid"}const ba=e=>"id"in e&&"source"in e&&"target"in e,Yj=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Pr=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Vn=(e,t=[0,0])=>{const{width:n,height:s}=gt(e),r=e.origin??t,i=n*r[0],l=s*r[1];return{x:e.position.x-i,y:e.position.y-l}},Gj=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((s,r)=>{const i=typeof r=="string";let l=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(l=i?t.nodeLookup.get(r):Pr(r)?r:t.nodeLookup.get(r.id));const c=l?vs(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ys(s,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Gs(n)},Fn=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(s=>{if(t.filter===void 0||t.filter(s)){const r=vs(s);n=Ys(n,r)}}),Gs(n)},wa=(e,t,[n,s,r]=[0,0,1],i=!1,l=!1)=>{const c={...Hn(t,[n,s,r]),width:t.width/r,height:t.height/r},a=[];for(const x of e.values()){const{measured:d,selectable:p=!0,hidden:m=!1}=x;if(l&&!p||m)continue;const f=d.width??x.width??x.initialWidth??null,h=d.height??x.height??x.initialHeight??null,j=Tn(c,rn(x)),y=(f??0)*(h??0),S=i&&j>0;(!x.internals.handleBounds||S||j>=y||x.dragging)&&a.push(x)}return a},Kj=(e,t)=>{const n=new Set;return e.forEach(s=>{n.add(s.id)}),t.filter(s=>n.has(s.source)||n.has(s.target))};function qj(e,t){const n=new Map,s=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!s||s.has(r.id))&&n.set(r.id,r)}),n}async function Xj({nodes:e,width:t,height:n,panZoom:s,minZoom:r,maxZoom:i},l){if(e.size===0)return Promise.resolve(!0);const c=qj(e,l),a=Fn(c),x=Lr(a,t,n,(l==null?void 0:l.minZoom)??r,(l==null?void 0:l.maxZoom)??i,(l==null?void 0:l.padding)??.1);return await s.setViewport(x,{duration:l==null?void 0:l.duration}),Promise.resolve(!0)}function va({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:s=[0,0],nodeExtent:r,onError:i}){const l=n.get(e),c=l.parentId?n.get(l.parentId):void 0,{x:a,y:x}=c?c.internals.positionAbsolute:{x:0,y:0},d=l.origin??s;let p=r;if(l.extent==="parent"&&!l.expandParent)if(!c)i==null||i("005",Oe.error005());else{const f=c.measured.width,h=c.measured.height;f&&h&&(p=[[a,x],[a+f,x+h]])}else c&&ln(l.extent)&&(p=[[l.extent[0][0]+a,l.extent[0][1]+x],[l.extent[1][0]+a,l.extent[1][1]+x]]);const m=ln(p)?Ft(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(i==null||i("015",Oe.error015())),{position:{x:m.x-a+(l.measured.width??0)*d[0],y:m.y-x+(l.measured.height??0)*d[1]},positionAbsolute:m}}async function Uj({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:s,onBeforeDelete:r}){const i=new Set(e.map(m=>m.id)),l=[];for(const m of n){if(m.deletable===!1)continue;const f=i.has(m.id),h=!f&&m.parentId&&l.find(j=>j.id===m.parentId);(f||h)&&l.push(m)}const c=new Set(t.map(m=>m.id)),a=s.filter(m=>m.deletable!==!1),d=Kj(l,a);for(const m of a)c.has(m.id)&&!d.find(h=>h.id===m.id)&&d.push(m);if(!r)return{edges:d,nodes:l};const p=await r({nodes:l,edges:d});return typeof p=="boolean"?p?{edges:d,nodes:l}:{edges:[],nodes:[]}:p}const on=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ft=(e={x:0,y:0},t,n)=>({x:on(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:on(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function ka(e,t,n){const{width:s,height:r}=gt(n),{x:i,y:l}=n.internals.positionAbsolute;return Ft(e,[[i,l],[i+s,l+r]],t)}const vi=(e,t,n)=>e<t?on(Math.abs(e-t),1,t)/t:e>n?-on(Math.abs(e-n),1,t)/t:0,Ma=(e,t,n=15,s=40)=>{const r=vi(e.x,s,t.width-s)*n,i=vi(e.y,s,t.height-s)*n;return[r,i]},Ys=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Zo=({x:e,y:t,width:n,height:s})=>({x:e,y:t,x2:e+n,y2:t+s}),Gs=({x:e,y:t,x2:n,y2:s})=>({x:e,y:t,width:n-e,height:s-t}),rn=(e,t=[0,0])=>{var r,i;const{x:n,y:s}=Pr(e)?e.internals.positionAbsolute:Vn(e,t);return{x:n,y:s,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},vs=(e,t=[0,0])=>{var r,i;const{x:n,y:s}=Pr(e)?e.internals.positionAbsolute:Vn(e,t);return{x:n,y:s,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:s+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},_a=(e,t)=>Gs(Ys(Zo(e),Zo(t))),Tn=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),s=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*s)},ki=e=>Qe(e.width)&&Qe(e.height)&&Qe(e.x)&&Qe(e.y),Qe=e=>!isNaN(e)&&isFinite(e),ks=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},Ks=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Hn=({x:e,y:t},[n,s,r],i=!1,l=[1,1])=>{const c={x:(e-n)/r,y:(t-s)/r};return i?Ks(c,l):c},Ms=({x:e,y:t},[n,s,r])=>({x:e*r+n,y:t*r+s});function Kt(e,t){if(typeof e=="number")return Math.floor(t-t/(1+e));if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Jj(e,t,n){if(typeof e=="string"||typeof e=="number"){const s=Kt(e,n),r=Kt(e,t);return{top:s,right:r,bottom:s,left:r,x:r*2,y:s*2}}if(typeof e=="object"){const s=Kt(e.top??e.y??0,n),r=Kt(e.bottom??e.y??0,n),i=Kt(e.left??e.x??0,t),l=Kt(e.right??e.x??0,t);return{top:s,right:l,bottom:r,left:i,x:i+l,y:s+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Qj(e,t,n,s,r,i){const{x:l,y:c}=Ms(e,[t,n,s]),{x:a,y:x}=Ms({x:e.x+e.width,y:e.y+e.height},[t,n,s]),d=r-a,p=i-x;return{left:Math.floor(l),top:Math.floor(c),right:Math.floor(d),bottom:Math.floor(p)}}const Lr=(e,t,n,s,r,i)=>{const l=Jj(i,t,n),c=(t-l.x)/e.width,a=(n-l.y)/e.height,x=Math.min(c,a),d=on(x,s,r),p=e.x+e.width/2,m=e.y+e.height/2,f=t/2-p*d,h=n/2-m*d,j=Qj(e,f,h,d,t,n),y={left:Math.min(j.left-l.left,0),top:Math.min(j.top-l.top,0),right:Math.min(j.right-l.right,0),bottom:Math.min(j.bottom-l.bottom,0)};return{x:f-y.left+y.right,y:h-y.top+y.bottom,zoom:d}},_s=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ln(e){return e!==void 0&&e!=="parent"}function gt(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Pa(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function La(e,t={width:0,height:0},n,s,r){const i={...e},l=s.get(n);if(l){const c=l.origin||r;i.x+=l.internals.positionAbsolute.x-(t.width??0)*c[0],i.y+=l.internals.positionAbsolute.y-(t.height??0)*c[1]}return i}function Mi(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function bn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:s,containerBounds:r}){const{x:i,y:l}=dt(e),c=Hn({x:i-((r==null?void 0:r.left)??0),y:l-((r==null?void 0:r.top)??0)},s),{x:a,y:x}=n?Ks(c,t):c;return{xSnapped:a,ySnapped:x,...c}}const Nr=e=>({width:e.offsetWidth,height:e.offsetHeight}),Na=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},e3=["INPUT","SELECT","TEXTAREA"];function Ta(e){var s,r;const t=((r=(s=e.composedPath)==null?void 0:s.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:e3.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const $a=e=>"clientX"in e,dt=(e,t)=>{var i,l;const n=$a(e),s=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,r=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:s-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},_i=(e,t,n,s,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:r,position:l.getAttribute("data-handlepos"),x:(c.left-n.left)/s,y:(c.top-n.top)/s,...Nr(l)}})};function Aa({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:r,sourceControlY:i,targetControlX:l,targetControlY:c}){const a=e*.125+r*.375+l*.375+n*.125,x=t*.125+i*.375+c*.375+s*.125,d=Math.abs(a-e),p=Math.abs(x-t);return[a,x,d,p]}function Jn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Pi({pos:e,x1:t,y1:n,x2:s,y2:r,c:i}){switch(e){case U.Left:return[t-Jn(t-s,i),n];case U.Right:return[t+Jn(s-t,i),n];case U.Top:return[t,n-Jn(n-r,i)];case U.Bottom:return[t,n+Jn(r-n,i)]}}function Ia({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top,curvature:l=.25}){const[c,a]=Pi({pos:n,x1:e,y1:t,x2:s,y2:r,c:l}),[x,d]=Pi({pos:i,x1:s,y1:r,x2:e,y2:t,c:l}),[p,m,f,h]=Aa({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:c,sourceControlY:a,targetControlX:x,targetControlY:d});return[`M${e},${t} C${c},${a} ${x},${d} ${s},${r}`,p,m,f,h]}function za({sourceX:e,sourceY:t,targetX:n,targetY:s}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,l=Math.abs(s-t)/2,c=s<t?s+l:s-l;return[i,c,r,l]}function t3({sourceNode:e,targetNode:t,selected:n=!1,zIndex:s=0,elevateOnSelect:r=!1}){if(!r)return s;const i=n||t.selected||e.selected,l=Math.max(e.internals.z||0,t.internals.z||0,1e3);return s+(i?l:0)}function n3({sourceNode:e,targetNode:t,width:n,height:s,transform:r}){const i=Ys(vs(e),vs(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const l={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:s/r[2]};return Tn(l,Gs(i))>0}const Ba=({source:e,sourceHandle:t,target:n,targetHandle:s})=>`xy-edge__${e}${t||""}-${n}${s||""}`,s3=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Da=(e,t)=>{if(!e.source||!e.target)return ks("006",Oe.error006()),t;let n;return ba(e)?n={...e}:n={...e,id:Ba(e)},s3(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))},o3=(e,t,n,s={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return ks("006",Oe.error006()),n;if(!n.find(a=>a.id===e.id))return ks("007",Oe.error007(r)),n;const c={...i,id:s.shouldReplaceId?Ba(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(a=>a.id!==r).concat(c)};function Oa({sourceX:e,sourceY:t,targetX:n,targetY:s}){const[r,i,l,c]=za({sourceX:e,sourceY:t,targetX:n,targetY:s});return[`M ${e},${t}L ${n},${s}`,r,i,l,c]}const Li={[U.Left]:{x:-1,y:0},[U.Right]:{x:1,y:0},[U.Top]:{x:0,y:-1},[U.Bottom]:{x:0,y:1}},r3=({source:e,sourcePosition:t=U.Bottom,target:n})=>t===U.Left||t===U.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Ni=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function i3({source:e,sourcePosition:t=U.Bottom,target:n,targetPosition:s=U.Top,center:r,offset:i}){const l=Li[t],c=Li[s],a={x:e.x+l.x*i,y:e.y+l.y*i},x={x:n.x+c.x*i,y:n.y+c.y*i},d=r3({source:a,sourcePosition:t,target:x}),p=d.x!==0?"x":"y",m=d[p];let f=[],h,j;const y={x:0,y:0},S={x:0,y:0},[w,E,C,N]=za({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]===-1){h=r.x??w,j=r.y??E;const P=[{x:h,y:a.y},{x:h,y:x.y}],D=[{x:a.x,y:j},{x:x.x,y:j}];l[p]===m?f=p==="x"?P:D:f=p==="x"?D:P}else{const P=[{x:a.x,y:x.y}],D=[{x:x.x,y:a.y}];if(p==="x"?f=l.x===m?D:P:f=l.y===m?P:D,t===s){const M=Math.abs(e[p]-n[p]);if(M<=i){const R=Math.min(i-1,i-M);l[p]===m?y[p]=(a[p]>e[p]?-1:1)*R:S[p]=(x[p]>n[p]?-1:1)*R}}if(t!==s){const M=p==="x"?"y":"x",R=l[p]===c[M],k=a[M]>x[M],v=a[M]<x[M];(l[p]===1&&(!R&&k||R&&v)||l[p]!==1&&(!R&&v||R&&k))&&(f=p==="x"?P:D)}const I={x:a.x+y.x,y:a.y+y.y},z={x:x.x+S.x,y:x.y+S.y},F=Math.max(Math.abs(I.x-f[0].x),Math.abs(z.x-f[0].x)),O=Math.max(Math.abs(I.y-f[0].y),Math.abs(z.y-f[0].y));F>=O?(h=(I.x+z.x)/2,j=f[0].y):(h=f[0].x,j=(I.y+z.y)/2)}return[[e,{x:a.x+y.x,y:a.y+y.y},...f,{x:x.x+S.x,y:x.y+S.y},n],h,j,C,N]}function l3(e,t,n,s){const r=Math.min(Ni(e,t)/2,Ni(t,n)/2,s),{x:i,y:l}=t;if(e.x===i&&i===n.x||e.y===l&&l===n.y)return`L${i} ${l}`;if(e.y===l){const x=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+r*x},${l}Q ${i},${l} ${i},${l+r*d}`}const c=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${l+r*a}Q ${i},${l} ${i+r*c},${l}`}function Wo({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top,borderRadius:l=5,centerX:c,centerY:a,offset:x=20}){const[d,p,m,f,h]=i3({source:{x:e,y:t},sourcePosition:n,target:{x:s,y:r},targetPosition:i,center:{x:c,y:a},offset:x});return[d.reduce((y,S,w)=>{let E="";return w>0&&w<d.length-1?E=l3(d[w-1],S,d[w+1],l):E=`${w===0?"M":"L"}${S.x} ${S.y}`,y+=E,y},""),p,m,f,h]}function Ti(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function c3(e){var p;const{sourceNode:t,targetNode:n}=e;if(!Ti(t)||!Ti(n))return null;const s=t.internals.handleBounds||$i(t.handles),r=n.internals.handleBounds||$i(n.handles),i=Ai((s==null?void 0:s.source)??[],e.sourceHandle),l=Ai(e.connectionMode===Vt.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!i||!l)return(p=e.onError)==null||p.call(e,"008",Oe.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(i==null?void 0:i.position)||U.Bottom,a=(l==null?void 0:l.position)||U.Top,x=$n(t,i,c),d=$n(n,l,a);return{sourceX:x.x,sourceY:x.y,targetX:d.x,targetY:d.y,sourcePosition:c,targetPosition:a}}function $i(e){if(!e)return null;const t=[],n=[];for(const s of e)s.width=s.width??1,s.height=s.height??1,s.type==="source"?t.push(s):s.type==="target"&&n.push(s);return{source:t,target:n}}function $n(e,t,n=U.Left,s=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:l,height:c}=t??gt(e);if(s)return{x:r+l/2,y:i+c/2};switch((t==null?void 0:t.position)??n){case U.Top:return{x:r+l/2,y:i};case U.Right:return{x:r+l,y:i+c/2};case U.Bottom:return{x:r+l/2,y:i+c};case U.Left:return{x:r,y:i+c/2}}}function Ai(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Yo(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function a3(e,{id:t,defaultColor:n,defaultMarkerStart:s,defaultMarkerEnd:r}){const i=new Set;return e.reduce((l,c)=>([c.markerStart||s,c.markerEnd||r].forEach(a=>{if(a&&typeof a=="object"){const x=Yo(a,t);i.has(x)||(l.push({id:x,color:a.color||n,...a}),i.add(x))}}),l),[]).sort((l,c)=>l.id.localeCompare(c.id))}const Tr={nodeOrigin:[0,0],nodeExtent:Nn,elevateNodesOnSelect:!0,defaults:{}},u3={...Tr,checkEquality:!0};function $r(e,t){const n={...e};for(const s in t)t[s]!==void 0&&(n[s]=t[s]);return n}function x3(e,t,n){const s=$r(Tr,n);for(const r of e.values())if(r.parentId)Ar(r,e,t,s);else{const i=Vn(r,s.nodeOrigin),l=ln(r.extent)?r.extent:s.nodeExtent,c=Ft(i,l,gt(r));r.internals.positionAbsolute=c}}function Go(e,t,n,s){var a,x;const r=$r(u3,s);let i=!0;const l=new Map(t),c=r!=null&&r.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const d of e){let p=l.get(d.id);if(r.checkEquality&&d===(p==null?void 0:p.internals.userNode))t.set(d.id,p);else{const m=Vn(d,r.nodeOrigin),f=ln(d.extent)?d.extent:r.nodeExtent,h=Ft(m,f,gt(d));p={...r.defaults,...d,measured:{width:(a=d.measured)==null?void 0:a.width,height:(x=d.measured)==null?void 0:x.height},internals:{positionAbsolute:h,handleBounds:d.measured?p==null?void 0:p.internals.handleBounds:void 0,z:Va(d,c),userNode:d}},t.set(d.id,p)}(!p.measured||!p.measured.width||!p.measured.height)&&!p.hidden&&(i=!1),d.parentId&&Ar(p,t,n,s)}return i}function d3(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ar(e,t,n,s){const{elevateNodesOnSelect:r,nodeOrigin:i,nodeExtent:l}=$r(Tr,s),c=e.parentId,a=t.get(c);if(!a){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}d3(e,n);const x=r?1e3:0,{x:d,y:p,z:m}=p3(e,a,i,l,x),{positionAbsolute:f}=e.internals,h=d!==f.x||p!==f.y;(h||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:p}:f,z:m}})}function Va(e,t){return(Qe(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function p3(e,t,n,s,r){const{x:i,y:l}=t.internals.positionAbsolute,c=gt(e),a=Vn(e,n),x=ln(e.extent)?Ft(a,e.extent,c):a;let d=Ft({x:i+x.x,y:l+x.y},s,c);e.extent==="parent"&&(d=ka(d,c,t));const p=Va(e,r),m=t.internals.z??0;return{x:d.x,y:d.y,z:m>p?m:p}}function Ir(e,t,n,s=[0,0]){var l;const r=[],i=new Map;for(const c of e){const a=t.get(c.parentId);if(!a)continue;const x=((l=i.get(c.parentId))==null?void 0:l.expandedRect)??rn(a),d=_a(x,c.rect);i.set(c.parentId,{expandedRect:d,parent:a})}return i.size>0&&i.forEach(({expandedRect:c,parent:a},x)=>{var E;const d=a.internals.positionAbsolute,p=gt(a),m=a.origin??s,f=c.x<d.x?Math.round(Math.abs(d.x-c.x)):0,h=c.y<d.y?Math.round(Math.abs(d.y-c.y)):0,j=Math.max(p.width,Math.round(c.width)),y=Math.max(p.height,Math.round(c.height)),S=(j-p.width)*m[0],w=(y-p.height)*m[1];(f>0||h>0||S||w)&&(r.push({id:x,type:"position",position:{x:a.position.x-f+S,y:a.position.y-h+w}}),(E=n.get(x))==null||E.forEach(C=>{e.some(N=>N.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+f,y:C.position.y+h}})})),(p.width<c.width||p.height<c.height||f||h)&&r.push({id:x,type:"dimensions",setAttributes:!0,dimensions:{width:j+(f?m[0]*f-S:0),height:y+(h?m[1]*h-w:0)}})}),r}function m3(e,t,n,s,r,i){const l=s==null?void 0:s.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const a=[],x=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(x.transform),p=[];for(const m of e.values()){const f=t.get(m.id);if(!f)continue;if(f.hidden){t.set(f.id,{...f,internals:{...f.internals,handleBounds:void 0}}),c=!0;continue}const h=Nr(m.nodeElement),j=f.measured.width!==h.width||f.measured.height!==h.height;if(!!(h.width&&h.height&&(j||!f.internals.handleBounds||m.force))){const S=m.nodeElement.getBoundingClientRect(),w=ln(f.extent)?f.extent:i;let{positionAbsolute:E}=f.internals;f.parentId&&f.extent==="parent"?E=ka(E,h,t.get(f.parentId)):w&&(E=Ft(E,w,h));const C={...f,measured:h,internals:{...f.internals,positionAbsolute:E,handleBounds:{source:_i("source",m.nodeElement,S,d,f.id),target:_i("target",m.nodeElement,S,d,f.id)}}};t.set(f.id,C),f.parentId&&Ar(C,t,n,{nodeOrigin:r}),c=!0,j&&(a.push({id:f.id,type:"dimensions",dimensions:h}),f.expandParent&&f.parentId&&p.push({id:f.id,parentId:f.parentId,rect:rn(C,r)}))}}if(p.length>0){const m=Ir(p,t,n,r);a.push(...m)}return{changes:a,updatedInternals:c}}async function f3({delta:e,panZoom:t,transform:n,translateExtent:s,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],s),c=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(c)}function Ii(e,t,n,s,r,i){let l=r;const c=s.get(l)||new Map;s.set(l,c.set(n,t)),l=`${r}-${e}`;const a=s.get(l)||new Map;if(s.set(l,a.set(n,t)),i){l=`${r}-${e}-${i}`;const x=s.get(l)||new Map;s.set(l,x.set(n,t))}}function Fa(e,t,n){e.clear(),t.clear();for(const s of n){const{source:r,target:i,sourceHandle:l=null,targetHandle:c=null}=s,a={edgeId:s.id,source:r,target:i,sourceHandle:l,targetHandle:c},x=`${r}-${l}--${i}-${c}`,d=`${i}-${c}--${r}-${l}`;Ii("source",a,d,e,r,l),Ii("target",a,x,e,i,c),t.set(s.id,s)}}function Ha(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ha(n,t):!1}function zi(e,t,n){var r;let s=e;do{if((r=s==null?void 0:s.matches)!=null&&r.call(s,t))return!0;if(s===n)return!1;s=s==null?void 0:s.parentElement}while(s);return!1}function h3(e,t,n,s){const r=new Map;for(const[i,l]of e)if((l.selected||l.id===s)&&(!l.parentId||!Ha(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const c=e.get(i);c&&r.set(i,{id:i,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return r}function Eo({nodeId:e,dragItems:t,nodeLookup:n,dragging:s=!0}){var l,c,a;const r=[];for(const[x,d]of t){const p=(l=n.get(x))==null?void 0:l.internals.userNode;p&&r.push({...p,position:d.position,dragging:s})}if(!e)return[r[0],r];const i=(c=n.get(e))==null?void 0:c.internals.userNode;return[i?{...i,position:((a=t.get(e))==null?void 0:a.position)||i.position,dragging:s}:r[0],r]}function g3({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:s,onDragStop:r}){let i={x:null,y:null},l=0,c=new Map,a=!1,x={x:0,y:0},d=null,p=!1,m=null,f=!1;function h({noDragClassName:y,handleSelector:S,domNode:w,isSelectable:E,nodeId:C,nodeClickDistance:N=0}){m=Ye(w);function T({x:z,y:F},O){const{nodeLookup:M,nodeExtent:R,snapGrid:k,snapToGrid:v,nodeOrigin:_,onNodeDrag:A,onSelectionDrag:$,onError:V,updateNodePositions:H}=t();i={x:z,y:F};let W=!1,ee={x:0,y:0,x2:0,y2:0};if(c.size>1&&R){const te=Fn(c);ee=Zo(te)}for(const[te,se]of c){if(!M.has(te))continue;let oe={x:z-se.distance.x,y:F-se.distance.y};v&&(oe=Ks(oe,k));let J=[[R[0][0],R[0][1]],[R[1][0],R[1][1]]];if(c.size>1&&R&&!se.extent){const{positionAbsolute:Me}=se.internals,pe=Me.x-ee.x+R[0][0],G=Me.x+se.measured.width-ee.x2+R[1][0],ae=Me.y-ee.y+R[0][1],ue=Me.y+se.measured.height-ee.y2+R[1][1];J=[[pe,ae],[G,ue]]}const{position:le,positionAbsolute:he}=va({nodeId:te,nextPosition:oe,nodeLookup:M,nodeExtent:J,nodeOrigin:_,onError:V});W=W||se.position.x!==le.x||se.position.y!==le.y,se.position=le,se.internals.positionAbsolute=he}if(W&&(H(c,!0),O&&(s||A||!C&&$))){const[te,se]=Eo({nodeId:C,dragItems:c,nodeLookup:M});s==null||s(O,c,te,se),A==null||A(O,te,se),C||$==null||$(O,se)}}async function P(){if(!d)return;const{transform:z,panBy:F,autoPanSpeed:O,autoPanOnNodeDrag:M}=t();if(!M){a=!1,cancelAnimationFrame(l);return}const[R,k]=Ma(x,d,O);(R!==0||k!==0)&&(i.x=(i.x??0)-R/z[2],i.y=(i.y??0)-k/z[2],await F({x:R,y:k})&&T(i,null)),l=requestAnimationFrame(P)}function D(z){var W;const{nodeLookup:F,multiSelectionActive:O,nodesDraggable:M,transform:R,snapGrid:k,snapToGrid:v,selectNodesOnDrag:_,onNodeDragStart:A,onSelectionDragStart:$,unselectNodesAndEdges:V}=t();p=!0,(!_||!E)&&!O&&C&&((W=F.get(C))!=null&&W.selected||V()),E&&_&&C&&(e==null||e(C));const H=bn(z.sourceEvent,{transform:R,snapGrid:k,snapToGrid:v,containerBounds:d});if(i=H,c=h3(F,M,H,C),c.size>0&&(n||A||!C&&$)){const[ee,te]=Eo({nodeId:C,dragItems:c,nodeLookup:F});n==null||n(z.sourceEvent,c,ee,te),A==null||A(z.sourceEvent,ee,te),C||$==null||$(z.sourceEvent,te)}}const I=xa().clickDistance(N).on("start",z=>{const{domNode:F,nodeDragThreshold:O,transform:M,snapGrid:R,snapToGrid:k}=t();d=(F==null?void 0:F.getBoundingClientRect())||null,f=!1,O===0&&D(z),i=bn(z.sourceEvent,{transform:M,snapGrid:R,snapToGrid:k,containerBounds:d}),x=dt(z.sourceEvent,d)}).on("drag",z=>{const{autoPanOnNodeDrag:F,transform:O,snapGrid:M,snapToGrid:R,nodeDragThreshold:k,nodeLookup:v}=t(),_=bn(z.sourceEvent,{transform:O,snapGrid:M,snapToGrid:R,containerBounds:d});if((z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||C&&!v.has(C))&&(f=!0),!f){if(!a&&F&&p&&(a=!0,P()),!p){const A=_.xSnapped-(i.x??0),$=_.ySnapped-(i.y??0);Math.sqrt(A*A+$*$)>k&&D(z)}(i.x!==_.xSnapped||i.y!==_.ySnapped)&&c&&p&&(x=dt(z.sourceEvent,d),T(_,z.sourceEvent))}}).on("end",z=>{if(!(!p||f)&&(a=!1,p=!1,cancelAnimationFrame(l),c.size>0)){const{nodeLookup:F,updateNodePositions:O,onNodeDragStop:M,onSelectionDragStop:R}=t();if(O(c,!1),r||M||!C&&R){const[k,v]=Eo({nodeId:C,dragItems:c,nodeLookup:F,dragging:!1});r==null||r(z.sourceEvent,c,k,v),M==null||M(z.sourceEvent,k,v),C||R==null||R(z.sourceEvent,v)}}}).filter(z=>{const F=z.target;return!z.button&&(!y||!zi(F,`.${y}`,w))&&(!S||zi(F,S,w))});m.call(I)}function j(){m==null||m.on(".drag",null)}return{update:h,destroy:j}}function j3(e,t,n){const s=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Tn(r,rn(i))>0&&s.push(i);return s}const E3=250;function y3(e,t,n,s){var c,a;let r=[],i=1/0;const l=j3(e,n,t+E3);for(const x of l){const d=[...((c=x.internals.handleBounds)==null?void 0:c.source)??[],...((a=x.internals.handleBounds)==null?void 0:a.target)??[]];for(const p of d){if(s.nodeId===p.nodeId&&s.type===p.type&&s.id===p.id)continue;const{x:m,y:f}=$n(x,p,p.position,!0),h=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(f-e.y,2));h>t||(h<i?(r=[{...p,x:m,y:f}],i=h):h===i&&r.push({...p,x:m,y:f}))}}if(!r.length)return null;if(r.length>1){const x=s.type==="source"?"target":"source";return r.find(d=>d.type===x)??r[0]}return r[0]}function Za(e,t,n,s,r,i=!1){var x,d,p;const l=s.get(e);if(!l)return null;const c=r==="strict"?(x=l.internals.handleBounds)==null?void 0:x[t]:[...((d=l.internals.handleBounds)==null?void 0:d.source)??[],...((p=l.internals.handleBounds)==null?void 0:p.target)??[]],a=(n?c==null?void 0:c.find(m=>m.id===n):c==null?void 0:c[0])??null;return a&&i?{...a,...$n(l,a,a.position,!0)}:a}function Wa(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function S3(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Ya=()=>!0;function R3(e,{connectionMode:t,connectionRadius:n,handleId:s,nodeId:r,edgeUpdaterType:i,isTarget:l,domNode:c,nodeLookup:a,lib:x,autoPanOnConnect:d,flowId:p,panBy:m,cancelConnection:f,onConnectStart:h,onConnect:j,onConnectEnd:y,isValidConnection:S=Ya,onReconnectEnd:w,updateConnection:E,getTransform:C,getFromHandle:N,autoPanSpeed:T}){const P=Na(e.target);let D=0,I;const{x:z,y:F}=dt(e),O=P==null?void 0:P.elementFromPoint(z,F),M=Wa(i,O),R=c==null?void 0:c.getBoundingClientRect();if(!R||!M)return;const k=Za(r,M,s,a,t);if(!k)return;let v=dt(e,R),_=!1,A=null,$=!1,V=null;function H(){if(!d||!R)return;const[he,Me]=Ma(v,R,T);m({x:he,y:Me}),D=requestAnimationFrame(H)}const W={...k,nodeId:r,type:M,position:k.position},ee=a.get(r),se={inProgress:!0,isValid:null,from:$n(ee,W,U.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:ee,to:v,toHandle:null,toPosition:wi[W.position],toNode:null};E(se);let oe=se;h==null||h(e,{nodeId:r,handleId:s,handleType:M});function J(he){if(!N()||!W){le(he);return}const Me=C();v=dt(he,R),I=y3(Hn(v,Me,!1,[1,1]),n,a,W),_||(H(),_=!0);const pe=Ga(he,{handle:I,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:l?"target":"source",isValidConnection:S,doc:P,lib:x,flowId:p,nodeLookup:a});V=pe.handleDomNode,A=pe.connection,$=S3(!!I,pe.isValid);const G={...oe,isValid:$,to:I&&$?Ms({x:I.x,y:I.y},Me):v,toHandle:pe.toHandle,toPosition:$&&pe.toHandle?pe.toHandle.position:wi[W.position],toNode:pe.toHandle?a.get(pe.toHandle.nodeId):null};$&&I&&oe.toHandle&&G.toHandle&&oe.toHandle.type===G.toHandle.type&&oe.toHandle.nodeId===G.toHandle.nodeId&&oe.toHandle.id===G.toHandle.id&&oe.to.x===G.to.x&&oe.to.y===G.to.y||(E(G),oe=G)}function le(he){(I||V)&&A&&$&&(j==null||j(A));const{inProgress:Me,...pe}=oe,G={...pe,toPosition:oe.toHandle?oe.toPosition:null};y==null||y(he,G),i&&(w==null||w(he,G)),f(),cancelAnimationFrame(D),_=!1,$=!1,A=null,V=null,P.removeEventListener("mousemove",J),P.removeEventListener("mouseup",le),P.removeEventListener("touchmove",J),P.removeEventListener("touchend",le)}P.addEventListener("mousemove",J),P.addEventListener("mouseup",le),P.addEventListener("touchmove",J),P.addEventListener("touchend",le)}function Ga(e,{handle:t,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:i,doc:l,lib:c,flowId:a,isValidConnection:x=Ya,nodeLookup:d}){const p=i==="target",m=t?l.querySelector(`.${c}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:f,y:h}=dt(e),j=l.elementFromPoint(f,h),y=j!=null&&j.classList.contains(`${c}-flow__handle`)?j:m,S={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const w=Wa(void 0,y),E=y.getAttribute("data-nodeid"),C=y.getAttribute("data-handleid"),N=y.classList.contains("connectable"),T=y.classList.contains("connectableend");if(!E||!w)return S;const P={source:p?E:s,sourceHandle:p?C:r,target:p?s:E,targetHandle:p?r:C};S.connection=P;const I=N&&T&&(n===Vt.Strict?p&&w==="source"||!p&&w==="target":E!==s||C!==r);S.isValid=I&&x(P),S.toHandle=Za(E,w,C,d,n,!1)}return S}const Ko={onPointerDown:R3,isValid:Ga};function C3({domNode:e,panZoom:t,getTransform:n,getViewScale:s}){const r=Ye(e);function i({translateExtent:c,width:a,height:x,zoomStep:d=10,pannable:p=!0,zoomable:m=!0,inversePan:f=!1}){const h=E=>{const C=n();if(E.sourceEvent.type!=="wheel"||!t)return;const N=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*d,T=C[2]*Math.pow(2,N);t.scaleTo(T)};let j=[0,0];const y=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(j=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},S=E=>{const C=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const N=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],T=[N[0]-j[0],N[1]-j[1]];j=N;const P=s()*Math.max(C[2],Math.log(C[2]))*(f?-1:1),D={x:C[0]-T[0]*P,y:C[1]-T[1]*P},I=[[0,0],[a,x]];t.setViewportConstrained({x:D.x,y:D.y,zoom:C[2]},I,c)},w=ya().on("start",y).on("zoom",p?S:null).on("zoom.wheel",m?h:null);r.call(w,{})}function l(){r.on("zoom",null)}return{update:i,destroy:l,pointer:Je}}const b3=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,qs=e=>({x:e.x,y:e.y,zoom:e.k}),yo=({x:e,y:t,zoom:n})=>Ws.translate(e,t).scale(n),Xt=(e,t)=>e.target.closest(`.${t}`),Ka=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),So=(e,t=0,n=()=>{})=>{const s=typeof t=="number"&&t>0;return s||n(),s?e.transition().duration(t).on("end",n):e},qa=e=>{const t=e.ctrlKey&&_s()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function w3({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:s,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:a,onPanZoomEnd:x}){return d=>{if(Xt(d,t))return!1;d.preventDefault(),d.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(d.ctrlKey&&l){const y=Je(d),S=qa(d),w=p*Math.pow(2,S);s.scaleTo(n,w,y,d);return}const m=d.deltaMode===1?20:1;let f=r===It.Vertical?0:d.deltaX*m,h=r===It.Horizontal?0:d.deltaY*m;!_s()&&d.shiftKey&&r!==It.Vertical&&(f=d.deltaY*m,h=0),s.translateBy(n,-(f/p)*i,-(h/p)*i,{internal:!0});const j=qs(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,c==null||c(d,j)),e.isPanScrolling&&(a==null||a(d,j),e.panScrollTimeout=setTimeout(()=>{x==null||x(d,j),e.isPanScrolling=!1},150))}}function v3({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(s,r){const i=s.type==="wheel",l=!t&&i&&!s.ctrlKey,c=Xt(s,e);if(s.ctrlKey&&i&&c&&s.preventDefault(),l||c)return null;s.preventDefault(),n.call(this,s,r)}}function k3({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return s=>{var i,l,c;if((i=s.sourceEvent)!=null&&i.internal)return;const r=qs(s.transform);e.mouseButton=((l=s.sourceEvent)==null?void 0:l.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((c=s.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(s.sourceEvent,r))}}function M3({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:s,onPanZoom:r}){return i=>{var l,c;e.usedRightMouseButton=!!(n&&Ka(t,e.mouseButton??0)),(l=i.sourceEvent)!=null&&l.sync||s([i.transform.x,i.transform.y,i.transform.k]),r&&!((c=i.sourceEvent)!=null&&c.internal)&&(r==null||r(i.sourceEvent,qs(i.transform)))}}function _3({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:s,onPanZoomEnd:r,onPaneContextMenu:i}){return l=>{var c;if(!((c=l.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,i&&Ka(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&i(l.sourceEvent),e.usedRightMouseButton=!1,s(!1),r&&b3(e.prevViewport,l.transform))){const a=qs(l.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(l.sourceEvent,a)},n?150:0)}}}function P3({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:s,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:l,noWheelClassName:c,noPanClassName:a,lib:x}){return d=>{var h;const p=e||t,m=n&&d.ctrlKey;if(d.button===1&&d.type==="mousedown"&&(Xt(d,`${x}-flow__node`)||Xt(d,`${x}-flow__edge`)))return!0;if(!s&&!p&&!r&&!i&&!n||l||Xt(d,c)&&d.type==="wheel"||Xt(d,a)&&(d.type!=="wheel"||r&&d.type==="wheel"&&!e)||!n&&d.ctrlKey&&d.type==="wheel")return!1;if(!n&&d.type==="touchstart"&&((h=d.touches)==null?void 0:h.length)>1)return d.preventDefault(),!1;if(!p&&!r&&!m&&d.type==="wheel"||!s&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(s)&&!s.includes(d.button)&&d.type==="mousedown")return!1;const f=Array.isArray(s)&&s.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||d.type==="wheel")&&f}}function L3({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:s,translateExtent:r,viewport:i,onPanZoom:l,onPanZoomStart:c,onPanZoomEnd:a,onDraggingChange:x}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),m=ya().clickDistance(!Qe(s)||s<0?0:s).scaleExtent([t,n]).translateExtent(r),f=Ye(e).call(m);E({x:i.x,y:i.y,zoom:on(i.zoom,t,n)},[[0,0],[p.width,p.height]],r);const h=f.on("wheel.zoom"),j=f.on("dblclick.zoom");m.wheelDelta(qa);function y(O,M){return f?new Promise(R=>{m==null||m.transform(So(f,M==null?void 0:M.duration,()=>R(!0)),O)}):Promise.resolve(!1)}function S({noWheelClassName:O,noPanClassName:M,onPaneContextMenu:R,userSelectionActive:k,panOnScroll:v,panOnDrag:_,panOnScrollMode:A,panOnScrollSpeed:$,preventScrolling:V,zoomOnPinch:H,zoomOnScroll:W,zoomOnDoubleClick:ee,zoomActivationKeyPressed:te,lib:se,onTransformChange:oe}){k&&!d.isZoomingOrPanning&&w();const le=v&&!te&&!k?w3({zoomPanValues:d,noWheelClassName:O,d3Selection:f,d3Zoom:m,panOnScrollMode:A,panOnScrollSpeed:$,zoomOnPinch:H,onPanZoomStart:c,onPanZoom:l,onPanZoomEnd:a}):v3({noWheelClassName:O,preventScrolling:V,d3ZoomHandler:h});if(f.on("wheel.zoom",le,{passive:!1}),!k){const Me=k3({zoomPanValues:d,onDraggingChange:x,onPanZoomStart:c});m.on("start",Me);const pe=M3({zoomPanValues:d,panOnDrag:_,onPaneContextMenu:!!R,onPanZoom:l,onTransformChange:oe});m.on("zoom",pe);const G=_3({zoomPanValues:d,panOnDrag:_,panOnScroll:v,onPaneContextMenu:R,onPanZoomEnd:a,onDraggingChange:x});m.on("end",G)}const he=P3({zoomActivationKeyPressed:te,panOnDrag:_,zoomOnScroll:W,panOnScroll:v,zoomOnDoubleClick:ee,zoomOnPinch:H,userSelectionActive:k,noPanClassName:M,noWheelClassName:O,lib:se});m.filter(he),ee?f.on("dblclick.zoom",j):f.on("dblclick.zoom",null)}function w(){m.on("zoom",null)}async function E(O,M,R){const k=yo(O),v=m==null?void 0:m.constrain()(k,M,R);return v&&await y(v),new Promise(_=>_(v))}async function C(O,M){const R=yo(O);return await y(R,M),new Promise(k=>k(R))}function N(O){if(f){const M=yo(O),R=f.property("__zoom");(R.k!==O.zoom||R.x!==O.x||R.y!==O.y)&&(m==null||m.transform(f,M,null,{sync:!0}))}}function T(){const O=f?Ea(f.node()):{x:0,y:0,k:1};return{x:O.x,y:O.y,zoom:O.k}}function P(O,M){return f?new Promise(R=>{m==null||m.scaleTo(So(f,M==null?void 0:M.duration,()=>R(!0)),O)}):Promise.resolve(!1)}function D(O,M){return f?new Promise(R=>{m==null||m.scaleBy(So(f,M==null?void 0:M.duration,()=>R(!0)),O)}):Promise.resolve(!1)}function I(O){m==null||m.scaleExtent(O)}function z(O){m==null||m.translateExtent(O)}function F(O){const M=!Qe(O)||O<0?0:O;m==null||m.clickDistance(M)}return{update:S,destroy:w,setViewport:C,setViewportConstrained:E,getViewport:T,scaleTo:P,scaleBy:D,setScaleExtent:I,setTranslateExtent:z,syncViewport:N,setClickDistance:F}}var wn;(function(e){e.Line="line",e.Handle="handle"})(wn||(wn={}));function N3({width:e,prevWidth:t,height:n,prevHeight:s,affectsX:r,affectsY:i}){const l=e-t,c=n-s,a=[l>0?1:l<0?-1:0,c>0?1:c<0?-1:0];return l&&r&&(a[0]=a[0]*-1),c&&i&&(a[1]=a[1]*-1),a}function T3(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),s=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:s,affectsY:r}}function Et(e,t){return Math.max(0,t-e)}function yt(e,t){return Math.max(0,e-t)}function Qn(e,t,n){return Math.max(0,t-e,e-n)}function Bi(e,t){return e?!t:t}function $3(e,t,n,s,r,i,l,c){let{affectsX:a,affectsY:x}=t;const{isHorizontal:d,isVertical:p}=t,m=d&&p,{xSnapped:f,ySnapped:h}=n,{minWidth:j,maxWidth:y,minHeight:S,maxHeight:w}=s,{x:E,y:C,width:N,height:T,aspectRatio:P}=e;let D=Math.floor(d?f-e.pointerX:0),I=Math.floor(p?h-e.pointerY:0);const z=N+(a?-D:D),F=T+(x?-I:I),O=-i[0]*N,M=-i[1]*T;let R=Qn(z,j,y),k=Qn(F,S,w);if(l){let A=0,$=0;a&&D<0?A=Et(E+D+O,l[0][0]):!a&&D>0&&(A=yt(E+z+O,l[1][0])),x&&I<0?$=Et(C+I+M,l[0][1]):!x&&I>0&&($=yt(C+F+M,l[1][1])),R=Math.max(R,A),k=Math.max(k,$)}if(c){let A=0,$=0;a&&D>0?A=yt(E+D,c[0][0]):!a&&D<0&&(A=Et(E+z,c[1][0])),x&&I>0?$=yt(C+I,c[0][1]):!x&&I<0&&($=Et(C+F,c[1][1])),R=Math.max(R,A),k=Math.max(k,$)}if(r){if(d){const A=Qn(z/P,S,w)*P;if(R=Math.max(R,A),l){let $=0;!a&&!x||a&&!x&&m?$=yt(C+M+z/P,l[1][1])*P:$=Et(C+M+(a?D:-D)/P,l[0][1])*P,R=Math.max(R,$)}if(c){let $=0;!a&&!x||a&&!x&&m?$=Et(C+z/P,c[1][1])*P:$=yt(C+(a?D:-D)/P,c[0][1])*P,R=Math.max(R,$)}}if(p){const A=Qn(F*P,j,y)/P;if(k=Math.max(k,A),l){let $=0;!a&&!x||x&&!a&&m?$=yt(E+F*P+O,l[1][0])/P:$=Et(E+(x?I:-I)*P+O,l[0][0])/P,k=Math.max(k,$)}if(c){let $=0;!a&&!x||x&&!a&&m?$=Et(E+F*P,c[1][0])/P:$=yt(E+(x?I:-I)*P,c[0][0])/P,k=Math.max(k,$)}}}I=I+(I<0?k:-k),D=D+(D<0?R:-R),r&&(m?z>F*P?I=(Bi(a,x)?-D:D)/P:D=(Bi(a,x)?-I:I)*P:d?(I=D/P,x=a):(D=I*P,a=x));const v=a?E+D:E,_=x?C+I:C;return{width:N+(a?-D:D),height:T+(x?-I:I),x:i[0]*D*(a?-1:1)+v,y:i[1]*I*(x?-1:1)+_}}const Xa={width:0,height:0,x:0,y:0},A3={...Xa,pointerX:0,pointerY:0,aspectRatio:1};function I3(e){return[[0,0],[e.measured.width,e.measured.height]]}function z3(e,t,n){const s=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,l=e.measured.height??0,c=n[0]*i,a=n[1]*l;return[[s-c,r-a],[s+i-c,r+l-a]]}function B3({domNode:e,nodeId:t,getStoreItems:n,onChange:s,onEnd:r}){const i=Ye(e);function l({controlPosition:a,boundaries:x,keepAspectRatio:d,onResizeStart:p,onResize:m,onResizeEnd:f,shouldResize:h}){let j={...Xa},y={...A3};const S=T3(a);let w,E=null,C=[],N,T,P;const D=xa().on("start",I=>{const{nodeLookup:z,transform:F,snapGrid:O,snapToGrid:M,nodeOrigin:R,paneDomNode:k}=n();if(w=z.get(t),!w)return;E=(k==null?void 0:k.getBoundingClientRect())??null;const{xSnapped:v,ySnapped:_}=bn(I.sourceEvent,{transform:F,snapGrid:O,snapToGrid:M,containerBounds:E});j={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},y={...j,pointerX:v,pointerY:_,aspectRatio:j.width/j.height},N=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(N=z.get(w.parentId),T=N&&w.extent==="parent"?I3(N):void 0),C=[],P=void 0;for(const[A,$]of z)if($.parentId===t&&(C.push({id:A,position:{...$.position},extent:$.extent}),$.extent==="parent"||$.expandParent)){const V=z3($,w,$.origin??R);P?P=[[Math.min(V[0][0],P[0][0]),Math.min(V[0][1],P[0][1])],[Math.max(V[1][0],P[1][0]),Math.max(V[1][1],P[1][1])]]:P=V}p==null||p(I,{...j})}).on("drag",I=>{const{transform:z,snapGrid:F,snapToGrid:O,nodeOrigin:M}=n(),R=bn(I.sourceEvent,{transform:z,snapGrid:F,snapToGrid:O,containerBounds:E}),k=[];if(!w)return;const{x:v,y:_,width:A,height:$}=j,V={},H=w.origin??M,{width:W,height:ee,x:te,y:se}=$3(y,S,R,x,d,H,T,P),oe=W!==A,J=ee!==$,le=te!==v&&oe,he=se!==_&&J;if(!le&&!he&&!oe&&!J)return;if((le||he||H[0]===1||H[1]===1)&&(V.x=le?te:j.x,V.y=he?se:j.y,j.x=V.x,j.y=V.y,C.length>0)){const ae=te-v,ue=se-_;for(const Pe of C)Pe.position={x:Pe.position.x-ae+H[0]*(W-A),y:Pe.position.y-ue+H[1]*(ee-$)},k.push(Pe)}if((oe||J)&&(V.width=oe?W:j.width,V.height=J?ee:j.height,j.width=V.width,j.height=V.height),N&&w.expandParent){const ae=H[0]*(V.width??0);V.x&&V.x<ae&&(j.x=ae,y.x=y.x-(V.x-ae));const ue=H[1]*(V.height??0);V.y&&V.y<ue&&(j.y=ue,y.y=y.y-(V.y-ue))}const Me=N3({width:j.width,prevWidth:A,height:j.height,prevHeight:$,affectsX:S.affectsX,affectsY:S.affectsY}),pe={...j,direction:Me};(h==null?void 0:h(I,pe))!==!1&&(m==null||m(I,pe),s(V,k))}).on("end",I=>{f==null||f(I,{...j}),r==null||r({...j})});i.call(D)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}var es={exports:{}},Ro={},ts={exports:{}},Co={};/**
|
|
1
|
+
"use strict";var kf=Object.defineProperty;var Mf=(e,t,n)=>t in e?kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tt=(e,t,n)=>Mf(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-CITbqOLs.cjs"),g=require("react"),Z=require("./Divider-Dut8qPee.cjs"),u=require("./css-9iEiTRNL.cjs"),ss=require("./external-CzTBFiv_.cjs"),st=require("./state-_FFrG5nH.cjs"),_f=require("./Stack-BbwDtaE6.cjs"),ge=require("./external-DQwznOyH.cjs"),ne=require("./Space-DvalhzRj.cjs"),Ie=require("./hooks-B5aLaWzS.cjs"),Pf=require("./useVirtualCursorDragWebKit-DDmXE4RW.cjs"),Q=require("./Provider-Cw0mSr2D.cjs"),Lf=require("./external-BGBgNbe2.cjs"),Le=require("./external-DGJ8YAe-.cjs"),El=require("./external-Dq8-cbf3.cjs"),Ns=require("./WithIcon-BgS5shNZ.cjs"),Me=require("./toArray-BvVYuN_b.cjs"),Nf=require("./external-DmryCcwg.cjs"),In=require("./external-CTc1n-JC.cjs"),he=require("./Toggle-C0lZDyeo.cjs"),mt=require("./Text-C8GBHl-F.cjs"),nt=require("./provider-aWtsGnV8.cjs"),Re=require("./Text-CMTkSEWx.cjs"),z=require("./value-Bq1w9UY8.cjs"),me=require("./Haul-C6i2oI7z.cjs"),Ne=require("./useMemoCompare-C2X7Mzx8.cjs"),Ur=require("./dimensions-By-vgVks.cjs"),Jo=require("./font-XlUAG1-r.cjs"),Ge=require("./Dropdown-BSSe1E1e.cjs"),ze=require("./deep-BNa3STCp.cjs"),pe=require("zod"),Ke=require("./external-zbKPQ9ls.cjs"),Ts=require("./Pack-DeZUUdJM.cjs"),kt=require("./ContextMenu-HpMLd1Ht.cjs"),Tf=require("./Text-DkA06TeT.cjs"),yl=require("./external-DiLZ1dEk.cjs");require("./Item-DSBs9VLu.cjs");const Sl=require("react-dom"),Mt=require("./external-B8uaUKhb.cjs"),Rl=require("./units-CX_coN92.cjs"),$f=require("./useClickOutside-CSff8yb-.cjs"),Qo=require("./useDebouncedCallback-DnwYZzjR.cjs"),Af=require("./external-CUgPP-JD.cjs"),xs=require("./eraser-BkqFgBRY.cjs"),_o=require("./DateTime-BsjSfOY-.cjs"),If=require("./external-BwUa_5Vs.cjs"),Df=require("./Video-DgjuFLiE.cjs"),zf=(e,t,n=150)=>{const[s,r]=g.useState(e);return g.useEffect(()=>{const i=setTimeout(()=>r(t),n);return()=>clearTimeout(i)},[t,n]),s},Bf=Object.freeze(Object.defineProperty({__proto__:null,Config:he.Config,Dialog:he.Dialog,chooseLocation:he.chooseLocation,formatTip:he.formatTip,useConfig:he.useConfig,wrap:he.wrap},Symbol.toStringTag,{value:"Module"})),er=({ref:e,location:t,style:n,size:s,className:r,children:i,onDragStart:l,sizeUnits:c="px",showHandle:a=!0,...x})=>{const d=u.K.construct(t),p=u.K.direction(d),m=u.g.dimension(p);return o.jsxRuntimeExports.jsxs(ne.Core,{className:u.CSS(u.CSS.B("resize"),u.CSS.loc(d),u.CSS.dir(p),r),style:{[m]:`${s}${c}`,...n},ref:e,...x,children:[i,a&&o.jsxRuntimeExports.jsx("div",{draggable:!0,className:u.CSS(u.CSS.BE("resize","handle"),u.CSS.bordered(u.K.swap(d))),onDragStart:l,onDrag:ge.preventDefault,onDragEnd:ge.preventDefault})]})},tr=({onResize:e,count:t,initialSizes:n=[],minSize:s=100,direction:r="x"})=>{const i=g.useRef(null),[l,c]=g.useState({sizeDistribution:Of(n,t),root:null}),a=g.useCallback((p,m,f)=>{if(i.current==null)return;const h=u.$t.dim(u.$t.construct(i.current),r);c(j=>po(j,h,p,s,m,f))},[s,c,r]);g.useEffect(()=>e==null?void 0:e(l.sizeDistribution),[l.sizeDistribution,e]);const x=g.useCallback((p,m)=>{p.preventDefault();const f=r==="x"?"clientX":"clientY",h=y=>a(m,y[f]),j=()=>{c(y=>({...y,root:null})),document.removeEventListener("mousemove",h)};c(y=>({...y,root:p[f]})),document.addEventListener("mousemove",h),document.addEventListener("mouseup",j,{once:!0})},[c,r,po]);return{setSize:g.useCallback((p,m)=>a(p,void 0,m),[po]),props:{direction:r,sizeDistribution:l.sizeDistribution,onDragHandle:x,ref:i}}},nr=({ref:e,direction:t="x",children:n,sizeDistribution:s,onDragHandle:r,className:i,...l})=>{const c=u.g.construct(t),a=g.Children.toArray(n);return s=Vf(s),o.jsxRuntimeExports.jsx(ne.Space,{...l,ref:e,direction:c,className:u.CSS(u.CSS.B("resize-multiple"),i),empty:!0,grow:!0,children:a.map((x,d)=>o.jsxRuntimeExports.jsx(er,{onDragStart:p=>r(p,d),location:u.g.location(c),size:s[d]*100,sizeUnits:"%",showHandle:d!==a.length-1,children:x},d))})},Of=(e,t)=>{const n=e.reduce((r,i)=>r+i,0),s=t-e.length;if(s<=0)return e.slice(0,t).map(r=>r/n);if(e.every(r=>r<=1)){const r=1-n;return[...e,...Array(s).fill(r/s)]}return e.map(()=>1/t)},xo=.001,Vf=e=>e.every(t=>u.Wt.closeTo(t,1/e.length),xo)?e.map((t,n)=>n%2===0?t+xo:n===e.length-1?t:t-xo):e,po=(e,t,n,s,r,i)=>{const l=Cl(e,t,n,r,i),[c,a]=Ff(e.sizeDistribution,n,l,s/t),x=a?r??null:e.root;return{...e,sizeDistribution:c,root:x}},Cl=(e,t,n,s,r)=>{let i;if(r!=null)r>1&&(r/=t),i=r-e.sizeDistribution[n];else if(s!=null){if(e.root===null)throw new Error("resize root is null during handle drag");i=(s-e.root)/t}else throw new Error("must provide either a MouseEvent or a targetSize");return i},Ff=(e,t,n,s)=>{let r=t;for(;r>0&&e[r]+n<=s;)r--;const i=e[r]+n,l=Hf(r,e,s,n),c=e[l]-n;return i<s||c<s?[e,!1]:[e.map((a,x)=>x===r?i:x===l?c:a),!0]},Hf=(e,t,n,s)=>(e===t.length-1?Wf:Zf)(e,t,n,s),Zf=(e,t,n,s)=>{let r=e+1;for(;r<t.length-1&&t[r]-s<=n;)r++;return r},Wf=(e,t,n,s)=>{let r=e-1;for(;r>0&&t[r]-s<=n;)r--;return r},mo=2,Yf=100,wl=({onCollapse:e,onResize:t,location:n="left",minSize:s,maxSize:r,initialSize:i=200,collapseThreshold:l=1/0,className:c,...a})=>{const[x,d]=g.useState(u.Y(i,s,r)),p=g.useRef(null),m=u.K.construct(n),f=g.useCallback(E=>{if(p.current===null)return 0;const C=u.$t.dim(E,u.K.direction(m),!0)*(1-2*Number(["bottom","right"].includes(m))),L=p.current+C,T=u.Y(L,s,r);return(T-L)/(s??Yf)>l?mo:T},[m,s,r,l]),h=g.useRef(null),j=g.useCallback(E=>{const C=f(E);d(C),h.current!=null&&(t==null||t(C,u.$t.construct(h.current)))},[t,f]),y=g.useCallback(()=>d(E=>(p.current=E,E)),[d]),S=g.useCallback(E=>f(E)===mo&&(e==null?void 0:e()),[e,f]);g.useEffect(()=>{s==null||r==null||d(E=>{const C=u.Y(E,s,r);return p.current=C,C})},[s,r]);const b=Ke.useCursorDrag({onMove:j,onStart:y,onEnd:S});return o.jsxRuntimeExports.jsx(er,{ref:h,location:m,size:x,onDragStart:b,className:u.clsx(c,u.CSS.expanded(x!==mo)),...a})},Gf=Object.freeze(Object.defineProperty({__proto__:null,Core:er,Multiple:nr,Single:wl,calculateDiffPercentage:Cl,useMultiple:tr},Symbol.toStringTag,{value:"Module"})),os="y",Jr=28,Kf=32,qf=40,Xf=.5,Uf=({data:e,...t})=>{const{setSize:n,props:{sizeDistribution:s,ref:r,...i}}=tr({direction:os,count:e.length,minSize:Jr}),l=c=>{if(r.current==null)return;const a=u.$t.dim(u.$t.construct(r.current),os);s[c]<qf/a?n(c,e[c].initialSize??Xf):n(c,Jr+1)};return o.jsxRuntimeExports.jsx(nr,{empty:!0,className:u.CSS.B("accordion"),sizeDistribution:s,ref:r,...t,...i,children:e.map((c,a)=>g.createElement(eh,{...c,key:c.key,index:a,direction:os,onExpand:l,parent:r,size:s[a]}))})},Jf=o.jsxRuntimeExports.jsx(Z.y4.Caret.Down,{"aria-label":"contract"}),Qf=o.jsxRuntimeExports.jsx(Z.y4.Caret.Right,{"aria-label":"expand"}),eh=({index:e,name:t,content:n,actions:s,size:r,parent:i,onExpand:l})=>{let c=!0;if(i.current!=null){const x=u.$t.dim(u.$t.construct(i.current),os);c=r*x>Kf}const a=c?Jf:Qf;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(ss.Header,{level:"p",className:u.CSS.expanded(c),empty:!0,children:[o.jsxRuntimeExports.jsx(ss.ButtonTitle,{startIcon:a,onClick:()=>l(e),children:t}),s!=null&&o.jsxRuntimeExports.jsx(ss.Actions,{children:s})]}),n]})},th=Object.freeze(Object.defineProperty({__proto__:null,Accordion:Uf},Symbol.toStringTag,{value:"Module"})),nh=(e,t)=>Me.A(e).map(s=>typeof s=="string"?s.split(t).map(r=>({label:r})):s).flat(),bl=({segments:e,shade:t,level:n,weight:s,separator:r,transform:i})=>{let c=nh(e,r);return i!=null&&(c=c.map(i)),c.map(({label:a,icon:x,href:d,...p},m)=>{const f=[o.jsxRuntimeExports.jsx(Z.y4.Caret.Right,{style:{transform:"scale(0.8) translateY(0.5px)",color:u.CSS.shade(t)}},`${a}-${m}`)];if(x!=null){const j=Le.resolve(x);j!=null&&f.push(j)}const h={weight:s,shade:t,level:n,style:{marginLeft:x!=null?"0.5rem":"0"},children:a,...p};return d!=null?f.push(o.jsxRuntimeExports.jsx(El.Link,{...h,href:d},a)):f.push(o.jsxRuntimeExports.jsx(Z.Text,{...h},a)),f}).flat()},vl=({children:e,icon:t,shade:n=9,weight:s,size:r=.5,url:i,level:l="p",separator:c=".",className:a,hideFirst:x=!0,...d})=>{i!=null&&(e=i);const p=bl({segments:e,separator:c,shade:n,level:l,weight:s});return x&&p.shift(),o.jsxRuntimeExports.jsxs(Ns.WithIcon,{className:u.CSS(a,u.CSS.B("breadcrumb"),x&&u.CSS.M("hide-first")),level:l,shade:n,weight:s,size:r,x:!0,...d,children:[Le.resolve(t),...p]})},sh=({url:e,className:t,level:n="p",separator:s="/",weight:r,shade:i=9})=>{const l=bl({segments:e,separator:s,shade:i,level:n,weight:r,transform:(c,a)=>({...c,label:c.label.split("-").map(x=>u.d.capitalize(x)).join(" "),href:`/${e.split(s).slice(0,a+1).join("/")}`})});return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(t,u.CSS.B("breadcrumb"),u.CSS.BM("breadcrumb","url")),x:!0,size:"small",align:"center",children:l})},oh=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:vl,URL:sh},Symbol.toStringTag,{value:"Module"})),kl=({variant:e="info",...t})=>e==="loading"?o.jsxRuntimeExports.jsx(Z.y4.Loading,{...t}):o.jsxRuntimeExports.jsx(Z.y4.Circle,{color:Re.VARIANT_COLORS[e],...t}),rh=({action:e})=>g.isValidElement(e)?e:g.createElement(he.Button,{...e,key:e.key}),ih=({status:{key:e,time:t,count:n,message:s,description:r,variant:i},silence:l,actions:c,className:a,children:x,...d})=>{const p=g.useRef(null);return o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS(u.CSS.B("notification"),a),y:!0,empty:!0,ref:p,...d,children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,justify:"spaceBetween",grow:!0,style:{width:"100%"},children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",size:"small",children:[o.jsxRuntimeExports.jsx(kl,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),o.jsxRuntimeExports.jsx(Z.Text,{level:"small",shade:11,children:`x${n}`}),o.jsxRuntimeExports.jsx(_o.DateTime,{className:u.CSS(u.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),o.jsxRuntimeExports.jsx(he.Icon,{className:u.CSS(u.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>l(e),children:o.jsxRuntimeExports.jsx(Z.y4.Close,{})})]}),o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,align:"start",className:u.CSS(u.CSS.BE("notification","content")),size:"small",children:[x??o.jsxRuntimeExports.jsx(Z.Text,{className:u.CSS(u.CSS.BE("notification","message")),level:"p",style:{flexGrow:1},children:s}),r!=null&&o.jsxRuntimeExports.jsx(Z.Text,{className:u.CSS(u.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:r})]}),c!=null&&o.jsxRuntimeExports.jsx(ne.Space,{x:!0,align:"center",justify:"end",className:u.CSS(u.CSS.BE("notification","actions")),children:Me.A(c).map(m=>o.jsxRuntimeExports.jsx(rh,{action:m},m.key))})]},t.toString())},lh=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:Re.Aggregator,Circle:kl,Notification:ih,Text:Re.Text,VARIANTS:nt.VARIANTS,VARIANT_COLORS:Re.VARIANT_COLORS,specZ:nt.specZ,useAdder:Re.useAdder,useErrorHandler:Re.useErrorHandler,useNotifications:Re.useNotifications,variantZ:nt.variantZ},Symbol.toStringTag,{value:"Module"})),sr=({aetherKey:e,enabled:t=!0})=>{const{setState:n}=Q.useLifecycle({aetherKey:e,type:xs.Eraser.TYPE,schema:xs.eraserStateZ,initialState:{region:u.$t.ZERO,enabled:t}}),s=Z.useSyncedRef(t);return{erase:g.useCallback(i=>{n({enabled:s.current,region:i})},[n,s])}},ch=({aetherKey:e,children:t})=>{const{erase:n}=sr({aetherKey:e}),s=Ge.useResize(n);return o.jsxRuntimeExports.jsx("div",{ref:s,className:u.CSS(u.CSS.inheritDims()),children:t})},ah=Object.freeze(Object.defineProperty({__proto__:null,Eraser:ch,use:sr},Symbol.toStringTag,{value:"Module"})),uh=({items:e,initialKey:t})=>{const[n,s]=g.useState(t),r=l=>s(l===n?void 0:l),i=e.find(l=>l.key===n);return{onSelect:r,activeItem:i}},xh=({activeItem:e,children:t,onSelect:n,location:s="left",collapseThreshold:r=.65,className:i,onResize:l,onCollapse:c,eraseEnabled:a,...x})=>{const d=u.K.direction(s);a??(a=e!=null);const p=g.useCallback(()=>{c?c():e!=null&&(n==null||n(e.key))},[n,e==null?void 0:e.key,c]),{erase:m}=sr({enabled:a}),f=g.useCallback((b,E)=>{l==null||l(b,E),m(E)},[l,m]),{content:h,minSize:j,maxSize:y,initialSize:S=0}=e??{};return o.jsxRuntimeExports.jsx(wl,{className:u.CSS(u.CSS.B("nav-drawer"),u.CSS.dir(d),u.CSS.visible(e!=null),i),collapseThreshold:r,onCollapse:p,location:s,onResize:f,minSize:j,maxSize:y,initialSize:S,...x,children:h})},dh=Object.freeze(Object.defineProperty({__proto__:null,Bar:ge.Bar,Drawer:xh,useDrawer:uh},Symbol.toStringTag,{value:"Module"})),rs={...z.ZERO_CONTEXT_VALUE,state:nt.tv.connectivity.DEFAULT},Ml=g.createContext(rs),_l=()=>g.use(Ml),qe=()=>_l().client,ph=()=>_l().state,Qr={connected:"success",connecting:"info",disconnected:"info",failed:"error"},Pl="serverVersionMismatch",mh=(e,t,n)=>`Cluster version ${n!=null?`${n} `:""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,Ll=({children:e,connParams:t})=>{const[n,s,r]=Z.useCombinedStateAndRef(rs),{path:i}=Q.useUnidirectional({type:z.Provider.TYPE,schema:z.Provider.stateZ,state:{props:t??null,state:null}}),l=Re.useAdder(),c=g.useCallback(a=>{r.current.state.status!==a.status&&l({variant:Qr[a.status],message:a.message??u.d.capitalize(a.status)}),s(x=>({...x,state:a}))},[l]);return Q.useAsyncEffect(async()=>{if(n.client!=null&&n.client.close(),t==null)return s(rs);const a=new nt.tv({...t,connectivityPollFrequency:nt.S.seconds(2)});s({client:a,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:a.clientVersion}});const x=await a.connectivity.check();if(s({client:a,state:x}),l({variant:Qr[x.status],message:x.message??x.status.toUpperCase()}),x.status==="connected"&&!x.clientServerCompatible){const d=x.nodeVersion==null||u.Jt.semVerOlder(x.nodeVersion,x.clientVersion),p=mh(d,x.clientVersion,x.nodeVersion);l({variant:"warning",message:"Incompatible cluster version",description:p,data:{type:Pl,oldServer:d,nodeVersion:x.nodeVersion,clientVersion:x.clientVersion}})}return a.connectivity.onChange(c),()=>{a.close(),s(rs)}},[t,c]),o.jsxRuntimeExports.jsx(Ml,{value:n,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:i,children:e})})},fh=Object.freeze(Object.defineProperty({__proto__:null,Provider:Ll,SERVER_VERSION_MISMATCH:Pl,use:qe,useConnectionState:ph},Symbol.toStringTag,{value:"Module"})),Nl=g.createContext({aliases:{},getName:async()=>await Promise.resolve(void 0),setAlias:null}),ln=()=>g.use(Nl),Tl=e=>ln().aliases[e]??null,$s=()=>ln().aliases,As=(e,t="")=>{const{getName:n}=ln(),[s,r]=g.useState(t);return Q.useAsyncEffect(async()=>{const i=await n(e);r(i)},[e,n]),s??t},or=()=>ln().activeRange??void 0,$l=({activeRange:e,children:t})=>{const n=qe(),[s,r]=g.useState({}),i=g.useCallback(a=>{r(x=>{const d={...x};return a.forEach(({variant:p,key:m,value:f})=>{const h=Number(m.split("---")[1]);p==="delete"?delete d[h]:d[f.channel]=f.alias}),d})},[r]),l=g.useCallback(async(a,x)=>{if(n==null||e==null)return;await(await n.ranges.retrieve(e)).setAlias(a,x)},[n,e]),c=g.useCallback(async a=>{if(n==null||a===0)return;const x=s[a];return x??(await n.channels.retrieve(a)).name},[s,n]);return Q.useAsyncEffect(async()=>{if(n==null||e==null){r({});return}const a=await n.ranges.retrieve(e),x=await a.listAliases();r(x);const d=await a.openAliasTracker(),p=d.onChange(i);return()=>{p(),d.close()}},[n,e]),o.jsxRuntimeExports.jsx(Nl,{value:{aliases:s,activeRange:e,setAlias:e!=null?l:null,getName:c},children:t})},hh=({channelKey:e,value:t,shadow:n,className:s,...r})=>{const[i,l]=g.useState(!1),{setAlias:c}=ln(),a=Tl(e),x=As(e);let d=o.jsxRuntimeExports.jsx(Z.y4.Rename,{});i?d=o.jsxRuntimeExports.jsx(Z.y4.Loading,{}):a===t&&(d=o.jsxRuntimeExports.jsx(Z.y4.Check,{}));const p=c!=null&&!i&&a!==t&&e!==0,m=Re.useErrorHandler(),f=()=>{p&&m(async()=>{l(!0),await c(e,t),l(!1)},"Failed to set channel alias")},h=()=>{var y;a!=null&&((y=r.onChange)==null||y.call(r,a))},j=()=>e===0?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):c==null?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):t.length===0?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):a===t?o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Alias synced with this label"}):o.jsxRuntimeExports.jsxs(Z.Text,{level:"small",children:["Sync alias for ",x," with this label"]});return o.jsxRuntimeExports.jsxs(mt.Text,{value:t,...r,children:[p&&o.jsxRuntimeExports.jsx(he.Icon,{onClick:h,tooltip:o.jsxRuntimeExports.jsxs(Z.Text,{level:"small",children:["Set ",x," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:o.jsxRuntimeExports.jsx(Z.y4.Sync,{})}),o.jsxRuntimeExports.jsx(he.Icon,{onClick:f,disabled:!p,tooltip:o.jsxRuntimeExports.jsx(j,{}),tooltipLocation:{y:"top"},variant:"outlined",children:d})]})},ot="channel";var ei=180/Math.PI,Po={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Al(e,t,n,s,r,i){var l,c,a;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(a=e*n+t*s)&&(n-=e*a,s-=t*a),(c=Math.sqrt(n*n+s*s))&&(n/=c,s/=c,a/=c),e*s<t*n&&(e=-e,t=-t,a=-a,l=-l),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*ei,skewX:Math.atan(a)*ei,scaleX:l,scaleY:c}}var Gn;function gh(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Po:Al(t.a,t.b,t.c,t.d,t.e,t.f)}function jh(e){return e==null||(Gn||(Gn=document.createElementNS("http://www.w3.org/2000/svg","g")),Gn.setAttribute("transform",e),!(e=Gn.transform.baseVal.consolidate()))?Po:(e=e.matrix,Al(e.a,e.b,e.c,e.d,e.e,e.f))}function Il(e,t,n,s){function r(x){return x.length?x.pop()+" ":""}function i(x,d,p,m,f,h){if(x!==p||d!==m){var j=f.push("translate(",null,t,null,n);h.push({i:j-4,x:z.interpolateNumber(x,p)},{i:j-2,x:z.interpolateNumber(d,m)})}else(p||m)&&f.push("translate("+p+t+m+n)}function l(x,d,p,m){x!==d?(x-d>180?d+=360:d-x>180&&(x+=360),m.push({i:p.push(r(p)+"rotate(",null,s)-2,x:z.interpolateNumber(x,d)})):d&&p.push(r(p)+"rotate("+d+s)}function c(x,d,p,m){x!==d?m.push({i:p.push(r(p)+"skewX(",null,s)-2,x:z.interpolateNumber(x,d)}):d&&p.push(r(p)+"skewX("+d+s)}function a(x,d,p,m,f,h){if(x!==p||d!==m){var j=f.push(r(f)+"scale(",null,",",null,")");h.push({i:j-4,x:z.interpolateNumber(x,p)},{i:j-2,x:z.interpolateNumber(d,m)})}else(p!==1||m!==1)&&f.push(r(f)+"scale("+p+","+m+")")}return function(x,d){var p=[],m=[];return x=e(x),d=e(d),i(x.translateX,x.translateY,d.translateX,d.translateY,p,m),l(x.rotate,d.rotate,p,m),c(x.skewX,d.skewX,p,m),a(x.scaleX,x.scaleY,d.scaleX,d.scaleY,p,m),x=d=null,function(f){for(var h=-1,j=m.length,y;++h<j;)p[(y=m[h]).i]=y.x(f);return p.join("")}}}var Eh=Il(gh,"px, ","px)","deg)"),yh=Il(jh,", ",")",")"),Sh=1e-12;function ti(e){return((e=Math.exp(e))+1/e)/2}function Rh(e){return((e=Math.exp(e))-1/e)/2}function Ch(e){return((e=Math.exp(2*e))-1)/(e+1)}const wh=function e(t,n,s){function r(i,l){var c=i[0],a=i[1],x=i[2],d=l[0],p=l[1],m=l[2],f=d-c,h=p-a,j=f*f+h*h,y,S;if(j<Sh)S=Math.log(m/x)/t,y=function(P){return[c+P*f,a+P*h,x*Math.exp(t*P*S)]};else{var b=Math.sqrt(j),E=(m*m-x*x+s*j)/(2*x*n*b),C=(m*m-x*x-s*j)/(2*m*n*b),L=Math.log(Math.sqrt(E*E+1)-E),T=Math.log(Math.sqrt(C*C+1)-C);S=(T-L)/t,y=function(P){var O=P*S,I=ti(L),D=x/(n*b)*(I*Ch(t*O+L)-Rh(L));return[c+D*f,a+D*h,x*I/ti(t*O+L)]}}return y.duration=S*1e3*t/Math.SQRT2,y}return r.rho=function(i){var l=Math.max(.001,+i),c=l*l,a=c*c;return e(l,c,a)},r}(Math.SQRT2,2,4),bh=Object.freeze(Object.defineProperty({__proto__:null,Base:z.Base,Bottom:z.Bottom,Right:z.Right,Top:z.Top,axisStateZ:z.axisStateZ,newCanvas:z.newCanvas,newTickFactory:z.newTickFactory,tickFactoryProps:z.tickFactoryProps,tickType:z.tickType},Symbol.toStringTag,{value:"Module"})),vh={region:u.$t.ZERO,dpr:1,os:u.S.getOS()},kh={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},Mh=({children:e,resizeDebounce:t=100,className:n,...s})=>{const[{path:r},{bootstrapped:i,dpr:l},c]=Q.use$1({type:z.Canvas.TYPE,schema:z.canvasStateZ,initialState:vh}),a=g.useRef({...kh}),x=g.useRef(!1),d=g.useCallback(j=>{a.current.bootstrapped&&(c(()=>({bootstrapped:!0,region:j,dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})})),x.current=!0)},[c]),p=g.useRef(null),m=Ge.useResize(d,{debounce:t}),f=Z.useCombinedRefs(p,m);g.useEffect(()=>{const j=()=>{window.devicePixelRatio===l||!a.current.bootstrapped||p.current==null||c(y=>({...y,region:u.$t.construct(p.current),dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",j,{once:!0})},[l]),g.useEffect(()=>{const j=()=>{!a.current.bootstrapped||p.current==null||c(y=>({...y,region:u.$t.construct(p.current),glCanvas:void 0,upper2dCanvas:void 0,lower2dCanvas:void 0}))};window.addEventListener("focus",j),window.addEventListener("blur",j)},[c]);const h=g.useCallback(j=>{if(j==null)return;j.className.includes("gl")?a.current.gl=j:j.className.includes("upper2d")?a.current.upper2d=j:a.current.lower2d=j;const{gl:y,lower2d:S,upper2d:b,bootstrapped:E}=a.current;if(y==null||S==null||b==null||E)return;a.current.bootstrapped=!0;const C=y.transferControlToOffscreen(),L=b.transferControlToOffscreen(),T=S.transferControlToOffscreen();c({glCanvas:C,upper2dCanvas:L,lower2dCanvas:T,bootstrap:!0,bootstrapped:!1,region:u.$t.construct(y),dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})},[C,L,T])},[c]);return o.jsxRuntimeExports.jsxs("div",{ref:f,className:u.CSS(u.CSS.B("canvas-container"),n),...s,children:[o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","lower2d"))}),o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","gl"))}),o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","upper2d"))}),o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:i&&e})]})},Dn=(e,t)=>Ge.useResize(g.useCallback((n,s)=>{const r=document.querySelector(".pluto-canvas--lower2d");r!=null&&e(u.b.XY.translate(u.J.scale(u.$t.topLeft(r),-1)).box(n),s)},[e]),t),_h=Object.freeze(Object.defineProperty({__proto__:null,Canvas:Mh,useRegion:Dn},Symbol.toStringTag,{value:"Module"})),Dl=g.createContext(null),rt=e=>{const t=g.use(Dl);if(t==null)throw new Error(`Cannot to use ${e} as a non-child of LinePlot.`);return t},zl=e=>{const t=rt("Viewport"),{addViewportHandler:n}=t;g.useEffect(()=>n(e),[n,e])},zn=(e,t)=>{const{setGridEntry:n,removeGridEntry:s}=rt(t),{key:r}=e;return Q.useEffectCompare(()=>{u.K.outer.parse(e.loc),n(e)},([c],[a])=>ze.x.equal(c,a),[e]),g.useEffect(()=>()=>s(r),[]),{gridArea:u.g.swap(u.K.direction(e.loc))==="x"?`axis-start-${r} / plot-start / axis-end-${r} / plot-end`:`plot-start / axis-start-${r} / plot-end / axis-end-${r}`}},Bl=({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:s=u.J.ZERO,children:r,hold:i=!1,onHold:l,visible:c,...a})=>{const[x,d]=g.useState([]),p=Ne.useMemoDeepEqualProps({clearOverScan:s,hold:i,visible:c}),[{path:m},{grid:f},h]=Q.use$1({aetherKey:e,type:z.LinePlot.TYPE,schema:z.linePlotStateZ,initialState:{container:u.$t.ZERO,viewport:u.$t.DECIMAL,grid:{},...p}}),j=g.useCallback(B=>{c&&h(_=>({..._,container:B}))},[h,c]),y=Dn(j,{debounce:n});g.useEffect(()=>h(B=>({...B,...p})),[p]);const S=g.useRef(new Map),b=g.useCallback(B=>(S.current.set(B,null),()=>S.current.delete(B)),[S]),E=g.useCallback(B=>{const{mode:_,box:R,stage:k}=B;(_==="pan"&&k!=="start"||_==="zoom"||_==="zoomReset"&&k==="start")&&h(v=>({...v,viewport:R})),S.current.forEach((v,M)=>M(B))},[h]),C=g.useCallback(B=>{h(_=>({..._,grid:{..._.grid,[B.key]:B}}))},[h]),L=g.useCallback(B=>h(_=>{const{[B]:R,...k}=_.grid;return{..._,grid:k}}),[h]),T=g.useCallback(B=>{d(_=>[..._.filter(({key:R})=>R!==B.key),B])},[d]),P=g.useCallback(B=>d(_=>_.filter(({key:R})=>R!==B)),[T]),O=g.useMemo(()=>Ph(f),[f]),I=g.useCallback(B=>{h(_=>({..._,hold:B})),l==null||l(B)},[h,l]),D=`line-plot-${e}`,H=g.useMemo(()=>({lines:x,setGridEntry:C,removeGridEntry:L,setLine:T,removeLine:P,setViewport:E,addViewportHandler:b,setHold:I,id:D}),[D,x,C,L,T,P,E,b,I]);return o.jsxRuntimeExports.jsx("div",{id:D,className:u.CSS.B("line-plot"),style:{...t,...O},ref:y,...a,children:o.jsxRuntimeExports.jsx(Dl,{value:H,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:m,children:r})})})},Ph=e=>{const t=u.CSS.newGridBuilder();return z.regions("top",e).forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),t.row("plot-start","plot-end","minmax(0, 1fr)"),z.regions("bottom",e).reverse().forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),z.regions("left",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.col("plot-start","plot-end","minmax(0, 1fr)"),z.regions("right",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.build()},rr=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?z.XAxis.TYPE:z.YAxis.TYPE,s=`${e}-axis`,r=({aetherKey:i,children:l,location:c=t,label:a="",labelLevel:x="small",labelDirection:d=e,onLabelChange:p,color:m,labelSize:f,showGrid:h,type:j,bounds:y,className:S,tickSpacing:b,autoBounds:E,axisKey:C,autoBoundUpdateInterval:L,onAutoBoundsChange:T,style:P,...O})=>{const I=((a==null?void 0:a.length)??0)>0,D=Q.useUniqueKey(i),H=Ne.useMemoDeepEqualProps({location:c,showGrid:h,type:j,bounds:y,axisKey:C,label:a,labelDirection:d,tickSpacing:b,autoBounds:E,autoBoundUpdateInterval:L}),[{path:B},{size:_,labelSize:R,...k},v]=Q.use$1({aetherKey:D,type:n,schema:z.coreAxisStateZ,initialState:H});g.useEffect(()=>v(V=>({...V,...H})),[H]),g.useEffect(()=>{const{lower:V,upper:F}=z.parseAutoBounds(k.autoBounds);k.bounds!=null&&(V&&(y==null?void 0:y.lower)!==k.bounds.lower||F&&(y==null?void 0:y.upper)!==k.bounds.upper)&&(T==null||T(k.bounds))},[k.autoBounds,k.bounds]);const M=zn({loc:c,key:`${n}-${D}`,size:_+R,order:1},`${e.toUpperCase()}Axis`),A=Jo.useTypography(x).toString(),$=g.useRef(0);return g.useEffect(()=>{if(e==="y"){if(a==null)return;let F=Ur.dimensions(a,A)[u.g.dimension(u.g.construct(d))];F>0&&(F+=9),v(W=>({...W,labelSize:F}))}else{let F=Ur.dimensions(a,A).height*1.3;F>0&&(F+=12);const W=$.current;z.withinSizeThreshold(W,F)||($.current=F,v(ee=>({...ee,labelSize:F})))}},[a,d,A]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(S,u.CSS.B("axis"),u.CSS.B(s),u.CSS.loc(c)),style:{...P,...M},align:"center",justify:c!=="left"?"end":"start",direction:u.g.swap(e),...O,children:I&&o.jsxRuntimeExports.jsx(Z.MaybeEditable,{className:u.CSS(u.CSS.BE("axis","label"),u.CSS.dir(d)),value:a,onChange:p,level:x})}),o.jsxRuntimeExports.jsx(Q.Composite,{path:B,children:l})]})};return r.displayName=`${e.toUpperCase()}Axis`,r},Ol=rr("x"),Vl=rr("y"),Fl=u.J.xy.extend({root:u.K.corner,units:pe.z.object({x:pe.z.enum(["px","decimal"]),y:pe.z.enum(["px","decimal"])})}),Lh=Fl.partial({root:!0,units:!0}),Nh=e=>{var n,s,r,i;const t={};return t[((n=e.root)==null?void 0:n.x)??"left"]=((s=e==null?void 0:e.units)==null?void 0:s.x)==="px"?`${e.x}px`:`${e.x*100}%`,t[((r=e.root)==null?void 0:r.y)??"top"]=((i=e==null?void 0:e.units)==null?void 0:i.y)==="px"?`${e.y}px`:`${e.y*100}%`,t},Th=(e,t)=>{var i,l,c,a,x,d;const n={x:e.x,y:e.y};if(t.current==null)return n;const s=u.$t.construct(t.current),r=u.$t.construct(t.current.parentElement);return((i=e.units)==null?void 0:i.x)==="decimal"?((l=e.root)==null?void 0:l.x)==="right"&&(n.x=1-e.x):((c=e.root)==null?void 0:c.x)==="right"?n.x=1-(e.x+u.$t.width(s))/u.$t.width(r):n.x/=u.$t.width(r),((a=e.units)==null?void 0:a.y)==="decimal"?((x=e.root)==null?void 0:x.y)==="bottom"&&(n.y=1-e.y):((d=e.root)==null?void 0:d.y)==="bottom"?n.y=1-(e.y+u.$t.height(s))/u.$t.height(r):n.y/=u.$t.height(r),n},Hl=(e,t)=>{if(t.current==null)return null;const n=u.$t.construct(t.current.parentElement),s=u.$t.construct(t.current),r={x:e.x,y:e.y,root:{...u.K.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(r.x=(1-e.x)*u.$t.width(n)-u.$t.width(s),r.root.x="right"):e.x<.2?r.x=e.x*u.$t.width(n):r.units.x="decimal",e.y>.8?(r.y=(1-e.y)*u.$t.height(n)-u.$t.height(s),r.root.y="bottom"):e.y<.2?r.y=e.y*u.$t.height(n):r.units.y="decimal",r.x=Math.round(r.x*100)/100,{...r,...u.J.truncate(r,3)}},ni=u.$t.reRoot(u.$t.DECIMAL,u.K.TOP_LEFT),$h={x:.1,y:.1,root:u.K.TOP_LEFT,units:{x:"decimal",y:"decimal"}},ir=g.memo(({className:e,value:t,onChange:n,style:s,draggable:r=!0,initial:i=$h,...l})=>{const[c,a]=st.usePurePassthrough({value:t,onChange:n,initial:i}),x=g.useRef(c),d=Z.useSyncedRef(r===!1),p=g.useRef(null);c!==null&&(s={...s,...Nh(c)});const m=g.useCallback(h=>{var L;if(((L=p.current)==null?void 0:L.parentElement)==null)return x.current;const j=u.$t.construct(p.current.parentElement),y=u.b.XY.scale(j).scale(ni),S=y.box(u.$t.construct(p.current)),b=u.b.XY.clamp(u.$t.construct(u.$t.topLeft(ni),{width:1-u.$t.width(S),height:1-u.$t.height(S)})),E=u.J.translate(u.J.construct(x.current),u.$t.signedDims(y.box(h))),C=b.pos(E);return Hl(C,p)},[]),f=Ke.useCursorDrag({onStart:g.useCallback(()=>{x.current=Th(x.current,p)},[]),onMove:g.useCallback(h=>{if(d.current)return;const j=m(h);j!==null&&a(j)},[]),onEnd:g.useCallback(h=>{if(d.current)return;const j=m(h);j!==null&&(x.current=j)},[])});return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(e,u.CSS.B("legend")),bordered:!0,rounded:!0,style:s,onDragStart:f,draggable:r,borderShade:5,ref:p,onDrag:ge.preventDefault,onDragEnd:ge.preventDefault,background:1,...l})});ir.displayName="Legend.Container";const Is=g.memo(({data:e,onEntryChange:t,onVisibleChange:n,allowVisibleChange:s=!0,shade:r=1})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e.sort((i,l)=>i.label.localeCompare(l.label)).map(({key:i,color:l,label:c,visible:a=!0})=>o.jsxRuntimeExports.jsxs(ne.Space,{style:{cursor:"pointer"},x:!0,align:"center",size:"small",justify:"spaceBetween",grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",align:"center",size:"small",children:[o.jsxRuntimeExports.jsx(Ke.Swatch,{value:l,onChange:x=>t==null?void 0:t({key:i,color:x,label:c,visible:a}),onVisibleChange:n,allowChange:t!=null,draggable:!1,size:"tiny"}),o.jsxRuntimeExports.jsx(Z.MaybeEditable,{level:"small",value:c,onChange:x=>t==null?void 0:t({key:i,color:l,label:x,visible:a}),noWrap:!0,shade:a?10:7,onDoubleClick:x=>x.stopPropagation()})]}),s&&o.jsxRuntimeExports.jsx(he.Icon,{className:u.CSS.B("visible-toggle"),onClick:x=>{x.stopPropagation(),t==null||t({key:i,color:l,label:c,visible:!a})},onDoubleClick:x=>x.stopPropagation(),size:"tiny",shade:r,children:a?o.jsxRuntimeExports.jsx(Z.y4.Visible,{}):o.jsxRuntimeExports.jsx(Z.y4.Hidden,{})})]},i))}));Is.displayName="LegendSwatches";const lr=({data:e=[],onEntryChange:t,position:n,onPositionChange:s,allowVisibleChange:r=!0,...i})=>{const[l,c]=g.useState(!1);return e.length===0?null:o.jsxRuntimeExports.jsx(ir,{...i,className:r?u.CSS.M("with-visible-toggle"):void 0,draggable:!l,value:n,onChange:s,size:r?0:"tiny",children:o.jsxRuntimeExports.jsx(Is,{data:e,onEntryChange:t,onVisibleChange:c,allowVisibleChange:r})})},Ah=Object.freeze(Object.defineProperty({__proto__:null,Container:ir,LegendSwatches:Is,Simple:lr,calcStickyPos:Hl,completeStickyXYz:Fl,stickyXYz:Lh},Symbol.toStringTag,{value:"Module"})),cr=g.memo(({className:e,style:t,onLineChange:n,...s})=>{const{lines:r}=rt("Legend");return rt("Legend"),o.jsxRuntimeExports.jsx(lr,{data:r,onEntryChange:n,...s})});cr.displayName="FloatingLegend";const Ih=({onLineChange:e})=>{const{lines:t}=rt("Legend"),n=Q.useUniqueKey(),s=zn({key:n,size:t.length>0?36:0,loc:"bottom",order:5},"Legend");return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS.BE("legend","container"),align:"center",x:!0,style:{...s,padding:"0 1rem",height:"var(--pluto-height-medium)",margin:"1rem 0 ",width:"fit-content"},children:o.jsxRuntimeExports.jsx(Is,{data:t,onEntryChange:e,shade:0})})},Zl=({variant:e="floating",...t})=>e==="floating"?o.jsxRuntimeExports.jsx(cr,{...t}):o.jsxRuntimeExports.jsx(Ih,{...t}),ar=g.memo(({aetherKey:e,...t})=>(Q.useUnidirectional({aetherKey:e,type:z.Line.TYPE,schema:z.stateZ,state:t}),null));ar.displayName="Line";const Dh=Object.freeze(Object.defineProperty({__proto__:null,Line:ar},Symbol.toStringTag,{value:"Module"})),ur=({aetherKey:e,color:t,label:n="",visible:s=!0,...r})=>{const i=Q.useUniqueKey(e),{setLine:l,removeLine:c}=rt("Line");return g.useEffect(()=>(l({key:i,color:t,label:n,visible:s}),()=>c(i)),[n,t,s]),o.jsxRuntimeExports.jsx(ar,{aetherKey:i,color:t,label:n,visible:s,...r})},Wl=({level:e="h2",...t})=>{const n=Q.useUniqueKey(),s=Jo.useTypography(e),r=zn({key:n,size:(s.lineHeight+2)*s.baseSize,loc:"top",order:10},"Title");return o.jsxRuntimeExports.jsx(ne.Space,{justify:"center",align:"center",style:r,children:o.jsxRuntimeExports.jsx(Z.MaybeEditable,{...t,level:e})})},Yl=({aetherKey:e,...t})=>{const n=Q.useUniqueKey(e),[,,s]=Q.use$1({aetherKey:n,type:z.Tooltip.TYPE,schema:z.tooltipStateZ,initialState:{position:null,...t}}),r=g.useRef(null),i=g.useCallback(c=>{const a=document.querySelector(".pluto-canvas-container");if(a==null)return;const x=u.$t.topLeft(a);s({position:u.J.translation(x,u.J.construct(c))})},[s]),l=g.useCallback(()=>s({position:null}),[s]);return g.useEffect(()=>{if(r.current===null)return;const c=r.current.parentElement;if(c!=null)return c.addEventListener("mousemove",i),c.addEventListener("mouseleave",l),()=>{c.removeEventListener("mousemove",i),c.removeEventListener("mouseleave",l)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:r})},zh=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Yl},Symbol.toStringTag,{value:"Module"})),Gl=()=>{const e=g.useRef(new Map),t=g.useCallback(s=>{const{request:r,response:i}=s,l=e.current.get(r);l!=null&&(l(i.bounds),e.current.delete(r))},[]),[,,n]=Q.use$1({type:z.BoundQuerier.TYPE,schema:z.boundQuerierStateZ,onAetherChange:t,initialState:{request:"",response:{request:"",bounds:{}}}});return g.useCallback(async()=>await new Promise(s=>{const r=u.Lt.create();e.current.set(r,s),n(i=>({...i,request:r}))}),[])},Bh=({ref:e})=>(e.current=Gl(),null),Oh={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer",cancel:"default"},Kl=({className:e,mode:t,maskBox:n,children:s,style:r,...i})=>o.jsxRuntimeExports.jsxs("div",{className:u.CSS(u.CSS.noSelect,u.CSS.BE("viewport-mask","container"),e),style:{cursor:Oh[t],...r},...i,children:[o.jsxRuntimeExports.jsx("div",{style:{...u.$t.css(n),display:u.$t.areaIsZero(n)?"none":"block"},className:u.CSS.BE("viewport-mask","selection")}),s]}),Vh=[],xr=({data:e,emptyContent:t,value:n,onChange:s,allowMultiple:r,allowNone:i,hideColumnHeader:l=!1,columns:c=Vh,visible:a,itemHeight:x=Re.Column.itemHeight,listItem:d=he.componentRenderProp(Re.Column.Item),replaceOnSingle:p,omit:m,autoSelectOnNone:f,trigger:h,extraDialogContent:j,variant:y="connected",...S})=>{let b=o.jsxRuntimeExports.jsxs(Re.Hover,{disabled:!a,children:[j,o.jsxRuntimeExports.jsx(Re.Column.Header,{hide:l||d!=null,columns:c,children:o.jsxRuntimeExports.jsx(Re.Core.Virtual,{itemHeight:x,children:d})})]});return y!=="connected"&&(b=o.jsxRuntimeExports.jsx(Ts.Pack,{y:!0,className:u.CSS.B("select-dialog-content"),children:b})),o.jsxRuntimeExports.jsx(Re.List,{data:e,emptyContent:t,omit:m,children:o.jsxRuntimeExports.jsx(Re.Selector,{value:n,onChange:s,allowMultiple:r,allowNone:i,replaceOnSingle:p,autoSelectOnNone:f,children:o.jsxRuntimeExports.jsxs(Ge.Dialog,{visible:a,className:u.CSS.B("select"),keepMounted:!1,variant:y,...S,children:[h,b]})})})},it=({children:e=Fh,value:t,onChange:n,entryRenderKey:s="key",allowNone:r=!1,allowMultiple:i=!1,data:l,replaceOnSingle:c,className:a,size:x="medium",actions:d,pack:p=!0,variant:m,...f})=>{const{onSelect:h}=Re.useSelect({allowMultiple:i,allowNone:r,replaceOnSingle:c,data:l,value:t,onChange:n}),j=S=>{m!=="preview"&&h(S)},y=l==null?void 0:l.map(S=>e({key:S.key,onClick:()=>j(S.key),size:x,selected:S.key===t,entry:S,title:S[s]}));return p?o.jsxRuntimeExports.jsxs(Ts.Pack,{borderShade:5,className:u.CSS(u.CSS.B("select-button"),a),size:x,...f,children:[y,d]}):o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:y})},Fh=({key:e,onClick:t,selected:n,title:s,size:r})=>o.jsxRuntimeExports.jsx(he.Button,{onClick:t,variant:n?"filled":"outlined",size:r,children:s},e),ql=({selected:e,renderKey:t,toggle:n,visible:s,children:r,...i})=>o.jsxRuntimeExports.jsx(he.Button,{className:u.CSS.B("select-dropdown-button"),onClick:n,variant:"outlined",endIcon:o.jsxRuntimeExports.jsx(In.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:s}),...i,children:r??(e==null?void 0:e[t])}),Xl=he.componentRenderProp(ql),Ds=({data:e,value:t,columns:n=[],children:s=Xl,entryRenderKey:r="key",allowNone:i=!1,onChange:l,disabled:c,hideColumnHeader:a=!0,variant:x,dropdownVariant:d,...p})=>{const{close:m,visible:f,toggle:h}=Ge.use(),[j,y]=g.useState((e==null?void 0:e.find(E=>E.key===t))??null);g.useEffect(()=>{y((e==null?void 0:e.find(E=>E.key===t))??null)},[e,t]);const S=g.useCallback((E,C)=>{if(!(Array.isArray(E)||E===null)){if(m(),E==null)return y(null),l(t);y(C.entries[0]),l(E)}},[l,t,m,y]),b={selected:j,renderKey:r,toggle:h,visible:f,disabled:c};return x!=null&&(b.variant=x),o.jsxRuntimeExports.jsx(xr,{close:m,data:e,visible:f,value:t,onChange:S,allowMultiple:!1,allowNone:i,columns:n,hideColumnHeader:a,variant:d,trigger:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:s(b)}),...p})},Hh=[{key:"start",icon:o.jsxRuntimeExports.jsx(Z.y4.TextAlign.Left,{})},{key:"center",icon:o.jsxRuntimeExports.jsx(Z.y4.TextAlign.Center,{})},{key:"end",icon:o.jsxRuntimeExports.jsx(Z.y4.TextAlign.Right,{})}],Zh=({key:e,entry:t,onClick:n,selected:s})=>o.jsxRuntimeExports.jsx(he.Icon,{variant:s?"filled":"outlined",onClick:n,children:t.icon},e),zs=({children:e=Zh,...t})=>o.jsxRuntimeExports.jsx(it,{...t,allowMultiple:!1,data:Hh,children:e}),Wh=[{key:"large",label:"L"},{key:"medium",label:"M"},{key:"small",label:"S"}],Ul=e=>o.jsxRuntimeExports.jsx(it,{...e,data:Wh,entryRenderKey:"label"}),Yh=new Set([u.g$2.UUID,u.g$2.JSON]),Jl=u.g$2.ALL.filter(e=>e!==u.g$2.UNKNOWN).map(e=>({key:e.toString(),name:Yh.has(e)?e.toString().toUpperCase():u.d.capitalize(e.toString())})),Gh=Jl.filter(e=>!new u.g$2(e.key).isVariable),Kh=[{key:"name",name:"Name"}],qh=({hideVariableDensity:e=!1,...t})=>o.jsxRuntimeExports.jsx(Ds,{...t,data:e?Gh:Jl,columns:Kh,entryRenderKey:"name"}),Xh=[{key:"x",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{})},{key:"y",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Up,{})}],Uh=[{key:"x",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{})},{key:"y",icon:o.jsxRuntimeExports.jsx(Z.y4.Arrow.Down,{})}],Jh=({key:e,entry:t,onClick:n,selected:s})=>o.jsxRuntimeExports.jsx(he.Icon,{variant:s?"filled":"outlined",onClick:n,children:t.icon},e),Ql=({children:e=Jh,yDirection:t="up",...n})=>o.jsxRuntimeExports.jsx(it,{...n,allowMultiple:!1,data:t==="up"?Xh:Uh,children:e}),ec=e=>o.jsxRuntimeExports.jsx(he.Icon,{className:u.CSS.BE("select","clear"),variant:"outlined",...e,children:o.jsxRuntimeExports.jsx(Z.y4.Close,{"aria-label":"clear"})}),ft=({onChange:e,value:t,entryRenderKey:n="key",data:s,inputProps:r,allowNone:i=!0,searcher:l,className:c,variant:a="button",hideColumnHeader:x=!1,disabled:d,children:p,dropdownVariant:m="connected",placeholder:f=Bs,inputPlaceholder:h=f,triggerTooltip:j,dropdownZIndex:y,filter:S,actions:b,...E})=>{const{visible:C,open:L,close:T,toggle:P}=Ge.use(),[O,I]=g.useState(null),D=l!=null;Q.useAsyncEffect(async()=>{if(Re.selectValueIsZero(t))return I(null);if((O==null?void 0:O.key)===t)return;let k=null;if(D)try{[k]=await l.retrieve([t])}finally{k??(k=null)}else s!=null&&(k=s.find(v=>v.key===t)??null);I(k)},[l,t,s]);const H=g.useCallback((k,v)=>{Array.isArray(k)||(I(k==null?null:v.entries[0]),T(),e(k,v))},[e,i]),B=g.useMemo(()=>D?Mt.Search:Mt.Filter,[D]),_=o.jsxRuntimeExports.jsx(B,{searcher:l,filter:S,children:({onChange:k})=>o.jsxRuntimeExports.jsx(Qh,{...r,autoFocus:m==="modal",variant:a,onChange:k,onFocus:L,selected:O,entryRenderKey:n,visible:C,allowNone:i,className:c,dropdownVariant:m,disabled:d,placeholder:h,children:b})}),R=o.jsxRuntimeExports.jsx(he.Button,{tooltip:j,variant:"outlined",onClick:P,disabled:d,children:O!=null?tc(n,O):f});return o.jsxRuntimeExports.jsx(xr,{close:T,zIndex:y,data:s,allowMultiple:!1,visible:C,value:t,hideColumnHeader:x,onChange:H,allowNone:i,listItem:p,variant:m,trigger:m!=="modal"?_:R,extraDialogContent:m==="modal"?_:void 0,keepMounted:!1,...E})},Bs="Select",tc=(e,t)=>t==null?"":typeof e=="function"?e(t):t[e].toString(),Qh=({entryRenderKey:e,selected:t,visible:n,onChange:s,onFocus:r,allowNone:i=!0,placeholder:l=Bs,className:c,disabled:a,dropdownVariant:x,children:d,...p})=>{const{clear:m}=Re.useSelectionUtils(),[f,h]=g.useState("");g.useEffect(()=>{if(!n){if(u.w$2(t==null?void 0:t.key))return h("");t!=null&&h(tc(e,t))}},[t,n,e]);const j=C=>{s(C),h(C)},y=()=>{f===""&&s(""),h(""),r==null||r()},S=C=>{n||(C.preventDefault(),r==null||r())},b=()=>{h(""),m==null||m()};let E;return x!=="modal"&&(E=o.jsxRuntimeExports.jsx(In.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:n})),o.jsxRuntimeExports.jsxs(mt.Text,{className:u.CSS(u.CSS.BE("select","input"),c),value:f,onChange:j,onFocus:y,onKeyDown:Ie.matchCallback([["Enter"]],C=>{C.preventDefault(),!n&&(r==null||r())}),endContent:E,style:{flexGrow:1},onClick:S,placeholder:l,disabled:a,...p,children:[d,i&&o.jsxRuntimeExports.jsx(ec,{onClick:b,disabled:a})]})},vn=({children:e="",size:t="medium",color:n,icon:s,onClose:r,className:i,onDragStart:l,...c})=>{const a=u.Dt.cssString(n);s==null&&n!=null&&(s=o.jsxRuntimeExports.jsx(Z.y4.Circle,{fill:a}));const x=r==null?void 0:o.jsxRuntimeExports.jsx(he.Icon,{"aria-label":"close",size:"small",className:u.CSS.BE("tag","close"),shade:1,sharp:!0,onClick:d=>{d.stopPropagation(),r()},children:o.jsxRuntimeExports.jsx(Z.y4.Close,{})});return o.jsxRuntimeExports.jsx(Ns.WithIcon,{startIcon:s,endIcon:x,className:u.CSS(i,u.CSS.B("tag"),u.CSS.size(t),r!=null&&u.CSS.BM("tag","closeable")),level:st.ComponentSizeLevels[t],noWrap:!0,align:"center",size:"small",onDragStart:l,...c,children:e})},e1=Object.freeze(Object.defineProperty({__proto__:null,Tag:vn},Symbol.toStringTag,{value:"Module"})),dr=({entryKey:e,entryRenderKey:t,entry:n,loading:s,...r})=>{let i=e;return n!=null&&(i=typeof t=="function"?t(n):n[t]),g.createElement(vn,{size:"small",variant:"outlined",className:u.CSS(n==null&&!s&&u.CSS.BEM("select-multiple","tag","invalid")),draggable:!0,...r,key:e.toString()},u.Gt(i))},t1=he.componentRenderProp(dr),cn=({onChange:e,value:t,className:n,data:s,columns:r=[],entryRenderKey:i="key",emptyContent:l,searcher:c,renderTag:a=t1,placeholder:x,onTagDragStart:d,allowMultiple:p,allowNone:m,replaceOnSingle:f,onTagDragEnd:h,style:j,addPlaceholder:y="Add",children:S,dropdownVariant:b="connected",actions:E,...C})=>{const{visible:L,open:T,close:P}=Ge.use(),[O,I]=g.useState([]),[D,H]=g.useState(!1),B=c!=null;Q.useAsyncEffect(async()=>{H(!0),Re.selectValueIsZero(t)&&I([]);const M=O.map(V=>V.key),A=Me.A(t);if(u.F.unorderedPrimitiveArrays(M,A)===u.F.EQUAL)return;let $=[];if(B)try{$=await c.retrieve(A)}finally{H(!1)}else s!=null&&($=s.filter(V=>A.includes(V.key)));I($)},[c,B,t,s]);const _=g.useCallback((M,A)=>{M!=null&&(I(A.entries),e(Me.A(M),A))},[e]),R=g.useMemo(()=>B?Mt.Search:Mt.Filter,[B]);let k,v;if(b==="connected")v=o.jsxRuntimeExports.jsx(R,{searcher:c,children:({onChange:M,value:A})=>o.jsxRuntimeExports.jsx(n1,{dropdownVariant:b,value:A,selectedKeys:t,className:n,onChange:M,loading:D,selected:O,onFocus:T,entryRenderKey:i,visible:L,renderTag:a,placeholder:x,onTagDragStart:d,onTagDragEnd:h,style:j,children:E})});else{const M=Me.A(t);v=o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",grow:!0,style:j,size:"small",children:[M.map(A=>{const $=O.find(V=>V.key===A);return a({key:A,entryKey:A,entryRenderKey:i,loading:D,entry:$,onClose:()=>{const V=M.filter(F=>F!==A);e(V,{clicked:null,clickedIndex:-1,entries:[]})},onDragStart:V=>d==null?void 0:d(V,A),onDragEnd:V=>h==null?void 0:h(V,A)})}),M.length>0?o.jsxRuntimeExports.jsx(he.Icon,{onClick:T,children:o.jsxRuntimeExports.jsx(Z.y4.Add,{style:{color:"var(--pluto-gray-l9)"}})}):o.jsxRuntimeExports.jsx(he.Button,{onClick:T,shade:0,textShade:9,startIcon:o.jsxRuntimeExports.jsx(Z.y4.Add,{}),variant:"text",children:y})]}),k=o.jsxRuntimeExports.jsx(R,{searcher:c,children:A=>o.jsxRuntimeExports.jsx(mt.Text,{autoFocus:!0,placeholder:"Search",...A,children:E})})}return o.jsxRuntimeExports.jsx(xr,{close:P,data:s,emptyContent:l,visible:L,value:t,onChange:_,allowNone:m,replaceOnSingle:f,columns:r,allowMultiple:!0,listItem:S,trigger:v,extraDialogContent:k,variant:b,...C})},n1=({selectedKeys:e,loading:t,selected:n,onChange:s,onFocus:r,visible:i,entryRenderKey:l,renderTag:c,placeholder:a=Bs,onTagDragStart:x,onTagDragEnd:d,value:p,className:m,children:f,dropdownVariant:h,...j})=>{const{onSelect:y,clear:S}=Re.useSelectionUtils(),b=g.useRef(null);g.useLayoutEffect(()=>{var P;i&&((P=b.current)==null||P.focus())},[i,n]);const E=()=>{i||s(""),r==null||r()},C=()=>{i||r==null||r()},L=()=>{i||s("")};let T;return h!=="modal"&&(T=o.jsxRuntimeExports.jsx(In.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:i})),o.jsxRuntimeExports.jsxs(mt.Text,{ref:b,className:u.CSS(u.CSS.BE("select-multiple","input"),u.CSS.visible(i),m),onBlur:L,placeholder:a,value:p,onChange:s,onFocus:E,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",onClick:C,endContent:T,variant:"button",...j,children:[o.jsxRuntimeExports.jsx(ne.Space,{x:!0,className:u.CSS.BE("select-multiple","tags"),align:"center",grow:!0,size:"small",children:Me.A(e).map(P=>{const O=n.find(I=>I.key===P);return c({key:P,entryKey:P,entryRenderKey:l,loading:t,entry:O,onClose:()=>y==null?void 0:y(P),onDragStart:I=>x==null?void 0:x(I,P),onDragEnd:I=>d==null?void 0:d(I,P)})})}),f,o.jsxRuntimeExports.jsx(ec,{onClick:S})]})},s1=[{key:"h2",label:"XL"},{key:"h3",label:"L"},{key:"h4",label:"M"},{key:"h5",label:"S"},{key:"small",label:"XS"}],an=e=>o.jsxRuntimeExports.jsx(it,{...e,data:s1,entryRenderKey:"label"}),o1=[{key:600,label:"Bold"},{key:500,label:"Medium"},{key:400,label:"Normal"},{key:250,label:"Light"}],nc=e=>o.jsxRuntimeExports.jsx(it,{...e,data:o1,entryRenderKey:"label"}),r1=Object.freeze(Object.defineProperty({__proto__:null,Level:an,Weight:nc},Symbol.toStringTag,{value:"Module"})),i1=Object.freeze(Object.defineProperty({__proto__:null,BaseButton:ql,Button:it,ComponentSize:Ul,DEFAULT_PLACEHOLDER:Bs,DataType:qh,Direction:Ql,DropdownButton:Ds,Multiple:cn,MultipleTag:dr,Single:ft,Text:r1,TextAlignment:zs,defaultButton:Xl},Symbol.toStringTag,{value:"Module"})),l1=11,c1=6,a1=2,si=5,u1=e=>u.$t.width(e)<si&&u.$t.height(e)<si,jn=e=>{const t=u.$t.width(e),n=u.$t.height(e);return Math.min(t,n)<.001?l1:c1},x1=["zoom","pan","select","zoomReset","cancel"],Rn=[...x1,"click"],d1=pe.z.enum(Rn),sc=["zoom","select"],En={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},oc={defaultMode:"pan",pan:[["MouseLeft"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},rc={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]],cancel:[["Escape"]]},pr={zoom:En,pan:oc,select:rc,zoomReset:En,click:En,cancel:En},p1=e=>{const t=Object.entries(e);return Object.fromEntries(t.map(([n,s])=>n==="defaultMode"?[n,s]:[n,s.map(r=>r.filter(i=>i!=="MouseLeft")).filter(r=>r.length>0)]))},m1=u.$t.construct(0,0,1,1,u.K.TOP_LEFT),f1={width:30,height:50},ic=({onChange:e,triggers:t,initial:n=m1,threshold:s=f1,ref:r})=>{const i=(t==null?void 0:t.defaultMode)??"zoom",[l,c]=g.useState(u.$t.ZERO),[a,x]=g.useState(i),[d,p]=Z.useStateRef(n),m=g.useRef(u.J.ZERO),f=g.useRef(null),h=u._.construct(s);g.useEffect(()=>p(()=>u.$t.truncate(n,jn(n))),[n]),g.useEffect(()=>x(i),[i]);const[j,y,S,b]=Ne.useMemoCompare(()=>{const O={...pr[i],...t},I=Ie.flattenConfig(O),D=p1(O);return[O,I,D,Ie.flattenConfig(D)]},Ie.compareModeConfigs,[t]),E=g.useCallback(({box:O,triggers:I,stage:D,cursor:H})=>{if(f.current==null)return;const B=Ie.determineMode(j,I),_=u.$t.construct(f.current);if(B==null)return;if(B==="cancel"){c(u.$t.ZERO),e==null||e({box:d.current,mode:B,stage:D,cursor:H});return}if(B==="zoomReset")return c(u.$t.ZERO),e==null||e({box:u.$t.DECIMAL,mode:B,stage:D,cursor:H}),p(u.$t.DECIMAL);const R=u1(O);if(D==="end"){if(R){B==="zoom"&&c(u.$t.ZERO),e==null||e({box:d.current,mode:"click",stage:D,cursor:H});return}return p(v=>{if(B==="pan"){const A=oi(O,v,_);return A===null||u.$t.equals(A,v)?v:(e==null||e({box:A,mode:B,stage:D,cursor:H}),A)}const M=C(O,v,_);return M===null?v:(e==null||e({box:M,mode:B,stage:D,cursor:H}),B==="zoom"?(c(u.$t.ZERO),M):u.$t.truncate(v,jn(v)))})}if(sc.includes(B))return R?void 0:c(u.b.XY.scale(_).clamp(_).translate({x:-u.$t.left(_),y:-u.$t.top(_)}).box(ri(h,O,_)));if(c(v=>u.$t.areaIsZero(v)?v:u.$t.ZERO),u.J.distance(H,m.current)<a1)return;m.current=H;const k=oi(O,d.current,_);e==null||e({box:k,mode:B,stage:D,cursor:H})},[c,x,e,j,s.height,s.width,p,f,jn]);g.useImperativeHandle(r,()=>({reset:()=>{c(u.$t.ZERO),p(u.$t.DECIMAL),e==null||e({box:u.$t.DECIMAL,mode:"zoomReset",stage:"start",cursor:u.J.ZERO})}}),[e]);const C=g.useCallback((O,I,D)=>{const H=Lo(I,D).box(ri(h,O,D));return u.$t.truncate(H,jn(H))},[s]),L=Ie.useHeldRef({triggers:[["Control"]]}),T=Ie.useHeldRef({triggers:[["Alt"]]});g.useEffect(()=>{const O=I=>{if(f.current==null)return;let D=1;I.deltaY<0?D-=.035:D+=.035;const H=u.$t.construct(f.current),B=u.J.construct(I);if(Array.from(f.current.children).push(f.current),!u.$t.contains(H,B)||f.current!==I.target&&Ge.findParent(I.target,A=>A===f.current)==null)return;const k=Lo(d.current,u.$t.construct(f.current)).pos(u.J.construct(I));let M=u.b.XY.magnify({x:L.current.held?1:D,y:T.current.held?1:D}).box(d.current);M=u.$t.translate(M,{x:L.current.held?0:k.x*(1-D),y:T.current.held?0:k.y*(1-D)}),p(M),e==null||e({stage:"end",box:M,cursor:u.J.construct(I),mode:"zoom"})};return window.addEventListener("wheel",O),()=>window.removeEventListener("wheel",O)},[p,e]),yl.useDrag({bound:f,onDrag:E,triggers:y,loose:!0});const P=g.useCallback(({triggers:O,stage:I})=>{if(I==="end")return x(i);const D=Ie.determineMode(S,O);D!=null&&x(D)},[S,i,e]);return Ie.use({triggers:b,callback:P,region:f}),{maskBox:l,ref:f,mode:a}},Lo=(e,t)=>u.b.XY.scale(t).clamp(t).scale(e),oi=(e,t,n)=>{let s=u.$t.signedDims(Lo(t,n).box(e));s={signedWidth:-s.signedWidth,signedHeight:-s.signedHeight};const r=u.b.XY.translate(u.J.construct(s)).box(t);return u.$t.truncate(r,jn(r))},ri=(e,t,n)=>u.$t.height(t)<=e.height?u.$t.construct(u.$t.left(t),u.$t.top(n),u.$t.width(t),u.$t.height(n)):u.$t.width(t)<=e.width?u.$t.construct(u.$t.left(n),u.$t.top(t),u.$t.width(n),u.$t.height(t)):t,h1=({mode:e,triggers:t})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",children:[o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:u.d.capitalize(e)}),o.jsxRuntimeExports.jsx(ne.Space,{empty:!0,x:!0,align:"center",children:o.jsxRuntimeExports.jsx(Tf.Text,{trigger:t[0],level:"small"})})]}),g1={zoom:o.jsxRuntimeExports.jsx(Z.y4.Zoom,{}),pan:o.jsxRuntimeExports.jsx(Z.y4.Pan,{}),select:o.jsxRuntimeExports.jsx(Z.y4.Selection,{}),zoomReset:o.jsxRuntimeExports.jsx(Z.y4.Expand,{}),click:o.jsxRuntimeExports.jsx(Z.y4.Bolt,{})},j1=({triggers:e,disable:t=["zoomReset","click"],...n})=>{const s=[...t,"cancel"],r=Object.entries(e).filter(([i])=>!s.includes(i)&&Rn.includes(i)).map(([i,l])=>({key:i,icon:g1[i],tooltip:o.jsxRuntimeExports.jsx(h1,{mode:i,triggers:l})})).sort((i,l)=>Rn.indexOf(i.key)-Rn.indexOf(l.key));return o.jsxRuntimeExports.jsx(it,{...n,data:r,entryRenderKey:"icon",children:({title:i,entry:l,...c})=>g.createElement(he.Icon,{...c,key:l.key,variant:c.selected?"filled":"outlined",size:"small",tooltip:l.tooltip,tooltipLocation:u.K.BOTTOM_LEFT},l.icon)})},E1=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:pr,MASK_MODES:sc,MODES:Rn,Mask:Kl,PAN_DEFAULT_TRIGGERS:oc,SELECT_DEFAULT_TRIGGERS:rc,SelectMode:j1,ZOOM_DEFAULT_TRIGGERS:En,modeZ:d1,use:ic},Symbol.toStringTag,{value:"Module"})),y1=e=>e==null?null:e.closest(".pluto-line-plot__viewport")??null,lc=({ref:e,children:t,initial:n=u.$t.DECIMAL,onChange:s,...r})=>{const{setViewport:i}=rt("Viewport");g.useLayoutEffect(()=>{i({box:n,mode:"zoom",cursor:u.J.ZERO,stage:"start"})},[i,n]);const l=g.useCallback(a=>{i(a),s==null||s(a)},[s,i]),c=ic({onChange:l,initial:n,ref:e,...r});return o.jsxRuntimeExports.jsx(Kl,{className:u.CSS.BE("line-plot","viewport"),...c,children:t})},S1=Object.freeze(Object.defineProperty({__proto__:null,BoundsQuerier:Bh,Floating:cr,Legend:Zl,Line:ur,LinePlot:Bl,Title:Wl,Tooltip:zh,Viewport:lc,XAxis:Ol,YAxis:Vl,axisFactory:rr,selectViewportEl:y1,useBoundQuerier:Gl,useContext:rt,useGridEntry:zn,useViewport:zl},Symbol.toStringTag,{value:"Module"})),R1=({aetherKey:e,...t})=>(Q.use$1({aetherKey:e,type:z.Annotation.TYPE,schema:z.annotationStateZ,initialState:t}),null),cc=({aetherKey:e,menu:t,...n})=>{const s=Q.useUniqueKey(e),{setViewport:r,setHold:i}=rt("Range.Provider"),[,{hovered:l,count:c},a]=Q.use$1({aetherKey:s,type:z.Provider$1.TYPE,schema:z.providerStateZ,initialState:{...n,cursor:null,hovered:null,count:0}}),x=zn({key:s,loc:"top",size:c>0?32:0,order:3},"Annotation.Provider"),d=kt.useContextMenu(),p=Z.useSyncedRef(d.visible),m=g.useCallback(f=>{const h=y=>{a(S=>({...S,cursor:{x:y.clientX,y:y.clientY}}))},j=f.currentTarget;j.addEventListener("mousemove",h),j.addEventListener("mouseleave",()=>{j.removeEventListener("mousemove",h),p.current||a(y=>({...y,cursor:null}))},{once:!0})},[a]);return o.jsxRuntimeExports.jsx(kt.ContextMenu,{...d,menu:()=>t==null||l==null?null:t(l),children:o.jsxRuntimeExports.jsx(ne.Space,{style:{...x,cursor:l!=null?"pointer":"default",width:"100%",height:"100%"},onContextMenu:d.open,className:d.className,onClick:()=>{l!=null&&(r({box:u.$t.construct({x:l.viewport.lower,y:0},{x:l.viewport.upper,y:1}),mode:"zoom",cursor:u.J.ZERO,stage:"start"}),i(!0))},onMouseEnter:m})})},C1=Object.freeze(Object.defineProperty({__proto__:null,Annotation:R1,Provider:cc},Symbol.toStringTag,{value:"Module"})),ac={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},w1=Ie.flattenConfig(ac),uc=({aetherKey:e})=>{const t=Q.useUniqueKey(e),[,,n]=Q.use$1({aetherKey:t,type:z.Measure.TYPE,schema:z.measureStateZ,initialState:{hover:null,one:null,two:null}}),s=g.useRef(null),r=Ie.useHeldRef({triggers:w1,loose:!0}),i=g.useCallback(({mode:a,cursor:x})=>{if(a==="click"){const d=Ie.determineMode(ac,r.current.triggers,{loose:!0});if(["one","two"].includes(d))return n(p=>({...p,[d]:x}));n(d==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??x,two:p.one!==null?x:p.two}))}},[n,r]);zl(i);const l=g.useCallback(a=>n(x=>({...x,hover:u.J.construct(a)})),[n]),c=g.useCallback(()=>{n(a=>({...a,hover:null}))},[n]);return g.useEffect(()=>{if(s.current===null)return;const a=s.current.parentElement;if(a!=null)return a.addEventListener("mousemove",l),a.addEventListener("mouseleave",c),()=>{a.removeEventListener("mousemove",l),a.removeEventListener("mouseleave",c)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:s})},b1=Object.freeze(Object.defineProperty({__proto__:null,Measure:uc},Symbol.toStringTag,{value:"Module"})),mr=({aetherKey:e,label:t,position:n,onLabelChange:s,onPositionChange:r,onUnitsChange:i,units:l="",color:c,lineWidth:a,lineDash:x,className:d,onSelect:p,style:m,...f})=>{const[h,j]=st.usePurePassthrough({value:t,onChange:s,initial:""}),y=Z.useSyncedRef(r),[,{pixelPosition:S},b]=Q.use$1({aetherKey:e,type:z.Rule.TYPE,schema:z.ruleStateZ,initialState:{color:c,dragging:!1,position:n,lineWidth:a,lineDash:x},onAetherChange:g.useCallback(({position:B})=>{var _;B!=null&&((_=y.current)==null||_.call(y,B))},[y])}),E=g.useRef(S);S!==E.current&&(E.current=S);const{id:C}=rt("Rule"),L=document.getElementById(C),T=L==null?void 0:L.querySelector(".pluto-line-plot__viewport"),P=g.useRef(S);g.useEffect(()=>{b(B=>({...B,position:n,color:c,lineWidth:a,lineDash:x}))},[n,c,a,x]);const O=Ke.useCursorDrag({onStart:g.useCallback(()=>{p==null||p(),b(B=>({...B,dragging:!0})),P.current=E.current},[]),onMove:B=>{b(_=>({..._,pixelPosition:(P.current??0)+u.$t.signedHeight(B)}))},onEnd:g.useCallback(()=>{b(B=>({...B,dragging:!1})),P.current=S},[])}),I=g.useRef(null);if(n==null||S==null)return null;const D=u.Dt.pickByContrast(c,u.Dt.BLACK,u.Dt.WHITE),H=o.jsxRuntimeExports.jsxs("div",{ref:I,className:u.CSS.B("rule"),style:{top:`calc(${S}px - 0.5rem)`},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("rule","drag-handle"),onDragStart:O,draggable:!0}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",className:u.CSS(d,u.CSS.BE("rule","tag")),bordered:!0,onClick:p,size:1,rounded:!0,style:{borderColor:u.Dt.cssString(c),backgroundColor:u.Dt.hex(u.Dt.setAlpha(c,.7)),...m},...f,children:[o.jsxRuntimeExports.jsx(Z.Editable,{className:u.CSS.B("label"),level:"small",value:h,onChange:j,color:D}),o.jsxRuntimeExports.jsx(Ns.Divider,{y:!0,style:{borderColor:u.Dt.cssString(c)}}),o.jsxRuntimeExports.jsxs(ne.Space,{size:"small",x:!0,align:"center",children:[o.jsxRuntimeExports.jsx(Z.Editable,{value:n.toFixed(2),onChange:B=>{const _=Number(B);isFinite(_)&&(r==null||r(_))},level:"small",color:D}),o.jsxRuntimeExports.jsx(Z.MaybeEditable,{level:"small",color:D,value:l,onChange:i})]})]})]});return T==null?H:Sl.createPortal(H,T)},v1=Object.freeze(Object.defineProperty({__proto__:null,Rule:mr},Symbol.toStringTag,{value:"Module"})),xc=me.canDropOfType(ot),k1=({lines:e,axes:t,showTitle:n=!0,title:s="",onTitleChange:r,showLegend:i=!0,legendPosition:l,onLegendPositionChange:c,titleLevel:a="h4",onLineChange:x,onRuleChange:d,onAxisChannelDrop:p,onAxisChange:m,rules:f,enableTooltip:h=!0,enableMeasure:j=!1,initialViewport:y=u.$t.DECIMAL,legendVariant:S,onViewportChange:b,viewportTriggers:E,annotationProvider:C,onSelectRule:L,children:T,...P})=>{var B;const O=t.filter(({location:_})=>u.K.isY(_)),I=g.useRef(null),D=Z.usePrevious(e.length),H=Z.usePrevious(P.hold);return(D===0&&e.length!==0||H===!0&&P.hold===!1)&&((B=I.current)==null||B.reset()),o.jsxRuntimeExports.jsxs(Bl,{...P,children:[O.map((_,R)=>{const k=e.filter(A=>A.axes.x===_.key),v=t.filter(({location:A})=>u.K.isX(A)),M=f==null?void 0:f.filter(A=>[...v.map(({key:$})=>$),_.key].includes(A.axis));return o.jsxRuntimeExports.jsx(M1,{axis:_,index:R,lines:k,yAxes:v,rules:M,onAxisChannelDrop:p,onAxisChange:m,annotationProvider:C,onRuleChange:d,onSelectRule:L},_.key)}),i&&o.jsxRuntimeExports.jsx(Zl,{onLineChange:x,position:l,onPositionChange:c,variant:S}),n&&o.jsxRuntimeExports.jsx(Wl,{value:s,onChange:r,level:a}),o.jsxRuntimeExports.jsxs(lc,{initial:y,onChange:b,triggers:E,ref:I,children:[h&&o.jsxRuntimeExports.jsx(Yl,{}),j&&o.jsxRuntimeExports.jsx(uc,{}),T]})]})},M1=({yAxes:e,lines:t,index:n,rules:s,onRuleChange:r,onSelectRule:i,onAxisChannelDrop:l,onAxisChange:c,axis:{location:a,key:x,showGrid:d,...p},annotationProvider:m})=>{const f=me.useDrop({type:"Channel.LinePlot.XAxis",canDrop:xc,onDrop:g.useCallback(({items:y})=>{const S=me.filterByType(ot,y);return l==null||l(x,S.map(({key:b})=>b)),S},[x,l])}),h=s==null?void 0:s.filter(y=>y.axis===x),j=me.useDraggingState();return o.jsxRuntimeExports.jsxs(Ol,{...p,...f,location:a,axisKey:x,showGrid:d??n===0,className:u.CSS(u.CSS.dropRegion(me.canDropOfType(ot)(j))),onAutoBoundsChange:y=>c==null?void 0:c({key:x,bounds:y}),children:[e.map((y,S)=>{const b=t.filter(C=>C.axes.y===y.key),E=s==null?void 0:s.filter(C=>C.axis===y.key);return o.jsxRuntimeExports.jsx(P1,{axis:{...y,showGrid:d??(n===0&&S===0)},lines:b,rules:E,onRuleChange:r,onAxisChannelDrop:l,onAxisChange:c,onSelectRule:i},y.key)}),h==null?void 0:h.map(y=>g.createElement(mr,{aetherKey:y.key,...y,key:y.key,onLabelChange:S=>r==null?void 0:r({key:y.key,label:S}),onPositionChange:S=>r==null?void 0:r({key:y.key,position:S}),onUnitsChange:S=>r==null?void 0:r({key:y.key,units:S}),onSelect:()=>i==null?void 0:i(y.key)})),o.jsxRuntimeExports.jsx(cc,{...m})]})},_1=({channels:{x:e,y:t}})=>`${e??0}-${t}`,P1=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:s,onAxisChange:r,axis:{key:i,location:l,...c},onSelectRule:a})=>{const x=me.useDrop({type:"Channel.LinePlot.YAxis",canDrop:xc,onDrop:g.useCallback(({items:p})=>{const m=me.filterByType(ot,p);return s==null||s(i,m.map(({key:f})=>f)),m},[i,s])}),d=me.useDraggingState();return o.jsxRuntimeExports.jsxs(Vl,{...c,...x,location:l,axisKey:i,className:u.CSS(u.CSS.dropRegion(me.canDropOfType(ot)(d))),onAutoBoundsChange:p=>r==null?void 0:r({key:i,bounds:p}),children:[e.map(p=>o.jsxRuntimeExports.jsx(L1,{line:p},_1(p))),t==null?void 0:t.map(p=>g.createElement(mr,{aetherKey:p.key,...p,key:p.key,onLabelChange:m=>n==null?void 0:n({key:p.key,label:m}),onPositionChange:m=>n==null?void 0:n({key:p.key,position:m}),onUnitsChange:m=>n==null?void 0:n({key:p.key,units:m}),onClick:()=>a==null?void 0:a(p.key)}))]})},L1=({line:e})=>e.variant==="static"?o.jsxRuntimeExports.jsx(T1,{line:e}):o.jsxRuntimeExports.jsx(N1,{line:e}),N1=({line:{key:e,timeSpan:t,channels:{x:n,y:s},axes:r,...i}})=>{const{xTelem:l,yTelem:c}=g.useMemo(()=>{const a=Number(t.valueOf())*3,x=z.streamChannelData({timeSpan:t,channel:s,keepFor:a}),d=n!=null&&n!==0;return{xTelem:z.streamChannelData({timeSpan:t,channel:d?n:s,useIndexOfChannel:!d,keepFor:a}),yTelem:x}},[t.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(ur,{aetherKey:e,y:c,x:l,...i})},T1=({line:{timeRange:e,key:t,channels:{x:n,y:s},...r}})=>{const{xTelem:i,yTelem:l}=g.useMemo(()=>{const c=z.channelData({timeRange:e,channel:s}),a=n!=null&&n!==0;return{xTelem:z.channelData({timeRange:e,channel:a?n:s,useIndexOfChannel:!a}),yTelem:c}},[e.start.valueOf(),e.end.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(ur,{aetherKey:t,y:l,x:i,...r})},ii=[{key:"name",name:"Name"},{key:"alias",name:"Alias"},{key:"rate",name:"Rate"},{key:"dataType",name:"Data Type"},{key:"index",name:"Index"},{key:"key",name:"Key"},{key:"isIndex",name:"Is Index"}],ds=({items:e},t)=>{const n=me.filterByType(ot,e);return n.length>0&&!n.every(s=>t.includes(s.key))},dc=["name","alias"],pc=e=>{const t=$s();return g.useMemo(()=>e.length===0?ii:ii.filter(n=>e.includes(n.key)),[e,t])},mc=e=>{if(e==null)return Z.y4.Channel;if(nt.jv.isCalculated(e))return Z.y4.Calculation;if(e.isIndex)return Z.y4.Index;const t=new u.g$2(e.dataType);return t.isInteger?Z.y4.Binary:t.isFloat?Z.y4.Decimal:t.equals(u.g$2.STRING)?Z.y4.String:t.equals(u.g$2.JSON)?Z.y4.JSON:Z.y4.Channel},$1=({key:e,...t})=>{const n=mc(t.entry);return o.jsxRuntimeExports.jsx(dr,{icon:o.jsxRuntimeExports.jsx(n,{}),...t},e)},A1=({columns:e=dc,onChange:t,className:n,value:s,searchOptions:r,...i})=>{const l=qe(),c=$s(),a=pc(e),x=or(),d=Ne.useMemoDeepEqualProps(r),p=g.useMemo(()=>l==null?void 0:l.channels.newSearcherWithOptions({rangeKey:x,internal:!1,...d}),[l,x,d]),m=l!=null?void 0:o.jsxRuntimeExports.jsx(Re.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:f,onDragEnd:h,...j}=me.useDragAndDrop({type:"Channel.SelectMultiple",canDrop:g.useCallback(C=>ds(C,Me.A(s)),[s]),onDrop:g.useCallback(({items:C})=>{const L=me.filterByType(ot,C);if(L.length===0)return[];const T=u.c$1.unique([...Me.A(s),...L.map(P=>P.key)]);return t(T,{clickedIndex:null,clicked:null,entries:[]}),L},[t,s])}),y=me.useDraggingState(),S=g.useCallback(({dropped:C})=>{t(Me.A(s).filter(L=>!C.some(T=>T.key===L)),{clickedIndex:null,clicked:null,entries:[]})},[t,s]),b=g.useCallback((C,L)=>f([{key:L,type:ot}],S),[f,S]),E=g.useCallback(C=>c[C.key]??C.name,[c]);return o.jsxRuntimeExports.jsx(cn,{className:u.CSS(n,u.CSS.dropRegion(ds(y,Me.A(s)))),value:s,onTagDragStart:b,onTagDragEnd:h,searcher:p,onChange:t,columns:a,emptyContent:m,entryRenderKey:E,renderTag:$1,...j,...i})},Dt=({columns:e=dc,onChange:t,value:n,className:s,data:r,searchOptions:i,...l})=>{const c=qe(),a=$s(),x=pc(e),d=or(),p=Ne.useMemoDeepEqualProps(i),m=g.useMemo(()=>{if(!(r!=null&&r.length>0))return c==null?void 0:c.channels.newSearcherWithOptions({rangeKey:d,internal:!1,...p})},[c,d,r==null?void 0:r.length,p]),f=c!=null?void 0:o.jsxRuntimeExports.jsx(Re.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),h=g.useId(),j=g.useMemo(()=>({key:h,type:"Channel.SelectMultiple"}),[h]),{startDrag:y,onDragEnd:S,...b}=me.useDragAndDrop({type:"Channel.SelectSingle",canDrop:g.useCallback(T=>ds(T,Me.o(n)),[n]),onDrop:g.useCallback(({items:T})=>{const P=me.filterByType(ot,T);return P.length===0?[]:(t(P[0].key,{clickedIndex:null,clicked:null,entries:[]}),P)},[j,t])}),E=me.useDraggingState(),C=g.useCallback(()=>n!=null&&y([{type:ot,key:n}]),[y,n]),L=g.useCallback(T=>a[T.key]??T.name,[a]);return o.jsxRuntimeExports.jsx(ft,{data:r,className:u.CSS(s,u.CSS.dropRegion(ds(E,Me.o(n)))),value:n,onDragStart:C,onDragEnd:S,onChange:t,searcher:m,columns:x,emptyContent:f,entryRenderKey:L,...b,...l})},I1=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:hh,AliasProvider:$l,LinePlot:k1,SelectMultiple:A1,SelectSingle:Dt,resolveIcon:mc,useActiveRange:or,useAlias:Tl,useAliases:$s,useContext:ln,useName:As},Symbol.toStringTag,{value:"Module"})),_t=({path:e,optional:t=!1,onChange:n})=>{const s=ht(),{get:r,bind:i,set:l,setStatus:c}=s,[a,x]=g.useState(r(e,{optional:t}));g.useEffect(()=>(x(r(e,{optional:t})),i({path:e,onChange:x,listenToChildren:!1})),[e,n,i,r]);const d=g.useCallback(f=>{n==null||n(f,{...s,path:e}),l(e,f)},[e,l,n]),p=g.useCallback(f=>c(e,f),[e,c]);if(a==null){if(!t)throw new Error(`Field state is null: ${e}`);return null}let m;return s.mode==="preview"&&(m="preview"),{onChange:d,setStatus:p,variant:m,...a}},fc=(e,t=!1,n)=>{const{get:s,bind:r}=ht(n),[,i]=g.useState(0);return g.useEffect(()=>(i(l=>l+1),r({path:e,onChange:()=>i(l=>l+1)})),[e,r]),s(e,{optional:t})??null},hc=(e,t=!1,n)=>{var l;const{get:s,bind:r}=ht(n),[,i]=g.useState(0);return g.useEffect(()=>(i(c=>c+1),r({path:e,onChange:()=>i(c=>c+1)})),[e,r]),((l=s(e,{optional:t}))==null?void 0:l.value)??null},D1=e=>{var t,n;return((n=(t=fc(e,!0))==null?void 0:t.status)==null?void 0:n.variant)==="success"},z1=({path:e,ctx:t,onChange:n})=>{const s=ht(t);g.useEffect(()=>s.bind({path:e,onChange:r=>n(r,s),listenToChildren:!1}),[e,s])},B1=({path:e,optional:t=!1})=>{const{bind:n,get:s}=ht(),[r,i]=g.useState(s(e,{optional:t}));if(g.useEffect(()=>(i(s(e,{optional:t})),n({path:e,onChange:l=>i({...l,value:u.Qt(l.value)}),listenToChildren:!0})),[e,n,s]),r==null&&!t)throw new Error("Field state is null");return(r==null?void 0:r.value)??null},gc=(e,t)=>({add:(n,s)=>{const r=u.Qt(e.get(t).value);r.splice(s,0,...Me.A(n)),e.set(t,r,{validateChildren:!1})},push:(n,s)=>{const r=u.Qt(e.get(t).value);r.push(...Me.A(n)),s!=null&&r.sort(s),e.set(t,r,{validateChildren:!1})},remove:n=>{const s=e.get(t).value,r=new Set(Me.A(n));e.set(t,s.filter((i,l)=>!r.has(l)))},keepOnly:n=>{const s=e.get(t).value,r=new Set(Me.A(n));e.set(t,s.filter((i,l)=>r.has(l)))},set:n=>e.set(t,st.executeSetter(n,e.get(t).value)),sort:n=>{const s=u.Qt(e.get(t).value);s.sort(n),e.set(t,s)}}),O1=({path:e,updateOnChildren:t=!1,ctx:n})=>{const s=ht(n),{bind:r,get:i}=s,[l,c]=g.useState(i(e).value);return g.useEffect(()=>(c(i(e).value),r({path:e,onChange:a=>{c(u.Qt(a.value))},listenToChildren:t})),[e,r,i,c]),g.useMemo(()=>({value:l,...gc(s,e)}),[l,s,e])},jc=g.createContext({mode:"normal",bind:()=>()=>{},set:()=>{},reset:()=>{},remove:()=>{},get:()=>({value:void 0,status:{key:"",variant:"success",message:""},touched:!1,required:!1}),validate:()=>!1,validateAsync:()=>Promise.resolve(!1),value:()=>({}),has:()=>!1,setStatus:()=>{},clearStatuses:()=>{},setCurrentStateAsInitialValues:()=>{}}),ht=e=>{const t=g.use(jc);return e??t},li=e=>({key:e,variant:"success",message:""}),V1=e=>e.code===pe.z.ZodIssueCode.custom&&e.params!=null&&"variant"in e.params?e.params.variant:"error",Ec=({values:e,sync:t=!1,schema:n,mode:s="normal",onChange:r,onHasTouched:i})=>{const l=Z.useInitializerRef(()=>({state:ze.x.copy(e),statuses:new Map,touched:new Set,listeners:new Map,parentListeners:new Map})),c=Z.useSyncedRef(n),a=Z.useSyncedRef(r),x=Z.useSyncedRef(e),d=Z.useSyncedRef(i),p=Re.useErrorHandler(),m=g.useCallback(()=>{x.current=ze.x.copy(l.current.state),S()},[]),f=g.useCallback(({path:_,onChange:R,listenToChildren:k=!1})=>{var $;const{parentListeners:v,listeners:M}=l.current,A=k?v:M;return A.has(_)||A.set(_,new Set),($=A.get(_))==null||$.add(R),()=>{var V;return(V=A.get(_))==null?void 0:V.delete(R)}},[]),h=g.useCallback((_,{optional:R}={optional:!1})=>{const{state:k,statuses:v,touched:M}=l.current,A=ze.x.get(k,_,{optional:R});if(A==null)return null;const $={value:A,status:v.get(_)??li(_),touched:M.has(_),required:!1};if(c.current==null)return $;const V=c.current,F=u.L.getFieldSchema(V,_,{optional:!0});return F==null||"isOptional"in F&&typeof F.isOptional=="function"&&($.required=!F.isOptional()),$},[]),j=g.useCallback(_=>{var M;const{touched:R}=l.current,k=R.size===0;R.add(_);const v=R.size===0;k!==v&&((M=d.current)==null||M.call(d,!v))},[]),y=g.useCallback(_=>{var M;const{touched:R}=l.current,k=R.size===0;R.delete(_);const v=R.size===0;k!==v&&((M=d.current)==null||M.call(d,!v))},[]),S=g.useCallback(()=>{var v;const{touched:_}=l.current,R=_.size===0;_.clear();const k=_.size===0;R!==k&&((v=d.current)==null||v.call(d,!k))},[]),b=g.useCallback(_=>{const{state:R,statuses:k,listeners:v,parentListeners:M}=l.current;ze.x.remove(R,_),k.delete(_),y(_),v.delete(_),M.delete(_)},[]),E=g.useCallback(_=>{const{statuses:R}=l.current;l.current.state=_??ze.x.copy(x.current),L(""),R.clear(),S()},[]),C=g.useCallback(_=>{var v;const{listeners:R}=l.current,k=h(_,{optional:!0});k!=null&&((v=R.get(_))==null||v.forEach(M=>M(k)))},[]),L=g.useCallback(_=>{const{listeners:R,parentListeners:k}=l.current,v=R.get(_);if(_==""&&([...R.keys()].forEach($=>{var F;const V=h($,{optional:!0});V!=null&&((F=R.get($))==null||F.forEach(W=>{W(V)}))}),[...k.keys()].forEach($=>{var F;const V=h($,{optional:!0});V!=null&&((F=k.get($))==null||F.forEach(W=>{W(V)}))})),v!=null){const M=h(_,{optional:!0});M!=null&&v.forEach(A=>{A(M)})}k.forEach((M,A)=>{if(ze.x.pathsMatch(_,A)){const V=h(A,{optional:!0});V!=null&&M.forEach(F=>{F(V)})}})},[]),T=g.useCallback((_,R="",k=!0)=>{const{statuses:v,listeners:M}=l.current;if(_.success){const F=[...v.keys()];return v.clear(),F.forEach(W=>C(W)),!0}let A=!0;const $=new Set(_.error.issues.map(F=>F.path.join(".")));let V=(F,W)=>F===W;return k&&(V=(F,W)=>ze.x.pathsMatch(F,W)),_.error.issues.forEach(F=>{var oe;const{message:W}=F,ee=F.path.join(".");if(!V(ee,R))return;const te=V1(F);te!=="warning"&&(A=!1),v.set(ee,{key:ee,variant:te,message:W}),j(ee);let se=h(ee,{optional:!0});se??(se={value:void 0,status:v.get(ee)??li(ee),touched:!1,required:!1}),(oe=M.get(ee))==null||oe.forEach(J=>J(se))}),v.forEach((F,W)=>{$.has(W)||(v.delete(W),C(W))}),A},[]),P=g.useCallback((_,R)=>{if(c.current==null)return!0;const{state:k}=l.current,v=c.current.safeParse(k);return T(v,_,R)},[T]),O=g.useCallback(async(_,R)=>{if(c.current==null)return!0;const{state:k}=l.current,v=await c.current.safeParseAsync(k);return T(v,_,R)},[T]),I=g.useCallback((_,R,k={})=>{const v=ze.x.get(l.current.state,_,{optional:!0}),{validateChildren:M=!0}=k,{state:A}=l.current,$=ze.x.get(x.current,_,{optional:!0});ze.x.equal($,R)?y(_):j(_),_.length===0?l.current.state=R:ze.x.set(A,_,R),L(_),p(async()=>{var W;let F;try{F=P(_,M)}catch{F=await O(_,M)}(W=a.current)==null||W.call(a,{values:l.current.state,path:_,prev:v,valid:F})},"Failed to validate form")},[]),D=g.useCallback(_=>ze.x.has(l.current.state,_),[]),H=g.useCallback((_,R)=>{l.current.statuses.set(_,R),j(_),C(_)},[]),B=g.useCallback(()=>{const{statuses:_}=l.current;_.clear(),_.forEach((R,k)=>C(k))},[]);return g.useEffect(()=>{if(!t)return;const{listeners:_}=l.current;l.current.state=e,_.forEach((R,k)=>{const v=h(k,{optional:!0});v!=null&&R.forEach(M=>M(v))})},[t,e]),g.useMemo(()=>({bind:f,set:I,get:h,mode:s,validate:P,validateAsync:O,value:()=>l.current.state,has:D,remove:b,setStatus:H,clearStatuses:B,reset:E,setCurrentStateAsInitialValues:m}),[f,I,h,P,O,D,b,H,B,E,s,m])},F1=({children:e,...t})=>o.jsxRuntimeExports.jsx(jc,{value:t,children:e}),H1=he.componentRenderProp(mt.Text),Ce=({path:e,children:t=H1,label:n,padHelpText:s=!0,visible:r=!0,hideIfNull:i=!1,optional:l,onChange:c,className:a,...x})=>{const d=_t({path:e,optional:l??i,onChange:c}),p=ht();if(d==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n??(n=u.d.capitalize(ze.x.element(e,-1))),r=typeof r=="function"?r(d,p):r,!r)return null;const m=d.status.message,{onChange:f,value:h}=d,j={onChange:f,value:h};return d.variant!=null&&(j.variant=d.variant),o.jsxRuntimeExports.jsx(ge.Item,{padHelpText:s,helpText:m,helpTextVariant:d.status.variant,label:n,required:d.required,className:u.CSS(a,u.CSS.BE("field",e.split(".").join("-")),u.CSS.M(d.status.variant)),...x,children:t(j)})},Pt=e=>({fieldKey:t,fieldProps:n,inputProps:s})=>{const r=({inputProps:i,path:l,fieldKey:c=t,...a})=>o.jsxRuntimeExports.jsx(Ce,{...n,...a,path:c?`${l}.${c}`:l,children:x=>o.jsxRuntimeExports.jsx(e,{...x,...s,...i})});return r.displayName=e.displayName,r},yc=Pt(ge.Numeric),Ze=yc({}),Sc=Pt(mt.Text),fr=Sc({}),Rc=Pt(Q.Switch$1),Os=Rc({}),Z1=Pt(ft),W1=Pt(cn),Y1=Pt(Ds),G1=Pt(it),hr=({key:e,open:t,onChange:n})=>{const s=Ne.useMemoPrimitiveArray(e);Q.useAsyncEffect(async()=>{if(t==null)return;const r=await t();if(r==null)return;const i=r.onChange(n);return async()=>{i(),await r.close()}},[t==null,s])},K1=({fetchInitialValue:e,...t})=>{const[n,s]=g.useState(void 0);return Q.useAsyncEffect(async()=>{s(await e())},[e]),hr({...t,onChange:s}),n},q1=Object.freeze(Object.defineProperty({__proto__:null,useListener:hr,useState:K1},Symbol.toStringTag,{value:"Module"})),X1=({key:e,name:t,queryFn:n,values:s,openObservable:r,applyChanges:i,applyObservable:l,...c})=>{const a=qe(),x=Re.useErrorHandler(),d=Ne.useMemoPrimitiveArray(e),p=Ec({values:s,...c,sync:!1,onChange:h=>{a!=null&&x(async()=>{await(i==null?void 0:i({...h,client:a}))},`Failed to apply changes for ${t}`)}});Q.useAsyncEffect(async()=>{if(a!=null)try{const h=await n({client:a});p.set("",h)}catch(h){x(h,`Failed to retrieve ${t}`)}},[d,a==null?void 0:a.key]);const m=g.useCallback(async()=>{if(a!=null)return await(r==null?void 0:r(a))},[d,a==null?void 0:a.key]),f=g.useCallback(h=>l==null?void 0:l({changes:h,ctx:p}),[d,l]);return hr({key:d,open:m,onChange:f}),p},U1=Object.freeze(Object.defineProperty({__proto__:null,Field:Ce,Form:F1,NumericField:Ze,SwitchField:Os,TextField:fr,buildButtonSelectField:G1,buildDropdownButtonSelectField:Y1,buildNumericField:yc,buildSelectMultiField:W1,buildSelectSingleField:Z1,buildSwitchField:Rc,buildTextField:Sc,fieldArrayUtils:gc,fieldBuilder:Pt,use:Ec,useChildFieldValues:B1,useContext:ht,useField:_t,useFieldArray:O1,useFieldListener:z1,useFieldState:fc,useFieldValid:D1,useFieldValue:hc,useSynced:X1},Symbol.toStringTag,{value:"Module"})),J1=[{key:"name",name:"Name"},{key:"location",name:"Location",render:({entry:{location:e,rackName:t}})=>o.jsxRuntimeExports.jsx(vl,{level:"small",shade:9,weight:450,style:{marginTop:"0.25rem"},size:"tiny",children:t?`${t}.${e}`:e})}],Q1=({searchOptions:e,filter:t,...n})=>{const s=qe();let r=s==null?void 0:s.hardware.devices;e!=null&&s!=null&&(r=s.hardware.devices.newSearcherWithOptions(e));const[i,l]=g.useState(new Map),c=g.useCallback(a=>((t==null?void 0:t(a))??a).map(d=>({...d,rackName:i.get(d.rack)})),[t,i]);return Q.useAsyncEffect(async()=>{if(s==null){l(new Map);return}const a=await s.hardware.racks.retrieve([]);l(new Map(a.map(({key:x,name:d})=>[x,d])))},[s==null?void 0:s.key]),o.jsxRuntimeExports.jsx(ft,{columns:J1,searcher:r,entryRenderKey:"name",filter:c,...n})},eg=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:Q1},Symbol.toStringTag,{value:"Module"})),tg=[{key:"name",name:"Name"},{key:"location",name:"Location"}],ng=e=>{const t=qe();return o.jsxRuntimeExports.jsx(ft,{columns:tg,searcher:t==null?void 0:t.hardware.racks,entryRenderKey:"name",...e})},sg=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:ng},Symbol.toStringTag,{value:"Module"})),Qt="label",gr=[{key:"color",name:"Color",render:({entry:e})=>o.jsxRuntimeExports.jsx(Z.y4.Circle,{name:"circle",color:e.color,style:{height:"2.5rem",width:"2.5rem"}})},{key:"name",name:"Name"}],ps=({items:e},t)=>{const n=me.filterByType(Qt,e);return n.length>0&&!n.every(s=>t.includes(s.key))},og=({entry:e,loading:t,entryKey:n,entryRenderKey:s,...r})=>o.jsxRuntimeExports.jsx(vn,{color:e==null?void 0:e.color,...r,children:e==null?void 0:e.name}),rg=he.componentRenderProp(og),ig=({onChange:e,className:t,value:n,...s})=>{const r=qe(),i=r!=null?void 0:o.jsxRuntimeExports.jsx(Re.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:l,onDragEnd:c,...a}=me.useDragAndDrop({type:"Label.SelectMultiple",canDrop:g.useCallback(m=>ps(m,Me.A(n)),[n]),onDrop:g.useCallback(({items:m})=>{const f=me.filterByType(Qt,m);if(f.length===0)return[];const h=u.c$1.unique([...Me.A(n),...f.map(j=>j.key)]);return e(h,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),x=me.useDraggingState(),d=g.useCallback(({dropped:m})=>{e(Me.A(n).filter(f=>!m.some(h=>h.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),p=g.useCallback((m,f)=>l([{key:f,type:Qt}],d),[l,d]);return o.jsxRuntimeExports.jsx(cn,{className:u.CSS(t,u.CSS.dropRegion(ps(x,Me.A(n)))),value:n,onTagDragStart:p,onTagDragEnd:c,searcher:r==null?void 0:r.labels,onChange:e,columns:gr,emptyContent:i,renderTag:rg,addPlaceholder:"Label",...a,...s})},Cc=({value:e,onChange:t})=>{const n=qe(),s=n!=null?void 0:o.jsxRuntimeExports.jsx(Re.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),r=g.useId(),i=g.useMemo(()=>({key:r,type:"Label.SelectMultiple"}),[r]),l=me.useDragAndDrop({type:"Label.SelectSingle",canDrop:g.useCallback(x=>ps(x,Me.o(e)),[e]),onDrop:g.useCallback(({items:x})=>{const d=me.filterByType(Qt,x);return d.length===0?[]:(t(d[0].key,{clickedIndex:null,clicked:null,entries:[]}),d)},[i,t])}),c=me.useDraggingState(),a=g.useCallback(()=>e!=null&&l.startDrag([{type:Qt,key:e}]),[l.startDrag,e]);return{emptyContent:s,dragging:c,...l,onDragStart:a,searcher:n==null?void 0:n.labels}},lg=({onChange:e,value:t,className:n,data:s,...r})=>{const{dragging:i,...l}=Cc({value:t,onChange:e});return o.jsxRuntimeExports.jsx(ft,{data:s,className:u.CSS(n,u.CSS.dropRegion(ps(i,Me.o(t)))),value:t,onChange:e,columns:gr,entryRenderKey:"name",...l,...r})},cg=({data:e,value:t,onChange:n,...s})=>{const{dragging:r,...i}=Cc({value:t,onChange:n});return o.jsxRuntimeExports.jsx(ft,{data:e,value:t,onChange:n,columns:gr,entryRenderKey:"name",...i,...s})},ag=Object.freeze(Object.defineProperty({__proto__:null,HAUL_TYPE:Qt,SelectButton:cg,SelectMultiple:ig,SelectSingle:lg},Symbol.toStringTag,{value:"Module"})),Vs=new Error("Tab not found"),ug=new Error("Invalid Mosaic"),ms=(e,t,n="center",s,r)=>{if(e=lt(e),s===void 0)return No(e,t);const i=To(e,s);if(n==="center")return i.tabs||(i.tabs=[]),r!==void 0&&r>=0&&r<=i.tabs.length?i.tabs.splice(r,0,t):i.tabs.push(t),i.selected=t.tabKey,e;const l=i.key*2,c=i.key*2+1,a=n==="top"||n==="left"?l:c;if(To(e,a).key!==i.key)return ms(e,t,"center",a);if(i.tabs==null||i.tabs.length===0)return ms(e,t,"center",s);const[x,d,p]=hg(n);if(i.direction=p,i[x]={key:0,tabs:[t],selected:t.tabKey},i[d]={key:0,tabs:i.tabs,selected:i.selected},i.first==null||i.last==null)throw ug;return i.first.key=l,i.last.key=c,i.tabs=void 0,i.size=void 0,i.selected=void 0,e},xg=(e,t,n)=>{var i;e=lt(e);const[s,r]=zt(e,t);if(s==null||r==null)throw Vs;return r.tabs=(i=r.tabs)==null?void 0:i.map(l=>l.tabKey===t?n(l):l),e},No=(e,t)=>(e=lt(e),e.tabs!=null?(e.tabs.push(t),e.selected=t.tabKey,e):(e.first!=null?e.first=No(e.first,t):e.last!=null&&(e.last=No(e.last,t)),e)),fs=e=>{e=lt(e);const t=[];if(e.tabs!=null&&(e.selected=Le.resetSelection(e.selected,e.tabs),e.selected!=null&&t.push(e.selected)),e.first!=null){const[n,s]=fs(e.first);e.first=n,t.push(...s)}if(e.last!=null){const[n,s]=fs(e.last);e.last=n,t.push(...s)}return[e,t]},jr=(e,t)=>{var r;e=lt(e);const[,n]=zt(e,t);if(n==null)return[e,null];n.tabs=(r=n.tabs)==null?void 0:r.filter(i=>i.tabKey!==t),n.selected=Le.resetSelection(n.selected,n.tabs),e=fg(e);const s=n.selected??hs(e);return[e,s]},hs=e=>e.selected!=null?e.selected:e.first!=null?hs(e.first):e.last!=null?hs(e.last):null,wc=(e,t)=>{e=lt(e);const[n,s]=zt(e,t);if(n==null||s==null)throw Vs;return s.selected=t,e},bc=(e,t,n,s,r)=>{e=lt(e);const[i,l]=zt(e,t);if(i==null||l==null)throw Vs;const[c,a]=jr(e,t);return[ms(c,i,n,s,r),a]},kn=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=kn(e.first,t);if(n!=null)return n}if(e.last!=null){const n=kn(e.last,t);if(n!=null)return n}},vc=(e,t,n)=>{const s=gs(e,t);if(s==null)throw new Error("Node not found");return s.size=n,e},dg=(e,t,n)=>{e=lt(e);const s=kn(e,t);if(s==null)throw new Error("Tab not found");if(s.tabs==null||s.tabs.length===0)throw new Error("Node has no tabs");const r=s.tabs.findIndex(d=>d.tabKey===t);if(r===-1)throw new Error("Tab not found in node");const i=s.tabs[r];s.tabs=s.tabs.filter(d=>d.tabKey!==t);const l=s.key*2,a={key:s.key*2+1,tabs:[i],selected:i.tabKey},x={key:l,tabs:s.tabs,selected:s.selected};return x.selected=Le.resetSelection(x.selected,x.tabs),s.direction=n,s.first=x,s.last=a,s.tabs=void 0,s.selected=void 0,e},pg=(e,t)=>{const n=kn(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},kc=(e,t,n)=>{e=lt(e);const[,s]=zt(e,t);if((s==null?void 0:s.tabs)==null)throw Vs;return s.tabs=Le.rename(t,n,(s==null?void 0:s.tabs)??[]),e},mg=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,To=(e,t)=>{const n=gs(e,t);if(n!=null)return n;const s=Math.floor(t/2);return s===0?e:To(e,s)},fg=e=>{let t=!0;for(;t;)[e,t]=$o(e);return e=Io(e,1),e},$o=e=>{if(e.first==null||e.last==null)return[e,!1];if(ai(e.first))return[ci(e.last),!0];if(ai(e.last))return[ci(e.first),!0];let t,n;return[e.first,t]=$o(e.first),[e.last,n]=$o(e.last),[e,t||n]},ci=e=>(e.size=void 0,e),ai=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),zt=(e,t)=>{if(e.tabs!=null){const l=e.tabs.find(c=>c.tabKey===t);if(l!=null)return[l,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,s]=zt(e.first,t);if(n!=null&&s!=null)return[n,s];const[r,i]=zt(e.last,t);return[r,i]},gs=(e,t)=>{if(e.key===t)return e;if(e.first==null||e.last==null)return;const n=gs(e.first,t);return n??gs(e.last,t)},hg=e=>{switch(e){case"top":return["first","last","y"];case"left":return["first","last","x"];case"bottom":return["last","first","y"];case"right":return["last","first","x"];case"center":throw new Error("cannot split a center placed tab")}},lt=e=>ze.x.copy(e),js=(e,t,n=[])=>(n.push(t(e)),e.first!=null&&js(e.first,t,n),e.last!=null&&js(e.last,t,n),n),Ao=(e,t)=>{t(e),e.first!=null&&Ao(e.first,t),e.last!=null&&Ao(e.last,t)},Io=(e,t)=>(e=lt(e),e.key=t,e.first!=null&&(e.first=Io(e.first,t*2)),e.last!=null&&(e.last=Io(e.last,t*2+1)),e);class Mc{constructor(t={}){tt(this,"parent");tt(this,"stub");tt(this,"el");this.el=document.createElement("div"),Object.entries(t).forEach(([n,s])=>this.el.setAttribute(n,s))}mount(t,n){n!==this.stub&&(this.unmount(null),t.replaceChild(this.el,n),this.parent=t,this.stub=n)}unmount(t){t!=null&&t!==this.stub||this.parent==null||this.stub==null||(this.parent.replaceChild(this.stub,this.el),this.parent=void 0,this.stub=void 0)}}const gg=({node:e})=>{const t=g.createRef(),n=g.useRef(e);return g.useEffect(()=>{const s=t.current;if(s==null)return;const r=s.parentNode;if(r!=null)return e.mount(r,s),()=>{t.current!=null&&e.unmount(t.current)}},[]),g.useEffect(()=>{n.current!=null&&e!==n.current&&(n.current.unmount(t.current),n.current=e);const s=t.current;if(s==null)return;const r=s.parentNode;r!=null&&e.mount(r,s)},[e]),o.jsxRuntimeExports.jsx("div",{ref:t})},_c=({node:e,children:t})=>Sl.createPortal(t,e.el),jg=Object.freeze(Object.defineProperty({__proto__:null,In:_c,Node:Mc,Out:gg},Symbol.toStringTag,{value:"Module"})),Es=g.memo(({root:e,onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,activeTab:l,emptyContent:c,onSelect:a,onClose:x,onRename:d,onReorder:p,contextMenu:m,addTooltip:f,...h})=>{const{tabs:j,direction:y,first:S,last:b,key:E,size:C}=e,L={onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,onClose:x,contextMenu:m,onSelect:a,onRename:d,onReorder:p,activeTab:l,addTooltip:f},T=g.useCallback(([D])=>n(E,D),[n]),{props:P}=tr({direction:y,onResize:T,count:2,initialSizes:C!=null?[C]:void 0});let O={};E==1&&(O={...h,className:u.CSS(u.CSS.B("mosaic"))});let I;return j!==void 0?I=o.jsxRuntimeExports.jsx(Pc,{root:e,emptyContent:c,...O,...L}):S!=null&&b!=null?I=o.jsxRuntimeExports.jsxs(nr,{id:`mosaic-${E}`,align:"stretch",...P,...O,children:[o.jsxRuntimeExports.jsx(Es,{...L,root:S,onResize:n},S.key),o.jsxRuntimeExports.jsx(Es,{...L,root:b,onResize:n},b.key)]}):(I=null,console.warn("Mosaic tree is malformed")),I});Es.displayName="Mosaic";const ys="pluto-mosaic-tab-drop",Er="pluto-mosaic-tab-create",Eg=(e,t,n)=>{if(me.filterByType(me.FILE_TYPE,t).length>0&&n)return!0;const r=me.filterByType(ys,t).map(c=>c.key),i=e.filter(c=>!r.includes(c.tabKey)).length>0;return me.filterByType(Er,t).length>0||r.length>0&&(i||e.length===0)},Pc=g.memo(({root:e,onDrop:t,onCreate:n,activeTab:s,children:r,className:i,onReorder:l,onFileDrop:c,addTooltip:a,...x})=>{const{key:d,tabs:p}=e,[m,f]=g.useState(null),h=c!=null,j=g.useCallback(({items:I})=>Eg(p,I,h),[p,h]),y=g.useCallback(({items:I,event:D})=>{if(D==null)return[];const H=Sg(D);f(null);const B=me.filterByType(me.FILE_TYPE,I).length>0,{percents:_}=ui(D),R=p.length===0?"center":xi(_);if(B)return c==null||c(d,R,D),I;const k=me.filterByType(ys,I);if(k.length>0){const M=k.map(({key:A})=>A)[0];t(d,M,R,H)}const v=me.filterByType(Er,I);if(v.length>0){const M=v.map(({key:A})=>A);n==null||n(d,R,M)}return k},[t,p.length]),S=g.useCallback(({event:I})=>{if(I==null)return;const{percents:D,inSelector:H}=ui(I);let B=null;H||(B=p.length===0?"center":xi(D)),f(B)},[p.length]),{startDrag:b,...E}=me.useDragAndDrop({type:"Mosaic",canDrop:j,onDrop:y,onDragOver:S}),C=j(me.useDraggingState()),L=g.useCallback(()=>f(null),[]),T=g.useCallback((I,{tabKey:D})=>{b([{key:D,type:ys,elementID:I.currentTarget.id}])},[b]),P=g.useCallback(()=>n==null?void 0:n(d,"center"),[d]),O=d==1&&p.length==0;return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:o.jsxRuntimeExports.jsxs(Le.Tabs,{id:`tab-${d}`,tabs:p,className:u.CSS(i,O&&m!=null&&u.CSS.M("drag-over")),onDragLeave:L,selected:e.selected,selectedAltColor:s===e.selected,onDragStart:T,onCreate:P,addTooltip:a,...E,...x,children:[e.selected!=null&&r(p.find(I=>I.tabKey===e.selected)),C&&o.jsxRuntimeExports.jsx("div",{style:{zIndex:1e3,position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),m!=null&&o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("mosaic","mask"),style:yg[m]})]})})});Pc.displayName="MosaicTabLeaf";const yg={top:{left:"0%",top:"0%",width:"100%",height:"50%"},bottom:{left:"0%",top:"50%",width:"100%",height:"50%"},left:{left:"0%",top:"0%",width:"50%",height:"100%"},right:{left:"50%",top:"0%",width:"50%",height:"100%"},center:{left:"0%",top:"0%",width:"100%",height:"100%"}},ui=e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,s=e.clientY-t.top;return s<24?{percents:{x:.5,y:.5},inSelector:!0}:{percents:{x:n/t.width,y:s/t.height},inSelector:!1}},Sg=e=>{var n;const t=e.target.closest(".pluto-tabs-selector__btn");if(t!=null)return Array.from(((n=t.parentElement)==null?void 0:n.children)??[]).indexOf(t)},Rg=e=>e,Cg=e=>1-e,xi=({x:e,y:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,s]=[Rg(e),Cg(e)];if(t>n&&t>s)return"bottom";if(t<n&&t<s)return"top";if(t>n&&t<s)return"left";if(t<n&&t>s)return"right";throw new Error("[bug] - invalid insert position")},wg=({root:e,onSelect:t,children:n})=>{const s=g.useRef(new Map),r=new Set,i=js(e,l=>{var c;return(c=l.tabs)==null?void 0:c.map(a=>{let x=s.current.get(a.tabKey);return a==null?null:(x==null&&(x=new Mc({style:"width: 100%; height: 100%; position: relative;"}),x.el.addEventListener("click",()=>t==null?void 0:t(a.tabKey)),s.current.set(a.tabKey,x)),r.add(a.tabKey),o.jsxRuntimeExports.jsx(_c,{node:x,children:n({...a,visible:a.tabKey===l.selected})},a.tabKey))})}).flat().filter(l=>l!=null);return s.current.forEach((l,c)=>!r.has(c)&&s.current.delete(c)),[s,i]},Do=pe.z.interface({key:pe.z.number(),tabs:pe.z.array(Le.tabZ).optional(),selected:pe.z.string().optional(),direction:u.g.direction.optional(),size:pe.z.number().optional(),get first(){return Do.optional()},get last(){return Do.optional()}}),bg=({allowRename:e=!1,initialTree:t})=>{const[n,s]=g.useState(t);return g.useEffect(()=>s(fs(t)[0]),[t]),{root:n,onDrop:(x,d,p)=>s(m=>bc(m,d,p,x)[0]),onClose:x=>s(d=>jr(d,x)[0]),onSelect:x=>s(d=>wc(d,x)),onResize:(x,d)=>s(p=>vc(p,x,d)),onRename:e?(x,d)=>s(p=>kc(p,x,d)):void 0}},vg=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:Er,HAUL_DROP_TYPE:ys,Mosaic:Es,autoSelectTabs:fs,canSplit:pg,findSelected:hs,findTabNode:kn,forEachNode:Ao,insertTab:ms,isEmpty:mg,mapNodes:js,moveTab:bc,nodeZ:Do,removeTab:jr,renameTab:kc,resizeNode:vc,selectTab:wc,split:dg,updateTab:xg,use:bg,usePortal:wg},Symbol.toStringTag,{value:"Module"})),kg=({variant:e,className:t,...n})=>o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(t,u.CSS.B("note"),u.CSS.M(e)),align:"stretch",empty:!0,...n}),Mg=Object.freeze(Object.defineProperty({__proto__:null,Note:kg},Symbol.toStringTag,{value:"Module"})),fo={Close:o.jsxRuntimeExports.jsxs("svg",{width:"124",height:"124",viewBox:"0 0 124 124",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"88.3883",width:"87",height:"11",transform:"rotate(-45 26.8701 88.3883)",fill:"#7E0508"}),o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"34.6482",width:"11",height:"87",transform:"rotate(-45 26.8701 34.6482)",fill:"#7E0508"})]}),Minimize:o.jsxRuntimeExports.jsx("svg",{width:"87",height:"11",viewBox:"0 0 87 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsxRuntimeExports.jsx("rect",{x:"15",width:"60",height:"11",fill:"#985712"})}),Maximize:o.jsxRuntimeExports.jsxs("svg",{width:"143",height:"143",viewBox:"0 0 143 143",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("path",{d:"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z",fill:"#0B650D"}),o.jsxRuntimeExports.jsx("path",{d:"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z",fill:"#0B650D"})]})},_g=({disabled:e=[],className:t,focused:n=!0,onMinimize:s,onMaximize:r,onFullscreen:i,onClose:l,...c})=>o.jsxRuntimeExports.jsxs(ne.Space,{size:1.5,x:!0,className:u.CSS(u.CSS.B("macos-controls"),!n&&u.CSS.BM("macos-controls","blurred"),t),...c,children:[o.jsxRuntimeExports.jsx(ho,{onClick:l,className:u.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:fo.Close}),o.jsxRuntimeExports.jsx(ho,{onClick:s,className:u.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:fo.Minimize}),o.jsxRuntimeExports.jsx(ho,{onClick:i,className:u.CSS.BM("macos-control","maximize"),disabled:e.includes("maximize"),children:fo.Maximize})]}),ho=({className:e,disabled:t,color:n,...s})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("macos-control"),u.CSS.disabled(t),e),tabIndex:-1,disabled:t,size:"",...s}),Pg=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:s,onFullscreen:r,focused:i,shade:l=2,...c})=>o.jsxRuntimeExports.jsxs(Ts.Pack,{...c,children:[o.jsxRuntimeExports.jsx(go,{className:u.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),shade:l,children:o.jsxRuntimeExports.jsx(Z.y4.Subtract,{})}),o.jsxRuntimeExports.jsx(go,{className:u.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),shade:l,children:o.jsxRuntimeExports.jsx(Z.y4.Box,{})}),o.jsxRuntimeExports.jsx(go,{onClick:s,className:u.CSS.BM("windows-control","close"),disabled:e.includes("close"),shade:l,children:o.jsxRuntimeExports.jsx(Z.y4.Close,{})})]}),go=({disabled:e=!1,className:t,...n})=>e?null:o.jsxRuntimeExports.jsx(he.Icon,{className:u.CSS(u.CSS.B("windows-control"),t),tabIndex:-1,...n}),Lc=u.S.getOS,Lg="Windows",Ng=({forceOS:e,visibleIfOS:t,...n})=>{const s=Lc({force:e,default:Lg});if(t!=null&&t!==s)return null;const r=s==="macOS"?_g:Pg;return o.jsxRuntimeExports.jsx(r,{...n})},Tg=Object.freeze(Object.defineProperty({__proto__:null,Controls:Ng,use:Lc},Symbol.toStringTag,{value:"Module"})),$g=(e,t)=>{const n=s=>o.jsxRuntimeExports.jsx(e,{...t,...s});return n.displayName=e.displayName,n},Ag=Object.freeze(Object.defineProperty({__proto__:null,createComponent:$g},Symbol.toStringTag,{value:"Module"}));g.createContext({instrumentation:nt.C.NOOP});const Ig=({children:e,...t})=>{const{path:n}=Q.useUnidirectional({type:xs.Provider.TYPE,schema:xs.providerStateZ,state:t});return o.jsxRuntimeExports.jsx(Q.Composite,{path:n,children:e})},Dg="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjUgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",Nc=({children:e})=>{const{path:t}=Q.useUnidirectional({type:z.BaseProvider.TYPE,schema:z.providerStateZ$1,state:{}});return o.jsxRuntimeExports.jsx(Q.Composite,{path:t,children:e})},zg=Object.freeze(Object.defineProperty({__proto__:null,Provider:Nc},Symbol.toStringTag,{value:"Module"})),Bg=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:z.AcquireChannelControl,AuthoritySource:z.AuthoritySource,Chip:z.Chip,Controller:z.Controller,Indicator:z.Indicator,Legend:z.Legend,REGISTRY:z.REGISTRY$16,STATUSES:z.STATUSES,SetChannelValue:z.SetChannelValue,StateProvider:z.StateProvider,acquireChannelControl:z.acquireChannelControl,acquireChannelControlPropsZ:z.acquireChannelControlPropsZ,authoritySource:z.authoritySource,authoritySourceProps:z.authoritySourceProps,chipStateZ:z.chipStateZ,controllerStateZ:z.controllerStateZ,indicatorStateZ:z.indicatorStateZ,legendStateZ:z.legendStateZ,setChannelValue:z.setChannelValue,setChannelValuePropsZ:z.setChannelValuePropsZ,stateProviderStateZ:z.stateProviderStateZ,statusZ:z.statusZ,sugaredStateZ:z.sugaredStateZ},Symbol.toStringTag,{value:"Module"})),Og=e=>{var t,n;switch(e.variant){case"disabled":return((t=e.data)==null?void 0:t.valid)===!0?{message:"Uncontrolled. Click to take control.",chipColor:"var(--pluto-gray-l12)"}:{message:"No channel connected. This element cannot be controlled.",chipColor:"var(--pluto-gray-l7)",disabled:!0};case"error":return{message:"Not controlled by you. Click to take absolute control.",chipColor:"var(--pluto-error-z)"};case"success":return((n=e.data)==null?void 0:n.authority)===nt.Gv.ABSOLUTE_AUTHORITY?{message:"You have absolute control. Click to release.",chipColor:"var(--pluto-secondary-z)",buttonStyle:{background:"var(--pluto-secondary-z-30)"}}:{message:"You're in control. Release P&ID to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},Tc=({source:e,sink:t,className:n,...s})=>{const r=Ne.useMemoDeepEqualProps({source:e,sink:t}),[,{status:i},l]=Q.use$1({type:z.Chip.TYPE,schema:z.chipStateZ,initialState:{triggered:!1,...r,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:u.m.now()}}});g.useEffect(()=>{l(m=>({...m,...r}))},[r,l]);const c=g.useCallback(()=>l(m=>({...m,triggered:!m.triggered})),[l]),{message:a,chipColor:x,buttonStyle:d,disabled:p}=Og(i);return o.jsxRuntimeExports.jsx(he.Icon,{variant:"text",className:u.CSS(u.CSS.B("control-chip"),n),disabled:p,onClick:c,tooltip:o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:a}),style:d,...s,children:o.jsxRuntimeExports.jsx(Z.y4.Circle,{color:x})})},$c=g.createContext({needsControlOf:[]}),Ac=()=>g.use($c),Vg=({children:e,onStatusChange:t,...n})=>{const s=Ne.useMemoDeepEqualProps(n),[{path:r},{status:i,needsControlOf:l},c]=Q.use$1({type:z.Controller.TYPE,schema:z.controllerStateZ,initialState:s});return g.useEffect(()=>{i!=null&&(t==null||t(i))},[i,t]),g.useEffect(()=>{c(a=>({...a,...s}))},[s,c]),g.useEffect(()=>()=>t==null?void 0:t("released"),[]),o.jsxRuntimeExports.jsxs($c,{value:{needsControlOf:l},children:[o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:e}),";"]})},Ic=({colorSource:e,statusSource:t})=>{var c;const n=Ne.useMemoDeepEqualProps({colorSource:e,statusSource:t}),[,{color:s,status:r},i]=Q.use$1({type:z.Indicator.TYPE,initialState:{...n,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:u.m.now()}},schema:z.indicatorStateZ});g.useEffect(()=>{i(a=>({...a,...n}))},[n,i]);let l;return((c=r.data)==null?void 0:c.color)!=null?l=u.Dt.colorZ.parse(r.data.color):s!=null&&!u.Dt.isZero(s)?l=s:l="var(--pluto-gray-l10)",o.jsxRuntimeExports.jsxs(he.Dialog,{location:{x:"center",y:"bottom"},children:[o.jsxRuntimeExports.jsx(Z.Text,{level:"p",children:r.message}),o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("indicator"),style:{backgroundColor:u.Dt.cssString(l),flexGrow:1}})]})},Fg=e=>{const{needsControlOf:t}=Ac(),[,{states:n},s]=Q.use$1({type:z.Legend.TYPE,schema:z.legendStateZ,initialState:{states:[],needsControlOf:t}});g.useEffect(()=>{s(l=>({...l,needsControlOf:t}))},[t]);const i=u.c$1.unique(n.map(l=>l.subject.key)).map(l=>{const c=n.find(a=>a.subject.key===l);if(c==null)throw new nt.Qt("Legend subject not found");return{key:c.subject.key,label:c.subject.name,color:c.subjectColor}});return o.jsxRuntimeExports.jsx(lr,{data:i,...e})},Dc=({children:e})=>{const[{path:t}]=Q.use$1({type:z.StateProvider.TYPE,schema:z.stateProviderStateZ,initialState:{}});return o.jsxRuntimeExports.jsx(Q.Composite,{path:t,children:e})},Hg=Object.freeze(Object.defineProperty({__proto__:null,Chip:Tc,Controller:Vg,Indicator:Ic,Legend:Fg,StateProvider:Dc,useContext:Ac},Symbol.toStringTag,{value:"Module"})),zc=e=>{const t=({disabled:n=!1,...s})=>n?s.children:o.jsxRuntimeExports.jsx(e,{...s});return t.displayName=e.displayName,t},Zg=zc(Nc),Wg=zc(Q.Provider$2),Yg=({children:e,connParams:t,workerEnabled:n=!0,workerURL:s,theming:r,tooltip:i,triggers:l,alamos:c,haul:a,channelAlias:x,telem:d,color:p})=>o.jsxRuntimeExports.jsx(Ie.Provider,{...l,children:o.jsxRuntimeExports.jsx(he.Config,{...i,children:o.jsxRuntimeExports.jsx(me.Provider,{...a,children:o.jsxRuntimeExports.jsx(Q.Provider$1,{url:s??Dg,enabled:n,children:o.jsxRuntimeExports.jsx(Wg,{workerKey:"vis",children:o.jsxRuntimeExports.jsx(Ig,{...c,children:o.jsxRuntimeExports.jsx(Re.Aggregator,{children:o.jsxRuntimeExports.jsx(Ll,{connParams:t,children:o.jsxRuntimeExports.jsx($l,{...x,children:o.jsxRuntimeExports.jsx(Ke.Provider,{...p,children:o.jsxRuntimeExports.jsx(Q.Provider,{...r,children:o.jsxRuntimeExports.jsx(Zg,{...d,children:o.jsxRuntimeExports.jsx(Dc,{children:e})})})})})})})})})})})})}),Gg=Object.freeze(Object.defineProperty({__proto__:null,Provider:Yg},Symbol.toStringTag,{value:"Module"})),Kg=({value:e})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress"),children:o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress-bar"),style:{width:`${e}%`}})}),qg=Object.freeze(Object.defineProperty({__proto__:null,Progress:Kg},Symbol.toStringTag,{value:"Module"})),Mn="range",yr=[{key:"name",name:"Name"}],Ss=({items:e},t)=>{const n=me.filterByType(Mn,e);return n.length>0&&!n.every(s=>t.includes(s.key))},Xg=({onChange:e,className:t,value:n,...s})=>{const r=qe(),i=r!=null?void 0:o.jsxRuntimeExports.jsx(Re.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:l,onDragEnd:c,...a}=me.useDragAndDrop({type:"Ranger.SelectMultiple",canDrop:g.useCallback(m=>Ss(m,Me.A(n)),[n]),onDrop:g.useCallback(({items:m})=>{const f=me.filterByType(Mn,m);if(f.length===0)return[];const h=u.c$1.unique([...Me.A(n),...f.map(j=>j.key)]);return e(h,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),x=me.useDraggingState(),d=g.useCallback(({dropped:m})=>{e(Me.A(n).filter(f=>!m.some(h=>h.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),p=g.useCallback((m,f)=>l([{key:f,type:Mn}],d),[l,d]);return o.jsxRuntimeExports.jsx(cn,{className:u.CSS(t,u.CSS.dropRegion(Ss(x,Me.A(n)))),value:n,onTagDragStart:p,onTagDragEnd:c,searcher:r==null?void 0:r.ranges,onChange:e,columns:yr,emptyContent:i,entryRenderKey:"name",...a,...s})},Bc=({value:e,onChange:t})=>{const n=qe(),s=n!=null?void 0:o.jsxRuntimeExports.jsx(Re.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),r=g.useId(),i=g.useMemo(()=>({key:r,type:"Ranger.SelectMultiple"}),[r]),{startDrag:l,...c}=me.useDragAndDrop({type:"Ranger.SelectSingle",canDrop:g.useCallback(d=>Ss(d,Me.o(e)),[e]),onDrop:g.useCallback(({items:d})=>{const p=me.filterByType(Mn,d);return p.length===0?[]:(t(p[0].key,{clickedIndex:null,clicked:null,entries:[]}),p)},[i,t])}),a=me.useDraggingState(),x=g.useCallback(()=>e!=null&&l([{type:Mn,key:e}]),[l,e]);return{emptyContent:s,dragging:a,...c,onDragStart:x,searcher:n==null?void 0:n.ranges}},Ug=({onChange:e,value:t,className:n,data:s,...r})=>{const{dragging:i,...l}=Bc({value:t,onChange:e});return o.jsxRuntimeExports.jsx(ft,{data:s,className:u.CSS(n,u.CSS.dropRegion(Ss(i,Me.o(t)))),value:t,onChange:e,columns:yr,entryRenderKey:"name",...l,...r})},Jg=({data:e,value:t,onChange:n,...s})=>{const{dragging:r,...i}=Bc({value:t,onChange:n});return o.jsxRuntimeExports.jsx(ft,{data:e,value:t,onChange:n,columns:yr,entryRenderKey:"name",...i,...s})},Qg=[{key:"color",name:"Color",width:50,render:e=>o.jsxRuntimeExports.jsx(Z.y4.Circle,{style:{fontSize:10,marginLeft:10,marginRight:30},color:e.entry.color})},{key:"name",name:"Name"}],e0=e=>{const t=qe();return o.jsxRuntimeExports.jsx(cn,{...e,searcher:t==null?void 0:t.labels,columns:Qg,renderTag:n=>n.entry==null?o.jsxRuntimeExports.jsx(vn,{color:"gray",children:n.entryKey}):o.jsxRuntimeExports.jsx(vn,{color:n.entry.color,children:n.entry.name})})},t0=({timeRange:e,level:t="p",shade:n=9,showSpan:s=!1,labeled:r=!1,...i})=>{const l=new u.m(e.start),c=l.isToday?"time":"dateTime",a=new u.m(e.end),x=a.equals(u.m.MAX),d=a.span(l)<u.O.DAY?"time":"dateTime",p=l.span(a);let m=o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",size:"small",children:[l.isToday&&o.jsxRuntimeExports.jsx(Z.Text,{level:t,shade:n,weight:450,children:"Today"}),o.jsxRuntimeExports.jsx(_o.DateTime,{level:t,displayTZ:"local",format:c,shade:n,weight:450,children:l})]}),f=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[x?o.jsxRuntimeExports.jsx(Z.Text,{level:t,children:"Now"}):o.jsxRuntimeExports.jsx(_o.DateTime,{level:t,displayTZ:"local",format:d,shade:n,weight:450,children:a}),!p.isZero&&s&&o.jsxRuntimeExports.jsxs(Z.Text,{level:t,shade:n,weight:450,children:["(",l.span(a).truncate(u.O.MILLISECOND).toString(),")"]})]});r&&(m=o.jsxRuntimeExports.jsx(ge.Item,{label:"Start",showHelpText:!1,children:m}),f=o.jsxRuntimeExports.jsx(ge.Item,{label:"End",showHelpText:!1,children:f}));const h=u.CSS.levelSizeVar(t);return o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,size:"small",className:u.CSS(u.CSS.B("time-range-chip")),align:"center",...i,children:[m,o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{color:"var(--pluto-gray-l9)",style:{width:h,height:h}}),f]})},n0=Object.freeze(Object.defineProperty({__proto__:null,SelectButton:Jg,SelectLabels:e0,SelectMultiple:Xg,SelectSingle:Ug,TimeRangeChip:t0},Symbol.toStringTag,{value:"Module"})),s0=({steps:e,value:t,onChange:n,...s})=>{const r=e.findIndex(i=>i.key===t);return o.jsxRuntimeExports.jsx(ne.Space,{x:!0,align:"center",className:u.CSS.B("steps"),...s,children:e.map((i,l)=>o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsxs(he.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:l>r,children:[l+1,". ",i.title]},i.key),l!==e.length-1&&o.jsxRuntimeExports.jsx(Z.y4.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l10)"}})]},i.key))})},o0=Object.freeze(Object.defineProperty({__proto__:null,Steps:s0},Symbol.toStringTag,{value:"Module"})),r0=({children:e,className:t,visible:n,...s})=>{const[{path:r},,i]=Q.use$1({type:z.Table.TYPE,schema:z.Table.stateZ,initialState:{region:u.$t.ZERO,visible:n}});g.useEffect(()=>{i(c=>({...c,visible:n}))},[n]);const l=Dn(c=>i(a=>({...a,region:c})));return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{ref:l,style:{right:0,bottom:0,position:"absolute",top:6,left:6}}),o.jsxRuntimeExports.jsx("table",{className:u.CSS(u.CSS.B("table"),t),...s,children:o.jsxRuntimeExports.jsx("tbody",{children:o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:e})})})]})},i0=({children:e,className:t,size:n,index:s,onResize:r,onSelect:i,position:l,...c})=>o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),t),...c,children:[r!=null&&o.jsxRuntimeExports.jsx(Vc,{onSelect:i,index:s,value:n,onChange:r,position:l,direction:"y"}),e]}),Sr=({ref:e,children:t,className:n,selected:s=!1,...r})=>o.jsxRuntimeExports.jsx("td",{ref:e,...r,className:u.CSS(u.CSS.BE("table","cell"),u.CSS.selected(s),n),children:t}),Oc="ABCDEFGHIJKLMNOPQRSTUVWXYZ",l0=e=>Oc[e],Vc=({value:e,selected:t=!1,index:n,onChange:s,position:r,direction:i="x",onSelect:l})=>{const c=Z.useSyncedRef(e),a=g.useRef(e),x=Ke.useCursorDrag({onStart:g.useCallback(()=>{a.current=c.current},[]),onMove:g.useCallback(d=>s(a.current+u.$t.dim(d,i,!0),n),[s,n])});return o.jsxRuntimeExports.jsxs("td",{id:`resizer-${i}-${n}`,className:u.CSS(u.CSS.BE("table","resizer"),u.CSS.dir(i),u.CSS.selected(t),kt.CONTEXT_TARGET,t&&kt.CONTEXT_SELECTED),style:{[u.g.dimension(i)]:e},onClick:()=>l(n),onContextMenu:()=>l(n),children:[o.jsxRuntimeExports.jsx(Z.Text,{level:"p",shade:11,style:{width:"100%",textAlign:"center"},children:i==="x"?Oc[n]:n+1}),o.jsxRuntimeExports.jsx("button",{onClick:d=>d.stopPropagation(),style:{[u.g.location(i)]:r+e},onDragStart:x,draggable:!0})]})},c0=({selected:e,onSelect:t,columns:n,onResize:s})=>{let r=15;return o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),u.CSS.BE("table","col-resizer")),children:[o.jsxRuntimeExports.jsx("td",{}),n.map((i,l)=>{const c=r;return r+=i,o.jsxRuntimeExports.jsx(Vc,{onSelect:t,position:c,selected:e.includes(l),index:l,value:i,onChange:a=>s(a,l),direction:"x"},l)})]})},a0=Object.freeze(Object.defineProperty({__proto__:null,Cell:Sr,ColumnIndicators:c0,Row:i0,Table:r0,getCellColumn:l0},Symbol.toStringTag,{value:"Module"})),u0=[{key:"standard",name:"Standard"},{key:"scientific",name:"Scientific"},{key:"engineering",name:"Engineering"}],x0=e=>o.jsxRuntimeExports.jsx(it,{...e,entryRenderKey:"name",data:u0}),Fc=[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],Rr=({path:e})=>{var f;const{value:t,onChange:n}=_t({path:e}),s=z.sourcePipelinePropsZ.parse((f=t.telem)==null?void 0:f.props),r=z.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=z.stringifyNumberProps.parse(s.segments.stringifier.props),l=z.rollingAverageProps.parse(s.segments.rollingAverage.props),c=h=>{const j=z.sourcePipeline("string",{connections:Fc,segments:{valueStream:z.streamChannelValue({channel:r.channel}),stringifier:z.stringifyNumber({precision:i.precision??2,notation:i.notation}),rollingAverage:z.rollingAverage({windowSize:l.windowSize??1}),...h},outlet:"stringifier"});n({...t,telem:j})},a=h=>c({valueStream:z.streamChannelValue({channel:h??0})}),x=h=>c({stringifier:z.stringifyNumber({...i,notation:h})}),d=h=>c({stringifier:z.stringifyNumber({...i,precision:h})}),p=h=>c({rollingAverage:z.rollingAverage({windowSize:h})}),m=As(r.channel);return g.useEffect(()=>n({...t,tooltip:[m]}),[m]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ge.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Dt,{value:r.channel,onChange:a})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(ge.Item,{label:"Notation",children:o.jsxRuntimeExports.jsx(x0,{value:i.notation,onChange:x})}),o.jsxRuntimeExports.jsx(ge.Item,{label:"Precision",align:"start",children:o.jsxRuntimeExports.jsx(ge.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:d})}),o.jsxRuntimeExports.jsx(ge.Item,{label:"Averaging Window",align:"start",children:o.jsxRuntimeExports.jsx(ge.Numeric,{value:l.windowSize??1,bounds:{lower:1,upper:100},onChange:p})})]})]})},d0=z.Value.z.partial({color:!0}).extend({level:st.levelZ.optional()}),Cr=({aetherKey:e,box:t,telem:n,color:s,precision:r,minWidth:i,level:l="small",backgroundTelem:c,notation:a,location:x})=>{const d=Ne.useMemoDeepEqualProps({box:t,telem:n,color:s,precision:r,level:l,minWidth:i,notation:a,backgroundTelem:c,location:x}),[,p,m]=Q.use$1({aetherKey:e,type:z.Value.TYPE,schema:z.Value.z,initialState:d});return g.useEffect(()=>m(f=>({...f,...d})),[d]),{width:p.width??p.minWidth}},p0=Object.freeze(Object.defineProperty({__proto__:null,TelemForm:Rr,VALUE_CONNECTIONS:Fc,corePropsZ:d0,use:Cr},Symbol.toStringTag,{value:"Module"})),m0=pe.z.object({value:pe.z.string(),level:st.levelZ,weight:st.weightZ,align:u.K.x.or(u.K.center),backgroundColor:u.Dt.crudeZ}),f0=({cellKey:e,onChange:t,value:n,selected:s,onSelect:r,align:i,level:l,weight:c,backgroundColor:a})=>{const x=p=>r(e,p),d=p=>t({level:l,value:p,weight:c,align:i,backgroundColor:a});return o.jsxRuntimeExports.jsx(Sr,{id:e,className:u.CSS(kt.CONTEXT_TARGET,s&&kt.CONTEXT_SELECTED,u.CSS.BEM("table","cell","text")),selected:s,onClick:x,onContextMenu:x,style:{backgroundColor:u.Dt.cssString(a)},children:o.jsxRuntimeExports.jsx(Z.Editable,{level:l,value:n,weight:c,onChange:d,style:{justifyContent:i},allowEmpty:!0,outline:!1})})},h0=pe.z.object({telem:z.stringSourceSpecZ,redline:pe.z.object({bounds:u.G.bounds,gradient:u.Dt.gradientZ}),level:st.levelZ,color:pe.z.string(),units:pe.z.string()}),g0=({cellKey:e,telem:t,level:n,color:s,redline:{gradient:r,bounds:i},selected:l,box:c,onSelect:a})=>{const{width:x}=Cr({aetherKey:e,box:c,telem:t,level:n,color:s,backgroundTelem:z.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:t,scale:z.scaleNumber({scale:u.b.Scale.scale(i).scale(0,1).transform}),gradient:z.colorGradient({gradient:r})},outlet:"gradient"}),location:{x:"center",y:"center"}}),d=p=>a(e,p);return o.jsxRuntimeExports.jsx(Sr,{id:e,selected:l,onClick:d,onContextMenu:d,style:{height:"5rem",width:x},className:u.CSS(kt.CONTEXT_TARGET,l&&kt.CONTEXT_SELECTED,u.CSS.BEM("table","cell","value"))})},j0=({onVariantChange:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"telem":return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsx(Rr,{path:""})});case"redline":return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsx(E0,{})});default:return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,grow:!0,empty:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(ge.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Hc,{onChange:e,value:"value"})}),o.jsxRuntimeExports.jsx(Ce,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,path:"color",children:({value:r,onChange:i,variant:l,...c})=>o.jsxRuntimeExports.jsx(Ke.Swatch,{value:r??u.Dt.setAlpha(u.Dt.ZERO,1),onChange:i,...c,bordered:!0})}),o.jsxRuntimeExports.jsx(Ce,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:r=>o.jsxRuntimeExports.jsx(an,{...r})})]})})}},[]),n=Le.useStatic({tabs:[{tabKey:"style",name:"Style"},{tabKey:"telem",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],content:t});return o.jsxRuntimeExports.jsx(Le.Tabs,{...n})},E0=()=>{const{set:e,get:t}=ht(),n=hc("redline.bounds"),s=u.b.Scale.scale(0,1).scale(n);return o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Ze,{inputProps:{size:"small",showDragHandle:!1},style:{width:60},label:"Lower",path:"redline.bounds.lower"}),o.jsxRuntimeExports.jsx(Ce,{path:"redline.gradient",label:"Gradient",align:"start",padHelpText:!1,children:({value:r,onChange:i})=>o.jsxRuntimeExports.jsx(Ke.GradientPicker,{value:ze.x.copy(r),scale:s,onChange:l=>{const a={...t("redline.bounds").value},x=l.map(j=>j.position),d=s.pos(Math.max(...x)),p=s.pos(Math.min(...x)),m=d>a.upper,f=p<a.lower;m&&(l[l.length-1].position=1,a.upper=d),f&&(l[0].position=0,a.lower=p);const h=l.map(j=>({...j,color:u.Dt.hex(j.color)}));m||f?e("redline",{bounds:a,gradient:h}):i(l.map(j=>({...j,color:u.Dt.hex(j.color)})))}})}),o.jsxRuntimeExports.jsx(Ze,{inputProps:{size:"small",showDragHandle:!1},style:{width:60},label:"Upper",path:"redline.bounds.upper"})]})},y0=({onVariantChange:e})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,style:{padding:"2rem"},children:[o.jsxRuntimeExports.jsx(ge.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Hc,{onChange:e,value:"text"})}),o.jsxRuntimeExports.jsx(fr,{path:"value",label:"Text"}),o.jsxRuntimeExports.jsx(Ce,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(an,{...t})}),o.jsxRuntimeExports.jsx(Ce,{path:"weight",label:"Weight",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(nc,{...t})}),o.jsxRuntimeExports.jsx(Ce,{path:"align",label:"Alignment",hideIfNull:!0,children:t=>o.jsxRuntimeExports.jsx(zs,{...t})}),o.jsxRuntimeExports.jsx(Ce,{path:"backgroundColor",label:"Background",align:"start",padHelpText:!1,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(Ke.Swatch,{value:t,onChange:n})})]}),S0=[{key:"text",name:"Text"},{key:"value",name:"Value"}],Hc=e=>o.jsxRuntimeExports.jsx(it,{...e,data:S0,allowMultiple:!1,entryRenderKey:"name"}),R0=["text","value"],C0=pe.z.enum(R0),w0={key:"value",name:"Value",Form:j0,Cell:g0,defaultProps:e=>({telem:z.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:z.streamChannelValue({channel:0}),rollingAverage:z.rollingAverage({windowSize:1}),stringifier:z.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"}),redline:{bounds:{lower:0,upper:1},gradient:[]},color:u.Dt.hex(e.colors.gray.l10),level:"h5",units:""}),schema:h0},b0={key:"text",name:"Text",Form:y0,Cell:f0,defaultProps:()=>({value:"",level:"h5",units:"",weight:400,align:"center",backgroundColor:"#00000000"}),schema:m0},v0={text:b0,value:w0},k0=Object.freeze(Object.defineProperty({__proto__:null,CELLS:v0,variantZ:C0},Symbol.toStringTag,{value:"Module"})),di=({sourcePos:e,targetPos:t,next:n,prev:s})=>{const r=Tt(e,...n);return u.J.distance(r,t)<1?!0:(console.warn("Connector is out of sync with target"),console.log("Theoretical target",r),console.log("Actual target",t),console.log("Segments",n),console.log("Prev segments",s),!1)},pi=({sourceStumpTip:e,sourceOrientation:t,sourceBox:n,targetStumpTip:s,targetOrientation:r,targetBox:i})=>{if(!M0({sourcePos:e,sourceOrientation:t,targetPos:s}))return;const l=u.g.construct(t),c=u.g.swap(l);let a=At(c,s[c]-e[c]);const x=u.$t.loc(n,a);if(u.K.swap(t)===r){const d=u.$t.loc(i,u.K.swap(a));Math.abs(x-d)<Fe&&(a=u.K.swap(a))}return{direction:c,length:x-e[c]+Bt(a,Fe)}},zo=pe.z.object({direction:u.g.direction,length:pe.z.number()}),Tt=(e,...t)=>{let n=e;for(const s of t)n=u.J.translate(n,s.direction,s.length);return n},Zc=(e,t,n,s)=>{try{let r=e;const i=[e,...t.map(f=>(r=u.J.translate(r,f.direction,f.length),r))];if(!s)return i;const l=t[0],c=At(l.direction,l.length),a=mi(c),x=4*(2-n**.5);i[0]=u.J.translate(i[0],{[l.direction]:-1*a*x,[u.g.swap(l.direction)]:0});const d=t[t.length-1],p=At(d.direction,d.length),m=mi(p);return i[i.length-1]=u.J.translate(i[i.length-1],{[d.direction]:m*x,[u.g.swap(d.direction)]:0}),i}catch{return[]}},Fe=10,mi=e=>e==="top"||e==="left"?-1:1,Bt=(e,t)=>e==="top"||e==="left"?-t:t,At=(e,t)=>e==="x"?t>0?"right":"left":t>0?"bottom":"top",Ct=e=>At(e.direction,e.length),M0=({sourcePos:e,targetPos:t,sourceOrientation:n})=>{const s=u.g.construct(n),r=t[s]-e[s];return Bt(n,r)<0},Kn=e=>({direction:u.g.construct(e),length:Bt(e,Fe)}),fi={top:Kn("top"),bottom:Kn("bottom"),left:Kn("left"),right:Kn("right")},_0=4,P0=.25,Fs=e=>Bo(L0(Bo(e))),L0=e=>{const t=[...e],n=e.findIndex((s,r)=>{const i=Math.abs(s.length);if(i<_0){if(r===0||r===e.length-1)return!1;if(i<P0)return!0;if(e.length<=3)return!1;if(r+2<e.length){const l=t[r+2];if(l.direction!==s.direction)return!1;t[r+2]={...l,length:l.length+s.length}}else{const l=t[r-2];if(l.direction!==s.direction)return!1;t[r-2]={...l,length:l.length+s.length}}return!0}return!1});return n!==-1&&t.splice(n,1),t},Bo=e=>{const t=[...e];return e.findIndex((s,r)=>{const i=t[r-1];if(r===0||s.direction!==i.direction)return!1;if(r===1){const l=r-1,c=r,a=Ct(i),x=Ct(s);if(a===x)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(i.length)===Fe)return!1;const d=Bt(a,Fe),p=t[l].length-d,m=t[c].length+p;return Math.abs(m)<Fe?!1:(t[l]={...t[l],length:d},t[c]={...t[c],length:m},!0)}if(r===e.length-1){const l=r,c=r-1,a=Ct(s),x=Ct(i);if(a===x)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(s.length)===Fe)return!1;const d=Bt(a,Fe),p=t[l].length-d,m=t[c].length+p;return Math.abs(m)<Fe?!1:(t[l]={...t[l],length:d},t[c]={...t[c],length:m},!0)}return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0})!==-1?Bo(t):t},qt=e=>Fs(N0(e)),N0=({sourceBox:e,targetBox:t,sourcePos:n,targetPos:s,targetOrientation:r,sourceOrientation:i})=>{let l=i,c=r,a={...fi[i]},x=Tt(n,a);const d={...fi[r]};let p=Tt(s,d);const m=Math.abs(x.x-p.x),f=Math.abs(x.y-p.y);m<2*Fe&&f<10&&(a.length-=m/2,d.length+=m/2,x=Tt(n,a),p=Tt(s,d));const h=[a],j=pi({sourceStumpTip:x,sourceOrientation:i,sourceBox:e,targetStumpTip:p,targetOrientation:r,targetBox:t});j!=null&&(h.push(j),x=Tt(x,j),l=Ct(j),a=j);const y=pi({sourceStumpTip:p,sourceOrientation:c,sourceBox:t,targetStumpTip:x,targetOrientation:l,targetBox:e});y!=null&&(p=Tt(p,y),c=At(y.direction,y.length));const S=()=>{y!=null&&(y.length*=-1,h.push(y)),d.length*=-1,h.push(d)};if(u.K.swap(l)===r){const P=u.g.construct(l),O=(p[P]-x[P])/2;h.push({direction:P,length:O});const I=u.g.swap(P);return h.push({direction:I,length:p[I]-x[I]}),h.push({direction:P,length:O}),S(),h}const b=p[a.direction]-x[a.direction];let E=u.g.swap(a.direction);const C=x[E]-p[E];let L;At(a.direction,b)===l&&At(E,C)===c?L={direction:a.direction,length:b}:(L={direction:E,length:p[E]-x[E]},E=u.g.swap(E)),h.push(L);const T={direction:E,length:p[E]-x[E]};return h.push(T),S(),h},T0=e=>Fs($0(e)),$0=({segments:e,index:t,magnitude:n})=>{const s=[...e],r=s[t],i=u.g.swap(r.direction),l=Ct(r);if(t===0){s.unshift({direction:i,length:n});const c=Bt(l,Fe);s.unshift({direction:r.direction,length:c}),t+=2,s[t]={...s[t],length:s[t].length-c}}else s[t-1]={direction:s[t-1].direction,length:s[t-1].length+n};if(t===s.length-1){s.push({direction:i,length:-n});const c=Bt(l,Fe);s.push({direction:r.direction,length:c}),s[t]={...s[t],length:s[t].length-c}}else s[t+1]={direction:s[t+1].direction,length:s[t+1].length-n};return s},A0=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1},I0=(e,t,n=!1,...s)=>{const r=(i,l)=>!s.includes(l)&&t(i,l);return n?A0(e,r):e.findIndex(r)},D0=({delta:e,segments:t})=>Fs(Wc(e,t,!1)),z0=({delta:e,segments:t})=>Fs(Wc(e,t,!0)),Wc=(e,t,n)=>{let s=[...t];return e.x!==0&&(s=gi("x",e,s,n)),e.y!==0&&(s=gi("y",e,s,n)),s},hi=(e,t,n)=>{if(t.direction!==e)return!1;const s={...t,length:t.length-n[e]},r=Ct(t),i=Ct(s),l=Math.abs(s.length),c=Math.abs(t.length);return(l>c||l>Fe)&&r===i},gi=(e,t,n,s)=>{const r=u.g.swap(e),i=s?n.length-1:0,l=n[i];if(hi(e,l,t)){const p=n[n.length-1];return p.direction===e&&Math.abs(l.length)<Fe?(n[n.length-1]={...p,length:p.length-t[e]},n):(n[i]={...l,length:l.length-t[e]},n)}const c=s?0:n.length-1,x=I0(n,p=>p.direction===e,s,i);if(x===c){const p=n[c];return hi(e,p,t)?(n[c]={...p,length:p.length-t[e]},n):(l.direction===e&&Math.abs(l.length)>p.length?n[i]={...l,length:l.length-t[e]}:n[c]={...p,length:p.length-t[e]},n)}if(x===-1)return n.length===1?n[0].direction===e?[{direction:e,length:n[0].length-t[e]}]:[{direction:r,length:n[0].length/2},{direction:e,length:-t[e]},{direction:r,length:n[0].length/2}]:l.direction===e?(n[i]={...l,length:l.length-t[e]},n):[{direction:r,length:n[0].length},{direction:e,length:-t[e]},...n.slice(1)];const d=n[x];return n[x]={...d,length:d.length-t[e]},n},B0=pe.z.object({position:u.J.xy,zoom:pe.z.number()}),Yc=pe.z.object({color:u.Dt.crudeZ,variant:pe.z.string().optional(),segments:pe.z.array(zo)}),O0=Yc.extend({key:pe.z.string(),source:pe.z.string(),target:pe.z.string(),segments:pe.z.array(zo),color:u.Dt.crudeZ,id:pe.z.string(),data:pe.z.object({segments:pe.z.array(zo),color:u.Dt.crudeZ,variant:pe.z.string().optional()}).optional(),selected:pe.z.boolean(),sourceHandle:pe.z.string().nullable().optional(),targetHandle:pe.z.string().nullable().optional()}),V0=pe.z.object({key:pe.z.string(),position:u.J.xy,selected:pe.z.boolean().optional(),zIndex:pe.z.number().optional(),type:pe.z.string().optional(),data:u.m$1.optional(),measured:pe.z.object({width:pe.z.number().optional(),height:pe.z.number().optional()}).optional()}),wr=e=>e.map(t=>({id:t.key,type:"custom",zIndex:t.zIndex,measured:{...t.measured},position:{...t.position},selected:t.selected,data:{}})),br=e=>e.map(({segments:t,color:n,variant:s,...r})=>({...r,id:r.key,data:{segments:t,color:n,variant:s}})),Gc=e=>e.map(t=>({key:t.id,...t})),Kc=(e,t)=>e.map(n=>{var s,r,i;return n.data??(n.data={segments:[],color:t,variant:"pipe"}),{key:n.id,segments:((s=n.data)==null?void 0:s.segments)??[],selected:n.selected??!1,color:((r=n.data)==null?void 0:r.color)??t,variant:((i=n.data)==null?void 0:i.variant)??"pipe",...n}}),qc=e=>({...e.position,zoom:e.zoom}),Xc=e=>({position:u.J.construct(e),zoom:e.zoom}),Uc=(e,t)=>Gc(t(wr(e))),is=(e,t,n)=>Kc(t(br(e)),n),F0=(e,t="x")=>{if(e.length===0)return[];const n=u.K.construct(t),s=u.K.swap(n);return e.sort((r,i)=>u.$t.loc(r.box,n)-u.$t.loc(i.box,n)),e.forEach((r,i)=>{if(i===0)return;const c=e[i-1].handles.find(f=>f.orientation===s),a=r.handles.find(f=>f.orientation===n);if(c==null||a==null)return;const x=c.absolutePosition,d=a.absolutePosition,p=u.J.set(u.J.translation(d,x),t,0),m=u.J.translate(u.$t.topLeft(r.box),p);r.box=u.$t.construct(m,u.$t.dims(r.box))}),e};function Ae(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,s;n<e.length;n++)(s=Ae(e[n]))!==""&&(t+=(t&&" ")+s);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var H0={value:()=>{}};function Hs(){for(var e=0,t=arguments.length,n={},s;e<t;++e){if(!(s=arguments[e]+"")||s in n||/[\s.]/.test(s))throw new Error("illegal type: "+s);n[s]=[]}return new ls(n)}function ls(e){this._=e}function Z0(e,t){return e.trim().split(/^|\s+/).map(function(n){var s="",r=n.indexOf(".");if(r>=0&&(s=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:s}})}ls.prototype=Hs.prototype={constructor:ls,on:function(e,t){var n=this._,s=Z0(e+"",n),r,i=-1,l=s.length;if(arguments.length<2){for(;++i<l;)if((r=(e=s[i]).type)&&(r=W0(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<l;)if(r=(e=s[i]).type)n[r]=ji(n[r],e.name,t);else if(t==null)for(r in n)n[r]=ji(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ls(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),s=0,r,i;s<r;++s)n[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],s=0,r=i.length;s<r;++s)i[s].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)}};function W0(e,t){for(var n=0,s=e.length,r;n<s;++n)if((r=e[n]).name===t)return r.value}function ji(e,t,n){for(var s=0,r=e.length;s<r;++s)if(e[s].name===t){e[s]=H0,e=e.slice(0,s).concat(e.slice(s+1));break}return n!=null&&e.push({name:t,value:n}),e}var Oo="http://www.w3.org/1999/xhtml";const Ei={svg:"http://www.w3.org/2000/svg",xhtml:Oo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zs(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ei.hasOwnProperty(t)?{space:Ei[t],local:e}:e}function Y0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Oo&&t.documentElement.namespaceURI===Oo?t.createElement(e):t.createElementNS(n,e)}}function G0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Jc(e){var t=Zs(e);return(t.local?G0:Y0)(t)}function K0(){}function vr(e){return e==null?K0:function(){return this.querySelector(e)}}function q0(e){typeof e!="function"&&(e=vr(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=new Array(l),a,x,d=0;d<l;++d)(a=i[d])&&(x=e.call(a,a.__data__,d,i))&&("__data__"in a&&(x.__data__=a.__data__),c[d]=x);return new Ye(s,this._parents)}function X0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function U0(){return[]}function Qc(e){return e==null?U0:function(){return this.querySelectorAll(e)}}function J0(e){return function(){return X0(e.apply(this,arguments))}}function Q0(e){typeof e=="function"?e=J0(e):e=Qc(e);for(var t=this._groups,n=t.length,s=[],r=[],i=0;i<n;++i)for(var l=t[i],c=l.length,a,x=0;x<c;++x)(a=l[x])&&(s.push(e.call(a,a.__data__,x,l)),r.push(a));return new Ye(s,r)}function ea(e){return function(){return this.matches(e)}}function ta(e){return function(t){return t.matches(e)}}var e2=Array.prototype.find;function t2(e){return function(){return e2.call(this.children,e)}}function n2(){return this.firstElementChild}function s2(e){return this.select(e==null?n2:t2(typeof e=="function"?e:ta(e)))}var o2=Array.prototype.filter;function r2(){return Array.from(this.children)}function i2(e){return function(){return o2.call(this.children,e)}}function l2(e){return this.selectAll(e==null?r2:i2(typeof e=="function"?e:ta(e)))}function c2(e){typeof e!="function"&&(e=ea(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=[],a,x=0;x<l;++x)(a=i[x])&&e.call(a,a.__data__,x,i)&&c.push(a);return new Ye(s,this._parents)}function na(e){return new Array(e.length)}function a2(){return new Ye(this._enter||this._groups.map(na),this._parents)}function Rs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Rs.prototype={constructor:Rs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function u2(e){return function(){return e}}function x2(e,t,n,s,r,i){for(var l=0,c,a=t.length,x=i.length;l<x;++l)(c=t[l])?(c.__data__=i[l],s[l]=c):n[l]=new Rs(e,i[l]);for(;l<a;++l)(c=t[l])&&(r[l]=c)}function d2(e,t,n,s,r,i,l){var c,a,x=new Map,d=t.length,p=i.length,m=new Array(d),f;for(c=0;c<d;++c)(a=t[c])&&(m[c]=f=l.call(a,a.__data__,c,t)+"",x.has(f)?r[c]=a:x.set(f,a));for(c=0;c<p;++c)f=l.call(e,i[c],c,i)+"",(a=x.get(f))?(s[c]=a,a.__data__=i[c],x.delete(f)):n[c]=new Rs(e,i[c]);for(c=0;c<d;++c)(a=t[c])&&x.get(m[c])===a&&(r[c]=a)}function p2(e){return e.__data__}function m2(e,t){if(!arguments.length)return Array.from(this,p2);var n=t?d2:x2,s=this._parents,r=this._groups;typeof e!="function"&&(e=u2(e));for(var i=r.length,l=new Array(i),c=new Array(i),a=new Array(i),x=0;x<i;++x){var d=s[x],p=r[x],m=p.length,f=f2(e.call(d,d&&d.__data__,x,s)),h=f.length,j=c[x]=new Array(h),y=l[x]=new Array(h),S=a[x]=new Array(m);n(d,p,j,y,S,f,t);for(var b=0,E=0,C,L;b<h;++b)if(C=j[b]){for(b>=E&&(E=b+1);!(L=y[E])&&++E<h;);C._next=L||null}}return l=new Ye(l,s),l._enter=c,l._exit=a,l}function f2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function h2(){return new Ye(this._exit||this._groups.map(na),this._parents)}function g2(e,t,n){var s=this.enter(),r=this,i=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),s&&r?s.merge(r).order():r}function j2(e){for(var t=e.selection?e.selection():e,n=this._groups,s=t._groups,r=n.length,i=s.length,l=Math.min(r,i),c=new Array(r),a=0;a<l;++a)for(var x=n[a],d=s[a],p=x.length,m=c[a]=new Array(p),f,h=0;h<p;++h)(f=x[h]||d[h])&&(m[h]=f);for(;a<r;++a)c[a]=n[a];return new Ye(c,this._parents)}function E2(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var s=e[t],r=s.length-1,i=s[r],l;--r>=0;)(l=s[r])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function y2(e){e||(e=S2);function t(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var n=this._groups,s=n.length,r=new Array(s),i=0;i<s;++i){for(var l=n[i],c=l.length,a=r[i]=new Array(c),x,d=0;d<c;++d)(x=l[d])&&(a[d]=x);a.sort(t)}return new Ye(r,this._parents).order()}function S2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function R2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function C2(){return Array.from(this)}function w2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length;r<i;++r){var l=s[r];if(l)return l}return null}function b2(){let e=0;for(const t of this)++e;return e}function v2(){return!this.node()}function k2(e){for(var t=this._groups,n=0,s=t.length;n<s;++n)for(var r=t[n],i=0,l=r.length,c;i<l;++i)(c=r[i])&&e.call(c,c.__data__,i,r);return this}function M2(e){return function(){this.removeAttribute(e)}}function _2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function P2(e,t){return function(){this.setAttribute(e,t)}}function L2(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function N2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function T2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function $2(e,t){var n=Zs(e);if(arguments.length<2){var s=this.node();return n.local?s.getAttributeNS(n.space,n.local):s.getAttribute(n)}return this.each((t==null?n.local?_2:M2:typeof t=="function"?n.local?T2:N2:n.local?L2:P2)(n,t))}function sa(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function A2(e){return function(){this.style.removeProperty(e)}}function I2(e,t,n){return function(){this.style.setProperty(e,t,n)}}function D2(e,t,n){return function(){var s=t.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,n)}}function z2(e,t,n){return arguments.length>1?this.each((t==null?A2:typeof t=="function"?D2:I2)(e,t,n??"")):en(this.node(),e)}function en(e,t){return e.style.getPropertyValue(t)||sa(e).getComputedStyle(e,null).getPropertyValue(t)}function B2(e){return function(){delete this[e]}}function O2(e,t){return function(){this[e]=t}}function V2(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function F2(e,t){return arguments.length>1?this.each((t==null?B2:typeof t=="function"?V2:O2)(e,t)):this.node()[e]}function oa(e){return e.trim().split(/^|\s+/)}function kr(e){return e.classList||new ra(e)}function ra(e){this._node=e,this._names=oa(e.getAttribute("class")||"")}ra.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ia(e,t){for(var n=kr(e),s=-1,r=t.length;++s<r;)n.add(t[s])}function la(e,t){for(var n=kr(e),s=-1,r=t.length;++s<r;)n.remove(t[s])}function H2(e){return function(){ia(this,e)}}function Z2(e){return function(){la(this,e)}}function W2(e,t){return function(){(t.apply(this,arguments)?ia:la)(this,e)}}function Y2(e,t){var n=oa(e+"");if(arguments.length<2){for(var s=kr(this.node()),r=-1,i=n.length;++r<i;)if(!s.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?W2:t?H2:Z2)(n,t))}function G2(){this.textContent=""}function K2(e){return function(){this.textContent=e}}function q2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function X2(e){return arguments.length?this.each(e==null?G2:(typeof e=="function"?q2:K2)(e)):this.node().textContent}function U2(){this.innerHTML=""}function J2(e){return function(){this.innerHTML=e}}function Q2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ej(e){return arguments.length?this.each(e==null?U2:(typeof e=="function"?Q2:J2)(e)):this.node().innerHTML}function tj(){this.nextSibling&&this.parentNode.appendChild(this)}function nj(){return this.each(tj)}function sj(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oj(){return this.each(sj)}function rj(e){var t=typeof e=="function"?e:Jc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ij(){return null}function lj(e,t){var n=typeof e=="function"?e:Jc(e),s=t==null?ij:typeof t=="function"?t:vr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),s.apply(this,arguments)||null)})}function cj(){var e=this.parentNode;e&&e.removeChild(this)}function aj(){return this.each(cj)}function uj(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xj(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function dj(e){return this.select(e?xj:uj)}function pj(e){return arguments.length?this.property("__data__",e):this.node().__data__}function mj(e){return function(t){e.call(this,t,this.__data__)}}function fj(e){return e.trim().split(/^|\s+/).map(function(t){var n="",s=t.indexOf(".");return s>=0&&(n=t.slice(s+1),t=t.slice(0,s)),{type:t,name:n}})}function hj(e){return function(){var t=this.__on;if(t){for(var n=0,s=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++s]=i;++s?t.length=s:delete this.__on}}}function gj(e,t,n){return function(){var s=this.__on,r,i=mj(t);if(s){for(var l=0,c=s.length;l<c;++l)if((r=s[l]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},s?s.push(r):this.__on=[r]}}function jj(e,t,n){var s=fj(e+""),r,i=s.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var a=0,x=c.length,d;a<x;++a)for(r=0,d=c[a];r<i;++r)if((l=s[r]).type===d.type&&l.name===d.name)return d.value}return}for(c=t?gj:hj,r=0;r<i;++r)this.each(c(s[r],t,n));return this}function ca(e,t,n){var s=sa(e),r=s.CustomEvent;typeof r=="function"?r=new r(t,n):(r=s.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Ej(e,t){return function(){return ca(this,e,t)}}function yj(e,t){return function(){return ca(this,e,t.apply(this,arguments))}}function Sj(e,t){return this.each((typeof t=="function"?yj:Ej)(e,t))}function*Rj(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length,l;r<i;++r)(l=s[r])&&(yield l)}var aa=[null];function Ye(e,t){this._groups=e,this._parents=t}function Bn(){return new Ye([[document.documentElement]],aa)}function Cj(){return this}Ye.prototype=Bn.prototype={constructor:Ye,select:q0,selectAll:Q0,selectChild:s2,selectChildren:l2,filter:c2,data:m2,enter:a2,exit:h2,join:g2,merge:j2,selection:Cj,order:E2,sort:y2,call:R2,nodes:C2,node:w2,size:b2,empty:v2,each:k2,attr:$2,style:z2,property:F2,classed:Y2,text:X2,html:ej,raise:nj,lower:oj,append:rj,insert:lj,remove:aj,clone:dj,datum:pj,on:jj,dispatch:Sj,[Symbol.iterator]:Rj};function We(e){return typeof e=="string"?new Ye([[document.querySelector(e)]],[document.documentElement]):new Ye([[e]],aa)}function wj(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ue(e,t){if(e=wj(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var s=n.createSVGPoint();return s.x=e.clientX,s.y=e.clientY,s=s.matrixTransform(t.getScreenCTM().inverse()),[s.x,s.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const bj={passive:!1},_n={capture:!0,passive:!1};function jo(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function ua(e){var t=e.document.documentElement,n=We(e).on("dragstart.drag",Jt,_n);"onselectstart"in t?n.on("selectstart.drag",Jt,_n):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function xa(e,t){var n=e.document.documentElement,s=We(e).on("dragstart.drag",null);t&&(s.on("click.drag",Jt,_n),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in n?s.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const qn=e=>()=>e;function Vo(e,{sourceEvent:t,subject:n,target:s,identifier:r,active:i,x:l,y:c,dx:a,dy:x,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:x,enumerable:!0,configurable:!0},_:{value:d}})}Vo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function vj(e){return!e.ctrlKey&&!e.button}function kj(){return this.parentNode}function Mj(e,t){return t??{x:e.x,y:e.y}}function _j(){return navigator.maxTouchPoints||"ontouchstart"in this}function da(){var e=vj,t=kj,n=Mj,s=_j,r={},i=Hs("start","drag","end"),l=0,c,a,x,d,p=0;function m(C){C.on("mousedown.drag",f).filter(s).on("touchstart.drag",y).on("touchmove.drag",S,bj).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(C,L){if(!(d||!e.call(this,C,L))){var T=E(this,t.call(this,C,L),C,L,"mouse");T&&(We(C.view).on("mousemove.drag",h,_n).on("mouseup.drag",j,_n),ua(C.view),jo(C),x=!1,c=C.clientX,a=C.clientY,T("start",C))}}function h(C){if(Jt(C),!x){var L=C.clientX-c,T=C.clientY-a;x=L*L+T*T>p}r.mouse("drag",C)}function j(C){We(C.view).on("mousemove.drag mouseup.drag",null),xa(C.view,x),Jt(C),r.mouse("end",C)}function y(C,L){if(e.call(this,C,L)){var T=C.changedTouches,P=t.call(this,C,L),O=T.length,I,D;for(I=0;I<O;++I)(D=E(this,P,C,L,T[I].identifier,T[I]))&&(jo(C),D("start",C,T[I]))}}function S(C){var L=C.changedTouches,T=L.length,P,O;for(P=0;P<T;++P)(O=r[L[P].identifier])&&(Jt(C),O("drag",C,L[P]))}function b(C){var L=C.changedTouches,T=L.length,P,O;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),P=0;P<T;++P)(O=r[L[P].identifier])&&(jo(C),O("end",C,L[P]))}function E(C,L,T,P,O,I){var D=i.copy(),H=Ue(I||T,L),B,_,R;if((R=n.call(C,new Vo("beforestart",{sourceEvent:T,target:m,identifier:O,active:l,x:H[0],y:H[1],dx:0,dy:0,dispatch:D}),P))!=null)return B=R.x-H[0]||0,_=R.y-H[1]||0,function k(v,M,A){var $=H,V;switch(v){case"start":r[O]=k,V=l++;break;case"end":delete r[O],--l;case"drag":H=Ue(A||M,L),V=l;break}D.call(v,C,new Vo(v,{sourceEvent:M,subject:R,target:m,identifier:O,active:V,x:H[0]+B,y:H[1]+_,dx:H[0]-$[0],dy:H[1]-$[1],dispatch:D}),P)}}return m.filter=function(C){return arguments.length?(e=typeof C=="function"?C:qn(!!C),m):e},m.container=function(C){return arguments.length?(t=typeof C=="function"?C:qn(C),m):t},m.subject=function(C){return arguments.length?(n=typeof C=="function"?C:qn(C),m):n},m.touchable=function(C){return arguments.length?(s=typeof C=="function"?C:qn(!!C),m):s},m.on=function(){var C=i.on.apply(i,arguments);return C===i?m:C},m.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,m):Math.sqrt(p)},m}var tn=0,yn=0,hn=0,pa=1e3,Cs,Sn,ws=0,Ot=0,Ws=0,Pn=typeof performance=="object"&&performance.now?performance:Date,ma=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Mr(){return Ot||(ma(Pj),Ot=Pn.now()+Ws)}function Pj(){Ot=0}function bs(){this._call=this._time=this._next=null}bs.prototype=fa.prototype={constructor:bs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Mr():+n)+(t==null?0:+t),!this._next&&Sn!==this&&(Sn?Sn._next=this:Cs=this,Sn=this),this._call=e,this._time=n,Fo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fo())}};function fa(e,t,n){var s=new bs;return s.restart(e,t,n),s}function Lj(){Mr(),++tn;for(var e=Cs,t;e;)(t=Ot-e._time)>=0&&e._call.call(void 0,t),e=e._next;--tn}function yi(){Ot=(ws=Pn.now())+Ws,tn=yn=0;try{Lj()}finally{tn=0,Tj(),Ot=0}}function Nj(){var e=Pn.now(),t=e-ws;t>pa&&(Ws-=t,ws=e)}function Tj(){for(var e,t=Cs,n,s=1/0;t;)t._call?(s>t._time&&(s=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Cs=n);Sn=e,Fo(s)}function Fo(e){if(!tn){yn&&(yn=clearTimeout(yn));var t=e-Ot;t>24?(e<1/0&&(yn=setTimeout(yi,e-Pn.now()-Ws)),hn&&(hn=clearInterval(hn))):(hn||(ws=Pn.now(),hn=setInterval(Nj,pa)),tn=1,ma(yi))}}function Si(e,t,n){var s=new bs;return t=t==null?0:+t,s.restart(r=>{s.stop(),e(r+t)},t,n),s}var $j=Hs("start","end","cancel","interrupt"),Aj=[],ha=0,Ri=1,Ho=2,cs=3,Ci=4,Zo=5,as=6;function Ys(e,t,n,s,r,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;Ij(e,n,{name:t,index:s,group:r,on:$j,tween:Aj,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ha})}function _r(e,t){var n=et(e,t);if(n.state>ha)throw new Error("too late; already scheduled");return n}function ct(e,t){var n=et(e,t);if(n.state>cs)throw new Error("too late; already running");return n}function et(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ij(e,t,n){var s=e.__transition,r;s[t]=n,n.timer=fa(i,0,n.time);function i(x){n.state=Ri,n.timer.restart(l,n.delay,n.time),n.delay<=x&&l(x-n.delay)}function l(x){var d,p,m,f;if(n.state!==Ri)return a();for(d in s)if(f=s[d],f.name===n.name){if(f.state===cs)return Si(l);f.state===Ci?(f.state=as,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete s[d]):+d<t&&(f.state=as,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete s[d])}if(Si(function(){n.state===cs&&(n.state=Ci,n.timer.restart(c,n.delay,n.time),c(x))}),n.state=Ho,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ho){for(n.state=cs,r=new Array(m=n.tween.length),d=0,p=-1;d<m;++d)(f=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++p]=f);r.length=p+1}}function c(x){for(var d=x<n.duration?n.ease.call(null,x/n.duration):(n.timer.restart(a),n.state=Zo,1),p=-1,m=r.length;++p<m;)r[p].call(e,d);n.state===Zo&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=as,n.timer.stop(),delete s[t];for(var x in s)return;delete e.__transition}}function us(e,t){var n=e.__transition,s,r,i=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((s=n[l]).name!==t){i=!1;continue}r=s.state>Ho&&s.state<Zo,s.state=as,s.timer.stop(),s.on.call(r?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete n[l]}i&&delete e.__transition}}function Dj(e){return this.each(function(){us(this,e)})}function zj(e,t){var n,s;return function(){var r=ct(this,e),i=r.tween;if(i!==n){s=n=i;for(var l=0,c=s.length;l<c;++l)if(s[l].name===t){s=s.slice(),s.splice(l,1);break}}r.tween=s}}function Bj(e,t,n){var s,r;if(typeof n!="function")throw new Error;return function(){var i=ct(this,e),l=i.tween;if(l!==s){r=(s=l).slice();for(var c={name:t,value:n},a=0,x=r.length;a<x;++a)if(r[a].name===t){r[a]=c;break}a===x&&r.push(c)}i.tween=r}}function Oj(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s=et(this.node(),n).tween,r=0,i=s.length,l;r<i;++r)if((l=s[r]).name===e)return l.value;return null}return this.each((t==null?zj:Bj)(n,e,t))}function Pr(e,t,n){var s=e._id;return e.each(function(){var r=ct(this,s);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return et(r,s).value[t]}}function ga(e,t){var n;return(typeof t=="number"?z.interpolateNumber:t instanceof z.color?z.interpolateRgb:(n=z.color(t))?(t=n,z.interpolateRgb):z.interpolateString)(e,t)}function Vj(e){return function(){this.removeAttribute(e)}}function Fj(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Hj(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttribute(e);return l===r?null:l===s?i:i=t(s=l,n)}}function Zj(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttributeNS(e.space,e.local);return l===r?null:l===s?i:i=t(s=l,n)}}function Wj(e,t,n){var s,r,i;return function(){var l,c=n(this),a;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),a=c+"",l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c)))}}function Yj(e,t,n){var s,r,i;return function(){var l,c=n(this),a;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),a=c+"",l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c)))}}function Gj(e,t){var n=Zs(e),s=n==="transform"?yh:ga;return this.attrTween(e,typeof t=="function"?(n.local?Yj:Wj)(n,s,Pr(this,"attr."+e,t)):t==null?(n.local?Fj:Vj)(n):(n.local?Zj:Hj)(n,s,t))}function Kj(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function qj(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Xj(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&qj(e,i)),n}return r._value=t,r}function Uj(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&Kj(e,i)),n}return r._value=t,r}function Jj(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var s=Zs(e);return this.tween(n,(s.local?Xj:Uj)(s,t))}function Qj(e,t){return function(){_r(this,e).delay=+t.apply(this,arguments)}}function e3(e,t){return t=+t,function(){_r(this,e).delay=t}}function t3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Qj:e3)(t,e)):et(this.node(),t).delay}function n3(e,t){return function(){ct(this,e).duration=+t.apply(this,arguments)}}function s3(e,t){return t=+t,function(){ct(this,e).duration=t}}function o3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?n3:s3)(t,e)):et(this.node(),t).duration}function r3(e,t){if(typeof t!="function")throw new Error;return function(){ct(this,e).ease=t}}function i3(e){var t=this._id;return arguments.length?this.each(r3(t,e)):et(this.node(),t).ease}function l3(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ct(this,e).ease=n}}function c3(e){if(typeof e!="function")throw new Error;return this.each(l3(this._id,e))}function a3(e){typeof e!="function"&&(e=ea(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=[],a,x=0;x<l;++x)(a=i[x])&&e.call(a,a.__data__,x,i)&&c.push(a);return new pt(s,this._parents,this._name,this._id)}function u3(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,s=t.length,r=n.length,i=Math.min(s,r),l=new Array(s),c=0;c<i;++c)for(var a=t[c],x=n[c],d=a.length,p=l[c]=new Array(d),m,f=0;f<d;++f)(m=a[f]||x[f])&&(p[f]=m);for(;c<s;++c)l[c]=t[c];return new pt(l,this._parents,this._name,this._id)}function x3(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function d3(e,t,n){var s,r,i=x3(t)?_r:ct;return function(){var l=i(this,e),c=l.on;c!==s&&(r=(s=c).copy()).on(t,n),l.on=r}}function p3(e,t){var n=this._id;return arguments.length<2?et(this.node(),n).on.on(e):this.each(d3(n,e,t))}function m3(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function f3(){return this.on("end.remove",m3(this._id))}function h3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=vr(e));for(var s=this._groups,r=s.length,i=new Array(r),l=0;l<r;++l)for(var c=s[l],a=c.length,x=i[l]=new Array(a),d,p,m=0;m<a;++m)(d=c[m])&&(p=e.call(d,d.__data__,m,c))&&("__data__"in d&&(p.__data__=d.__data__),x[m]=p,Ys(x[m],t,n,m,x,et(d,n)));return new pt(i,this._parents,t,n)}function g3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Qc(e));for(var s=this._groups,r=s.length,i=[],l=[],c=0;c<r;++c)for(var a=s[c],x=a.length,d,p=0;p<x;++p)if(d=a[p]){for(var m=e.call(d,d.__data__,p,a),f,h=et(d,n),j=0,y=m.length;j<y;++j)(f=m[j])&&Ys(f,t,n,j,m,h);i.push(m),l.push(d)}return new pt(i,l,t,n)}var j3=Bn.prototype.constructor;function E3(){return new j3(this._groups,this._parents)}function y3(e,t){var n,s,r;return function(){var i=en(this,e),l=(this.style.removeProperty(e),en(this,e));return i===l?null:i===n&&l===s?r:r=t(n=i,s=l)}}function ja(e){return function(){this.style.removeProperty(e)}}function S3(e,t,n){var s,r=n+"",i;return function(){var l=en(this,e);return l===r?null:l===s?i:i=t(s=l,n)}}function R3(e,t,n){var s,r,i;return function(){var l=en(this,e),c=n(this),a=c+"";return c==null&&(a=c=(this.style.removeProperty(e),en(this,e))),l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c))}}function C3(e,t){var n,s,r,i="style."+t,l="end."+i,c;return function(){var a=ct(this,e),x=a.on,d=a.value[i]==null?c||(c=ja(t)):void 0;(x!==n||r!==d)&&(s=(n=x).copy()).on(l,r=d),a.on=s}}function w3(e,t,n){var s=(e+="")=="transform"?Eh:ga;return t==null?this.styleTween(e,y3(e,s)).on("end.style."+e,ja(e)):typeof t=="function"?this.styleTween(e,R3(e,s,Pr(this,"style."+e,t))).each(C3(this._id,e)):this.styleTween(e,S3(e,s,t),n).on("end.style."+e,null)}function b3(e,t,n){return function(s){this.style.setProperty(e,t.call(this,s),n)}}function v3(e,t,n){var s,r;function i(){var l=t.apply(this,arguments);return l!==r&&(s=(r=l)&&b3(e,l,n)),s}return i._value=t,i}function k3(e,t,n){var s="style."+(e+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(t==null)return this.tween(s,null);if(typeof t!="function")throw new Error;return this.tween(s,v3(e,t,n??""))}function M3(e){return function(){this.textContent=e}}function _3(e){return function(){var t=e(this);this.textContent=t??""}}function P3(e){return this.tween("text",typeof e=="function"?_3(Pr(this,"text",e)):M3(e==null?"":e+""))}function L3(e){return function(t){this.textContent=e.call(this,t)}}function N3(e){var t,n;function s(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&L3(r)),t}return s._value=e,s}function T3(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,N3(e))}function $3(){for(var e=this._name,t=this._id,n=Ea(),s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],c=l.length,a,x=0;x<c;++x)if(a=l[x]){var d=et(a,t);Ys(a,e,n,x,l,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new pt(s,this._parents,e,n)}function A3(){var e,t,n=this,s=n._id,r=n.size();return new Promise(function(i,l){var c={value:l},a={value:function(){--r===0&&i()}};n.each(function(){var x=ct(this,s),d=x.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(a)),x.on=t}),r===0&&i()})}var I3=0;function pt(e,t,n,s){this._groups=e,this._parents=t,this._name=n,this._id=s}function Ea(){return++I3}var ut=Bn.prototype;pt.prototype={constructor:pt,select:h3,selectAll:g3,selectChild:ut.selectChild,selectChildren:ut.selectChildren,filter:a3,merge:u3,selection:E3,transition:$3,call:ut.call,nodes:ut.nodes,node:ut.node,size:ut.size,empty:ut.empty,each:ut.each,on:p3,attr:Gj,attrTween:Jj,style:w3,styleTween:k3,text:P3,textTween:T3,remove:f3,tween:Oj,delay:t3,duration:o3,ease:i3,easeVarying:c3,end:A3,[Symbol.iterator]:ut[Symbol.iterator]};function D3(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var z3={time:null,delay:0,duration:250,ease:D3};function B3(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function O3(e){var t,n;e instanceof pt?(t=e._id,e=e._name):(t=Ea(),(n=z3).time=Mr(),e=e==null?null:e+"");for(var s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],c=l.length,a,x=0;x<c;++x)(a=l[x])&&Ys(a,e,t,x,l,n||B3(a,t));return new pt(s,this._parents,e,t)}Bn.prototype.interrupt=Dj;Bn.prototype.transition=O3;const Xn=e=>()=>e;function V3(e,{sourceEvent:t,target:n,transform:s,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:r}})}function xt(e,t,n){this.k=e,this.x=t,this.y=n}xt.prototype={constructor:xt,scale:function(e){return e===1?this:new xt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new xt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Gs=new xt(1,0,0);ya.prototype=xt.prototype;function ya(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Gs;return e.__zoom}function Eo(e){e.stopImmediatePropagation()}function gn(e){e.preventDefault(),e.stopImmediatePropagation()}function F3(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function H3(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function wi(){return this.__zoom||Gs}function Z3(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function W3(){return navigator.maxTouchPoints||"ontouchstart"in this}function Y3(e,t,n){var s=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function Sa(){var e=F3,t=H3,n=Y3,s=Z3,r=W3,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,a=wh,x=Hs("start","zoom","end"),d,p,m,f=500,h=150,j=0,y=10;function S(R){R.property("__zoom",wi).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",D).filter(r).on("touchstart.zoom",H).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(R,k,v,M){var A=R.selection?R.selection():R;A.property("__zoom",wi),R!==A?L(R,k,v,M):A.interrupt().each(function(){T(this,arguments).event(M).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},S.scaleBy=function(R,k,v,M){S.scaleTo(R,function(){var A=this.__zoom.k,$=typeof k=="function"?k.apply(this,arguments):k;return A*$},v,M)},S.scaleTo=function(R,k,v,M){S.transform(R,function(){var A=t.apply(this,arguments),$=this.__zoom,V=v==null?C(A):typeof v=="function"?v.apply(this,arguments):v,F=$.invert(V),W=typeof k=="function"?k.apply(this,arguments):k;return n(E(b($,W),V,F),A,l)},v,M)},S.translateBy=function(R,k,v,M){S.transform(R,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof v=="function"?v.apply(this,arguments):v),t.apply(this,arguments),l)},null,M)},S.translateTo=function(R,k,v,M,A){S.transform(R,function(){var $=t.apply(this,arguments),V=this.__zoom,F=M==null?C($):typeof M=="function"?M.apply(this,arguments):M;return n(Gs.translate(F[0],F[1]).scale(V.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof v=="function"?-v.apply(this,arguments):-v),$,l)},M,A)};function b(R,k){return k=Math.max(i[0],Math.min(i[1],k)),k===R.k?R:new xt(k,R.x,R.y)}function E(R,k,v){var M=k[0]-v[0]*R.k,A=k[1]-v[1]*R.k;return M===R.x&&A===R.y?R:new xt(R.k,M,A)}function C(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function L(R,k,v,M){R.on("start.zoom",function(){T(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(M).end()}).tween("zoom",function(){var A=this,$=arguments,V=T(A,$).event(M),F=t.apply(A,$),W=v==null?C(F):typeof v=="function"?v.apply(A,$):v,ee=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),te=A.__zoom,se=typeof k=="function"?k.apply(A,$):k,oe=a(te.invert(W).concat(ee/te.k),se.invert(W).concat(ee/se.k));return function(J){if(J===1)J=se;else{var le=oe(J),fe=ee/le[2];J=new xt(fe,W[0]-le[0]*fe,W[1]-le[1]*fe)}V.zoom(null,J)}})}function T(R,k,v){return!v&&R.__zooming||new P(R,k)}function P(R,k){this.that=R,this.args=k,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,k),this.taps=0}P.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,k){return this.mouse&&R!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var k=We(this.that).datum();x.call(R,this.that,new V3(R,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:x}),k)}};function O(R,...k){if(!e.apply(this,arguments))return;var v=T(this,k).event(R),M=this.__zoom,A=Math.max(i[0],Math.min(i[1],M.k*Math.pow(2,s.apply(this,arguments)))),$=Ue(R);if(v.wheel)(v.mouse[0][0]!==$[0]||v.mouse[0][1]!==$[1])&&(v.mouse[1]=M.invert(v.mouse[0]=$)),clearTimeout(v.wheel);else{if(M.k===A)return;v.mouse=[$,M.invert($)],us(this),v.start()}gn(R),v.wheel=setTimeout(V,h),v.zoom("mouse",n(E(b(M,A),v.mouse[0],v.mouse[1]),v.extent,l));function V(){v.wheel=null,v.end()}}function I(R,...k){if(m||!e.apply(this,arguments))return;var v=R.currentTarget,M=T(this,k,!0).event(R),A=We(R.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",ee,!0),$=Ue(R,v),V=R.clientX,F=R.clientY;ua(R.view),Eo(R),M.mouse=[$,this.__zoom.invert($)],us(this),M.start();function W(te){if(gn(te),!M.moved){var se=te.clientX-V,oe=te.clientY-F;M.moved=se*se+oe*oe>j}M.event(te).zoom("mouse",n(E(M.that.__zoom,M.mouse[0]=Ue(te,v),M.mouse[1]),M.extent,l))}function ee(te){A.on("mousemove.zoom mouseup.zoom",null),xa(te.view,M.moved),gn(te),M.event(te).end()}}function D(R,...k){if(e.apply(this,arguments)){var v=this.__zoom,M=Ue(R.changedTouches?R.changedTouches[0]:R,this),A=v.invert(M),$=v.k*(R.shiftKey?.5:2),V=n(E(b(v,$),M,A),t.apply(this,k),l);gn(R),c>0?We(this).transition().duration(c).call(L,V,M,R):We(this).call(S.transform,V,M,R)}}function H(R,...k){if(e.apply(this,arguments)){var v=R.touches,M=v.length,A=T(this,k,R.changedTouches.length===M).event(R),$,V,F,W;for(Eo(R),V=0;V<M;++V)F=v[V],W=Ue(F,this),W=[W,this.__zoom.invert(W),F.identifier],A.touch0?!A.touch1&&A.touch0[2]!==W[2]&&(A.touch1=W,A.taps=0):(A.touch0=W,$=!0,A.taps=1+!!d);d&&(d=clearTimeout(d)),$&&(A.taps<2&&(p=W[0],d=setTimeout(function(){d=null},f)),us(this),A.start())}}function B(R,...k){if(this.__zooming){var v=T(this,k).event(R),M=R.changedTouches,A=M.length,$,V,F,W;for(gn(R),$=0;$<A;++$)V=M[$],F=Ue(V,this),v.touch0&&v.touch0[2]===V.identifier?v.touch0[0]=F:v.touch1&&v.touch1[2]===V.identifier&&(v.touch1[0]=F);if(V=v.that.__zoom,v.touch1){var ee=v.touch0[0],te=v.touch0[1],se=v.touch1[0],oe=v.touch1[1],J=(J=se[0]-ee[0])*J+(J=se[1]-ee[1])*J,le=(le=oe[0]-te[0])*le+(le=oe[1]-te[1])*le;V=b(V,Math.sqrt(J/le)),F=[(ee[0]+se[0])/2,(ee[1]+se[1])/2],W=[(te[0]+oe[0])/2,(te[1]+oe[1])/2]}else if(v.touch0)F=v.touch0[0],W=v.touch0[1];else return;v.zoom("touch",n(E(V,F,W),v.extent,l))}}function _(R,...k){if(this.__zooming){var v=T(this,k).event(R),M=R.changedTouches,A=M.length,$,V;for(Eo(R),m&&clearTimeout(m),m=setTimeout(function(){m=null},f),$=0;$<A;++$)V=M[$],v.touch0&&v.touch0[2]===V.identifier?delete v.touch0:v.touch1&&v.touch1[2]===V.identifier&&delete v.touch1;if(v.touch1&&!v.touch0&&(v.touch0=v.touch1,delete v.touch1),v.touch0)v.touch0[1]=this.__zoom.invert(v.touch0[0]);else if(v.end(),v.taps===2&&(V=Ue(V,this),Math.hypot(p[0]-V[0],p[1]-V[1])<y)){var F=We(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return S.wheelDelta=function(R){return arguments.length?(s=typeof R=="function"?R:Xn(+R),S):s},S.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Xn(!!R),S):e},S.touchable=function(R){return arguments.length?(r=typeof R=="function"?R:Xn(!!R),S):r},S.extent=function(R){return arguments.length?(t=typeof R=="function"?R:Xn([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),S):t},S.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],S):[i[0],i[1]]},S.translateExtent=function(R){return arguments.length?(l[0][0]=+R[0][0],l[1][0]=+R[1][0],l[0][1]=+R[0][1],l[1][1]=+R[1][1],S):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},S.constrain=function(R){return arguments.length?(n=R,S):n},S.duration=function(R){return arguments.length?(c=+R,S):c},S.interpolate=function(R){return arguments.length?(a=R,S):a},S.on=function(){var R=x.on.apply(x,arguments);return R===x?S:R},S.clickDistance=function(R){return arguments.length?(j=(R=+R)*R,S):Math.sqrt(j)},S.tapDistance=function(R){return arguments.length?(y=+R,S):y},S}const Be={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:s})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:s}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Ln=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ra=["Enter"," ","Escape"];var Vt;(function(e){e.Strict="strict",e.Loose="loose"})(Vt||(Vt={}));var It;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(It||(It={}));var nn;(function(e){e.Partial="partial",e.Full="full"})(nn||(nn={}));const Ca={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Rt;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Rt||(Rt={}));var vs;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(vs||(vs={}));var U;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(U||(U={}));const bi={[U.Left]:U.Right,[U.Right]:U.Left,[U.Top]:U.Bottom,[U.Bottom]:U.Top};function wa(e){return e===null?null:e?"valid":"invalid"}const ba=e=>"id"in e&&"source"in e&&"target"in e,G3=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Lr=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),On=(e,t=[0,0])=>{const{width:n,height:s}=gt(e),r=e.origin??t,i=n*r[0],l=s*r[1];return{x:e.position.x-i,y:e.position.y-l}},K3=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((s,r)=>{const i=typeof r=="string";let l=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(l=i?t.nodeLookup.get(r):Lr(r)?r:t.nodeLookup.get(r.id));const c=l?ks(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ks(s,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return qs(n)},Vn=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(s=>{if(t.filter===void 0||t.filter(s)){const r=ks(s);n=Ks(n,r)}}),qs(n)},va=(e,t,[n,s,r]=[0,0,1],i=!1,l=!1)=>{const c={...Fn(t,[n,s,r]),width:t.width/r,height:t.height/r},a=[];for(const x of e.values()){const{measured:d,selectable:p=!0,hidden:m=!1}=x;if(l&&!p||m)continue;const f=d.width??x.width??x.initialWidth??null,h=d.height??x.height??x.initialHeight??null,j=Nn(c,on(x)),y=(f??0)*(h??0),S=i&&j>0;(!x.internals.handleBounds||S||j>=y||x.dragging)&&a.push(x)}return a},q3=(e,t)=>{const n=new Set;return e.forEach(s=>{n.add(s.id)}),t.filter(s=>n.has(s.source)||n.has(s.target))};function X3(e,t){const n=new Map,s=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!s||s.has(r.id))&&n.set(r.id,r)}),n}async function U3({nodes:e,width:t,height:n,panZoom:s,minZoom:r,maxZoom:i},l){if(e.size===0)return Promise.resolve(!0);const c=X3(e,l),a=Vn(c),x=Nr(a,t,n,(l==null?void 0:l.minZoom)??r,(l==null?void 0:l.maxZoom)??i,(l==null?void 0:l.padding)??.1);return await s.setViewport(x,{duration:l==null?void 0:l.duration}),Promise.resolve(!0)}function ka({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:s=[0,0],nodeExtent:r,onError:i}){const l=n.get(e),c=l.parentId?n.get(l.parentId):void 0,{x:a,y:x}=c?c.internals.positionAbsolute:{x:0,y:0},d=l.origin??s;let p=r;if(l.extent==="parent"&&!l.expandParent)if(!c)i==null||i("005",Be.error005());else{const f=c.measured.width,h=c.measured.height;f&&h&&(p=[[a,x],[a+f,x+h]])}else c&&rn(l.extent)&&(p=[[l.extent[0][0]+a,l.extent[0][1]+x],[l.extent[1][0]+a,l.extent[1][1]+x]]);const m=rn(p)?Ft(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(i==null||i("015",Be.error015())),{position:{x:m.x-a+(l.measured.width??0)*d[0],y:m.y-x+(l.measured.height??0)*d[1]},positionAbsolute:m}}async function J3({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:s,onBeforeDelete:r}){const i=new Set(e.map(m=>m.id)),l=[];for(const m of n){if(m.deletable===!1)continue;const f=i.has(m.id),h=!f&&m.parentId&&l.find(j=>j.id===m.parentId);(f||h)&&l.push(m)}const c=new Set(t.map(m=>m.id)),a=s.filter(m=>m.deletable!==!1),d=q3(l,a);for(const m of a)c.has(m.id)&&!d.find(h=>h.id===m.id)&&d.push(m);if(!r)return{edges:d,nodes:l};const p=await r({nodes:l,edges:d});return typeof p=="boolean"?p?{edges:d,nodes:l}:{edges:[],nodes:[]}:p}const sn=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ft=(e={x:0,y:0},t,n)=>({x:sn(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:sn(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Ma(e,t,n){const{width:s,height:r}=gt(n),{x:i,y:l}=n.internals.positionAbsolute;return Ft(e,[[i,l],[i+s,l+r]],t)}const vi=(e,t,n)=>e<t?sn(Math.abs(e-t),1,t)/t:e>n?-sn(Math.abs(e-n),1,t)/t:0,_a=(e,t,n=15,s=40)=>{const r=vi(e.x,s,t.width-s)*n,i=vi(e.y,s,t.height-s)*n;return[r,i]},Ks=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Wo=({x:e,y:t,width:n,height:s})=>({x:e,y:t,x2:e+n,y2:t+s}),qs=({x:e,y:t,x2:n,y2:s})=>({x:e,y:t,width:n-e,height:s-t}),on=(e,t=[0,0])=>{var r,i;const{x:n,y:s}=Lr(e)?e.internals.positionAbsolute:On(e,t);return{x:n,y:s,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},ks=(e,t=[0,0])=>{var r,i;const{x:n,y:s}=Lr(e)?e.internals.positionAbsolute:On(e,t);return{x:n,y:s,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:s+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},Pa=(e,t)=>qs(Ks(Wo(e),Wo(t))),Nn=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),s=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*s)},ki=e=>Je(e.width)&&Je(e.height)&&Je(e.x)&&Je(e.y),Je=e=>!isNaN(e)&&isFinite(e),Ms=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},Xs=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Fn=({x:e,y:t},[n,s,r],i=!1,l=[1,1])=>{const c={x:(e-n)/r,y:(t-s)/r};return i?Xs(c,l):c},_s=({x:e,y:t},[n,s,r])=>({x:e*r+n,y:t*r+s});function Kt(e,t){if(typeof e=="number")return Math.floor(t-t/(1+e));if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Q3(e,t,n){if(typeof e=="string"||typeof e=="number"){const s=Kt(e,n),r=Kt(e,t);return{top:s,right:r,bottom:s,left:r,x:r*2,y:s*2}}if(typeof e=="object"){const s=Kt(e.top??e.y??0,n),r=Kt(e.bottom??e.y??0,n),i=Kt(e.left??e.x??0,t),l=Kt(e.right??e.x??0,t);return{top:s,right:l,bottom:r,left:i,x:i+l,y:s+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function e5(e,t,n,s,r,i){const{x:l,y:c}=_s(e,[t,n,s]),{x:a,y:x}=_s({x:e.x+e.width,y:e.y+e.height},[t,n,s]),d=r-a,p=i-x;return{left:Math.floor(l),top:Math.floor(c),right:Math.floor(d),bottom:Math.floor(p)}}const Nr=(e,t,n,s,r,i)=>{const l=Q3(i,t,n),c=(t-l.x)/e.width,a=(n-l.y)/e.height,x=Math.min(c,a),d=sn(x,s,r),p=e.x+e.width/2,m=e.y+e.height/2,f=t/2-p*d,h=n/2-m*d,j=e5(e,f,h,d,t,n),y={left:Math.min(j.left-l.left,0),top:Math.min(j.top-l.top,0),right:Math.min(j.right-l.right,0),bottom:Math.min(j.bottom-l.bottom,0)};return{x:f-y.left+y.right,y:h-y.top+y.bottom,zoom:d}},Ps=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function rn(e){return e!==void 0&&e!=="parent"}function gt(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function La(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Na(e,t={width:0,height:0},n,s,r){const i={...e},l=s.get(n);if(l){const c=l.origin||r;i.x+=l.internals.positionAbsolute.x-(t.width??0)*c[0],i.y+=l.internals.positionAbsolute.y-(t.height??0)*c[1]}return i}function Mi(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Cn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:s,containerBounds:r}){const{x:i,y:l}=dt(e),c=Fn({x:i-((r==null?void 0:r.left)??0),y:l-((r==null?void 0:r.top)??0)},s),{x:a,y:x}=n?Xs(c,t):c;return{xSnapped:a,ySnapped:x,...c}}const Tr=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ta=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},t5=["INPUT","SELECT","TEXTAREA"];function $a(e){var s,r;const t=((r=(s=e.composedPath)==null?void 0:s.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:t5.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Aa=e=>"clientX"in e,dt=(e,t)=>{var i,l;const n=Aa(e),s=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,r=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:s-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},_i=(e,t,n,s,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:r,position:l.getAttribute("data-handlepos"),x:(c.left-n.left)/s,y:(c.top-n.top)/s,...Tr(l)}})};function Ia({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:r,sourceControlY:i,targetControlX:l,targetControlY:c}){const a=e*.125+r*.375+l*.375+n*.125,x=t*.125+i*.375+c*.375+s*.125,d=Math.abs(a-e),p=Math.abs(x-t);return[a,x,d,p]}function Un(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Pi({pos:e,x1:t,y1:n,x2:s,y2:r,c:i}){switch(e){case U.Left:return[t-Un(t-s,i),n];case U.Right:return[t+Un(s-t,i),n];case U.Top:return[t,n-Un(n-r,i)];case U.Bottom:return[t,n+Un(r-n,i)]}}function Da({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top,curvature:l=.25}){const[c,a]=Pi({pos:n,x1:e,y1:t,x2:s,y2:r,c:l}),[x,d]=Pi({pos:i,x1:s,y1:r,x2:e,y2:t,c:l}),[p,m,f,h]=Ia({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:c,sourceControlY:a,targetControlX:x,targetControlY:d});return[`M${e},${t} C${c},${a} ${x},${d} ${s},${r}`,p,m,f,h]}function za({sourceX:e,sourceY:t,targetX:n,targetY:s}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,l=Math.abs(s-t)/2,c=s<t?s+l:s-l;return[i,c,r,l]}function n5({sourceNode:e,targetNode:t,selected:n=!1,zIndex:s=0,elevateOnSelect:r=!1}){if(!r)return s;const i=n||t.selected||e.selected,l=Math.max(e.internals.z||0,t.internals.z||0,1e3);return s+(i?l:0)}function s5({sourceNode:e,targetNode:t,width:n,height:s,transform:r}){const i=Ks(ks(e),ks(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const l={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:s/r[2]};return Nn(l,qs(i))>0}const Ba=({source:e,sourceHandle:t,target:n,targetHandle:s})=>`xy-edge__${e}${t||""}-${n}${s||""}`,o5=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Oa=(e,t)=>{if(!e.source||!e.target)return Ms("006",Be.error006()),t;let n;return ba(e)?n={...e}:n={...e,id:Ba(e)},o5(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))},r5=(e,t,n,s={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return Ms("006",Be.error006()),n;if(!n.find(a=>a.id===e.id))return Ms("007",Be.error007(r)),n;const c={...i,id:s.shouldReplaceId?Ba(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(a=>a.id!==r).concat(c)};function Va({sourceX:e,sourceY:t,targetX:n,targetY:s}){const[r,i,l,c]=za({sourceX:e,sourceY:t,targetX:n,targetY:s});return[`M ${e},${t}L ${n},${s}`,r,i,l,c]}const Li={[U.Left]:{x:-1,y:0},[U.Right]:{x:1,y:0},[U.Top]:{x:0,y:-1},[U.Bottom]:{x:0,y:1}},i5=({source:e,sourcePosition:t=U.Bottom,target:n})=>t===U.Left||t===U.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Ni=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function l5({source:e,sourcePosition:t=U.Bottom,target:n,targetPosition:s=U.Top,center:r,offset:i}){const l=Li[t],c=Li[s],a={x:e.x+l.x*i,y:e.y+l.y*i},x={x:n.x+c.x*i,y:n.y+c.y*i},d=i5({source:a,sourcePosition:t,target:x}),p=d.x!==0?"x":"y",m=d[p];let f=[],h,j;const y={x:0,y:0},S={x:0,y:0},[b,E,C,L]=za({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]===-1){h=r.x??b,j=r.y??E;const P=[{x:h,y:a.y},{x:h,y:x.y}],O=[{x:a.x,y:j},{x:x.x,y:j}];l[p]===m?f=p==="x"?P:O:f=p==="x"?O:P}else{const P=[{x:a.x,y:x.y}],O=[{x:x.x,y:a.y}];if(p==="x"?f=l.x===m?O:P:f=l.y===m?P:O,t===s){const _=Math.abs(e[p]-n[p]);if(_<=i){const R=Math.min(i-1,i-_);l[p]===m?y[p]=(a[p]>e[p]?-1:1)*R:S[p]=(x[p]>n[p]?-1:1)*R}}if(t!==s){const _=p==="x"?"y":"x",R=l[p]===c[_],k=a[_]>x[_],v=a[_]<x[_];(l[p]===1&&(!R&&k||R&&v)||l[p]!==1&&(!R&&v||R&&k))&&(f=p==="x"?P:O)}const I={x:a.x+y.x,y:a.y+y.y},D={x:x.x+S.x,y:x.y+S.y},H=Math.max(Math.abs(I.x-f[0].x),Math.abs(D.x-f[0].x)),B=Math.max(Math.abs(I.y-f[0].y),Math.abs(D.y-f[0].y));H>=B?(h=(I.x+D.x)/2,j=f[0].y):(h=f[0].x,j=(I.y+D.y)/2)}return[[e,{x:a.x+y.x,y:a.y+y.y},...f,{x:x.x+S.x,y:x.y+S.y},n],h,j,C,L]}function c5(e,t,n,s){const r=Math.min(Ni(e,t)/2,Ni(t,n)/2,s),{x:i,y:l}=t;if(e.x===i&&i===n.x||e.y===l&&l===n.y)return`L${i} ${l}`;if(e.y===l){const x=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+r*x},${l}Q ${i},${l} ${i},${l+r*d}`}const c=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${l+r*a}Q ${i},${l} ${i+r*c},${l}`}function Yo({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top,borderRadius:l=5,centerX:c,centerY:a,offset:x=20}){const[d,p,m,f,h]=l5({source:{x:e,y:t},sourcePosition:n,target:{x:s,y:r},targetPosition:i,center:{x:c,y:a},offset:x});return[d.reduce((y,S,b)=>{let E="";return b>0&&b<d.length-1?E=c5(d[b-1],S,d[b+1],l):E=`${b===0?"M":"L"}${S.x} ${S.y}`,y+=E,y},""),p,m,f,h]}function Ti(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function a5(e){var p;const{sourceNode:t,targetNode:n}=e;if(!Ti(t)||!Ti(n))return null;const s=t.internals.handleBounds||$i(t.handles),r=n.internals.handleBounds||$i(n.handles),i=Ai((s==null?void 0:s.source)??[],e.sourceHandle),l=Ai(e.connectionMode===Vt.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!i||!l)return(p=e.onError)==null||p.call(e,"008",Be.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(i==null?void 0:i.position)||U.Bottom,a=(l==null?void 0:l.position)||U.Top,x=Tn(t,i,c),d=Tn(n,l,a);return{sourceX:x.x,sourceY:x.y,targetX:d.x,targetY:d.y,sourcePosition:c,targetPosition:a}}function $i(e){if(!e)return null;const t=[],n=[];for(const s of e)s.width=s.width??1,s.height=s.height??1,s.type==="source"?t.push(s):s.type==="target"&&n.push(s);return{source:t,target:n}}function Tn(e,t,n=U.Left,s=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:l,height:c}=t??gt(e);if(s)return{x:r+l/2,y:i+c/2};switch((t==null?void 0:t.position)??n){case U.Top:return{x:r+l/2,y:i};case U.Right:return{x:r+l,y:i+c/2};case U.Bottom:return{x:r+l/2,y:i+c};case U.Left:return{x:r,y:i+c/2}}}function Ai(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Go(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function u5(e,{id:t,defaultColor:n,defaultMarkerStart:s,defaultMarkerEnd:r}){const i=new Set;return e.reduce((l,c)=>([c.markerStart||s,c.markerEnd||r].forEach(a=>{if(a&&typeof a=="object"){const x=Go(a,t);i.has(x)||(l.push({id:x,color:a.color||n,...a}),i.add(x))}}),l),[]).sort((l,c)=>l.id.localeCompare(c.id))}const $r={nodeOrigin:[0,0],nodeExtent:Ln,elevateNodesOnSelect:!0,defaults:{}},x5={...$r,checkEquality:!0};function Ar(e,t){const n={...e};for(const s in t)t[s]!==void 0&&(n[s]=t[s]);return n}function d5(e,t,n){const s=Ar($r,n);for(const r of e.values())if(r.parentId)Ir(r,e,t,s);else{const i=On(r,s.nodeOrigin),l=rn(r.extent)?r.extent:s.nodeExtent,c=Ft(i,l,gt(r));r.internals.positionAbsolute=c}}function Ko(e,t,n,s){var a,x;const r=Ar(x5,s);let i=!0;const l=new Map(t),c=r!=null&&r.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const d of e){let p=l.get(d.id);if(r.checkEquality&&d===(p==null?void 0:p.internals.userNode))t.set(d.id,p);else{const m=On(d,r.nodeOrigin),f=rn(d.extent)?d.extent:r.nodeExtent,h=Ft(m,f,gt(d));p={...r.defaults,...d,measured:{width:(a=d.measured)==null?void 0:a.width,height:(x=d.measured)==null?void 0:x.height},internals:{positionAbsolute:h,handleBounds:d.measured?p==null?void 0:p.internals.handleBounds:void 0,z:Fa(d,c),userNode:d}},t.set(d.id,p)}(!p.measured||!p.measured.width||!p.measured.height)&&!p.hidden&&(i=!1),d.parentId&&Ir(p,t,n,s)}return i}function p5(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ir(e,t,n,s){const{elevateNodesOnSelect:r,nodeOrigin:i,nodeExtent:l}=Ar($r,s),c=e.parentId,a=t.get(c);if(!a){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}p5(e,n);const x=r?1e3:0,{x:d,y:p,z:m}=m5(e,a,i,l,x),{positionAbsolute:f}=e.internals,h=d!==f.x||p!==f.y;(h||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:p}:f,z:m}})}function Fa(e,t){return(Je(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function m5(e,t,n,s,r){const{x:i,y:l}=t.internals.positionAbsolute,c=gt(e),a=On(e,n),x=rn(e.extent)?Ft(a,e.extent,c):a;let d=Ft({x:i+x.x,y:l+x.y},s,c);e.extent==="parent"&&(d=Ma(d,c,t));const p=Fa(e,r),m=t.internals.z??0;return{x:d.x,y:d.y,z:m>p?m:p}}function Dr(e,t,n,s=[0,0]){var l;const r=[],i=new Map;for(const c of e){const a=t.get(c.parentId);if(!a)continue;const x=((l=i.get(c.parentId))==null?void 0:l.expandedRect)??on(a),d=Pa(x,c.rect);i.set(c.parentId,{expandedRect:d,parent:a})}return i.size>0&&i.forEach(({expandedRect:c,parent:a},x)=>{var E;const d=a.internals.positionAbsolute,p=gt(a),m=a.origin??s,f=c.x<d.x?Math.round(Math.abs(d.x-c.x)):0,h=c.y<d.y?Math.round(Math.abs(d.y-c.y)):0,j=Math.max(p.width,Math.round(c.width)),y=Math.max(p.height,Math.round(c.height)),S=(j-p.width)*m[0],b=(y-p.height)*m[1];(f>0||h>0||S||b)&&(r.push({id:x,type:"position",position:{x:a.position.x-f+S,y:a.position.y-h+b}}),(E=n.get(x))==null||E.forEach(C=>{e.some(L=>L.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+f,y:C.position.y+h}})})),(p.width<c.width||p.height<c.height||f||h)&&r.push({id:x,type:"dimensions",setAttributes:!0,dimensions:{width:j+(f?m[0]*f-S:0),height:y+(h?m[1]*h-b:0)}})}),r}function f5(e,t,n,s,r,i){const l=s==null?void 0:s.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const a=[],x=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(x.transform),p=[];for(const m of e.values()){const f=t.get(m.id);if(!f)continue;if(f.hidden){t.set(f.id,{...f,internals:{...f.internals,handleBounds:void 0}}),c=!0;continue}const h=Tr(m.nodeElement),j=f.measured.width!==h.width||f.measured.height!==h.height;if(!!(h.width&&h.height&&(j||!f.internals.handleBounds||m.force))){const S=m.nodeElement.getBoundingClientRect(),b=rn(f.extent)?f.extent:i;let{positionAbsolute:E}=f.internals;f.parentId&&f.extent==="parent"?E=Ma(E,h,t.get(f.parentId)):b&&(E=Ft(E,b,h));const C={...f,measured:h,internals:{...f.internals,positionAbsolute:E,handleBounds:{source:_i("source",m.nodeElement,S,d,f.id),target:_i("target",m.nodeElement,S,d,f.id)}}};t.set(f.id,C),f.parentId&&Ir(C,t,n,{nodeOrigin:r}),c=!0,j&&(a.push({id:f.id,type:"dimensions",dimensions:h}),f.expandParent&&f.parentId&&p.push({id:f.id,parentId:f.parentId,rect:on(C,r)}))}}if(p.length>0){const m=Dr(p,t,n,r);a.push(...m)}return{changes:a,updatedInternals:c}}async function h5({delta:e,panZoom:t,transform:n,translateExtent:s,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],s),c=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(c)}function Ii(e,t,n,s,r,i){let l=r;const c=s.get(l)||new Map;s.set(l,c.set(n,t)),l=`${r}-${e}`;const a=s.get(l)||new Map;if(s.set(l,a.set(n,t)),i){l=`${r}-${e}-${i}`;const x=s.get(l)||new Map;s.set(l,x.set(n,t))}}function Ha(e,t,n){e.clear(),t.clear();for(const s of n){const{source:r,target:i,sourceHandle:l=null,targetHandle:c=null}=s,a={edgeId:s.id,source:r,target:i,sourceHandle:l,targetHandle:c},x=`${r}-${l}--${i}-${c}`,d=`${i}-${c}--${r}-${l}`;Ii("source",a,d,e,r,l),Ii("target",a,x,e,i,c),t.set(s.id,s)}}function Za(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Za(n,t):!1}function Di(e,t,n){var r;let s=e;do{if((r=s==null?void 0:s.matches)!=null&&r.call(s,t))return!0;if(s===n)return!1;s=s==null?void 0:s.parentElement}while(s);return!1}function g5(e,t,n,s){const r=new Map;for(const[i,l]of e)if((l.selected||l.id===s)&&(!l.parentId||!Za(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const c=e.get(i);c&&r.set(i,{id:i,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return r}function yo({nodeId:e,dragItems:t,nodeLookup:n,dragging:s=!0}){var l,c,a;const r=[];for(const[x,d]of t){const p=(l=n.get(x))==null?void 0:l.internals.userNode;p&&r.push({...p,position:d.position,dragging:s})}if(!e)return[r[0],r];const i=(c=n.get(e))==null?void 0:c.internals.userNode;return[i?{...i,position:((a=t.get(e))==null?void 0:a.position)||i.position,dragging:s}:r[0],r]}function j5({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:s,onDragStop:r}){let i={x:null,y:null},l=0,c=new Map,a=!1,x={x:0,y:0},d=null,p=!1,m=null,f=!1;function h({noDragClassName:y,handleSelector:S,domNode:b,isSelectable:E,nodeId:C,nodeClickDistance:L=0}){m=We(b);function T({x:D,y:H},B){const{nodeLookup:_,nodeExtent:R,snapGrid:k,snapToGrid:v,nodeOrigin:M,onNodeDrag:A,onSelectionDrag:$,onError:V,updateNodePositions:F}=t();i={x:D,y:H};let W=!1,ee={x:0,y:0,x2:0,y2:0};if(c.size>1&&R){const te=Vn(c);ee=Wo(te)}for(const[te,se]of c){if(!_.has(te))continue;let oe={x:D-se.distance.x,y:H-se.distance.y};v&&(oe=Xs(oe,k));let J=[[R[0][0],R[0][1]],[R[1][0],R[1][1]]];if(c.size>1&&R&&!se.extent){const{positionAbsolute:ke}=se.internals,de=ke.x-ee.x+R[0][0],G=ke.x+se.measured.width-ee.x2+R[1][0],ae=ke.y-ee.y+R[0][1],ue=ke.y+se.measured.height-ee.y2+R[1][1];J=[[de,ae],[G,ue]]}const{position:le,positionAbsolute:fe}=ka({nodeId:te,nextPosition:oe,nodeLookup:_,nodeExtent:J,nodeOrigin:M,onError:V});W=W||se.position.x!==le.x||se.position.y!==le.y,se.position=le,se.internals.positionAbsolute=fe}if(W&&(F(c,!0),B&&(s||A||!C&&$))){const[te,se]=yo({nodeId:C,dragItems:c,nodeLookup:_});s==null||s(B,c,te,se),A==null||A(B,te,se),C||$==null||$(B,se)}}async function P(){if(!d)return;const{transform:D,panBy:H,autoPanSpeed:B,autoPanOnNodeDrag:_}=t();if(!_){a=!1,cancelAnimationFrame(l);return}const[R,k]=_a(x,d,B);(R!==0||k!==0)&&(i.x=(i.x??0)-R/D[2],i.y=(i.y??0)-k/D[2],await H({x:R,y:k})&&T(i,null)),l=requestAnimationFrame(P)}function O(D){var W;const{nodeLookup:H,multiSelectionActive:B,nodesDraggable:_,transform:R,snapGrid:k,snapToGrid:v,selectNodesOnDrag:M,onNodeDragStart:A,onSelectionDragStart:$,unselectNodesAndEdges:V}=t();p=!0,(!M||!E)&&!B&&C&&((W=H.get(C))!=null&&W.selected||V()),E&&M&&C&&(e==null||e(C));const F=Cn(D.sourceEvent,{transform:R,snapGrid:k,snapToGrid:v,containerBounds:d});if(i=F,c=g5(H,_,F,C),c.size>0&&(n||A||!C&&$)){const[ee,te]=yo({nodeId:C,dragItems:c,nodeLookup:H});n==null||n(D.sourceEvent,c,ee,te),A==null||A(D.sourceEvent,ee,te),C||$==null||$(D.sourceEvent,te)}}const I=da().clickDistance(L).on("start",D=>{const{domNode:H,nodeDragThreshold:B,transform:_,snapGrid:R,snapToGrid:k}=t();d=(H==null?void 0:H.getBoundingClientRect())||null,f=!1,B===0&&O(D),i=Cn(D.sourceEvent,{transform:_,snapGrid:R,snapToGrid:k,containerBounds:d}),x=dt(D.sourceEvent,d)}).on("drag",D=>{const{autoPanOnNodeDrag:H,transform:B,snapGrid:_,snapToGrid:R,nodeDragThreshold:k,nodeLookup:v}=t(),M=Cn(D.sourceEvent,{transform:B,snapGrid:_,snapToGrid:R,containerBounds:d});if((D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||C&&!v.has(C))&&(f=!0),!f){if(!a&&H&&p&&(a=!0,P()),!p){const A=M.xSnapped-(i.x??0),$=M.ySnapped-(i.y??0);Math.sqrt(A*A+$*$)>k&&O(D)}(i.x!==M.xSnapped||i.y!==M.ySnapped)&&c&&p&&(x=dt(D.sourceEvent,d),T(M,D.sourceEvent))}}).on("end",D=>{if(!(!p||f)&&(a=!1,p=!1,cancelAnimationFrame(l),c.size>0)){const{nodeLookup:H,updateNodePositions:B,onNodeDragStop:_,onSelectionDragStop:R}=t();if(B(c,!1),r||_||!C&&R){const[k,v]=yo({nodeId:C,dragItems:c,nodeLookup:H,dragging:!1});r==null||r(D.sourceEvent,c,k,v),_==null||_(D.sourceEvent,k,v),C||R==null||R(D.sourceEvent,v)}}}).filter(D=>{const H=D.target;return!D.button&&(!y||!Di(H,`.${y}`,b))&&(!S||Di(H,S,b))});m.call(I)}function j(){m==null||m.on(".drag",null)}return{update:h,destroy:j}}function E5(e,t,n){const s=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Nn(r,on(i))>0&&s.push(i);return s}const y5=250;function S5(e,t,n,s){var c,a;let r=[],i=1/0;const l=E5(e,n,t+y5);for(const x of l){const d=[...((c=x.internals.handleBounds)==null?void 0:c.source)??[],...((a=x.internals.handleBounds)==null?void 0:a.target)??[]];for(const p of d){if(s.nodeId===p.nodeId&&s.type===p.type&&s.id===p.id)continue;const{x:m,y:f}=Tn(x,p,p.position,!0),h=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(f-e.y,2));h>t||(h<i?(r=[{...p,x:m,y:f}],i=h):h===i&&r.push({...p,x:m,y:f}))}}if(!r.length)return null;if(r.length>1){const x=s.type==="source"?"target":"source";return r.find(d=>d.type===x)??r[0]}return r[0]}function Wa(e,t,n,s,r,i=!1){var x,d,p;const l=s.get(e);if(!l)return null;const c=r==="strict"?(x=l.internals.handleBounds)==null?void 0:x[t]:[...((d=l.internals.handleBounds)==null?void 0:d.source)??[],...((p=l.internals.handleBounds)==null?void 0:p.target)??[]],a=(n?c==null?void 0:c.find(m=>m.id===n):c==null?void 0:c[0])??null;return a&&i?{...a,...Tn(l,a,a.position,!0)}:a}function Ya(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function R5(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Ga=()=>!0;function C5(e,{connectionMode:t,connectionRadius:n,handleId:s,nodeId:r,edgeUpdaterType:i,isTarget:l,domNode:c,nodeLookup:a,lib:x,autoPanOnConnect:d,flowId:p,panBy:m,cancelConnection:f,onConnectStart:h,onConnect:j,onConnectEnd:y,isValidConnection:S=Ga,onReconnectEnd:b,updateConnection:E,getTransform:C,getFromHandle:L,autoPanSpeed:T}){const P=Ta(e.target);let O=0,I;const{x:D,y:H}=dt(e),B=P==null?void 0:P.elementFromPoint(D,H),_=Ya(i,B),R=c==null?void 0:c.getBoundingClientRect();if(!R||!_)return;const k=Wa(r,_,s,a,t);if(!k)return;let v=dt(e,R),M=!1,A=null,$=!1,V=null;function F(){if(!d||!R)return;const[fe,ke]=_a(v,R,T);m({x:fe,y:ke}),O=requestAnimationFrame(F)}const W={...k,nodeId:r,type:_,position:k.position},ee=a.get(r),se={inProgress:!0,isValid:null,from:Tn(ee,W,U.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:ee,to:v,toHandle:null,toPosition:bi[W.position],toNode:null};E(se);let oe=se;h==null||h(e,{nodeId:r,handleId:s,handleType:_});function J(fe){if(!L()||!W){le(fe);return}const ke=C();v=dt(fe,R),I=S5(Fn(v,ke,!1,[1,1]),n,a,W),M||(F(),M=!0);const de=Ka(fe,{handle:I,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:l?"target":"source",isValidConnection:S,doc:P,lib:x,flowId:p,nodeLookup:a});V=de.handleDomNode,A=de.connection,$=R5(!!I,de.isValid);const G={...oe,isValid:$,to:I&&$?_s({x:I.x,y:I.y},ke):v,toHandle:de.toHandle,toPosition:$&&de.toHandle?de.toHandle.position:bi[W.position],toNode:de.toHandle?a.get(de.toHandle.nodeId):null};$&&I&&oe.toHandle&&G.toHandle&&oe.toHandle.type===G.toHandle.type&&oe.toHandle.nodeId===G.toHandle.nodeId&&oe.toHandle.id===G.toHandle.id&&oe.to.x===G.to.x&&oe.to.y===G.to.y||(E(G),oe=G)}function le(fe){(I||V)&&A&&$&&(j==null||j(A));const{inProgress:ke,...de}=oe,G={...de,toPosition:oe.toHandle?oe.toPosition:null};y==null||y(fe,G),i&&(b==null||b(fe,G)),f(),cancelAnimationFrame(O),M=!1,$=!1,A=null,V=null,P.removeEventListener("mousemove",J),P.removeEventListener("mouseup",le),P.removeEventListener("touchmove",J),P.removeEventListener("touchend",le)}P.addEventListener("mousemove",J),P.addEventListener("mouseup",le),P.addEventListener("touchmove",J),P.addEventListener("touchend",le)}function Ka(e,{handle:t,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:i,doc:l,lib:c,flowId:a,isValidConnection:x=Ga,nodeLookup:d}){const p=i==="target",m=t?l.querySelector(`.${c}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:f,y:h}=dt(e),j=l.elementFromPoint(f,h),y=j!=null&&j.classList.contains(`${c}-flow__handle`)?j:m,S={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const b=Ya(void 0,y),E=y.getAttribute("data-nodeid"),C=y.getAttribute("data-handleid"),L=y.classList.contains("connectable"),T=y.classList.contains("connectableend");if(!E||!b)return S;const P={source:p?E:s,sourceHandle:p?C:r,target:p?s:E,targetHandle:p?r:C};S.connection=P;const I=L&&T&&(n===Vt.Strict?p&&b==="source"||!p&&b==="target":E!==s||C!==r);S.isValid=I&&x(P),S.toHandle=Wa(E,b,C,d,n,!1)}return S}const qo={onPointerDown:C5,isValid:Ka};function w5({domNode:e,panZoom:t,getTransform:n,getViewScale:s}){const r=We(e);function i({translateExtent:c,width:a,height:x,zoomStep:d=10,pannable:p=!0,zoomable:m=!0,inversePan:f=!1}){const h=E=>{const C=n();if(E.sourceEvent.type!=="wheel"||!t)return;const L=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*d,T=C[2]*Math.pow(2,L);t.scaleTo(T)};let j=[0,0];const y=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(j=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},S=E=>{const C=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const L=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],T=[L[0]-j[0],L[1]-j[1]];j=L;const P=s()*Math.max(C[2],Math.log(C[2]))*(f?-1:1),O={x:C[0]-T[0]*P,y:C[1]-T[1]*P},I=[[0,0],[a,x]];t.setViewportConstrained({x:O.x,y:O.y,zoom:C[2]},I,c)},b=Sa().on("start",y).on("zoom",p?S:null).on("zoom.wheel",m?h:null);r.call(b,{})}function l(){r.on("zoom",null)}return{update:i,destroy:l,pointer:Ue}}const b5=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Us=e=>({x:e.x,y:e.y,zoom:e.k}),So=({x:e,y:t,zoom:n})=>Gs.translate(e,t).scale(n),Xt=(e,t)=>e.target.closest(`.${t}`),qa=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Ro=(e,t=0,n=()=>{})=>{const s=typeof t=="number"&&t>0;return s||n(),s?e.transition().duration(t).on("end",n):e},Xa=e=>{const t=e.ctrlKey&&Ps()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function v5({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:s,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:a,onPanZoomEnd:x}){return d=>{if(Xt(d,t))return!1;d.preventDefault(),d.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(d.ctrlKey&&l){const y=Ue(d),S=Xa(d),b=p*Math.pow(2,S);s.scaleTo(n,b,y,d);return}const m=d.deltaMode===1?20:1;let f=r===It.Vertical?0:d.deltaX*m,h=r===It.Horizontal?0:d.deltaY*m;!Ps()&&d.shiftKey&&r!==It.Vertical&&(f=d.deltaY*m,h=0),s.translateBy(n,-(f/p)*i,-(h/p)*i,{internal:!0});const j=Us(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,c==null||c(d,j)),e.isPanScrolling&&(a==null||a(d,j),e.panScrollTimeout=setTimeout(()=>{x==null||x(d,j),e.isPanScrolling=!1},150))}}function k5({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(s,r){const i=s.type==="wheel",l=!t&&i&&!s.ctrlKey,c=Xt(s,e);if(s.ctrlKey&&i&&c&&s.preventDefault(),l||c)return null;s.preventDefault(),n.call(this,s,r)}}function M5({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return s=>{var i,l,c;if((i=s.sourceEvent)!=null&&i.internal)return;const r=Us(s.transform);e.mouseButton=((l=s.sourceEvent)==null?void 0:l.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((c=s.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(s.sourceEvent,r))}}function _5({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:s,onPanZoom:r}){return i=>{var l,c;e.usedRightMouseButton=!!(n&&qa(t,e.mouseButton??0)),(l=i.sourceEvent)!=null&&l.sync||s([i.transform.x,i.transform.y,i.transform.k]),r&&!((c=i.sourceEvent)!=null&&c.internal)&&(r==null||r(i.sourceEvent,Us(i.transform)))}}function P5({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:s,onPanZoomEnd:r,onPaneContextMenu:i}){return l=>{var c;if(!((c=l.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,i&&qa(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&i(l.sourceEvent),e.usedRightMouseButton=!1,s(!1),r&&b5(e.prevViewport,l.transform))){const a=Us(l.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(l.sourceEvent,a)},n?150:0)}}}function L5({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:s,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:l,noWheelClassName:c,noPanClassName:a,lib:x}){return d=>{var h;const p=e||t,m=n&&d.ctrlKey;if(d.button===1&&d.type==="mousedown"&&(Xt(d,`${x}-flow__node`)||Xt(d,`${x}-flow__edge`)))return!0;if(!s&&!p&&!r&&!i&&!n||l||Xt(d,c)&&d.type==="wheel"||Xt(d,a)&&(d.type!=="wheel"||r&&d.type==="wheel"&&!e)||!n&&d.ctrlKey&&d.type==="wheel")return!1;if(!n&&d.type==="touchstart"&&((h=d.touches)==null?void 0:h.length)>1)return d.preventDefault(),!1;if(!p&&!r&&!m&&d.type==="wheel"||!s&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(s)&&!s.includes(d.button)&&d.type==="mousedown")return!1;const f=Array.isArray(s)&&s.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||d.type==="wheel")&&f}}function N5({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:s,translateExtent:r,viewport:i,onPanZoom:l,onPanZoomStart:c,onPanZoomEnd:a,onDraggingChange:x}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),m=Sa().clickDistance(!Je(s)||s<0?0:s).scaleExtent([t,n]).translateExtent(r),f=We(e).call(m);E({x:i.x,y:i.y,zoom:sn(i.zoom,t,n)},[[0,0],[p.width,p.height]],r);const h=f.on("wheel.zoom"),j=f.on("dblclick.zoom");m.wheelDelta(Xa);function y(B,_){return f?new Promise(R=>{m==null||m.transform(Ro(f,_==null?void 0:_.duration,()=>R(!0)),B)}):Promise.resolve(!1)}function S({noWheelClassName:B,noPanClassName:_,onPaneContextMenu:R,userSelectionActive:k,panOnScroll:v,panOnDrag:M,panOnScrollMode:A,panOnScrollSpeed:$,preventScrolling:V,zoomOnPinch:F,zoomOnScroll:W,zoomOnDoubleClick:ee,zoomActivationKeyPressed:te,lib:se,onTransformChange:oe}){k&&!d.isZoomingOrPanning&&b();const le=v&&!te&&!k?v5({zoomPanValues:d,noWheelClassName:B,d3Selection:f,d3Zoom:m,panOnScrollMode:A,panOnScrollSpeed:$,zoomOnPinch:F,onPanZoomStart:c,onPanZoom:l,onPanZoomEnd:a}):k5({noWheelClassName:B,preventScrolling:V,d3ZoomHandler:h});if(f.on("wheel.zoom",le,{passive:!1}),!k){const ke=M5({zoomPanValues:d,onDraggingChange:x,onPanZoomStart:c});m.on("start",ke);const de=_5({zoomPanValues:d,panOnDrag:M,onPaneContextMenu:!!R,onPanZoom:l,onTransformChange:oe});m.on("zoom",de);const G=P5({zoomPanValues:d,panOnDrag:M,panOnScroll:v,onPaneContextMenu:R,onPanZoomEnd:a,onDraggingChange:x});m.on("end",G)}const fe=L5({zoomActivationKeyPressed:te,panOnDrag:M,zoomOnScroll:W,panOnScroll:v,zoomOnDoubleClick:ee,zoomOnPinch:F,userSelectionActive:k,noPanClassName:_,noWheelClassName:B,lib:se});m.filter(fe),ee?f.on("dblclick.zoom",j):f.on("dblclick.zoom",null)}function b(){m.on("zoom",null)}async function E(B,_,R){const k=So(B),v=m==null?void 0:m.constrain()(k,_,R);return v&&await y(v),new Promise(M=>M(v))}async function C(B,_){const R=So(B);return await y(R,_),new Promise(k=>k(R))}function L(B){if(f){const _=So(B),R=f.property("__zoom");(R.k!==B.zoom||R.x!==B.x||R.y!==B.y)&&(m==null||m.transform(f,_,null,{sync:!0}))}}function T(){const B=f?ya(f.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}function P(B,_){return f?new Promise(R=>{m==null||m.scaleTo(Ro(f,_==null?void 0:_.duration,()=>R(!0)),B)}):Promise.resolve(!1)}function O(B,_){return f?new Promise(R=>{m==null||m.scaleBy(Ro(f,_==null?void 0:_.duration,()=>R(!0)),B)}):Promise.resolve(!1)}function I(B){m==null||m.scaleExtent(B)}function D(B){m==null||m.translateExtent(B)}function H(B){const _=!Je(B)||B<0?0:B;m==null||m.clickDistance(_)}return{update:S,destroy:b,setViewport:C,setViewportConstrained:E,getViewport:T,scaleTo:P,scaleBy:O,setScaleExtent:I,setTranslateExtent:D,syncViewport:L,setClickDistance:H}}var wn;(function(e){e.Line="line",e.Handle="handle"})(wn||(wn={}));function T5({width:e,prevWidth:t,height:n,prevHeight:s,affectsX:r,affectsY:i}){const l=e-t,c=n-s,a=[l>0?1:l<0?-1:0,c>0?1:c<0?-1:0];return l&&r&&(a[0]=a[0]*-1),c&&i&&(a[1]=a[1]*-1),a}function $5(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),s=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:s,affectsY:r}}function Et(e,t){return Math.max(0,t-e)}function yt(e,t){return Math.max(0,e-t)}function Jn(e,t,n){return Math.max(0,t-e,e-n)}function zi(e,t){return e?!t:t}function A5(e,t,n,s,r,i,l,c){let{affectsX:a,affectsY:x}=t;const{isHorizontal:d,isVertical:p}=t,m=d&&p,{xSnapped:f,ySnapped:h}=n,{minWidth:j,maxWidth:y,minHeight:S,maxHeight:b}=s,{x:E,y:C,width:L,height:T,aspectRatio:P}=e;let O=Math.floor(d?f-e.pointerX:0),I=Math.floor(p?h-e.pointerY:0);const D=L+(a?-O:O),H=T+(x?-I:I),B=-i[0]*L,_=-i[1]*T;let R=Jn(D,j,y),k=Jn(H,S,b);if(l){let A=0,$=0;a&&O<0?A=Et(E+O+B,l[0][0]):!a&&O>0&&(A=yt(E+D+B,l[1][0])),x&&I<0?$=Et(C+I+_,l[0][1]):!x&&I>0&&($=yt(C+H+_,l[1][1])),R=Math.max(R,A),k=Math.max(k,$)}if(c){let A=0,$=0;a&&O>0?A=yt(E+O,c[0][0]):!a&&O<0&&(A=Et(E+D,c[1][0])),x&&I>0?$=yt(C+I,c[0][1]):!x&&I<0&&($=Et(C+H,c[1][1])),R=Math.max(R,A),k=Math.max(k,$)}if(r){if(d){const A=Jn(D/P,S,b)*P;if(R=Math.max(R,A),l){let $=0;!a&&!x||a&&!x&&m?$=yt(C+_+D/P,l[1][1])*P:$=Et(C+_+(a?O:-O)/P,l[0][1])*P,R=Math.max(R,$)}if(c){let $=0;!a&&!x||a&&!x&&m?$=Et(C+D/P,c[1][1])*P:$=yt(C+(a?O:-O)/P,c[0][1])*P,R=Math.max(R,$)}}if(p){const A=Jn(H*P,j,y)/P;if(k=Math.max(k,A),l){let $=0;!a&&!x||x&&!a&&m?$=yt(E+H*P+B,l[1][0])/P:$=Et(E+(x?I:-I)*P+B,l[0][0])/P,k=Math.max(k,$)}if(c){let $=0;!a&&!x||x&&!a&&m?$=Et(E+H*P,c[1][0])/P:$=yt(E+(x?I:-I)*P,c[0][0])/P,k=Math.max(k,$)}}}I=I+(I<0?k:-k),O=O+(O<0?R:-R),r&&(m?D>H*P?I=(zi(a,x)?-O:O)/P:O=(zi(a,x)?-I:I)*P:d?(I=O/P,x=a):(O=I*P,a=x));const v=a?E+O:E,M=x?C+I:C;return{width:L+(a?-O:O),height:T+(x?-I:I),x:i[0]*O*(a?-1:1)+v,y:i[1]*I*(x?-1:1)+M}}const Ua={width:0,height:0,x:0,y:0},I5={...Ua,pointerX:0,pointerY:0,aspectRatio:1};function D5(e){return[[0,0],[e.measured.width,e.measured.height]]}function z5(e,t,n){const s=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,l=e.measured.height??0,c=n[0]*i,a=n[1]*l;return[[s-c,r-a],[s+i-c,r+l-a]]}function B5({domNode:e,nodeId:t,getStoreItems:n,onChange:s,onEnd:r}){const i=We(e);function l({controlPosition:a,boundaries:x,keepAspectRatio:d,onResizeStart:p,onResize:m,onResizeEnd:f,shouldResize:h}){let j={...Ua},y={...I5};const S=$5(a);let b,E=null,C=[],L,T,P;const O=da().on("start",I=>{const{nodeLookup:D,transform:H,snapGrid:B,snapToGrid:_,nodeOrigin:R,paneDomNode:k}=n();if(b=D.get(t),!b)return;E=(k==null?void 0:k.getBoundingClientRect())??null;const{xSnapped:v,ySnapped:M}=Cn(I.sourceEvent,{transform:H,snapGrid:B,snapToGrid:_,containerBounds:E});j={width:b.measured.width??0,height:b.measured.height??0,x:b.position.x??0,y:b.position.y??0},y={...j,pointerX:v,pointerY:M,aspectRatio:j.width/j.height},L=void 0,b.parentId&&(b.extent==="parent"||b.expandParent)&&(L=D.get(b.parentId),T=L&&b.extent==="parent"?D5(L):void 0),C=[],P=void 0;for(const[A,$]of D)if($.parentId===t&&(C.push({id:A,position:{...$.position},extent:$.extent}),$.extent==="parent"||$.expandParent)){const V=z5($,b,$.origin??R);P?P=[[Math.min(V[0][0],P[0][0]),Math.min(V[0][1],P[0][1])],[Math.max(V[1][0],P[1][0]),Math.max(V[1][1],P[1][1])]]:P=V}p==null||p(I,{...j})}).on("drag",I=>{const{transform:D,snapGrid:H,snapToGrid:B,nodeOrigin:_}=n(),R=Cn(I.sourceEvent,{transform:D,snapGrid:H,snapToGrid:B,containerBounds:E}),k=[];if(!b)return;const{x:v,y:M,width:A,height:$}=j,V={},F=b.origin??_,{width:W,height:ee,x:te,y:se}=A5(y,S,R,x,d,F,T,P),oe=W!==A,J=ee!==$,le=te!==v&&oe,fe=se!==M&&J;if(!le&&!fe&&!oe&&!J)return;if((le||fe||F[0]===1||F[1]===1)&&(V.x=le?te:j.x,V.y=fe?se:j.y,j.x=V.x,j.y=V.y,C.length>0)){const ae=te-v,ue=se-M;for(const _e of C)_e.position={x:_e.position.x-ae+F[0]*(W-A),y:_e.position.y-ue+F[1]*(ee-$)},k.push(_e)}if((oe||J)&&(V.width=oe?W:j.width,V.height=J?ee:j.height,j.width=V.width,j.height=V.height),L&&b.expandParent){const ae=F[0]*(V.width??0);V.x&&V.x<ae&&(j.x=ae,y.x=y.x-(V.x-ae));const ue=F[1]*(V.height??0);V.y&&V.y<ue&&(j.y=ue,y.y=y.y-(V.y-ue))}const ke=T5({width:j.width,prevWidth:A,height:j.height,prevHeight:$,affectsX:S.affectsX,affectsY:S.affectsY}),de={...j,direction:ke};(h==null?void 0:h(I,de))!==!1&&(m==null||m(I,de),s(V,k))}).on("end",I=>{f==null||f(I,{...j}),r==null||r({...j})});i.call(O)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}var Qn={exports:{}},Co={},es={exports:{}},wo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Bi;function O5(){if(Bi)return wo;Bi=1;var e=g;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,s=e.useState,r=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function c(p,m){var f=m(),h=s({inst:{value:f,getSnapshot:m}}),j=h[0].inst,y=h[1];return i(function(){j.value=f,j.getSnapshot=m,a(j)&&y({inst:j})},[p,f,m]),r(function(){return a(j)&&y({inst:j}),p(function(){a(j)&&y({inst:j})})},[p]),l(f),f}function a(p){var m=p.getSnapshot;p=p.value;try{var f=m();return!n(p,f)}catch{return!0}}function x(p,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x:c;return wo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,wo}var bo={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* use-sync-external-store-shim.development.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Oi;function
|
|
17
|
+
*/var Oi;function V5(){return Oi||(Oi=1,process.env.NODE_ENV!=="production"&&function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function t(f,h){d||r.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var j=h();if(!p){var y=h();i(j,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}y=l({inst:{value:j,getSnapshot:h}});var S=y[0].inst,b=y[1];return a(function(){S.value=j,S.getSnapshot=h,n(S)&&b({inst:S})},[f,j,h]),c(function(){return n(S)&&b({inst:S}),f(function(){n(S)&&b({inst:S})})},[f]),x(j),j}function n(f){var h=f.getSnapshot;f=f.value;try{var j=h();return!i(f,j)}catch{return!0}}function s(f,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=g,i=typeof Object.is=="function"?Object.is:e,l=r.useState,c=r.useEffect,a=r.useLayoutEffect,x=r.useDebugValue,d=!1,p=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;bo.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),bo}var Vi;function Ja(){return Vi||(Vi=1,process.env.NODE_ENV==="production"?es.exports=O5():es.exports=V5()),es.exports}/**
|
|
18
18
|
* @license React
|
|
19
19
|
* use-sync-external-store-shim/with-selector.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Fi;function
|
|
25
|
+
*/var Fi;function F5(){if(Fi)return Co;Fi=1;var e=g,t=Ja();function n(x,d){return x===d&&(x!==0||1/x===1/d)||x!==x&&d!==d}var s=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,c=e.useMemo,a=e.useDebugValue;return Co.useSyncExternalStoreWithSelector=function(x,d,p,m,f){var h=i(null);if(h.current===null){var j={hasValue:!1,value:null};h.current=j}else j=h.current;h=c(function(){function S(T){if(!b){if(b=!0,E=T,T=m(T),f!==void 0&&j.hasValue){var P=j.value;if(f(P,T))return C=P}return C=T}if(P=C,s(E,T))return P;var O=m(T);return f!==void 0&&f(P,O)?(E=T,P):(E=T,C=O)}var b=!1,E,C,L=p===void 0?null:p;return[function(){return S(d())},L===null?void 0:function(){return S(L())}]},[d,p,m,f]);var y=r(x,h[0],h[1]);return l(function(){j.hasValue=!0,j.value=y},[y]),a(y),y},Co}var vo={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* use-sync-external-store-shim/with-selector.development.js
|
|
28
28
|
*
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Hi;function
|
|
33
|
+
*/var Hi;function H5(){return Hi||(Hi=1,process.env.NODE_ENV!=="production"&&function(){function e(x,d){return x===d&&(x!==0||1/x===1/d)||x!==x&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=g,n=Ja(),s=typeof Object.is=="function"?Object.is:e,r=n.useSyncExternalStore,i=t.useRef,l=t.useEffect,c=t.useMemo,a=t.useDebugValue;vo.useSyncExternalStoreWithSelector=function(x,d,p,m,f){var h=i(null);if(h.current===null){var j={hasValue:!1,value:null};h.current=j}else j=h.current;h=c(function(){function S(T){if(!b){if(b=!0,E=T,T=m(T),f!==void 0&&j.hasValue){var P=j.value;if(f(P,T))return C=P}return C=T}if(P=C,s(E,T))return P;var O=m(T);return f!==void 0&&f(P,O)?(E=T,P):(E=T,C=O)}var b=!1,E,C,L=p===void 0?null:p;return[function(){return S(d())},L===null?void 0:function(){return S(L())}]},[d,p,m,f]);var y=r(x,h[0],h[1]);return l(function(){j.hasValue=!0,j.value=y},[y]),a(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),vo}var Zi;function Z5(){return Zi||(Zi=1,process.env.NODE_ENV==="production"?Qn.exports=F5():Qn.exports=H5()),Qn.exports}var W5=Z5();const Y5=Pf.getDefaultExportFromCjs(W5),G5={},Wi=e=>{let t;const n=new Set,s=(d,p)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const f=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(h=>h(t,f))}},r=()=>t,a={setState:s,getState:r,getInitialState:()=>x,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(G5?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},x=t=e(s,r,a);return a},K5=e=>e?Wi(e):Wi,{useDebugValue:q5}=g,{useSyncExternalStoreWithSelector:X5}=Y5,U5=e=>e;function Qa(e,t=U5,n){const s=X5(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return q5(s),s}const Yi=(e,t)=>{const n=K5(e),s=(r,i=t)=>Qa(n,r,i);return Object.assign(s,n),s},J5=(e,t)=>e?Yi(e,t):Yi;function Te(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[s,r]of e)if(!Object.is(r,t.get(s)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const s of n)if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1;return!0}const Js=g.createContext(null),Q5=Js.Provider,eu=Be.error001();function Se(e,t){const n=g.useContext(Js);if(n===null)throw new Error(eu);return Qa(n,e,t)}function Pe(){const e=g.useContext(Js);if(e===null)throw new Error(eu);return g.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Gi={display:"none"},eE={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},tu="react-flow__node-desc",nu="react-flow__edge-desc",tE="react-flow__aria-live",nE=e=>e.ariaLiveMessage;function sE({rfId:e}){const t=Se(nE);return o.jsxRuntimeExports.jsx("div",{id:`${tE}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:eE,children:t})}function oE({rfId:e,disableKeyboardA11y:t}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{id:`${tu}-${e}`,style:Gi,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),o.jsxRuntimeExports.jsx("div",{id:`${nu}-${e}`,style:Gi,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&o.jsxRuntimeExports.jsx(sE,{rfId:e})]})}const rE=e=>e.userSelectionActive?"none":"all",Qs=g.forwardRef(({position:e="top-left",children:t,className:n,style:s,...r},i)=>{const l=Se(rE),c=`${e}`.split("-");return o.jsxRuntimeExports.jsx("div",{className:Ae(["react-flow__panel",n,...c]),style:{...s,pointerEvents:l},ref:i,...r,children:t})});Qs.displayName="Panel";function iE({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:o.jsxRuntimeExports.jsx(Qs,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:o.jsxRuntimeExports.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const lE=e=>{const t=[],n=[];for(const[,s]of e.nodeLookup)s.selected&&t.push(s.internals.userNode);for(const[,s]of e.edgeLookup)s.selected&&n.push(s);return{selectedNodes:t,selectedEdges:n}},ts=e=>e.id;function cE(e,t){return Te(e.selectedNodes.map(ts),t.selectedNodes.map(ts))&&Te(e.selectedEdges.map(ts),t.selectedEdges.map(ts))}function aE({onSelectionChange:e}){const t=Pe(),{selectedNodes:n,selectedEdges:s}=Se(lE,cE);return g.useEffect(()=>{const r={nodes:n,edges:s};e==null||e(r),t.getState().onSelectionChangeHandlers.forEach(i=>i(r))},[n,s,e]),null}const uE=e=>!!e.onSelectionChangeHandlers;function xE({onSelectionChange:e}){const t=Se(uE);return e||t?o.jsxRuntimeExports.jsx(aE,{onSelectionChange:e}):null}const su=[0,0],dE={x:0,y:0,zoom:1},pE=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance"],Ki=[...pE,"rfId"],mE=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),qi={translateExtent:Ln,nodeOrigin:su,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function fE(e){const{setNodes:t,setEdges:n,setMinZoom:s,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:l,reset:c,setDefaultNodesAndEdges:a,setPaneClickDistance:x}=Se(mE,Te),d=Pe();g.useEffect(()=>(a(e.defaultNodes,e.defaultEdges),()=>{p.current=qi,c()}),[]);const p=g.useRef(qi);return g.useEffect(()=>{for(const m of Ki){const f=e[m],h=p.current[m];f!==h&&(typeof e[m]>"u"||(m==="nodes"?t(f):m==="edges"?n(f):m==="minZoom"?s(f):m==="maxZoom"?r(f):m==="translateExtent"?i(f):m==="nodeExtent"?l(f):m==="paneClickDistance"?x(f):m==="fitView"?d.setState({fitViewQueued:f}):m==="fitViewOptions"?d.setState({fitViewOptions:f}):d.setState({[m]:f})))}p.current=e},Ki.map(m=>e[m])),null}function Xi(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function hE(e){var s;const[t,n]=g.useState(e==="system"?null:e);return g.useEffect(()=>{if(e!=="system"){n(e);return}const r=Xi(),i=()=>n(r!=null&&r.matches?"dark":"light");return i(),r==null||r.addEventListener("change",i),()=>{r==null||r.removeEventListener("change",i)}},[e]),t!==null?t:(s=Xi())!=null&&s.matches?"dark":"light"}const Ui=typeof document<"u"?document:null;function $n(e=null,t={target:Ui,actInsideInputWithModifier:!0}){const[n,s]=g.useState(!1),r=g.useRef(!1),i=g.useRef(new Set([])),[l,c]=g.useMemo(()=>{if(e!==null){const x=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
34
34
|
`).replace(`
|
|
35
35
|
|
|
36
36
|
`,`
|
|
37
37
|
+`).split(`
|
|
38
|
-
`)),d=x.reduce((p,m)=>p.concat(...m),[]);return[x,d]}return[[],[]]},[e]);return g.useEffect(()=>{const a=(t==null?void 0:t.target)||Ui;if(e!==null){const x=m=>{var j,y;if(r.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!r.current||r.current&&!t.actInsideInputWithModifier)&&Ta(m))return!1;const h=Qi(m.code,c);if(i.current.add(m[h]),Ji(l,i.current,!1)){const S=((y=(j=m.composedPath)==null?void 0:j.call(m))==null?void 0:y[0])||m.target,w=(S==null?void 0:S.nodeName)==="BUTTON"||(S==null?void 0:S.nodeName)==="A";t.preventDefault!==!1&&(r.current||!w)&&m.preventDefault(),s(!0)}},d=m=>{const f=Qi(m.code,c);Ji(l,i.current,!0)?(s(!1),i.current.clear()):i.current.delete(m[f]),m.key==="Meta"&&i.current.clear(),r.current=!1},p=()=>{i.current.clear(),s(!1)};return a==null||a.addEventListener("keydown",x),a==null||a.addEventListener("keyup",d),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{a==null||a.removeEventListener("keydown",x),a==null||a.removeEventListener("keyup",d),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,s]),n}function Ji(e,t,n){return e.filter(s=>n||s.length===t.size).some(s=>s.every(r=>t.has(r)))}function Qi(e,t){return t.includes(e)?"code":"key"}const hE=()=>{const e=Le();return g.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[s,r,i],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??s,y:t.y??r,zoom:t.zoom??i},{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,s]=e.getState().transform;return{x:t,y:n,zoom:s}},setCenter:async(t,n,s)=>{const{width:r,height:i,maxZoom:l,panZoom:c}=e.getState(),a=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:l,x=r/2-t*a,d=i/2-n*a;return c?(await c.setViewport({x,y:d,zoom:a},{duration:s==null?void 0:s.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:s,height:r,minZoom:i,maxZoom:l,panZoom:c}=e.getState(),a=Lr(t,s,r,i,l,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(a,{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:s,snapGrid:r,snapToGrid:i,domNode:l}=e.getState();if(!l)return t;const{x:c,y:a}=l.getBoundingClientRect(),x={x:t.x-c,y:t.y-a},d=n.snapGrid??r,p=n.snapToGrid??i;return Hn(x,s,p,d)},flowToScreenPosition:t=>{const{transform:n,domNode:s}=e.getState();if(!s)return t;const{x:r,y:i}=s.getBoundingClientRect(),l=Ms(t,n);return{x:l.x+r,y:l.y+i}}}),[])};function su(e,t){const n=[],s=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")s.set(i.id,[i]);else{const l=s.get(i.id);l?l.push(i):s.set(i.id,[i])}for(const i of t){const l=s.get(i.id);if(!l){n.push(i);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const c={...i};for(const a of l)gE(a,c);n.push(c)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function gE(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height)),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function ou(e,t){return su(e,t)}function ru(e,t){return su(e,t)}function $t(e,t){return{id:e,type:"select",selected:t}}function Ut(e,t=new Set,n=!1){const s=[];for(const[r,i]of e){const l=t.has(r);!(i.selected===void 0&&!l)&&i.selected!==l&&(n&&(i.selected=l),s.push($t(i.id,l)))}return s}function el({items:e=[],lookup:t}){var r;const n=[],s=new Map(e.map(i=>[i.id,i]));for(const[i,l]of e.entries()){const c=t.get(l.id),a=((r=c==null?void 0:c.internals)==null?void 0:r.userNode)??c;a!==void 0&&a!==l&&n.push({id:l.id,item:l,type:"replace"}),a===void 0&&n.push({item:l,type:"add",index:i})}for(const[i]of t)s.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function tl(e){return{id:e.id,type:"remove"}}const nl=e=>Yj(e),jE=e=>ba(e);function iu(e){return g.forwardRef(e)}const EE=typeof window<"u"?g.useLayoutEffect:g.useEffect;function sl(e){const[t,n]=g.useState(BigInt(0)),[s]=g.useState(()=>yE(()=>n(r=>r+BigInt(1))));return EE(()=>{const r=s.get();r.length&&(e(r),s.reset())},[t]),s}function yE(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const lu=g.createContext(null);function SE({children:e}){const t=Le(),n=g.useCallback(c=>{const{nodes:a=[],setNodes:x,hasDefaultNodes:d,onNodesChange:p,nodeLookup:m,fitViewQueued:f}=t.getState();let h=a;for(const j of c)h=typeof j=="function"?j(h):j;if(d)x(h);else{const j=el({items:h,lookup:m});j.length>0?p==null||p(j):f&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:S,setNodes:w}=t.getState();y&&w(S)})}},[]),s=sl(n),r=g.useCallback(c=>{const{edges:a=[],setEdges:x,hasDefaultEdges:d,onEdgesChange:p,edgeLookup:m}=t.getState();let f=a;for(const h of c)f=typeof h=="function"?h(f):h;d?x(f):p&&p(el({items:f,lookup:m}))},[]),i=sl(r),l=g.useMemo(()=>({nodeQueue:s,edgeQueue:i}),[]);return o.jsxRuntimeExports.jsx(lu.Provider,{value:l,children:e})}function RE(){const e=g.useContext(lu);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const CE=e=>!!e.panZoom;function Ht(){const e=hE(),t=Le(),n=RE(),s=Re(CE),r=g.useMemo(()=>{const i=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},a=p=>{var S,w;const{nodeLookup:m,nodeOrigin:f}=t.getState(),h=nl(p)?p:m.get(p.id),j=h.parentId?La(h.position,h.measured,h.parentId,m,f):h.position,y={...h,position:j,width:((S=h.measured)==null?void 0:S.width)??h.width,height:((w=h.measured)==null?void 0:w.height)??h.height};return rn(y)},x=(p,m,f={replace:!1})=>{l(h=>h.map(j=>{if(j.id===p){const y=typeof m=="function"?m(j):m;return f.replace&&nl(y)?y:{...j,...y}}return j}))},d=(p,m,f={replace:!1})=>{c(h=>h.map(j=>{if(j.id===p){const y=typeof m=="function"?m(j):m;return f.replace&&jE(y)?y:{...j,...y}}return j}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var m;return(m=i(p))==null?void 0:m.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(m=>({...m}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:l,setEdges:c,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(f=>[...f,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(f=>[...f,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:f}=t.getState(),[h,j,y]=f;return{nodes:p.map(S=>({...S})),edges:m.map(S=>({...S})),viewport:{x:h,y:j,zoom:y}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:f,edges:h,onNodesDelete:j,onEdgesDelete:y,triggerNodeChanges:S,triggerEdgeChanges:w,onDelete:E,onBeforeDelete:C}=t.getState(),{nodes:N,edges:T}=await Uj({nodesToRemove:p,edgesToRemove:m,nodes:f,edges:h,onBeforeDelete:C}),P=T.length>0,D=N.length>0;if(P){const I=T.map(tl);y==null||y(T),w(I)}if(D){const I=N.map(tl);j==null||j(N),S(I)}return(D||P)&&(E==null||E({nodes:N,edges:T})),{deletedNodes:N,deletedEdges:T}},getIntersectingNodes:(p,m=!0,f)=>{const h=ki(p),j=h?p:a(p),y=f!==void 0;return j?(f||t.getState().nodes).filter(S=>{const w=t.getState().nodeLookup.get(S.id);if(w&&!h&&(S.id===p.id||!w.internals.positionAbsolute))return!1;const E=rn(y?S:w),C=Tn(E,j);return m&&C>0||C>=j.width*j.height}):[]},isNodeIntersecting:(p,m,f=!0)=>{const j=ki(p)?p:a(p);if(!j)return!1;const y=Tn(j,m);return f&&y>0||y>=j.width*j.height},updateNode:x,updateNodeData:(p,m,f={replace:!1})=>{x(p,h=>{const j=typeof m=="function"?m(h):m;return f.replace?{...h,data:j}:{...h,data:{...h.data,...j}}},f)},updateEdge:d,updateEdgeData:(p,m,f={replace:!1})=>{d(p,h=>{const j=typeof m=="function"?m(h):m;return f.replace?{...h,data:j}:{...h,data:{...h.data,...j}}},f)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:f}=t.getState();return Gj(p,{nodeLookup:m,nodeOrigin:f})},getHandleConnections:({type:p,id:m,nodeId:f})=>{var h;return Array.from(((h=t.getState().connectionLookup.get(`${f}-${p}${m?`-${m}`:""}`))==null?void 0:h.values())??[])},getNodeConnections:({type:p,handleId:m,nodeId:f})=>{var h;return Array.from(((h=t.getState().connectionLookup.get(`${f}${p?m?`-${p}-${m}`:`-${p}`:""}`))==null?void 0:h.values())??[])},fitView:async p=>{const m=t.getState().fitViewResolver??Promise.withResolvers();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(f=>[...f]),m.promise}}},[]);return g.useMemo(()=>({...r,...e,viewportInitialized:s}),[s])}const ol=e=>e.selected,bE={actInsideInputWithModifier:!1},wE=typeof window<"u"?window:void 0;function vE({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Le(),{deleteElements:s}=Ht(),r=An(e,bE),i=An(t,{target:wE});g.useEffect(()=>{if(r){const{edges:l,nodes:c}=n.getState();s({nodes:c.filter(ol),edges:l.filter(ol)}),n.setState({nodesSelectionActive:!1})}},[r]),g.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function kE(e){const t=Le();g.useEffect(()=>{const n=()=>{var r,i;if(!e.current)return!1;const s=Nr(e.current);(s.height===0||s.width===0)&&((i=(r=t.getState()).onError)==null||i.call(r,"004",Oe.error004())),t.setState({width:s.width||500,height:s.height||500})};if(e.current){n(),window.addEventListener("resize",n);const s=new ResizeObserver(()=>n());return s.observe(e.current),()=>{window.removeEventListener("resize",n),s&&e.current&&s.unobserve(e.current)}}},[])}const Js={position:"absolute",width:"100%",height:"100%",top:0,left:0},ME=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function _E({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:s=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=It.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:a,translateExtent:x,minZoom:d,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:f=!0,children:h,noWheelClassName:j,noPanClassName:y,onViewportChange:S,isControlledViewport:w,paneClickDistance:E}){const C=Le(),N=g.useRef(null),{userSelectionActive:T,lib:P}=Re(ME,$e),D=An(m),I=g.useRef();kE(N);const z=g.useCallback(F=>{S==null||S({x:F[0],y:F[1],zoom:F[2]}),w||C.setState({transform:F})},[S,w]);return g.useEffect(()=>{if(N.current){I.current=L3({domNode:N.current,minZoom:d,maxZoom:p,translateExtent:x,viewport:a,paneClickDistance:E,onDraggingChange:R=>C.setState({paneDragging:R}),onPanZoomStart:(R,k)=>{const{onViewportChangeStart:v,onMoveStart:_}=C.getState();_==null||_(R,k),v==null||v(k)},onPanZoom:(R,k)=>{const{onViewportChange:v,onMove:_}=C.getState();_==null||_(R,k),v==null||v(k)},onPanZoomEnd:(R,k)=>{const{onViewportChangeEnd:v,onMoveEnd:_}=C.getState();_==null||_(R,k),v==null||v(k)}});const{x:F,y:O,zoom:M}=I.current.getViewport();return C.setState({panZoom:I.current,transform:[F,O,M],domNode:N.current.closest(".react-flow")}),()=>{var R;(R=I.current)==null||R.destroy()}}},[]),g.useEffect(()=>{var F;(F=I.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:s,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:l,panOnDrag:c,zoomActivationKeyPressed:D,preventScrolling:f,noPanClassName:y,userSelectionActive:T,noWheelClassName:j,lib:P,onTransformChange:z})},[e,t,n,s,r,i,l,c,D,f,y,T,j,P,z]),o.jsxRuntimeExports.jsx("div",{className:"react-flow__renderer",ref:N,style:Js,children:h})}const PE=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function LE(){const{userSelectionActive:e,userSelectionRect:t}=Re(PE,$e);return e&&t?o.jsxRuntimeExports.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const vo=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},NE=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function TE({isSelecting:e,selectionKeyPressed:t,selectionMode:n=sn.Full,panOnDrag:s,selectionOnDrag:r,onSelectionStart:i,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:a,onPaneScroll:x,onPaneMouseEnter:d,onPaneMouseMove:p,onPaneMouseLeave:m,children:f}){const h=Le(),{userSelectionActive:j,elementsSelectable:y,dragging:S,connectionInProgress:w}=Re(NE,$e),E=y&&(e||j),C=g.useRef(null),N=g.useRef(),T=g.useRef(new Set),P=g.useRef(new Set),D=g.useRef(!1),I=g.useRef(!1),z=_=>{if(D.current||w){D.current=!1;return}c==null||c(_),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},F=_=>{if(Array.isArray(s)&&(s!=null&&s.includes(2))){_.preventDefault();return}a==null||a(_)},O=x?_=>x(_):void 0,M=_=>{var W,ee;const{resetSelectedElements:A,domNode:$}=h.getState();if(N.current=$==null?void 0:$.getBoundingClientRect(),!y||!e||_.button!==0||_.target!==C.current||!N.current)return;(ee=(W=_.target)==null?void 0:W.setPointerCapture)==null||ee.call(W,_.pointerId),I.current=!0,D.current=!1;const{x:V,y:H}=dt(_.nativeEvent,N.current);A(),h.setState({userSelectionRect:{width:0,height:0,startX:V,startY:H,x:V,y:H}}),i==null||i(_)},R=_=>{const{userSelectionRect:A,transform:$,nodeLookup:V,edgeLookup:H,connectionLookup:W,triggerNodeChanges:ee,triggerEdgeChanges:te,defaultEdgeOptions:se}=h.getState();if(!N.current||!A)return;D.current=!0;const{x:oe,y:J}=dt(_.nativeEvent,N.current),{startX:le,startY:he}=A,Me={startX:le,startY:he,x:oe<le?oe:le,y:J<he?J:he,width:Math.abs(oe-le),height:Math.abs(J-he)},pe=T.current,G=P.current;T.current=new Set(wa(V,Me,$,n===sn.Partial,!0).map(ue=>ue.id)),P.current=new Set;const ae=(se==null?void 0:se.selectable)??!0;for(const ue of T.current){const Pe=W.get(ue);if(Pe)for(const{edgeId:Be}of Pe.values()){const Gt=H.get(Be);Gt&&(Gt.selectable??ae)&&P.current.add(Be)}}if(!Mi(pe,T.current)){const ue=Ut(V,T.current,!0);ee(ue)}if(!Mi(G,P.current)){const ue=Ut(H,P.current);te(ue)}h.setState({userSelectionRect:Me,userSelectionActive:!0,nodesSelectionActive:!1})},k=_=>{var $,V;if(_.button!==0||!I.current)return;(V=($=_.target)==null?void 0:$.releasePointerCapture)==null||V.call($,_.pointerId);const{userSelectionRect:A}=h.getState();!j&&A&&_.target===C.current&&(z==null||z(_)),h.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:T.current.size>0}),l==null||l(_),(t||r)&&(D.current=!1),I.current=!1},v=s===!0||Array.isArray(s)&&s.includes(0);return o.jsxRuntimeExports.jsxs("div",{className:Ie(["react-flow__pane",{draggable:v,dragging:S,selection:e}]),onClick:E?void 0:vo(z,C),onContextMenu:vo(F,C),onWheel:vo(O,C),onPointerEnter:E?void 0:d,onPointerDown:E?M:p,onPointerMove:E?R:p,onPointerUp:E?k:void 0,onPointerLeave:m,ref:C,style:Js,children:[f,o.jsxRuntimeExports.jsx(LE,{})]})}function qo({id:e,store:t,unselect:n=!1,nodeRef:s}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:l,nodeLookup:c,onError:a}=t.getState(),x=c.get(e);if(!x){a==null||a("012",Oe.error012(e));return}t.setState({nodesSelectionActive:!1}),x.selected?(n||x.selected&&l)&&(i({nodes:[x],edges:[]}),requestAnimationFrame(()=>{var d;return(d=s==null?void 0:s.current)==null?void 0:d.blur()})):r([e])}function cu({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:s,nodeId:r,isSelectable:i,nodeClickDistance:l}){const c=Le(),[a,x]=g.useState(!1),d=g.useRef();return g.useEffect(()=>{d.current=g3({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{qo({id:p,store:c,nodeRef:e})},onDragStart:()=>{x(!0)},onDragStop:()=>{x(!1)}})},[]),g.useEffect(()=>{var p,m;if(t)(p=d.current)==null||p.destroy();else if(e.current)return(m=d.current)==null||m.update({noDragClassName:n,handleSelector:s,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:l}),()=>{var f;(f=d.current)==null||f.destroy()}},[n,s,t,i,e,r]),a}const $E=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function au(){const e=Le();return g.useCallback(n=>{const{nodeExtent:s,snapToGrid:r,snapGrid:i,nodesDraggable:l,onError:c,updateNodePositions:a,nodeLookup:x,nodeOrigin:d}=e.getState(),p=new Map,m=$E(l),f=r?i[0]:5,h=r?i[1]:5,j=n.direction.x*f*n.factor,y=n.direction.y*h*n.factor;for(const[,S]of x){if(!m(S))continue;let w={x:S.internals.positionAbsolute.x+j,y:S.internals.positionAbsolute.y+y};r&&(w=Ks(w,i));const{position:E,positionAbsolute:C}=va({nodeId:S.id,nextPosition:w,nodeLookup:x,nodeExtent:s,nodeOrigin:d,onError:c});S.position=E,S.internals.positionAbsolute=C,p.set(S.id,S)}a(p)},[])}const zr=g.createContext(null),AE=zr.Provider;zr.Consumer;const uu=()=>g.useContext(zr),IE=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),zE=(e,t,n)=>s=>{const{connectionClickStartHandle:r,connectionMode:i,connection:l}=s,{fromHandle:c,toHandle:a,isValid:x}=l,d=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:d,clickConnecting:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,isPossibleEndHandle:i===Vt.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!r,valid:d&&x}};function BE({type:e="source",position:t=U.Top,isValidConnection:n,isConnectable:s=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:l,onConnect:c,children:a,className:x,onMouseDown:d,onTouchStart:p,...m},f){var k,v;const h=l||null,j=e==="target",y=Le(),S=uu(),{connectOnClick:w,noPanClassName:E,rfId:C}=Re(IE,$e),{connectingFrom:N,connectingTo:T,clickConnecting:P,isPossibleEndHandle:D,connectionInProcess:I,clickConnectionInProcess:z,valid:F}=Re(zE(S,h,e),$e);S||(v=(k=y.getState()).onError)==null||v.call(k,"010",Oe.error010());const O=_=>{const{defaultEdgeOptions:A,onConnect:$,hasDefaultEdges:V}=y.getState(),H={...A,..._};if(V){const{edges:W,setEdges:ee}=y.getState();ee(Da(H,W))}$==null||$(H),c==null||c(H)},M=_=>{if(!S)return;const A=$a(_.nativeEvent);if(r&&(A&&_.button===0||!A)){const $=y.getState();Ko.onPointerDown(_.nativeEvent,{autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:j,handleId:h,nodeId:S,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:$.onConnectEnd,updateConnection:$.updateConnection,onConnect:O,isValidConnection:n||$.isValidConnection,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed})}A?d==null||d(_):p==null||p(_)},R=_=>{const{onClickConnectStart:A,onClickConnectEnd:$,connectionClickStartHandle:V,connectionMode:H,isValidConnection:W,lib:ee,rfId:te,nodeLookup:se,connection:oe}=y.getState();if(!S||!V&&!r)return;if(!V){A==null||A(_.nativeEvent,{nodeId:S,handleId:h,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:S,type:e,id:h}});return}const J=Na(_.target),le=n||W,{connection:he,isValid:Me}=Ko.isValid(_.nativeEvent,{handle:{nodeId:S,id:h,type:e},connectionMode:H,fromNodeId:V.nodeId,fromHandleId:V.id||null,fromType:V.type,isValidConnection:le,flowId:te,doc:J,lib:ee,nodeLookup:se});Me&&he&&O(he);const pe=structuredClone(oe);delete pe.inProgress,pe.toPosition=pe.toHandle?pe.toHandle.position:null,$==null||$(_,pe),y.setState({connectionClickStartHandle:null})};return o.jsxRuntimeExports.jsx("div",{"data-handleid":h,"data-nodeid":S,"data-handlepos":t,"data-id":`${C}-${S}-${h}-${e}`,className:Ie(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,x,{source:!j,target:j,connectable:s,connectablestart:r,connectableend:i,clickconnecting:P,connectingfrom:N,connectingto:T,valid:F,connectionindicator:s&&(!I||D)&&(I||z?i:r)}]),onMouseDown:M,onTouchStart:M,onClick:w?R:void 0,ref:f,...m,children:a})}const In=g.memo(iu(BE));function DE({data:e,isConnectable:t,sourcePosition:n=U.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e==null?void 0:e.label,o.jsxRuntimeExports.jsx(In,{type:"source",position:n,isConnectable:t})]})}function OE({data:e,isConnectable:t,targetPosition:n=U.Top,sourcePosition:s=U.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(In,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,o.jsxRuntimeExports.jsx(In,{type:"source",position:s,isConnectable:t})]})}function VE(){return null}function FE({data:e,isConnectable:t,targetPosition:n=U.Top}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(In,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ps={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},rl={input:DE,default:OE,output:FE,group:VE};function HE(e){var t,n,s,r;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((s=e.style)==null?void 0:s.width),height:e.height??((r=e.style)==null?void 0:r.height)}}const ZE=e=>{const{width:t,height:n,x:s,y:r}=Fn(e.nodeLookup,{filter:i=>!!i.selected});return{width:Qe(t)?t:null,height:Qe(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${s}px,${r}px)`}};function WE({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const s=Le(),{width:r,height:i,transformString:l,userSelectionActive:c}=Re(ZE,$e),a=au(),x=g.useRef(null);if(g.useEffect(()=>{var m;n||(m=x.current)==null||m.focus({preventScroll:!0})},[n]),cu({nodeRef:x}),c||!r||!i)return null;const d=e?m=>{const f=s.getState().nodes.filter(h=>h.selected);e(m,f)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Ps,m.key)&&(m.preventDefault(),a({direction:Ps[m.key],factor:m.shiftKey?4:1}))};return o.jsxRuntimeExports.jsx("div",{className:Ie(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:o.jsxRuntimeExports.jsx("div",{ref:x,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:r,height:i}})})}const il=typeof window<"u"?window:void 0,YE=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function xu({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:a,selectionKeyCode:x,selectionOnDrag:d,selectionMode:p,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:h,panActivationKeyCode:j,zoomActivationKeyCode:y,elementsSelectable:S,zoomOnScroll:w,zoomOnPinch:E,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:D,defaultViewport:I,translateExtent:z,minZoom:F,maxZoom:O,preventScrolling:M,onSelectionContextMenu:R,noWheelClassName:k,noPanClassName:v,disableKeyboardA11y:_,onViewportChange:A,isControlledViewport:$}){const{nodesSelectionActive:V,userSelectionActive:H}=Re(YE),W=An(x,{target:il}),ee=An(j,{target:il}),te=ee||D,se=ee||C,oe=d&&te!==!0,J=W||H||oe;return vE({deleteKeyCode:a,multiSelectionKeyCode:h}),o.jsxRuntimeExports.jsx(_E,{onPaneContextMenu:i,elementsSelectable:S,zoomOnScroll:w,zoomOnPinch:E,panOnScroll:se,panOnScrollSpeed:N,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:!W&&te,defaultViewport:I,translateExtent:z,minZoom:F,maxZoom:O,zoomActivationKeyCode:y,preventScrolling:M,noWheelClassName:k,noPanClassName:v,onViewportChange:A,isControlledViewport:$,paneClickDistance:c,children:o.jsxRuntimeExports.jsxs(TE,{onSelectionStart:m,onSelectionEnd:f,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,panOnDrag:te,isSelecting:!!J,selectionMode:p,selectionKeyPressed:W,selectionOnDrag:oe,children:[e,V&&o.jsxRuntimeExports.jsx(WE,{onSelectionContextMenu:R,noPanClassName:v,disableKeyboardA11y:_})]})})}xu.displayName="FlowRenderer";const GE=g.memo(xu),KE=e=>t=>e?wa(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function qE(e){return Re(g.useCallback(KE(e),[e]),$e)}const XE=e=>e.updateNodeInternals;function UE(){const e=Re(XE),[t]=g.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const s=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");s.set(i,{id:i,nodeElement:r.target,force:!0})}),e(s)}));return g.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function JE({node:e,nodeType:t,hasDimensions:n,resizeObserver:s}){const r=Le(),i=g.useRef(null),l=g.useRef(null),c=g.useRef(e.sourcePosition),a=g.useRef(e.targetPosition),x=g.useRef(t),d=n&&!!e.internals.handleBounds;return g.useEffect(()=>{i.current&&!e.hidden&&(!d||l.current!==i.current)&&(l.current&&(s==null||s.unobserve(l.current)),s==null||s.observe(i.current),l.current=i.current)},[d,e.hidden]),g.useEffect(()=>()=>{l.current&&(s==null||s.unobserve(l.current),l.current=null)},[]),g.useEffect(()=>{if(i.current){const p=x.current!==t,m=c.current!==e.sourcePosition,f=a.current!==e.targetPosition;(p||m||f)&&(x.current=t,c.current=e.sourcePosition,a.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function QE({id:e,onClick:t,onMouseEnter:n,onMouseMove:s,onMouseLeave:r,onContextMenu:i,onDoubleClick:l,nodesDraggable:c,elementsSelectable:a,nodesConnectable:x,nodesFocusable:d,resizeObserver:p,noDragClassName:m,noPanClassName:f,disableKeyboardA11y:h,rfId:j,nodeTypes:y,nodeClickDistance:S,onError:w}){const{node:E,internals:C,isParent:N}=Re(J=>{const le=J.nodeLookup.get(e),he=J.parentLookup.has(e);return{node:le,internals:le.internals,isParent:he}},$e);let T=E.type||"default",P=(y==null?void 0:y[T])||rl[T];P===void 0&&(w==null||w("003",Oe.error003(T)),T="default",P=rl.default);const D=!!(E.draggable||c&&typeof E.draggable>"u"),I=!!(E.selectable||a&&typeof E.selectable>"u"),z=!!(E.connectable||x&&typeof E.connectable>"u"),F=!!(E.focusable||d&&typeof E.focusable>"u"),O=Le(),M=Pa(E),R=JE({node:E,nodeType:T,hasDimensions:M,resizeObserver:p}),k=cu({nodeRef:R,disabled:E.hidden||!D,noDragClassName:m,handleSelector:E.dragHandle,nodeId:e,isSelectable:I,nodeClickDistance:S}),v=au();if(E.hidden)return null;const _=gt(E),A=HE(E),$=I||D||t||n||s||r,V=n?J=>n(J,{...C.userNode}):void 0,H=s?J=>s(J,{...C.userNode}):void 0,W=r?J=>r(J,{...C.userNode}):void 0,ee=i?J=>i(J,{...C.userNode}):void 0,te=l?J=>l(J,{...C.userNode}):void 0,se=J=>{const{selectNodesOnDrag:le,nodeDragThreshold:he}=O.getState();I&&(!le||!D||he>0)&&qo({id:e,store:O,nodeRef:R}),t&&t(J,{...C.userNode})},oe=J=>{if(!(Ta(J.nativeEvent)||h))if(Sa.includes(J.key)&&I){const le=J.key==="Escape";qo({id:e,store:O,unselect:le,nodeRef:R})}else D&&E.selected&&Object.prototype.hasOwnProperty.call(Ps,J.key)&&(J.preventDefault(),O.setState({ariaLiveMessage:`Moved selected node ${J.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~C.positionAbsolute.x}, y: ${~~C.positionAbsolute.y}`}),v({direction:Ps[J.key],factor:J.shiftKey?4:1}))};return o.jsxRuntimeExports.jsx("div",{className:Ie(["react-flow__node",`react-flow__node-${T}`,{[f]:D},E.className,{selected:E.selected,selectable:I,parent:N,draggable:D,dragging:k}]),ref:R,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:M?"visible":"hidden",...E.style,...A},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:H,onMouseLeave:W,onContextMenu:ee,onClick:se,onDoubleClick:te,onKeyDown:F?oe:void 0,tabIndex:F?0:void 0,role:F?"button":void 0,"aria-describedby":h?void 0:`${eu}-${j}`,"aria-label":E.ariaLabel,children:o.jsxRuntimeExports.jsx(AE,{value:e,children:o.jsxRuntimeExports.jsx(P,{id:e,data:E.data,type:T,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:E.selected??!1,selectable:I,draggable:D,deletable:E.deletable??!0,isConnectable:z,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:k,dragHandle:E.dragHandle,zIndex:C.z,parentId:E.parentId,..._})})})}const e4=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function du(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,onError:i}=Re(e4,$e),l=qE(e.onlyRenderVisibleElements),c=UE();return o.jsxRuntimeExports.jsx("div",{className:"react-flow__nodes",style:Js,children:l.map(a=>o.jsxRuntimeExports.jsx(QE,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}du.displayName="NodeRenderer";const t4=g.memo(du);function n4(e){return Re(g.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const s=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),l=n.nodeLookup.get(r.target);i&&l&&n3({sourceNode:i,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&s.push(r.id)}return s},[e]),$e)}const s4=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),o4=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),ll={[ws.Arrow]:s4,[ws.ArrowClosed]:o4};function r4(e){const t=Le();return g.useMemo(()=>{var r,i;return Object.prototype.hasOwnProperty.call(ll,e)?ll[e]:((i=(r=t.getState()).onError)==null||i.call(r,"009",Oe.error009(e)),null)},[e])}const i4=({id:e,type:t,color:n,width:s=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const a=r4(t);return a?o.jsxRuntimeExports.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:c,refX:"0",refY:"0",children:o.jsxRuntimeExports.jsx(a,{color:n,strokeWidth:l})}):null},pu=({defaultColor:e,rfId:t})=>{const n=Re(i=>i.edges),s=Re(i=>i.defaultEdgeOptions),r=g.useMemo(()=>a3(n,{id:t,defaultColor:e,defaultMarkerStart:s==null?void 0:s.markerStart,defaultMarkerEnd:s==null?void 0:s.markerEnd}),[n,s,t,e]);return r.length?o.jsxRuntimeExports.jsx("svg",{className:"react-flow__marker",children:o.jsxRuntimeExports.jsx("defs",{children:r.map(i=>o.jsxRuntimeExports.jsx(i4,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};pu.displayName="MarkerDefinitions";var l4=g.memo(pu);function mu({x:e,y:t,label:n,labelStyle:s,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:a,className:x,...d}){const[p,m]=g.useState({x:1,y:0,width:0,height:0}),f=Ie(["react-flow__edge-textwrapper",x]),h=g.useRef(null);return g.useEffect(()=>{if(h.current){const j=h.current.getBBox();m({x:j.x,y:j.y,width:j.width,height:j.height})}},[n]),n?o.jsxRuntimeExports.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:f,visibility:p.width?"visible":"hidden",...d,children:[r&&o.jsxRuntimeExports.jsx("rect",{width:p.width+2*l[0],x:-l[0],y:-l[1],height:p.height+2*l[1],className:"react-flow__edge-textbg",style:i,rx:c,ry:c}),o.jsxRuntimeExports.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:h,style:s,children:n}),a]}):null}mu.displayName="EdgeText";const c4=g.memo(mu);function et({path:e,labelX:t,labelY:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:a,interactionWidth:x=20,...d}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{...d,d:e,fill:"none",className:Ie(["react-flow__edge-path",d.className])}),x&&o.jsxRuntimeExports.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:x,className:"react-flow__edge-interaction"}),s&&Qe(t)&&Qe(n)?o.jsxRuntimeExports.jsx(c4,{x:t,y:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:a}):null]})}function cl({pos:e,x1:t,y1:n,x2:s,y2:r}){return e===U.Left||e===U.Right?[.5*(t+s),n]:[t,.5*(n+r)]}function fu({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top}){const[l,c]=cl({pos:n,x1:e,y1:t,x2:s,y2:r}),[a,x]=cl({pos:i,x1:s,y1:r,x2:e,y2:t}),[d,p,m,f]=Aa({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:a,targetControlY:x});return[`M${e},${t} C${l},${c} ${a},${x} ${s},${r}`,d,p,m,f]}function hu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l,targetPosition:c,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:S})=>{const[w,E,C]=fu({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:c}),N=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(et,{id:N,path:w,labelX:E,labelY:C,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:S})})}const a4=hu({isInternal:!1}),gu=hu({isInternal:!0});a4.displayName="SimpleBezierEdge";gu.displayName="SimpleBezierEdgeInternal";function ju(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,sourcePosition:f=U.Bottom,targetPosition:h=U.Top,markerEnd:j,markerStart:y,pathOptions:S,interactionWidth:w})=>{const[E,C,N]=Wo({sourceX:n,sourceY:s,sourcePosition:f,targetX:r,targetY:i,targetPosition:h,borderRadius:S==null?void 0:S.borderRadius,offset:S==null?void 0:S.offset}),T=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(et,{id:T,path:E,labelX:C,labelY:N,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:j,markerStart:y,interactionWidth:w})})}const Eu=ju({isInternal:!1}),yu=ju({isInternal:!0});Eu.displayName="SmoothStepEdge";yu.displayName="SmoothStepEdgeInternal";function Su(e){return g.memo(({id:t,...n})=>{var r;const s=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Eu,{...n,id:s,pathOptions:g.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const u4=Su({isInternal:!1}),Ru=Su({isInternal:!0});u4.displayName="StepEdge";Ru.displayName="StepEdgeInternal";function Cu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:f,markerStart:h,interactionWidth:j})=>{const[y,S,w]=Oa({sourceX:n,sourceY:s,targetX:r,targetY:i}),E=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(et,{id:E,path:y,labelX:S,labelY:w,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:f,markerStart:h,interactionWidth:j})})}const x4=Cu({isInternal:!1}),bu=Cu({isInternal:!0});x4.displayName="StraightEdge";bu.displayName="StraightEdgeInternal";function wu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l=U.Bottom,targetPosition:c=U.Top,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,pathOptions:S,interactionWidth:w})=>{const[E,C,N]=Ia({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:c,curvature:S==null?void 0:S.curvature}),T=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(et,{id:T,path:E,labelX:C,labelY:N,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:w})})}const d4=wu({isInternal:!1}),vu=wu({isInternal:!0});d4.displayName="BezierEdge";vu.displayName="BezierEdgeInternal";const al={default:vu,straight:bu,step:Ru,smoothstep:yu,simplebezier:gu},ul={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},p4=(e,t,n)=>n===U.Left?e-t:n===U.Right?e+t:e,m4=(e,t,n)=>n===U.Top?e-t:n===U.Bottom?e+t:e,xl="react-flow__edgeupdater";function dl({position:e,centerX:t,centerY:n,radius:s=10,onMouseDown:r,onMouseEnter:i,onMouseOut:l,type:c}){return o.jsxRuntimeExports.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:l,className:Ie([xl,`${xl}-${c}`]),cx:p4(t,s,e),cy:m4(n,s,e),r:s,stroke:"transparent",fill:"transparent"})}function f4({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:s,sourceY:r,targetX:i,targetY:l,sourcePosition:c,targetPosition:a,onReconnect:x,onReconnectStart:d,onReconnectEnd:p,setReconnecting:m,setUpdateHover:f}){const h=Le(),j=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:T,domNode:P,isValidConnection:D,connectionMode:I,connectionRadius:z,lib:F,onConnectStart:O,onConnectEnd:M,cancelConnection:R,nodeLookup:k,rfId:v,panBy:_,updateConnection:A}=h.getState(),$=N.type==="target";m(!0),d==null||d(C,n,N.type);const V=(W,ee)=>{m(!1),p==null||p(W,n,N.type,ee)},H=W=>x==null?void 0:x(n,W);Ko.onPointerDown(C.nativeEvent,{autoPanOnConnect:T,connectionMode:I,connectionRadius:z,domNode:P,handleId:N.id,nodeId:N.nodeId,nodeLookup:k,isTarget:$,edgeUpdaterType:N.type,lib:F,flowId:v,cancelConnection:R,panBy:_,isValidConnection:D,onConnect:H,onConnectStart:O,onConnectEnd:M,onReconnectEnd:V,updateConnection:A,getTransform:()=>h.getState().transform,getFromHandle:()=>h.getState().connection.fromHandle})},y=C=>j(C,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=C=>j(C,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),w=()=>f(!0),E=()=>f(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(e===!0||e==="source")&&o.jsxRuntimeExports.jsx(dl,{position:c,centerX:s,centerY:r,radius:t,onMouseDown:y,onMouseEnter:w,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&o.jsxRuntimeExports.jsx(dl,{position:a,centerX:i,centerY:l,radius:t,onMouseDown:S,onMouseEnter:w,onMouseOut:E,type:"target"})]})}function h4({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:s,onClick:r,onDoubleClick:i,onContextMenu:l,onMouseEnter:c,onMouseMove:a,onMouseLeave:x,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:f,rfId:h,edgeTypes:j,noPanClassName:y,onError:S,disableKeyboardA11y:w}){let E=Re(G=>G.edgeLookup.get(e));const C=Re(G=>G.defaultEdgeOptions);E=C?{...C,...E}:E;let N=E.type||"default",T=(j==null?void 0:j[N])||al[N];T===void 0&&(S==null||S("011",Oe.error011(N)),N="default",T=al.default);const P=!!(E.focusable||t&&typeof E.focusable>"u"),D=typeof p<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),I=!!(E.selectable||s&&typeof E.selectable>"u"),z=g.useRef(null),[F,O]=g.useState(!1),[M,R]=g.useState(!1),k=Le(),{zIndex:v,sourceX:_,sourceY:A,targetX:$,targetY:V,sourcePosition:H,targetPosition:W}=Re(g.useCallback(G=>{const ae=G.nodeLookup.get(E.source),ue=G.nodeLookup.get(E.target);if(!ae||!ue)return{zIndex:E.zIndex,...ul};const Pe=c3({id:e,sourceNode:ae,targetNode:ue,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:G.connectionMode,onError:S});return{zIndex:t3({selected:E.selected,zIndex:E.zIndex,sourceNode:ae,targetNode:ue,elevateOnSelect:G.elevateEdgesOnSelect}),...Pe||ul}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),$e),ee=g.useMemo(()=>E.markerStart?`url('#${Yo(E.markerStart,h)}')`:void 0,[E.markerStart,h]),te=g.useMemo(()=>E.markerEnd?`url('#${Yo(E.markerEnd,h)}')`:void 0,[E.markerEnd,h]);if(E.hidden||_===null||A===null||$===null||V===null)return null;const se=G=>{var Be;const{addSelectedEdges:ae,unselectNodesAndEdges:ue,multiSelectionActive:Pe}=k.getState();I&&(k.setState({nodesSelectionActive:!1}),E.selected&&Pe?(ue({nodes:[],edges:[E]}),(Be=z.current)==null||Be.blur()):ae([e])),r&&r(G,E)},oe=i?G=>{i(G,{...E})}:void 0,J=l?G=>{l(G,{...E})}:void 0,le=c?G=>{c(G,{...E})}:void 0,he=a?G=>{a(G,{...E})}:void 0,Me=x?G=>{x(G,{...E})}:void 0,pe=G=>{var ae;if(!w&&Sa.includes(G.key)&&I){const{unselectNodesAndEdges:ue,addSelectedEdges:Pe}=k.getState();G.key==="Escape"?((ae=z.current)==null||ae.blur(),ue({edges:[E]})):Pe([e])}};return o.jsxRuntimeExports.jsx("svg",{style:{zIndex:v},children:o.jsxRuntimeExports.jsxs("g",{className:Ie(["react-flow__edge",`react-flow__edge-${N}`,E.className,y,{selected:E.selected,animated:E.animated,inactive:!I&&!r,updating:F,selectable:I}]),onClick:se,onDoubleClick:oe,onContextMenu:J,onMouseEnter:le,onMouseMove:he,onMouseLeave:Me,onKeyDown:P?pe:void 0,tabIndex:P?0:void 0,role:P?"button":"img","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":P?`${tu}-${h}`:void 0,ref:z,children:[!M&&o.jsxRuntimeExports.jsx(T,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:I,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:_,sourceY:A,targetX:$,targetY:V,sourcePosition:H,targetPosition:W,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:ee,markerEnd:te,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),D&&o.jsxRuntimeExports.jsx(f4,{edge:E,isReconnectable:D,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:f,sourceX:_,sourceY:A,targetX:$,targetY:V,sourcePosition:H,targetPosition:W,setUpdateHover:O,setReconnecting:R})]})})}const g4=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function ku({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:s,noPanClassName:r,onReconnect:i,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:a,onEdgeMouseLeave:x,onEdgeClick:d,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:f,onReconnectEnd:h,disableKeyboardA11y:j}){const{edgesFocusable:y,edgesReconnectable:S,elementsSelectable:w,onError:E}=Re(g4,$e),C=n4(t);return o.jsxRuntimeExports.jsxs("div",{className:"react-flow__edges",children:[o.jsxRuntimeExports.jsx(l4,{defaultColor:e,rfId:n}),C.map(N=>o.jsxRuntimeExports.jsx(h4,{id:N,edgesFocusable:y,edgesReconnectable:S,elementsSelectable:w,noPanClassName:r,onReconnect:i,onContextMenu:l,onMouseEnter:c,onMouseMove:a,onMouseLeave:x,onClick:d,reconnectRadius:p,onDoubleClick:m,onReconnectStart:f,onReconnectEnd:h,rfId:n,onError:E,edgeTypes:s,disableKeyboardA11y:j},N))]})}ku.displayName="EdgeRenderer";const j4=g.memo(ku),E4=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function y4({children:e}){const t=Re(E4);return o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function S4(e){const t=Ht(),n=g.useRef(!1);g.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const R4=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function C4(e){const t=Re(R4),n=Le();return g.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function b4(e){return e.connection.inProgress?{...e.connection,to:Hn(e.connection.to,e.transform)}:{...e.connection}}function w4(e){return b4}function v4(e){const t=w4();return Re(t,$e)}const k4=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function M4({containerStyle:e,style:t,type:n,component:s}){const{nodesConnectable:r,width:i,height:l,isValid:c,inProgress:a}=Re(k4,$e);return!(i&&r&&a)?null:o.jsxRuntimeExports.jsx("svg",{style:e,width:i,height:l,className:"react-flow__connectionline react-flow__container",children:o.jsxRuntimeExports.jsx("g",{className:Ie(["react-flow__connection",Ca(c)]),children:o.jsxRuntimeExports.jsx(Mu,{style:t,type:n,CustomComponent:s,isValid:c})})})}const Mu=({style:e,type:t=Rt.Bezier,CustomComponent:n,isValid:s})=>{const{inProgress:r,from:i,fromNode:l,fromHandle:c,fromPosition:a,to:x,toNode:d,toHandle:p,toPosition:m}=v4();if(!r)return;if(n)return o.jsxRuntimeExports.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:c,fromX:i.x,fromY:i.y,toX:x.x,toY:x.y,fromPosition:a,toPosition:m,connectionStatus:Ca(s),toNode:d,toHandle:p});let f="";const h={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:x.x,targetY:x.y,targetPosition:m};switch(t){case Rt.Bezier:[f]=Ia(h);break;case Rt.SimpleBezier:[f]=fu(h);break;case Rt.Step:[f]=Wo({...h,borderRadius:0});break;case Rt.SmoothStep:[f]=Wo(h);break;default:[f]=Oa(h)}return o.jsxRuntimeExports.jsx("path",{d:f,fill:"none",className:"react-flow__connection-path",style:e})};Mu.displayName="ConnectionLine";const _4={};function pl(e=_4){const t=g.useRef(e),n=Le();g.useEffect(()=>{var s,r;if(process.env.NODE_ENV==="development"){const i=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const l of i)if(t.current[l]!==e[l]){(r=(s=n.getState()).onError)==null||r.call(s,"002",Oe.error002());break}t.current=e}},[e])}function P4(){const e=Le(),t=g.useRef(!1);g.useEffect(()=>{var n,s;if(process.env.NODE_ENV==="development"&&!t.current){const r=document.querySelector(".react-flow__pane");r&&window.getComputedStyle(r).zIndex!=="1"&&((s=(n=e.getState()).onError)==null||s.call(n,"013",Oe.error013("react"))),t.current=!0}},[])}function _u({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:s,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:a,onNodeMouseLeave:x,onNodeContextMenu:d,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:f,connectionLineType:h,connectionLineStyle:j,connectionLineComponent:y,connectionLineContainerStyle:S,selectionKeyCode:w,selectionOnDrag:E,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:T,zoomActivationKeyCode:P,deleteKeyCode:D,onlyRenderVisibleElements:I,elementsSelectable:z,defaultViewport:F,translateExtent:O,minZoom:M,maxZoom:R,preventScrolling:k,defaultMarkerColor:v,zoomOnScroll:_,zoomOnPinch:A,panOnScroll:$,panOnScrollSpeed:V,panOnScrollMode:H,zoomOnDoubleClick:W,panOnDrag:ee,onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:oe,onPaneMouseLeave:J,onPaneScroll:le,onPaneContextMenu:he,paneClickDistance:Me,nodeClickDistance:pe,onEdgeContextMenu:G,onEdgeMouseEnter:ae,onEdgeMouseMove:ue,onEdgeMouseLeave:Pe,reconnectRadius:Be,onReconnect:Gt,onReconnectStart:so,onReconnectEnd:oo,noDragClassName:dn,noWheelClassName:ro,noPanClassName:pn,disableKeyboardA11y:mn,nodeExtent:io,rfId:fn,viewport:hn,onViewportChange:Yn}){return pl(e),pl(t),P4(),S4(n),C4(hn),o.jsxRuntimeExports.jsx(GE,{onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:oe,onPaneMouseLeave:J,onPaneContextMenu:he,onPaneScroll:le,paneClickDistance:Me,deleteKeyCode:D,selectionKeyCode:w,selectionOnDrag:E,selectionMode:C,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:N,panActivationKeyCode:T,zoomActivationKeyCode:P,elementsSelectable:z,zoomOnScroll:_,zoomOnPinch:A,zoomOnDoubleClick:W,panOnScroll:$,panOnScrollSpeed:V,panOnScrollMode:H,panOnDrag:ee,defaultViewport:F,translateExtent:O,minZoom:M,maxZoom:R,onSelectionContextMenu:p,preventScrolling:k,noDragClassName:dn,noWheelClassName:ro,noPanClassName:pn,disableKeyboardA11y:mn,onViewportChange:Yn,isControlledViewport:!!hn,children:o.jsxRuntimeExports.jsxs(y4,{children:[o.jsxRuntimeExports.jsx(j4,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:l,onReconnect:Gt,onReconnectStart:so,onReconnectEnd:oo,onlyRenderVisibleElements:I,onEdgeContextMenu:G,onEdgeMouseEnter:ae,onEdgeMouseMove:ue,onEdgeMouseLeave:Pe,reconnectRadius:Be,defaultMarkerColor:v,noPanClassName:pn,disableKeyboardA11y:mn,rfId:fn}),o.jsxRuntimeExports.jsx(M4,{style:j,type:h,component:y,containerStyle:S}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__edgelabel-renderer"}),o.jsxRuntimeExports.jsx(t4,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:i,onNodeMouseEnter:c,onNodeMouseMove:a,onNodeMouseLeave:x,onNodeContextMenu:d,nodeClickDistance:pe,onlyRenderVisibleElements:I,noPanClassName:pn,noDragClassName:dn,disableKeyboardA11y:mn,nodeExtent:io,rfId:fn}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport-portal"})]})})}_u.displayName="GraphView";const L4=g.memo(_u),ml=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a}={})=>{const x=new Map,d=new Map,p=new Map,m=new Map,f=s??t??[],h=n??e??[],j=c??[0,0],y=a??Nn;Fa(p,m,f),Go(h,x,d,{nodeOrigin:j,nodeExtent:y,elevateNodesOnSelect:!1});let S=[0,0,1];if(l&&r&&i){const w=Fn(x,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:E,y:C,zoom:N}=Lr(w,r,i,.5,2,.1);S=[E,C,N]}return{rfId:"1",width:0,height:0,transform:S,nodes:h,nodeLookup:x,parentLookup:d,edges:f,edgeLookup:m,connectionLookup:p,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:.5,maxZoom:2,translateExtent:Nn,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:j,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:void 0,fitViewResolver:null,connection:{...Ra},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:ks,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},N4=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a})=>U3((x,d)=>{async function p(){const{nodeLookup:m,panZoom:f,fitViewOptions:h,fitViewResolver:j,width:y,height:S,minZoom:w,maxZoom:E}=d();f&&(await Xj({nodes:m,width:y,height:S,panZoom:f,minZoom:w,maxZoom:E},h),j==null||j.resolve(!0),x({fitViewResolver:null}))}return{...ml({nodes:e,edges:t,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a,defaultNodes:n,defaultEdges:s}),setNodes:m=>{const{nodeLookup:f,parentLookup:h,nodeOrigin:j,elevateNodesOnSelect:y,fitViewQueued:S}=d(),w=Go(m,f,h,{nodeOrigin:j,nodeExtent:a,elevateNodesOnSelect:y,checkEquality:!0});S&&w?(p(),x({nodes:m,fitViewQueued:!1,fitViewOptions:void 0})):x({nodes:m})},setEdges:m=>{const{connectionLookup:f,edgeLookup:h}=d();Fa(f,h,m),x({edges:m})},setDefaultNodesAndEdges:(m,f)=>{if(m){const{setNodes:h}=d();h(m),x({hasDefaultNodes:!0})}if(f){const{setEdges:h}=d();h(f),x({hasDefaultEdges:!0})}},updateNodeInternals:m=>{const{triggerNodeChanges:f,nodeLookup:h,parentLookup:j,domNode:y,nodeOrigin:S,nodeExtent:w,debug:E,fitViewQueued:C}=d(),{changes:N,updatedInternals:T}=m3(m,h,j,y,S,w);T&&(x3(h,j,{nodeOrigin:S,nodeExtent:w}),C?(p(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(N==null?void 0:N.length)>0&&(E&&console.log("React Flow: trigger node changes",N),f==null||f(N)))},updateNodePositions:(m,f=!1)=>{const h=[],j=[],{nodeLookup:y,triggerNodeChanges:S}=d();for(const[w,E]of m){const C=y.get(w),N=!!(C!=null&&C.expandParent&&(C!=null&&C.parentId)&&(E!=null&&E.position)),T={id:w,type:"position",position:N?{x:Math.max(0,E.position.x),y:Math.max(0,E.position.y)}:E.position,dragging:f};N&&C.parentId&&h.push({id:w,parentId:C.parentId,rect:{...E.internals.positionAbsolute,width:E.measured.width??0,height:E.measured.height??0}}),j.push(T)}if(h.length>0){const{parentLookup:w,nodeOrigin:E}=d(),C=Ir(h,y,w,E);j.push(...C)}S(j)},triggerNodeChanges:m=>{const{onNodesChange:f,setNodes:h,nodes:j,hasDefaultNodes:y,debug:S}=d();if(m!=null&&m.length){if(y){const w=ou(m,j);h(w)}S&&console.log("React Flow: trigger node changes",m),f==null||f(m)}},triggerEdgeChanges:m=>{const{onEdgesChange:f,setEdges:h,edges:j,hasDefaultEdges:y,debug:S}=d();if(m!=null&&m.length){if(y){const w=ru(m,j);h(w)}S&&console.log("React Flow: trigger edge changes",m),f==null||f(m)}},addSelectedNodes:m=>{const{multiSelectionActive:f,edgeLookup:h,nodeLookup:j,triggerNodeChanges:y,triggerEdgeChanges:S}=d();if(f){const w=m.map(E=>$t(E,!0));y(w);return}y(Ut(j,new Set([...m]),!0)),S(Ut(h))},addSelectedEdges:m=>{const{multiSelectionActive:f,edgeLookup:h,nodeLookup:j,triggerNodeChanges:y,triggerEdgeChanges:S}=d();if(f){const w=m.map(E=>$t(E,!0));S(w);return}S(Ut(h,new Set([...m]))),y(Ut(j,new Set,!0))},unselectNodesAndEdges:({nodes:m,edges:f}={})=>{const{edges:h,nodes:j,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:w}=d(),E=m||j,C=f||h,N=E.map(P=>{const D=y.get(P.id);return D&&(D.selected=!1),$t(P.id,!1)}),T=C.map(P=>$t(P.id,!1));S(N),w(T)},setMinZoom:m=>{const{panZoom:f,maxZoom:h}=d();f==null||f.setScaleExtent([m,h]),x({minZoom:m})},setMaxZoom:m=>{const{panZoom:f,minZoom:h}=d();f==null||f.setScaleExtent([h,m]),x({maxZoom:m})},setTranslateExtent:m=>{var f;(f=d().panZoom)==null||f.setTranslateExtent(m),x({translateExtent:m})},setPaneClickDistance:m=>{var f;(f=d().panZoom)==null||f.setClickDistance(m)},resetSelectedElements:()=>{const{edges:m,nodes:f,triggerNodeChanges:h,triggerEdgeChanges:j}=d(),y=f.reduce((w,E)=>E.selected?[...w,$t(E.id,!1)]:w,[]),S=m.reduce((w,E)=>E.selected?[...w,$t(E.id,!1)]:w,[]);h(y),j(S)},setNodeExtent:m=>{const{nodes:f,nodeLookup:h,parentLookup:j,nodeOrigin:y,elevateNodesOnSelect:S,nodeExtent:w}=d();m[0][0]===w[0][0]&&m[0][1]===w[0][1]&&m[1][0]===w[1][0]&&m[1][1]===w[1][1]||(Go(f,h,j,{nodeOrigin:y,nodeExtent:m,elevateNodesOnSelect:S,checkEquality:!1}),x({nodeExtent:m}))},panBy:m=>{const{transform:f,width:h,height:j,panZoom:y,translateExtent:S}=d();return f3({delta:m,panZoom:y,transform:f,translateExtent:S,width:h,height:j})},cancelConnection:()=>{x({connection:{...Ra}})},updateConnection:m=>{x({connection:m})},reset:()=>x({...ml()})}},Object.is);function Pu({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:s,initialWidth:r,initialHeight:i,fitView:l,nodeOrigin:c,nodeExtent:a,children:x}){const[d]=g.useState(()=>N4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a}));return o.jsxRuntimeExports.jsx(J3,{value:d,children:o.jsxRuntimeExports.jsx(SE,{children:x})})}function T4({children:e,nodes:t,edges:n,defaultNodes:s,defaultEdges:r,width:i,height:l,fitView:c,nodeOrigin:a,nodeExtent:x}){return g.useContext(Xs)?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e}):o.jsxRuntimeExports.jsx(Pu,{initialNodes:t,initialEdges:n,defaultNodes:s,defaultEdges:r,initialWidth:i,initialHeight:l,fitView:c,nodeOrigin:a,nodeExtent:x,children:e})}const $4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function A4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,className:r,nodeTypes:i,edgeTypes:l,onNodeClick:c,onEdgeClick:a,onInit:x,onMove:d,onMoveStart:p,onMoveEnd:m,onConnect:f,onConnectStart:h,onConnectEnd:j,onClickConnectStart:y,onClickConnectEnd:S,onNodeMouseEnter:w,onNodeMouseMove:E,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:T,onNodeDragStart:P,onNodeDrag:D,onNodeDragStop:I,onNodesDelete:z,onEdgesDelete:F,onDelete:O,onSelectionChange:M,onSelectionDragStart:R,onSelectionDrag:k,onSelectionDragStop:v,onSelectionContextMenu:_,onSelectionStart:A,onSelectionEnd:$,onBeforeDelete:V,connectionMode:H,connectionLineType:W=Rt.Bezier,connectionLineStyle:ee,connectionLineComponent:te,connectionLineContainerStyle:se,deleteKeyCode:oe="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:le=!1,selectionMode:he=sn.Full,panActivationKeyCode:Me="Space",multiSelectionKeyCode:pe=_s()?"Meta":"Control",zoomActivationKeyCode:G=_s()?"Meta":"Control",snapToGrid:ae,snapGrid:ue,onlyRenderVisibleElements:Pe=!1,selectNodesOnDrag:Be,nodesDraggable:Gt,nodesConnectable:so,nodesFocusable:oo,nodeOrigin:dn=nu,edgesFocusable:ro,edgesReconnectable:pn,elementsSelectable:mn=!0,defaultViewport:io=xE,minZoom:fn=.5,maxZoom:hn=2,translateExtent:Yn=Nn,preventScrolling:wm=!0,nodeExtent:lo,defaultMarkerColor:vm="#b1b1b7",zoomOnScroll:km=!0,zoomOnPinch:Mm=!0,panOnScroll:_m=!1,panOnScrollSpeed:Pm=.5,panOnScrollMode:Lm=It.Free,zoomOnDoubleClick:Nm=!0,panOnDrag:Tm=!0,onPaneClick:$m,onPaneMouseEnter:Am,onPaneMouseMove:Im,onPaneMouseLeave:zm,onPaneScroll:Bm,onPaneContextMenu:Dm,paneClickDistance:Zr=0,nodeClickDistance:Om=0,children:Vm,onReconnect:Fm,onReconnectStart:Hm,onReconnectEnd:Zm,onEdgeContextMenu:Wm,onEdgeDoubleClick:Ym,onEdgeMouseEnter:Gm,onEdgeMouseMove:Km,onEdgeMouseLeave:qm,reconnectRadius:Xm=10,onNodesChange:Um,onEdgesChange:Jm,noDragClassName:Qm="nodrag",noWheelClassName:ef="nowheel",noPanClassName:Wr="nopan",fitView:Yr,fitViewOptions:tf,connectOnClick:nf,attributionPosition:sf,proOptions:of,defaultEdgeOptions:rf,elevateNodesOnSelect:lf,elevateEdgesOnSelect:cf,disableKeyboardA11y:Gr=!1,autoPanOnConnect:af,autoPanOnNodeDrag:uf,autoPanSpeed:xf,connectionRadius:df,isValidConnection:pf,onError:mf,style:ff,id:Kr,nodeDragThreshold:hf,viewport:gf,onViewportChange:jf,width:Ef,height:yf,colorMode:Sf="light",debug:Rf,onScroll:Gn,...Cf},bf){const co=Kr||"1",wf=fE(Sf),vf=g.useCallback(qr=>{qr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Gn==null||Gn(qr)},[Gn]);return o.jsxRuntimeExports.jsx("div",{"data-testid":"rf__wrapper",...Cf,onScroll:vf,style:{...ff,...$4},ref:bf,className:Ie(["react-flow",r,wf]),id:Kr,children:o.jsxRuntimeExports.jsxs(T4,{nodes:e,edges:t,width:Ef,height:yf,fitView:Yr,nodeOrigin:dn,nodeExtent:lo,children:[o.jsxRuntimeExports.jsx(L4,{onInit:x,onNodeClick:c,onEdgeClick:a,onNodeMouseEnter:w,onNodeMouseMove:E,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:T,nodeTypes:i,edgeTypes:l,connectionLineType:W,connectionLineStyle:ee,connectionLineComponent:te,connectionLineContainerStyle:se,selectionKeyCode:J,selectionOnDrag:le,selectionMode:he,deleteKeyCode:oe,multiSelectionKeyCode:pe,panActivationKeyCode:Me,zoomActivationKeyCode:G,onlyRenderVisibleElements:Pe,defaultViewport:io,translateExtent:Yn,minZoom:fn,maxZoom:hn,preventScrolling:wm,zoomOnScroll:km,zoomOnPinch:Mm,zoomOnDoubleClick:Nm,panOnScroll:_m,panOnScrollSpeed:Pm,panOnScrollMode:Lm,panOnDrag:Tm,onPaneClick:$m,onPaneMouseEnter:Am,onPaneMouseMove:Im,onPaneMouseLeave:zm,onPaneScroll:Bm,onPaneContextMenu:Dm,paneClickDistance:Zr,nodeClickDistance:Om,onSelectionContextMenu:_,onSelectionStart:A,onSelectionEnd:$,onReconnect:Fm,onReconnectStart:Hm,onReconnectEnd:Zm,onEdgeContextMenu:Wm,onEdgeDoubleClick:Ym,onEdgeMouseEnter:Gm,onEdgeMouseMove:Km,onEdgeMouseLeave:qm,reconnectRadius:Xm,defaultMarkerColor:vm,noDragClassName:Qm,noWheelClassName:ef,noPanClassName:Wr,rfId:co,disableKeyboardA11y:Gr,nodeExtent:lo,viewport:gf,onViewportChange:jf}),o.jsxRuntimeExports.jsx(mE,{nodes:e,edges:t,defaultNodes:n,defaultEdges:s,onConnect:f,onConnectStart:h,onConnectEnd:j,onClickConnectStart:y,onClickConnectEnd:S,nodesDraggable:Gt,nodesConnectable:so,nodesFocusable:oo,edgesFocusable:ro,edgesReconnectable:pn,elementsSelectable:mn,elevateNodesOnSelect:lf,elevateEdgesOnSelect:cf,minZoom:fn,maxZoom:hn,nodeExtent:lo,onNodesChange:Um,onEdgesChange:Jm,snapToGrid:ae,snapGrid:ue,connectionMode:H,translateExtent:Yn,connectOnClick:nf,defaultEdgeOptions:rf,fitView:Yr,fitViewOptions:tf,onNodesDelete:z,onEdgesDelete:F,onDelete:O,onNodeDragStart:P,onNodeDrag:D,onNodeDragStop:I,onSelectionDrag:k,onSelectionDragStart:R,onSelectionDragStop:v,onMove:d,onMoveStart:p,onMoveEnd:m,noPanClassName:Wr,nodeOrigin:dn,rfId:co,autoPanOnConnect:af,autoPanOnNodeDrag:uf,autoPanSpeed:xf,onError:mf,connectionRadius:df,isValidConnection:pf,selectNodesOnDrag:Be,nodeDragThreshold:hf,onBeforeDelete:V,paneClickDistance:Zr,debug:Rf}),o.jsxRuntimeExports.jsx(uE,{onSelectionChange:M}),Vm,o.jsxRuntimeExports.jsx(rE,{proOptions:of,position:sf}),o.jsxRuntimeExports.jsx(sE,{rfId:co,disableKeyboardA11y:Gr})]})})}var I4=iu(A4);function z4(){const e=Le();return g.useCallback(t=>{const{domNode:n,updateNodeInternals:s}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(l=>{const c=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${l}"]`);c&&i.set(l,{id:l,nodeElement:c,force:!0})}),requestAnimationFrame(()=>s(i,{triggerFitView:!1}))},[])}function B4({onStart:e,onChange:t,onEnd:n}){const s=Le();g.useEffect(()=>{s.setState({onViewportChangeStart:e})},[e]),g.useEffect(()=>{s.setState({onViewportChange:t})},[t]),g.useEffect(()=>{s.setState({onViewportChangeEnd:n})},[n])}function D4({dimensions:e,lineWidth:t,variant:n,className:s}){return o.jsxRuntimeExports.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ie(["react-flow__background-pattern",n,s])})}function O4({radius:e,className:t}){return o.jsxRuntimeExports.jsx("circle",{cx:e,cy:e,r:e,className:Ie(["react-flow__background-pattern","dots",t])})}var wt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(wt||(wt={}));const V4={[wt.Dots]:1,[wt.Lines]:1,[wt.Cross]:6},F4=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Lu({id:e,variant:t=wt.Dots,gap:n=20,size:s,lineWidth:r=1,offset:i=0,color:l,bgColor:c,style:a,className:x,patternClassName:d}){const p=g.useRef(null),{transform:m,patternId:f}=Re(F4,$e),h=s||V4[t],j=t===wt.Dots,y=t===wt.Cross,S=Array.isArray(n)?n:[n,n],w=[S[0]*m[2]||1,S[1]*m[2]||1],E=h*m[2],C=Array.isArray(i)?i:[i,i],N=y?[E,E]:w,T=[C[0]*m[2]||1+N[0]/2,C[1]*m[2]||1+N[1]/2],P=`${f}${e||""}`;return o.jsxRuntimeExports.jsxs("svg",{className:Ie(["react-flow__background",x]),style:{...a,...Js,"--xy-background-color-props":c,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[o.jsxRuntimeExports.jsx("pattern",{id:P,x:m[0]%w[0],y:m[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:j?o.jsxRuntimeExports.jsx(O4,{radius:E/2,className:d}):o.jsxRuntimeExports.jsx(D4,{dimensions:N,lineWidth:r,variant:t,className:d})}),o.jsxRuntimeExports.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}Lu.displayName="Background";const H4=g.memo(Lu);function Z4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:o.jsxRuntimeExports.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function W4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:o.jsxRuntimeExports.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Y4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:o.jsxRuntimeExports.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function G4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function K4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function ss({children:e,className:t,...n}){return o.jsxRuntimeExports.jsx("button",{type:"button",className:Ie(["react-flow__controls-button",t]),...n,children:e})}const q4=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function Nu({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:s=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:l,onFitView:c,onInteractiveChange:a,className:x,children:d,position:p="bottom-left",orientation:m="vertical","aria-label":f="React Flow controls"}){const h=Le(),{isInteractive:j,minZoomReached:y,maxZoomReached:S}=Re(q4,$e),{zoomIn:w,zoomOut:E,fitView:C}=Ht(),N=()=>{w(),i==null||i()},T=()=>{E(),l==null||l()},P=()=>{C(r),c==null||c()},D=()=>{h.setState({nodesDraggable:!j,nodesConnectable:!j,elementsSelectable:!j}),a==null||a(!j)},I=m==="horizontal"?"horizontal":"vertical";return o.jsxRuntimeExports.jsxs(Us,{className:Ie(["react-flow__controls",I,x]),position:p,style:e,"data-testid":"rf__controls","aria-label":f,children:[t&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ss,{onClick:N,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:S,children:o.jsxRuntimeExports.jsx(Z4,{})}),o.jsxRuntimeExports.jsx(ss,{onClick:T,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:y,children:o.jsxRuntimeExports.jsx(W4,{})})]}),n&&o.jsxRuntimeExports.jsx(ss,{className:"react-flow__controls-fitview",onClick:P,title:"fit view","aria-label":"fit view",children:o.jsxRuntimeExports.jsx(Y4,{})}),s&&o.jsxRuntimeExports.jsx(ss,{className:"react-flow__controls-interactive",onClick:D,title:"toggle interactivity","aria-label":"toggle interactivity",children:j?o.jsxRuntimeExports.jsx(K4,{}):o.jsxRuntimeExports.jsx(G4,{})}),d]})}Nu.displayName="Controls";g.memo(Nu);function X4({id:e,x:t,y:n,width:s,height:r,style:i,color:l,strokeColor:c,strokeWidth:a,className:x,borderRadius:d,shapeRendering:p,selected:m,onClick:f}){const{background:h,backgroundColor:j}=i||{},y=l||h||j;return o.jsxRuntimeExports.jsx("rect",{className:Ie(["react-flow__minimap-node",{selected:m},x]),x:t,y:n,rx:d,ry:d,width:s,height:r,style:{fill:y,stroke:c,strokeWidth:a},shapeRendering:p,onClick:f?S=>f(S,e):void 0})}const U4=g.memo(X4),J4=e=>e.nodes.map(t=>t.id),ko=e=>e instanceof Function?e:()=>e;function Q4({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:s=5,nodeStrokeWidth:r,nodeComponent:i=U4,onClick:l}){const c=Re(J4,$e),a=ko(t),x=ko(e),d=ko(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:c.map(m=>o.jsxRuntimeExports.jsx(ty,{id:m,nodeColorFunc:a,nodeStrokeColorFunc:x,nodeClassNameFunc:d,nodeBorderRadius:s,nodeStrokeWidth:r,NodeComponent:i,onClick:l,shapeRendering:p},m))})}function ey({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:s,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:l,NodeComponent:c,onClick:a}){const{node:x,x:d,y:p,width:m,height:f}=Re(h=>{const{internals:j}=h.nodeLookup.get(e),y=j.userNode,{x:S,y:w}=j.positionAbsolute,{width:E,height:C}=gt(y);return{node:y,x:S,y:w,width:E,height:C}},$e);return!x||x.hidden||!Pa(x)?null:o.jsxRuntimeExports.jsx(c,{x:d,y:p,width:m,height:f,style:x.style,selected:!!x.selected,className:s(x),color:t(x),borderRadius:r,strokeColor:n(x),strokeWidth:i,shapeRendering:l,onClick:a,id:x.id})}const ty=g.memo(ey);var ny=g.memo(Q4);const sy=200,oy=150,ry=e=>!e.hidden,iy=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?_a(Fn(e.nodeLookup,{filter:ry}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}},ly="react-flow__minimap-desc";function Tu({style:e,className:t,nodeStrokeColor:n,nodeColor:s,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:l,nodeComponent:c,bgColor:a,maskColor:x,maskStrokeColor:d,maskStrokeWidth:p,position:m="bottom-right",onClick:f,onNodeClick:h,pannable:j=!1,zoomable:y=!1,ariaLabel:S="React Flow mini map",inversePan:w,zoomStep:E=10,offsetScale:C=5}){const N=Le(),T=g.useRef(null),{boundingRect:P,viewBB:D,rfId:I,panZoom:z,translateExtent:F,flowWidth:O,flowHeight:M}=Re(iy,$e),R=(e==null?void 0:e.width)??sy,k=(e==null?void 0:e.height)??oy,v=P.width/R,_=P.height/k,A=Math.max(v,_),$=A*R,V=A*k,H=C*A,W=P.x-($-P.width)/2-H,ee=P.y-(V-P.height)/2-H,te=$+H*2,se=V+H*2,oe=`${ly}-${I}`,J=g.useRef(0),le=g.useRef();J.current=A,g.useEffect(()=>{if(T.current&&z)return le.current=C3({domNode:T.current,panZoom:z,getTransform:()=>N.getState().transform,getViewScale:()=>J.current}),()=>{var pe;(pe=le.current)==null||pe.destroy()}},[z]),g.useEffect(()=>{var pe;(pe=le.current)==null||pe.update({translateExtent:F,width:O,height:M,inversePan:w,pannable:j,zoomStep:E,zoomable:y})},[j,y,w,E,F,O,M]);const he=f?pe=>{var ue;const[G,ae]=((ue=le.current)==null?void 0:ue.pointer(pe))||[0,0];f(pe,{x:G,y:ae})}:void 0,Me=h?g.useCallback((pe,G)=>{const ae=N.getState().nodeLookup.get(G).internals.userNode;h(pe,ae)},[]):void 0;return o.jsxRuntimeExports.jsx(Us,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*A:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:Ie(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:o.jsxRuntimeExports.jsxs("svg",{width:R,height:k,viewBox:`${W} ${ee} ${te} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":oe,ref:T,onClick:he,children:[S&&o.jsxRuntimeExports.jsx("title",{id:oe,children:S}),o.jsxRuntimeExports.jsx(ny,{onClick:Me,nodeColor:s,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:l,nodeComponent:c}),o.jsxRuntimeExports.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-H},${ee-H}h${te+H*2}v${se+H*2}h${-te-H*2}z
|
|
39
|
-
M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Tu.displayName="MiniMap";g.memo(Tu);function cy({nodeId:e,position:t,variant:n=wn.Handle,className:s,style:r={},children:i,color:l,minWidth:c=10,minHeight:a=10,maxWidth:x=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:p=!1,shouldResize:m,onResizeStart:f,onResize:h,onResizeEnd:j}){const y=uu(),S=typeof e=="string"?e:y,w=Le(),E=g.useRef(null),C=n===wn.Line?"right":"bottom-right",N=t??C,T=g.useRef(null);g.useEffect(()=>{if(!(!E.current||!S))return T.current||(T.current=B3({domNode:E.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:z,transform:F,snapGrid:O,snapToGrid:M,nodeOrigin:R,domNode:k}=w.getState();return{nodeLookup:z,transform:F,snapGrid:O,snapToGrid:M,nodeOrigin:R,paneDomNode:k}},onChange:(z,F)=>{const{triggerNodeChanges:O,nodeLookup:M,parentLookup:R,nodeOrigin:k}=w.getState(),v=[],_={x:z.x,y:z.y},A=M.get(S);if(A&&A.expandParent&&A.parentId){const $=A.origin??k,V=z.width??A.measured.width??0,H=z.height??A.measured.height??0,W={id:A.id,parentId:A.parentId,rect:{width:V,height:H,...La({x:z.x??A.position.x,y:z.y??A.position.y},{width:V,height:H},A.parentId,M,$)}},ee=Ir([W],M,R,k);v.push(...ee),_.x=z.x?Math.max($[0]*V,z.x):void 0,_.y=z.y?Math.max($[1]*H,z.y):void 0}if(_.x!==void 0&&_.y!==void 0){const $={id:S,type:"position",position:{..._}};v.push($)}if(z.width!==void 0&&z.height!==void 0){const $={id:S,type:"dimensions",resizing:!0,setAttributes:!0,dimensions:{width:z.width,height:z.height}};v.push($)}for(const $ of F){const V={...$,type:"position"};v.push(V)}O(v)},onEnd:({width:z,height:F})=>{const O={id:S,type:"dimensions",resizing:!1,dimensions:{width:z,height:F}};w.getState().triggerNodeChanges([O])}})),T.current.update({controlPosition:N,boundaries:{minWidth:c,minHeight:a,maxWidth:x,maxHeight:d},keepAspectRatio:p,onResizeStart:f,onResize:h,onResizeEnd:j,shouldResize:m}),()=>{var z;(z=T.current)==null||z.destroy()}},[N,c,a,x,d,p,f,h,j,m]);const P=N.split("-"),D=n===wn.Line?"borderColor":"backgroundColor",I=l?{...r,[D]:l}:r;return o.jsxRuntimeExports.jsx("div",{className:Ie(["react-flow__resize-control","nodrag",...P,n,s]),ref:E,style:I,children:i})}g.memo(cy);const ay=(e,t)=>e.map((n,s)=>u.J.translate(n,t[s])),$u=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(et,{path:vt(e),style:{stroke:u.cssString(t)},...n}),uy=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(et,{path:vt(e),style:{stroke:u.cssString(t),strokeDasharray:"12,4"},...n}),xy=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(et,{path:vt(e),style:{stroke:u.cssString(t),strokeDasharray:"12,4,4"},...n}),dy=({points:e,color:t,...n})=>{const s=u.J.calculateMiters(e,6),r=e.map((a,x)=>u.J.translate(a,s[x])),i=e.map((a,x)=>u.J.translate(a,u.J.scale(s[x],-1))),l=u.cssString(t),c=.7;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(et,{path:vt(r),style:{stroke:l,opacity:c},...n}),o.jsxRuntimeExports.jsx(et,{path:vt(e),style:{stroke:l},...n}),o.jsxRuntimeExports.jsx(et,{path:vt(i),style:{stroke:l,opacity:c},...n})]})},fl=5,py=(e,t)=>{const n=[],s=[];for(let c=0;c<e.length-1;c++){const a=u.J.distance(e[c],e[c+1]);s.push(a)}const r=t;let i=0,l=r;for(let c=0;c<s.length;c++){const a=s[c],x=e[c],d=e[c+1];for(;i+a>=l;){const p=(l-i)/a,m={x:x.x+p*(d.x-x.x),y:x.y+p*(d.y-x.y)};let f="x";Math.abs(d.x-x.x)<1&&(f="y"),l+=r,!(u.J.distance(m,d)<fl||u.J.distance(m,x)<fl)&&n.push({position:m,direction:f})}i+=a}return n},my=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10 L10,-10";return n==="x"?t.y+=10/2:t.x+=10/2,o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(270)`,strokeLinecap:"round"})},fy=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10";n==="x"?t.y+=10/3:t.x-=10/3;let i=u.J.translateX(t,-10),l=45;return n==="y"&&(i=u.J.translateY(t,-10),l+=90),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(${l})`,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${i.x},${i.y}) rotate(${l})`,strokeLinecap:"round"})]})},hy=({color:e,position:t})=>o.jsxRuntimeExports.jsx("circle",{cx:t.x,cy:t.y,r:3,fill:"var(--pluto-gray-l0)",stroke:u.cssString(e),strokeWidth:2}),Br=e=>{const t=({points:n,color:s,...r})=>{const i=vt(n),l=py(n,40);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(et,{path:i,...r,style:{stroke:u.cssString(s)}}),l.map(({position:c,direction:a},x)=>o.jsxRuntimeExports.jsx(e,{position:c,direction:a,color:s},x))]})};return t.displayName=`SymbolLine(${e.displayName})`,t},gy=Br(my),jy=Br(fy),Ey=Br(hy),vt=e=>{let t="";const s=e.length+-1;for(let r=0;r<s;r++){const i=e[r%e.length],l=e[(r+1)%e.length],c=Math.min(6/Math.hypot(l.x-i.x,l.y-i.y),.5);r>0&&(t+=`Q${i.x},${i.y} ${i.x*(1-c)+l.x*c},${i.y*(1-c)+l.y*c}`),r===0?t+=`M${i.x},${i.y}`:r===0&&(t+=`M${i.x*(1-c)+l.x*c},${i.y*(1-c)+l.y*c}`),r===s-1?t+=`L${l.x},${l.y}`:r<s-1&&(t+=`L${i.x*c+l.x*(1-c)},${i.y*c+l.y*(1-c)}`)}return t},Au={pipe:$u,electric:uy,secondary:xy,jacketed:dy,hydraulic:gy,pneumatic:jy,data:Ey},Iu=$u,zu=[{key:"pipe",name:"Pipe"},{key:"electric",name:"Electric Signal"},{key:"secondary",name:"Secondary"},{key:"jacketed",name:"Jacketed"},{key:"hydraulic",name:"Hydraulic"},{key:"pneumatic",name:"Pneumatic"},{key:"data",name:"Data"}],yy=e=>o.jsxRuntimeExports.jsx(As,{columns:[{key:"name",name:"Type"}],data:zu,style:{width:200},entryRenderKey:"name",...e}),Qs=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},Fe=(e,t)=>{const n=Qs(t),s=e.getNodes().find(r=>r.id===t);if(s==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return u.$t.construct(s.position,u._.scale(u.$t.dims(u.$t.construct(n)),1/e.getZoom()))},Sy=(e,t)=>eo.fromFlow(e,t);class Bu{constructor(t,n){nt(this,"node_",null);nt(this,"position");nt(this,"orientation");this.position=t,this.orientation=n}set node(t){this.node_=t}get node(){if(this.node_==null)throw new Error("[schematic] - handle has no node");return this.node_}get absolutePosition(){return u.J.translate(u.$t.topLeft(this.node.box),this.position)}}class eo{constructor(t,n,s){nt(this,"key");nt(this,"box");nt(this,"handles");this.key=t,this.box=n,this.handles=s,s.forEach(r=>r.node=this)}static fromFlow(t,n){const s=Fe(n,t),r=Qs(t),i=r.getElementsByClassName("react-flow__handle"),l=u.$t.construct(r),c=Array.from(i).map(a=>{const x=u.$t.center(u.$t.construct(a)),d=u.J.translation(u.$t.topLeft(l),x),p=a.className.match(/react-flow__handle-(\w+)/);if(p==null)throw new Error("[schematic] - cannot find handle orientation");const m=u.K.construct(p[0]);return new Bu(d,m)});return new eo(t,s,c)}}const Ry=({fromX:e,fromY:t,toX:n,toY:s,fromPosition:r,toPosition:i,fromNode:l,connectionLineStyle:c,connectionStatus:a})=>{const x=document.querySelector(".react-flow__handle-connecting"),d=x==null?void 0:x.className.match(/react-flow__handle-(\w+)/);if(d!=null){const h=u.K.outer.safeParse(d[1]);h.success&&(i=h.data)}const p=Ht(),m=qt({sourcePos:u.J.construct(e,t),targetPos:u.J.construct(n,s),sourceOrientation:r,targetOrientation:i,sourceBox:Fe(p,(l==null?void 0:l.id)??""),targetBox:Fe(p,(l==null?void 0:l.id)??"")}),f=Hc(u.J.construct(e,t),m,p.getZoom(),!1);return o.jsxRuntimeExports.jsx(Iu,{points:f,style:{...c,stroke:u.cssString(a==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l11)"),strokeWidth:2,fill:"none"}})},Cy=({id:e,source:t,target:n,sourcePosition:s,targetHandleId:r,targetPosition:i,style:l,segments:c=[],onSegmentsChange:a,color:x="var(--pluto-gray-l11)",selected:d=!1,variant:p="pipe",...m})=>{const f=u.J.construct(m.sourceX,m.sourceY),h=g.useRef(f),j=u.J.equals(f,h.current),y=u.J.construct(m.targetX,m.targetY),S=g.useRef(y),w=u.J.equals(y,S.current),E=Ht(),[C,N,T]=Z.useCombinedStateAndRef(()=>c.length>0?c:qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Fe(E,t),targetBox:Fe(E,n)})),P=g.useRef(i),D=g.useRef(s),I=Uo.useDebouncedCallback(a,100,[a]);if(!j||!w){let R=C;const k=u.J.translation(h.current,f),v=u.J.translation(y,S.current);u.J.equals(k,u.J.scale(v,-1),.001)?(h.current=f,S.current=y):(j?w||(R=z0({delta:v,segments:R}),P.current!==i&&(P.current=i,R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Fe(E,t),targetBox:Fe(E,n)})),di({sourcePos:f,targetPos:y,next:R,prev:C})||(R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Fe(E,t),targetBox:Fe(E,n)})),S.current=y):(R=I0({delta:k,segments:R}),D.current!==s&&(D.current=s,R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Fe(E,t),targetBox:Fe(E,n)})),di({sourcePos:f,targetPos:y,next:R,prev:C})||(R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Fe(E,t),targetBox:Fe(E,n)})),h.current=f),I(R),N(R))}const z=g.useRef(null),F=qe.useCursorDrag({onStart:g.useCallback((R,k,v)=>{z.current={index:Number(v.currentTarget.id.split("-")[1]),segments:[...T.current]}},[]),onMove:g.useCallback(R=>{if(z.current==null)return;const k=N0({segments:z.current.segments,index:z.current.index,magnitude:u.$t.dim(R,u.g.swap(z.current.segments[z.current.index].direction),!0)/E.getZoom()});N(k)},[]),onEnd:g.useCallback(()=>a(T.current),[a])}),O=Hc(f,C,E.getZoom(),!0),M=Au[p];return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(M,{points:O,color:x}),d&&by(O).map((R,k)=>{const v=C[k].direction,_=u.g.swap(v),A={[u.g.dimension(v)]:"18px",[u.g.dimension(_)]:"4px"},$={[v]:R[v]-9,[_]:R[_]-2};return o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsx("rect",{className:u.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...A,...$,rx:"2px",ry:"2px"}),o.jsxRuntimeExports.jsx("foreignObject",{x:R.x-9,y:R.y-9,width:"18px",height:"18px",children:o.jsxRuntimeExports.jsx("div",{id:`handle-${k}`,className:u.CSS(u.CSS.BE("diagram-edge-handle","dragger"),u.CSS.dir(v)),draggable:!0,onDragStart:F})})]},k)})]})},by=e=>e.slice(1).map((t,n)=>{const s=e[n];return u.J.construct((t.x+s.x)/2,(t.y+s.y)/2)}),wy=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:s={position:u.J.ZERO,zoom:1}})=>{const[r,i]=g.useState(n),[l,c]=g.useState(e),[a,x]=g.useState(t),[d,p]=g.useState(s),[m,f]=g.useState(!1);return{viewport:d,onViewportChange:p,edges:a,nodes:l,onNodesChange:c,onEdgesChange:x,editable:r,onEditableChange:i,fitViewOnResize:m,setFitViewOnResize:f}},vy=()=>!0,ky={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1,nodeClickDistance:5,reconnectRadius:15,connectionRadius:30},My={connectionRadius:0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,panOnScroll:!1,zoomOnScroll:!1,zoomOnDoubleClick:!1,zoomOnPinch:!1,edgesFocusable:!1,edgesReconnectable:!1,nodesFocusable:!1,reconnectRadius:0},Du={maxZoom:1,minZoom:.5},_y={hideAttribution:!0},Ou=g.createContext({editable:!0,visible:!0,onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),Zn=()=>g.use(Ou),Vu=g.memo(({children:e})=>{const{registerNodeRenderer:t}=Zn();return g.useEffect(()=>t(e),[t,e]),null});Vu.displayName="NodeRenderer";const Py=["Backspace","Delete"],Ly=({aetherKey:e,onNodesChange:t,onEdgesChange:n,nodes:s,edges:r,onEditableChange:i,editable:l,viewport:c,triggers:a,onViewportChange:x,fitViewOnResize:d,setFitViewOnResize:p,visible:m,...f})=>{const h=Te.useMemoDeepEqualProps({visible:m}),[{path:j},,y]=Q.use$1({aetherKey:e,type:B.Diagram$1.TYPE,schema:B.diagramStateZ,initialState:{position:c.position,region:u.$t.ZERO,zoom:c.zoom,...h}});g.useEffect(()=>y(G=>({...G,...h})),[h]);const S=Q.use().colors.gray.l11.hex,w=Te.useMemoCompare(()=>a??dr.zoom,ze.compareModeConfigs,[a]),{fitView:E}=Ht(),C=Uo.useDebouncedCallback(G=>void E(G),50,[E]),N=Bn(g.useCallback(G=>{d&&C({maxZoom:1}),y(ae=>({...ae,region:G}))},[y,C,d])),T=g.useRef(null),P=g.useCallback(G=>{const ae=T.current;ae!=null&&ae.x===G.x&&ae.y===G.y&&ae.zoom===G.zoom||(T.current=G,!(isNaN(G.x)||isNaN(G.y)||isNaN(G.zoom))&&(y(ue=>({...ue,position:G,zoom:G.zoom})),x(qc(G))))},[y,x]);B4({onStart:P,onChange:P,onEnd:P});const[D,I]=g.useState(()=>()=>null),z=g.useCallback(G=>I(()=>G),[]),F=g.useMemo(()=>({custom:({id:G,positionAbsoluteX:ae,positionAbsoluteY:ue,selected:Pe=!1,draggable:Be=!0})=>D({symbolKey:G,position:{x:ae,y:ue},selected:Pe,draggable:Be})}),[D]),O=g.useRef(r),M=g.useMemo(()=>(O.current=r,br(r)),[r]),R=g.useRef(s),k=g.useMemo(()=>(R.current=s,Cr(s)),[s]),v=g.useCallback(G=>t(Xc(R.current,ae=>ou(G,ae)),G),[t]),_=g.useCallback(G=>n(is(O.current,ae=>ru(G,ae),S)),[n,S]),A=g.useCallback((G,ae)=>n(is(O.current,ue=>o3(G,ae,ue),S)),[]),$=g.useCallback(G=>n(is(O.current,ae=>Da(G,ae),S)),[n,S]),V=g.useCallback((G,ae)=>{const ue=[...O.current],Pe=ue.findIndex(Be=>Be.key===G);Pe!==-1&&(ue[Pe]={...ue[Pe],segments:ae},O.current=ue,n(ue))},[n]),H=l?ky:My,W=Z.useSyncedRef(V),ee=g.useMemo(()=>({default:G=>{var ae,ue,Pe;return o.jsxRuntimeExports.jsx(Cy,{...G,segments:((ae=G.data)==null?void 0:ae.segments)??[],color:(ue=G.data)==null?void 0:ue.color,variant:(Pe=G.data)==null?void 0:Pe.variant,onSegmentsChange:g.useCallback(Be=>W.current(G.id,Be),[G.id])},G.id)}}),[]),te=ze.useHeld({triggers:[["Q"]],loose:!0}),se=g.useRef(null);ze.use({triggers:w.zoomReset,callback:g.useCallback(({stage:G,cursor:ae})=>{const ue=se.current;ue==null||G!=="start"||!u.$t.contains(ue,ae)||E()},[E])});const oe=ze.purgeMouse(w.select)[0]??null,J=ze.purgeMouse(w.pan)[0]??null,le=ze.purgeMouse(w.zoom)[0]??null,he={selectionOnDrag:oe==null,panOnDrag:J==null,selectionKeyCode:oe,panActivationKeyCode:J,zoomActivationKeyCode:le},Me=Z.useCombinedRefs(se,N),pe=g.useMemo(()=>({visible:m,editable:l,onEditableChange:i,registerNodeRenderer:z,fitViewOnResize:d,setFitViewOnResize:p}),[l,m,i,z,d]);return o.jsxRuntimeExports.jsx(Ou,{value:pe,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:j,children:m&&o.jsxRuntimeExports.jsx(I4,{...he,className:u.CSS(u.CSS.B("diagram"),u.CSS.editable(l),u.CSS.BE("symbol","container")),nodes:k,edges:M,nodeTypes:F,edgeTypes:ee,ref:Me,fitView:!0,onNodesChange:v,onEdgesChange:_,onConnect:$,onReconnect:A,defaultViewport:Kc(c),connectionLineComponent:Ry,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:vy,connectionMode:Vt.Loose,fitViewOptions:Du,selectionMode:sn.Partial,proOptions:_y,deleteKeyCode:Py,...f,style:{[u.CSS.var("diagram-zoom")]:c.zoom,...f.style},...H,nodesDraggable:l&&!te.held})})})},Ny=()=>{const{editable:e}=Zn();return e?o.jsxRuntimeExports.jsx(H4,{}):null},Ty=e=>o.jsxRuntimeExports.jsx(Ns.Pack,{borderShade:5,className:u.CSS.BE("diagram","controls"),...e}),$y=({onClick:e,...t})=>{const{editable:n,onEditableChange:s}=Zn();return o.jsxRuntimeExports.jsx(ge.ToggleIcon,{onChange:()=>s(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:u.K.BOTTOM_LEFT,size:"small",tooltip:`${n?"Disable":"Enable"} editing`,...t,children:n?o.jsxRuntimeExports.jsx(Z.y4.EditOff,{}):o.jsxRuntimeExports.jsx(Z.y4.Edit,{})})},Ay=({onClick:e,...t})=>{const{fitView:n}=Ht(),{fitViewOnResize:s,setFitViewOnResize:r}=Zn();return o.jsxRuntimeExports.jsx(ge.ToggleIcon,{onClick:i=>{n(Du),e==null||e(i)},value:s,onChange:i=>r(i),rightClickToggle:!0,tooltip:o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:u.K.BOTTOM_LEFT,variant:"outlined",size:"small",...t,children:o.jsxRuntimeExports.jsx(Z.y4.Expand,{})})},Iy=e=>o.jsxRuntimeExports.jsx(Pu,{children:o.jsxRuntimeExports.jsx(Ly,{...e})}),zy=Object.freeze(Object.defineProperty({__proto__:null,Background:Ny,Controls:Ty,DefaultPath:Iu,Diagram:Iy,FitViewControl:Ay,HandleLayout:Bu,NodeLayout:eo,NodeRenderer:Vu,PATHS:Au,PATH_TYPES:zu,SelectPathType:yy,ToggleEditControl:$y,alignNodes:V0,calcPath:vt,edgeConverter:is,edgeZ:D0,nodeConverter:Xc,nodeZ:O0,offsetPath:ay,rfEdgeDataZ:Wc,selectNode:Qs,selectNodeBox:Fe,selectNodeLayout:Sy,translateEdgesBackward:Gc,translateEdgesForward:br,translateNodesBackward:Yc,translateNodesForward:Cr,translateViewportBackward:qc,translateViewportForward:Kc,use:wy,useContext:Zn,viewportZ:B0},Symbol.toStringTag,{value:"Module"})),By=({aetherKey:e,font:t,className:n,visible:s=!0,emptyContent:r=o.jsxRuntimeExports.jsx(Ce.Text.Centered,{level:"h3",variant:"disabled",hideIcon:!0,children:"Empty Log"}),color:i,telem:l,...c})=>{const a=Te.useMemoDeepEqualProps({font:t,color:i,telem:l,visible:s}),[,{scrolling:x,empty:d},p]=Q.use$1({type:B.Log.TYPE,schema:B.logState,initialState:{empty:!0,region:u.$t.ZERO,scrolling:!1,wheelPos:0,...a}});g.useEffect(()=>{p(f=>({...f,...a}))},[a,p]);const m=Bn(g.useCallback(f=>p(h=>({...h,region:f})),[p]));return o.jsxRuntimeExports.jsx("div",{ref:m,className:u.CSS(u.CSS.B("log"),n),onWheel:f=>{p(h=>({...h,wheelPos:h.wheelPos-f.deltaY,scrolling:h.scrolling?h.scrolling:f.deltaY<0}))},...c,children:d?r:o.jsxRuntimeExports.jsx(ge.Icon,{className:u.CSS(u.CSS.BE("log","live"),x&&u.CSS.M("active")),variant:"outlined",onClick:()=>p(f=>({...f,scrolling:!f.scrolling})),tooltip:x?"Resume Scrolling":"Pause Scrolling",tooltipLocation:u.K.BOTTOM_LEFT,children:o.jsxRuntimeExports.jsx(Z.y4.Dynamic,{})})})},Dy=Object.freeze(Object.defineProperty({__proto__:null,Log:By},Symbol.toStringTag,{value:"Module"})),at=(e,t)=>{const n={};t.forEach(r=>n[r]=void 0);const s=r=>{const{...i}={...r,...n};return o.jsxRuntimeExports.jsx(e,{...i})};return s.displayName=`RemoveProps(${e.displayName})`,s},Oy=({value:e,hideOuter:t=!1,hideInner:n,onChange:s})=>{const{outer:r}=e,i=l=>()=>s({...e,...l});return t?o.jsxRuntimeExports.jsx(hl,{className:u.CSS.B("orientation-control"),value:e,onChange:s}):o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS.B("orientation-control"),align:"center",justify:"center",size:"tiny",children:[o.jsxRuntimeExports.jsx(bt,{selected:r==="top",onClick:i({outer:"top"})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",justify:"center",size:"tiny",children:[o.jsxRuntimeExports.jsx(bt,{selected:r==="left",onClick:i({outer:"left"})}),o.jsxRuntimeExports.jsx(hl,{hideInner:n,value:e,onChange:s}),o.jsxRuntimeExports.jsx(bt,{selected:r==="right",onClick:i({outer:"right"})})]}),o.jsxRuntimeExports.jsx(bt,{selected:r==="bottom",onClick:i({outer:"bottom"})})]})},hl=({value:e,onChange:t,className:n,hideInner:s=!1,...r})=>{const{inner:i}=e,l=a=>()=>t({...e,...a});let c={};return s&&(c={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"}),o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS(n,u.CSS.B("value")),y:!0,align:"center",justify:"center",empty:!0,...r,children:[o.jsxRuntimeExports.jsx(bt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:i==="top",onClick:l({inner:"top"})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",justify:"center",children:[o.jsxRuntimeExports.jsx(bt,{style:c,disabled:s,selected:i==="left",onClick:l({inner:"left"})}),o.jsxRuntimeExports.jsx(bt,{style:c,disabled:s,selected:i==="right",onClick:l({inner:"right"})})]}),o.jsxRuntimeExports.jsx(bt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:i==="bottom",onClick:l({inner:"bottom"})})]})},bt=({selected:e,className:t,...n})=>o.jsxRuntimeExports.jsx(ge.Icon,{variant:"text",className:u.CSS(t,u.CSS.selected(e)),...n,children:o.jsxRuntimeExports.jsx("div",{className:"symbol"})}),Ve=({className:e,direction:t,...n})=>o.jsxRuntimeExports.jsx(ne.Space,{direction:t,align:"stretch",className:u.CSS(u.CSS.B("symbol-form"),e),size:t==="x"?"large":"medium",...n}),Lt=({hideOuter:e,hideInner:t,...n})=>t&&e?null:o.jsxRuntimeExports.jsx(be,{label:"Orientation",padHelpText:!1,...n,children:({value:s,onChange:r})=>{var i;return o.jsxRuntimeExports.jsx(Oy,{value:{inner:s.orientation??"top",outer:((i=s.label)==null?void 0:i.orientation)??"top"},hideInner:t,hideOuter:e,onChange:l=>r({...s,orientation:l.inner,label:{...s.label,orientation:l.outer}})})}}),jt=({path:e,omit:t=[]})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(be,{path:`${e}.label`,label:"Label",padHelpText:!1,grow:!0,children:n=>o.jsxRuntimeExports.jsx(mt.Text,{selectOnFocus:!0,...n})}),o.jsxRuntimeExports.jsx(We,{visible:!t.includes("maxInlineSize"),style:{maxWidth:125},path:`${e}.maxInlineSize`,hideIfNull:!0,label:"Label Wrap Width",inputProps:{endContent:"px",dragScale:{x:1,y:.5}},padHelpText:!1}),o.jsxRuntimeExports.jsx(be,{hideIfNull:!0,visible:!t.includes("level"),path:`${e}.level`,label:"Label Size",padHelpText:!1,children:n=>o.jsxRuntimeExports.jsx(un,{...n})}),o.jsxRuntimeExports.jsx(be,{visible:!t.includes("align"),path:`${e}.align`,label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:n=>o.jsxRuntimeExports.jsx(Is,{...n})}),o.jsxRuntimeExports.jsx(be,{visible:!t.includes("direction"),path:`${e}.direction`,label:"Label Direction",padHelpText:!1,hideIfNull:!0,children:n=>o.jsxRuntimeExports.jsx(Jl,{...n,yDirection:"down"})})]}),Ze=e=>o.jsxRuntimeExports.jsx(be,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(qe.Swatch,{value:t??u.ZERO.setAlpha(1).rgba255,onChange:i=>n(i.rgba255),...r,bordered:!0})}),Fu=e=>o.jsxRuntimeExports.jsx(be,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(je.Numeric,{dragScale:{x:.75,y:.5},bounds:{lower:50,upper:1e3},endContent:"%",value:Math.round(t*100),onChange:s=>n(parseFloat((s/100).toFixed(2)))})}),de=({omit:e,hideInnerOrientation:t,hideOuterOrientation:n})=>o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{omit:e,path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Ze,{path:"color",optional:!0}),o.jsxRuntimeExports.jsx(be,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:s=>o.jsxRuntimeExports.jsx(Q.Switch$1,{...s})}),o.jsxRuntimeExports.jsx(Fu,{path:"scale"})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:t,hideOuter:n})]}),Vy=({path:e})=>{var x,d;const{value:t,onChange:n}=_t({path:e}),s=B.sourcePipelinePropsZ.parse((x=t.source)==null?void 0:x.props),r=B.sinkPipelinePropsZ.parse((d=t.sink)==null?void 0:d.props),i=B.streamChannelValuePropsZ.parse(s.segments.valueStream.props),l=B.setChannelValuePropsZ.parse(r.segments.setter.props),c=p=>{p??(p=0);const m=B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:p}),threshold:B.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:m})},a=p=>{p??(p=0);const m=B.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:B.setChannelValue({channel:p}),setpoint:B.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),f=B.authoritySource({channel:p}),h=B.acquireChannelControl({channel:p,authority:255});n({...t,sink:m,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:h,source:f},indicator:{statusSource:f}}})};return o.jsxRuntimeExports.jsxs(Ve,{x:!0,grow:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(je.Item,{label:"State Channel",grow:!0,children:o.jsxRuntimeExports.jsx(zt,{value:i.channel,onChange:c})}),o.jsxRuntimeExports.jsx(je.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(zt,{value:l.channel,onChange:a})}),o.jsxRuntimeExports.jsx(Bs,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},Dr=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],we=({hideInnerOrientation:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"control":return o.jsxRuntimeExports.jsx(Vy,{path:""});default:return o.jsxRuntimeExports.jsx(de,{hideInnerOrientation:e})}},[e]),n=Ne.useStatic({tabs:Dr,content:t});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...n})},St={y:2,x:.25},vn={lower:0,upper:2e3},gl={lower:0,upper:51},Hu=({includeBorderRadius:e=!1,includeStrokeWidth:t=!1})=>o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(Ze,{path:"color"}),o.jsxRuntimeExports.jsx(Ze,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(be,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(je.Numeric,{dragScale:St,bounds:gl,endContent:"%",...n})}),o.jsxRuntimeExports.jsx(be,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(je.Numeric,{dragScale:St,bounds:gl,endContent:"%",...n})}),e&&o.jsxRuntimeExports.jsx(be,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(je.Numeric,{dragScale:St,bounds:vn,endContent:"px",...n})}),t&&o.jsxRuntimeExports.jsx(be,{path:"strokeWidth",hideIfNull:!0,optional:!0,label:"Border Width",grow:!0,children:n=>o.jsxRuntimeExports.jsx(je.Numeric,{dragScale:St,bounds:{lower:0,upper:21},endContent:"px",...n})}),o.jsxRuntimeExports.jsx(be,{path:"dimensions.width",label:"Width",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(je.Numeric,{value:n??200,dragScale:St,bounds:vn,endContent:"px",...s})}),o.jsxRuntimeExports.jsx(be,{path:"dimensions.height",label:"Height",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(je.Numeric,{value:n??200,dragScale:St,bounds:vn,endContent:"px",...s})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]}),Fy=()=>o.jsxRuntimeExports.jsx(Ve,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(ne.Space,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",children:[o.jsxRuntimeExports.jsx(Ze,{path:"color"}),o.jsxRuntimeExports.jsx(Ze,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(We,{path:"rotation",label:"Rotation",inputProps:{dragScale:{x:1,y:.25},bounds:{lower:0,upper:360},endContent:"°"},grow:!0}),o.jsxRuntimeExports.jsx(We,{path:"numSides",label:"Number of Sides",inputProps:{dragScale:{x:.5,y:.1},bounds:{lower:3,upper:21}},grow:!0}),o.jsxRuntimeExports.jsx(We,{path:"sideLength",label:"Side Length",inputProps:{dragScale:{x:1,y:1},bounds:{lower:10,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(We,{path:"cornerRounding",label:"Corner Rounding",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:181},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(We,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),Hy=()=>o.jsxRuntimeExports.jsx(Ve,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(ne.Space,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",children:[o.jsxRuntimeExports.jsx(Ze,{path:"color"}),o.jsxRuntimeExports.jsx(Ze,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(We,{path:"radius",label:"Radius",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(We,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),Zu=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"}],Zy=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsxs(Ve,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsx(Sr,{path:""}),";"]});default:return o.jsxRuntimeExports.jsxs(Ve,{x:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(Ze,{path:"color"}),o.jsxRuntimeExports.jsx(be,{path:"units",label:"Units",align:"start",padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(mt.Text,{...s})}),o.jsxRuntimeExports.jsx(We,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:{dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"}}),o.jsxRuntimeExports.jsx(be,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(un,{...s})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]})}},[]),t=Ne.useStatic({tabs:Zu,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},Wy=({path:e})=>{var x;const{value:t,onChange:n}=_t({path:e}),s=B.sourcePipelinePropsZ.parse((x=t.source)==null?void 0:x.props),r=B.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=B.withinBoundsProps.parse(s.segments.threshold.props),l=d=>{d??(d=0);const p=B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:d}),threshold:B.withinBounds({trueBound:{lower:i.trueBound.lower??.9,upper:i.trueBound.upper??1.1}})},outlet:"threshold"});n({...t,source:p})},c=d=>{const p=B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:r.channel}),threshold:B.withinBounds({trueBound:d})},outlet:"threshold"});n({...t,source:p})},a=$s(r.channel);return g.useEffect(()=>n({...t}),[a]),o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(je.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(zt,{value:r.channel,onChange:l})}),o.jsxRuntimeExports.jsx(je.Item,{label:"Lower Threshold",children:o.jsxRuntimeExports.jsx(je.Numeric,{value:i.trueBound.lower??.9,onChange:d=>c({...i.trueBound,lower:d})})}),o.jsxRuntimeExports.jsx(je.Item,{label:"Upper Threshold",children:o.jsxRuntimeExports.jsx(je.Numeric,{value:i.trueBound.upper??1.1,onChange:d=>c({...i.trueBound,upper:d})})})]})},Yy=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsx(Wy,{path:""});default:return o.jsxRuntimeExports.jsx(de,{})}},[]),t=Ne.useStatic({tabs:Zu,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},Gy=({path:e})=>{var l;const{value:t,onChange:n}=_t({path:e}),s=B.sinkPipelinePropsZ.parse((l=t.sink)==null?void 0:l.props),r=B.setChannelValuePropsZ.parse(s.segments.setter.props),i=c=>{c??(c=0);const a=B.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:B.setChannelValue({channel:c}),setpoint:B.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),x=B.authoritySource({channel:c}),d=B.acquireChannelControl({channel:c,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:x},showIndicator:!0,indicator:{statusSource:x}}})};return o.jsxRuntimeExports.jsxs(Ve,{x:!0,children:[o.jsxRuntimeExports.jsx(je.Item,{label:"Output Channel",grow:!0,children:o.jsxRuntimeExports.jsx(zt,{value:r.channel,onChange:i})}),o.jsxRuntimeExports.jsx(We,{label:"Activation Delay",path:"onClickDelay",inputProps:{endContent:"ms"},hideIfNull:!0}),o.jsxRuntimeExports.jsx(Bs,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},Ky=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(Gy,{path:""});default:return o.jsxRuntimeExports.jsx(de,{omit:["align","maxInlineSize"],hideInnerOrientation:!0,hideOuterOrientation:!0})}},[]),t=Ne.useStatic({tabs:Dr,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},qy=({path:e})=>{var l;const{value:t,onChange:n}=_t({path:e}),s=B.sinkPipelinePropsZ.parse((l=t.sink)==null?void 0:l.props),r=B.setChannelValuePropsZ.parse(s.segments.setter.props),i=c=>{c??(c=0);const a=B.sinkPipeline("number",{connections:[],segments:{setter:B.setChannelValue({channel:c})},inlet:"setter"}),x=B.authoritySource({channel:c}),d=B.acquireChannelControl({channel:c,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:x},showIndicator:!0,indicator:{statusSource:x}},disabled:c==0})};return o.jsxRuntimeExports.jsx(Ve,{x:!0,grow:!0,align:"stretch",children:o.jsxRuntimeExports.jsx(je.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(zt,{value:r.channel,onChange:i})})})},Xy=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(qy,{path:""});default:return o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,align:"stretch",grow:!0,size:"small",children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(mr,{path:"units",label:"Units",align:"start",padHelpText:!1}),o.jsxRuntimeExports.jsx(be,{path:"size",label:"Size",hideIfNull:!0,padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(Xl,{...s})}),o.jsxRuntimeExports.jsx(Ze,{path:"color"})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]})}},[]),t=Ne.useStatic({tabs:Dr,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},Uy=()=>{const e=_t({path:"autoFit",optional:!0});return o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(be,{path:"text",label:"Text",padHelpText:!1,grow:!0,children:t=>o.jsxRuntimeExports.jsx(mt.Text,{...t})}),o.jsxRuntimeExports.jsx(be,{path:"level",label:"Text Size",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(un,{...t})}),o.jsxRuntimeExports.jsx(be,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:t=>o.jsxRuntimeExports.jsx(Is,{...t})})]}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(Ze,{path:"color"}),o.jsxRuntimeExports.jsx(be,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(je.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:o.jsxRuntimeExports.jsx(ge.Icon,{onClick:()=>e==null?void 0:e.onChange(!0),disabled:(e==null?void 0:e.value)===!0,variant:"outlined",tooltip:(e==null?void 0:e.value)===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:o.jsxRuntimeExports.jsx(Z.y4.AutoFitWidth,{})})})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:""})]})},Jy=()=>o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label",omit:["maxInlineSize","align","direction"]}),o.jsxRuntimeExports.jsx(Ze,{path:"color"})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideOuter:!0})]}),Qy=()=>o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(Ze,{path:"color"}),o.jsxRuntimeExports.jsx(Ze,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(be,{path:"dimensions.width",label:"Width",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(je.Numeric,{value:e??200,dragScale:St,bounds:vn,endContent:"px",...t})}),o.jsxRuntimeExports.jsx(be,{path:"dimensions.height",label:"Height",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(je.Numeric,{value:e??200,dragScale:St,bounds:vn,endContent:"px",...t})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]}),Zt=()=>o.jsxRuntimeExports.jsxs(Ve,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Ze,{path:"color"}),o.jsxRuntimeExports.jsx(Fu,{path:"scale"}),o.jsxRuntimeExports.jsx(Bs,{path:"clickable",label:"Clickable",hideIfNull:!0,optional:!0})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:""})]}),eS=()=>o.jsxRuntimeExports.jsx(Hu,{includeBorderRadius:!0,includeStrokeWidth:!0}),tS=()=>o.jsxRuntimeExports.jsx(we,{hideInnerOrientation:!0}),L=e=>o.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),Se=e=>o.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),Ae=e=>o.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),Ee=e=>o.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),nS={left:{left:U.Left,right:U.Right,top:U.Top,bottom:U.Bottom},right:{left:U.Right,right:U.Left,top:U.Bottom,bottom:U.Top},top:{left:U.Bottom,right:U.Top,top:U.Left,bottom:U.Right},bottom:{left:U.Top,right:U.Bottom,top:U.Right,bottom:U.Left}},sS=(e,t)=>nS[t][e],oS=(e,t=!1)=>{if(t)return e;switch(e){case U.Left:return U.Right;case U.Right:return U.Left;case U.Top:return U.Bottom;case U.Bottom:return U.Top;default:return U.Top}},rS=(e,t,n,s=!1)=>s?{left:t,top:e}:n==="left"?{top:e,left:t}:n==="right"?{top:100-e,left:100-t}:n==="top"?{top:100-t,left:e}:{top:t,left:100-e},K=({children:e,orientation:t,refreshDeps:n})=>{let s;try{s=z4()}catch{return null}const r=g.useRef(null),i=g.useRef(!0);return g.useEffect(()=>{if(r.current==null)return;if(i.current){i.current=!1;return}const l=r.current.closest(".react-flow__node"),c=l==null?void 0:l.getAttribute("data-id");c!=null&&(s==null||s(c))},[t,n]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("span",{ref:r}),e]})},b=({location:e,orientation:t,preventAutoAdjust:n,left:s,swap:r,top:i,style:l,...c})=>{const a=rS(i,s,t,n);return o.jsxRuntimeExports.jsx(In,{position:oS(sS(e,t),!r),...c,type:"source",onClick:x=>x.stopPropagation(),className:(u.CSS.B("handle"),u.CSS.BE("handle",c.id)),style:{left:`${a.left}%`,top:`${a.top}%`,...l}})},ye=({className:e,enabled:t=!1,triggered:n=!1,orientation:s="left",color:r,...i})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("symbol-primitive"),u.CSS.B("symbol-primitive-toggle"),s!=null&&u.CSS.loc(s),t&&u.CSS.M("enabled"),n&&u.CSS.M("triggered"),e),color:u.cssString(r),...i}),re=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.B("symbol-primitive"),e),...t}),iS=.8,X=({dimensions:e,orientation:t="left",children:n,className:s,color:r,style:i={},scale:l=1,...c})=>{e=u.g.construct(t)==="y"?u._.swap(e):e;const x=u.cssString(r),d=Q.use();return r!=null&&(i[u.CSS.var("symbol-color")]=new u.Color(r).rgbString,i[u.CSS.var("symbol-color-contrast")]=new u.Color(r).pickByContrast(d.colors.gray.l0,d.colors.gray.l11).rgbString),o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:u._.svgViewBox(e),className:u.CSS(u.CSS.loc(t),s),fill:x,stroke:x,...c,style:{aspectRatio:`${e.width} / ${e.height}`,width:u._.scale(e,l*iS).width,...i},children:o.jsxRuntimeExports.jsx("g",{children:n})})},Wu=({className:e,orientation:t="left",scale:n,color:s,...r})=>{const i=u.cssString(s);return o.jsxRuntimeExports.jsxs(ye,{...r,orientation:t,className:u.CSS(u.CSS.B("four-way-valve"),e),children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:12.037,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:87.963,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:7.2916,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:92.6084,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:108,height:96},color:s,scale:n,children:[o.jsxRuntimeExports.jsx(L,{d:"M3.02937 72.7038C2.50936 73.1041 2.50936 73.8883 3.02937 74.2886L7.14001 77.453C7.79757 77.9592 8.75 77.4904 8.75 76.6606V70.3318C8.75 69.502 7.79757 69.0332 7.14001 69.5394L3.02937 72.7038Z",fill:i}),o.jsxRuntimeExports.jsx(L,{d:"M54.2 48L17.0545 29.2035C15.059 28.1937 12.7 29.6438 12.7 31.8803V64.1197C12.7 66.3562 15.059 67.8063 17.0545 66.7965L54.2 48ZM54.2 48L91.3455 29.2035C93.341 28.1937 95.7 29.6438 95.7 31.8803V64.1197C95.7 66.3562 93.341 67.8063 91.3455 66.7965L54.2 48Z"}),o.jsxRuntimeExports.jsx(L,{d:"M54.2 48L35.4035 85.1455C34.3937 87.141 35.8439 89.5 38.0803 89.5H70.3197C72.5562 89.5 74.0063 87.141 72.9965 85.1455L54.2 48ZM54.2 48L35.4035 10.8545C34.3937 8.85901 35.8439 6.5 38.0803 6.5H70.3197C72.5562 6.5 74.0063 8.85901 72.9965 10.8545L54.2 48Z"}),o.jsxRuntimeExports.jsx(L,{d:"M8.70001 73.5C24.7 73.5 28.7 86.8333 28.7 93.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M105.371 23.2962C105.891 22.8959 105.891 22.1117 105.371 21.7114L101.26 18.547C100.602 18.0408 99.65 18.5096 99.65 19.3394V25.6682C99.65 26.498 100.602 26.9668 101.26 26.4606L105.371 23.2962Z",fill:i}),o.jsxRuntimeExports.jsx(L,{d:"M99.7 22.5C83.7 22.5 79.7 9.16667 79.7 2.5","stroke-linecap":"round"})]})]})},Yu=({color:e,orientation:t="left",scale:n,...s})=>o.jsxRuntimeExports.jsxs(ye,{...s,className:u.CSS(u.CSS.B("three-way-valve")),orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(L,{d:"M44.3923 22.3611C44.0222 21.6298 42.9778 21.6298 42.6077 22.3611L24.7035 57.7433C23.6937 59.7388 25.1438 62.0978 27.3803 62.0978L59.6197 62.0978C61.8562 62.0978 63.3063 59.7388 62.2965 57.7433L44.3923 22.3611Z"})]})]}),Gu=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(ye,{...s,children:[o.jsxRuntimeExports.jsxs(K,{orientation:e,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:97.7701,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:o.jsxRuntimeExports.jsx(L,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"})})]}),Ku=({className:e,color:t,orientation:n="left",normallyOpen:s=!1,scale:r,...i})=>o.jsxRuntimeExports.jsxs(ye,{className:u.CSS(u.CSS.B("solenoid-valve"),s&&u.CSS.M("normally-open"),e),...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:69.5652,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:69.5652,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:33.3333,top:17.7778,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:2.8986,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:66.6667,top:17.7778,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:69},color:t,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(L,{className:u.CSS.B("body"),d:"M43.5 48L6.35453 29.2035C4.35901 28.1937 2 29.6438 2 31.8803V64.1197C2 66.3562 4.35901 67.8063 6.35453 66.7965L43.5 48ZM43.5 48L80.6455 29.2035C82.641 28.1937 85 29.6438 85 31.8803V64.1197C85 66.3562 82.641 67.8063 80.6455 66.7965L43.5 48Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),o.jsxRuntimeExports.jsx(Se,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),qu=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{className:u.CSS(u.CSS.B("relief-valve"),e),enabled:r,...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:63.7931,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:63.7931,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:58},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 37L6.35453 18.2035C4.35901 17.1937 2 18.6438 2 20.8803V53.1197C2 55.3562 4.35901 56.8063 6.35453 55.7965L43.5 37ZM43.5 37L80.6455 18.2035C82.641 17.1937 85 18.6438 85 20.8803V53.1197C85 55.3562 82.641 56.8063 80.6455 55.7965L43.5 37Z"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),Xu=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{orientation:t,className:u.CSS(u.CSS.B("check-valve"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:4.2222,top:48.8372,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:94.2038,top:48.8372,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:45,height:43},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M41.6607 21.8946C42.3917 21.5238 42.3906 20.4794 41.6589 20.1101L6.25889 2.2412C4.26237 1.23341 1.90481 2.68589 1.90704 4.92235L1.93925 37.1617C1.94148 39.3982 4.30194 40.846 6.29644 39.8342L41.6607 21.8946Z"})]})]}),Uu=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.cssString(n);return o.jsxRuntimeExports.jsxs(re,{...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:8.3333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.4286,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:84,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"7",cy:"7",r:"4",fill:i}),o.jsxRuntimeExports.jsx(L,{d:"M7 39.5V11.5941C7 9.42886 9.22384 7.97669 11.2063 8.84738L76.7937 37.6526C78.7762 38.5233 81 37.0711 81 34.9059V6",strokeLinecap:"round"})]})]})},Ju=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.cssString(n);return o.jsxRuntimeExports.jsxs(re,{orientation:t,className:u.CSS(u.CSS.B("check-valve-with-arrow"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:8.602,top:60.65,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.775,top:60.65,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:93,height:57},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M67.4706 5.20759C67.9906 5.6079 67.9906 6.3921 67.4706 6.79241L63.36 9.95678C62.7024 10.463 61.75 9.99421 61.75 9.16437V2.83563C61.75 2.00579 62.7024 1.53702 63.36 2.04322L67.4706 5.20759Z",fill:i}),o.jsxRuntimeExports.jsx(L,{d:"M62.5 6H32.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(Ae,{cx:"7.5",cy:"13.5",r:"6",fill:i}),o.jsxRuntimeExports.jsx(L,{d:"M49 34.5L11.8545 15.7035C9.85901 14.6937 7.5 16.1438 7.5 18.3803V50.6197C7.5 52.8562 9.85901 54.3063 11.8545 53.2965L49 34.5ZM49 34.5L86.1455 15.7035C88.141 14.6937 90.5 16.1438 90.5 18.3803V50.6197C90.5 52.8562 88.141 54.3063 86.1455 53.2965L49 34.5Z"})]})]})},Qu=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,orientation:n,className:u.CSS(u.CSS.B("angled-valve"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:32.8125,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.0278,top:32.8125,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M22.3611 20.1077C21.6298 20.4778 21.6298 21.5222 22.3611 21.8923L57.7433 39.7965C59.7388 40.8063 62.0978 39.3562 62.0978 37.1197L62.0978 4.88029C62.0978 2.64384 59.7388 1.19372 57.7433 2.2035L22.3611 20.1077Z"}),o.jsxRuntimeExports.jsx(L,{d:"M21.8923 22.3611C21.5222 21.6298 20.4778 21.6298 20.1077 22.3611L2.20349 57.7433C1.19372 59.7388 2.64384 62.0978 4.8803 62.0978L37.1197 62.0978C39.3562 62.0978 40.8063 59.7388 39.7965 57.7433L21.8923 22.3611Z"})]})]}),ex=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"43.5978",cy:"20.972",r:"19"}),o.jsxRuntimeExports.jsx(L,{d:"M26.5 12.8472L6.35452 2.17563C4.35901 1.16585 2 2.61598 2 4.85243V37.0918C2 39.3283 4.35901 40.7784 6.35453 39.7686L26.5 29.3472"}),o.jsxRuntimeExports.jsx(L,{d:"M60.5 28.8486L80.6455 39.5202C82.641 40.5299 85 39.0798 85 36.8434V4.60396C85 2.36751 82.641 0.917381 80.6455 1.92716L60.5 12.3486"})]})]}),tx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("three-way-ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.8,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"43.5978",cy:"21.722",r:"19"}),o.jsxRuntimeExports.jsx(L,{d:"M26.5 13.5972L6.35452 2.92563C4.35901 1.91585 2 3.36598 2 5.60243V37.8418C2 40.0783 4.35901 41.5284 6.35453 40.5186L26.5 30.0972"}),o.jsxRuntimeExports.jsx(L,{d:"M60.5 29.5986L80.6455 40.2702C82.641 41.2799 85 39.8298 85 37.5934V5.35396C85 3.11751 82.641 1.66738 80.6455 2.67716L60.5 13.0986"}),o.jsxRuntimeExports.jsx(L,{d:"M35.3737 38.7499L24.7021 58.8954C23.6923 60.8909 25.1425 63.2499 27.3789 63.2499H59.6183C61.8548 63.2499 63.3049 60.8909 62.2951 58.8954L51.8737 38.7499"})]})]}),nx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("gate-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 2 L43.5 39.7965"})]})]}),sx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-one"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 2V40"}),o.jsxRuntimeExports.jsx(Ae,{cx:"43.5",cy:"21",r:"10",fill:u.cssString(e)})]})]}),ox=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-two"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"43.5",cy:"21",r:"10",fill:u.cssString(e)}),o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"83",height:"38",rx:"1"}),o.jsxRuntimeExports.jsx(L,{d:"M2.29001 2.29004L84.7069 39.676"})]})]}),rx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("breather-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:8.081,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:91.919,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:99,height:57},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"91",cy:"49.5",r:"6",fill:u.cssString(e)}),o.jsxRuntimeExports.jsx(Ae,{cx:"8",cy:"7.5",r:"6",fill:u.cssString(e)}),o.jsxRuntimeExports.jsx(L,{d:"M49.5 28.5L12.3545 9.70349C10.359 8.69372 8 10.1438 8 12.3803V44.6197C8 46.8562 10.359 48.3063 12.3545 47.2965L49.5 28.5ZM49.5 28.5L86.6455 9.70349C88.641 8.69372 91 10.1438 91 12.3803V44.6197C91 46.8562 88.641 48.3063 86.6455 47.2965L49.5 28.5Z"})]})]}),ix=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)})]})]}),lx=({className:e,color:t,orientation:n="left",scale:s,...r})=>{const i=u.cssString(t);return o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:5,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:40,height:48},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"}),o.jsxRuntimeExports.jsx(L,{d:"M37.9706 23.2076C38.4906 23.6079 38.4906 24.3921 37.9706 24.7924L33.86 27.9568C33.2024 28.463 32.25 27.9942 32.25 27.1644V20.8356C32.25 20.0058 33.2024 19.537 33.86 20.0432L37.9706 23.2076Z",fill:i}),o.jsxRuntimeExports.jsx(L,{d:"M33 24H2",strokeLinecap:"round"})]})]})},cx=({className:e,color:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:11.1111,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:36,height:72},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"4",y:"4",width:"28",height:"64",rx:"2",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M13 68V47C13 46.4477 13.4489 45.9892 13.9928 45.8933C16.1351 45.5152 21 43.7981 21 36C21 28.2019 16.1351 26.4848 13.9928 26.1068C13.4489 26.0108 13 25.5523 13 25V4",strokeWidth:"2"})]})]}),ax=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:26,height:48},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"})})]}),ux=({className:e,orientation:t="left",color:n,scale:s=1,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:50,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:36,height:48},orientation:t,scale:s*.6,children:o.jsxRuntimeExports.jsx(L,{d:"M3 3H30C31.6569 3 33 4.34315 33 6V42C33 43.6569 31.6569 45 30 45H3",strokeLinecap:"round"})})]}),xx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("manual-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:56.25,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:56.25,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:48},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),o.jsxRuntimeExports.jsx(L,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 27L6.35453 8.20349C4.35901 7.19372 2 8.64384 2 10.8803V43.1197C2 45.3562 4.35901 46.8063 6.35453 45.7965L43.5 27ZM43.5 27L80.6455 8.20349C82.641 7.19372 85 8.64384 85 10.8803V43.1197C85 45.3562 82.641 46.8063 80.6455 45.7965L43.5 27Z"})]})]}),dx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("orifice_plate"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.875,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{color:n,dimensions:{width:72,height:35},orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M24.5 2V7.5V13","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M24.5 33V22","stroke-linecap":"round"})]})]}),jl=(e,t)=>e/t*100,px=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:11.5385,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:88.4615,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:52,height:34},orientation:t,color:n,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M6 17L24.8 2.9C25.5111 2.36667 26.4889 2.36667 27.2 2.9L46 17M6 17L24.8 31.1C25.5111 31.6333 26.4889 31.6333 27.2 31.1L46 17"})})]}),mx=e=>typeof e=="number"?{topLeft:u.J.construct(e),topRight:u.J.construct(e),bottomLeft:u.J.construct(e),bottomRight:u.J.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:u.J.construct(e.topLeft),topRight:u.J.construct(e.topRight),bottomLeft:u.J.construct(e.bottomLeft),bottomRight:u.J.construct(e.bottomRight)}:e,lS=e=>{const{topLeft:t,topRight:n,bottomLeft:s,bottomRight:r}=e;return`${t.x}% ${n.x}% ${r.x}% ${s.x}% / ${t.y}% ${n.y}% ${r.y}% ${s.y}%`},fx={width:40,height:80},Or={x:50,y:10},to=({className:e,dimensions:t=fx,borderRadius:n=Or,boxBorderRadius:s,color:r,backgroundColor:i,strokeWidth:l=2,...c})=>{const a=mx(n),x=s==null,d=Q.use(),{width:p,height:m}=t,f=g.useMemo(()=>[t,n,a],[a.bottomLeft,a.bottomRight,a.topLeft,a.topRight,m,p]),h=jl(1,p),j=100-h,y=jl(1,m),S=100-y;return o.jsxRuntimeExports.jsx(re,{className:u.CSS(e,u.CSS.B("tank")),style:{...t,borderRadius:s??lS(a),borderColor:u.cssString(r??d.colors.gray.l11),backgroundColor:u.cssString(i),borderWidth:l},...c,children:o.jsxRuntimeExports.jsxs(K,{refreshDeps:f,orientation:"left",children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:y,id:"1"}),x&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:h,top:a.topLeft.y,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:j,top:a.topRight.y,id:"3"})]}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:S,id:"4"}),x&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:h,top:100-a.bottomLeft.y,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:j,top:100-a.bottomRight.y,id:"6"})]}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:h,top:50,id:"7"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:j,top:50,id:"8"})]})})},cS=20,aS=(e,t,n=0,s=4)=>{const r=2*Math.PI/e,i=n*Math.PI/180,l=t/(2*Math.sin(Math.PI/e)),c=l+s/2;return Array.from({length:e}).map((a,x)=>{const d=r*x+i-Math.PI/2;return{x:c+l*Math.cos(d),y:c+l*Math.sin(d)}})},uS=(e,t,n)=>{const s=[],r=Math.min(n,t/2),i=e.length;if(i<3||r<=0)return`M ${e.map(l=>`${l.x},${l.y}`).join(" L ")} Z`;for(let l=0;l<i;l++){const c=e[(l-1+i)%i],a=e[l],x=e[(l+1)%i],d=a.x-c.x,p=a.y-c.y,m=x.x-a.x,f=x.y-a.y,h=Math.hypot(d,p),j=Math.hypot(m,f),y=r/h,S=r/j,w=a.x-d*y,E=a.y-p*y,C=a.x+m*S,N=a.y+f*S;l===0?s.push(`M ${w},${E}`):s.push(`L ${w},${E}`),s.push(`Q ${a.x},${a.y} ${C},${N}`)}return s.push("Z"),s.join(" ")},Vr=({numSides:e,sideLength:t,rotation:n=0,color:s,backgroundColor:r,className:i,cornerRounding:l,strokeWidth:c,...a})=>{const x=Q.use(),d=g.useMemo(()=>2*((c??2)+1),[c]),p=g.useMemo(()=>aS(e,t,n,d),[e,t,n,d]),m=g.useMemo(()=>uS(p,t,l??0),[p,t,l]),f=g.useMemo(()=>2*(t/(2*Math.sin(Math.PI/e)))+d,[t,e,d]);return o.jsxRuntimeExports.jsx(re,{className:u.CSS(i,u.CSS.B("polygon")),...a,children:o.jsxRuntimeExports.jsx(X,{dimensions:{width:f,height:f},children:o.jsxRuntimeExports.jsx(L,{d:m,fill:u.cssString(r??x.colors.gray.l1),stroke:u.cssString(s??x.colors.gray.l9),strokeWidth:c??2})})})},hx=({radius:e,color:t,backgroundColor:n,className:s,strokeWidth:r,...i})=>{const l=Q.use(),c=(r??2)+1,a=e*2,x=a+2*c,d=a+2*c;return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(s,u.CSS.B("circle-shape")),...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:"left",refreshDeps:[e],children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:c/d*100,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:(d-c)/d*100,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:c/x*100,top:50,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:(x-c)/x*100,top:50,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:x,height:d},children:o.jsxRuntimeExports.jsx(Ae,{cx:x/2,cy:d/2,r:e,stroke:u.cssString(t??l.colors.gray.l9),strokeWidth:r??2,fill:u.cssString(n??l.colors.gray.l1)})})]})},gx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50.9091,top:12.5,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:88,height:80},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),o.jsxRuntimeExports.jsx(L,{d:"M61 30C62.6569 30 64.0231 28.6494 63.7755 27.0111C63.141 22.8129 61.181 18.8968 58.1421 15.8579C54.3914 12.1071 49.3043 10 44 10C38.6957 10 33.6086 12.1071 29.8579 15.8579C26.819 18.8968 24.859 22.8129 24.2245 27.0111C23.9769 28.6494 25.3431 30 27 30L44.5 30H61Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),jx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator-manual")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:2.2989,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.381,top:75,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.619,top:75,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:84},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 20L43.5 2","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M19.5 2L67.5 2","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 63L6.35453 44.2035C4.35901 43.1937 2 44.6438 2 46.8803V79.1197C2 81.3562 4.35901 82.8063 6.35453 81.7965L43.5 63ZM43.5 63L80.6455 44.2035C82.641 43.1937 85 44.6438 85 46.8803V79.1197C85 81.3562 82.641 82.8063 80.6455 81.7965L43.5 63Z"}),o.jsxRuntimeExports.jsx(L,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(L,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43.5",y1:"63",x2:"43.5",y2:"40"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 20V18C43.5 16.3431 44.8431 15 46.5 15H79.5C81.1569 15 82.5 16.3431 82.5 18V34.4281C82.5 35.4126 82.017 36.3344 81.2076 36.8947L43.5 63"})]})]}),Ex=({className:e,orientation:t="left",scale:n,color:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("orifice"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.8571,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.1429,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:70,height:34},orientation:t,color:s,scale:n,children:[o.jsxRuntimeExports.jsx(L,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),yx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("needle-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:51.1905,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:51.1905,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.0152 21.5391L38.237 2.62245C38.1573 2.30658 38.396 2 38.7218 2L48.2782 2C48.604 2 48.8427 2.30658 48.763 2.62245L43.9848 21.5391C43.8576 22.0425 43.1424 22.0425 43.0152 21.5391Z",fill:u.cssString(n)}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 21.5L6.35453 2.70349C4.35901 1.69372 2 3.14384 2 5.38029V37.6197C2 39.8562 4.35901 41.3063 6.35453 40.2965L43.5 21.5ZM43.5 21.5L80.6455 2.70349C82.641 1.69372 85 3.14384 85 5.3803V37.6197C85 39.8562 82.641 41.3063 80.6455 40.2965L43.5 21.5Z"})]})]}),Sx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("angled-relief-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:32.8125,top:97.5922,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.0278,top:45.5639,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:79},orientation:n,color:e,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M22.3611 35.1077C21.6298 35.4778 21.6298 36.5222 22.3611 36.8923L57.7433 54.7965C59.7388 55.8063 62.0978 54.3562 62.0978 52.1197L62.0978 19.8803C62.0978 17.6438 59.7388 16.1937 57.7433 17.2035L22.3611 35.1077Z"}),o.jsxRuntimeExports.jsx(L,{d:"M21.8923 37.3611C21.5222 36.6298 20.4778 36.6298 20.1077 37.3611L2.20349 72.7433C1.19372 74.7388 2.64384 77.0978 4.8803 77.0978H37.1197C39.3562 77.0978 40.8063 74.7388 39.7965 72.7433L21.8923 37.3611Z"})]})]}),Rx=({className:e,color:t,dimensions:n,orientation:s="left",units:r="psi",unitsLevel:i="small",children:l,inlineSize:c=80,...a})=>{const x=u.cssString(t),d=Q.use(),p=t==null?"var(--pluto-gray-l0)":u.cssString(new u.Color(t).pickByContrast(d.colors.gray.l0,d.colors.gray.l11));return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("value"),e),...a,style:{borderColor:x,height:n==null?void 0:n.height,width:"100%"},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n==null?void 0:n.width,inlineSize:c},children:l}),o.jsxRuntimeExports.jsxs(K,{orientation:s,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.BE("value","units"),u.CSS.M(i)),style:{background:x},children:o.jsxRuntimeExports.jsx(Z.Text,{level:i,color:p,children:r})})]})},Cx=({enabled:e=!1,onClick:t,orientation:n="left"})=>o.jsxRuntimeExports.jsxs(re,{orientation:n,children:[o.jsxRuntimeExports.jsx(Q.Switch$1,{value:e,onClick:t,onChange:()=>{}}),o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:100,top:50,id:"2"})]})]}),bx=({onClick:e,orientation:t="left",label:n="",color:s,size:r,level:i,onClickDelay:l})=>o.jsxRuntimeExports.jsxs(re,{orientation:t,children:[o.jsxRuntimeExports.jsx(ge.Button,{onClick:e,color:s,size:r,level:i,onClickDelay:l,children:n}),o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:0,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:100,id:"4"})]})]}),wx=({className:e,orientation:t="left",text:n="",width:s,color:r="var(--pluto-gray-l11)",level:i,autoFit:l,align:c="center"})=>{const a={textAlign:c};return u.g.construct(t)==="y"?a.height=l?"fit-content":s:a.width=l?"fit-content":s,o.jsxRuntimeExports.jsx(re,{style:a,orientation:t,className:u.CSS(u.CSS.B("text-box"),u.CSS.loc(t),e),children:o.jsxRuntimeExports.jsx(Z.Text,{color:u.cssString(r),level:i,children:n})})},vx=({orientation:e="left",className:t,onClick:n,children:s,value:r,units:i,color:l,onChange:c,size:a="small",disabled:x,...d})=>{const[p,m]=g.useState(r);return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("setpoint"),t),orientation:e,...d,children:[o.jsxRuntimeExports.jsxs(K,{orientation:e,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:.5,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:100,top:50,id:"2",style:{zIndex:5}}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:e,left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:e,left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx(je.Numeric,{size:a,value:p,onChange:m,showDragHandle:!1,selectOnFocus:!0,endContent:i,outlineColor:l,borderWidth:1,disabled:x,children:o.jsxRuntimeExports.jsx(ge.Button,{size:a,variant:"filled",onClick:()=>c(p),color:l,children:"Set"})})]})},kx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("screw-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(L,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(32, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(L,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(42, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Mx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("vacuum-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"})})]}),_x=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("cavity-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(L,{d:"M 17 26 C 17 20.6667 23 20.6667 23 26 C 23 31.3333 29 31.3333 29 26 C 29 20.6667 35 20.6667 35 26",strokeLinecap:"round",transform:"translate(6, 6)",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Px=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("piston-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ae,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(L,{d:"M 23 32, h 16, m 0 -8, v 16",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),Lx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("static-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.5152,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.4848,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.3333,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.6667,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:30},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),Nx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("rotary-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2,top:48.4849,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.5,top:48.4849,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:50,height:33},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M1 30V2C1 1.44772 1.44772 1 2 1H35.4545C35.7434 1 36.0181 1.12487 36.208 1.34247L48.4262 15.3425C48.7549 15.7192 48.7549 16.2808 48.4262 16.6575L36.208 30.6575C36.0181 30.8751 35.7434 31 35.4545 31H2C1.44772 31 1 30.5523 1 30Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Tx=({className:e,color:t,orientation:n="left",enabled:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,orientation:n,className:u.CSS(u.CSS.B("light"),s&&u.CSS.M("enabled"),e),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.75,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:64,height:64},color:t,orientation:n,scale:r,children:o.jsxRuntimeExports.jsx(Ae,{cx:"32",cy:"32",r:"30"})})]}),$x=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.29885,top:69.565,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.70115,top:69.565,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:23.1479,top:23.61,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:11.11,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:76.8521,top:23.61,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:69},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 49L6.35453 30.2035C4.35901 29.1937 2 30.6438 2 32.8803V65.1197C2 67.3562 4.35901 68.8063 6.35453 67.7965L43.5 49ZM43.5 49L80.6455 30.2035C82.641 29.1937 85 30.6438 85 32.8803V65.1197C85 67.3562 82.641 68.8063 80.6455 67.7965L43.5 49Z"}),o.jsxRuntimeExports.jsx(Se,{x:"21",y:"6.5",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M43 6.5V4C43 2.34315 44.3431 1 46 1H79C80.6569 1 82 2.34315 82 4V20.4281C82 21.4126 81.517 22.3344 80.7076 22.8947L43 49"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"49",x2:"43",y2:"24.5"})]})]}),Ax=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator-motorized")),...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:35.6321,top:13.72549,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:1.96078,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:64.3679,top:13.72549,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:24.1379,top:46.078,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:75.8621,top:46.078,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:78.43137,id:"6"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:78.43137,id:"7"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:102},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 80.5L6.35453 61.7035C4.35901 60.6937 2 62.1438 2 64.3803V96.6197C2 98.8562 4.35901 100.306 6.35453 99.2965L43.5 80.5ZM43.5 80.5L80.6455 61.7035C82.641 60.6937 85 62.1438 85 64.3803V96.6197C85 98.8562 82.641 100.306 80.6455 99.2965L43.5 80.5Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"80.5",x2:"43",y2:"56"}),o.jsxRuntimeExports.jsx(L,{d:"M43 38V35.5C43 33.8431 44.3431 32.5 46 32.5H79C80.6569 32.5 82 33.8431 82 35.5V51.9281C82 52.9126 81.517 53.8344 80.7076 54.3947L43 80.5"}),o.jsxRuntimeExports.jsx(Se,{x:"21",y:"38",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M43 38V26","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(Ae,{cx:"43",cy:"14",r:"12"})]})]}),Ix=({height:e=86,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:100/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M1 85V48.8541C1 46.624 3.34694 45.1735 5.34164 46.1708L80.6584 83.8292 C82.6531 84.8265 85 83.376 85 81.1459 V44"}),o.jsxRuntimeExports.jsx(L,{d:"M43 1L45 65"})]})]}),zx=({height:e=86,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50.5814,top:200/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M43.5 69.573L14.9534 55.6147C8.97428 52.6911 2 57.0443 2 63.6999V75.4462C2 82.1018 8.97429 86.455 14.9534 83.5314L43.5 69.573ZM43.5 69.573L72.0466 55.6147C78.0257 52.6911 85 57.0443 85 63.6999V75.4462C85 82.1018 78.0257 86.455 72.0466 83.5314L43.5 69.573Z"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),Bx=({height:e=86,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:100/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(Se,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),Dx=({height:e=86,className:t,orientation:n="left",color:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:100/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(Se,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),o.jsxRuntimeExports.jsx(Ee,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"49",x2:"43",y2:"83",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),Ox=({className:e,height:t=86,orientation:n="left",color:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:100/t,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:t},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Se,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),Vx=({className:e,height:t=86,orientation:n="left",color:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:100/t,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:t},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Ee,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M5.375 36L70.8204 48.7138C74.0584 49.3428 74.0573 53.9765 70.8189 54.6039L14.7952 65.4584C11.5729 66.0827 11.5494 70.6856 14.7651 71.3429L81.5208 84.9873",strokeLinecap:"round"})]})]}),Fx=({id:e,className:t,orientation:n="right",label:s="text",color:r="black",level:i="p",onLabelChange:l,...c})=>{const a=document.querySelector(`[data-id="${e}"]`);a&&a.classList.add(n);const x=u.g.construct(n)==="y";return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("arrow"),u.CSS.loc(n),t),orientation:n,...c,children:[o.jsxRuntimeExports.jsx("div",{className:"wrapper",children:o.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:u.cssString(r)},children:o.jsxRuntimeExports.jsx("div",{className:"bg",children:o.jsxRuntimeExports.jsx(Z.MaybeEditable,{value:s,onChange:l,level:i,className:u.CSS.BE("symbol","label")})})})}),o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:x,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:x,id:"2"})]}),o.jsxRuntimeExports.jsx("svg",{style:{visibility:"hidden",position:"absolute"},width:"0",height:"0",xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsxs("filter",{id:"goo",children:[o.jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.5",result:"blur"}),o.jsxRuntimeExports.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),o.jsxRuntimeExports.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})},Hx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("vent"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:22.7273,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:80,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:22,height:32},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M5 3L16.6325 13.8016C17.9107 14.9885 17.9107 17.0115 16.6325 18.1984L5 29",strokeLinecap:"round"})})]}),Zx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("iso-filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:95,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:5,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:60,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"3",y:"3",width:"54",height:"36",rx:"3",ry:"3"}),o.jsxRuntimeExports.jsx(Ee,{x1:"30",y1:"3",x2:"30",y2:"13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"30",y1:"17",x2:"30",y2:"25",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"30",y1:"29",x2:"30",y2:"39",strokeLinecap:"round"})]})]}),Wx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("flow-straightener"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:72,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2.5",y:"2.5",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M10.5 26.5H60.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M10.5 9.5H60.5","stroke-linecap":"round"})]})]}),Yx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("heater-element"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:11.9,top:5.55555556,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:11.9,top:94,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:21,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M2.5 34.0005H14.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M2.5 2.00049L14.5 2.00049","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M14.3793 10.0013C14.9046 10.0013 15.4248 10.1048 15.9101 10.3058C16.3954 10.5068 16.8363 10.8015 17.2078 11.1729C17.5792 11.5443 17.8738 11.9853 18.0749 12.4706C18.2759 12.9559 18.3793 13.4761 18.3793 14.0013C18.3793 14.5266 18.2759 15.0468 18.0749 15.5321C17.8738 16.0174 17.5792 16.4583 17.2078 16.8298C16.8363 17.2012 16.3954 17.4958 15.9101 17.6969C15.4248 17.8979 14.9046 18.0013 14.3793 18.0013"}),o.jsxRuntimeExports.jsx(L,{d:"M14.5 2.00049C15.0253 2.00049 15.5454 2.10395 16.0307 2.30497C16.516 2.50599 16.957 2.80063 17.3284 3.17206C17.6999 3.5435 17.9945 3.98445 18.1955 4.46975C18.3965 4.95506 18.5 5.4752 18.5 6.00049C18.5 6.52578 18.3965 7.04592 18.1955 7.53122C17.9945 8.01652 17.6999 8.45748 17.3284 8.82892C16.957 9.20035 16.516 9.49499 16.0307 9.69601C15.5454 9.89703 15.0253 10.0005 14.5 10.0005"}),o.jsxRuntimeExports.jsx(L,{d:"M14.5 18.0005C15.0253 18.0005 15.5454 18.104 16.0307 18.305C16.516 18.506 16.957 18.8006 17.3284 19.1721C17.6999 19.5435 17.9945 19.9845 18.1955 20.4698C18.3965 20.9551 18.5 21.4752 18.5 22.0005C18.5 22.5258 18.3965 23.0459 18.1955 23.5312C17.9945 24.0165 17.6999 24.4575 17.3284 24.8289C16.957 25.2003 16.516 25.495 16.0307 25.696C15.5454 25.897 15.0253 26.0005 14.5 26.0005"}),o.jsxRuntimeExports.jsx(L,{d:"M14.6206 25.9995C15.1459 25.9995 15.6661 26.103 16.1514 26.304C16.6367 26.505 17.0776 26.7997 17.4491 27.1711C17.8205 27.5425 18.1151 27.9835 18.3162 28.4688C18.5172 28.9541 18.6206 29.4742 18.6206 29.9995C18.6206 30.5248 18.5172 31.0449 18.3162 31.5302C18.1151 32.0155 17.8205 32.4565 17.4491 32.8279C17.0776 33.1994 16.6367 33.494 16.1514 33.695C15.6661 33.896 15.1459 33.9995 14.6206 33.9995"})]})]}),Gx=({className:e,dimensions:t=fx,borderRadius:n=Or,boxBorderRadius:s,color:r,backgroundColor:i,...l})=>{const c=mx(n),a=Q.use(),x=g.useMemo(()=>[t,n,c],[c.bottomLeft,c.bottomRight,c.topLeft,c.topRight,t.height,t.width]),d=u.cssString(r??a.colors.gray.l11),p=i==null?void 0:u.cssString(i),m=t.width/66,f=t.height/180,h=`scale(${m},${f})`;return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("cylinder")),style:{...t},...l,children:[o.jsxRuntimeExports.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:h,children:o.jsxRuntimeExports.jsx("path",{d:"M23 33.6712C11.9844 36.0332 3 42.4382 3 52.8862V174.568C3 176.225 4.34315 177.568 6 177.568H60C61.6569 177.568 63 176.225 63 174.568V52.8862C63 36.3342 40.4511 29.9292 23 33.6712ZM23 33.6712V13.3181C23 0.318109 42.9975 0.318123 42.9975 13.3181V33.6712",vectorEffect:"non-scaling-stroke",strokeWidth:"2",stroke:d,transform:h,fill:p})}),o.jsxRuntimeExports.jsxs(K,{refreshDeps:x,orientation:"left",children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:2,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:35,top:10,id:"9"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:65,top:10,id:"10"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:98.3333,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:4,top:40,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:96,top:40,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:4,top:60,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:96,top:60,id:"6"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:4,top:80,id:"7"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:96,top:80,id:"8"})]})]})},Kx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.cssString(n);return o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.1373,top:69.0785,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.7416,top:72.368,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:89,height:76},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M46.3625 54.1079C45.6312 54.4779 45.6311 55.5223 46.3624 55.8924L81.7435 73.7989C83.7389 74.8088 86.098 73.3588 86.0982 71.1224L86.1002 38.883C86.1003 36.6465 83.7414 35.1962 81.7458 36.2059L46.3625 54.1079Z",stroke:l}),o.jsxRuntimeExports.jsx(L,{d:"M71 38.0014V72.0014",stroke:l,strokeWidth:4,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M41.6389 55.8923C42.3702 55.5222 42.3702 54.4778 41.6389 54.1077L6.2567 36.2035C4.26118 35.1937 1.90217 36.6438 1.90217 38.8803L1.90217 71.1197C1.90217 73.3562 4.26119 74.8063 6.2567 73.7965L41.6389 55.8923Z",stroke:l}),o.jsxRuntimeExports.jsx(Ae,{cx:"44",cy:"55",r:"4",fill:l}),o.jsxRuntimeExports.jsx(L,{d:"M45 4C45 3.44772 44.5523 3 44 3C43.4477 3 43 3.44772 43 4H45ZM37.5777 24.7889L38.0249 23.8944L37.5777 24.7889ZM37.5777 21.2111L38.0249 22.1056L37.5777 21.2111ZM50.4223 31.2111L49.9751 32.1056L50.4223 31.2111ZM37.5777 44.7889L37.1305 45.6833L37.5777 44.7889ZM37.5777 41.2111L37.1305 40.3167L37.5777 41.2111ZM42.8944 47.4472L42.4472 48.3416L42.8944 47.4472ZM45 52V49.2361H43V52H45ZM43.3416 46.5528L38.0249 43.8944L37.1305 45.6833L42.4472 48.3416L43.3416 46.5528ZM38.0249 42.1056L50.8695 35.6833L49.9751 33.8944L37.1305 40.3167L38.0249 42.1056ZM50.8695 30.3167L38.0249 23.8944L37.1305 25.6833L49.9751 32.1056L50.8695 30.3167ZM38.0249 22.1056L50.8695 15.6833L49.9751 13.8944L37.1305 20.3167L38.0249 22.1056ZM50.8695 10.3167L45.5528 7.65836L44.6584 9.44721L49.9751 12.1056L50.8695 10.3167ZM45 6.76393V4H43V6.76393H45ZM45.5528 7.65836C45.214 7.48897 45 7.1427 45 6.76393H43C43 7.90025 43.642 8.93904 44.6584 9.44721L45.5528 7.65836ZM50.8695 15.6833C53.0806 14.5777 53.0807 11.4223 50.8695 10.3167L49.9751 12.1056C50.7121 12.4741 50.7121 13.5259 49.9751 13.8944L50.8695 15.6833ZM38.0249 23.8944C37.2879 23.5259 37.2879 22.4741 38.0249 22.1056L37.1305 20.3167C34.9193 21.4223 34.9194 24.5777 37.1305 25.6833L38.0249 23.8944ZM50.8695 35.6833C53.0806 34.5777 53.0807 31.4223 50.8695 30.3167L49.9751 32.1056C50.7121 32.4741 50.7121 33.5259 49.9751 33.8944L50.8695 35.6833ZM38.0249 43.8944C37.2879 43.5259 37.2879 42.4741 38.0249 42.1056L37.1305 40.3167C34.9193 41.4223 34.9194 44.5777 37.1305 45.6833L38.0249 43.8944ZM45 49.2361C45 48.0998 44.358 47.061 43.3416 46.5528L42.4472 48.3416C42.786 48.511 43 48.8573 43 49.2361H45Z",fill:l,strokeWidth:1})]})]})},qx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.cssString(n);return o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:31.8182,top:98,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:95.6061,top:55.5185,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:101},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M23.3625 55.6237C22.6312 55.9937 22.6311 57.0381 23.3624 57.4082L58.7435 75.3147C60.7389 76.3246 63.098 74.8747 63.0981 72.6382L63.1001 40.3988C63.1003 38.1624 60.7414 36.7121 58.7458 37.7217L23.3625 55.6237Z"}),o.jsxRuntimeExports.jsx(L,{d:"M48 38.633V72.633",strokeLinecap:"round",strokeWidth:4}),o.jsxRuntimeExports.jsx(L,{d:"M21.8923 58.4348C21.5222 57.7035 20.4778 57.7035 20.1077 58.4348L2.20349 93.817C1.19372 95.8125 2.64384 98.1715 4.8803 98.1715H37.1197C39.3562 98.1715 40.8063 95.8125 39.7965 93.817L21.8923 58.4348Z"}),o.jsxRuntimeExports.jsx(Ae,{cx:"21",cy:"56.0737",r:"4",fill:l}),o.jsxRuntimeExports.jsx(L,{d:"M21 53.0105V50.0225C21 49.3397 20.6516 48.704 20.0759 48.3366L15.6419 45.507C14.4098 44.7207 14.4098 42.9214 15.6419 42.1351L26.3581 35.2965C27.5902 34.5102 27.5902 32.7109 26.3581 31.9246L15.6419 25.0859C14.4098 24.2997 14.4098 22.5003 15.6419 21.714L26.3581 14.8754C27.5902 14.0891 27.5902 12.2898 26.3581 11.5035L21.9241 8.67393C21.3484 8.30656 21 7.67087 21 6.98798V4",stroke:l,strokeLinecap:"round"})]})]})},Xx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.8462,top:22.3095,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.1538,top:22.3095,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:92.8571,id:"3"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:39,height:21},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M1.5 5.5V3.5C1.5 2.39543 2.39543 1.5 3.5 1.5H35.5C36.6046 1.5 37.5 2.39543 37.5 3.5V5.5C37.5 6.60457 36.6046 7.5 35.5 7.5H24.5C23.3954 7.5 22.5 8.39543 22.5 9.5V17.5C22.5 18.6046 21.6046 19.5 20.5 19.5H18.5C17.3954 19.5 16.5 18.6046 16.5 17.5V9.5C16.5 8.39543 15.6046 7.5 14.5 7.5H3.5C2.39543 7.5 1.5 6.60457 1.5 5.5Z",fill:u.cssString(n),stroke:"none"})})]}),Ux=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.8462,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.1539,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50.5,top:96.1539,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50.5,top:3.8462,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:39,height:39},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M22.5 35.5C22.5 36.6046 21.6046 37.5 20.5 37.5H18.5C17.3954 37.5 16.5 36.6046 16.5 35.5V24.5C16.5 23.3954 15.6046 22.5 14.5 22.5H3.5C2.39543 22.5 1.5 21.6046 1.5 20.5V18.5C1.5 17.3954 2.39543 16.5 3.5 16.5H14.5C15.6046 16.5 16.5 15.6046 16.5 14.5V3.5C16.5 2.39543 17.3954 1.5 18.5 1.5H20.5C21.6046 1.5 22.5 2.39543 22.5 3.5V14.5C22.5 15.6046 23.3954 16.5 24.5 16.5H35.5C36.6046 16.5 37.5 17.3954 37.5 18.5V20.5C37.5 21.6046 36.6046 22.5 35.5 22.5H24.5C23.3954 22.5 22.5 23.3954 22.5 24.5V35.5Z",fill:u.cssString(n),stroke:"none"})})]}),Ue=({position:e,color:t})=>o.jsxRuntimeExports.jsx("text",{x:(e==null?void 0:e.x)??57,y:(e==null?void 0:e.y)??27,style:{fill:u.cssString(t),fontWeight:450},stroke:"none",children:"F"}),Jx=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-general"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(Ue,{position:{x:56,y:25},color:s})]})]}),Qx=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Electromagnetic"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M47.5 17.5H55.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M15.5 17.5H23.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M23.5 17.5C23.5 16.9747 23.6035 16.4546 23.8045 15.9693C24.0055 15.484 24.3001 15.043 24.6716 14.6716C25.043 14.3001 25.484 14.0055 25.9693 13.8045C26.4546 13.6035 26.9747 13.5 27.5 13.5C28.0253 13.5 28.5454 13.6035 29.0307 13.8045C29.516 14.0055 29.957 14.3001 30.3284 14.6716C30.6999 15.043 30.9945 15.484 31.1955 15.9693C31.3965 16.4546 31.5 16.9747 31.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M31.5 17.5C31.5 16.9747 31.6035 16.4546 31.8045 15.9693C32.0055 15.484 32.3001 15.043 32.6716 14.6716C33.043 14.3001 33.484 14.0055 33.9693 13.8045C34.4546 13.6035 34.9747 13.5 35.5 13.5C36.0253 13.5 36.5454 13.6035 37.0307 13.8045C37.516 14.0055 37.957 14.3001 38.3284 14.6716C38.6999 15.043 38.9945 15.484 39.1955 15.9693C39.3965 16.4546 39.5 16.9747 39.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M39.5 17.5C39.5 16.9747 39.6035 16.4546 39.8045 15.9693C40.0055 15.484 40.3001 15.043 40.6716 14.6716C41.043 14.3001 41.484 14.0055 41.9693 13.8045C42.4546 13.6035 42.9747 13.5 43.5 13.5C44.0253 13.5 44.5454 13.6035 45.0307 13.8045C45.516 14.0055 45.957 14.3001 46.3284 14.6716C46.6999 15.043 46.9945 15.484 47.1955 15.9693C47.3965 16.4546 47.5 16.9747 47.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ue,{position:{x:58,y:29},color:s})]})]}),ed=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-VariableArea"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M46 10V25"}),o.jsxRuntimeExports.jsx(L,{d:"M23 13V22"}),o.jsxRuntimeExports.jsx(L,{d:"M23 13L46 10"}),o.jsxRuntimeExports.jsx(L,{d:"M23 22L46 25"}),o.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),td=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Coriolis"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M2 17.6024H28.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M28.5 17.6024L34.6834 14.0324",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M34.8 14L45.9058 20.9666",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M51.5 17.6024L46.0141 20.8987",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M20.5 17.6024L26.6574 14.0474",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M26.75 14.1024L37.788 21.0265",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 17.6024L37.8427 21.0017",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M43.5 17.6024H69",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ue,{position:{x:58,y:29},color:s})]})]}),nd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Nozzle"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M24 2V7V12",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M24 12H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M24 23H29H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M24 33V23",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),sd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Venturi"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M8 33L26.5329 22.3",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M8 2L26.5329 12.7",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M56 33L26.5876 22.2948",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M56 2L26.5876 12.7052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ue,{position:{x:56,y:29},color:s})]})]}),od=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-RingPiston"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(Ae,{cx:"36.5",cy:"17.5",r:"10.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ae,{cx:"36.5",cy:"21.5",r:"6.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ue,{position:{x:56,y:29},color:s})]})]}),rd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-PositiveDisplacement"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M41 13C41 15.4853 38.9853 17.5 36.5 17.5C34.0147 17.5 32 15.4853 32 13C32 10.5147 34.0147 8.5 36.5 8.5C38.9853 8.5 41 10.5147 41 13Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M41 22C41 24.4853 38.9853 26.5 36.5 26.5C34.0147 26.5 32 24.4853 32 22C32 19.5147 34.0147 17.5 36.5 17.5C38.9853 17.5 41 19.5147 41 22Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),id=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Turbine"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M16.5 17.5H54.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M32.5 9L35.4756 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M38.5 26L35.5244 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M32.5 26L35.4756 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M38.5 9L35.5244 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M32.5 9C32.5 8.20435 32.8161 7.44129 33.3787 6.87868C33.9413 6.31607 34.7044 6 35.5 6C36.2956 6 37.0587 6.31607 37.6213 6.87868C38.1839 7.44129 38.5 8.20435 38.5 9",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M38.5 26C38.5 26.7956 38.1839 27.5587 37.6213 28.1213C37.0587 28.6839 36.2956 29 35.5 29C34.7044 29 33.9413 28.6839 33.3787 28.1213C32.8161 27.5587 32.5 26.7956 32.5 26",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),ld=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Pulse"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M31 13.5H39",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M23 21.5H31",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M39 21.5H47",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M39 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M31 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),cd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-FloatSensor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M25 8H46",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M31 27H40",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M31 27L25.046 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M40 27L45.954 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),ad=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Orifice"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M24.5 2V7.5V13","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M24.5 33V22","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),ud=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-general"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.545,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.454,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.454,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(L,{d:"M3 33H18.3956L33.1284 18.1508M33.4276 47.8492L48.1604 33H63M33.278 48V18"}),o.jsxRuntimeExports.jsx(L,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"})]})]}),xd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:89,top:27.27,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:89,top:72.73,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.455,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.545,top:50,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(L,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"}),o.jsxRuntimeExports.jsx(L,{d:"M58.9698 18H23.56L38.5623 33.0023M38.5623 32.9977L23.56 48H58.9698"})]})]}),dd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:9,top:6.25,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:24,top:93.75,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:76,top:6.25,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:91,top:93.75,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.508,top:50,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.492,top:50,id:"6"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:199,height:48},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Se,{x:"3",y:"3",width:"193",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Se,{x:"32.397",y:"3",width:"134.206",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Se,{x:"32.397",y:"13.5",width:"134.206",height:"21",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32.3769",y1:"24",x2:"166.623",y2:"24",strokeWidth:"2"})]})]}),pd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M31 62C29.2204 62 27.3855 61.332 25.5927 59.9086C23.791 58.4782 22.0952 56.3316 20.6377 53.5381C19.1829 50.7496 18.0147 47.4106 17.214 43.7054C16.4137 40.0021 16 36.0237 16 32C16 27.9763 16.4137 23.9979 17.214 20.2946C18.0147 16.5895 19.1829 13.2504 20.6377 10.4619C22.0952 7.66841 23.791 5.52179 25.5927 4.09136C27.3855 2.66801 29.2204 2 31 2",strokeWidth:"2"})]})]}),md=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(L,{d:"M50.3827 20.3601C47.1902 21.7605 43.4002 22.8046 39.2752 23.4077C35.1519 24.0105 30.8103 24.1557 26.5584 23.8319C22.3057 23.508 18.2597 22.7238 14.7044 21.5418C11.1449 20.3584 8.19358 18.8149 6.03181 17.0454M6.02374 46.9613C8.18198 45.1925 11.129 43.6491 14.6841 42.465C18.2349 41.2824 22.2765 40.4968 26.5256 40.1707C30.774 39.8447 35.113 39.9871 39.2353 40.5866C43.3592 41.1864 47.15 42.2268 50.3455 43.6237",strokeLinecap:"round"})]})]}),fd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("compressor"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z",strokeLinecap:"round"})})]}),hd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(Ae,{cx:"33",cy:"33",r:"14.5"})]})]}),gd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(L,{d:"M35 12.4V20.4"}),o.jsxRuntimeExports.jsx(L,{d:"M3 33H16"}),o.jsxRuntimeExports.jsx(L,{d:"M35 53.6V45.6"})]})]}),jd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(L,{d:"M39 33C39 33.7879 38.8448 34.5681 38.5433 35.2961C38.2417 36.0241 37.7998 36.6855 37.2426 37.2426C36.6855 37.7998 36.0241 38.2417 35.2961 38.5433C34.5681 38.8448 33.7879 39 33 39C32.2121 39 31.4319 38.8448 30.7039 38.5433C29.9759 38.2417 29.3145 37.7998 28.7574 37.2426C28.2002 36.6855 27.7583 36.0241 27.4567 35.2961C27.1552 34.5681 27 33.7879 27 33C27 32.2121 27.1552 31.4319 27.4567 30.7039C27.7583 29.9759 28.2002 29.3145 28.7574 28.7574C29.3145 28.2002 29.9759 27.7583 30.7039 27.4567C31.4319 27.1552 32.2121 27 33 27C33.7879 27 34.5681 27.1552 35.2961 27.4567C36.0241 27.7583 36.6855 28.2002 37.2426 28.7574C37.7998 29.3145 38.2417 29.9759 38.5433 30.7039C38.8448 31.4319 39 32.2121 39 33L39 33Z"}),o.jsxRuntimeExports.jsx(L,{d:"M39 33H47"}),o.jsxRuntimeExports.jsx(L,{d:"M27 33H19"}),o.jsxRuntimeExports.jsx(L,{d:"M36 27.804L40 20.8758"}),o.jsxRuntimeExports.jsx(L,{d:"M30 27.804L26 20.8758"}),o.jsxRuntimeExports.jsx(L,{d:"M30 38.196L26 45.1242"}),o.jsxRuntimeExports.jsx(L,{d:"M36 38.196L40 45.1242"})]})]}),Ed=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(L,{d:"M49.1214 16.2515C43.5325 21.3055 36.2463 24.0711 28.7115 23.9986C21.1766 23.9262 13.945 21.0209 8.45428 15.8604M8.4838 50.112C13.9718 44.968 21.1918 42.0733 28.7133 42.0014C36.2348 41.9295 43.5089 44.6858 49.0942 49.7239"})]})]}),yd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(L,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(L,{d:"M3 33H63"})]})]}),Sd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:7.575,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:92.425,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(L,{d:"M16.5 2.5L16.5 66.5M2.5 34.5H30.5M2.5 18.9848H30.5M2.5 50.0152H30.5M5.3 66.5H27.7C29.2464 66.5 30.5 65.1976 30.5 63.5909V5.40909C30.5 3.80244 29.2464 2.5 27.7 2.5H5.3C3.7536 2.5 2.5 3.80245 2.5 5.40909V63.5909C2.5 65.1976 3.7536 66.5 5.3 66.5Z",strokeLinecap:"round"})})]}),Rd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(L,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(L,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(L,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(L,{d:"M29.12 65.62L61 34.5"})]})]}),Cd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:60,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2.5",width:"56",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(L,{d:"M30 2.5L30 66.5"}),o.jsxRuntimeExports.jsx(L,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(L,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 50H30"})]})]}),bd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(L,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(L,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(L,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5",strokeLinecap:"square"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),wd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(L,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(L,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(L,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(L,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(L,{d:"M29.12 65.62L61 34.5"}),o.jsxRuntimeExports.jsx(L,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),vd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("thruster"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:25.3,top:4.76,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:25.3,top:95.24,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:81,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2.5",y:"2",width:"38",height:"38",rx:"3"}),o.jsxRuntimeExports.jsx(L,{d:"M78.5 37.5117V4.51172"}),o.jsxRuntimeExports.jsx(L,{d:"M40.5 11.5L76.0072 2.6232"}),o.jsxRuntimeExports.jsx(L,{d:"M40.5 30.5L76.0072 39.3768"}),o.jsxRuntimeExports.jsx(L,{d:"M75.6192 2.71597C75.9231 2.56695 76.2597 2.49745 76.5977 2.51399C76.9357 2.53052 77.264 2.63256 77.5518 2.81053C77.8397 2.98851 78.0776 3.23661 78.2435 3.53161C78.4093 3.82661 78.4975 4.15886 78.4999 4.49726"}),o.jsxRuntimeExports.jsx(L,{d:"M78.4994 37.5101C78.4914 37.8382 78.4028 38.1592 78.2414 38.445C78.0801 38.7307 77.8509 38.9723 77.574 39.1486C77.2972 39.3248 76.9813 39.4302 76.6541 39.4555C76.3269 39.4808 75.9986 39.4252 75.698 39.2936"})]})]}),kd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("nozzle"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:18.75,top:17.46,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:1.5873,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:81.25,top:17.46,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:126},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"12",y:"1.6667",width:"40",height:"40",rx:"2"}),o.jsxRuntimeExports.jsx(L,{d:"M1.3333 124H62.6667","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M50.1883 41.6667C41.7748 41.6667 35.0143 46.3333 42.6923 59.3333C59.3476 87.5333 63.6327 119 62.855 124","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(L,{d:"M14 41.6667C22.4135 41.6667 29.174 46.3333 21.496 59.3333C4.84066 87.5333 0.555555 119 1.33333 124","stroke-linecap":"round"})]})]}),Md=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(L,{d:"M2.293 2.29297L29.9383 66.7986",strokeDasharray:"6 6"})]})]}),_d=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Se,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(L,{d:"M31 34.5L2.30611 2.33992",strokeDasharray:"6 6"}),o.jsxRuntimeExports.jsx(L,{d:"M31 34.5L2.30611 66.6601",strokeDasharray:"6 6"})]})]}),xS=({aetherKey:e,sink:t})=>{const n=Te.useMemoDeepEqualProps({sink:t}),[,,s]=Q.use$1({aetherKey:e,type:B.Button.TYPE,schema:B.buttonStateZ,initialState:{trigger:0,sink:t}});return g.useEffect(()=>{s(i=>({...i,...n}))},[n]),{click:g.useCallback(()=>{s(i=>({...i,trigger:i.trigger+1}))},[s])}},dS=({aetherKey:e,source:t})=>{const n=Te.useMemoDeepEqualProps({source:t}),[,{enabled:s},r]=Q.use$1({aetherKey:e,type:B.Light.TYPE,schema:B.lightStateZ,initialState:{enabled:!1,...n}});return g.useEffect(()=>r(i=>({...i,...n})),[n,r]),{enabled:s}},pS="Schematic.Grid",mS=e=>{const n=Qs(e).closest(".react-flow__pane");n!=null&&Z.triggerReflow(n)},no=e=>{const t=({symbolKey:s,items:r,onLocationChange:i})=>{const l=`${s}.${pS}`,[c,a]=g.useState(!1),x=g.useCallback(({items:y})=>y.every(S=>S.type===l),[l]),d=Z.useSyncedRef(i),{startDrag:p,onDragEnd:m,...f}=me.useDragAndDrop({type:l,canDrop:x,onDrop:g.useCallback(({items:y})=>y,[]),onDragOver:g.useCallback(y=>{a(x(y)),y.items.forEach(({key:S})=>d.current(S,e))},[])}),h=r.filter(y=>y.location===e),j=g.useCallback((y,S)=>p([{key:S,type:l}]),[p,l]);return o.jsxRuntimeExports.jsx(ne.Space,{direction:u.K.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e),u.CSS.dropRegion(!0),c&&u.CSS.B("dragging-over")),onDragLeave:()=>a(!1),empty:!0,...f,children:h.map(({element:y,key:S})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:g.cloneElement(y,{draggable:!0,onDragStart:w=>j(w,S),onDragEnd:m,style:{...y.props.style,cursor:"grab"}})},S))})};return({symbolKey:s,...r})=>{const{editable:i,items:l}=r,c=g.useRef(i);if(i!==c.current&&e==="top"&&(mS(s),c.current=i),i)return o.jsxRuntimeExports.jsx(t,{symbolKey:s,...r});const a=l.filter(x=>x.location===e);return a.length===0?null:o.jsxRuntimeExports.jsx(ne.Space,{direction:u.K.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e)),empty:!0,children:a.map(({element:x,key:d})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:x},d))})}},fS=no("top"),hS=no("left"),gS=no("right"),jS=no("bottom"),Wt=({editable:e,onRotate:t,children:n,...s})=>o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(fS,{editable:e,...s}),o.jsxRuntimeExports.jsx(hS,{editable:e,...s}),o.jsxRuntimeExports.jsx(gS,{editable:e,...s}),o.jsxRuntimeExports.jsx(jS,{editable:e,...s}),e&&o.jsxRuntimeExports.jsx(ge.Icon,{className:u.CSS.BE("grid","rotate"),size:"small",variant:"filled",onClick:t,children:o.jsxRuntimeExports.jsx(Z.y4.Rotate,{})}),n]}),ES=({aetherKey:e,source:t,sink:n})=>{const s=Te.useMemoDeepEqualProps({source:t,sink:n}),[,{value:r},i]=Q.use$1({aetherKey:e,type:B.Setpoint.TYPE,schema:B.setpointStateZ,initialState:{trigger:0,value:0,...s}});return g.useEffect(()=>{i(c=>({...c,...s}))},[s,i]),{set:g.useCallback(c=>i(a=>({...a,trigger:a.trigger+1,command:c})),[i]),value:r}},yS=({aetherKey:e,source:t,sink:n})=>{const s=Te.useMemoDeepEqualProps({source:t,sink:n}),[,{triggered:r,enabled:i},l]=Q.use$1({aetherKey:e,type:B.Toggle.TYPE,schema:B.toggleStateZ,initialState:{triggered:!1,enabled:!1,...s}});return g.useEffect(()=>{l(a=>({...a,...s}))},[s,l]),{toggle:g.useCallback(()=>l(a=>({...a,triggered:!a.triggered})),[l]),triggered:r,enabled:i}},xn=(e,t)=>{if(e==null)return null;const{label:n,level:s="p",orientation:r="top",direction:i,align:l,maxInlineSize:c}=e;return n==null||n.length===0?null:{key:"label",element:o.jsxRuntimeExports.jsx(Z.Editable,{className:u.CSS(u.CSS.BE("symbol","label"),u.CSS.dir(i)),level:s,value:n,onChange:a=>t==null?void 0:t({label:{...e,label:a}}),allowEmpty:!0,style:{textAlign:l,maxInlineSize:c}}),location:r}},Fr=e=>{if(e==null)return null;const{show:t=!0,showChip:n=!0,showIndicator:s=!0,chip:r,indicator:i,orientation:l="bottom"}=e;return{key:"control",element:o.jsxRuntimeExports.jsxs(ne.Space,{direction:u.g.swap(l),align:"center",className:u.CSS(u.CSS.B("control-state")),size:"small",children:[t&&n&&o.jsxRuntimeExports.jsx(Nc,{size:"small",...r}),t&&s&&o.jsxRuntimeExports.jsx(Ac,{...i})]}),location:l}},ve=e=>{const t=({symbolKey:n,control:s,source:r,sink:i,label:l,onChange:c,draggable:a,selected:x,orientation:d="left",...p})=>{const{enabled:m,triggered:f,toggle:h}=yS({aetherKey:n,source:r,sink:i}),j=[],y=xn(l,c);y!=null&&j.push(y);const S=Fr(s);return S!=null&&j.push(S),o.jsxRuntimeExports.jsx(Wt,{editable:x&&!a,symbolKey:n,items:j,onRotate:()=>c({orientation:u.K.rotate90(d)}),onLocationChange:(w,E)=>{w==="label"&&c({label:{...l,orientation:E}}),w==="control"&&c({control:{...s,orientation:E}})},children:o.jsxRuntimeExports.jsx(e,{enabled:m,triggered:f,onClick:h,orientation:d,...p})})};return t.displayName=e.displayName,t},ce=e=>{const t=({symbolKey:n,label:s,onChange:r,selected:i,draggable:l,position:c,orientation:a="left",...x})=>{const d=[],p=xn(s,r);return p!=null&&d.push(p),o.jsxRuntimeExports.jsx(Wt,{items:d,editable:i&&!l,symbolKey:n,onRotate:()=>r({orientation:u.K.rotate90(a)}),onLocationChange:(m,f)=>{m==="label"&&r({label:{...s,orientation:f}})},children:o.jsxRuntimeExports.jsx(e,{orientation:a,...x})})};return t.displayName=e.displayName,t},Nt=e=>{const t=({symbolKey:n,label:s,onChange:r,selected:i,draggable:l,position:c,orientation:a="left",enabled:x=!1,clickable:d=!1,...p})=>{const m=[],f=xn(s,r);f!=null&&m.push(f);const h=()=>{d&&r({enabled:!x})};return o.jsxRuntimeExports.jsx(Wt,{items:m,editable:i&&!l,symbolKey:n,onRotate:()=>r({orientation:u.K.rotate90(a)}),onLocationChange:(j,y)=>{j==="label"&&r({label:{...s,orientation:y}})},children:o.jsxRuntimeExports.jsx(e,{orientation:a,enabled:x,onClick:h,...p})})};return t.displayName=e.displayName,t},Pd=ve(Yu),Ld=ve(Gu),Nd=ve(Ku),Td=ve(Wu),$d=ve(Qu),Ad=ve(ix),Id=ve(pd),zd=ve(md),Bd=ve(Mx),Dd=ve(_x),Od=ve(Px),Vd=ve(Nx),Fd=ve(Ix),Hd=ve(zx),Zd=ve(Bx),Wd=ve(Dx),Yd=ve(Ox),Gd=ve(Vx),Kd=ve(kx),qd=ve(fd),Xd=ve(hd),Ud=ve(gd),Jd=ve(jd),Qd=ve(Ed),ep=ve(yd),tp=ve(sx),np=ve(ox),sp=ve(ex),op=ve(tx),rp=ve(nx),ip=ce(gx),lp=ce(jx),cp=ce($x),ap=ce(Ax),up=ce(lx),xp=ce(ax),dp=ce(ux),pp=ce(px),mp=ce(Xu),fp=ce(Uu),hp=ce(Ju),gp=ce(Ex),jp=ve(Cx),Ep=ce(Hx),yp=ce(dx),Sp=ce(Zx),Rp=ce(Wx),Cp=ce(Yx),bp=ce(cx),wp=ce(Xx),vp=ce(Ux),kp=ce(Lx),Mp=ce(Jx),_p=ce(Qx),Pp=ce(ed),Lp=ce(td),Np=ce(nd),Tp=ce(sd),$p=ce(od),Ap=ce(rd),Ip=ce(id),zp=ce(ld),Bp=ce(cd),Dp=ce(ad),Op=ce(ud),Vp=ce(xd),Fp=ce(dd),Hp=ce(Sd),Zp=ce(Cd),Wp=ce(Rd),Yp=ce(bd),Gp=ce(wd),Kp=ce(vd),qp=ce(kd),Xp=ce(Md),Up=ce(_d),Jp=Nt(yx),Qp=Nt(qu),em=Nt(Kx),tm=Nt(qx),nm=Nt(xx),sm=Nt(Sx),om=Nt(rx),rm=ce(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(to,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e})),im=e=>o.jsxRuntimeExports.jsx(to,{...e,dimensions:{width:25,height:50}}),SS=ce(({sideLength:e,rotation:t,color:n,backgroundColor:s,numSides:r,...i})=>o.jsxRuntimeExports.jsx(Vr,{numSides:3,sideLength:e,rotation:t,color:n,backgroundColor:s,...i})),lm=ce(({numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...c})=>o.jsxRuntimeExports.jsx(Vr,{numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...c})),cm=ce(({radius:e,color:t,backgroundColor:n,strokeWidth:s,...r})=>o.jsxRuntimeExports.jsx(hx,{radius:e,color:t,backgroundColor:n,strokeWidth:s,...r})),am=ce(({backgroundColor:e,borderRadius:t,onChange:n,orientation:s,color:r,dimensions:i,strokeWidth:l})=>o.jsxRuntimeExports.jsx(to,{onResize:c=>n({dimensions:c}),orientation:s,color:r,dimensions:i,boxBorderRadius:t,backgroundColor:e,strokeWidth:l})),um=e=>o.jsxRuntimeExports.jsx(to,{...e,dimensions:{width:25,height:50},borderRadius:0}),xm=({label:e,symbolKey:t,orientation:n="left",control:s,units:r,source:i,sink:l,color:c,onChange:a,selected:x,draggable:d,size:p,disabled:m})=>{const{value:f,set:h}=ES({aetherKey:t,source:i,sink:l}),j=[],y=Fr(s);y!=null&&j.push(y);const S=xn(e,a);return S!=null&&j.push(S),o.jsxRuntimeExports.jsx(Wt,{symbolKey:t,editable:x&&!d,onRotate:()=>a({orientation:u.K.rotate90(n)}),items:j,onLocationChange:(w,E)=>{w==="label"&&a({label:{...e,orientation:E}})},children:o.jsxRuntimeExports.jsx(vx,{value:f,onChange:h,units:r,color:c,orientation:n,disabled:m,size:p})})},dm=({className:e,...t})=>o.jsxRuntimeExports.jsx(vx,{value:12,onChange:()=>{},units:"mV",style:{width:120,transform:"scale(0.95)"},className:u.CSS(u.CSS.BM("setpoint","preview"),e),disabled:!0,...t,children:o.jsxRuntimeExports.jsx(Z.Text,{level:"p",children:"10.0"})}),pm=({symbolKey:e,label:t,level:n="p",position:s,textColor:r,color:i,telem:l,units:c,onChange:a,inlineSize:x=70,selected:d,draggable:p,notation:m})=>{const f=Xo.useTypography(n),h=(f.lineHeight+.5)*f.baseSize+2,{width:j}=Rr({aetherKey:e,color:r,level:n,box:u.$t.construct(u.J.translateY({...s},1),{height:h,width:x}),telem:l,minWidth:x,notation:m}),y=[],S=xn(t,a);return S!=null&&y.push(S),o.jsxRuntimeExports.jsx(Wt,{editable:d&&!p,symbolKey:e,items:y,onLocationChange:(w,E)=>{w==="label"&&a({label:{...t,orientation:E}})},children:o.jsxRuntimeExports.jsx(Rx,{color:i,dimensions:{height:h,width:j},inlineSize:x,units:c,unitsLevel:st.downLevel(n)})})},mm=({color:e})=>o.jsxRuntimeExports.jsx(Rx,{color:e,dimensions:{width:60,height:25},units:"psi",children:o.jsxRuntimeExports.jsx(Z.Text,{level:"p",children:"50.00"})}),fm=({symbolKey:e,label:t,orientation:n="left",sink:s,control:r,selected:i,draggable:l,onChange:c,...a})=>{const{click:x}=xS({aetherKey:e,sink:s}),d=[],p=Fr(r);return p!=null&&d.push(p),o.jsxRuntimeExports.jsx(Wt,{onRotate:()=>c({orientation:u.K.rotate90(n)}),editable:i&&!l,symbolKey:e,items:d,onLocationChange:(m,f)=>{m==="label"&&c({label:{...t,orientation:f}})},children:o.jsxRuntimeExports.jsx(bx,{...t,onClick:x,orientation:n,...a})})},hm=({label:e,...t})=>o.jsxRuntimeExports.jsx(bx,{label:"Button",...t}),gm=({symbolKey:e,label:t,source:n,onChange:s,selected:r,draggable:i,...l})=>{const{enabled:c}=dS({aetherKey:e,source:n}),a=[],x=xn(t,s);return x!=null&&a.push(x),o.jsxRuntimeExports.jsx(Wt,{items:a,editable:r&&!i,symbolKey:e,onLocationChange:(d,p)=>{d==="label"&&s({label:{...t,orientation:p}})},children:o.jsxRuntimeExports.jsx(Tx,{enabled:c,...l})})},jm=e=>o.jsxRuntimeExports.jsx(wx,{...e,autoFit:!0,text:"Text Box"}),Em=({label:{label:e,level:t},orientation:n,color:s,onChange:r})=>o.jsxRuntimeExports.jsx(Fx,{onLabelChange:i=>r({label:{label:i,level:t}}),label:e,level:t,orientation:n,color:s}),ym=({label:e,...t})=>o.jsxRuntimeExports.jsx(Fx,{label:"Off Page",...t,orientation:"right"}),Sm=ce(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(Gx,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e})),Rm=e=>o.jsxRuntimeExports.jsx(Gx,{...e,dimensions:{width:25,height:50}}),q=4,Wn=2,RS=["agitator","angledReliefValve","angledSpringLoadedReliefValve","angledValve","ballValve","threeWayBallValve","gateValve","butterflyValveOne","butterflyValveTwo","breatherValve","offPageReference","box","burstDisc","isoBurstDisc","button","cap","cavityPump","checkValve","cylinder","crossBeamAgitator","electricRegulator","electricRegulatorMotorized","filter","flowStraightener","heaterElement","checkValveWithArrow","flatBladeAgitator","flowmeterGeneral","flowmeterElectromagnetic","flowmeterVariableArea","flowmeterCoriolis","flowmeterNozzle","flowmeterVenturi","flowmeterRingPiston","flowmeterPositiveDisplacement","flowmeterTurbine","flowmeterPulse","flowmeterFloatSensor","flowmeterOrifice","fourWayValve","helicalAgitator","isoCap","isoCheckValve","isoFilter","light","manualValve","needleValve","orifice","orificePlate","paddleAgitator","propellerAgitator","pistonPump","pump","regulator","regulatorManual","reliefValve","rotaryMixer","screwPump","setpoint","solenoidValve","springLoadedReliefValve","staticMixer","switch","tank","polygon","circle","textBox","threeWayValve","vacuumPump","value","valve","vent","tJunction","crossJunction","heatExchangerGeneral","heatExchangerM","heatExchangerStraightTube","diaphragmPump","ejectionPump","compressor","turboCompressor","rollerVaneCompressor","liquidRingCompressor","ejectorCompressor","centrifugalCompressor","flameArrestor","flameArrestorDetonation","flameArrestorExplosion","flameArrestorFireRes","flameArrestorFireResDetonation","thruster","nozzle","strainer","strainerCone"],CS=xe.z.enum(RS),ie={orientation:"left",scale:1},bS={source:B.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:B.streamChannelValue({channel:0}),rollingAverage:B.rollingAverage({windowSize:1}),stringifier:B.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"})},wS={...ie,source:B.sourcePipeline("number",{connections:[],segments:{valueStream:B.streamChannelValue({channel:0})},outlet:"valueStream"})},vS={...ie,sink:B.sinkPipeline("number",{connections:[],segments:{setter:B.setChannelValue({channel:0})},inlet:"setter"})},Cm={...ie,source:B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:0}),threshold:B.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},bm={...ie,control:{show:!0},sink:B.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:B.setChannelValue({channel:0}),setpoint:B.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},ke={...Cm,...bm},Yt={...ie,enabled:!1,clickable:!1},Y=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center",direction:"x"}}),kS={width:125,height:200},Hr={dimensions:kS},MS=3,_S={name:"Three Way Valve",key:"threeWayValve",Form:we,Symbol:Pd,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Three Way Valve"),...ke}),Preview:Yu,zIndex:q},PS={name:"Valve",key:"valve",Form:we,Symbol:Ld,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Valve"),...ke}),Preview:Gu,zIndex:q},LS={name:"Solenoid Valve",key:"solenoidValve",Form:we,Symbol:Nd,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Solenoid Valve"),normallyOpen:!1,...ke}),Preview:Ku,zIndex:q},NS={name:"Four Way Valve",key:"fourWayValve",Form:we,Symbol:Td,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Four Way Valve"),...ke}),Preview:Wu,zIndex:q},TS={name:"Angled Valve",key:"angledValve",Form:we,Symbol:$d,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Angled Valve"),...ke}),Preview:Qu,zIndex:q},$S={name:"Ball Valve",key:"ballValve",Form:we,Symbol:sp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Ball Valve"),...ke}),Preview:ex,zIndex:q},AS={name:"Three-Way Ball Valve",key:"threeWayBallValve",Form:we,Symbol:op,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Three-Way Ball Valve"),...ke}),Preview:tx,zIndex:q},IS={name:"Gate Valve",key:"gateValve",Form:we,Symbol:rp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Gate Valve"),...ke}),Preview:nx,zIndex:q},zS={name:"Butterfly Valve (Remote)",key:"butterflyValveOne",Form:we,Symbol:tp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Butterfly Valve (Remote)"),...ke}),Preview:sx,zIndex:q},BS={name:"Butterfly Valve (Manual)",key:"butterflyValveTwo",Form:we,Symbol:np,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Butterfly Valve (Manual)"),...ke}),Preview:ox,zIndex:q},DS={name:"Breather Valve",key:"breatherValve",Form:Zt,Symbol:om,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Breather Valve"),...Yt}),Preview:at(rx,["clickable"]),zIndex:q},OS={name:"Pump",key:"pump",Form:we,Symbol:Ad,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Pump"),...ke}),Preview:ix,zIndex:q},VS={name:"Screw Pump",key:"screwPump",Form:we,Symbol:Kd,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Screw Pump"),...ke}),Preview:kx,zIndex:q},FS={name:"Tank",key:"tank",Form:Hu,Symbol:rm,defaultProps:e=>({color:e.colors.gray.l11.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Y("Tank"),borderRadius:Or,...Hr,...ie}),Preview:im,zIndex:Wn},HS={name:"Polygon",key:"polygon",Symbol:lm,Form:Fy,defaultProps:e=>({numSides:6,sideLength:cS,cornerRounding:0,rotation:0,color:e.colors.gray.l11.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,strokeWidth:2,...Y("Polygon")}),Preview:at(Vr,["clickable"]),zIndex:Wn},ZS={name:"Circle",key:"circle",Symbol:cm,Form:Hy,defaultProps:e=>({radius:20,color:e.colors.gray.l11.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Y("Circle"),strokeWidth:2}),Preview:at(hx,["clickable"]),zIndex:Wn},WS={name:"Cylinder",key:"cylinder",Form:Qy,Symbol:Sm,defaultProps:e=>({color:e.colors.gray.l11.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Y("cylinder"),dimensions:{width:66,height:181},...ie}),Preview:Rm,zIndex:Wn},YS={name:"Box",key:"box",Form:eS,Symbol:am,defaultProps:e=>({color:e.colors.gray.l11.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Y("Box"),borderRadius:MS,strokeWidth:2,...Hr,...ie}),Preview:um,zIndex:Wn},GS={name:"Relief Valve",key:"reliefValve",Form:Zt,Symbol:Qp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Relief Valve"),...Yt}),Preview:at(qu,["clickable"]),zIndex:q},KS={name:"Spring Loaded Relief Valve",key:"springLoadedReliefValve",Form:Zt,Symbol:em,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Spring Loaded Relief Valve"),...Yt}),Preview:at(Kx,["clickable"]),zIndex:q},qS={name:"Angled Spring Loaded Relief Valve",key:"angledSpringLoadedReliefValve",Form:Zt,Symbol:tm,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Angled Spring Loaded Relief Valve"),...Yt}),Preview:at(qx,["clickable"]),zIndex:q},XS={name:"Regulator",key:"regulator",Form:de,Symbol:ip,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Regulator"),...ie}),Preview:gx,zIndex:q},US={name:"Manual Regulator",key:"regulatorManual",Form:de,Symbol:lp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Manual Regulator"),...ie}),Preview:at(jx,["clickable"]),zIndex:q},JS={name:"Electric Regulator",key:"electricRegulator",Form:de,Symbol:cp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Electric Regulator"),...ie}),Preview:$x,zIndex:q},QS={name:"Electric Regulator Motorized",key:"electricRegulatorMotorized",Form:de,Symbol:ap,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Electric Regulator Motorized"),...ie}),Preview:Ax,zIndex:q},e6={name:"Burst Disc",key:"burstDisc",Form:de,Symbol:up,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Burst Disc"),...ie}),Preview:lx,zIndex:q},t6={name:"ISO Burst Disc",key:"isoBurstDisc",Form:de,Symbol:bp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("ISO Burst Disc"),...ie}),Preview:cx,zIndex:q},n6={name:"Cap",key:"cap",Form:de,Symbol:xp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Cap"),...ie}),Preview:ax,zIndex:q},s6={name:"ISO Cap",key:"isoCap",Form:de,Symbol:dp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("ISO Cap"),...ie}),Preview:ux,zIndex:q},o6={name:"Manual Valve",key:"manualValve",Form:Zt,Symbol:nm,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Manual Valve"),...Yt}),Preview:at(xx,["clickable"]),zIndex:q},r6={name:"Orifice Plate",key:"orificePlate",Form:de,Symbol:yp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Orifice Plate"),...ie}),Preview:dx,zIndex:q},i6={name:"ISO Filter",key:"isoFilter",Form:de,Symbol:Sp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("ISO Filter"),...ie}),Preview:Zx,zIndex:q},l6={name:"Filter",key:"filter",Form:de,Symbol:pp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Filter"),...ie}),Preview:px,zIndex:q},c6={name:"Flow Straightener",key:"flowStraightener",Form:de,Symbol:Rp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Flow Straightener"),...ie}),Preview:Wx,zIndex:q},a6={name:"Heater Element",key:"heaterElement",Form:de,Symbol:Cp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Heater Element"),...ie}),Preview:Yx,zIndex:q},u6={name:"Needle Valve",key:"needleValve",Form:Zt,Symbol:Jp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Needle Valve"),...Yt}),Preview:at(yx,["clickable"]),zIndex:q},x6={name:"Check Valve",key:"checkValve",Form:de,Symbol:mp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Check Valve"),...ie}),Preview:Xu,zIndex:q},d6={name:"Orifice",key:"orifice",Form:de,Symbol:gp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Orifice"),...ie}),Preview:Ex,zIndex:q},p6={name:"Angled Relief Valve",key:"angledReliefValve",Form:Zt,Symbol:sm,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Angled Relief Valve"),...Yt}),Preview:at(Sx,["clickable"]),zIndex:q},m6={name:"Value",key:"value",Form:Zy,Symbol:pm,Preview:mm,defaultProps:e=>({color:e.colors.gray.l11.rgba255,units:"psi",level:"h5",inlineSize:70,...Y("Value"),...ie,telem:bS.source}),zIndex:q},f6={name:"Button",key:"button",Symbol:fm,Form:Ky,Preview:hm,defaultProps:e=>({color:e.colors.primary.z.rgba255,...Y("Button"),...bm,onClickDelay:0,scale:null}),zIndex:q},h6={name:"Switch",key:"switch",Symbol:jp,Form:tS,defaultProps:()=>({...Y("Switch"),...ke,scale:null}),Preview:Cx,zIndex:q},g6={name:"Vacuum Pump",key:"vacuumPump",Symbol:Bd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Vacuum Pump"),...ke}),Preview:Mx,zIndex:q},j6={name:"Compressor",key:"compressor",Symbol:qd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Compressor"),...ke}),Preview:fd,zIndex:q},E6={name:"Cavity Pump",key:"cavityPump",Symbol:Dd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Cavity Pump"),...ke}),Preview:_x,zIndex:q},y6={name:"Piston Pump",key:"pistonPump",Symbol:Od,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Piston Pump"),...ke}),Preview:Px,zIndex:q},S6={name:"Static Mixer",key:"staticMixer",Symbol:kp,Form:de,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Static Mixer"),...ie}),Preview:Lx,zIndex:q},R6={name:"Rotary Mixer",key:"rotaryMixer",Symbol:Vd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Rotary Mixer"),...ke}),Preview:Nx,zIndex:q},C6={name:"Light",key:"light",Symbol:gm,Form:Yy,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Light"),...Cm}),Preview:Tx,zIndex:q},b6={name:"Setpoint",key:"setpoint",Symbol:xm,Form:Xy,defaultProps:e=>({units:"mV",color:e.colors.gray.l11.rgba255,size:"small",...Y("Setpoint"),...wS,...vS}),Preview:dm,zIndex:q},w6={name:"Agitator",key:"agitator",Symbol:Fd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Agitator"),...ke}),Preview:Ix,zIndex:q},v6={name:"Propeller Agitator",key:"propellerAgitator",Symbol:Hd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Propeller Agitator"),...ke}),Preview:zx,zIndex:q},k6={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:Zd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Flat Blade Agitator"),...ke}),Preview:Bx,zIndex:q},M6={name:"Paddle Agitator",key:"paddleAgitator",Symbol:Wd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Paddle Agitator"),...ke}),Preview:Dx,zIndex:q},_6={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:Yd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Cross Beam Agitator"),...ke}),Preview:Ox,zIndex:q},P6={name:"Helical Agitator",key:"helicalAgitator",Symbol:Gd,Form:we,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Helical Agitator"),...ke}),Preview:Vx,zIndex:q},L6={name:"Text Box",key:"textBox",Symbol:wx,Form:Uy,defaultProps:e=>({color:e.colors.gray.l11.rgba255,autoFit:!0,align:"center",...Y("Text Box"),...ie,...Hr,level:"p",text:"Text Box",width:75}),Preview:jm,zIndex:q},N6={name:"Off Page Reference",key:"offPageReference",Form:Jy,Symbol:Em,defaultProps:e=>({color:e.colors.gray.l11.rgba255,orientation:"right",...Y("Off Page Reference")}),Preview:ym,zIndex:q},T6={name:"ISO Check Valve",key:"isoCheckValve",Form:de,Symbol:fp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("ISO Check Valve"),...ie}),Preview:Uu,zIndex:q},$6={name:"Check Valve Variant",key:"checkValveWithArrow",Form:de,Symbol:hp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Check Valve"),...ie}),Preview:Ju,zIndex:q},A6={name:"Vent",key:"vent",Form:de,Symbol:Ep,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Vent"),...ie}),Preview:Hx,zIndex:q},I6={name:"T Junction",key:"tJunction",Form:de,Symbol:wp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y(""),...ie}),Preview:Xx,zIndex:q+20},z6={name:"Cross Junction",key:"crossJunction",Form:de,Symbol:vp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y(""),...ie}),Preview:Ux,zIndex:q+20},B6={name:"Flowmeter General",key:"flowmeterGeneral",Form:de,Symbol:Mp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("General Flowmeter"),...ie}),Preview:Jx,zIndex:q},D6={name:"Flowmeter Electromagnetic",key:"flowmeterElectromagnetic",Form:de,Symbol:_p,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Electromagnetic Flowmeter"),...ie}),Preview:Qx,zIndex:q},O6={name:"Flowmeter Variable Area",key:"flowmeterVariableArea",Form:de,Symbol:Pp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Variable Area Flowmeter"),...ie}),Preview:ed,zIndex:q},V6={name:"Flowmeter Coriolis",key:"flowmeterCoriolis",Form:de,Symbol:Lp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Coriolis Flowmeter"),...ie}),Preview:td,zIndex:q},F6={name:"Flowmeter Nozzle",key:"flowmeterNozzle",Form:de,Symbol:Np,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Nozzle Flowmeter"),...ie}),Preview:nd,zIndex:q},H6={name:"Flowmeter Venturi",key:"flowmeterVenturi",Form:de,Symbol:Tp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Venturi Flowmeter"),...ie}),Preview:sd,zIndex:q},Z6={name:"Flowmeter Ring Piston",key:"flowmeterRingPiston",Form:de,Symbol:$p,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Ring Piston Flowmeter"),...ie}),Preview:od,zIndex:q},W6={name:"Flowmeter Positive Displacement",key:"flowmeterPositiveDisplacement",Form:de,Symbol:Ap,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Positive Displacement Flowmeter"),...ie}),Preview:rd,zIndex:q},Y6={name:"Flowmeter Turbine",key:"flowmeterTurbine",Form:de,Symbol:Ip,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Turbine Flowmeter"),...ie}),Preview:id,zIndex:q},G6={name:"Flowmeter Pulse",key:"flowmeterPulse",Form:de,Symbol:zp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Pulse Flowmeter"),...ie}),Preview:ld,zIndex:q},K6={name:"Flowmeter Float Sensor",key:"flowmeterFloatSensor",Form:de,Symbol:Bp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Float Sensor Flowmeter"),...ie}),Preview:cd,zIndex:q},q6={name:"Flowmeter Orifice",key:"flowmeterOrifice",Form:de,Symbol:Dp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Orifice Flowmeter"),...ie}),Preview:ad,zIndex:q},X6={name:"Heat Exchanger General",key:"heatExchangerGeneral",Form:de,Symbol:Op,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("General Heat Exchanger"),...ie}),Preview:ud,zIndex:q},U6={name:"Heat Exchanger M",key:"heatExchangerM",Form:de,Symbol:Vp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("M Heat Exchanger"),...ie}),Preview:xd,zIndex:q},J6={name:"Heat Exchanger Straight Tube",key:"heatExchangerStraightTube",Form:de,Symbol:Fp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Straight Tube Heat Exchanger"),...ie}),Preview:dd,zIndex:q},Q6={name:"Turbo Compressor",key:"turboCompressor",Form:we,Symbol:Xd,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Turbo Compressor"),...ke}),Preview:hd,zIndex:q},eR={name:"Roller Vane Compressor",key:"rollerVaneCompressor",Form:we,Symbol:Ud,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Roller Vane Compressor"),...ke}),Preview:gd,zIndex:q},tR={name:"Liquid Ring Compressor",key:"liquidRingCompressor",Form:we,Symbol:Jd,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Liquid Ring Compressor"),...ke}),Preview:jd,zIndex:q},nR={name:"Ejector Compressor",key:"ejectorCompressor",Form:we,Symbol:Qd,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Ejector Compressor"),...ke}),Preview:Ed,zIndex:q},sR={name:"Centrifugal Compressor",key:"centrifugalCompressor",Form:we,Symbol:ep,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Centrifugal Compressor"),...ke}),Preview:yd,zIndex:q},oR={name:"Diaphragm Pump",key:"diaphragmPump",Form:we,Symbol:Id,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Diaphragm Pump"),...ke}),Preview:pd,zIndex:q},rR={name:"Ejection Pump",key:"ejectionPump",Form:we,Symbol:zd,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Ejection Pump"),...ke}),Preview:md,zIndex:q},iR={name:"Flame Arrestor",key:"flameArrestor",Form:de,Symbol:Hp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Flame Arrestor"),...ie}),Preview:Sd,zIndex:q},lR={name:"Flame Arrestor (Explosion-Proof)",key:"flameArrestorExplosion",Form:de,Symbol:Zp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Flame Arrestor (Explosion-Proof)"),...ie}),Preview:Cd,zIndex:q},cR={name:"Flame Arrestor (Detonation-Proof)",key:"flameArrestorDetonation",Form:de,Symbol:Wp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Flame Arrestor (Detonation-Proof)"),...ie}),Preview:Rd,zIndex:q},aR={name:"Flame Arrestor (Fire Resistant)",key:"flameArrestorFireRes",Form:de,Symbol:Yp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Flame Arrestor (Fire Resistant)"),...ie}),Preview:bd,zIndex:q},uR={name:"Flame Arrestor (Fire Resistant and Detonation-Proof)",key:"flameArrestorFireResDetonation",Form:de,Symbol:Gp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Flame Arrestor (Fire Resistant and Detonation-Proof)"),...ie}),Preview:wd,zIndex:q},xR={name:"Thruster",key:"thruster",Form:we,Symbol:Kp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Thruster"),...ke}),Preview:vd,zIndex:q},dR={name:"Nozzle",key:"nozzle",Form:de,Symbol:qp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Nozzle"),...ie}),Preview:kd,zIndex:q},pR={name:"Strainer",key:"strainer",Form:de,Symbol:Xp,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Strainer"),...ie}),Preview:Md,zIndex:q},mR={name:"Strainer Cone",key:"strainerCone",Form:de,Symbol:Up,defaultProps:e=>({color:e.colors.gray.l11.rgba255,...Y("Strainer Cone"),...ie}),Preview:_d,zIndex:q},fR={value:m6,button:f6,tank:FS,polygon:HS,circle:ZS,tJunction:I6,crossJunction:z6,switch:h6,offPageReference:N6,light:C6,setpoint:b6,box:YS,textBox:L6,valve:PS,solenoidValve:LS,threeWayValve:_S,fourWayValve:NS,angledValve:TS,ballValve:$S,threeWayBallValve:AS,gateValve:IS,butterflyValveOne:zS,butterflyValveTwo:BS,breatherValve:DS,manualValve:o6,needleValve:u6,reliefValve:GS,angledReliefValve:p6,checkValve:x6,regulator:XS,regulatorManual:US,electricRegulator:JS,electricRegulatorMotorized:QS,springLoadedReliefValve:KS,angledSpringLoadedReliefValve:qS,pump:OS,pistonPump:y6,screwPump:VS,cavityPump:E6,diaphragmPump:oR,ejectionPump:rR,vacuumPump:g6,compressor:j6,turboCompressor:Q6,rollerVaneCompressor:eR,liquidRingCompressor:tR,ejectorCompressor:nR,centrifugalCompressor:sR,staticMixer:S6,rotaryMixer:R6,burstDisc:e6,isoBurstDisc:t6,cap:n6,isoCap:s6,filter:l6,isoFilter:i6,flowStraightener:c6,heaterElement:a6,orifice:d6,orificePlate:r6,agitator:w6,propellerAgitator:v6,flatBladeAgitator:k6,paddleAgitator:M6,crossBeamAgitator:_6,helicalAgitator:P6,isoCheckValve:T6,checkValveWithArrow:$6,vent:A6,cylinder:WS,flowmeterGeneral:B6,flowmeterElectromagnetic:D6,flowmeterVariableArea:O6,flowmeterCoriolis:V6,flowmeterNozzle:F6,flowmeterVenturi:H6,flowmeterRingPiston:Z6,flowmeterPositiveDisplacement:W6,flowmeterTurbine:Y6,flowmeterPulse:G6,flowmeterFloatSensor:K6,flowmeterOrifice:q6,heatExchangerGeneral:X6,heatExchangerM:U6,heatExchangerStraightTube:J6,flameArrestor:iR,flameArrestorExplosion:lR,flameArrestorDetonation:cR,flameArrestorFireRes:aR,flameArrestorFireResDetonation:uR,thruster:xR,nozzle:dR,strainer:pR,strainerCone:mR},hR=Object.freeze(Object.defineProperty({__proto__:null,Agitator:Fd,AngledReliefValve:sm,AngledSpringLoadedReliefValve:tm,AngledValve:$d,BallValve:sp,Box:am,BoxPreview:um,BreatherValve:om,BurstDisc:up,ButterflyValveOne:tp,ButterflyValveTwo:np,Button:fm,ButtonPreview:hm,Cap:xp,CavityPump:Dd,CentrifugalCompressor:ep,CheckValve:mp,CheckValveWithArrow:hp,Circle:cm,Compressor:qd,CrossBeamAgitator:Yd,CrossJunction:vp,Cylinder:Sm,CylinderPreview:Rm,DiaphragmPump:Id,EjectionPump:zd,EjectorCompressor:Qd,ElectricRegulator:cp,ElectricRegulatorMotorized:ap,Filter:pp,FlameArrestor:Hp,FlameArrestorDetonation:Wp,FlameArrestorExplosion:Zp,FlameArrestorFireRes:Yp,FlameArrestorFireResDetonation:Gp,FlatBladeAgitator:Zd,FlowStraightener:Rp,FlowmeterCoriolis:Lp,FlowmeterElectromagnetic:_p,FlowmeterFloatSensor:Bp,FlowmeterGeneral:Mp,FlowmeterNozzle:Np,FlowmeterOrifice:Dp,FlowmeterPositiveDisplacement:Ap,FlowmeterPulse:zp,FlowmeterRingPiston:$p,FlowmeterTurbine:Ip,FlowmeterVariableArea:Pp,FlowmeterVenturi:Tp,FourWayValve:Td,GateValve:rp,HeatExchangerGeneral:Op,HeatExchangerM:Vp,HeatExchangerStraightTube:Fp,HeaterElement:Cp,HelicalAgitator:Gd,ISOBurstDisc:bp,ISOCap:dp,ISOCheckValve:fp,ISOFilter:Sp,Light:gm,LiquidRingCompressor:Jd,ManualValve:nm,NeedleValve:Jp,Nozzle:qp,OffPageReference:Em,OffPageReferencePreview:ym,Orifice:gp,OrificePlate:yp,PaddleAgitator:Wd,PistonPump:Od,PolygonSymbol:lm,PropellerAgitator:Hd,Pump:Ad,Regulator:ip,RegulatorManual:lp,ReliefValve:Qp,RollerVaneCompressor:Ud,RotaryMixer:Vd,SYMBOLS:fR,ScrewPump:Kd,Setpoint:xm,SetpointPreview:dm,SolenoidValve:Nd,SpringLoadedReliefValve:em,StaticMixer:kp,Strainer:Xp,StrainerCone:Up,Switch:jp,TJunction:wp,Tank:rm,TankPreview:im,TextBoxPreview:jm,ThreeWayBallValve:op,ThreeWayValve:Pd,Thruster:Kp,Triangle:SS,TurboCompressor:Xd,VacuumPump:Bd,Value:pm,ValuePreview:mm,Valve:Ld,Vent:Ep,createDummyToggle:Nt,createLabeled:ce,createToggle:ve,variantZ:CS},Symbol.toStringTag,{value:"Module"}));exports.useCombinedRefs=Z.useCombinedRefs;exports.useCombinedStateAndRef=Z.useCombinedStateAndRef;exports.useInitializerRef=Z.useInitializerRef;exports.usePrevious=Z.usePrevious;exports.useStateRef=Z.useStateRef;exports.useSyncedRef=Z.useSyncedRef;exports.CSS=u.CSS;exports.newBEM=u.newBEM;exports.Header=os.external;exports.state=st.state;exports.DataType=fe.g$1;exports.Density=fe.y$1;exports.MultiSeries=fe.Dt;exports.Rate=fe.$;exports.Series=fe.k;exports.TimeRange=fe.U;exports.TimeSpan=fe.w;exports.TimeStamp=fe.m;exports.Generic=_f.Generic;exports.Input=je.external;exports.preventDefault=je.preventDefault;exports.stopPropagation=je.stopPropagation;exports.Aether=Q.main;exports.Worker=Q.Context;exports.useAsyncEffect=Q.useAsyncEffect;exports.useEffectCompare=Q.useEffectCompare;exports.Align=Lf.external;exports.Icon=Ne.Icon;exports.Tabs=Ne.external;exports.Text=El.external;exports.Divider=Ls.Divider$1;exports.Button=Nf.external;exports.Caret=zn.Animated$1;exports.Tree=zn.external;exports.componentRenderProp=ge.componentRenderProp;exports.isRenderProp=ge.isRenderProp;exports.useTransforms=Ce.useTransforms;exports.telem=B.external;exports.Haul=me.Haul;exports.compareArrayDeps=Te.compareArrayDeps;exports.useMemoCompare=Te.useMemoCompare;exports.useMemoDeepEqualProps=Te.useMemoDeepEqualProps;exports.useMemoPrimitiveArray=Te.useMemoPrimitiveArray;exports.Dialog=Ke.use$1;exports.Dropdown=Ke.Dropdown;exports.Modal=Ke.Modal;exports.useResize=Ke.useResize;exports.Color=qe.external;exports.Triggers=yl.external;exports.List=Mt.external;exports.createFilterTransform=Mt.createFilterTransform;exports.fuseFilter=Mt.fuseFilter;exports.proxyMemo=Mt.proxyMemo;exports.createHexOpacityVariants=Rl.createHexOpacityVariants;exports.unitProperty=Rl.unitProperty;exports.useClickOutside=$f.useClickOutside;exports.useDebouncedCallback=Uo.useDebouncedCallback;exports.Menu=Af.external;exports.Theming=If.external;exports.Video=zf.Video;exports.Accordion=th;exports.Breadcrumb=oh;exports.Canvas=_h;exports.Channel=$1;exports.Control=Fg;exports.Device=J1;exports.Diagram=zy;exports.Eraser=ah;exports.Form=q1;exports.Label=lg;exports.Legend=$h;exports.Line=Ih;exports.LinePlot=E1;exports.Log=Dy;exports.Measure=C1;exports.Mosaic=wg;exports.Nav=dh;exports.Note=kg;exports.OS=Ng;exports.Observe=G1;exports.Override=$g;exports.Pluto=Yg;exports.Portal=hg;exports.Progress=Kg;exports.Rack=tg;exports.Range=S1;exports.Ranger=t0;exports.Resize=Gf;exports.Rule=b1;exports.Schematic=hR;exports.Select=o1;exports.Status=lh;exports.Steps=s0;exports.Synnax=fh;exports.Table=c0;exports.TableCells=v0;exports.Tag=Jh;exports.Telem=zg;exports.Tooltip=Df;exports.Value=d0;exports.Viewport=g1;exports.axis=wh;exports.control=Bg;exports.useDelayedState=Bf;
|
|
38
|
+
`)),d=x.reduce((p,m)=>p.concat(...m),[]);return[x,d]}return[[],[]]},[e]);return g.useEffect(()=>{const a=(t==null?void 0:t.target)||Ui;if(e!==null){const x=m=>{var j,y;if(r.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!r.current||r.current&&!t.actInsideInputWithModifier)&&$a(m))return!1;const h=Qi(m.code,c);if(i.current.add(m[h]),Ji(l,i.current,!1)){const S=((y=(j=m.composedPath)==null?void 0:j.call(m))==null?void 0:y[0])||m.target,b=(S==null?void 0:S.nodeName)==="BUTTON"||(S==null?void 0:S.nodeName)==="A";t.preventDefault!==!1&&(r.current||!b)&&m.preventDefault(),s(!0)}},d=m=>{const f=Qi(m.code,c);Ji(l,i.current,!0)?(s(!1),i.current.clear()):i.current.delete(m[f]),m.key==="Meta"&&i.current.clear(),r.current=!1},p=()=>{i.current.clear(),s(!1)};return a==null||a.addEventListener("keydown",x),a==null||a.addEventListener("keyup",d),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{a==null||a.removeEventListener("keydown",x),a==null||a.removeEventListener("keyup",d),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,s]),n}function Ji(e,t,n){return e.filter(s=>n||s.length===t.size).some(s=>s.every(r=>t.has(r)))}function Qi(e,t){return t.includes(e)?"code":"key"}const gE=()=>{const e=Pe();return g.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[s,r,i],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??s,y:t.y??r,zoom:t.zoom??i},{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,s]=e.getState().transform;return{x:t,y:n,zoom:s}},setCenter:async(t,n,s)=>{const{width:r,height:i,maxZoom:l,panZoom:c}=e.getState(),a=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:l,x=r/2-t*a,d=i/2-n*a;return c?(await c.setViewport({x,y:d,zoom:a},{duration:s==null?void 0:s.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:s,height:r,minZoom:i,maxZoom:l,panZoom:c}=e.getState(),a=Nr(t,s,r,i,l,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(a,{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:s,snapGrid:r,snapToGrid:i,domNode:l}=e.getState();if(!l)return t;const{x:c,y:a}=l.getBoundingClientRect(),x={x:t.x-c,y:t.y-a},d=n.snapGrid??r,p=n.snapToGrid??i;return Fn(x,s,p,d)},flowToScreenPosition:t=>{const{transform:n,domNode:s}=e.getState();if(!s)return t;const{x:r,y:i}=s.getBoundingClientRect(),l=_s(t,n);return{x:l.x+r,y:l.y+i}}}),[])};function ou(e,t){const n=[],s=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")s.set(i.id,[i]);else{const l=s.get(i.id);l?l.push(i):s.set(i.id,[i])}for(const i of t){const l=s.get(i.id);if(!l){n.push(i);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const c={...i};for(const a of l)jE(a,c);n.push(c)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function jE(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height)),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function ru(e,t){return ou(e,t)}function iu(e,t){return ou(e,t)}function $t(e,t){return{id:e,type:"select",selected:t}}function Ut(e,t=new Set,n=!1){const s=[];for(const[r,i]of e){const l=t.has(r);!(i.selected===void 0&&!l)&&i.selected!==l&&(n&&(i.selected=l),s.push($t(i.id,l)))}return s}function el({items:e=[],lookup:t}){var r;const n=[],s=new Map(e.map(i=>[i.id,i]));for(const[i,l]of e.entries()){const c=t.get(l.id),a=((r=c==null?void 0:c.internals)==null?void 0:r.userNode)??c;a!==void 0&&a!==l&&n.push({id:l.id,item:l,type:"replace"}),a===void 0&&n.push({item:l,type:"add",index:i})}for(const[i]of t)s.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function tl(e){return{id:e.id,type:"remove"}}const nl=e=>G3(e),EE=e=>ba(e);function lu(e){return g.forwardRef(e)}const yE=typeof window<"u"?g.useLayoutEffect:g.useEffect;function sl(e){const[t,n]=g.useState(BigInt(0)),[s]=g.useState(()=>SE(()=>n(r=>r+BigInt(1))));return yE(()=>{const r=s.get();r.length&&(e(r),s.reset())},[t]),s}function SE(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const cu=g.createContext(null);function RE({children:e}){const t=Pe(),n=g.useCallback(c=>{const{nodes:a=[],setNodes:x,hasDefaultNodes:d,onNodesChange:p,nodeLookup:m,fitViewQueued:f}=t.getState();let h=a;for(const j of c)h=typeof j=="function"?j(h):j;if(d)x(h);else{const j=el({items:h,lookup:m});j.length>0?p==null||p(j):f&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:S,setNodes:b}=t.getState();y&&b(S)})}},[]),s=sl(n),r=g.useCallback(c=>{const{edges:a=[],setEdges:x,hasDefaultEdges:d,onEdgesChange:p,edgeLookup:m}=t.getState();let f=a;for(const h of c)f=typeof h=="function"?h(f):h;d?x(f):p&&p(el({items:f,lookup:m}))},[]),i=sl(r),l=g.useMemo(()=>({nodeQueue:s,edgeQueue:i}),[]);return o.jsxRuntimeExports.jsx(cu.Provider,{value:l,children:e})}function CE(){const e=g.useContext(cu);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const wE=e=>!!e.panZoom;function Ht(){const e=gE(),t=Pe(),n=CE(),s=Se(wE),r=g.useMemo(()=>{const i=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},a=p=>{var S,b;const{nodeLookup:m,nodeOrigin:f}=t.getState(),h=nl(p)?p:m.get(p.id),j=h.parentId?Na(h.position,h.measured,h.parentId,m,f):h.position,y={...h,position:j,width:((S=h.measured)==null?void 0:S.width)??h.width,height:((b=h.measured)==null?void 0:b.height)??h.height};return on(y)},x=(p,m,f={replace:!1})=>{l(h=>h.map(j=>{if(j.id===p){const y=typeof m=="function"?m(j):m;return f.replace&&nl(y)?y:{...j,...y}}return j}))},d=(p,m,f={replace:!1})=>{c(h=>h.map(j=>{if(j.id===p){const y=typeof m=="function"?m(j):m;return f.replace&&EE(y)?y:{...j,...y}}return j}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var m;return(m=i(p))==null?void 0:m.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(m=>({...m}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:l,setEdges:c,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(f=>[...f,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(f=>[...f,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:f}=t.getState(),[h,j,y]=f;return{nodes:p.map(S=>({...S})),edges:m.map(S=>({...S})),viewport:{x:h,y:j,zoom:y}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:f,edges:h,onNodesDelete:j,onEdgesDelete:y,triggerNodeChanges:S,triggerEdgeChanges:b,onDelete:E,onBeforeDelete:C}=t.getState(),{nodes:L,edges:T}=await J3({nodesToRemove:p,edgesToRemove:m,nodes:f,edges:h,onBeforeDelete:C}),P=T.length>0,O=L.length>0;if(P){const I=T.map(tl);y==null||y(T),b(I)}if(O){const I=L.map(tl);j==null||j(L),S(I)}return(O||P)&&(E==null||E({nodes:L,edges:T})),{deletedNodes:L,deletedEdges:T}},getIntersectingNodes:(p,m=!0,f)=>{const h=ki(p),j=h?p:a(p),y=f!==void 0;return j?(f||t.getState().nodes).filter(S=>{const b=t.getState().nodeLookup.get(S.id);if(b&&!h&&(S.id===p.id||!b.internals.positionAbsolute))return!1;const E=on(y?S:b),C=Nn(E,j);return m&&C>0||C>=j.width*j.height}):[]},isNodeIntersecting:(p,m,f=!0)=>{const j=ki(p)?p:a(p);if(!j)return!1;const y=Nn(j,m);return f&&y>0||y>=j.width*j.height},updateNode:x,updateNodeData:(p,m,f={replace:!1})=>{x(p,h=>{const j=typeof m=="function"?m(h):m;return f.replace?{...h,data:j}:{...h,data:{...h.data,...j}}},f)},updateEdge:d,updateEdgeData:(p,m,f={replace:!1})=>{d(p,h=>{const j=typeof m=="function"?m(h):m;return f.replace?{...h,data:j}:{...h,data:{...h.data,...j}}},f)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:f}=t.getState();return K3(p,{nodeLookup:m,nodeOrigin:f})},getHandleConnections:({type:p,id:m,nodeId:f})=>{var h;return Array.from(((h=t.getState().connectionLookup.get(`${f}-${p}${m?`-${m}`:""}`))==null?void 0:h.values())??[])},getNodeConnections:({type:p,handleId:m,nodeId:f})=>{var h;return Array.from(((h=t.getState().connectionLookup.get(`${f}${p?m?`-${p}-${m}`:`-${p}`:""}`))==null?void 0:h.values())??[])},fitView:async p=>{const m=t.getState().fitViewResolver??Promise.withResolvers();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(f=>[...f]),m.promise}}},[]);return g.useMemo(()=>({...r,...e,viewportInitialized:s}),[s])}const ol=e=>e.selected,bE={actInsideInputWithModifier:!1},vE=typeof window<"u"?window:void 0;function kE({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Pe(),{deleteElements:s}=Ht(),r=$n(e,bE),i=$n(t,{target:vE});g.useEffect(()=>{if(r){const{edges:l,nodes:c}=n.getState();s({nodes:c.filter(ol),edges:l.filter(ol)}),n.setState({nodesSelectionActive:!1})}},[r]),g.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function ME(e){const t=Pe();g.useEffect(()=>{const n=()=>{var r,i;if(!e.current)return!1;const s=Tr(e.current);(s.height===0||s.width===0)&&((i=(r=t.getState()).onError)==null||i.call(r,"004",Be.error004())),t.setState({width:s.width||500,height:s.height||500})};if(e.current){n(),window.addEventListener("resize",n);const s=new ResizeObserver(()=>n());return s.observe(e.current),()=>{window.removeEventListener("resize",n),s&&e.current&&s.unobserve(e.current)}}},[])}const eo={position:"absolute",width:"100%",height:"100%",top:0,left:0},_E=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function PE({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:s=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=It.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:a,translateExtent:x,minZoom:d,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:f=!0,children:h,noWheelClassName:j,noPanClassName:y,onViewportChange:S,isControlledViewport:b,paneClickDistance:E}){const C=Pe(),L=g.useRef(null),{userSelectionActive:T,lib:P}=Se(_E,Te),O=$n(m),I=g.useRef();ME(L);const D=g.useCallback(H=>{S==null||S({x:H[0],y:H[1],zoom:H[2]}),b||C.setState({transform:H})},[S,b]);return g.useEffect(()=>{if(L.current){I.current=N5({domNode:L.current,minZoom:d,maxZoom:p,translateExtent:x,viewport:a,paneClickDistance:E,onDraggingChange:R=>C.setState({paneDragging:R}),onPanZoomStart:(R,k)=>{const{onViewportChangeStart:v,onMoveStart:M}=C.getState();M==null||M(R,k),v==null||v(k)},onPanZoom:(R,k)=>{const{onViewportChange:v,onMove:M}=C.getState();M==null||M(R,k),v==null||v(k)},onPanZoomEnd:(R,k)=>{const{onViewportChangeEnd:v,onMoveEnd:M}=C.getState();M==null||M(R,k),v==null||v(k)}});const{x:H,y:B,zoom:_}=I.current.getViewport();return C.setState({panZoom:I.current,transform:[H,B,_],domNode:L.current.closest(".react-flow")}),()=>{var R;(R=I.current)==null||R.destroy()}}},[]),g.useEffect(()=>{var H;(H=I.current)==null||H.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:s,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:l,panOnDrag:c,zoomActivationKeyPressed:O,preventScrolling:f,noPanClassName:y,userSelectionActive:T,noWheelClassName:j,lib:P,onTransformChange:D})},[e,t,n,s,r,i,l,c,O,f,y,T,j,P,D]),o.jsxRuntimeExports.jsx("div",{className:"react-flow__renderer",ref:L,style:eo,children:h})}const LE=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function NE(){const{userSelectionActive:e,userSelectionRect:t}=Se(LE,Te);return e&&t?o.jsxRuntimeExports.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const ko=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},TE=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function $E({isSelecting:e,selectionKeyPressed:t,selectionMode:n=nn.Full,panOnDrag:s,selectionOnDrag:r,onSelectionStart:i,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:a,onPaneScroll:x,onPaneMouseEnter:d,onPaneMouseMove:p,onPaneMouseLeave:m,children:f}){const h=Pe(),{userSelectionActive:j,elementsSelectable:y,dragging:S,connectionInProgress:b}=Se(TE,Te),E=y&&(e||j),C=g.useRef(null),L=g.useRef(),T=g.useRef(new Set),P=g.useRef(new Set),O=g.useRef(!1),I=g.useRef(!1),D=M=>{if(O.current||b){O.current=!1;return}c==null||c(M),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},H=M=>{if(Array.isArray(s)&&(s!=null&&s.includes(2))){M.preventDefault();return}a==null||a(M)},B=x?M=>x(M):void 0,_=M=>{var W,ee;const{resetSelectedElements:A,domNode:$}=h.getState();if(L.current=$==null?void 0:$.getBoundingClientRect(),!y||!e||M.button!==0||M.target!==C.current||!L.current)return;(ee=(W=M.target)==null?void 0:W.setPointerCapture)==null||ee.call(W,M.pointerId),I.current=!0,O.current=!1;const{x:V,y:F}=dt(M.nativeEvent,L.current);A(),h.setState({userSelectionRect:{width:0,height:0,startX:V,startY:F,x:V,y:F}}),i==null||i(M)},R=M=>{const{userSelectionRect:A,transform:$,nodeLookup:V,edgeLookup:F,connectionLookup:W,triggerNodeChanges:ee,triggerEdgeChanges:te,defaultEdgeOptions:se}=h.getState();if(!L.current||!A)return;O.current=!0;const{x:oe,y:J}=dt(M.nativeEvent,L.current),{startX:le,startY:fe}=A,ke={startX:le,startY:fe,x:oe<le?oe:le,y:J<fe?J:fe,width:Math.abs(oe-le),height:Math.abs(J-fe)},de=T.current,G=P.current;T.current=new Set(va(V,ke,$,n===nn.Partial,!0).map(ue=>ue.id)),P.current=new Set;const ae=(se==null?void 0:se.selectable)??!0;for(const ue of T.current){const _e=W.get(ue);if(_e)for(const{edgeId:De}of _e.values()){const Gt=F.get(De);Gt&&(Gt.selectable??ae)&&P.current.add(De)}}if(!Mi(de,T.current)){const ue=Ut(V,T.current,!0);ee(ue)}if(!Mi(G,P.current)){const ue=Ut(F,P.current);te(ue)}h.setState({userSelectionRect:ke,userSelectionActive:!0,nodesSelectionActive:!1})},k=M=>{var $,V;if(M.button!==0||!I.current)return;(V=($=M.target)==null?void 0:$.releasePointerCapture)==null||V.call($,M.pointerId);const{userSelectionRect:A}=h.getState();!j&&A&&M.target===C.current&&(D==null||D(M)),h.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:T.current.size>0}),l==null||l(M),(t||r)&&(O.current=!1),I.current=!1},v=s===!0||Array.isArray(s)&&s.includes(0);return o.jsxRuntimeExports.jsxs("div",{className:Ae(["react-flow__pane",{draggable:v,dragging:S,selection:e}]),onClick:E?void 0:ko(D,C),onContextMenu:ko(H,C),onWheel:ko(B,C),onPointerEnter:E?void 0:d,onPointerDown:E?_:p,onPointerMove:E?R:p,onPointerUp:E?k:void 0,onPointerLeave:m,ref:C,style:eo,children:[f,o.jsxRuntimeExports.jsx(NE,{})]})}function Xo({id:e,store:t,unselect:n=!1,nodeRef:s}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:l,nodeLookup:c,onError:a}=t.getState(),x=c.get(e);if(!x){a==null||a("012",Be.error012(e));return}t.setState({nodesSelectionActive:!1}),x.selected?(n||x.selected&&l)&&(i({nodes:[x],edges:[]}),requestAnimationFrame(()=>{var d;return(d=s==null?void 0:s.current)==null?void 0:d.blur()})):r([e])}function au({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:s,nodeId:r,isSelectable:i,nodeClickDistance:l}){const c=Pe(),[a,x]=g.useState(!1),d=g.useRef();return g.useEffect(()=>{d.current=j5({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{Xo({id:p,store:c,nodeRef:e})},onDragStart:()=>{x(!0)},onDragStop:()=>{x(!1)}})},[]),g.useEffect(()=>{var p,m;if(t)(p=d.current)==null||p.destroy();else if(e.current)return(m=d.current)==null||m.update({noDragClassName:n,handleSelector:s,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:l}),()=>{var f;(f=d.current)==null||f.destroy()}},[n,s,t,i,e,r]),a}const AE=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function uu(){const e=Pe();return g.useCallback(n=>{const{nodeExtent:s,snapToGrid:r,snapGrid:i,nodesDraggable:l,onError:c,updateNodePositions:a,nodeLookup:x,nodeOrigin:d}=e.getState(),p=new Map,m=AE(l),f=r?i[0]:5,h=r?i[1]:5,j=n.direction.x*f*n.factor,y=n.direction.y*h*n.factor;for(const[,S]of x){if(!m(S))continue;let b={x:S.internals.positionAbsolute.x+j,y:S.internals.positionAbsolute.y+y};r&&(b=Xs(b,i));const{position:E,positionAbsolute:C}=ka({nodeId:S.id,nextPosition:b,nodeLookup:x,nodeExtent:s,nodeOrigin:d,onError:c});S.position=E,S.internals.positionAbsolute=C,p.set(S.id,S)}a(p)},[])}const zr=g.createContext(null),IE=zr.Provider;zr.Consumer;const xu=()=>g.useContext(zr),DE=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),zE=(e,t,n)=>s=>{const{connectionClickStartHandle:r,connectionMode:i,connection:l}=s,{fromHandle:c,toHandle:a,isValid:x}=l,d=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:d,clickConnecting:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,isPossibleEndHandle:i===Vt.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!r,valid:d&&x}};function BE({type:e="source",position:t=U.Top,isValidConnection:n,isConnectable:s=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:l,onConnect:c,children:a,className:x,onMouseDown:d,onTouchStart:p,...m},f){var k,v;const h=l||null,j=e==="target",y=Pe(),S=xu(),{connectOnClick:b,noPanClassName:E,rfId:C}=Se(DE,Te),{connectingFrom:L,connectingTo:T,clickConnecting:P,isPossibleEndHandle:O,connectionInProcess:I,clickConnectionInProcess:D,valid:H}=Se(zE(S,h,e),Te);S||(v=(k=y.getState()).onError)==null||v.call(k,"010",Be.error010());const B=M=>{const{defaultEdgeOptions:A,onConnect:$,hasDefaultEdges:V}=y.getState(),F={...A,...M};if(V){const{edges:W,setEdges:ee}=y.getState();ee(Oa(F,W))}$==null||$(F),c==null||c(F)},_=M=>{if(!S)return;const A=Aa(M.nativeEvent);if(r&&(A&&M.button===0||!A)){const $=y.getState();qo.onPointerDown(M.nativeEvent,{autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:j,handleId:h,nodeId:S,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:$.onConnectEnd,updateConnection:$.updateConnection,onConnect:B,isValidConnection:n||$.isValidConnection,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed})}A?d==null||d(M):p==null||p(M)},R=M=>{const{onClickConnectStart:A,onClickConnectEnd:$,connectionClickStartHandle:V,connectionMode:F,isValidConnection:W,lib:ee,rfId:te,nodeLookup:se,connection:oe}=y.getState();if(!S||!V&&!r)return;if(!V){A==null||A(M.nativeEvent,{nodeId:S,handleId:h,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:S,type:e,id:h}});return}const J=Ta(M.target),le=n||W,{connection:fe,isValid:ke}=qo.isValid(M.nativeEvent,{handle:{nodeId:S,id:h,type:e},connectionMode:F,fromNodeId:V.nodeId,fromHandleId:V.id||null,fromType:V.type,isValidConnection:le,flowId:te,doc:J,lib:ee,nodeLookup:se});ke&&fe&&B(fe);const de=structuredClone(oe);delete de.inProgress,de.toPosition=de.toHandle?de.toHandle.position:null,$==null||$(M,de),y.setState({connectionClickStartHandle:null})};return o.jsxRuntimeExports.jsx("div",{"data-handleid":h,"data-nodeid":S,"data-handlepos":t,"data-id":`${C}-${S}-${h}-${e}`,className:Ae(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,x,{source:!j,target:j,connectable:s,connectablestart:r,connectableend:i,clickconnecting:P,connectingfrom:L,connectingto:T,valid:H,connectionindicator:s&&(!I||O)&&(I||D?i:r)}]),onMouseDown:_,onTouchStart:_,onClick:b?R:void 0,ref:f,...m,children:a})}const An=g.memo(lu(BE));function OE({data:e,isConnectable:t,sourcePosition:n=U.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e==null?void 0:e.label,o.jsxRuntimeExports.jsx(An,{type:"source",position:n,isConnectable:t})]})}function VE({data:e,isConnectable:t,targetPosition:n=U.Top,sourcePosition:s=U.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(An,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,o.jsxRuntimeExports.jsx(An,{type:"source",position:s,isConnectable:t})]})}function FE(){return null}function HE({data:e,isConnectable:t,targetPosition:n=U.Top}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(An,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ls={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},rl={input:OE,default:VE,output:HE,group:FE};function ZE(e){var t,n,s,r;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((s=e.style)==null?void 0:s.width),height:e.height??((r=e.style)==null?void 0:r.height)}}const WE=e=>{const{width:t,height:n,x:s,y:r}=Vn(e.nodeLookup,{filter:i=>!!i.selected});return{width:Je(t)?t:null,height:Je(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${s}px,${r}px)`}};function YE({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const s=Pe(),{width:r,height:i,transformString:l,userSelectionActive:c}=Se(WE,Te),a=uu(),x=g.useRef(null);if(g.useEffect(()=>{var m;n||(m=x.current)==null||m.focus({preventScroll:!0})},[n]),au({nodeRef:x}),c||!r||!i)return null;const d=e?m=>{const f=s.getState().nodes.filter(h=>h.selected);e(m,f)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Ls,m.key)&&(m.preventDefault(),a({direction:Ls[m.key],factor:m.shiftKey?4:1}))};return o.jsxRuntimeExports.jsx("div",{className:Ae(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:o.jsxRuntimeExports.jsx("div",{ref:x,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:r,height:i}})})}const il=typeof window<"u"?window:void 0,GE=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function du({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:a,selectionKeyCode:x,selectionOnDrag:d,selectionMode:p,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:h,panActivationKeyCode:j,zoomActivationKeyCode:y,elementsSelectable:S,zoomOnScroll:b,zoomOnPinch:E,panOnScroll:C,panOnScrollSpeed:L,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:O,defaultViewport:I,translateExtent:D,minZoom:H,maxZoom:B,preventScrolling:_,onSelectionContextMenu:R,noWheelClassName:k,noPanClassName:v,disableKeyboardA11y:M,onViewportChange:A,isControlledViewport:$}){const{nodesSelectionActive:V,userSelectionActive:F}=Se(GE),W=$n(x,{target:il}),ee=$n(j,{target:il}),te=ee||O,se=ee||C,oe=d&&te!==!0,J=W||F||oe;return kE({deleteKeyCode:a,multiSelectionKeyCode:h}),o.jsxRuntimeExports.jsx(PE,{onPaneContextMenu:i,elementsSelectable:S,zoomOnScroll:b,zoomOnPinch:E,panOnScroll:se,panOnScrollSpeed:L,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:!W&&te,defaultViewport:I,translateExtent:D,minZoom:H,maxZoom:B,zoomActivationKeyCode:y,preventScrolling:_,noWheelClassName:k,noPanClassName:v,onViewportChange:A,isControlledViewport:$,paneClickDistance:c,children:o.jsxRuntimeExports.jsxs($E,{onSelectionStart:m,onSelectionEnd:f,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,panOnDrag:te,isSelecting:!!J,selectionMode:p,selectionKeyPressed:W,selectionOnDrag:oe,children:[e,V&&o.jsxRuntimeExports.jsx(YE,{onSelectionContextMenu:R,noPanClassName:v,disableKeyboardA11y:M})]})})}du.displayName="FlowRenderer";const KE=g.memo(du),qE=e=>t=>e?va(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function XE(e){return Se(g.useCallback(qE(e),[e]),Te)}const UE=e=>e.updateNodeInternals;function JE(){const e=Se(UE),[t]=g.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const s=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");s.set(i,{id:i,nodeElement:r.target,force:!0})}),e(s)}));return g.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function QE({node:e,nodeType:t,hasDimensions:n,resizeObserver:s}){const r=Pe(),i=g.useRef(null),l=g.useRef(null),c=g.useRef(e.sourcePosition),a=g.useRef(e.targetPosition),x=g.useRef(t),d=n&&!!e.internals.handleBounds;return g.useEffect(()=>{i.current&&!e.hidden&&(!d||l.current!==i.current)&&(l.current&&(s==null||s.unobserve(l.current)),s==null||s.observe(i.current),l.current=i.current)},[d,e.hidden]),g.useEffect(()=>()=>{l.current&&(s==null||s.unobserve(l.current),l.current=null)},[]),g.useEffect(()=>{if(i.current){const p=x.current!==t,m=c.current!==e.sourcePosition,f=a.current!==e.targetPosition;(p||m||f)&&(x.current=t,c.current=e.sourcePosition,a.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function e4({id:e,onClick:t,onMouseEnter:n,onMouseMove:s,onMouseLeave:r,onContextMenu:i,onDoubleClick:l,nodesDraggable:c,elementsSelectable:a,nodesConnectable:x,nodesFocusable:d,resizeObserver:p,noDragClassName:m,noPanClassName:f,disableKeyboardA11y:h,rfId:j,nodeTypes:y,nodeClickDistance:S,onError:b}){const{node:E,internals:C,isParent:L}=Se(J=>{const le=J.nodeLookup.get(e),fe=J.parentLookup.has(e);return{node:le,internals:le.internals,isParent:fe}},Te);let T=E.type||"default",P=(y==null?void 0:y[T])||rl[T];P===void 0&&(b==null||b("003",Be.error003(T)),T="default",P=rl.default);const O=!!(E.draggable||c&&typeof E.draggable>"u"),I=!!(E.selectable||a&&typeof E.selectable>"u"),D=!!(E.connectable||x&&typeof E.connectable>"u"),H=!!(E.focusable||d&&typeof E.focusable>"u"),B=Pe(),_=La(E),R=QE({node:E,nodeType:T,hasDimensions:_,resizeObserver:p}),k=au({nodeRef:R,disabled:E.hidden||!O,noDragClassName:m,handleSelector:E.dragHandle,nodeId:e,isSelectable:I,nodeClickDistance:S}),v=uu();if(E.hidden)return null;const M=gt(E),A=ZE(E),$=I||O||t||n||s||r,V=n?J=>n(J,{...C.userNode}):void 0,F=s?J=>s(J,{...C.userNode}):void 0,W=r?J=>r(J,{...C.userNode}):void 0,ee=i?J=>i(J,{...C.userNode}):void 0,te=l?J=>l(J,{...C.userNode}):void 0,se=J=>{const{selectNodesOnDrag:le,nodeDragThreshold:fe}=B.getState();I&&(!le||!O||fe>0)&&Xo({id:e,store:B,nodeRef:R}),t&&t(J,{...C.userNode})},oe=J=>{if(!($a(J.nativeEvent)||h))if(Ra.includes(J.key)&&I){const le=J.key==="Escape";Xo({id:e,store:B,unselect:le,nodeRef:R})}else O&&E.selected&&Object.prototype.hasOwnProperty.call(Ls,J.key)&&(J.preventDefault(),B.setState({ariaLiveMessage:`Moved selected node ${J.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~C.positionAbsolute.x}, y: ${~~C.positionAbsolute.y}`}),v({direction:Ls[J.key],factor:J.shiftKey?4:1}))};return o.jsxRuntimeExports.jsx("div",{className:Ae(["react-flow__node",`react-flow__node-${T}`,{[f]:O},E.className,{selected:E.selected,selectable:I,parent:L,draggable:O,dragging:k}]),ref:R,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:_?"visible":"hidden",...E.style,...A},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:F,onMouseLeave:W,onContextMenu:ee,onClick:se,onDoubleClick:te,onKeyDown:H?oe:void 0,tabIndex:H?0:void 0,role:H?"button":void 0,"aria-describedby":h?void 0:`${tu}-${j}`,"aria-label":E.ariaLabel,children:o.jsxRuntimeExports.jsx(IE,{value:e,children:o.jsxRuntimeExports.jsx(P,{id:e,data:E.data,type:T,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:E.selected??!1,selectable:I,draggable:O,deletable:E.deletable??!0,isConnectable:D,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:k,dragHandle:E.dragHandle,zIndex:C.z,parentId:E.parentId,...M})})})}const t4=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function pu(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,onError:i}=Se(t4,Te),l=XE(e.onlyRenderVisibleElements),c=JE();return o.jsxRuntimeExports.jsx("div",{className:"react-flow__nodes",style:eo,children:l.map(a=>o.jsxRuntimeExports.jsx(e4,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}pu.displayName="NodeRenderer";const n4=g.memo(pu);function s4(e){return Se(g.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const s=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),l=n.nodeLookup.get(r.target);i&&l&&s5({sourceNode:i,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&s.push(r.id)}return s},[e]),Te)}const o4=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),r4=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),ll={[vs.Arrow]:o4,[vs.ArrowClosed]:r4};function i4(e){const t=Pe();return g.useMemo(()=>{var r,i;return Object.prototype.hasOwnProperty.call(ll,e)?ll[e]:((i=(r=t.getState()).onError)==null||i.call(r,"009",Be.error009(e)),null)},[e])}const l4=({id:e,type:t,color:n,width:s=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const a=i4(t);return a?o.jsxRuntimeExports.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:c,refX:"0",refY:"0",children:o.jsxRuntimeExports.jsx(a,{color:n,strokeWidth:l})}):null},mu=({defaultColor:e,rfId:t})=>{const n=Se(i=>i.edges),s=Se(i=>i.defaultEdgeOptions),r=g.useMemo(()=>u5(n,{id:t,defaultColor:e,defaultMarkerStart:s==null?void 0:s.markerStart,defaultMarkerEnd:s==null?void 0:s.markerEnd}),[n,s,t,e]);return r.length?o.jsxRuntimeExports.jsx("svg",{className:"react-flow__marker",children:o.jsxRuntimeExports.jsx("defs",{children:r.map(i=>o.jsxRuntimeExports.jsx(l4,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};mu.displayName="MarkerDefinitions";var c4=g.memo(mu);function fu({x:e,y:t,label:n,labelStyle:s,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:a,className:x,...d}){const[p,m]=g.useState({x:1,y:0,width:0,height:0}),f=Ae(["react-flow__edge-textwrapper",x]),h=g.useRef(null);return g.useEffect(()=>{if(h.current){const j=h.current.getBBox();m({x:j.x,y:j.y,width:j.width,height:j.height})}},[n]),n?o.jsxRuntimeExports.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:f,visibility:p.width?"visible":"hidden",...d,children:[r&&o.jsxRuntimeExports.jsx("rect",{width:p.width+2*l[0],x:-l[0],y:-l[1],height:p.height+2*l[1],className:"react-flow__edge-textbg",style:i,rx:c,ry:c}),o.jsxRuntimeExports.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:h,style:s,children:n}),a]}):null}fu.displayName="EdgeText";const a4=g.memo(fu);function Qe({path:e,labelX:t,labelY:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:a,interactionWidth:x=20,...d}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{...d,d:e,fill:"none",className:Ae(["react-flow__edge-path",d.className])}),x&&o.jsxRuntimeExports.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:x,className:"react-flow__edge-interaction"}),s&&Je(t)&&Je(n)?o.jsxRuntimeExports.jsx(a4,{x:t,y:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:a}):null]})}function cl({pos:e,x1:t,y1:n,x2:s,y2:r}){return e===U.Left||e===U.Right?[.5*(t+s),n]:[t,.5*(n+r)]}function hu({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top}){const[l,c]=cl({pos:n,x1:e,y1:t,x2:s,y2:r}),[a,x]=cl({pos:i,x1:s,y1:r,x2:e,y2:t}),[d,p,m,f]=Ia({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:a,targetControlY:x});return[`M${e},${t} C${l},${c} ${a},${x} ${s},${r}`,d,p,m,f]}function gu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l,targetPosition:c,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:S})=>{const[b,E,C]=hu({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:c}),L=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:L,path:b,labelX:E,labelY:C,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:S})})}const u4=gu({isInternal:!1}),ju=gu({isInternal:!0});u4.displayName="SimpleBezierEdge";ju.displayName="SimpleBezierEdgeInternal";function Eu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,sourcePosition:f=U.Bottom,targetPosition:h=U.Top,markerEnd:j,markerStart:y,pathOptions:S,interactionWidth:b})=>{const[E,C,L]=Yo({sourceX:n,sourceY:s,sourcePosition:f,targetX:r,targetY:i,targetPosition:h,borderRadius:S==null?void 0:S.borderRadius,offset:S==null?void 0:S.offset}),T=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:T,path:E,labelX:C,labelY:L,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:j,markerStart:y,interactionWidth:b})})}const yu=Eu({isInternal:!1}),Su=Eu({isInternal:!0});yu.displayName="SmoothStepEdge";Su.displayName="SmoothStepEdgeInternal";function Ru(e){return g.memo(({id:t,...n})=>{var r;const s=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(yu,{...n,id:s,pathOptions:g.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const x4=Ru({isInternal:!1}),Cu=Ru({isInternal:!0});x4.displayName="StepEdge";Cu.displayName="StepEdgeInternal";function wu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:f,markerStart:h,interactionWidth:j})=>{const[y,S,b]=Va({sourceX:n,sourceY:s,targetX:r,targetY:i}),E=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:E,path:y,labelX:S,labelY:b,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:x,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:f,markerStart:h,interactionWidth:j})})}const d4=wu({isInternal:!1}),bu=wu({isInternal:!0});d4.displayName="StraightEdge";bu.displayName="StraightEdgeInternal";function vu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l=U.Bottom,targetPosition:c=U.Top,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,pathOptions:S,interactionWidth:b})=>{const[E,C,L]=Da({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:c,curvature:S==null?void 0:S.curvature}),T=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:T,path:E,labelX:C,labelY:L,label:a,labelStyle:x,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:b})})}const p4=vu({isInternal:!1}),ku=vu({isInternal:!0});p4.displayName="BezierEdge";ku.displayName="BezierEdgeInternal";const al={default:ku,straight:bu,step:Cu,smoothstep:Su,simplebezier:ju},ul={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},m4=(e,t,n)=>n===U.Left?e-t:n===U.Right?e+t:e,f4=(e,t,n)=>n===U.Top?e-t:n===U.Bottom?e+t:e,xl="react-flow__edgeupdater";function dl({position:e,centerX:t,centerY:n,radius:s=10,onMouseDown:r,onMouseEnter:i,onMouseOut:l,type:c}){return o.jsxRuntimeExports.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:l,className:Ae([xl,`${xl}-${c}`]),cx:m4(t,s,e),cy:f4(n,s,e),r:s,stroke:"transparent",fill:"transparent"})}function h4({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:s,sourceY:r,targetX:i,targetY:l,sourcePosition:c,targetPosition:a,onReconnect:x,onReconnectStart:d,onReconnectEnd:p,setReconnecting:m,setUpdateHover:f}){const h=Pe(),j=(C,L)=>{if(C.button!==0)return;const{autoPanOnConnect:T,domNode:P,isValidConnection:O,connectionMode:I,connectionRadius:D,lib:H,onConnectStart:B,onConnectEnd:_,cancelConnection:R,nodeLookup:k,rfId:v,panBy:M,updateConnection:A}=h.getState(),$=L.type==="target";m(!0),d==null||d(C,n,L.type);const V=(W,ee)=>{m(!1),p==null||p(W,n,L.type,ee)},F=W=>x==null?void 0:x(n,W);qo.onPointerDown(C.nativeEvent,{autoPanOnConnect:T,connectionMode:I,connectionRadius:D,domNode:P,handleId:L.id,nodeId:L.nodeId,nodeLookup:k,isTarget:$,edgeUpdaterType:L.type,lib:H,flowId:v,cancelConnection:R,panBy:M,isValidConnection:O,onConnect:F,onConnectStart:B,onConnectEnd:_,onReconnectEnd:V,updateConnection:A,getTransform:()=>h.getState().transform,getFromHandle:()=>h.getState().connection.fromHandle})},y=C=>j(C,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=C=>j(C,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),b=()=>f(!0),E=()=>f(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(e===!0||e==="source")&&o.jsxRuntimeExports.jsx(dl,{position:c,centerX:s,centerY:r,radius:t,onMouseDown:y,onMouseEnter:b,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&o.jsxRuntimeExports.jsx(dl,{position:a,centerX:i,centerY:l,radius:t,onMouseDown:S,onMouseEnter:b,onMouseOut:E,type:"target"})]})}function g4({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:s,onClick:r,onDoubleClick:i,onContextMenu:l,onMouseEnter:c,onMouseMove:a,onMouseLeave:x,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:f,rfId:h,edgeTypes:j,noPanClassName:y,onError:S,disableKeyboardA11y:b}){let E=Se(G=>G.edgeLookup.get(e));const C=Se(G=>G.defaultEdgeOptions);E=C?{...C,...E}:E;let L=E.type||"default",T=(j==null?void 0:j[L])||al[L];T===void 0&&(S==null||S("011",Be.error011(L)),L="default",T=al.default);const P=!!(E.focusable||t&&typeof E.focusable>"u"),O=typeof p<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),I=!!(E.selectable||s&&typeof E.selectable>"u"),D=g.useRef(null),[H,B]=g.useState(!1),[_,R]=g.useState(!1),k=Pe(),{zIndex:v,sourceX:M,sourceY:A,targetX:$,targetY:V,sourcePosition:F,targetPosition:W}=Se(g.useCallback(G=>{const ae=G.nodeLookup.get(E.source),ue=G.nodeLookup.get(E.target);if(!ae||!ue)return{zIndex:E.zIndex,...ul};const _e=a5({id:e,sourceNode:ae,targetNode:ue,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:G.connectionMode,onError:S});return{zIndex:n5({selected:E.selected,zIndex:E.zIndex,sourceNode:ae,targetNode:ue,elevateOnSelect:G.elevateEdgesOnSelect}),..._e||ul}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Te),ee=g.useMemo(()=>E.markerStart?`url('#${Go(E.markerStart,h)}')`:void 0,[E.markerStart,h]),te=g.useMemo(()=>E.markerEnd?`url('#${Go(E.markerEnd,h)}')`:void 0,[E.markerEnd,h]);if(E.hidden||M===null||A===null||$===null||V===null)return null;const se=G=>{var De;const{addSelectedEdges:ae,unselectNodesAndEdges:ue,multiSelectionActive:_e}=k.getState();I&&(k.setState({nodesSelectionActive:!1}),E.selected&&_e?(ue({nodes:[],edges:[E]}),(De=D.current)==null||De.blur()):ae([e])),r&&r(G,E)},oe=i?G=>{i(G,{...E})}:void 0,J=l?G=>{l(G,{...E})}:void 0,le=c?G=>{c(G,{...E})}:void 0,fe=a?G=>{a(G,{...E})}:void 0,ke=x?G=>{x(G,{...E})}:void 0,de=G=>{var ae;if(!b&&Ra.includes(G.key)&&I){const{unselectNodesAndEdges:ue,addSelectedEdges:_e}=k.getState();G.key==="Escape"?((ae=D.current)==null||ae.blur(),ue({edges:[E]})):_e([e])}};return o.jsxRuntimeExports.jsx("svg",{style:{zIndex:v},children:o.jsxRuntimeExports.jsxs("g",{className:Ae(["react-flow__edge",`react-flow__edge-${L}`,E.className,y,{selected:E.selected,animated:E.animated,inactive:!I&&!r,updating:H,selectable:I}]),onClick:se,onDoubleClick:oe,onContextMenu:J,onMouseEnter:le,onMouseMove:fe,onMouseLeave:ke,onKeyDown:P?de:void 0,tabIndex:P?0:void 0,role:P?"button":"img","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":P?`${nu}-${h}`:void 0,ref:D,children:[!_&&o.jsxRuntimeExports.jsx(T,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:I,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:M,sourceY:A,targetX:$,targetY:V,sourcePosition:F,targetPosition:W,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:ee,markerEnd:te,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),O&&o.jsxRuntimeExports.jsx(h4,{edge:E,isReconnectable:O,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:f,sourceX:M,sourceY:A,targetX:$,targetY:V,sourcePosition:F,targetPosition:W,setUpdateHover:B,setReconnecting:R})]})})}const j4=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Mu({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:s,noPanClassName:r,onReconnect:i,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:a,onEdgeMouseLeave:x,onEdgeClick:d,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:f,onReconnectEnd:h,disableKeyboardA11y:j}){const{edgesFocusable:y,edgesReconnectable:S,elementsSelectable:b,onError:E}=Se(j4,Te),C=s4(t);return o.jsxRuntimeExports.jsxs("div",{className:"react-flow__edges",children:[o.jsxRuntimeExports.jsx(c4,{defaultColor:e,rfId:n}),C.map(L=>o.jsxRuntimeExports.jsx(g4,{id:L,edgesFocusable:y,edgesReconnectable:S,elementsSelectable:b,noPanClassName:r,onReconnect:i,onContextMenu:l,onMouseEnter:c,onMouseMove:a,onMouseLeave:x,onClick:d,reconnectRadius:p,onDoubleClick:m,onReconnectStart:f,onReconnectEnd:h,rfId:n,onError:E,edgeTypes:s,disableKeyboardA11y:j},L))]})}Mu.displayName="EdgeRenderer";const E4=g.memo(Mu),y4=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function S4({children:e}){const t=Se(y4);return o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function R4(e){const t=Ht(),n=g.useRef(!1);g.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const C4=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function w4(e){const t=Se(C4),n=Pe();return g.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function b4(e){return e.connection.inProgress?{...e.connection,to:Fn(e.connection.to,e.transform)}:{...e.connection}}function v4(e){return b4}function k4(e){const t=v4();return Se(t,Te)}const M4=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function _4({containerStyle:e,style:t,type:n,component:s}){const{nodesConnectable:r,width:i,height:l,isValid:c,inProgress:a}=Se(M4,Te);return!(i&&r&&a)?null:o.jsxRuntimeExports.jsx("svg",{style:e,width:i,height:l,className:"react-flow__connectionline react-flow__container",children:o.jsxRuntimeExports.jsx("g",{className:Ae(["react-flow__connection",wa(c)]),children:o.jsxRuntimeExports.jsx(_u,{style:t,type:n,CustomComponent:s,isValid:c})})})}const _u=({style:e,type:t=Rt.Bezier,CustomComponent:n,isValid:s})=>{const{inProgress:r,from:i,fromNode:l,fromHandle:c,fromPosition:a,to:x,toNode:d,toHandle:p,toPosition:m}=k4();if(!r)return;if(n)return o.jsxRuntimeExports.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:c,fromX:i.x,fromY:i.y,toX:x.x,toY:x.y,fromPosition:a,toPosition:m,connectionStatus:wa(s),toNode:d,toHandle:p});let f="";const h={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:x.x,targetY:x.y,targetPosition:m};switch(t){case Rt.Bezier:[f]=Da(h);break;case Rt.SimpleBezier:[f]=hu(h);break;case Rt.Step:[f]=Yo({...h,borderRadius:0});break;case Rt.SmoothStep:[f]=Yo(h);break;default:[f]=Va(h)}return o.jsxRuntimeExports.jsx("path",{d:f,fill:"none",className:"react-flow__connection-path",style:e})};_u.displayName="ConnectionLine";const P4={};function pl(e=P4){const t=g.useRef(e),n=Pe();g.useEffect(()=>{var s,r;if(process.env.NODE_ENV==="development"){const i=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const l of i)if(t.current[l]!==e[l]){(r=(s=n.getState()).onError)==null||r.call(s,"002",Be.error002());break}t.current=e}},[e])}function L4(){const e=Pe(),t=g.useRef(!1);g.useEffect(()=>{var n,s;if(process.env.NODE_ENV==="development"&&!t.current){const r=document.querySelector(".react-flow__pane");r&&window.getComputedStyle(r).zIndex!=="1"&&((s=(n=e.getState()).onError)==null||s.call(n,"013",Be.error013("react"))),t.current=!0}},[])}function Pu({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:s,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:a,onNodeMouseLeave:x,onNodeContextMenu:d,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:f,connectionLineType:h,connectionLineStyle:j,connectionLineComponent:y,connectionLineContainerStyle:S,selectionKeyCode:b,selectionOnDrag:E,selectionMode:C,multiSelectionKeyCode:L,panActivationKeyCode:T,zoomActivationKeyCode:P,deleteKeyCode:O,onlyRenderVisibleElements:I,elementsSelectable:D,defaultViewport:H,translateExtent:B,minZoom:_,maxZoom:R,preventScrolling:k,defaultMarkerColor:v,zoomOnScroll:M,zoomOnPinch:A,panOnScroll:$,panOnScrollSpeed:V,panOnScrollMode:F,zoomOnDoubleClick:W,panOnDrag:ee,onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:oe,onPaneMouseLeave:J,onPaneScroll:le,onPaneContextMenu:fe,paneClickDistance:ke,nodeClickDistance:de,onEdgeContextMenu:G,onEdgeMouseEnter:ae,onEdgeMouseMove:ue,onEdgeMouseLeave:_e,reconnectRadius:De,onReconnect:Gt,onReconnectStart:ro,onReconnectEnd:io,noDragClassName:xn,noWheelClassName:lo,noPanClassName:dn,disableKeyboardA11y:pn,nodeExtent:co,rfId:mn,viewport:fn,onViewportChange:Wn}){return pl(e),pl(t),L4(),R4(n),w4(fn),o.jsxRuntimeExports.jsx(KE,{onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:oe,onPaneMouseLeave:J,onPaneContextMenu:fe,onPaneScroll:le,paneClickDistance:ke,deleteKeyCode:O,selectionKeyCode:b,selectionOnDrag:E,selectionMode:C,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:L,panActivationKeyCode:T,zoomActivationKeyCode:P,elementsSelectable:D,zoomOnScroll:M,zoomOnPinch:A,zoomOnDoubleClick:W,panOnScroll:$,panOnScrollSpeed:V,panOnScrollMode:F,panOnDrag:ee,defaultViewport:H,translateExtent:B,minZoom:_,maxZoom:R,onSelectionContextMenu:p,preventScrolling:k,noDragClassName:xn,noWheelClassName:lo,noPanClassName:dn,disableKeyboardA11y:pn,onViewportChange:Wn,isControlledViewport:!!fn,children:o.jsxRuntimeExports.jsxs(S4,{children:[o.jsxRuntimeExports.jsx(E4,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:l,onReconnect:Gt,onReconnectStart:ro,onReconnectEnd:io,onlyRenderVisibleElements:I,onEdgeContextMenu:G,onEdgeMouseEnter:ae,onEdgeMouseMove:ue,onEdgeMouseLeave:_e,reconnectRadius:De,defaultMarkerColor:v,noPanClassName:dn,disableKeyboardA11y:pn,rfId:mn}),o.jsxRuntimeExports.jsx(_4,{style:j,type:h,component:y,containerStyle:S}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__edgelabel-renderer"}),o.jsxRuntimeExports.jsx(n4,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:i,onNodeMouseEnter:c,onNodeMouseMove:a,onNodeMouseLeave:x,onNodeContextMenu:d,nodeClickDistance:de,onlyRenderVisibleElements:I,noPanClassName:dn,noDragClassName:xn,disableKeyboardA11y:pn,nodeExtent:co,rfId:mn}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport-portal"})]})})}Pu.displayName="GraphView";const N4=g.memo(Pu),ml=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a}={})=>{const x=new Map,d=new Map,p=new Map,m=new Map,f=s??t??[],h=n??e??[],j=c??[0,0],y=a??Ln;Ha(p,m,f),Ko(h,x,d,{nodeOrigin:j,nodeExtent:y,elevateNodesOnSelect:!1});let S=[0,0,1];if(l&&r&&i){const b=Vn(x,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:E,y:C,zoom:L}=Nr(b,r,i,.5,2,.1);S=[E,C,L]}return{rfId:"1",width:0,height:0,transform:S,nodes:h,nodeLookup:x,parentLookup:d,edges:f,edgeLookup:m,connectionLookup:p,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:.5,maxZoom:2,translateExtent:Ln,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:j,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:void 0,fitViewResolver:null,connection:{...Ca},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:Ms,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},T4=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a})=>J5((x,d)=>{async function p(){const{nodeLookup:m,panZoom:f,fitViewOptions:h,fitViewResolver:j,width:y,height:S,minZoom:b,maxZoom:E}=d();f&&(await U3({nodes:m,width:y,height:S,panZoom:f,minZoom:b,maxZoom:E},h),j==null||j.resolve(!0),x({fitViewResolver:null}))}return{...ml({nodes:e,edges:t,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a,defaultNodes:n,defaultEdges:s}),setNodes:m=>{const{nodeLookup:f,parentLookup:h,nodeOrigin:j,elevateNodesOnSelect:y,fitViewQueued:S}=d(),b=Ko(m,f,h,{nodeOrigin:j,nodeExtent:a,elevateNodesOnSelect:y,checkEquality:!0});S&&b?(p(),x({nodes:m,fitViewQueued:!1,fitViewOptions:void 0})):x({nodes:m})},setEdges:m=>{const{connectionLookup:f,edgeLookup:h}=d();Ha(f,h,m),x({edges:m})},setDefaultNodesAndEdges:(m,f)=>{if(m){const{setNodes:h}=d();h(m),x({hasDefaultNodes:!0})}if(f){const{setEdges:h}=d();h(f),x({hasDefaultEdges:!0})}},updateNodeInternals:m=>{const{triggerNodeChanges:f,nodeLookup:h,parentLookup:j,domNode:y,nodeOrigin:S,nodeExtent:b,debug:E,fitViewQueued:C}=d(),{changes:L,updatedInternals:T}=f5(m,h,j,y,S,b);T&&(d5(h,j,{nodeOrigin:S,nodeExtent:b}),C?(p(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(L==null?void 0:L.length)>0&&(E&&console.log("React Flow: trigger node changes",L),f==null||f(L)))},updateNodePositions:(m,f=!1)=>{const h=[],j=[],{nodeLookup:y,triggerNodeChanges:S}=d();for(const[b,E]of m){const C=y.get(b),L=!!(C!=null&&C.expandParent&&(C!=null&&C.parentId)&&(E!=null&&E.position)),T={id:b,type:"position",position:L?{x:Math.max(0,E.position.x),y:Math.max(0,E.position.y)}:E.position,dragging:f};L&&C.parentId&&h.push({id:b,parentId:C.parentId,rect:{...E.internals.positionAbsolute,width:E.measured.width??0,height:E.measured.height??0}}),j.push(T)}if(h.length>0){const{parentLookup:b,nodeOrigin:E}=d(),C=Dr(h,y,b,E);j.push(...C)}S(j)},triggerNodeChanges:m=>{const{onNodesChange:f,setNodes:h,nodes:j,hasDefaultNodes:y,debug:S}=d();if(m!=null&&m.length){if(y){const b=ru(m,j);h(b)}S&&console.log("React Flow: trigger node changes",m),f==null||f(m)}},triggerEdgeChanges:m=>{const{onEdgesChange:f,setEdges:h,edges:j,hasDefaultEdges:y,debug:S}=d();if(m!=null&&m.length){if(y){const b=iu(m,j);h(b)}S&&console.log("React Flow: trigger edge changes",m),f==null||f(m)}},addSelectedNodes:m=>{const{multiSelectionActive:f,edgeLookup:h,nodeLookup:j,triggerNodeChanges:y,triggerEdgeChanges:S}=d();if(f){const b=m.map(E=>$t(E,!0));y(b);return}y(Ut(j,new Set([...m]),!0)),S(Ut(h))},addSelectedEdges:m=>{const{multiSelectionActive:f,edgeLookup:h,nodeLookup:j,triggerNodeChanges:y,triggerEdgeChanges:S}=d();if(f){const b=m.map(E=>$t(E,!0));S(b);return}S(Ut(h,new Set([...m]))),y(Ut(j,new Set,!0))},unselectNodesAndEdges:({nodes:m,edges:f}={})=>{const{edges:h,nodes:j,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:b}=d(),E=m||j,C=f||h,L=E.map(P=>{const O=y.get(P.id);return O&&(O.selected=!1),$t(P.id,!1)}),T=C.map(P=>$t(P.id,!1));S(L),b(T)},setMinZoom:m=>{const{panZoom:f,maxZoom:h}=d();f==null||f.setScaleExtent([m,h]),x({minZoom:m})},setMaxZoom:m=>{const{panZoom:f,minZoom:h}=d();f==null||f.setScaleExtent([h,m]),x({maxZoom:m})},setTranslateExtent:m=>{var f;(f=d().panZoom)==null||f.setTranslateExtent(m),x({translateExtent:m})},setPaneClickDistance:m=>{var f;(f=d().panZoom)==null||f.setClickDistance(m)},resetSelectedElements:()=>{const{edges:m,nodes:f,triggerNodeChanges:h,triggerEdgeChanges:j}=d(),y=f.reduce((b,E)=>E.selected?[...b,$t(E.id,!1)]:b,[]),S=m.reduce((b,E)=>E.selected?[...b,$t(E.id,!1)]:b,[]);h(y),j(S)},setNodeExtent:m=>{const{nodes:f,nodeLookup:h,parentLookup:j,nodeOrigin:y,elevateNodesOnSelect:S,nodeExtent:b}=d();m[0][0]===b[0][0]&&m[0][1]===b[0][1]&&m[1][0]===b[1][0]&&m[1][1]===b[1][1]||(Ko(f,h,j,{nodeOrigin:y,nodeExtent:m,elevateNodesOnSelect:S,checkEquality:!1}),x({nodeExtent:m}))},panBy:m=>{const{transform:f,width:h,height:j,panZoom:y,translateExtent:S}=d();return h5({delta:m,panZoom:y,transform:f,translateExtent:S,width:h,height:j})},cancelConnection:()=>{x({connection:{...Ca}})},updateConnection:m=>{x({connection:m})},reset:()=>x({...ml()})}},Object.is);function Lu({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:s,initialWidth:r,initialHeight:i,fitView:l,nodeOrigin:c,nodeExtent:a,children:x}){const[d]=g.useState(()=>T4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,nodeOrigin:c,nodeExtent:a}));return o.jsxRuntimeExports.jsx(Q5,{value:d,children:o.jsxRuntimeExports.jsx(RE,{children:x})})}function $4({children:e,nodes:t,edges:n,defaultNodes:s,defaultEdges:r,width:i,height:l,fitView:c,nodeOrigin:a,nodeExtent:x}){return g.useContext(Js)?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e}):o.jsxRuntimeExports.jsx(Lu,{initialNodes:t,initialEdges:n,defaultNodes:s,defaultEdges:r,initialWidth:i,initialHeight:l,fitView:c,nodeOrigin:a,nodeExtent:x,children:e})}const A4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function I4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,className:r,nodeTypes:i,edgeTypes:l,onNodeClick:c,onEdgeClick:a,onInit:x,onMove:d,onMoveStart:p,onMoveEnd:m,onConnect:f,onConnectStart:h,onConnectEnd:j,onClickConnectStart:y,onClickConnectEnd:S,onNodeMouseEnter:b,onNodeMouseMove:E,onNodeMouseLeave:C,onNodeContextMenu:L,onNodeDoubleClick:T,onNodeDragStart:P,onNodeDrag:O,onNodeDragStop:I,onNodesDelete:D,onEdgesDelete:H,onDelete:B,onSelectionChange:_,onSelectionDragStart:R,onSelectionDrag:k,onSelectionDragStop:v,onSelectionContextMenu:M,onSelectionStart:A,onSelectionEnd:$,onBeforeDelete:V,connectionMode:F,connectionLineType:W=Rt.Bezier,connectionLineStyle:ee,connectionLineComponent:te,connectionLineContainerStyle:se,deleteKeyCode:oe="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:le=!1,selectionMode:fe=nn.Full,panActivationKeyCode:ke="Space",multiSelectionKeyCode:de=Ps()?"Meta":"Control",zoomActivationKeyCode:G=Ps()?"Meta":"Control",snapToGrid:ae,snapGrid:ue,onlyRenderVisibleElements:_e=!1,selectNodesOnDrag:De,nodesDraggable:Gt,nodesConnectable:ro,nodesFocusable:io,nodeOrigin:xn=su,edgesFocusable:lo,edgesReconnectable:dn,elementsSelectable:pn=!0,defaultViewport:co=dE,minZoom:mn=.5,maxZoom:fn=2,translateExtent:Wn=Ln,preventScrolling:bm=!0,nodeExtent:ao,defaultMarkerColor:vm="#b1b1b7",zoomOnScroll:km=!0,zoomOnPinch:Mm=!0,panOnScroll:_m=!1,panOnScrollSpeed:Pm=.5,panOnScrollMode:Lm=It.Free,zoomOnDoubleClick:Nm=!0,panOnDrag:Tm=!0,onPaneClick:$m,onPaneMouseEnter:Am,onPaneMouseMove:Im,onPaneMouseLeave:Dm,onPaneScroll:zm,onPaneContextMenu:Bm,paneClickDistance:Wr=0,nodeClickDistance:Om=0,children:Vm,onReconnect:Fm,onReconnectStart:Hm,onReconnectEnd:Zm,onEdgeContextMenu:Wm,onEdgeDoubleClick:Ym,onEdgeMouseEnter:Gm,onEdgeMouseMove:Km,onEdgeMouseLeave:qm,reconnectRadius:Xm=10,onNodesChange:Um,onEdgesChange:Jm,noDragClassName:Qm="nodrag",noWheelClassName:ef="nowheel",noPanClassName:Yr="nopan",fitView:Gr,fitViewOptions:tf,connectOnClick:nf,attributionPosition:sf,proOptions:of,defaultEdgeOptions:rf,elevateNodesOnSelect:lf,elevateEdgesOnSelect:cf,disableKeyboardA11y:Kr=!1,autoPanOnConnect:af,autoPanOnNodeDrag:uf,autoPanSpeed:xf,connectionRadius:df,isValidConnection:pf,onError:mf,style:ff,id:qr,nodeDragThreshold:hf,viewport:gf,onViewportChange:jf,width:Ef,height:yf,colorMode:Sf="light",debug:Rf,onScroll:Yn,...Cf},wf){const uo=qr||"1",bf=hE(Sf),vf=g.useCallback(Xr=>{Xr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Yn==null||Yn(Xr)},[Yn]);return o.jsxRuntimeExports.jsx("div",{"data-testid":"rf__wrapper",...Cf,onScroll:vf,style:{...ff,...A4},ref:wf,className:Ae(["react-flow",r,bf]),id:qr,children:o.jsxRuntimeExports.jsxs($4,{nodes:e,edges:t,width:Ef,height:yf,fitView:Gr,nodeOrigin:xn,nodeExtent:ao,children:[o.jsxRuntimeExports.jsx(N4,{onInit:x,onNodeClick:c,onEdgeClick:a,onNodeMouseEnter:b,onNodeMouseMove:E,onNodeMouseLeave:C,onNodeContextMenu:L,onNodeDoubleClick:T,nodeTypes:i,edgeTypes:l,connectionLineType:W,connectionLineStyle:ee,connectionLineComponent:te,connectionLineContainerStyle:se,selectionKeyCode:J,selectionOnDrag:le,selectionMode:fe,deleteKeyCode:oe,multiSelectionKeyCode:de,panActivationKeyCode:ke,zoomActivationKeyCode:G,onlyRenderVisibleElements:_e,defaultViewport:co,translateExtent:Wn,minZoom:mn,maxZoom:fn,preventScrolling:bm,zoomOnScroll:km,zoomOnPinch:Mm,zoomOnDoubleClick:Nm,panOnScroll:_m,panOnScrollSpeed:Pm,panOnScrollMode:Lm,panOnDrag:Tm,onPaneClick:$m,onPaneMouseEnter:Am,onPaneMouseMove:Im,onPaneMouseLeave:Dm,onPaneScroll:zm,onPaneContextMenu:Bm,paneClickDistance:Wr,nodeClickDistance:Om,onSelectionContextMenu:M,onSelectionStart:A,onSelectionEnd:$,onReconnect:Fm,onReconnectStart:Hm,onReconnectEnd:Zm,onEdgeContextMenu:Wm,onEdgeDoubleClick:Ym,onEdgeMouseEnter:Gm,onEdgeMouseMove:Km,onEdgeMouseLeave:qm,reconnectRadius:Xm,defaultMarkerColor:vm,noDragClassName:Qm,noWheelClassName:ef,noPanClassName:Yr,rfId:uo,disableKeyboardA11y:Kr,nodeExtent:ao,viewport:gf,onViewportChange:jf}),o.jsxRuntimeExports.jsx(fE,{nodes:e,edges:t,defaultNodes:n,defaultEdges:s,onConnect:f,onConnectStart:h,onConnectEnd:j,onClickConnectStart:y,onClickConnectEnd:S,nodesDraggable:Gt,nodesConnectable:ro,nodesFocusable:io,edgesFocusable:lo,edgesReconnectable:dn,elementsSelectable:pn,elevateNodesOnSelect:lf,elevateEdgesOnSelect:cf,minZoom:mn,maxZoom:fn,nodeExtent:ao,onNodesChange:Um,onEdgesChange:Jm,snapToGrid:ae,snapGrid:ue,connectionMode:F,translateExtent:Wn,connectOnClick:nf,defaultEdgeOptions:rf,fitView:Gr,fitViewOptions:tf,onNodesDelete:D,onEdgesDelete:H,onDelete:B,onNodeDragStart:P,onNodeDrag:O,onNodeDragStop:I,onSelectionDrag:k,onSelectionDragStart:R,onSelectionDragStop:v,onMove:d,onMoveStart:p,onMoveEnd:m,noPanClassName:Yr,nodeOrigin:xn,rfId:uo,autoPanOnConnect:af,autoPanOnNodeDrag:uf,autoPanSpeed:xf,onError:mf,connectionRadius:df,isValidConnection:pf,selectNodesOnDrag:De,nodeDragThreshold:hf,onBeforeDelete:V,paneClickDistance:Wr,debug:Rf}),o.jsxRuntimeExports.jsx(xE,{onSelectionChange:_}),Vm,o.jsxRuntimeExports.jsx(iE,{proOptions:of,position:sf}),o.jsxRuntimeExports.jsx(oE,{rfId:uo,disableKeyboardA11y:Kr})]})})}var D4=lu(I4);function z4(){const e=Pe();return g.useCallback(t=>{const{domNode:n,updateNodeInternals:s}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(l=>{const c=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${l}"]`);c&&i.set(l,{id:l,nodeElement:c,force:!0})}),requestAnimationFrame(()=>s(i,{triggerFitView:!1}))},[])}function B4({onStart:e,onChange:t,onEnd:n}){const s=Pe();g.useEffect(()=>{s.setState({onViewportChangeStart:e})},[e]),g.useEffect(()=>{s.setState({onViewportChange:t})},[t]),g.useEffect(()=>{s.setState({onViewportChangeEnd:n})},[n])}function O4({dimensions:e,lineWidth:t,variant:n,className:s}){return o.jsxRuntimeExports.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ae(["react-flow__background-pattern",n,s])})}function V4({radius:e,className:t}){return o.jsxRuntimeExports.jsx("circle",{cx:e,cy:e,r:e,className:Ae(["react-flow__background-pattern","dots",t])})}var bt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(bt||(bt={}));const F4={[bt.Dots]:1,[bt.Lines]:1,[bt.Cross]:6},H4=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Nu({id:e,variant:t=bt.Dots,gap:n=20,size:s,lineWidth:r=1,offset:i=0,color:l,bgColor:c,style:a,className:x,patternClassName:d}){const p=g.useRef(null),{transform:m,patternId:f}=Se(H4,Te),h=s||F4[t],j=t===bt.Dots,y=t===bt.Cross,S=Array.isArray(n)?n:[n,n],b=[S[0]*m[2]||1,S[1]*m[2]||1],E=h*m[2],C=Array.isArray(i)?i:[i,i],L=y?[E,E]:b,T=[C[0]*m[2]||1+L[0]/2,C[1]*m[2]||1+L[1]/2],P=`${f}${e||""}`;return o.jsxRuntimeExports.jsxs("svg",{className:Ae(["react-flow__background",x]),style:{...a,...eo,"--xy-background-color-props":c,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[o.jsxRuntimeExports.jsx("pattern",{id:P,x:m[0]%b[0],y:m[1]%b[1],width:b[0],height:b[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:j?o.jsxRuntimeExports.jsx(V4,{radius:E/2,className:d}):o.jsxRuntimeExports.jsx(O4,{dimensions:L,lineWidth:r,variant:t,className:d})}),o.jsxRuntimeExports.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}Nu.displayName="Background";const Z4=g.memo(Nu);function W4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:o.jsxRuntimeExports.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Y4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:o.jsxRuntimeExports.jsx("path",{d:"M0 0h32v4.2H0z"})})}function G4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:o.jsxRuntimeExports.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function K4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function q4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function ns({children:e,className:t,...n}){return o.jsxRuntimeExports.jsx("button",{type:"button",className:Ae(["react-flow__controls-button",t]),...n,children:e})}const X4=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function Tu({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:s=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:l,onFitView:c,onInteractiveChange:a,className:x,children:d,position:p="bottom-left",orientation:m="vertical","aria-label":f="React Flow controls"}){const h=Pe(),{isInteractive:j,minZoomReached:y,maxZoomReached:S}=Se(X4,Te),{zoomIn:b,zoomOut:E,fitView:C}=Ht(),L=()=>{b(),i==null||i()},T=()=>{E(),l==null||l()},P=()=>{C(r),c==null||c()},O=()=>{h.setState({nodesDraggable:!j,nodesConnectable:!j,elementsSelectable:!j}),a==null||a(!j)},I=m==="horizontal"?"horizontal":"vertical";return o.jsxRuntimeExports.jsxs(Qs,{className:Ae(["react-flow__controls",I,x]),position:p,style:e,"data-testid":"rf__controls","aria-label":f,children:[t&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ns,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:S,children:o.jsxRuntimeExports.jsx(W4,{})}),o.jsxRuntimeExports.jsx(ns,{onClick:T,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:y,children:o.jsxRuntimeExports.jsx(Y4,{})})]}),n&&o.jsxRuntimeExports.jsx(ns,{className:"react-flow__controls-fitview",onClick:P,title:"fit view","aria-label":"fit view",children:o.jsxRuntimeExports.jsx(G4,{})}),s&&o.jsxRuntimeExports.jsx(ns,{className:"react-flow__controls-interactive",onClick:O,title:"toggle interactivity","aria-label":"toggle interactivity",children:j?o.jsxRuntimeExports.jsx(q4,{}):o.jsxRuntimeExports.jsx(K4,{})}),d]})}Tu.displayName="Controls";g.memo(Tu);function U4({id:e,x:t,y:n,width:s,height:r,style:i,color:l,strokeColor:c,strokeWidth:a,className:x,borderRadius:d,shapeRendering:p,selected:m,onClick:f}){const{background:h,backgroundColor:j}=i||{},y=l||h||j;return o.jsxRuntimeExports.jsx("rect",{className:Ae(["react-flow__minimap-node",{selected:m},x]),x:t,y:n,rx:d,ry:d,width:s,height:r,style:{fill:y,stroke:c,strokeWidth:a},shapeRendering:p,onClick:f?S=>f(S,e):void 0})}const J4=g.memo(U4),Q4=e=>e.nodes.map(t=>t.id),Mo=e=>e instanceof Function?e:()=>e;function ey({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:s=5,nodeStrokeWidth:r,nodeComponent:i=J4,onClick:l}){const c=Se(Q4,Te),a=Mo(t),x=Mo(e),d=Mo(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:c.map(m=>o.jsxRuntimeExports.jsx(ny,{id:m,nodeColorFunc:a,nodeStrokeColorFunc:x,nodeClassNameFunc:d,nodeBorderRadius:s,nodeStrokeWidth:r,NodeComponent:i,onClick:l,shapeRendering:p},m))})}function ty({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:s,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:l,NodeComponent:c,onClick:a}){const{node:x,x:d,y:p,width:m,height:f}=Se(h=>{const{internals:j}=h.nodeLookup.get(e),y=j.userNode,{x:S,y:b}=j.positionAbsolute,{width:E,height:C}=gt(y);return{node:y,x:S,y:b,width:E,height:C}},Te);return!x||x.hidden||!La(x)?null:o.jsxRuntimeExports.jsx(c,{x:d,y:p,width:m,height:f,style:x.style,selected:!!x.selected,className:s(x),color:t(x),borderRadius:r,strokeColor:n(x),strokeWidth:i,shapeRendering:l,onClick:a,id:x.id})}const ny=g.memo(ty);var sy=g.memo(ey);const oy=200,ry=150,iy=e=>!e.hidden,ly=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Pa(Vn(e.nodeLookup,{filter:iy}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}},cy="react-flow__minimap-desc";function $u({style:e,className:t,nodeStrokeColor:n,nodeColor:s,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:l,nodeComponent:c,bgColor:a,maskColor:x,maskStrokeColor:d,maskStrokeWidth:p,position:m="bottom-right",onClick:f,onNodeClick:h,pannable:j=!1,zoomable:y=!1,ariaLabel:S="React Flow mini map",inversePan:b,zoomStep:E=10,offsetScale:C=5}){const L=Pe(),T=g.useRef(null),{boundingRect:P,viewBB:O,rfId:I,panZoom:D,translateExtent:H,flowWidth:B,flowHeight:_}=Se(ly,Te),R=(e==null?void 0:e.width)??oy,k=(e==null?void 0:e.height)??ry,v=P.width/R,M=P.height/k,A=Math.max(v,M),$=A*R,V=A*k,F=C*A,W=P.x-($-P.width)/2-F,ee=P.y-(V-P.height)/2-F,te=$+F*2,se=V+F*2,oe=`${cy}-${I}`,J=g.useRef(0),le=g.useRef();J.current=A,g.useEffect(()=>{if(T.current&&D)return le.current=w5({domNode:T.current,panZoom:D,getTransform:()=>L.getState().transform,getViewScale:()=>J.current}),()=>{var de;(de=le.current)==null||de.destroy()}},[D]),g.useEffect(()=>{var de;(de=le.current)==null||de.update({translateExtent:H,width:B,height:_,inversePan:b,pannable:j,zoomStep:E,zoomable:y})},[j,y,b,E,H,B,_]);const fe=f?de=>{var ue;const[G,ae]=((ue=le.current)==null?void 0:ue.pointer(de))||[0,0];f(de,{x:G,y:ae})}:void 0,ke=h?g.useCallback((de,G)=>{const ae=L.getState().nodeLookup.get(G).internals.userNode;h(de,ae)},[]):void 0;return o.jsxRuntimeExports.jsx(Qs,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*A:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:Ae(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:o.jsxRuntimeExports.jsxs("svg",{width:R,height:k,viewBox:`${W} ${ee} ${te} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":oe,ref:T,onClick:fe,children:[S&&o.jsxRuntimeExports.jsx("title",{id:oe,children:S}),o.jsxRuntimeExports.jsx(sy,{onClick:ke,nodeColor:s,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:l,nodeComponent:c}),o.jsxRuntimeExports.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-F},${ee-F}h${te+F*2}v${se+F*2}h${-te-F*2}z
|
|
39
|
+
M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}$u.displayName="MiniMap";g.memo($u);function ay({nodeId:e,position:t,variant:n=wn.Handle,className:s,style:r={},children:i,color:l,minWidth:c=10,minHeight:a=10,maxWidth:x=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:p=!1,shouldResize:m,onResizeStart:f,onResize:h,onResizeEnd:j}){const y=xu(),S=typeof e=="string"?e:y,b=Pe(),E=g.useRef(null),C=n===wn.Line?"right":"bottom-right",L=t??C,T=g.useRef(null);g.useEffect(()=>{if(!(!E.current||!S))return T.current||(T.current=B5({domNode:E.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:D,transform:H,snapGrid:B,snapToGrid:_,nodeOrigin:R,domNode:k}=b.getState();return{nodeLookup:D,transform:H,snapGrid:B,snapToGrid:_,nodeOrigin:R,paneDomNode:k}},onChange:(D,H)=>{const{triggerNodeChanges:B,nodeLookup:_,parentLookup:R,nodeOrigin:k}=b.getState(),v=[],M={x:D.x,y:D.y},A=_.get(S);if(A&&A.expandParent&&A.parentId){const $=A.origin??k,V=D.width??A.measured.width??0,F=D.height??A.measured.height??0,W={id:A.id,parentId:A.parentId,rect:{width:V,height:F,...Na({x:D.x??A.position.x,y:D.y??A.position.y},{width:V,height:F},A.parentId,_,$)}},ee=Dr([W],_,R,k);v.push(...ee),M.x=D.x?Math.max($[0]*V,D.x):void 0,M.y=D.y?Math.max($[1]*F,D.y):void 0}if(M.x!==void 0&&M.y!==void 0){const $={id:S,type:"position",position:{...M}};v.push($)}if(D.width!==void 0&&D.height!==void 0){const $={id:S,type:"dimensions",resizing:!0,setAttributes:!0,dimensions:{width:D.width,height:D.height}};v.push($)}for(const $ of H){const V={...$,type:"position"};v.push(V)}B(v)},onEnd:({width:D,height:H})=>{const B={id:S,type:"dimensions",resizing:!1,dimensions:{width:D,height:H}};b.getState().triggerNodeChanges([B])}})),T.current.update({controlPosition:L,boundaries:{minWidth:c,minHeight:a,maxWidth:x,maxHeight:d},keepAspectRatio:p,onResizeStart:f,onResize:h,onResizeEnd:j,shouldResize:m}),()=>{var D;(D=T.current)==null||D.destroy()}},[L,c,a,x,d,p,f,h,j,m]);const P=L.split("-"),O=n===wn.Line?"borderColor":"backgroundColor",I=l?{...r,[O]:l}:r;return o.jsxRuntimeExports.jsx("div",{className:Ae(["react-flow__resize-control","nodrag",...P,n,s]),ref:E,style:I,children:i})}g.memo(ay);const uy=(e,t)=>e.map((n,s)=>u.J.translate(n,t[s])),Au=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(Qe,{path:vt(e),style:{stroke:u.Dt.hex(t)},...n}),xy=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(Qe,{path:vt(e),style:{stroke:u.Dt.hex(t),strokeDasharray:"12,4"},...n}),dy=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(Qe,{path:vt(e),style:{stroke:u.Dt.hex(t),strokeDasharray:"12,4,4"},...n}),py=({points:e,color:t,...n})=>{const s=u.J.calculateMiters(e,6),r=e.map((a,x)=>u.J.translate(a,s[x])),i=e.map((a,x)=>u.J.translate(a,u.J.scale(s[x],-1))),l=u.Dt.hex(t),c=.7;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Qe,{path:vt(r),style:{stroke:l,opacity:c},...n}),o.jsxRuntimeExports.jsx(Qe,{path:vt(e),style:{stroke:l},...n}),o.jsxRuntimeExports.jsx(Qe,{path:vt(i),style:{stroke:l,opacity:c},...n})]})},fl=5,my=(e,t)=>{const n=[],s=[];for(let c=0;c<e.length-1;c++){const a=u.J.distance(e[c],e[c+1]);s.push(a)}const r=t;let i=0,l=r;for(let c=0;c<s.length;c++){const a=s[c],x=e[c],d=e[c+1];for(;i+a>=l;){const p=(l-i)/a,m={x:x.x+p*(d.x-x.x),y:x.y+p*(d.y-x.y)};let f="x";Math.abs(d.x-x.x)<1&&(f="y"),l+=r,!(u.J.distance(m,d)<fl||u.J.distance(m,x)<fl)&&n.push({position:m,direction:f})}i+=a}return n},fy=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10 L10,-10";return n==="x"?t.y+=10/2:t.x+=10/2,o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.Dt.hex(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(270)`,strokeLinecap:"round"})},hy=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10";n==="x"?t.y+=10/3:t.x-=10/3;let i=u.J.translateX(t,-10),l=45;return n==="y"&&(i=u.J.translateY(t,-10),l+=90),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.Dt.hex(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(${l})`,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.Dt.hex(e),fill:"none",strokeWidth:2,transform:`translate(${i.x},${i.y}) rotate(${l})`,strokeLinecap:"round"})]})},gy=({color:e,position:t})=>o.jsxRuntimeExports.jsx("circle",{cx:t.x,cy:t.y,r:3,fill:"var(--pluto-gray-l0)",stroke:u.Dt.hex(e),strokeWidth:2}),Br=e=>{const t=({points:n,color:s,...r})=>{const i=vt(n),l=my(n,40);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Qe,{path:i,...r,style:{stroke:u.Dt.hex(s)}}),l.map(({position:c,direction:a},x)=>o.jsxRuntimeExports.jsx(e,{position:c,direction:a,color:s},x))]})};return t.displayName=`SymbolLine(${e.displayName})`,t},jy=Br(fy),Ey=Br(hy),yy=Br(gy),vt=e=>{let t="";const s=e.length+-1;for(let r=0;r<s;r++){const i=e[r%e.length],l=e[(r+1)%e.length],c=Math.min(6/Math.hypot(l.x-i.x,l.y-i.y),.5);r>0&&(t+=`Q${i.x},${i.y} ${i.x*(1-c)+l.x*c},${i.y*(1-c)+l.y*c}`),r===0?t+=`M${i.x},${i.y}`:r===0&&(t+=`M${i.x*(1-c)+l.x*c},${i.y*(1-c)+l.y*c}`),r===s-1?t+=`L${l.x},${l.y}`:r<s-1&&(t+=`L${i.x*c+l.x*(1-c)},${i.y*c+l.y*(1-c)}`)}return t},Iu={pipe:Au,electric:xy,secondary:dy,jacketed:py,hydraulic:jy,pneumatic:Ey,data:yy},Du=Au,zu=[{key:"pipe",name:"Pipe"},{key:"electric",name:"Electric Signal"},{key:"secondary",name:"Secondary"},{key:"jacketed",name:"Jacketed"},{key:"hydraulic",name:"Hydraulic"},{key:"pneumatic",name:"Pneumatic"},{key:"data",name:"Data"}],Sy=e=>o.jsxRuntimeExports.jsx(Ds,{columns:[{key:"name",name:"Type"}],data:zu,style:{width:200},entryRenderKey:"name",...e}),to=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},Ve=(e,t)=>{const n=to(t),s=e.getNodes().find(r=>r.id===t);if(s==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return u.$t.construct(s.position,u._.scale(u.$t.dims(u.$t.construct(n)),1/e.getZoom()))},Ry=(e,t)=>no.fromFlow(e,t);class Bu{constructor(t,n){tt(this,"node_",null);tt(this,"position");tt(this,"orientation");this.position=t,this.orientation=n}set node(t){this.node_=t}get node(){if(this.node_==null)throw new Error("[schematic] - handle has no node");return this.node_}get absolutePosition(){return u.J.translate(u.$t.topLeft(this.node.box),this.position)}}class no{constructor(t,n,s){tt(this,"key");tt(this,"box");tt(this,"handles");this.key=t,this.box=n,this.handles=s,s.forEach(r=>r.node=this)}static fromFlow(t,n){const s=Ve(n,t),r=to(t),i=r.getElementsByClassName("react-flow__handle"),l=u.$t.construct(r),c=Array.from(i).map(a=>{const x=u.$t.center(u.$t.construct(a)),d=u.J.translation(u.$t.topLeft(l),x),p=a.className.match(/react-flow__handle-(\w+)/);if(p==null)throw new Error("[schematic] - cannot find handle orientation");const m=u.K.construct(p[0]);return new Bu(d,m)});return new no(t,s,c)}}const Cy=({fromX:e,fromY:t,toX:n,toY:s,fromPosition:r,toPosition:i,fromNode:l,connectionLineStyle:c,connectionStatus:a})=>{const x=document.querySelector(".react-flow__handle-connecting"),d=x==null?void 0:x.className.match(/react-flow__handle-(\w+)/);if(d!=null){const h=u.K.outer.safeParse(d[1]);h.success&&(i=h.data)}const p=Ht(),m=qt({sourcePos:u.J.construct(e,t),targetPos:u.J.construct(n,s),sourceOrientation:r,targetOrientation:i,sourceBox:Ve(p,(l==null?void 0:l.id)??""),targetBox:Ve(p,(l==null?void 0:l.id)??"")}),f=Zc(u.J.construct(e,t),m,p.getZoom(),!1);return o.jsxRuntimeExports.jsx(Du,{points:f,style:{...c,stroke:u.Dt.cssString(a==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l11)"),strokeWidth:2,fill:"none"}})},wy=({id:e,source:t,target:n,sourcePosition:s,targetHandleId:r,targetPosition:i,style:l,segments:c=[],onSegmentsChange:a,color:x="var(--pluto-gray-l11)",selected:d=!1,variant:p="pipe",...m})=>{const f=u.J.construct(m.sourceX,m.sourceY),h=g.useRef(f),j=u.J.equals(f,h.current),y=u.J.construct(m.targetX,m.targetY),S=g.useRef(y),b=u.J.equals(y,S.current),E=Ht(),[C,L,T]=Z.useCombinedStateAndRef(()=>c.length>0?c:qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),P=g.useRef(i),O=g.useRef(s),I=Qo.useDebouncedCallback(a,100,[a]);if(!j||!b){let R=C;const k=u.J.translation(h.current,f),v=u.J.translation(y,S.current);u.J.equals(k,u.J.scale(v,-1),.001)?(h.current=f,S.current=y):(j?b||(R=z0({delta:v,segments:R}),P.current!==i&&(P.current=i,R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),di({sourcePos:f,targetPos:y,next:R,prev:C})||(R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),S.current=y):(R=D0({delta:k,segments:R}),O.current!==s&&(O.current=s,R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),di({sourcePos:f,targetPos:y,next:R,prev:C})||(R=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),h.current=f),I(R),L(R))}const D=g.useRef(null),H=Ke.useCursorDrag({onStart:g.useCallback((R,k,v)=>{D.current={index:Number(v.currentTarget.id.split("-")[1]),segments:[...T.current]}},[]),onMove:g.useCallback(R=>{if(D.current==null)return;const k=T0({segments:D.current.segments,index:D.current.index,magnitude:u.$t.dim(R,u.g.swap(D.current.segments[D.current.index].direction),!0)/E.getZoom()});L(k)},[]),onEnd:g.useCallback(()=>a(T.current),[a])}),B=Zc(f,C,E.getZoom(),!0),_=Iu[p];return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(_,{points:B,color:x}),d&&by(B).map((R,k)=>{const v=C[k].direction,M=u.g.swap(v),A={[u.g.dimension(v)]:"18px",[u.g.dimension(M)]:"4px"},$={[v]:R[v]-9,[M]:R[M]-2};return o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsx("rect",{className:u.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...A,...$,rx:"2px",ry:"2px"}),o.jsxRuntimeExports.jsx("foreignObject",{x:R.x-9,y:R.y-9,width:"18px",height:"18px",children:o.jsxRuntimeExports.jsx("div",{id:`handle-${k}`,className:u.CSS(u.CSS.BE("diagram-edge-handle","dragger"),u.CSS.dir(v)),draggable:!0,onDragStart:H})})]},k)})]})},by=e=>e.slice(1).map((t,n)=>{const s=e[n];return u.J.construct((t.x+s.x)/2,(t.y+s.y)/2)}),vy=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:s={position:u.J.ZERO,zoom:1}})=>{const[r,i]=g.useState(n),[l,c]=g.useState(e),[a,x]=g.useState(t),[d,p]=g.useState(s),[m,f]=g.useState(!1);return{viewport:d,onViewportChange:p,edges:a,nodes:l,onNodesChange:c,onEdgesChange:x,editable:r,onEditableChange:i,fitViewOnResize:m,setFitViewOnResize:f}},ky=()=>!0,My={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1,nodeClickDistance:5,reconnectRadius:15,connectionRadius:30},_y={connectionRadius:0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,panOnScroll:!1,zoomOnScroll:!1,zoomOnDoubleClick:!1,zoomOnPinch:!1,edgesFocusable:!1,edgesReconnectable:!1,nodesFocusable:!1,reconnectRadius:0},Uo={maxZoom:1,minZoom:.5,padding:.05},Py={hideAttribution:!0},Ou=g.createContext({editable:!0,visible:!0,onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),Hn=()=>g.use(Ou),Vu=g.memo(({children:e})=>{const{registerNodeRenderer:t}=Hn();return g.useEffect(()=>t(e),[t,e]),null});Vu.displayName="NodeRenderer";const Ly=["Backspace","Delete"],Ny=({aetherKey:e,onNodesChange:t,onEdgesChange:n,nodes:s,edges:r,onEditableChange:i,editable:l,viewport:c,triggers:a,onViewportChange:x,fitViewOnResize:d,setFitViewOnResize:p,visible:m,...f})=>{const h=Ne.useMemoDeepEqualProps({visible:m}),[{path:j},,y]=Q.use$1({aetherKey:e,type:z.Diagram$1.TYPE,schema:z.diagramStateZ,initialState:{position:c.position,region:u.$t.ZERO,zoom:c.zoom,...h}}),{fitView:S}=Ht(),b=Qo.useDebouncedCallback(G=>void S(G),50,[S]),E=Dn(g.useCallback(G=>{d&&b(Uo),y(ae=>({...ae,region:G}))},[y,b,d]));g.useEffect(()=>y(G=>({...G,...h})),[h]);const C=u.Dt.hex(Q.use().colors.gray.l11),L=Ne.useMemoCompare(()=>a??pr.zoom,Ie.compareModeConfigs,[a]),T=g.useRef(null),P=g.useCallback(G=>{const ae=T.current;ae!=null&&ae.x===G.x&&ae.y===G.y&&ae.zoom===G.zoom||(T.current=G,!(isNaN(G.x)||isNaN(G.y)||isNaN(G.zoom))&&(y(ue=>({...ue,position:G,zoom:G.zoom})),x(Xc(G))))},[y,x]);B4({onStart:P,onChange:P,onEnd:P});const[O,I]=g.useState(()=>()=>null),D=g.useCallback(G=>I(()=>G),[]),H=g.useMemo(()=>({custom:({id:G,positionAbsoluteX:ae,positionAbsoluteY:ue,selected:_e=!1,draggable:De=!0})=>O({symbolKey:G,position:{x:ae,y:ue},selected:_e,draggable:De})}),[O]),B=g.useRef(r),_=g.useMemo(()=>(B.current=r,br(r)),[r]),R=g.useRef(s),k=g.useMemo(()=>(R.current=s,wr(s)),[s]),v=g.useCallback(G=>t(Uc(R.current,ae=>ru(G,ae)),G),[t]),M=g.useCallback(G=>n(is(B.current,ae=>iu(G,ae),C)),[n,C]),A=g.useCallback((G,ae)=>n(is(B.current,ue=>r5(G,ae,ue),C)),[]),$=g.useCallback(G=>n(is(B.current,ae=>Oa(G,ae),C)),[n,C]),V=g.useCallback((G,ae)=>{const ue=[...B.current],_e=ue.findIndex(De=>De.key===G);_e!==-1&&(ue[_e]={...ue[_e],segments:ae},B.current=ue,n(ue))},[n]),F=l?My:_y,W=Z.useSyncedRef(V),ee=g.useMemo(()=>({default:G=>{var ae,ue,_e;return o.jsxRuntimeExports.jsx(wy,{...G,segments:((ae=G.data)==null?void 0:ae.segments)??[],color:(ue=G.data)==null?void 0:ue.color,variant:(_e=G.data)==null?void 0:_e.variant,onSegmentsChange:g.useCallback(De=>W.current(G.id,De),[G.id])},G.id)}}),[]),te=Ie.useHeld({triggers:[["Q"]],loose:!0}),se=g.useRef(null);Ie.use({triggers:L.zoomReset,callback:g.useCallback(({stage:G,cursor:ae})=>{const ue=se.current;ue==null||G!=="start"||!u.$t.contains(ue,ae)||S()},[S])});const oe=Ie.purgeMouse(L.select)[0]??null,J=Ie.purgeMouse(L.pan)[0]??null,le=Ie.purgeMouse(L.zoom)[0]??null,fe={selectionOnDrag:oe==null,panOnDrag:J==null,selectionKeyCode:oe,panActivationKeyCode:J,zoomActivationKeyCode:le},ke=Z.useCombinedRefs(se,E),de=g.useMemo(()=>({visible:m,editable:l,onEditableChange:i,registerNodeRenderer:D,fitViewOnResize:d,setFitViewOnResize:p}),[l,m,i,D,d]);return o.jsxRuntimeExports.jsx(Ou,{value:de,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:j,children:m&&o.jsxRuntimeExports.jsx(D4,{...fe,className:u.CSS(u.CSS.B("diagram"),u.CSS.editable(l),u.CSS.BE("symbol","container")),nodes:k,edges:_,nodeTypes:H,edgeTypes:ee,ref:ke,fitView:!0,onNodesChange:v,onEdgesChange:M,onConnect:$,onReconnect:A,defaultViewport:qc(c),connectionLineComponent:Cy,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:ky,connectionMode:Vt.Loose,fitViewOptions:Uo,selectionMode:nn.Partial,proOptions:Py,deleteKeyCode:Ly,...f,style:{[u.CSS.var("diagram-zoom")]:c.zoom,...f.style},...F,nodesDraggable:l&&!te.held})})})},Ty=()=>{const{editable:e}=Hn();return e?o.jsxRuntimeExports.jsx(Z4,{}):null},$y=e=>o.jsxRuntimeExports.jsx(Ts.Pack,{borderShade:5,className:u.CSS.BE("diagram","controls"),...e}),Ay=({onClick:e,...t})=>{const{editable:n,onEditableChange:s}=Hn();return o.jsxRuntimeExports.jsx(he.ToggleIcon,{onChange:()=>s(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:u.K.BOTTOM_LEFT,size:"small",tooltip:`${n?"Disable":"Enable"} editing`,...t,children:n?o.jsxRuntimeExports.jsx(Z.y4.EditOff,{}):o.jsxRuntimeExports.jsx(Z.y4.Edit,{})})},Iy=({onClick:e,...t})=>{const{fitView:n}=Ht(),{fitViewOnResize:s,setFitViewOnResize:r}=Hn();return o.jsxRuntimeExports.jsx(he.ToggleIcon,{onClick:i=>{n(Uo),e==null||e(i)},value:s,onChange:i=>r(i),rightClickToggle:!0,tooltip:o.jsxRuntimeExports.jsx(Z.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:u.K.BOTTOM_LEFT,variant:"outlined",size:"small",...t,children:o.jsxRuntimeExports.jsx(Z.y4.Expand,{})})},Dy=e=>o.jsxRuntimeExports.jsx(Lu,{children:o.jsxRuntimeExports.jsx(Ny,{...e})}),zy=Object.freeze(Object.defineProperty({__proto__:null,Background:Ty,Controls:$y,DefaultPath:Du,Diagram:Dy,FitViewControl:Iy,HandleLayout:Bu,NodeLayout:no,NodeRenderer:Vu,PATHS:Iu,PATH_TYPES:zu,SelectPathType:Sy,ToggleEditControl:Ay,alignNodes:F0,calcPath:vt,edgeConverter:is,edgeZ:O0,nodeConverter:Uc,nodeZ:V0,offsetPath:uy,rfEdgeDataZ:Yc,selectNode:to,selectNodeBox:Ve,selectNodeLayout:Ry,translateEdgesBackward:Kc,translateEdgesForward:br,translateNodesBackward:Gc,translateNodesForward:wr,translateViewportBackward:Xc,translateViewportForward:qc,use:vy,useContext:Hn,viewportZ:B0},Symbol.toStringTag,{value:"Module"})),By=({aetherKey:e,font:t,className:n,visible:s=!0,emptyContent:r=o.jsxRuntimeExports.jsx(Re.Text.Centered,{level:"h3",variant:"disabled",hideIcon:!0,children:"Empty Log"}),color:i,telem:l,...c})=>{const a=Ne.useMemoDeepEqualProps({font:t,color:i,telem:l,visible:s}),[,{scrolling:x,empty:d},p]=Q.use$1({type:z.Log.TYPE,schema:z.logState,initialState:{empty:!0,region:u.$t.ZERO,scrolling:!1,wheelPos:0,...a}});g.useEffect(()=>{p(f=>({...f,...a}))},[a,p]);const m=Dn(g.useCallback(f=>p(h=>({...h,region:f})),[p]));return o.jsxRuntimeExports.jsx("div",{ref:m,className:u.CSS(u.CSS.B("log"),n),onWheel:f=>{p(h=>({...h,wheelPos:h.wheelPos-f.deltaY,scrolling:h.scrolling?h.scrolling:f.deltaY<0}))},...c,children:d?r:o.jsxRuntimeExports.jsx(he.Icon,{className:u.CSS(u.CSS.BE("log","live"),x&&u.CSS.M("active")),variant:"outlined",onClick:()=>p(f=>({...f,scrolling:!f.scrolling})),tooltip:x?"Resume Scrolling":"Pause Scrolling",tooltipLocation:u.K.BOTTOM_LEFT,children:o.jsxRuntimeExports.jsx(Z.y4.Dynamic,{})})})},Oy=Object.freeze(Object.defineProperty({__proto__:null,Log:By},Symbol.toStringTag,{value:"Module"})),Vy=()=>{const[,e]=Q.use$1({type:z.Performance.TYPE,schema:z.performanceStateZ,initialState:{fps:0}});return o.jsxRuntimeExports.jsxs(Z.Text,{shade:9,level:"p",code:!0,children:[e.fps," FPS"]})},Fy=Object.freeze(Object.defineProperty({__proto__:null,Tools:Vy},Symbol.toStringTag,{value:"Module"})),at=(e,t)=>{const n={};t.forEach(r=>n[r]=void 0);const s=r=>{const{...i}={...r,...n};return o.jsxRuntimeExports.jsx(e,{...i})};return s.displayName=`RemoveProps(${e.displayName})`,s},Hy=({value:e,hideOuter:t=!1,hideInner:n,onChange:s})=>{const{outer:r}=e,i=l=>()=>s({...e,...l});return t?o.jsxRuntimeExports.jsx(hl,{className:u.CSS.B("orientation-control"),value:e,onChange:s}):o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS.B("orientation-control"),align:"center",justify:"center",size:"tiny",children:[o.jsxRuntimeExports.jsx(wt,{selected:r==="top",onClick:i({outer:"top"})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",justify:"center",size:"tiny",children:[o.jsxRuntimeExports.jsx(wt,{selected:r==="left",onClick:i({outer:"left"})}),o.jsxRuntimeExports.jsx(hl,{hideInner:n,value:e,onChange:s}),o.jsxRuntimeExports.jsx(wt,{selected:r==="right",onClick:i({outer:"right"})})]}),o.jsxRuntimeExports.jsx(wt,{selected:r==="bottom",onClick:i({outer:"bottom"})})]})},hl=({value:e,onChange:t,className:n,hideInner:s=!1,...r})=>{const{inner:i}=e,l=a=>()=>t({...e,...a});let c={};return s&&(c={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"}),o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS(n,u.CSS.B("value")),y:!0,align:"center",justify:"center",empty:!0,...r,children:[o.jsxRuntimeExports.jsx(wt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:i==="top",onClick:l({inner:"top"})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",justify:"center",children:[o.jsxRuntimeExports.jsx(wt,{style:c,disabled:s,selected:i==="left",onClick:l({inner:"left"})}),o.jsxRuntimeExports.jsx(wt,{style:c,disabled:s,selected:i==="right",onClick:l({inner:"right"})})]}),o.jsxRuntimeExports.jsx(wt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:i==="bottom",onClick:l({inner:"bottom"})})]})},wt=({selected:e,className:t,...n})=>o.jsxRuntimeExports.jsx(he.Icon,{variant:"text",className:u.CSS(t,u.CSS.selected(e)),...n,children:o.jsxRuntimeExports.jsx("div",{className:"symbol"})}),Oe=({className:e,direction:t,...n})=>o.jsxRuntimeExports.jsx(ne.Space,{direction:t,align:"stretch",className:u.CSS(u.CSS.B("symbol-form"),e),size:t==="x"?"large":"medium",...n}),Lt=({hideOuter:e,hideInner:t,...n})=>t&&e?null:o.jsxRuntimeExports.jsx(Ce,{label:"Orientation",padHelpText:!1,...n,children:({value:s,onChange:r})=>{var i;return o.jsxRuntimeExports.jsx(Hy,{value:{inner:s.orientation??"top",outer:((i=s.label)==null?void 0:i.orientation)??"top"},hideInner:t,hideOuter:e,onChange:l=>r({...s,orientation:l.inner,label:{...s.label,orientation:l.outer}})})}}),jt=({path:e,omit:t=[]})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ce,{path:`${e}.label`,label:"Label",padHelpText:!1,grow:!0,children:n=>o.jsxRuntimeExports.jsx(mt.Text,{selectOnFocus:!0,...n})}),o.jsxRuntimeExports.jsx(Ze,{visible:!t.includes("maxInlineSize"),style:{maxWidth:125},path:`${e}.maxInlineSize`,hideIfNull:!0,label:"Label Wrap Width",inputProps:{endContent:"px",dragScale:{x:1,y:.5}},padHelpText:!1}),o.jsxRuntimeExports.jsx(Ce,{hideIfNull:!0,visible:!t.includes("level"),path:`${e}.level`,label:"Label Size",padHelpText:!1,children:n=>o.jsxRuntimeExports.jsx(an,{...n})}),o.jsxRuntimeExports.jsx(Ce,{visible:!t.includes("align"),path:`${e}.align`,label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:n=>o.jsxRuntimeExports.jsx(zs,{...n})}),o.jsxRuntimeExports.jsx(Ce,{visible:!t.includes("direction"),path:`${e}.direction`,label:"Label Direction",padHelpText:!1,hideIfNull:!0,children:n=>o.jsxRuntimeExports.jsx(Ql,{...n,yDirection:"down"})})]}),He=e=>o.jsxRuntimeExports.jsx(Ce,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(Ke.Swatch,{value:t??u.Dt.setAlpha(u.Dt.ZERO,1),onChange:n,...r,bordered:!0})}),Fu=e=>o.jsxRuntimeExports.jsx(Ce,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(ge.Numeric,{dragScale:{x:.75,y:.5},bounds:{lower:50,upper:1e3},endContent:"%",value:Math.round(t*100),onChange:s=>n(parseFloat((s/100).toFixed(2)))})}),xe=({omit:e,hideInnerOrientation:t,hideOuterOrientation:n})=>o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{omit:e,path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color",optional:!0}),o.jsxRuntimeExports.jsx(Ce,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:s=>o.jsxRuntimeExports.jsx(Q.Switch$1,{...s})}),o.jsxRuntimeExports.jsx(Fu,{path:"scale"})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:t,hideOuter:n})]}),Zy=({path:e})=>{var x,d;const{value:t,onChange:n}=_t({path:e}),s=z.sourcePipelinePropsZ.parse((x=t.source)==null?void 0:x.props),r=z.sinkPipelinePropsZ.parse((d=t.sink)==null?void 0:d.props),i=z.streamChannelValuePropsZ.parse(s.segments.valueStream.props),l=z.setChannelValuePropsZ.parse(r.segments.setter.props),c=p=>{p??(p=0);const m=z.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:z.streamChannelValue({channel:p}),threshold:z.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:m})},a=p=>{p??(p=0);const m=z.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:z.setChannelValue({channel:p}),setpoint:z.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),f=z.authoritySource({channel:p}),h=z.acquireChannelControl({channel:p,authority:255});n({...t,sink:m,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:h,source:f},indicator:{statusSource:f}}})};return o.jsxRuntimeExports.jsxs(Oe,{x:!0,grow:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(ge.Item,{label:"State Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Dt,{value:i.channel,onChange:c})}),o.jsxRuntimeExports.jsx(ge.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Dt,{value:l.channel,onChange:a})}),o.jsxRuntimeExports.jsx(Os,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},Or=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],we=({hideInnerOrientation:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"control":return o.jsxRuntimeExports.jsx(Zy,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{hideInnerOrientation:e})}},[e]),n=Le.useStatic({tabs:Or,content:t});return o.jsxRuntimeExports.jsx(Le.Tabs,{...n})},St={y:2,x:.25},bn={lower:0,upper:2e3},gl={lower:0,upper:51},Hu=({includeBorderRadius:e=!1,includeStrokeWidth:t=!1})=>o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ce,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(ge.Numeric,{dragScale:St,bounds:gl,endContent:"%",...n})}),o.jsxRuntimeExports.jsx(Ce,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(ge.Numeric,{dragScale:St,bounds:gl,endContent:"%",...n})}),e&&o.jsxRuntimeExports.jsx(Ce,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(ge.Numeric,{dragScale:St,bounds:bn,endContent:"px",...n})}),t&&o.jsxRuntimeExports.jsx(Ce,{path:"strokeWidth",hideIfNull:!0,optional:!0,label:"Border Width",grow:!0,children:n=>o.jsxRuntimeExports.jsx(ge.Numeric,{dragScale:St,bounds:{lower:0,upper:21},endContent:"px",...n})}),o.jsxRuntimeExports.jsx(Ce,{path:"dimensions.width",label:"Width",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(ge.Numeric,{value:n??200,dragScale:St,bounds:bn,endContent:"px",...s})}),o.jsxRuntimeExports.jsx(Ce,{path:"dimensions.height",label:"Height",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(ge.Numeric,{value:n??200,dragScale:St,bounds:bn,endContent:"px",...s})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]}),Wy=()=>o.jsxRuntimeExports.jsx(Oe,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(ne.Space,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ze,{path:"rotation",label:"Rotation",inputProps:{dragScale:{x:1,y:.25},bounds:{lower:0,upper:360},endContent:"°"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"numSides",label:"Number of Sides",inputProps:{dragScale:{x:.5,y:.1},bounds:{lower:3,upper:21}},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"sideLength",label:"Side Length",inputProps:{dragScale:{x:1,y:1},bounds:{lower:10,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"cornerRounding",label:"Corner Rounding",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:181},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),Yy=()=>o.jsxRuntimeExports.jsx(Oe,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(ne.Space,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ze,{path:"radius",label:"Radius",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),Zu=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"}],Gy=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsxs(Oe,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsx(Rr,{path:""}),";"]});default:return o.jsxRuntimeExports.jsxs(Oe,{x:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(Ce,{path:"units",label:"Units",align:"start",padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(mt.Text,{...s})}),o.jsxRuntimeExports.jsx(Ze,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:{dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"}}),o.jsxRuntimeExports.jsx(Ce,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(an,{...s})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]})}},[]),t=Le.useStatic({tabs:Zu,content:e});return o.jsxRuntimeExports.jsx(Le.Tabs,{...t})},Ky=({path:e})=>{var x;const{value:t,onChange:n}=_t({path:e}),s=z.sourcePipelinePropsZ.parse((x=t.source)==null?void 0:x.props),r=z.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=z.withinBoundsProps.parse(s.segments.threshold.props),l=d=>{d??(d=0);const p=z.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:z.streamChannelValue({channel:d}),threshold:z.withinBounds({trueBound:{lower:i.trueBound.lower??.9,upper:i.trueBound.upper??1.1}})},outlet:"threshold"});n({...t,source:p})},c=d=>{const p=z.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:z.streamChannelValue({channel:r.channel}),threshold:z.withinBounds({trueBound:d})},outlet:"threshold"});n({...t,source:p})},a=As(r.channel);return g.useEffect(()=>n({...t}),[a]),o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(ge.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Dt,{value:r.channel,onChange:l})}),o.jsxRuntimeExports.jsx(ge.Item,{label:"Lower Threshold",children:o.jsxRuntimeExports.jsx(ge.Numeric,{value:i.trueBound.lower??.9,onChange:d=>c({...i.trueBound,lower:d})})}),o.jsxRuntimeExports.jsx(ge.Item,{label:"Upper Threshold",children:o.jsxRuntimeExports.jsx(ge.Numeric,{value:i.trueBound.upper??1.1,onChange:d=>c({...i.trueBound,upper:d})})})]})},qy=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsx(Ky,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{})}},[]),t=Le.useStatic({tabs:Zu,content:e});return o.jsxRuntimeExports.jsx(Le.Tabs,{...t})},Xy=({path:e})=>{var l;const{value:t,onChange:n}=_t({path:e}),s=z.sinkPipelinePropsZ.parse((l=t.sink)==null?void 0:l.props),r=z.setChannelValuePropsZ.parse(s.segments.setter.props),i=c=>{c??(c=0);const a=z.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:z.setChannelValue({channel:c}),setpoint:z.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),x=z.authoritySource({channel:c}),d=z.acquireChannelControl({channel:c,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:x},showIndicator:!0,indicator:{statusSource:x}}})};return o.jsxRuntimeExports.jsxs(Oe,{x:!0,children:[o.jsxRuntimeExports.jsx(ge.Item,{label:"Output Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Dt,{value:r.channel,onChange:i})}),o.jsxRuntimeExports.jsx(Ze,{label:"Activation Delay",path:"onClickDelay",inputProps:{endContent:"ms"},hideIfNull:!0}),o.jsxRuntimeExports.jsx(Os,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},Uy=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(Xy,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{omit:["align","maxInlineSize"],hideInnerOrientation:!0,hideOuterOrientation:!0})}},[]),t=Le.useStatic({tabs:Or,content:e});return o.jsxRuntimeExports.jsx(Le.Tabs,{...t})},Jy=({path:e})=>{var l;const{value:t,onChange:n}=_t({path:e}),s=z.sinkPipelinePropsZ.parse((l=t.sink)==null?void 0:l.props),r=z.setChannelValuePropsZ.parse(s.segments.setter.props),i=c=>{c??(c=0);const a=z.sinkPipeline("number",{connections:[],segments:{setter:z.setChannelValue({channel:c})},inlet:"setter"}),x=z.authoritySource({channel:c}),d=z.acquireChannelControl({channel:c,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:x},showIndicator:!0,indicator:{statusSource:x}},disabled:c==0})};return o.jsxRuntimeExports.jsx(Oe,{x:!0,grow:!0,align:"stretch",children:o.jsxRuntimeExports.jsx(ge.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Dt,{value:r.channel,onChange:i})})})},Qy=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(Jy,{path:""});default:return o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,align:"stretch",grow:!0,size:"small",children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(fr,{path:"units",label:"Units",align:"start",padHelpText:!1}),o.jsxRuntimeExports.jsx(Ce,{path:"size",label:"Size",hideIfNull:!0,padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(Ul,{...s})}),o.jsxRuntimeExports.jsx(He,{path:"color"})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]})}},[]),t=Le.useStatic({tabs:Or,content:e});return o.jsxRuntimeExports.jsx(Le.Tabs,{...t})},eS=()=>{const e=_t({path:"autoFit",optional:!0});return o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ce,{path:"text",label:"Text",padHelpText:!1,grow:!0,children:t=>o.jsxRuntimeExports.jsx(mt.Text,{...t})}),o.jsxRuntimeExports.jsx(Ce,{path:"level",label:"Text Size",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(an,{...t})}),o.jsxRuntimeExports.jsx(Ce,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:t=>o.jsxRuntimeExports.jsx(zs,{...t})})]}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(Ce,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(ge.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:o.jsxRuntimeExports.jsx(he.Icon,{onClick:()=>e==null?void 0:e.onChange(!0),disabled:(e==null?void 0:e.value)===!0,variant:"outlined",tooltip:(e==null?void 0:e.value)===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:o.jsxRuntimeExports.jsx(Z.y4.AutoFitWidth,{})})})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:""})]})},tS=()=>o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label",omit:["maxInlineSize","align","direction"]}),o.jsxRuntimeExports.jsx(He,{path:"color"})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideOuter:!0})]}),nS=()=>o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ce,{path:"dimensions.width",label:"Width",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(ge.Numeric,{value:e??200,dragScale:St,bounds:bn,endContent:"px",...t})}),o.jsxRuntimeExports.jsx(Ce,{path:"dimensions.height",label:"Height",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(ge.Numeric,{value:e??200,dragScale:St,bounds:bn,endContent:"px",...t})})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:"",hideInner:!0})]}),Zt=()=>o.jsxRuntimeExports.jsxs(Oe,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(jt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(Fu,{path:"scale"}),o.jsxRuntimeExports.jsx(Os,{path:"clickable",label:"Clickable",hideIfNull:!0,optional:!0})]})]}),o.jsxRuntimeExports.jsx(Lt,{path:""})]}),sS=()=>o.jsxRuntimeExports.jsx(Hu,{includeBorderRadius:!0,includeStrokeWidth:!0}),oS=()=>o.jsxRuntimeExports.jsx(we,{hideInnerOrientation:!0}),N=e=>o.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),ye=e=>o.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),$e=e=>o.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),je=e=>o.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),rS={left:{left:U.Left,right:U.Right,top:U.Top,bottom:U.Bottom},right:{left:U.Right,right:U.Left,top:U.Bottom,bottom:U.Top},top:{left:U.Bottom,right:U.Top,top:U.Left,bottom:U.Right},bottom:{left:U.Top,right:U.Bottom,top:U.Right,bottom:U.Left}},iS=(e,t)=>rS[t][e],lS=(e,t=!1)=>{if(t)return e;switch(e){case U.Left:return U.Right;case U.Right:return U.Left;case U.Top:return U.Bottom;case U.Bottom:return U.Top;default:return U.Top}},cS=(e,t,n,s=!1)=>s?{left:t,top:e}:n==="left"?{top:e,left:t}:n==="right"?{top:100-e,left:100-t}:n==="top"?{top:100-t,left:e}:{top:t,left:100-e},K=({children:e,orientation:t,refreshDeps:n})=>{let s;try{s=z4()}catch{return null}const r=g.useRef(null),i=g.useRef(!0);return g.useEffect(()=>{if(r.current==null)return;if(i.current){i.current=!1;return}const l=r.current.closest(".react-flow__node"),c=l==null?void 0:l.getAttribute("data-id");c!=null&&(s==null||s(c))},[t,n]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("span",{ref:r}),e]})},w=({location:e,orientation:t,preventAutoAdjust:n,left:s,swap:r,top:i,style:l,...c})=>{const a=cS(i,s,t,n);return o.jsxRuntimeExports.jsx(An,{position:lS(iS(e,t),!r),...c,type:"source",onClick:x=>x.stopPropagation(),className:(u.CSS.B("handle"),u.CSS.BE("handle",c.id)),style:{left:`${a.left}%`,top:`${a.top}%`,...l}})},Ee=({className:e,enabled:t=!1,triggered:n=!1,orientation:s="left",color:r,...i})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("symbol-primitive"),u.CSS.B("symbol-primitive-toggle"),s!=null&&u.CSS.loc(s),t&&u.CSS.M("enabled"),n&&u.CSS.M("triggered"),e),color:u.Dt.cssString(r),...i}),re=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.B("symbol-primitive"),e),...t}),aS=.8,X=({dimensions:e,orientation:t="left",children:n,className:s,color:r,style:i={},scale:l=1,...c})=>{e=u.g.construct(t)==="y"?u._.swap(e):e;const x=u.Dt.cssString(r),d=Q.use();return r!=null&&(i[u.CSS.var("symbol-color")]=u.Dt.rgbString(r),i[u.CSS.var("symbol-color-contrast")]=u.Dt.rgbString(u.Dt.pickByContrast(r,d.colors.gray.l0,d.colors.gray.l11))),o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:u._.svgViewBox(e),className:u.CSS(u.CSS.loc(t),s),fill:x,stroke:x,...c,style:{aspectRatio:`${e.width} / ${e.height}`,width:u._.scale(e,l*aS).width,...i},children:o.jsxRuntimeExports.jsx("g",{children:n})})},Wu=({className:e,orientation:t="left",scale:n,color:s,...r})=>{const i=u.Dt.cssString(s);return o.jsxRuntimeExports.jsxs(Ee,{...r,orientation:t,className:u.CSS(u.CSS.B("four-way-valve"),e),children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:12.037,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:87.963,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:7.2916,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:92.6084,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:108,height:96},color:s,scale:n,children:[o.jsxRuntimeExports.jsx(N,{d:"M3.02937 72.7038C2.50936 73.1041 2.50936 73.8883 3.02937 74.2886L7.14001 77.453C7.79757 77.9592 8.75 77.4904 8.75 76.6606V70.3318C8.75 69.502 7.79757 69.0332 7.14001 69.5394L3.02937 72.7038Z",fill:i}),o.jsxRuntimeExports.jsx(N,{d:"M54.2 48L17.0545 29.2035C15.059 28.1937 12.7 29.6438 12.7 31.8803V64.1197C12.7 66.3562 15.059 67.8063 17.0545 66.7965L54.2 48ZM54.2 48L91.3455 29.2035C93.341 28.1937 95.7 29.6438 95.7 31.8803V64.1197C95.7 66.3562 93.341 67.8063 91.3455 66.7965L54.2 48Z"}),o.jsxRuntimeExports.jsx(N,{d:"M54.2 48L35.4035 85.1455C34.3937 87.141 35.8439 89.5 38.0803 89.5H70.3197C72.5562 89.5 74.0063 87.141 72.9965 85.1455L54.2 48ZM54.2 48L35.4035 10.8545C34.3937 8.85901 35.8439 6.5 38.0803 6.5H70.3197C72.5562 6.5 74.0063 8.85901 72.9965 10.8545L54.2 48Z"}),o.jsxRuntimeExports.jsx(N,{d:"M8.70001 73.5C24.7 73.5 28.7 86.8333 28.7 93.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M105.371 23.2962C105.891 22.8959 105.891 22.1117 105.371 21.7114L101.26 18.547C100.602 18.0408 99.65 18.5096 99.65 19.3394V25.6682C99.65 26.498 100.602 26.9668 101.26 26.4606L105.371 23.2962Z",fill:i}),o.jsxRuntimeExports.jsx(N,{d:"M99.7 22.5C83.7 22.5 79.7 9.16667 79.7 2.5","stroke-linecap":"round"})]})]})},Yu=({color:e,orientation:t="left",scale:n,...s})=>o.jsxRuntimeExports.jsxs(Ee,{...s,className:u.CSS(u.CSS.B("three-way-valve")),orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(N,{d:"M44.3923 22.3611C44.0222 21.6298 42.9778 21.6298 42.6077 22.3611L24.7035 57.7433C23.6937 59.7388 25.1438 62.0978 27.3803 62.0978L59.6197 62.0978C61.8562 62.0978 63.3063 59.7388 62.2965 57.7433L44.3923 22.3611Z"})]})]}),Gu=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(Ee,{...s,children:[o.jsxRuntimeExports.jsxs(K,{orientation:e,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:e,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:e,left:97.7701,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:o.jsxRuntimeExports.jsx(N,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"})})]}),Ku=({className:e,color:t,orientation:n="left",normallyOpen:s=!1,scale:r,...i})=>o.jsxRuntimeExports.jsxs(Ee,{className:u.CSS(u.CSS.B("solenoid-valve"),s&&u.CSS.M("normally-open"),e),...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:69.5652,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:69.5652,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:33.3333,top:17.7778,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:2.8986,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:66.6667,top:17.7778,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:69},color:t,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(N,{className:u.CSS.B("body"),d:"M43.5 48L6.35453 29.2035C4.35901 28.1937 2 29.6438 2 31.8803V64.1197C2 66.3562 4.35901 67.8063 6.35453 66.7965L43.5 48ZM43.5 48L80.6455 29.2035C82.641 28.1937 85 29.6438 85 31.8803V64.1197C85 66.3562 82.641 67.8063 80.6455 66.7965L43.5 48Z"}),o.jsxRuntimeExports.jsx(je,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),o.jsxRuntimeExports.jsx(ye,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),qu=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{className:u.CSS(u.CSS.B("relief-valve"),e),enabled:r,...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:63.7931,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:63.7931,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:58},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 37L6.35453 18.2035C4.35901 17.1937 2 18.6438 2 20.8803V53.1197C2 55.3562 4.35901 56.8063 6.35453 55.7965L43.5 37ZM43.5 37L80.6455 18.2035C82.641 17.1937 85 18.6438 85 20.8803V53.1197C85 55.3562 82.641 56.8063 80.6455 55.7965L43.5 37Z"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),Xu=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{orientation:t,className:u.CSS(u.CSS.B("check-valve"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:4.2222,top:48.8372,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:94.2038,top:48.8372,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:45,height:43},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(je,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M41.6607 21.8946C42.3917 21.5238 42.3906 20.4794 41.6589 20.1101L6.25889 2.2412C4.26237 1.23341 1.90481 2.68589 1.90704 4.92235L1.93925 37.1617C1.94148 39.3982 4.30194 40.846 6.29644 39.8342L41.6607 21.8946Z"})]})]}),Uu=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.Dt.cssString(n);return o.jsxRuntimeExports.jsxs(re,{...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:8.3333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.4286,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:84,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"7",cy:"7",r:"4",fill:i}),o.jsxRuntimeExports.jsx(N,{d:"M7 39.5V11.5941C7 9.42886 9.22384 7.97669 11.2063 8.84738L76.7937 37.6526C78.7762 38.5233 81 37.0711 81 34.9059V6",strokeLinecap:"round"})]})]})},Ju=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.Dt.cssString(n);return o.jsxRuntimeExports.jsxs(re,{orientation:t,className:u.CSS(u.CSS.B("check-valve-with-arrow"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:8.602,top:60.65,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.775,top:60.65,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:93,height:57},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M67.4706 5.20759C67.9906 5.6079 67.9906 6.3921 67.4706 6.79241L63.36 9.95678C62.7024 10.463 61.75 9.99421 61.75 9.16437V2.83563C61.75 2.00579 62.7024 1.53702 63.36 2.04322L67.4706 5.20759Z",fill:i}),o.jsxRuntimeExports.jsx(N,{d:"M62.5 6H32.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx($e,{cx:"7.5",cy:"13.5",r:"6",fill:i}),o.jsxRuntimeExports.jsx(N,{d:"M49 34.5L11.8545 15.7035C9.85901 14.6937 7.5 16.1438 7.5 18.3803V50.6197C7.5 52.8562 9.85901 54.3063 11.8545 53.2965L49 34.5ZM49 34.5L86.1455 15.7035C88.141 14.6937 90.5 16.1438 90.5 18.3803V50.6197C90.5 52.8562 88.141 54.3063 86.1455 53.2965L49 34.5Z"})]})]})},Qu=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,orientation:n,className:u.CSS(u.CSS.B("angled-valve"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:32.8125,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.0278,top:32.8125,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M22.3611 20.1077C21.6298 20.4778 21.6298 21.5222 22.3611 21.8923L57.7433 39.7965C59.7388 40.8063 62.0978 39.3562 62.0978 37.1197L62.0978 4.88029C62.0978 2.64384 59.7388 1.19372 57.7433 2.2035L22.3611 20.1077Z"}),o.jsxRuntimeExports.jsx(N,{d:"M21.8923 22.3611C21.5222 21.6298 20.4778 21.6298 20.1077 22.3611L2.20349 57.7433C1.19372 59.7388 2.64384 62.0978 4.8803 62.0978L37.1197 62.0978C39.3562 62.0978 40.8063 59.7388 39.7965 57.7433L21.8923 22.3611Z"})]})]}),ex=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:n,className:u.CSS(u.CSS.B("ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"43.5978",cy:"20.972",r:"19"}),o.jsxRuntimeExports.jsx(N,{d:"M26.5 12.8472L6.35452 2.17563C4.35901 1.16585 2 2.61598 2 4.85243V37.0918C2 39.3283 4.35901 40.7784 6.35453 39.7686L26.5 29.3472"}),o.jsxRuntimeExports.jsx(N,{d:"M60.5 28.8486L80.6455 39.5202C82.641 40.5299 85 39.0798 85 36.8434V4.60396C85 2.36751 82.641 0.917381 80.6455 1.92716L60.5 12.3486"})]})]}),tx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:n,className:u.CSS(u.CSS.B("three-way-ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.8,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"43.5978",cy:"21.722",r:"19"}),o.jsxRuntimeExports.jsx(N,{d:"M26.5 13.5972L6.35452 2.92563C4.35901 1.91585 2 3.36598 2 5.60243V37.8418C2 40.0783 4.35901 41.5284 6.35453 40.5186L26.5 30.0972"}),o.jsxRuntimeExports.jsx(N,{d:"M60.5 29.5986L80.6455 40.2702C82.641 41.2799 85 39.8298 85 37.5934V5.35396C85 3.11751 82.641 1.66738 80.6455 2.67716L60.5 13.0986"}),o.jsxRuntimeExports.jsx(N,{d:"M35.3737 38.7499L24.7021 58.8954C23.6923 60.8909 25.1425 63.2499 27.3789 63.2499H59.6183C61.8548 63.2499 63.3049 60.8909 62.2951 58.8954L51.8737 38.7499"})]})]}),nx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:n,className:u.CSS(u.CSS.B("gate-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 2 L43.5 39.7965"})]})]}),sx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-one"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 2V40"}),o.jsxRuntimeExports.jsx($e,{cx:"43.5",cy:"21",r:"10",fill:u.Dt.cssString(e)})]})]}),ox=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-two"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"43.5",cy:"21",r:"10",fill:u.Dt.cssString(e)}),o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"83",height:"38",rx:"1"}),o.jsxRuntimeExports.jsx(N,{d:"M2.29001 2.29004L84.7069 39.676"})]})]}),rx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:n,className:u.CSS(u.CSS.B("breather-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:8.081,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:91.919,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:99,height:57},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"91",cy:"49.5",r:"6",fill:u.Dt.cssString(e)}),o.jsxRuntimeExports.jsx($e,{cx:"8",cy:"7.5",r:"6",fill:u.Dt.cssString(e)}),o.jsxRuntimeExports.jsx(N,{d:"M49.5 28.5L12.3545 9.70349C10.359 8.69372 8 10.1438 8 12.3803V44.6197C8 46.8562 10.359 48.3063 12.3545 47.2965L49.5 28.5ZM49.5 28.5L86.6455 9.70349C88.641 8.69372 91 10.1438 91 12.3803V44.6197C91 46.8562 88.641 48.3063 86.6455 47.2965L49.5 28.5Z"})]})]}),ix=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)})]})]}),lx=({className:e,color:t,orientation:n="left",scale:s,...r})=>{const i=u.Dt.cssString(t);return o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:5,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:40,height:48},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"}),o.jsxRuntimeExports.jsx(N,{d:"M37.9706 23.2076C38.4906 23.6079 38.4906 24.3921 37.9706 24.7924L33.86 27.9568C33.2024 28.463 32.25 27.9942 32.25 27.1644V20.8356C32.25 20.0058 33.2024 19.537 33.86 20.0432L37.9706 23.2076Z",fill:i}),o.jsxRuntimeExports.jsx(N,{d:"M33 24H2",strokeLinecap:"round"})]})]})},cx=({className:e,color:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:11.1111,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:36,height:72},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"4",y:"4",width:"28",height:"64",rx:"2",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M13 68V47C13 46.4477 13.4489 45.9892 13.9928 45.8933C16.1351 45.5152 21 43.7981 21 36C21 28.2019 16.1351 26.4848 13.9928 26.1068C13.4489 26.0108 13 25.5523 13 25V4",strokeWidth:"2"})]})]}),ax=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:26,height:48},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"})})]}),ux=({className:e,orientation:t="left",color:n,scale:s=1,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:50,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:36,height:48},orientation:t,scale:s*.6,children:o.jsxRuntimeExports.jsx(N,{d:"M3 3H30C31.6569 3 33 4.34315 33 6V42C33 43.6569 31.6569 45 30 45H3",strokeLinecap:"round"})})]}),xx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:t,className:u.CSS(u.CSS.B("manual-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:56.25,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:56.25,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:48},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(je,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),o.jsxRuntimeExports.jsx(N,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 27L6.35453 8.20349C4.35901 7.19372 2 8.64384 2 10.8803V43.1197C2 45.3562 4.35901 46.8063 6.35453 45.7965L43.5 27ZM43.5 27L80.6455 8.20349C82.641 7.19372 85 8.64384 85 10.8803V43.1197C85 45.3562 82.641 46.8063 80.6455 45.7965L43.5 27Z"})]})]}),dx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("orifice_plate"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.875,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{color:n,dimensions:{width:72,height:35},orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M24.5 2V7.5V13","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M24.5 33V22","stroke-linecap":"round"})]})]}),jl=(e,t)=>e/t*100,px=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:11.5385,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:88.4615,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:52,height:34},orientation:t,color:n,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M6 17L24.8 2.9C25.5111 2.36667 26.4889 2.36667 27.2 2.9L46 17M6 17L24.8 31.1C25.5111 31.6333 26.4889 31.6333 27.2 31.1L46 17"})})]}),mx=e=>typeof e=="number"?{topLeft:u.J.construct(e),topRight:u.J.construct(e),bottomLeft:u.J.construct(e),bottomRight:u.J.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:u.J.construct(e.topLeft),topRight:u.J.construct(e.topRight),bottomLeft:u.J.construct(e.bottomLeft),bottomRight:u.J.construct(e.bottomRight)}:e,uS=e=>{const{topLeft:t,topRight:n,bottomLeft:s,bottomRight:r}=e;return`${t.x}% ${n.x}% ${r.x}% ${s.x}% / ${t.y}% ${n.y}% ${r.y}% ${s.y}%`},fx={width:40,height:80},Vr={x:50,y:10},so=({className:e,dimensions:t=fx,borderRadius:n=Vr,boxBorderRadius:s,color:r,backgroundColor:i,strokeWidth:l=2,...c})=>{const a=mx(n),x=s==null,d=Q.use(),{width:p,height:m}=t,f=g.useMemo(()=>[t,n,a],[a.bottomLeft,a.bottomRight,a.topLeft,a.topRight,m,p]),h=jl(1,p),j=100-h,y=jl(1,m),S=100-y;return o.jsxRuntimeExports.jsx(re,{className:u.CSS(e,u.CSS.B("tank")),style:{...t,borderRadius:s??uS(a),borderColor:u.Dt.cssString(r??d.colors.gray.l11),backgroundColor:u.Dt.cssString(i),borderWidth:l},...c,children:o.jsxRuntimeExports.jsxs(K,{refreshDeps:f,orientation:"left",children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:y,id:"1"}),x&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:h,top:a.topLeft.y,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:j,top:a.topRight.y,id:"3"})]}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:S,id:"4"}),x&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:h,top:100-a.bottomLeft.y,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:j,top:100-a.bottomRight.y,id:"6"})]}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:h,top:50,id:"7"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:j,top:50,id:"8"})]})})},xS=20,dS=(e,t,n=0,s=4)=>{const r=2*Math.PI/e,i=n*Math.PI/180,l=t/(2*Math.sin(Math.PI/e)),c=l+s/2;return Array.from({length:e}).map((a,x)=>{const d=r*x+i-Math.PI/2;return{x:c+l*Math.cos(d),y:c+l*Math.sin(d)}})},pS=(e,t,n)=>{const s=[],r=Math.min(n,t/2),i=e.length;if(i<3||r<=0)return`M ${e.map(l=>`${l.x},${l.y}`).join(" L ")} Z`;for(let l=0;l<i;l++){const c=e[(l-1+i)%i],a=e[l],x=e[(l+1)%i],d=a.x-c.x,p=a.y-c.y,m=x.x-a.x,f=x.y-a.y,h=Math.hypot(d,p),j=Math.hypot(m,f),y=r/h,S=r/j,b=a.x-d*y,E=a.y-p*y,C=a.x+m*S,L=a.y+f*S;l===0?s.push(`M ${b},${E}`):s.push(`L ${b},${E}`),s.push(`Q ${a.x},${a.y} ${C},${L}`)}return s.push("Z"),s.join(" ")},Fr=({numSides:e,sideLength:t,rotation:n=0,color:s,backgroundColor:r,className:i,cornerRounding:l,strokeWidth:c,...a})=>{const x=Q.use(),d=g.useMemo(()=>2*((c??2)+1),[c]),p=g.useMemo(()=>dS(e,t,n,d),[e,t,n,d]),m=g.useMemo(()=>pS(p,t,l??0),[p,t,l]),f=g.useMemo(()=>2*(t/(2*Math.sin(Math.PI/e)))+d,[t,e,d]);return o.jsxRuntimeExports.jsx(re,{className:u.CSS(i,u.CSS.B("polygon")),...a,children:o.jsxRuntimeExports.jsx(X,{dimensions:{width:f,height:f},children:o.jsxRuntimeExports.jsx(N,{d:m,fill:u.Dt.cssString(r??x.colors.gray.l1),stroke:u.Dt.cssString(s??x.colors.gray.l9),strokeWidth:c??2})})})},hx=({radius:e,color:t,backgroundColor:n,className:s,strokeWidth:r,...i})=>{const l=(r??2)+1,c=e*2,a=c+2*l,x=c+2*l;return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(s,u.CSS.B("circle-shape")),...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:"left",refreshDeps:e,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:l/x*100,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:(x-l)/x*100,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:l/a*100,top:50,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:(a-l)/a*100,top:50,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:a,height:x},children:o.jsxRuntimeExports.jsx($e,{cx:a/2,cy:x/2,r:e,stroke:u.Dt.cssString(t??"var(--pluto-gray-l9)"),strokeWidth:r??2,fill:u.Dt.cssString(n??"var(--pluto-gray-l1)")})})]})},gx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50.9091,top:12.5,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:88,height:80},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),o.jsxRuntimeExports.jsx(N,{d:"M61 30C62.6569 30 64.0231 28.6494 63.7755 27.0111C63.141 22.8129 61.181 18.8968 58.1421 15.8579C54.3914 12.1071 49.3043 10 44 10C38.6957 10 33.6086 12.1071 29.8579 15.8579C26.819 18.8968 24.859 22.8129 24.2245 27.0111C23.9769 28.6494 25.3431 30 27 30L44.5 30H61Z"}),o.jsxRuntimeExports.jsx(je,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),jx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator-manual")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:2.2989,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.381,top:75,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.619,top:75,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:84},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 20L43.5 2","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M19.5 2L67.5 2","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 63L6.35453 44.2035C4.35901 43.1937 2 44.6438 2 46.8803V79.1197C2 81.3562 4.35901 82.8063 6.35453 81.7965L43.5 63ZM43.5 63L80.6455 44.2035C82.641 43.1937 85 44.6438 85 46.8803V79.1197C85 81.3562 82.641 82.8063 80.6455 81.7965L43.5 63Z"}),o.jsxRuntimeExports.jsx(N,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(N,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(je,{x1:"43.5",y1:"63",x2:"43.5",y2:"40"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 20V18C43.5 16.3431 44.8431 15 46.5 15H79.5C81.1569 15 82.5 16.3431 82.5 18V34.4281C82.5 35.4126 82.017 36.3344 81.2076 36.8947L43.5 63"})]})]}),Ex=({className:e,orientation:t="left",scale:n,color:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("orifice"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.8571,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.1429,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:70,height:34},orientation:t,color:s,scale:n,children:[o.jsxRuntimeExports.jsx(N,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),yx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:t,className:u.CSS(u.CSS.B("needle-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:51.1905,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:51.1905,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.0152 21.5391L38.237 2.62245C38.1573 2.30658 38.396 2 38.7218 2L48.2782 2C48.604 2 48.8427 2.30658 48.763 2.62245L43.9848 21.5391C43.8576 22.0425 43.1424 22.0425 43.0152 21.5391Z",fill:u.Dt.cssString(n)}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 21.5L6.35453 2.70349C4.35901 1.69372 2 3.14384 2 5.38029V37.6197C2 39.8562 4.35901 41.3063 6.35453 40.2965L43.5 21.5ZM43.5 21.5L80.6455 2.70349C82.641 1.69372 85 3.14384 85 5.3803V37.6197C85 39.8562 82.641 41.3063 80.6455 40.2965L43.5 21.5Z"})]})]}),Sx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:n,className:u.CSS(u.CSS.B("angled-relief-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:32.8125,top:97.5922,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.0278,top:45.5639,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:79},orientation:n,color:e,scale:s,children:[o.jsxRuntimeExports.jsx(je,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M22.3611 35.1077C21.6298 35.4778 21.6298 36.5222 22.3611 36.8923L57.7433 54.7965C59.7388 55.8063 62.0978 54.3562 62.0978 52.1197L62.0978 19.8803C62.0978 17.6438 59.7388 16.1937 57.7433 17.2035L22.3611 35.1077Z"}),o.jsxRuntimeExports.jsx(N,{d:"M21.8923 37.3611C21.5222 36.6298 20.4778 36.6298 20.1077 37.3611L2.20349 72.7433C1.19372 74.7388 2.64384 77.0978 4.8803 77.0978H37.1197C39.3562 77.0978 40.8063 74.7388 39.7965 72.7433L21.8923 37.3611Z"})]})]}),Rx=({className:e,color:t,dimensions:n,orientation:s="left",units:r="psi",unitsLevel:i="small",children:l,inlineSize:c=80,...a})=>{const x=u.Dt.cssString(t),d=Q.use(),p=t==null?"var(--pluto-gray-l0)":u.Dt.cssString(u.Dt.pickByContrast(t,d.colors.gray.l0,d.colors.gray.l11));return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("value"),e),...a,style:{borderColor:x,height:n==null?void 0:n.height,width:"100%"},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n==null?void 0:n.width,inlineSize:c},children:l}),o.jsxRuntimeExports.jsxs(K,{orientation:s,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.BE("value","units"),u.CSS.M(i)),style:{background:x},children:o.jsxRuntimeExports.jsx(Z.Text,{level:i,color:p,children:r})})]})},Cx=({enabled:e=!1,onClick:t,orientation:n="left"})=>o.jsxRuntimeExports.jsxs(re,{orientation:n,children:[o.jsxRuntimeExports.jsx(Q.Switch$1,{value:e,onClick:t,onChange:()=>{}}),o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:100,top:50,id:"2"})]})]}),wx=({onClick:e,orientation:t="left",label:n="",color:s,size:r,level:i,onClickDelay:l})=>o.jsxRuntimeExports.jsxs(re,{orientation:t,children:[o.jsxRuntimeExports.jsx(he.Button,{onClick:e,color:s,size:r,level:i,onClickDelay:l,children:n}),o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:0,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:100,id:"4"})]})]}),bx=({className:e,orientation:t="left",text:n="",width:s,color:r="var(--pluto-gray-l11)",level:i,autoFit:l,align:c="center"})=>{const a={textAlign:c};return u.g.construct(t)==="y"?a.height=l?"fit-content":s:a.width=l?"fit-content":s,o.jsxRuntimeExports.jsx(re,{style:a,orientation:t,className:u.CSS(u.CSS.B("text-box"),u.CSS.loc(t),e),children:o.jsxRuntimeExports.jsx(Z.Text,{color:u.Dt.cssString(r),level:i,children:n})})},vx=({orientation:e="left",className:t,onClick:n,children:s,value:r,units:i,color:l,onChange:c,size:a="small",disabled:x,...d})=>{const[p,m]=g.useState(r);return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("setpoint"),t),orientation:e,...d,children:[o.jsxRuntimeExports.jsxs(K,{orientation:e,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:e,left:.5,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:e,left:100,top:50,id:"2",style:{zIndex:5}}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:e,left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx(ge.Numeric,{size:a,value:p,onChange:m,showDragHandle:!1,selectOnFocus:!0,endContent:i,outlineColor:l,borderWidth:1,disabled:x,children:o.jsxRuntimeExports.jsx(he.Button,{size:a,variant:"filled",onClick:()=>c(p),color:l,children:"Set"})})]})},kx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("screw-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(N,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(32, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(N,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(42, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Mx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("vacuum-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"})})]}),_x=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("cavity-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(N,{d:"M 17 26 C 17 20.6667 23 20.6667 23 26 C 23 31.3333 29 31.3333 29 26 C 29 20.6667 35 20.6667 35 26",strokeLinecap:"round",transform:"translate(6, 6)",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Px=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("piston-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx($e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(N,{d:"M 23 32, h 16, m 0 -8, v 16",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),Lx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("static-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.5152,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.4848,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.3333,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.6667,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:30},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),Nx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("rotary-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2,top:48.4849,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.5,top:48.4849,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:50,height:33},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M1 30V2C1 1.44772 1.44772 1 2 1H35.4545C35.7434 1 36.0181 1.12487 36.208 1.34247L48.4262 15.3425C48.7549 15.7192 48.7549 16.2808 48.4262 16.6575L36.208 30.6575C36.0181 30.8751 35.7434 31 35.4545 31H2C1.44772 31 1 30.5523 1 30Z"}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(je,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Tx=({className:e,color:t,orientation:n="left",enabled:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,orientation:n,className:u.CSS(u.CSS.B("light"),s&&u.CSS.M("enabled"),e),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.75,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:64,height:64},color:t,orientation:n,scale:r,children:o.jsxRuntimeExports.jsx($e,{cx:"32",cy:"32",r:"30"})})]}),$x=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.29885,top:69.565,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.70115,top:69.565,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:23.1479,top:23.61,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:11.11,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:76.8521,top:23.61,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:69},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 49L6.35453 30.2035C4.35901 29.1937 2 30.6438 2 32.8803V65.1197C2 67.3562 4.35901 68.8063 6.35453 67.7965L43.5 49ZM43.5 49L80.6455 30.2035C82.641 29.1937 85 30.6438 85 32.8803V65.1197C85 67.3562 82.641 68.8063 80.6455 67.7965L43.5 49Z"}),o.jsxRuntimeExports.jsx(ye,{x:"21",y:"6.5",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M43 6.5V4C43 2.34315 44.3431 1 46 1H79C80.6569 1 82 2.34315 82 4V20.4281C82 21.4126 81.517 22.3344 80.7076 22.8947L43 49"}),o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"49",x2:"43",y2:"24.5"})]})]}),Ax=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator-motorized")),...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:35.6321,top:13.72549,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:1.96078,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:64.3679,top:13.72549,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:24.1379,top:46.078,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:75.8621,top:46.078,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:78.43137,id:"6"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:78.43137,id:"7"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:102},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 80.5L6.35453 61.7035C4.35901 60.6937 2 62.1438 2 64.3803V96.6197C2 98.8562 4.35901 100.306 6.35453 99.2965L43.5 80.5ZM43.5 80.5L80.6455 61.7035C82.641 60.6937 85 62.1438 85 64.3803V96.6197C85 98.8562 82.641 100.306 80.6455 99.2965L43.5 80.5Z"}),o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"80.5",x2:"43",y2:"56"}),o.jsxRuntimeExports.jsx(N,{d:"M43 38V35.5C43 33.8431 44.3431 32.5 46 32.5H79C80.6569 32.5 82 33.8431 82 35.5V51.9281C82 52.9126 81.517 53.8344 80.7076 54.3947L43 80.5"}),o.jsxRuntimeExports.jsx(ye,{x:"21",y:"38",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M43 38V26","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx($e,{cx:"43",cy:"14",r:"12"})]})]}),Ix=({height:e=86,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:100/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M1 85V48.8541C1 46.624 3.34694 45.1735 5.34164 46.1708L80.6584 83.8292 C82.6531 84.8265 85 83.376 85 81.1459 V44"}),o.jsxRuntimeExports.jsx(N,{d:"M43 1L45 65"})]})]}),Dx=({height:e=86,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50.5814,top:200/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M43.5 69.573L14.9534 55.6147C8.97428 52.6911 2 57.0443 2 63.6999V75.4462C2 82.1018 8.97429 86.455 14.9534 83.5314L43.5 69.573ZM43.5 69.573L72.0466 55.6147C78.0257 52.6911 85 57.0443 85 63.6999V75.4462C85 82.1018 78.0257 86.455 72.0466 83.5314L43.5 69.573Z"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),zx=({height:e=86,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:100/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(ye,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),Bx=({height:e=86,className:t,orientation:n="left",color:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:100/e,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:e},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(ye,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),o.jsxRuntimeExports.jsx(je,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"49",x2:"43",y2:"83",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),Ox=({className:e,height:t=86,orientation:n="left",color:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:100/t,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:t},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(je,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(je,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(je,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(ye,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),Vx=({className:e,height:t=86,orientation:n="left",color:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(Ee,{...i,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:100/t,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:86,height:t},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(je,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M5.375 36L70.8204 48.7138C74.0584 49.3428 74.0573 53.9765 70.8189 54.6039L14.7952 65.4584C11.5729 66.0827 11.5494 70.6856 14.7651 71.3429L81.5208 84.9873",strokeLinecap:"round"})]})]}),Fx=({id:e,className:t,orientation:n="right",label:s="text",color:r,level:i="p",onLabelChange:l,...c})=>{const a=document.querySelector(`[data-id="${e}"]`);a&&a.classList.add(n);const x=u.g.construct(n)==="y";return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("arrow"),u.CSS.loc(n),t),orientation:n,...c,children:[o.jsxRuntimeExports.jsx("div",{className:"wrapper",children:o.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:u.Dt.cssString(r)},children:o.jsxRuntimeExports.jsx("div",{className:"bg",children:o.jsxRuntimeExports.jsx(Z.MaybeEditable,{value:s,onChange:l,level:i,className:u.CSS.BE("symbol","label")})})})}),o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:x,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:x,id:"2"})]}),o.jsxRuntimeExports.jsx("svg",{style:{visibility:"hidden",position:"absolute"},width:"0",height:"0",xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsxs("filter",{id:"goo",children:[o.jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.5",result:"blur"}),o.jsxRuntimeExports.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),o.jsxRuntimeExports.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})},Hx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("vent"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:22.7273,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:80,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:22,height:32},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M5 3L16.6325 13.8016C17.9107 14.9885 17.9107 17.0115 16.6325 18.1984L5 29",strokeLinecap:"round"})})]}),Zx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("iso-filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:95,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:5,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:60,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"3",y:"3",width:"54",height:"36",rx:"3",ry:"3"}),o.jsxRuntimeExports.jsx(je,{x1:"30",y1:"3",x2:"30",y2:"13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(je,{x1:"30",y1:"17",x2:"30",y2:"25",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(je,{x1:"30",y1:"29",x2:"30",y2:"39",strokeLinecap:"round"})]})]}),Wx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("flow-straightener"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:72,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2.5",y:"2.5",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M10.5 26.5H60.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M10.5 9.5H60.5","stroke-linecap":"round"})]})]}),Yx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("heater-element"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:11.9,top:5.55555556,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:11.9,top:94,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:21,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M2.5 34.0005H14.5","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M2.5 2.00049L14.5 2.00049","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M14.3793 10.0013C14.9046 10.0013 15.4248 10.1048 15.9101 10.3058C16.3954 10.5068 16.8363 10.8015 17.2078 11.1729C17.5792 11.5443 17.8738 11.9853 18.0749 12.4706C18.2759 12.9559 18.3793 13.4761 18.3793 14.0013C18.3793 14.5266 18.2759 15.0468 18.0749 15.5321C17.8738 16.0174 17.5792 16.4583 17.2078 16.8298C16.8363 17.2012 16.3954 17.4958 15.9101 17.6969C15.4248 17.8979 14.9046 18.0013 14.3793 18.0013"}),o.jsxRuntimeExports.jsx(N,{d:"M14.5 2.00049C15.0253 2.00049 15.5454 2.10395 16.0307 2.30497C16.516 2.50599 16.957 2.80063 17.3284 3.17206C17.6999 3.5435 17.9945 3.98445 18.1955 4.46975C18.3965 4.95506 18.5 5.4752 18.5 6.00049C18.5 6.52578 18.3965 7.04592 18.1955 7.53122C17.9945 8.01652 17.6999 8.45748 17.3284 8.82892C16.957 9.20035 16.516 9.49499 16.0307 9.69601C15.5454 9.89703 15.0253 10.0005 14.5 10.0005"}),o.jsxRuntimeExports.jsx(N,{d:"M14.5 18.0005C15.0253 18.0005 15.5454 18.104 16.0307 18.305C16.516 18.506 16.957 18.8006 17.3284 19.1721C17.6999 19.5435 17.9945 19.9845 18.1955 20.4698C18.3965 20.9551 18.5 21.4752 18.5 22.0005C18.5 22.5258 18.3965 23.0459 18.1955 23.5312C17.9945 24.0165 17.6999 24.4575 17.3284 24.8289C16.957 25.2003 16.516 25.495 16.0307 25.696C15.5454 25.897 15.0253 26.0005 14.5 26.0005"}),o.jsxRuntimeExports.jsx(N,{d:"M14.6206 25.9995C15.1459 25.9995 15.6661 26.103 16.1514 26.304C16.6367 26.505 17.0776 26.7997 17.4491 27.1711C17.8205 27.5425 18.1151 27.9835 18.3162 28.4688C18.5172 28.9541 18.6206 29.4742 18.6206 29.9995C18.6206 30.5248 18.5172 31.0449 18.3162 31.5302C18.1151 32.0155 17.8205 32.4565 17.4491 32.8279C17.0776 33.1994 16.6367 33.494 16.1514 33.695C15.6661 33.896 15.1459 33.9995 14.6206 33.9995"})]})]}),Gx=({className:e,dimensions:t=fx,borderRadius:n=Vr,boxBorderRadius:s,color:r,backgroundColor:i,...l})=>{const c=mx(n),a=Q.use(),x=g.useMemo(()=>[t,n,c],[c.bottomLeft,c.bottomRight,c.topLeft,c.topRight,t.height,t.width]),d=u.Dt.cssString(r??a.colors.gray.l11),p=i==null?void 0:u.Dt.cssString(i),m=t.width/66,f=t.height/180,h=`scale(${m},${f})`;return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("cylinder")),style:{...t},...l,children:[o.jsxRuntimeExports.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:h,children:o.jsxRuntimeExports.jsx("path",{d:"M23 33.6712C11.9844 36.0332 3 42.4382 3 52.8862V174.568C3 176.225 4.34315 177.568 6 177.568H60C61.6569 177.568 63 176.225 63 174.568V52.8862C63 36.3342 40.4511 29.9292 23 33.6712ZM23 33.6712V13.3181C23 0.318109 42.9975 0.318123 42.9975 13.3181V33.6712",vectorEffect:"non-scaling-stroke",strokeWidth:"2",stroke:d,transform:h,fill:p})}),o.jsxRuntimeExports.jsxs(K,{refreshDeps:x,orientation:"left",children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:2,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:35,top:10,id:"9"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:65,top:10,id:"10"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:98.3333,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:40,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:40,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:60,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:60,id:"6"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:80,id:"7"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:80,id:"8"})]})]})},Kx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.Dt.cssString(n);return o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.1373,top:69.0785,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.7416,top:72.368,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:89,height:76},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M46.3625 54.1079C45.6312 54.4779 45.6311 55.5223 46.3624 55.8924L81.7435 73.7989C83.7389 74.8088 86.098 73.3588 86.0982 71.1224L86.1002 38.883C86.1003 36.6465 83.7414 35.1962 81.7458 36.2059L46.3625 54.1079Z",stroke:l}),o.jsxRuntimeExports.jsx(N,{d:"M71 38.0014V72.0014",stroke:l,strokeWidth:4,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M41.6389 55.8923C42.3702 55.5222 42.3702 54.4778 41.6389 54.1077L6.2567 36.2035C4.26118 35.1937 1.90217 36.6438 1.90217 38.8803L1.90217 71.1197C1.90217 73.3562 4.26119 74.8063 6.2567 73.7965L41.6389 55.8923Z",stroke:l}),o.jsxRuntimeExports.jsx($e,{cx:"44",cy:"55",r:"4",fill:l}),o.jsxRuntimeExports.jsx(N,{d:"M45 4C45 3.44772 44.5523 3 44 3C43.4477 3 43 3.44772 43 4H45ZM37.5777 24.7889L38.0249 23.8944L37.5777 24.7889ZM37.5777 21.2111L38.0249 22.1056L37.5777 21.2111ZM50.4223 31.2111L49.9751 32.1056L50.4223 31.2111ZM37.5777 44.7889L37.1305 45.6833L37.5777 44.7889ZM37.5777 41.2111L37.1305 40.3167L37.5777 41.2111ZM42.8944 47.4472L42.4472 48.3416L42.8944 47.4472ZM45 52V49.2361H43V52H45ZM43.3416 46.5528L38.0249 43.8944L37.1305 45.6833L42.4472 48.3416L43.3416 46.5528ZM38.0249 42.1056L50.8695 35.6833L49.9751 33.8944L37.1305 40.3167L38.0249 42.1056ZM50.8695 30.3167L38.0249 23.8944L37.1305 25.6833L49.9751 32.1056L50.8695 30.3167ZM38.0249 22.1056L50.8695 15.6833L49.9751 13.8944L37.1305 20.3167L38.0249 22.1056ZM50.8695 10.3167L45.5528 7.65836L44.6584 9.44721L49.9751 12.1056L50.8695 10.3167ZM45 6.76393V4H43V6.76393H45ZM45.5528 7.65836C45.214 7.48897 45 7.1427 45 6.76393H43C43 7.90025 43.642 8.93904 44.6584 9.44721L45.5528 7.65836ZM50.8695 15.6833C53.0806 14.5777 53.0807 11.4223 50.8695 10.3167L49.9751 12.1056C50.7121 12.4741 50.7121 13.5259 49.9751 13.8944L50.8695 15.6833ZM38.0249 23.8944C37.2879 23.5259 37.2879 22.4741 38.0249 22.1056L37.1305 20.3167C34.9193 21.4223 34.9194 24.5777 37.1305 25.6833L38.0249 23.8944ZM50.8695 35.6833C53.0806 34.5777 53.0807 31.4223 50.8695 30.3167L49.9751 32.1056C50.7121 32.4741 50.7121 33.5259 49.9751 33.8944L50.8695 35.6833ZM38.0249 43.8944C37.2879 43.5259 37.2879 42.4741 38.0249 42.1056L37.1305 40.3167C34.9193 41.4223 34.9194 44.5777 37.1305 45.6833L38.0249 43.8944ZM45 49.2361C45 48.0998 44.358 47.061 43.3416 46.5528L42.4472 48.3416C42.786 48.511 43 48.8573 43 49.2361H45Z",fill:l,strokeWidth:1})]})]})},qx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.Dt.cssString(n);return o.jsxRuntimeExports.jsxs(Ee,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:31.8182,top:98,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:95.6061,top:55.5185,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:101},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M23.3625 55.6237C22.6312 55.9937 22.6311 57.0381 23.3624 57.4082L58.7435 75.3147C60.7389 76.3246 63.098 74.8747 63.0981 72.6382L63.1001 40.3988C63.1003 38.1624 60.7414 36.7121 58.7458 37.7217L23.3625 55.6237Z"}),o.jsxRuntimeExports.jsx(N,{d:"M48 38.633V72.633",strokeLinecap:"round",strokeWidth:4}),o.jsxRuntimeExports.jsx(N,{d:"M21.8923 58.4348C21.5222 57.7035 20.4778 57.7035 20.1077 58.4348L2.20349 93.817C1.19372 95.8125 2.64384 98.1715 4.8803 98.1715H37.1197C39.3562 98.1715 40.8063 95.8125 39.7965 93.817L21.8923 58.4348Z"}),o.jsxRuntimeExports.jsx($e,{cx:"21",cy:"56.0737",r:"4",fill:l}),o.jsxRuntimeExports.jsx(N,{d:"M21 53.0105V50.0225C21 49.3397 20.6516 48.704 20.0759 48.3366L15.6419 45.507C14.4098 44.7207 14.4098 42.9214 15.6419 42.1351L26.3581 35.2965C27.5902 34.5102 27.5902 32.7109 26.3581 31.9246L15.6419 25.0859C14.4098 24.2997 14.4098 22.5003 15.6419 21.714L26.3581 14.8754C27.5902 14.0891 27.5902 12.2898 26.3581 11.5035L21.9241 8.67393C21.3484 8.30656 21 7.67087 21 6.98798V4",stroke:l,strokeLinecap:"round"})]})]})},Xx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.8462,top:22.3095,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.1538,top:22.3095,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:92.8571,id:"3"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:39,height:21},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M1.5 5.5V3.5C1.5 2.39543 2.39543 1.5 3.5 1.5H35.5C36.6046 1.5 37.5 2.39543 37.5 3.5V5.5C37.5 6.60457 36.6046 7.5 35.5 7.5H24.5C23.3954 7.5 22.5 8.39543 22.5 9.5V17.5C22.5 18.6046 21.6046 19.5 20.5 19.5H18.5C17.3954 19.5 16.5 18.6046 16.5 17.5V9.5C16.5 8.39543 15.6046 7.5 14.5 7.5H3.5C2.39543 7.5 1.5 6.60457 1.5 5.5Z",fill:u.Dt.cssString(n),stroke:"none"})})]}),Ux=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.8462,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.1539,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50.5,top:96.1539,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50.5,top:3.8462,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:39,height:39},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M22.5 35.5C22.5 36.6046 21.6046 37.5 20.5 37.5H18.5C17.3954 37.5 16.5 36.6046 16.5 35.5V24.5C16.5 23.3954 15.6046 22.5 14.5 22.5H3.5C2.39543 22.5 1.5 21.6046 1.5 20.5V18.5C1.5 17.3954 2.39543 16.5 3.5 16.5H14.5C15.6046 16.5 16.5 15.6046 16.5 14.5V3.5C16.5 2.39543 17.3954 1.5 18.5 1.5H20.5C21.6046 1.5 22.5 2.39543 22.5 3.5V14.5C22.5 15.6046 23.3954 16.5 24.5 16.5H35.5C36.6046 16.5 37.5 17.3954 37.5 18.5V20.5C37.5 21.6046 36.6046 22.5 35.5 22.5H24.5C23.3954 22.5 22.5 23.3954 22.5 24.5V35.5Z",fill:u.Dt.cssString(n),stroke:"none"})})]}),Xe=({position:e,color:t})=>o.jsxRuntimeExports.jsx("text",{x:(e==null?void 0:e.x)??57,y:(e==null?void 0:e.y)??27,style:{fill:u.Dt.cssString(t),fontWeight:450},stroke:"none",children:"F"}),Jx=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-general"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:56,y:25},color:s})]})]}),Qx=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Electromagnetic"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M47.5 17.5H55.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M15.5 17.5H23.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M23.5 17.5C23.5 16.9747 23.6035 16.4546 23.8045 15.9693C24.0055 15.484 24.3001 15.043 24.6716 14.6716C25.043 14.3001 25.484 14.0055 25.9693 13.8045C26.4546 13.6035 26.9747 13.5 27.5 13.5C28.0253 13.5 28.5454 13.6035 29.0307 13.8045C29.516 14.0055 29.957 14.3001 30.3284 14.6716C30.6999 15.043 30.9945 15.484 31.1955 15.9693C31.3965 16.4546 31.5 16.9747 31.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M31.5 17.5C31.5 16.9747 31.6035 16.4546 31.8045 15.9693C32.0055 15.484 32.3001 15.043 32.6716 14.6716C33.043 14.3001 33.484 14.0055 33.9693 13.8045C34.4546 13.6035 34.9747 13.5 35.5 13.5C36.0253 13.5 36.5454 13.6035 37.0307 13.8045C37.516 14.0055 37.957 14.3001 38.3284 14.6716C38.6999 15.043 38.9945 15.484 39.1955 15.9693C39.3965 16.4546 39.5 16.9747 39.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M39.5 17.5C39.5 16.9747 39.6035 16.4546 39.8045 15.9693C40.0055 15.484 40.3001 15.043 40.6716 14.6716C41.043 14.3001 41.484 14.0055 41.9693 13.8045C42.4546 13.6035 42.9747 13.5 43.5 13.5C44.0253 13.5 44.5454 13.6035 45.0307 13.8045C45.516 14.0055 45.957 14.3001 46.3284 14.6716C46.6999 15.043 46.9945 15.484 47.1955 15.9693C47.3965 16.4546 47.5 16.9747 47.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:58,y:29},color:s})]})]}),ed=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-VariableArea"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M46 10V25"}),o.jsxRuntimeExports.jsx(N,{d:"M23 13V22"}),o.jsxRuntimeExports.jsx(N,{d:"M23 13L46 10"}),o.jsxRuntimeExports.jsx(N,{d:"M23 22L46 25"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),td=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Coriolis"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M2 17.6024H28.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M28.5 17.6024L34.6834 14.0324",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M34.8 14L45.9058 20.9666",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M51.5 17.6024L46.0141 20.8987",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M20.5 17.6024L26.6574 14.0474",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M26.75 14.1024L37.788 21.0265",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 17.6024L37.8427 21.0017",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M43.5 17.6024H69",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:58,y:29},color:s})]})]}),nd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Nozzle"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M24 2V7V12",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M24 12H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M24 23H29H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M24 33V23",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),sd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Venturi"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M8 33L26.5329 22.3",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M8 2L26.5329 12.7",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M56 33L26.5876 22.2948",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M56 2L26.5876 12.7052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:56,y:29},color:s})]})]}),od=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-RingPiston"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx($e,{cx:"36.5",cy:"17.5",r:"10.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx($e,{cx:"36.5",cy:"21.5",r:"6.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:56,y:29},color:s})]})]}),rd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-PositiveDisplacement"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M41 13C41 15.4853 38.9853 17.5 36.5 17.5C34.0147 17.5 32 15.4853 32 13C32 10.5147 34.0147 8.5 36.5 8.5C38.9853 8.5 41 10.5147 41 13Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M41 22C41 24.4853 38.9853 26.5 36.5 26.5C34.0147 26.5 32 24.4853 32 22C32 19.5147 34.0147 17.5 36.5 17.5C38.9853 17.5 41 19.5147 41 22Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),id=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Turbine"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M16.5 17.5H54.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M32.5 9L35.4756 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M38.5 26L35.5244 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M32.5 26L35.4756 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M38.5 9L35.5244 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M32.5 9C32.5 8.20435 32.8161 7.44129 33.3787 6.87868C33.9413 6.31607 34.7044 6 35.5 6C36.2956 6 37.0587 6.31607 37.6213 6.87868C38.1839 7.44129 38.5 8.20435 38.5 9",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M38.5 26C38.5 26.7956 38.1839 27.5587 37.6213 28.1213C37.0587 28.6839 36.2956 29 35.5 29C34.7044 29 33.9413 28.6839 33.3787 28.1213C32.8161 27.5587 32.5 26.7956 32.5 26",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),ld=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Pulse"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M31 13.5H39",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M23 21.5H31",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M39 21.5H47",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M39 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M31 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),cd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-FloatSensor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M25 8H46",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M31 27H40",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M31 27L25.046 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M40 27L45.954 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),ad=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Orifice"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:35},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M24.5 2V7.5V13","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M24.5 33V22","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),ud=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-general"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.545,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.454,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.454,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(N,{d:"M3 33H18.3956L33.1284 18.1508M33.4276 47.8492L48.1604 33H63M33.278 48V18"}),o.jsxRuntimeExports.jsx(N,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"})]})]}),xd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:89,top:27.27,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:89,top:72.73,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.455,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.545,top:50,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(N,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"}),o.jsxRuntimeExports.jsx(N,{d:"M58.9698 18H23.56L38.5623 33.0023M38.5623 32.9977L23.56 48H58.9698"})]})]}),dd=({id:e,className:t,orientation:n="right",color:s="black",scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:9,top:6.25,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:24,top:93.75,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:76,top:6.25,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:91,top:93.75,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.508,top:50,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.492,top:50,id:"6"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:199,height:48},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ye,{x:"3",y:"3",width:"193",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(ye,{x:"32.397",y:"3",width:"134.206",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(ye,{x:"32.397",y:"13.5",width:"134.206",height:"21",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(je,{x1:"32.3769",y1:"24",x2:"166.623",y2:"24",strokeWidth:"2"})]})]}),pd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M31 62C29.2204 62 27.3855 61.332 25.5927 59.9086C23.791 58.4782 22.0952 56.3316 20.6377 53.5381C19.1829 50.7496 18.0147 47.4106 17.214 43.7054C16.4137 40.0021 16 36.0237 16 32C16 27.9763 16.4137 23.9979 17.214 20.2946C18.0147 16.5895 19.1829 13.2504 20.6377 10.4619C22.0952 7.66841 23.791 5.52179 25.5927 4.09136C27.3855 2.66801 29.2204 2 31 2",strokeWidth:"2"})]})]}),md=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(N,{d:"M50.3827 20.3601C47.1902 21.7605 43.4002 22.8046 39.2752 23.4077C35.1519 24.0105 30.8103 24.1557 26.5584 23.8319C22.3057 23.508 18.2597 22.7238 14.7044 21.5418C11.1449 20.3584 8.19358 18.8149 6.03181 17.0454M6.02374 46.9613C8.18198 45.1925 11.129 43.6491 14.6841 42.465C18.2349 41.2824 22.2765 40.4968 26.5256 40.1707C30.774 39.8447 35.113 39.9871 39.2353 40.5866C43.3592 41.1864 47.15 42.2268 50.3455 43.6237",strokeLinecap:"round"})]})]}),fd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("compressor"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z",strokeLinecap:"round"})})]}),hd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx($e,{cx:"33",cy:"33",r:"14.5"})]})]}),gd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(N,{d:"M35 12.4V20.4"}),o.jsxRuntimeExports.jsx(N,{d:"M3 33H16"}),o.jsxRuntimeExports.jsx(N,{d:"M35 53.6V45.6"})]})]}),jd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(N,{d:"M39 33C39 33.7879 38.8448 34.5681 38.5433 35.2961C38.2417 36.0241 37.7998 36.6855 37.2426 37.2426C36.6855 37.7998 36.0241 38.2417 35.2961 38.5433C34.5681 38.8448 33.7879 39 33 39C32.2121 39 31.4319 38.8448 30.7039 38.5433C29.9759 38.2417 29.3145 37.7998 28.7574 37.2426C28.2002 36.6855 27.7583 36.0241 27.4567 35.2961C27.1552 34.5681 27 33.7879 27 33C27 32.2121 27.1552 31.4319 27.4567 30.7039C27.7583 29.9759 28.2002 29.3145 28.7574 28.7574C29.3145 28.2002 29.9759 27.7583 30.7039 27.4567C31.4319 27.1552 32.2121 27 33 27C33.7879 27 34.5681 27.1552 35.2961 27.4567C36.0241 27.7583 36.6855 28.2002 37.2426 28.7574C37.7998 29.3145 38.2417 29.9759 38.5433 30.7039C38.8448 31.4319 39 32.2121 39 33L39 33Z"}),o.jsxRuntimeExports.jsx(N,{d:"M39 33H47"}),o.jsxRuntimeExports.jsx(N,{d:"M27 33H19"}),o.jsxRuntimeExports.jsx(N,{d:"M36 27.804L40 20.8758"}),o.jsxRuntimeExports.jsx(N,{d:"M30 27.804L26 20.8758"}),o.jsxRuntimeExports.jsx(N,{d:"M30 38.196L26 45.1242"}),o.jsxRuntimeExports.jsx(N,{d:"M36 38.196L40 45.1242"})]})]}),Ed=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(N,{d:"M49.1214 16.2515C43.5325 21.3055 36.2463 24.0711 28.7115 23.9986C21.1766 23.9262 13.945 21.0209 8.45428 15.8604M8.4838 50.112C13.9718 44.968 21.1918 42.0733 28.7133 42.0014C36.2348 41.9295 43.5089 44.6858 49.0942 49.7239"})]})]}),yd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(Ee,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(N,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(N,{d:"M3 33H63"})]})]}),Sd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:7.575,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:92.425,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(N,{d:"M16.5 2.5L16.5 66.5M2.5 34.5H30.5M2.5 18.9848H30.5M2.5 50.0152H30.5M5.3 66.5H27.7C29.2464 66.5 30.5 65.1976 30.5 63.5909V5.40909C30.5 3.80244 29.2464 2.5 27.7 2.5H5.3C3.7536 2.5 2.5 3.80245 2.5 5.40909V63.5909C2.5 65.1976 3.7536 66.5 5.3 66.5Z",strokeLinecap:"round"})})]}),Rd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(N,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(N,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(N,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(N,{d:"M29.12 65.62L61 34.5"})]})]}),Cd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:60,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2.5",width:"56",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(N,{d:"M30 2.5L30 66.5"}),o.jsxRuntimeExports.jsx(N,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(N,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 50H30"})]})]}),wd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(N,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(N,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(N,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5",strokeLinecap:"square"}),o.jsxRuntimeExports.jsx(je,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(je,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),bd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(N,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(N,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(N,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(N,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(N,{d:"M29.12 65.62L61 34.5"}),o.jsxRuntimeExports.jsx(N,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5"}),o.jsxRuntimeExports.jsx(je,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(je,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),vd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("thruster"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:25.3,top:4.76,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:25.3,top:95.24,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:81,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2.5",y:"2",width:"38",height:"38",rx:"3"}),o.jsxRuntimeExports.jsx(N,{d:"M78.5 37.5117V4.51172"}),o.jsxRuntimeExports.jsx(N,{d:"M40.5 11.5L76.0072 2.6232"}),o.jsxRuntimeExports.jsx(N,{d:"M40.5 30.5L76.0072 39.3768"}),o.jsxRuntimeExports.jsx(N,{d:"M75.6192 2.71597C75.9231 2.56695 76.2597 2.49745 76.5977 2.51399C76.9357 2.53052 77.264 2.63256 77.5518 2.81053C77.8397 2.98851 78.0776 3.23661 78.2435 3.53161C78.4093 3.82661 78.4975 4.15886 78.4999 4.49726"}),o.jsxRuntimeExports.jsx(N,{d:"M78.4994 37.5101C78.4914 37.8382 78.4028 38.1592 78.2414 38.445C78.0801 38.7307 77.8509 38.9723 77.574 39.1486C77.2972 39.3248 76.9813 39.4302 76.6541 39.4555C76.3269 39.4808 75.9986 39.4252 75.698 39.2936"})]})]}),kd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("nozzle"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:18.75,top:17.46,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:1.5873,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:81.25,top:17.46,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:126},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"12",y:"1.6667",width:"40",height:"40",rx:"2"}),o.jsxRuntimeExports.jsx(N,{d:"M1.3333 124H62.6667","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M50.1883 41.6667C41.7748 41.6667 35.0143 46.3333 42.6923 59.3333C59.3476 87.5333 63.6327 119 62.855 124","stroke-linecap":"round"}),o.jsxRuntimeExports.jsx(N,{d:"M14 41.6667C22.4135 41.6667 29.174 46.3333 21.496 59.3333C4.84066 87.5333 0.555555 119 1.33333 124","stroke-linecap":"round"})]})]}),Md=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(N,{d:"M2.293 2.29297L29.9383 66.7986",strokeDasharray:"6 6"})]})]}),_d=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ye,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(N,{d:"M31 34.5L2.30611 2.33992",strokeDasharray:"6 6"}),o.jsxRuntimeExports.jsx(N,{d:"M31 34.5L2.30611 66.6601",strokeDasharray:"6 6"})]})]}),mS=({aetherKey:e,sink:t})=>{const n=Ne.useMemoDeepEqualProps({sink:t}),[,,s]=Q.use$1({aetherKey:e,type:z.Button.TYPE,schema:z.buttonStateZ,initialState:{trigger:0,sink:t}});return g.useEffect(()=>{s(i=>({...i,...n}))},[n]),{click:g.useCallback(()=>{s(i=>({...i,trigger:i.trigger+1}))},[s])}},fS=({aetherKey:e,source:t})=>{const n=Ne.useMemoDeepEqualProps({source:t}),[,{enabled:s},r]=Q.use$1({aetherKey:e,type:z.Light.TYPE,schema:z.lightStateZ,initialState:{enabled:!1,...n}});return g.useEffect(()=>r(i=>({...i,...n})),[n,r]),{enabled:s}},hS="Schematic.Grid",gS=e=>{const n=to(e).closest(".react-flow__pane");n!=null&&Z.triggerReflow(n)},oo=e=>{const t=({symbolKey:s,items:r,onLocationChange:i})=>{const l=`${s}.${hS}`,[c,a]=g.useState(!1),x=g.useCallback(({items:y})=>y.every(S=>S.type===l),[l]),d=Z.useSyncedRef(i),{startDrag:p,onDragEnd:m,...f}=me.useDragAndDrop({type:l,canDrop:x,onDrop:g.useCallback(({items:y})=>y,[]),onDragOver:g.useCallback(y=>{a(x(y)),y.items.forEach(({key:S})=>d.current(S,e))},[])}),h=r.filter(y=>y.location===e),j=g.useCallback((y,S)=>p([{key:S,type:l}]),[p,l]);return o.jsxRuntimeExports.jsx(ne.Space,{direction:u.K.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e),u.CSS.dropRegion(!0),c&&u.CSS.B("dragging-over")),onDragLeave:()=>a(!1),empty:!0,...f,children:h.map(({element:y,key:S})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:g.cloneElement(y,{draggable:!0,onDragStart:b=>j(b,S),onDragEnd:m,style:{...y.props.style,cursor:"grab"}})},S))})};return({symbolKey:s,...r})=>{const{editable:i,items:l}=r,c=g.useRef(i);if(i!==c.current&&e==="top"&&(gS(s),c.current=i),i)return o.jsxRuntimeExports.jsx(t,{symbolKey:s,...r});const a=l.filter(x=>x.location===e);return a.length===0?null:o.jsxRuntimeExports.jsx(ne.Space,{direction:u.K.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e)),empty:!0,children:a.map(({element:x,key:d})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:x},d))})}},jS=oo("top"),ES=oo("left"),yS=oo("right"),SS=oo("bottom"),Wt=({editable:e,onRotate:t,children:n,...s})=>o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(jS,{editable:e,...s}),o.jsxRuntimeExports.jsx(ES,{editable:e,...s}),o.jsxRuntimeExports.jsx(yS,{editable:e,...s}),o.jsxRuntimeExports.jsx(SS,{editable:e,...s}),e&&o.jsxRuntimeExports.jsx(he.Icon,{className:u.CSS.BE("grid","rotate"),size:"small",variant:"filled",onClick:t,children:o.jsxRuntimeExports.jsx(Z.y4.Rotate,{})}),n]}),RS=({aetherKey:e,source:t,sink:n})=>{const s=Ne.useMemoDeepEqualProps({source:t,sink:n}),[,{value:r},i]=Q.use$1({aetherKey:e,type:z.Setpoint.TYPE,schema:z.setpointStateZ,initialState:{trigger:0,value:0,...s}});return g.useEffect(()=>{i(c=>({...c,...s}))},[s,i]),{set:g.useCallback(c=>i(a=>({...a,trigger:a.trigger+1,command:c})),[i]),value:r}},CS=({aetherKey:e,source:t,sink:n})=>{const s=Ne.useMemoDeepEqualProps({source:t,sink:n}),[,{triggered:r,enabled:i},l]=Q.use$1({aetherKey:e,type:z.Toggle.TYPE,schema:z.toggleStateZ,initialState:{triggered:!1,enabled:!1,...s}});return g.useEffect(()=>{l(a=>({...a,...s}))},[s,l]),{toggle:g.useCallback(()=>l(a=>({...a,triggered:!a.triggered})),[l]),triggered:r,enabled:i}},un=(e,t)=>{if(e==null)return null;const{label:n,level:s="p",orientation:r="top",direction:i,align:l,maxInlineSize:c}=e;return n==null||n.length===0?null:{key:"label",element:o.jsxRuntimeExports.jsx(Z.Editable,{className:u.CSS(u.CSS.BE("symbol","label"),u.CSS.dir(i)),level:s,value:n,onChange:a=>t==null?void 0:t({label:{...e,label:a}}),allowEmpty:!0,style:{textAlign:l,maxInlineSize:c}}),location:r}},Hr=e=>{if(e==null)return null;const{show:t=!0,showChip:n=!0,showIndicator:s=!0,chip:r,indicator:i,orientation:l="bottom"}=e;return{key:"control",element:o.jsxRuntimeExports.jsxs(ne.Space,{direction:u.g.swap(l),align:"center",className:u.CSS(u.CSS.B("control-state")),size:"small",children:[t&&n&&o.jsxRuntimeExports.jsx(Tc,{size:"small",...r}),t&&s&&o.jsxRuntimeExports.jsx(Ic,{...i})]}),location:l}},be=e=>{const t=({symbolKey:n,control:s,source:r,sink:i,label:l,onChange:c,draggable:a,selected:x,orientation:d="left",...p})=>{const{enabled:m,triggered:f,toggle:h}=CS({aetherKey:n,source:r,sink:i}),j=[],y=un(l,c);y!=null&&j.push(y);const S=Hr(s);return S!=null&&j.push(S),o.jsxRuntimeExports.jsx(Wt,{editable:x&&!a,symbolKey:n,items:j,onRotate:()=>c({orientation:u.K.rotate90(d)}),onLocationChange:(b,E)=>{b==="label"&&c({label:{...l,orientation:E}}),b==="control"&&c({control:{...s,orientation:E}})},children:o.jsxRuntimeExports.jsx(e,{enabled:m,triggered:f,onClick:h,orientation:d,...p})})};return t.displayName=e.displayName,t},ce=e=>{const t=({symbolKey:n,label:s,onChange:r,selected:i,draggable:l,position:c,orientation:a="left",...x})=>{const d=[],p=un(s,r);return p!=null&&d.push(p),o.jsxRuntimeExports.jsx(Wt,{items:d,editable:i&&!l,symbolKey:n,onRotate:()=>r({orientation:u.K.rotate90(a)}),onLocationChange:(m,f)=>{m==="label"&&r({label:{...s,orientation:f}})},children:o.jsxRuntimeExports.jsx(e,{orientation:a,...x})})};return t.displayName=e.displayName,t},Nt=e=>{const t=({symbolKey:n,label:s,onChange:r,selected:i,draggable:l,position:c,orientation:a="left",enabled:x=!1,clickable:d=!1,...p})=>{const m=[],f=un(s,r);f!=null&&m.push(f);const h=()=>{d&&r({enabled:!x})};return o.jsxRuntimeExports.jsx(Wt,{items:m,editable:i&&!l,symbolKey:n,onRotate:()=>r({orientation:u.K.rotate90(a)}),onLocationChange:(j,y)=>{j==="label"&&r({label:{...s,orientation:y}})},children:o.jsxRuntimeExports.jsx(e,{orientation:a,enabled:x,onClick:h,...p})})};return t.displayName=e.displayName,t},Pd=be(Yu),Ld=be(Gu),Nd=be(Ku),Td=be(Wu),$d=be(Qu),Ad=be(ix),Id=be(pd),Dd=be(md),zd=be(Mx),Bd=be(_x),Od=be(Px),Vd=be(Nx),Fd=be(Ix),Hd=be(Dx),Zd=be(zx),Wd=be(Bx),Yd=be(Ox),Gd=be(Vx),Kd=be(kx),qd=be(fd),Xd=be(hd),Ud=be(gd),Jd=be(jd),Qd=be(Ed),ep=be(yd),tp=be(sx),np=be(ox),sp=be(ex),op=be(tx),rp=be(nx),ip=ce(gx),lp=ce(jx),cp=ce($x),ap=ce(Ax),up=ce(lx),xp=ce(ax),dp=ce(ux),pp=ce(px),mp=ce(Xu),fp=ce(Uu),hp=ce(Ju),gp=ce(Ex),jp=be(Cx),Ep=ce(Hx),yp=ce(dx),Sp=ce(Zx),Rp=ce(Wx),Cp=ce(Yx),wp=ce(cx),bp=ce(Xx),vp=ce(Ux),kp=ce(Lx),Mp=ce(Jx),_p=ce(Qx),Pp=ce(ed),Lp=ce(td),Np=ce(nd),Tp=ce(sd),$p=ce(od),Ap=ce(rd),Ip=ce(id),Dp=ce(ld),zp=ce(cd),Bp=ce(ad),Op=ce(ud),Vp=ce(xd),Fp=ce(dd),Hp=ce(Sd),Zp=ce(Cd),Wp=ce(Rd),Yp=ce(wd),Gp=ce(bd),Kp=ce(vd),qp=ce(kd),Xp=ce(Md),Up=ce(_d),Jp=Nt(yx),Qp=Nt(qu),em=Nt(Kx),tm=Nt(qx),nm=Nt(xx),sm=Nt(Sx),om=Nt(rx),rm=ce(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(so,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e})),im=e=>o.jsxRuntimeExports.jsx(so,{...e,dimensions:{width:25,height:50}}),wS=ce(({sideLength:e,rotation:t,color:n,backgroundColor:s,numSides:r,...i})=>o.jsxRuntimeExports.jsx(Fr,{numSides:3,sideLength:e,rotation:t,color:n,backgroundColor:s,...i})),lm=ce(({numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...c})=>o.jsxRuntimeExports.jsx(Fr,{numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...c})),cm=ce(({radius:e,color:t,backgroundColor:n,strokeWidth:s,...r})=>o.jsxRuntimeExports.jsx(hx,{radius:e,color:t,backgroundColor:n,strokeWidth:s,...r})),am=ce(({backgroundColor:e,borderRadius:t,onChange:n,orientation:s,color:r,dimensions:i,strokeWidth:l})=>o.jsxRuntimeExports.jsx(so,{onResize:c=>n({dimensions:c}),orientation:s,color:r,dimensions:i,boxBorderRadius:t,backgroundColor:e,strokeWidth:l})),um=e=>o.jsxRuntimeExports.jsx(so,{...e,dimensions:{width:25,height:50},borderRadius:0}),xm=({label:e,symbolKey:t,orientation:n="left",control:s,units:r,source:i,sink:l,color:c,onChange:a,selected:x,draggable:d,size:p,disabled:m})=>{const{value:f,set:h}=RS({aetherKey:t,source:i,sink:l}),j=[],y=Hr(s);y!=null&&j.push(y);const S=un(e,a);return S!=null&&j.push(S),o.jsxRuntimeExports.jsx(Wt,{symbolKey:t,editable:x&&!d,onRotate:()=>a({orientation:u.K.rotate90(n)}),items:j,onLocationChange:(b,E)=>{b==="label"&&a({label:{...e,orientation:E}})},children:o.jsxRuntimeExports.jsx(vx,{value:f,onChange:h,units:r,color:c,orientation:n,disabled:m,size:p})})},dm=({className:e,...t})=>o.jsxRuntimeExports.jsx(vx,{value:12,onChange:()=>{},units:"mV",style:{width:120,transform:"scale(0.95)"},className:u.CSS(u.CSS.BM("setpoint","preview"),e),disabled:!0,...t,children:o.jsxRuntimeExports.jsx(Z.Text,{level:"p",children:"10.0"})}),pm=({symbolKey:e,label:t,level:n="p",position:s,textColor:r,color:i,telem:l,units:c,onChange:a,inlineSize:x=70,selected:d,draggable:p,notation:m})=>{const f=Jo.useTypography(n),h=(f.lineHeight+.5)*f.baseSize+2,{width:j}=Cr({aetherKey:e,color:r,level:n,box:u.$t.construct(u.J.translateY({...s},1),{height:h,width:x}),telem:l,minWidth:x,notation:m}),y=[],S=un(t,a);return S!=null&&y.push(S),o.jsxRuntimeExports.jsx(Wt,{editable:d&&!p,symbolKey:e,items:y,onLocationChange:(b,E)=>{b==="label"&&a({label:{...t,orientation:E}})},children:o.jsxRuntimeExports.jsx(Rx,{color:i,dimensions:{height:h,width:j},inlineSize:x,units:c,unitsLevel:st.downLevel(n)})})},mm=({color:e})=>o.jsxRuntimeExports.jsx(Rx,{color:e,dimensions:{width:60,height:25},units:"psi",children:o.jsxRuntimeExports.jsx(Z.Text,{level:"p",children:"50.00"})}),fm=({symbolKey:e,label:t,orientation:n="left",sink:s,control:r,selected:i,draggable:l,onChange:c,...a})=>{const{click:x}=mS({aetherKey:e,sink:s}),d=[],p=Hr(r);return p!=null&&d.push(p),o.jsxRuntimeExports.jsx(Wt,{onRotate:()=>c({orientation:u.K.rotate90(n)}),editable:i&&!l,symbolKey:e,items:d,onLocationChange:(m,f)=>{m==="label"&&c({label:{...t,orientation:f}})},children:o.jsxRuntimeExports.jsx(wx,{...t,onClick:x,orientation:n,...a})})},hm=({label:e,...t})=>o.jsxRuntimeExports.jsx(wx,{label:"Button",...t}),gm=({symbolKey:e,label:t,source:n,onChange:s,selected:r,draggable:i,...l})=>{const{enabled:c}=fS({aetherKey:e,source:n}),a=[],x=un(t,s);return x!=null&&a.push(x),o.jsxRuntimeExports.jsx(Wt,{items:a,editable:r&&!i,symbolKey:e,onLocationChange:(d,p)=>{d==="label"&&s({label:{...t,orientation:p}})},children:o.jsxRuntimeExports.jsx(Tx,{enabled:c,...l})})},jm=e=>o.jsxRuntimeExports.jsx(bx,{...e,autoFit:!0,text:"Text Box"}),Em=({label:{label:e,level:t},orientation:n,color:s,onChange:r})=>o.jsxRuntimeExports.jsx(Fx,{onLabelChange:i=>r({label:{label:i,level:t}}),label:e,level:t,orientation:n,color:s}),ym=({label:e,...t})=>o.jsxRuntimeExports.jsx(Fx,{label:"Off Page",...t,orientation:"right"}),Sm=ce(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(Gx,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e})),Rm=e=>o.jsxRuntimeExports.jsx(Gx,{...e,dimensions:{width:25,height:50}}),q=4,Zn=2,bS=["agitator","angledReliefValve","angledSpringLoadedReliefValve","angledValve","ballValve","threeWayBallValve","gateValve","butterflyValveOne","butterflyValveTwo","breatherValve","offPageReference","box","burstDisc","isoBurstDisc","button","cap","cavityPump","checkValve","cylinder","crossBeamAgitator","electricRegulator","electricRegulatorMotorized","filter","flowStraightener","heaterElement","checkValveWithArrow","flatBladeAgitator","flowmeterGeneral","flowmeterElectromagnetic","flowmeterVariableArea","flowmeterCoriolis","flowmeterNozzle","flowmeterVenturi","flowmeterRingPiston","flowmeterPositiveDisplacement","flowmeterTurbine","flowmeterPulse","flowmeterFloatSensor","flowmeterOrifice","fourWayValve","helicalAgitator","isoCap","isoCheckValve","isoFilter","light","manualValve","needleValve","orifice","orificePlate","paddleAgitator","propellerAgitator","pistonPump","pump","regulator","regulatorManual","reliefValve","rotaryMixer","screwPump","setpoint","solenoidValve","springLoadedReliefValve","staticMixer","switch","tank","polygon","circle","textBox","threeWayValve","vacuumPump","value","valve","vent","tJunction","crossJunction","heatExchangerGeneral","heatExchangerM","heatExchangerStraightTube","diaphragmPump","ejectionPump","compressor","turboCompressor","rollerVaneCompressor","liquidRingCompressor","ejectorCompressor","centrifugalCompressor","flameArrestor","flameArrestorDetonation","flameArrestorExplosion","flameArrestorFireRes","flameArrestorFireResDetonation","thruster","nozzle","strainer","strainerCone"],vS=pe.z.enum(bS),ie={orientation:"left",scale:1},kS={source:z.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:z.streamChannelValue({channel:0}),rollingAverage:z.rollingAverage({windowSize:1}),stringifier:z.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"})},MS={...ie,source:z.sourcePipeline("number",{connections:[],segments:{valueStream:z.streamChannelValue({channel:0})},outlet:"valueStream"})},_S={...ie,sink:z.sinkPipeline("number",{connections:[],segments:{setter:z.setChannelValue({channel:0})},inlet:"setter"})},Cm={...ie,source:z.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:z.streamChannelValue({channel:0}),threshold:z.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},wm={...ie,control:{show:!0},sink:z.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:z.setChannelValue({channel:0}),setpoint:z.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},ve={...Cm,...wm},Yt={...ie,enabled:!1,clickable:!1},Y=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center",direction:"x"}}),PS={width:125,height:200},Zr={dimensions:PS},LS=3,NS={name:"Three Way Valve",key:"threeWayValve",Form:we,Symbol:Pd,defaultProps:e=>({color:e.colors.gray.l11,...Y("Three Way Valve"),...ve}),Preview:Yu,zIndex:q},TS={name:"Valve",key:"valve",Form:we,Symbol:Ld,defaultProps:e=>({color:e.colors.gray.l11,...Y("Valve"),...ve}),Preview:Gu,zIndex:q},$S={name:"Solenoid Valve",key:"solenoidValve",Form:we,Symbol:Nd,defaultProps:e=>({color:e.colors.gray.l11,...Y("Solenoid Valve"),normallyOpen:!1,...ve}),Preview:Ku,zIndex:q},AS={name:"Four Way Valve",key:"fourWayValve",Form:we,Symbol:Td,defaultProps:e=>({color:e.colors.gray.l11,...Y("Four Way Valve"),...ve}),Preview:Wu,zIndex:q},IS={name:"Angled Valve",key:"angledValve",Form:we,Symbol:$d,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Valve"),...ve}),Preview:Qu,zIndex:q},DS={name:"Ball Valve",key:"ballValve",Form:we,Symbol:sp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ball Valve"),...ve}),Preview:ex,zIndex:q},zS={name:"Three-Way Ball Valve",key:"threeWayBallValve",Form:we,Symbol:op,defaultProps:e=>({color:e.colors.gray.l11,...Y("Three-Way Ball Valve"),...ve}),Preview:tx,zIndex:q},BS={name:"Gate Valve",key:"gateValve",Form:we,Symbol:rp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Gate Valve"),...ve}),Preview:nx,zIndex:q},OS={name:"Butterfly Valve (Remote)",key:"butterflyValveOne",Form:we,Symbol:tp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Butterfly Valve (Remote)"),...ve}),Preview:sx,zIndex:q},VS={name:"Butterfly Valve (Manual)",key:"butterflyValveTwo",Form:we,Symbol:np,defaultProps:e=>({color:e.colors.gray.l11,...Y("Butterfly Valve (Manual)"),...ve}),Preview:ox,zIndex:q},FS={name:"Breather Valve",key:"breatherValve",Form:Zt,Symbol:om,defaultProps:e=>({color:e.colors.gray.l11,...Y("Breather Valve"),...Yt}),Preview:at(rx,["clickable"]),zIndex:q},HS={name:"Pump",key:"pump",Form:we,Symbol:Ad,defaultProps:e=>({color:e.colors.gray.l11,...Y("Pump"),...ve}),Preview:ix,zIndex:q},ZS={name:"Screw Pump",key:"screwPump",Form:we,Symbol:Kd,defaultProps:e=>({color:e.colors.gray.l11,...Y("Screw Pump"),...ve}),Preview:kx,zIndex:q},WS={name:"Tank",key:"tank",Form:Hu,Symbol:rm,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.Dt.setAlpha(e.colors.gray.l1,0),...Y("Tank"),borderRadius:Vr,...Zr,...ie}),Preview:im,zIndex:Zn},YS={name:"Polygon",key:"polygon",Symbol:lm,Form:Wy,defaultProps:e=>({numSides:6,sideLength:xS,cornerRounding:0,rotation:0,color:e.colors.gray.l11,backgroundColor:u.Dt.setAlpha(e.colors.gray.l1,0),strokeWidth:2,...Y("Polygon")}),Preview:at(Fr,["clickable"]),zIndex:Zn},GS={name:"Circle",key:"circle",Symbol:cm,Form:Yy,defaultProps:e=>({radius:20,color:e.colors.gray.l11,backgroundColor:u.Dt.setAlpha(e.colors.gray.l1,0),...Y("Circle"),strokeWidth:2}),Preview:at(hx,["clickable"]),zIndex:Zn},KS={name:"Cylinder",key:"cylinder",Form:nS,Symbol:Sm,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.Dt.setAlpha(e.colors.gray.l1,0),...Y("cylinder"),dimensions:{width:66,height:181},...ie}),Preview:Rm,zIndex:Zn},qS={name:"Box",key:"box",Form:sS,Symbol:am,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.Dt.setAlpha(e.colors.gray.l1,0),...Y("Box"),borderRadius:LS,strokeWidth:2,...Zr,...ie}),Preview:um,zIndex:Zn},XS={name:"Relief Valve",key:"reliefValve",Form:Zt,Symbol:Qp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Relief Valve"),...Yt}),Preview:at(qu,["clickable"]),zIndex:q},US={name:"Spring Loaded Relief Valve",key:"springLoadedReliefValve",Form:Zt,Symbol:em,defaultProps:e=>({color:e.colors.gray.l11,...Y("Spring Loaded Relief Valve"),...Yt}),Preview:at(Kx,["clickable"]),zIndex:q},JS={name:"Angled Spring Loaded Relief Valve",key:"angledSpringLoadedReliefValve",Form:Zt,Symbol:tm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Spring Loaded Relief Valve"),...Yt}),Preview:at(qx,["clickable"]),zIndex:q},QS={name:"Regulator",key:"regulator",Form:xe,Symbol:ip,defaultProps:e=>({color:e.colors.gray.l11,...Y("Regulator"),...ie}),Preview:gx,zIndex:q},e6={name:"Manual Regulator",key:"regulatorManual",Form:xe,Symbol:lp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Manual Regulator"),...ie}),Preview:at(jx,["clickable"]),zIndex:q},t6={name:"Electric Regulator",key:"electricRegulator",Form:xe,Symbol:cp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electric Regulator"),...ie}),Preview:$x,zIndex:q},n6={name:"Electric Regulator Motorized",key:"electricRegulatorMotorized",Form:xe,Symbol:ap,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electric Regulator Motorized"),...ie}),Preview:Ax,zIndex:q},s6={name:"Burst Disc",key:"burstDisc",Form:xe,Symbol:up,defaultProps:e=>({color:e.colors.gray.l11,...Y("Burst Disc"),...ie}),Preview:lx,zIndex:q},o6={name:"ISO Burst Disc",key:"isoBurstDisc",Form:xe,Symbol:wp,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Burst Disc"),...ie}),Preview:cx,zIndex:q},r6={name:"Cap",key:"cap",Form:xe,Symbol:xp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cap"),...ie}),Preview:ax,zIndex:q},i6={name:"ISO Cap",key:"isoCap",Form:xe,Symbol:dp,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Cap"),...ie}),Preview:ux,zIndex:q},l6={name:"Manual Valve",key:"manualValve",Form:Zt,Symbol:nm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Manual Valve"),...Yt}),Preview:at(xx,["clickable"]),zIndex:q},c6={name:"Orifice Plate",key:"orificePlate",Form:xe,Symbol:yp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice Plate"),...ie}),Preview:dx,zIndex:q},a6={name:"ISO Filter",key:"isoFilter",Form:xe,Symbol:Sp,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Filter"),...ie}),Preview:Zx,zIndex:q},u6={name:"Filter",key:"filter",Form:xe,Symbol:pp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Filter"),...ie}),Preview:px,zIndex:q},x6={name:"Flow Straightener",key:"flowStraightener",Form:xe,Symbol:Rp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flow Straightener"),...ie}),Preview:Wx,zIndex:q},d6={name:"Heater Element",key:"heaterElement",Form:xe,Symbol:Cp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Heater Element"),...ie}),Preview:Yx,zIndex:q},p6={name:"Needle Valve",key:"needleValve",Form:Zt,Symbol:Jp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Needle Valve"),...Yt}),Preview:at(yx,["clickable"]),zIndex:q},m6={name:"Check Valve",key:"checkValve",Form:xe,Symbol:mp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Check Valve"),...ie}),Preview:Xu,zIndex:q},f6={name:"Orifice",key:"orifice",Form:xe,Symbol:gp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice"),...ie}),Preview:Ex,zIndex:q},h6={name:"Angled Relief Valve",key:"angledReliefValve",Form:Zt,Symbol:sm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Relief Valve"),...Yt}),Preview:at(Sx,["clickable"]),zIndex:q},g6={name:"Value",key:"value",Form:Gy,Symbol:pm,Preview:mm,defaultProps:e=>({color:e.colors.gray.l11,units:"psi",level:"h5",inlineSize:70,...Y("Value"),...ie,telem:kS.source}),zIndex:q},j6={name:"Button",key:"button",Symbol:fm,Form:Uy,Preview:hm,defaultProps:e=>({color:e.colors.primary.z,...Y("Button"),...wm,onClickDelay:0,scale:null}),zIndex:q},E6={name:"Switch",key:"switch",Symbol:jp,Form:oS,defaultProps:()=>({...Y("Switch"),...ve,scale:null}),Preview:Cx,zIndex:q},y6={name:"Vacuum Pump",key:"vacuumPump",Symbol:zd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Vacuum Pump"),...ve}),Preview:Mx,zIndex:q},S6={name:"Compressor",key:"compressor",Symbol:qd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Compressor"),...ve}),Preview:fd,zIndex:q},R6={name:"Cavity Pump",key:"cavityPump",Symbol:Bd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cavity Pump"),...ve}),Preview:_x,zIndex:q},C6={name:"Piston Pump",key:"pistonPump",Symbol:Od,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Piston Pump"),...ve}),Preview:Px,zIndex:q},w6={name:"Static Mixer",key:"staticMixer",Symbol:kp,Form:xe,defaultProps:e=>({color:e.colors.gray.l11,...Y("Static Mixer"),...ie}),Preview:Lx,zIndex:q},b6={name:"Rotary Mixer",key:"rotaryMixer",Symbol:Vd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Rotary Mixer"),...ve}),Preview:Nx,zIndex:q},v6={name:"Light",key:"light",Symbol:gm,Form:qy,defaultProps:e=>({color:e.colors.gray.l11,...Y("Light"),...Cm}),Preview:Tx,zIndex:q},k6={name:"Setpoint",key:"setpoint",Symbol:xm,Form:Qy,defaultProps:e=>({units:"mV",color:e.colors.gray.l11,size:"small",...Y("Setpoint"),...MS,..._S}),Preview:dm,zIndex:q},M6={name:"Agitator",key:"agitator",Symbol:Fd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Agitator"),...ve}),Preview:Ix,zIndex:q},_6={name:"Propeller Agitator",key:"propellerAgitator",Symbol:Hd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Propeller Agitator"),...ve}),Preview:Dx,zIndex:q},P6={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:Zd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flat Blade Agitator"),...ve}),Preview:zx,zIndex:q},L6={name:"Paddle Agitator",key:"paddleAgitator",Symbol:Wd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Paddle Agitator"),...ve}),Preview:Bx,zIndex:q},N6={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:Yd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cross Beam Agitator"),...ve}),Preview:Ox,zIndex:q},T6={name:"Helical Agitator",key:"helicalAgitator",Symbol:Gd,Form:we,defaultProps:e=>({color:e.colors.gray.l11,...Y("Helical Agitator"),...ve}),Preview:Vx,zIndex:q},$6={name:"Text Box",key:"textBox",Symbol:bx,Form:eS,defaultProps:e=>({color:e.colors.gray.l11,autoFit:!0,align:"center",...Y("Text Box"),...ie,...Zr,level:"p",text:"Text Box",width:75}),Preview:jm,zIndex:q},A6={name:"Off Page Reference",key:"offPageReference",Form:tS,Symbol:Em,defaultProps:e=>({color:e.colors.gray.l11,orientation:"right",...Y("Off Page Reference")}),Preview:ym,zIndex:q},I6={name:"ISO Check Valve",key:"isoCheckValve",Form:xe,Symbol:fp,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Check Valve"),...ie}),Preview:Uu,zIndex:q},D6={name:"Check Valve Variant",key:"checkValveWithArrow",Form:xe,Symbol:hp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Check Valve"),...ie}),Preview:Ju,zIndex:q},z6={name:"Vent",key:"vent",Form:xe,Symbol:Ep,defaultProps:e=>({color:e.colors.gray.l11,...Y("Vent"),...ie}),Preview:Hx,zIndex:q},B6={name:"T Junction",key:"tJunction",Form:xe,Symbol:bp,defaultProps:e=>({color:e.colors.gray.l11,...Y(""),...ie}),Preview:Xx,zIndex:q+20},O6={name:"Cross Junction",key:"crossJunction",Form:xe,Symbol:vp,defaultProps:e=>({color:e.colors.gray.l11,...Y(""),...ie}),Preview:Ux,zIndex:q+20},V6={name:"Flowmeter General",key:"flowmeterGeneral",Form:xe,Symbol:Mp,defaultProps:e=>({color:e.colors.gray.l11,...Y("General Flowmeter"),...ie}),Preview:Jx,zIndex:q},F6={name:"Flowmeter Electromagnetic",key:"flowmeterElectromagnetic",Form:xe,Symbol:_p,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electromagnetic Flowmeter"),...ie}),Preview:Qx,zIndex:q},H6={name:"Flowmeter Variable Area",key:"flowmeterVariableArea",Form:xe,Symbol:Pp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Variable Area Flowmeter"),...ie}),Preview:ed,zIndex:q},Z6={name:"Flowmeter Coriolis",key:"flowmeterCoriolis",Form:xe,Symbol:Lp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Coriolis Flowmeter"),...ie}),Preview:td,zIndex:q},W6={name:"Flowmeter Nozzle",key:"flowmeterNozzle",Form:xe,Symbol:Np,defaultProps:e=>({color:e.colors.gray.l11,...Y("Nozzle Flowmeter"),...ie}),Preview:nd,zIndex:q},Y6={name:"Flowmeter Venturi",key:"flowmeterVenturi",Form:xe,Symbol:Tp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Venturi Flowmeter"),...ie}),Preview:sd,zIndex:q},G6={name:"Flowmeter Ring Piston",key:"flowmeterRingPiston",Form:xe,Symbol:$p,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ring Piston Flowmeter"),...ie}),Preview:od,zIndex:q},K6={name:"Flowmeter Positive Displacement",key:"flowmeterPositiveDisplacement",Form:xe,Symbol:Ap,defaultProps:e=>({color:e.colors.gray.l11,...Y("Positive Displacement Flowmeter"),...ie}),Preview:rd,zIndex:q},q6={name:"Flowmeter Turbine",key:"flowmeterTurbine",Form:xe,Symbol:Ip,defaultProps:e=>({color:e.colors.gray.l11,...Y("Turbine Flowmeter"),...ie}),Preview:id,zIndex:q},X6={name:"Flowmeter Pulse",key:"flowmeterPulse",Form:xe,Symbol:Dp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Pulse Flowmeter"),...ie}),Preview:ld,zIndex:q},U6={name:"Flowmeter Float Sensor",key:"flowmeterFloatSensor",Form:xe,Symbol:zp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Float Sensor Flowmeter"),...ie}),Preview:cd,zIndex:q},J6={name:"Flowmeter Orifice",key:"flowmeterOrifice",Form:xe,Symbol:Bp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice Flowmeter"),...ie}),Preview:ad,zIndex:q},Q6={name:"Heat Exchanger General",key:"heatExchangerGeneral",Form:xe,Symbol:Op,defaultProps:e=>({color:e.colors.gray.l11,...Y("General Heat Exchanger"),...ie}),Preview:ud,zIndex:q},eR={name:"Heat Exchanger M",key:"heatExchangerM",Form:xe,Symbol:Vp,defaultProps:e=>({color:e.colors.gray.l11,...Y("M Heat Exchanger"),...ie}),Preview:xd,zIndex:q},tR={name:"Heat Exchanger Straight Tube",key:"heatExchangerStraightTube",Form:xe,Symbol:Fp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Straight Tube Heat Exchanger"),...ie}),Preview:dd,zIndex:q},nR={name:"Turbo Compressor",key:"turboCompressor",Form:we,Symbol:Xd,defaultProps:e=>({color:e.colors.gray.l11,...Y("Turbo Compressor"),...ve}),Preview:hd,zIndex:q},sR={name:"Roller Vane Compressor",key:"rollerVaneCompressor",Form:we,Symbol:Ud,defaultProps:e=>({color:e.colors.gray.l11,...Y("Roller Vane Compressor"),...ve}),Preview:gd,zIndex:q},oR={name:"Liquid Ring Compressor",key:"liquidRingCompressor",Form:we,Symbol:Jd,defaultProps:e=>({color:e.colors.gray.l11,...Y("Liquid Ring Compressor"),...ve}),Preview:jd,zIndex:q},rR={name:"Ejector Compressor",key:"ejectorCompressor",Form:we,Symbol:Qd,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ejector Compressor"),...ve}),Preview:Ed,zIndex:q},iR={name:"Centrifugal Compressor",key:"centrifugalCompressor",Form:we,Symbol:ep,defaultProps:e=>({color:e.colors.gray.l11,...Y("Centrifugal Compressor"),...ve}),Preview:yd,zIndex:q},lR={name:"Diaphragm Pump",key:"diaphragmPump",Form:we,Symbol:Id,defaultProps:e=>({color:e.colors.gray.l11,...Y("Diaphragm Pump"),...ve}),Preview:pd,zIndex:q},cR={name:"Ejection Pump",key:"ejectionPump",Form:we,Symbol:Dd,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ejection Pump"),...ve}),Preview:md,zIndex:q},aR={name:"Flame Arrestor",key:"flameArrestor",Form:xe,Symbol:Hp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor"),...ie}),Preview:Sd,zIndex:q},uR={name:"Flame Arrestor (Explosion-Proof)",key:"flameArrestorExplosion",Form:xe,Symbol:Zp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Explosion-Proof)"),...ie}),Preview:Cd,zIndex:q},xR={name:"Flame Arrestor (Detonation-Proof)",key:"flameArrestorDetonation",Form:xe,Symbol:Wp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Detonation-Proof)"),...ie}),Preview:Rd,zIndex:q},dR={name:"Flame Arrestor (Fire Resistant)",key:"flameArrestorFireRes",Form:xe,Symbol:Yp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Fire Resistant)"),...ie}),Preview:wd,zIndex:q},pR={name:"Flame Arrestor (Fire Resistant and Detonation-Proof)",key:"flameArrestorFireResDetonation",Form:xe,Symbol:Gp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Fire Resistant and Detonation-Proof)"),...ie}),Preview:bd,zIndex:q},mR={name:"Thruster",key:"thruster",Form:we,Symbol:Kp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Thruster"),...ve}),Preview:vd,zIndex:q},fR={name:"Nozzle",key:"nozzle",Form:xe,Symbol:qp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Nozzle"),...ie}),Preview:kd,zIndex:q},hR={name:"Strainer",key:"strainer",Form:xe,Symbol:Xp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Strainer"),...ie}),Preview:Md,zIndex:q},gR={name:"Strainer Cone",key:"strainerCone",Form:xe,Symbol:Up,defaultProps:e=>({color:e.colors.gray.l11,...Y("Strainer Cone"),...ie}),Preview:_d,zIndex:q},jR={value:g6,button:j6,tank:WS,polygon:YS,circle:GS,tJunction:B6,crossJunction:O6,switch:E6,offPageReference:A6,light:v6,setpoint:k6,box:qS,textBox:$6,valve:TS,solenoidValve:$S,threeWayValve:NS,fourWayValve:AS,angledValve:IS,ballValve:DS,threeWayBallValve:zS,gateValve:BS,butterflyValveOne:OS,butterflyValveTwo:VS,breatherValve:FS,manualValve:l6,needleValve:p6,reliefValve:XS,angledReliefValve:h6,checkValve:m6,regulator:QS,regulatorManual:e6,electricRegulator:t6,electricRegulatorMotorized:n6,springLoadedReliefValve:US,angledSpringLoadedReliefValve:JS,pump:HS,pistonPump:C6,screwPump:ZS,cavityPump:R6,diaphragmPump:lR,ejectionPump:cR,vacuumPump:y6,compressor:S6,turboCompressor:nR,rollerVaneCompressor:sR,liquidRingCompressor:oR,ejectorCompressor:rR,centrifugalCompressor:iR,staticMixer:w6,rotaryMixer:b6,burstDisc:s6,isoBurstDisc:o6,cap:r6,isoCap:i6,filter:u6,isoFilter:a6,flowStraightener:x6,heaterElement:d6,orifice:f6,orificePlate:c6,agitator:M6,propellerAgitator:_6,flatBladeAgitator:P6,paddleAgitator:L6,crossBeamAgitator:N6,helicalAgitator:T6,isoCheckValve:I6,checkValveWithArrow:D6,vent:z6,cylinder:KS,flowmeterGeneral:V6,flowmeterElectromagnetic:F6,flowmeterVariableArea:H6,flowmeterCoriolis:Z6,flowmeterNozzle:W6,flowmeterVenturi:Y6,flowmeterRingPiston:G6,flowmeterPositiveDisplacement:K6,flowmeterTurbine:q6,flowmeterPulse:X6,flowmeterFloatSensor:U6,flowmeterOrifice:J6,heatExchangerGeneral:Q6,heatExchangerM:eR,heatExchangerStraightTube:tR,flameArrestor:aR,flameArrestorExplosion:uR,flameArrestorDetonation:xR,flameArrestorFireRes:dR,flameArrestorFireResDetonation:pR,thruster:mR,nozzle:fR,strainer:hR,strainerCone:gR},ER=Object.freeze(Object.defineProperty({__proto__:null,Agitator:Fd,AngledReliefValve:sm,AngledSpringLoadedReliefValve:tm,AngledValve:$d,BallValve:sp,Box:am,BoxPreview:um,BreatherValve:om,BurstDisc:up,ButterflyValveOne:tp,ButterflyValveTwo:np,Button:fm,ButtonPreview:hm,Cap:xp,CavityPump:Bd,CentrifugalCompressor:ep,CheckValve:mp,CheckValveWithArrow:hp,Circle:cm,Compressor:qd,CrossBeamAgitator:Yd,CrossJunction:vp,Cylinder:Sm,CylinderPreview:Rm,DiaphragmPump:Id,EjectionPump:Dd,EjectorCompressor:Qd,ElectricRegulator:cp,ElectricRegulatorMotorized:ap,Filter:pp,FlameArrestor:Hp,FlameArrestorDetonation:Wp,FlameArrestorExplosion:Zp,FlameArrestorFireRes:Yp,FlameArrestorFireResDetonation:Gp,FlatBladeAgitator:Zd,FlowStraightener:Rp,FlowmeterCoriolis:Lp,FlowmeterElectromagnetic:_p,FlowmeterFloatSensor:zp,FlowmeterGeneral:Mp,FlowmeterNozzle:Np,FlowmeterOrifice:Bp,FlowmeterPositiveDisplacement:Ap,FlowmeterPulse:Dp,FlowmeterRingPiston:$p,FlowmeterTurbine:Ip,FlowmeterVariableArea:Pp,FlowmeterVenturi:Tp,FourWayValve:Td,GateValve:rp,HeatExchangerGeneral:Op,HeatExchangerM:Vp,HeatExchangerStraightTube:Fp,HeaterElement:Cp,HelicalAgitator:Gd,ISOBurstDisc:wp,ISOCap:dp,ISOCheckValve:fp,ISOFilter:Sp,Light:gm,LiquidRingCompressor:Jd,ManualValve:nm,NeedleValve:Jp,Nozzle:qp,OffPageReference:Em,OffPageReferencePreview:ym,Orifice:gp,OrificePlate:yp,PaddleAgitator:Wd,PistonPump:Od,PolygonSymbol:lm,PropellerAgitator:Hd,Pump:Ad,Regulator:ip,RegulatorManual:lp,ReliefValve:Qp,RollerVaneCompressor:Ud,RotaryMixer:Vd,SYMBOLS:jR,ScrewPump:Kd,Setpoint:xm,SetpointPreview:dm,SolenoidValve:Nd,SpringLoadedReliefValve:em,StaticMixer:kp,Strainer:Xp,StrainerCone:Up,Switch:jp,TJunction:bp,Tank:rm,TankPreview:im,TextBoxPreview:jm,ThreeWayBallValve:op,ThreeWayValve:Pd,Thruster:Kp,Triangle:wS,TurboCompressor:Xd,VacuumPump:zd,Value:pm,ValuePreview:mm,Valve:Ld,Vent:Ep,createDummyToggle:Nt,createLabeled:ce,createToggle:be,variantZ:vS},Symbol.toStringTag,{value:"Module"}));exports.useCombinedRefs=Z.useCombinedRefs;exports.useCombinedStateAndRef=Z.useCombinedStateAndRef;exports.useInitializerRef=Z.useInitializerRef;exports.usePrevious=Z.usePrevious;exports.useStateRef=Z.useStateRef;exports.useSyncedRef=Z.useSyncedRef;exports.CSS=u.CSS;exports.DataType=u.g$2;exports.Density=u.y$2;exports.MultiSeries=u.$t$1;exports.Rate=u.$$1;exports.Series=u.k;exports.TimeRange=u.A;exports.TimeSpan=u.O;exports.TimeStamp=u.m;exports.newBEM=u.newBEM;exports.Header=ss.external;exports.state=st.state;exports.Generic=_f.Generic;exports.Input=ge.external;exports.preventDefault=ge.preventDefault;exports.stopPropagation=ge.stopPropagation;exports.Aether=Q.main;exports.Worker=Q.Context;exports.useAsyncEffect=Q.useAsyncEffect;exports.useEffectCompare=Q.useEffectCompare;exports.Align=Lf.external;exports.Icon=Le.Icon;exports.Tabs=Le.external;exports.Text=El.external;exports.Divider=Ns.Divider$1;exports.Button=Nf.external;exports.Caret=In.Animated$1;exports.Tree=In.external;exports.componentRenderProp=he.componentRenderProp;exports.isRenderProp=he.isRenderProp;exports.useTransforms=Re.useTransforms;exports.telem=z.external;exports.Haul=me.Haul;exports.compareArrayDeps=Ne.compareArrayDeps;exports.useMemoCompare=Ne.useMemoCompare;exports.useMemoDeepEqualProps=Ne.useMemoDeepEqualProps;exports.useMemoPrimitiveArray=Ne.useMemoPrimitiveArray;exports.Dialog=Ge.use$1;exports.Dropdown=Ge.Dropdown;exports.Modal=Ge.Modal;exports.useResize=Ge.useResize;exports.Color=Ke.external;exports.Triggers=yl.external;exports.List=Mt.external;exports.createFilterTransform=Mt.createFilterTransform;exports.fuseFilter=Mt.fuseFilter;exports.proxyMemo=Mt.proxyMemo;exports.createHexOpacityVariants=Rl.createHexOpacityVariants;exports.unitProperty=Rl.unitProperty;exports.useClickOutside=$f.useClickOutside;exports.useDebouncedCallback=Qo.useDebouncedCallback;exports.Menu=Af.external;exports.Theming=If.external;exports.Video=Df.Video;exports.Accordion=th;exports.Breadcrumb=oh;exports.Canvas=_h;exports.Channel=I1;exports.Control=Hg;exports.Device=eg;exports.Diagram=zy;exports.Eraser=ah;exports.Form=U1;exports.Label=ag;exports.Legend=Ah;exports.Line=Dh;exports.LinePlot=S1;exports.Log=Oy;exports.Measure=b1;exports.Mosaic=vg;exports.Nav=dh;exports.Note=Mg;exports.OS=Tg;exports.Observe=q1;exports.Override=Ag;exports.Performance=Fy;exports.Pluto=Gg;exports.Portal=jg;exports.Progress=qg;exports.Rack=sg;exports.Range=C1;exports.Ranger=n0;exports.Resize=Gf;exports.Rule=v1;exports.Schematic=ER;exports.Select=i1;exports.Status=lh;exports.Steps=o0;exports.Synnax=fh;exports.Table=a0;exports.TableCells=k0;exports.Tag=e1;exports.Telem=zg;exports.Tooltip=Bf;exports.Value=p0;exports.Viewport=E1;exports.axis=bh;exports.control=Bg;exports.useDelayedState=zf;
|