@synnaxlabs/pluto 0.44.7 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-DdcRuSba.js → Animated-B9bcEALW.js} +2 -2
- package/dist/Animated-EQN_Zecr.cjs +1 -0
- package/dist/{LinePlot-BIZ1E3Rb.js → LinePlot-82qQ7-BC.js} +890 -850
- package/dist/LinePlot-Do2q5AyX.cjs +53 -0
- package/dist/Toggle-BKrbt8lh.cjs +1 -0
- package/dist/{Toggle-DfINNQZ3.js → Toggle-BNABJ5M2.js} +2 -2
- package/dist/{Video-CMuBiBcp.js → Video-B4UWip-3.js} +1 -1
- package/dist/{Video-CbaEeyGH.cjs → Video-CgaO8bTm.cjs} +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-BlHGoCgb.js → css-BUXMI9PB.js} +1082 -990
- package/dist/css-CmXY6iPo.cjs +8 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/eraser-C1jjA5cv.cjs +63 -0
- package/dist/{eraser-BstNvEkO.js → eraser-DXDDmPgV.js} +3097 -2742
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +9 -9
- package/dist/external-5DC2xiKR.cjs +1 -0
- package/dist/{external-ClD0dLdB.js → external-65blLb4-.js} +2 -2
- package/dist/external-B8KPEzPt.cjs +1 -0
- package/dist/external-BEkAplsH.cjs +1 -0
- package/dist/external-BIykXq97.cjs +1 -0
- package/dist/{external-GS2AbOOd.js → external-BKOEKFd7.js} +3 -3
- package/dist/{external-V3Tbt95R.js → external-BOvnkwzO.js} +4 -4
- package/dist/{external-J5kFGShS.js → external-BSeWLcfY.js} +5 -4
- package/dist/external-Bqmws2bv.cjs +1 -0
- package/dist/external-CFsDBQGs.cjs +1 -0
- package/dist/{external-CsZA1s33.js → external-CGX7u75x.js} +2 -2
- package/dist/external-CJKfUQ-9.cjs +1 -0
- package/dist/{external-DkZwoQZk.js → external-CPW2TrSs.js} +43 -45
- package/dist/external-CijGOPm7.cjs +1 -0
- package/dist/external-DCQ725nK.cjs +1 -0
- package/dist/{external-CtRU4mkG.js → external-DLo-151g.js} +13 -10
- package/dist/external-DTLy0px_.js +380 -0
- package/dist/external-DWfn7Yhk.cjs +1 -0
- package/dist/external-DcNW5o-8.cjs +1 -0
- package/dist/{external-FrSPoRvt.js → external-Gh_0tAJ0.js} +2 -2
- package/dist/external-J1Ji-Eku.js +92 -0
- package/dist/{external-Ds3Wz9sk.js → external-SQa3Pr0s.js} +3 -3
- package/dist/external-W69NXl-R.js +84 -0
- package/dist/{external-BNwo0Mju.js → external-_ninRYLQ.js} +3 -3
- package/dist/{external-DSkHe-2Y.cjs → external-kaUzEm1U.cjs} +2 -2
- package/dist/external-mOr1FzAd.cjs +1 -0
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +1 -1
- package/dist/{fontString-Cp4X6CqQ.cjs → fontString-4EFXWlQp.cjs} +1 -1
- package/dist/{fontString-Ca1-oixk.js → fontString-D_jEa-uI.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +14308 -13556
- 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/main-2qH2bggR.cjs +92 -0
- package/dist/{Editable-BrtvNf66.js → main-jKCzbrWn.js} +8859 -8684
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/src/button/Button.d.ts +3 -2
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/color/BaseSwatch.d.ts.map +1 -1
- package/dist/src/dialog/Frame.d.ts.map +1 -1
- package/dist/src/dialog/position.d.ts.map +1 -1
- package/dist/src/flex/Box.d.ts +4 -4
- package/dist/src/flux/core/store.d.ts +38 -27
- package/dist/src/flux/core/store.d.ts.map +1 -1
- package/dist/src/flux/form.d.ts.map +1 -1
- package/dist/src/flux/form.spec.d.ts.map +1 -1
- package/dist/src/flux/list.d.ts +3 -1
- package/dist/src/flux/list.d.ts.map +1 -1
- package/dist/src/flux/list.spec.d.ts.map +1 -1
- package/dist/src/flux/result.spec.d.ts.map +1 -1
- package/dist/src/flux/retrieve.spec.d.ts.map +1 -1
- package/dist/src/flux/update.d.ts +3 -5
- package/dist/src/flux/update.d.ts.map +1 -1
- package/dist/src/flux/update.spec.d.ts.map +1 -1
- package/dist/src/form/Context.d.ts +1 -0
- package/dist/src/form/Context.d.ts.map +1 -1
- package/dist/src/form/state.d.ts +5 -1
- package/dist/src/form/state.d.ts.map +1 -1
- package/dist/src/form/use.d.ts.map +1 -1
- package/dist/src/form/useField.d.ts +3 -2
- package/dist/src/form/useField.d.ts.map +1 -1
- package/dist/src/generic/Generic.d.ts.map +1 -1
- package/dist/src/group/queries.d.ts +4 -3
- package/dist/src/group/queries.d.ts.map +1 -1
- package/dist/src/hardware/task/queries.d.ts +2 -1
- package/dist/src/hardware/task/queries.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts +2 -1
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useCursorDrag.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebKit.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebView.d.ts.map +1 -1
- package/dist/src/icon/Fitting.d.ts +2 -0
- package/dist/src/icon/Fitting.d.ts.map +1 -0
- package/dist/src/icon/LabJack.d.ts +3 -0
- package/dist/src/icon/LabJack.d.ts.map +1 -0
- package/dist/src/icon/NI.d.ts +2 -0
- package/dist/src/icon/NI.d.ts.map +1 -0
- package/dist/src/icon/OPC.d.ts +2 -0
- package/dist/src/icon/OPC.d.ts.map +1 -0
- package/dist/src/icon/Process.d.ts +2 -0
- package/dist/src/icon/Process.d.ts.map +1 -0
- package/dist/src/icon/Pump.d.ts +2 -0
- package/dist/src/icon/Pump.d.ts.map +1 -0
- package/dist/src/icon/Tank.d.ts +2 -0
- package/dist/src/icon/Tank.d.ts.map +1 -0
- package/dist/src/icon/Valve.d.ts +2 -0
- package/dist/src/icon/Valve.d.ts.map +1 -0
- package/dist/src/icon/external.d.ts +5 -0
- package/dist/src/icon/external.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts +8 -2
- package/dist/src/icon/registry.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/DateTime.d.ts.map +1 -1
- package/dist/src/input/HelpText.d.ts.map +1 -1
- package/dist/src/label/queries.d.ts +1 -1
- package/dist/src/label/queries.d.ts.map +1 -1
- package/dist/src/list/Frame.d.ts.map +1 -1
- package/dist/src/list/Items.d.ts +1 -1
- package/dist/src/list/Items.d.ts.map +1 -1
- package/dist/src/list/external.d.ts +1 -0
- package/dist/src/list/external.d.ts.map +1 -1
- package/dist/src/list/pager.spec.d.ts.map +1 -1
- package/dist/src/list/useCombinedData.d.ts +8 -0
- package/dist/src/list/useCombinedData.d.ts.map +1 -0
- package/dist/src/list/useCombinedData.spec.d.ts +2 -0
- package/dist/src/list/useCombinedData.spec.d.ts.map +1 -0
- package/dist/src/mosaic/use.d.ts.map +1 -1
- package/dist/src/ontology/queries.d.ts +2 -2
- package/dist/src/pluto/Pluto.d.ts +2 -0
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/ranger/queries.d.ts +3 -2
- package/dist/src/ranger/queries.d.ts.map +1 -1
- package/dist/src/schematic/external.d.ts +3 -0
- package/dist/src/schematic/external.d.ts.map +1 -0
- package/dist/src/schematic/index.d.ts.map +1 -0
- package/dist/src/schematic/symbol/Custom.d.ts +15 -0
- package/dist/src/schematic/symbol/Custom.d.ts.map +1 -0
- package/dist/src/schematic/symbol/Custom.spec.d.ts +2 -0
- package/dist/src/schematic/symbol/Custom.spec.d.ts.map +1 -0
- package/dist/src/{vis/schematic → schematic/symbol}/Forms.d.ts +7 -5
- package/dist/src/schematic/symbol/Forms.d.ts.map +1 -0
- package/dist/src/schematic/symbol/Grid.d.ts.map +1 -0
- package/dist/src/{vis/schematic/primitives → schematic/symbol}/Primitives.d.ts +18 -7
- package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -0
- package/dist/src/schematic/symbol/SelectOrientation.d.ts.map +1 -0
- package/dist/src/{vis/schematic → schematic/symbol}/Symbols.d.ts +18 -8
- package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -0
- package/dist/src/schematic/symbol/external.d.ts +6 -0
- package/dist/src/schematic/symbol/external.d.ts.map +1 -0
- package/dist/src/schematic/symbol/extractRegions.d.ts +3 -0
- package/dist/src/schematic/symbol/extractRegions.d.ts.map +1 -0
- package/dist/src/schematic/symbol/extractRegions.spec.d.ts +2 -0
- package/dist/src/schematic/symbol/extractRegions.spec.d.ts.map +1 -0
- package/dist/src/schematic/symbol/index.d.ts +2 -0
- package/dist/src/schematic/symbol/index.d.ts.map +1 -0
- package/dist/src/schematic/symbol/queries.d.ts +179 -0
- package/dist/src/schematic/symbol/queries.d.ts.map +1 -0
- package/dist/src/schematic/symbol/queries.spec.d.ts +2 -0
- package/dist/src/schematic/symbol/queries.spec.d.ts.map +1 -0
- package/dist/src/{vis/schematic → schematic/symbol}/registry.d.ts +15 -6
- package/dist/src/schematic/symbol/registry.d.ts.map +1 -0
- package/dist/src/select/use.d.ts.map +1 -1
- package/dist/src/showcase/InputShowcase.d.ts +3 -0
- package/dist/src/showcase/InputShowcase.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts +2 -2
- package/dist/src/table/aether/Table.d.ts +4 -0
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts +7 -1
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/registry.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts +3 -2
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +2 -2
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +2 -2
- package/dist/src/telem/control/aether/controller.d.ts +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +7 -7
- package/dist/src/telem/control/aether/legend.d.ts +2 -2
- package/dist/src/telem/control/aether/state.d.ts +1 -1
- package/dist/src/theming/Provider.d.ts +2 -1
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +129 -129
- package/dist/src/theming/core/theme.d.ts +131 -131
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/triggers/Text.d.ts.map +1 -1
- package/dist/src/triggers/hooks.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +11 -11
- package/dist/src/vis/axis/axis.d.ts +2 -2
- package/dist/src/vis/diagram/aether/Diagram.d.ts +4 -0
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/legend/Grouped.d.ts.map +1 -1
- package/dist/src/vis/line/Line.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +1 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +4 -4
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +4 -4
- package/dist/src/vis/lineplot/aether/axis.d.ts +2 -2
- package/dist/src/vis/lineplot/range/Annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +4 -4
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +8 -8
- package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts +3 -3
- package/dist/src/vis/measure/aether/measure.d.ts +8 -8
- package/dist/src/vis/rule/aether/aether.d.ts +2 -2
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +3 -3
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/setpoint/use.d.ts +2 -2
- package/dist/src/vis/setpoint/use.d.ts.map +1 -1
- package/dist/src/vis/value/RedlineForm.d.ts.map +1 -1
- package/dist/src/vis/value/TelemForm.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +23 -3
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts +8 -2
- package/dist/src/vis/value/use.d.ts.map +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/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-D8blpqyN.js → units-BPvO622s.js} +3 -3
- package/dist/units-DkdMPsxa.cjs +1 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +6 -6
- package/dist/Animated-D5LYKEkW.cjs +0 -1
- package/dist/Editable-7Abx7gK5.cjs +0 -92
- package/dist/LinePlot-DslwDvAo.cjs +0 -53
- package/dist/Toggle-BVFmU1mL.cjs +0 -1
- package/dist/css-CZ_XGkIB.cjs +0 -8
- package/dist/eraser-DiJNbabo.cjs +0 -63
- package/dist/external-B33LW5pz.cjs +0 -1
- package/dist/external-C3hm9xgd.cjs +0 -1
- package/dist/external-CE5Gf1U4.cjs +0 -1
- package/dist/external-CSkXMvdW.js +0 -82
- package/dist/external-C_25EtbW.js +0 -374
- package/dist/external-CoEPLcYb.js +0 -69
- package/dist/external-CoVeaXHg.cjs +0 -1
- package/dist/external-Cs-XdMNw.cjs +0 -1
- package/dist/external-D-FHwqls.cjs +0 -1
- package/dist/external-D91gCQ3U.cjs +0 -1
- package/dist/external-DE-uFhwW.cjs +0 -1
- package/dist/external-DXm6LsSg.cjs +0 -1
- package/dist/external-IBErJ3kF.cjs +0 -1
- package/dist/external-mX8u0eSb.cjs +0 -1
- package/dist/external-vdf1a_j1.cjs +0 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +0 -1
- package/dist/src/vis/schematic/Grid.d.ts.map +0 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts.map +0 -1
- package/dist/src/vis/schematic/Symbols.d.ts.map +0 -1
- package/dist/src/vis/schematic/external.d.ts +0 -4
- package/dist/src/vis/schematic/external.d.ts.map +0 -1
- package/dist/src/vis/schematic/index.d.ts.map +0 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +0 -1
- package/dist/src/vis/schematic/primitives/index.d.ts +0 -2
- package/dist/src/vis/schematic/primitives/index.d.ts.map +0 -1
- package/dist/src/vis/schematic/registry.d.ts.map +0 -1
- package/dist/units-Cqxg-SBx.cjs +0 -1
- /package/dist/src/{vis/schematic → schematic}/index.d.ts +0 -0
- /package/dist/src/{vis/schematic → schematic/symbol}/Grid.d.ts +0 -0
- /package/dist/src/{vis/schematic → schematic/symbol}/SelectOrientation.d.ts +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./Editable-7Abx7gK5.cjs"),o=require("./jsx-runtime-CITbqOLs.cjs"),j=require("react"),u=require("./css-CZ_XGkIB.cjs"),P=require("./eraser-DiJNbabo.cjs"),qh=require("./external-DE-uFhwW.cjs"),$l=require("./Animated-D5LYKEkW.cjs"),zl=require("react-dom"),O=require("./LinePlot-DslwDvAo.cjs"),ks=require("./external-CoVeaXHg.cjs"),te=require("zod"),Pe=require("./external-DSkHe-2Y.cjs"),Vl=require("./external-D91gCQ3U.cjs"),nt=require("./external-mX8u0eSb.cjs"),Fl=require("./external-CE5Gf1U4.cjs"),Ie=require("./external-C3hm9xgd.cjs"),pe=require("./external-DXm6LsSg.cjs"),Hl=require("./units-Cqxg-SBx.cjs"),Qh=require("./external-B33LW5pz.cjs"),Jh=require("./external-D-FHwqls.cjs"),Me=require("./external-Cs-XdMNw.cjs"),eg=require("./external-IBErJ3kF.cjs"),tg=require("./external-vdf1a_j1.cjs"),ng=require("./Video-CbaEeyGH.cjs"),Zl=require("./Toggle-BVFmU1mL.cjs"),sg=e=>e.nullable().transform(t=>t===null?void 0:t).optional(),og=e=>te.array(e).or(e.transform(t=>[t])),Kl=e=>P.p(e,(t,n,s)=>{const r=n===s.length-1,i=!isNaN(parseInt(t)),l=!isNaN(parseInt(s[n+1]));return i&&(t="element"),r||l?t:[t,"shape"]}),fi=(e,t)=>{if(e==null)return null;const n=e[t];return n==null&&typeof e=="object"&&"sourceType"in e?e.sourceType()[t]:n},rg=(e,t,n)=>t===""?e:P.c(fi(e,"shape"),Kl(t),{...n,getter:fi}),ig=Object.freeze(Object.defineProperty({__proto__:null,getFieldSchema:rg,getFieldSchemaPath:Kl,nullToUndefined:sg,toArray:og},Symbol.toStringTag,{value:"Module"})),Yl=Symbol(),qo=Symbol(),xn="a",os="w";let lg=(e,t)=>new Proxy(e,t);const Co=Object.getPrototypeOf,hi=new WeakMap,Qo=e=>e&&(hi.has(e)?hi.get(e):Co(e)===Object.prototype||Co(e)===Array.prototype),gi=e=>typeof e=="object"&&e!==null,ji=new WeakMap,Gl=e=>e[qo]||e,Ul=(e,t,n)=>{if(!Qo(e))return e;const s=Gl(e),r=(l=>Object.isFrozen(l)||Object.values(Object.getOwnPropertyDescriptors(l)).some(a=>!a.writable))(s);let i=n&&n.get(s);return i&&i[1].f===r||(i=((l,a)=>{const c={f:a};let d=!1;const x=(m,h)=>{if(!d){let g=c[xn].get(l);if(g||(g={},c[xn].set(l,g)),m===os)g[os]=!0;else{let E=g[m];E||(E=new Set,g[m]=E),E.add(h)}}},p={get:(m,h)=>h===qo?l:(x("k",h),Ul(Reflect.get(m,h),c[xn],c.c)),has:(m,h)=>h===Yl?(d=!0,c[xn].delete(l),!0):(x("h",h),Reflect.has(m,h)),getOwnPropertyDescriptor:(m,h)=>(x("o",h),Reflect.getOwnPropertyDescriptor(m,h)),ownKeys:m=>(x(os),Reflect.ownKeys(m))};return a&&(p.set=p.deleteProperty=()=>!1),[p,c]})(s,r),i[1].p=lg(r?(l=>{let a=ji.get(l);if(!a){if(Array.isArray(l))a=Array.from(l);else{const c=Object.getOwnPropertyDescriptors(l);Object.values(c).forEach(d=>{d.configurable=!0}),a=Object.create(Co(l),c)}ji.set(l,a)}return a})(s):s,i[0]),n&&n.set(s,i)),i[1][xn]=t,i[1].c=n,i[1].p},Wl=(e,t,n,s)=>{if(Object.is(e,t))return!1;if(!gi(e)||!gi(t))return!0;const r=n.get(Gl(e));if(!r)return!0;if(s){const l=s.get(e);if(l&&l.n===t)return l.g;s.set(e,{n:t,g:!1})}let i=null;try{for(const l of r.h||[])if(i=Reflect.has(e,l)!==Reflect.has(t,l),i)return i;if(r[os]===!0){if(i=((l,a)=>{const c=Reflect.ownKeys(l),d=Reflect.ownKeys(a);return c.length!==d.length||c.some((x,p)=>x!==d[p])})(e,t),i)return i}else for(const l of r.o||[])if(i=!!Reflect.getOwnPropertyDescriptor(e,l)!=!!Reflect.getOwnPropertyDescriptor(t,l),i)return i;for(const l of r.k||[])if(i=Wl(e[l],t[l],n,s),i)return i;return i===null&&(i=!0),i}finally{s&&s.set(e,{n:t,g:i})}},ag=e=>!!Qo(e)&&Yl in e,Xl=e=>Qo(e)&&e[qo]||null,cg="h",ug="w",dg="o",xg="k",wo=e=>typeof e=="object"&&e!==null,ql=(e,t)=>{if(!wo(e))return e;const n=Xl(e);return n!==null?(ag(e),n):(t.has(e)||(t.add(e),Object.entries(e).forEach(([s,r])=>{const i=ql(r,t);Object.is(i,r)||(e[s]=i)})),e)},bo=(e,t,n)=>{var s,r,i;if(!wo(e)||!wo(t))return;const l=n.get(Xl(t)||t);l&&((s=l[cg])==null||s.forEach(a=>{Reflect.has(e,a)}),l[ug]===!0&&Reflect.ownKeys(e),(r=l[dg])==null||r.forEach(a=>{Reflect.getOwnPropertyDescriptor(e,a)}),(i=l[xg])==null||i.forEach(a=>{bo(e[a],t[a],n)}))},to="o",no="r",so="a";function pg(e,t){var n;let s=0;const r=(n=t?.size)!=null?n:1,i=[],l=t!=null&&t.noWeakMap?null:new WeakMap;return c=>{const d=l?.get(c);if(d)return d[no];for(let g=0;g<r;g+=1){const E=i[(s+g)%r];if(!E)break;if(!Wl(E[to],c,E[so],new WeakMap))return bo(c,E[to],E[so]),l?.set(c,E),E[no]}const x=new WeakMap,p=Ul(c,x),m=ql(e(p),new Set);bo(c,c,x);const h={[to]:c,[no]:m,[so]:x};return s=(s-1+r)%r,i[s]=h,l?.set(c,h),m}}const mg=(e,t)=>u.S.RUNTIME==="browser"?pg(e,t):e,It=(e,t)=>{j.useEffect(()=>{const n=new AbortController,s=n.signal,i=(async()=>(await u.dr(),await e(s)))().catch(console.error);return()=>{n.abort(),i.then(l=>l?.()).catch(console.error)}},t)},Ls=()=>{const e=j.useRef([]),t=j.useMemo(()=>({cleanup:()=>{e.current.forEach(n=>n()),e.current=[]},set:n=>{n!=null&&e.current.push(...P.t.toArray(n))}}),[]);return j.useEffect(()=>t.cleanup,[t.cleanup]),t},fg=Object.freeze(Object.defineProperty({__proto__:null,Access:f.Access,Acquire:f.Acquire,Add:f.Add,Align:f.Align,Analyze:f.Analyze,Annotate:f.Annotate,Array:f.Array,Arrow:f.Arrow,Attachment:f.Attachment,Auto:f.Auto,AutoFitWidth:f.AutoFitWidth,Binary:f.Binary,Bolt:f.Bolt,Box:f.Box$1,Bridge:f.Bridge,CSV:f.CSV,Calculation:f.Calculation,Calendar:f.Calendar$1,Caret:f.Caret,Channel:f.Channel,Check:f.Check,Circle:f.Circle,Click:f.Click,Close:f.Close,Cluster:f.Cluster,Commit:f.Commit,Concepts:f.Concepts,Connect:f.Connect,Constant:f.Constant,Control:f.Control,Copy:f.Copy,Decimal:f.Decimal,Delete:f.Delete,Details:f.Details,Device:f.Device,Disable:f.Disable,Disconnect:f.Disconnect,Download:f.Download,Downsample:f.Downsample,Drag:f.Drag,Dynamic:f.Dynamic,Edit:f.Edit,EditOff:f.EditOff,Enable:f.Enable,Expand:f.Expand,Explore:f.Explore,Export:f.Export,Feedback:f.Feedback,Filter:f.Filter,Focus:f.Focus,Function:f.Function,Group:f.Group,Guide:f.Guide,Hardware:f.Hardware,Heart:f.Heart,Hidden:f.Hidden,Import:f.Import,Index:f.Index,Info:f.Info,JSON:f.JSON,Keyboard:f.Keyboard,Label:f.Label,LinePlot:f.LinePlot,Linear:f.Linear,Link:f.Link,LinkExternal:f.LinkExternal,Loading:f.Loading,Log:f.Log,Logo:f.Logo,Map:f.Map,Menu:f.Menu$1,MoveToMainWindow:f.MoveToMainWindow,NPM:f.NPM,Node:f.Node,None:f.None,OpenExternal:f.OpenExternal,OpenInNewWindow:f.OpenInNewWindow,PNPM:f.PNPM,Pan:f.Pan,Pause:f.Pause,Play:f.Play,Python:f.Python,QuestionMark:f.QuestionMark,Rack:f.Rack,Range:f.Range,Reference:f.Reference,Refresh:f.Refresh,Release:f.Release,Rename:f.Rename,Resources:f.Resources,Rotate:f.Rotate,Rule:f.Rule,Save:f.Save,Schematic:f.Schematic,Search:f.Search,Selection:f.Selection,Settings:f.Settings,Snapshot:f.Snapshot,Snooze:f.Snooze,Sound:f.Sound,SplitX:f.SplitX,SplitY:f.SplitY,StarFilled:f.StarFilled,StarOutlined:f.StarOutlined,String:f.String,StrokeWidth:f.StrokeWidth,Subtract:f.Subtract,Sync:f.Sync,Table:f.Table,Tare:f.Tare,Task:f.Task,Terminal:f.Terminal,Text:f.Text$3,TextAlign:f.TextAlign,Time:f.Time$1,Tooltip:f.Tooltip,Type:f.Type,TypeScript:f.TypeScript,Units:f.Units,User:f.User,Value:f.Value,Variable:f.Variable,Virtual:f.Virtual,Visible:f.Visible,Visualize:f.Visualize,Warning:f.Warning,Wave:f.Wave,Workspace:f.Workspace,Yarn:f.Yarn,Zoom:f.Zoom,createComposite:f.createComposite,resolve:f.resolve,wrapSVGIcon:f.wrapSVGIcon},Symbol.toStringTag,{value:"Module"})),hg=Object.freeze(Object.defineProperty({__proto__:null,Config:f.Config,Dialog:f.Dialog$1,chooseLocation:f.chooseLocation,formatTip:f.formatTip,useConfig:f.useConfig,wrap:f.wrap},Symbol.toStringTag,{value:"Module"})),Jo=({ref:e,location:t,style:n,size:s,className:r,children:i,onDragStart:l,sizeUnits:a="px",showHandle:c=!0,...d})=>{const x=u.K$1.construct(t),p=u.K$1.direction(x),m=u.p.dimension(p);return o.jsxRuntimeExports.jsxs(f.Box,{className:u.CSS(u.CSS.B("resize"),u.CSS.loc(x),r),style:{[m]:`${s}${a}`,...n},ref:e,direction:p,empty:!0,...d,children:[i,c&&o.jsxRuntimeExports.jsx("div",{draggable:!0,className:u.CSS(u.CSS.BE("resize","handle"),u.CSS.bordered(u.K$1.swap(x))),onDragStart:l,onDrag:f.preventDefault,onDragEnd:f.preventDefault})]})},Ql=({onResize:e,count:t,initialSizes:n=[],minSize:s=100,direction:r="x"})=>{const i=j.useRef(null),[l,a]=j.useState({sizeDistribution:gg(n,t),root:null}),c=j.useCallback((p,m,h)=>{if(i.current==null)return;const g=u.Ho.dim(u.Ho.construct(i.current),r);a(E=>ro(E,g,p,s,m,h))},[s,a,r]);j.useEffect(()=>e?.(l.sizeDistribution),[l.sizeDistribution,e]);const d=j.useCallback((p,m)=>{p.preventDefault();const h=r==="x"?"clientX":"clientY",g=S=>c(m,S[h]),E=()=>{a(S=>({...S,root:null})),document.removeEventListener("mousemove",g)};a(S=>({...S,root:p[h]})),document.addEventListener("mousemove",g),document.addEventListener("mouseup",E,{once:!0})},[a,r,ro]);return{setSize:j.useCallback((p,m)=>c(p,void 0,m),[ro]),props:{direction:r,sizeDistribution:l.sizeDistribution,onDragHandle:d,ref:i}}},Jl=({ref:e,direction:t="x",children:n,sizeDistribution:s,onDragHandle:r,className:i,...l})=>{const a=u.p.construct(t),c=j.Children.toArray(n);return s=jg(s),o.jsxRuntimeExports.jsx(f.Box,{...l,ref:e,direction:a,className:u.CSS(u.CSS.B("resize-multiple"),i),empty:!0,grow:!0,children:c.map((d,x)=>o.jsxRuntimeExports.jsx(Jo,{onDragStart:p=>r(p,x),location:u.p.location(a),size:s[x]*100,sizeUnits:"%",showHandle:x!==c.length-1,children:d},x))})},gg=(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)},oo=.001,jg=e=>e.every(t=>u.or.closeTo(t,1/e.length),oo)?e.map((t,n)=>n%2===0?t+oo:n===e.length-1?t:t-oo):e,ro=(e,t,n,s,r,i)=>{const l=ea(e,t,n,r,i),[a,c]=Eg(e.sizeDistribution,n,l,s/t),d=c?r??null:e.root;return{...e,sizeDistribution:a,root:d}},ea=(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},Eg=(e,t,n,s)=>{let r=t;for(;r>0&&e[r]+n<=s;)r--;const i=e[r]+n,l=yg(r,e,s,n),a=e[l]-n;return i<s||a<s?[e,!1]:[e.map((c,d)=>d===r?i:d===l?a:c),!0]},yg=(e,t,n,s)=>(e===t.length-1?Rg:Sg)(e,t,n,s),Sg=(e,t,n,s)=>{let r=e+1;for(;r<t.length-1&&t[r]-s<=n;)r++;return r},Rg=(e,t,n,s)=>{let r=e-1;for(;r>0&&t[r]-s<=n;)r--;return r},io=2,Cg=100,ta=({onCollapse:e,onResize:t,location:n="left",minSize:s,maxSize:r,initialSize:i=200,collapseThreshold:l=1/0,className:a,...c})=>{const[d,x]=j.useState(u.R(i,s,r)),p=j.useRef(null),m=u.K$1.construct(n),h=j.useCallback(y=>{if(p.current===null)return 0;const C=u.Ho.dim(y,u.K$1.direction(m),!0)*(1-2*Number(["bottom","right"].includes(m))),_=p.current+C,M=u.R(_,s,r);return(M-_)/(s??Cg)>l?io:M},[m,s,r,l]),g=j.useRef(null),E=j.useCallback(y=>{const C=h(y);x(C),g.current!=null&&t?.(C,u.Ho.construct(g.current))},[t,h]),S=j.useCallback(()=>x(y=>(p.current=y,y)),[x]),R=j.useCallback(y=>h(y)===io&&e?.(),[e,h]);j.useEffect(()=>{s==null||r==null||x(y=>{const C=u.R(y,s,r);return p.current=C,C})},[s,r]);const v=Pe.useCursorDrag({onMove:E,onStart:S,onEnd:R});return o.jsxRuntimeExports.jsx(Jo,{ref:g,location:m,size:d,onDragStart:v,className:u.clsx(a,u.CSS.expanded(d!==io)),...c})},wg=Object.freeze(Object.defineProperty({__proto__:null,Core:Jo,Multiple:Jl,Single:ta,calculateDiffPercentage:ea,useMultiple:Ql},Symbol.toStringTag,{value:"Module"})),er=({aetherKey:e,enabled:t=!0})=>{const{setState:n}=f.useLifecycle({aetherKey:e,type:P.Eraser.TYPE,schema:P.eraserStateZ,initialState:{region:u.Ho.ZERO,enabled:t}}),s=f.useSyncedRef(t);return{erase:j.useCallback(i=>{n({enabled:s.current,region:i})},[n,s])}},bg=({aetherKey:e,children:t})=>{const{erase:n}=er({aetherKey:e}),s=f.useResize(n);return o.jsxRuntimeExports.jsx("div",{ref:s,className:u.CSS(u.CSS.inheritDims()),children:t})},vg=Object.freeze(Object.defineProperty({__proto__:null,Eraser:bg,use:er},Symbol.toStringTag,{value:"Module"})),_g=({items:e,initialKey:t})=>{const[n,s]=j.useState(t),r=l=>s(l===n?void 0:l),i=e.find(l=>l.key===n);return{onSelect:r,activeItem:i}},kg=({activeItem:e,children:t,onSelect:n,location:s="left",collapseThreshold:r=.65,className:i,onResize:l,onCollapse:a,eraseEnabled:c,...d})=>{const x=u.K$1.direction(s);c??=e!=null;const p=j.useCallback(()=>{a?a():e!=null&&n?.(e.key)},[n,e?.key,a]),{erase:m}=er({enabled:c}),h=j.useCallback((v,y)=>{l?.(v,y),m(y)},[l,m]),{content:g,minSize:E,maxSize:S,initialSize:R=0}=e??{};return o.jsxRuntimeExports.jsx(ta,{className:u.CSS(u.CSS.B("nav-drawer"),u.CSS.dir(x),u.CSS.visible(e!=null),i),collapseThreshold:r,onCollapse:p,location:s,onResize:h,minSize:E,maxSize:S,initialSize:R,...d,children:g})},Lg=Object.freeze(Object.defineProperty({__proto__:null,Bar:f.Bar,Drawer:kg,useDrawer:_g},Symbol.toStringTag,{value:"Module"})),tr={info:"var(--pluto-text-color)",error:"var(--pluto-error-z)",warning:"var(--pluto-warning-m1)",success:"var(--pluto-primary-z)",loading:"var(--pluto-text-color)",disabled:"var(--pluto-gray-l8)"},nr=({variant:e,...t})=>e==="loading"?o.jsxRuntimeExports.jsx(f.Loading,{...t}):o.jsxRuntimeExports.jsx(f.Circle,{color:e!=null?tr[e]:void 0,...t}),Mg=({action:e})=>j.isValidElement(e)?e:j.createElement(f.Button,{...e,key:e.key,size:"tiny"}),Ng=({status:{key:e,time:t,count:n,message:s,description:r,variant:i},silence:l,actions:a,className:c,children:d,...x})=>{const p=j.useRef(null);return o.jsxRuntimeExports.jsxs(f.Box,{className:u.CSS(u.CSS.B("notification"),c),y:!0,empty:!0,ref:p,...x,children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,justify:"between",grow:!0,style:{width:"100%"},children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",gap:"small",children:[o.jsxRuntimeExports.jsx(nr,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:`x${n}`}),o.jsxRuntimeExports.jsx(f.DateTime,{className:u.CSS(u.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>l(e),children:o.jsxRuntimeExports.jsx(f.Close,{})})]}),o.jsxRuntimeExports.jsxs(f.Box,{y:!0,align:"start",className:u.CSS(u.CSS.BE("notification","content")),gap:"small",children:[d??o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.BE("notification","message")),style:{flexGrow:1},children:s}),r!=null&&o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:r})]}),a!=null&&o.jsxRuntimeExports.jsx(f.Box,{x:!0,align:"center",justify:"end",className:u.CSS(u.CSS.BE("notification","actions")),children:P.t.toArray(a).map(m=>o.jsxRuntimeExports.jsx(Mg,{action:m},m.key))})]},t.toString())},Pg=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:f.Aggregator,Indicator:nr,Notification:Ng,Summary:f.Summary,VARIANT_COLORS:tr,useAdder:f.useAdder,useAsyncErrorHandler:f.useAsyncErrorHandler,useErrorHandler:f.useErrorHandler,useNotifications:f.useNotifications},Symbol.toStringTag,{value:"Module"})),na=e=>e==="preview"?"connected":e,sa=e=>e==="preview"?"preview":void 0,Ms=({resourceName:e,value:t,onChange:n,data:s,getItem:r,subscribe:i,haulType:l,icon:a,disabled:c,onSearch:d,emptyContent:x,status:p,onFetchMore:m,children:h,renderTag:g,actions:E,allowNone:S,replaceOnSingle:R,triggerProps:v,virtual:y=!0,dialogProps:C,variant:_="connected",...M})=>o.jsxRuntimeExports.jsx(f.Frame,{variant:na(_),...M,children:o.jsxRuntimeExports.jsxs(f.Frame$1,{multiple:!0,value:t,onChange:n,data:s,getItem:r,subscribe:i,onFetchMore:m,allowNone:S,replaceOnSingle:R,virtual:y,children:[o.jsxRuntimeExports.jsx(ra,{haulType:l,icon:a,placeholder:`Select ${e}s`,disabled:c,variant:sa(_),...v,children:g}),o.jsxRuntimeExports.jsx(f.Dialog$2,{onSearch:d,emptyContent:x,status:p,actions:E,resourceName:e,...C,children:h})]})}),Xe=(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},oa=e=>o.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:P.SIZES,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"tiny",children:"L"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"small",children:"M"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"medium",children:"L"})]}),Tg=Object.freeze(Object.defineProperty({__proto__:null,SIZES:P.SIZES,SelectSize:oa,isRenderProp:f.isRenderProp,isSize:P.isSize,removeProps:Xe,renderProp:f.renderProp,size:P.size},Symbol.toStringTag,{value:"Module"})),Ns=({children:e="",size:t="medium",color:n,icon:s,onClose:r,className:i,onDragStart:l,...a})=>{const c=u.cr.cssString(n);s==null&&n!=null&&(s=o.jsxRuntimeExports.jsx(f.Circle,{color:c}));const d=r==null?void 0:o.jsxRuntimeExports.jsx(f.Button,{"aria-label":"close",size:t==="tiny"?"small":t,variant:"text",className:u.CSS.BE("tag","close"),sharp:!0,onClick:x=>{x.stopPropagation(),r()},children:o.jsxRuntimeExports.jsx(f.Close,{})});return o.jsxRuntimeExports.jsxs(f.Button,{el:"div",className:u.CSS(i,u.CSS.B("tag"),r!=null&&u.CSS.BM("tag","closeable")),size:t,overflow:"nowrap",align:"center",gap:"small",onDragStart:l,...a,children:[s,d,e]})},sr=({children:e,onClick:t,variant:n="outlined",size:s="medium",...r})=>o.jsxRuntimeExports.jsx(f.Button,{el:"div",variant:n,size:s,x:!0,onClick:t,align:"center",gap:"small",style:{padding:"0rem 0.5rem",paddingRight:"2rem"},rounded:!0,...r,children:e}),Ig=Object.freeze(Object.defineProperty({__proto__:null,Tag:Ns,Tags:sr},Symbol.toStringTag,{value:"Module"})),Og=({itemKey:e,icon:t,onDragStart:n})=>{const s=f.useItem(e),{onSelect:r}=f.useItemState(e);return o.jsxRuntimeExports.jsx(Ns,{onClose:r,onDragStart:()=>n(e),draggable:!0,size:"small",status:s==null?"error":void 0,icon:s?.icon??t,children:s?.name??e})},Ag=f.renderProp(Og),or=({items:e},t,n,s)=>{if(t===""||s===!0)return!1;const r=f.filterByType(t,e);return r.length>0&&!r.every(i=>n.includes(i.key))},ra=({haulType:e="",disabled:t,placeholder:n="Select...",variant:s="outlined",icon:r,children:i=Ag})=>{const l=f.useSelection(),a=f.useSyncedRef(l),{setSelected:c}=f.useContext$3(),{toggle:d,visible:x}=f.useContext$2(),p=j.useCallback(v=>or(v,e,P.t.toArray(l),t),[e,l,t]),{startDrag:m,...h}=f.useDragAndDrop({type:e,canDrop:p,onDrop:f.useFilterByTypeCallback(e,({items:v})=>{const y=P.t.toArray(a.current);return c(u.c.unique([...P.t.toArray(y),...v.map(C=>C.key)])),v},[c])}),g=j.useCallback(({dropped:v})=>{const y=l.filter(C=>!v.some(_=>_.key===C));c(y)},[c,l]),E=j.useCallback(v=>{m([{key:v,type:e}],g)},[m,g,e]),S=f.useDraggingState(),R=s==="text"&&l.length!==0;return o.jsxRuntimeExports.jsxs(sr,{full:"x",onClick:()=>{R||d()},...h,className:u.CSS(u.CSS.dropRegion(p(S)),u.CSS.BE("dialog","trigger"),u.CSS.BM("variant",s)),variant:s,preventClick:R,grow:!0,children:[l.length===0&&o.jsxRuntimeExports.jsxs(f.Text,{color:8,weight:400,style:{padding:"0 1rem"},children:[r,n]}),l.map(v=>i({key:v,itemKey:v,onDragStart:E,icon:r})),s!=="text"&&o.jsxRuntimeExports.jsx($l.Animated,{className:u.CSS.level("p"),enabled:x,enabledLoc:"bottom",disabledLoc:"left",color:8}),R&&o.jsxRuntimeExports.jsx(f.Button,{variant:s,onClick:v=>{v.stopPropagation(),d()},children:o.jsxRuntimeExports.jsx(f.Add,{color:8})})]})},Ot=({resourceName:e,onChange:t,value:n,allowNone:s,emptyContent:r,haulType:i,data:l,getItem:a,subscribe:c,itemHeight:d,onFetchMore:x,disabled:p,onSearch:m,status:h,icon:g,children:E,variant:S="connected",actions:R,dialogProps:v,triggerProps:y,virtual:C=!0,closeDialogOnSelect:_=!0,...M})=>o.jsxRuntimeExports.jsx(f.Frame,{...M,variant:na(S),children:o.jsxRuntimeExports.jsxs(f.Frame$1,{value:n,onChange:t,data:l,getItem:a,subscribe:c,allowNone:s,onFetchMore:x,itemHeight:d,virtual:C,closeDialogOnSelect:_,children:[o.jsxRuntimeExports.jsx(ia,{haulType:i,icon:g,placeholder:`Select a ${e}`,disabled:p,variant:sa(S),...y}),o.jsxRuntimeExports.jsx(f.Dialog$2,{onSearch:m,resourceName:e,emptyContent:r,status:h,actions:R,...v,children:E})]})}),ia=({haulType:e="",placeholder:t,icon:n,disabled:s,iconOnly:r=!1,hideCaret:i=!1,...l})=>{const a=f.useSelection(),{setSelected:c}=f.useContext$3(),[d]=a,x=f.useItem(d),{name:p,icon:m}=x??{},h=j.useCallback(S=>or(S,e,a,s),[e,a,s]),g=f.useDrop({type:e,canDrop:h,onDrop:f.useFilterByTypeCallback(e,({items:S})=>(S.length!==0&&c([S[0].key]),S),[c])}),E=f.useDraggingState();return o.jsxRuntimeExports.jsxs(Fl.Trigger,{variant:"outlined",gap:"small",className:u.CSS(u.CSS.dropRegion(h(E))),disabled:s,...g,...l,hideCaret:i||r,textColor:p==null?8:void 0,children:[m??n,!r&&(p??t)]})},Dg=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t);if(n==null)return null;const{name:s,icon:r}=n;return o.jsxRuntimeExports.jsxs(f.ListItem,{...e,children:[r,s]})}),Pn=({data:e,filter:t,children:n=Dg,virtual:s=!1,...r})=>{const{retrieve:i,...l}=f.useStaticData({data:e,filter:t}),{search:a}=nt.usePager({retrieve:i});return o.jsxRuntimeExports.jsx(Ot,{...r,...l,onSearch:a,virtual:s,children:n})},on=e=>o.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:P.LEVELS,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h2",square:!0,children:"XL"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h3",square:!0,children:"L"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h4",square:!0,children:"M"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h5",square:!0,children:"S"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"small",square:!0,children:"XS"})]}),Bg=[250,400,500,600],la=e=>o.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:Bg,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:250,children:"Light"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:400,children:"Normal"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:500,children:"Medium"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:600,children:"Bold"})]}),$g=Object.freeze(Object.defineProperty({__proto__:null,Level:on,Weight:la},Symbol.toStringTag,{value:"Module"})),zg=Object.freeze(Object.defineProperty({__proto__:null,Button:pe.Button,Buttons:pe.Buttons,Core:f.Core,Dialog:f.Dialog$2,Frame:f.Frame$1,ListItem:f.ListItem,Multiple:Ms,MultipleTrigger:ra,Single:Ot,SingleTrigger:ia,Static:Pn,Text:$g,staticCanDrop:or,useClear:f.useClear,useContext:f.useContext$3,useHover:f.useHover,useItemState:f.useItemState,useMultiple:f.useMultiple,useSelection:f.useSelection,useSingle:f.useSingle},Symbol.toStringTag,{value:"Module"})),Vg=()=>o.jsxRuntimeExports.jsx(f.Caret.Right,{className:u.CSS.BE("breadcrumb","separator")}),Rn=({children:e,...t})=>o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS.BE("breadcrumb","segment"),...t,defaultEl:"span",children:e}),rr=({children:e,highlightVariant:t,...n})=>o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.B("breadcrumb"),t!=null&&u.CSS.BM("breadcrumb","highlight",t)),x:!0,align:"center",gap:"small",...n,children:j.Children.map(e,(s,r)=>s==null||typeof s=="boolean"?null:o.jsxRuntimeExports.jsxs(j.Fragment,{children:[r>0&&o.jsxRuntimeExports.jsx(Vg,{}),typeof s=="string"?o.jsxRuntimeExports.jsx(Rn,{children:s}):s]},r))}),Fg=(e,t)=>{const n=e.split("/");return n.map((s,r)=>t({href:n.slice(0,r+1).join("/"),segment:s,index:r}))},Hg=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:rr,Segment:Rn,mapURLSegments:Fg},Symbol.toStringTag,{value:"Module"})),Zg=({channelKey:e,rangeKey:t,shadow:n,className:s,...r})=>{const{value:i,onChange:l}=r,[a,c]=j.useState(!1),{update:d}=Ja.useDirect({params:{rangeKey:t,channelKey:e}}),{data:x}=Rr.useDirect({params:{key:e,rangeKey:t}}),p=async C=>{d(C)},m=x?.alias,h=x?.alias??x?.name;let g=o.jsxRuntimeExports.jsx(f.Rename,{});a?g=o.jsxRuntimeExports.jsx(f.Loading,{}):m===i&&(g=o.jsxRuntimeExports.jsx(f.Check,{}));const E=p!=null&&!a&&m!==i&&e!==0,S=f.useErrorHandler(),R=()=>{E&&S(async()=>{c(!0);try{await p(i),c(!1)}catch(C){throw c(!1),C}},"Failed to set channel alias")},v=()=>{m!=null&&l?.(m)},y=e===0?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):p==null?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):i.length===0?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):m===i?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Alias synced with this label"}):o.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:["Sync alias for ",h," with this label"]});return o.jsxRuntimeExports.jsxs(f.Text$2,{selectOnFocus:!0,...r,children:[E&&o.jsxRuntimeExports.jsx(f.Button,{onClick:v,tooltip:o.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:["Set ",h," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:o.jsxRuntimeExports.jsx(f.Sync,{})}),o.jsxRuntimeExports.jsx(f.Button,{onClick:R,disabled:!E,tooltip:y,tooltipLocation:{y:"top"},variant:"outlined",children:g})]})},vt="channel";var Ei=180/Math.PI,vo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function aa(e,t,n,s,r,i){var l,a,c;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(c=e*n+t*s)&&(n-=e*c,s-=t*c),(a=Math.sqrt(n*n+s*s))&&(n/=a,s/=a,c/=a),e*s<t*n&&(e=-e,t=-t,c=-c,l=-l),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*Ei,skewX:Math.atan(c)*Ei,scaleX:l,scaleY:a}}var Gn;function Kg(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?vo:aa(t.a,t.b,t.c,t.d,t.e,t.f)}function Yg(e){return e==null||(Gn||(Gn=document.createElementNS("http://www.w3.org/2000/svg","g")),Gn.setAttribute("transform",e),!(e=Gn.transform.baseVal.consolidate()))?vo:(e=e.matrix,aa(e.a,e.b,e.c,e.d,e.e,e.f))}function ca(e,t,n,s){function r(d){return d.length?d.pop()+" ":""}function i(d,x,p,m,h,g){if(d!==p||x!==m){var E=h.push("translate(",null,t,null,n);g.push({i:E-4,x:O.interpolateNumber(d,p)},{i:E-2,x:O.interpolateNumber(x,m)})}else(p||m)&&h.push("translate("+p+t+m+n)}function l(d,x,p,m){d!==x?(d-x>180?x+=360:x-d>180&&(d+=360),m.push({i:p.push(r(p)+"rotate(",null,s)-2,x:O.interpolateNumber(d,x)})):x&&p.push(r(p)+"rotate("+x+s)}function a(d,x,p,m){d!==x?m.push({i:p.push(r(p)+"skewX(",null,s)-2,x:O.interpolateNumber(d,x)}):x&&p.push(r(p)+"skewX("+x+s)}function c(d,x,p,m,h,g){if(d!==p||x!==m){var E=h.push(r(h)+"scale(",null,",",null,")");g.push({i:E-4,x:O.interpolateNumber(d,p)},{i:E-2,x:O.interpolateNumber(x,m)})}else(p!==1||m!==1)&&h.push(r(h)+"scale("+p+","+m+")")}return function(d,x){var p=[],m=[];return d=e(d),x=e(x),i(d.translateX,d.translateY,x.translateX,x.translateY,p,m),l(d.rotate,x.rotate,p,m),a(d.skewX,x.skewX,p,m),c(d.scaleX,d.scaleY,x.scaleX,x.scaleY,p,m),d=x=null,function(h){for(var g=-1,E=m.length,S;++g<E;)p[(S=m[g]).i]=S.x(h);return p.join("")}}}var Gg=ca(Kg,"px, ","px)","deg)"),Ug=ca(Yg,", ",")",")"),Wg=1e-12;function yi(e){return((e=Math.exp(e))+1/e)/2}function Xg(e){return((e=Math.exp(e))-1/e)/2}function qg(e){return((e=Math.exp(2*e))-1)/(e+1)}const rs=function e(t,n,s){function r(i,l){var a=i[0],c=i[1],d=i[2],x=l[0],p=l[1],m=l[2],h=x-a,g=p-c,E=h*h+g*g,S,R;if(E<Wg)R=Math.log(m/d)/t,S=function(I){return[a+I*h,c+I*g,d*Math.exp(t*I*R)]};else{var v=Math.sqrt(E),y=(m*m-d*d+s*E)/(2*d*n*v),C=(m*m-d*d-s*E)/(2*m*n*v),_=Math.log(Math.sqrt(y*y+1)-y),M=Math.log(Math.sqrt(C*C+1)-C);R=(M-_)/t,S=function(I){var A=I*R,B=yi(_),z=d/(n*v)*(B*qg(t*A+_)-Xg(_));return[a+z*h,c+z*g,d*B/yi(t*A+_)]}}return S.duration=R*1e3*t/Math.SQRT2,S}return r.rho=function(i){var l=Math.max(.001,+i),a=l*l,c=a*a;return e(l,a,c)},r}(Math.SQRT2,2,4),Qg=Object.freeze(Object.defineProperty({__proto__:null,Base:O.Base,Bottom:O.Bottom,Right:O.Right,Top:O.Top,axisStateZ:O.axisStateZ,newCanvas:O.newCanvas,newTickFactory:O.newTickFactory,tickFactoryProps:O.tickFactoryProps,tickType:O.tickType},Symbol.toStringTag,{value:"Module"})),Jg=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:O.AcquireChannelControl,AuthoritySource:O.AuthoritySource,Chip:O.Chip,Controller:O.Controller,Indicator:O.Indicator,Legend:O.Legend,REGISTRY:O.REGISTRY$15,STATUSES:O.STATUSES,SetChannelValue:O.SetChannelValue,StateProvider:O.StateProvider,acquireChannelControl:O.acquireChannelControl,acquireChannelControlPropsZ:O.acquireChannelControlPropsZ,authoritySource:O.authoritySource,authoritySourceDetailsZ:O.authoritySourceDetailsZ,authoritySourceProps:O.authoritySourceProps,chipStateZ:O.chipStateZ,chipStatusDetailsZ:O.chipStatusDetailsZ,controllerStateZ:O.controllerStateZ,indicatorStateZ:O.indicatorStateZ,indicatorStatusDetailsZ:O.indicatorStatusDetailsZ,legendStateZ:O.legendStateZ,setChannelValue:O.setChannelValue,setChannelValuePropsZ:O.setChannelValuePropsZ,stateProviderStateZ:O.stateProviderStateZ,statusZ:O.statusZ,sugaredStateZ:O.sugaredStateZ},Symbol.toStringTag,{value:"Module"})),e1={region:u.Ho.ZERO,dpr:1,os:u.S.getOS()},t1={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},n1=({children:e,resizeDebounce:t=100,className:n,...s})=>{const[{path:r},{bootstrapped:i,dpr:l},a]=f.use$2({type:O.Canvas.TYPE,schema:O.canvasStateZ,initialState:e1}),c=j.useRef({...t1}),d=j.useRef(!1),x=j.useCallback(E=>{c.current.bootstrapped&&(a(()=>({bootstrapped:!0,region:E,dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})})),d.current=!0)},[a]),p=j.useRef(null),m=f.useResize(x,{debounce:t}),h=f.useCombinedRefs(p,m);j.useEffect(()=>{const E=()=>{window.devicePixelRatio===l||!c.current.bootstrapped||p.current==null||a(S=>({...S,region:u.Ho.construct(p.current),dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",E,{once:!0})},[l]),j.useEffect(()=>{const E=()=>{!c.current.bootstrapped||p.current==null||a(S=>({...S,region:u.Ho.construct(p.current),glCanvas:void 0,upper2dCanvas:void 0,lower2dCanvas:void 0}))};window.addEventListener("focus",E),window.addEventListener("blur",E)},[a]);const g=j.useCallback(E=>{if(E==null)return;E.className.includes("gl")?c.current.gl=E:E.className.includes("upper2d")?c.current.upper2d=E:c.current.lower2d=E;const{gl:S,lower2d:R,upper2d:v,bootstrapped:y}=c.current;if(S==null||R==null||v==null||y)return;c.current.bootstrapped=!0;const C=S.transferControlToOffscreen(),_=v.transferControlToOffscreen(),M=R.transferControlToOffscreen();a({glCanvas:C,upper2dCanvas:_,lower2dCanvas:M,bootstrap:!0,bootstrapped:!1,region:u.Ho.construct(S),dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})},[C,_,M])},[a]);return o.jsxRuntimeExports.jsxs("div",{ref:h,className:u.CSS(u.CSS.B("canvas-container"),n),...s,children:[o.jsxRuntimeExports.jsx("canvas",{ref:g,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","lower2d"))}),o.jsxRuntimeExports.jsx("canvas",{ref:g,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","gl"))}),o.jsxRuntimeExports.jsx("canvas",{ref:g,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","upper2d"))}),o.jsxRuntimeExports.jsx(f.Composite,{path:r,children:i&&e})]})},Tn=(e,t)=>f.useResize(j.useCallback((n,s)=>{const r=document.querySelector(".pluto-canvas--lower2d");r!=null&&e(u.C.XY.translate(u.K.scale(u.Ho.topLeft(r),-1)).box(n),s)},[e]),t),s1=Object.freeze(Object.defineProperty({__proto__:null,Canvas:n1,useRegion:Tn},Symbol.toStringTag,{value:"Module"})),ua=j.createContext(null),ct=e=>{const t=j.use(ua);if(t==null)throw new Error(`Cannot use ${e} as a non-child of LinePlot.`);return t},da=e=>{const{addViewportHandler:t}=ct("Viewport");j.useEffect(()=>t(e),[t,e])},In=(e,t)=>{const{setGridEntry:n,removeGridEntry:s}=ct(t),{key:r}=e;return f.useEffectCompare(()=>{u.K$1.outer.parse(e.loc),n(e)},([a],[c])=>P.N.equal(a,c),[e]),j.useEffect(()=>()=>s(r),[]),{gridArea:u.p.swap(u.K$1.direction(e.loc))==="x"?`axis-start-${r} / plot-start / axis-end-${r} / plot-end`:`plot-start / axis-start-${r} / plot-end / axis-end-${r}`}},xa=({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:s=u.K.ZERO,children:r,hold:i=!1,onHold:l,visible:a,...c})=>{const[d,x]=j.useState([]),p=f.useMemoDeepEqual({clearOverScan:s,hold:i,visible:a}),[{path:m},{grid:h},g]=f.use$2({aetherKey:e,type:O.LinePlot.TYPE,schema:O.linePlotStateZ,initialState:{container:u.Ho.ZERO,viewport:u.Ho.DECIMAL,grid:{},...p}}),E=j.useCallback(D=>{a&&g(V=>({...V,container:D}))},[g,a]),S=Tn(E,{debounce:n});j.useEffect(()=>g(D=>({...D,...p})),[p]);const R=j.useRef(new Map),v=j.useCallback(D=>(R.current.set(D,null),()=>R.current.delete(D)),[R]),y=j.useCallback(D=>{const{mode:V,box:b,stage:k}=D;(V==="pan"&&k!=="start"||V==="zoom"||V==="zoomReset"&&k==="start")&&g(L=>({...L,viewport:b})),R.current.forEach((L,N)=>N(D))},[g]),C=j.useCallback(D=>{g(V=>({...V,grid:{...V.grid,[D.key]:D}}))},[g]),_=j.useCallback(D=>g(V=>{const{[D]:b,...k}=V.grid;return{...V,grid:k}}),[g]),M=j.useCallback(D=>{x(V=>[...V.filter(({key:b})=>b!==D.key),D])},[x]),I=j.useCallback(D=>x(V=>V.filter(({key:b})=>b!==D)),[M]),A=j.useMemo(()=>o1(h),[h]),B=j.useCallback(D=>{g(V=>({...V,hold:D})),l?.(D)},[g,l]),z=`line-plot-${e}`,$=j.useMemo(()=>({lines:d,setGridEntry:C,removeGridEntry:_,setLine:M,removeLine:I,setViewport:y,addViewportHandler:v,setHold:B,id:z}),[z,d,C,_,M,I,y,v,B]);return o.jsxRuntimeExports.jsx("div",{id:z,className:u.CSS.B("line-plot"),style:{...t,...A},ref:S,...c,children:o.jsxRuntimeExports.jsx(ua,{value:$,children:o.jsxRuntimeExports.jsx(f.Composite,{path:m,children:r})})})},o1=e=>{const t=u.CSS.newGridBuilder();return O.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)"),O.regions("bottom",e).reverse().forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),O.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)"),O.regions("right",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.build()},ir=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?O.XAxis.TYPE:O.YAxis.TYPE,s=`${e}-axis`,r=({aetherKey:i,children:l,location:a=t,label:c="",labelLevel:d="small",labelDirection:x=e,onLabelChange:p,color:m,labelSize:h,showGrid:g,type:E,bounds:S,className:R,tickSpacing:v,autoBounds:y,axisKey:C,autoBoundUpdateInterval:_,onAutoBoundsChange:M,style:I,...A})=>{const B=(c?.length??0)>0,z=f.useUniqueKey(i),$=f.useMemoDeepEqual({location:a,showGrid:g,type:E,bounds:S,axisKey:C,label:c,labelDirection:x,tickSpacing:v,autoBounds:y,autoBoundUpdateInterval:_}),[{path:D},{size:V,labelSize:b,...k},L]=f.use$2({aetherKey:z,type:n,schema:O.coreAxisStateZ,initialState:$});j.useEffect(()=>L(K=>({...K,...$})),[$]),j.useEffect(()=>{const{lower:K,upper:Z}=O.parseAutoBounds(k.autoBounds);k.bounds!=null&&(K&&S?.lower!==k.bounds.lower||Z&&S?.upper!==k.bounds.upper)&&M?.(k.bounds)},[k.autoBounds,k.bounds]);const N=In({loc:a,key:`${n}-${z}`,size:V+b,order:1},`${e.toUpperCase()}Axis`),F=ks.useTypography(d).toString(),H=j.useRef(0);return j.useEffect(()=>{if(e==="y"){if(c==null)return;let Z=P.dimensions(c,F)[u.p.dimension(u.p.construct(x))];Z>0&&(Z+=9),L(Y=>({...Y,labelSize:Z}))}else{let Z=P.dimensions(c,F).height*1.3;Z>0&&(Z+=12);const Y=H.current;O.withinSizeThreshold(Y,Z)||(H.current=Z,L(ne=>({...ne,labelSize:Z})))}},[c,x,F]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(R,u.CSS.B("axis"),u.CSS.B(s),u.CSS.loc(a)),style:{...I,...N},align:"center",justify:a!=="left"?"end":"start",direction:u.p.swap(e),...A,children:B&&o.jsxRuntimeExports.jsx(f.MaybeEditable,{className:u.CSS(u.CSS.BE("axis","label"),u.CSS.dir(x)),value:c,onChange:p,level:d})}),o.jsxRuntimeExports.jsx(f.Composite,{path:D,children:l})]})};return r.displayName=`${e.toUpperCase()}Axis`,r},pa=ir("x"),ma=ir("y"),r1=u.K.xy.extend({root:u.K$1.corner,units:te.z.object({x:te.z.enum(["px","decimal"]),y:te.z.enum(["px","decimal"])})}),i1=r1.partial({root:!0,units:!0}),l1=e=>{const t={};return t[e.root?.x??"left"]=e?.units?.x==="px"?`${e.x}px`:`${e.x*100}%`,t[e.root?.y??"top"]=e?.units?.y==="px"?`${e.y}px`:`${e.y*100}%`,t},a1=(e,t)=>{const n={x:e.x,y:e.y};if(t.current==null)return n;const s=u.Ho.construct(t.current),r=u.Ho.construct(t.current.parentElement);return e.units?.x==="decimal"?e.root?.x==="right"&&(n.x=1-e.x):e.root?.x==="right"?n.x=1-(e.x+u.Ho.width(s))/u.Ho.width(r):n.x/=u.Ho.width(r),e.units?.y==="decimal"?e.root?.y==="bottom"&&(n.y=1-e.y):e.root?.y==="bottom"?n.y=1-(e.y+u.Ho.height(s))/u.Ho.height(r):n.y/=u.Ho.height(r),n},c1=(e,t)=>{if(t.current==null)return null;const n=u.Ho.construct(t.current.parentElement),s=u.Ho.construct(t.current),r={x:e.x,y:e.y,root:{...u.K$1.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(r.x=(1-e.x)*u.Ho.width(n)-u.Ho.width(s),r.root.x="right"):e.x<.2?r.x=e.x*u.Ho.width(n):r.units.x="decimal",e.y>.8?(r.y=(1-e.y)*u.Ho.height(n)-u.Ho.height(s),r.root.y="bottom"):e.y<.2?r.y=e.y*u.Ho.height(n):r.units.y="decimal",r.x=Math.round(r.x*100)/100,{...r,...u.K.truncate(r,3)}},Si=u.Ho.reRoot(u.Ho.DECIMAL,u.K$1.TOP_LEFT),u1={x:.1,y:.1,root:u.K$1.TOP_LEFT,units:{x:"decimal",y:"decimal"}},Ps=j.memo(({className:e,value:t,onChange:n,style:s,draggable:r=!0,initial:i=u1,...l})=>{const[a,c]=P.usePurePassthrough({value:t,onChange:n,initial:i}),d=j.useRef(a),x=f.useSyncedRef(r===!1),p=j.useRef(null);a!==null&&(s={...s,...l1(a)});const m=j.useCallback(g=>{if(p.current?.parentElement==null)return d.current;const E=u.Ho.construct(p.current.parentElement),S=u.C.XY.scale(E).scale(Si),R=S.box(u.Ho.construct(p.current)),v=u.C.XY.clamp(u.Ho.construct(u.Ho.topLeft(Si),{width:1-u.Ho.width(R),height:1-u.Ho.height(R)})),y=u.K.translate(u.K.construct(d.current),u.Ho.signedDims(S.box(g))),C=v.pos(y);return c1(C,p)},[]),h=Pe.useCursorDrag({onStart:j.useCallback(()=>{d.current=a1(d.current,p)},[]),onMove:j.useCallback(g=>{if(x.current)return;const E=m(g);E!==null&&c(E)},[]),onEnd:j.useCallback(g=>{if(x.current)return;const E=m(g);E!==null&&(d.current=E)},[])});return o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(e,u.CSS.B("legend")),bordered:!0,style:s,onDragStart:h,draggable:r,borderColor:5,ref:p,onDrag:f.preventDefault,onDragEnd:f.preventDefault,background:1,rounded:1,...l})});Ps.displayName="Legend.Container";const On=j.memo(({data:e,allowVisibleChange:t=!0,background:n=1,entryProps:s,...r})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e.sort((i,l)=>i.label.localeCompare(l.label)).map(({key:i,visible:l=!0,...a})=>o.jsxRuntimeExports.jsx(d1,{entry:{key:i,visible:l,...a},allowVisibleChange:t,background:n,...s,...r},i))}));On.displayName="Legend.Entries";const d1=({allowVisibleChange:e=!0,background:t,entry:n,onEntryChange:s,colorPickerVisible:r,onColorPickerVisibleChange:i,className:l,...a})=>{const{color:c,key:d,label:x,visible:p}=n;return o.jsxRuntimeExports.jsxs(f.Box,{align:"center",className:u.CSS(u.CSS.B("legend-entry"),l),gap:"small",x:!0,...a,children:[o.jsxRuntimeExports.jsxs(f.Box,{align:"center",gap:"small",x:!0,children:[o.jsxRuntimeExports.jsx(Pe.Swatch,{allowChange:s!=null,draggable:!1,onChange:m=>s?.({...n,color:m}),size:"tiny",value:c,visible:r,onVisibleChange:i}),o.jsxRuntimeExports.jsx(f.MaybeEditable,{color:n.visible?10:7,level:"small",onChange:m=>s?.({...n,label:m}),onDoubleClick:f.stopPropagation,overflow:"nowrap",value:x})]}),e&&o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS.B("visible-toggle"),contrast:t,onClick:m=>{m.stopPropagation(),s?.({...n,visible:!p})},onDoubleClick:f.stopPropagation,size:"tiny",variant:"text",children:p?o.jsxRuntimeExports.jsx(f.Visible,{}):o.jsxRuntimeExports.jsx(f.Hidden,{})})]},d)},fa=({data:e,background:t=1,allowVisibleChange:n=!0,onEntryChange:s,position:r,onPositionChange:i,...l})=>{const[a,c]=j.useState(!1);return e.length===0?null:o.jsxRuntimeExports.jsx(Ps,{...l,draggable:!a,value:r,onChange:i,gap:"small",background:t,className:u.CSS.B("legend-grouped"),children:e.map(({key:d,name:x,data:p},m)=>o.jsxRuntimeExports.jsxs(j.Fragment,{children:[o.jsxRuntimeExports.jsx(f.Text,{level:"small",className:u.CSS.B("legend-name"),children:x}),o.jsxRuntimeExports.jsx(f.Box,{y:!0,grow:!0,className:u.CSS.B("legend-entries"),children:o.jsxRuntimeExports.jsx(On,{data:p,onEntryChange:s,colorPickerVisible:a,onColorPickerVisibleChange:c,allowVisibleChange:n,background:t,entryProps:x1})}),m!==e.length-1&&o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("legend-divider")})]},d))})},x1={justify:"between",grow:!0},lr=({data:e=[],onEntryChange:t,position:n,onPositionChange:s,allowVisibleChange:r=!0,background:i=1,...l})=>{const[a,c]=j.useState(!1);return e.length===0?null:o.jsxRuntimeExports.jsx(Ps,{...l,draggable:!a,value:n,onChange:s,gap:"small",background:i,children:o.jsxRuntimeExports.jsx(On,{data:e,onEntryChange:t,colorPickerVisible:a,onColorPickerVisibleChange:c,allowVisibleChange:r,background:i,entryProps:p1})})},p1={justify:"between",grow:!0},m1=Object.freeze(Object.defineProperty({__proto__:null,Container:Ps,Grouped:fa,Simple:lr,stickyXYz:i1},Symbol.toStringTag,{value:"Module"})),ha=({variant:e="floating",...t})=>e==="floating"?o.jsxRuntimeExports.jsx(ga,{...t}):o.jsxRuntimeExports.jsx(f1,{...t}),ga=j.memo(({onLineChange:e,...t})=>{const{lines:n}=ct("FloatingLegend"),s=ja(n);return s.length===1?o.jsxRuntimeExports.jsx(lr,{data:s[0].data,onEntryChange:e,...t}):o.jsxRuntimeExports.jsx(fa,{data:s,onEntryChange:e,...t})});ga.displayName="LinePlot.FloatingLegend";const ja=e=>j.useMemo(()=>{const n={};for(const r of e){const i=n[r.legendGroup];i!=null?i.push(r):n[r.legendGroup]=[r]}const s=Object.entries(n).map(([r,i])=>({key:r,name:r,data:i}));return s.sort((r,i)=>r.name.localeCompare(i.name)),s},[e]),f1=({onLineChange:e})=>{const{lines:t}=ct("FixedLegend"),n=ja(t),s=f.useUniqueKey(),r=In({key:s,size:t.length>0?36:0,loc:"top",order:5},"Legend");return n.length===0?null:n.length===1?o.jsxRuntimeExports.jsx(f.Box,{align:"center",justify:"start",x:!0,style:r,children:o.jsxRuntimeExports.jsx(On,{data:n[0].data,onEntryChange:e,background:0})}):o.jsxRuntimeExports.jsxs(f.Box,{align:"center",justify:"start",x:!0,style:r,gap:"huge",children:[o.jsxRuntimeExports.jsx(Ri,{name:"Y1",data:n[0].data,onLineChange:e}),o.jsxRuntimeExports.jsx(Ri,{name:"Y2",data:n[1].data,onLineChange:e})]})},Ri=({name:e,data:t,onLineChange:n})=>o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:e}),o.jsxRuntimeExports.jsx(On,{data:t,onEntryChange:n,background:0})]}),ar=j.memo(({aetherKey:e,...t})=>(f.useUnidirectional({aetherKey:e,type:O.Line.TYPE,schema:O.stateZ,state:t}),null));ar.displayName="Line";const h1=Object.freeze(Object.defineProperty({__proto__:null,Line:ar},Symbol.toStringTag,{value:"Module"})),cr=({aetherKey:e,color:t,label:n="",legendGroup:s,visible:r=!0,...i})=>{const l=f.useUniqueKey(e),{setLine:a,removeLine:c}=ct("Line");return j.useEffect(()=>(a({key:l,color:t,label:n,visible:r,legendGroup:s}),()=>c(l)),[n,t,r,s]),o.jsxRuntimeExports.jsx(ar,{aetherKey:l,color:t,label:n,visible:r,...i})},Ea=({level:e="h2",...t})=>{const n=f.useUniqueKey(),s=ks.useTypography(e),r=In({key:n,size:(s.lineHeight+2)*s.baseSize,loc:"top",order:10},"Title");return o.jsxRuntimeExports.jsx(f.Box,{justify:"center",align:"center",style:r,children:o.jsxRuntimeExports.jsx(f.MaybeEditable,{...t,level:e})})},ya=({aetherKey:e,...t})=>{const n=f.useUniqueKey(e),[,,s]=f.use$2({aetherKey:n,type:O.Tooltip.TYPE,schema:O.tooltipStateZ,initialState:{position:null,...t}}),r=j.useRef(null),i=j.useCallback(a=>{const c=document.querySelector(".pluto-canvas-container");if(c==null)return;const d=u.Ho.topLeft(c);s({position:u.K.translation(d,u.K.construct(a))})},[s]),l=j.useCallback(()=>s({position:null}),[s]);return j.useEffect(()=>{if(r.current===null)return;const a=r.current.parentElement;if(a!=null)return a.addEventListener("mousemove",i),a.addEventListener("mouseleave",l),()=>{a.removeEventListener("mousemove",i),a.removeEventListener("mouseleave",l)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:r})},g1=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:ya},Symbol.toStringTag,{value:"Module"})),Sa=()=>{const e=j.useRef(new Map),t=j.useCallback(s=>{const{request:r,response:i}=s,l=e.current.get(r);l!=null&&(l(i.bounds),e.current.delete(r))},[]),[,,n]=f.use$2({type:O.BoundQuerier.TYPE,schema:O.boundQuerierStateZ,onAetherChange:t,initialState:{request:"",response:{request:"",bounds:{}}}});return j.useCallback(async()=>await new Promise(s=>{const r=u.kt.create();e.current.set(r,s),n(i=>({...i,request:r}))}),[])},j1=({ref:e})=>(e.current=Sa(),null),E1={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer",cancel:"default"},Ra=({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:E1[t],...r},...i,children:[o.jsxRuntimeExports.jsx("div",{style:{...u.Ho.css(n),display:u.Ho.areaIsZero(n)?"none":"block"},className:u.CSS.BE("viewport-mask","selection")}),s]}),y1=(e,t)=>{for(;e!=null&&!t(e);)e=e.parentElement;return e},S1=11,R1=6,C1=2,Ci=5,w1=e=>u.Ho.width(e)<Ci&&u.Ho.height(e)<Ci,fn=e=>{const t=u.Ho.width(e),n=u.Ho.height(e);return Math.min(t,n)<.001?S1:R1},b1=["zoom","pan","select","zoomReset","cancel"],ur=[...b1,"click"],v1=te.z.enum(ur),Ca=["zoom","select"],hn={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"],["MouseMiddle"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},wa={defaultMode:"pan",pan:[["MouseLeft"],["MouseMiddle"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},ba={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"],["MouseMiddle"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]],cancel:[["Escape"]]},dr={zoom:hn,pan:wa,select:ba,zoomReset:hn,click:hn,cancel:hn},_1=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)]))},k1=u.Ho.construct(0,0,1,1,u.K$1.TOP_LEFT),L1={width:30,height:50},va=({onChange:e,triggers:t,initial:n=k1,threshold:s=L1,ref:r})=>{const i=t?.defaultMode??"zoom",[l,a]=j.useState(u.Ho.ZERO),[c,d]=j.useState(i),[x,p]=f.useStateRef(n),m=j.useRef(u.K.ZERO),h=j.useRef(null),g=u._.construct(s);j.useEffect(()=>p(()=>u.Ho.truncate(n,fn(n))),[n]),j.useEffect(()=>d(i),[i]);const[E,S,R,v]=f.useMemoCompare(()=>{const A={...dr[i],...t},B=f.flattenConfig(A),z=_1(A);return[A,B,z,f.flattenConfig(z)]},f.compareModeConfigs,[t]),y=j.useCallback(({box:A,triggers:B,stage:z,cursor:$})=>{if(h.current==null)return;const D=f.determineMode(E,B),V=u.Ho.construct(h.current);if(D==null)return;if(D==="cancel"){a(u.Ho.ZERO),e?.({box:x.current,mode:D,stage:z,cursor:$});return}if(D==="zoomReset")return a(u.Ho.ZERO),e?.({box:u.Ho.DECIMAL,mode:D,stage:z,cursor:$}),p(u.Ho.DECIMAL);const b=w1(A);if(z==="end"){if(b){D==="zoom"&&a(u.Ho.ZERO),e?.({box:x.current,mode:"click",stage:z,cursor:$});return}return p(L=>{if(D==="pan"){const F=wi(A,L,V);return F===null||u.Ho.equals(F,L)?L:(e?.({box:F,mode:D,stage:z,cursor:$}),F)}const N=C(A,L,V);return N===null?L:(e?.({box:N,mode:D,stage:z,cursor:$}),D==="zoom"?(a(u.Ho.ZERO),N):u.Ho.truncate(L,fn(L)))})}if(Ca.includes(D))return b?void 0:a(u.C.XY.scale(V).clamp(V).translate({x:-u.Ho.left(V),y:-u.Ho.top(V)}).box(bi(g,A,V)));if(a(L=>u.Ho.areaIsZero(L)?L:u.Ho.ZERO),u.K.distance($,m.current)<C1)return;m.current=$;const k=wi(A,x.current,V);e?.({box:k,mode:D,stage:z,cursor:$})},[a,d,e,E,s.height,s.width,p,h,fn]);j.useImperativeHandle(r,()=>({reset:()=>{a(u.Ho.ZERO),p(u.Ho.DECIMAL),e?.({box:u.Ho.DECIMAL,mode:"zoomReset",stage:"start",cursor:u.K.ZERO})}}),[e]);const C=j.useCallback((A,B,z)=>{const $=_o(B,z).box(bi(g,A,z));return u.Ho.truncate($,fn($))},[s]),_=f.useHeldRef({triggers:[["Control"]]}),M=f.useHeldRef({triggers:[["Alt"]]});j.useEffect(()=>{const A=B=>{if(h.current==null)return;let z=1;B.deltaY<0?z-=.035:z+=.035;const $=u.Ho.construct(h.current),D=u.K.construct(B);if(Array.from(h.current.children).push(h.current),!u.Ho.contains($,D)||h.current!==B.target&&y1(B.target,F=>F===h.current)==null)return;const k=_o(x.current,u.Ho.construct(h.current)).pos(u.K.construct(B));let N=u.C.XY.magnify({x:_.current.held?1:z,y:M.current.held?1:z}).box(x.current);N=u.Ho.translate(N,{x:_.current.held?0:k.x*(1-z),y:M.current.held?0:k.y*(1-z)}),p(N),e?.({stage:"end",box:N,cursor:u.K.construct(B),mode:"zoom"})};return window.addEventListener("wheel",A),()=>window.removeEventListener("wheel",A)},[p,e]),Vl.useDrag({bound:h,onDrag:y,triggers:S,loose:!0});const I=j.useCallback(({triggers:A,stage:B})=>{if(B==="end")return d(i);const z=f.determineMode(R,A);z!=null&&d(z)},[R,i,e]);return f.use$1({triggers:v,callback:I,region:h}),{maskBox:l,ref:h,mode:c}},_o=(e,t)=>u.C.XY.scale(t).clamp(t).scale(e),wi=(e,t,n)=>{let s=u.Ho.signedDims(_o(t,n).box(e));s={signedWidth:-s.signedWidth,signedHeight:-s.signedHeight};const r=u.C.XY.translate(u.K.construct(s)).box(t);return u.Ho.truncate(r,fn(r))},bi=(e,t,n)=>u.Ho.height(t)<=e.height?u.Ho.construct(u.Ho.left(t),u.Ho.top(n),u.Ho.width(t),u.Ho.height(n)):u.Ho.width(t)<=e.width?u.Ho.construct(u.Ho.left(n),u.Ho.top(t),u.Ho.width(n),u.Ho.height(t)):t,Gt=({mode:e,triggers:t})=>o.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:[u.z.capitalize(e),o.jsxRuntimeExports.jsx(f.Text$1,{trigger:t[0],el:"span"})]}),M1=({triggers:e,value:t,onChange:n,disable:s=["zoomReset","click","cancel"],tooltipDelay:r,tooltipLocation:i,hideTooltip:l,...a})=>{const c=j.useMemo(()=>ur.filter(x=>!s.includes(x)),[s]),d={tooltipDelay:r,tooltipLocation:i,hideTooltip:l,size:"small"};return o.jsxRuntimeExports.jsxs(pe.Buttons,{...a,keys:c,value:t,onChange:n,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"zoom",tooltip:o.jsxRuntimeExports.jsx(Gt,{mode:"zoom",triggers:e.zoom}),...d,children:o.jsxRuntimeExports.jsx(f.Zoom,{})}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"pan",tooltip:o.jsxRuntimeExports.jsx(Gt,{mode:"pan",triggers:e.pan}),...d,children:o.jsxRuntimeExports.jsx(f.Pan,{})}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"select",tooltip:o.jsxRuntimeExports.jsx(Gt,{mode:"select",triggers:e.select}),...d,children:o.jsxRuntimeExports.jsx(f.Selection,{})})]})},N1=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:dr,MASK_MODES:Ca,MODES:ur,Mask:Ra,PAN_DEFAULT_TRIGGERS:wa,SELECT_DEFAULT_TRIGGERS:ba,SelectMode:M1,TooltipText:Gt,ZOOM_DEFAULT_TRIGGERS:hn,modeZ:v1,use:va},Symbol.toStringTag,{value:"Module"})),P1=e=>e==null?null:e.closest(".pluto-line-plot__viewport")??null,_a=({ref:e,children:t,initial:n=u.Ho.DECIMAL,onChange:s,...r})=>{const{setViewport:i}=ct("Viewport");j.useLayoutEffect(()=>{i({box:n,mode:"zoom",cursor:u.K.ZERO,stage:"start"})},[i,n]);const l=j.useCallback(c=>{i(c),s?.(c)},[s,i]),a=va({onChange:l,initial:n,ref:e,...r});return o.jsxRuntimeExports.jsx(Ra,{className:u.CSS.BE("line-plot","viewport"),...a,children:t})},T1=Object.freeze(Object.defineProperty({__proto__:null,BoundsQuerier:j1,Legend:ha,Line:cr,LinePlot:xa,Title:Ea,Tooltip:g1,Viewport:_a,XAxis:pa,YAxis:ma,axisFactory:ir,selectViewportEl:P1,useBoundQuerier:Sa,useContext:ct,useGridEntry:In,useViewport:da},Symbol.toStringTag,{value:"Module"})),I1=({aetherKey:e,...t})=>(f.use$2({aetherKey:e,type:O.Annotation.TYPE,schema:O.annotationStateZ,initialState:t}),null),ka=({aetherKey:e,menu:t,...n})=>{const s=f.useUniqueKey(e),{setViewport:r,setHold:i}=ct("Range.Provider"),[,{hovered:l,count:a},c]=f.use$2({aetherKey:s,type:O.Provider.TYPE,schema:O.providerStateZ,initialState:{...n,cursor:null,hovered:null,count:0}}),d=In({key:s,loc:"top",size:a>0?32:0,order:3},"Annotation.Provider"),x=f.useContextMenu(),p=f.useSyncedRef(x.visible),m=j.useCallback(g=>c(E=>({...E,cursor:{x:g.clientX,y:g.clientY}})),[c]),h=j.useCallback(()=>{p.current||c(g=>({...g,cursor:null}))},[c,p]);return o.jsxRuntimeExports.jsx(f.ContextMenu,{...x,menu:()=>t==null||l==null?null:t(l),children:o.jsxRuntimeExports.jsx(f.Box,{style:{...d,cursor:l!=null?"pointer":"default",width:"100%",height:"100%"},onContextMenu:x.open,className:x.className,onClick:()=>{l!=null&&(r({box:u.Ho.construct({x:l.viewport.lower,y:0},{x:l.viewport.upper,y:1}),mode:"zoom",cursor:u.K.ZERO,stage:"start"}),i(!0))},onMouseMove:m,onMouseLeave:h})})},O1=Object.freeze(Object.defineProperty({__proto__:null,Annotation:I1,Provider:ka},Symbol.toStringTag,{value:"Module"})),La={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},A1=f.flattenConfig(La),Ma=({aetherKey:e})=>{const t=f.useUniqueKey(e),[,,n]=f.use$2({aetherKey:t,type:O.Measure.TYPE,schema:O.measureStateZ,initialState:{hover:null,one:null,two:null}}),s=j.useRef(null),r=f.useHeldRef({triggers:A1,loose:!0}),i=j.useCallback(({mode:c,cursor:d})=>{if(c==="click"){const x=f.determineMode(La,r.current.triggers,{loose:!0});if(["one","two"].includes(x))return n(p=>({...p,[x]:d}));n(x==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??d,two:p.one!==null?d:p.two}))}},[n,r]);da(i);const l=j.useCallback(c=>n(d=>({...d,hover:u.K.construct(c)})),[n]),a=j.useCallback(()=>{n(c=>({...c,hover:null}))},[n]);return j.useEffect(()=>{if(s.current===null)return;const c=s.current.parentElement;if(c!=null)return c.addEventListener("mousemove",l),c.addEventListener("mouseleave",a),()=>{c.removeEventListener("mousemove",l),c.removeEventListener("mouseleave",a)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:s})},D1=Object.freeze(Object.defineProperty({__proto__:null,Measure:Ma},Symbol.toStringTag,{value:"Module"})),xr=({aetherKey:e,label:t,position:n,onLabelChange:s,onPositionChange:r,onUnitsChange:i,units:l="",color:a,lineWidth:c,lineDash:d,className:x,onSelect:p,style:m,...h})=>{const[g,E]=P.usePurePassthrough({value:t,onChange:s,initial:""}),S=f.useSyncedRef(r),[,{pixelPosition:R},v]=f.use$2({aetherKey:e,type:O.Rule.TYPE,schema:O.ruleStateZ,initialState:{color:a,dragging:!1,position:n,lineWidth:c,lineDash:d},onAetherChange:j.useCallback(({position:D})=>{D!=null&&S.current?.(D)},[S])}),y=j.useRef(R);R!==y.current&&(y.current=R);const{id:C}=ct("Rule"),M=document.getElementById(C)?.querySelector(".pluto-line-plot__viewport"),I=j.useRef(R);j.useEffect(()=>{v(D=>({...D,position:n,color:a,lineWidth:c,lineDash:d}))},[n,a,c,d]);const A=Pe.useCursorDrag({onStart:j.useCallback(()=>{p?.(),v(D=>({...D,dragging:!0})),I.current=y.current},[]),onMove:D=>{v(V=>({...V,pixelPosition:(I.current??0)+u.Ho.signedHeight(D)}))},onEnd:j.useCallback(()=>{v(D=>({...D,dragging:!1})),I.current=R},[])}),B=j.useRef(null);if(n==null||R==null)return null;const z=u.cr.pickByContrast(a,u.cr.BLACK,u.cr.WHITE),$=o.jsxRuntimeExports.jsxs("div",{ref:B,className:u.CSS.B("rule"),style:{top:`calc(${R}px - 0.5rem)`},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("rule","drag-handle"),onDragStart:A,draggable:!0}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",className:u.CSS(x,u.CSS.BE("rule","tag")),bordered:!0,onClick:p,empty:!0,rounded:!0,style:{borderColor:u.cr.cssString(a),backgroundColor:u.cr.hex(u.cr.setAlpha(a,.7)),...m},...h,children:[o.jsxRuntimeExports.jsx(f.Editable,{className:u.CSS.BE("rule","label"),level:"small",value:g,onChange:E,color:z}),o.jsxRuntimeExports.jsx(f.Divider$1,{y:!0,style:{borderColor:u.cr.cssString(a)}}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",className:u.CSS.BE("rule","value"),children:[o.jsxRuntimeExports.jsx(f.Editable,{value:n.toFixed(2),onChange:D=>{const V=Number(D);isFinite(V)&&r?.(V)},level:"small",color:z}),l.length>0&&o.jsxRuntimeExports.jsx(f.MaybeEditable,{level:"small",color:z,value:l,onChange:i})]})]})]});return M==null?$:zl.createPortal($,M)},B1=Object.freeze(Object.defineProperty({__proto__:null,Rule:xr},Symbol.toStringTag,{value:"Module"})),Na=f.canDropOfType(vt),$1=({lines:e,axes:t,showTitle:n=!0,title:s="",onTitleChange:r,showLegend:i=!0,legendPosition:l,onLegendPositionChange:a,titleLevel:c="h4",onLineChange:d,onRuleChange:x,onAxisChannelDrop:p,onAxisChange:m,rules:h,enableTooltip:g=!0,enableMeasure:E=!1,initialViewport:S=u.Ho.DECIMAL,legendVariant:R,onViewportChange:v,viewportTriggers:y,rangeAnnotationProvider:C,onSelectRule:_,children:M,...I})=>{const A=t.filter(({location:V})=>u.K$1.isY(V)),B=j.useRef(null),z=f.usePrevious(e.length),$=f.usePrevious(I.hold),D=z===0&&e.length!==0||$===!0&&I.hold===!1;return j.useEffect(()=>{D&&B.current?.reset()},[D]),o.jsxRuntimeExports.jsxs(xa,{...I,children:[A.map((V,b)=>{const k=e.filter(F=>F.axes.x===V.key),L=t.filter(({location:F})=>u.K$1.isX(F)),N=h?.filter(F=>[...L.map(({key:H})=>H),V.key].includes(F.axis));return o.jsxRuntimeExports.jsx(z1,{axis:V,index:b,lines:k,yAxes:L,rules:N,onAxisChannelDrop:p,onAxisChange:m,annotationProvider:C,onRuleChange:x,onSelectRule:_},V.key)}),i&&o.jsxRuntimeExports.jsx(ha,{onLineChange:d,position:l,onPositionChange:a,variant:R}),n&&o.jsxRuntimeExports.jsx(Ea,{value:s,onChange:r,level:c}),o.jsxRuntimeExports.jsxs(_a,{initial:S,onChange:v,triggers:y,ref:B,children:[g&&o.jsxRuntimeExports.jsx(ya,{}),E&&o.jsxRuntimeExports.jsx(Ma,{}),M]})]})},z1=({yAxes:e,lines:t,index:n,rules:s,onRuleChange:r,onSelectRule:i,onAxisChannelDrop:l,onAxisChange:a,axis:{location:c,key:d,showGrid:x,...p},annotationProvider:m})=>{const h=f.useDrop({type:"Channel.LinePlot.XAxis",canDrop:Na,onDrop:j.useCallback(({items:S})=>{const R=f.filterByType(vt,S);return l?.(d,R.map(({key:v})=>v)),R},[d,l])}),g=s?.filter(S=>S.axis===d),E=f.useDraggingState();return o.jsxRuntimeExports.jsxs(pa,{...p,...h,location:c,axisKey:d,showGrid:x??n===0,className:u.CSS(u.CSS.dropRegion(f.canDropOfType(vt)(E))),onAutoBoundsChange:S=>a?.({key:d,bounds:S}),onLabelChange:S=>a?.({key:d,label:S}),children:[e.map((S,R)=>{const v=t.filter(C=>C.axes.y===S.key),y=s?.filter(C=>C.axis===S.key);return o.jsxRuntimeExports.jsx(F1,{axis:{...S,showGrid:x??(n===0&&R===0)},lines:v,rules:y,onRuleChange:r,onAxisChannelDrop:l,onAxisChange:a,onSelectRule:i},S.key)}),g?.map(S=>j.createElement(xr,{aetherKey:S.key,...S,key:S.key,onLabelChange:R=>r?.({key:S.key,label:R}),onPositionChange:R=>r?.({key:S.key,position:R}),onUnitsChange:R=>r?.({key:S.key,units:R}),onSelect:()=>i?.(S.key)})),o.jsxRuntimeExports.jsx(ka,{...m})]})},V1=({channels:{x:e,y:t}})=>`${e??0}-${t}`,F1=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:s,onAxisChange:r,axis:{key:i,location:l,...a},onSelectRule:c})=>{const d=f.useDrop({type:"Channel.LinePlot.YAxis",canDrop:Na,onDrop:j.useCallback(({items:p})=>{const m=f.filterByType(vt,p);return s?.(i,m.map(({key:h})=>h)),m},[i,s])}),x=f.useDraggingState();return o.jsxRuntimeExports.jsxs(ma,{...a,...d,location:l,axisKey:i,className:u.CSS(u.CSS.dropRegion(f.canDropOfType(vt)(x))),onAutoBoundsChange:p=>r?.({key:i,bounds:p}),onLabelChange:p=>r?.({key:i,label:p}),children:[e.map(p=>o.jsxRuntimeExports.jsx(H1,{line:p},V1(p))),t?.map(p=>j.createElement(xr,{aetherKey:p.key,...p,key:p.key,onLabelChange:m=>n?.({key:p.key,label:m}),onPositionChange:m=>n?.({key:p.key,position:m}),onUnitsChange:m=>n?.({key:p.key,units:m}),onClick:()=>c?.(p.key)}))]})},H1=({line:e})=>e.variant==="static"?o.jsxRuntimeExports.jsx(K1,{line:e}):o.jsxRuntimeExports.jsx(Z1,{line:e}),Z1=({line:{key:e,timeSpan:t,channels:{x:n,y:s},axes:r,...i}})=>{const{xTelem:l,yTelem:a}=j.useMemo(()=>{const c=Number(t.valueOf())*3,d=O.streamChannelData({timeSpan:t,channel:s,keepFor:c}),x=n!=null&&n!==0;return{xTelem:O.streamChannelData({timeSpan:t,channel:x?n:s,useIndexOfChannel:!x,keepFor:c}),yTelem:d}},[t.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(cr,{aetherKey:e,y:a,x:l,legendGroup:r.y.toUpperCase(),...i},e)},K1=({line:{timeRange:e,key:t,channels:{x:n,y:s},...r}})=>{const{xTelem:i,yTelem:l}=j.useMemo(()=>{const a=O.channelData({timeRange:e,channel:s}),c=n!=null&&n!==0;return{xTelem:O.channelData({timeRange:e,channel:c?n:s,useIndexOfChannel:!c}),yTelem:a}},[e.start.valueOf(),e.end.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(cr,{aetherKey:t,y:l,x:i,legendGroup:r.axes.y.toUpperCase(),...r},t)},lt=(e,t,n)=>({variant:"loading",status:u.wr.create({variant:"loading",message:`${u.z.capitalize(t)} ${e}`}),data:n}),Ve=(e,t,n)=>({variant:"success",status:u.wr.create({variant:"success",message:`${u.z.capitalize(t)} ${e}`}),data:n}),_t=(e,t,n)=>({variant:"error",status:u.wr.fromException(n,`Failed to ${t} ${e}`),data:void 0}),Wt=(e,t)=>({variant:"disabled",status:u.wr.create({variant:"disabled",message:`Failed to ${t} ${e}`,description:`Cannot ${t} ${e} because no cluster is connected.`}),data:void 0}),pr=j.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:()=>{},getStatuses:()=>[]}),rn=e=>{const t=j.use(pr);return e??t},Et=(e,t={})=>{const{optional:n=!1,onChange:s,defaultValue:r}=t,i=rn(t?.ctx),{get:l,bind:a,set:c,setStatus:d}=i,x=j.useCallback(g=>{s?.(g,{...i,path:e}),c(e,g)},[e,c,s]),p=j.useCallback(g=>d(e,g),[e,d]),m=j.useSyncExternalStore(a,j.useCallback(()=>l(e,{optional:n,defaultValue:r}),[e,l,n,r]));if(m==null){if(!n)throw new Error(`Field state is null: ${e}`);return null}const h=i.mode==="preview"?"preview":void 0;return{onChange:x,setStatus:p,variant:h,...m}},mr=(e,t)=>{const{get:n,bind:s}=rn(t?.ctx);return j.useSyncExternalStore(s,j.useCallback(()=>n(e,t),[e,n,t]))},fr=(e,t)=>mr(e,t)?.value??null,Y1=e=>mr(e,{optional:!0})?.status?.variant==="success",Pa=(e,t)=>({value:()=>e.get(t).value,add:(n,s)=>{const r=u.yr(e.get(t).value);r.splice(s,0,...P.t.toArray(n)),e.set(t,r)},push:(n,s)=>{const r=u.yr(e.get(t).value);r.push(...P.t.toArray(n)),s!=null&&r.sort(s),e.set(t,r)},remove:n=>{const s=e.get(t).value,r=new Set(P.t.toArray(n)),i=s.filter(({key:l})=>!r.has(l));return e.set(t,i),i.map(({key:l})=>l)},keepOnly:n=>{const s=e.get(t).value,r=new Set(P.t.toArray(n)),i=s.filter(({key:l})=>r.has(l));return e.set(t,i),i.map(({key:l})=>l)},set:n=>e.set(t,P.executeSetter(n,e.get(t).value)),sort:n=>{const s=u.yr(e.get(t).value);s.sort(n),e.set(t,s)}}),G1=(e,t={})=>{const n=rn(t?.ctx),s=fr(e,t);return j.useMemo(()=>({data:s.map(({key:r})=>r),...Pa(n,e)}),[s,n,e])},U1=f.renderProp(e=>o.jsxRuntimeExports.jsx(f.Text$2,{...e})),Ee=({path:e,children:t=U1,label:n,padHelpText:s=!0,visible:r=!0,hideIfNull:i=!0,optional:l,onChange:a,className:c,defaultValue:d,...x})=>{const p=Et(e,{optional:l??i,onChange:a,defaultValue:d}),m=rn();if(p==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n??=u.z.capitalize(P.N.element(e,-1)),r=typeof r=="function"?r(p,m):r,!r)return null;const h=p.status.message,{onChange:g,value:E}=p,S={onChange:g,value:E};return p.variant!=null&&(S.variant=p.variant),o.jsxRuntimeExports.jsx(Ie.Item,{padHelpText:s,helpText:h,status:p.status.variant,label:n,required:p.required,className:u.CSS(c,u.CSS.BE("field",e.split(".").join("-")),u.CSS.M(p.status.variant)),...x,children:t(S)})},An=e=>({fieldKey:t,fieldProps:n,inputProps:s})=>{const r=({inputProps:i,path:l,fieldKey:a=t,optional:c,defaultValue:d,...x})=>o.jsxRuntimeExports.jsx(Ee,{...n,...x,defaultValue:d,optional:c,path:a?`${l}.${a}`:l,children:p=>o.jsxRuntimeExports.jsx(e,{...p,...s,...i})});return r.displayName=e.displayName,r},Ta=An(f.Numeric),$e=Ta({inputProps:{}}),Ia=An(f.Text$2),hr=Ia({inputProps:{}}),Oa=An(f.Switch$1),Ts=Oa({inputProps:{}}),W1=e=>An(Pn)(e),X1=({children:e,...t})=>o.jsxRuntimeExports.jsx(pr,{value:t,children:e}),q1=e=>e.code==="custom"&&e.params!=null&&"variant"in e.params?e.params.variant:"error";class Q1 extends O.a.Observer{schema;values;initialValues;statuses;touched;cachedRefs;constructor(t,n){super(),this.schema=n,this.values=P.N.copy(t),this.statuses=new Map,this.touched=new Set,this.cachedRefs=new Map,this.initialValues=P.N.copy(this.values)}setValue(t,n){t==""?this.values=P.N.copy(n):P.N.set(this.values,t,n),this.checkTouched(t,n),this.updateCachedRefs(t)}checkTouched(t,n){const s=P.N.get(this.initialValues,t,{optional:!0});P.N.equal(s,n)?(this.clearTouched(t),this.clearOrphanedTouchedPaths(t)):this.setTouched(t)}clearOrphanedTouchedPaths(t){const n=new Set;this.touched.forEach(s=>{P.N.pathsMatch(s,t)&&s!==t&&!P.N.has(this.values,s)&&n.add(s)}),n.forEach(s=>{this.touched.delete(s),this.cachedRefs.delete(s)})}setStatus(t,n){this.statuses.set(t,n),this.updateCachedRefs(t)}clearStatus(t=""){this.statuses.delete(t),this.updateCachedRefs(t)}reset(t){if(P.N.equal(this.values,t??this.initialValues))return;t!=null&&(this.initialValues=P.N.copy(t));const n=P.N.copy(this.initialValues);this.statuses.clear(),this.touched.clear();const s=new Set;this.cachedRefs.forEach((r,i)=>{const l=P.N.get(this.values,i,{optional:!0}),a=P.N.get(n,i,{optional:!0});P.N.equal(l,a)||s.add(i)}),s.forEach(r=>this.cachedRefs.delete(r)),this.values=n}setCurrentStateAsInitialValues(){this.initialValues=P.N.copy(this.values),this.touched.clear(),this.cachedRefs.clear()}setTouched(t){this.touched.add(t),this.updateCachedRefs(t)}clearTouched(t=""){t===""?this.touched.clear():this.touched.delete(t),this.updateCachedRefs(t),this.notify()}remove(t){P.N.remove(this.values,t),this.statuses.delete(t),this.clearTouched(t),this.cachedRefs.delete(t)}validate(t,n){if(this.schema==null)return!0;const s=this.schema.safeParse(this.values);return this.processValidation(t,s,n)}async validateAsync(t,n){if(this.schema==null)return!0;const s=await this.schema.safeParseAsync(this.values);return this.processValidation(t,s,n)}errorsToStatuses(t,n,s){return t.forEach(r=>{const i=[...n,...r.path],l=P.N.resolvePath(i.join("."),this.values);if(s.push({key:l,variant:q1(r),message:r.message}),r.code==="invalid_union"&&r.errors!=null&&r.errors.length>0){const a=r.errors.map(d=>d.filter(x=>P.N.has(this.values,[...i,...x.path].join("."))));a.sort((d,x)=>d.length-x.length);const c=a.find(d=>d.length>0);if(c==null)return;this.errorsToStatuses(c,i,s)}}),s}processValidation(t=!1,n,s){if(this.schema==null)return!0;const r=new Set;if(this.statuses.forEach((a,c)=>{a.variant!=="success"&&r.add(c)}),r.forEach(a=>this.clearStatus(a)),n.success)return!0;let i=!0;return this.errorsToStatuses(n.error.issues,[],[]).forEach(a=>{const{key:c,message:d,variant:x}=a;if(c==null)return;const p=s==null||P.N.pathsMatch(c,s)||P.N.pathsMatch(s,c),m=t||this.touched.has(c);!p||!m||(x!=="warning"&&(i=!1),this.setStatus(c,{key:c,variant:x,message:d}))}),i}get hasBeenTouched(){return this.touched.size>0}getStatuses(){return Array.from(this.statuses.values()).filter(t=>t.variant!=="success")}getState(t,n={}){const{optional:s=!1,defaultValue:r=void 0}=n,i=u.pr.getOrSetDefault(this.cachedRefs,t,{});let l=P.N.get(this.values,t,{optional:s||r!=null});if(l==null){if(r==null)return null;l=r,this.setValue(t,l)}if(i.value=l,i.required=!1,this.schema!=null){const a=ig.getFieldSchema(this.schema,t,{optional:!0});a!=null&&(i.required=!a.safeParse(void 0).success)}return i.status=u.pr.getOrSetDefault(this.statuses,t,{key:t,variant:"success",message:""}),i.touched=this.touched.has(t),i}updateCachedRefs(t){this.cachedRefs.forEach((n,s)=>{(P.N.pathsMatch(s,t)||P.N.pathsMatch(t,s))&&this.cachedRefs.set(s,{})})}}const gr=({values:e,sync:t=!1,schema:n,mode:s="normal",onChange:r,onHasTouched:i})=>{const l=f.useInitializerRef(()=>new Q1(e,n)),a=f.useSyncedRef(r),c=f.useErrorHandler(),d=f.useSyncedRef(i),x=j.useCallback(()=>{l.current.setCurrentStateAsInitialValues(),d.current?.(!1)},[]),p=j.useCallback(_=>l.current.onChange(_),[]),m=j.useCallback((_,M)=>l.current.getState(_,M),[]),h=j.useCallback(_=>{l.current.remove(_),l.current.notify()},[]),g=j.useCallback(_=>{const M=l.current.values,I=l.current.hasBeenTouched;l.current.reset(_),M!==l.current.values&&a.current?.({values:l.current.values,path:"",prev:M,valid:!0}),l.current.notify();const B=l.current.hasBeenTouched;B!==I&&d.current?.(B)},[]),E=j.useCallback(async _=>{const M=await l.current.validateAsync(!0,_);return l.current.notify(),M},[]),S=j.useCallback(_=>{const M=l.current.validate(!0,_);return l.current.notify(),M},[]),R=j.useCallback((_,M,I)=>{const{notifyOnChange:A=!0}=I??{},B=P.N.get(l.current.values,_,{optional:!0}),z=l.current.hasBeenTouched;l.current.setValue(_,M);const $=()=>{A&&a.current?.({values:l.current.values,path:_,prev:B,valid:!0}),l.current.notify();const D=l.current.hasBeenTouched;D!==z&&d.current?.(D)};try{l.current.validate()}catch{return c(async()=>{await l.current.validateAsync(),$()},"Failed to validate form")}$()},[]),v=j.useCallback(_=>P.N.has(l.current.values,_),[]),y=j.useCallback((_,M)=>{const I=l.current.hasBeenTouched;l.current.setStatus(_,M),l.current.notify();const A=l.current.hasBeenTouched;A!==I&&d.current?.(A)},[]),C=j.useCallback(()=>{l.current.clearStatus(),l.current.notify()},[]);return j.useEffect(()=>{t&&(l.current.reset(e),l.current.notify())},[t,e]),j.useMemo(()=>({bind:p,set:R,get:m,mode:s,validate:S,validateAsync:E,value:()=>l.current.values,has:v,remove:h,setStatus:y,clearStatuses:C,reset:g,setCurrentStateAsInitialValues:x,getStatuses:()=>l.current.getStatuses()}),[p,R,m,S,E,v,h,y,C,g,s,x])},Aa=({key:e,open:t,onChange:n})=>{const s=f.useMemoPrimitiveArray(e);It(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])},J1=Object.freeze(Object.defineProperty({__proto__:null,useListener:Aa},Symbol.toStringTag,{value:"Module"})),En={...O.ZERO_CONTEXT_VALUE,state:P.Sm.connectivity.DEFAULT},e0={maxRetries:4,baseInterval:P.O$1.seconds(1),scale:2},jr=j.createContext(En),Da=()=>j.use(jr),At=()=>Da().client,t0=()=>Da().state,ko={connected:"success",connecting:"loading",disconnected:"disabled",failed:"error"},Ba="serverVersionMismatch",n0=(e,t,n)=>`Cluster version ${n!=null?`${n} `:""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,s0=({children:e,client:t})=>{const{path:n}=f.useUnidirectional({type:O.Provider$1.TYPE,schema:O.Provider$1.stateZ,state:{props:null,state:null}});return o.jsxRuntimeExports.jsx(jr,{value:{...En,client:t},children:o.jsxRuntimeExports.jsx(f.Composite,{path:n,children:e})})},$a=({children:e,connParams:t})=>{const[n,s,r]=f.useCombinedStateAndRef(En),{path:i}=f.useUnidirectional({type:O.Provider$1.TYPE,schema:O.Provider$1.stateZ,state:{props:t??null,state:null}}),l=f.useAdder(),a=j.useCallback(c=>{r.current.state.status!==c.status&&l({variant:ko[c.status],message:c.message??u.z.capitalize(c.status)}),s(d=>({...d,state:c}))},[l]);return It(async c=>{if(n.client!=null&&n.client.close(),t==null)return s(En);const d=new P.Sm({retry:e0,...t,connectivityPollFrequency:P.O$1.seconds(2)});s({client:d,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:d.clientVersion}});const x=await d.connectivity.check();if(!c.aborted){if(s({client:d,state:x}),l({variant:ko[x.status],message:x.message??x.status.toUpperCase()}),x.status==="connected"&&!x.clientServerCompatible){const p=x.nodeVersion==null||u.gr.semVerOlder(x.nodeVersion,x.clientVersion),m=n0(p,x.clientVersion,x.nodeVersion);l({variant:"warning",message:"Incompatible cluster version",description:m,details:{type:Ba,oldServer:p,nodeVersion:x.nodeVersion,clientVersion:x.clientVersion}})}return d.connectivity.onChange(a),()=>{d.close(),s(En)}}},[t,a]),o.jsxRuntimeExports.jsx(jr,{value:n,children:o.jsxRuntimeExports.jsx(f.Composite,{path:i,children:e})})},o0=Object.freeze(Object.defineProperty({__proto__:null,CONNECTION_STATE_VARIANTS:ko,Provider:$a,SERVER_VERSION_MISMATCH:Ba,TestProvider:s0,use:At,useConnectionState:t0},Symbol.toStringTag,{value:"Module"})),r0=({key:e,name:t,queryFn:n,values:s,openObservable:r,applyChanges:i,applyObservable:l,...a})=>{const c=At(),d=f.useErrorHandler(),x=f.useMemoPrimitiveArray(e),p=gr({values:s,...a,sync:!1,onChange:g=>{c!=null&&d(async()=>{await i?.({...g,client:c})},`Failed to apply changes for ${t}`)}});It(async()=>{if(c!=null)try{const g=await n({client:c});p.set("",g)}catch(g){d(g,`Failed to retrieve ${t}`)}},[x,c?.key]);const m=j.useCallback(async()=>{if(c!=null)return await r?.(c)},[x,c?.key]),h=j.useCallback(g=>l?.({changes:g,ctx:p}),[x,l]);return Aa({key:x,open:m,onChange:h}),p},i0=Object.freeze(Object.defineProperty({__proto__:null,Context:pr,Field:Ee,Form:X1,NumericField:$e,SwitchField:Ts,TextField:hr,buildNumericField:Ta,buildSelectField:W1,buildSwitchField:Oa,buildTextField:Ia,fieldBuilder:An,fieldListUtils:Pa,use:gr,useContext:rn,useField:Et,useFieldList:G1,useFieldState:mr,useFieldValid:Y1,useFieldValue:fr,useSynced:r0},Symbol.toStringTag,{value:"Module"})),Dt=({name:e,schema:t,retrieve:n,mountListeners:s,update:r,initialValues:i})=>({params:l,initialValues:a,autoSave:c=!1,afterSave:d,beforeSave:x,sync:p,onHasTouched:m,mode:h,scope:g})=>{const[E,S]=j.useState(lt(e,"retrieving",void 0)),R=f.useUniqueKey(g),v=At(),y=He(R),C=Ls(),_=gr({schema:t,values:a??i,onChange:({path:$})=>{c&&$!==""&&z()},sync:p,onHasTouched:m,mode:h}),M=j.useCallback(($,D,V)=>_.set($,D,{...V,notifyOnChange:!1}),[_]),I=j.useCallback(async($,D={})=>{const{signal:V}=D;try{if(v==null)return S(Wt(e,"retrieve"));if(S(k=>lt(e,"retrieving",k.data)),V?.aborted)return;const b={client:v,params:$,store:y,..._,set:M};if(await n(b),V?.aborted)return;C.cleanup(),C.set(s?.(b)),S(Ve(e,"retrieved",void 0))}catch(b){if(V?.aborted)return;S(_t(e,"retrieve",b))}},[v,e,_,y,M]),A=f.useMemoDeepEqual(l);It(async $=>await I(A,{signal:$}),[I,A]);const B=j.useCallback(async($={})=>{const{signal:D}=$;try{if(v==null)return S(Wt(e,"update")),!1;const V={client:v,params:l,store:y,..._,set:M};return await _.validateAsync()?(S(lt(e,"updating",void 0)),await x?.(V)===!1?(S(Ve(e,"updated",void 0)),!1):D?.aborted===!0?!1:(await r(V),S(Ve(e,"updated",void 0)),d?.(V),!0)):!1}catch(V){return D?.aborted!==!0&&S(_t(e,"update",V)),!1}},[e,l,x,d]),z=j.useCallback($=>void B($),[B]);return{form:_,save:z,...E}},za=j.createContext(null),He=e=>{const t=f.useRequiredContext(za),n=f.useUniqueKey(e);return j.useMemo(()=>t.scopedStore(n),[t,n])},Va=({children:e,...t})=>{const n=At(),s=f.useErrorHandler(),r=f.useAsyncErrorHandler(),{path:i}=f.useLifecycle({type:O.PROVIDER_TYPE,schema:O.providerStateZ$1,initialState:{}}),l=()=>"client"in t?t.client:new O.Client({client:n,storeConfig:t.storeConfig,handleError:s,handleAsyncError:r}),a=f.useInitializerRef(l),c=j.useRef(null);return n?.key!==c.current?.key&&(c.current=n,a.current=l()),o.jsxRuntimeExports.jsx(f.Composite,{path:i,children:o.jsxRuntimeExports.jsx(za,{value:a.current,children:e})})},l0=()=>!0,a0=u.i.milliseconds(100),c0=(e,t,n,s,r,i)=>{if(e==null)return;let l=e({params:t.current??{},store:i});if(n.current!=null&&(l=l.filter(n.current)),s.current!=null&&(l=l.sort(s.current)),l.length!==0)return l.forEach(a=>r.current.set(a.key,a)),l.map(a=>a.key)},Ke=({name:e,mountListeners:t,retrieve:n,retrieveByKey:s,retrieveCached:r})=>(i={})=>{const{filter:l=l0,sort:a,initialParams:c,retrieveDebounce:d=a0}=i,x=f.useSyncedRef(l),p=f.useSyncedRef(a),m=At(),h=j.useRef(new Map),g=f.useInitializerRef(()=>new Map),E=He(),S=j.useRef(c??null),[R,v,y]=f.useCombinedStateAndRef(()=>lt(e,"retrieving",c0(r,S,x,p,h,E))),C=j.useRef(!0),_=Ls(),M=j.useRef(!1),I=j.useCallback(k=>g.current.forEach((L,N)=>{L===k&&N()}),[g.current]),A=j.useCallback(k=>{if(p.current==null)return k;const L=k.map(N=>h.current.get(N)).filter(N=>N!=null);return L.sort(p.current),L.map(N=>N.key)},[p]),B=j.useCallback(()=>{m!=null&&(M.current=!0,_.cleanup(),_.set(t?.({client:m,store:E,params:S.current??{},onDelete:k=>{h.current.delete(k),v(L=>L.data==null?L:{...L,data:L.data.filter(N=>N!==k)})},onChange:(k,L,N={})=>{const{mode:F="append"}=N,H=h.current.get(k)??null;if(H!=null&&!x.current(H))return;const K=P.executeSetter(L,H);K==null||!x.current(K)||(h.current.set(k,K),v(Z=>{if(Z.data==null)return Z;let Y;if(H==null)p.current!=null?Y=A([...Z.data,k]):Y=F==="prepend"?[k,...Z.data]:[...Z.data,k];else if(p.current!=null){const ne=Z.data.indexOf(k),J=A(Z.data),ce=J.indexOf(k);ne!==ce?Y=J:Y=Z.data}else Y=Z.data;return{...Z,data:Y}}),I(k))}})))},[t,_]),z=j.useCallback(async(k,L={})=>{const{signal:N,mode:F="replace"}=L,H=P.executeSetter(k,S.current??{});S.current=H;try{if(m==null)return v(Wt(e,"retrieve"));if(v(Y=>lt(e,"retrieving",Y.data)),F==="replace")C.current=!0;else if(F==="append"&&!C.current)return v(Y=>Ve(e,"retrieved",Y.data??[]));let K=await n({client:m,params:H,store:E});if(N?.aborted)return;K=K.filter(x.current),p.current!=null&&(K=K.sort(p.current)),K.length===0&&(C.current=!1);const Z=K.map(Y=>Y.key);return B(),y.current.data!=null&&u.k.primitiveArrays(y.current.data,Z)===u.k.EQUAL?v(Y=>Ve(e,"retrieved",Y.data??[])):(K.forEach(Y=>h.current.set(Y.key,Y)),v(Y=>{if(F==="replace"||Y.data==null)return Ve(e,"retrieved",Z);const ne=new Set(Z);return Ve(e,"retrieved",[...Y.data.filter(J=>!ne.has(J)),...Z])}))}catch(K){if(N?.aborted)return;v(_t(e,"retrieve",K))}},[m,e,E,x,B]),$=j.useCallback((k,L={})=>{const{signal:N}=L;(async()=>{M.current||B();try{if(m==null||u.O$1.isZero(k))return;const F=await s({client:m,key:k,params:S.current??{},store:E});if(N?.aborted||F==null)return;if(!x.current(F)){h.current.set(k,null);return}h.current.set(k,F),I(k)}catch(F){if(N?.aborted)return;h.current.set(k,null),v(_t(e,"retrieve",F))}})()},[s,m,I,B]),D=j.useCallback(k=>{if(k==null)return;if(Array.isArray(k))return k.map(N=>D(N)).filter(N=>N!=null);const L=h.current.get(k);return L===void 0&&$(k),L},[$]),V=j.useCallback((k,L)=>L==null?()=>{}:(g.current.set(k,L),()=>g.current.delete(k)),[]);return{retrieve:Pe.useDebouncedCallback((k,L={})=>void z(k,L),new u.i(d).milliseconds,[z]),retrieveAsync:z,subscribe:V,getItem:D,...R,data:R?.data??[]}},u0=({key:e,subscribe:t,getItem:n})=>j.useSyncExternalStore(j.useCallback(s=>t(s,e),[t,e]),j.useCallback(()=>n(e),[n,e])),Fa=e=>lt(e,"retrieving",void 0),Ha=e=>{const[t,n]=j.useState(Fa(e.name));return{...t,...Za({...e,onChange:n})}},Za=({retrieve:e,mountListeners:t,name:n,onChange:s,scope:r})=>{const i=At(),l=j.useRef(null),a=He(r),c=Ls(),d=j.useCallback(m=>s(h=>{if(h.data===void 0)return h;const g=P.executeSetter(m,h.data);return Ve(n,"retrieved",g)}),[s,n]),x=j.useCallback(async(m,h={})=>{const{signal:g}=h,E=P.executeSetter(m,l.current??{});l.current=E;try{if(i==null)return s(Wt(n,"retrieve"));if(s(v=>lt(n,"retrieving",v.data)),g?.aborted)return;const S={client:i,params:E,store:a},R=await e(S);if(g?.aborted)return;c.cleanup(),c.set(t?.({...S,onChange:d})),s(Ve(n,"retrieved",R))}catch(S){if(g?.aborted)return;s(_t(n,"retrieve",S))}},[i,n]);return{retrieve:j.useCallback((m,h)=>void x(m,h),[x]),retrieveAsync:x}},d0=({params:e,...t})=>{const{retrieveAsync:n,retrieve:s,...r}=Ha(t),i=f.useMemoDeepEqual(e);return It(async l=>await n(i,{signal:l}),[n,i]),r},x0=({params:e,...t})=>{const n=j.useRef(Fa(t.name)),{retrieveAsync:s}=Za({...t,onChange:i=>{n.current=P.executeSetter(i,n.current),t.onChange?.(n.current)}}),r=f.useMemoDeepEqual(e);It(async i=>{r!=null&&await s(r,{signal:i})},[s,r])},qe=e=>({useDirect:t=>d0({...e,...t}),useStateful:()=>Ha(e),useEffect:t=>x0({...e,...t})}),Ka=({onChange:e,params:t,update:n,name:s,scope:r,beforeUpdate:i,afterUpdate:l})=>{const a=At(),c=He(r),d=j.useCallback(async(p,m={})=>{const{signal:h}=m;try{if(a==null)return e(Wt(s,"update")),!1;e(E=>lt(s,"updating",E.data));let g=!1;if(i!=null){const E=await i({client:a,value:p});if(E==null)return!1;p=E}return await n({client:a,onChange:E=>{g=!0,e(Ve(s,"updated",E))},value:p,params:t,store:c}),h?.aborted===!0?!1:(g||e(Ve(s,"updated",p)),l!=null&&await l({client:a,value:p}),!0)}catch(g){return h?.aborted!==!0&&e(_t(s,"update",g)),!1}},[s,t]);return{update:j.useCallback((p,m)=>void d(p,m),[d]),updateAsync:d}},p0=({params:e,name:t,...n})=>{const[s,r]=j.useState(Ve(t,"updated",void 0)),i=Ka({...n,name:t,onChange:r,params:e});return{...s,...i}},Qe=e=>({useObservable:t=>Ka({...t,...e}),useDirect:t=>p0({...t,...e})}),m0=Object.freeze(Object.defineProperty({__proto__:null,Client:O.Client,Provider:Va,ScopedUnaryStore:O.ScopedUnaryStore,createForm:Dt,createList:Ke,createRetrieve:qe,createStore:O.createStore,createUpdate:Qe,errorResult:_t,nullClientResult:Wt,pendingResult:lt,scopeStore:O.scopeStore,successResult:Ve,useListItem:u0,useStore:He},Symbol.toStringTag,{value:"Module"})),Ya="channels",f0={channel:P.ow.SET_CHANNEL_NAME,schema:P.ow.keyZ,onChange:async({store:e,changed:t,client:n})=>e.channels.set(t,await n.channels.retrieve(t))},h0={channel:P.ow.DELETE_CHANNEL_NAME,schema:P.ow.keyZ,onChange:({store:e,changed:t})=>e.channels.delete(t)},g0={channel:P.ow.CALCULATION_STATUS_CHANNEL_NAME,schema:P.ow.statusZ,onChange:async({store:e,changed:t,client:n})=>e.channels.set(Number(t.key),s=>s==null?s:n.channels.sugar({...s,status:t}))},j0=e=>{const t=He();j.useEffect(()=>t.channels.onSet(n=>{n.status!=null&&e(n.status)}),[t])},Ga={equal:(e,t)=>P.N.equal(e.payload,t.payload),listeners:[f0,h0,g0]},Er=P.ow.newZ.extend({name:te.z.string().min(1,"Name must not be empty"),dataType:P.I.z.transform(e=>e.toString())}).refine(e=>!e.isIndex||P.I.z.parse(e.dataType).equals(P.I.TIMESTAMP),{message:"Index channel must have data type TIMESTAMP",path:["dataType"]}).refine(e=>e.isIndex||e.index!==0||e.virtual,{message:"Data channel must have an index",path:["index"]}).refine(e=>e.virtual||!P.I.z.parse(e.dataType).isVariable,{message:"Persisted channels must have a fixed-size data type",path:["dataType"]}),Ua=Er.extend({expression:te.z.string().min(1,"Expression must not be empty").refine(e=>e.includes("return"),{message:"Expression must contain a return statement"})}).refine(e=>e.requires?.length>0,{message:"Expression must use at least one channel",path:["requires"]}),Wa=e=>({...e.payload,dataType:e.dataType.toString()}),yr={key:0,name:"",index:0,dataType:P.I.FLOAT32.toString(),internal:!1,isIndex:!1,leaseholder:0,virtual:!1,expression:"",requires:[]},Sr=async({client:e,params:{key:t,rangeKey:n},store:s})=>{let r=s.channels.get(t);if(r==null&&(r=await e.channels.retrieve(t),s.channels.set(r.key,r)),n!=null){const i=P.Iw.aliasKey({range:n,channel:r.key});let l=s.rangeAliases.get(i);if(l==null)try{l={alias:await e.ranges.retrieveAlias(n,r.key),channel:r.key,range:n}}finally{s.rangeAliases.set(i,{channel:r.key,range:n})}l!=null&&(r.alias=l.alias)}return r},E0=async({client:e,params:{keys:t,rangeKey:n},store:s})=>{const r=s.channels.get(t),i=new Set(r?.map(a=>a.key)),l=t.filter(a=>!i.has(a));if(l.length>0){const a=await e.channels.retrieve(l);r.push(...a),s.channels.set(a)}if(n!=null){const a=t.map(p=>P.Iw.aliasKey({range:n,channel:p})),c=s.rangeAliases.get(a);c.forEach(p=>{if(p==null)return;const m=r.find(h=>h.key===p.channel);m!=null&&(m.alias=p.alias)});const d=new Set(c.map(p=>p.channel)),x=t.filter(p=>!d.has(p));if(x.length>0){const p=await e.ranges.retrieveAliases(n,x);Object.entries(p).forEach(([m,h])=>{const g=Number(m),E=r.find(R=>R.key===g);E!=null&&(E.alias=h);const S=P.Iw.aliasKey({range:n,channel:g});s.rangeAliases.set(S,{alias:h,channel:g,range:n})})}}return r},Xa=async({params:{key:e,rangeKey:t},store:n,client:s,reset:r})=>{if(e==null)return;const i=await Sr({client:s,store:n,params:{key:e,rangeKey:t}});r(Wa(i))},Rr=qe({name:"Channel",retrieve:Sr,mountListeners:({store:e,onChange:t,params:{key:n,rangeKey:s},client:r})=>{const i=e.channels.onSet(d=>{if(s!=null){const x=e.rangeAliases.get(P.Iw.aliasKey({range:s,channel:n}));x!=null&&(d.alias=x.alias)}t(d)},n);if(s==null)return i;const l=P.Iw.aliasKey({range:s,channel:n}),a=e.rangeAliases.onSet(d=>{d!=null&&t(x=>r.channels.sugar({...x,alias:d.alias}))},l),c=e.rangeAliases.onDelete(()=>t(d=>r.channels.sugar({...d,alias:void 0})),l);return[i,a,c]}}),y0=qe({name:"Channels",retrieve:E0,mountListeners:({store:e,onChange:t,params:{keys:n,rangeKey:s},client:r})=>{const i=new Set(n),l=e.channels.onSet(async d=>{if(i.has(d.key)){if(s!=null){const x=P.Iw.aliasKey({range:s,channel:d.key});let p=e.rangeAliases.get(x);if(p==null)try{p={alias:await r.ranges.retrieveAlias(s,d.key),channel:d.key,range:s},e.rangeAliases.set(x,p)}catch(m){console.error(m)}p!=null&&(d.alias=p.alias)}t(x=>x.map(p=>p.key===d.key?d:p))}});if(s==null)return l;const a=e.rangeAliases.onSet(d=>{d!=null&&t(x=>x.map(p=>p.key===d.channel?r.channels.sugar({...p,alias:d.alias}):p))}),c=e.rangeAliases.onDelete(d=>{const x=P.Iw.decodeDeleteAliasChange(d);t(p=>p.map(m=>m.key===x.channel?r.channels.sugar({...m,alias:void 0}):m))});return[l,a,c]}}),qa=async({client:e,store:t,set:n,value:s})=>{const r=await e.channels.create(s());t.channels.set(r.key,r),n("key",r.key)},Qa=({store:e,get:t,reset:n})=>e.channels.onSet(s=>{t("key").value===s.key&&n(Wa(s))}),S0=Dt({name:"Channel",schema:Er,initialValues:yr,retrieve:Xa,update:qa,mountListeners:Qa}),R0=Dt({name:"Calculated Channel",schema:Ua,initialValues:yr,retrieve:Xa,update:qa,mountListeners:Qa}),C0={internal:!1},Cr=Ke({name:"Channels",retrieveCached:({params:e,store:t})=>e.searchTerm!=null&&e.searchTerm.length>0?[]:t.channels.get(n=>!(e.internal!=null&&n.internal!==e.internal||e.calculated!=null&&n.isCalculated!==e.calculated||u.O$1.isNonZero(e.notDataTypes)&&e.notDataTypes.some(s=>new P.I(s).equals(n.dataType))||u.O$1.isNonZero(e.dataTypes)&&!e.dataTypes.some(s=>new P.I(s).equals(n.dataType))||e.isIndex!=null&&n.isIndex!==e.isIndex||e.virtual!=null&&n.virtual!==e.virtual)),retrieve:async({client:e,params:t,store:n})=>{const s=await e.channels.retrieve({...C0,...t});return n.channels.set(s),s},retrieveByKey:async({client:e,key:t,store:n})=>await Sr({client:e,params:{key:t},store:n}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.channels.onSet(s=>t(s.key,s)),e.channels.onDelete(s=>n(s))]}),w0=Qe({name:"Channel",update:async({client:e,value:t,store:n})=>{const s=await e.channels.create(t);n.channels.set(s.key,s)}}),b0=Qe({name:"Channel",update:async({client:e,value:t,store:n,params:{key:s}})=>{s!=null&&(await e.channels.rename(s,t),n.channels.set(s,r=>r==null?r:e.channels.sugar({...r,name:t})))}}),Ja=Qe({name:"Channel Alias",update:async({client:e,value:t,store:n,params:{rangeKey:s,channelKey:r}})=>{if(s==null)return;const i={alias:t,channel:r,range:s};await e.ranges.setAlias(s,r,t),n.rangeAliases.set(P.Iw.aliasKey(i),i)}}),ec=e=>{if(e==null)return f.Channel;if(P.ow.isCalculated(e))return f.Calculation;if(e.isIndex)return f.Index;const t=new u.n(e.dataType);return t.isInteger?f.Binary:t.isFloat?f.Decimal:t.equals(u.n.STRING)?f.String:t.equals(u.n.JSON)?f.JSON:f.Channel},tc=f.renderProp(({itemKey:e,...t})=>{const n=f.useItem(e),s=ec(n?.payload);return o.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,...t,children:[o.jsxRuntimeExports.jsx(s,{}),n?.name]})}),v0=({onChange:e,value:t,emptyContent:n,initialParams:s,filter:r,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=Cr({initialParams:s,filter:r}),{fetchMore:p,search:m}=nt.usePager({retrieve:a});return o.jsxRuntimeExports.jsx(Ms,{resourceName:"Channel",value:t,onChange:e,data:l,haulType:vt,getItem:c,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,icon:o.jsxRuntimeExports.jsx(f.Channel,{}),...i,children:tc})},kt=({onChange:e,value:t,allowNone:n,emptyContent:s,initialParams:r,filter:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=Cr({initialParams:r,filter:i}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(Ot,{resourceName:"Channel",onChange:e,value:t,allowNone:n,emptyContent:s,onFetchMore:m,onSearch:h,data:a,getItem:d,subscribe:x,status:p,haulType:vt,icon:o.jsxRuntimeExports.jsx(f.Channel,{}),...l,children:tc})},_0=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:Zg,FLUX_STORE_CONFIG:Ga,FLUX_STORE_KEY:Ya,LinePlot:$1,SelectMultiple:v0,SelectSingle:kt,ZERO_FORM_VALUES:yr,calculatedFormSchema:Ua,formSchema:Er,rename:b0,resolveIcon:ec,retrieve:Rr,retrieveMany:y0,update:w0,updateAlias:Ja,useCalculatedForm:R0,useForm:S0,useList:Cr,useListenForCalculationStatus:j0},Symbol.toStringTag,{value:"Module"})),nc=({yDirection:e="up",...t})=>o.jsxRuntimeExports.jsxs(pe.Buttons,{...t,keys:u.p.DIRECTIONS,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"x",children:o.jsxRuntimeExports.jsx(f.Arrow.Right,{})}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"y",children:e==="up"?o.jsxRuntimeExports.jsx(f.Arrow.Up,{}):o.jsxRuntimeExports.jsx(f.Arrow.Down,{})})]}),k0=Object.freeze(Object.defineProperty({__proto__:null,Select:nc},Symbol.toStringTag,{value:"Module"})),sc="devices",L0={channel:P.bw.SET_CHANNEL_NAME,schema:P.bw.deviceZ,onChange:({store:e,changed:t})=>e.devices.set(t.key,n=>n==null?t:{...t,status:n.status})},M0={channel:P.bw.DELETE_CHANNEL_NAME,schema:P.bw.keyZ,onChange:({store:e,changed:t})=>e.devices.delete(t)},N0={channel:P.bw.STATUS_CHANNEL_NAME,schema:P.bw.statusZ,onChange:({store:e,changed:t})=>{e.devices.set(t.details.device,n=>n==null?n:{...n,status:t})}},oc={listeners:[L0,M0,N0]},P0=e=>{const t=He();j.useEffect(()=>t.devices.onSet(e),[t])},rc=async(e,t,n)=>{const s=t.devices.get(n.key);if(s!=null)return s;const r=await e.hardware.devices.retrieve({...n,includeStatus:!0});return t.devices.set(n.key,r),r},T0=()=>qe({name:"Device",retrieve:async({client:e,params:t,store:n})=>await rc(e,n,t),mountListeners:({store:e,onChange:t,params:{key:n}})=>[e.devices.onSet(s=>t(s),n)]}),ic=Ke({name:"Devices",retrieveCached:({store:e,params:t})=>e.devices.get(n=>!(u.O$1.isNonZero(t.makes)&&!t.makes.includes(n.make)||u.O$1.isNonZero(t.models)&&!t.models.includes(n.model)||u.O$1.isNonZero(t.racks)&&!t.racks.includes(n.rack)||u.O$1.isNonZero(t.locations)&&!t.locations.includes(n.location)||u.O$1.isNonZero(t.names)&&!t.names.includes(n.name)||u.O$1.isNonZero(t.keys)&&!t.keys.includes(n.key))),retrieve:async({client:e,params:t,store:n})=>{const s=await e.hardware.devices.retrieve({includeStatus:!0,...t});return s.forEach(r=>n.devices.set(r.key,r)),s},retrieveByKey:async({client:e,key:t,store:n})=>await rc(e,n,{key:t}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.devices.onSet(s=>t(s.key,s)),e.devices.onDelete(n)]}),I0=f.renderProp(({itemKey:e,...t})=>{const n=f.useItem(e);return o.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,...t,className:u.CSS.BE("device","list-item"),justify:"between",align:"center",children:[o.jsxRuntimeExports.jsxs(f.Text,{align:"center",children:[o.jsxRuntimeExports.jsx(lc,{status:n?.status}),n?.name]}),o.jsxRuntimeExports.jsx(rr,{level:"small",color:9,weight:450,style:{marginTop:"0.25rem"},gap:"tiny",children:n?.location.split(".").map(s=>o.jsxRuntimeExports.jsx(Rn,{children:s},s))})]})}),O0=({onChange:e,value:t,filter:n,allowNone:s,emptyContent:r,initialParams:i,disabled:l,icon:a=o.jsxRuntimeExports.jsx(f.Device,{}),...c})=>{const{data:d,retrieve:x,getItem:p,subscribe:m,status:h}=ic({filter:n,initialParams:i}),{fetchMore:g,search:E}=nt.usePager({retrieve:x});return o.jsxRuntimeExports.jsx(Ot,{resourceName:"Device",value:t,onChange:e,data:d,getItem:p,subscribe:m,onFetchMore:g,onSearch:E,emptyContent:r,status:h,disabled:l,icon:a,...c,children:I0})},lc=({status:e,tooltipLocation:t="right"})=>{const n=e?.variant??"disabled",s=e?.message??"Device Status Unknown";return o.jsxRuntimeExports.jsxs(f.Dialog$1,{location:t,children:[o.jsxRuntimeExports.jsx(f.Summary,{variant:n,hideIcon:!0,level:"small",weight:450,children:s}),o.jsxRuntimeExports.jsx(nr,{variant:n,className:u.CSS.BE("device","status-indicator")})]})},A0=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:oc,FLUX_STORE_KEY:sc,SelectSingle:O0,StatusIndicator:lc,retrieve:T0,useList:ic,useSetSynchronizer:P0},Symbol.toStringTag,{value:"Module"})),ac="racks",D0={channel:P.vw.SET_CHANNEL_NAME,schema:P.vw.keyZ,onChange:async({store:e,changed:t,client:n})=>{const s=await n.hardware.racks.retrieve({key:t,includeStatus:!0});e.racks.set(t,s.payload)}},B0={channel:P.vw.DELETE_CHANNEL_NAME,schema:P.vw.keyZ,onChange:({store:e,changed:t})=>e.racks.delete(t)},$0={channel:P.vw.STATUS_CHANNEL_NAME,schema:P.vw.statusZ,onChange:({store:e,changed:t})=>e.racks.set(t.details.rack,n=>n==null?n:{...n,status:t})},cc={listeners:[D0,B0,$0]},uc={includeStatus:!0},dc=async({client:e,params:t,store:n})=>{let s=n.racks.get(t.key);return s==null&&(s=await e.hardware.racks.retrieve({...uc,...t}),n.racks.set(s.key,s)),s},xc=Ke({name:"Racks",retrieveCached:({store:e})=>e.racks.list(),retrieve:async({client:e,params:t,store:n})=>{const s=await e.hardware.racks.retrieve({...uc,...t});return n.racks.set(s),s},retrieveByKey:async({client:e,key:t,store:n})=>await dc({client:e,params:{key:t},store:n}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.racks.onSet(s=>t(s.key,s)),e.racks.onDelete(n)]}),z0=qe({name:"Rack",retrieve:dc,mountListeners:({store:e,onChange:t,params:{key:n}})=>[e.racks.onSet(t,n)]}),V0=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t);return o.jsxRuntimeExports.jsxs(f.ListItem,{...e,align:"center",justify:"between",children:[o.jsxRuntimeExports.jsx(f.Text,{children:n?.name}),o.jsxRuntimeExports.jsx(pc,{status:n?.status,tooltipLocation:"left"})]})}),F0=({value:e,onChange:t,filter:n,allowNone:s,emptyContent:r,initialParams:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=xc({initialParams:{includeStatus:!0,...i},filter:n}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(Ot,{resourceName:"Driver",value:e,onChange:t,data:a,getItem:d,subscribe:x,onFetchMore:m,onSearch:h,emptyContent:r,status:p,icon:o.jsxRuntimeExports.jsx(f.Rack,{}),...l,children:V0})},pc=({status:e,tooltipLocation:t="right"})=>{const n=j.useRef(null),s=e?.variant??"disabled";return j.useEffect(()=>{if(s!=="success")return;const r=n.current;r&&(r.classList.remove(u.CSS.BEM("rack","heartbeat","beat")),requestAnimationFrame(()=>r.classList.add(u.CSS.BEM("rack","heartbeat","beat"))))},[e]),o.jsxRuntimeExports.jsxs(f.Dialog$1,{location:t,children:[o.jsxRuntimeExports.jsx(f.Summary,{variant:s,hideIcon:!0,level:"small",weight:450,children:e?.message}),o.jsxRuntimeExports.jsx(f.Heart,{ref:n,className:u.CSS.BE("rack","heartbeat"),style:{color:tr[s]}})]})},H0=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:cc,FLUX_STORE_KEY:ac,SelectSingle:F0,StatusIndicator:pc,retrieve:z0,useList:xc},Symbol.toStringTag,{value:"Module"})),mc="tasks",Z0=["start","stop"],K0={channel:P.Ow.SET_CHANNEL_NAME,schema:P.Ow.keyZ,onChange:async({store:e,changed:t,client:n})=>e.tasks.set(t,await n.hardware.tasks.retrieve({key:t,includeStatus:!0}))},Y0={channel:P.Ow.DELETE_CHANNEL_NAME,schema:P.Ow.keyZ,onChange:({store:e,changed:t})=>e.tasks.delete(t)},G0=P.Ow.statusZ(te.z.unknown()),U0={channel:P.Ow.STATUS_CHANNEL_NAME,schema:G0,onChange:async({store:e,changed:t,client:n})=>{if(!e.tasks.has(t.details.task)){const r=await n.hardware.tasks.retrieve({key:t.details.task});e.tasks.set(t.details.task,r)}e.tasks.set(t.details.task,r=>r==null?r:n.hardware.tasks.sugar({...r,status:t}))}},W0={channel:P.Ow.COMMAND_CHANNEL_NAME,schema:P.Ow.commandZ,onChange:({store:e,changed:t,client:n})=>e.tasks.set(t.task,s=>s==null||!Z0.includes(t.type)?s:n.hardware.tasks.sugar({...s,status:{...s.status,variant:"loading",message:`Running ${t.type} command...`,details:{task:t.task,running:!0,data:{}}}}))},X0=e=>{const t=He();j.useEffect(()=>t.tasks.onSet(n=>{n.status!=null&&e(n.status)}),[t])},fc={listeners:[K0,Y0,U0,W0]},wr=async(e,t,n,s)=>{const r=t.tasks.get(n.key);if(r!=null)return r;const i=await e.hardware.tasks.retrieve({...n,includeStatus:!0,schemas:s});return t.tasks.set(n.key,i),i},q0=e=>qe({name:"Task",retrieve:async({client:t,params:n,store:s})=>n.key==null?null:await wr(t,s,{key:n.key,includeStatus:!0},e),mountListeners:({store:t,params:{key:n},onChange:s})=>[t.tasks.onSet(r=>{n==null||r.key!==n||s(r)},n)]}),Q0=Ke({name:"Task",retrieveCached:({store:e})=>e.tasks.list(),retrieve:async({client:e,params:t,store:n})=>{const s=await e.hardware.tasks.retrieve({includeStatus:!0,...t});return s.forEach(r=>n.tasks.set(r.key,r)),s},retrieveByKey:async({client:e,key:t,store:n})=>await wr(e,n,{key:t}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.tasks.onSet(s=>t(s.key,s)),e.tasks.onDelete(n)]}),J0=e=>te.z.object({key:P.Ow.keyZ.optional(),name:te.z.string(),rackKey:te.z.number(),type:e.typeSchema,snapshot:te.z.boolean(),config:e.configSchema,status:P.Ow.statusZ(e.statusDataSchema).optional().nullable()}),Un=e=>({key:e.key,name:e.name,rackKey:e.key==null?0:P.Ow.rackKey(e.key),type:e.type,config:e.config,status:e.status,snapshot:e.snapshot??!1}),ej=({schemas:e,initialValues:t})=>{const n=J0(e),s=Un(t);return Dt({name:"Task",schema:n,initialValues:s,retrieve:async({client:r,store:i,params:{key:l},reset:a})=>{l!=null&&a(Un(await wr(r,i,{key:l},e)))},update:async({client:r,params:i,store:l,...a})=>{const c=a.value(),x=await(await r.hardware.racks.retrieve({key:c.rackKey})).createTask({key:i.key,name:c.name,type:c.type,config:c.config});l.tasks.set(x.key,m=>m==null?m:(x.status=m.status,x));const p=Un(x.payload);a.set("key",p.key),a.set("name",p.name),a.set("rackKey",p.rackKey),a.set("type",p.type),a.set("config",p.config),a.set("snapshot",p.snapshot)},mountListeners:({store:r,get:i,reset:l})=>[r.tasks.onSet(a=>{const c=i("key",{optional:!0})?.value;c==null||c!==a.key||l(Un(a))})]})},tj=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:fc,FLUX_STORE_KEY:mc,createForm:ej,createRetrieveQuery:q0,useList:Q0,useStatusSynchronizer:X0},Symbol.toStringTag,{value:"Module"})),hc="labels",nj={channel:P.Sw.SET_CHANNEL_NAME,schema:P.Sw.labelZ,onChange:({store:e,changed:t})=>e.labels.set(t.key,t)},sj={channel:P.Sw.DELETE_CHANNEL_NAME,schema:P.Sw.keyZ,onChange:({store:e,changed:t})=>e.labels.delete(t)},gc={listeners:[nj,sj]},Xt=(e,t)=>P.ew.matchRelationship(e,{from:t,type:P.Sw.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE}),jc=qe({name:"Labels",retrieve:async({client:e,params:{id:t}})=>await e.labels.retrieve({for:t}),mountListeners:({client:e,store:t,params:{id:n},onChange:s})=>[t.labels.onSet(r=>{s(i=>{const l=i.filter(a=>a.key!==r.key);return l.length===i.length?i:[...l,r]})}),t.labels.onDelete(r=>s(i=>i.filter(l=>l.key!==r))),t.relationships.onSet(async r=>{if(!Xt(r,n))return;const{key:i}=r.to,l=await e.labels.retrieve({key:i});t.labels.set(i,l),s(a=>[...a.filter(c=>c.key!==i),l])}),t.relationships.onDelete(r=>{const i=P.ew.relationshipZ.parse(r);Xt(i,n)&&s(l=>l.filter(a=>a.key!==i.to.key))})]}),br=Ke({name:"Labels",retrieve:async({client:e,params:t})=>await e.labels.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.labels.retrieve({key:t}),mountListeners:({store:e,onChange:t,onDelete:n,params:{keys:s}})=>{const r=s?new Set(s):void 0;return[e.labels.onSet(async i=>{r!=null&&!r.has(i.key)||t(i.key,i,{mode:"prepend"})}),e.labels.onDelete(async i=>n(i))]}}),Ec=P.Sw.labelZ.partial({key:!0}),oj=Dt({name:"Label",initialValues:{name:"",color:"#000000"},schema:Ec,retrieve:async({client:e,params:{key:t},reset:n})=>{t!=null&&n(await e.labels.retrieve({key:t}))},update:async({client:e,value:t,reset:n})=>{const s=await e.labels.create(t());n(s)},mountListeners:({store:e,params:{key:t},reset:n})=>[e.labels.onSet(async s=>{t==null||s.key!==t||n(s)},t)]}),rj=Qe({name:"Label",update:async({client:e,params:{key:t}})=>await e.labels.delete(t)}).useDirect,vr="label",ij=({itemKey:e,...t})=>{const n=f.useItem(e),{selected:s,onSelect:r,hovered:i}=f.useItemState(e);return n==null?null:o.jsxRuntimeExports.jsx(f.Item,{itemKey:e,onSelect:r,selected:s,hovered:i,...t,children:o.jsxRuntimeExports.jsxs(f.Text,{align:"center",children:[o.jsxRuntimeExports.jsx(f.Circle,{color:n?.color,size:"2.5em"}),n?.name]})})},yc=f.renderProp(ij),lj=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t),{onSelect:s}=f.useItemState(t);return n==null?null:o.jsxRuntimeExports.jsx(Ns,{color:n.color,onClose:s,size:"small",children:n.name})}),aj={variant:"text"},cj=({onChange:e,value:t,emptyContent:n,filter:s,initialParams:r,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=br({filter:s,initialParams:r}),{fetchMore:p,search:m}=nt.usePager({retrieve:a});return o.jsxRuntimeExports.jsx(Ms,{resourceName:"Label",haulType:vr,value:t,onChange:e,data:l,getItem:c,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,renderTag:lj,icon:o.jsxRuntimeExports.jsx(f.Label,{}),triggerProps:aj,variant:"floating",...i,children:yc})},uj=({onChange:e,value:t,allowNone:n,emptyContent:s,filter:r,initialParams:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=br({filter:r,initialParams:i}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(Ot,{resourceName:"Label",value:t,onChange:e,data:a,getItem:d,subscribe:x,allowNone:n,onFetchMore:m,onSearch:h,emptyContent:s,status:p,haulType:vr,...l,children:yc})},dj=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:gc,FLUX_STORE_KEY:hc,HAUL_TYPE:vr,SelectMultiple:cj,SelectSingle:uj,formSchema:Ec,matchRelationship:Xt,retrieveLabelsOf:jc,useDelete:rj,useForm:oj,useList:br},Symbol.toStringTag,{value:"Module"})),Is=new Error("Tab not found"),xj=new Error("Invalid Mosaic"),ds=(e,t,n="center",s,r)=>{if(e=Ze(e),s===void 0)return Lo(e,t);const i=Mo(e,s);if(n==="center")return 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,a=i.key*2+1,c=n==="top"||n==="left"?l:a;if(Mo(e,c).key!==i.key)return ds(e,t,"center",c);if(i.tabs==null||i.tabs.length===0)return ds(e,t,"center",s);const[d,x,p]=jj(n);if(i.direction=p,i[d]={key:0,tabs:[t],selected:t.tabKey},i[x]={key:0,tabs:i.tabs,selected:i.selected},i.first==null||i.last==null)throw xj;return i.first.key=l,i.last.key=a,i.tabs=void 0,i.size=void 0,i.selected=void 0,e},pj=(e,t,n)=>{e=Ze(e);const[s,r]=Lt(e,t);if(s==null||r==null)throw Is;return r.tabs=r.tabs?.map(i=>i.tabKey===t?n(i):i),e},Lo=(e,t)=>(e=Ze(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)),xs=e=>{e=Ze(e);const t=[];if(e.tabs!=null&&(e.selected=Me.resetSelection(e.selected,e.tabs),e.selected!=null&&t.push(e.selected)),e.first!=null){const[n,s]=xs(e.first);e.first=n,t.push(...s)}if(e.last!=null){const[n,s]=xs(e.last);e.last=n,t.push(...s)}return[e,t]},_r=(e,t)=>{e=Ze(e);const[,n]=Lt(e,t);if(n==null)return[e,null];n.tabs=n.tabs?.filter(r=>r.tabKey!==t),n.selected=Me.resetSelection(n.selected,n.tabs),e=gj(e);const s=n.selected??ps(e);return[e,s]},ps=e=>e.selected!=null?e.selected:e.first!=null?ps(e.first):e.last!=null?ps(e.last):null,Sc=(e,t)=>{e=Ze(e);const[n,s]=Lt(e,t);if(n==null||s==null)throw Is;return s.selected=t,e},Rc=(e,t,n,s,r)=>{e=Ze(e);const[i,l]=Lt(e,t);if(i==null||l==null)throw Is;const[a,c]=_r(e,t);return[ds(a,i,n,s,r),c]},Cn=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=Cn(e.first,t);if(n!=null)return n}if(e.last!=null){const n=Cn(e.last,t);if(n!=null)return n}},Cc=(e,t,n)=>{const s=ms(e,t);if(s==null)throw new Error("Node not found");return s.size=n,e},mj=(e,t,n)=>{e=Ze(e);const s=Cn(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(x=>x.tabKey===t);if(r===-1)throw new Error("Tab not found in node");const i=s.tabs[r];s.tabs=s.tabs.filter(x=>x.tabKey!==t);const l=s.key*2,c={key:s.key*2+1,tabs:[i],selected:i.tabKey},d={key:l,tabs:s.tabs,selected:s.selected};return d.selected=Me.resetSelection(d.selected,d.tabs),s.direction=n,s.first=d,s.last=c,s.tabs=void 0,s.selected=void 0,e},fj=(e,t)=>{const n=Cn(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},wc=(e,t,n)=>{e=Ze(e);const[,s]=Lt(e,t);if(s?.tabs==null)throw Is;return s.tabs=Me.rename(t,n,s?.tabs??[]),e},hj=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,Mo=(e,t)=>{const n=ms(e,t);if(n!=null)return n;const s=Math.floor(t/2);return s===0?e:Mo(e,s)},gj=e=>{let t=!0;for(;t;)[e,t]=No(e);return e=To(e,1),e},No=e=>{if(e.first==null||e.last==null)return[e,!1];if(_i(e.first))return[vi(e.last),!0];if(_i(e.last))return[vi(e.first),!0];let t,n;return[e.first,t]=No(e.first),[e.last,n]=No(e.last),[e,t||n]},vi=e=>(e.size=void 0,e),_i=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),Lt=(e,t)=>{if(e.tabs!=null){const l=e.tabs.find(a=>a.tabKey===t);if(l!=null)return[l,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,s]=Lt(e.first,t);if(n!=null&&s!=null)return[n,s];const[r,i]=Lt(e.last,t);return[r,i]},ms=(e,t)=>{if(e.key===t)return e;if(e.first==null||e.last==null)return;const n=ms(e.first,t);return n??ms(e.last,t)},jj=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")}},Ze=e=>({...e,first:e.first!=null?Ze(e.first):void 0,last:e.last!=null?Ze(e.last):void 0}),fs=(e,t,n=[])=>(n.push(t(e)),e.first!=null&&fs(e.first,t,n),e.last!=null&&fs(e.last,t,n),n),Po=(e,t)=>{t(e),e.first!=null&&Po(e.first,t),e.last!=null&&Po(e.last,t)},To=(e,t)=>(e=Ze(e),e.key=t,e.first!=null&&(e.first=To(e.first,t*2)),e.last!=null&&(e.last=To(e.last,t*2+1)),e);class bc{parent;stub;el;constructor(t={}){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 Ej=({node:e})=>{const t=j.createRef(),n=j.useRef(e);return j.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)}},[]),j.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})},vc=({node:e,children:t})=>zl.createPortal(t,e.el),yj=Object.freeze(Object.defineProperty({__proto__:null,In:vc,Node:bc,Out:Ej},Symbol.toStringTag,{value:"Module"})),hs=j.memo(({root:e,onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,activeTab:l,emptyContent:a,onSelect:c,onClose:d,onRename:x,onReorder:p,contextMenu:m,addTooltip:h,className:g,...E})=>{const{tabs:S,direction:R,first:v,last:y,key:C,size:_}=e,M={onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,onClose:d,contextMenu:m,onSelect:c,onRename:x,onReorder:p,activeTab:l,addTooltip:h},I=j.useCallback(([$])=>n(C,$),[n]),{props:A}=Ql({direction:R,onResize:I,count:2,initialSizes:_!=null?[_]:void 0});let B={};C==1&&(B={...E,className:u.CSS(u.CSS.B("mosaic"),g)});let z;return S!==void 0?z=o.jsxRuntimeExports.jsx(_c,{root:e,emptyContent:a,...B,...M}):v!=null&&y!=null?z=o.jsxRuntimeExports.jsxs(Jl,{id:`mosaic-${C}`,align:"stretch",...A,...B,children:[o.jsxRuntimeExports.jsx(hs,{...M,root:v,onResize:n},v.key),o.jsxRuntimeExports.jsx(hs,{...M,root:y,onResize:n},y.key)]}):(z=null,console.warn("Mosaic tree is malformed")),z});hs.displayName="Mosaic";const gs="pluto-mosaic-tab-drop",kr="pluto-mosaic-tab-create",Sj=(e,t,n)=>{if(f.filterByType(f.FILE_TYPE,t).length>0&&n)return!0;const r=f.filterByType(gs,t).map(a=>a.key),i=e.filter(a=>!r.includes(a.tabKey)).length>0;return f.filterByType(kr,t).length>0||r.length>0&&(i||e.length===0)},_c=j.memo(({root:e,onDrop:t,onCreate:n,activeTab:s,children:r,className:i,onReorder:l,onFileDrop:a,addTooltip:c,...d})=>{const{key:x,tabs:p}=e,[m,h]=j.useState(null),g=a!=null,E=j.useCallback(({items:B})=>Sj(p,B,g),[p,g]),S=j.useCallback(({items:B,event:z})=>{if(z==null)return[];const $=Cj(z);h(null);const D=f.filterByType(f.FILE_TYPE,B).length>0,{percents:V}=ki(z),b=p.length===0?"center":Li(V);if(D)return a?.(x,b,z),B;const k=f.filterByType(gs,B);if(k.length>0){const N=k.map(({key:F})=>F)[0];t(x,N,b,$)}const L=f.filterByType(kr,B);if(L.length>0){const N=L.map(({key:F})=>F);n?.(x,b,N)}return k},[t,p.length]),R=j.useCallback(({event:B})=>{if(B==null)return;const{percents:z,inSelector:$}=ki(B);let D=null;$||(D=p.length===0?"center":Li(z)),h(D)},[p.length]),{startDrag:v,...y}=f.useDragAndDrop({type:"Mosaic",canDrop:E,onDrop:S,onDragOver:R}),C=E(f.useDraggingState()),_=j.useCallback(()=>h(null),[]),M=j.useCallback((B,{tabKey:z})=>{v([{key:z,type:gs,elementID:B.currentTarget.id}])},[v]),I=j.useCallback(()=>n?.(x,"center"),[x]),A=x==1&&p.length==0;return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:o.jsxRuntimeExports.jsxs(Me.Tabs,{id:`tab-${x}`,tabs:p,className:u.CSS(i,A&&m!=null&&u.CSS.M("drag-over")),onDragLeave:_,selected:e.selected,selectedAltColor:s===e.selected,onDragStart:M,onCreate:I,addTooltip:c,...y,...d,children:[e.selected!=null&&r(p.find(B=>B.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:Rj[m]})]})})});_c.displayName="MosaicTabLeaf";const Rj={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%"}},ki=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}},Cj=e=>{const t=e.target.closest(".pluto-tabs-selector__btn");if(t!=null)return Array.from(t.parentElement?.children??[]).indexOf(t)},wj=e=>e,bj=e=>1-e,Li=({x:e,y:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,s]=[wj(e),bj(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")},vj=({root:e,onSelect:t,children:n})=>{const s=j.useRef(new Map),r=new Set,i=fs(e,l=>l.tabs?.map(a=>{let c=s.current.get(a.tabKey);return a==null?null:(c==null&&(c=new bc({style:"width: 100%; height: 100%; position: relative;"}),c.el.addEventListener("click",()=>t?.(a.tabKey)),s.current.set(a.tabKey,c)),r.add(a.tabKey),o.jsxRuntimeExports.jsx(vc,{node:c,children:n({...a,visible:a.tabKey===l.selected})},a.tabKey))})).flat().filter(l=>l!=null);return s.current.forEach((l,a)=>!r.has(a)&&s.current.delete(a)),[s,i]},Io=te.z.object({key:te.z.number(),tabs:te.z.array(Me.tabZ).optional(),selected:te.z.string().optional(),direction:u.p.direction.optional(),size:te.z.number().optional(),get first(){return Io.optional()},get last(){return Io.optional()}}),_j=({allowRename:e=!1,initialTree:t})=>{const[n,s]=j.useState(t);return j.useEffect(()=>s(xs(t)[0]),[t]),{root:n,onDrop:(d,x,p)=>s(m=>Rc(m,x,p,d)[0]),onClose:d=>s(x=>_r(x,d)[0]),onSelect:d=>s(x=>Sc(x,d)),onResize:(d,x)=>s(p=>Cc(p,d,x)),onRename:e?(d,x)=>s(p=>wc(p,d,x)):void 0}},kj=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:kr,HAUL_DROP_TYPE:gs,Mosaic:hs,autoSelectTabs:xs,canSplit:fj,findSelected:ps,findTabNode:Cn,forEachNode:Po,insertTab:ds,isEmpty:hj,mapNodes:fs,moveTab:Rc,nodeZ:Io,removeTab:_r,renameTab:wc,resizeNode:Cc,selectTab:Sc,split:mj,updateTab:pj,use:_j,usePortal:vj},Symbol.toStringTag,{value:"Module"})),Lj=({variant:e,className:t,...n})=>o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(t,u.CSS.B("note"),u.CSS.M(e)),align:"stretch",empty:!0,...n}),Mj=Object.freeze(Object.defineProperty({__proto__:null,Note:Lj},Symbol.toStringTag,{value:"Module"})),kc="relationships",Lc="resources",Nj={channel:P.ew.RELATIONSHIP_SET_CHANNEL_NAME,schema:P.ew.relationshipZ,onChange:({store:e,changed:t})=>e.relationships.set(P.ew.relationshipToString(t),t)},Pj={channel:P.ew.RELATIONSHIP_DELETE_CHANNEL_NAME,schema:P.ew.relationshipZ,onChange:({store:e,changed:t})=>e.relationships.delete(P.ew.relationshipToString(t))},Mc={listeners:[Nj,Pj]},Tj={channel:P.ew.RESOURCE_SET_CHANNEL_NAME,schema:P.ew.idZ,onChange:async({store:e,changed:t,client:n})=>e.resources.set(P.ew.idToString(t),await n.ontology.retrieve(t))},Ij={channel:P.ew.RESOURCE_DELETE_CHANNEL_NAME,schema:P.ew.idZ,onChange:({store:e,changed:t})=>e.resources.delete(t.key)},Nc={listeners:[Tj,Ij]},Oj=e=>{const t=He();j.useEffect(()=>t.resources.onSet(e),[t.resources])},Aj=e=>{const t=He();j.useEffect(()=>{const n=t.resources.onDelete(async s=>e(P.ew.idZ.parse(s)));return()=>n()},[t.resources])},Dj=e=>{const t=He();j.useEffect(()=>t.relationships.onSet(e),[t.relationships])},Bj=e=>{const t=He();j.useEffect(()=>t.relationships.onDelete(n=>e(P.ew.relationshipZ.parse(n))),[t.relationships])},Pc=e=>Ke({name:"useDependents",retrieve:async({client:t,params:{id:n}})=>n==null?[]:await t.ontology.retrieve([n],{children:e==="to",parents:e==="from"}),retrieveByKey:async({client:t,key:n})=>await t.ontology.retrieve(n),mountListeners:({store:t,onChange:n,onDelete:s,client:r,params:{id:i}})=>[t.relationships.onSet(async l=>{if(P.ew.matchRelationship(l,{type:"parent",[P.ew.oppositeRelationshipDirection(e)]:i})){const a=await r.ontology.retrieve(l[e]);n(a.key,a)}}),t.relationships.onDelete(l=>{const a=P.ew.relationshipZ.parse(l);P.ew.matchRelationship(a,{type:"parent",[P.ew.oppositeRelationshipDirection(e)]:i})&&s(P.ew.idToString(a[e]))}),t.resources.onSet(l=>n(l.key,a=>a==null?null:{...a,...l})),t.resources.onDelete(async l=>s(l))]}),$j=Pc("to"),zj=Ke({name:"useResourceList",retrieveCached:({store:e})=>e.resources.list(),retrieve:async({client:e,params:t,store:n})=>{const s=await e.ontology.retrieve(t);return s.forEach(r=>n.resources.set(r.key,r)),s},retrieveByKey:async({client:e,key:t,store:n})=>{const s=await e.ontology.retrieve(P.ew.idZ.parse(t));return n.resources.set(t,s),s},mountListeners:({store:e,onChange:t,onDelete:n})=>[e.resources.onSet(async s=>t(s.key,s)),e.resources.onDelete(async s=>n(s))]}),Vj=qe({name:"useParentID",retrieve:async({client:e,params:t})=>{const n=await e.ontology.retrieveParents(t.id);if(t.type==null)return n[0].id;const s=n.find(({id:r})=>r.type===t.type);return s==null?null:s.id},mountListeners:({store:e,onChange:t,client:n,params:{id:s}})=>[e.relationships.onSet(async r=>{if(P.ew.matchRelationship(r,{type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:s})){const i=await n.ontology.retrieve(r.from);t(i.id)}else t(null)}),e.relationships.onDelete(async r=>{const i=P.ew.relationshipZ.parse(r);P.ew.matchRelationship(i,{type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:s})&&t(null)})]}),Fj=Object.freeze(Object.defineProperty({__proto__:null,RELATIONSHIPS_FLUX_STORE_KEY:kc,RELATIONSHIP_FLUX_STORE_CONFIG:Mc,RESOURCES_FLUX_STORE_KEY:Lc,RESOURCE_FLUX_STORE_CONFIG:Nc,createDependentsListHook:Pc,retrieveParentID:Vj,useChildren:$j,useRelationshipDeleteSynchronizer:Bj,useRelationshipSetSynchronizer:Dj,useResourceDeleteSynchronizer:Aj,useResourceList:zj,useResourceSetSynchronizer:Oj},Symbol.toStringTag,{value:"Module"})),lo={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"})]})},Hj=({disabled:e=[],className:t,focused:n=!0,onMinimize:s,onMaximize:r,onFullscreen:i,onClose:l,...a})=>o.jsxRuntimeExports.jsxs(f.Box,{gap:1.5,x:!0,className:u.CSS(u.CSS.B("macos-controls"),!n&&u.CSS.BM("macos-controls","blurred"),t),...a,children:[o.jsxRuntimeExports.jsx(ao,{onClick:l,className:u.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:lo.Close}),o.jsxRuntimeExports.jsx(ao,{onClick:s,className:u.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:lo.Minimize}),o.jsxRuntimeExports.jsx(ao,{onClick:i,className:u.CSS.BM("macos-control","maximize"),disabled:e.includes("maximize"),children:lo.Maximize})]}),ao=({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,...s}),Zj=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:s,onFullscreen:r,focused:i,contrast:l=2,...a})=>o.jsxRuntimeExports.jsxs(f.Box,{pack:!0,...a,children:[o.jsxRuntimeExports.jsx(co,{className:u.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),contrast:l,children:o.jsxRuntimeExports.jsx(f.Subtract,{})}),o.jsxRuntimeExports.jsx(co,{className:u.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),contrast:l,children:o.jsxRuntimeExports.jsx(f.Box$1,{})}),o.jsxRuntimeExports.jsx(co,{onClick:s,className:u.CSS.BM("windows-control","close"),disabled:e.includes("close"),contrast:l,children:o.jsxRuntimeExports.jsx(f.Close,{})})]}),co=({disabled:e=!1,className:t,...n})=>e?null:o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.B("windows-control"),t),tabIndex:-1,...n}),Tc=u.S.getOS,Kj="Windows",Yj=({forceOS:e,visibleIfOS:t,...n})=>{const s=Tc({force:e,default:Kj});if(t!=null&&t!==s)return null;const r=s==="macOS"?Hj:Zj;return o.jsxRuntimeExports.jsx(r,{...n})},Gj=Object.freeze(Object.defineProperty({__proto__:null,Controls:Yj,use:Tc},Symbol.toStringTag,{value:"Module"})),Uj=(e,t)=>{const n=s=>o.jsxRuntimeExports.jsx(e,{...t,...s});return n.displayName=e.displayName,n},Wj=Object.freeze(Object.defineProperty({__proto__:null,createComponent:Uj},Symbol.toStringTag,{value:"Module"}));j.createContext({instrumentation:P.O.NOOP});const Xj=({children:e,...t})=>{const{path:n}=f.useUnidirectional({type:P.Provider$1.TYPE,schema:P.providerStateZ,state:t});return o.jsxRuntimeExports.jsx(f.Composite,{path:n,children:e})},qj="groups",Qj={channel:P.Jm.SET_CHANNEL_NAME,schema:P.Jm.groupZ,onChange:({store:e,changed:t})=>e.groups.set(t.key,t)},Jj={channel:P.Jm.DELETE_CHANNEL_NAME,schema:P.Jm.keyZ,onChange:({store:e,changed:t})=>e.groups.delete(t)},e2={listeners:[Qj,Jj]};Qe({name:"Group",update:async({client:e,value:t,params:n})=>await e.ontology.groups.rename(n.key,t)}).useDirect;Qe({name:"Group",update:async({client:e,params:t})=>await e.ontology.groups.delete(t.key)}).useDirect;const t2="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjUgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",Ic="rangeKV",Oc="rangeAliases",wn=async(e,t,n)=>{const s=t.ranges.get(n);if(s!=null)return s;const r=await e.ranges.retrieve({keys:[n],includeParent:!0,includeLabels:!0});return t.ranges.set(n,r[0]),r[0]},n2=async(e,t,n)=>{const s=await e.ranges.retrieve({...n,includeParent:!0,includeLabels:!0});return t.ranges.set(s),s},s2=e=>{const t=He();j.useEffect(()=>t.ranges.onSet(n=>e(n.payload)),[t])},Ac=async(e,t,n,s)=>{if(P.ew.matchRelationship(e,{from:{type:"range"},type:P.Sw.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE,to:{type:"label"}})){let i=s.labels.get(e.to.key);i==null&&(i=await n.labels.retrieve({key:e.to.key}),s.labels.set(e.to.key,i)),t(e.from.key,l=>l==null?l:n.ranges.sugarOne({...l,labels:[...l.labels?.filter(a=>a.key!==e.to.key)??[],i]}))}},Dc=async(e,t,n,s)=>{if(P.ew.matchRelationship(e,{from:{type:"range"},type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}})){const i=await n.ranges.retrieve(e.from.key);s.ranges.set(e.from.key,i),t(e.to.key,l=>l==null?l:n.ranges.sugarOne({...l,parent:i}))}},o2=Ke({name:"Range",retrieve:async({client:e,params:{key:t},store:n})=>{const s=await e.ontology.retrieveChildren(P.Iw.ontologyID(t),{types:["range"]});return s.length===0?[]:await n2(e,n,{keys:s.map(({id:{key:r}})=>r)})},retrieveByKey:async({client:e,key:t,store:n})=>await wn(e,n,t),mountListeners:({store:e,onChange:t,onDelete:n,client:s,params:{key:r}})=>[e.ranges.onSet(i=>{t(i.key,l=>l==null?l:s.ranges.sugarOne({...i,parent:i.parent??l.parent,labels:i.labels??l.labels}))}),e.ranges.onDelete(async i=>n(i)),e.relationships.onSet(async i=>{if(r==null)return;if(await Dc(i,t,s,e),await Ac(i,t,s,e),P.ew.matchRelationship(i,{from:P.Iw.ontologyID(r),type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}})){const a=await s.ranges.retrieve({keys:[i.to.key],includeParent:!0,includeLabels:!0});return t(i.to.key,a[0])}}),e.relationships.onDelete(async i=>{if(r==null)return;const l=P.ew.relationshipZ.parse(i);if(P.ew.matchRelationship(l,{from:P.Iw.ontologyID(r),type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}}))return n(l.to.key);l.type===P.Sw.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE&&t(l.from.key,d=>d==null?d:s.ranges.sugarOne({...d,labels:d.labels?.filter(x=>x.key!==l.to.key)}))})]}),r2=qe({name:"Range",retrieve:async({client:e,params:{id:t}})=>{const s=(await e.ontology.retrieveParents(t)).find(({id:{type:r}})=>r==="range");return s==null?null:e.ranges.sugarOntologyResource(s)},mountListeners:({store:e,onChange:t,client:n,params:{id:s}})=>[e.ranges.onSet(r=>{t(i=>i==null||i.key!==r.key?i:n.ranges.sugarOne({...r,parent:r.parent??i.parent,labels:r.labels??i.labels}))}),e.relationships.onSet(async r=>{if(!P.ew.matchRelationship(r,{type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:s}))return;if(!(r.from.type==="range"))return t(null);const a=await wn(n,e,r.from.key);t(n.ranges.sugarOne(a.payload))}),e.relationships.onDelete(async r=>{const i=P.ew.relationshipZ.parse(r);P.ew.matchRelationship(i,{type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:s})&&t(null),P.ew.matchRelationship(i,{type:P.Sw.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE,to:s})&&t(c=>c==null?c:n.ranges.sugarOne({...c,labels:c.labels?.filter(d=>d.key!==i.to.key)}))})]}),Bc=qe({name:"Range",retrieve:async({client:e,params:{key:t},store:n})=>await wn(e,n,t),mountListeners:({store:e,onChange:t,client:n,params:{key:s}})=>[e.ranges.onSet(async r=>{if(r!=null)return t(r)},s),e.relationships.onSet(async r=>{if(Xt(r,P.Iw.ontologyID(s))){const a=await n.labels.retrieve({key:r.to.key});e.labels.set(r.to.key,a),t(c=>c==null?c:n.ranges.sugarOne({...c,labels:[...(c.labels??[]).filter(d=>d.key!==a.key),a]}))}if(P.ew.matchRelationship(r,{type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:P.Iw.ontologyID(s)})){const a=await n.ranges.retrieve(r.from.key);e.ranges.set(r.from.key,a),t(c=>c==null?c:n.ranges.sugarOne({...c,parent:a}))}},s)]}),i2=Bc.useDirect,$c=te.z.object({...P.Iw.payloadZ.omit({timeRange:!0}).partial({key:!0}).shape,labels:te.z.array(P.Sw.keyZ),parent:te.z.string().optional(),timeRange:te.z.object({start:te.z.number(),end:te.z.number()})}),Oo=async e=>({...e.payload,timeRange:e.timeRange.numeric,parent:e.parent?.key,labels:e.labels?.map(t=>t.key)??[]}),l2={name:"",labels:[],parent:"",timeRange:{start:0,end:0}},a2=Dt({name:"Range",schema:$c,initialValues:l2,retrieve:async({client:e,params:{key:t},store:n,reset:s})=>{t!=null&&s(await Oo(await wn(e,n,t)))},update:async({client:e,value:t,reset:n,store:s})=>{const r=t(),i=r.parent,l=u.O$1.isNonZero(i)?P.Iw.ontologyID(i):void 0,a=await e.ranges.create(r,{parent:l});await e.labels.label(a.ontologyID,r.labels,{replace:!0});const c=s.labels.get(r.labels),d=new Set(c.map(m=>m.key)),x=r.labels.filter(m=>!d.has(m));if(x.length>0){const m=await e.labels.retrieve({keys:x});c.push(...m),s.labels.set(m)}let p=null;u.O$1.isNonZero(i)&&(p=await wn(e,s,i)),s.ranges.set(a.key,e.ranges.sugarOne({...a.payload,labels:c,parent:p?.payload??null})),n({...r,...a.payload,timeRange:a.timeRange.numeric,labels:r.labels,parent:r.parent})},mountListeners:({store:e,reset:t,get:n,set:s})=>[e.ranges.onSet(async r=>{const i=await Oo(r),l=n("key",{optional:!0})?.value;if(l==null||l!==r.key)return;const a=n("parent",{optional:!0})?.value,c=n("labels").value;t({...i,labels:c,parent:a})}),e.relationships.onSet(r=>{const i=n("key",{optional:!0})?.value;if(i==null)return;const l=P.Iw.ontologyID(i);if(Xt(r,l)){const d=n("labels").value;return s("labels",[...d.filter(x=>x!==r.to.key),r.to.key])}P.ew.matchRelationship(r,{type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:l})&&s("parent",r.from.key)}),e.relationships.onDelete(r=>{const i=n("key",{optional:!0})?.value;if(i==null)return;const l=P.ew.relationshipZ.parse(r),a=P.Iw.ontologyID(i);if(Xt(l,a))return s("labels",n("labels").value.filter(x=>x!==l.to.key));if(P.ew.matchRelationship(l,{type:P.ew.PARENT_OF_RELATIONSHIP_TYPE,to:a}))return s("parent",void 0)})]}),c2=e=>jc.useDirect({params:{id:P.Iw.ontologyID(e)}}),u2={includeParent:!0,includeLabels:!0},Lr=Ke({name:"Ranges",retrieveCached:({store:e,params:t})=>e.ranges.get(n=>u.O$1.isNonZero(t.keys)?t.keys.includes(n.key):!0),retrieve:async({client:e,params:t})=>await e.ranges.retrieve({...u2,...t}),retrieveByKey:async({client:e,key:t,store:n})=>{const s=n.ranges.get(t);if(s!=null)return s;const r=await e.ranges.retrieve(t);return n.ranges.set(t,r),r},mountListeners:({store:e,onChange:t,onDelete:n,client:s,params:{keys:r}})=>{const i=r!=null&&r.length>0,l=new Set(r);return[e.ranges.onSet(a=>{i&&!l.has(a.key)||t(a.key,c=>c==null?a:s.ranges.sugarOne({...a.payload,labels:a.labels??c.labels}))}),e.ranges.onDelete(async a=>n(a)),e.relationships.onSet(async a=>{await Dc(a,t,s,e),await Ac(a,t,s,e)})]}}),d2=te.z.object({pairs:te.z.array(te.z.object({key:te.z.string(),value:te.z.string()}))}),zc=te.z.string().transform(e=>e.split("<--->")).transform(([e,t])=>({key:t,range:e})),x2={channel:P.Iw.KV_SET_CHANNEL,schema:P.Iw.kvPairZ,onChange:({store:e,changed:t})=>{e.rangeKV.set(P.Iw.kvPairKey(t),t)}},p2={channel:P.Iw.KV_DELETE_CHANNEL,schema:zc,onChange:({store:e,changed:t})=>e.rangeKV.delete(P.Iw.kvPairKey(t))},Vc={listeners:[x2,p2]},m2=Ke({name:"Range Meta Data",retrieve:async({client:e,params:{rangeKey:t}})=>{const s=await e.ranges.getKV(t).list();return Object.entries(s).map(([r,i])=>({key:r,value:i,range:t}))},retrieveByKey:async({client:e,key:t,params:{rangeKey:n}})=>{if(n==null)return;const r=await e.ranges.getKV(n).get(t);return{key:t,value:r,range:n}},mountListeners:({store:e,onChange:t,onDelete:n,params:{rangeKey:s}})=>[e.rangeKV.onSet(r=>{r.range===s&&t(r.key,r)}),e.rangeKV.onDelete(r=>{const i=zc.parse(r);i.range===s&&n(i.key)})]}),Fc=P.Iw.kvPairZ,f2=Dt({name:"Range Meta Data",schema:Fc,retrieve:async()=>{},update:async({client:e,value:t})=>{const{key:n,value:s,range:r}=t();await e.ranges.getKV(r).set(n,s)},initialValues:{key:"",value:"",range:""}}),h2=Qe({name:"Range Meta Data",update:async({client:e,value:t,params:{rangeKey:n}})=>{await e.ranges.getKV(n).delete(t)}}),g2=Qe({name:"Range Meta Data",update:async({client:e,value:t,onChange:n})=>{await e.ranges.getKV(t.range).set(t.key,t.value),n(t)}}),j2=Qe({name:"Range",update:async({client:e,value:t,onChange:n,store:s})=>{const r=await e.ranges.create(t);s.ranges.set(r.key,r),n(r)}}),E2=Qe({name:"Range",update:async({client:e,value:t,store:n})=>{await e.ranges.delete(t),n.ranges.delete(t)}}),y2={channel:P.Iw.SET_ALIAS_CHANNEL_NAME,schema:P.Iw.aliasZ,onChange:({store:e,changed:t})=>{e.rangeAliases.set(P.Iw.aliasKey(t),t)}},S2=te.z.string().transform(e=>P.Iw.decodeDeleteAliasChange(e)),R2={channel:P.Iw.DELETE_ALIAS_CHANNEL_NAME,schema:S2,onChange:({store:e,changed:t})=>e.rangeAliases.delete(P.Iw.aliasKey(t))},Hc={listeners:[y2,R2]},Zc=({timeRange:e,level:t="p",color:n=9,showSpan:s=!1,...r})=>{const i=new u.r(e.start),l=i.isToday?"time":"dateTime",a=new u.r(e.end),c=a.equals(u.r.MAX),d=a.span(i)<u.i.DAY?"time":"dateTime",x=i.span(a),p=o.jsxRuntimeExports.jsxs(f.Text,{x:!0,align:"center",gap:"small",children:[i.isToday&&o.jsxRuntimeExports.jsx(f.Text,{level:t,color:n,weight:450,children:"Today"}),o.jsxRuntimeExports.jsx(f.DateTime,{el:"span",level:t,displayTZ:"local",format:l,color:n,weight:450,children:i})]}),m=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[c?o.jsxRuntimeExports.jsx(f.Text,{level:t,el:"span",children:"Now"}):o.jsxRuntimeExports.jsx(f.DateTime,{level:t,el:"span",displayTZ:"local",format:d,color:n,weight:450,children:a}),!x.isZero&&s&&o.jsxRuntimeExports.jsxs(f.Text,{level:t,color:n,weight:450,el:"span",children:["(",i.span(a).truncate(u.i.MILLISECOND).toString(),")"]})]});return o.jsxRuntimeExports.jsxs(f.Text,{x:!0,gap:"small",className:u.CSS(u.CSS.B("time-range-chip")),align:"center",level:t,color:n,...r,children:[p,o.jsxRuntimeExports.jsx(f.Arrow.Right,{color:9}),m]})},Mr="range",Nr=j.memo(({itemKey:e,showParent:t=!0,showLabels:n=!0,...s})=>{const r=f.useItem(e);if(r==null)return null;const{name:i,parent:l,timeRange:a,labels:c}=r;return o.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,justify:"between",...s,children:[o.jsxRuntimeExports.jsxs(rr,{children:[o.jsxRuntimeExports.jsx(Rn,{weight:450,color:10,children:i}),l!=null&&t&&o.jsxRuntimeExports.jsx(Rn,{weight:400,color:8,children:l.name})]}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Zc,{level:"small",timeRange:a}),n&&o.jsxRuntimeExports.jsx(sr,{variant:"text",children:c?.map(d=>o.jsxRuntimeExports.jsx(Ns,{color:d.color,size:"small",children:d.name},d.key))})]})]})});Nr.displayName="Ranger.ListItem";const Kc=f.renderProp(Nr),Yc=o.jsxRuntimeExports.jsx(f.Range,{}),C2=({onChange:e,value:t,emptyContent:n,filter:s,initialParams:r,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=Lr({filter:s,initialParams:r}),{fetchMore:p,search:m}=nt.usePager({retrieve:a});return o.jsxRuntimeExports.jsx(Ms,{resourceName:"Range",haulType:Mr,value:t,onChange:e,data:l,getItem:c,icon:Yc,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,...i,children:Kc})},w2={style:{width:800}},b2=({onChange:e,value:t,filter:n,allowNone:s,emptyContent:r,initialParams:i,...l})=>{const{data:a,retrieve:c,subscribe:d,getItem:x,status:p}=Lr({filter:n,initialParams:i}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(Ot,{resourceName:"Range",variant:"modal",value:t,onChange:e,data:a,allowNone:s,haulType:Mr,onFetchMore:m,getItem:x,subscribe:d,status:p,onSearch:h,emptyContent:r,icon:Yc,itemHeight:45,dialogProps:w2,...l,children:Kc})},v2=Object.freeze(Object.defineProperty({__proto__:null,ALIAS_FLUX_STORE_CONFIG:Hc,HAUL_TYPE:Mr,KV_FLUX_STORE_CONFIG:Vc,ListItem:Nr,RANGE_ALIASES_FLUX_STORE_KEY:Oc,RANGE_KV_FLUX_STORE_KEY:Ic,SelectMultiple:C2,SelectSingle:b2,TimeRangeChip:Zc,formSchema:$c,kvPairFormSchema:Fc,metaDataFormSchema:d2,retrieve:Bc,retrieveParent:r2,toFormValues:Oo,useChildren:o2,useDelete:E2,useDeleteKV:h2,useForm:a2,useKVPairForm:f2,useLabels:c2,useList:Lr,useListKV:m2,useRetrieve:i2,useSetSynchronizer:s2,useUpdate:j2,useUpdateKV:g2},Symbol.toStringTag,{value:"Module"})),Gc=({children:e})=>{const{path:t}=f.useUnidirectional({type:O.BaseProvider.TYPE,schema:O.providerStateZ$2,state:{}});return o.jsxRuntimeExports.jsx(f.Composite,{path:t,children:e})},_2=new Set([u.n.UUID,u.n.JSON]),k2=e=>{if(e.equals(u.n.JSON))return o.jsxRuntimeExports.jsx(f.JSON,{});if(e.isInteger)return o.jsxRuntimeExports.jsx(f.Binary,{});if(e.isFloat)return o.jsxRuntimeExports.jsx(f.Decimal,{});if(e.equals(u.n.STRING)||e.equals(u.n.UUID))return o.jsxRuntimeExports.jsx(f.String,{});if(e.equals(u.n.TIMESTAMP))return o.jsxRuntimeExports.jsx(f.Time$1,{})},Uc=u.n.ALL.filter(e=>e!==u.n.UNKNOWN).map(e=>({key:e.toString(),name:_2.has(e)?e.toString().toUpperCase():u.z.capitalize(e.toString()),icon:k2(e)})),L2=Uc.filter(e=>!new u.n(e.key).isVariable),M2=({hideVariableDensity:e=!1,...t})=>{const n=e?L2:Uc;return o.jsxRuntimeExports.jsx(Pn,{...t,data:n,resourceName:"Data Type"})},N2=Object.freeze(Object.defineProperty({__proto__:null,Provider:Gc,SelectDataType:M2},Symbol.toStringTag,{value:"Module"})),P2=e=>{switch(e.variant){case"disabled":return e.details?.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 e.details?.authority===P.gw.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 schematic to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},Wc=({source:e,sink:t,className:n,...s})=>{const r=f.useMemoDeepEqual({source:e,sink:t}),[,{status:i},l]=f.use$2({type:O.Chip.TYPE,schema:O.chipStateZ,initialState:{triggered:!1,...r,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:u.r.now(),details:{}}}});j.useEffect(()=>{l(m=>({...m,...r}))},[r,l]);const a=j.useCallback(()=>l(m=>({...m,triggered:!m.triggered})),[l]),{message:c,chipColor:d,buttonStyle:x,disabled:p}=P2(i);return o.jsxRuntimeExports.jsx(f.Button,{variant:"text",className:u.CSS(u.CSS.B("control-chip"),n),disabled:p,onClick:a,tooltip:o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:c}),style:x,...s,children:o.jsxRuntimeExports.jsx(f.Circle,{color:d})})},Xc=j.createContext({needsControlOf:[]}),qc=()=>j.use(Xc),T2=({children:e,onStatusChange:t,...n})=>{const s=f.useMemoDeepEqual(n),[{path:r},{status:i,needsControlOf:l},a]=f.use$2({type:O.Controller.TYPE,schema:O.controllerStateZ,initialState:s});return j.useEffect(()=>{i!=null&&t?.(i)},[i,t]),j.useEffect(()=>{a(c=>({...c,...s}))},[s,a]),j.useEffect(()=>()=>t?.("released"),[]),o.jsxRuntimeExports.jsxs(Xc,{value:{needsControlOf:l},children:[o.jsxRuntimeExports.jsx(f.Composite,{path:r,children:e}),";"]})},Qc=({colorSource:e,statusSource:t})=>{const n=f.useMemoDeepEqual({colorSource:e,statusSource:t}),[,{color:s,status:r},i]=f.use$2({type:O.Indicator.TYPE,initialState:{...n,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:u.r.now(),details:{color:void 0}}},schema:O.indicatorStateZ});j.useEffect(()=>{i(a=>({...a,...n}))},[n,i]);let l;return r.details?.color!=null?l=u.cr.colorZ.parse(r.details.color):s!=null&&!u.cr.isZero(s)?l=s:l="var(--pluto-gray-l10)",o.jsxRuntimeExports.jsxs(f.Dialog$1,{location:{x:"center",y:"bottom"},children:[o.jsxRuntimeExports.jsx(f.Text,{children:r.message}),o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("indicator"),style:{backgroundColor:u.cr.cssString(l),flexGrow:1}})]})},I2=e=>{const{needsControlOf:t}=qc(),[,{states:n},s]=f.use$2({type:O.Legend.TYPE,schema:O.legendStateZ,initialState:{states:[],needsControlOf:t}});j.useEffect(()=>{s(l=>({...l,needsControlOf:t}))},[t]);const i=u.c.unique(n.map(l=>l.subject.key)).map(l=>{const a=n.find(c=>c.subject.key===l);if(a==null)throw new P.ht("Legend subject not found");return{key:a.subject.key,label:a.subject.name,color:a.subjectColor}});return o.jsxRuntimeExports.jsx(lr,{data:i,...e})},Jc=({children:e})=>{const[{path:t}]=f.use$2({type:O.StateProvider.TYPE,schema:O.stateProviderStateZ,initialState:{}});return o.jsxRuntimeExports.jsx(f.Composite,{path:t,children:e})},O2=Object.freeze(Object.defineProperty({__proto__:null,Chip:Wc,Controller:T2,Indicator:Qc,Legend:I2,StateProvider:Jc,useContext:qc},Symbol.toStringTag,{value:"Module"})),eu=e=>{const t=({disabled:n=!1,...s})=>n?s.children:o.jsxRuntimeExports.jsx(e,{...s});return t.displayName=e.displayName,t},tu="workspaces",A2={channel:P.Dw.SET_CHANNEL_NAME,schema:P.Dw.workspaceZ,onChange:({store:e,changed:t})=>e.workspaces.set(t.key,t)},D2={channel:P.Dw.DELETE_CHANNEL_NAME,schema:P.Dw.keyZ,onChange:({store:e,changed:t})=>e.workspaces.delete(t)},nu={listeners:[A2,D2]},B2=qe({name:"Workspace",retrieve:({params:e,client:t})=>t.workspaces.retrieve(e.key),mountListeners:({store:e,params:t,onChange:n})=>[e.workspaces.onSet(n,t.key)]}),$2=Ke({name:"Workspace",retrieve:async({client:e,params:t})=>await e.workspaces.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.workspaces.retrieve(t),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.workspaces.onSet(s=>t(s.key,s)),e.workspaces.onDelete(n)]}),z2=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:nu,FLUX_STORE_KEY:tu,retrieve:B2,useList:$2},Symbol.toStringTag,{value:"Module"})),V2=eu(Gc),F2=eu(f.Provider$4),su={[O.FLUX_STORE_KEY]:O.FLUX_STORE_CONFIG,[hc]:gc,[ac]:cc,[sc]:oc,[mc]:fc,[tu]:nu,[kc]:Mc,[Lc]:Nc,[Ic]:Vc,[Ya]:Ga,[Oc]:Hc,[qj]:e2},H2=({children:e,connParams:t,workerEnabled:n=!0,workerURL:s,theming:r,tooltip:i,triggers:l,alamos:a,haul:c,telem:d,color:x})=>o.jsxRuntimeExports.jsx(f.Provider$1,{...l,children:o.jsxRuntimeExports.jsx(f.Config,{...i,children:o.jsxRuntimeExports.jsx(f.Provider$2,{...c,children:o.jsxRuntimeExports.jsx(f.Provider$3,{url:s??t2,enabled:n,children:o.jsxRuntimeExports.jsx(F2,{workerKey:"vis",children:o.jsxRuntimeExports.jsx(Xj,{...a,children:o.jsxRuntimeExports.jsx(f.Aggregator,{children:o.jsxRuntimeExports.jsx($a,{connParams:t,children:o.jsxRuntimeExports.jsx(Va,{storeConfig:su,children:o.jsxRuntimeExports.jsx(Pe.Provider,{...x,children:o.jsxRuntimeExports.jsx(f.Provider,{...r,children:o.jsxRuntimeExports.jsx(V2,{...d,children:o.jsxRuntimeExports.jsx(Jc,{children:e})})})})})})})})})})})})}),Z2=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:su,Provider:H2},Symbol.toStringTag,{value:"Module"})),K2=({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}%`}})}),Y2=Object.freeze(Object.defineProperty({__proto__:null,Progress:K2},Symbol.toStringTag,{value:"Module"})),G2=({steps:e,value:t,onChange:n,...s})=>{const r=e.findIndex(i=>i.key===t);return o.jsxRuntimeExports.jsx(f.Box,{x:!0,align:"center",className:u.CSS.B("steps"),...s,children:e.map((i,l)=>o.jsxRuntimeExports.jsxs(j.Fragment,{children:[o.jsxRuntimeExports.jsxs(f.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:l>r,children:[l+1,". ",i.title]},i.key),l!==e.length-1&&o.jsxRuntimeExports.jsx(f.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l10)"}})]},i.key))})},U2=Object.freeze(Object.defineProperty({__proto__:null,Steps:G2},Symbol.toStringTag,{value:"Module"})),W2=({children:e,className:t,visible:n,...s})=>{const[{path:r},,i]=f.use$2({type:O.Table.TYPE,schema:O.Table.stateZ,initialState:{region:u.Ho.ZERO,visible:n}});j.useEffect(()=>{i(a=>({...a,visible:n}))},[n]);const l=Tn(a=>i(c=>({...c,region:a})));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(f.Composite,{path:r,children:e})})})]})},X2=({children:e,className:t,size:n,index:s,onResize:r,onSelect:i,position:l,...a})=>o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),t),...a,children:[r!=null&&o.jsxRuntimeExports.jsx(ru,{onSelect:i,index:s,value:n,onChange:r,position:l,direction:"y"}),e]}),Pr=({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}),ou="ABCDEFGHIJKLMNOPQRSTUVWXYZ",q2=e=>ou[e],ru=({value:e,selected:t=!1,index:n,onChange:s,position:r,direction:i="x",onSelect:l})=>{const a=f.useSyncedRef(e),c=j.useRef(e),d=Pe.useCursorDrag({onStart:j.useCallback(()=>{c.current=a.current},[]),onMove:j.useCallback(x=>s(c.current+u.Ho.dim(x,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),f.CONTEXT_TARGET,t&&f.CONTEXT_SELECTED),style:{[u.p.dimension(i)]:e},onClick:()=>l(n),onContextMenu:()=>l(n),children:[o.jsxRuntimeExports.jsx(f.Text,{full:"x",justify:"center",align:"center",square:!1,children:i==="x"?ou[n]:n+1}),o.jsxRuntimeExports.jsx("button",{onClick:x=>x.stopPropagation(),style:{[u.p.location(i)]:r+e},onDragStart:d,draggable:!0})]})},Q2=({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 a=r;return r+=i,o.jsxRuntimeExports.jsx(ru,{onSelect:t,position:a,selected:e.includes(l),index:l,value:i,onChange:c=>s(c,l),direction:"x"},l)})]})},J2=Object.freeze(Object.defineProperty({__proto__:null,Cell:Pr,ColumnIndicators:Q2,Row:X2,Table:W2,getCellColumn:q2},Symbol.toStringTag,{value:"Module"})),iu=te.z.object({bounds:u.H.bounds,gradient:u.cr.gradientZ}),Tr={bounds:{lower:0,upper:1},gradient:[]},Mi={size:"small",showDragHandle:!1},Ni={width:60},eE=u.C.Scale.scale(0,1),Ir=({path:e})=>{const{set:t,get:n}=rn(),s=fr(`${e}.bounds`),r=eE.scale(s);return o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx($e,{inputProps:Mi,style:Ni,label:"Lower",path:`${e}.bounds.lower`}),o.jsxRuntimeExports.jsx(Ee,{path:`${e}.gradient`,label:"Gradient",align:"start",padHelpText:!1,children:({value:i,onChange:l})=>o.jsxRuntimeExports.jsx(Pe.GradientPicker,{value:P.N.copy(i),scale:r,onChange:a=>{const d={...n(`${e}.bounds`).value},x=a.map(S=>S.position),p=r.pos(Math.max(...x)),m=r.pos(Math.min(...x)),h=p>d.upper,g=m<d.lower;h&&(a[a.length-1].position=1,d.upper=p),g&&(a[0].position=0,d.lower=m);const E=a.map(S=>({...S,color:u.cr.hex(S.color)}));h||g?t(e,{bounds:d,gradient:E}):l(a.map(S=>({...S,color:u.cr.hex(S.color)})))}})}),o.jsxRuntimeExports.jsx($e,{inputProps:Mi,style:Ni,label:"Upper",path:`${e}.bounds.upper`})]})},tE=e=>o.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:u.br.NOTATIONS,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"standard",children:"Standard"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"scientific",children:"Scientific"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"engineering",children:"Engineering"})]}),nE=[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],Or=({path:e})=>{const{value:t,onChange:n}=Et(e),s=O.sourcePipelinePropsZ.parse(t.telem?.props),r=O.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=O.stringifyNumberProps.parse(s.segments.stringifier.props),l=O.rollingAverageProps.parse(s.segments.rollingAverage.props),a=h=>{const g=O.sourcePipeline("string",{connections:nE,segments:{valueStream:O.streamChannelValue({channel:r.channel}),stringifier:O.stringifyNumber({precision:i.precision??2,notation:i.notation}),rollingAverage:O.rollingAverage({windowSize:l.windowSize??1}),...h},outlet:"stringifier"});n({...t,telem:g})},c=h=>a({valueStream:O.streamChannelValue({channel:h??0})}),d=h=>a({stringifier:O.stringifyNumber({...i,notation:h})}),x=h=>a({stringifier:O.stringifyNumber({...i,precision:h})}),p=h=>a({rollingAverage:O.rollingAverage({windowSize:h})});if(typeof r.channel!="number")throw new Error("Must pass in a channel by key to Value.TelemForm");const{data:m}=Rr.useDirect({params:{key:r.channel}});return j.useEffect(()=>{m!=null&&n({...t,tooltip:[m.name]})},[m?.name,n]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Ie.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(kt,{value:r.channel,onChange:c})}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Ie.Item,{label:"Notation",children:o.jsxRuntimeExports.jsx(tE,{value:i.notation,onChange:d})}),o.jsxRuntimeExports.jsx(Ie.Item,{label:"Precision",align:"start",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:x})}),o.jsxRuntimeExports.jsx(Ie.Item,{label:"Averaging Window",align:"start",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:l.windowSize??1,bounds:{lower:1,upper:100},onChange:p})})]})]})},sE=O.Value.z.partial({color:!0}).extend({level:P.levelZ.optional()}),Ar=({aetherKey:e,box:t,telem:n,color:s,precision:r,minWidth:i,level:l="small",backgroundTelem:a,notation:c,location:d,useWidthForBackground:x,valueBackgroundOverScan:p,valueBackgroundShift:m})=>{const h=f.useMemoDeepEqual({box:t,telem:n,color:s,precision:r,level:l,minWidth:i,notation:c,backgroundTelem:a,location:d,useWidthForBackground:x,valueBackgroundOverScan:p,valueBackgroundShift:m}),[,g,E]=f.use$2({aetherKey:e,type:O.Value.TYPE,schema:O.Value.z,initialState:h});return j.useEffect(()=>E(S=>({...S,...h})),[h]),{width:g.width??g.minWidth}},oE=Object.freeze(Object.defineProperty({__proto__:null,RedlineForm:Ir,TelemForm:Or,ZERO_READLINE:Tr,corePropsZ:sE,redlineZ:iu,use:Ar},Symbol.toStringTag,{value:"Module"})),rE="text",lu=te.z.object({value:te.z.string(),level:P.levelZ,weight:P.weightZ,align:u.K$1.x.or(u.K$1.center),backgroundColor:u.cr.crudeZ}),au=({cellKey:e,onChange:t,value:n,selected:s,onSelect:r,align:i,level:l,weight:a,backgroundColor:c})=>{const d=p=>r(e,p),x=p=>t({level:l,value:p,weight:a,align:i,backgroundColor:c});return o.jsxRuntimeExports.jsx(Pr,{id:e,className:u.CSS(f.CONTEXT_TARGET,s&&f.CONTEXT_SELECTED,u.CSS.BEM("table","cell","text")),selected:s,onClick:d,onContextMenu:d,style:{backgroundColor:u.cr.cssString(c)},children:o.jsxRuntimeExports.jsx(f.Editable,{level:l,value:n,weight:a,onChange:x,style:{justifyContent:i},allowEmpty:!0,outline:!1})})},iE="value",cu=te.z.object({telem:O.stringSourceSpecZ,redline:iu,level:P.levelZ,color:te.z.string(),units:te.z.string()}),uu=({cellKey:e,telem:t,level:n,color:s,redline:{gradient:r,bounds:i},selected:l,box:a,onSelect:c})=>{const{width:d}=Ar({aetherKey:e,box:a,telem:t,level:n,color:s,backgroundTelem:O.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:t,scale:O.scaleNumber({scale:u.C.Scale.scale(i).scale(0,1).transform}),gradient:O.colorGradient({gradient:r})},outlet:"gradient"}),location:{x:"center",y:"center"}}),x=p=>c(e,p);return o.jsxRuntimeExports.jsx(Pr,{id:e,selected:l,onClick:x,onContextMenu:x,style:{height:"5rem",width:d},className:u.CSS(f.CONTEXT_TARGET,l&&f.CONTEXT_SELECTED,u.CSS.BEM("table","cell","value"))})},lE={padding:"2rem"},uo=e=>o.jsxRuntimeExports.jsx(f.Box,{...e,style:lE,y:!0}),aE=[{tabKey:"style",name:"Style"},{tabKey:"telem",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],du=({onVariantChange:e})=>{const t=j.useCallback(({tabKey:s})=>{switch(s){case"telem":return o.jsxRuntimeExports.jsx(uo,{children:o.jsxRuntimeExports.jsx(Or,{path:""})});case"redline":return o.jsxRuntimeExports.jsx(uo,{children:o.jsxRuntimeExports.jsx(Ir,{path:"redline"})});default:return o.jsxRuntimeExports.jsx(uo,{children:o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Ie.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Dr,{onChange:e,value:"value"})}),o.jsxRuntimeExports.jsx(Ee,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,path:"color",children:({value:r,onChange:i,variant:l,...a})=>o.jsxRuntimeExports.jsx(Pe.Swatch,{value:r??u.cr.setAlpha(u.cr.ZERO,1),onChange:i,...a,bordered:!0})}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:r,onChange:i,variant:l,...a})=>o.jsxRuntimeExports.jsx(on,{value:r,onChange:i,...a})})]})})}},[]),n=Me.useStatic({tabs:aE,content:t});return o.jsxRuntimeExports.jsx(Me.Tabs,{...n,size:"small"})},cE={padding:"2rem"},xu=({onVariantChange:e})=>o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,style:cE,children:[o.jsxRuntimeExports.jsx(Ie.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Dr,{onChange:e,value:"text"})}),o.jsxRuntimeExports.jsx(hr,{path:"value",label:"Text"}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(on,{value:t,onChange:n,...r})}),o.jsxRuntimeExports.jsx(Ee,{path:"weight",label:"Weight",padHelpText:!1,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(la,{value:t,onChange:n,...r})}),o.jsxRuntimeExports.jsx(Ee,{path:"align",label:"Alignment",hideIfNull:!0,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(pe.SelectAlignment,{value:t,onChange:n,...r})}),o.jsxRuntimeExports.jsx(Ee,{path:"backgroundColor",label:"Background",align:"start",padHelpText:!1,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(Pe.Swatch,{value:t,onChange:n})})]}),uE=[{key:"text",name:"Text",icon:o.jsxRuntimeExports.jsx(f.Text$3,{})},{key:"value",name:"Value",icon:o.jsxRuntimeExports.jsx(f.Channel,{})}],Dr=e=>o.jsxRuntimeExports.jsx(Pn,{...e,data:uE,resourceName:"Variant"}),dE=["text","value"],xE=te.z.enum(dE),pE={key:"value",name:"Value",Form:du,Cell:uu,defaultProps:e=>({telem:O.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:O.streamChannelValue({channel:0}),rollingAverage:O.rollingAverage({windowSize:1}),stringifier:O.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"}),redline:Tr,color:u.cr.hex(e.colors.gray.l10),level:"h5",units:""}),schema:cu},mE={key:"text",name:"Text",Form:xu,Cell:au,defaultProps:()=>({value:"",level:"h5",units:"",weight:400,align:"center",backgroundColor:"#00000000"}),schema:lu},fE={text:mE,value:pE},hE=Object.freeze(Object.defineProperty({__proto__:null,CELLS:fE,SelectVariant:Dr,TEXT_TYPE:rE,Text:au,TextForm:xu,VALUE_TYPE:iE,Value:uu,ValueForm:du,textPropsZ:lu,valuePropsZ:cu,variantZ:xE},Symbol.toStringTag,{value:"Module"})),Pi=({sourcePos:e,targetPos:t,next:n,prev:s})=>{const r=Rt(e,...n);return u.K.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)},Ti=({sourceStumpTip:e,sourceOrientation:t,sourceBox:n,targetStumpTip:s,targetOrientation:r,targetBox:i})=>{if(!gE({sourcePos:e,sourceOrientation:t,targetPos:s}))return;const l=u.p.construct(t),a=u.p.swap(l);let c=wt(a,s[a]-e[a]);const d=u.Ho.loc(n,c);if(u.K$1.swap(t)===r){const x=u.Ho.loc(i,u.K$1.swap(c));Math.abs(d-x)<De&&(c=u.K$1.swap(c))}return{direction:a,length:d-e[a]+Mt(c,De)}},Ao=te.z.object({direction:u.p.direction,length:te.z.number()}),Rt=(e,...t)=>{let n=e;for(const s of t)n=u.K.translate(n,s.direction,s.length);return n},pu=(e,t,n,s)=>{try{let r=e;const i=[e,...t.map(h=>(r=u.K.translate(r,h.direction,h.length),r))];if(!s)return i;const l=t[0],a=wt(l.direction,l.length),c=Ii(a),d=4*(2-n**.5);i[0]=u.K.translate(i[0],{[l.direction]:-1*c*d,[u.p.swap(l.direction)]:0});const x=t[t.length-1],p=wt(x.direction,x.length),m=Ii(p);return i[i.length-1]=u.K.translate(i[i.length-1],{[x.direction]:m*d,[u.p.swap(x.direction)]:0}),i}catch{return[]}},De=10,Ii=e=>e==="top"||e==="left"?-1:1,Mt=(e,t)=>e==="top"||e==="left"?-t:t,wt=(e,t)=>e==="x"?t>0?"right":"left":t>0?"bottom":"top",ht=e=>wt(e.direction,e.length),gE=({sourcePos:e,targetPos:t,sourceOrientation:n})=>{const s=u.p.construct(n),r=t[s]-e[s];return Mt(n,r)<0},Wn=e=>({direction:u.p.construct(e),length:Mt(e,De)}),Oi={top:Wn("top"),bottom:Wn("bottom"),left:Wn("left"),right:Wn("right")},jE=4,EE=.25,Os=e=>Do(yE(Do(e))),yE=e=>{const t=[...e],n=e.findIndex((s,r)=>{const i=Math.abs(s.length);if(i<jE){if(r===0||r===e.length-1)return!1;if(i<EE)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},Do=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,a=r,c=ht(i),d=ht(s);if(c===d)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)===De)return!1;const x=Mt(c,De),p=t[l].length-x,m=t[a].length+p;return Math.abs(m)<De?!1:(t[l]={...t[l],length:x},t[a]={...t[a],length:m},!0)}if(r===e.length-1){const l=r,a=r-1,c=ht(s),d=ht(i);if(c===d)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)===De)return!1;const x=Mt(c,De),p=t[l].length-x,m=t[a].length+p;return Math.abs(m)<De?!1:(t[l]={...t[l],length:x},t[a]={...t[a],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?Do(t):t},Zt=e=>Os(SE(e)),SE=({sourceBox:e,targetBox:t,sourcePos:n,targetPos:s,targetOrientation:r,sourceOrientation:i})=>{let l=i,a=r,c={...Oi[i]},d=Rt(n,c);const x={...Oi[r]};let p=Rt(s,x);const m=Math.abs(d.x-p.x),h=Math.abs(d.y-p.y);m<2*De&&h<10&&(c.length-=m/2,x.length+=m/2,d=Rt(n,c),p=Rt(s,x));const g=[c],E=Ti({sourceStumpTip:d,sourceOrientation:i,sourceBox:e,targetStumpTip:p,targetOrientation:r,targetBox:t});E!=null&&(g.push(E),d=Rt(d,E),l=ht(E),c=E);const S=Ti({sourceStumpTip:p,sourceOrientation:a,sourceBox:t,targetStumpTip:d,targetOrientation:l,targetBox:e});S!=null&&(p=Rt(p,S),a=wt(S.direction,S.length));const R=()=>{S!=null&&(S.length*=-1,g.push(S)),x.length*=-1,g.push(x)};if(u.K$1.swap(l)===r){const I=u.p.construct(l),A=(p[I]-d[I])/2;g.push({direction:I,length:A});const B=u.p.swap(I);return g.push({direction:B,length:p[B]-d[B]}),g.push({direction:I,length:A}),R(),g}const v=p[c.direction]-d[c.direction];let y=u.p.swap(c.direction);const C=d[y]-p[y];let _;wt(c.direction,v)===l&&wt(y,C)===a?_={direction:c.direction,length:v}:(_={direction:y,length:p[y]-d[y]},y=u.p.swap(y)),g.push(_);const M={direction:y,length:p[y]-d[y]};return g.push(M),R(),g},RE=e=>Os(CE(e)),CE=({segments:e,index:t,magnitude:n})=>{const s=[...e],r=s[t],i=u.p.swap(r.direction),l=ht(r);if(t===0){s.unshift({direction:i,length:n});const a=Mt(l,De);s.unshift({direction:r.direction,length:a}),t+=2,s[t]={...s[t],length:s[t].length-a}}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 a=Mt(l,De);s.push({direction:r.direction,length:a}),s[t]={...s[t],length:s[t].length-a}}else s[t+1]={direction:s[t+1].direction,length:s[t+1].length-n};return s},wE=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1},bE=(e,t,n=!1,...s)=>{const r=(i,l)=>!s.includes(l)&&t(i,l);return n?wE(e,r):e.findIndex(r)},vE=({delta:e,segments:t})=>Os(mu(e,t,!1)),_E=({delta:e,segments:t})=>Os(mu(e,t,!0)),mu=(e,t,n)=>{let s=[...t];return e.x!==0&&(s=Di("x",e,s,n)),e.y!==0&&(s=Di("y",e,s,n)),s},Ai=(e,t,n)=>{if(t.direction!==e)return!1;const s={...t,length:t.length-n[e]},r=ht(t),i=ht(s),l=Math.abs(s.length),a=Math.abs(t.length);return(l>a||l>De)&&r===i},Di=(e,t,n,s)=>{const r=u.p.swap(e),i=s?n.length-1:0,l=n[i];if(Ai(e,l,t)){const p=n[n.length-1];return p.direction===e&&Math.abs(l.length)<De?(n[n.length-1]={...p,length:p.length-t[e]},n):(n[i]={...l,length:l.length-t[e]},n)}const a=s?0:n.length-1,d=bE(n,p=>p.direction===e,s,i);if(d===a){const p=n[a];return Ai(e,p,t)?(n[a]={...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[a]={...p,length:p.length-t[e]},n)}if(d===-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 x=n[d];return n[d]={...x,length:x.length-t[e]},n},kE=te.z.object({position:u.K.xy,zoom:te.z.number()}),fu=te.z.object({color:u.cr.crudeZ,variant:te.z.string().optional(),segments:te.z.array(Ao)}),LE=fu.extend({key:te.z.string(),source:te.z.string(),target:te.z.string(),segments:te.z.array(Ao),color:u.cr.crudeZ,id:te.z.string(),data:te.z.object({segments:te.z.array(Ao),color:u.cr.crudeZ,variant:te.z.string().optional()}).optional(),selected:te.z.boolean(),sourceHandle:te.z.string().nullable().optional(),targetHandle:te.z.string().nullable().optional()}),ME=te.z.object({key:te.z.string(),position:u.K.xy,selected:te.z.boolean().optional(),zIndex:te.z.number().optional(),type:te.z.string().optional(),data:u.l.unknownZ.optional(),measured:te.z.object({width:te.z.number().optional(),height:te.z.number().optional()}).optional()}),Br=(e,t)=>e.map(n=>({id:n.key,type:"custom",zIndex:n.zIndex,measured:{...n.measured},position:{...n.position},selected:n.selected,data:{},dragHandle:t})),$r=e=>e.map(({segments:t,color:n,variant:s,...r})=>({...r,id:r.key,data:{segments:t,color:n,variant:s}})),hu=e=>e.map(t=>({key:t.id,...t})),gu=(e,t)=>e.map(n=>(n.data??={segments:[],color:t,variant:"pipe"},{key:n.id,segments:n.data?.segments??[],selected:n.selected??!1,color:n.data?.color??t,variant:n.data?.variant??"pipe",...n})),ju=e=>({...e.position,zoom:e.zoom}),Eu=e=>({position:u.K.construct(e),zoom:e.zoom}),yu=(e,t)=>hu(t(Br(e))),is=(e,t,n)=>gu(t($r(e)),n),NE=(e,t="x")=>{if(e.length===0)return[];const n=u.K$1.construct(t),s=u.K$1.swap(n);return e.sort((r,i)=>u.Ho.loc(r.box,n)-u.Ho.loc(i.box,n)),e.forEach((r,i)=>{if(i===0)return;const a=e[i-1].handles.find(h=>h.orientation===s),c=r.handles.find(h=>h.orientation===n);if(a==null||c==null)return;const d=a.absolutePosition,x=c.absolutePosition,p=u.K.set(u.K.translation(x,d),t,0),m=u.K.translate(u.Ho.topLeft(r.box),p);r.box=u.Ho.construct(m,u.Ho.dims(r.box))}),e};function Le(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=Le(e[n]))!==""&&(t+=(t&&" ")+s);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var PE={value:()=>{}};function As(){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 TE(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=As.prototype={constructor:ls,on:function(e,t){var n=this._,s=TE(e+"",n),r,i=-1,l=s.length;if(arguments.length<2){for(;++i<l;)if((r=(e=s[i]).type)&&(r=IE(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]=Bi(n[r],e.name,t);else if(t==null)for(r in n)n[r]=Bi(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 IE(e,t){for(var n=0,s=e.length,r;n<s;++n)if((r=e[n]).name===t)return r.value}function Bi(e,t,n){for(var s=0,r=e.length;s<r;++s)if(e[s].name===t){e[s]=PE,e=e.slice(0,s).concat(e.slice(s+1));break}return n!=null&&e.push({name:t,value:n}),e}var Bo="http://www.w3.org/1999/xhtml";const $i={svg:"http://www.w3.org/2000/svg",xhtml:Bo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ds(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),$i.hasOwnProperty(t)?{space:$i[t],local:e}:e}function OE(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Bo&&t.documentElement.namespaceURI===Bo?t.createElement(e):t.createElementNS(n,e)}}function AE(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Su(e){var t=Ds(e);return(t.local?AE:OE)(t)}function DE(){}function zr(e){return e==null?DE:function(){return this.querySelector(e)}}function BE(e){typeof e!="function"&&(e=zr(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,a=s[r]=new Array(l),c,d,x=0;x<l;++x)(c=i[x])&&(d=e.call(c,c.__data__,x,i))&&("__data__"in c&&(d.__data__=c.__data__),a[x]=d);return new Fe(s,this._parents)}function $E(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zE(){return[]}function Ru(e){return e==null?zE:function(){return this.querySelectorAll(e)}}function VE(e){return function(){return $E(e.apply(this,arguments))}}function FE(e){typeof e=="function"?e=VE(e):e=Ru(e);for(var t=this._groups,n=t.length,s=[],r=[],i=0;i<n;++i)for(var l=t[i],a=l.length,c,d=0;d<a;++d)(c=l[d])&&(s.push(e.call(c,c.__data__,d,l)),r.push(c));return new Fe(s,r)}function Cu(e){return function(){return this.matches(e)}}function wu(e){return function(t){return t.matches(e)}}var HE=Array.prototype.find;function ZE(e){return function(){return HE.call(this.children,e)}}function KE(){return this.firstElementChild}function YE(e){return this.select(e==null?KE:ZE(typeof e=="function"?e:wu(e)))}var GE=Array.prototype.filter;function UE(){return Array.from(this.children)}function WE(e){return function(){return GE.call(this.children,e)}}function XE(e){return this.selectAll(e==null?UE:WE(typeof e=="function"?e:wu(e)))}function qE(e){typeof e!="function"&&(e=Cu(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,a=s[r]=[],c,d=0;d<l;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&a.push(c);return new Fe(s,this._parents)}function bu(e){return new Array(e.length)}function QE(){return new Fe(this._enter||this._groups.map(bu),this._parents)}function js(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}js.prototype={constructor:js,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 JE(e){return function(){return e}}function e3(e,t,n,s,r,i){for(var l=0,a,c=t.length,d=i.length;l<d;++l)(a=t[l])?(a.__data__=i[l],s[l]=a):n[l]=new js(e,i[l]);for(;l<c;++l)(a=t[l])&&(r[l]=a)}function t3(e,t,n,s,r,i,l){var a,c,d=new Map,x=t.length,p=i.length,m=new Array(x),h;for(a=0;a<x;++a)(c=t[a])&&(m[a]=h=l.call(c,c.__data__,a,t)+"",d.has(h)?r[a]=c:d.set(h,c));for(a=0;a<p;++a)h=l.call(e,i[a],a,i)+"",(c=d.get(h))?(s[a]=c,c.__data__=i[a],d.delete(h)):n[a]=new js(e,i[a]);for(a=0;a<x;++a)(c=t[a])&&d.get(m[a])===c&&(r[a]=c)}function n3(e){return e.__data__}function s3(e,t){if(!arguments.length)return Array.from(this,n3);var n=t?t3:e3,s=this._parents,r=this._groups;typeof e!="function"&&(e=JE(e));for(var i=r.length,l=new Array(i),a=new Array(i),c=new Array(i),d=0;d<i;++d){var x=s[d],p=r[d],m=p.length,h=o3(e.call(x,x&&x.__data__,d,s)),g=h.length,E=a[d]=new Array(g),S=l[d]=new Array(g),R=c[d]=new Array(m);n(x,p,E,S,R,h,t);for(var v=0,y=0,C,_;v<g;++v)if(C=E[v]){for(v>=y&&(y=v+1);!(_=S[y])&&++y<g;);C._next=_||null}}return l=new Fe(l,s),l._enter=a,l._exit=c,l}function o3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function r3(){return new Fe(this._exit||this._groups.map(bu),this._parents)}function i3(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 l3(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),a=new Array(r),c=0;c<l;++c)for(var d=n[c],x=s[c],p=d.length,m=a[c]=new Array(p),h,g=0;g<p;++g)(h=d[g]||x[g])&&(m[g]=h);for(;c<r;++c)a[c]=n[c];return new Fe(a,this._parents)}function a3(){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 c3(e){e||(e=u3);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],a=l.length,c=r[i]=new Array(a),d,x=0;x<a;++x)(d=l[x])&&(c[x]=d);c.sort(t)}return new Fe(r,this._parents).order()}function u3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function d3(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function x3(){return Array.from(this)}function p3(){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 m3(){let e=0;for(const t of this)++e;return e}function f3(){return!this.node()}function h3(e){for(var t=this._groups,n=0,s=t.length;n<s;++n)for(var r=t[n],i=0,l=r.length,a;i<l;++i)(a=r[i])&&e.call(a,a.__data__,i,r);return this}function g3(e){return function(){this.removeAttribute(e)}}function j3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function E3(e,t){return function(){this.setAttribute(e,t)}}function y3(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function S3(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function R3(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 C3(e,t){var n=Ds(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?j3:g3:typeof t=="function"?n.local?R3:S3:n.local?y3:E3)(n,t))}function vu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function w3(e){return function(){this.style.removeProperty(e)}}function b3(e,t,n){return function(){this.style.setProperty(e,t,n)}}function v3(e,t,n){return function(){var s=t.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,n)}}function _3(e,t,n){return arguments.length>1?this.each((t==null?w3:typeof t=="function"?v3:b3)(e,t,n??"")):qt(this.node(),e)}function qt(e,t){return e.style.getPropertyValue(t)||vu(e).getComputedStyle(e,null).getPropertyValue(t)}function k3(e){return function(){delete this[e]}}function L3(e,t){return function(){this[e]=t}}function M3(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function N3(e,t){return arguments.length>1?this.each((t==null?k3:typeof t=="function"?M3:L3)(e,t)):this.node()[e]}function _u(e){return e.trim().split(/^|\s+/)}function Vr(e){return e.classList||new ku(e)}function ku(e){this._node=e,this._names=_u(e.getAttribute("class")||"")}ku.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 Lu(e,t){for(var n=Vr(e),s=-1,r=t.length;++s<r;)n.add(t[s])}function Mu(e,t){for(var n=Vr(e),s=-1,r=t.length;++s<r;)n.remove(t[s])}function P3(e){return function(){Lu(this,e)}}function T3(e){return function(){Mu(this,e)}}function I3(e,t){return function(){(t.apply(this,arguments)?Lu:Mu)(this,e)}}function O3(e,t){var n=_u(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"?I3:t?P3:T3)(n,t))}function A3(){this.textContent=""}function D3(e){return function(){this.textContent=e}}function B3(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function $3(e){return arguments.length?this.each(e==null?A3:(typeof e=="function"?B3:D3)(e)):this.node().textContent}function z3(){this.innerHTML=""}function V3(e){return function(){this.innerHTML=e}}function F3(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function H3(e){return arguments.length?this.each(e==null?z3:(typeof e=="function"?F3:V3)(e)):this.node().innerHTML}function Z3(){this.nextSibling&&this.parentNode.appendChild(this)}function K3(){return this.each(Z3)}function Y3(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function G3(){return this.each(Y3)}function U3(e){var t=typeof e=="function"?e:Su(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function W3(){return null}function X3(e,t){var n=typeof e=="function"?e:Su(e),s=t==null?W3:typeof t=="function"?t:zr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),s.apply(this,arguments)||null)})}function q3(){var e=this.parentNode;e&&e.removeChild(this)}function Q3(){return this.each(q3)}function J3(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function e5(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function t5(e){return this.select(e?e5:J3)}function n5(e){return arguments.length?this.property("__data__",e):this.node().__data__}function s5(e){return function(t){e.call(this,t,this.__data__)}}function o5(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 r5(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 i5(e,t,n){return function(){var s=this.__on,r,i=s5(t);if(s){for(var l=0,a=s.length;l<a;++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 l5(e,t,n){var s=o5(e+""),r,i=s.length,l;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,d=a.length,x;c<d;++c)for(r=0,x=a[c];r<i;++r)if((l=s[r]).type===x.type&&l.name===x.name)return x.value}return}for(a=t?i5:r5,r=0;r<i;++r)this.each(a(s[r],t,n));return this}function Nu(e,t,n){var s=vu(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 a5(e,t){return function(){return Nu(this,e,t)}}function c5(e,t){return function(){return Nu(this,e,t.apply(this,arguments))}}function u5(e,t){return this.each((typeof t=="function"?c5:a5)(e,t))}function*d5(){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 Pu=[null];function Fe(e,t){this._groups=e,this._parents=t}function Dn(){return new Fe([[document.documentElement]],Pu)}function x5(){return this}Fe.prototype=Dn.prototype={constructor:Fe,select:BE,selectAll:FE,selectChild:YE,selectChildren:XE,filter:qE,data:s3,enter:QE,exit:r3,join:i3,merge:l3,selection:x5,order:a3,sort:c3,call:d3,nodes:x3,node:p3,size:m3,empty:f3,each:h3,attr:C3,style:_3,property:N3,classed:O3,text:$3,html:H3,raise:K3,lower:G3,append:U3,insert:X3,remove:Q3,clone:t5,datum:n5,on:l5,dispatch:u5,[Symbol.iterator]:d5};function ze(e){return typeof e=="string"?new Fe([[document.querySelector(e)]],[document.documentElement]):new Fe([[e]],Pu)}function p5(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ge(e,t){if(e=p5(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 m5={passive:!1},bn={capture:!0,passive:!1};function xo(e){e.stopImmediatePropagation()}function Ut(e){e.preventDefault(),e.stopImmediatePropagation()}function Tu(e){var t=e.document.documentElement,n=ze(e).on("dragstart.drag",Ut,bn);"onselectstart"in t?n.on("selectstart.drag",Ut,bn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Iu(e,t){var n=e.document.documentElement,s=ze(e).on("dragstart.drag",null);t&&(s.on("click.drag",Ut,bn),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 $o(e,{sourceEvent:t,subject:n,target:s,identifier:r,active:i,x:l,y:a,dx:c,dy:d,dispatch:x}){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:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:x}})}$o.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function f5(e){return!e.ctrlKey&&!e.button}function h5(){return this.parentNode}function g5(e,t){return t??{x:e.x,y:e.y}}function j5(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ou(){var e=f5,t=h5,n=g5,s=j5,r={},i=As("start","drag","end"),l=0,a,c,d,x,p=0;function m(C){C.on("mousedown.drag",h).filter(s).on("touchstart.drag",S).on("touchmove.drag",R,m5).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(C,_){if(!(x||!e.call(this,C,_))){var M=y(this,t.call(this,C,_),C,_,"mouse");M&&(ze(C.view).on("mousemove.drag",g,bn).on("mouseup.drag",E,bn),Tu(C.view),xo(C),d=!1,a=C.clientX,c=C.clientY,M("start",C))}}function g(C){if(Ut(C),!d){var _=C.clientX-a,M=C.clientY-c;d=_*_+M*M>p}r.mouse("drag",C)}function E(C){ze(C.view).on("mousemove.drag mouseup.drag",null),Iu(C.view,d),Ut(C),r.mouse("end",C)}function S(C,_){if(e.call(this,C,_)){var M=C.changedTouches,I=t.call(this,C,_),A=M.length,B,z;for(B=0;B<A;++B)(z=y(this,I,C,_,M[B].identifier,M[B]))&&(xo(C),z("start",C,M[B]))}}function R(C){var _=C.changedTouches,M=_.length,I,A;for(I=0;I<M;++I)(A=r[_[I].identifier])&&(Ut(C),A("drag",C,_[I]))}function v(C){var _=C.changedTouches,M=_.length,I,A;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),I=0;I<M;++I)(A=r[_[I].identifier])&&(xo(C),A("end",C,_[I]))}function y(C,_,M,I,A,B){var z=i.copy(),$=Ge(B||M,_),D,V,b;if((b=n.call(C,new $o("beforestart",{sourceEvent:M,target:m,identifier:A,active:l,x:$[0],y:$[1],dx:0,dy:0,dispatch:z}),I))!=null)return D=b.x-$[0]||0,V=b.y-$[1]||0,function k(L,N,F){var H=$,K;switch(L){case"start":r[A]=k,K=l++;break;case"end":delete r[A],--l;case"drag":$=Ge(F||N,_),K=l;break}z.call(L,C,new $o(L,{sourceEvent:N,subject:b,target:m,identifier:A,active:K,x:$[0]+D,y:$[1]+V,dx:$[0]-H[0],dy:$[1]-H[1],dispatch:z}),I)}}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 Qt=0,gn=0,pn=0,Au=1e3,Es,jn,ys=0,Nt=0,Bs=0,vn=typeof performance=="object"&&performance.now?performance:Date,Du=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Fr(){return Nt||(Du(E5),Nt=vn.now()+Bs)}function E5(){Nt=0}function Ss(){this._call=this._time=this._next=null}Ss.prototype=Bu.prototype={constructor:Ss,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Fr():+n)+(t==null?0:+t),!this._next&&jn!==this&&(jn?jn._next=this:Es=this,jn=this),this._call=e,this._time=n,zo()},stop:function(){this._call&&(this._call=null,this._time=1/0,zo())}};function Bu(e,t,n){var s=new Ss;return s.restart(e,t,n),s}function y5(){Fr(),++Qt;for(var e=Es,t;e;)(t=Nt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qt}function zi(){Nt=(ys=vn.now())+Bs,Qt=gn=0;try{y5()}finally{Qt=0,R5(),Nt=0}}function S5(){var e=vn.now(),t=e-ys;t>Au&&(Bs-=t,ys=e)}function R5(){for(var e,t=Es,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:Es=n);jn=e,zo(s)}function zo(e){if(!Qt){gn&&(gn=clearTimeout(gn));var t=e-Nt;t>24?(e<1/0&&(gn=setTimeout(zi,e-vn.now()-Bs)),pn&&(pn=clearInterval(pn))):(pn||(ys=vn.now(),pn=setInterval(S5,Au)),Qt=1,Du(zi))}}function Vi(e,t,n){var s=new Ss;return t=t==null?0:+t,s.restart(r=>{s.stop(),e(r+t)},t,n),s}var C5=As("start","end","cancel","interrupt"),w5=[],$u=0,Fi=1,Vo=2,as=3,Hi=4,Fo=5,cs=6;function $s(e,t,n,s,r,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;b5(e,n,{name:t,index:s,group:r,on:C5,tween:w5,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:$u})}function Hr(e,t){var n=Je(e,t);if(n.state>$u)throw new Error("too late; already scheduled");return n}function st(e,t){var n=Je(e,t);if(n.state>as)throw new Error("too late; already running");return n}function Je(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function b5(e,t,n){var s=e.__transition,r;s[t]=n,n.timer=Bu(i,0,n.time);function i(d){n.state=Fi,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var x,p,m,h;if(n.state!==Fi)return c();for(x in s)if(h=s[x],h.name===n.name){if(h.state===as)return Vi(l);h.state===Hi?(h.state=cs,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete s[x]):+x<t&&(h.state=cs,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete s[x])}if(Vi(function(){n.state===as&&(n.state=Hi,n.timer.restart(a,n.delay,n.time),a(d))}),n.state=Vo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Vo){for(n.state=as,r=new Array(m=n.tween.length),x=0,p=-1;x<m;++x)(h=n.tween[x].value.call(e,e.__data__,n.index,n.group))&&(r[++p]=h);r.length=p+1}}function a(d){for(var x=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(c),n.state=Fo,1),p=-1,m=r.length;++p<m;)r[p].call(e,x);n.state===Fo&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=cs,n.timer.stop(),delete s[t];for(var d 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>Vo&&s.state<Fo,s.state=cs,s.timer.stop(),s.on.call(r?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete n[l]}i&&delete e.__transition}}function v5(e){return this.each(function(){us(this,e)})}function _5(e,t){var n,s;return function(){var r=st(this,e),i=r.tween;if(i!==n){s=n=i;for(var l=0,a=s.length;l<a;++l)if(s[l].name===t){s=s.slice(),s.splice(l,1);break}}r.tween=s}}function k5(e,t,n){var s,r;if(typeof n!="function")throw new Error;return function(){var i=st(this,e),l=i.tween;if(l!==s){r=(s=l).slice();for(var a={name:t,value:n},c=0,d=r.length;c<d;++c)if(r[c].name===t){r[c]=a;break}c===d&&r.push(a)}i.tween=r}}function L5(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s=Je(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?_5:k5)(n,e,t))}function Zr(e,t,n){var s=e._id;return e.each(function(){var r=st(this,s);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Je(r,s).value[t]}}function zu(e,t){var n;return(typeof t=="number"?O.interpolateNumber:t instanceof O.color?O.interpolateRgb:(n=O.color(t))?(t=n,O.interpolateRgb):O.interpolateString)(e,t)}function M5(e){return function(){this.removeAttribute(e)}}function N5(e){return function(){this.removeAttributeNS(e.space,e.local)}}function P5(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 T5(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 I5(e,t,n){var s,r,i;return function(){var l,a=n(this),c;return a==null?void this.removeAttribute(e):(l=this.getAttribute(e),c=a+"",l===c?null:l===s&&c===r?i:(r=c,i=t(s=l,a)))}}function O5(e,t,n){var s,r,i;return function(){var l,a=n(this),c;return a==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),c=a+"",l===c?null:l===s&&c===r?i:(r=c,i=t(s=l,a)))}}function A5(e,t){var n=Ds(e),s=n==="transform"?Ug:zu;return this.attrTween(e,typeof t=="function"?(n.local?O5:I5)(n,s,Zr(this,"attr."+e,t)):t==null?(n.local?N5:M5)(n):(n.local?T5:P5)(n,s,t))}function D5(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function B5(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function $5(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&B5(e,i)),n}return r._value=t,r}function z5(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&D5(e,i)),n}return r._value=t,r}function V5(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=Ds(e);return this.tween(n,(s.local?$5:z5)(s,t))}function F5(e,t){return function(){Hr(this,e).delay=+t.apply(this,arguments)}}function H5(e,t){return t=+t,function(){Hr(this,e).delay=t}}function Z5(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?F5:H5)(t,e)):Je(this.node(),t).delay}function K5(e,t){return function(){st(this,e).duration=+t.apply(this,arguments)}}function Y5(e,t){return t=+t,function(){st(this,e).duration=t}}function G5(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?K5:Y5)(t,e)):Je(this.node(),t).duration}function U5(e,t){if(typeof t!="function")throw new Error;return function(){st(this,e).ease=t}}function W5(e){var t=this._id;return arguments.length?this.each(U5(t,e)):Je(this.node(),t).ease}function X5(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;st(this,e).ease=n}}function q5(e){if(typeof e!="function")throw new Error;return this.each(X5(this._id,e))}function Q5(e){typeof e!="function"&&(e=Cu(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,a=s[r]=[],c,d=0;d<l;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&a.push(c);return new at(s,this._parents,this._name,this._id)}function J5(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),a=0;a<i;++a)for(var c=t[a],d=n[a],x=c.length,p=l[a]=new Array(x),m,h=0;h<x;++h)(m=c[h]||d[h])&&(p[h]=m);for(;a<s;++a)l[a]=t[a];return new at(l,this._parents,this._name,this._id)}function ey(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 ty(e,t,n){var s,r,i=ey(t)?Hr:st;return function(){var l=i(this,e),a=l.on;a!==s&&(r=(s=a).copy()).on(t,n),l.on=r}}function ny(e,t){var n=this._id;return arguments.length<2?Je(this.node(),n).on.on(e):this.each(ty(n,e,t))}function sy(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function oy(){return this.on("end.remove",sy(this._id))}function ry(e){var t=this._name,n=this._id;typeof e!="function"&&(e=zr(e));for(var s=this._groups,r=s.length,i=new Array(r),l=0;l<r;++l)for(var a=s[l],c=a.length,d=i[l]=new Array(c),x,p,m=0;m<c;++m)(x=a[m])&&(p=e.call(x,x.__data__,m,a))&&("__data__"in x&&(p.__data__=x.__data__),d[m]=p,$s(d[m],t,n,m,d,Je(x,n)));return new at(i,this._parents,t,n)}function iy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ru(e));for(var s=this._groups,r=s.length,i=[],l=[],a=0;a<r;++a)for(var c=s[a],d=c.length,x,p=0;p<d;++p)if(x=c[p]){for(var m=e.call(x,x.__data__,p,c),h,g=Je(x,n),E=0,S=m.length;E<S;++E)(h=m[E])&&$s(h,t,n,E,m,g);i.push(m),l.push(x)}return new at(i,l,t,n)}var ly=Dn.prototype.constructor;function ay(){return new ly(this._groups,this._parents)}function cy(e,t){var n,s,r;return function(){var i=qt(this,e),l=(this.style.removeProperty(e),qt(this,e));return i===l?null:i===n&&l===s?r:r=t(n=i,s=l)}}function Vu(e){return function(){this.style.removeProperty(e)}}function uy(e,t,n){var s,r=n+"",i;return function(){var l=qt(this,e);return l===r?null:l===s?i:i=t(s=l,n)}}function dy(e,t,n){var s,r,i;return function(){var l=qt(this,e),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(e),qt(this,e))),l===c?null:l===s&&c===r?i:(r=c,i=t(s=l,a))}}function xy(e,t){var n,s,r,i="style."+t,l="end."+i,a;return function(){var c=st(this,e),d=c.on,x=c.value[i]==null?a||(a=Vu(t)):void 0;(d!==n||r!==x)&&(s=(n=d).copy()).on(l,r=x),c.on=s}}function py(e,t,n){var s=(e+="")=="transform"?Gg:zu;return t==null?this.styleTween(e,cy(e,s)).on("end.style."+e,Vu(e)):typeof t=="function"?this.styleTween(e,dy(e,s,Zr(this,"style."+e,t))).each(xy(this._id,e)):this.styleTween(e,uy(e,s,t),n).on("end.style."+e,null)}function my(e,t,n){return function(s){this.style.setProperty(e,t.call(this,s),n)}}function fy(e,t,n){var s,r;function i(){var l=t.apply(this,arguments);return l!==r&&(s=(r=l)&&my(e,l,n)),s}return i._value=t,i}function hy(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,fy(e,t,n??""))}function gy(e){return function(){this.textContent=e}}function jy(e){return function(){var t=e(this);this.textContent=t??""}}function Ey(e){return this.tween("text",typeof e=="function"?jy(Zr(this,"text",e)):gy(e==null?"":e+""))}function yy(e){return function(t){this.textContent=e.call(this,t)}}function Sy(e){var t,n;function s(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&yy(r)),t}return s._value=e,s}function Ry(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,Sy(e))}function Cy(){for(var e=this._name,t=this._id,n=Fu(),s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],a=l.length,c,d=0;d<a;++d)if(c=l[d]){var x=Je(c,t);$s(c,e,n,d,l,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new at(s,this._parents,e,n)}function wy(){var e,t,n=this,s=n._id,r=n.size();return new Promise(function(i,l){var a={value:l},c={value:function(){--r===0&&i()}};n.each(function(){var d=st(this,s),x=d.on;x!==e&&(t=(e=x).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),d.on=t}),r===0&&i()})}var by=0;function at(e,t,n,s){this._groups=e,this._parents=t,this._name=n,this._id=s}function Fu(){return++by}var ot=Dn.prototype;at.prototype={constructor:at,select:ry,selectAll:iy,selectChild:ot.selectChild,selectChildren:ot.selectChildren,filter:Q5,merge:J5,selection:ay,transition:Cy,call:ot.call,nodes:ot.nodes,node:ot.node,size:ot.size,empty:ot.empty,each:ot.each,on:ny,attr:A5,attrTween:V5,style:py,styleTween:hy,text:Ey,textTween:Ry,remove:oy,tween:L5,delay:Z5,duration:G5,ease:W5,easeVarying:q5,end:wy,[Symbol.iterator]:ot[Symbol.iterator]};function vy(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var _y={time:null,delay:0,duration:250,ease:vy};function ky(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 Ly(e){var t,n;e instanceof at?(t=e._id,e=e._name):(t=Fu(),(n=_y).time=Fr(),e=e==null?null:e+"");for(var s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],a=l.length,c,d=0;d<a;++d)(c=l[d])&&$s(c,e,t,d,l,n||ky(c,t));return new at(s,this._parents,e,t)}Dn.prototype.interrupt=v5;Dn.prototype.transition=Ly;const qn=e=>()=>e;function My(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 it(e,t,n){this.k=e,this.x=t,this.y=n}it.prototype={constructor:it,scale:function(e){return e===1?this:new it(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new it(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 zs=new it(1,0,0);Hu.prototype=it.prototype;function Hu(e){for(;!e.__zoom;)if(!(e=e.parentNode))return zs;return e.__zoom}function po(e){e.stopImmediatePropagation()}function mn(e){e.preventDefault(),e.stopImmediatePropagation()}function Ny(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Py(){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 Zi(){return this.__zoom||zs}function Ty(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Iy(){return navigator.maxTouchPoints||"ontouchstart"in this}function Oy(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 Zu(){var e=Ny,t=Py,n=Oy,s=Ty,r=Iy,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],a=250,c=rs,d=As("start","zoom","end"),x,p,m,h=500,g=150,E=0,S=10;function R(b){b.property("__zoom",Zi).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",z).filter(r).on("touchstart.zoom",$).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}R.transform=function(b,k,L,N){var F=b.selection?b.selection():b;F.property("__zoom",Zi),b!==F?_(b,k,L,N):F.interrupt().each(function(){M(this,arguments).event(N).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},R.scaleBy=function(b,k,L,N){R.scaleTo(b,function(){var F=this.__zoom.k,H=typeof k=="function"?k.apply(this,arguments):k;return F*H},L,N)},R.scaleTo=function(b,k,L,N){R.transform(b,function(){var F=t.apply(this,arguments),H=this.__zoom,K=L==null?C(F):typeof L=="function"?L.apply(this,arguments):L,Z=H.invert(K),Y=typeof k=="function"?k.apply(this,arguments):k;return n(y(v(H,Y),K,Z),F,l)},L,N)},R.translateBy=function(b,k,L,N){R.transform(b,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof L=="function"?L.apply(this,arguments):L),t.apply(this,arguments),l)},null,N)},R.translateTo=function(b,k,L,N,F){R.transform(b,function(){var H=t.apply(this,arguments),K=this.__zoom,Z=N==null?C(H):typeof N=="function"?N.apply(this,arguments):N;return n(zs.translate(Z[0],Z[1]).scale(K.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof L=="function"?-L.apply(this,arguments):-L),H,l)},N,F)};function v(b,k){return k=Math.max(i[0],Math.min(i[1],k)),k===b.k?b:new it(k,b.x,b.y)}function y(b,k,L){var N=k[0]-L[0]*b.k,F=k[1]-L[1]*b.k;return N===b.x&&F===b.y?b:new it(b.k,N,F)}function C(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function _(b,k,L,N){b.on("start.zoom",function(){M(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){M(this,arguments).event(N).end()}).tween("zoom",function(){var F=this,H=arguments,K=M(F,H).event(N),Z=t.apply(F,H),Y=L==null?C(Z):typeof L=="function"?L.apply(F,H):L,ne=Math.max(Z[1][0]-Z[0][0],Z[1][1]-Z[0][1]),J=F.__zoom,ce=typeof k=="function"?k.apply(F,H):k,le=c(J.invert(Y).concat(ne/J.k),ce.invert(Y).concat(ne/ce.k));return function(se){if(se===1)se=ce;else{var ee=le(se),re=ne/ee[2];se=new it(re,Y[0]-ee[0]*re,Y[1]-ee[1]*re)}K.zoom(null,se)}})}function M(b,k,L){return!L&&b.__zooming||new I(b,k)}function I(b,k){this.that=b,this.args=k,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,k),this.taps=0}I.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,k){return this.mouse&&b!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&b!=="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(b){var k=ze(this.that).datum();d.call(b,this.that,new My(b,{sourceEvent:this.sourceEvent,target:R,transform:this.that.__zoom,dispatch:d}),k)}};function A(b,...k){if(!e.apply(this,arguments))return;var L=M(this,k).event(b),N=this.__zoom,F=Math.max(i[0],Math.min(i[1],N.k*Math.pow(2,s.apply(this,arguments)))),H=Ge(b);if(L.wheel)(L.mouse[0][0]!==H[0]||L.mouse[0][1]!==H[1])&&(L.mouse[1]=N.invert(L.mouse[0]=H)),clearTimeout(L.wheel);else{if(N.k===F)return;L.mouse=[H,N.invert(H)],us(this),L.start()}mn(b),L.wheel=setTimeout(K,g),L.zoom("mouse",n(y(v(N,F),L.mouse[0],L.mouse[1]),L.extent,l));function K(){L.wheel=null,L.end()}}function B(b,...k){if(m||!e.apply(this,arguments))return;var L=b.currentTarget,N=M(this,k,!0).event(b),F=ze(b.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",ne,!0),H=Ge(b,L),K=b.clientX,Z=b.clientY;Tu(b.view),po(b),N.mouse=[H,this.__zoom.invert(H)],us(this),N.start();function Y(J){if(mn(J),!N.moved){var ce=J.clientX-K,le=J.clientY-Z;N.moved=ce*ce+le*le>E}N.event(J).zoom("mouse",n(y(N.that.__zoom,N.mouse[0]=Ge(J,L),N.mouse[1]),N.extent,l))}function ne(J){F.on("mousemove.zoom mouseup.zoom",null),Iu(J.view,N.moved),mn(J),N.event(J).end()}}function z(b,...k){if(e.apply(this,arguments)){var L=this.__zoom,N=Ge(b.changedTouches?b.changedTouches[0]:b,this),F=L.invert(N),H=L.k*(b.shiftKey?.5:2),K=n(y(v(L,H),N,F),t.apply(this,k),l);mn(b),a>0?ze(this).transition().duration(a).call(_,K,N,b):ze(this).call(R.transform,K,N,b)}}function $(b,...k){if(e.apply(this,arguments)){var L=b.touches,N=L.length,F=M(this,k,b.changedTouches.length===N).event(b),H,K,Z,Y;for(po(b),K=0;K<N;++K)Z=L[K],Y=Ge(Z,this),Y=[Y,this.__zoom.invert(Y),Z.identifier],F.touch0?!F.touch1&&F.touch0[2]!==Y[2]&&(F.touch1=Y,F.taps=0):(F.touch0=Y,H=!0,F.taps=1+!!x);x&&(x=clearTimeout(x)),H&&(F.taps<2&&(p=Y[0],x=setTimeout(function(){x=null},h)),us(this),F.start())}}function D(b,...k){if(this.__zooming){var L=M(this,k).event(b),N=b.changedTouches,F=N.length,H,K,Z,Y;for(mn(b),H=0;H<F;++H)K=N[H],Z=Ge(K,this),L.touch0&&L.touch0[2]===K.identifier?L.touch0[0]=Z:L.touch1&&L.touch1[2]===K.identifier&&(L.touch1[0]=Z);if(K=L.that.__zoom,L.touch1){var ne=L.touch0[0],J=L.touch0[1],ce=L.touch1[0],le=L.touch1[1],se=(se=ce[0]-ne[0])*se+(se=ce[1]-ne[1])*se,ee=(ee=le[0]-J[0])*ee+(ee=le[1]-J[1])*ee;K=v(K,Math.sqrt(se/ee)),Z=[(ne[0]+ce[0])/2,(ne[1]+ce[1])/2],Y=[(J[0]+le[0])/2,(J[1]+le[1])/2]}else if(L.touch0)Z=L.touch0[0],Y=L.touch0[1];else return;L.zoom("touch",n(y(K,Z,Y),L.extent,l))}}function V(b,...k){if(this.__zooming){var L=M(this,k).event(b),N=b.changedTouches,F=N.length,H,K;for(po(b),m&&clearTimeout(m),m=setTimeout(function(){m=null},h),H=0;H<F;++H)K=N[H],L.touch0&&L.touch0[2]===K.identifier?delete L.touch0:L.touch1&&L.touch1[2]===K.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(K=Ge(K,this),Math.hypot(p[0]-K[0],p[1]-K[1])<S)){var Z=ze(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return R.wheelDelta=function(b){return arguments.length?(s=typeof b=="function"?b:qn(+b),R):s},R.filter=function(b){return arguments.length?(e=typeof b=="function"?b:qn(!!b),R):e},R.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:qn(!!b),R):r},R.extent=function(b){return arguments.length?(t=typeof b=="function"?b:qn([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),R):t},R.scaleExtent=function(b){return arguments.length?(i[0]=+b[0],i[1]=+b[1],R):[i[0],i[1]]},R.translateExtent=function(b){return arguments.length?(l[0][0]=+b[0][0],l[1][0]=+b[1][0],l[0][1]=+b[0][1],l[1][1]=+b[1][1],R):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},R.constrain=function(b){return arguments.length?(n=b,R):n},R.duration=function(b){return arguments.length?(a=+b,R):a},R.interpolate=function(b){return arguments.length?(c=b,R):c},R.on=function(){var b=d.on.apply(d,arguments);return b===d?R:b},R.clickDistance=function(b){return arguments.length?(E=(b=+b)*b,R):Math.sqrt(E)},R.tapDistance=function(b){return arguments.length?(S=+b,R):S},R}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."},_n=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ku=["Enter"," ","Escape"],Yu={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Pt;(function(e){e.Strict="strict",e.Loose="loose"})(Pt||(Pt={}));var bt;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(bt||(bt={}));var Jt;(function(e){e.Partial="partial",e.Full="full"})(Jt||(Jt={}));const Gu={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var ft;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ft||(ft={}));var Rs;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Rs||(Rs={}));var Q;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Q||(Q={}));const Ki={[Q.Left]:Q.Right,[Q.Right]:Q.Left,[Q.Top]:Q.Bottom,[Q.Bottom]:Q.Top};function Uu(e){return e===null?null:e?"valid":"invalid"}const Wu=e=>"id"in e&&"source"in e&&"target"in e,Ay=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Kr=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Bn=(e,t=[0,0])=>{const{width:n,height:s}=ut(e),r=e.origin??t,i=n*r[0],l=s*r[1];return{x:e.position.x-i,y:e.position.y-l}},Dy=(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):Kr(r)?r:t.nodeLookup.get(r.id));const a=l?Cs(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Vs(s,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Fs(n)},$n=(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=Cs(s);n=Vs(n,r)}}),Fs(n)},Yr=(e,t,[n,s,r]=[0,0,1],i=!1,l=!1)=>{const a={...zn(t,[n,s,r]),width:t.width/r,height:t.height/r},c=[];for(const d of e.values()){const{measured:x,selectable:p=!0,hidden:m=!1}=d;if(l&&!p||m)continue;const h=x.width??d.width??d.initialWidth??null,g=x.height??d.height??d.initialHeight??null,E=kn(a,tn(d)),S=(h??0)*(g??0),R=i&&E>0;(!d.internals.handleBounds||R||E>=S||d.dragging)&&c.push(d)}return c},By=(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 $y(e,t){const n=new Map,s=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!s||s.has(r.id))&&n.set(r.id,r)}),n}async function zy({nodes:e,width:t,height:n,panZoom:s,minZoom:r,maxZoom:i},l){if(e.size===0)return Promise.resolve(!0);const a=$y(e,l),c=$n(a),d=Gr(c,t,n,l?.minZoom??r,l?.maxZoom??i,l?.padding??.1);return await s.setViewport(d,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function Xu({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:s=[0,0],nodeExtent:r,onError:i}){const l=n.get(e),a=l.parentId?n.get(l.parentId):void 0,{x:c,y:d}=a?a.internals.positionAbsolute:{x:0,y:0},x=l.origin??s;let p=r;if(l.extent==="parent"&&!l.expandParent)if(!a)i?.("005",Oe.error005());else{const h=a.measured.width,g=a.measured.height;h&&g&&(p=[[c,d],[c+h,d+g]])}else a&&nn(l.extent)&&(p=[[l.extent[0][0]+c,l.extent[0][1]+d],[l.extent[1][0]+c,l.extent[1][1]+d]]);const m=nn(p)?Tt(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&i?.("015",Oe.error015()),{position:{x:m.x-c+(l.measured.width??0)*x[0],y:m.y-d+(l.measured.height??0)*x[1]},positionAbsolute:m}}async function Vy({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 h=i.has(m.id),g=!h&&m.parentId&&l.find(E=>E.id===m.parentId);(h||g)&&l.push(m)}const a=new Set(t.map(m=>m.id)),c=s.filter(m=>m.deletable!==!1),x=By(l,c);for(const m of c)a.has(m.id)&&!x.find(g=>g.id===m.id)&&x.push(m);if(!r)return{edges:x,nodes:l};const p=await r({nodes:l,edges:x});return typeof p=="boolean"?p?{edges:x,nodes:l}:{edges:[],nodes:[]}:p}const en=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Tt=(e={x:0,y:0},t,n)=>({x:en(e.x,t[0][0],t[1][0]-(n?.width??0)),y:en(e.y,t[0][1],t[1][1]-(n?.height??0))});function qu(e,t,n){const{width:s,height:r}=ut(n),{x:i,y:l}=n.internals.positionAbsolute;return Tt(e,[[i,l],[i+s,l+r]],t)}const Yi=(e,t,n)=>e<t?en(Math.abs(e-t),1,t)/t:e>n?-en(Math.abs(e-n),1,t)/t:0,Qu=(e,t,n=15,s=40)=>{const r=Yi(e.x,s,t.width-s)*n,i=Yi(e.y,s,t.height-s)*n;return[r,i]},Vs=(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)}),Ho=({x:e,y:t,width:n,height:s})=>({x:e,y:t,x2:e+n,y2:t+s}),Fs=({x:e,y:t,x2:n,y2:s})=>({x:e,y:t,width:n-e,height:s-t}),tn=(e,t=[0,0])=>{const{x:n,y:s}=Kr(e)?e.internals.positionAbsolute:Bn(e,t);return{x:n,y:s,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Cs=(e,t=[0,0])=>{const{x:n,y:s}=Kr(e)?e.internals.positionAbsolute:Bn(e,t);return{x:n,y:s,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:s+(e.measured?.height??e.height??e.initialHeight??0)}},Ju=(e,t)=>Fs(Vs(Ho(e),Ho(t))),kn=(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)},Gi=e=>Ue(e.width)&&Ue(e.height)&&Ue(e.x)&&Ue(e.y),Ue=e=>!isNaN(e)&&isFinite(e),ws=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},Hs=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),zn=({x:e,y:t},[n,s,r],i=!1,l=[1,1])=>{const a={x:(e-n)/r,y:(t-s)/r};return i?Hs(a,l):a},bs=({x:e,y:t},[n,s,r])=>({x:e*r+n,y:t*r+s});function Ht(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);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 Fy(e,t,n){if(typeof e=="string"||typeof e=="number"){const s=Ht(e,n),r=Ht(e,t);return{top:s,right:r,bottom:s,left:r,x:r*2,y:s*2}}if(typeof e=="object"){const s=Ht(e.top??e.y??0,n),r=Ht(e.bottom??e.y??0,n),i=Ht(e.left??e.x??0,t),l=Ht(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 Hy(e,t,n,s,r,i){const{x:l,y:a}=bs(e,[t,n,s]),{x:c,y:d}=bs({x:e.x+e.width,y:e.y+e.height},[t,n,s]),x=r-c,p=i-d;return{left:Math.floor(l),top:Math.floor(a),right:Math.floor(x),bottom:Math.floor(p)}}const Gr=(e,t,n,s,r,i)=>{const l=Fy(i,t,n),a=(t-l.x)/e.width,c=(n-l.y)/e.height,d=Math.min(a,c),x=en(d,s,r),p=e.x+e.width/2,m=e.y+e.height/2,h=t/2-p*x,g=n/2-m*x,E=Hy(e,h,g,x,t,n),S={left:Math.min(E.left-l.left,0),top:Math.min(E.top-l.top,0),right:Math.min(E.right-l.right,0),bottom:Math.min(E.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:g-S.top+S.bottom,zoom:x}},vs=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function nn(e){return e!==void 0&&e!=="parent"}function ut(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function ed(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function td(e,t={width:0,height:0},n,s,r){const i={...e},l=s.get(n);if(l){const a=l.origin||r;i.x+=l.internals.positionAbsolute.x-(t.width??0)*a[0],i.y+=l.internals.positionAbsolute.y-(t.height??0)*a[1]}return i}function Ui(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Zy(){let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}}function Ky(e){return{...Yu,...e||{}}}function yn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:s,containerBounds:r}){const{x:i,y:l}=tt(e),a=zn({x:i-(r?.left??0),y:l-(r?.top??0)},s),{x:c,y:d}=n?Hs(a,t):a;return{xSnapped:c,ySnapped:d,...a}}const Ur=e=>({width:e.offsetWidth,height:e.offsetHeight}),nd=e=>e?.getRootNode?.()||window?.document,Yy=["INPUT","SELECT","TEXTAREA"];function sd(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Yy.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const od=e=>"clientX"in e,tt=(e,t)=>{const n=od(e),s=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:s-(t?.left??0),y:r-(t?.top??0)}},Wi=(e,t,n,s,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(l=>{const a=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:r,position:l.getAttribute("data-handlepos"),x:(a.left-n.left)/s,y:(a.top-n.top)/s,...Ur(l)}})};function rd({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:r,sourceControlY:i,targetControlX:l,targetControlY:a}){const c=e*.125+r*.375+l*.375+n*.125,d=t*.125+i*.375+a*.375+s*.125,x=Math.abs(c-e),p=Math.abs(d-t);return[c,d,x,p]}function Qn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Xi({pos:e,x1:t,y1:n,x2:s,y2:r,c:i}){switch(e){case Q.Left:return[t-Qn(t-s,i),n];case Q.Right:return[t+Qn(s-t,i),n];case Q.Top:return[t,n-Qn(n-r,i)];case Q.Bottom:return[t,n+Qn(r-n,i)]}}function id({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:s,targetY:r,targetPosition:i=Q.Top,curvature:l=.25}){const[a,c]=Xi({pos:n,x1:e,y1:t,x2:s,y2:r,c:l}),[d,x]=Xi({pos:i,x1:s,y1:r,x2:e,y2:t,c:l}),[p,m,h,g]=rd({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:a,sourceControlY:c,targetControlX:d,targetControlY:x});return[`M${e},${t} C${a},${c} ${d},${x} ${s},${r}`,p,m,h,g]}function ld({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,a=s<t?s+l:s-l;return[i,a,r,l]}function Gy({sourceNode:e,targetNode:t,selected:n=!1,zIndex:s,elevateOnSelect:r=!1}){if(s!==void 0)return s;const i=r&&n?1e3:0,l=Math.max(e.parentId?e.internals.z:0,t.parentId?t.internals.z:0);return i+l}function Uy({sourceNode:e,targetNode:t,width:n,height:s,transform:r}){const i=Vs(Cs(e),Cs(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 kn(l,Fs(i))>0}const ad=({source:e,sourceHandle:t,target:n,targetHandle:s})=>`xy-edge__${e}${t||""}-${n}${s||""}`,Wy=(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)),cd=(e,t)=>{if(!e.source||!e.target)return ws("006",Oe.error006()),t;let n;return Wu(e)?n={...e}:n={...e,id:ad(e)},Wy(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))},Xy=(e,t,n,s={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return ws("006",Oe.error006()),n;if(!n.find(c=>c.id===e.id))return ws("007",Oe.error007(r)),n;const a={...i,id:s.shouldReplaceId?ad(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(c=>c.id!==r).concat(a)};function ud({sourceX:e,sourceY:t,targetX:n,targetY:s}){const[r,i,l,a]=ld({sourceX:e,sourceY:t,targetX:n,targetY:s});return[`M ${e},${t}L ${n},${s}`,r,i,l,a]}const qi={[Q.Left]:{x:-1,y:0},[Q.Right]:{x:1,y:0},[Q.Top]:{x:0,y:-1},[Q.Bottom]:{x:0,y:1}},qy=({source:e,sourcePosition:t=Q.Bottom,target:n})=>t===Q.Left||t===Q.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},Qi=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Qy({source:e,sourcePosition:t=Q.Bottom,target:n,targetPosition:s=Q.Top,center:r,offset:i}){const l=qi[t],a=qi[s],c={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+a.x*i,y:n.y+a.y*i},x=qy({source:c,sourcePosition:t,target:d}),p=x.x!==0?"x":"y",m=x[p];let h=[],g,E;const S={x:0,y:0},R={x:0,y:0},[v,y,C,_]=ld({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*a[p]===-1){g=r.x??v,E=r.y??y;const I=[{x:g,y:c.y},{x:g,y:d.y}],A=[{x:c.x,y:E},{x:d.x,y:E}];l[p]===m?h=p==="x"?I:A:h=p==="x"?A:I}else{const I=[{x:c.x,y:d.y}],A=[{x:d.x,y:c.y}];if(p==="x"?h=l.x===m?A:I:h=l.y===m?I:A,t===s){const V=Math.abs(e[p]-n[p]);if(V<=i){const b=Math.min(i-1,i-V);l[p]===m?S[p]=(c[p]>e[p]?-1:1)*b:R[p]=(d[p]>n[p]?-1:1)*b}}if(t!==s){const V=p==="x"?"y":"x",b=l[p]===a[V],k=c[V]>d[V],L=c[V]<d[V];(l[p]===1&&(!b&&k||b&&L)||l[p]!==1&&(!b&&L||b&&k))&&(h=p==="x"?I:A)}const B={x:c.x+S.x,y:c.y+S.y},z={x:d.x+R.x,y:d.y+R.y},$=Math.max(Math.abs(B.x-h[0].x),Math.abs(z.x-h[0].x)),D=Math.max(Math.abs(B.y-h[0].y),Math.abs(z.y-h[0].y));$>=D?(g=(B.x+z.x)/2,E=h[0].y):(g=h[0].x,E=(B.y+z.y)/2)}return[[e,{x:c.x+S.x,y:c.y+S.y},...h,{x:d.x+R.x,y:d.y+R.y},n],g,E,C,_]}function Jy(e,t,n,s){const r=Math.min(Qi(e,t)/2,Qi(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 d=e.x<n.x?-1:1,x=e.y<n.y?1:-1;return`L ${i+r*d},${l}Q ${i},${l} ${i},${l+r*x}`}const a=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${l+r*c}Q ${i},${l} ${i+r*a},${l}`}function Zo({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:s,targetY:r,targetPosition:i=Q.Top,borderRadius:l=5,centerX:a,centerY:c,offset:d=20}){const[x,p,m,h,g]=Qy({source:{x:e,y:t},sourcePosition:n,target:{x:s,y:r},targetPosition:i,center:{x:a,y:c},offset:d});return[x.reduce((S,R,v)=>{let y="";return v>0&&v<x.length-1?y=Jy(x[v-1],R,x[v+1],l):y=`${v===0?"M":"L"}${R.x} ${R.y}`,S+=y,S},""),p,m,h,g]}function Ji(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function eS(e){const{sourceNode:t,targetNode:n}=e;if(!Ji(t)||!Ji(n))return null;const s=t.internals.handleBounds||el(t.handles),r=n.internals.handleBounds||el(n.handles),i=tl(s?.source??[],e.sourceHandle),l=tl(e.connectionMode===Pt.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!i||!l)return e.onError?.("008",Oe.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=i?.position||Q.Bottom,c=l?.position||Q.Top,d=Ln(t,i,a),x=Ln(n,l,c);return{sourceX:d.x,sourceY:d.y,targetX:x.x,targetY:x.y,sourcePosition:a,targetPosition:c}}function el(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 Ln(e,t,n=Q.Left,s=!1){const r=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:a}=t??ut(e);if(s)return{x:r+l/2,y:i+a/2};switch(t?.position??n){case Q.Top:return{x:r+l/2,y:i};case Q.Right:return{x:r+l,y:i+a/2};case Q.Bottom:return{x:r+l/2,y:i+a};case Q.Left:return{x:r,y:i+a/2}}}function tl(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Ko(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function tS(e,{id:t,defaultColor:n,defaultMarkerStart:s,defaultMarkerEnd:r}){const i=new Set;return e.reduce((l,a)=>([a.markerStart||s,a.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const d=Ko(c,t);i.has(d)||(l.push({id:d,color:c.color||n,...c}),i.add(d))}}),l),[]).sort((l,a)=>l.id.localeCompare(a.id))}const Wr={nodeOrigin:[0,0],nodeExtent:_n,elevateNodesOnSelect:!0,defaults:{}},nS={...Wr,checkEquality:!0};function Xr(e,t){const n={...e};for(const s in t)t[s]!==void 0&&(n[s]=t[s]);return n}function sS(e,t,n){const s=Xr(Wr,n);for(const r of e.values())if(r.parentId)qr(r,e,t,s);else{const i=Bn(r,s.nodeOrigin),l=nn(r.extent)?r.extent:s.nodeExtent,a=Tt(i,l,ut(r));r.internals.positionAbsolute=a}}function Yo(e,t,n,s){const r=Xr(nS,s);let i=e.length>0;const l=new Map(t),a=r?.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const c of e){let d=l.get(c.id);if(r.checkEquality&&c===d?.internals.userNode)t.set(c.id,d);else{const x=Bn(c,r.nodeOrigin),p=nn(c.extent)?c.extent:r.nodeExtent,m=Tt(x,p,ut(c));d={...r.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:m,handleBounds:c.measured?d?.internals.handleBounds:void 0,z:dd(c,a),userNode:c}},t.set(c.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(i=!1),c.parentId&&qr(d,t,n,s)}return i}function oS(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 qr(e,t,n,s){const{elevateNodesOnSelect:r,nodeOrigin:i,nodeExtent:l}=Xr(Wr,s),a=e.parentId,c=t.get(a);if(!c){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}oS(e,n);const d=r?1e3:0,{x,y:p,z:m}=rS(e,c,i,l,d),{positionAbsolute:h}=e.internals,g=x!==h.x||p!==h.y;(g||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:g?{x,y:p}:h,z:m}})}function dd(e,t){return(Ue(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function rS(e,t,n,s,r){const{x:i,y:l}=t.internals.positionAbsolute,a=ut(e),c=Bn(e,n),d=nn(e.extent)?Tt(c,e.extent,a):c;let x=Tt({x:i+d.x,y:l+d.y},s,a);e.extent==="parent"&&(x=qu(x,a,t));const p=dd(e,r),m=t.internals.z??0;return{x:x.x,y:x.y,z:m>=p?m+1:p}}function Qr(e,t,n,s=[0,0]){const r=[],i=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const c=i.get(l.parentId)?.expandedRect??tn(a),d=Ju(c,l.rect);i.set(l.parentId,{expandedRect:d,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},c)=>{const d=a.internals.positionAbsolute,x=ut(a),p=a.origin??s,m=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,h=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,g=Math.max(x.width,Math.round(l.width)),E=Math.max(x.height,Math.round(l.height)),S=(g-x.width)*p[0],R=(E-x.height)*p[1];(m>0||h>0||S||R)&&(r.push({id:c,type:"position",position:{x:a.position.x-m+S,y:a.position.y-h+R}}),n.get(c)?.forEach(v=>{e.some(y=>y.id===v.id)||r.push({id:v.id,type:"position",position:{x:v.position.x+m,y:v.position.y+h}})})),(x.width<l.width||x.height<l.height||m||h)&&r.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:g+(m?p[0]*m-S:0),height:E+(h?p[1]*h-R:0)}})}),r}function iS(e,t,n,s,r,i){const l=s?.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const c=[],d=window.getComputedStyle(l),{m22:x}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const h=t.get(m.id);if(!h)continue;if(h.hidden){t.set(h.id,{...h,internals:{...h.internals,handleBounds:void 0}}),a=!0;continue}const g=Ur(m.nodeElement),E=h.measured.width!==g.width||h.measured.height!==g.height;if(!!(g.width&&g.height&&(E||!h.internals.handleBounds||m.force))){const R=m.nodeElement.getBoundingClientRect(),v=nn(h.extent)?h.extent:i;let{positionAbsolute:y}=h.internals;h.parentId&&h.extent==="parent"?y=qu(y,g,t.get(h.parentId)):v&&(y=Tt(y,v,g));const C={...h,measured:g,internals:{...h.internals,positionAbsolute:y,handleBounds:{source:Wi("source",m.nodeElement,R,x,h.id),target:Wi("target",m.nodeElement,R,x,h.id)}}};t.set(h.id,C),h.parentId&&qr(C,t,n,{nodeOrigin:r}),a=!0,E&&(c.push({id:h.id,type:"dimensions",dimensions:g}),h.expandParent&&h.parentId&&p.push({id:h.id,parentId:h.parentId,rect:tn(C,r)}))}}if(p.length>0){const m=Qr(p,t,n,r);c.push(...m)}return{changes:c,updatedInternals:a}}async function lS({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),a=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(a)}function nl(e,t,n,s,r,i){let l=r;const a=s.get(l)||new Map;s.set(l,a.set(n,t)),l=`${r}-${e}`;const c=s.get(l)||new Map;if(s.set(l,c.set(n,t)),i){l=`${r}-${e}-${i}`;const d=s.get(l)||new Map;s.set(l,d.set(n,t))}}function xd(e,t,n){e.clear(),t.clear();for(const s of n){const{source:r,target:i,sourceHandle:l=null,targetHandle:a=null}=s,c={edgeId:s.id,source:r,target:i,sourceHandle:l,targetHandle:a},d=`${r}-${l}--${i}-${a}`,x=`${i}-${a}--${r}-${l}`;nl("source",c,x,e,r,l),nl("target",c,d,e,i,a),t.set(s.id,s)}}function pd(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:pd(n,t):!1}function sl(e,t,n){let s=e;do{if(s?.matches?.(t))return!0;if(s===n)return!1;s=s?.parentElement}while(s);return!1}function aS(e,t,n,s){const r=new Map;for(const[i,l]of e)if((l.selected||l.id===s)&&(!l.parentId||!pd(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const a=e.get(i);a&&r.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return r}function mo({nodeId:e,dragItems:t,nodeLookup:n,dragging:s=!0}){const r=[];for(const[l,a]of t){const c=n.get(l)?.internals.userNode;c&&r.push({...c,position:a.position,dragging:s})}if(!e)return[r[0],r];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:s}:r[0],r]}function cS({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:s,onDragStop:r}){let i={x:null,y:null},l=0,a=new Map,c=!1,d={x:0,y:0},x=null,p=!1,m=null,h=!1,g=!1;function E({noDragClassName:R,handleSelector:v,domNode:y,isSelectable:C,nodeId:_,nodeClickDistance:M=0}){m=ze(y);function I({x:$,y:D},V){const{nodeLookup:b,nodeExtent:k,snapGrid:L,snapToGrid:N,nodeOrigin:F,onNodeDrag:H,onSelectionDrag:K,onError:Z,updateNodePositions:Y}=t();i={x:$,y:D};let ne=!1,J={x:0,y:0,x2:0,y2:0};if(a.size>1&&k){const ce=$n(a);J=Ho(ce)}for(const[ce,le]of a){if(!b.has(ce))continue;let se={x:$-le.distance.x,y:D-le.distance.y};N&&(se=Hs(se,L));let ee=[[k[0][0],k[0][1]],[k[1][0],k[1][1]]];if(a.size>1&&k&&!le.extent){const{positionAbsolute:Se}=le.internals,ue=Se.x-J.x+k[0][0],me=Se.x+le.measured.width-J.x2+k[1][0],X=Se.y-J.y+k[0][1],de=Se.y+le.measured.height-J.y2+k[1][1];ee=[[ue,X],[me,de]]}const{position:re,positionAbsolute:ye}=Xu({nodeId:ce,nextPosition:se,nodeLookup:b,nodeExtent:ee,nodeOrigin:F,onError:Z});ne=ne||le.position.x!==re.x||le.position.y!==re.y,le.position=re,le.internals.positionAbsolute=ye}if(g=g||ne,!!ne&&(Y(a,!0),V&&(s||H||!_&&K))){const[ce,le]=mo({nodeId:_,dragItems:a,nodeLookup:b});s?.(V,a,ce,le),H?.(V,ce,le),_||K?.(V,le)}}async function A(){if(!x)return;const{transform:$,panBy:D,autoPanSpeed:V,autoPanOnNodeDrag:b}=t();if(!b){c=!1,cancelAnimationFrame(l);return}const[k,L]=Qu(d,x,V);(k!==0||L!==0)&&(i.x=(i.x??0)-k/$[2],i.y=(i.y??0)-L/$[2],await D({x:k,y:L})&&I(i,null)),l=requestAnimationFrame(A)}function B($){const{nodeLookup:D,multiSelectionActive:V,nodesDraggable:b,transform:k,snapGrid:L,snapToGrid:N,selectNodesOnDrag:F,onNodeDragStart:H,onSelectionDragStart:K,unselectNodesAndEdges:Z}=t();p=!0,(!F||!C)&&!V&&_&&(D.get(_)?.selected||Z()),C&&F&&_&&e?.(_);const Y=yn($.sourceEvent,{transform:k,snapGrid:L,snapToGrid:N,containerBounds:x});if(i=Y,a=aS(D,b,Y,_),a.size>0&&(n||H||!_&&K)){const[ne,J]=mo({nodeId:_,dragItems:a,nodeLookup:D});n?.($.sourceEvent,a,ne,J),H?.($.sourceEvent,ne,J),_||K?.($.sourceEvent,J)}}const z=Ou().clickDistance(M).on("start",$=>{const{domNode:D,nodeDragThreshold:V,transform:b,snapGrid:k,snapToGrid:L}=t();x=D?.getBoundingClientRect()||null,h=!1,g=!1,V===0&&B($),i=yn($.sourceEvent,{transform:b,snapGrid:k,snapToGrid:L,containerBounds:x}),d=tt($.sourceEvent,x)}).on("drag",$=>{const{autoPanOnNodeDrag:D,transform:V,snapGrid:b,snapToGrid:k,nodeDragThreshold:L,nodeLookup:N}=t(),F=yn($.sourceEvent,{transform:V,snapGrid:b,snapToGrid:k,containerBounds:x});if(($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||_&&!N.has(_))&&(h=!0),!h){if(!c&&D&&p&&(c=!0,A()),!p){const H=F.xSnapped-(i.x??0),K=F.ySnapped-(i.y??0);Math.sqrt(H*H+K*K)>L&&B($)}(i.x!==F.xSnapped||i.y!==F.ySnapped)&&a&&p&&(d=tt($.sourceEvent,x),I(F,$.sourceEvent))}}).on("end",$=>{if(!(!p||h)&&(c=!1,p=!1,cancelAnimationFrame(l),a.size>0)){const{nodeLookup:D,updateNodePositions:V,onNodeDragStop:b,onSelectionDragStop:k}=t();if(g&&(V(a,!1),g=!1),r||b||!_&&k){const[L,N]=mo({nodeId:_,dragItems:a,nodeLookup:D,dragging:!1});r?.($.sourceEvent,a,L,N),b?.($.sourceEvent,L,N),_||k?.($.sourceEvent,N)}}}).filter($=>{const D=$.target;return!$.button&&(!R||!sl(D,`.${R}`,y))&&(!v||sl(D,v,y))});m.call(z)}function S(){m?.on(".drag",null)}return{update:E,destroy:S}}function uS(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())kn(r,tn(i))>0&&s.push(i);return s}const dS=250;function xS(e,t,n,s){let r=[],i=1/0;const l=uS(e,n,t+dS);for(const a of l){const c=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(const d of c){if(s.nodeId===d.nodeId&&s.type===d.type&&s.id===d.id)continue;const{x,y:p}=Ln(a,d,d.position,!0),m=Math.sqrt(Math.pow(x-e.x,2)+Math.pow(p-e.y,2));m>t||(m<i?(r=[{...d,x,y:p}],i=m):m===i&&r.push({...d,x,y:p}))}}if(!r.length)return null;if(r.length>1){const a=s.type==="source"?"target":"source";return r.find(c=>c.type===a)??r[0]}return r[0]}function md(e,t,n,s,r,i=!1){const l=s.get(e);if(!l)return null;const a=r==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],c=(n?a?.find(d=>d.id===n):a?.[0])??null;return c&&i?{...c,...Ln(l,c,c.position,!0)}:c}function fd(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function pS(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const hd=()=>!0;function mS(e,{connectionMode:t,connectionRadius:n,handleId:s,nodeId:r,edgeUpdaterType:i,isTarget:l,domNode:a,nodeLookup:c,lib:d,autoPanOnConnect:x,flowId:p,panBy:m,cancelConnection:h,onConnectStart:g,onConnect:E,onConnectEnd:S,isValidConnection:R=hd,onReconnectEnd:v,updateConnection:y,getTransform:C,getFromHandle:_,autoPanSpeed:M,dragThreshold:I=1}){const A=nd(e.target);let B=0,z;const{x:$,y:D}=tt(e),V=A?.elementFromPoint($,D),b=fd(i,V),k=a?.getBoundingClientRect();let L=!1;if(!k||!b)return;const N=md(r,b,s,c,t);if(!N)return;let F=tt(e,k),H=!1,K=null,Z=!1,Y=null;function ne(){if(!x||!k)return;const[Se,ue]=Qu(F,k,M);m({x:Se,y:ue}),B=requestAnimationFrame(ne)}const J={...N,nodeId:r,type:b,position:N.position},ce=c.get(r);let se={inProgress:!0,isValid:null,from:Ln(ce,J,Q.Left,!0),fromHandle:J,fromPosition:J.position,fromNode:ce,to:F,toHandle:null,toPosition:Ki[J.position],toNode:null};function ee(){L=!0,y(se),g?.(e,{nodeId:r,handleId:s,handleType:b})}I===0&&ee();function re(Se){if(!L){const{x:de,y:be}=tt(Se),Te=de-$,et=be-D;if(!(Te*Te+et*et>I*I))return;ee()}if(!_()||!J){ye(Se);return}const ue=C();F=tt(Se,k),z=xS(zn(F,ue,!1,[1,1]),n,c,J),H||(ne(),H=!0);const me=gd(Se,{handle:z,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:l?"target":"source",isValidConnection:R,doc:A,lib:d,flowId:p,nodeLookup:c});Y=me.handleDomNode,K=me.connection,Z=pS(!!z,me.isValid);const X={...se,isValid:Z,to:me.toHandle&&Z?bs({x:me.toHandle.x,y:me.toHandle.y},ue):F,toHandle:me.toHandle,toPosition:Z&&me.toHandle?me.toHandle.position:Ki[J.position],toNode:me.toHandle?c.get(me.toHandle.nodeId):null};Z&&z&&se.toHandle&&X.toHandle&&se.toHandle.type===X.toHandle.type&&se.toHandle.nodeId===X.toHandle.nodeId&&se.toHandle.id===X.toHandle.id&&se.to.x===X.to.x&&se.to.y===X.to.y||(y(X),se=X)}function ye(Se){if(L){(z||Y)&&K&&Z&&E?.(K);const{inProgress:ue,...me}=se,X={...me,toPosition:se.toHandle?se.toPosition:null};S?.(Se,X),i&&v?.(Se,X)}h(),cancelAnimationFrame(B),H=!1,Z=!1,K=null,Y=null,A.removeEventListener("mousemove",re),A.removeEventListener("mouseup",ye),A.removeEventListener("touchmove",re),A.removeEventListener("touchend",ye)}A.addEventListener("mousemove",re),A.addEventListener("mouseup",ye),A.addEventListener("touchmove",re),A.addEventListener("touchend",ye)}function gd(e,{handle:t,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:i,doc:l,lib:a,flowId:c,isValidConnection:d=hd,nodeLookup:x}){const p=i==="target",m=t?l.querySelector(`.${a}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:g}=tt(e),E=l.elementFromPoint(h,g),S=E?.classList.contains(`${a}-flow__handle`)?E:m,R={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const v=fd(void 0,S),y=S.getAttribute("data-nodeid"),C=S.getAttribute("data-handleid"),_=S.classList.contains("connectable"),M=S.classList.contains("connectableend");if(!y||!v)return R;const I={source:p?y:s,sourceHandle:p?C:r,target:p?s:y,targetHandle:p?r:C};R.connection=I;const B=_&&M&&(n===Pt.Strict?p&&v==="source"||!p&&v==="target":y!==s||C!==r);R.isValid=B&&d(I),R.toHandle=md(y,v,C,x,n,!0)}return R}const Go={onPointerDown:mS,isValid:gd};function fS({domNode:e,panZoom:t,getTransform:n,getViewScale:s}){const r=ze(e);function i({translateExtent:a,width:c,height:d,zoomStep:x=10,pannable:p=!0,zoomable:m=!0,inversePan:h=!1}){const g=y=>{const C=n();if(y.sourceEvent.type!=="wheel"||!t)return;const _=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*x,M=C[2]*Math.pow(2,_);t.scaleTo(M)};let E=[0,0];const S=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(E=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},R=y=>{const C=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const _=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],M=[_[0]-E[0],_[1]-E[1]];E=_;const I=s()*Math.max(C[2],Math.log(C[2]))*(h?-1:1),A={x:C[0]-M[0]*I,y:C[1]-M[1]*I},B=[[0,0],[c,d]];t.setViewportConstrained({x:A.x,y:A.y,zoom:C[2]},B,a)},v=Zu().on("start",S).on("zoom",p?R:null).on("zoom.wheel",m?g:null);r.call(v,{})}function l(){r.on("zoom",null)}return{update:i,destroy:l,pointer:Ge}}const hS=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Zs=e=>({x:e.x,y:e.y,zoom:e.k}),fo=({x:e,y:t,zoom:n})=>zs.translate(e,t).scale(n),Kt=(e,t)=>e.target.closest(`.${t}`),jd=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),gS=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ho=(e,t=0,n=gS,s=()=>{})=>{const r=typeof t=="number"&&t>0;return r||s(),r?e.transition().duration(t).ease(n).on("end",s):e},Ed=e=>{const t=e.ctrlKey&&vs()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function jS({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:s,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:l,onPanZoomStart:a,onPanZoom:c,onPanZoomEnd:d}){return x=>{if(Kt(x,t))return!1;x.preventDefault(),x.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(x.ctrlKey&&l){const S=Ge(x),R=Ed(x),v=p*Math.pow(2,R);s.scaleTo(n,v,S,x);return}const m=x.deltaMode===1?20:1;let h=r===bt.Vertical?0:x.deltaX*m,g=r===bt.Horizontal?0:x.deltaY*m;!vs()&&x.shiftKey&&r!==bt.Vertical&&(h=x.deltaY*m,g=0),s.translateBy(n,-(h/p)*i,-(g/p)*i,{internal:!0});const E=Zs(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,a?.(x,E)),e.isPanScrolling&&(c?.(x,E),e.panScrollTimeout=setTimeout(()=>{d?.(x,E),e.isPanScrolling=!1},150))}}function ES({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(s,r){const i=s.type==="wheel",l=!t&&i&&!s.ctrlKey,a=Kt(s,e);if(s.ctrlKey&&i&&a&&s.preventDefault(),l||a)return null;s.preventDefault(),n.call(this,s,r)}}function yS({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return s=>{if(s.sourceEvent?.internal)return;const r=Zs(s.transform);e.mouseButton=s.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,s.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(s.sourceEvent,r)}}function SS({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:s,onPanZoom:r}){return i=>{e.usedRightMouseButton=!!(n&&jd(t,e.mouseButton??0)),i.sourceEvent?.sync||s([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,Zs(i.transform))}}function RS({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:s,onPanZoomEnd:r,onPaneContextMenu:i}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&jd(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&i(l.sourceEvent),e.usedRightMouseButton=!1,s(!1),r&&hS(e.prevViewport,l.transform))){const a=Zs(l.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(l.sourceEvent,a)},n?150:0)}}}function CS({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:s,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:l,noWheelClassName:a,noPanClassName:c,lib:d}){return x=>{const p=e||t,m=n&&x.ctrlKey;if(x.button===1&&x.type==="mousedown"&&(Kt(x,`${d}-flow__node`)||Kt(x,`${d}-flow__edge`)))return!0;if(!s&&!p&&!r&&!i&&!n||l||Kt(x,a)&&x.type==="wheel"||Kt(x,c)&&(x.type!=="wheel"||r&&x.type==="wheel"&&!e)||!n&&x.ctrlKey&&x.type==="wheel")return!1;if(!n&&x.type==="touchstart"&&x.touches?.length>1)return x.preventDefault(),!1;if(!p&&!r&&!m&&x.type==="wheel"||!s&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(s)&&!s.includes(x.button)&&x.type==="mousedown")return!1;const h=Array.isArray(s)&&s.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||x.type==="wheel")&&h}}function wS({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:s,translateExtent:r,viewport:i,onPanZoom:l,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:d}){const x={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=Zu().clickDistance(!Ue(s)||s<0?0:s).scaleExtent([t,n]).translateExtent(r),h=ze(e).call(m);y({x:i.x,y:i.y,zoom:en(i.zoom,t,n)},[[0,0],[p.width,p.height]],r);const g=h.on("wheel.zoom"),E=h.on("dblclick.zoom");m.wheelDelta(Ed);function S(D,V){return h?new Promise(b=>{m?.interpolate(V?.interpolate==="linear"?O.interpolate:rs).transform(ho(h,V?.duration,V?.ease,()=>b(!0)),D)}):Promise.resolve(!1)}function R({noWheelClassName:D,noPanClassName:V,onPaneContextMenu:b,userSelectionActive:k,panOnScroll:L,panOnDrag:N,panOnScrollMode:F,panOnScrollSpeed:H,preventScrolling:K,zoomOnPinch:Z,zoomOnScroll:Y,zoomOnDoubleClick:ne,zoomActivationKeyPressed:J,lib:ce,onTransformChange:le}){k&&!x.isZoomingOrPanning&&v();const ee=L&&!J&&!k?jS({zoomPanValues:x,noWheelClassName:D,d3Selection:h,d3Zoom:m,panOnScrollMode:F,panOnScrollSpeed:H,zoomOnPinch:Z,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}):ES({noWheelClassName:D,preventScrolling:K,d3ZoomHandler:g});if(h.on("wheel.zoom",ee,{passive:!1}),!k){const ye=yS({zoomPanValues:x,onDraggingChange:d,onPanZoomStart:a});m.on("start",ye);const Se=SS({zoomPanValues:x,panOnDrag:N,onPaneContextMenu:!!b,onPanZoom:l,onTransformChange:le});m.on("zoom",Se);const ue=RS({zoomPanValues:x,panOnDrag:N,panOnScroll:L,onPaneContextMenu:b,onPanZoomEnd:c,onDraggingChange:d});m.on("end",ue)}const re=CS({zoomActivationKeyPressed:J,panOnDrag:N,zoomOnScroll:Y,panOnScroll:L,zoomOnDoubleClick:ne,zoomOnPinch:Z,userSelectionActive:k,noPanClassName:V,noWheelClassName:D,lib:ce});m.filter(re),ne?h.on("dblclick.zoom",E):h.on("dblclick.zoom",null)}function v(){m.on("zoom",null)}async function y(D,V,b){const k=fo(D),L=m?.constrain()(k,V,b);return L&&await S(L),new Promise(N=>N(L))}async function C(D,V){const b=fo(D);return await S(b,V),new Promise(k=>k(b))}function _(D){if(h){const V=fo(D),b=h.property("__zoom");(b.k!==D.zoom||b.x!==D.x||b.y!==D.y)&&m?.transform(h,V,null,{sync:!0})}}function M(){const D=h?Hu(h.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}function I(D,V){return h?new Promise(b=>{m?.interpolate(V?.interpolate==="linear"?O.interpolate:rs).scaleTo(ho(h,V?.duration,V?.ease,()=>b(!0)),D)}):Promise.resolve(!1)}function A(D,V){return h?new Promise(b=>{m?.interpolate(V?.interpolate==="linear"?O.interpolate:rs).scaleBy(ho(h,V?.duration,V?.ease,()=>b(!0)),D)}):Promise.resolve(!1)}function B(D){m?.scaleExtent(D)}function z(D){m?.translateExtent(D)}function $(D){const V=!Ue(D)||D<0?0:D;m?.clickDistance(V)}return{update:R,destroy:v,setViewport:C,setViewportConstrained:y,getViewport:M,scaleTo:I,scaleBy:A,setScaleExtent:B,setTranslateExtent:z,syncViewport:_,setClickDistance:$}}var sn;(function(e){e.Line="line",e.Handle="handle"})(sn||(sn={}));function bS({width:e,prevWidth:t,height:n,prevHeight:s,affectsX:r,affectsY:i}){const l=e-t,a=n-s,c=[l>0?1:l<0?-1:0,a>0?1:a<0?-1:0];return l&&r&&(c[0]=c[0]*-1),a&&i&&(c[1]=c[1]*-1),c}function vS(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 xt(e,t){return Math.max(0,t-e)}function pt(e,t){return Math.max(0,e-t)}function Jn(e,t,n){return Math.max(0,t-e,e-n)}function ol(e,t){return e?!t:t}function _S(e,t,n,s,r,i,l,a){let{affectsX:c,affectsY:d}=t;const{isHorizontal:x,isVertical:p}=t,m=x&&p,{xSnapped:h,ySnapped:g}=n,{minWidth:E,maxWidth:S,minHeight:R,maxHeight:v}=s,{x:y,y:C,width:_,height:M,aspectRatio:I}=e;let A=Math.floor(x?h-e.pointerX:0),B=Math.floor(p?g-e.pointerY:0);const z=_+(c?-A:A),$=M+(d?-B:B),D=-i[0]*_,V=-i[1]*M;let b=Jn(z,E,S),k=Jn($,R,v);if(l){let F=0,H=0;c&&A<0?F=xt(y+A+D,l[0][0]):!c&&A>0&&(F=pt(y+z+D,l[1][0])),d&&B<0?H=xt(C+B+V,l[0][1]):!d&&B>0&&(H=pt(C+$+V,l[1][1])),b=Math.max(b,F),k=Math.max(k,H)}if(a){let F=0,H=0;c&&A>0?F=pt(y+A,a[0][0]):!c&&A<0&&(F=xt(y+z,a[1][0])),d&&B>0?H=pt(C+B,a[0][1]):!d&&B<0&&(H=xt(C+$,a[1][1])),b=Math.max(b,F),k=Math.max(k,H)}if(r){if(x){const F=Jn(z/I,R,v)*I;if(b=Math.max(b,F),l){let H=0;!c&&!d||c&&!d&&m?H=pt(C+V+z/I,l[1][1])*I:H=xt(C+V+(c?A:-A)/I,l[0][1])*I,b=Math.max(b,H)}if(a){let H=0;!c&&!d||c&&!d&&m?H=xt(C+z/I,a[1][1])*I:H=pt(C+(c?A:-A)/I,a[0][1])*I,b=Math.max(b,H)}}if(p){const F=Jn($*I,E,S)/I;if(k=Math.max(k,F),l){let H=0;!c&&!d||d&&!c&&m?H=pt(y+$*I+D,l[1][0])/I:H=xt(y+(d?B:-B)*I+D,l[0][0])/I,k=Math.max(k,H)}if(a){let H=0;!c&&!d||d&&!c&&m?H=xt(y+$*I,a[1][0])/I:H=pt(y+(d?B:-B)*I,a[0][0])/I,k=Math.max(k,H)}}}B=B+(B<0?k:-k),A=A+(A<0?b:-b),r&&(m?z>$*I?B=(ol(c,d)?-A:A)/I:A=(ol(c,d)?-B:B)*I:x?(B=A/I,d=c):(A=B*I,c=d));const L=c?y+A:y,N=d?C+B:C;return{width:_+(c?-A:A),height:M+(d?-B:B),x:i[0]*A*(c?-1:1)+L,y:i[1]*B*(d?-1:1)+N}}const yd={width:0,height:0,x:0,y:0},kS={...yd,pointerX:0,pointerY:0,aspectRatio:1};function LS(e){return[[0,0],[e.measured.width,e.measured.height]]}function MS(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,a=n[0]*i,c=n[1]*l;return[[s-a,r-c],[s+i-a,r+l-c]]}function NS({domNode:e,nodeId:t,getStoreItems:n,onChange:s,onEnd:r}){const i=ze(e);function l({controlPosition:c,boundaries:d,keepAspectRatio:x,resizeDirection:p,onResizeStart:m,onResize:h,onResizeEnd:g,shouldResize:E}){let S={...yd},R={...kS};const v=vS(c);let y,C=null,_=[],M,I,A;const B=Ou().on("start",z=>{const{nodeLookup:$,transform:D,snapGrid:V,snapToGrid:b,nodeOrigin:k,paneDomNode:L}=n();if(y=$.get(t),!y)return;C=L?.getBoundingClientRect()??null;const{xSnapped:N,ySnapped:F}=yn(z.sourceEvent,{transform:D,snapGrid:V,snapToGrid:b,containerBounds:C});S={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},R={...S,pointerX:N,pointerY:F,aspectRatio:S.width/S.height},M=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(M=$.get(y.parentId),I=M&&y.extent==="parent"?LS(M):void 0),_=[],A=void 0;for(const[H,K]of $)if(K.parentId===t&&(_.push({id:H,position:{...K.position},extent:K.extent}),K.extent==="parent"||K.expandParent)){const Z=MS(K,y,K.origin??k);A?A=[[Math.min(Z[0][0],A[0][0]),Math.min(Z[0][1],A[0][1])],[Math.max(Z[1][0],A[1][0]),Math.max(Z[1][1],A[1][1])]]:A=Z}m?.(z,{...S})}).on("drag",z=>{const{transform:$,snapGrid:D,snapToGrid:V,nodeOrigin:b}=n(),k=yn(z.sourceEvent,{transform:$,snapGrid:D,snapToGrid:V,containerBounds:C}),L=[];if(!y)return;const{x:N,y:F,width:H,height:K}=S,Z={},Y=y.origin??b,{width:ne,height:J,x:ce,y:le}=_S(R,v,k,d,x,Y,I,A),se=ne!==H,ee=J!==K,re=ce!==N&&se,ye=le!==F&ⅇif(!re&&!ye&&!se&&!ee)return;if((re||ye||Y[0]===1||Y[1]===1)&&(Z.x=re?ce:S.x,Z.y=ye?le:S.y,S.x=Z.x,S.y=Z.y,_.length>0)){const X=ce-N,de=le-F;for(const be of _)be.position={x:be.position.x-X+Y[0]*(ne-H),y:be.position.y-de+Y[1]*(J-K)},L.push(be)}if((se||ee)&&(Z.width=se&&(!p||p==="horizontal")?ne:S.width,Z.height=ee&&(!p||p==="vertical")?J:S.height,S.width=Z.width,S.height=Z.height),M&&y.expandParent){const X=Y[0]*(Z.width??0);Z.x&&Z.x<X&&(S.x=X,R.x=R.x-(Z.x-X));const de=Y[1]*(Z.height??0);Z.y&&Z.y<de&&(S.y=de,R.y=R.y-(Z.y-de))}const Se=bS({width:S.width,prevWidth:H,height:S.height,prevHeight:K,affectsX:v.affectsX,affectsY:v.affectsY}),ue={...S,direction:Se};E?.(z,ue)!==!1&&(h?.(z,ue),s(Z,L))}).on("end",z=>{g?.(z,{...S}),r?.({...S})});i.call(B)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var es={exports:{}},go={},ts={exports:{}},jo={};/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./main-2qH2bggR.cjs"),r=require("./jsx-runtime-CITbqOLs.cjs"),j=require("react"),u=require("./css-CmXY6iPo.cjs"),L=require("./eraser-C1jjA5cv.cjs"),Cf=require("./external-DcNW5o-8.cjs"),ql=require("./Animated-EQN_Zecr.cjs"),Ql=require("react-dom"),O=require("./LinePlot-Do2q5AyX.cjs"),Ps=require("./external-CFsDBQGs.cjs"),ne=require("zod"),_e=require("./external-kaUzEm1U.cjs"),Jl=require("./external-DCQ725nK.cjs"),nt=require("./external-mOr1FzAd.cjs"),ea=require("./external-BIykXq97.cjs"),Ae=require("./external-CijGOPm7.cjs"),pe=require("./external-CJKfUQ-9.cjs"),ta=require("./units-DkdMPsxa.cjs"),bf=require("./external-Bqmws2bv.cjs"),wf=require("./external-BEkAplsH.cjs"),Me=require("./external-B8KPEzPt.cjs"),vf=require("./external-5DC2xiKR.cjs"),kf=require("./external-DWfn7Yhk.cjs"),_f=require("./Video-CgaO8bTm.cjs"),na=require("./Toggle-BKrbt8lh.cjs"),Lf=e=>e.nullable().transform(t=>t===null?void 0:t).optional(),Tf=e=>ne.array(e).or(e.transform(t=>[t])),sa=e=>L.p(e,(t,n,s)=>{const o=n===s.length-1,i=!isNaN(parseInt(t)),l=!isNaN(parseInt(s[n+1]));return i&&(t="element"),o||l?t:[t,"shape"]}),bi=(e,t)=>{if(e==null)return null;const n=e[t];return n==null&&typeof e=="object"&&"sourceType"in e?e.sourceType()[t]:n},Mf=(e,t,n)=>t===""?e:L.c(bi(e,"shape"),sa(t),{...n,getter:bi}),Nf=Object.freeze(Object.defineProperty({__proto__:null,getFieldSchema:Mf,getFieldSchemaPath:sa,nullToUndefined:Lf,toArray:Tf},Symbol.toStringTag,{value:"Module"})),oa=Symbol(),rr=Symbol(),pn="a",is="w";let Pf=(e,t)=>new Proxy(e,t);const To=Object.getPrototypeOf,wi=new WeakMap,ir=e=>e&&(wi.has(e)?wi.get(e):To(e)===Object.prototype||To(e)===Array.prototype),vi=e=>typeof e=="object"&&e!==null,ki=new WeakMap,ra=e=>e[rr]||e,ia=(e,t,n)=>{if(!ir(e))return e;const s=ra(e),o=(l=>Object.isFrozen(l)||Object.values(Object.getOwnPropertyDescriptors(l)).some(a=>!a.writable))(s);let i=n&&n.get(s);return i&&i[1].f===o||(i=((l,a)=>{const c={f:a};let d=!1;const x=(m,h)=>{if(!d){let g=c[pn].get(l);if(g||(g={},c[pn].set(l,g)),m===is)g[is]=!0;else{let E=g[m];E||(E=new Set,g[m]=E),E.add(h)}}},p={get:(m,h)=>h===rr?l:(x("k",h),ia(Reflect.get(m,h),c[pn],c.c)),has:(m,h)=>h===oa?(d=!0,c[pn].delete(l),!0):(x("h",h),Reflect.has(m,h)),getOwnPropertyDescriptor:(m,h)=>(x("o",h),Reflect.getOwnPropertyDescriptor(m,h)),ownKeys:m=>(x(is),Reflect.ownKeys(m))};return a&&(p.set=p.deleteProperty=()=>!1),[p,c]})(s,o),i[1].p=Pf(o?(l=>{let a=ki.get(l);if(!a){if(Array.isArray(l))a=Array.from(l);else{const c=Object.getOwnPropertyDescriptors(l);Object.values(c).forEach(d=>{d.configurable=!0}),a=Object.create(To(l),c)}ki.set(l,a)}return a})(s):s,i[0]),n&&n.set(s,i)),i[1][pn]=t,i[1].c=n,i[1].p},la=(e,t,n,s)=>{if(Object.is(e,t))return!1;if(!vi(e)||!vi(t))return!0;const o=n.get(ra(e));if(!o)return!0;if(s){const l=s.get(e);if(l&&l.n===t)return l.g;s.set(e,{n:t,g:!1})}let i=null;try{for(const l of o.h||[])if(i=Reflect.has(e,l)!==Reflect.has(t,l),i)return i;if(o[is]===!0){if(i=((l,a)=>{const c=Reflect.ownKeys(l),d=Reflect.ownKeys(a);return c.length!==d.length||c.some((x,p)=>x!==d[p])})(e,t),i)return i}else for(const l of o.o||[])if(i=!!Reflect.getOwnPropertyDescriptor(e,l)!=!!Reflect.getOwnPropertyDescriptor(t,l),i)return i;for(const l of o.k||[])if(i=la(e[l],t[l],n,s),i)return i;return i===null&&(i=!0),i}finally{s&&s.set(e,{n:t,g:i})}},Af=e=>!!ir(e)&&oa in e,aa=e=>ir(e)&&e[rr]||null,Of="h",If="w",Df="o",Bf="k",Mo=e=>typeof e=="object"&&e!==null,ca=(e,t)=>{if(!Mo(e))return e;const n=aa(e);return n!==null?(Af(e),n):(t.has(e)||(t.add(e),Object.entries(e).forEach(([s,o])=>{const i=ca(o,t);Object.is(i,o)||(e[s]=i)})),e)},No=(e,t,n)=>{var s,o,i;if(!Mo(e)||!Mo(t))return;const l=n.get(aa(t)||t);l&&((s=l[Of])==null||s.forEach(a=>{Reflect.has(e,a)}),l[If]===!0&&Reflect.ownKeys(e),(o=l[Df])==null||o.forEach(a=>{Reflect.getOwnPropertyDescriptor(e,a)}),(i=l[Bf])==null||i.forEach(a=>{No(e[a],t[a],n)}))},lo="o",ao="r",co="a";function $f(e,t){var n;let s=0;const o=(n=t?.size)!=null?n:1,i=[],l=t!=null&&t.noWeakMap?null:new WeakMap;return c=>{const d=l?.get(c);if(d)return d[ao];for(let g=0;g<o;g+=1){const E=i[(s+g)%o];if(!E)break;if(!la(E[lo],c,E[co],new WeakMap))return No(c,E[lo],E[co]),l?.set(c,E),E[ao]}const x=new WeakMap,p=ia(c,x),m=ca(e(p),new Set);No(c,c,x);const h={[lo]:c,[ao]:m,[co]:x};return s=(s-1+o)%o,i[s]=h,l?.set(c,h),m}}const zf=(e,t)=>u.S.RUNTIME==="browser"?$f(e,t):e,It=(e,t)=>{j.useEffect(()=>{const n=new AbortController,s=n.signal,i=(async()=>(await u.pr(),await e(s)))().catch(console.error);return()=>{n.abort(),i.then(l=>l?.()).catch(console.error)}},t)},Vf=Object.freeze(Object.defineProperty({__proto__:null,Access:f.Access,Acquire:f.Acquire,Add:f.Add,Align:f.Align,Analyze:f.Analyze,Annotate:f.Annotate,Array:f.Array,Arrow:f.Arrow,Attachment:f.Attachment,Auto:f.Auto,AutoFitWidth:f.AutoFitWidth,Binary:f.Binary,Bolt:f.Bolt,Box:f.Box$1,Bridge:f.Bridge,CSV:f.CSV,Calculation:f.Calculation,Calendar:f.Calendar$1,Caret:f.Caret,Channel:f.Channel,Check:f.Check,Circle:f.Circle,Click:f.Click,Close:f.Close,Cluster:f.Cluster,Commit:f.Commit,Concepts:f.Concepts,Connect:f.Connect,Constant:f.Constant,Control:f.Control,Copy:f.Copy,DarkMode:f.DarkMode,Decimal:f.Decimal,Delete:f.Delete,Details:f.Details,Device:f.Device,Disable:f.Disable,Disconnect:f.Disconnect,Download:f.Download,Downsample:f.Downsample,Drag:f.Drag,Dynamic:f.Dynamic,Edit:f.Edit,EditOff:f.EditOff,Enable:f.Enable,Expand:f.Expand,Explore:f.Explore,Export:f.Export,Feedback:f.Feedback,FillColor:f.FillColor,Filter:f.Filter,Fitting:f.Fitting,Focus:f.Focus,Function:f.Function,Group:f.Group,Guide:f.Guide,Hardware:f.Hardware,Heart:f.Heart,Hidden:f.Hidden,Import:f.Import,Index:f.Index,Info:f.Info,JSON:f.JSON,Keyboard:f.Keyboard,Label:f.Label,LightMode:f.LightMode,LinePlot:f.LinePlot,Linear:f.Linear,Link:f.Link,LinkExternal:f.LinkExternal,Loading:f.Loading,Log:f.Log,Logo:f.Logo,Map:f.Map,Menu:f.Menu$1,MoveToMainWindow:f.MoveToMainWindow,NPM:f.NPM,Node:f.Node,None:f.None,OpenExternal:f.OpenExternal,OpenInNewWindow:f.OpenInNewWindow,PNPM:f.PNPM,Pan:f.Pan,Pause:f.Pause,Play:f.Play,Process:f.Process,Pump:f.Pump,Python:f.Python,QuestionMark:f.QuestionMark,Rack:f.Rack,Range:f.Range,Reference:f.Reference,Refresh:f.Refresh,Release:f.Release,Rename:f.Rename,Reset:f.Reset,Resources:f.Resources,Rotate:f.Rotate,Rule:f.Rule,Safety:f.Safety,Save:f.Save,Schematic:f.Schematic,Search:f.Search,Selection:f.Selection,Settings:f.Settings,Snapshot:f.Snapshot,Snooze:f.Snooze,Sound:f.Sound,SplitX:f.SplitX,SplitY:f.SplitY,StarFilled:f.StarFilled,StarOutlined:f.StarOutlined,String:f.String,StrokeColor:f.StrokeColor,StrokeWidth:f.StrokeWidth,Subtract:f.Subtract,Sync:f.Sync,Table:f.Table,Tank:f.Tank,Tare:f.Tare,Task:f.Task,Terminal:f.Terminal,Text:f.Text$3,TextAlign:f.TextAlign,Time:f.Time$1,Tooltip:f.Tooltip,Type:f.Type,TypeScript:f.TypeScript,Units:f.Units,User:f.User,Value:f.Value,Valve:f.Valve,Variable:f.Variable,Virtual:f.Virtual,Visible:f.Visible,Visualize:f.Visualize,Warning:f.Warning,Wave:f.Wave,Workspace:f.Workspace,Yarn:f.Yarn,Zoom:f.Zoom,createComposite:f.createComposite,resolve:f.resolve,wrapSVGIcon:f.wrapSVGIcon},Symbol.toStringTag,{value:"Module"})),Ff=Object.freeze(Object.defineProperty({__proto__:null,Config:f.Config,Dialog:f.Dialog$1,chooseLocation:f.chooseLocation,formatTip:f.formatTip,useConfig:f.useConfig,wrap:f.wrap},Symbol.toStringTag,{value:"Module"})),lr=({ref:e,location:t,style:n,size:s,className:o,children:i,onDragStart:l,sizeUnits:a="px",showHandle:c=!0,...d})=>{const x=u.K$1.construct(t),p=u.K$1.direction(x),m=u.p.dimension(p);return r.jsxRuntimeExports.jsxs(f.Box,{className:u.CSS(u.CSS.B("resize"),u.CSS.loc(x),o),style:{[m]:`${s}${a}`,...n},ref:e,direction:p,empty:!0,...d,children:[i,c&&r.jsxRuntimeExports.jsx("div",{draggable:!0,className:u.CSS(u.CSS.BE("resize","handle"),u.CSS.bordered(u.K$1.swap(x))),onDragStart:l,onDrag:f.preventDefault,onDragEnd:f.preventDefault})]})},ua=({onResize:e,count:t,initialSizes:n=[],minSize:s=100,direction:o="x"})=>{const i=j.useRef(null),[l,a]=j.useState({sizeDistribution:Hf(n,t),root:null}),c=j.useCallback((p,m,h)=>{if(i.current==null)return;const g=u.Ho.dim(u.Ho.construct(i.current),o);a(E=>xo(E,g,p,s,m,h))},[s,a,o]);j.useEffect(()=>e?.(l.sizeDistribution),[l.sizeDistribution,e]);const d=j.useCallback((p,m)=>{p.preventDefault();const h=o==="x"?"clientX":"clientY",g=S=>c(m,S[h]),E=()=>{a(S=>({...S,root:null})),document.removeEventListener("mousemove",g)};a(S=>({...S,root:p[h]})),document.addEventListener("mousemove",g),document.addEventListener("mouseup",E,{once:!0})},[a,o,xo]);return{setSize:j.useCallback((p,m)=>c(p,void 0,m),[xo]),props:{direction:o,sizeDistribution:l.sizeDistribution,onDragHandle:d,ref:i}}},da=({ref:e,direction:t="x",children:n,sizeDistribution:s,onDragHandle:o,className:i,...l})=>{const a=u.p.construct(t),c=j.Children.toArray(n);return s=Zf(s),r.jsxRuntimeExports.jsx(f.Box,{...l,ref:e,direction:a,className:u.CSS(u.CSS.B("resize-multiple"),i),empty:!0,grow:!0,children:c.map((d,x)=>r.jsxRuntimeExports.jsx(lr,{onDragStart:p=>o(p,x),location:u.p.location(a),size:s[x]*100,sizeUnits:"%",showHandle:x!==c.length-1,children:d},x))})},Hf=(e,t)=>{const n=e.reduce((o,i)=>o+i,0),s=t-e.length;if(s<=0)return e.slice(0,t).map(o=>o/n);if(e.every(o=>o<=1)){const o=1-n;return[...e,...Array(s).fill(o/s)]}return e.map(()=>1/t)},uo=.001,Zf=e=>e.every(t=>u.cr.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,o,i)=>{const l=xa(e,t,n,o,i),[a,c]=Kf(e.sizeDistribution,n,l,s/t),d=c?o??null:e.root;return{...e,sizeDistribution:a,root:d}},xa=(e,t,n,s,o)=>{let i;if(o!=null)o>1&&(o/=t),i=o-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},Kf=(e,t,n,s)=>{let o=t;for(;o>0&&e[o]+n<=s;)o--;const i=e[o]+n,l=Yf(o,e,s,n),a=e[l]-n;return i<s||a<s?[e,!1]:[e.map((c,d)=>d===o?i:d===l?a:c),!0]},Yf=(e,t,n,s)=>(e===t.length-1?Uf:Gf)(e,t,n,s),Gf=(e,t,n,s)=>{let o=e+1;for(;o<t.length-1&&t[o]-s<=n;)o++;return o},Uf=(e,t,n,s)=>{let o=e-1;for(;o>0&&t[o]-s<=n;)o--;return o},po=2,Wf=100,pa=({onCollapse:e,onResize:t,location:n="left",minSize:s,maxSize:o,initialSize:i=200,collapseThreshold:l=1/0,className:a,...c})=>{const[d,x]=j.useState(u.R(i,s,o)),p=j.useRef(null),m=u.K$1.construct(n),h=j.useCallback(y=>{if(p.current===null)return 0;const C=u.Ho.dim(y,u.K$1.direction(m),!0)*(1-2*Number(["bottom","right"].includes(m))),k=p.current+C,T=u.R(k,s,o);return(T-k)/(s??Wf)>l?po:T},[m,s,o,l]),g=j.useRef(null),E=j.useCallback(y=>{const C=h(y);x(C),g.current!=null&&t?.(C,u.Ho.construct(g.current))},[t,h]),S=j.useCallback(()=>x(y=>(p.current=y,y)),[x]),R=j.useCallback(y=>h(y)===po&&e?.(),[e,h]);j.useEffect(()=>{s==null||o==null||x(y=>{const C=u.R(y,s,o);return p.current=C,C})},[s,o]);const v=_e.useCursorDrag({onMove:E,onStart:S,onEnd:R});return r.jsxRuntimeExports.jsx(lr,{ref:g,location:m,size:d,onDragStart:v,className:u.clsx(a,u.CSS.expanded(d!==po)),...c})},Xf=Object.freeze(Object.defineProperty({__proto__:null,Core:lr,Multiple:da,Single:pa,calculateDiffPercentage:xa,useMultiple:ua},Symbol.toStringTag,{value:"Module"})),ar=({aetherKey:e,enabled:t=!0})=>{const{setState:n}=f.useLifecycle({aetherKey:e,type:L.Eraser.TYPE,schema:L.eraserStateZ,initialState:{region:u.Ho.ZERO,enabled:t}}),s=f.useSyncedRef(t);return{erase:j.useCallback(i=>{n({enabled:s.current,region:i})},[n,s])}},qf=({aetherKey:e,children:t})=>{const{erase:n}=ar({aetherKey:e}),s=f.useResize(n);return r.jsxRuntimeExports.jsx("div",{ref:s,className:u.CSS(u.CSS.inheritDims()),children:t})},Qf=Object.freeze(Object.defineProperty({__proto__:null,Eraser:qf,use:ar},Symbol.toStringTag,{value:"Module"})),Jf=({items:e,initialKey:t})=>{const[n,s]=j.useState(t),o=l=>s(l===n?void 0:l),i=e.find(l=>l.key===n);return{onSelect:o,activeItem:i}},eh=({activeItem:e,children:t,onSelect:n,location:s="left",collapseThreshold:o=.65,className:i,onResize:l,onCollapse:a,eraseEnabled:c,...d})=>{const x=u.K$1.direction(s);c??=e!=null;const p=j.useCallback(()=>{a?a():e!=null&&n?.(e.key)},[n,e?.key,a]),{erase:m}=ar({enabled:c}),h=j.useCallback((v,y)=>{l?.(v,y),m(y)},[l,m]),{content:g,minSize:E,maxSize:S,initialSize:R=0}=e??{};return r.jsxRuntimeExports.jsx(pa,{className:u.CSS(u.CSS.B("nav-drawer"),u.CSS.dir(x),u.CSS.visible(e!=null),i),collapseThreshold:o,onCollapse:p,location:s,onResize:h,minSize:E,maxSize:S,initialSize:R,...d,children:g})},th=Object.freeze(Object.defineProperty({__proto__:null,Bar:f.Bar,Drawer:eh,useDrawer:Jf},Symbol.toStringTag,{value:"Module"})),cr={info:"var(--pluto-text-color)",error:"var(--pluto-error-z)",warning:"var(--pluto-warning-m1)",success:"var(--pluto-primary-z)",loading:"var(--pluto-text-color)",disabled:"var(--pluto-gray-l8)"},ur=({variant:e,...t})=>e==="loading"?r.jsxRuntimeExports.jsx(f.Loading,{...t}):r.jsxRuntimeExports.jsx(f.Circle,{color:e!=null?cr[e]:void 0,...t}),nh=({action:e})=>j.isValidElement(e)?e:j.createElement(f.Button,{...e,key:e.key,size:"tiny"}),sh=({status:{key:e,time:t,count:n,message:s,description:o,variant:i},silence:l,actions:a,className:c,children:d,...x})=>{const p=j.useRef(null);return r.jsxRuntimeExports.jsxs(f.Box,{className:u.CSS(u.CSS.B("notification"),c),y:!0,empty:!0,ref:p,...x,children:[r.jsxRuntimeExports.jsxs(f.Box,{x:!0,justify:"between",grow:!0,style:{width:"100%"},children:[r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",gap:"small",children:[r.jsxRuntimeExports.jsx(ur,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:`x${n}`}),r.jsxRuntimeExports.jsx(f.DateTime,{className:u.CSS(u.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),r.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>l(e),children:r.jsxRuntimeExports.jsx(f.Close,{})})]}),r.jsxRuntimeExports.jsxs(f.Box,{y:!0,align:"start",className:u.CSS(u.CSS.BE("notification","content")),gap:"small",children:[d??r.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.BE("notification","message")),style:{flexGrow:1},children:s}),o!=null&&r.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:o})]}),a!=null&&r.jsxRuntimeExports.jsx(f.Box,{x:!0,align:"center",justify:"end",className:u.CSS(u.CSS.BE("notification","actions")),children:L.t.toArray(a).map(m=>r.jsxRuntimeExports.jsx(nh,{action:m},m.key))})]},t.toString())},oh=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:f.Aggregator,Indicator:ur,Notification:sh,Summary:f.Summary,VARIANT_COLORS:cr,useAdder:f.useAdder,useAsyncErrorHandler:f.useAsyncErrorHandler,useErrorHandler:f.useErrorHandler,useNotifications:f.useNotifications},Symbol.toStringTag,{value:"Module"})),ma=e=>e==="preview"?"connected":e,fa=e=>e==="preview"?"preview":void 0,As=({resourceName:e,value:t,onChange:n,data:s,getItem:o,subscribe:i,haulType:l,icon:a,disabled:c,onSearch:d,emptyContent:x,status:p,onFetchMore:m,children:h,renderTag:g,actions:E,allowNone:S,replaceOnSingle:R,triggerProps:v,virtual:y=!0,dialogProps:C,variant:k="connected",...T})=>r.jsxRuntimeExports.jsx(f.Frame,{variant:ma(k),...T,children:r.jsxRuntimeExports.jsxs(f.Frame$1,{multiple:!0,value:t,onChange:n,data:s,getItem:o,subscribe:i,onFetchMore:m,allowNone:S,replaceOnSingle:R,virtual:y,children:[r.jsxRuntimeExports.jsx(ga,{haulType:l,icon:a,placeholder:`Select ${e}s`,disabled:c,variant:fa(k),...v,children:g}),r.jsxRuntimeExports.jsx(f.Dialog$2,{onSearch:d,emptyContent:x,status:p,actions:E,resourceName:e,...C,children:h})]})}),Qe=(e,t)=>{const n={};t.forEach(o=>n[o]=void 0);const s=o=>{const{...i}={...o,...n};return r.jsxRuntimeExports.jsx(e,{...i})};return s.displayName=`RemoveProps(${e.displayName})`,s},ha=e=>r.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:L.SIZES,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"tiny",children:"S"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"small",children:"M"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"medium",children:"L"})]}),rh=Object.freeze(Object.defineProperty({__proto__:null,SIZES:L.SIZES,SelectSize:ha,isRenderProp:f.isRenderProp,isSize:L.isSize,removeProps:Qe,renderProp:f.renderProp,size:L.size},Symbol.toStringTag,{value:"Module"})),Os=({children:e="",size:t="medium",color:n,icon:s,onClose:o,className:i,onDragStart:l,...a})=>{const c=u.fr.cssString(n);s==null&&n!=null&&(s=r.jsxRuntimeExports.jsx(f.Circle,{color:c}));const d=o==null?void 0:r.jsxRuntimeExports.jsx(f.Button,{"aria-label":"close",size:t==="tiny"?"small":t,variant:"text",className:u.CSS.BE("tag","close"),sharp:!0,onClick:x=>{x.stopPropagation(),o()},children:r.jsxRuntimeExports.jsx(f.Close,{})});return r.jsxRuntimeExports.jsxs(f.Button,{el:"div",className:u.CSS(i,u.CSS.B("tag"),o!=null&&u.CSS.BM("tag","closeable")),size:t,overflow:"nowrap",align:"center",gap:"small",onDragStart:l,...a,children:[s,d,e]})},dr=({children:e,onClick:t,variant:n="outlined",size:s="medium",...o})=>r.jsxRuntimeExports.jsx(f.Button,{el:"div",variant:n,size:s,x:!0,onClick:t,align:"center",gap:"small",style:{padding:"0rem 0.5rem",paddingRight:"2rem"},rounded:!0,...o,children:e}),ih=Object.freeze(Object.defineProperty({__proto__:null,Tag:Os,Tags:dr},Symbol.toStringTag,{value:"Module"})),lh=({itemKey:e,icon:t,onDragStart:n})=>{const s=f.useItem(e),{onSelect:o}=f.useItemState(e);return r.jsxRuntimeExports.jsx(Os,{onClose:o,onDragStart:()=>n(e),draggable:!0,size:"small",status:s==null?"error":void 0,icon:s?.icon??t,children:s?.name??e})},ah=f.renderProp(lh),xr=({items:e},t,n,s)=>{if(t===""||s===!0)return!1;const o=f.filterByType(t,e);return o.length>0&&!o.every(i=>n.includes(i.key))},ga=({haulType:e="",disabled:t,placeholder:n="Select...",variant:s="outlined",icon:o,children:i=ah})=>{const l=f.useSelection(),a=f.useSyncedRef(l),{setSelected:c}=f.useContext$3(),{toggle:d,visible:x}=f.useContext$2(),p=j.useCallback(v=>xr(v,e,L.t.toArray(l),t),[e,l,t]),{startDrag:m,...h}=f.useDragAndDrop({type:e,canDrop:p,onDrop:f.useFilterByTypeCallback(e,({items:v})=>{const y=L.t.toArray(a.current);return c(u.c.unique([...L.t.toArray(y),...v.map(C=>C.key)])),v},[c])}),g=j.useCallback(({dropped:v})=>{const y=l.filter(C=>!v.some(k=>k.key===C));c(y)},[c,l]),E=j.useCallback(v=>{m([{key:v,type:e}],g)},[m,g,e]),S=f.useDraggingState(),R=s==="text"&&l.length!==0;return r.jsxRuntimeExports.jsxs(dr,{full:"x",onClick:()=>{R||d()},...h,className:u.CSS(u.CSS.dropRegion(p(S)),u.CSS.BE("dialog","trigger"),u.CSS.BM("variant",s)),variant:s,preventClick:R,grow:!0,children:[l.length===0&&r.jsxRuntimeExports.jsxs(f.Text,{color:8,weight:400,style:{padding:"0 1rem"},children:[o,n]}),l.map(v=>i({key:v,itemKey:v,onDragStart:E,icon:o})),s!=="text"&&r.jsxRuntimeExports.jsx(ql.Animated,{className:u.CSS.level("p"),enabled:x,enabledLoc:"bottom",disabledLoc:"left",color:8}),R&&r.jsxRuntimeExports.jsx(f.Button,{variant:s,onClick:v=>{v.stopPropagation(),d()},children:r.jsxRuntimeExports.jsx(f.Add,{color:8})})]})},Dt=({resourceName:e,onChange:t,value:n,allowNone:s,emptyContent:o,haulType:i,data:l,getItem:a,subscribe:c,itemHeight:d,onFetchMore:x,disabled:p,onSearch:m,status:h,icon:g,children:E,variant:S="connected",actions:R,dialogProps:v,triggerProps:y,virtual:C=!0,closeDialogOnSelect:k=!0,...T})=>r.jsxRuntimeExports.jsx(f.Frame,{...T,variant:ma(S),children:r.jsxRuntimeExports.jsxs(f.Frame$1,{value:n,onChange:t,data:l,getItem:a,subscribe:c,allowNone:s,onFetchMore:x,itemHeight:d,virtual:C,closeDialogOnSelect:k,children:[r.jsxRuntimeExports.jsx(ja,{haulType:i,icon:g,placeholder:`Select a ${e}`,disabled:p,variant:fa(S),...y}),r.jsxRuntimeExports.jsx(f.Dialog$2,{onSearch:m,resourceName:e,emptyContent:o,status:h,actions:R,...v,children:E})]})}),ja=({haulType:e="",placeholder:t,icon:n,disabled:s,iconOnly:o=!1,hideCaret:i=!1,...l})=>{const a=f.useSelection(),{setSelected:c}=f.useContext$3(),[d]=a,x=f.useItem(d),{name:p,icon:m}=x??{},h=j.useCallback(S=>xr(S,e,a,s),[e,a,s]),g=f.useDrop({type:e,canDrop:h,onDrop:f.useFilterByTypeCallback(e,({items:S})=>(S.length!==0&&c([S[0].key]),S),[c])}),E=f.useDraggingState();return r.jsxRuntimeExports.jsxs(ea.Trigger,{variant:"outlined",gap:"small",className:u.CSS(u.CSS.dropRegion(h(E))),disabled:s,...g,...l,hideCaret:i||o,textColor:p==null?8:void 0,children:[m??n,!o&&(p??t)]})},ch=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t);if(n==null)return null;const{name:s,icon:o}=n;return r.jsxRuntimeExports.jsxs(f.ListItem,{...e,children:[o,s]})}),An=({data:e,filter:t,children:n=ch,virtual:s=!1,...o})=>{const{retrieve:i,...l}=f.useStaticData({data:e,filter:t}),{search:a}=nt.usePager({retrieve:i});return r.jsxRuntimeExports.jsx(Dt,{...o,...l,onSearch:a,virtual:s,children:n})},ln=e=>r.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:L.LEVELS,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h2",square:!0,children:"XL"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h3",square:!0,children:"L"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h4",square:!0,children:"M"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"h5",square:!0,children:"S"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"small",square:!0,children:"XS"})]}),uh=[250,400,500,600],Ea=e=>r.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:uh,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:250,children:"Light"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:400,children:"Normal"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:500,children:"Medium"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:600,children:"Bold"})]}),dh=Object.freeze(Object.defineProperty({__proto__:null,Level:ln,Weight:Ea},Symbol.toStringTag,{value:"Module"})),xh=Object.freeze(Object.defineProperty({__proto__:null,Button:pe.Button,Buttons:pe.Buttons,Core:f.Core,Dialog:f.Dialog$2,Frame:f.Frame$1,ListItem:f.ListItem,Multiple:As,MultipleTrigger:ga,Single:Dt,SingleTrigger:ja,Static:An,Text:dh,staticCanDrop:xr,useClear:f.useClear,useContext:f.useContext$3,useHover:f.useHover,useItemState:f.useItemState,useMultiple:f.useMultiple,useSelection:f.useSelection,useSingle:f.useSingle},Symbol.toStringTag,{value:"Module"})),ph=f.useVirtualCursorDragWebKit,Is=()=>{const e=j.useRef([]),t=j.useMemo(()=>({cleanup:()=>{e.current.forEach(n=>n()),e.current=[]},set:n=>{n!=null&&e.current.push(...L.t.toArray(n))}}),[]);return j.useEffect(()=>t.cleanup,[t.cleanup]),t},mh=()=>r.jsxRuntimeExports.jsx(f.Caret.Right,{className:u.CSS.BE("breadcrumb","separator")}),Cn=({children:e,...t})=>r.jsxRuntimeExports.jsx(f.Text,{className:u.CSS.BE("breadcrumb","segment"),...t,defaultEl:"span",children:e}),pr=({children:e,highlightVariant:t,...n})=>r.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.B("breadcrumb"),t!=null&&u.CSS.BM("breadcrumb","highlight",t)),x:!0,align:"center",gap:"small",...n,children:j.Children.map(e,(s,o)=>s==null||typeof s=="boolean"?null:r.jsxRuntimeExports.jsxs(j.Fragment,{children:[o>0&&r.jsxRuntimeExports.jsx(mh,{}),typeof s=="string"?r.jsxRuntimeExports.jsx(Cn,{children:s}):s]},o))}),fh=(e,t)=>{const n=e.split("/");return n.map((s,o)=>t({href:n.slice(0,o+1).join("/"),segment:s,index:o}))},hh=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:pr,Segment:Cn,mapURLSegments:fh},Symbol.toStringTag,{value:"Module"})),gh=({channelKey:e,rangeKey:t,shadow:n,className:s,...o})=>{const{value:i,onChange:l}=o,[a,c]=j.useState(!1),{update:d}=uc.useDirect({params:{rangeKey:t,channelKey:e}}),{data:x}=Mr.useDirect({params:{key:e,rangeKey:t}}),p=async C=>{d(C)},m=x?.alias,h=x?.alias??x?.name;let g=r.jsxRuntimeExports.jsx(f.Rename,{});a?g=r.jsxRuntimeExports.jsx(f.Loading,{}):m===i&&(g=r.jsxRuntimeExports.jsx(f.Check,{}));const E=p!=null&&!a&&m!==i&&e!==0,S=f.useErrorHandler(),R=()=>{E&&S(async()=>{c(!0);try{await p(i),c(!1)}catch(C){throw c(!1),C}},"Failed to set channel alias")},v=()=>{m!=null&&l?.(m)},y=e===0?r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):p==null?r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):i.length===0?r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):m===i?r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Alias synced with this label"}):r.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:["Sync alias for ",h," with this label"]});return r.jsxRuntimeExports.jsxs(f.Text$2,{selectOnFocus:!0,...o,children:[E&&r.jsxRuntimeExports.jsx(f.Button,{onClick:v,tooltip:r.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:["Set ",h," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:r.jsxRuntimeExports.jsx(f.Sync,{})}),r.jsxRuntimeExports.jsx(f.Button,{onClick:R,disabled:!E,tooltip:y,tooltipLocation:{y:"top"},variant:"outlined",children:g})]})},kt="channel";var _i=180/Math.PI,Po={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ya(e,t,n,s,o,i){var l,a,c;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(c=e*n+t*s)&&(n-=e*c,s-=t*c),(a=Math.sqrt(n*n+s*s))&&(n/=a,s/=a,c/=a),e*s<t*n&&(e=-e,t=-t,c=-c,l=-l),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*_i,skewX:Math.atan(c)*_i,scaleX:l,scaleY:a}}var Wn;function jh(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Po:ya(t.a,t.b,t.c,t.d,t.e,t.f)}function Eh(e){return e==null||(Wn||(Wn=document.createElementNS("http://www.w3.org/2000/svg","g")),Wn.setAttribute("transform",e),!(e=Wn.transform.baseVal.consolidate()))?Po:(e=e.matrix,ya(e.a,e.b,e.c,e.d,e.e,e.f))}function Sa(e,t,n,s){function o(d){return d.length?d.pop()+" ":""}function i(d,x,p,m,h,g){if(d!==p||x!==m){var E=h.push("translate(",null,t,null,n);g.push({i:E-4,x:O.interpolateNumber(d,p)},{i:E-2,x:O.interpolateNumber(x,m)})}else(p||m)&&h.push("translate("+p+t+m+n)}function l(d,x,p,m){d!==x?(d-x>180?x+=360:x-d>180&&(d+=360),m.push({i:p.push(o(p)+"rotate(",null,s)-2,x:O.interpolateNumber(d,x)})):x&&p.push(o(p)+"rotate("+x+s)}function a(d,x,p,m){d!==x?m.push({i:p.push(o(p)+"skewX(",null,s)-2,x:O.interpolateNumber(d,x)}):x&&p.push(o(p)+"skewX("+x+s)}function c(d,x,p,m,h,g){if(d!==p||x!==m){var E=h.push(o(h)+"scale(",null,",",null,")");g.push({i:E-4,x:O.interpolateNumber(d,p)},{i:E-2,x:O.interpolateNumber(x,m)})}else(p!==1||m!==1)&&h.push(o(h)+"scale("+p+","+m+")")}return function(d,x){var p=[],m=[];return d=e(d),x=e(x),i(d.translateX,d.translateY,x.translateX,x.translateY,p,m),l(d.rotate,x.rotate,p,m),a(d.skewX,x.skewX,p,m),c(d.scaleX,d.scaleY,x.scaleX,x.scaleY,p,m),d=x=null,function(h){for(var g=-1,E=m.length,S;++g<E;)p[(S=m[g]).i]=S.x(h);return p.join("")}}}var yh=Sa(jh,"px, ","px)","deg)"),Sh=Sa(Eh,", ",")",")"),Rh=1e-12;function Li(e){return((e=Math.exp(e))+1/e)/2}function Ch(e){return((e=Math.exp(e))-1/e)/2}function bh(e){return((e=Math.exp(2*e))-1)/(e+1)}const ls=function e(t,n,s){function o(i,l){var a=i[0],c=i[1],d=i[2],x=l[0],p=l[1],m=l[2],h=x-a,g=p-c,E=h*h+g*g,S,R;if(E<Rh)R=Math.log(m/d)/t,S=function(P){return[a+P*h,c+P*g,d*Math.exp(t*P*R)]};else{var v=Math.sqrt(E),y=(m*m-d*d+s*E)/(2*d*n*v),C=(m*m-d*d-s*E)/(2*m*n*v),k=Math.log(Math.sqrt(y*y+1)-y),T=Math.log(Math.sqrt(C*C+1)-C);R=(T-k)/t,S=function(P){var I=P*R,B=Li(k),F=d/(n*v)*(B*bh(t*I+k)-Ch(k));return[a+F*h,c+F*g,d*B/Li(t*I+k)]}}return S.duration=R*1e3*t/Math.SQRT2,S}return o.rho=function(i){var l=Math.max(.001,+i),a=l*l,c=a*a;return e(l,a,c)},o}(Math.SQRT2,2,4),wh=Object.freeze(Object.defineProperty({__proto__:null,Base:O.Base,Bottom:O.Bottom,Right:O.Right,Top:O.Top,axisStateZ:O.axisStateZ,newCanvas:O.newCanvas,newTickFactory:O.newTickFactory,tickFactoryProps:O.tickFactoryProps,tickType:O.tickType},Symbol.toStringTag,{value:"Module"})),vh=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:O.AcquireChannelControl,AuthoritySource:O.AuthoritySource,Chip:O.Chip,Controller:O.Controller,Indicator:O.Indicator,Legend:O.Legend,REGISTRY:O.REGISTRY$15,STATUSES:O.STATUSES,SetChannelValue:O.SetChannelValue,StateProvider:O.StateProvider,acquireChannelControl:O.acquireChannelControl,acquireChannelControlPropsZ:O.acquireChannelControlPropsZ,authoritySource:O.authoritySource,authoritySourceDetailsZ:O.authoritySourceDetailsZ,authoritySourceProps:O.authoritySourceProps,chipStateZ:O.chipStateZ,chipStatusDetailsZ:O.chipStatusDetailsZ,controllerStateZ:O.controllerStateZ,indicatorStateZ:O.indicatorStateZ,indicatorStatusDetailsZ:O.indicatorStatusDetailsZ,legendStateZ:O.legendStateZ,setChannelValue:O.setChannelValue,setChannelValuePropsZ:O.setChannelValuePropsZ,stateProviderStateZ:O.stateProviderStateZ,statusZ:O.statusZ,sugaredStateZ:O.sugaredStateZ},Symbol.toStringTag,{value:"Module"})),kh={region:u.Ho.ZERO,dpr:1,os:u.S.getOS()},_h={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},Lh=({children:e,resizeDebounce:t=100,className:n,...s})=>{const[{path:o},{bootstrapped:i,dpr:l},a]=f.use$2({type:O.Canvas.TYPE,schema:O.canvasStateZ,initialState:kh}),c=j.useRef({..._h}),d=j.useRef(!1),x=j.useCallback(E=>{c.current.bootstrapped&&(a(()=>({bootstrapped:!0,region:E,dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})})),d.current=!0)},[a]),p=j.useRef(null),m=f.useResize(x,{debounce:t}),h=f.useCombinedRefs(p,m);j.useEffect(()=>{const E=()=>{window.devicePixelRatio===l||!c.current.bootstrapped||p.current==null||a(S=>({...S,region:u.Ho.construct(p.current),dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",E,{once:!0})},[l]),j.useEffect(()=>{const E=()=>{!c.current.bootstrapped||p.current==null||a(S=>({...S,region:u.Ho.construct(p.current),glCanvas:void 0,upper2dCanvas:void 0,lower2dCanvas:void 0}))};window.addEventListener("focus",E),window.addEventListener("blur",E)},[a]);const g=j.useCallback(E=>{if(E==null)return;E.className.includes("gl")?c.current.gl=E:E.className.includes("upper2d")?c.current.upper2d=E:c.current.lower2d=E;const{gl:S,lower2d:R,upper2d:v,bootstrapped:y}=c.current;if(S==null||R==null||v==null||y)return;c.current.bootstrapped=!0;const C=S.transferControlToOffscreen(),k=v.transferControlToOffscreen(),T=R.transferControlToOffscreen();a({glCanvas:C,upper2dCanvas:k,lower2dCanvas:T,bootstrap:!0,bootstrapped:!1,region:u.Ho.construct(S),dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})},[C,k,T])},[a]);return r.jsxRuntimeExports.jsxs("div",{ref:h,className:u.CSS(u.CSS.B("canvas-container"),n),...s,children:[r.jsxRuntimeExports.jsx("canvas",{ref:g,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","lower2d"))}),r.jsxRuntimeExports.jsx("canvas",{ref:g,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","gl"))}),r.jsxRuntimeExports.jsx("canvas",{ref:g,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","upper2d"))}),r.jsxRuntimeExports.jsx(f.Composite,{path:o,children:i&&e})]})},On=(e,t)=>f.useResize(j.useCallback((n,s)=>{const o=document.querySelector(".pluto-canvas--lower2d");o!=null&&e(u.C.XY.translate(u.K.scale(u.Ho.topLeft(o),-1)).box(n),s)},[e]),t),Th=Object.freeze(Object.defineProperty({__proto__:null,Canvas:Lh,useRegion:On},Symbol.toStringTag,{value:"Module"})),Ra=j.createContext(null),ct=e=>{const t=j.use(Ra);if(t==null)throw new Error(`Cannot use ${e} as a non-child of LinePlot.`);return t},Ca=e=>{const{addViewportHandler:t}=ct("Viewport");j.useEffect(()=>t(e),[t,e])},In=(e,t)=>{const{setGridEntry:n,removeGridEntry:s}=ct(t),{key:o}=e;return f.useEffectCompare(()=>{u.K$1.outer.parse(e.loc),n(e)},([a],[c])=>L.N.equal(a,c),[e]),j.useEffect(()=>()=>s(o),[]),{gridArea:u.p.swap(u.K$1.direction(e.loc))==="x"?`axis-start-${o} / plot-start / axis-end-${o} / plot-end`:`plot-start / axis-start-${o} / plot-end / axis-end-${o}`}},ba=({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:s=u.K.ZERO,children:o,hold:i=!1,onHold:l,visible:a,...c})=>{const[d,x]=j.useState([]),p=f.useMemoDeepEqual({clearOverScan:s,hold:i,visible:a}),[{path:m},{grid:h},g]=f.use$2({aetherKey:e,type:O.LinePlot.TYPE,schema:O.linePlotStateZ,initialState:{container:u.Ho.ZERO,viewport:u.Ho.DECIMAL,grid:{},...p}}),E=j.useCallback(D=>{a&&g(z=>({...z,container:D}))},[g,a]),S=On(E,{debounce:n});j.useEffect(()=>g(D=>({...D,...p})),[p]);const R=j.useRef(new Map),v=j.useCallback(D=>(R.current.set(D,null),()=>R.current.delete(D)),[R]),y=j.useCallback(D=>{const{mode:z,box:b,stage:N}=D;(z==="pan"&&N!=="start"||z==="zoom"||z==="zoomReset"&&N==="start")&&g(_=>({..._,viewport:b})),R.current.forEach((_,M)=>M(D))},[g]),C=j.useCallback(D=>{g(z=>({...z,grid:{...z.grid,[D.key]:D}}))},[g]),k=j.useCallback(D=>g(z=>{const{[D]:b,...N}=z.grid;return{...z,grid:N}}),[g]),T=j.useCallback(D=>{x(z=>[...z.filter(({key:b})=>b!==D.key),D])},[x]),P=j.useCallback(D=>x(z=>z.filter(({key:b})=>b!==D)),[T]),I=j.useMemo(()=>Mh(h),[h]),B=j.useCallback(D=>{g(z=>({...z,hold:D})),l?.(D)},[g,l]),F=`line-plot-${e}`,$=j.useMemo(()=>({lines:d,setGridEntry:C,removeGridEntry:k,setLine:T,removeLine:P,setViewport:y,addViewportHandler:v,setHold:B,id:F}),[F,d,C,k,T,P,y,v,B]);return r.jsxRuntimeExports.jsx("div",{id:F,className:u.CSS.B("line-plot"),style:{...t,...I},ref:S,...c,children:r.jsxRuntimeExports.jsx(Ra,{value:$,children:r.jsxRuntimeExports.jsx(f.Composite,{path:m,children:o})})})},Mh=e=>{const t=u.CSS.newGridBuilder();return O.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)"),O.regions("bottom",e).reverse().forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),O.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)"),O.regions("right",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.build()},mr=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?O.XAxis.TYPE:O.YAxis.TYPE,s=`${e}-axis`,o=({aetherKey:i,children:l,location:a=t,label:c="",labelLevel:d="small",labelDirection:x=e,onLabelChange:p,color:m,labelSize:h,showGrid:g,type:E,bounds:S,className:R,tickSpacing:v,autoBounds:y,axisKey:C,autoBoundUpdateInterval:k,onAutoBoundsChange:T,style:P,...I})=>{const B=(c?.length??0)>0,F=f.useUniqueKey(i),$=f.useMemoDeepEqual({location:a,showGrid:g,type:E,bounds:S,axisKey:C,label:c,labelDirection:x,tickSpacing:v,autoBounds:y,autoBoundUpdateInterval:k}),[{path:D},{size:z,labelSize:b,...N},_]=f.use$2({aetherKey:F,type:n,schema:O.coreAxisStateZ,initialState:$});j.useEffect(()=>_(K=>({...K,...$})),[$]),j.useEffect(()=>{const{lower:K,upper:Z}=O.parseAutoBounds(N.autoBounds);N.bounds!=null&&(K&&S?.lower!==N.bounds.lower||Z&&S?.upper!==N.bounds.upper)&&T?.(N.bounds)},[N.autoBounds,N.bounds]);const M=In({loc:a,key:`${n}-${F}`,size:z+b,order:1},`${e.toUpperCase()}Axis`),V=Ps.useTypography(d).toString(),H=j.useRef(0);return j.useEffect(()=>{if(e==="y"){if(c==null)return;let Z=L.dimensions(c,V)[u.p.dimension(u.p.construct(x))];Z>0&&(Z+=9),_(G=>({...G,labelSize:Z}))}else{let Z=L.dimensions(c,V).height*1.3;Z>0&&(Z+=12);const G=H.current;O.withinSizeThreshold(G,Z)||(H.current=Z,_(Q=>({...Q,labelSize:Z})))}},[c,x,V]),r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(R,u.CSS.B("axis"),u.CSS.B(s),u.CSS.loc(a)),style:{...P,...M},align:"center",justify:a!=="left"?"end":"start",direction:u.p.swap(e),...I,children:B&&r.jsxRuntimeExports.jsx(f.MaybeEditable,{className:u.CSS(u.CSS.BE("axis","label"),u.CSS.dir(x)),value:c,onChange:p,level:d})}),r.jsxRuntimeExports.jsx(f.Composite,{path:D,children:l})]})};return o.displayName=`${e.toUpperCase()}Axis`,o},wa=mr("x"),va=mr("y"),Nh=u.K.xy.extend({root:u.K$1.corner,units:ne.z.object({x:ne.z.enum(["px","decimal"]),y:ne.z.enum(["px","decimal"])})}),Ph=Nh.partial({root:!0,units:!0}),Ah=e=>{const t={};return t[e.root?.x??"left"]=e?.units?.x==="px"?`${e.x}px`:`${e.x*100}%`,t[e.root?.y??"top"]=e?.units?.y==="px"?`${e.y}px`:`${e.y*100}%`,t},Oh=(e,t)=>{const n={x:e.x,y:e.y};if(t.current==null)return n;const s=u.Ho.construct(t.current),o=u.Ho.construct(t.current.parentElement);return e.units?.x==="decimal"?e.root?.x==="right"&&(n.x=1-e.x):e.root?.x==="right"?n.x=1-(e.x+u.Ho.width(s))/u.Ho.width(o):n.x/=u.Ho.width(o),e.units?.y==="decimal"?e.root?.y==="bottom"&&(n.y=1-e.y):e.root?.y==="bottom"?n.y=1-(e.y+u.Ho.height(s))/u.Ho.height(o):n.y/=u.Ho.height(o),n},Ih=(e,t)=>{if(t.current==null)return null;const n=u.Ho.construct(t.current.parentElement),s=u.Ho.construct(t.current),o={x:e.x,y:e.y,root:{...u.K$1.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(o.x=(1-e.x)*u.Ho.width(n)-u.Ho.width(s),o.root.x="right"):e.x<.2?o.x=e.x*u.Ho.width(n):o.units.x="decimal",e.y>.8?(o.y=(1-e.y)*u.Ho.height(n)-u.Ho.height(s),o.root.y="bottom"):e.y<.2?o.y=e.y*u.Ho.height(n):o.units.y="decimal",o.x=Math.round(o.x*100)/100,{...o,...u.K.truncate(o,3)}},Ti=u.Ho.reRoot(u.Ho.DECIMAL,u.K$1.TOP_LEFT),Dh={x:.1,y:.1,root:u.K$1.TOP_LEFT,units:{x:"decimal",y:"decimal"}},Ds=j.memo(({className:e,value:t,onChange:n,style:s,draggable:o=!0,initial:i=Dh,...l})=>{const[a,c]=L.usePurePassthrough({value:t,onChange:n,initial:i}),d=j.useRef(a),x=f.useSyncedRef(o===!1),p=j.useRef(null);a!==null&&(s={...s,...Ah(a)});const m=j.useCallback(g=>{if(p.current?.parentElement==null)return d.current;const E=u.Ho.construct(p.current.parentElement),S=u.C.XY.scale(E).scale(Ti),R=S.box(u.Ho.construct(p.current)),v=u.C.XY.clamp(u.Ho.construct(u.Ho.topLeft(Ti),{width:1-u.Ho.width(R),height:1-u.Ho.height(R)})),y=u.K.translate(u.K.construct(d.current),u.Ho.signedDims(S.box(g))),C=v.pos(y);return Ih(C,p)},[]),h=_e.useCursorDrag({onStart:j.useCallback(()=>{d.current=Oh(d.current,p)},[]),onMove:j.useCallback(g=>{if(x.current)return;const E=m(g);E!==null&&c(E)},[]),onEnd:j.useCallback(g=>{if(x.current)return;const E=m(g);E!==null&&(d.current=E)},[])});return r.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(e,u.CSS.B("legend")),bordered:!0,style:s,onDragStart:h,draggable:o,borderColor:5,ref:p,onDrag:f.preventDefault,onDragEnd:f.preventDefault,background:1,rounded:1,...l})});Ds.displayName="Legend.Container";const Dn=j.memo(({data:e,allowVisibleChange:t=!0,background:n=1,entryProps:s,...o})=>r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:e.sort((i,l)=>i.label.localeCompare(l.label)).map(({key:i,visible:l=!0,...a})=>r.jsxRuntimeExports.jsx(Bh,{entry:{key:i,visible:l,...a},allowVisibleChange:t,background:n,...s,...o},i))}));Dn.displayName="Legend.Entries";const Bh=({allowVisibleChange:e=!0,entry:t,onEntryChange:n,colorPickerVisible:s,onColorPickerVisibleChange:o,className:i,background:l,...a})=>{const{color:c,key:d,label:x,visible:p}=t;return r.jsxRuntimeExports.jsxs(f.Box,{align:"center",className:u.CSS(u.CSS.B("legend-entry"),i),gap:"small",x:!0,...a,children:[r.jsxRuntimeExports.jsxs(f.Box,{align:"center",gap:"small",x:!0,children:[r.jsxRuntimeExports.jsx(_e.Swatch,{allowChange:n!=null,draggable:!1,onChange:m=>n?.({...t,color:m}),size:"tiny",value:c,onVisibleChange:o}),r.jsxRuntimeExports.jsx(f.MaybeEditable,{color:t.visible?10:7,level:"small",onChange:m=>n?.({...t,label:m}),onDoubleClick:f.stopPropagation,overflow:"nowrap",value:x})]}),e&&r.jsxRuntimeExports.jsx(f.Button,{className:u.CSS.B("visible-toggle"),contrast:l,onClick:m=>{m.stopPropagation(),n?.({...t,visible:!p})},onDoubleClick:f.stopPropagation,size:"tiny",variant:"text",children:p?r.jsxRuntimeExports.jsx(f.Visible,{}):r.jsxRuntimeExports.jsx(f.Hidden,{})})]},d)},ka=({data:e,background:t=1,allowVisibleChange:n=!0,onEntryChange:s,position:o,onPositionChange:i,...l})=>{const[a,c]=j.useState(!1);return e.length===0?null:r.jsxRuntimeExports.jsx(Ds,{...l,draggable:!a,value:o,onChange:i,gap:"small",background:t,className:u.CSS.B("legend-grouped"),children:e.map(({key:d,name:x,data:p},m)=>r.jsxRuntimeExports.jsxs(j.Fragment,{children:[r.jsxRuntimeExports.jsx(f.Text,{level:"small",color:9,weight:500,className:u.CSS.B("legend-name"),children:x}),r.jsxRuntimeExports.jsx(f.Box,{y:!0,grow:!0,className:u.CSS.B("legend-entries"),empty:!0,children:r.jsxRuntimeExports.jsx(Dn,{data:p,onEntryChange:s,colorPickerVisible:a,onColorPickerVisibleChange:c,allowVisibleChange:n,background:t,entryProps:$h})}),m!==e.length-1&&r.jsxRuntimeExports.jsx("div",{className:u.CSS.B("legend-divider")})]},d))})},$h={justify:"between",grow:!0},fr=({data:e=[],onEntryChange:t,position:n,onPositionChange:s,allowVisibleChange:o=!0,background:i=1,...l})=>{const[a,c]=j.useState(!1);return e.length===0?null:r.jsxRuntimeExports.jsx(Ds,{...l,draggable:!a,value:n,onChange:s,background:i,empty:!0,children:r.jsxRuntimeExports.jsx(Dn,{data:e,onEntryChange:t,colorPickerVisible:a,onColorPickerVisibleChange:c,allowVisibleChange:o,background:i,entryProps:zh})})},zh={justify:"between",grow:!0},Vh=Object.freeze(Object.defineProperty({__proto__:null,Container:Ds,Grouped:ka,Simple:fr,stickyXYz:Ph},Symbol.toStringTag,{value:"Module"})),_a=({variant:e="floating",...t})=>e==="floating"?r.jsxRuntimeExports.jsx(La,{...t}):r.jsxRuntimeExports.jsx(Fh,{...t}),La=j.memo(({onLineChange:e,...t})=>{const{lines:n}=ct("FloatingLegend"),s=Ta(n);return s.length===1?r.jsxRuntimeExports.jsx(fr,{data:s[0].data,onEntryChange:e,...t}):r.jsxRuntimeExports.jsx(ka,{data:s,onEntryChange:e,...t})});La.displayName="LinePlot.FloatingLegend";const Ta=e=>j.useMemo(()=>{const n={};for(const o of e){const i=n[o.legendGroup];i!=null?i.push(o):n[o.legendGroup]=[o]}const s=Object.entries(n).map(([o,i])=>({key:o,name:o,data:i}));return s.sort((o,i)=>o.name.localeCompare(i.name)),s},[e]),Fh=({onLineChange:e})=>{const{lines:t}=ct("FixedLegend"),n=Ta(t),s=f.useUniqueKey(),o=In({key:s,size:t.length>0?36:0,loc:"top",order:5},"Legend");return n.length===0?null:n.length===1?r.jsxRuntimeExports.jsx(f.Box,{align:"center",justify:"start",x:!0,style:o,children:r.jsxRuntimeExports.jsx(Dn,{data:n[0].data,onEntryChange:e,background:0})}):r.jsxRuntimeExports.jsxs(f.Box,{align:"center",justify:"start",x:!0,style:o,gap:"huge",children:[r.jsxRuntimeExports.jsx(Mi,{name:"Y1",data:n[0].data,onLineChange:e}),r.jsxRuntimeExports.jsx(Mi,{name:"Y2",data:n[1].data,onLineChange:e})]})},Mi=({name:e,data:t,onLineChange:n})=>r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:e}),r.jsxRuntimeExports.jsx(Dn,{data:t,onEntryChange:n,background:0})]}),hr=j.memo(({aetherKey:e,...t})=>(f.useUnidirectional({aetherKey:e,type:O.Line.TYPE,schema:O.stateZ,state:t}),null));hr.displayName="Line";const Hh=Object.freeze(Object.defineProperty({__proto__:null,Line:hr},Symbol.toStringTag,{value:"Module"})),gr=({aetherKey:e,color:t,label:n="",legendGroup:s,visible:o=!0,...i})=>{const l=f.useUniqueKey(e),{setLine:a,removeLine:c}=ct("Line");return j.useEffect(()=>(a({key:l,color:t,label:n,visible:o,legendGroup:s}),()=>c(l)),[n,t,o,s]),r.jsxRuntimeExports.jsx(hr,{aetherKey:l,color:t,label:n,visible:o,...i})},Ma=({level:e="h2",...t})=>{const n=f.useUniqueKey(),s=Ps.useTypography(e),o=In({key:n,size:(s.lineHeight+2)*s.baseSize,loc:"top",order:10},"Title");return r.jsxRuntimeExports.jsx(f.Box,{justify:"center",align:"center",style:o,children:r.jsxRuntimeExports.jsx(f.MaybeEditable,{...t,level:e})})},Na=({aetherKey:e,...t})=>{const n=f.useUniqueKey(e),[,,s]=f.use$2({aetherKey:n,type:O.Tooltip.TYPE,schema:O.tooltipStateZ,initialState:{position:null,...t}}),o=j.useRef(null),i=j.useCallback(a=>{const c=document.querySelector(".pluto-canvas-container");if(c==null)return;const d=u.Ho.topLeft(c);s({position:u.K.translation(d,u.K.construct(a))})},[s]),l=j.useCallback(()=>s({position:null}),[s]);return j.useEffect(()=>{if(o.current===null)return;const a=o.current.parentElement;if(a!=null)return a.addEventListener("mousemove",i),a.addEventListener("mouseleave",l),()=>{a.removeEventListener("mousemove",i),a.removeEventListener("mouseleave",l)}},[i]),r.jsxRuntimeExports.jsx("span",{ref:o})},Zh=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Na},Symbol.toStringTag,{value:"Module"})),Pa=()=>{const e=j.useRef(new Map),t=j.useCallback(s=>{const{request:o,response:i}=s,l=e.current.get(o);l!=null&&(l(i.bounds),e.current.delete(o))},[]),[,,n]=f.use$2({type:O.BoundQuerier.TYPE,schema:O.boundQuerierStateZ,onAetherChange:t,initialState:{request:"",response:{request:"",bounds:{}}}});return j.useCallback(async()=>await new Promise(s=>{const o=u.Gt.create();e.current.set(o,s),n(i=>({...i,request:o}))}),[])},Kh=({ref:e})=>(e.current=Pa(),null),Yh={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer",cancel:"default"},Aa=({className:e,mode:t,maskBox:n,children:s,style:o,...i})=>r.jsxRuntimeExports.jsxs("div",{className:u.CSS(u.CSS.noSelect,u.CSS.BE("viewport-mask","container"),e),style:{cursor:Yh[t],...o},...i,children:[r.jsxRuntimeExports.jsx("div",{style:{...u.Ho.css(n),display:u.Ho.areaIsZero(n)?"none":"block"},className:u.CSS.BE("viewport-mask","selection")}),s]}),Gh=(e,t)=>{for(;e!=null&&!t(e);)e=e.parentElement;return e},Uh=11,Wh=6,Xh=2,Ni=5,qh=e=>u.Ho.width(e)<Ni&&u.Ho.height(e)<Ni,hn=e=>{const t=u.Ho.width(e),n=u.Ho.height(e);return Math.min(t,n)<.001?Uh:Wh},Qh=["zoom","pan","select","zoomReset","cancel"],jr=[...Qh,"click"],Jh=ne.z.enum(jr),Oa=["zoom","select"],gn={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"],["MouseMiddle"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},Ia={defaultMode:"pan",pan:[["MouseLeft"],["MouseMiddle"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},Da={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"],["MouseMiddle"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]],cancel:[["Escape"]]},Er={zoom:gn,pan:Ia,select:Da,zoomReset:gn,click:gn,cancel:gn},eg=e=>{const t=Object.entries(e);return Object.fromEntries(t.map(([n,s])=>n==="defaultMode"?[n,s]:[n,s.map(o=>o.filter(i=>i!=="MouseLeft")).filter(o=>o.length>0)]))},tg=u.Ho.construct(0,0,1,1,u.K$1.TOP_LEFT),ng={width:30,height:50},Ba=({onChange:e,triggers:t,initial:n=tg,threshold:s=ng,ref:o})=>{const i=t?.defaultMode??"zoom",[l,a]=j.useState(u.Ho.ZERO),[c,d]=j.useState(i),[x,p]=f.useStateRef(n),m=j.useRef(u.K.ZERO),h=j.useRef(null),g=u._.construct(s);j.useEffect(()=>p(()=>u.Ho.truncate(n,hn(n))),[n]),j.useEffect(()=>d(i),[i]);const[E,S,R,v]=f.useMemoCompare(()=>{const I={...Er[i],...t},B=f.flattenConfig(I),F=eg(I);return[I,B,F,f.flattenConfig(F)]},f.compareModeConfigs,[t]),y=j.useCallback(({box:I,triggers:B,stage:F,cursor:$})=>{if(h.current==null)return;const D=f.determineMode(E,B),z=u.Ho.construct(h.current);if(D==null)return;if(D==="cancel"){a(u.Ho.ZERO),e?.({box:x.current,mode:D,stage:F,cursor:$});return}if(D==="zoomReset")return a(u.Ho.ZERO),e?.({box:u.Ho.DECIMAL,mode:D,stage:F,cursor:$}),p(u.Ho.DECIMAL);const b=qh(I);if(F==="end"){if(b){D==="zoom"&&a(u.Ho.ZERO),e?.({box:x.current,mode:"click",stage:F,cursor:$});return}return p(_=>{if(D==="pan"){const V=Pi(I,_,z);return V===null||u.Ho.equals(V,_)?_:(e?.({box:V,mode:D,stage:F,cursor:$}),V)}const M=C(I,_,z);return M===null?_:(e?.({box:M,mode:D,stage:F,cursor:$}),D==="zoom"?(a(u.Ho.ZERO),M):u.Ho.truncate(_,hn(_)))})}if(Oa.includes(D))return b?void 0:a(u.C.XY.scale(z).clamp(z).translate({x:-u.Ho.left(z),y:-u.Ho.top(z)}).box(Ai(g,I,z)));if(a(_=>u.Ho.areaIsZero(_)?_:u.Ho.ZERO),u.K.distance($,m.current)<Xh)return;m.current=$;const N=Pi(I,x.current,z);e?.({box:N,mode:D,stage:F,cursor:$})},[a,d,e,E,s.height,s.width,p,h,hn]);j.useImperativeHandle(o,()=>({reset:()=>{a(u.Ho.ZERO),p(u.Ho.DECIMAL),e?.({box:u.Ho.DECIMAL,mode:"zoomReset",stage:"start",cursor:u.K.ZERO})}}),[e]);const C=j.useCallback((I,B,F)=>{const $=Ao(B,F).box(Ai(g,I,F));return u.Ho.truncate($,hn($))},[s]),k=f.useHeldRef({triggers:[["Control"]]}),T=f.useHeldRef({triggers:[["Alt"]]});j.useEffect(()=>{const I=B=>{if(h.current==null)return;let F=1;B.deltaY<0?F-=.035:F+=.035;const $=u.Ho.construct(h.current),D=u.K.construct(B);if(Array.from(h.current.children).push(h.current),!u.Ho.contains($,D)||h.current!==B.target&&Gh(B.target,V=>V===h.current)==null)return;const N=Ao(x.current,u.Ho.construct(h.current)).pos(u.K.construct(B));let M=u.C.XY.magnify({x:k.current.held?1:F,y:T.current.held?1:F}).box(x.current);M=u.Ho.translate(M,{x:k.current.held?0:N.x*(1-F),y:T.current.held?0:N.y*(1-F)}),p(M),e?.({stage:"end",box:M,cursor:u.K.construct(B),mode:"zoom"})};return window.addEventListener("wheel",I),()=>window.removeEventListener("wheel",I)},[p,e]),Jl.useDrag({bound:h,onDrag:y,triggers:S,loose:!0});const P=j.useCallback(({triggers:I,stage:B})=>{if(B==="end")return d(i);const F=f.determineMode(R,I);F!=null&&d(F)},[R,i,e]);return f.use$1({triggers:v,callback:P,region:h}),{maskBox:l,ref:h,mode:c}},Ao=(e,t)=>u.C.XY.scale(t).clamp(t).scale(e),Pi=(e,t,n)=>{let s=u.Ho.signedDims(Ao(t,n).box(e));s={signedWidth:-s.signedWidth,signedHeight:-s.signedHeight};const o=u.C.XY.translate(u.K.construct(s)).box(t);return u.Ho.truncate(o,hn(o))},Ai=(e,t,n)=>u.Ho.height(t)<=e.height?u.Ho.construct(u.Ho.left(t),u.Ho.top(n),u.Ho.width(t),u.Ho.height(n)):u.Ho.width(t)<=e.width?u.Ho.construct(u.Ho.left(n),u.Ho.top(t),u.Ho.width(n),u.Ho.height(t)):t,Wt=({mode:e,triggers:t})=>r.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:[u.U.capitalize(e),r.jsxRuntimeExports.jsx(f.Text$1,{trigger:t[0],el:"span"})]}),sg=({triggers:e,value:t,onChange:n,disable:s=["zoomReset","click","cancel"],tooltipDelay:o,tooltipLocation:i,hideTooltip:l,...a})=>{const c=j.useMemo(()=>jr.filter(x=>!s.includes(x)),[s]),d={tooltipDelay:o,tooltipLocation:i,hideTooltip:l,size:"small"};return r.jsxRuntimeExports.jsxs(pe.Buttons,{...a,keys:c,value:t,onChange:n,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"zoom",tooltip:r.jsxRuntimeExports.jsx(Wt,{mode:"zoom",triggers:e.zoom}),...d,children:r.jsxRuntimeExports.jsx(f.Zoom,{})}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"pan",tooltip:r.jsxRuntimeExports.jsx(Wt,{mode:"pan",triggers:e.pan}),...d,children:r.jsxRuntimeExports.jsx(f.Pan,{})}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"select",tooltip:r.jsxRuntimeExports.jsx(Wt,{mode:"select",triggers:e.select}),...d,children:r.jsxRuntimeExports.jsx(f.Selection,{})})]})},og=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:Er,MASK_MODES:Oa,MODES:jr,Mask:Aa,PAN_DEFAULT_TRIGGERS:Ia,SELECT_DEFAULT_TRIGGERS:Da,SelectMode:sg,TooltipText:Wt,ZOOM_DEFAULT_TRIGGERS:gn,modeZ:Jh,use:Ba},Symbol.toStringTag,{value:"Module"})),rg=e=>e==null?null:e.closest(".pluto-line-plot__viewport")??null,$a=({ref:e,children:t,initial:n=u.Ho.DECIMAL,onChange:s,...o})=>{const{setViewport:i}=ct("Viewport");j.useLayoutEffect(()=>{i({box:n,mode:"zoom",cursor:u.K.ZERO,stage:"start"})},[i,n]);const l=j.useCallback(c=>{i(c),s?.(c)},[s,i]),a=Ba({onChange:l,initial:n,ref:e,...o});return r.jsxRuntimeExports.jsx(Aa,{className:u.CSS.BE("line-plot","viewport"),...a,children:t})},ig=Object.freeze(Object.defineProperty({__proto__:null,BoundsQuerier:Kh,Legend:_a,Line:gr,LinePlot:ba,Title:Ma,Tooltip:Zh,Viewport:$a,XAxis:wa,YAxis:va,axisFactory:mr,selectViewportEl:rg,useBoundQuerier:Pa,useContext:ct,useGridEntry:In,useViewport:Ca},Symbol.toStringTag,{value:"Module"})),lg=({aetherKey:e,...t})=>(f.use$2({aetherKey:e,type:O.Annotation.TYPE,schema:O.annotationStateZ,initialState:t}),null),za=({aetherKey:e,menu:t,...n})=>{const s=f.useUniqueKey(e),{setViewport:o,setHold:i}=ct("Range.Provider"),[,{hovered:l,count:a},c]=f.use$2({aetherKey:s,type:O.Provider.TYPE,schema:O.providerStateZ,initialState:{...n,cursor:null,hovered:null,count:0}}),d=In({key:s,loc:"top",size:a>0?32:0,order:3},"Annotation.Provider"),x=f.useContextMenu(),p=f.useSyncedRef(x.visible),m=j.useCallback(g=>c(E=>({...E,cursor:{x:g.clientX,y:g.clientY}})),[c]),h=j.useCallback(()=>{p.current||c(g=>({...g,cursor:null}))},[c,p]);return r.jsxRuntimeExports.jsx(f.ContextMenu,{...x,menu:()=>t==null||l==null?null:t(l),children:r.jsxRuntimeExports.jsx(f.Box,{style:{...d,cursor:l!=null?"pointer":"default",width:"100%",height:"100%"},onContextMenu:x.open,className:x.className,onClick:()=>{l!=null&&(o({box:u.Ho.construct({x:l.viewport.lower,y:0},{x:l.viewport.upper,y:1}),mode:"zoom",cursor:u.K.ZERO,stage:"start"}),i(!0))},onMouseMove:m,onMouseLeave:h})})},ag=Object.freeze(Object.defineProperty({__proto__:null,Annotation:lg,Provider:za},Symbol.toStringTag,{value:"Module"})),Va={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},cg=f.flattenConfig(Va),Fa=({aetherKey:e})=>{const t=f.useUniqueKey(e),[,,n]=f.use$2({aetherKey:t,type:O.Measure.TYPE,schema:O.measureStateZ,initialState:{hover:null,one:null,two:null}}),s=j.useRef(null),o=f.useHeldRef({triggers:cg,loose:!0}),i=j.useCallback(({mode:c,cursor:d})=>{if(c==="click"){const x=f.determineMode(Va,o.current.triggers,{loose:!0});if(["one","two"].includes(x))return n(p=>({...p,[x]:d}));n(x==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??d,two:p.one!==null?d:p.two}))}},[n,o]);Ca(i);const l=j.useCallback(c=>n(d=>({...d,hover:u.K.construct(c)})),[n]),a=j.useCallback(()=>{n(c=>({...c,hover:null}))},[n]);return j.useEffect(()=>{if(s.current===null)return;const c=s.current.parentElement;if(c!=null)return c.addEventListener("mousemove",l),c.addEventListener("mouseleave",a),()=>{c.removeEventListener("mousemove",l),c.removeEventListener("mouseleave",a)}},[i]),r.jsxRuntimeExports.jsx("span",{ref:s})},ug=Object.freeze(Object.defineProperty({__proto__:null,Measure:Fa},Symbol.toStringTag,{value:"Module"})),yr=({aetherKey:e,label:t,position:n,onLabelChange:s,onPositionChange:o,onUnitsChange:i,units:l="",color:a,lineWidth:c,lineDash:d,className:x,onSelect:p,style:m,...h})=>{const[g,E]=L.usePurePassthrough({value:t,onChange:s,initial:""}),S=f.useSyncedRef(o),[,{pixelPosition:R},v]=f.use$2({aetherKey:e,type:O.Rule.TYPE,schema:O.ruleStateZ,initialState:{color:a,dragging:!1,position:n,lineWidth:c,lineDash:d},onAetherChange:j.useCallback(({position:D})=>{D!=null&&S.current?.(D)},[S])}),y=j.useRef(R);R!==y.current&&(y.current=R);const{id:C}=ct("Rule"),T=document.getElementById(C)?.querySelector(".pluto-line-plot__viewport"),P=j.useRef(R);j.useEffect(()=>{v(D=>({...D,position:n,color:a,lineWidth:c,lineDash:d}))},[n,a,c,d]);const I=_e.useCursorDrag({onStart:j.useCallback(()=>{p?.(),v(D=>({...D,dragging:!0})),P.current=y.current},[]),onMove:D=>{v(z=>({...z,pixelPosition:(P.current??0)+u.Ho.signedHeight(D)}))},onEnd:j.useCallback(()=>{v(D=>({...D,dragging:!1})),P.current=R},[])}),B=j.useRef(null);if(n==null||R==null)return null;const F=u.fr.pickByContrast(a,u.fr.BLACK,u.fr.WHITE),$=r.jsxRuntimeExports.jsxs("div",{ref:B,className:u.CSS.B("rule"),style:{top:`calc(${R}px - 0.5rem)`},children:[r.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("rule","drag-handle"),onDragStart:I,draggable:!0}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",className:u.CSS(x,u.CSS.BE("rule","tag")),bordered:!0,onClick:p,empty:!0,rounded:!0,style:{borderColor:u.fr.cssString(a),backgroundColor:u.fr.hex(u.fr.setAlpha(a,.7)),...m},...h,children:[r.jsxRuntimeExports.jsx(f.Editable,{className:u.CSS.BE("rule","label"),level:"small",value:g,onChange:E,color:F}),r.jsxRuntimeExports.jsx(f.Divider$1,{y:!0,style:{borderColor:u.fr.cssString(a)}}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",className:u.CSS.BE("rule","value"),children:[r.jsxRuntimeExports.jsx(f.Editable,{value:n.toFixed(2),onChange:D=>{const z=Number(D);isFinite(z)&&o?.(z)},level:"small",color:F}),l.length>0&&r.jsxRuntimeExports.jsx(f.MaybeEditable,{level:"small",color:F,value:l,onChange:i})]})]})]});return T==null?$:Ql.createPortal($,T)},dg=Object.freeze(Object.defineProperty({__proto__:null,Rule:yr},Symbol.toStringTag,{value:"Module"})),Ha=f.canDropOfType(kt),xg=({lines:e,axes:t,showTitle:n=!0,title:s="",onTitleChange:o,showLegend:i=!0,legendPosition:l,onLegendPositionChange:a,titleLevel:c="h4",onLineChange:d,onRuleChange:x,onAxisChannelDrop:p,onAxisChange:m,rules:h,enableTooltip:g=!0,enableMeasure:E=!1,initialViewport:S=u.Ho.DECIMAL,legendVariant:R,onViewportChange:v,viewportTriggers:y,rangeAnnotationProvider:C,onSelectRule:k,children:T,...P})=>{const I=t.filter(({location:z})=>u.K$1.isY(z)),B=j.useRef(null),F=f.usePrevious(e.length),$=f.usePrevious(P.hold),D=F===0&&e.length!==0||$===!0&&P.hold===!1;return j.useEffect(()=>{D&&B.current?.reset()},[D]),r.jsxRuntimeExports.jsxs(ba,{...P,children:[I.map((z,b)=>{const N=e.filter(V=>V.axes.x===z.key),_=t.filter(({location:V})=>u.K$1.isX(V)),M=h?.filter(V=>[..._.map(({key:H})=>H),z.key].includes(V.axis));return r.jsxRuntimeExports.jsx(pg,{axis:z,index:b,lines:N,yAxes:_,rules:M,onAxisChannelDrop:p,onAxisChange:m,annotationProvider:C,onRuleChange:x,onSelectRule:k},z.key)}),i&&r.jsxRuntimeExports.jsx(_a,{onLineChange:d,position:l,onPositionChange:a,variant:R}),n&&r.jsxRuntimeExports.jsx(Ma,{value:s,onChange:o,level:c}),r.jsxRuntimeExports.jsxs($a,{initial:S,onChange:v,triggers:y,ref:B,children:[g&&r.jsxRuntimeExports.jsx(Na,{}),E&&r.jsxRuntimeExports.jsx(Fa,{}),T]})]})},pg=({yAxes:e,lines:t,index:n,rules:s,onRuleChange:o,onSelectRule:i,onAxisChannelDrop:l,onAxisChange:a,axis:{location:c,key:d,showGrid:x,...p},annotationProvider:m})=>{const h=f.useDrop({type:"Channel.LinePlot.XAxis",canDrop:Ha,onDrop:j.useCallback(({items:S})=>{const R=f.filterByType(kt,S);return l?.(d,R.map(({key:v})=>v)),R},[d,l])}),g=s?.filter(S=>S.axis===d),E=f.useDraggingState();return r.jsxRuntimeExports.jsxs(wa,{...p,...h,location:c,axisKey:d,showGrid:x??n===0,className:u.CSS(u.CSS.dropRegion(f.canDropOfType(kt)(E))),onAutoBoundsChange:S=>a?.({key:d,bounds:S}),onLabelChange:S=>a?.({key:d,label:S}),children:[e.map((S,R)=>{const v=t.filter(C=>C.axes.y===S.key),y=s?.filter(C=>C.axis===S.key);return r.jsxRuntimeExports.jsx(fg,{axis:{...S,showGrid:x??(n===0&&R===0)},lines:v,rules:y,onRuleChange:o,onAxisChannelDrop:l,onAxisChange:a,onSelectRule:i},S.key)}),g?.map(S=>j.createElement(yr,{aetherKey:S.key,...S,key:S.key,onLabelChange:R=>o?.({key:S.key,label:R}),onPositionChange:R=>o?.({key:S.key,position:R}),onUnitsChange:R=>o?.({key:S.key,units:R}),onSelect:()=>i?.(S.key)})),r.jsxRuntimeExports.jsx(za,{...m})]})},mg=({channels:{x:e,y:t}})=>`${e??0}-${t}`,fg=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:s,onAxisChange:o,axis:{key:i,location:l,...a},onSelectRule:c})=>{const d=f.useDrop({type:"Channel.LinePlot.YAxis",canDrop:Ha,onDrop:j.useCallback(({items:p})=>{const m=f.filterByType(kt,p);return s?.(i,m.map(({key:h})=>h)),m},[i,s])}),x=f.useDraggingState();return r.jsxRuntimeExports.jsxs(va,{...a,...d,location:l,axisKey:i,className:u.CSS(u.CSS.dropRegion(f.canDropOfType(kt)(x))),onAutoBoundsChange:p=>o?.({key:i,bounds:p}),onLabelChange:p=>o?.({key:i,label:p}),children:[e.map(p=>r.jsxRuntimeExports.jsx(hg,{line:p},mg(p))),t?.map(p=>j.createElement(yr,{aetherKey:p.key,...p,key:p.key,onLabelChange:m=>n?.({key:p.key,label:m}),onPositionChange:m=>n?.({key:p.key,position:m}),onUnitsChange:m=>n?.({key:p.key,units:m}),onClick:()=>c?.(p.key)}))]})},hg=({line:e})=>e.variant==="static"?r.jsxRuntimeExports.jsx(jg,{line:e}):r.jsxRuntimeExports.jsx(gg,{line:e}),gg=({line:{key:e,timeSpan:t,channels:{x:n,y:s},axes:o,...i}})=>{const{xTelem:l,yTelem:a}=j.useMemo(()=>{const c=Number(t.valueOf())*3,d=O.streamChannelData({timeSpan:t,channel:s,keepFor:c}),x=n!=null&&n!==0;return{xTelem:O.streamChannelData({timeSpan:t,channel:x?n:s,useIndexOfChannel:!x,keepFor:c}),yTelem:d}},[t.valueOf(),n,s]);return r.jsxRuntimeExports.jsx(gr,{aetherKey:e,y:a,x:l,legendGroup:o.y.toUpperCase(),...i},e)},jg=({line:{timeRange:e,key:t,channels:{x:n,y:s},...o}})=>{const{xTelem:i,yTelem:l}=j.useMemo(()=>{const a=O.channelData({timeRange:e,channel:s}),c=n!=null&&n!==0;return{xTelem:O.channelData({timeRange:e,channel:c?n:s,useIndexOfChannel:!c}),yTelem:a}},[e.start.valueOf(),e.end.valueOf(),n,s]);return r.jsxRuntimeExports.jsx(gr,{aetherKey:t,y:l,x:i,legendGroup:o.axes.y.toUpperCase(),...o},t)},lt=(e,t,n)=>({variant:"loading",status:u.xr.create({variant:"loading",message:`${u.U.capitalize(t)} ${e}`}),data:n}),Ze=(e,t,n)=>({variant:"success",status:u.xr.create({variant:"success",message:`${u.U.capitalize(t)} ${e}`}),data:n}),_t=(e,t,n)=>({variant:"error",status:u.xr.fromException(n,`Failed to ${t} ${e}`),data:void 0}),qt=(e,t)=>({variant:"disabled",status:u.xr.create({variant:"disabled",message:`Failed to ${t} ${e}`,description:`Cannot ${t} ${e} because no cluster is connected.`}),data:void 0}),Sr=j.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:()=>{},getStatuses:()=>[]}),Et=e=>{const t=j.use(Sr);return e??t},yt=(e,t={})=>{const{optional:n=!1,onChange:s,defaultValue:o}=t,i=Et(t?.ctx),{get:l,bind:a,set:c,setStatus:d}=i,x=j.useCallback(g=>{s?.(g,{...i,path:e}),c(e,g)},[e,c,s]),p=j.useCallback(g=>d(e,g),[e,d]),m=j.useSyncExternalStore(a,j.useCallback(()=>l(e,{optional:n,defaultValue:o}),[e,l,n,o]));if(m==null){if(!n)throw new Error(`Field state is null: ${e}`);return null}const h=i.mode==="preview"?"preview":void 0;return{onChange:x,setStatus:p,variant:h,...m}},Rr=(e,t)=>{const{get:n,bind:s}=Et(t?.ctx);return j.useSyncExternalStore(s,j.useCallback(()=>n(e,t),[e,n,t]))},Lt=(e,t)=>Rr(e,t)?.value??null,Eg=e=>Rr(e,{optional:!0})?.status?.variant==="success",Cr=(e,t)=>({value:()=>e.get(t).value,add:(n,s)=>{const o=u.Sr(e.get(t).value);o.splice(s,0,...L.t.toArray(n)),e.set(t,o)},push:(n,s)=>{const o=u.Sr(e.get(t).value);o.push(...L.t.toArray(n)),s!=null&&o.sort(s),e.set(t,o)},remove:n=>{const s=e.get(t).value,o=new Set(L.t.toArray(n)),i=s.filter(({key:l})=>!o.has(l));return e.set(t,i),i.map(({key:l})=>l)},keepOnly:n=>{const s=e.get(t).value,o=new Set(L.t.toArray(n)),i=s.filter(({key:l})=>o.has(l));return e.set(t,i),i.map(({key:l})=>l)},set:n=>e.set(t,L.executeSetter(n,e.get(t).value)),sort:n=>{const s=u.Sr(e.get(t).value);s.sort(n),e.set(t,s)}}),yg=(e,t)=>Cr(Et(t?.ctx),e),br=(e,t={})=>{const n=Et(t?.ctx),s=Lt(e,t);return j.useMemo(()=>({data:s.map(({key:o})=>o),...Cr(n,e)}),[s,n,e])},Sg=f.renderProp(e=>r.jsxRuntimeExports.jsx(f.Text$2,{...e})),ge=({path:e,children:t=Sg,label:n,padHelpText:s=!0,visible:o=!0,hideIfNull:i=!0,optional:l,onChange:a,className:c,defaultValue:d,...x})=>{const p=yt(e,{optional:l??i,onChange:a,defaultValue:d}),m=Et();if(p==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n??=u.U.capitalize(L.N.element(e,-1)),o=typeof o=="function"?o(p,m):o,!o)return null;const h=p.status.message,{onChange:g,value:E}=p,S={onChange:g,value:E};return p.variant!=null&&(S.variant=p.variant),r.jsxRuntimeExports.jsx(Ae.Item,{padHelpText:s,helpText:h,status:p.status.variant,label:n,required:p.required,className:u.CSS(c,u.CSS.BE("field",e.split(".").join("-")),u.CSS.M(p.status.variant)),...x,children:t(S)})},Bn=e=>({fieldKey:t,fieldProps:n,inputProps:s})=>{const o=({inputProps:i,path:l,fieldKey:a=t,optional:c,defaultValue:d,...x})=>r.jsxRuntimeExports.jsx(ge,{...n,...x,defaultValue:d,optional:c,path:a?`${l}.${a}`:l,children:p=>r.jsxRuntimeExports.jsx(e,{...p,...s,...i})});return o.displayName=e.displayName,o},Za=Bn(f.Numeric),Be=Za({inputProps:{}}),Ka=Bn(f.Text$2),wr=Ka({inputProps:{}}),Ya=Bn(f.Switch$1),Bs=Ya({inputProps:{}}),Rg=e=>Bn(An)(e),Cg=({children:e,...t})=>r.jsxRuntimeExports.jsx(Sr,{value:t,children:e}),bg=e=>e.code==="custom"&&e.params!=null&&"variant"in e.params?e.params.variant:"error";class wg extends O.a.Observer{schema;values;initialValues;statuses;touched;cachedRefs;constructor(t,n){super(),this.schema=n,this.values=L.N.copy(t),this.statuses=new Map,this.touched=new Set,this.cachedRefs=new Map,this.initialValues=L.N.copy(this.values)}setValue(t,n,s){t==""?this.values=L.N.copy(n):L.N.set(this.values,t,n),this.checkTouched(t,n,s),this.updateCachedRefs(t)}checkTouched(t,n,s={}){const{markTouched:o=!0}=s,i=L.N.get(this.initialValues,t,{optional:!0});L.N.equal(i,n)?(this.clearTouched(t),this.clearOrphanedTouchedPaths(t)):o&&this.setTouched(t)}clearOrphanedTouchedPaths(t){const n=new Set;this.touched.forEach(s=>{L.N.pathsMatch(s,t)&&s!==t&&!L.N.has(this.values,s)&&n.add(s)}),n.forEach(s=>{this.touched.delete(s),this.cachedRefs.delete(s)})}setStatus(t,n){this.statuses.set(t,n),this.updateCachedRefs(t)}clearStatus(t=""){this.statuses.delete(t),this.updateCachedRefs(t)}reset(t){if(L.N.equal(this.values,t??this.initialValues))return;t!=null&&(this.initialValues=L.N.copy(t));const n=L.N.copy(this.initialValues);this.statuses.clear(),this.touched.clear();const s=new Set;this.cachedRefs.forEach((o,i)=>{const l=L.N.get(this.values,i,{optional:!0}),a=L.N.get(n,i,{optional:!0});L.N.equal(l,a)||s.add(i)}),s.forEach(o=>this.cachedRefs.delete(o)),this.values=n}setCurrentStateAsInitialValues(){this.initialValues=L.N.copy(this.values),this.touched.clear(),this.cachedRefs.clear()}setTouched(t){this.touched.add(t),this.updateCachedRefs(t)}clearTouched(t=""){t===""?this.touched.clear():this.touched.delete(t),this.updateCachedRefs(t),this.notify()}remove(t){L.N.remove(this.values,t),this.statuses.delete(t),this.clearTouched(t),this.cachedRefs.delete(t)}validate(t,n){if(this.schema==null)return!0;const s=this.schema.safeParse(this.values);return this.processValidation(t,s,n)}async validateAsync(t,n){if(this.schema==null)return!0;const s=await this.schema.safeParseAsync(this.values);return this.processValidation(t,s,n)}errorsToStatuses(t,n,s){return t.forEach(o=>{const i=[...n,...o.path],l=L.N.resolvePath(i.join("."),this.values);if(s.push({key:l,variant:bg(o),message:o.message}),o.code==="invalid_union"&&o.errors!=null&&o.errors.length>0){const a=o.errors.map(d=>d.filter(x=>L.N.has(this.values,[...i,...x.path].join("."))));a.sort((d,x)=>d.length-x.length);const c=a.find(d=>d.length>0);if(c==null)return;this.errorsToStatuses(c,i,s)}}),s}processValidation(t=!1,n,s){if(this.schema==null)return!0;const o=new Set;if(this.statuses.forEach((a,c)=>{a.variant!=="success"&&o.add(c)}),o.forEach(a=>this.clearStatus(a)),n.success)return!0;let i=!0;return this.errorsToStatuses(n.error.issues,[],[]).forEach(a=>{const{key:c,message:d,variant:x}=a;if(c==null)return;const p=s==null||L.N.pathsMatch(c,s)||L.N.pathsMatch(s,c),m=t||this.touched.has(c);!p||!m||(x!=="warning"&&(i=!1),this.setStatus(c,{key:c,variant:x,message:d}))}),i}get hasBeenTouched(){return this.touched.size>0}getStatuses(){return Array.from(this.statuses.values()).filter(t=>t.variant!=="success")}getState(t,n={}){const{optional:s=!1,defaultValue:o=void 0}=n,i=u.yr.getOrSetDefault(this.cachedRefs,t,{});let l=L.N.get(this.values,t,{optional:s||o!=null});if(l==null){if(o==null)return null;l=o,this.setValue(t,l)}if(i.value=l,i.required=!1,this.schema!=null){const a=Nf.getFieldSchema(this.schema,t,{optional:!0});a!=null&&(i.required=!a.safeParse(void 0).success)}return i.status=u.yr.getOrSetDefault(this.statuses,t,{key:t,variant:"success",message:""}),i.touched=this.touched.has(t),i}updateCachedRefs(t){this.cachedRefs.forEach((n,s)=>{(L.N.pathsMatch(s,t)||L.N.pathsMatch(t,s))&&this.cachedRefs.set(s,{})})}}const vr=({values:e,sync:t=!1,schema:n,mode:s="normal",onChange:o,onHasTouched:i})=>{const l=f.useInitializerRef(()=>new wg(e,n)),a=f.useSyncedRef(o),c=f.useErrorHandler(),d=f.useSyncedRef(i),x=j.useCallback(()=>{l.current.setCurrentStateAsInitialValues(),d.current?.(!1)},[]),p=j.useCallback(k=>l.current.onChange(k),[]),m=j.useCallback((k,T)=>l.current.getState(k,T),[]),h=j.useCallback(k=>{l.current.remove(k),l.current.notify()},[]),g=j.useCallback(k=>{const T=l.current.values,P=l.current.hasBeenTouched;l.current.reset(k),T!==l.current.values&&a.current?.({values:l.current.values,path:"",prev:T,valid:!0}),l.current.notify();const B=l.current.hasBeenTouched;B!==P&&d.current?.(B)},[]),E=j.useCallback(async k=>{const T=await l.current.validateAsync(!0,k);return l.current.notify(),T},[]),S=j.useCallback(k=>{const T=l.current.validate(!0,k);return l.current.notify(),T},[]),R=j.useCallback((k,T,P)=>{const{notifyOnChange:I=!0,markTouched:B=!0}=P??{},F=L.N.get(l.current.values,k,{optional:!0}),$=l.current.hasBeenTouched;l.current.setValue(k,T,{markTouched:B});const D=()=>{I&&a.current?.({values:l.current.values,path:k,prev:F,valid:!0}),l.current.notify();const z=l.current.hasBeenTouched;z!==$&&d.current?.(z)};try{l.current.validate()}catch{return c(async()=>{await l.current.validateAsync(),D()},"Failed to validate form")}D()},[]),v=j.useCallback(k=>L.N.has(l.current.values,k),[]),y=j.useCallback((k,T)=>{const P=l.current.hasBeenTouched;l.current.setStatus(k,T),l.current.notify();const I=l.current.hasBeenTouched;I!==P&&d.current?.(I)},[]),C=j.useCallback(()=>{l.current.clearStatus(),l.current.notify()},[]);return j.useEffect(()=>{t&&(l.current.reset(e),l.current.notify())},[t,e]),j.useMemo(()=>({bind:p,set:R,get:m,mode:s,validate:S,validateAsync:E,value:()=>l.current.values,has:v,remove:h,setStatus:y,clearStatuses:C,reset:g,setCurrentStateAsInitialValues:x,getStatuses:()=>l.current.getStatuses()}),[p,R,m,S,E,v,h,y,C,g,s,x])},Ga=({key:e,open:t,onChange:n})=>{const s=f.useMemoPrimitiveArray(e);It(async()=>{if(t==null)return;const o=await t();if(o==null)return;const i=o.onChange(n);return async()=>{i(),await o.close()}},[t==null,s])},vg=Object.freeze(Object.defineProperty({__proto__:null,useListener:Ga},Symbol.toStringTag,{value:"Module"})),yn={...O.ZERO_CONTEXT_VALUE,state:L.ab.connectivity.DEFAULT},kg={maxRetries:4,baseInterval:L.O$1.seconds(1),scale:2},kr=j.createContext(yn),Ua=()=>j.use(kr),Bt=()=>Ua().client,_g=()=>Ua().state,Oo={connected:"success",connecting:"loading",disconnected:"disabled",failed:"error"},Wa="serverVersionMismatch",Lg=(e,t,n)=>`Cluster version ${n!=null?`${n} `:""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,Tg=({children:e,client:t})=>{const{path:n}=f.useUnidirectional({type:O.Provider$1.TYPE,schema:O.Provider$1.stateZ,state:{props:null,state:null}});return r.jsxRuntimeExports.jsx(kr,{value:{...yn,client:t},children:r.jsxRuntimeExports.jsx(f.Composite,{path:n,children:e})})},Xa=({children:e,connParams:t})=>{const[n,s,o]=f.useCombinedStateAndRef(yn),{path:i}=f.useUnidirectional({type:O.Provider$1.TYPE,schema:O.Provider$1.stateZ,state:{props:t??null,state:null}}),l=f.useAdder(),a=j.useCallback(c=>{o.current.state.status!==c.status&&l({variant:Oo[c.status],message:c.message??u.U.capitalize(c.status)}),s(d=>({...d,state:c}))},[l]);return It(async c=>{if(n.client!=null&&n.client.close(),t==null)return s(yn);const d=new L.ab({retry:kg,...t,connectivityPollFrequency:L.O$1.seconds(2)});s({client:d,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:d.clientVersion}});const x=await d.connectivity.check();if(!c.aborted){if(s({client:d,state:x}),l({variant:Oo[x.status],message:x.message??x.status.toUpperCase()}),x.status==="connected"&&!x.clientServerCompatible){const p=x.nodeVersion==null||u._r.semVerOlder(x.nodeVersion,x.clientVersion),m=Lg(p,x.clientVersion,x.nodeVersion);l({variant:"warning",message:"Incompatible cluster version",description:m,details:{type:Wa,oldServer:p,nodeVersion:x.nodeVersion,clientVersion:x.clientVersion}})}return d.connectivity.onChange(a),()=>{d.close(),s(yn)}}},[t,a]),r.jsxRuntimeExports.jsx(kr,{value:n,children:r.jsxRuntimeExports.jsx(f.Composite,{path:i,children:e})})},Mg=Object.freeze(Object.defineProperty({__proto__:null,CONNECTION_STATE_VARIANTS:Oo,Provider:Xa,SERVER_VERSION_MISMATCH:Wa,TestProvider:Tg,use:Bt,useConnectionState:_g},Symbol.toStringTag,{value:"Module"})),Ng=({key:e,name:t,queryFn:n,values:s,openObservable:o,applyChanges:i,applyObservable:l,...a})=>{const c=Bt(),d=f.useErrorHandler(),x=f.useMemoPrimitiveArray(e),p=vr({values:s,...a,sync:!1,onChange:g=>{c!=null&&d(async()=>{await i?.({...g,client:c})},`Failed to apply changes for ${t}`)}});It(async()=>{if(c!=null)try{const g=await n({client:c});p.set("",g)}catch(g){d(g,`Failed to retrieve ${t}`)}},[x,c?.key]);const m=j.useCallback(async()=>{if(c!=null)return await o?.(c)},[x,c?.key]),h=j.useCallback(g=>l?.({changes:g,ctx:p}),[x,l]);return Ga({key:x,open:m,onChange:h}),p},Pg=Object.freeze(Object.defineProperty({__proto__:null,Context:Sr,Field:ge,Form:Cg,NumericField:Be,SwitchField:Bs,TextField:wr,buildNumericField:Za,buildSelectField:Rg,buildSwitchField:Ya,buildTextField:Ka,fieldBuilder:Bn,fieldListUtils:Cr,use:vr,useContext:Et,useField:yt,useFieldList:br,useFieldListUtils:yg,useFieldState:Rr,useFieldValid:Eg,useFieldValue:Lt,useSynced:Ng},Symbol.toStringTag,{value:"Module"})),Ag={markTouched:!1,notifyOnChange:!1},St=({name:e,schema:t,retrieve:n,mountListeners:s,update:o,initialValues:i})=>({params:l,initialValues:a,autoSave:c=!1,afterSave:d,beforeSave:x,sync:p,onHasTouched:m,mode:h,scope:g})=>{const[E,S]=j.useState(lt(e,"retrieving",void 0)),R=f.useUniqueKey(g),v=Bt(),y=ze(R),C=Is(),k=vr({schema:t,values:a??i,onChange:({path:$})=>{c&&$!==""&&F()},sync:p,onHasTouched:m,mode:h}),T=j.useCallback(($,D,z)=>k.set($,D,{...z,...Ag}),[k]),P=j.useCallback(async($,D={})=>{const{signal:z}=D;try{if(v==null)return S(qt(e,"retrieve"));if(S(N=>lt(e,"retrieving",N.data)),z?.aborted)return;const b={client:v,params:$,store:y,...k,set:T};if(await n(b),z?.aborted)return;C.cleanup(),C.set(s?.(b)),S(Ze(e,"retrieved",void 0))}catch(b){if(z?.aborted)return;S(_t(e,"retrieve",b))}},[v,e,k,y,T]),I=f.useMemoDeepEqual(l);It(async $=>await P(I,{signal:$}),[P,I]);const B=j.useCallback(async($={})=>{const{signal:D}=$;try{if(v==null)return S(qt(e,"update")),!1;const z={client:v,params:l,store:y,...k,set:T};return await k.validateAsync()?(S(lt(e,"updating",void 0)),await x?.(z)===!1?(S(Ze(e,"updated",void 0)),!1):D?.aborted===!0?!1:(await o(z),S(Ze(e,"updated",void 0)),d?.(z),!0)):!1}catch(z){return D?.aborted!==!0&&S(_t(e,"update",z)),!1}},[e,l,x,d]),F=j.useCallback($=>void B($),[B]);return{form:k,save:F,...E}},qa=j.createContext(null),ze=e=>{const t=f.useRequiredContext(qa),n=f.useUniqueKey(e);return j.useMemo(()=>t.scopedStore(n),[t,n])},Qa=({children:e,...t})=>{const n=Bt(),s=f.useErrorHandler(),o=f.useAsyncErrorHandler(),{path:i}=f.useLifecycle({type:O.PROVIDER_TYPE,schema:O.providerStateZ$1,initialState:{}}),l=()=>"client"in t?t.client:new O.Client({client:n,storeConfig:t.storeConfig,handleError:s,handleAsyncError:o}),a=f.useInitializerRef(l),c=j.useRef(null);return n?.key!==c.current?.key&&(c.current=n,a.current=l()),r.jsxRuntimeExports.jsx(f.Composite,{path:i,children:r.jsxRuntimeExports.jsx(qa,{value:a.current,children:e})})},Og=()=>!0,Ig=u.i.milliseconds(100),Dg=(e,t,n,s,o,i)=>{if(e==null)return;let l=e({params:t.current??{},store:i});if(n.current!=null&&(l=l.filter(n.current)),s.current!=null&&(l=l.sort(s.current)),l.length!==0)return l.forEach(a=>o.current.set(a.key,a)),l.map(a=>a.key)},Ve=({name:e,mountListeners:t,retrieve:n,retrieveByKey:s,retrieveCached:o,sort:i})=>(l={})=>{const{filter:a=Og,sort:c,initialParams:d,retrieveDebounce:x=Ig}=l,p=f.useSyncedRef(a),m=f.useSyncedRef(c??i),h=Bt(),g=j.useRef(new Map),E=f.useInitializerRef(()=>new Map),S=ze(),R=j.useRef(d??null),[v,y,C]=f.useCombinedStateAndRef(()=>lt(e,"retrieving",Dg(o,R,p,m,g,S))),k=j.useRef(!0),T=Is(),P=j.useRef(!1),I=j.useCallback(_=>E.current.forEach((M,V)=>{M===_&&V()}),[E.current]),B=j.useCallback(_=>{if(m.current==null)return _;const M=_.map(V=>g.current.get(V)).filter(V=>V!=null);return M.sort(m.current),M.map(V=>V.key)},[m]),F=j.useCallback(()=>{h!=null&&(P.current=!0,T.cleanup(),T.set(t?.({client:h,store:S,params:R.current??{},onDelete:_=>{g.current.delete(_),y(M=>M.data==null?M:{...M,data:M.data.filter(V=>V!==_)})},onChange:(_,M,V={})=>{const{mode:H="append"}=V,K=g.current.get(_)??null;if(K!=null&&!p.current(K))return;const Z=L.executeSetter(M,K);Z==null||!p.current(Z)||(g.current.set(_,Z),y(G=>{if(G.data==null)return G;let Q;if(K==null)m.current!=null?Q=B([...G.data,_]):Q=H==="prepend"?[_,...G.data]:[...G.data,_];else if(m.current!=null){const ee=G.data.indexOf(_),ae=B(G.data),re=ae.indexOf(_);ee!==re?Q=ae:Q=G.data}else Q=G.data;return{...G,data:Q}}),I(_))}})))},[t,T]),$=j.useCallback(async(_,M={})=>{const{signal:V,mode:H="replace"}=M,K=L.executeSetter(_,R.current??{});R.current=K;try{if(h==null)return y(qt(e,"retrieve"));if(y(Q=>lt(e,"retrieving",Q.data)),H==="replace")k.current=!0;else if(H==="append"&&!k.current)return y(Q=>Ze(e,"retrieved",Q.data??[]));let Z=await n({client:h,params:K,store:S});if(V?.aborted)return;Z=Z.filter(p.current),m.current!=null&&(Z=Z.sort(m.current)),Z.length===0&&(k.current=!1);const G=Z.map(Q=>Q.key);return F(),C.current.data!=null&&u.k.primitiveArrays(C.current.data,G)===u.k.EQUAL?y(Q=>Ze(e,"retrieved",Q.data??[])):(Z.forEach(Q=>g.current.set(Q.key,Q)),y(Q=>{if(H==="replace"||Q.data==null)return Ze(e,"retrieved",G);const ee=new Set(G);return Ze(e,"retrieved",[...Q.data.filter(ae=>!ee.has(ae)),...G])}))}catch(Z){if(V?.aborted)return;y(_t(e,"retrieve",Z))}},[h,e,S,p,F]),D=j.useCallback((_,M={})=>{const{signal:V}=M;(async()=>{P.current||F();try{if(h==null||u.O$1.isZero(_))return;const H=await s({client:h,key:_,params:R.current??{},store:S});if(V?.aborted||H==null)return;if(!p.current(H)){g.current.set(_,null);return}g.current.set(_,H),I(_)}catch(H){if(V?.aborted)return;g.current.set(_,null),y(_t(e,"retrieve",H))}})()},[s,h,I,F]),z=j.useCallback(_=>{if(_==null)return;if(Array.isArray(_))return _.map(V=>z(V)).filter(V=>V!=null);const M=g.current.get(_);return M===void 0&&D(_),M},[D]),b=j.useCallback((_,M)=>M==null?()=>{}:(E.current.set(_,M),()=>E.current.delete(_)),[]);return{retrieve:_e.useDebouncedCallback((_,M={})=>void $(_,M),new u.i(x).milliseconds,[$]),retrieveAsync:$,subscribe:b,getItem:z,...v,data:v?.data??[]}},Bg=({key:e,subscribe:t,getItem:n})=>j.useSyncExternalStore(j.useCallback(s=>t(s,e),[t,e]),j.useCallback(()=>n(e),[n,e])),Ja=e=>lt(e,"retrieving",void 0),ec=e=>{const[t,n]=j.useState(Ja(e.name));return{...t,...tc({...e,onChange:n})}},tc=({retrieve:e,mountListeners:t,name:n,onChange:s,scope:o})=>{const i=Bt(),l=j.useRef(null),a=ze(o),c=Is(),d=j.useCallback(m=>s(h=>{if(h.data===void 0)return h;const g=L.executeSetter(m,h.data);return Ze(n,"retrieved",g)}),[s,n]),x=j.useCallback(async(m,h={})=>{const{signal:g}=h,E=L.executeSetter(m,l.current??{});l.current=E;try{if(i==null)return s(qt(n,"retrieve"));if(s(v=>lt(n,"retrieving",v.data)),g?.aborted)return;const S={client:i,params:E,store:a},R=await e(S);if(g?.aborted)return;c.cleanup(),c.set(t?.({...S,onChange:d})),s(Ze(n,"retrieved",R))}catch(S){if(g?.aborted)return;s(_t(n,"retrieve",S))}},[i,n]);return{retrieve:j.useCallback((m,h)=>void x(m,h),[x]),retrieveAsync:x}},$g=({params:e,...t})=>{const{retrieveAsync:n,retrieve:s,...o}=ec(t),i=f.useMemoDeepEqual(e);return It(async l=>await n(i,{signal:l}),[n,i]),o},zg=({params:e,...t})=>{const n=j.useRef(Ja(t.name)),{retrieveAsync:s}=tc({...t,onChange:i=>{n.current=L.executeSetter(i,n.current),t.onChange?.(n.current)}}),o=f.useMemoDeepEqual(e);It(async i=>{o!=null&&await s(o,{signal:i})},[s,o])},Ye=e=>({useDirect:t=>$g({...e,...t}),useStateful:()=>ec(e),useEffect:t=>zg({...e,...t})}),nc=({onChange:e,params:t,update:n,name:s,scope:o,beforeUpdate:i,afterUpdate:l})=>{const a=Bt(),c=ze(o),d=j.useCallback(async(p,m={})=>{const{signal:h}=m;try{if(a==null)return e(qt(s,"update")),!1;e(E=>lt(s,"updating",E.data));let g=!1;if(i!=null){const E=await i({client:a,value:p});if(E===!1)return!1;E!==!0&&(p=E)}return await n({client:a,onChange:E=>{g=!0,e(Ze(s,"updated",E))},value:p,params:t,store:c}),h?.aborted===!0?!1:(g||e(Ze(s,"updated",p)),l!=null&&await l({client:a,value:p}),!0)}catch(g){return h?.aborted!==!0&&e(_t(s,"update",g)),!1}},[s,t]);return{update:j.useCallback((p,m)=>void d(p,m),[d]),updateAsync:d}},Vg=({params:e,name:t,...n})=>{const[s,o]=j.useState(Ze(t,"updated",void 0)),i=nc({...n,name:t,onChange:o,params:e});return{...s,...i}},Fe=e=>({useObservable:t=>nc({...t,...e}),useDirect:t=>Vg({...t,...e})}),Fg=Object.freeze(Object.defineProperty({__proto__:null,Client:O.Client,Provider:Qa,ScopedUnaryStore:O.ScopedUnaryStore,createForm:St,createList:Ve,createRetrieve:Ye,createStore:O.createStore,createUpdate:Fe,errorResult:_t,nullClientResult:qt,pendingResult:lt,scopeStore:O.scopeStore,successResult:Ze,useListItem:Bg,useStore:ze},Symbol.toStringTag,{value:"Module"})),sc="channels",Hg={channel:L.Bb.SET_CHANNEL_NAME,schema:L.Bb.keyZ,onChange:async({store:e,changed:t,client:n})=>e.channels.set(t,await n.channels.retrieve(t))},Zg={channel:L.Bb.DELETE_CHANNEL_NAME,schema:L.Bb.keyZ,onChange:({store:e,changed:t})=>e.channels.delete(t)},Kg={channel:L.Bb.CALCULATION_STATUS_CHANNEL_NAME,schema:L.Bb.statusZ,onChange:async({store:e,changed:t,client:n})=>e.channels.set(Number(t.key),s=>s==null?s:n.channels.sugar({...s,status:t}))},Yg=e=>{const t=ze();j.useEffect(()=>t.channels.onSet(n=>{n.status!=null&&e(n.status)}),[t])},oc={equal:(e,t)=>L.N.equal(e.payload,t.payload),listeners:[Hg,Zg,Kg]},_r=L.Bb.newZ.extend({name:ne.z.string().min(1,"Name must not be empty"),dataType:L.k.z.transform(e=>e.toString())}).refine(e=>!e.isIndex||L.k.z.parse(e.dataType).equals(L.k.TIMESTAMP),{message:"Index channel must have data type TIMESTAMP",path:["dataType"]}).refine(e=>e.isIndex||e.index!==0||e.virtual,{message:"Data channel must have an index",path:["index"]}).refine(e=>e.virtual||!L.k.z.parse(e.dataType).isVariable,{message:"Persisted channels must have a fixed-size data type",path:["dataType"]}),rc=_r.extend({expression:ne.z.string().min(1,"Expression must not be empty").refine(e=>e.includes("return"),{message:"Expression must contain a return statement"})}).refine(e=>e.requires?.length>0,{message:"Expression must use at least one channel",path:["requires"]}),ic=e=>({...e.payload,dataType:e.dataType.toString()}),Lr={key:0,name:"",index:0,dataType:L.k.FLOAT32.toString(),internal:!1,isIndex:!1,leaseholder:0,virtual:!1,expression:"",requires:[]},Tr=async({client:e,params:{key:t,rangeKey:n},store:s})=>{let o=s.channels.get(t);if(o==null&&(o=await e.channels.retrieve(t),s.channels.set(o.key,o)),n!=null){const i=L.iT.aliasKey({range:n,channel:o.key});let l=s.rangeAliases.get(i);if(l==null)try{l={alias:await e.ranges.retrieveAlias(n,o.key),channel:o.key,range:n}}finally{s.rangeAliases.set(i,{channel:o.key,range:n})}l!=null&&(o.alias=l.alias)}return o},Gg=async({client:e,params:{keys:t,rangeKey:n},store:s})=>{const o=s.channels.get(t),i=new Set(o?.map(a=>a.key)),l=t.filter(a=>!i.has(a));if(l.length>0){const a=await e.channels.retrieve(l);o.push(...a),s.channels.set(a)}if(n!=null){const a=t.map(p=>L.iT.aliasKey({range:n,channel:p})),c=s.rangeAliases.get(a);c.forEach(p=>{if(p==null)return;const m=o.find(h=>h.key===p.channel);m!=null&&(m.alias=p.alias)});const d=new Set(c.map(p=>p.channel)),x=t.filter(p=>!d.has(p));if(x.length>0){const p=await e.ranges.retrieveAliases(n,x);Object.entries(p).forEach(([m,h])=>{const g=Number(m),E=o.find(R=>R.key===g);E!=null&&(E.alias=h);const S=L.iT.aliasKey({range:n,channel:g});s.rangeAliases.set(S,{alias:h,channel:g,range:n})})}}return o},lc=async({params:{key:e,rangeKey:t},store:n,client:s,reset:o})=>{if(e==null)return;const i=await Tr({client:s,store:n,params:{key:e,rangeKey:t}});o(ic(i))},Mr=Ye({name:"Channel",retrieve:Tr,mountListeners:({store:e,onChange:t,params:{key:n,rangeKey:s},client:o})=>{const i=e.channels.onSet(d=>{if(s!=null){const x=e.rangeAliases.get(L.iT.aliasKey({range:s,channel:n}));x!=null&&(d.alias=x.alias)}t(d)},n);if(s==null)return i;const l=L.iT.aliasKey({range:s,channel:n}),a=e.rangeAliases.onSet(d=>{d!=null&&t(x=>o.channels.sugar({...x,alias:d.alias}))},l),c=e.rangeAliases.onDelete(()=>t(d=>o.channels.sugar({...d,alias:void 0})),l);return[i,a,c]}}),Ug=Ye({name:"Channels",retrieve:Gg,mountListeners:({store:e,onChange:t,params:{keys:n,rangeKey:s},client:o})=>{const i=new Set(n),l=e.channels.onSet(async d=>{if(i.has(d.key)){if(s!=null){const x=L.iT.aliasKey({range:s,channel:d.key});let p=e.rangeAliases.get(x);if(p==null)try{p={alias:await o.ranges.retrieveAlias(s,d.key),channel:d.key,range:s},e.rangeAliases.set(x,p)}catch(m){console.error(m)}p!=null&&(d.alias=p.alias)}t(x=>x.map(p=>p.key===d.key?d:p))}});if(s==null)return l;const a=e.rangeAliases.onSet(d=>{d!=null&&t(x=>x.map(p=>p.key===d.channel?o.channels.sugar({...p,alias:d.alias}):p))}),c=e.rangeAliases.onDelete(d=>{const x=L.iT.decodeDeleteAliasChange(d);t(p=>p.map(m=>m.key===x.channel?o.channels.sugar({...m,alias:void 0}):m))});return[l,a,c]}}),ac=async({client:e,store:t,set:n,value:s})=>{const o=await e.channels.create(s());t.channels.set(o.key,o),n("key",o.key)},cc=({store:e,get:t,reset:n})=>e.channels.onSet(s=>{t("key").value===s.key&&n(ic(s))}),Wg=St({name:"Channel",schema:_r,initialValues:Lr,retrieve:lc,update:ac,mountListeners:cc}),Xg=St({name:"Calculated Channel",schema:rc,initialValues:Lr,retrieve:lc,update:ac,mountListeners:cc}),qg={internal:!1},Nr=Ve({name:"Channels",retrieveCached:({params:e,store:t})=>e.searchTerm!=null&&e.searchTerm.length>0?[]:t.channels.get(n=>!(e.internal!=null&&n.internal!==e.internal||e.calculated!=null&&n.isCalculated!==e.calculated||u.O$1.isNonZero(e.notDataTypes)&&e.notDataTypes.some(s=>new L.k(s).equals(n.dataType))||u.O$1.isNonZero(e.dataTypes)&&!e.dataTypes.some(s=>new L.k(s).equals(n.dataType))||e.isIndex!=null&&n.isIndex!==e.isIndex||e.virtual!=null&&n.virtual!==e.virtual)),retrieve:async({client:e,params:t,store:n})=>{const s=await e.channels.retrieve({...qg,...t});return n.channels.set(s),s},retrieveByKey:async({client:e,key:t,store:n})=>await Tr({client:e,params:{key:t},store:n}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.channels.onSet(s=>t(s.key,s)),e.channels.onDelete(s=>n(s))]}),Qg=Fe({name:"Channel",update:async({client:e,value:t,store:n})=>{const s=await e.channels.create(t);n.channels.set(s.key,s)}}),Jg=Fe({name:"Channel",update:async({client:e,value:t,store:n,params:{key:s}})=>{s!=null&&(await e.channels.rename(s,t),n.channels.set(s,o=>o==null?o:e.channels.sugar({...o,name:t})))}}),uc=Fe({name:"Channel Alias",update:async({client:e,value:t,store:n,params:{rangeKey:s,channelKey:o}})=>{if(s==null)return;const i={alias:t,channel:o,range:s};await e.ranges.setAlias(s,o,t),n.rangeAliases.set(L.iT.aliasKey(i),i)}}),dc=e=>{if(e==null)return f.Channel;if(L.Bb.isCalculated(e))return f.Calculation;if(e.isIndex)return f.Index;const t=new u.n(e.dataType);return t.isInteger?f.Binary:t.isFloat?f.Decimal:t.equals(u.n.STRING)?f.String:t.equals(u.n.JSON)?f.JSON:f.Channel},xc=f.renderProp(({itemKey:e,...t})=>{const n=f.useItem(e),s=dc(n?.payload);return r.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,...t,children:[r.jsxRuntimeExports.jsx(s,{}),n?.name]})}),e1=({onChange:e,value:t,emptyContent:n,initialParams:s,filter:o,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=Nr({initialParams:s,filter:o}),{fetchMore:p,search:m}=nt.usePager({retrieve:a});return r.jsxRuntimeExports.jsx(As,{resourceName:"Channel",value:t,onChange:e,data:l,haulType:kt,getItem:c,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,icon:r.jsxRuntimeExports.jsx(f.Channel,{}),...i,children:xc})},Tt=({onChange:e,value:t,allowNone:n,emptyContent:s,initialParams:o,filter:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=Nr({initialParams:o,filter:i}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return r.jsxRuntimeExports.jsx(Dt,{resourceName:"Channel",onChange:e,value:t,allowNone:n,emptyContent:s,onFetchMore:m,onSearch:h,data:a,getItem:d,subscribe:x,status:p,haulType:kt,icon:r.jsxRuntimeExports.jsx(f.Channel,{}),...l,children:xc})},t1=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:gh,FLUX_STORE_CONFIG:oc,FLUX_STORE_KEY:sc,LinePlot:xg,SelectMultiple:e1,SelectSingle:Tt,ZERO_FORM_VALUES:Lr,calculatedFormSchema:rc,formSchema:_r,rename:Jg,resolveIcon:dc,retrieve:Mr,retrieveMany:Ug,update:Qg,updateAlias:uc,useCalculatedForm:Xg,useForm:Wg,useList:Nr,useListenForCalculationStatus:Yg},Symbol.toStringTag,{value:"Module"})),pc=({yDirection:e="up",...t})=>r.jsxRuntimeExports.jsxs(pe.Buttons,{...t,keys:u.p.DIRECTIONS,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"x",children:r.jsxRuntimeExports.jsx(f.Arrow.Right,{})}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"y",children:e==="up"?r.jsxRuntimeExports.jsx(f.Arrow.Up,{}):r.jsxRuntimeExports.jsx(f.Arrow.Down,{})})]}),n1=Object.freeze(Object.defineProperty({__proto__:null,Select:pc},Symbol.toStringTag,{value:"Module"})),mc="groups",s1={channel:L.xb.SET_CHANNEL_NAME,schema:L.xb.groupZ,onChange:({store:e,changed:t})=>e.groups.set(t.key,t)},o1={channel:L.xb.DELETE_CHANNEL_NAME,schema:L.xb.keyZ,onChange:({store:e,changed:t})=>e.groups.delete(t)},fc={listeners:[s1,o1]},Io=async(e,t,n)=>{const s=n.groups.get(e);if(s!=null)return s;const o=await t.ontology.retrieve(L.xb.ontologyID(e));return n.groups.set(e,L.xb.groupZ.parse(o.data)),L.xb.groupZ.parse(o.data)},r1=Fe({name:"Group",update:async({value:e,client:t,onChange:n,store:s})=>{const{parent:o}=e,i=await t.ontology.groups.create(o,e.name,e.key);s.groups.set(i.key,i),n({...i,parent:o})}}),i1=Ve({name:"Group",retrieveCached:({store:e,params:t})=>{if(t.parent==null)return[];const n=e.relationships.get(s=>L.jb.matchRelationship(s,{from:t.parent,type:"parent"}));return e.groups.get(n.map(s=>s.to.key))},retrieve:async({client:e,params:t,store:n})=>{const{parent:s}=t;if(s==null)return[];const i=(await e.ontology.retrieveChildren(s,{...t,types:["group"]})).map(l=>L.xb.groupZ.parse(l.data));return n.groups.set(i),i.forEach(l=>{const a={from:s,type:"parent",to:L.xb.ontologyID(l.key)};n.relationships.set(L.jb.relationshipToString(a),a)}),i},retrieveByKey:async({client:e,key:t,store:n})=>await Io(t,e,n),mountListeners:({store:e,onChange:t,onDelete:n,params:{parent:s},client:o})=>[e.groups.onSet(i=>t(i.key,l=>l==null?null:i)),e.groups.onDelete(n),e.relationships.onSet(async i=>{if(s==null||!L.jb.matchRelationship(i,{from:s,type:"parent"}))return;const l=await Io(i.to.key,o,e);t(l.key,l)}),e.relationships.onDelete(async i=>{const l=L.jb.relationshipZ.parse(i);s==null||!L.jb.matchRelationship(l,{from:s,type:"parent"})||n(l.to.key)})]}),l1=Fe({name:"Group",update:async({client:e,value:t,params:n})=>await e.ontology.groups.rename(n.key,t)}).useDirect,a1=Fe({name:"Group",update:async({client:e,params:t})=>await e.ontology.groups.delete(t.key)}).useDirect,c1=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:fc,FLUX_STORE_KEY:mc,create:r1,singleRetrieve:Io,useDelete:a1,useList:i1,useRename:l1},Symbol.toStringTag,{value:"Module"})),hc="devices",u1={channel:L.Xb.SET_CHANNEL_NAME,schema:L.Xb.deviceZ,onChange:({store:e,changed:t})=>e.devices.set(t.key,n=>n==null?t:{...t,status:n.status})},d1={channel:L.Xb.DELETE_CHANNEL_NAME,schema:L.Xb.keyZ,onChange:({store:e,changed:t})=>e.devices.delete(t)},x1={channel:L.Xb.STATUS_CHANNEL_NAME,schema:L.Xb.statusZ,onChange:({store:e,changed:t})=>{e.devices.set(t.details.device,n=>n==null?n:{...n,status:t})}},gc={listeners:[u1,d1,x1]},p1=e=>{const t=ze();j.useEffect(()=>t.devices.onSet(e),[t])},jc=async(e,t,n)=>{const s=t.devices.get(n.key);if(s!=null)return s;const o=await e.hardware.devices.retrieve({...n,includeStatus:!0});return t.devices.set(n.key,o),o},m1=()=>Ye({name:"Device",retrieve:async({client:e,params:t,store:n})=>await jc(e,n,t),mountListeners:({store:e,onChange:t,params:{key:n}})=>[e.devices.onSet(s=>t(s),n)]}),Ec=Ve({name:"Devices",retrieveCached:({store:e,params:t})=>e.devices.get(n=>!(u.O$1.isNonZero(t.makes)&&!t.makes.includes(n.make)||u.O$1.isNonZero(t.models)&&!t.models.includes(n.model)||u.O$1.isNonZero(t.racks)&&!t.racks.includes(n.rack)||u.O$1.isNonZero(t.locations)&&!t.locations.includes(n.location)||u.O$1.isNonZero(t.names)&&!t.names.includes(n.name)||u.O$1.isNonZero(t.keys)&&!t.keys.includes(n.key))),retrieve:async({client:e,params:t,store:n})=>{const s=await e.hardware.devices.retrieve({includeStatus:!0,...t});return s.forEach(o=>n.devices.set(o.key,o)),s},retrieveByKey:async({client:e,key:t,store:n})=>await jc(e,n,{key:t}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.devices.onSet(s=>t(s.key,s)),e.devices.onDelete(n)]}),f1=f.renderProp(({itemKey:e,...t})=>{const n=f.useItem(e);return r.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,...t,className:u.CSS.BE("device","list-item"),justify:"between",align:"center",children:[r.jsxRuntimeExports.jsxs(f.Text,{align:"center",children:[r.jsxRuntimeExports.jsx(yc,{status:n?.status}),n?.name]}),r.jsxRuntimeExports.jsx(pr,{level:"small",color:9,weight:450,style:{marginTop:"0.25rem"},gap:"tiny",children:n?.location.split(".").map(s=>r.jsxRuntimeExports.jsx(Cn,{children:s},s))})]})}),h1=({onChange:e,value:t,filter:n,allowNone:s,emptyContent:o,initialParams:i,disabled:l,icon:a=r.jsxRuntimeExports.jsx(f.Device,{}),...c})=>{const{data:d,retrieve:x,getItem:p,subscribe:m,status:h}=Ec({filter:n,initialParams:i}),{fetchMore:g,search:E}=nt.usePager({retrieve:x});return r.jsxRuntimeExports.jsx(Dt,{resourceName:"Device",value:t,onChange:e,data:d,getItem:p,subscribe:m,onFetchMore:g,onSearch:E,emptyContent:o,status:h,disabled:l,icon:a,...c,children:f1})},yc=({status:e,tooltipLocation:t="right"})=>{const n=e?.variant??"disabled",s=e?.message??"Device Status Unknown";return r.jsxRuntimeExports.jsxs(f.Dialog$1,{location:t,children:[r.jsxRuntimeExports.jsx(f.Summary,{variant:n,hideIcon:!0,level:"small",weight:450,children:s}),r.jsxRuntimeExports.jsx(ur,{variant:n,className:u.CSS.BE("device","status-indicator")})]})},g1=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:gc,FLUX_STORE_KEY:hc,SelectSingle:h1,StatusIndicator:yc,retrieve:m1,useList:Ec,useSetSynchronizer:p1},Symbol.toStringTag,{value:"Module"})),Sc="racks",j1={channel:L.eT.SET_CHANNEL_NAME,schema:L.eT.keyZ,onChange:async({store:e,changed:t,client:n})=>{const s=await n.hardware.racks.retrieve({key:t,includeStatus:!0});e.racks.set(t,s.payload)}},E1={channel:L.eT.DELETE_CHANNEL_NAME,schema:L.eT.keyZ,onChange:({store:e,changed:t})=>e.racks.delete(t)},y1={channel:L.eT.STATUS_CHANNEL_NAME,schema:L.eT.statusZ,onChange:({store:e,changed:t})=>e.racks.set(t.details.rack,n=>n==null?n:{...n,status:t})},Rc={listeners:[j1,E1,y1]},Cc={includeStatus:!0},bc=async({client:e,params:t,store:n})=>{let s=n.racks.get(t.key);return s==null&&(s=await e.hardware.racks.retrieve({...Cc,...t}),n.racks.set(s.key,s)),s},wc=Ve({name:"Racks",retrieveCached:({store:e})=>e.racks.list(),retrieve:async({client:e,params:t,store:n})=>{const s=await e.hardware.racks.retrieve({...Cc,...t});return n.racks.set(s),s},retrieveByKey:async({client:e,key:t,store:n})=>await bc({client:e,params:{key:t},store:n}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.racks.onSet(s=>t(s.key,s)),e.racks.onDelete(n)]}),S1=Ye({name:"Rack",retrieve:bc,mountListeners:({store:e,onChange:t,params:{key:n}})=>[e.racks.onSet(t,n)]}),R1=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t);return r.jsxRuntimeExports.jsxs(f.ListItem,{...e,align:"center",justify:"between",children:[r.jsxRuntimeExports.jsx(f.Text,{children:n?.name}),r.jsxRuntimeExports.jsx(vc,{status:n?.status,tooltipLocation:"left"})]})}),C1=({value:e,onChange:t,filter:n,allowNone:s,emptyContent:o,initialParams:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=wc({initialParams:{includeStatus:!0,...i},filter:n}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return r.jsxRuntimeExports.jsx(Dt,{resourceName:"Driver",value:e,onChange:t,data:a,getItem:d,subscribe:x,onFetchMore:m,onSearch:h,emptyContent:o,status:p,icon:r.jsxRuntimeExports.jsx(f.Rack,{}),...l,children:R1})},vc=({status:e,tooltipLocation:t="right"})=>{const n=j.useRef(null),s=e?.variant??"disabled";return j.useEffect(()=>{if(s!=="success")return;const o=n.current;o&&(o.classList.remove(u.CSS.BEM("rack","heartbeat","beat")),requestAnimationFrame(()=>o.classList.add(u.CSS.BEM("rack","heartbeat","beat"))))},[e]),r.jsxRuntimeExports.jsxs(f.Dialog$1,{location:t,children:[r.jsxRuntimeExports.jsx(f.Summary,{variant:s,hideIcon:!0,level:"small",weight:450,children:e?.message}),r.jsxRuntimeExports.jsx(f.Heart,{ref:n,className:u.CSS.BE("rack","heartbeat"),style:{color:cr[s]}})]})},b1=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:Rc,FLUX_STORE_KEY:Sc,SelectSingle:C1,StatusIndicator:vc,retrieve:S1,useList:wc},Symbol.toStringTag,{value:"Module"})),kc="tasks",w1=["start","stop"],v1={channel:L.rT.SET_CHANNEL_NAME,schema:L.rT.keyZ,onChange:async({store:e,changed:t,client:n})=>e.tasks.set(t,await n.hardware.tasks.retrieve({key:t,includeStatus:!0}),"config")},k1={channel:L.rT.DELETE_CHANNEL_NAME,schema:L.rT.keyZ,onChange:({store:e,changed:t})=>e.tasks.delete(t)},_1=L.rT.statusZ(ne.z.unknown()),L1={channel:L.rT.STATUS_CHANNEL_NAME,schema:_1,onChange:async({store:e,changed:t,client:n})=>{if(!e.tasks.has(t.details.task)){const o=await n.hardware.tasks.retrieve({key:t.details.task});e.tasks.set(t.details.task,o,"config")}e.tasks.set(t.details.task,o=>o==null?o:n.hardware.tasks.sugar({...o,status:t}),"status")}},T1={channel:L.rT.COMMAND_CHANNEL_NAME,schema:L.rT.commandZ,onChange:({store:e,changed:t,client:n})=>e.tasks.set(t.task,s=>s==null||!w1.includes(t.type)?s:n.hardware.tasks.sugar({...s,status:{...s.status,variant:"loading",message:`Running ${t.type} command...`,details:{task:t.task,running:!0,data:{}}}}),"status")},M1=e=>{const t=ze();j.useEffect(()=>t.tasks.onSet(n=>{n.status!=null&&e(n.status)}),[t])},_c={listeners:[v1,k1,L1,T1]},Pr=async(e,t,n,s)=>{const o=t.tasks.get(n.key);if(o!=null)return o;const i=await e.hardware.tasks.retrieve({...n,includeStatus:!0,schemas:s});return t.tasks.set(n.key,i,"config"),i},N1=e=>Ye({name:"Task",retrieve:async({client:t,params:n,store:s})=>n.key==null?null:await Pr(t,s,{key:n.key,includeStatus:!0},e),mountListeners:({store:t,params:{key:n},onChange:s})=>[t.tasks.onSet(o=>{n==null||o.key!==n||s(o)},n)]}),P1=Ve({name:"Task",retrieveCached:({store:e})=>e.tasks.list(),retrieve:async({client:e,params:t,store:n})=>{const s=await e.hardware.tasks.retrieve({includeStatus:!0,...t});return s.forEach(o=>n.tasks.set(o.key,o,"config")),s},retrieveByKey:async({client:e,key:t,store:n})=>await Pr(e,n,{key:t}),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.tasks.onSet(s=>t(s.key,s)),e.tasks.onDelete(n)]}),A1=e=>ne.z.object({key:L.rT.keyZ.optional(),name:ne.z.string(),rackKey:ne.z.number(),type:e.typeSchema,snapshot:ne.z.boolean(),config:e.configSchema,status:L.rT.statusZ(e.statusDataSchema).optional().nullable()}),Xn=e=>({key:e.key,name:e.name,rackKey:e.key==null?0:L.rT.rackKey(e.key),type:e.type,config:e.config,status:e.status,snapshot:e.snapshot??!1}),O1=({schemas:e,initialValues:t})=>{const n=A1(e),s=Xn(t);return St({name:"Task",schema:n,initialValues:s,retrieve:async({client:o,store:i,params:{key:l},reset:a})=>{if(l==null)return;const c=await Pr(o,i,{key:l},e);a(Xn(c.payload))},update:async({client:o,params:i,store:l,...a})=>{const c=a.value(),x=await(await o.hardware.racks.retrieve({key:c.rackKey})).createTask({key:i.key,name:c.name,type:c.type,config:c.config});l.tasks.set(x.key,m=>m==null?m:(x.status=m.status,x),"config");const p=Xn(x.payload);a.set("key",p.key),a.set("name",p.name),a.set("rackKey",p.rackKey),a.set("type",p.type),a.set("config",p.config),a.set("snapshot",p.snapshot)},mountListeners:({store:o,get:i,reset:l,set:a})=>[o.tasks.onSet((c,d)=>{const x=i("key",{optional:!0})?.value;if(!(x==null||x!==c.key))if(d==="config"){const p=c.payload;l(Xn(p))}else d==="status"&&a("status",c.status)})]})},I1=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:_c,FLUX_STORE_KEY:kc,createForm:O1,createRetrieveQuery:N1,useList:P1,useStatusSynchronizer:M1},Symbol.toStringTag,{value:"Module"})),Lc="labels",D1={channel:L.sT.SET_CHANNEL_NAME,schema:L.sT.labelZ,onChange:({store:e,changed:t})=>e.labels.set(t.key,t)},B1={channel:L.sT.DELETE_CHANNEL_NAME,schema:L.sT.keyZ,onChange:({store:e,changed:t})=>e.labels.delete(t)},Tc={listeners:[D1,B1]},Qt=(e,t)=>L.jb.matchRelationship(e,{from:t,type:L.sT.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE}),Mc=Ye({name:"Labels",retrieve:async({client:e,params:{id:t}})=>await e.labels.retrieve({for:t}),mountListeners:({client:e,store:t,params:{id:n},onChange:s})=>[t.labels.onSet(o=>{s(i=>{const l=i.filter(a=>a.key!==o.key);return l.length===i.length?i:[...l,o]})}),t.labels.onDelete(o=>s(i=>i.filter(l=>l.key!==o))),t.relationships.onSet(async o=>{if(!Qt(o,n))return;const{key:i}=o.to,l=await e.labels.retrieve({key:i});t.labels.set(i,l),s(a=>[...a.filter(c=>c.key!==i),l])}),t.relationships.onDelete(o=>{const i=L.jb.relationshipZ.parse(o);Qt(i,n)&&s(l=>l.filter(a=>a.key!==i.to.key))})]}),Ar=Ve({name:"Labels",retrieve:async({client:e,params:t})=>await e.labels.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.labels.retrieve({key:t}),mountListeners:({store:e,onChange:t,onDelete:n,params:{keys:s}})=>{const o=s?new Set(s):void 0;return[e.labels.onSet(async i=>{o!=null&&!o.has(i.key)||t(i.key,i,{mode:"prepend"})}),e.labels.onDelete(async i=>n(i))]}}),Nc=L.sT.labelZ.partial({key:!0}),$1=St({name:"Label",initialValues:{name:"",color:"#000000"},schema:Nc,retrieve:async({client:e,params:{key:t},reset:n})=>{t!=null&&n(await e.labels.retrieve({key:t}))},update:async({client:e,value:t,reset:n})=>{const s=await e.labels.create(t());n(s)},mountListeners:({store:e,params:{key:t},reset:n})=>[e.labels.onSet(async s=>{t==null||s.key!==t||n(s)},t)]}),z1=Fe({name:"Label",update:async({client:e,params:{key:t}})=>await e.labels.delete(t)}).useDirect,Or="label",V1=({itemKey:e,...t})=>{const n=f.useItem(e),{selected:s,onSelect:o,hovered:i}=f.useItemState(e);return n==null?null:r.jsxRuntimeExports.jsx(f.Item,{itemKey:e,onSelect:o,selected:s,hovered:i,...t,children:r.jsxRuntimeExports.jsxs(f.Text,{align:"center",children:[r.jsxRuntimeExports.jsx(f.Circle,{color:n?.color,size:"2.5em"}),n?.name]})})},Pc=f.renderProp(V1),F1=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t),{onSelect:s}=f.useItemState(t);return n==null?null:r.jsxRuntimeExports.jsx(Os,{color:n.color,onClose:s,size:"small",children:n.name})}),H1={variant:"text"},Z1=({onChange:e,value:t,emptyContent:n,filter:s,initialParams:o,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=Ar({filter:s,initialParams:o}),{fetchMore:p,search:m}=nt.usePager({retrieve:a});return r.jsxRuntimeExports.jsx(As,{resourceName:"Label",haulType:Or,value:t,onChange:e,data:l,getItem:c,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,renderTag:F1,icon:r.jsxRuntimeExports.jsx(f.Label,{}),triggerProps:H1,variant:"floating",...i,children:Pc})},K1=({onChange:e,value:t,allowNone:n,emptyContent:s,filter:o,initialParams:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=Ar({filter:o,initialParams:i}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return r.jsxRuntimeExports.jsx(Dt,{resourceName:"Label",value:t,onChange:e,data:a,getItem:d,subscribe:x,allowNone:n,onFetchMore:m,onSearch:h,emptyContent:s,status:p,haulType:Or,...l,children:Pc})},Y1=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:Tc,FLUX_STORE_KEY:Lc,HAUL_TYPE:Or,SelectMultiple:Z1,SelectSingle:K1,formSchema:Nc,matchRelationship:Qt,retrieveLabelsOf:Mc,useDelete:z1,useForm:$1,useList:Ar},Symbol.toStringTag,{value:"Module"})),$s=new Error("Tab not found"),G1=new Error("Invalid Mosaic"),ps=(e,t,n="center",s,o)=>{if(e=Ge(e),s===void 0)return Do(e,t);const i=Bo(e,s);if(n==="center")return i.tabs||=[],o!==void 0&&o>=0&&o<=i.tabs.length?i.tabs.splice(o,0,t):i.tabs.push(t),i.selected=t.tabKey,e;const l=i.key*2,a=i.key*2+1,c=n==="top"||n==="left"?l:a;if(Bo(e,c).key!==i.key)return ps(e,t,"center",c);if(i.tabs==null||i.tabs.length===0)return ps(e,t,"center",s);const[d,x,p]=J1(n);if(i.direction=p,i[d]={key:0,tabs:[t],selected:t.tabKey},i[x]={key:0,tabs:i.tabs,selected:i.selected},i.first==null||i.last==null)throw G1;return i.first.key=l,i.last.key=a,i.tabs=void 0,i.size=void 0,i.selected=void 0,e},U1=(e,t,n)=>{e=Ge(e);const[s,o]=Mt(e,t);if(s==null||o==null)throw $s;return o.tabs=o.tabs?.map(i=>i.tabKey===t?n(i):i),e},Do=(e,t)=>(e=Ge(e),e.tabs!=null?(e.tabs.push(t),e.selected=t.tabKey,e):(e.first!=null?e.first=Do(e.first,t):e.last!=null&&(e.last=Do(e.last,t)),e)),ms=e=>{e=Ge(e);const t=[];if(e.tabs!=null&&(e.selected=Me.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]},Ir=(e,t)=>{e=Ge(e);const[,n]=Mt(e,t);if(n==null)return[e,null];n.tabs=n.tabs?.filter(o=>o.tabKey!==t),n.selected=Me.resetSelection(n.selected,n.tabs),e=Q1(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,Ac=(e,t)=>{e=Ge(e);const[n,s]=Mt(e,t);if(n==null||s==null)throw $s;return s.selected=t,e},Oc=(e,t,n,s,o)=>{e=Ge(e);const[i,l]=Mt(e,t);if(i==null||l==null)throw $s;const[a,c]=Ir(e,t);return[ps(a,i,n,s,o),c]},bn=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=bn(e.first,t);if(n!=null)return n}if(e.last!=null){const n=bn(e.last,t);if(n!=null)return n}},Ic=(e,t,n)=>{const s=hs(e,t);if(s==null)throw new Error("Node not found");return s.size=n,e},W1=(e,t,n)=>{e=Ge(e);const s=bn(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 o=s.tabs.findIndex(x=>x.tabKey===t);if(o===-1)throw new Error("Tab not found in node");const i=s.tabs[o];s.tabs=s.tabs.filter(x=>x.tabKey!==t);const l=s.key*2,c={key:s.key*2+1,tabs:[i],selected:i.tabKey},d={key:l,tabs:s.tabs,selected:s.selected};return d.selected=Me.resetSelection(d.selected,d.tabs),s.direction=n,s.first=d,s.last=c,s.tabs=void 0,s.selected=void 0,e},X1=(e,t)=>{const n=bn(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},Dc=(e,t,n)=>{e=Ge(e);const[,s]=Mt(e,t);if(s?.tabs==null)throw $s;return s.tabs=Me.rename(t,n,s?.tabs??[]),e},q1=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,Bo=(e,t)=>{const n=hs(e,t);if(n!=null)return n;const s=Math.floor(t/2);return s===0?e:Bo(e,s)},Q1=e=>{let t=!0;for(;t;)[e,t]=$o(e);return e=Vo(e,1),e},$o=e=>{if(e.first==null||e.last==null)return[e,!1];if(Ii(e.first))return[Oi(e.last),!0];if(Ii(e.last))return[Oi(e.first),!0];let t,n;return[e.first,t]=$o(e.first),[e.last,n]=$o(e.last),[e,t||n]},Oi=e=>(e.size=void 0,e),Ii=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),Mt=(e,t)=>{if(e.tabs!=null){const l=e.tabs.find(a=>a.tabKey===t);if(l!=null)return[l,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,s]=Mt(e.first,t);if(n!=null&&s!=null)return[n,s];const[o,i]=Mt(e.last,t);return[o,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)},J1=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")}},Ge=e=>({...e,first:e.first!=null?Ge(e.first):void 0,last:e.last!=null?Ge(e.last):void 0}),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),zo=(e,t)=>{t(e),e.first!=null&&zo(e.first,t),e.last!=null&&zo(e.last,t)},Vo=(e,t)=>(e=Ge(e),e.key=t,e.first!=null&&(e.first=Vo(e.first,t*2)),e.last!=null&&(e.last=Vo(e.last,t*2+1)),e);class Bc{parent;stub;el;constructor(t={}){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 ej=({node:e})=>{const t=j.createRef(),n=j.useRef(e);return j.useEffect(()=>{const s=t.current;if(s==null)return;const o=s.parentNode;if(o!=null)return e.mount(o,s),()=>{t.current!=null&&e.unmount(t.current)}},[]),j.useEffect(()=>{n.current!=null&&e!==n.current&&(n.current.unmount(t.current),n.current=e);const s=t.current;if(s==null)return;const o=s.parentNode;o!=null&&e.mount(o,s)},[e]),r.jsxRuntimeExports.jsx("div",{ref:t})},$c=({node:e,children:t})=>Ql.createPortal(t,e.el),tj=Object.freeze(Object.defineProperty({__proto__:null,In:$c,Node:Bc,Out:ej},Symbol.toStringTag,{value:"Module"})),js=j.memo(({root:e,onDrop:t,onResize:n,onCreate:s,onFileDrop:o,children:i,activeTab:l,emptyContent:a,onSelect:c,onClose:d,onRename:x,onReorder:p,contextMenu:m,addTooltip:h,className:g,...E})=>{const{tabs:S,direction:R,first:v,last:y,key:C,size:k}=e,T={onDrop:t,onResize:n,onCreate:s,onFileDrop:o,children:i,onClose:d,contextMenu:m,onSelect:c,onRename:x,onReorder:p,activeTab:l,addTooltip:h},P=j.useCallback(([$])=>n(C,$),[n]),{props:I}=ua({direction:R,onResize:P,count:2,initialSizes:k!=null?[k]:void 0});let B={};C==1&&(B={...E,className:u.CSS(u.CSS.B("mosaic"),g)});let F;return S!==void 0?F=r.jsxRuntimeExports.jsx(zc,{root:e,emptyContent:a,...B,...T}):v!=null&&y!=null?F=r.jsxRuntimeExports.jsxs(da,{id:`mosaic-${C}`,align:"stretch",...I,...B,children:[r.jsxRuntimeExports.jsx(js,{...T,root:v,onResize:n},v.key),r.jsxRuntimeExports.jsx(js,{...T,root:y,onResize:n},y.key)]}):(F=null,console.warn("Mosaic tree is malformed")),F});js.displayName="Mosaic";const Es="pluto-mosaic-tab-drop",Dr="pluto-mosaic-tab-create",nj=(e,t,n)=>{if(f.filterByType(f.FILE_TYPE,t).length>0&&n)return!0;const o=f.filterByType(Es,t).map(a=>a.key),i=e.filter(a=>!o.includes(a.tabKey)).length>0;return f.filterByType(Dr,t).length>0||o.length>0&&(i||e.length===0)},zc=j.memo(({root:e,onDrop:t,onCreate:n,activeTab:s,children:o,className:i,onReorder:l,onFileDrop:a,addTooltip:c,...d})=>{const{key:x,tabs:p}=e,[m,h]=j.useState(null),g=a!=null,E=j.useCallback(({items:B})=>nj(p,B,g),[p,g]),S=j.useCallback(({items:B,event:F})=>{if(F==null)return[];const $=oj(F);h(null);const D=f.filterByType(f.FILE_TYPE,B).length>0,{percents:z}=Di(F),b=p.length===0?"center":Bi(z);if(D)return a?.(x,b,F),B;const N=f.filterByType(Es,B);if(N.length>0){const M=N.map(({key:V})=>V)[0];t(x,M,b,$)}const _=f.filterByType(Dr,B);if(_.length>0){const M=_.map(({key:V})=>V);n?.(x,b,M)}return N},[t,p.length]),R=j.useCallback(({event:B})=>{if(B==null)return;const{percents:F,inSelector:$}=Di(B);let D=null;$||(D=p.length===0?"center":Bi(F)),h(D)},[p.length]),{startDrag:v,...y}=f.useDragAndDrop({type:"Mosaic",canDrop:E,onDrop:S,onDragOver:R}),C=E(f.useDraggingState()),k=j.useCallback(()=>h(null),[]),T=j.useCallback((B,{tabKey:F})=>{v([{key:F,type:Es,elementID:B.currentTarget.id}])},[v]),P=j.useCallback(()=>n?.(x,"center"),[x]),I=x==1&&p.length==0;return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:r.jsxRuntimeExports.jsxs(Me.Tabs,{id:`tab-${x}`,tabs:p,className:u.CSS(i,I&&m!=null&&u.CSS.M("drag-over")),onDragLeave:k,selected:e.selected,selectedAltColor:s===e.selected,onDragStart:T,onCreate:P,addTooltip:c,...y,...d,children:[e.selected!=null&&o(p.find(B=>B.tabKey===e.selected)),C&&r.jsxRuntimeExports.jsx("div",{style:{zIndex:1e3,position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),m!=null&&r.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("mosaic","mask"),style:sj[m]})]})})});zc.displayName="MosaicTabLeaf";const sj={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%"}},Di=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}},oj=e=>{const t=e.target.closest(".pluto-tabs-selector__btn");if(t!=null)return Array.from(t.parentElement?.children??[]).indexOf(t)},rj=e=>e,ij=e=>1-e,Bi=({x:e,y:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,s]=[rj(e),ij(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")},lj=({root:e,onSelect:t,children:n})=>{const s=j.useRef(new Map),o=new Set,i=gs(e,l=>l.tabs?.map(a=>{let c=s.current.get(a.tabKey);return a==null?null:(c==null&&(c=new Bc({style:"width: 100%; height: 100%; position: relative;"}),c.el.addEventListener("click",()=>t?.(a.tabKey)),s.current.set(a.tabKey,c)),o.add(a.tabKey),r.jsxRuntimeExports.jsx($c,{node:c,children:n({...a,visible:a.tabKey===l.selected})},a.tabKey))})).flat().filter(l=>l!=null);return s.current.forEach((l,a)=>!o.has(a)&&s.current.delete(a)),[s,i]},Fo=ne.z.object({key:ne.z.number(),tabs:ne.z.array(Me.tabZ).optional(),selected:ne.z.string().optional(),direction:u.p.direction.optional(),size:ne.z.number().optional(),get first(){return Fo.optional()},get last(){return Fo.optional()}}),aj=({allowRename:e=!1,initialTree:t})=>{const[n,s]=j.useState(t);return j.useEffect(()=>s(ms(t)[0]),[t]),{root:n,onDrop:(d,x,p)=>s(m=>Oc(m,x,p,d)[0]),onClose:d=>s(x=>Ir(x,d)[0]),onSelect:d=>s(x=>Ac(x,d)),onResize:(d,x)=>s(p=>Ic(p,d,x)),onRename:e?(d,x)=>s(p=>Dc(p,d,x)):void 0}},cj=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:Dr,HAUL_DROP_TYPE:Es,Mosaic:js,autoSelectTabs:ms,canSplit:X1,findSelected:fs,findTabNode:bn,forEachNode:zo,insertTab:ps,isEmpty:q1,mapNodes:gs,moveTab:Oc,nodeZ:Fo,removeTab:Ir,renameTab:Dc,resizeNode:Ic,selectTab:Ac,split:W1,updateTab:U1,use:aj,usePortal:lj},Symbol.toStringTag,{value:"Module"})),uj=({variant:e,className:t,...n})=>r.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(t,u.CSS.B("note"),u.CSS.M(e)),align:"stretch",empty:!0,...n}),dj=Object.freeze(Object.defineProperty({__proto__:null,Note:uj},Symbol.toStringTag,{value:"Module"})),Vc="relationships",Fc="resources",xj={channel:L.jb.RELATIONSHIP_SET_CHANNEL_NAME,schema:L.jb.relationshipZ,onChange:({store:e,changed:t})=>e.relationships.set(L.jb.relationshipToString(t),t)},pj={channel:L.jb.RELATIONSHIP_DELETE_CHANNEL_NAME,schema:L.jb.relationshipZ,onChange:({store:e,changed:t})=>e.relationships.delete(L.jb.relationshipToString(t))},Hc={listeners:[xj,pj]},mj={channel:L.jb.RESOURCE_SET_CHANNEL_NAME,schema:L.jb.idZ,onChange:async({store:e,changed:t,client:n})=>e.resources.set(L.jb.idToString(t),await n.ontology.retrieve(t))},fj={channel:L.jb.RESOURCE_DELETE_CHANNEL_NAME,schema:L.jb.idZ,onChange:({store:e,changed:t})=>e.resources.delete(t.key)},Zc={listeners:[mj,fj]},hj=e=>{const t=ze();j.useEffect(()=>t.resources.onSet(e),[t.resources])},gj=e=>{const t=ze();j.useEffect(()=>{const n=t.resources.onDelete(async s=>e(L.jb.idZ.parse(s)));return()=>n()},[t.resources])},jj=e=>{const t=ze();j.useEffect(()=>t.relationships.onSet(e),[t.relationships])},Ej=e=>{const t=ze();j.useEffect(()=>t.relationships.onDelete(n=>e(L.jb.relationshipZ.parse(n))),[t.relationships])},Kc=e=>Ve({name:"useDependents",retrieve:async({client:t,params:{id:n}})=>n==null?[]:await t.ontology.retrieve([n],{children:e==="to",parents:e==="from"}),retrieveByKey:async({client:t,key:n})=>await t.ontology.retrieve(n),mountListeners:({store:t,onChange:n,onDelete:s,client:o,params:{id:i}})=>[t.relationships.onSet(async l=>{if(L.jb.matchRelationship(l,{type:"parent",[L.jb.oppositeRelationshipDirection(e)]:i})){const a=await o.ontology.retrieve(l[e]);n(a.key,a)}}),t.relationships.onDelete(l=>{const a=L.jb.relationshipZ.parse(l);L.jb.matchRelationship(a,{type:"parent",[L.jb.oppositeRelationshipDirection(e)]:i})&&s(L.jb.idToString(a[e]))}),t.resources.onSet(l=>n(l.key,a=>a==null?null:{...a,...l})),t.resources.onDelete(async l=>s(l))]}),yj=Kc("to"),Sj=Ve({name:"useResourceList",retrieveCached:({store:e})=>e.resources.list(),retrieve:async({client:e,params:t,store:n})=>{const s=await e.ontology.retrieve(t);return s.forEach(o=>n.resources.set(o.key,o)),s},retrieveByKey:async({client:e,key:t,store:n})=>{const s=await e.ontology.retrieve(L.jb.idZ.parse(t));return n.resources.set(t,s),s},mountListeners:({store:e,onChange:t,onDelete:n})=>[e.resources.onSet(async s=>t(s.key,s)),e.resources.onDelete(async s=>n(s))]}),Rj=Ye({name:"useParentID",retrieve:async({client:e,params:t})=>{const n=await e.ontology.retrieveParents(t.id);if(t.type==null)return n[0].id;const s=n.find(({id:o})=>o.type===t.type);return s==null?null:s.id},mountListeners:({store:e,onChange:t,client:n,params:{id:s}})=>[e.relationships.onSet(async o=>{if(L.jb.matchRelationship(o,{type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:s})){const i=await n.ontology.retrieve(o.from);t(i.id)}else t(null)}),e.relationships.onDelete(async o=>{const i=L.jb.relationshipZ.parse(o);L.jb.matchRelationship(i,{type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:s})&&t(null)})]}),Cj=Object.freeze(Object.defineProperty({__proto__:null,RELATIONSHIPS_FLUX_STORE_KEY:Vc,RELATIONSHIP_FLUX_STORE_CONFIG:Hc,RESOURCES_FLUX_STORE_KEY:Fc,RESOURCE_FLUX_STORE_CONFIG:Zc,createDependentsListHook:Kc,retrieveParentID:Rj,useChildren:yj,useRelationshipDeleteSynchronizer:Ej,useRelationshipSetSynchronizer:jj,useResourceDeleteSynchronizer:gj,useResourceList:Sj,useResourceSetSynchronizer:hj},Symbol.toStringTag,{value:"Module"})),mo={Close:r.jsxRuntimeExports.jsxs("svg",{width:"124",height:"124",viewBox:"0 0 124 124",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"88.3883",width:"87",height:"11",transform:"rotate(-45 26.8701 88.3883)",fill:"#7E0508"}),r.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"34.6482",width:"11",height:"87",transform:"rotate(-45 26.8701 34.6482)",fill:"#7E0508"})]}),Minimize:r.jsxRuntimeExports.jsx("svg",{width:"87",height:"11",viewBox:"0 0 87 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsxRuntimeExports.jsx("rect",{x:"15",width:"60",height:"11",fill:"#985712"})}),Maximize:r.jsxRuntimeExports.jsxs("svg",{width:"143",height:"143",viewBox:"0 0 143 143",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.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"}),r.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"})]})},bj=({disabled:e=[],className:t,focused:n=!0,onMinimize:s,onMaximize:o,onFullscreen:i,onClose:l,...a})=>r.jsxRuntimeExports.jsxs(f.Box,{gap:1.5,x:!0,className:u.CSS(u.CSS.B("macos-controls"),!n&&u.CSS.BM("macos-controls","blurred"),t),...a,children:[r.jsxRuntimeExports.jsx(fo,{onClick:l,className:u.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:mo.Close}),r.jsxRuntimeExports.jsx(fo,{onClick:s,className:u.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:mo.Minimize}),r.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})=>r.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("macos-control"),u.CSS.disabled(t),e),tabIndex:-1,disabled:t,...s}),wj=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:s,onFullscreen:o,focused:i,contrast:l=2,...a})=>r.jsxRuntimeExports.jsxs(f.Box,{pack:!0,...a,children:[r.jsxRuntimeExports.jsx(ho,{className:u.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),contrast:l,children:r.jsxRuntimeExports.jsx(f.Subtract,{})}),r.jsxRuntimeExports.jsx(ho,{className:u.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),contrast:l,children:r.jsxRuntimeExports.jsx(f.Box$1,{})}),r.jsxRuntimeExports.jsx(ho,{onClick:s,className:u.CSS.BM("windows-control","close"),disabled:e.includes("close"),contrast:l,children:r.jsxRuntimeExports.jsx(f.Close,{})})]}),ho=({disabled:e=!1,className:t,...n})=>e?null:r.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.B("windows-control"),t),tabIndex:-1,...n}),Yc=u.S.getOS,vj="Windows",kj=({forceOS:e,visibleIfOS:t,...n})=>{const s=Yc({force:e,default:vj});if(t!=null&&t!==s)return null;const o=s==="macOS"?bj:wj;return r.jsxRuntimeExports.jsx(o,{...n})},_j=Object.freeze(Object.defineProperty({__proto__:null,Controls:kj,use:Yc},Symbol.toStringTag,{value:"Module"})),Lj=(e,t)=>{const n=s=>r.jsxRuntimeExports.jsx(e,{...t,...s});return n.displayName=e.displayName,n},Tj=Object.freeze(Object.defineProperty({__proto__:null,createComponent:Lj},Symbol.toStringTag,{value:"Module"}));j.createContext({instrumentation:L.O.NOOP});const Mj=({children:e,...t})=>{const{path:n}=f.useUnidirectional({type:L.Provider$1.TYPE,schema:L.providerStateZ,state:t});return r.jsxRuntimeExports.jsx(f.Composite,{path:n,children:e})},Nj="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjUgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",Gc="rangeKV",Uc="rangeAliases",wn=async(e,t,n)=>{const s=t.ranges.get(n);if(s!=null)return s;const o=await e.ranges.retrieve({keys:[n],includeParent:!0,includeLabels:!0});return t.ranges.set(n,o[0]),o[0]},Pj=async(e,t,n)=>{const s=await e.ranges.retrieve({...n,includeParent:!0,includeLabels:!0});return t.ranges.set(s),s},Aj=e=>{const t=ze();j.useEffect(()=>t.ranges.onSet(n=>e(n.payload)),[t])},Oj=e=>{const t=ze();j.useEffect(()=>t.ranges.onDelete(n=>e(n)),[t])},Wc=async(e,t,n,s)=>{if(L.jb.matchRelationship(e,{from:{type:"range"},type:L.sT.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE,to:{type:"label"}})){let i=s.labels.get(e.to.key);i==null&&(i=await n.labels.retrieve({key:e.to.key}),s.labels.set(e.to.key,i)),t(e.from.key,l=>l==null?l:n.ranges.sugarOne({...l,labels:[...l.labels?.filter(a=>a.key!==e.to.key)??[],i]}))}},Xc=async(e,t,n,s)=>{if(L.jb.matchRelationship(e,{from:{type:"range"},type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}})){const i=await n.ranges.retrieve(e.from.key);s.ranges.set(e.from.key,i),t(e.to.key,l=>l==null?l:n.ranges.sugarOne({...l,parent:i}))}},Ij=Ve({name:"Range",retrieve:async({client:e,params:{key:t},store:n})=>{const s=await e.ontology.retrieveChildren(L.iT.ontologyID(t),{types:["range"]});return s.length===0?[]:await Pj(e,n,{keys:s.map(({id:{key:o}})=>o)})},retrieveByKey:async({client:e,key:t,store:n})=>await wn(e,n,t),mountListeners:({store:e,onChange:t,onDelete:n,client:s,params:{key:o}})=>[e.ranges.onSet(i=>{t(i.key,l=>l==null?l:s.ranges.sugarOne({...i,parent:i.parent??l.parent,labels:i.labels??l.labels}))}),e.ranges.onDelete(async i=>n(i)),e.relationships.onSet(async i=>{if(o==null)return;if(await Xc(i,t,s,e),await Wc(i,t,s,e),L.jb.matchRelationship(i,{from:L.iT.ontologyID(o),type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}})){const a=await s.ranges.retrieve({keys:[i.to.key],includeParent:!0,includeLabels:!0});return t(i.to.key,a[0])}}),e.relationships.onDelete(async i=>{if(o==null)return;const l=L.jb.relationshipZ.parse(i);if(L.jb.matchRelationship(l,{from:L.iT.ontologyID(o),type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}}))return n(l.to.key);l.type===L.sT.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE&&t(l.from.key,d=>d==null?d:s.ranges.sugarOne({...d,labels:d.labels?.filter(x=>x.key!==l.to.key)}))})]}),Dj=Ye({name:"Range",retrieve:async({client:e,params:{id:t}})=>{const s=(await e.ontology.retrieveParents(t)).find(({id:{type:o}})=>o==="range");return s==null?null:e.ranges.sugarOntologyResource(s)},mountListeners:({store:e,onChange:t,client:n,params:{id:s}})=>[e.ranges.onSet(o=>{t(i=>i==null||i.key!==o.key?i:n.ranges.sugarOne({...o,parent:o.parent??i.parent,labels:o.labels??i.labels}))}),e.relationships.onSet(async o=>{if(!L.jb.matchRelationship(o,{type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:s}))return;if(!(o.from.type==="range"))return t(null);const a=await wn(n,e,o.from.key);t(n.ranges.sugarOne(a.payload))}),e.relationships.onDelete(async o=>{const i=L.jb.relationshipZ.parse(o);L.jb.matchRelationship(i,{type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:s})&&t(null),L.jb.matchRelationship(i,{type:L.sT.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE,to:s})&&t(c=>c==null?c:n.ranges.sugarOne({...c,labels:c.labels?.filter(d=>d.key!==i.to.key)}))})]}),qc=Ye({name:"Range",retrieve:async({client:e,params:{key:t},store:n})=>await wn(e,n,t),mountListeners:({store:e,onChange:t,client:n,params:{key:s}})=>[e.ranges.onSet(async o=>{if(o!=null)return t(o)},s),e.relationships.onSet(async o=>{if(Qt(o,L.iT.ontologyID(s))){const a=await n.labels.retrieve({key:o.to.key});e.labels.set(o.to.key,a),t(c=>c==null?c:n.ranges.sugarOne({...c,labels:[...(c.labels??[]).filter(d=>d.key!==a.key),a]}))}if(L.jb.matchRelationship(o,{type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:L.iT.ontologyID(s)})){const a=await n.ranges.retrieve(o.from.key);e.ranges.set(o.from.key,a),t(c=>c==null?c:n.ranges.sugarOne({...c,parent:a}))}},s)]}),Bj=qc.useDirect,Qc=ne.z.object({...L.iT.payloadZ.omit({timeRange:!0}).partial({key:!0}).shape,labels:ne.z.array(L.sT.keyZ),parent:ne.z.string().optional(),timeRange:ne.z.object({start:ne.z.number(),end:ne.z.number()})}),Ho=async e=>({...e.payload,timeRange:e.timeRange.numeric,parent:e.parent?.key,labels:e.labels?.map(t=>t.key)??[]}),$j={name:"",labels:[],parent:"",timeRange:{start:0,end:0}},zj=St({name:"Range",schema:Qc,initialValues:$j,retrieve:async({client:e,params:{key:t},store:n,reset:s})=>{t!=null&&s(await Ho(await wn(e,n,t)))},update:async({client:e,value:t,reset:n,store:s})=>{const o=t(),i=o.parent,l=u.O$1.isNonZero(i)?L.iT.ontologyID(i):void 0,a=await e.ranges.create(o,{parent:l});await e.labels.label(a.ontologyID,o.labels,{replace:!0});const c=s.labels.get(o.labels),d=new Set(c.map(m=>m.key)),x=o.labels.filter(m=>!d.has(m));if(x.length>0){const m=await e.labels.retrieve({keys:x});c.push(...m),s.labels.set(m)}let p=null;u.O$1.isNonZero(i)&&(p=await wn(e,s,i)),s.ranges.set(a.key,e.ranges.sugarOne({...a.payload,labels:c,parent:p?.payload??null})),n({...o,...a.payload,timeRange:a.timeRange.numeric,labels:o.labels,parent:o.parent})},mountListeners:({store:e,reset:t,get:n,set:s})=>[e.ranges.onSet(async o=>{const i=await Ho(o),l=n("key",{optional:!0})?.value;if(l==null||l!==o.key)return;const a=n("parent",{optional:!0})?.value,c=n("labels").value;t({...i,labels:c,parent:a})}),e.relationships.onSet(o=>{const i=n("key",{optional:!0})?.value;if(i==null)return;const l=L.iT.ontologyID(i);if(Qt(o,l)){const d=n("labels").value;return s("labels",[...d.filter(x=>x!==o.to.key),o.to.key])}L.jb.matchRelationship(o,{type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:l})&&s("parent",o.from.key)}),e.relationships.onDelete(o=>{const i=n("key",{optional:!0})?.value;if(i==null)return;const l=L.jb.relationshipZ.parse(o),a=L.iT.ontologyID(i);if(Qt(l,a))return s("labels",n("labels").value.filter(x=>x!==l.to.key));if(L.jb.matchRelationship(l,{type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:a}))return s("parent",void 0)})]}),Vj=e=>Mc.useDirect({params:{id:L.iT.ontologyID(e)}}),Fj={includeParent:!0,includeLabels:!0},Br=Ve({name:"Ranges",retrieveCached:({store:e,params:t})=>e.ranges.get(n=>u.O$1.isNonZero(t.keys)?t.keys.includes(n.key):!0),retrieve:async({client:e,params:t})=>await e.ranges.retrieve({...Fj,...t}),retrieveByKey:async({client:e,key:t,store:n})=>{const s=n.ranges.get(t);if(s!=null)return s;const o=await e.ranges.retrieve(t);return n.ranges.set(t,o),o},mountListeners:({store:e,onChange:t,onDelete:n,client:s,params:{keys:o}})=>{const i=o!=null&&o.length>0,l=new Set(o);return[e.ranges.onSet(a=>{i&&!l.has(a.key)||t(a.key,c=>c==null?a:s.ranges.sugarOne({...a.payload,labels:a.labels??c.labels}))}),e.ranges.onDelete(async a=>n(a)),e.relationships.onSet(async a=>{await Xc(a,t,s,e),await Wc(a,t,s,e)})]}}),Hj=ne.z.object({pairs:ne.z.array(ne.z.object({key:ne.z.string(),value:ne.z.string()}))}),Jc=ne.z.string().transform(e=>e.split("<--->")).transform(([e,t])=>({key:t,range:e})),Zj={channel:L.iT.KV_SET_CHANNEL,schema:L.iT.kvPairZ,onChange:({store:e,changed:t})=>{e.rangeKV.set(L.iT.kvPairKey(t),t)}},Kj={channel:L.iT.KV_DELETE_CHANNEL,schema:Jc,onChange:({store:e,changed:t})=>e.rangeKV.delete(L.iT.kvPairKey(t))},eu={listeners:[Zj,Kj]},Yj=Ve({name:"Range Meta Data",retrieve:async({client:e,params:{rangeKey:t}})=>{const s=await e.ranges.getKV(t).list();return Object.entries(s).map(([o,i])=>({key:o,value:i,range:t}))},retrieveByKey:async({client:e,key:t,params:{rangeKey:n}})=>{if(n==null)return;const o=await e.ranges.getKV(n).get(t);return{key:t,value:o,range:n}},mountListeners:({store:e,onChange:t,onDelete:n,params:{rangeKey:s}})=>[e.rangeKV.onSet(o=>{o.range===s&&t(o.key,o)}),e.rangeKV.onDelete(o=>{const i=Jc.parse(o);i.range===s&&n(i.key)})]}),tu=L.iT.kvPairZ,Gj=St({name:"Range Meta Data",schema:tu,retrieve:async()=>{},update:async({client:e,value:t})=>{const{key:n,value:s,range:o}=t();await e.ranges.getKV(o).set(n,s)},initialValues:{key:"",value:"",range:""}}),Uj=Fe({name:"Range Meta Data",update:async({client:e,value:t,params:{rangeKey:n}})=>{await e.ranges.getKV(n).delete(t)}}),Wj=Fe({name:"Range Meta Data",update:async({client:e,value:t,onChange:n})=>{await e.ranges.getKV(t.range).set(t.key,t.value),n(t)}}),Xj=Fe({name:"Range",update:async({client:e,value:t,onChange:n,store:s})=>{const o=await e.ranges.create(t);s.ranges.set(o.key,o),n(o)}}),qj=Fe({name:"Range",update:async({client:e,value:t,store:n})=>{await e.ranges.delete(t),n.ranges.delete(t)}}),Qj={channel:L.iT.SET_ALIAS_CHANNEL_NAME,schema:L.iT.aliasZ,onChange:({store:e,changed:t})=>{e.rangeAliases.set(L.iT.aliasKey(t),t)}},Jj=ne.z.string().transform(e=>L.iT.decodeDeleteAliasChange(e)),e0={channel:L.iT.DELETE_ALIAS_CHANNEL_NAME,schema:Jj,onChange:({store:e,changed:t})=>e.rangeAliases.delete(L.iT.aliasKey(t))},nu={listeners:[Qj,e0]},su=({timeRange:e,level:t="p",color:n=9,showSpan:s=!1,...o})=>{const i=new u.r(e.start),l=i.isToday?"time":"dateTime",a=new u.r(e.end),c=a.equals(u.r.MAX),d=a.span(i)<u.i.DAY?"time":"dateTime",x=i.span(a),p=r.jsxRuntimeExports.jsxs(f.Text,{x:!0,align:"center",gap:"small",children:[i.isToday&&r.jsxRuntimeExports.jsx(f.Text,{level:t,color:n,weight:450,children:"Today"}),r.jsxRuntimeExports.jsx(f.DateTime,{el:"span",level:t,displayTZ:"local",format:l,color:n,weight:450,children:i})]}),m=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[c?r.jsxRuntimeExports.jsx(f.Text,{level:t,el:"span",children:"Now"}):r.jsxRuntimeExports.jsx(f.DateTime,{level:t,el:"span",displayTZ:"local",format:d,color:n,weight:450,children:a}),!x.isZero&&s&&r.jsxRuntimeExports.jsxs(f.Text,{level:t,color:n,weight:450,el:"span",children:["(",i.span(a).truncate(u.i.MILLISECOND).toString(),")"]})]});return r.jsxRuntimeExports.jsxs(f.Text,{x:!0,gap:"small",className:u.CSS(u.CSS.B("time-range-chip")),align:"center",level:t,color:n,...o,children:[p,r.jsxRuntimeExports.jsx(f.Arrow.Right,{color:9}),m]})},$r="range",zr=j.memo(({itemKey:e,showParent:t=!0,showLabels:n=!0,...s})=>{const o=f.useItem(e);if(o==null)return null;const{name:i,parent:l,timeRange:a,labels:c}=o;return r.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,justify:"between",...s,children:[r.jsxRuntimeExports.jsxs(pr,{children:[r.jsxRuntimeExports.jsx(Cn,{weight:450,color:10,children:i}),l!=null&&t&&r.jsxRuntimeExports.jsx(Cn,{weight:400,color:8,children:l.name})]}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx(su,{level:"small",timeRange:a}),n&&r.jsxRuntimeExports.jsx(dr,{variant:"text",children:c?.map(d=>r.jsxRuntimeExports.jsx(Os,{color:d.color,size:"small",children:d.name},d.key))})]})]})});zr.displayName="Ranger.ListItem";const ou=f.renderProp(zr),ru=r.jsxRuntimeExports.jsx(f.Range,{}),t0=({onChange:e,value:t,emptyContent:n,filter:s,initialParams:o,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=Br({filter:s,initialParams:o}),{fetchMore:p,search:m}=nt.usePager({retrieve:a});return r.jsxRuntimeExports.jsx(As,{resourceName:"Range",haulType:$r,value:t,onChange:e,data:l,getItem:c,icon:ru,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,...i,children:ou})},n0={style:{width:800}},s0=({onChange:e,value:t,filter:n,allowNone:s,emptyContent:o,initialParams:i,...l})=>{const{data:a,retrieve:c,subscribe:d,getItem:x,status:p}=Br({filter:n,initialParams:i}),{fetchMore:m,search:h}=nt.usePager({retrieve:c});return r.jsxRuntimeExports.jsx(Dt,{resourceName:"Range",variant:"modal",value:t,onChange:e,data:a,allowNone:s,haulType:$r,onFetchMore:m,getItem:x,subscribe:d,status:p,onSearch:h,emptyContent:o,icon:ru,itemHeight:45,dialogProps:n0,...l,children:ou})},o0=Object.freeze(Object.defineProperty({__proto__:null,ALIAS_FLUX_STORE_CONFIG:nu,HAUL_TYPE:$r,KV_FLUX_STORE_CONFIG:eu,ListItem:zr,RANGE_ALIASES_FLUX_STORE_KEY:Uc,RANGE_KV_FLUX_STORE_KEY:Gc,SelectMultiple:t0,SelectSingle:s0,TimeRangeChip:su,formSchema:Qc,kvPairFormSchema:tu,metaDataFormSchema:Hj,retrieve:qc,retrieveParent:Dj,toFormValues:Ho,useChildren:Ij,useDelete:qj,useDeleteKV:Uj,useDeleteSynchronizer:Oj,useForm:zj,useKVPairForm:Gj,useLabels:Vj,useList:Br,useListKV:Yj,useRetrieve:Bj,useSetSynchronizer:Aj,useUpdate:Xj,useUpdateKV:Wj},Symbol.toStringTag,{value:"Module"})),iu="schematicSymbols",r0={channel:L.dT.symbol.SET_CHANNEL_NAME,schema:L.dT.symbol.symbolZ,onChange:({store:e,changed:t})=>e.schematicSymbols.set(t.key,t)},i0={channel:L.dT.symbol.DELETE_CHANNEL_NAME,schema:L.dT.symbol.keyZ,onChange:({store:e,changed:t})=>e.schematicSymbols.delete(t)},lu={listeners:[r0,i0]},ys=async(e,t,n)=>{const s=n.schematicSymbols.get(t);if(s!=null)return s;const o=await e.workspaces.schematic.symbols.retrieve({key:t});return n.schematicSymbols.set(t,o),o},zs=Ye({name:"SchematicSymbols",retrieve:async({client:e,params:t,store:n})=>await ys(e,t.key,n),mountListeners:({store:e,params:t,onChange:n})=>[e.schematicSymbols.onSet(n,t.key)]}),go=(e,t)=>L.jb.matchRelationship(e,{from:t,type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"schematic_symbol"}}),l0=Ve({sort:(e,t)=>e.name.localeCompare(t.name),retrieveCached:({params:e,store:t})=>{if(e.searchTerm!=null&&e.searchTerm.length>0)return[];if(e.parent==null)return t.schematicSymbols.list();const n=t.relationships.get(s=>go(s,e.parent));return t.schematicSymbols.get(n.map(s=>s.to.key))},name:"Schematic Symbols",retrieve:async({client:e,store:t,params:{parent:n,...s}})=>{if(n!=null){const l=(await e.ontology.retrieveChildren(n)).map(c=>c.id.key);if(l.length===0)return[];const a=await e.workspaces.schematic.symbols.retrieve({...s,keys:l});return a.forEach(c=>{const d={from:n,type:L.jb.PARENT_OF_RELATIONSHIP_TYPE,to:L.dT.symbol.ontologyID(c.key)};t.relationships.set(L.jb.relationshipToString(d),d)}),a}const o=await e.workspaces.schematic.symbols.retrieve(s);return t.schematicSymbols.set(o),o},retrieveByKey:async({client:e,key:t,store:n})=>await ys(e,t,n),mountListeners:({store:e,onChange:t,onDelete:n,params:s,client:o})=>[e.schematicSymbols.onSet(i=>t(i.key,l=>l==null?null:i)),e.schematicSymbols.onDelete(n),e.relationships.onSet(async i=>{if(!go(i,s.parent))return;const l=await ys(o,i.to.key,e);t(i.to.key,l)}),e.relationships.onDelete(async i=>{const l=L.jb.relationshipZ.parse(i);go(l,s.parent)&&n(l.to.key)})]}),au=L.dT.symbol.symbolZ.partial({key:!0}).extend({parent:L.jb.idZ}),a0=St({name:"SchematicSymbols",initialValues:{version:1,name:"",data:{svg:"",states:[],handles:[],variant:"static",scale:1,scaleStroke:!1,previewViewport:{zoom:1,position:{x:0,y:0}}},parent:L.jb.ROOT_ID},schema:au,retrieve:async({client:e,params:{key:t,parent:n},reset:s,store:o})=>{if(t==null)return;const i=await ys(e,t,o);n==null&&(n=(await e.ontology.retrieveParents(L.dT.symbol.ontologyID(t)))[0].id),s({version:1,name:i.name,data:i.data,key:i.key,parent:n})},update:async({client:e,value:t,reset:n,params:s})=>{const o=s.parent??t().parent??L.jb.ROOT_ID,i=await e.workspaces.schematic.symbols.create({...t(),parent:o});n({...i,parent:o})},mountListeners:({store:e,params:t,reset:n,get:s})=>t.key==null?[]:[e.schematicSymbols.onSet(o=>n({...o,parent:t.parent??s("parent",{optional:!0})?.value??L.jb.ROOT_ID}),t.key)]}),c0=Fe({name:"SchematicSymbols",update:async({client:e,value:t,params:n})=>await e.workspaces.schematic.symbols.rename(n.key,t)}).useDirect,u0=Fe({name:"SchematicSymbols",update:async({client:e,params:{key:t}})=>await e.workspaces.schematic.symbols.delete(t)}).useDirect,d0=Ye({name:"SchematicSymbols",retrieve:async({client:e})=>await e.workspaces.schematic.symbols.retrieveGroup()}),Ss="data-original-stroke",Rs="data-original-fill",x0=(e,t)=>{let n=[...e];if(e.length!==t.length){const o=new Map(e.map(l=>[l.key,l])),i=new Map(t.map(l=>[l.key,l]));n=n.filter(l=>i.has(l.key));for(const l of t)o.has(l.key)||n.push(L.N.copy(l))}const s=[...n];for(let o=0;o<s.length;o++){const i=s[o],l=t.find(a=>a.key===i.key);if(l&&i.regions.length!==l.regions.length){const a=[...i.regions],c=new Map(a.map(p=>[p.key,p])),d=new Map(l.regions.map(p=>[p.key,p])),x=a.filter(p=>d.has(p.key));for(const p of l.regions)c.has(p.key)||x.push(L.N.copy(p));s[o]={...i,regions:x}}}return s},p0=({path:e,onReset:t,getOriginalRegion:n})=>{const s=Lt(`${e}.name`),o=Lt(e),i=n(e),l=!L.N.equal(o,i);return r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",children:[r.jsxRuntimeExports.jsx(f.Text,{level:"small",color:9,style:{maxWidth:50,width:50},overflow:"ellipsis",children:u.U.capitalize(s)}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsx(ge,{path:`${e}.strokeColor`,showLabel:!1,padHelpText:!1,children:({value:a,onChange:c})=>r.jsxRuntimeExports.jsx(_e.Swatch,{value:a,onChange:d=>c(u.fr.hex(d))})}),r.jsxRuntimeExports.jsx(ge,{path:`${e}.fillColor`,showLabel:!1,padHelpText:!1,children:({value:a,onChange:c})=>r.jsxRuntimeExports.jsx(_e.Swatch,{value:a,onChange:d=>c(u.fr.hex(d))})}),r.jsxRuntimeExports.jsx(f.Button,{onClick:()=>t(e),variant:"text",size:"tiny",style:{opacity:l?1:0},children:r.jsxRuntimeExports.jsx(f.Reset,{})})]},e)]})},m0=({selectedState:e,onReset:t,getOriginalRegion:n})=>{const{data:s}=br(`stateOverrides.${e}.regions`);return r.jsxRuntimeExports.jsx(f.Box,{y:!0,align:"stretch",children:s.map(o=>r.jsxRuntimeExports.jsx(p0,{onReset:t,path:`stateOverrides.${e}.regions.${o}`,getOriginalRegion:n},o))})},cu=()=>{const e=Lt("specKey"),t=Et(),[n,s]=j.useState([]),{data:o}=br("stateOverrides"),[i,l]=j.useState(o?.[0]);zs.useEffect({params:{key:e},onChange:d=>{if(d.data?.data==null)return;const x=d.data.data;s(L.N.copy(x.states));const p=t.get("stateOverrides");if(p.value?.length===0)t.set("stateOverrides",L.N.copy(x.states)),l(x.states[0].key);else{const m=x0(p.value,x.states);t.set("stateOverrides",m)}}});const a=j.useCallback(d=>{const x=d.split(".").slice(1).join("."),p=L.N.get(n,x,{optional:!0});p!=null&&t.set(d,L.N.copy(p))},[t.set,n]),c=j.useCallback(d=>{const x=d.split(".").slice(1).join(".");return L.N.get(n,x,{optional:!0})??null},[n]);return r.jsxRuntimeExports.jsxs(f.Box,{y:!0,align:"stretch",children:[o.length>1&&r.jsxRuntimeExports.jsx(pe.Buttons,{keys:o,value:i,onChange:l,full:"x",children:o.map(d=>r.jsxRuntimeExports.jsx(pe.Button,{itemKey:d,justify:"center",children:u.U.capitalize(d)},d))}),i!=null&&r.jsxRuntimeExports.jsx(m0,{selectedState:i,onReset:a,getOriginalRegion:c})]})},$i=(e,t,n)=>{e.regions.forEach(s=>{s.selectors.forEach(o=>{t.querySelectorAll(o).forEach(l=>n(l,s))})})},f0=e=>{const t=e.getAttribute(Ss),n=e.getAttribute(Rs);t!=null&&e.setAttribute("stroke",t),n!=null&&e.setAttribute("fill",n)},h0=e=>{if(!e.hasAttribute(Ss)){const t=e.getAttribute("stroke");t!=null&&e.setAttribute(Ss,t)}if(!e.hasAttribute(Rs)){const t=e.getAttribute("fill");t!=null&&e.setAttribute(Rs,t)}},g0=(e,t,n)=>{n!=null&&$i(n,e,f0),$i(t,e,(s,o)=>{h0(s);const{strokeColor:i,fillColor:l}=o;if(i!=null)s.setAttribute("stroke",i);else{const a=s.getAttribute(Ss);a!=null&&s.setAttribute("stroke",a)}if(l!=null)s.setAttribute("fill",l);else{const a=s.getAttribute(Rs);a!=null&&s.setAttribute("fill",a)}})},Vr=({container:e,orientation:t,activeState:n,externalScale:s,spec:o,onMount:i,stateOverrides:l})=>{const a=j.useRef(null),c=j.useRef({width:0,height:0}),d=j.useRef(void 0),x=j.useRef(void 0),p=j.useRef(void 0),m=j.useRef(void 0),h=j.useRef(void 0);if(o==null||o.svg.length===0||e==null)return;const g=d.current!==s,E=p.current?.svg!==o?.svg,S=x.current!==t,R=p.current?.scale!==o?.scale,v=p.current?.scaleStroke!==o?.scaleStroke,y=p.current!==o,C=n==="active"?1:0,k=l?.[C]??o.states[C],T=m.current!==k,P=JSON.stringify(h.current)!==JSON.stringify(l);if(!(g||E||v||T||P))return;g&&(d.current=s),S&&(x.current=t),y&&(p.current=L.N.copy(o)),P&&(h.current=l);const{svg:B,scaleStroke:F,scale:$}=o;if(a.current==null||E){a.current!=null&&(a.current.remove(),a.current=null);const z=new DOMParser().parseFromString(B,"image/svg+xml"),b=z.documentElement;a.current=b;const N=a.current.getAttribute("viewBox");if(N){const[,,M,V]=N.split(" ").map(Number);c.current={width:M,height:V}}else a.current.viewBox?.baseVal?c.current={width:a.current.viewBox.baseVal.width,height:a.current.viewBox.baseVal.height}:c.current={width:100,height:100};if(!b.querySelector("g")){const M=z.createElementNS("http://www.w3.org/2000/svg","g"),V=Array.from(b.children);V.forEach(H=>b.removeChild(H)),V.forEach(H=>{H!==M&&M.appendChild(H)}),b.appendChild(M)}e.appendChild(b),i?.(a.current)}if((T||P)&&(g0(a.current,k,m.current),m.current=L.N.copy(k)),R||g||S||E){let D=c.current;u.p.construct(t)==="y"&&(D=u._.swap(D));const z=u._.scale(D,$*s);a.current.setAttribute("width",z.width.toString()),a.current.setAttribute("height",z.height.toString()),a.current.setAttribute("viewBox",`0 0 ${D.width} ${D.height}`)}if(v){const D=a.current.querySelectorAll("path, circle, rect, line, ellipse, polygon, polyline");F?D.forEach(z=>z.removeAttribute("vector-effect")):D.forEach(z=>z.setAttribute("vector-effect","non-scaling-stroke"))}},j0=["path","rect","circle","ellipse","polygon","polyline","line","text"],zi=u.fr.hex(u.fr.ZERO),Vi=e=>{if(e==null||e==="")return zi;const t=u.fr.fromCSS(e);return t==null?zi:u.fr.hex(t)},E0=e=>{const t=e.style.stroke||e.getAttribute("stroke"),n=e.style.fill||e.getAttribute("fill");return{stroke:Vi(t),fill:Vi(n)}},y0=e=>`${e.stroke}|${e.fill}`,uu=e=>{if(e.id)return`#${e.id}`;const t=e.getAttribute("data-region-id");if(t)return`[data-region-id="${t}"]`;if(e.classList.length>0)return`.${Array.from(e.classList).join(".")}`;const n=e.tagName.toLowerCase(),s=e.parentElement;if(!s)return n;let o=1,i=e.previousElementSibling;for(;i;)i.tagName.toLowerCase()===n&&o++,i=i.previousElementSibling;return`${s.tagName.toLowerCase()==="svg"?"":s instanceof SVGElement?`${uu(s)} > `:""}${n}:nth-of-type(${o})`},S0=e=>{const t=j0.flatMap(s=>Array.from(e.querySelectorAll(s))),n=new Map;return t.forEach(s=>{const o=E0(s),i=y0(o);n.has(i)||n.set(i,{elements:[],colorPair:o}),n.get(i).elements.push(s)}),Array.from(n.values()).map((s,o)=>{const i=s.elements.map(uu),l=Array.from(new Set(i)),a=o+1,c={key:`region-${a}`,name:`Region ${a}`,selectors:l};return c.strokeColor=s.colorPair.stroke,c.fillColor=s.colorPair.fill,c})},R0=({value:e,hideOuter:t=!1,showOuterCenter:n=!1,hideInner:s,onChange:o})=>{const{outer:i}=e,l=c=>()=>o({...e,...c}),a=u.CSS.B("select","orientation");return t?r.jsxRuntimeExports.jsx(Fi,{className:a,value:e,onChange:o}):r.jsxRuntimeExports.jsxs(f.Box,{className:a,align:"center",justify:"center",gap:"tiny",children:[r.jsxRuntimeExports.jsx(rt,{selected:i==="top",onClick:l({outer:"top"})}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",justify:"center",gap:"tiny",children:[r.jsxRuntimeExports.jsx(rt,{selected:i==="left",onClick:l({outer:"left"})}),r.jsxRuntimeExports.jsx(Fi,{hideInner:s,value:e,onChange:o,showOuterCenter:n}),r.jsxRuntimeExports.jsx(rt,{selected:i==="right",onClick:l({outer:"right"})})]}),r.jsxRuntimeExports.jsx(rt,{selected:i==="bottom",onClick:l({outer:"bottom"})})]})},Fi=({value:e,onChange:t,className:n,hideInner:s=!1,showOuterCenter:o=!1,...i})=>{const{inner:l}=e,a=x=>()=>t({...e,...x});let c={};s&&(c={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"});let d=null;return o?d=r.jsxRuntimeExports.jsx(rt,{selected:e.outer==="center",onClick:a({outer:"center"})}):d=r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="top",onClick:a({inner:"top"})}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",justify:"center",children:[r.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,selected:l==="left",onClick:a({inner:"left"})}),r.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,selected:l==="right",onClick:a({inner:"right"})})]}),r.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="bottom",onClick:a({inner:"bottom"})})]}),r.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(n,u.CSS.B("value"),o&&u.CSS.M("show-outer-center")),y:!0,align:"center",justify:"center",empty:!0,...i,children:d})},rt=({selected:e,className:t,...n})=>r.jsxRuntimeExports.jsx(f.Button,{variant:"text",className:u.CSS(t,u.CSS.selected(e)),size:"tiny",...n,children:r.jsxRuntimeExports.jsx("div",{className:"symbol"})}),C0=O.MODES,b0=({aetherKey:e,sink:t,mode:n})=>{const s=f.useMemoDeepEqual({sink:t,mode:n}),o=j.useRef({trigger:0,...s}),{setState:i}=f.useLifecycle({aetherKey:e,type:O.Button.TYPE,schema:O.buttonStateZ,initialState:o.current});j.useEffect(()=>{o.current={...o.current,...s},i(o.current)},[s,i,e]);const l=j.useCallback(()=>{o.current.trigger+=O.MOUSE_UP_INCREMENT,i(o.current)},[i]),a=j.useCallback(()=>{o.current.trigger+=O.MOUSE_DOWN_INCREMENT,i(o.current)},[i]);return{onClick:l,onMouseDown:a,onMouseUp:l}},w0=e=>r.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:C0,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"fire",tooltip:"Output true when clicked",children:"Fire"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"momentary",tooltip:"Output true on press, false on release",children:"Momentary"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"pulse",tooltip:"Output true and then immediately output false on click",children:"Pulse"})]}),du=ne.z.object({bounds:u.H.bounds,gradient:u.fr.gradientZ}),vn={bounds:{lower:0,upper:1},gradient:[]},Hi={size:"small",showDragHandle:!1},Zi={width:60},v0=u.C.Scale.scale(0,1),Fr=({path:e})=>{const{set:t,get:n}=Et(),{bounds:s}=Lt(`${e}`,{defaultValue:{bounds:{...vn.bounds},gradient:[...vn.gradient]}}),o=v0.scale(s);return r.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[r.jsxRuntimeExports.jsx(Be,{inputProps:Hi,style:Zi,label:"Lower",path:`${e}.bounds.lower`}),r.jsxRuntimeExports.jsx(ge,{path:`${e}.gradient`,label:"Gradient",align:"start",padHelpText:!1,children:({value:i,onChange:l})=>r.jsxRuntimeExports.jsx(_e.GradientPicker,{value:L.N.copy(i),scale:o,onChange:a=>{const d={...n(`${e}.bounds`).value},x=a.map(S=>S.position),p=o.pos(Math.max(...x)),m=o.pos(Math.min(...x)),h=p>d.upper,g=m<d.lower;h&&(a[a.length-1].position=1,d.upper=p),g&&(a[0].position=0,d.lower=m);const E=a.map(S=>({...S,color:u.fr.hex(S.color)}));h||g?t(e,{bounds:d,gradient:E}):l(a.map(S=>({...S,color:u.fr.hex(S.color)})))}})}),r.jsxRuntimeExports.jsx(Be,{inputProps:Hi,style:Zi,label:"Upper",path:`${e}.bounds.upper`})]})},k0=e=>r.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:u.wr.NOTATIONS,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"standard",children:"Standard"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"scientific",children:"Scientific"}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"engineering",children:"Engineering"})]}),_0=[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],Hr=({path:e})=>{const{value:t,onChange:n}=yt(e),s=O.sourcePipelinePropsZ.parse(t.telem?.props),o=O.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=O.stringifyNumberProps.parse(s.segments.stringifier.props),l=O.rollingAverageProps.parse(s.segments.rollingAverage.props),a=h=>{const g=O.sourcePipeline("string",{connections:_0,segments:{valueStream:O.streamChannelValue({channel:o.channel}),stringifier:O.stringifyNumber({precision:i.precision??2,notation:i.notation}),rollingAverage:O.rollingAverage({windowSize:l.windowSize??1}),...h},outlet:"stringifier"});n({...t,telem:g})},c=h=>a({valueStream:O.streamChannelValue({channel:h??0})}),d=h=>a({stringifier:O.stringifyNumber({...i,notation:h})}),x=h=>a({stringifier:O.stringifyNumber({...i,precision:h})}),p=h=>a({rollingAverage:O.rollingAverage({windowSize:h})});if(typeof o.channel!="number")throw new Error("Must pass in a channel by key to Value.TelemForm");const{data:m}=Mr.useDirect({params:{key:o.channel}});return j.useEffect(()=>{m!=null&&n({...t,tooltip:[m.name]})},[m?.name,n]),r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(Ae.Item,{label:"Input Channel",grow:!0,children:r.jsxRuntimeExports.jsx(Tt,{value:o.channel,onChange:c})}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx(Ae.Item,{label:"Notation",children:r.jsxRuntimeExports.jsx(k0,{value:i.notation,onChange:d})}),r.jsxRuntimeExports.jsx(Ae.Item,{label:"Precision",align:"start",children:r.jsxRuntimeExports.jsx(f.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:x})}),r.jsxRuntimeExports.jsx(Ae.Item,{label:"Averaging Window",align:"start",children:r.jsxRuntimeExports.jsx(f.Numeric,{value:l.windowSize??1,bounds:{lower:1,upper:100},onChange:p})}),r.jsxRuntimeExports.jsx(ge,{hideIfNull:!0,label:"Stale Color",align:"start",path:"stalenessColor",children:({value:h,onChange:g})=>r.jsxRuntimeExports.jsx(_e.Swatch,{value:h??u.fr.setAlpha(u.fr.ZERO,1),onChange:g,bordered:!0})}),r.jsxRuntimeExports.jsx(Be,{path:"stalenessTimeout",label:"Stale Timeout",inputProps:{bounds:{lower:1,upper:1/0},endContent:"s"}})]})]})},L0=O.Value.z.partial({color:!0}).extend({level:L.levelZ.optional()}),Zr=({aetherKey:e,box:t,telem:n,color:s,precision:o,minWidth:i,level:l="small",backgroundTelem:a,notation:c,location:d,stalenessColor:x,stalenessTimeout:p,useWidthForBackground:m,valueBackgroundOverScan:h,valueBackgroundShift:g})=>{const E=f.useMemoDeepEqual({box:t,telem:n,color:s,precision:o,level:l,minWidth:i,notation:c,backgroundTelem:a,stalenessColor:x,stalenessTimeout:p,location:d,useWidthForBackground:m,valueBackgroundOverScan:h,valueBackgroundShift:g}),[,S,R]=f.use$2({aetherKey:e,type:O.Value.TYPE,schema:O.Value.z,initialState:E});return j.useEffect(()=>R(v=>({...v,...E})),[E]),{width:S.width??S.minWidth}},T0=Object.freeze(Object.defineProperty({__proto__:null,RedlineForm:Fr,TelemForm:Hr,ZERO_READLINE:vn,corePropsZ:L0,redlineZ:du,use:Zr},Symbol.toStringTag,{value:"Module"})),Ne=({className:e,direction:t,...n})=>r.jsxRuntimeExports.jsx(f.Box,{direction:t,align:"stretch",className:u.CSS(u.CSS.B("symbol-form"),e),gap:t==="x"?"large":"medium",...n}),Rt=({hideOuter:e,hideInner:t,showOuterCenter:n,...s})=>t&&e?null:r.jsxRuntimeExports.jsx(ge,{label:"Orientation",padHelpText:!1,...s,children:({value:o,onChange:i})=>r.jsxRuntimeExports.jsx(R0,{value:{inner:o.orientation??"top",outer:o.label?.orientation??"top"},hideInner:t,hideOuter:e,showOuterCenter:n,onChange:l=>i({...o,orientation:l.inner,label:{...o.label,orientation:l.outer}})})}),ut=({path:e,omit:t=[]})=>r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsx(ge,{path:`${e}.label`,label:"Label",padHelpText:!1,grow:!0,children:n=>r.jsxRuntimeExports.jsx(f.Text$2,{selectOnFocus:!0,...n})}),r.jsxRuntimeExports.jsx(Be,{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}),r.jsxRuntimeExports.jsx(ge,{hideIfNull:!0,visible:!t.includes("level"),path:`${e}.level`,label:"Label Size",padHelpText:!1,children:({value:n,onChange:s})=>r.jsxRuntimeExports.jsx(ln,{value:n,onChange:s})}),r.jsxRuntimeExports.jsx(ge,{visible:!t.includes("align"),path:`${e}.align`,label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:({value:n,onChange:s})=>r.jsxRuntimeExports.jsx(pe.SelectAlignment,{value:n,onChange:s})}),r.jsxRuntimeExports.jsx(ge,{visible:!t.includes("direction"),path:`${e}.direction`,label:"Label Direction",padHelpText:!1,hideIfNull:!0,children:({value:n,onChange:s})=>r.jsxRuntimeExports.jsx(pc,{value:n,onChange:s,yDirection:"down"})})]}),$e=e=>r.jsxRuntimeExports.jsx(ge,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:s,...o})=>r.jsxRuntimeExports.jsx(_e.Swatch,{value:t??u.fr.setAlpha(u.fr.ZERO,1),onChange:n,...o,bordered:!0})}),M0={lower:5,upper:1e3},N0={x:.75,y:.5},xu=e=>r.jsxRuntimeExports.jsx(ge,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n})=>r.jsxRuntimeExports.jsx(f.Numeric,{dragScale:N0,bounds:M0,endContent:"%",value:Math.round(t*100),onChange:s=>n(parseFloat((s/100).toFixed(2)))})}),xe=({omit:e,hideInnerOrientation:t,hideOuterOrientation:n})=>{const s=Lt("stateOverrides",{optional:!0})!=null;return r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",empty:!0,children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{omit:e,path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[!s&&r.jsxRuntimeExports.jsx($e,{path:"color",optional:!0}),r.jsxRuntimeExports.jsx(ge,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:o=>r.jsxRuntimeExports.jsx(f.Switch$1,{...o})}),r.jsxRuntimeExports.jsx(xu,{path:"scale"})]})]}),s&&r.jsxRuntimeExports.jsx(cu,{}),r.jsxRuntimeExports.jsx(Rt,{path:"",hideInner:t,hideOuter:n})]})},P0=({path:e})=>{const{value:t,onChange:n}=yt(e),s=O.sourcePipelinePropsZ.parse(t.source?.props),o=O.sinkPipelinePropsZ.parse(t.sink?.props),i=O.streamChannelValuePropsZ.parse(s.segments.valueStream.props),l=O.setChannelValuePropsZ.parse(o.segments.setter.props),a=d=>{d??=0;const x=O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:d}),threshold:O.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:x})},c=d=>{d??=0;const x=O.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:O.setChannelValue({channel:d}),setpoint:O.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),p=O.authoritySource({channel:d}),m=O.acquireChannelControl({channel:d,authority:255});n({...t,sink:x,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:m,source:p},indicator:{statusSource:p}}})};return r.jsxRuntimeExports.jsxs(Ne,{x:!0,grow:!0,align:"stretch",children:[r.jsxRuntimeExports.jsx(Ae.Item,{label:"State Channel",grow:!0,children:r.jsxRuntimeExports.jsx(Tt,{value:i.channel,onChange:a})}),r.jsxRuntimeExports.jsx(Ae.Item,{label:"Command Channel",grow:!0,children:r.jsxRuntimeExports.jsx(Tt,{value:l.channel,onChange:c})}),r.jsxRuntimeExports.jsx(Bs,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},Kr=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],ye=({actions:e,hideInnerOrientation:t})=>{const n=j.useCallback(({tabKey:o})=>{switch(o){case"control":return r.jsxRuntimeExports.jsx(P0,{path:""});default:return r.jsxRuntimeExports.jsx(xe,{hideInnerOrientation:t})}},[t]),s=Me.useStatic({tabs:Kr,content:n});return r.jsxRuntimeExports.jsx(Me.Tabs,{...s,actions:e})},mt={y:2,x:.25},Sn={lower:0,upper:2e3},Ki={lower:0,upper:51},pu=({includeBorderRadius:e=!1,includeStrokeWidth:t=!1})=>r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx($e,{path:"color"}),r.jsxRuntimeExports.jsx($e,{path:"backgroundColor",label:"Background Color"}),r.jsxRuntimeExports.jsx(ge,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:n=>r.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Ki,endContent:"%",...n})}),r.jsxRuntimeExports.jsx(ge,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:n=>r.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Ki,endContent:"%",...n})}),e&&r.jsxRuntimeExports.jsx(ge,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:n=>r.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Sn,endContent:"px",...n})}),t&&r.jsxRuntimeExports.jsx(ge,{path:"strokeWidth",hideIfNull:!0,optional:!0,label:"Border Width",grow:!0,children:n=>r.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:{lower:0,upper:21},endContent:"px",...n})}),r.jsxRuntimeExports.jsx(ge,{path:"dimensions.width",label:"Width",grow:!0,children:({value:n,...s})=>r.jsxRuntimeExports.jsx(f.Numeric,{value:n??200,dragScale:mt,bounds:Sn,endContent:"px",...s})}),r.jsxRuntimeExports.jsx(ge,{path:"dimensions.height",label:"Height",grow:!0,children:({value:n,...s})=>r.jsxRuntimeExports.jsx(f.Numeric,{value:n??200,dragScale:mt,bounds:Sn,endContent:"px",...s})})]})]}),r.jsxRuntimeExports.jsx(Rt,{path:"",hideInner:!0,showOuterCenter:!0,label:"Label Location"})]}),A0=()=>r.jsxRuntimeExports.jsx(Ne,{direction:"x",align:"stretch",children:r.jsxRuntimeExports.jsxs(f.Box,{direction:"y",grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{direction:"x",children:[r.jsxRuntimeExports.jsx($e,{path:"color"}),r.jsxRuntimeExports.jsx($e,{path:"backgroundColor",label:"Background Color"}),r.jsxRuntimeExports.jsx(Be,{path:"rotation",label:"Rotation",inputProps:{dragScale:{x:1,y:.25},bounds:{lower:0,upper:360},endContent:"°"},grow:!0}),r.jsxRuntimeExports.jsx(Be,{path:"numSides",label:"Number of Sides",inputProps:{dragScale:{x:.5,y:.1},bounds:{lower:3,upper:21}},grow:!0}),r.jsxRuntimeExports.jsx(Be,{path:"sideLength",label:"Side Length",inputProps:{dragScale:{x:1,y:1},bounds:{lower:10,upper:500},endContent:"px"},grow:!0}),r.jsxRuntimeExports.jsx(Be,{path:"cornerRounding",label:"Corner Rounding",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:181},endContent:"px"},grow:!0}),r.jsxRuntimeExports.jsx(Be,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),O0=()=>r.jsxRuntimeExports.jsx(Ne,{direction:"x",align:"stretch",children:r.jsxRuntimeExports.jsxs(f.Box,{direction:"y",grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{direction:"x",children:[r.jsxRuntimeExports.jsx($e,{path:"color"}),r.jsxRuntimeExports.jsx($e,{path:"backgroundColor",label:"Background Color"}),r.jsxRuntimeExports.jsx(Be,{path:"radius",label:"Radius",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:500},endContent:"px"},grow:!0}),r.jsxRuntimeExports.jsx(Be,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),I0=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],D0={dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"},B0=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return r.jsxRuntimeExports.jsxs(Ne,{y:!0,empty:!0,children:[r.jsxRuntimeExports.jsx(Hr,{path:""}),";"]});case"redline":return r.jsxRuntimeExports.jsx(Ne,{y:!0,empty:!0,children:r.jsxRuntimeExports.jsx(Fr,{path:"redline"})});default:return r.jsxRuntimeExports.jsxs(Ne,{x:!0,children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx($e,{path:"color"}),r.jsxRuntimeExports.jsx(ge,{path:"units",label:"Units",align:"start",padHelpText:!1,children:s=>r.jsxRuntimeExports.jsx(f.Text$2,{...s})}),r.jsxRuntimeExports.jsx(Be,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:D0}),r.jsxRuntimeExports.jsx(ge,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:s,onChange:o})=>r.jsxRuntimeExports.jsx(ln,{value:s,onChange:o})})]})]}),r.jsxRuntimeExports.jsx(Rt,{path:"",hideInner:!0})]})}},[]),t=Me.useStatic({tabs:I0,content:e});return r.jsxRuntimeExports.jsx(Me.Tabs,{...t})},$0=({path:e})=>{const{value:t,onChange:n}=yt(e),s=O.sourcePipelinePropsZ.parse(t.source?.props),o=O.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=O.withinBoundsProps.parse(s.segments.threshold.props),l=c=>{c??=0;const d=O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:c}),threshold:O.withinBounds({trueBound:i.trueBound})},outlet:"threshold"});n({...t,source:d})},a=c=>{const d=O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:o.channel}),threshold:O.withinBounds({trueBound:c})},outlet:"threshold"});n({...t,source:d})};if(typeof o.channel!="number")throw new Error("Channel key must be used for light telemetry");return r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsx(Ae.Item,{label:"Input Channel",grow:!0,children:r.jsxRuntimeExports.jsx(Tt,{value:o.channel,onChange:l})}),r.jsxRuntimeExports.jsx(Ae.Item,{label:"Lower Threshold",children:r.jsxRuntimeExports.jsx(f.Numeric,{value:i.trueBound.lower??.9,onChange:c=>a({...i.trueBound,lower:c})})}),r.jsxRuntimeExports.jsx(Ae.Item,{label:"Upper Threshold",children:r.jsxRuntimeExports.jsx(f.Numeric,{value:i.trueBound.upper??1.1,onChange:c=>a({...i.trueBound,upper:c})})})]})},z0=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"}],V0=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return r.jsxRuntimeExports.jsx($0,{path:""});default:return r.jsxRuntimeExports.jsx(xe,{})}},[]),t=Me.useStatic({tabs:z0,content:e});return r.jsxRuntimeExports.jsx(Me.Tabs,{...t})},F0=({path:e})=>{const{value:t,onChange:n}=yt(e),s=O.sinkPipelinePropsZ.parse(t.sink?.props),o=O.setChannelValuePropsZ.parse(s.segments.setter.props),i=l=>{l??=0;const a=O.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:O.setChannelValue({channel:l}),setpoint:O.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),c=O.authoritySource({channel:l}),d=O.acquireChannelControl({channel:l,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:c},showIndicator:!0,indicator:{statusSource:c}}})};return r.jsxRuntimeExports.jsxs(Ne,{y:!0,empty:!0,children:[r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx(Ae.Item,{label:"Output Channel",grow:!0,padHelpText:!1,children:r.jsxRuntimeExports.jsx(Tt,{value:o.channel,onChange:i})}),r.jsxRuntimeExports.jsx(Be,{label:"Activation Delay",path:"onClickDelay",inputProps:{endContent:"ms"},hideIfNull:!0,padHelpText:!1}),r.jsxRuntimeExports.jsx(Bs,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0,padHelpText:!1})]}),r.jsxRuntimeExports.jsx(ge,{path:"mode",label:"Mode",optional:!0,children:({value:l,onChange:a})=>r.jsxRuntimeExports.jsx(w0,{value:l,onChange:a})})]})},H0=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"control":return r.jsxRuntimeExports.jsx(F0,{path:""});default:return r.jsxRuntimeExports.jsx(xe,{omit:["align","maxInlineSize"],hideInnerOrientation:!0,hideOuterOrientation:!0})}},[]),t=Me.useStatic({tabs:Kr,content:e});return r.jsxRuntimeExports.jsx(Me.Tabs,{...t})},Z0=({path:e})=>{const{value:t,onChange:n}=yt(e),s=O.sinkPipelinePropsZ.parse(t.sink?.props),o=O.setChannelValuePropsZ.parse(s.segments.setter.props),i=l=>{l??=0;const a=O.sinkPipeline("number",{connections:[],segments:{setter:O.setChannelValue({channel:l})},inlet:"setter"}),c=O.authoritySource({channel:l}),d=O.acquireChannelControl({channel:l,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:c},showIndicator:!0,indicator:{statusSource:c}},disabled:l==0})};return r.jsxRuntimeExports.jsx(Ne,{x:!0,grow:!0,align:"stretch",children:r.jsxRuntimeExports.jsx(Ae.Item,{label:"Command Channel",grow:!0,children:r.jsxRuntimeExports.jsx(Tt,{value:o.channel,onChange:i})})})},K0=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"control":return r.jsxRuntimeExports.jsx(Z0,{path:""});default:return r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,align:"stretch",grow:!0,gap:"small",children:[r.jsxRuntimeExports.jsx(ut,{path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx(wr,{path:"units",label:"Units",align:"start",padHelpText:!1}),r.jsxRuntimeExports.jsx(ge,{path:"size",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:s,onChange:o})=>r.jsxRuntimeExports.jsx(ha,{value:s,onChange:o})}),r.jsxRuntimeExports.jsx($e,{path:"color"})]})]}),r.jsxRuntimeExports.jsx(Rt,{path:"",hideInner:!0})]})}},[]),t=Me.useStatic({tabs:Kr,content:e});return r.jsxRuntimeExports.jsx(Me.Tabs,{...t})},Y0=()=>{const e=yt("autoFit",{optional:!0});return r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",grow:!0,children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[r.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsx(ge,{path:"value",label:"Text",padHelpText:!1,grow:!0,children:t=>r.jsxRuntimeExports.jsx(f.Text$2,{...t})}),r.jsxRuntimeExports.jsx(ge,{path:"level",label:"Text Size",padHelpText:!1,children:({value:t,onChange:n})=>r.jsxRuntimeExports.jsx(ln,{value:t,onChange:n})}),r.jsxRuntimeExports.jsx(ge,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:({value:t,onChange:n})=>r.jsxRuntimeExports.jsx(pe.SelectAlignment,{value:t,onChange:n})})]}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx($e,{path:"color"}),r.jsxRuntimeExports.jsx(ge,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>r.jsxRuntimeExports.jsx(f.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:r.jsxRuntimeExports.jsx(f.Button,{onClick:()=>e?.onChange(!0),disabled:e?.value===!0,variant:"outlined",style:{borderLeft:"var(--pluto-border-l5)"},tooltip:e?.value===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:r.jsxRuntimeExports.jsx(f.AutoFitWidth,{})})})})]})]}),r.jsxRuntimeExports.jsx(Rt,{path:""})]})},G0=()=>r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{path:"label",omit:["maxInlineSize","align","direction"]}),r.jsxRuntimeExports.jsx($e,{path:"color"})]}),r.jsxRuntimeExports.jsx(Rt,{path:"",hideOuter:!0})]}),U0=()=>r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx($e,{path:"color"}),r.jsxRuntimeExports.jsx($e,{path:"backgroundColor",label:"Background Color"}),r.jsxRuntimeExports.jsx(ge,{path:"dimensions.width",label:"Width",grow:!0,children:({value:e,...t})=>r.jsxRuntimeExports.jsx(f.Numeric,{value:e??200,dragScale:mt,bounds:Sn,endContent:"px",...t})}),r.jsxRuntimeExports.jsx(ge,{path:"dimensions.height",label:"Height",grow:!0,children:({value:e,...t})=>r.jsxRuntimeExports.jsx(f.Numeric,{value:e??200,dragScale:mt,bounds:Sn,endContent:"px",...t})})]})]}),r.jsxRuntimeExports.jsx(Rt,{path:"",hideInner:!0})]}),$t=()=>r.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[r.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[r.jsxRuntimeExports.jsx(ut,{path:"label"}),r.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[r.jsxRuntimeExports.jsx($e,{path:"color"}),r.jsxRuntimeExports.jsx(xu,{path:"scale"}),r.jsxRuntimeExports.jsx(Bs,{path:"clickable",label:"Clickable",hideIfNull:!0,optional:!0})]})]}),r.jsxRuntimeExports.jsx(Rt,{path:""})]}),W0=()=>r.jsxRuntimeExports.jsx(pu,{includeBorderRadius:!0,includeStrokeWidth:!0}),X0=()=>r.jsxRuntimeExports.jsx(ye,{hideInnerOrientation:!0});function Te(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=Te(e[n]))!==""&&(t+=(t&&" ")+s);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var q0={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 as(n)}function as(e){this._=e}function Q0(e,t){return e.trim().split(/^|\s+/).map(function(n){var s="",o=n.indexOf(".");if(o>=0&&(s=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:s}})}as.prototype=Vs.prototype={constructor:as,on:function(e,t){var n=this._,s=Q0(e+"",n),o,i=-1,l=s.length;if(arguments.length<2){for(;++i<l;)if((o=(e=s[i]).type)&&(o=J0(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<l;)if(o=(e=s[i]).type)n[o]=Yi(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Yi(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new as(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),s=0,o,i;s<o;++s)n[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],s=0,o=i.length;s<o;++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],o=0,i=s.length;o<i;++o)s[o].value.apply(t,n)}};function J0(e,t){for(var n=0,s=e.length,o;n<s;++n)if((o=e[n]).name===t)return o.value}function Yi(e,t,n){for(var s=0,o=e.length;s<o;++s)if(e[s].name===t){e[s]=q0,e=e.slice(0,s).concat(e.slice(s+1));break}return n!=null&&e.push({name:t,value:n}),e}var Zo="http://www.w3.org/1999/xhtml";const Gi={svg:"http://www.w3.org/2000/svg",xhtml:Zo,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)),Gi.hasOwnProperty(t)?{space:Gi[t],local:e}:e}function e2(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Zo&&t.documentElement.namespaceURI===Zo?t.createElement(e):t.createElementNS(n,e)}}function t2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mu(e){var t=Fs(e);return(t.local?t2:e2)(t)}function n2(){}function Yr(e){return e==null?n2:function(){return this.querySelector(e)}}function s2(e){typeof e!="function"&&(e=Yr(e));for(var t=this._groups,n=t.length,s=new Array(n),o=0;o<n;++o)for(var i=t[o],l=i.length,a=s[o]=new Array(l),c,d,x=0;x<l;++x)(c=i[x])&&(d=e.call(c,c.__data__,x,i))&&("__data__"in c&&(d.__data__=c.__data__),a[x]=d);return new Ke(s,this._parents)}function o2(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function r2(){return[]}function fu(e){return e==null?r2:function(){return this.querySelectorAll(e)}}function i2(e){return function(){return o2(e.apply(this,arguments))}}function l2(e){typeof e=="function"?e=i2(e):e=fu(e);for(var t=this._groups,n=t.length,s=[],o=[],i=0;i<n;++i)for(var l=t[i],a=l.length,c,d=0;d<a;++d)(c=l[d])&&(s.push(e.call(c,c.__data__,d,l)),o.push(c));return new Ke(s,o)}function hu(e){return function(){return this.matches(e)}}function gu(e){return function(t){return t.matches(e)}}var a2=Array.prototype.find;function c2(e){return function(){return a2.call(this.children,e)}}function u2(){return this.firstElementChild}function d2(e){return this.select(e==null?u2:c2(typeof e=="function"?e:gu(e)))}var x2=Array.prototype.filter;function p2(){return Array.from(this.children)}function m2(e){return function(){return x2.call(this.children,e)}}function f2(e){return this.selectAll(e==null?p2:m2(typeof e=="function"?e:gu(e)))}function h2(e){typeof e!="function"&&(e=hu(e));for(var t=this._groups,n=t.length,s=new Array(n),o=0;o<n;++o)for(var i=t[o],l=i.length,a=s[o]=[],c,d=0;d<l;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&a.push(c);return new Ke(s,this._parents)}function ju(e){return new Array(e.length)}function g2(){return new Ke(this._enter||this._groups.map(ju),this._parents)}function Cs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Cs.prototype={constructor:Cs,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 j2(e){return function(){return e}}function E2(e,t,n,s,o,i){for(var l=0,a,c=t.length,d=i.length;l<d;++l)(a=t[l])?(a.__data__=i[l],s[l]=a):n[l]=new Cs(e,i[l]);for(;l<c;++l)(a=t[l])&&(o[l]=a)}function y2(e,t,n,s,o,i,l){var a,c,d=new Map,x=t.length,p=i.length,m=new Array(x),h;for(a=0;a<x;++a)(c=t[a])&&(m[a]=h=l.call(c,c.__data__,a,t)+"",d.has(h)?o[a]=c:d.set(h,c));for(a=0;a<p;++a)h=l.call(e,i[a],a,i)+"",(c=d.get(h))?(s[a]=c,c.__data__=i[a],d.delete(h)):n[a]=new Cs(e,i[a]);for(a=0;a<x;++a)(c=t[a])&&d.get(m[a])===c&&(o[a]=c)}function S2(e){return e.__data__}function R2(e,t){if(!arguments.length)return Array.from(this,S2);var n=t?y2:E2,s=this._parents,o=this._groups;typeof e!="function"&&(e=j2(e));for(var i=o.length,l=new Array(i),a=new Array(i),c=new Array(i),d=0;d<i;++d){var x=s[d],p=o[d],m=p.length,h=C2(e.call(x,x&&x.__data__,d,s)),g=h.length,E=a[d]=new Array(g),S=l[d]=new Array(g),R=c[d]=new Array(m);n(x,p,E,S,R,h,t);for(var v=0,y=0,C,k;v<g;++v)if(C=E[v]){for(v>=y&&(y=v+1);!(k=S[y])&&++y<g;);C._next=k||null}}return l=new Ke(l,s),l._enter=a,l._exit=c,l}function C2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b2(){return new Ke(this._exit||this._groups.map(ju),this._parents)}function w2(e,t,n){var s=this.enter(),o=this,i=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),s&&o?s.merge(o).order():o}function v2(e){for(var t=e.selection?e.selection():e,n=this._groups,s=t._groups,o=n.length,i=s.length,l=Math.min(o,i),a=new Array(o),c=0;c<l;++c)for(var d=n[c],x=s[c],p=d.length,m=a[c]=new Array(p),h,g=0;g<p;++g)(h=d[g]||x[g])&&(m[g]=h);for(;c<o;++c)a[c]=n[c];return new Ke(a,this._parents)}function k2(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var s=e[t],o=s.length-1,i=s[o],l;--o>=0;)(l=s[o])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function _2(e){e||(e=L2);function t(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var n=this._groups,s=n.length,o=new Array(s),i=0;i<s;++i){for(var l=n[i],a=l.length,c=o[i]=new Array(a),d,x=0;x<a;++x)(d=l[x])&&(c[x]=d);c.sort(t)}return new Ke(o,this._parents).order()}function L2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function T2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function M2(){return Array.from(this)}function N2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],o=0,i=s.length;o<i;++o){var l=s[o];if(l)return l}return null}function P2(){let e=0;for(const t of this)++e;return e}function A2(){return!this.node()}function O2(e){for(var t=this._groups,n=0,s=t.length;n<s;++n)for(var o=t[n],i=0,l=o.length,a;i<l;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function I2(e){return function(){this.removeAttribute(e)}}function D2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B2(e,t){return function(){this.setAttribute(e,t)}}function $2(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function z2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function V2(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 F2(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?D2:I2:typeof t=="function"?n.local?V2:z2:n.local?$2:B2)(n,t))}function Eu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function H2(e){return function(){this.style.removeProperty(e)}}function Z2(e,t,n){return function(){this.style.setProperty(e,t,n)}}function K2(e,t,n){return function(){var s=t.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,n)}}function Y2(e,t,n){return arguments.length>1?this.each((t==null?H2:typeof t=="function"?K2:Z2)(e,t,n??"")):Jt(this.node(),e)}function Jt(e,t){return e.style.getPropertyValue(t)||Eu(e).getComputedStyle(e,null).getPropertyValue(t)}function G2(e){return function(){delete this[e]}}function U2(e,t){return function(){this[e]=t}}function W2(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function X2(e,t){return arguments.length>1?this.each((t==null?G2:typeof t=="function"?W2:U2)(e,t)):this.node()[e]}function yu(e){return e.trim().split(/^|\s+/)}function Gr(e){return e.classList||new Su(e)}function Su(e){this._node=e,this._names=yu(e.getAttribute("class")||"")}Su.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 Ru(e,t){for(var n=Gr(e),s=-1,o=t.length;++s<o;)n.add(t[s])}function Cu(e,t){for(var n=Gr(e),s=-1,o=t.length;++s<o;)n.remove(t[s])}function q2(e){return function(){Ru(this,e)}}function Q2(e){return function(){Cu(this,e)}}function J2(e,t){return function(){(t.apply(this,arguments)?Ru:Cu)(this,e)}}function eE(e,t){var n=yu(e+"");if(arguments.length<2){for(var s=Gr(this.node()),o=-1,i=n.length;++o<i;)if(!s.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?J2:t?q2:Q2)(n,t))}function tE(){this.textContent=""}function nE(e){return function(){this.textContent=e}}function sE(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function oE(e){return arguments.length?this.each(e==null?tE:(typeof e=="function"?sE:nE)(e)):this.node().textContent}function rE(){this.innerHTML=""}function iE(e){return function(){this.innerHTML=e}}function lE(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function aE(e){return arguments.length?this.each(e==null?rE:(typeof e=="function"?lE:iE)(e)):this.node().innerHTML}function cE(){this.nextSibling&&this.parentNode.appendChild(this)}function uE(){return this.each(cE)}function dE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xE(){return this.each(dE)}function pE(e){var t=typeof e=="function"?e:mu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function mE(){return null}function fE(e,t){var n=typeof e=="function"?e:mu(e),s=t==null?mE:typeof t=="function"?t:Yr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),s.apply(this,arguments)||null)})}function hE(){var e=this.parentNode;e&&e.removeChild(this)}function gE(){return this.each(hE)}function jE(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function EE(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yE(e){return this.select(e?EE:jE)}function SE(e){return arguments.length?this.property("__data__",e):this.node().__data__}function RE(e){return function(t){e.call(this,t,this.__data__)}}function CE(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 bE(e){return function(){var t=this.__on;if(t){for(var n=0,s=-1,o=t.length,i;n<o;++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 wE(e,t,n){return function(){var s=this.__on,o,i=RE(t);if(s){for(var l=0,a=s.length;l<a;++l)if((o=s[l]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},s?s.push(o):this.__on=[o]}}function vE(e,t,n){var s=CE(e+""),o,i=s.length,l;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,d=a.length,x;c<d;++c)for(o=0,x=a[c];o<i;++o)if((l=s[o]).type===x.type&&l.name===x.name)return x.value}return}for(a=t?wE:bE,o=0;o<i;++o)this.each(a(s[o],t,n));return this}function bu(e,t,n){var s=Eu(e),o=s.CustomEvent;typeof o=="function"?o=new o(t,n):(o=s.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function kE(e,t){return function(){return bu(this,e,t)}}function _E(e,t){return function(){return bu(this,e,t.apply(this,arguments))}}function LE(e,t){return this.each((typeof t=="function"?_E:kE)(e,t))}function*TE(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],o=0,i=s.length,l;o<i;++o)(l=s[o])&&(yield l)}var wu=[null];function Ke(e,t){this._groups=e,this._parents=t}function $n(){return new Ke([[document.documentElement]],wu)}function ME(){return this}Ke.prototype=$n.prototype={constructor:Ke,select:s2,selectAll:l2,selectChild:d2,selectChildren:f2,filter:h2,data:R2,enter:g2,exit:b2,join:w2,merge:v2,selection:ME,order:k2,sort:_2,call:T2,nodes:M2,node:N2,size:P2,empty:A2,each:O2,attr:F2,style:Y2,property:X2,classed:eE,text:oE,html:aE,raise:uE,lower:xE,append:pE,insert:fE,remove:gE,clone:yE,datum:SE,on:vE,dispatch:LE,[Symbol.iterator]:TE};function He(e){return typeof e=="string"?new Ke([[document.querySelector(e)]],[document.documentElement]):new Ke([[e]],wu)}function NE(e){let t;for(;t=e.sourceEvent;)e=t;return e}function We(e,t){if(e=NE(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 o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const PE={passive:!1},kn={capture:!0,passive:!1};function jo(e){e.stopImmediatePropagation()}function Xt(e){e.preventDefault(),e.stopImmediatePropagation()}function vu(e){var t=e.document.documentElement,n=He(e).on("dragstart.drag",Xt,kn);"onselectstart"in t?n.on("selectstart.drag",Xt,kn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ku(e,t){var n=e.document.documentElement,s=He(e).on("dragstart.drag",null);t&&(s.on("click.drag",Xt,kn),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 Ko(e,{sourceEvent:t,subject:n,target:s,identifier:o,active:i,x:l,y:a,dx:c,dy:d,dispatch:x}){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:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:x}})}Ko.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function AE(e){return!e.ctrlKey&&!e.button}function OE(){return this.parentNode}function IE(e,t){return t??{x:e.x,y:e.y}}function DE(){return navigator.maxTouchPoints||"ontouchstart"in this}function _u(){var e=AE,t=OE,n=IE,s=DE,o={},i=Vs("start","drag","end"),l=0,a,c,d,x,p=0;function m(C){C.on("mousedown.drag",h).filter(s).on("touchstart.drag",S).on("touchmove.drag",R,PE).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(C,k){if(!(x||!e.call(this,C,k))){var T=y(this,t.call(this,C,k),C,k,"mouse");T&&(He(C.view).on("mousemove.drag",g,kn).on("mouseup.drag",E,kn),vu(C.view),jo(C),d=!1,a=C.clientX,c=C.clientY,T("start",C))}}function g(C){if(Xt(C),!d){var k=C.clientX-a,T=C.clientY-c;d=k*k+T*T>p}o.mouse("drag",C)}function E(C){He(C.view).on("mousemove.drag mouseup.drag",null),ku(C.view,d),Xt(C),o.mouse("end",C)}function S(C,k){if(e.call(this,C,k)){var T=C.changedTouches,P=t.call(this,C,k),I=T.length,B,F;for(B=0;B<I;++B)(F=y(this,P,C,k,T[B].identifier,T[B]))&&(jo(C),F("start",C,T[B]))}}function R(C){var k=C.changedTouches,T=k.length,P,I;for(P=0;P<T;++P)(I=o[k[P].identifier])&&(Xt(C),I("drag",C,k[P]))}function v(C){var k=C.changedTouches,T=k.length,P,I;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),P=0;P<T;++P)(I=o[k[P].identifier])&&(jo(C),I("end",C,k[P]))}function y(C,k,T,P,I,B){var F=i.copy(),$=We(B||T,k),D,z,b;if((b=n.call(C,new Ko("beforestart",{sourceEvent:T,target:m,identifier:I,active:l,x:$[0],y:$[1],dx:0,dy:0,dispatch:F}),P))!=null)return D=b.x-$[0]||0,z=b.y-$[1]||0,function N(_,M,V){var H=$,K;switch(_){case"start":o[I]=N,K=l++;break;case"end":delete o[I],--l;case"drag":$=We(V||M,k),K=l;break}F.call(_,C,new Ko(_,{sourceEvent:M,subject:b,target:m,identifier:I,active:K,x:$[0]+D,y:$[1]+z,dx:$[0]-H[0],dy:$[1]-H[1],dispatch:F}),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 en=0,jn=0,mn=0,Lu=1e3,bs,En,ws=0,Nt=0,Hs=0,_n=typeof performance=="object"&&performance.now?performance:Date,Tu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ur(){return Nt||(Tu(BE),Nt=_n.now()+Hs)}function BE(){Nt=0}function vs(){this._call=this._time=this._next=null}vs.prototype=Mu.prototype={constructor:vs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ur():+n)+(t==null?0:+t),!this._next&&En!==this&&(En?En._next=this:bs=this,En=this),this._call=e,this._time=n,Yo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Yo())}};function Mu(e,t,n){var s=new vs;return s.restart(e,t,n),s}function $E(){Ur(),++en;for(var e=bs,t;e;)(t=Nt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--en}function Ui(){Nt=(ws=_n.now())+Hs,en=jn=0;try{$E()}finally{en=0,VE(),Nt=0}}function zE(){var e=_n.now(),t=e-ws;t>Lu&&(Hs-=t,ws=e)}function VE(){for(var e,t=bs,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:bs=n);En=e,Yo(s)}function Yo(e){if(!en){jn&&(jn=clearTimeout(jn));var t=e-Nt;t>24?(e<1/0&&(jn=setTimeout(Ui,e-_n.now()-Hs)),mn&&(mn=clearInterval(mn))):(mn||(ws=_n.now(),mn=setInterval(zE,Lu)),en=1,Tu(Ui))}}function Wi(e,t,n){var s=new vs;return t=t==null?0:+t,s.restart(o=>{s.stop(),e(o+t)},t,n),s}var FE=Vs("start","end","cancel","interrupt"),HE=[],Nu=0,Xi=1,Go=2,cs=3,qi=4,Uo=5,us=6;function Zs(e,t,n,s,o,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;ZE(e,n,{name:t,index:s,group:o,on:FE,tween:HE,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Nu})}function Wr(e,t){var n=Je(e,t);if(n.state>Nu)throw new Error("too late; already scheduled");return n}function st(e,t){var n=Je(e,t);if(n.state>cs)throw new Error("too late; already running");return n}function Je(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ZE(e,t,n){var s=e.__transition,o;s[t]=n,n.timer=Mu(i,0,n.time);function i(d){n.state=Xi,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var x,p,m,h;if(n.state!==Xi)return c();for(x in s)if(h=s[x],h.name===n.name){if(h.state===cs)return Wi(l);h.state===qi?(h.state=us,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete s[x]):+x<t&&(h.state=us,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete s[x])}if(Wi(function(){n.state===cs&&(n.state=qi,n.timer.restart(a,n.delay,n.time),a(d))}),n.state=Go,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Go){for(n.state=cs,o=new Array(m=n.tween.length),x=0,p=-1;x<m;++x)(h=n.tween[x].value.call(e,e.__data__,n.index,n.group))&&(o[++p]=h);o.length=p+1}}function a(d){for(var x=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(c),n.state=Uo,1),p=-1,m=o.length;++p<m;)o[p].call(e,x);n.state===Uo&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=us,n.timer.stop(),delete s[t];for(var d in s)return;delete e.__transition}}function ds(e,t){var n=e.__transition,s,o,i=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((s=n[l]).name!==t){i=!1;continue}o=s.state>Go&&s.state<Uo,s.state=us,s.timer.stop(),s.on.call(o?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete n[l]}i&&delete e.__transition}}function KE(e){return this.each(function(){ds(this,e)})}function YE(e,t){var n,s;return function(){var o=st(this,e),i=o.tween;if(i!==n){s=n=i;for(var l=0,a=s.length;l<a;++l)if(s[l].name===t){s=s.slice(),s.splice(l,1);break}}o.tween=s}}function GE(e,t,n){var s,o;if(typeof n!="function")throw new Error;return function(){var i=st(this,e),l=i.tween;if(l!==s){o=(s=l).slice();for(var a={name:t,value:n},c=0,d=o.length;c<d;++c)if(o[c].name===t){o[c]=a;break}c===d&&o.push(a)}i.tween=o}}function UE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s=Je(this.node(),n).tween,o=0,i=s.length,l;o<i;++o)if((l=s[o]).name===e)return l.value;return null}return this.each((t==null?YE:GE)(n,e,t))}function Xr(e,t,n){var s=e._id;return e.each(function(){var o=st(this,s);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Je(o,s).value[t]}}function Pu(e,t){var n;return(typeof t=="number"?O.interpolateNumber:t instanceof O.color?O.interpolateRgb:(n=O.color(t))?(t=n,O.interpolateRgb):O.interpolateString)(e,t)}function WE(e){return function(){this.removeAttribute(e)}}function XE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qE(e,t,n){var s,o=n+"",i;return function(){var l=this.getAttribute(e);return l===o?null:l===s?i:i=t(s=l,n)}}function QE(e,t,n){var s,o=n+"",i;return function(){var l=this.getAttributeNS(e.space,e.local);return l===o?null:l===s?i:i=t(s=l,n)}}function JE(e,t,n){var s,o,i;return function(){var l,a=n(this),c;return a==null?void this.removeAttribute(e):(l=this.getAttribute(e),c=a+"",l===c?null:l===s&&c===o?i:(o=c,i=t(s=l,a)))}}function e3(e,t,n){var s,o,i;return function(){var l,a=n(this),c;return a==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),c=a+"",l===c?null:l===s&&c===o?i:(o=c,i=t(s=l,a)))}}function t3(e,t){var n=Fs(e),s=n==="transform"?Sh:Pu;return this.attrTween(e,typeof t=="function"?(n.local?e3:JE)(n,s,Xr(this,"attr."+e,t)):t==null?(n.local?XE:WE)(n):(n.local?QE:qE)(n,s,t))}function n3(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function s3(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function o3(e,t){var n,s;function o(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&s3(e,i)),n}return o._value=t,o}function r3(e,t){var n,s;function o(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&n3(e,i)),n}return o._value=t,o}function i3(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?o3:r3)(s,t))}function l3(e,t){return function(){Wr(this,e).delay=+t.apply(this,arguments)}}function a3(e,t){return t=+t,function(){Wr(this,e).delay=t}}function c3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?l3:a3)(t,e)):Je(this.node(),t).delay}function u3(e,t){return function(){st(this,e).duration=+t.apply(this,arguments)}}function d3(e,t){return t=+t,function(){st(this,e).duration=t}}function x3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?u3:d3)(t,e)):Je(this.node(),t).duration}function p3(e,t){if(typeof t!="function")throw new Error;return function(){st(this,e).ease=t}}function m3(e){var t=this._id;return arguments.length?this.each(p3(t,e)):Je(this.node(),t).ease}function f3(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;st(this,e).ease=n}}function h3(e){if(typeof e!="function")throw new Error;return this.each(f3(this._id,e))}function g3(e){typeof e!="function"&&(e=hu(e));for(var t=this._groups,n=t.length,s=new Array(n),o=0;o<n;++o)for(var i=t[o],l=i.length,a=s[o]=[],c,d=0;d<l;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&a.push(c);return new at(s,this._parents,this._name,this._id)}function j3(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,s=t.length,o=n.length,i=Math.min(s,o),l=new Array(s),a=0;a<i;++a)for(var c=t[a],d=n[a],x=c.length,p=l[a]=new Array(x),m,h=0;h<x;++h)(m=c[h]||d[h])&&(p[h]=m);for(;a<s;++a)l[a]=t[a];return new at(l,this._parents,this._name,this._id)}function E3(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 y3(e,t,n){var s,o,i=E3(t)?Wr:st;return function(){var l=i(this,e),a=l.on;a!==s&&(o=(s=a).copy()).on(t,n),l.on=o}}function S3(e,t){var n=this._id;return arguments.length<2?Je(this.node(),n).on.on(e):this.each(y3(n,e,t))}function R3(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function C3(){return this.on("end.remove",R3(this._id))}function b3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Yr(e));for(var s=this._groups,o=s.length,i=new Array(o),l=0;l<o;++l)for(var a=s[l],c=a.length,d=i[l]=new Array(c),x,p,m=0;m<c;++m)(x=a[m])&&(p=e.call(x,x.__data__,m,a))&&("__data__"in x&&(p.__data__=x.__data__),d[m]=p,Zs(d[m],t,n,m,d,Je(x,n)));return new at(i,this._parents,t,n)}function w3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=fu(e));for(var s=this._groups,o=s.length,i=[],l=[],a=0;a<o;++a)for(var c=s[a],d=c.length,x,p=0;p<d;++p)if(x=c[p]){for(var m=e.call(x,x.__data__,p,c),h,g=Je(x,n),E=0,S=m.length;E<S;++E)(h=m[E])&&Zs(h,t,n,E,m,g);i.push(m),l.push(x)}return new at(i,l,t,n)}var v3=$n.prototype.constructor;function k3(){return new v3(this._groups,this._parents)}function _3(e,t){var n,s,o;return function(){var i=Jt(this,e),l=(this.style.removeProperty(e),Jt(this,e));return i===l?null:i===n&&l===s?o:o=t(n=i,s=l)}}function Au(e){return function(){this.style.removeProperty(e)}}function L3(e,t,n){var s,o=n+"",i;return function(){var l=Jt(this,e);return l===o?null:l===s?i:i=t(s=l,n)}}function T3(e,t,n){var s,o,i;return function(){var l=Jt(this,e),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(e),Jt(this,e))),l===c?null:l===s&&c===o?i:(o=c,i=t(s=l,a))}}function M3(e,t){var n,s,o,i="style."+t,l="end."+i,a;return function(){var c=st(this,e),d=c.on,x=c.value[i]==null?a||(a=Au(t)):void 0;(d!==n||o!==x)&&(s=(n=d).copy()).on(l,o=x),c.on=s}}function N3(e,t,n){var s=(e+="")=="transform"?yh:Pu;return t==null?this.styleTween(e,_3(e,s)).on("end.style."+e,Au(e)):typeof t=="function"?this.styleTween(e,T3(e,s,Xr(this,"style."+e,t))).each(M3(this._id,e)):this.styleTween(e,L3(e,s,t),n).on("end.style."+e,null)}function P3(e,t,n){return function(s){this.style.setProperty(e,t.call(this,s),n)}}function A3(e,t,n){var s,o;function i(){var l=t.apply(this,arguments);return l!==o&&(s=(o=l)&&P3(e,l,n)),s}return i._value=t,i}function O3(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,A3(e,t,n??""))}function I3(e){return function(){this.textContent=e}}function D3(e){return function(){var t=e(this);this.textContent=t??""}}function B3(e){return this.tween("text",typeof e=="function"?D3(Xr(this,"text",e)):I3(e==null?"":e+""))}function $3(e){return function(t){this.textContent=e.call(this,t)}}function z3(e){var t,n;function s(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&$3(o)),t}return s._value=e,s}function V3(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,z3(e))}function F3(){for(var e=this._name,t=this._id,n=Ou(),s=this._groups,o=s.length,i=0;i<o;++i)for(var l=s[i],a=l.length,c,d=0;d<a;++d)if(c=l[d]){var x=Je(c,t);Zs(c,e,n,d,l,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new at(s,this._parents,e,n)}function H3(){var e,t,n=this,s=n._id,o=n.size();return new Promise(function(i,l){var a={value:l},c={value:function(){--o===0&&i()}};n.each(function(){var d=st(this,s),x=d.on;x!==e&&(t=(e=x).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),d.on=t}),o===0&&i()})}var Z3=0;function at(e,t,n,s){this._groups=e,this._parents=t,this._name=n,this._id=s}function Ou(){return++Z3}var ot=$n.prototype;at.prototype={constructor:at,select:b3,selectAll:w3,selectChild:ot.selectChild,selectChildren:ot.selectChildren,filter:g3,merge:j3,selection:k3,transition:F3,call:ot.call,nodes:ot.nodes,node:ot.node,size:ot.size,empty:ot.empty,each:ot.each,on:S3,attr:t3,attrTween:i3,style:N3,styleTween:O3,text:B3,textTween:V3,remove:C3,tween:UE,delay:c3,duration:x3,ease:m3,easeVarying:h3,end:H3,[Symbol.iterator]:ot[Symbol.iterator]};function K3(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Y3={time:null,delay:0,duration:250,ease:K3};function G3(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 U3(e){var t,n;e instanceof at?(t=e._id,e=e._name):(t=Ou(),(n=Y3).time=Ur(),e=e==null?null:e+"");for(var s=this._groups,o=s.length,i=0;i<o;++i)for(var l=s[i],a=l.length,c,d=0;d<a;++d)(c=l[d])&&Zs(c,e,t,d,l,n||G3(c,t));return new at(s,this._parents,e,t)}$n.prototype.interrupt=KE;$n.prototype.transition=U3;const Qn=e=>()=>e;function W3(e,{sourceEvent:t,target:n,transform:s,dispatch:o}){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:o}})}function it(e,t,n){this.k=e,this.x=t,this.y=n}it.prototype={constructor:it,scale:function(e){return e===1?this:new it(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new it(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 Ks=new it(1,0,0);Iu.prototype=it.prototype;function Iu(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ks;return e.__zoom}function Eo(e){e.stopImmediatePropagation()}function fn(e){e.preventDefault(),e.stopImmediatePropagation()}function X3(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function q3(){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 Qi(){return this.__zoom||Ks}function Q3(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function J3(){return navigator.maxTouchPoints||"ontouchstart"in this}function ey(e,t,n){var s=e.invertX(t[0][0])-n[0][0],o=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(o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function Du(){var e=X3,t=q3,n=ey,s=Q3,o=J3,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],a=250,c=ls,d=Vs("start","zoom","end"),x,p,m,h=500,g=150,E=0,S=10;function R(b){b.property("__zoom",Qi).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",F).filter(o).on("touchstart.zoom",$).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}R.transform=function(b,N,_,M){var V=b.selection?b.selection():b;V.property("__zoom",Qi),b!==V?k(b,N,_,M):V.interrupt().each(function(){T(this,arguments).event(M).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},R.scaleBy=function(b,N,_,M){R.scaleTo(b,function(){var V=this.__zoom.k,H=typeof N=="function"?N.apply(this,arguments):N;return V*H},_,M)},R.scaleTo=function(b,N,_,M){R.transform(b,function(){var V=t.apply(this,arguments),H=this.__zoom,K=_==null?C(V):typeof _=="function"?_.apply(this,arguments):_,Z=H.invert(K),G=typeof N=="function"?N.apply(this,arguments):N;return n(y(v(H,G),K,Z),V,l)},_,M)},R.translateBy=function(b,N,_,M){R.transform(b,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof _=="function"?_.apply(this,arguments):_),t.apply(this,arguments),l)},null,M)},R.translateTo=function(b,N,_,M,V){R.transform(b,function(){var H=t.apply(this,arguments),K=this.__zoom,Z=M==null?C(H):typeof M=="function"?M.apply(this,arguments):M;return n(Ks.translate(Z[0],Z[1]).scale(K.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof _=="function"?-_.apply(this,arguments):-_),H,l)},M,V)};function v(b,N){return N=Math.max(i[0],Math.min(i[1],N)),N===b.k?b:new it(N,b.x,b.y)}function y(b,N,_){var M=N[0]-_[0]*b.k,V=N[1]-_[1]*b.k;return M===b.x&&V===b.y?b:new it(b.k,M,V)}function C(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function k(b,N,_,M){b.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 V=this,H=arguments,K=T(V,H).event(M),Z=t.apply(V,H),G=_==null?C(Z):typeof _=="function"?_.apply(V,H):_,Q=Math.max(Z[1][0]-Z[0][0],Z[1][1]-Z[0][1]),ee=V.__zoom,ae=typeof N=="function"?N.apply(V,H):N,re=c(ee.invert(G).concat(Q/ee.k),ae.invert(G).concat(Q/ae.k));return function(se){if(se===1)se=ae;else{var te=re(se),le=Q/te[2];se=new it(le,G[0]-te[0]*le,G[1]-te[1]*le)}K.zoom(null,se)}})}function T(b,N,_){return!_&&b.__zooming||new P(b,N)}function P(b,N){this.that=b,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,N),this.taps=0}P.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,N){return this.mouse&&b!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var N=He(this.that).datum();d.call(b,this.that,new W3(b,{sourceEvent:this.sourceEvent,target:R,transform:this.that.__zoom,dispatch:d}),N)}};function I(b,...N){if(!e.apply(this,arguments))return;var _=T(this,N).event(b),M=this.__zoom,V=Math.max(i[0],Math.min(i[1],M.k*Math.pow(2,s.apply(this,arguments)))),H=We(b);if(_.wheel)(_.mouse[0][0]!==H[0]||_.mouse[0][1]!==H[1])&&(_.mouse[1]=M.invert(_.mouse[0]=H)),clearTimeout(_.wheel);else{if(M.k===V)return;_.mouse=[H,M.invert(H)],ds(this),_.start()}fn(b),_.wheel=setTimeout(K,g),_.zoom("mouse",n(y(v(M,V),_.mouse[0],_.mouse[1]),_.extent,l));function K(){_.wheel=null,_.end()}}function B(b,...N){if(m||!e.apply(this,arguments))return;var _=b.currentTarget,M=T(this,N,!0).event(b),V=He(b.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",Q,!0),H=We(b,_),K=b.clientX,Z=b.clientY;vu(b.view),Eo(b),M.mouse=[H,this.__zoom.invert(H)],ds(this),M.start();function G(ee){if(fn(ee),!M.moved){var ae=ee.clientX-K,re=ee.clientY-Z;M.moved=ae*ae+re*re>E}M.event(ee).zoom("mouse",n(y(M.that.__zoom,M.mouse[0]=We(ee,_),M.mouse[1]),M.extent,l))}function Q(ee){V.on("mousemove.zoom mouseup.zoom",null),ku(ee.view,M.moved),fn(ee),M.event(ee).end()}}function F(b,...N){if(e.apply(this,arguments)){var _=this.__zoom,M=We(b.changedTouches?b.changedTouches[0]:b,this),V=_.invert(M),H=_.k*(b.shiftKey?.5:2),K=n(y(v(_,H),M,V),t.apply(this,N),l);fn(b),a>0?He(this).transition().duration(a).call(k,K,M,b):He(this).call(R.transform,K,M,b)}}function $(b,...N){if(e.apply(this,arguments)){var _=b.touches,M=_.length,V=T(this,N,b.changedTouches.length===M).event(b),H,K,Z,G;for(Eo(b),K=0;K<M;++K)Z=_[K],G=We(Z,this),G=[G,this.__zoom.invert(G),Z.identifier],V.touch0?!V.touch1&&V.touch0[2]!==G[2]&&(V.touch1=G,V.taps=0):(V.touch0=G,H=!0,V.taps=1+!!x);x&&(x=clearTimeout(x)),H&&(V.taps<2&&(p=G[0],x=setTimeout(function(){x=null},h)),ds(this),V.start())}}function D(b,...N){if(this.__zooming){var _=T(this,N).event(b),M=b.changedTouches,V=M.length,H,K,Z,G;for(fn(b),H=0;H<V;++H)K=M[H],Z=We(K,this),_.touch0&&_.touch0[2]===K.identifier?_.touch0[0]=Z:_.touch1&&_.touch1[2]===K.identifier&&(_.touch1[0]=Z);if(K=_.that.__zoom,_.touch1){var Q=_.touch0[0],ee=_.touch0[1],ae=_.touch1[0],re=_.touch1[1],se=(se=ae[0]-Q[0])*se+(se=ae[1]-Q[1])*se,te=(te=re[0]-ee[0])*te+(te=re[1]-ee[1])*te;K=v(K,Math.sqrt(se/te)),Z=[(Q[0]+ae[0])/2,(Q[1]+ae[1])/2],G=[(ee[0]+re[0])/2,(ee[1]+re[1])/2]}else if(_.touch0)Z=_.touch0[0],G=_.touch0[1];else return;_.zoom("touch",n(y(K,Z,G),_.extent,l))}}function z(b,...N){if(this.__zooming){var _=T(this,N).event(b),M=b.changedTouches,V=M.length,H,K;for(Eo(b),m&&clearTimeout(m),m=setTimeout(function(){m=null},h),H=0;H<V;++H)K=M[H],_.touch0&&_.touch0[2]===K.identifier?delete _.touch0:_.touch1&&_.touch1[2]===K.identifier&&delete _.touch1;if(_.touch1&&!_.touch0&&(_.touch0=_.touch1,delete _.touch1),_.touch0)_.touch0[1]=this.__zoom.invert(_.touch0[0]);else if(_.end(),_.taps===2&&(K=We(K,this),Math.hypot(p[0]-K[0],p[1]-K[1])<S)){var Z=He(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return R.wheelDelta=function(b){return arguments.length?(s=typeof b=="function"?b:Qn(+b),R):s},R.filter=function(b){return arguments.length?(e=typeof b=="function"?b:Qn(!!b),R):e},R.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:Qn(!!b),R):o},R.extent=function(b){return arguments.length?(t=typeof b=="function"?b:Qn([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),R):t},R.scaleExtent=function(b){return arguments.length?(i[0]=+b[0],i[1]=+b[1],R):[i[0],i[1]]},R.translateExtent=function(b){return arguments.length?(l[0][0]=+b[0][0],l[1][0]=+b[1][0],l[0][1]=+b[0][1],l[1][1]=+b[1][1],R):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},R.constrain=function(b){return arguments.length?(n=b,R):n},R.duration=function(b){return arguments.length?(a=+b,R):a},R.interpolate=function(b){return arguments.length?(c=b,R):c},R.on=function(){var b=d.on.apply(d,arguments);return b===d?R:b},R.clickDistance=function(b){return arguments.length?(E=(b=+b)*b,R):Math.sqrt(E)},R.tapDistance=function(b){return arguments.length?(S=+b,R):S},R}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."},Ln=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Bu=["Enter"," ","Escape"],$u={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Pt;(function(e){e.Strict="strict",e.Loose="loose"})(Pt||(Pt={}));var wt;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(wt||(wt={}));var tn;(function(e){e.Partial="partial",e.Full="full"})(tn||(tn={}));const zu={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var ft;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ft||(ft={}));var ks;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ks||(ks={}));var J;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(J||(J={}));const Ji={[J.Left]:J.Right,[J.Right]:J.Left,[J.Top]:J.Bottom,[J.Bottom]:J.Top};function Vu(e){return e===null?null:e?"valid":"invalid"}const Fu=e=>"id"in e&&"source"in e&&"target"in e,ty=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),qr=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zn=(e,t=[0,0])=>{const{width:n,height:s}=dt(e),o=e.origin??t,i=n*o[0],l=s*o[1];return{x:e.position.x-i,y:e.position.y-l}},ny=(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,o)=>{const i=typeof o=="string";let l=!t.nodeLookup&&!i?o:void 0;t.nodeLookup&&(l=i?t.nodeLookup.get(o):qr(o)?o:t.nodeLookup.get(o.id));const a=l?_s(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ys(s,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Gs(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 o=_s(s);n=Ys(n,o)}}),Gs(n)},Qr=(e,t,[n,s,o]=[0,0,1],i=!1,l=!1)=>{const a={...Fn(t,[n,s,o]),width:t.width/o,height:t.height/o},c=[];for(const d of e.values()){const{measured:x,selectable:p=!0,hidden:m=!1}=d;if(l&&!p||m)continue;const h=x.width??d.width??d.initialWidth??null,g=x.height??d.height??d.initialHeight??null,E=Tn(a,sn(d)),S=(h??0)*(g??0),R=i&&E>0;(!d.internals.handleBounds||R||E>=S||d.dragging)&&c.push(d)}return c},sy=(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 oy(e,t){const n=new Map,s=t?.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&(t?.includeHiddenNodes||!o.hidden)&&(!s||s.has(o.id))&&n.set(o.id,o)}),n}async function ry({nodes:e,width:t,height:n,panZoom:s,minZoom:o,maxZoom:i},l){if(e.size===0)return Promise.resolve(!0);const a=oy(e,l),c=Vn(a),d=Jr(c,t,n,l?.minZoom??o,l?.maxZoom??i,l?.padding??.1);return await s.setViewport(d,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function Hu({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:s=[0,0],nodeExtent:o,onError:i}){const l=n.get(e),a=l.parentId?n.get(l.parentId):void 0,{x:c,y:d}=a?a.internals.positionAbsolute:{x:0,y:0},x=l.origin??s;let p=o;if(l.extent==="parent"&&!l.expandParent)if(!a)i?.("005",Oe.error005());else{const h=a.measured.width,g=a.measured.height;h&&g&&(p=[[c,d],[c+h,d+g]])}else a&&on(l.extent)&&(p=[[l.extent[0][0]+c,l.extent[0][1]+d],[l.extent[1][0]+c,l.extent[1][1]+d]]);const m=on(p)?At(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&i?.("015",Oe.error015()),{position:{x:m.x-c+(l.measured.width??0)*x[0],y:m.y-d+(l.measured.height??0)*x[1]},positionAbsolute:m}}async function iy({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:s,onBeforeDelete:o}){const i=new Set(e.map(m=>m.id)),l=[];for(const m of n){if(m.deletable===!1)continue;const h=i.has(m.id),g=!h&&m.parentId&&l.find(E=>E.id===m.parentId);(h||g)&&l.push(m)}const a=new Set(t.map(m=>m.id)),c=s.filter(m=>m.deletable!==!1),x=sy(l,c);for(const m of c)a.has(m.id)&&!x.find(g=>g.id===m.id)&&x.push(m);if(!o)return{edges:x,nodes:l};const p=await o({nodes:l,edges:x});return typeof p=="boolean"?p?{edges:x,nodes:l}:{edges:[],nodes:[]}:p}const nn=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),At=(e={x:0,y:0},t,n)=>({x:nn(e.x,t[0][0],t[1][0]-(n?.width??0)),y:nn(e.y,t[0][1],t[1][1]-(n?.height??0))});function Zu(e,t,n){const{width:s,height:o}=dt(n),{x:i,y:l}=n.internals.positionAbsolute;return At(e,[[i,l],[i+s,l+o]],t)}const el=(e,t,n)=>e<t?nn(Math.abs(e-t),1,t)/t:e>n?-nn(Math.abs(e-n),1,t)/t:0,Ku=(e,t,n=15,s=40)=>{const o=el(e.x,s,t.width-s)*n,i=el(e.y,s,t.height-s)*n;return[o,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)}),Wo=({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}),sn=(e,t=[0,0])=>{const{x:n,y:s}=qr(e)?e.internals.positionAbsolute:zn(e,t);return{x:n,y:s,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},_s=(e,t=[0,0])=>{const{x:n,y:s}=qr(e)?e.internals.positionAbsolute:zn(e,t);return{x:n,y:s,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:s+(e.measured?.height??e.height??e.initialHeight??0)}},Yu=(e,t)=>Gs(Ys(Wo(e),Wo(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)},tl=e=>Xe(e.width)&&Xe(e.height)&&Xe(e.x)&&Xe(e.y),Xe=e=>!isNaN(e)&&isFinite(e),Ls=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},Us=(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,o],i=!1,l=[1,1])=>{const a={x:(e-n)/o,y:(t-s)/o};return i?Us(a,l):a},Ts=({x:e,y:t},[n,s,o])=>({x:e*o+n,y:t*o+s});function Kt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);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 ly(e,t,n){if(typeof e=="string"||typeof e=="number"){const s=Kt(e,n),o=Kt(e,t);return{top:s,right:o,bottom:s,left:o,x:o*2,y:s*2}}if(typeof e=="object"){const s=Kt(e.top??e.y??0,n),o=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:o,left:i,x:i+l,y:s+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function ay(e,t,n,s,o,i){const{x:l,y:a}=Ts(e,[t,n,s]),{x:c,y:d}=Ts({x:e.x+e.width,y:e.y+e.height},[t,n,s]),x=o-c,p=i-d;return{left:Math.floor(l),top:Math.floor(a),right:Math.floor(x),bottom:Math.floor(p)}}const Jr=(e,t,n,s,o,i)=>{const l=ly(i,t,n),a=(t-l.x)/e.width,c=(n-l.y)/e.height,d=Math.min(a,c),x=nn(d,s,o),p=e.x+e.width/2,m=e.y+e.height/2,h=t/2-p*x,g=n/2-m*x,E=ay(e,h,g,x,t,n),S={left:Math.min(E.left-l.left,0),top:Math.min(E.top-l.top,0),right:Math.min(E.right-l.right,0),bottom:Math.min(E.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:g-S.top+S.bottom,zoom:x}},Ms=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function on(e){return e!==void 0&&e!=="parent"}function dt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Gu(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Uu(e,t={width:0,height:0},n,s,o){const i={...e},l=s.get(n);if(l){const a=l.origin||o;i.x+=l.internals.positionAbsolute.x-(t.width??0)*a[0],i.y+=l.internals.positionAbsolute.y-(t.height??0)*a[1]}return i}function nl(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function cy(){let e,t;return{promise:new Promise((s,o)=>{e=s,t=o}),resolve:e,reject:t}}function uy(e){return{...$u,...e||{}}}function Rn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:s,containerBounds:o}){const{x:i,y:l}=tt(e),a=Fn({x:i-(o?.left??0),y:l-(o?.top??0)},s),{x:c,y:d}=n?Us(a,t):a;return{xSnapped:c,ySnapped:d,...a}}const ei=e=>({width:e.offsetWidth,height:e.offsetHeight}),Wu=e=>e?.getRootNode?.()||window?.document,dy=["INPUT","SELECT","TEXTAREA"];function Xu(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:dy.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const qu=e=>"clientX"in e,tt=(e,t)=>{const n=qu(e),s=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:s-(t?.left??0),y:o-(t?.top??0)}},sl=(e,t,n,s,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(l=>{const a=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:o,position:l.getAttribute("data-handlepos"),x:(a.left-n.left)/s,y:(a.top-n.top)/s,...ei(l)}})};function Qu({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:o,sourceControlY:i,targetControlX:l,targetControlY:a}){const c=e*.125+o*.375+l*.375+n*.125,d=t*.125+i*.375+a*.375+s*.125,x=Math.abs(c-e),p=Math.abs(d-t);return[c,d,x,p]}function Jn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ol({pos:e,x1:t,y1:n,x2:s,y2:o,c:i}){switch(e){case J.Left:return[t-Jn(t-s,i),n];case J.Right:return[t+Jn(s-t,i),n];case J.Top:return[t,n-Jn(n-o,i)];case J.Bottom:return[t,n+Jn(o-n,i)]}}function Ju({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:s,targetY:o,targetPosition:i=J.Top,curvature:l=.25}){const[a,c]=ol({pos:n,x1:e,y1:t,x2:s,y2:o,c:l}),[d,x]=ol({pos:i,x1:s,y1:o,x2:e,y2:t,c:l}),[p,m,h,g]=Qu({sourceX:e,sourceY:t,targetX:s,targetY:o,sourceControlX:a,sourceControlY:c,targetControlX:d,targetControlY:x});return[`M${e},${t} C${a},${c} ${d},${x} ${s},${o}`,p,m,h,g]}function ed({sourceX:e,sourceY:t,targetX:n,targetY:s}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,l=Math.abs(s-t)/2,a=s<t?s+l:s-l;return[i,a,o,l]}function xy({sourceNode:e,targetNode:t,selected:n=!1,zIndex:s,elevateOnSelect:o=!1}){if(s!==void 0)return s;const i=o&&n?1e3:0,l=Math.max(e.parentId?e.internals.z:0,t.parentId?t.internals.z:0);return i+l}function py({sourceNode:e,targetNode:t,width:n,height:s,transform:o}){const i=Ys(_s(e),_s(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const l={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:s/o[2]};return Tn(l,Gs(i))>0}const td=({source:e,sourceHandle:t,target:n,targetHandle:s})=>`xy-edge__${e}${t||""}-${n}${s||""}`,my=(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)),nd=(e,t)=>{if(!e.source||!e.target)return Ls("006",Oe.error006()),t;let n;return Fu(e)?n={...e}:n={...e,id:td(e)},my(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))},fy=(e,t,n,s={shouldReplaceId:!0})=>{const{id:o,...i}=e;if(!t.source||!t.target)return Ls("006",Oe.error006()),n;if(!n.find(c=>c.id===e.id))return Ls("007",Oe.error007(o)),n;const a={...i,id:s.shouldReplaceId?td(t):o,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(c=>c.id!==o).concat(a)};function sd({sourceX:e,sourceY:t,targetX:n,targetY:s}){const[o,i,l,a]=ed({sourceX:e,sourceY:t,targetX:n,targetY:s});return[`M ${e},${t}L ${n},${s}`,o,i,l,a]}const rl={[J.Left]:{x:-1,y:0},[J.Right]:{x:1,y:0},[J.Top]:{x:0,y:-1},[J.Bottom]:{x:0,y:1}},hy=({source:e,sourcePosition:t=J.Bottom,target:n})=>t===J.Left||t===J.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},il=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function gy({source:e,sourcePosition:t=J.Bottom,target:n,targetPosition:s=J.Top,center:o,offset:i}){const l=rl[t],a=rl[s],c={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+a.x*i,y:n.y+a.y*i},x=hy({source:c,sourcePosition:t,target:d}),p=x.x!==0?"x":"y",m=x[p];let h=[],g,E;const S={x:0,y:0},R={x:0,y:0},[v,y,C,k]=ed({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*a[p]===-1){g=o.x??v,E=o.y??y;const P=[{x:g,y:c.y},{x:g,y:d.y}],I=[{x:c.x,y:E},{x:d.x,y:E}];l[p]===m?h=p==="x"?P:I:h=p==="x"?I:P}else{const P=[{x:c.x,y:d.y}],I=[{x:d.x,y:c.y}];if(p==="x"?h=l.x===m?I:P:h=l.y===m?P:I,t===s){const z=Math.abs(e[p]-n[p]);if(z<=i){const b=Math.min(i-1,i-z);l[p]===m?S[p]=(c[p]>e[p]?-1:1)*b:R[p]=(d[p]>n[p]?-1:1)*b}}if(t!==s){const z=p==="x"?"y":"x",b=l[p]===a[z],N=c[z]>d[z],_=c[z]<d[z];(l[p]===1&&(!b&&N||b&&_)||l[p]!==1&&(!b&&_||b&&N))&&(h=p==="x"?P:I)}const B={x:c.x+S.x,y:c.y+S.y},F={x:d.x+R.x,y:d.y+R.y},$=Math.max(Math.abs(B.x-h[0].x),Math.abs(F.x-h[0].x)),D=Math.max(Math.abs(B.y-h[0].y),Math.abs(F.y-h[0].y));$>=D?(g=(B.x+F.x)/2,E=h[0].y):(g=h[0].x,E=(B.y+F.y)/2)}return[[e,{x:c.x+S.x,y:c.y+S.y},...h,{x:d.x+R.x,y:d.y+R.y},n],g,E,C,k]}function jy(e,t,n,s){const o=Math.min(il(e,t)/2,il(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 d=e.x<n.x?-1:1,x=e.y<n.y?1:-1;return`L ${i+o*d},${l}Q ${i},${l} ${i},${l+o*x}`}const a=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${l+o*c}Q ${i},${l} ${i+o*a},${l}`}function Xo({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:s,targetY:o,targetPosition:i=J.Top,borderRadius:l=5,centerX:a,centerY:c,offset:d=20}){const[x,p,m,h,g]=gy({source:{x:e,y:t},sourcePosition:n,target:{x:s,y:o},targetPosition:i,center:{x:a,y:c},offset:d});return[x.reduce((S,R,v)=>{let y="";return v>0&&v<x.length-1?y=jy(x[v-1],R,x[v+1],l):y=`${v===0?"M":"L"}${R.x} ${R.y}`,S+=y,S},""),p,m,h,g]}function ll(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Ey(e){const{sourceNode:t,targetNode:n}=e;if(!ll(t)||!ll(n))return null;const s=t.internals.handleBounds||al(t.handles),o=n.internals.handleBounds||al(n.handles),i=cl(s?.source??[],e.sourceHandle),l=cl(e.connectionMode===Pt.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!i||!l)return e.onError?.("008",Oe.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=i?.position||J.Bottom,c=l?.position||J.Top,d=Mn(t,i,a),x=Mn(n,l,c);return{sourceX:d.x,sourceY:d.y,targetX:x.x,targetY:x.y,sourcePosition:a,targetPosition:c}}function al(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 Mn(e,t,n=J.Left,s=!1){const o=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:a}=t??dt(e);if(s)return{x:o+l/2,y:i+a/2};switch(t?.position??n){case J.Top:return{x:o+l/2,y:i};case J.Right:return{x:o+l,y:i+a/2};case J.Bottom:return{x:o+l/2,y:i+a};case J.Left:return{x:o,y:i+a/2}}}function cl(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function qo(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function yy(e,{id:t,defaultColor:n,defaultMarkerStart:s,defaultMarkerEnd:o}){const i=new Set;return e.reduce((l,a)=>([a.markerStart||s,a.markerEnd||o].forEach(c=>{if(c&&typeof c=="object"){const d=qo(c,t);i.has(d)||(l.push({id:d,color:c.color||n,...c}),i.add(d))}}),l),[]).sort((l,a)=>l.id.localeCompare(a.id))}const ti={nodeOrigin:[0,0],nodeExtent:Ln,elevateNodesOnSelect:!0,defaults:{}},Sy={...ti,checkEquality:!0};function ni(e,t){const n={...e};for(const s in t)t[s]!==void 0&&(n[s]=t[s]);return n}function Ry(e,t,n){const s=ni(ti,n);for(const o of e.values())if(o.parentId)si(o,e,t,s);else{const i=zn(o,s.nodeOrigin),l=on(o.extent)?o.extent:s.nodeExtent,a=At(i,l,dt(o));o.internals.positionAbsolute=a}}function Qo(e,t,n,s){const o=ni(Sy,s);let i=e.length>0;const l=new Map(t),a=o?.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const c of e){let d=l.get(c.id);if(o.checkEquality&&c===d?.internals.userNode)t.set(c.id,d);else{const x=zn(c,o.nodeOrigin),p=on(c.extent)?c.extent:o.nodeExtent,m=At(x,p,dt(c));d={...o.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:m,handleBounds:c.measured?d?.internals.handleBounds:void 0,z:od(c,a),userNode:c}},t.set(c.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(i=!1),c.parentId&&si(d,t,n,s)}return i}function Cy(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 si(e,t,n,s){const{elevateNodesOnSelect:o,nodeOrigin:i,nodeExtent:l}=ni(ti,s),a=e.parentId,c=t.get(a);if(!c){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Cy(e,n);const d=o?1e3:0,{x,y:p,z:m}=by(e,c,i,l,d),{positionAbsolute:h}=e.internals,g=x!==h.x||p!==h.y;(g||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:g?{x,y:p}:h,z:m}})}function od(e,t){return(Xe(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function by(e,t,n,s,o){const{x:i,y:l}=t.internals.positionAbsolute,a=dt(e),c=zn(e,n),d=on(e.extent)?At(c,e.extent,a):c;let x=At({x:i+d.x,y:l+d.y},s,a);e.extent==="parent"&&(x=Zu(x,a,t));const p=od(e,o),m=t.internals.z??0;return{x:x.x,y:x.y,z:m>=p?m+1:p}}function oi(e,t,n,s=[0,0]){const o=[],i=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const c=i.get(l.parentId)?.expandedRect??sn(a),d=Yu(c,l.rect);i.set(l.parentId,{expandedRect:d,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},c)=>{const d=a.internals.positionAbsolute,x=dt(a),p=a.origin??s,m=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,h=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,g=Math.max(x.width,Math.round(l.width)),E=Math.max(x.height,Math.round(l.height)),S=(g-x.width)*p[0],R=(E-x.height)*p[1];(m>0||h>0||S||R)&&(o.push({id:c,type:"position",position:{x:a.position.x-m+S,y:a.position.y-h+R}}),n.get(c)?.forEach(v=>{e.some(y=>y.id===v.id)||o.push({id:v.id,type:"position",position:{x:v.position.x+m,y:v.position.y+h}})})),(x.width<l.width||x.height<l.height||m||h)&&o.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:g+(m?p[0]*m-S:0),height:E+(h?p[1]*h-R:0)}})}),o}function wy(e,t,n,s,o,i){const l=s?.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const c=[],d=window.getComputedStyle(l),{m22:x}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const h=t.get(m.id);if(!h)continue;if(h.hidden){t.set(h.id,{...h,internals:{...h.internals,handleBounds:void 0}}),a=!0;continue}const g=ei(m.nodeElement),E=h.measured.width!==g.width||h.measured.height!==g.height;if(!!(g.width&&g.height&&(E||!h.internals.handleBounds||m.force))){const R=m.nodeElement.getBoundingClientRect(),v=on(h.extent)?h.extent:i;let{positionAbsolute:y}=h.internals;h.parentId&&h.extent==="parent"?y=Zu(y,g,t.get(h.parentId)):v&&(y=At(y,v,g));const C={...h,measured:g,internals:{...h.internals,positionAbsolute:y,handleBounds:{source:sl("source",m.nodeElement,R,x,h.id),target:sl("target",m.nodeElement,R,x,h.id)}}};t.set(h.id,C),h.parentId&&si(C,t,n,{nodeOrigin:o}),a=!0,E&&(c.push({id:h.id,type:"dimensions",dimensions:g}),h.expandParent&&h.parentId&&p.push({id:h.id,parentId:h.parentId,rect:sn(C,o)}))}}if(p.length>0){const m=oi(p,t,n,o);c.push(...m)}return{changes:c,updatedInternals:a}}async function vy({delta:e,panZoom:t,transform:n,translateExtent:s,width:o,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],[o,i]],s),a=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(a)}function ul(e,t,n,s,o,i){let l=o;const a=s.get(l)||new Map;s.set(l,a.set(n,t)),l=`${o}-${e}`;const c=s.get(l)||new Map;if(s.set(l,c.set(n,t)),i){l=`${o}-${e}-${i}`;const d=s.get(l)||new Map;s.set(l,d.set(n,t))}}function rd(e,t,n){e.clear(),t.clear();for(const s of n){const{source:o,target:i,sourceHandle:l=null,targetHandle:a=null}=s,c={edgeId:s.id,source:o,target:i,sourceHandle:l,targetHandle:a},d=`${o}-${l}--${i}-${a}`,x=`${i}-${a}--${o}-${l}`;ul("source",c,x,e,o,l),ul("target",c,d,e,i,a),t.set(s.id,s)}}function id(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:id(n,t):!1}function dl(e,t,n){let s=e;do{if(s?.matches?.(t))return!0;if(s===n)return!1;s=s?.parentElement}while(s);return!1}function ky(e,t,n,s){const o=new Map;for(const[i,l]of e)if((l.selected||l.id===s)&&(!l.parentId||!id(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const a=e.get(i);a&&o.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return o}function yo({nodeId:e,dragItems:t,nodeLookup:n,dragging:s=!0}){const o=[];for(const[l,a]of t){const c=n.get(l)?.internals.userNode;c&&o.push({...c,position:a.position,dragging:s})}if(!e)return[o[0],o];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:s}:o[0],o]}function _y({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:s,onDragStop:o}){let i={x:null,y:null},l=0,a=new Map,c=!1,d={x:0,y:0},x=null,p=!1,m=null,h=!1,g=!1;function E({noDragClassName:R,handleSelector:v,domNode:y,isSelectable:C,nodeId:k,nodeClickDistance:T=0}){m=He(y);function P({x:$,y:D},z){const{nodeLookup:b,nodeExtent:N,snapGrid:_,snapToGrid:M,nodeOrigin:V,onNodeDrag:H,onSelectionDrag:K,onError:Z,updateNodePositions:G}=t();i={x:$,y:D};let Q=!1,ee={x:0,y:0,x2:0,y2:0};if(a.size>1&&N){const ae=Vn(a);ee=Wo(ae)}for(const[ae,re]of a){if(!b.has(ae))continue;let se={x:$-re.distance.x,y:D-re.distance.y};M&&(se=Us(se,_));let te=[[N[0][0],N[0][1]],[N[1][0],N[1][1]]];if(a.size>1&&N&&!re.extent){const{positionAbsolute:Ce}=re.internals,ue=Ce.x-ee.x+N[0][0],me=Ce.x+re.measured.width-ee.x2+N[1][0],X=Ce.y-ee.y+N[0][1],de=Ce.y+re.measured.height-ee.y2+N[1][1];te=[[ue,X],[me,de]]}const{position:le,positionAbsolute:Re}=Hu({nodeId:ae,nextPosition:se,nodeLookup:b,nodeExtent:te,nodeOrigin:V,onError:Z});Q=Q||re.position.x!==le.x||re.position.y!==le.y,re.position=le,re.internals.positionAbsolute=Re}if(g=g||Q,!!Q&&(G(a,!0),z&&(s||H||!k&&K))){const[ae,re]=yo({nodeId:k,dragItems:a,nodeLookup:b});s?.(z,a,ae,re),H?.(z,ae,re),k||K?.(z,re)}}async function I(){if(!x)return;const{transform:$,panBy:D,autoPanSpeed:z,autoPanOnNodeDrag:b}=t();if(!b){c=!1,cancelAnimationFrame(l);return}const[N,_]=Ku(d,x,z);(N!==0||_!==0)&&(i.x=(i.x??0)-N/$[2],i.y=(i.y??0)-_/$[2],await D({x:N,y:_})&&P(i,null)),l=requestAnimationFrame(I)}function B($){const{nodeLookup:D,multiSelectionActive:z,nodesDraggable:b,transform:N,snapGrid:_,snapToGrid:M,selectNodesOnDrag:V,onNodeDragStart:H,onSelectionDragStart:K,unselectNodesAndEdges:Z}=t();p=!0,(!V||!C)&&!z&&k&&(D.get(k)?.selected||Z()),C&&V&&k&&e?.(k);const G=Rn($.sourceEvent,{transform:N,snapGrid:_,snapToGrid:M,containerBounds:x});if(i=G,a=ky(D,b,G,k),a.size>0&&(n||H||!k&&K)){const[Q,ee]=yo({nodeId:k,dragItems:a,nodeLookup:D});n?.($.sourceEvent,a,Q,ee),H?.($.sourceEvent,Q,ee),k||K?.($.sourceEvent,ee)}}const F=_u().clickDistance(T).on("start",$=>{const{domNode:D,nodeDragThreshold:z,transform:b,snapGrid:N,snapToGrid:_}=t();x=D?.getBoundingClientRect()||null,h=!1,g=!1,z===0&&B($),i=Rn($.sourceEvent,{transform:b,snapGrid:N,snapToGrid:_,containerBounds:x}),d=tt($.sourceEvent,x)}).on("drag",$=>{const{autoPanOnNodeDrag:D,transform:z,snapGrid:b,snapToGrid:N,nodeDragThreshold:_,nodeLookup:M}=t(),V=Rn($.sourceEvent,{transform:z,snapGrid:b,snapToGrid:N,containerBounds:x});if(($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||k&&!M.has(k))&&(h=!0),!h){if(!c&&D&&p&&(c=!0,I()),!p){const H=V.xSnapped-(i.x??0),K=V.ySnapped-(i.y??0);Math.sqrt(H*H+K*K)>_&&B($)}(i.x!==V.xSnapped||i.y!==V.ySnapped)&&a&&p&&(d=tt($.sourceEvent,x),P(V,$.sourceEvent))}}).on("end",$=>{if(!(!p||h)&&(c=!1,p=!1,cancelAnimationFrame(l),a.size>0)){const{nodeLookup:D,updateNodePositions:z,onNodeDragStop:b,onSelectionDragStop:N}=t();if(g&&(z(a,!1),g=!1),o||b||!k&&N){const[_,M]=yo({nodeId:k,dragItems:a,nodeLookup:D,dragging:!1});o?.($.sourceEvent,a,_,M),b?.($.sourceEvent,_,M),k||N?.($.sourceEvent,M)}}}).filter($=>{const D=$.target;return!$.button&&(!R||!dl(D,`.${R}`,y))&&(!v||dl(D,v,y))});m.call(F)}function S(){m?.on(".drag",null)}return{update:E,destroy:S}}function Ly(e,t,n){const s=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Tn(o,sn(i))>0&&s.push(i);return s}const Ty=250;function My(e,t,n,s){let o=[],i=1/0;const l=Ly(e,n,t+Ty);for(const a of l){const c=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(const d of c){if(s.nodeId===d.nodeId&&s.type===d.type&&s.id===d.id)continue;const{x,y:p}=Mn(a,d,d.position,!0),m=Math.sqrt(Math.pow(x-e.x,2)+Math.pow(p-e.y,2));m>t||(m<i?(o=[{...d,x,y:p}],i=m):m===i&&o.push({...d,x,y:p}))}}if(!o.length)return null;if(o.length>1){const a=s.type==="source"?"target":"source";return o.find(c=>c.type===a)??o[0]}return o[0]}function ld(e,t,n,s,o,i=!1){const l=s.get(e);if(!l)return null;const a=o==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],c=(n?a?.find(d=>d.id===n):a?.[0])??null;return c&&i?{...c,...Mn(l,c,c.position,!0)}:c}function ad(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Ny(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const cd=()=>!0;function Py(e,{connectionMode:t,connectionRadius:n,handleId:s,nodeId:o,edgeUpdaterType:i,isTarget:l,domNode:a,nodeLookup:c,lib:d,autoPanOnConnect:x,flowId:p,panBy:m,cancelConnection:h,onConnectStart:g,onConnect:E,onConnectEnd:S,isValidConnection:R=cd,onReconnectEnd:v,updateConnection:y,getTransform:C,getFromHandle:k,autoPanSpeed:T,dragThreshold:P=1}){const I=Wu(e.target);let B=0,F;const{x:$,y:D}=tt(e),z=I?.elementFromPoint($,D),b=ad(i,z),N=a?.getBoundingClientRect();let _=!1;if(!N||!b)return;const M=ld(o,b,s,c,t);if(!M)return;let V=tt(e,N),H=!1,K=null,Z=!1,G=null;function Q(){if(!x||!N)return;const[Ce,ue]=Ku(V,N,T);m({x:Ce,y:ue}),B=requestAnimationFrame(Q)}const ee={...M,nodeId:o,type:b,position:M.position},ae=c.get(o);let se={inProgress:!0,isValid:null,from:Mn(ae,ee,J.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:ae,to:V,toHandle:null,toPosition:Ji[ee.position],toNode:null};function te(){_=!0,y(se),g?.(e,{nodeId:o,handleId:s,handleType:b})}P===0&&te();function le(Ce){if(!_){const{x:de,y:we}=tt(Ce),Pe=de-$,et=we-D;if(!(Pe*Pe+et*et>P*P))return;te()}if(!k()||!ee){Re(Ce);return}const ue=C();V=tt(Ce,N),F=My(Fn(V,ue,!1,[1,1]),n,c,ee),H||(Q(),H=!0);const me=ud(Ce,{handle:F,connectionMode:t,fromNodeId:o,fromHandleId:s,fromType:l?"target":"source",isValidConnection:R,doc:I,lib:d,flowId:p,nodeLookup:c});G=me.handleDomNode,K=me.connection,Z=Ny(!!F,me.isValid);const X={...se,isValid:Z,to:me.toHandle&&Z?Ts({x:me.toHandle.x,y:me.toHandle.y},ue):V,toHandle:me.toHandle,toPosition:Z&&me.toHandle?me.toHandle.position:Ji[ee.position],toNode:me.toHandle?c.get(me.toHandle.nodeId):null};Z&&F&&se.toHandle&&X.toHandle&&se.toHandle.type===X.toHandle.type&&se.toHandle.nodeId===X.toHandle.nodeId&&se.toHandle.id===X.toHandle.id&&se.to.x===X.to.x&&se.to.y===X.to.y||(y(X),se=X)}function Re(Ce){if(_){(F||G)&&K&&Z&&E?.(K);const{inProgress:ue,...me}=se,X={...me,toPosition:se.toHandle?se.toPosition:null};S?.(Ce,X),i&&v?.(Ce,X)}h(),cancelAnimationFrame(B),H=!1,Z=!1,K=null,G=null,I.removeEventListener("mousemove",le),I.removeEventListener("mouseup",Re),I.removeEventListener("touchmove",le),I.removeEventListener("touchend",Re)}I.addEventListener("mousemove",le),I.addEventListener("mouseup",Re),I.addEventListener("touchmove",le),I.addEventListener("touchend",Re)}function ud(e,{handle:t,connectionMode:n,fromNodeId:s,fromHandleId:o,fromType:i,doc:l,lib:a,flowId:c,isValidConnection:d=cd,nodeLookup:x}){const p=i==="target",m=t?l.querySelector(`.${a}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:g}=tt(e),E=l.elementFromPoint(h,g),S=E?.classList.contains(`${a}-flow__handle`)?E:m,R={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const v=ad(void 0,S),y=S.getAttribute("data-nodeid"),C=S.getAttribute("data-handleid"),k=S.classList.contains("connectable"),T=S.classList.contains("connectableend");if(!y||!v)return R;const P={source:p?y:s,sourceHandle:p?C:o,target:p?s:y,targetHandle:p?o:C};R.connection=P;const B=k&&T&&(n===Pt.Strict?p&&v==="source"||!p&&v==="target":y!==s||C!==o);R.isValid=B&&d(P),R.toHandle=ld(y,v,C,x,n,!0)}return R}const Jo={onPointerDown:Py,isValid:ud};function Ay({domNode:e,panZoom:t,getTransform:n,getViewScale:s}){const o=He(e);function i({translateExtent:a,width:c,height:d,zoomStep:x=10,pannable:p=!0,zoomable:m=!0,inversePan:h=!1}){const g=y=>{const C=n();if(y.sourceEvent.type!=="wheel"||!t)return;const k=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*x,T=C[2]*Math.pow(2,k);t.scaleTo(T)};let E=[0,0];const S=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(E=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},R=y=>{const C=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],T=[k[0]-E[0],k[1]-E[1]];E=k;const P=s()*Math.max(C[2],Math.log(C[2]))*(h?-1:1),I={x:C[0]-T[0]*P,y:C[1]-T[1]*P},B=[[0,0],[c,d]];t.setViewportConstrained({x:I.x,y:I.y,zoom:C[2]},B,a)},v=Du().on("start",S).on("zoom",p?R:null).on("zoom.wheel",m?g:null);o.call(v,{})}function l(){o.on("zoom",null)}return{update:i,destroy:l,pointer:We}}const Oy=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Ws=e=>({x:e.x,y:e.y,zoom:e.k}),So=({x:e,y:t,zoom:n})=>Ks.translate(e,t).scale(n),Gt=(e,t)=>e.target.closest(`.${t}`),dd=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Iy=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ro=(e,t=0,n=Iy,s=()=>{})=>{const o=typeof t=="number"&&t>0;return o||s(),o?e.transition().duration(t).ease(n).on("end",s):e},xd=e=>{const t=e.ctrlKey&&Ms()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Dy({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:s,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:l,onPanZoomStart:a,onPanZoom:c,onPanZoomEnd:d}){return x=>{if(Gt(x,t))return!1;x.preventDefault(),x.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(x.ctrlKey&&l){const S=We(x),R=xd(x),v=p*Math.pow(2,R);s.scaleTo(n,v,S,x);return}const m=x.deltaMode===1?20:1;let h=o===wt.Vertical?0:x.deltaX*m,g=o===wt.Horizontal?0:x.deltaY*m;!Ms()&&x.shiftKey&&o!==wt.Vertical&&(h=x.deltaY*m,g=0),s.translateBy(n,-(h/p)*i,-(g/p)*i,{internal:!0});const E=Ws(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,a?.(x,E)),e.isPanScrolling&&(c?.(x,E),e.panScrollTimeout=setTimeout(()=>{d?.(x,E),e.isPanScrolling=!1},150))}}function By({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(s,o){const i=s.type==="wheel",l=!t&&i&&!s.ctrlKey,a=Gt(s,e);if(s.ctrlKey&&i&&a&&s.preventDefault(),l||a)return null;s.preventDefault(),n.call(this,s,o)}}function $y({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return s=>{if(s.sourceEvent?.internal)return;const o=Ws(s.transform);e.mouseButton=s.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,s.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(s.sourceEvent,o)}}function zy({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:s,onPanZoom:o}){return i=>{e.usedRightMouseButton=!!(n&&dd(t,e.mouseButton??0)),i.sourceEvent?.sync||s([i.transform.x,i.transform.y,i.transform.k]),o&&!i.sourceEvent?.internal&&o?.(i.sourceEvent,Ws(i.transform))}}function Vy({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:s,onPanZoomEnd:o,onPaneContextMenu:i}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&dd(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&i(l.sourceEvent),e.usedRightMouseButton=!1,s(!1),o&&Oy(e.prevViewport,l.transform))){const a=Ws(l.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(l.sourceEvent,a)},n?150:0)}}}function Fy({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:s,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:l,noWheelClassName:a,noPanClassName:c,lib:d}){return x=>{const p=e||t,m=n&&x.ctrlKey;if(x.button===1&&x.type==="mousedown"&&(Gt(x,`${d}-flow__node`)||Gt(x,`${d}-flow__edge`)))return!0;if(!s&&!p&&!o&&!i&&!n||l||Gt(x,a)&&x.type==="wheel"||Gt(x,c)&&(x.type!=="wheel"||o&&x.type==="wheel"&&!e)||!n&&x.ctrlKey&&x.type==="wheel")return!1;if(!n&&x.type==="touchstart"&&x.touches?.length>1)return x.preventDefault(),!1;if(!p&&!o&&!m&&x.type==="wheel"||!s&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(s)&&!s.includes(x.button)&&x.type==="mousedown")return!1;const h=Array.isArray(s)&&s.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||x.type==="wheel")&&h}}function Hy({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:s,translateExtent:o,viewport:i,onPanZoom:l,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:d}){const x={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=Du().clickDistance(!Xe(s)||s<0?0:s).scaleExtent([t,n]).translateExtent(o),h=He(e).call(m);y({x:i.x,y:i.y,zoom:nn(i.zoom,t,n)},[[0,0],[p.width,p.height]],o);const g=h.on("wheel.zoom"),E=h.on("dblclick.zoom");m.wheelDelta(xd);function S(D,z){return h?new Promise(b=>{m?.interpolate(z?.interpolate==="linear"?O.interpolate:ls).transform(Ro(h,z?.duration,z?.ease,()=>b(!0)),D)}):Promise.resolve(!1)}function R({noWheelClassName:D,noPanClassName:z,onPaneContextMenu:b,userSelectionActive:N,panOnScroll:_,panOnDrag:M,panOnScrollMode:V,panOnScrollSpeed:H,preventScrolling:K,zoomOnPinch:Z,zoomOnScroll:G,zoomOnDoubleClick:Q,zoomActivationKeyPressed:ee,lib:ae,onTransformChange:re}){N&&!x.isZoomingOrPanning&&v();const te=_&&!ee&&!N?Dy({zoomPanValues:x,noWheelClassName:D,d3Selection:h,d3Zoom:m,panOnScrollMode:V,panOnScrollSpeed:H,zoomOnPinch:Z,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}):By({noWheelClassName:D,preventScrolling:K,d3ZoomHandler:g});if(h.on("wheel.zoom",te,{passive:!1}),!N){const Re=$y({zoomPanValues:x,onDraggingChange:d,onPanZoomStart:a});m.on("start",Re);const Ce=zy({zoomPanValues:x,panOnDrag:M,onPaneContextMenu:!!b,onPanZoom:l,onTransformChange:re});m.on("zoom",Ce);const ue=Vy({zoomPanValues:x,panOnDrag:M,panOnScroll:_,onPaneContextMenu:b,onPanZoomEnd:c,onDraggingChange:d});m.on("end",ue)}const le=Fy({zoomActivationKeyPressed:ee,panOnDrag:M,zoomOnScroll:G,panOnScroll:_,zoomOnDoubleClick:Q,zoomOnPinch:Z,userSelectionActive:N,noPanClassName:z,noWheelClassName:D,lib:ae});m.filter(le),Q?h.on("dblclick.zoom",E):h.on("dblclick.zoom",null)}function v(){m.on("zoom",null)}async function y(D,z,b){const N=So(D),_=m?.constrain()(N,z,b);return _&&await S(_),new Promise(M=>M(_))}async function C(D,z){const b=So(D);return await S(b,z),new Promise(N=>N(b))}function k(D){if(h){const z=So(D),b=h.property("__zoom");(b.k!==D.zoom||b.x!==D.x||b.y!==D.y)&&m?.transform(h,z,null,{sync:!0})}}function T(){const D=h?Iu(h.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}function P(D,z){return h?new Promise(b=>{m?.interpolate(z?.interpolate==="linear"?O.interpolate:ls).scaleTo(Ro(h,z?.duration,z?.ease,()=>b(!0)),D)}):Promise.resolve(!1)}function I(D,z){return h?new Promise(b=>{m?.interpolate(z?.interpolate==="linear"?O.interpolate:ls).scaleBy(Ro(h,z?.duration,z?.ease,()=>b(!0)),D)}):Promise.resolve(!1)}function B(D){m?.scaleExtent(D)}function F(D){m?.translateExtent(D)}function $(D){const z=!Xe(D)||D<0?0:D;m?.clickDistance(z)}return{update:R,destroy:v,setViewport:C,setViewportConstrained:y,getViewport:T,scaleTo:P,scaleBy:I,setScaleExtent:B,setTranslateExtent:F,syncViewport:k,setClickDistance:$}}var rn;(function(e){e.Line="line",e.Handle="handle"})(rn||(rn={}));function Zy({width:e,prevWidth:t,height:n,prevHeight:s,affectsX:o,affectsY:i}){const l=e-t,a=n-s,c=[l>0?1:l<0?-1:0,a>0?1:a<0?-1:0];return l&&o&&(c[0]=c[0]*-1),a&&i&&(c[1]=c[1]*-1),c}function Ky(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),s=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:s,affectsY:o}}function xt(e,t){return Math.max(0,t-e)}function pt(e,t){return Math.max(0,e-t)}function es(e,t,n){return Math.max(0,t-e,e-n)}function xl(e,t){return e?!t:t}function Yy(e,t,n,s,o,i,l,a){let{affectsX:c,affectsY:d}=t;const{isHorizontal:x,isVertical:p}=t,m=x&&p,{xSnapped:h,ySnapped:g}=n,{minWidth:E,maxWidth:S,minHeight:R,maxHeight:v}=s,{x:y,y:C,width:k,height:T,aspectRatio:P}=e;let I=Math.floor(x?h-e.pointerX:0),B=Math.floor(p?g-e.pointerY:0);const F=k+(c?-I:I),$=T+(d?-B:B),D=-i[0]*k,z=-i[1]*T;let b=es(F,E,S),N=es($,R,v);if(l){let V=0,H=0;c&&I<0?V=xt(y+I+D,l[0][0]):!c&&I>0&&(V=pt(y+F+D,l[1][0])),d&&B<0?H=xt(C+B+z,l[0][1]):!d&&B>0&&(H=pt(C+$+z,l[1][1])),b=Math.max(b,V),N=Math.max(N,H)}if(a){let V=0,H=0;c&&I>0?V=pt(y+I,a[0][0]):!c&&I<0&&(V=xt(y+F,a[1][0])),d&&B>0?H=pt(C+B,a[0][1]):!d&&B<0&&(H=xt(C+$,a[1][1])),b=Math.max(b,V),N=Math.max(N,H)}if(o){if(x){const V=es(F/P,R,v)*P;if(b=Math.max(b,V),l){let H=0;!c&&!d||c&&!d&&m?H=pt(C+z+F/P,l[1][1])*P:H=xt(C+z+(c?I:-I)/P,l[0][1])*P,b=Math.max(b,H)}if(a){let H=0;!c&&!d||c&&!d&&m?H=xt(C+F/P,a[1][1])*P:H=pt(C+(c?I:-I)/P,a[0][1])*P,b=Math.max(b,H)}}if(p){const V=es($*P,E,S)/P;if(N=Math.max(N,V),l){let H=0;!c&&!d||d&&!c&&m?H=pt(y+$*P+D,l[1][0])/P:H=xt(y+(d?B:-B)*P+D,l[0][0])/P,N=Math.max(N,H)}if(a){let H=0;!c&&!d||d&&!c&&m?H=xt(y+$*P,a[1][0])/P:H=pt(y+(d?B:-B)*P,a[0][0])/P,N=Math.max(N,H)}}}B=B+(B<0?N:-N),I=I+(I<0?b:-b),o&&(m?F>$*P?B=(xl(c,d)?-I:I)/P:I=(xl(c,d)?-B:B)*P:x?(B=I/P,d=c):(I=B*P,c=d));const _=c?y+I:y,M=d?C+B:C;return{width:k+(c?-I:I),height:T+(d?-B:B),x:i[0]*I*(c?-1:1)+_,y:i[1]*B*(d?-1:1)+M}}const pd={width:0,height:0,x:0,y:0},Gy={...pd,pointerX:0,pointerY:0,aspectRatio:1};function Uy(e){return[[0,0],[e.measured.width,e.measured.height]]}function Wy(e,t,n){const s=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,l=e.measured.height??0,a=n[0]*i,c=n[1]*l;return[[s-a,o-c],[s+i-a,o+l-c]]}function Xy({domNode:e,nodeId:t,getStoreItems:n,onChange:s,onEnd:o}){const i=He(e);function l({controlPosition:c,boundaries:d,keepAspectRatio:x,resizeDirection:p,onResizeStart:m,onResize:h,onResizeEnd:g,shouldResize:E}){let S={...pd},R={...Gy};const v=Ky(c);let y,C=null,k=[],T,P,I;const B=_u().on("start",F=>{const{nodeLookup:$,transform:D,snapGrid:z,snapToGrid:b,nodeOrigin:N,paneDomNode:_}=n();if(y=$.get(t),!y)return;C=_?.getBoundingClientRect()??null;const{xSnapped:M,ySnapped:V}=Rn(F.sourceEvent,{transform:D,snapGrid:z,snapToGrid:b,containerBounds:C});S={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},R={...S,pointerX:M,pointerY:V,aspectRatio:S.width/S.height},T=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(T=$.get(y.parentId),P=T&&y.extent==="parent"?Uy(T):void 0),k=[],I=void 0;for(const[H,K]of $)if(K.parentId===t&&(k.push({id:H,position:{...K.position},extent:K.extent}),K.extent==="parent"||K.expandParent)){const Z=Wy(K,y,K.origin??N);I?I=[[Math.min(Z[0][0],I[0][0]),Math.min(Z[0][1],I[0][1])],[Math.max(Z[1][0],I[1][0]),Math.max(Z[1][1],I[1][1])]]:I=Z}m?.(F,{...S})}).on("drag",F=>{const{transform:$,snapGrid:D,snapToGrid:z,nodeOrigin:b}=n(),N=Rn(F.sourceEvent,{transform:$,snapGrid:D,snapToGrid:z,containerBounds:C}),_=[];if(!y)return;const{x:M,y:V,width:H,height:K}=S,Z={},G=y.origin??b,{width:Q,height:ee,x:ae,y:re}=Yy(R,v,N,d,x,G,P,I),se=Q!==H,te=ee!==K,le=ae!==M&&se,Re=re!==V&&te;if(!le&&!Re&&!se&&!te)return;if((le||Re||G[0]===1||G[1]===1)&&(Z.x=le?ae:S.x,Z.y=Re?re:S.y,S.x=Z.x,S.y=Z.y,k.length>0)){const X=ae-M,de=re-V;for(const we of k)we.position={x:we.position.x-X+G[0]*(Q-H),y:we.position.y-de+G[1]*(ee-K)},_.push(we)}if((se||te)&&(Z.width=se&&(!p||p==="horizontal")?Q:S.width,Z.height=te&&(!p||p==="vertical")?ee:S.height,S.width=Z.width,S.height=Z.height),T&&y.expandParent){const X=G[0]*(Z.width??0);Z.x&&Z.x<X&&(S.x=X,R.x=R.x-(Z.x-X));const de=G[1]*(Z.height??0);Z.y&&Z.y<de&&(S.y=de,R.y=R.y-(Z.y-de))}const Ce=Zy({width:S.width,prevWidth:H,height:S.height,prevHeight:K,affectsX:v.affectsX,affectsY:v.affectsY}),ue={...S,direction:Ce};E?.(F,ue)!==!1&&(h?.(F,ue),s(Z,_))}).on("end",F=>{g?.(F,{...S}),o?.({...S})});i.call(B)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var ts={exports:{}},Co={},ns={exports:{}},bo={};/**
|
|
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 pl;function qy(){if(pl)return bo;pl=1;var e=j;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,o=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function a(p,m){var h=m(),g=s({inst:{value:h,getSnapshot:m}}),E=g[0].inst,S=g[1];return i(function(){E.value=h,E.getSnapshot=m,c(E)&&S({inst:E})},[p,h,m]),o(function(){return c(E)&&S({inst:E}),p(function(){c(E)&&S({inst:E})})},[p]),l(h),h}function c(p){var m=p.getSnapshot;p=p.value;try{var h=m();return!n(p,h)}catch{return!0}}function d(p,m){return m()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return bo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,bo}var wo={};/**
|
|
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
|
|
17
|
+
*/var ml;function Qy(){return ml||(ml=1,process.env.NODE_ENV!=="production"&&function(){function e(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function t(h,g){x||o.startTransition===void 0||(x=!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 E=g();if(!p){var S=g();i(E,S)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}S=l({inst:{value:E,getSnapshot:g}});var R=S[0].inst,v=S[1];return c(function(){R.value=E,R.getSnapshot=g,n(R)&&v({inst:R})},[h,E,g]),a(function(){return n(R)&&v({inst:R}),h(function(){n(R)&&v({inst:R})})},[h]),d(E),E}function n(h){var g=h.getSnapshot;h=h.value;try{var E=g();return!i(h,E)}catch{return!0}}function s(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=j,i=typeof Object.is=="function"?Object.is:e,l=o.useState,a=o.useEffect,c=o.useLayoutEffect,d=o.useDebugValue,x=!1,p=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;wo.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),wo}var fl;function md(){return fl||(fl=1,process.env.NODE_ENV==="production"?ns.exports=qy():ns.exports=Qy()),ns.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
|
|
25
|
+
*/var hl;function Jy(){if(hl)return Co;hl=1;var e=j,t=md();function n(d,x){return d===x&&(d!==0||1/d===1/x)||d!==d&&x!==x}var s=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,a=e.useMemo,c=e.useDebugValue;return Co.useSyncExternalStoreWithSelector=function(d,x,p,m,h){var g=i(null);if(g.current===null){var E={hasValue:!1,value:null};g.current=E}else E=g.current;g=a(function(){function R(T){if(!v){if(v=!0,y=T,T=m(T),h!==void 0&&E.hasValue){var P=E.value;if(h(P,T))return C=P}return C=T}if(P=C,s(y,T))return P;var I=m(T);return h!==void 0&&h(P,I)?(y=T,P):(y=T,C=I)}var v=!1,y,C,k=p===void 0?null:p;return[function(){return R(x())},k===null?void 0:function(){return R(k())}]},[x,p,m,h]);var S=o(d,g[0],g[1]);return l(function(){E.hasValue=!0,E.value=S},[S]),c(S),S},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
|
|
33
|
+
*/var gl;function e5(){return gl||(gl=1,process.env.NODE_ENV!=="production"&&function(){function e(d,x){return d===x&&(d!==0||1/d===1/x)||d!==d&&x!==x}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=j,n=md(),s=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,l=t.useEffect,a=t.useMemo,c=t.useDebugValue;vo.useSyncExternalStoreWithSelector=function(d,x,p,m,h){var g=i(null);if(g.current===null){var E={hasValue:!1,value:null};g.current=E}else E=g.current;g=a(function(){function R(T){if(!v){if(v=!0,y=T,T=m(T),h!==void 0&&E.hasValue){var P=E.value;if(h(P,T))return C=P}return C=T}if(P=C,s(y,T))return P;var I=m(T);return h!==void 0&&h(P,I)?(y=T,P):(y=T,C=I)}var v=!1,y,C,k=p===void 0?null:p;return[function(){return R(x())},k===null?void 0:function(){return R(k())}]},[x,p,m,h]);var S=o(d,g[0],g[1]);return l(function(){E.hasValue=!0,E.value=S},[S]),c(S),S},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),vo}var jl;function t5(){return jl||(jl=1,process.env.NODE_ENV==="production"?ts.exports=Jy():ts.exports=e5()),ts.exports}var n5=t5();const s5=f.getDefaultExportFromCjs(n5),o5={},El=e=>{let t;const n=new Set,s=(x,p)=>{const m=typeof x=="function"?x(t):x;if(!Object.is(m,t)){const h=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(g=>g(t,h))}},o=()=>t,c={setState:s,getState:o,getInitialState:()=>d,subscribe:x=>(n.add(x),()=>n.delete(x)),destroy:()=>{(o5?"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()}},d=t=e(s,o,c);return c},r5=e=>e?El(e):El,{useDebugValue:i5}=j,{useSyncExternalStoreWithSelector:l5}=s5,a5=e=>e;function fd(e,t=a5,n){const s=l5(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return i5(s),s}const yl=(e,t)=>{const n=r5(e),s=(o,i=t)=>fd(n,o,i);return Object.assign(s,n),s},c5=(e,t)=>e?yl(e,t):yl;function ke(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,o]of e)if(!Object.is(o,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 Xs=j.createContext(null),u5=Xs.Provider,hd=Oe.error001();function Ee(e,t){const n=j.useContext(Xs);if(n===null)throw new Error(hd);return fd(n,e,t)}function ve(){const e=j.useContext(Xs);if(e===null)throw new Error(hd);return j.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Sl={display:"none"},d5={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},gd="react-flow__node-desc",jd="react-flow__edge-desc",x5="react-flow__aria-live",p5=e=>e.ariaLiveMessage,m5=e=>e.ariaLabelConfig;function f5({rfId:e}){const t=Ee(p5);return r.jsxRuntimeExports.jsx("div",{id:`${x5}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:d5,children:t})}function h5({rfId:e,disableKeyboardA11y:t}){const n=Ee(m5);return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("div",{id:`${gd}-${e}`,style:Sl,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),r.jsxRuntimeExports.jsx("div",{id:`${jd}-${e}`,style:Sl,children:n["edge.a11yDescription.default"]}),!t&&r.jsxRuntimeExports.jsx(f5,{rfId:e})]})}const qs=j.forwardRef(({position:e="top-left",children:t,className:n,style:s,...o},i)=>{const l=`${e}`.split("-");return r.jsxRuntimeExports.jsx("div",{className:Te(["react-flow__panel",n,...l]),style:s,ref:i,...o,children:t})});qs.displayName="Panel";function g5({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:r.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:r.jsxRuntimeExports.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const j5=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}},ss=e=>e.id;function E5(e,t){return ke(e.selectedNodes.map(ss),t.selectedNodes.map(ss))&&ke(e.selectedEdges.map(ss),t.selectedEdges.map(ss))}function y5({onSelectionChange:e}){const t=ve(),{selectedNodes:n,selectedEdges:s}=Ee(j5,E5);return j.useEffect(()=>{const o={nodes:n,edges:s};e?.(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,s,e]),null}const S5=e=>!!e.onSelectionChangeHandlers;function R5({onSelectionChange:e}){const t=Ee(S5);return e||t?r.jsxRuntimeExports.jsx(y5,{onSelectionChange:e}):null}const Ed=[0,0],C5={x:0,y:0,zoom:1},b5=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","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","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","ariaLabelConfig"],Rl=[...b5,"rfId"],w5=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}),Cl={translateExtent:Ln,nodeOrigin:Ed,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function v5(e){const{setNodes:t,setEdges:n,setMinZoom:s,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:l,reset:a,setDefaultNodesAndEdges:c,setPaneClickDistance:d}=Ee(w5,ke),x=ve();j.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{p.current=Cl,a()}),[]);const p=j.useRef(Cl);return j.useEffect(()=>{for(const m of Rl){const h=e[m],g=p.current[m];h!==g&&(typeof e[m]>"u"||(m==="nodes"?t(h):m==="edges"?n(h):m==="minZoom"?s(h):m==="maxZoom"?o(h):m==="translateExtent"?i(h):m==="nodeExtent"?l(h):m==="paneClickDistance"?d(h):m==="ariaLabelConfig"?x.setState({ariaLabelConfig:uy(h)}):m==="fitView"?x.setState({fitViewQueued:h}):m==="fitViewOptions"?x.setState({fitViewOptions:h}):x.setState({[m]:h})))}p.current=e},Rl.map(m=>e[m])),null}function bl(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function k5(e){const[t,n]=j.useState(e==="system"?null:e);return j.useEffect(()=>{if(e!=="system"){n(e);return}const s=bl(),o=()=>n(s?.matches?"dark":"light");return o(),s?.addEventListener("change",o),()=>{s?.removeEventListener("change",o)}},[e]),t!==null?t:bl()?.matches?"dark":"light"}const wl=typeof document<"u"?document:null;function Nn(e=null,t={target:wl,actInsideInputWithModifier:!0}){const[n,s]=j.useState(!1),o=j.useRef(!1),i=j.useRef(new Set([])),[l,a]=j.useMemo(()=>{if(e!==null){const d=(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
|
-
`)),x=d.reduce((p,m)=>p.concat(...m),[]);return[d,x]}return[[],[]]},[e]);return j.useEffect(()=>{const c=t?.target??gl,d=t?.actInsideInputWithModifier??!0;if(e!==null){const x=h=>{if(r.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!r.current||r.current&&!d)&&sd(h))return!1;const E=El(h.code,a);if(i.current.add(h[E]),jl(l,i.current,!1)){const S=h.composedPath?.()?.[0]||h.target,R=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(r.current||!R)&&h.preventDefault(),s(!0)}},p=h=>{const g=El(h.code,a);jl(l,i.current,!0)?(s(!1),i.current.clear()):i.current.delete(h[g]),h.key==="Meta"&&i.current.clear(),r.current=!1},m=()=>{i.current.clear(),s(!1)};return c?.addEventListener("keydown",x),c?.addEventListener("keyup",p),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c?.removeEventListener("keydown",x),c?.removeEventListener("keyup",p),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,s]),n}function jl(e,t,n){return e.filter(s=>n||s.length===t.size).some(s=>s.every(r=>t.has(r)))}function El(e,t){return t.includes(e)?"code":"key"}const cR=()=>{const e=ve();return j.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(t,{duration: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},n),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)=>e.getState().setCenter(t,n,s),fitBounds:async(t,n)=>{const{width:s,height:r,minZoom:i,maxZoom:l,panZoom:a}=e.getState(),c=Gr(t,s,r,i,l,n?.padding??.1);return a?(await a.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),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:a,y:c}=l.getBoundingClientRect(),d={x:t.x-a,y:t.y-c},x=n.snapGrid??r,p=n.snapToGrid??i;return zn(d,s,p,x)},flowToScreenPosition:t=>{const{transform:n,domNode:s}=e.getState();if(!s)return t;const{x:r,y:i}=s.getBoundingClientRect(),l=bs(t,n);return{x:l.x+r,y:l.y+i}}}),[])};function _d(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 a={...i};for(const c of l)uR(c,a);n.push(a)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function uR(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.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function kd(e,t){return _d(e,t)}function Ld(e,t){return _d(e,t)}function Ct(e,t){return{id:e,type:"select",selected:t}}function Yt(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(Ct(i.id,l)))}return s}function yl({items:e=[],lookup:t}){const n=[],s=new Map(e.map(r=>[r.id,r]));for(const[r,i]of e.entries()){const l=t.get(i.id),a=l?.internals?.userNode??l;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:"replace"}),a===void 0&&n.push({item:i,type:"add",index:r})}for(const[r]of t)s.get(r)===void 0&&n.push({id:r,type:"remove"});return n}function Sl(e){return{id:e.id,type:"remove"}}const Rl=e=>Ay(e),dR=e=>Wu(e);function Md(e){return j.forwardRef(e)}const xR=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Cl(e){const[t,n]=j.useState(BigInt(0)),[s]=j.useState(()=>pR(()=>n(r=>r+BigInt(1))));return xR(()=>{const r=s.get();r.length&&(e(r),s.reset())},[t]),s}function pR(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Nd=j.createContext(null);function mR({children:e}){const t=ve(),n=j.useCallback(a=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:x,onNodesChange:p,nodeLookup:m,fitViewQueued:h}=t.getState();let g=c;for(const S of a)g=typeof S=="function"?S(g):S;const E=yl({items:g,lookup:m});x&&d(g),E.length>0?p?.(E):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:R,setNodes:v}=t.getState();S&&v(R)})},[]),s=Cl(n),r=j.useCallback(a=>{const{edges:c=[],setEdges:d,hasDefaultEdges:x,onEdgesChange:p,edgeLookup:m}=t.getState();let h=c;for(const g of a)h=typeof g=="function"?g(h):g;x?d(h):p&&p(yl({items:h,lookup:m}))},[]),i=Cl(r),l=j.useMemo(()=>({nodeQueue:s,edgeQueue:i}),[]);return o.jsxRuntimeExports.jsx(Nd.Provider,{value:l,children:e})}function fR(){const e=j.useContext(Nd);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const hR=e=>!!e.panZoom;function Bt(){const e=cR(),t=ve(),n=fR(),s=je(hR),r=j.useMemo(()=>{const i=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},a=p=>{n.edgeQueue.push(p)},c=p=>{const{nodeLookup:m,nodeOrigin:h}=t.getState(),g=Rl(p)?p:m.get(p.id),E=g.parentId?td(g.position,g.measured,g.parentId,m,h):g.position,S={...g,position:E,width:g.measured?.width??g.width,height:g.measured?.height??g.height};return tn(S)},d=(p,m,h={replace:!1})=>{l(g=>g.map(E=>{if(E.id===p){const S=typeof m=="function"?m(E):m;return h.replace&&Rl(S)?S:{...E,...S}}return E}))},x=(p,m,h={replace:!1})=>{a(g=>g.map(E=>{if(E.id===p){const S=typeof m=="function"?m(E):m;return h.replace&&dR(S)?S:{...E,...S}}return E}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>i(p)?.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:a,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(h=>[...h,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(h=>[...h,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:h}=t.getState(),[g,E,S]=h;return{nodes:p.map(R=>({...R})),edges:m.map(R=>({...R})),viewport:{x:g,y:E,zoom:S}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:h,edges:g,onNodesDelete:E,onEdgesDelete:S,triggerNodeChanges:R,triggerEdgeChanges:v,onDelete:y,onBeforeDelete:C}=t.getState(),{nodes:_,edges:M}=await Vy({nodesToRemove:p,edgesToRemove:m,nodes:h,edges:g,onBeforeDelete:C}),I=M.length>0,A=_.length>0;if(I){const B=M.map(Sl);S?.(M),v(B)}if(A){const B=_.map(Sl);E?.(_),R(B)}return(A||I)&&y?.({nodes:_,edges:M}),{deletedNodes:_,deletedEdges:M}},getIntersectingNodes:(p,m=!0,h)=>{const g=Gi(p),E=g?p:c(p),S=h!==void 0;return E?(h||t.getState().nodes).filter(R=>{const v=t.getState().nodeLookup.get(R.id);if(v&&!g&&(R.id===p.id||!v.internals.positionAbsolute))return!1;const y=tn(S?R:v),C=kn(y,E);return m&&C>0||C>=E.width*E.height}):[]},isNodeIntersecting:(p,m,h=!0)=>{const E=Gi(p)?p:c(p);if(!E)return!1;const S=kn(E,m);return h&&S>0||S>=E.width*E.height},updateNode:d,updateNodeData:(p,m,h={replace:!1})=>{d(p,g=>{const E=typeof m=="function"?m(g):m;return h.replace?{...g,data:E}:{...g,data:{...g.data,...E}}},h)},updateEdge:x,updateEdgeData:(p,m,h={replace:!1})=>{x(p,g=>{const E=typeof m=="function"?m(g):m;return h.replace?{...g,data:E}:{...g,data:{...g.data,...E}}},h)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:h}=t.getState();return Dy(p,{nodeLookup:m,nodeOrigin:h})},getHandleConnections:({type:p,id:m,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${p}${m?`-${m}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:m,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${p?m?`-${p}-${m}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const m=t.getState().fitViewResolver??Zy();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(h=>[...h]),m.promise}}},[]);return j.useMemo(()=>({...r,...e,viewportInitialized:s}),[s])}const wl=e=>e.selected,gR=typeof window<"u"?window:void 0;function jR({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ve(),{deleteElements:s}=Bt(),r=Mn(e,{actInsideInputWithModifier:!1}),i=Mn(t,{target:gR});j.useEffect(()=>{if(r){const{edges:l,nodes:a}=n.getState();s({nodes:a.filter(wl),edges:l.filter(wl)}),n.setState({nodesSelectionActive:!1})}},[r]),j.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function ER(e){const t=ve();j.useEffect(()=>{const n=()=>{if(!e.current)return!1;const s=Ur(e.current);(s.height===0||s.width===0)&&t.getState().onError?.("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 Gs={position:"absolute",width:"100%",height:"100%",top:0,left:0},yR=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function SR({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:s=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=bt.Free,zoomOnDoubleClick:l=!0,panOnDrag:a=!0,defaultViewport:c,translateExtent:d,minZoom:x,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:h=!0,children:g,noWheelClassName:E,noPanClassName:S,onViewportChange:R,isControlledViewport:v,paneClickDistance:y}){const C=ve(),_=j.useRef(null),{userSelectionActive:M,lib:I}=je(yR,_e),A=Mn(m),B=j.useRef();ER(_);const z=j.useCallback($=>{R?.({x:$[0],y:$[1],zoom:$[2]}),v||C.setState({transform:$})},[R,v]);return j.useEffect(()=>{if(_.current){B.current=wS({domNode:_.current,minZoom:x,maxZoom:p,translateExtent:d,viewport:c,paneClickDistance:y,onDraggingChange:b=>C.setState({paneDragging:b}),onPanZoomStart:(b,k)=>{const{onViewportChangeStart:L,onMoveStart:N}=C.getState();N?.(b,k),L?.(k)},onPanZoom:(b,k)=>{const{onViewportChange:L,onMove:N}=C.getState();N?.(b,k),L?.(k)},onPanZoomEnd:(b,k)=>{const{onViewportChangeEnd:L,onMoveEnd:N}=C.getState();N?.(b,k),L?.(k)}});const{x:$,y:D,zoom:V}=B.current.getViewport();return C.setState({panZoom:B.current,transform:[$,D,V],domNode:_.current.closest(".react-flow")}),()=>{B.current?.destroy()}}},[]),j.useEffect(()=>{B.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:s,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:l,panOnDrag:a,zoomActivationKeyPressed:A,preventScrolling:h,noPanClassName:S,userSelectionActive:M,noWheelClassName:E,lib:I,onTransformChange:z})},[e,t,n,s,r,i,l,a,A,h,S,M,E,I,z]),o.jsxRuntimeExports.jsx("div",{className:"react-flow__renderer",ref:_,style:Gs,children:g})}const RR=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function CR(){const{userSelectionActive:e,userSelectionRect:t}=je(RR,_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 So=(e,t)=>n=>{n.target===t.current&&e?.(n)},wR=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function bR({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Jt.Full,panOnDrag:s,selectionOnDrag:r,onSelectionStart:i,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:c,onPaneScroll:d,onPaneMouseEnter:x,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){const g=ve(),{userSelectionActive:E,elementsSelectable:S,dragging:R,connectionInProgress:v}=je(wR,_e),y=S&&(e||E),C=j.useRef(null),_=j.useRef(),M=j.useRef(new Set),I=j.useRef(new Set),A=j.useRef(!1),B=j.useRef(!1),z=N=>{if(A.current||v){A.current=!1;return}a?.(N),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},$=N=>{if(Array.isArray(s)&&s?.includes(2)){N.preventDefault();return}c?.(N)},D=d?N=>d(N):void 0,V=N=>{const{resetSelectedElements:F,domNode:H}=g.getState();if(_.current=H?.getBoundingClientRect(),!S||!e||N.button!==0||N.target!==C.current||!_.current)return;N.target?.setPointerCapture?.(N.pointerId),B.current=!0,A.current=!1;const{x:K,y:Z}=tt(N.nativeEvent,_.current);F(),g.setState({userSelectionRect:{width:0,height:0,startX:K,startY:Z,x:K,y:Z}}),i?.(N)},b=N=>{const{userSelectionRect:F,transform:H,nodeLookup:K,edgeLookup:Z,connectionLookup:Y,triggerNodeChanges:ne,triggerEdgeChanges:J,defaultEdgeOptions:ce}=g.getState();if(!_.current||!F)return;A.current=!0;const{x:le,y:se}=tt(N.nativeEvent,_.current),{startX:ee,startY:re}=F,ye={startX:ee,startY:re,x:le<ee?le:ee,y:se<re?se:re,width:Math.abs(le-ee),height:Math.abs(se-re)},Se=M.current,ue=I.current;M.current=new Set(Yr(K,ye,H,n===Jt.Partial,!0).map(X=>X.id)),I.current=new Set;const me=ce?.selectable??!0;for(const X of M.current){const de=Y.get(X);if(de)for(const{edgeId:be}of de.values()){const Te=Z.get(be);Te&&(Te.selectable??me)&&I.current.add(be)}}if(!Ui(Se,M.current)){const X=Yt(K,M.current,!0);ne(X)}if(!Ui(ue,I.current)){const X=Yt(Z,I.current);J(X)}g.setState({userSelectionRect:ye,userSelectionActive:!0,nodesSelectionActive:!1})},k=N=>{if(N.button!==0||!B.current)return;N.target?.releasePointerCapture?.(N.pointerId);const{userSelectionRect:F}=g.getState();!E&&F&&N.target===C.current&&z?.(N),g.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:M.current.size>0}),l?.(N),(t||r)&&(A.current=!1),B.current=!1},L=s===!0||Array.isArray(s)&&s.includes(0);return o.jsxRuntimeExports.jsxs("div",{className:Le(["react-flow__pane",{draggable:L,dragging:R,selection:e}]),onClick:y?void 0:So(z,C),onContextMenu:So($,C),onWheel:So(D,C),onPointerEnter:y?void 0:x,onPointerDown:y?V:p,onPointerMove:y?b:p,onPointerUp:y?k:void 0,onPointerLeave:m,ref:C,style:Gs,children:[h,o.jsxRuntimeExports.jsx(CR,{})]})}function Uo({id:e,store:t,unselect:n=!1,nodeRef:s}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:l,nodeLookup:a,onError:c}=t.getState(),d=a.get(e);if(!d){c?.("012",Oe.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&l)&&(i({nodes:[d],edges:[]}),requestAnimationFrame(()=>s?.current?.blur())):r([e])}function Pd({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:s,nodeId:r,isSelectable:i,nodeClickDistance:l}){const a=ve(),[c,d]=j.useState(!1),x=j.useRef();return j.useEffect(()=>{x.current=cS({getStoreItems:()=>a.getState(),onNodeMouseDown:p=>{Uo({id:p,store:a,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),j.useEffect(()=>{if(t)x.current?.destroy();else if(e.current)return x.current?.update({noDragClassName:n,handleSelector:s,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:l}),()=>{x.current?.destroy()}},[n,s,t,i,e,r]),c}const vR=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Td(){const e=ve();return j.useCallback(n=>{const{nodeExtent:s,snapToGrid:r,snapGrid:i,nodesDraggable:l,onError:a,updateNodePositions:c,nodeLookup:d,nodeOrigin:x}=e.getState(),p=new Map,m=vR(l),h=r?i[0]:5,g=r?i[1]:5,E=n.direction.x*h*n.factor,S=n.direction.y*g*n.factor;for(const[,R]of d){if(!m(R))continue;let v={x:R.internals.positionAbsolute.x+E,y:R.internals.positionAbsolute.y+S};r&&(v=Hs(v,i));const{position:y,positionAbsolute:C}=Xu({nodeId:R.id,nextPosition:v,nodeLookup:d,nodeExtent:s,nodeOrigin:x,onError:a});R.position=y,R.internals.positionAbsolute=C,p.set(R.id,R)}c(p)},[])}const Jr=j.createContext(null),_R=Jr.Provider;Jr.Consumer;const Id=()=>j.useContext(Jr),kR=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),LR=(e,t,n)=>s=>{const{connectionClickStartHandle:r,connectionMode:i,connection:l}=s,{fromHandle:a,toHandle:c,isValid:d}=l,x=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:a?.nodeId===e&&a?.id===t&&a?.type===n,connectingTo:x,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:i===Pt.Strict?a?.type!==n:e!==a?.nodeId||t!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!r,valid:x&&d}};function MR({type:e="source",position:t=Q.Top,isValidConnection:n,isConnectable:s=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:l,onConnect:a,children:c,className:d,onMouseDown:x,onTouchStart:p,...m},h){const g=l||null,E=e==="target",S=ve(),R=Id(),{connectOnClick:v,noPanClassName:y,rfId:C}=je(kR,_e),{connectingFrom:_,connectingTo:M,clickConnecting:I,isPossibleEndHandle:A,connectionInProcess:B,clickConnectionInProcess:z,valid:$}=je(LR(R,g,e),_e);R||S.getState().onError?.("010",Oe.error010());const D=k=>{const{defaultEdgeOptions:L,onConnect:N,hasDefaultEdges:F}=S.getState(),H={...L,...k};if(F){const{edges:K,setEdges:Z}=S.getState();Z(cd(H,K))}N?.(H),a?.(H)},V=k=>{if(!R)return;const L=od(k.nativeEvent);if(r&&(L&&k.button===0||!L)){const N=S.getState();Go.onPointerDown(k.nativeEvent,{autoPanOnConnect:N.autoPanOnConnect,connectionMode:N.connectionMode,connectionRadius:N.connectionRadius,domNode:N.domNode,nodeLookup:N.nodeLookup,lib:N.lib,isTarget:E,handleId:g,nodeId:R,flowId:N.rfId,panBy:N.panBy,cancelConnection:N.cancelConnection,onConnectStart:N.onConnectStart,onConnectEnd:N.onConnectEnd,updateConnection:N.updateConnection,onConnect:D,isValidConnection:n||N.isValidConnection,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:N.autoPanSpeed,dragThreshold:N.connectionDragThreshold})}L?x?.(k):p?.(k)},b=k=>{const{onClickConnectStart:L,onClickConnectEnd:N,connectionClickStartHandle:F,connectionMode:H,isValidConnection:K,lib:Z,rfId:Y,nodeLookup:ne,connection:J}=S.getState();if(!R||!F&&!r)return;if(!F){L?.(k.nativeEvent,{nodeId:R,handleId:g,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:R,type:e,id:g}});return}const ce=nd(k.target),le=n||K,{connection:se,isValid:ee}=Go.isValid(k.nativeEvent,{handle:{nodeId:R,id:g,type:e},connectionMode:H,fromNodeId:F.nodeId,fromHandleId:F.id||null,fromType:F.type,isValidConnection:le,flowId:Y,doc:ce,lib:Z,nodeLookup:ne});ee&&se&&D(se);const re=structuredClone(J);delete re.inProgress,re.toPosition=re.toHandle?re.toHandle.position:null,N?.(k,re),S.setState({connectionClickStartHandle:null})};return o.jsxRuntimeExports.jsx("div",{"data-handleid":g,"data-nodeid":R,"data-handlepos":t,"data-id":`${C}-${R}-${g}-${e}`,className:Le(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,d,{source:!E,target:E,connectable:s,connectablestart:r,connectableend:i,clickconnecting:I,connectingfrom:_,connectingto:M,valid:$,connectionindicator:s&&(!B||A)&&(B||z?i:r)}]),onMouseDown:V,onTouchStart:V,onClick:v?b:void 0,ref:h,...m,children:c})}const Nn=j.memo(Md(MR));function NR({data:e,isConnectable:t,sourcePosition:n=Q.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e?.label,o.jsxRuntimeExports.jsx(Nn,{type:"source",position:n,isConnectable:t})]})}function PR({data:e,isConnectable:t,targetPosition:n=Q.Top,sourcePosition:s=Q.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Nn,{type:"target",position:n,isConnectable:t}),e?.label,o.jsxRuntimeExports.jsx(Nn,{type:"source",position:s,isConnectable:t})]})}function TR(){return null}function IR({data:e,isConnectable:t,targetPosition:n=Q.Top}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Nn,{type:"target",position:n,isConnectable:t}),e?.label]})}const _s={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},bl={input:NR,default:PR,output:IR,group:TR};function OR(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const AR=e=>{const{width:t,height:n,x:s,y:r}=$n(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ue(t)?t:null,height:Ue(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 DR({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const s=ve(),{width:r,height:i,transformString:l,userSelectionActive:a}=je(AR,_e),c=Td(),d=j.useRef(null);if(j.useEffect(()=>{n||d.current?.focus({preventScroll:!0})},[n]),Pd({nodeRef:d}),a||!r||!i)return null;const x=e?m=>{const h=s.getState().nodes.filter(g=>g.selected);e(m,h)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(_s,m.key)&&(m.preventDefault(),c({direction:_s[m.key],factor:m.shiftKey?4:1}))};return o.jsxRuntimeExports.jsx("div",{className:Le(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:o.jsxRuntimeExports.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:r,height:i}})})}const vl=typeof window<"u"?window:void 0,BR=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Od({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,paneClickDistance:a,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:x,selectionMode:p,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:E,zoomActivationKeyCode:S,elementsSelectable:R,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:_,panOnScrollMode:M,zoomOnDoubleClick:I,panOnDrag:A,defaultViewport:B,translateExtent:z,minZoom:$,maxZoom:D,preventScrolling:V,onSelectionContextMenu:b,noWheelClassName:k,noPanClassName:L,disableKeyboardA11y:N,onViewportChange:F,isControlledViewport:H}){const{nodesSelectionActive:K,userSelectionActive:Z}=je(BR),Y=Mn(d,{target:vl}),ne=Mn(E,{target:vl}),J=ne||A,ce=ne||C,le=x&&J!==!0,se=Y||Z||le;return jR({deleteKeyCode:c,multiSelectionKeyCode:g}),o.jsxRuntimeExports.jsx(SR,{onPaneContextMenu:i,elementsSelectable:R,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:ce,panOnScrollSpeed:_,panOnScrollMode:M,zoomOnDoubleClick:I,panOnDrag:!Y&&J,defaultViewport:B,translateExtent:z,minZoom:$,maxZoom:D,zoomActivationKeyCode:S,preventScrolling:V,noWheelClassName:k,noPanClassName:L,onViewportChange:F,isControlledViewport:H,paneClickDistance:a,children:o.jsxRuntimeExports.jsxs(bR,{onSelectionStart:m,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,panOnDrag:J,isSelecting:!!se,selectionMode:p,selectionKeyPressed:Y,selectionOnDrag:le,children:[e,K&&o.jsxRuntimeExports.jsx(DR,{onSelectionContextMenu:b,noPanClassName:L,disableKeyboardA11y:N})]})})}Od.displayName="FlowRenderer";const $R=j.memo(Od),zR=e=>t=>e?Yr(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 VR(e){return je(j.useCallback(zR(e),[e]),_e)}const FR=e=>e.updateNodeInternals;function HR(){const e=je(FR),[t]=j.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 j.useEffect(()=>()=>{t?.disconnect()},[t]),t}function ZR({node:e,nodeType:t,hasDimensions:n,resizeObserver:s}){const r=ve(),i=j.useRef(null),l=j.useRef(null),a=j.useRef(e.sourcePosition),c=j.useRef(e.targetPosition),d=j.useRef(t),x=n&&!!e.internals.handleBounds;return j.useEffect(()=>{i.current&&!e.hidden&&(!x||l.current!==i.current)&&(l.current&&s?.unobserve(l.current),s?.observe(i.current),l.current=i.current)},[x,e.hidden]),j.useEffect(()=>()=>{l.current&&(s?.unobserve(l.current),l.current=null)},[]),j.useEffect(()=>{if(i.current){const p=d.current!==t,m=a.current!==e.sourcePosition,h=c.current!==e.targetPosition;(p||m||h)&&(d.current=t,a.current=e.sourcePosition,c.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 KR({id:e,onClick:t,onMouseEnter:n,onMouseMove:s,onMouseLeave:r,onContextMenu:i,onDoubleClick:l,nodesDraggable:a,elementsSelectable:c,nodesConnectable:d,nodesFocusable:x,resizeObserver:p,noDragClassName:m,noPanClassName:h,disableKeyboardA11y:g,rfId:E,nodeTypes:S,nodeClickDistance:R,onError:v}){const{node:y,internals:C,isParent:_}=je(ee=>{const re=ee.nodeLookup.get(e),ye=ee.parentLookup.has(e);return{node:re,internals:re.internals,isParent:ye}},_e);let M=y.type||"default",I=S?.[M]||bl[M];I===void 0&&(v?.("003",Oe.error003(M)),M="default",I=bl.default);const A=!!(y.draggable||a&&typeof y.draggable>"u"),B=!!(y.selectable||c&&typeof y.selectable>"u"),z=!!(y.connectable||d&&typeof y.connectable>"u"),$=!!(y.focusable||x&&typeof y.focusable>"u"),D=ve(),V=ed(y),b=ZR({node:y,nodeType:M,hasDimensions:V,resizeObserver:p}),k=Pd({nodeRef:b,disabled:y.hidden||!A,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:B,nodeClickDistance:R}),L=Td();if(y.hidden)return null;const N=ut(y),F=OR(y),H=B||A||t||n||s||r,K=n?ee=>n(ee,{...C.userNode}):void 0,Z=s?ee=>s(ee,{...C.userNode}):void 0,Y=r?ee=>r(ee,{...C.userNode}):void 0,ne=i?ee=>i(ee,{...C.userNode}):void 0,J=l?ee=>l(ee,{...C.userNode}):void 0,ce=ee=>{const{selectNodesOnDrag:re,nodeDragThreshold:ye}=D.getState();B&&(!re||!A||ye>0)&&Uo({id:e,store:D,nodeRef:b}),t&&t(ee,{...C.userNode})},le=ee=>{if(!(sd(ee.nativeEvent)||g)){if(Ku.includes(ee.key)&&B){const re=ee.key==="Escape";Uo({id:e,store:D,unselect:re,nodeRef:b})}else if(A&&y.selected&&Object.prototype.hasOwnProperty.call(_s,ee.key)){ee.preventDefault();const{ariaLabelConfig:re}=D.getState();D.setState({ariaLiveMessage:re["node.a11yDescription.ariaLiveMessage"]({direction:ee.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),L({direction:_s[ee.key],factor:ee.shiftKey?4:1})}}},se=()=>{if(g||!b.current?.matches(":focus-visible"))return;const{transform:ee,width:re,height:ye,autoPanOnNodeFocus:Se,setCenter:ue}=D.getState();if(!Se)return;Yr(new Map([[e,y]]),{x:0,y:0,width:re,height:ye},ee,!0).length>0||ue(y.position.x+N.width/2,y.position.y+N.height/2,{zoom:ee[2]})};return o.jsxRuntimeExports.jsx("div",{className:Le(["react-flow__node",`react-flow__node-${M}`,{[h]:A},y.className,{selected:y.selected,selectable:B,parent:_,draggable:A,dragging:k}]),ref:b,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:H?"all":"none",visibility:V?"visible":"hidden",...y.style,...F},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:K,onMouseMove:Z,onMouseLeave:Y,onContextMenu:ne,onClick:ce,onDoubleClick:J,onKeyDown:$?le:void 0,tabIndex:$?0:void 0,onFocus:$?se:void 0,role:y.ariaRole??($?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${wd}-${E}`,"aria-label":y.ariaLabel,...y.domAttributes,children:o.jsxRuntimeExports.jsx(_R,{value:e,children:o.jsxRuntimeExports.jsx(I,{id:e,data:y.data,type:M,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:B,draggable:A,deletable:y.deletable??!0,isConnectable:z,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:k,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...N})})})}const YR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Ad(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,onError:i}=je(YR,_e),l=VR(e.onlyRenderVisibleElements),a=HR();return o.jsxRuntimeExports.jsx("div",{className:"react-flow__nodes",style:Gs,children:l.map(c=>o.jsxRuntimeExports.jsx(KR,{id:c,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:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}Ad.displayName="NodeRenderer";const GR=j.memo(Ad);function UR(e){return je(j.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&&Uy({sourceNode:i,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&s.push(r.id)}return s},[e]),_e)}const WR=({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"}),XR=({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"}),_l={[Rs.Arrow]:WR,[Rs.ArrowClosed]:XR};function qR(e){const t=ve();return j.useMemo(()=>Object.prototype.hasOwnProperty.call(_l,e)?_l[e]:(t.getState().onError?.("009",Oe.error009(e)),null),[e])}const QR=({id:e,type:t,color:n,width:s=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:l,orient:a="auto-start-reverse"})=>{const c=qR(t);return c?o.jsxRuntimeExports.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:o.jsxRuntimeExports.jsx(c,{color:n,strokeWidth:l})}):null},Dd=({defaultColor:e,rfId:t})=>{const n=je(i=>i.edges),s=je(i=>i.defaultEdgeOptions),r=j.useMemo(()=>tS(n,{id:t,defaultColor:e,defaultMarkerStart:s?.markerStart,defaultMarkerEnd:s?.markerEnd}),[n,s,t,e]);return r.length?o.jsxRuntimeExports.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:o.jsxRuntimeExports.jsx("defs",{children:r.map(i=>o.jsxRuntimeExports.jsx(QR,{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};Dd.displayName="MarkerDefinitions";var JR=j.memo(Dd);function Bd({x:e,y:t,label:n,labelStyle:s,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:l=[2,4],labelBgBorderRadius:a=2,children:c,className:d,...x}){const[p,m]=j.useState({x:1,y:0,width:0,height:0}),h=Le(["react-flow__edge-textwrapper",d]),g=j.useRef(null);return j.useEffect(()=>{if(g.current){const E=g.current.getBBox();m({x:E.x,y:E.y,width:E.width,height:E.height})}},[n]),n?o.jsxRuntimeExports.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:h,visibility:p.width?"visible":"hidden",...x,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:a,ry:a}),o.jsxRuntimeExports.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:g,style:s,children:n}),c]}):null}Bd.displayName="EdgeText";const e4=j.memo(Bd);function We({path:e,labelX:t,labelY:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:a,labelBgBorderRadius:c,interactionWidth:d=20,...x}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{...x,d:e,fill:"none",className:Le(["react-flow__edge-path",x.className])}),d&&o.jsxRuntimeExports.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),s&&Ue(t)&&Ue(n)?o.jsxRuntimeExports.jsx(e4,{x:t,y:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:a,labelBgBorderRadius:c}):null]})}function kl({pos:e,x1:t,y1:n,x2:s,y2:r}){return e===Q.Left||e===Q.Right?[.5*(t+s),n]:[t,.5*(n+r)]}function $d({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:s,targetY:r,targetPosition:i=Q.Top}){const[l,a]=kl({pos:n,x1:e,y1:t,x2:s,y2:r}),[c,d]=kl({pos:i,x1:s,y1:r,x2:e,y2:t}),[x,p,m,h]=rd({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:l,sourceControlY:a,targetControlX:c,targetControlY:d});return[`M${e},${t} C${l},${a} ${c},${d} ${s},${r}`,x,p,m,h]}function zd(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l,targetPosition:a,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,interactionWidth:R})=>{const[v,y,C]=$d({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:a}),_=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:_,path:v,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,interactionWidth:R})})}const t4=zd({isInternal:!1}),Vd=zd({isInternal:!0});t4.displayName="SimpleBezierEdge";Vd.displayName="SimpleBezierEdgeInternal";function Fd(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,sourcePosition:h=Q.Bottom,targetPosition:g=Q.Top,markerEnd:E,markerStart:S,pathOptions:R,interactionWidth:v})=>{const[y,C,_]=Zo({sourceX:n,sourceY:s,sourcePosition:h,targetX:r,targetY:i,targetPosition:g,borderRadius:R?.borderRadius,offset:R?.offset}),M=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:M,path:y,labelX:C,labelY:_,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:E,markerStart:S,interactionWidth:v})})}const Hd=Fd({isInternal:!1}),Zd=Fd({isInternal:!0});Hd.displayName="SmoothStepEdge";Zd.displayName="SmoothStepEdgeInternal";function Kd(e){return j.memo(({id:t,...n})=>{const s=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Hd,{...n,id:s,pathOptions:j.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const n4=Kd({isInternal:!1}),Yd=Kd({isInternal:!0});n4.displayName="StepEdge";Yd.displayName="StepEdgeInternal";function Gd(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:E})=>{const[S,R,v]=ud({sourceX:n,sourceY:s,targetX:r,targetY:i}),y=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:y,path:S,labelX:R,labelY:v,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:E})})}const s4=Gd({isInternal:!1}),Ud=Gd({isInternal:!0});s4.displayName="StraightEdge";Ud.displayName="StraightEdgeInternal";function Wd(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l=Q.Bottom,targetPosition:a=Q.Top,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,pathOptions:R,interactionWidth:v})=>{const[y,C,_]=id({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:a,curvature:R?.curvature}),M=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:M,path:y,labelX:C,labelY:_,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,interactionWidth:v})})}const o4=Wd({isInternal:!1}),Xd=Wd({isInternal:!0});o4.displayName="BezierEdge";Xd.displayName="BezierEdgeInternal";const Ll={default:Xd,straight:Ud,step:Yd,smoothstep:Zd,simplebezier:Vd},Ml={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},r4=(e,t,n)=>n===Q.Left?e-t:n===Q.Right?e+t:e,i4=(e,t,n)=>n===Q.Top?e-t:n===Q.Bottom?e+t:e,Nl="react-flow__edgeupdater";function Pl({position:e,centerX:t,centerY:n,radius:s=10,onMouseDown:r,onMouseEnter:i,onMouseOut:l,type:a}){return o.jsxRuntimeExports.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:l,className:Le([Nl,`${Nl}-${a}`]),cx:r4(t,s,e),cy:i4(n,s,e),r:s,stroke:"transparent",fill:"transparent"})}function l4({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:s,sourceY:r,targetX:i,targetY:l,sourcePosition:a,targetPosition:c,onReconnect:d,onReconnectStart:x,onReconnectEnd:p,setReconnecting:m,setUpdateHover:h}){const g=ve(),E=(C,_)=>{if(C.button!==0)return;const{autoPanOnConnect:M,domNode:I,isValidConnection:A,connectionMode:B,connectionRadius:z,lib:$,onConnectStart:D,onConnectEnd:V,cancelConnection:b,nodeLookup:k,rfId:L,panBy:N,updateConnection:F}=g.getState(),H=_.type==="target",K=(ne,J)=>{m(!1),p?.(ne,n,_.type,J)},Z=ne=>d?.(n,ne),Y=(ne,J)=>{m(!0),x?.(C,n,_.type),D?.(ne,J)};Go.onPointerDown(C.nativeEvent,{autoPanOnConnect:M,connectionMode:B,connectionRadius:z,domNode:I,handleId:_.id,nodeId:_.nodeId,nodeLookup:k,isTarget:H,edgeUpdaterType:_.type,lib:$,flowId:L,cancelConnection:b,panBy:N,isValidConnection:A,onConnect:Z,onConnectStart:Y,onConnectEnd:V,onReconnectEnd:K,updateConnection:F,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold})},S=C=>E(C,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),R=C=>E(C,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>h(!0),y=()=>h(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(e===!0||e==="source")&&o.jsxRuntimeExports.jsx(Pl,{position:a,centerX:s,centerY:r,radius:t,onMouseDown:S,onMouseEnter:v,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&o.jsxRuntimeExports.jsx(Pl,{position:c,centerX:i,centerY:l,radius:t,onMouseDown:R,onMouseEnter:v,onMouseOut:y,type:"target"})]})}function a4({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:s,onClick:r,onDoubleClick:i,onContextMenu:l,onMouseEnter:a,onMouseMove:c,onMouseLeave:d,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,rfId:g,edgeTypes:E,noPanClassName:S,onError:R,disableKeyboardA11y:v}){let y=je(ue=>ue.edgeLookup.get(e));const C=je(ue=>ue.defaultEdgeOptions);y=C?{...C,...y}:y;let _=y.type||"default",M=E?.[_]||Ll[_];M===void 0&&(R?.("011",Oe.error011(_)),_="default",M=Ll.default);const I=!!(y.focusable||t&&typeof y.focusable>"u"),A=typeof p<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),B=!!(y.selectable||s&&typeof y.selectable>"u"),z=j.useRef(null),[$,D]=j.useState(!1),[V,b]=j.useState(!1),k=ve(),{zIndex:L,sourceX:N,sourceY:F,targetX:H,targetY:K,sourcePosition:Z,targetPosition:Y}=je(j.useCallback(ue=>{const me=ue.nodeLookup.get(y.source),X=ue.nodeLookup.get(y.target);if(!me||!X)return{zIndex:y.zIndex,...Ml};const de=eS({id:e,sourceNode:me,targetNode:X,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:ue.connectionMode,onError:R});return{zIndex:Gy({selected:y.selected,zIndex:y.zIndex,sourceNode:me,targetNode:X,elevateOnSelect:ue.elevateEdgesOnSelect}),...de||Ml}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),_e),ne=j.useMemo(()=>y.markerStart?`url('#${Ko(y.markerStart,g)}')`:void 0,[y.markerStart,g]),J=j.useMemo(()=>y.markerEnd?`url('#${Ko(y.markerEnd,g)}')`:void 0,[y.markerEnd,g]);if(y.hidden||N===null||F===null||H===null||K===null)return null;const ce=ue=>{const{addSelectedEdges:me,unselectNodesAndEdges:X,multiSelectionActive:de}=k.getState();B&&(k.setState({nodesSelectionActive:!1}),y.selected&&de?(X({nodes:[],edges:[y]}),z.current?.blur()):me([e])),r&&r(ue,y)},le=i?ue=>{i(ue,{...y})}:void 0,se=l?ue=>{l(ue,{...y})}:void 0,ee=a?ue=>{a(ue,{...y})}:void 0,re=c?ue=>{c(ue,{...y})}:void 0,ye=d?ue=>{d(ue,{...y})}:void 0,Se=ue=>{if(!v&&Ku.includes(ue.key)&&B){const{unselectNodesAndEdges:me,addSelectedEdges:X}=k.getState();ue.key==="Escape"?(z.current?.blur(),me({edges:[y]})):X([e])}};return o.jsxRuntimeExports.jsx("svg",{style:{zIndex:L},children:o.jsxRuntimeExports.jsxs("g",{className:Le(["react-flow__edge",`react-flow__edge-${_}`,y.className,S,{selected:y.selected,animated:y.animated,inactive:!B&&!r,updating:$,selectable:B}]),onClick:ce,onDoubleClick:le,onContextMenu:se,onMouseEnter:ee,onMouseMove:re,onMouseLeave:ye,onKeyDown:I?Se:void 0,tabIndex:I?0:void 0,role:y.ariaRole??(I?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":I?`${bd}-${g}`:void 0,ref:z,...y.domAttributes,children:[!V&&o.jsxRuntimeExports.jsx(M,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:B,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:N,sourceY:F,targetX:H,targetY:K,sourcePosition:Z,targetPosition:Y,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:ne,markerEnd:J,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),A&&o.jsxRuntimeExports.jsx(l4,{edge:y,isReconnectable:A,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,sourceX:N,sourceY:F,targetX:H,targetY:K,sourcePosition:Z,targetPosition:Y,setUpdateHover:D,setReconnecting:b})]})})}const c4=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function qd({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:s,noPanClassName:r,onReconnect:i,onEdgeContextMenu:l,onEdgeMouseEnter:a,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:x,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:E}){const{edgesFocusable:S,edgesReconnectable:R,elementsSelectable:v,onError:y}=je(c4,_e),C=UR(t);return o.jsxRuntimeExports.jsxs("div",{className:"react-flow__edges",children:[o.jsxRuntimeExports.jsx(JR,{defaultColor:e,rfId:n}),C.map(_=>o.jsxRuntimeExports.jsx(a4,{id:_,edgesFocusable:S,edgesReconnectable:R,elementsSelectable:v,noPanClassName:r,onReconnect:i,onContextMenu:l,onMouseEnter:a,onMouseMove:c,onMouseLeave:d,onClick:x,reconnectRadius:p,onDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,rfId:n,onError:y,edgeTypes:s,disableKeyboardA11y:E},_))]})}qd.displayName="EdgeRenderer";const u4=j.memo(qd),d4=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function x4({children:e}){const t=je(d4);return o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function p4(e){const t=Bt(),n=j.useRef(!1);j.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const m4=e=>e.panZoom?.syncViewport;function f4(e){const t=je(m4),n=ve();return j.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function h4(e){return e.connection.inProgress?{...e.connection,to:zn(e.connection.to,e.transform)}:{...e.connection}}function g4(e){return h4}function j4(e){const t=g4();return je(t,_e)}const E4=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function y4({containerStyle:e,style:t,type:n,component:s}){const{nodesConnectable:r,width:i,height:l,isValid:a,inProgress:c}=je(E4,_e);return!(i&&r&&c)?null:o.jsxRuntimeExports.jsx("svg",{style:e,width:i,height:l,className:"react-flow__connectionline react-flow__container",children:o.jsxRuntimeExports.jsx("g",{className:Le(["react-flow__connection",Uu(a)]),children:o.jsxRuntimeExports.jsx(Qd,{style:t,type:n,CustomComponent:s,isValid:a})})})}const Qd=({style:e,type:t=ft.Bezier,CustomComponent:n,isValid:s})=>{const{inProgress:r,from:i,fromNode:l,fromHandle:a,fromPosition:c,to:d,toNode:x,toHandle:p,toPosition:m}=j4();if(!r)return;if(n)return o.jsxRuntimeExports.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:a,fromX:i.x,fromY:i.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:Uu(s),toNode:x,toHandle:p});let h="";const g={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(t){case ft.Bezier:[h]=id(g);break;case ft.SimpleBezier:[h]=$d(g);break;case ft.Step:[h]=Zo({...g,borderRadius:0});break;case ft.SmoothStep:[h]=Zo(g);break;default:[h]=ud(g)}return o.jsxRuntimeExports.jsx("path",{d:h,fill:"none",className:"react-flow__connection-path",style:e})};Qd.displayName="ConnectionLine";const S4={};function Tl(e=S4){const t=j.useRef(e),n=ve();j.useEffect(()=>{if(process.env.NODE_ENV==="development"){const s=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const r of s)if(t.current[r]!==e[r]){n.getState().onError?.("002",Oe.error002());break}t.current=e}},[e])}function R4(){const e=ve(),t=j.useRef(!1);j.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",Oe.error013("react")),t.current=!0}},[])}function Jd({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:s,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:l,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:x,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:E,connectionLineComponent:S,connectionLineContainerStyle:R,selectionKeyCode:v,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:_,panActivationKeyCode:M,zoomActivationKeyCode:I,deleteKeyCode:A,onlyRenderVisibleElements:B,elementsSelectable:z,defaultViewport:$,translateExtent:D,minZoom:V,maxZoom:b,preventScrolling:k,defaultMarkerColor:L,zoomOnScroll:N,zoomOnPinch:F,panOnScroll:H,panOnScrollSpeed:K,panOnScrollMode:Z,zoomOnDoubleClick:Y,panOnDrag:ne,onPaneClick:J,onPaneMouseEnter:ce,onPaneMouseMove:le,onPaneMouseLeave:se,onPaneScroll:ee,onPaneContextMenu:re,paneClickDistance:ye,nodeClickDistance:Se,onEdgeContextMenu:ue,onEdgeMouseEnter:me,onEdgeMouseMove:X,onEdgeMouseLeave:de,reconnectRadius:be,onReconnect:Te,onReconnectStart:et,onReconnectEnd:Hn,noDragClassName:Zn,noWheelClassName:Kn,noPanClassName:cn,disableKeyboardA11y:un,nodeExtent:Qs,rfId:Yn,viewport:Ft,onViewportChange:dn}){return Tl(e),Tl(t),R4(),p4(n),f4(Ft),o.jsxRuntimeExports.jsx($R,{onPaneClick:J,onPaneMouseEnter:ce,onPaneMouseMove:le,onPaneMouseLeave:se,onPaneContextMenu:re,onPaneScroll:ee,paneClickDistance:ye,deleteKeyCode:A,selectionKeyCode:v,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:_,panActivationKeyCode:M,zoomActivationKeyCode:I,elementsSelectable:z,zoomOnScroll:N,zoomOnPinch:F,zoomOnDoubleClick:Y,panOnScroll:H,panOnScrollSpeed:K,panOnScrollMode:Z,panOnDrag:ne,defaultViewport:$,translateExtent:D,minZoom:V,maxZoom:b,onSelectionContextMenu:p,preventScrolling:k,noDragClassName:Zn,noWheelClassName:Kn,noPanClassName:cn,disableKeyboardA11y:un,onViewportChange:dn,isControlledViewport:!!Ft,children:o.jsxRuntimeExports.jsxs(x4,{children:[o.jsxRuntimeExports.jsx(u4,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:l,onReconnect:Te,onReconnectStart:et,onReconnectEnd:Hn,onlyRenderVisibleElements:B,onEdgeContextMenu:ue,onEdgeMouseEnter:me,onEdgeMouseMove:X,onEdgeMouseLeave:de,reconnectRadius:be,defaultMarkerColor:L,noPanClassName:cn,disableKeyboardA11y:un,rfId:Yn}),o.jsxRuntimeExports.jsx(y4,{style:E,type:g,component:S,containerStyle:R}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__edgelabel-renderer"}),o.jsxRuntimeExports.jsx(GR,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:x,nodeClickDistance:Se,onlyRenderVisibleElements:B,noPanClassName:cn,noDragClassName:Zn,disableKeyboardA11y:un,nodeExtent:Qs,rfId:Yn}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport-portal"})]})})}Jd.displayName="GraphView";const C4=j.memo(Jd),Il=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,fitViewOptions:a,minZoom:c=.5,maxZoom:d=2,nodeOrigin:x,nodeExtent:p}={})=>{const m=new Map,h=new Map,g=new Map,E=new Map,S=s??t??[],R=n??e??[],v=x??[0,0],y=p??_n;xd(g,E,S);const C=Yo(R,m,h,{nodeOrigin:v,nodeExtent:y,elevateNodesOnSelect:!1});let _=[0,0,1];if(l&&r&&i){const M=$n(m,{filter:z=>!!((z.width||z.initialWidth)&&(z.height||z.initialHeight))}),{x:I,y:A,zoom:B}=Gr(M,r,i,c,d,a?.padding??.1);_=[I,A,B]}return{rfId:"1",width:0,height:0,transform:_,nodes:R,nodesInitialized:C,nodeLookup:m,parentLookup:h,edges:S,edgeLookup:E,connectionLookup:g,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:_n,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Pt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:v,nodeDragThreshold:1,connectionDragThreshold: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:a,fitViewResolver:null,connection:{...Gu},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ws,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Yu}},w4=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,fitViewOptions:a,minZoom:c,maxZoom:d,nodeOrigin:x,nodeExtent:p})=>ZS((m,h)=>{async function g(){const{nodeLookup:E,panZoom:S,fitViewOptions:R,fitViewResolver:v,width:y,height:C,minZoom:_,maxZoom:M}=h();S&&(await zy({nodes:E,width:y,height:C,panZoom:S,minZoom:_,maxZoom:M},R),v?.resolve(!0),m({fitViewResolver:null}))}return{...Il({nodes:e,edges:t,width:r,height:i,fitView:l,fitViewOptions:a,minZoom:c,maxZoom:d,nodeOrigin:x,nodeExtent:p,defaultNodes:n,defaultEdges:s}),setNodes:E=>{const{nodeLookup:S,parentLookup:R,nodeOrigin:v,elevateNodesOnSelect:y,fitViewQueued:C}=h(),_=Yo(E,S,R,{nodeOrigin:v,nodeExtent:p,elevateNodesOnSelect:y,checkEquality:!0});C&&_?(g(),m({nodes:E,nodesInitialized:_,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:E,nodesInitialized:_})},setEdges:E=>{const{connectionLookup:S,edgeLookup:R}=h();xd(S,R,E),m({edges:E})},setDefaultNodesAndEdges:(E,S)=>{if(E){const{setNodes:R}=h();R(E),m({hasDefaultNodes:!0})}if(S){const{setEdges:R}=h();R(S),m({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:S,nodeLookup:R,parentLookup:v,domNode:y,nodeOrigin:C,nodeExtent:_,debug:M,fitViewQueued:I}=h(),{changes:A,updatedInternals:B}=iS(E,R,v,y,C,_);B&&(sS(R,v,{nodeOrigin:C,nodeExtent:_}),I?(g(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),A?.length>0&&(M&&console.log("React Flow: trigger node changes",A),S?.(A)))},updateNodePositions:(E,S=!1)=>{const R=[],v=[],{nodeLookup:y,triggerNodeChanges:C}=h();for(const[_,M]of E){const I=y.get(_),A=!!(I?.expandParent&&I?.parentId&&M?.position),B={id:_,type:"position",position:A?{x:Math.max(0,M.position.x),y:Math.max(0,M.position.y)}:M.position,dragging:S};A&&I.parentId&&R.push({id:_,parentId:I.parentId,rect:{...M.internals.positionAbsolute,width:M.measured.width??0,height:M.measured.height??0}}),v.push(B)}if(R.length>0){const{parentLookup:_,nodeOrigin:M}=h(),I=Qr(R,y,_,M);v.push(...I)}C(v)},triggerNodeChanges:E=>{const{onNodesChange:S,setNodes:R,nodes:v,hasDefaultNodes:y,debug:C}=h();if(E?.length){if(y){const _=kd(E,v);R(_)}C&&console.log("React Flow: trigger node changes",E),S?.(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:S,setEdges:R,edges:v,hasDefaultEdges:y,debug:C}=h();if(E?.length){if(y){const _=Ld(E,v);R(_)}C&&console.log("React Flow: trigger edge changes",E),S?.(E)}},addSelectedNodes:E=>{const{multiSelectionActive:S,edgeLookup:R,nodeLookup:v,triggerNodeChanges:y,triggerEdgeChanges:C}=h();if(S){const _=E.map(M=>Ct(M,!0));y(_);return}y(Yt(v,new Set([...E]),!0)),C(Yt(R))},addSelectedEdges:E=>{const{multiSelectionActive:S,edgeLookup:R,nodeLookup:v,triggerNodeChanges:y,triggerEdgeChanges:C}=h();if(S){const _=E.map(M=>Ct(M,!0));C(_);return}C(Yt(R,new Set([...E]))),y(Yt(v,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:S}={})=>{const{edges:R,nodes:v,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:_}=h(),M=E||v,I=S||R,A=M.map(z=>{const $=y.get(z.id);return $&&($.selected=!1),Ct(z.id,!1)}),B=I.map(z=>Ct(z.id,!1));C(A),_(B)},setMinZoom:E=>{const{panZoom:S,maxZoom:R}=h();S?.setScaleExtent([E,R]),m({minZoom:E})},setMaxZoom:E=>{const{panZoom:S,minZoom:R}=h();S?.setScaleExtent([R,E]),m({maxZoom:E})},setTranslateExtent:E=>{h().panZoom?.setTranslateExtent(E),m({translateExtent:E})},setPaneClickDistance:E=>{h().panZoom?.setClickDistance(E)},resetSelectedElements:()=>{const{edges:E,nodes:S,triggerNodeChanges:R,triggerEdgeChanges:v,elementsSelectable:y}=h();if(!y)return;const C=S.reduce((M,I)=>I.selected?[...M,Ct(I.id,!1)]:M,[]),_=E.reduce((M,I)=>I.selected?[...M,Ct(I.id,!1)]:M,[]);R(C),v(_)},setNodeExtent:E=>{const{nodes:S,nodeLookup:R,parentLookup:v,nodeOrigin:y,elevateNodesOnSelect:C,nodeExtent:_}=h();E[0][0]===_[0][0]&&E[0][1]===_[0][1]&&E[1][0]===_[1][0]&&E[1][1]===_[1][1]||(Yo(S,R,v,{nodeOrigin:y,nodeExtent:E,elevateNodesOnSelect:C,checkEquality:!1}),m({nodeExtent:E}))},panBy:E=>{const{transform:S,width:R,height:v,panZoom:y,translateExtent:C}=h();return lS({delta:E,panZoom:y,transform:S,translateExtent:C,width:R,height:v})},setCenter:async(E,S,R)=>{const{width:v,height:y,maxZoom:C,panZoom:_}=h();if(!_)return Promise.resolve(!1);const M=typeof R?.zoom<"u"?R.zoom:C;return await _.setViewport({x:v/2-E*M,y:y/2-S*M,zoom:M},{duration:R?.duration,ease:R?.ease,interpolate:R?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...Gu}})},updateConnection:E=>{m({connection:E})},reset:()=>m({...Il()})}},Object.is);function ex({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:s,initialWidth:r,initialHeight:i,initialMinZoom:l,initialMaxZoom:a,initialFitViewOptions:c,fitView:d,nodeOrigin:x,nodeExtent:p,children:m}){const[h]=j.useState(()=>w4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:d,minZoom:l,maxZoom:a,fitViewOptions:c,nodeOrigin:x,nodeExtent:p}));return o.jsxRuntimeExports.jsx(KS,{value:h,children:o.jsxRuntimeExports.jsx(mR,{children:m})})}function b4({children:e,nodes:t,edges:n,defaultNodes:s,defaultEdges:r,width:i,height:l,fitView:a,fitViewOptions:c,minZoom:d,maxZoom:x,nodeOrigin:p,nodeExtent:m}){return j.useContext(Ks)?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e}):o.jsxRuntimeExports.jsx(ex,{initialNodes:t,initialEdges:n,defaultNodes:s,defaultEdges:r,initialWidth:i,initialHeight:l,fitView:a,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:x,nodeOrigin:p,nodeExtent:m,children:e})}const v4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function _4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,className:r,nodeTypes:i,edgeTypes:l,onNodeClick:a,onEdgeClick:c,onInit:d,onMove:x,onMoveStart:p,onMoveEnd:m,onConnect:h,onConnectStart:g,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:R,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:_,onNodeDoubleClick:M,onNodeDragStart:I,onNodeDrag:A,onNodeDragStop:B,onNodesDelete:z,onEdgesDelete:$,onDelete:D,onSelectionChange:V,onSelectionDragStart:b,onSelectionDrag:k,onSelectionDragStop:L,onSelectionContextMenu:N,onSelectionStart:F,onSelectionEnd:H,onBeforeDelete:K,connectionMode:Z,connectionLineType:Y=ft.Bezier,connectionLineStyle:ne,connectionLineComponent:J,connectionLineContainerStyle:ce,deleteKeyCode:le="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:ee=!1,selectionMode:re=Jt.Full,panActivationKeyCode:ye="Space",multiSelectionKeyCode:Se=vs()?"Meta":"Control",zoomActivationKeyCode:ue=vs()?"Meta":"Control",snapToGrid:me,snapGrid:X,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:be,nodesDraggable:Te,autoPanOnNodeFocus:et,nodesConnectable:Hn,nodesFocusable:Zn,nodeOrigin:Kn=vd,edgesFocusable:cn,edgesReconnectable:un,elementsSelectable:Qs=!0,defaultViewport:Yn=oR,minZoom:Ft=.5,maxZoom:dn=2,translateExtent:ii=_n,preventScrolling:Wf=!0,nodeExtent:Js,defaultMarkerColor:Xf="#b1b1b7",zoomOnScroll:qf=!0,zoomOnPinch:Qf=!0,panOnScroll:Jf=!1,panOnScrollSpeed:eh=.5,panOnScrollMode:th=bt.Free,zoomOnDoubleClick:nh=!0,panOnDrag:sh=!0,onPaneClick:oh,onPaneMouseEnter:rh,onPaneMouseMove:ih,onPaneMouseLeave:lh,onPaneScroll:ah,onPaneContextMenu:ch,paneClickDistance:li=0,nodeClickDistance:uh=0,children:dh,onReconnect:xh,onReconnectStart:ph,onReconnectEnd:mh,onEdgeContextMenu:fh,onEdgeDoubleClick:hh,onEdgeMouseEnter:gh,onEdgeMouseMove:jh,onEdgeMouseLeave:Eh,reconnectRadius:yh=10,onNodesChange:Sh,onEdgesChange:Rh,noDragClassName:Ch="nodrag",noWheelClassName:wh="nowheel",noPanClassName:ai="nopan",fitView:ci,fitViewOptions:ui,connectOnClick:bh,attributionPosition:vh,proOptions:_h,defaultEdgeOptions:kh,elevateNodesOnSelect:Lh,elevateEdgesOnSelect:Mh,disableKeyboardA11y:di=!1,autoPanOnConnect:Nh,autoPanOnNodeDrag:Ph,autoPanSpeed:Th,connectionRadius:Ih,isValidConnection:Oh,onError:Ah,style:Dh,id:xi,nodeDragThreshold:Bh,connectionDragThreshold:$h,viewport:zh,onViewportChange:Vh,width:Fh,height:Hh,colorMode:Zh="light",debug:Kh,onScroll:pi,ariaLabelConfig:Yh,...Gh},Uh){const eo=xi||"1",Wh=aR(Zh),Xh=j.useCallback(mi=>{mi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),pi?.(mi)},[pi]);return o.jsxRuntimeExports.jsx("div",{"data-testid":"rf__wrapper",...Gh,onScroll:Xh,style:{...Dh,...v4},ref:Uh,className:Le(["react-flow",r,Wh]),id:xi,role:"application",children:o.jsxRuntimeExports.jsxs(b4,{nodes:e,edges:t,width:Fh,height:Hh,fitView:ci,fitViewOptions:ui,minZoom:Ft,maxZoom:dn,nodeOrigin:Kn,nodeExtent:Js,children:[o.jsxRuntimeExports.jsx(C4,{onInit:d,onNodeClick:a,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:_,onNodeDoubleClick:M,nodeTypes:i,edgeTypes:l,connectionLineType:Y,connectionLineStyle:ne,connectionLineComponent:J,connectionLineContainerStyle:ce,selectionKeyCode:se,selectionOnDrag:ee,selectionMode:re,deleteKeyCode:le,multiSelectionKeyCode:Se,panActivationKeyCode:ye,zoomActivationKeyCode:ue,onlyRenderVisibleElements:de,defaultViewport:Yn,translateExtent:ii,minZoom:Ft,maxZoom:dn,preventScrolling:Wf,zoomOnScroll:qf,zoomOnPinch:Qf,zoomOnDoubleClick:nh,panOnScroll:Jf,panOnScrollSpeed:eh,panOnScrollMode:th,panOnDrag:sh,onPaneClick:oh,onPaneMouseEnter:rh,onPaneMouseMove:ih,onPaneMouseLeave:lh,onPaneScroll:ah,onPaneContextMenu:ch,paneClickDistance:li,nodeClickDistance:uh,onSelectionContextMenu:N,onSelectionStart:F,onSelectionEnd:H,onReconnect:xh,onReconnectStart:ph,onReconnectEnd:mh,onEdgeContextMenu:fh,onEdgeDoubleClick:hh,onEdgeMouseEnter:gh,onEdgeMouseMove:jh,onEdgeMouseLeave:Eh,reconnectRadius:yh,defaultMarkerColor:Xf,noDragClassName:Ch,noWheelClassName:wh,noPanClassName:ai,rfId:eo,disableKeyboardA11y:di,nodeExtent:Js,viewport:zh,onViewportChange:Vh}),o.jsxRuntimeExports.jsx(lR,{nodes:e,edges:t,defaultNodes:n,defaultEdges:s,onConnect:h,onConnectStart:g,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:R,nodesDraggable:Te,autoPanOnNodeFocus:et,nodesConnectable:Hn,nodesFocusable:Zn,edgesFocusable:cn,edgesReconnectable:un,elementsSelectable:Qs,elevateNodesOnSelect:Lh,elevateEdgesOnSelect:Mh,minZoom:Ft,maxZoom:dn,nodeExtent:Js,onNodesChange:Sh,onEdgesChange:Rh,snapToGrid:me,snapGrid:X,connectionMode:Z,translateExtent:ii,connectOnClick:bh,defaultEdgeOptions:kh,fitView:ci,fitViewOptions:ui,onNodesDelete:z,onEdgesDelete:$,onDelete:D,onNodeDragStart:I,onNodeDrag:A,onNodeDragStop:B,onSelectionDrag:k,onSelectionDragStart:b,onSelectionDragStop:L,onMove:x,onMoveStart:p,onMoveEnd:m,noPanClassName:ai,nodeOrigin:Kn,rfId:eo,autoPanOnConnect:Nh,autoPanOnNodeDrag:Ph,autoPanSpeed:Th,onError:Ah,connectionRadius:Ih,isValidConnection:Oh,selectNodesOnDrag:be,nodeDragThreshold:Bh,connectionDragThreshold:$h,onBeforeDelete:K,paneClickDistance:li,debug:Kh,ariaLabelConfig:Yh}),o.jsxRuntimeExports.jsx(sR,{onSelectionChange:V}),dh,o.jsxRuntimeExports.jsx(QS,{proOptions:_h,position:vh}),o.jsxRuntimeExports.jsx(qS,{rfId:eo,disableKeyboardA11y:di})]})})}var k4=Md(_4);function L4(){const e=ve();return j.useCallback(t=>{const{domNode:n,updateNodeInternals:s}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(l=>{const a=n?.querySelector(`.react-flow__node[data-id="${l}"]`);a&&i.set(l,{id:l,nodeElement:a,force:!0})}),requestAnimationFrame(()=>s(i,{triggerFitView:!1}))},[])}function M4({onStart:e,onChange:t,onEnd:n}){const s=ve();j.useEffect(()=>{s.setState({onViewportChangeStart:e})},[e]),j.useEffect(()=>{s.setState({onViewportChange:t})},[t]),j.useEffect(()=>{s.setState({onViewportChangeEnd:n})},[n])}function N4({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:Le(["react-flow__background-pattern",n,s])})}function P4({radius:e,className:t}){return o.jsxRuntimeExports.jsx("circle",{cx:e,cy:e,r:e,className:Le(["react-flow__background-pattern","dots",t])})}var gt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(gt||(gt={}));const T4={[gt.Dots]:1,[gt.Lines]:1,[gt.Cross]:6},I4=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function tx({id:e,variant:t=gt.Dots,gap:n=20,size:s,lineWidth:r=1,offset:i=0,color:l,bgColor:a,style:c,className:d,patternClassName:x}){const p=j.useRef(null),{transform:m,patternId:h}=je(I4,_e),g=s||T4[t],E=t===gt.Dots,S=t===gt.Cross,R=Array.isArray(n)?n:[n,n],v=[R[0]*m[2]||1,R[1]*m[2]||1],y=g*m[2],C=Array.isArray(i)?i:[i,i],_=S?[y,y]:v,M=[C[0]*m[2]||1+_[0]/2,C[1]*m[2]||1+_[1]/2],I=`${h}${e||""}`;return o.jsxRuntimeExports.jsxs("svg",{className:Le(["react-flow__background",d]),style:{...c,...Gs,"--xy-background-color-props":a,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[o.jsxRuntimeExports.jsx("pattern",{id:I,x:m[0]%v[0],y:m[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${M[0]},-${M[1]})`,children:E?o.jsxRuntimeExports.jsx(P4,{radius:y/2,className:x}):o.jsxRuntimeExports.jsx(N4,{dimensions:_,lineWidth:r,variant:t,className:x})}),o.jsxRuntimeExports.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${I})`})]})}tx.displayName="Background";const O4=j.memo(tx);function A4(){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 D4(){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 B4(){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 $4(){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 z4(){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:Le(["react-flow__controls-button",t]),...n,children:e})}const V4=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function nx({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:s=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:l,onFitView:a,onInteractiveChange:c,className:d,children:x,position:p="bottom-left",orientation:m="vertical","aria-label":h}){const g=ve(),{isInteractive:E,minZoomReached:S,maxZoomReached:R,ariaLabelConfig:v}=je(V4,_e),{zoomIn:y,zoomOut:C,fitView:_}=Bt(),M=()=>{y(),i?.()},I=()=>{C(),l?.()},A=()=>{_(r),a?.()},B=()=>{g.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),c?.(!E)},z=m==="horizontal"?"horizontal":"vertical";return o.jsxRuntimeExports.jsxs(Ys,{className:Le(["react-flow__controls",z,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":h??v["controls.ariaLabel"],children:[t&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ss,{onClick:M,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:R,children:o.jsxRuntimeExports.jsx(A4,{})}),o.jsxRuntimeExports.jsx(ss,{onClick:I,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:S,children:o.jsxRuntimeExports.jsx(D4,{})})]}),n&&o.jsxRuntimeExports.jsx(ss,{className:"react-flow__controls-fitview",onClick:A,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:o.jsxRuntimeExports.jsx(B4,{})}),s&&o.jsxRuntimeExports.jsx(ss,{className:"react-flow__controls-interactive",onClick:B,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:E?o.jsxRuntimeExports.jsx(z4,{}):o.jsxRuntimeExports.jsx($4,{})}),x]})}nx.displayName="Controls";j.memo(nx);function F4({id:e,x:t,y:n,width:s,height:r,style:i,color:l,strokeColor:a,strokeWidth:c,className:d,borderRadius:x,shapeRendering:p,selected:m,onClick:h}){const{background:g,backgroundColor:E}=i||{},S=l||g||E;return o.jsxRuntimeExports.jsx("rect",{className:Le(["react-flow__minimap-node",{selected:m},d]),x:t,y:n,rx:x,ry:x,width:s,height:r,style:{fill:S,stroke:a,strokeWidth:c},shapeRendering:p,onClick:h?R=>h(R,e):void 0})}const H4=j.memo(F4),Z4=e=>e.nodes.map(t=>t.id),Ro=e=>e instanceof Function?e:()=>e;function K4({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:s=5,nodeStrokeWidth:r,nodeComponent:i=H4,onClick:l}){const a=je(Z4,_e),c=Ro(t),d=Ro(e),x=Ro(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:a.map(m=>o.jsxRuntimeExports.jsx(G4,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:x,nodeBorderRadius:s,nodeStrokeWidth:r,NodeComponent:i,onClick:l,shapeRendering:p},m))})}function Y4({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:s,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:l,NodeComponent:a,onClick:c}){const{node:d,x,y:p,width:m,height:h}=je(g=>{const{internals:E}=g.nodeLookup.get(e),S=E.userNode,{x:R,y:v}=E.positionAbsolute,{width:y,height:C}=ut(S);return{node:S,x:R,y:v,width:y,height:C}},_e);return!d||d.hidden||!ed(d)?null:o.jsxRuntimeExports.jsx(a,{x,y:p,width:m,height:h,style:d.style,selected:!!d.selected,className:s(d),color:t(d),borderRadius:r,strokeColor:n(d),strokeWidth:i,shapeRendering:l,onClick:c,id:d.id})}const G4=j.memo(Y4);var U4=j.memo(K4);const W4=200,X4=150,q4=e=>!e.hidden,Q4=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?Ju($n(e.nodeLookup,{filter:q4}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},J4="react-flow__minimap-desc";function sx({style:e,className:t,nodeStrokeColor:n,nodeColor:s,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:l,nodeComponent:a,bgColor:c,maskColor:d,maskStrokeColor:x,maskStrokeWidth:p,position:m="bottom-right",onClick:h,onNodeClick:g,pannable:E=!1,zoomable:S=!1,ariaLabel:R,inversePan:v,zoomStep:y=10,offsetScale:C=5}){const _=ve(),M=j.useRef(null),{boundingRect:I,viewBB:A,rfId:B,panZoom:z,translateExtent:$,flowWidth:D,flowHeight:V,ariaLabelConfig:b}=je(Q4,_e),k=e?.width??W4,L=e?.height??X4,N=I.width/k,F=I.height/L,H=Math.max(N,F),K=H*k,Z=H*L,Y=C*H,ne=I.x-(K-I.width)/2-Y,J=I.y-(Z-I.height)/2-Y,ce=K+Y*2,le=Z+Y*2,se=`${J4}-${B}`,ee=j.useRef(0),re=j.useRef();ee.current=H,j.useEffect(()=>{if(M.current&&z)return re.current=fS({domNode:M.current,panZoom:z,getTransform:()=>_.getState().transform,getViewScale:()=>ee.current}),()=>{re.current?.destroy()}},[z]),j.useEffect(()=>{re.current?.update({translateExtent:$,width:D,height:V,inversePan:v,pannable:E,zoomStep:y,zoomable:S})},[E,S,v,y,$,D,V]);const ye=h?me=>{const[X,de]=re.current?.pointer(me)||[0,0];h(me,{x:X,y:de})}:void 0,Se=g?j.useCallback((me,X)=>{const de=_.getState().nodeLookup.get(X).internals.userNode;g(me,de)},[]):void 0,ue=R??b["minimap.ariaLabel"];return o.jsxRuntimeExports.jsx(Ys,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*H: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:Le(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:o.jsxRuntimeExports.jsxs("svg",{width:k,height:L,viewBox:`${ne} ${J} ${ce} ${le}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:M,onClick:ye,children:[ue&&o.jsxRuntimeExports.jsx("title",{id:se,children:ue}),o.jsxRuntimeExports.jsx(U4,{onClick:Se,nodeColor:s,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:l,nodeComponent:a}),o.jsxRuntimeExports.jsx("path",{className:"react-flow__minimap-mask",d:`M${ne-Y},${J-Y}h${ce+Y*2}v${le+Y*2}h${-ce-Y*2}z
|
|
39
|
-
M${A.x},${A.y}h${A.width}v${A.height}h${-A.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}sx.displayName="MiniMap";j.memo(sx);const eC=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,tC={[sn.Line]:"right",[sn.Handle]:"bottom-right"};function nC({nodeId:e,position:t,variant:n=sn.Handle,className:s,style:r=void 0,children:i,color:l,minWidth:a=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,autoScale:h=!0,shouldResize:g,onResizeStart:E,onResize:S,onResizeEnd:R}){const v=Id(),y=typeof e=="string"?e:v,C=ve(),_=j.useRef(null),M=n===sn.Handle,I=je(j.useCallback(eC(M&&h),[M,h]),_e),A=j.useRef(null),B=t??tC[n];j.useEffect(()=>{if(!(!_.current||!y))return A.current||(A.current=NS({domNode:_.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:$,transform:D,snapGrid:V,snapToGrid:b,nodeOrigin:k,domNode:L}=C.getState();return{nodeLookup:$,transform:D,snapGrid:V,snapToGrid:b,nodeOrigin:k,paneDomNode:L}},onChange:($,D)=>{const{triggerNodeChanges:V,nodeLookup:b,parentLookup:k,nodeOrigin:L}=C.getState(),N=[],F={x:$.x,y:$.y},H=b.get(y);if(H&&H.expandParent&&H.parentId){const K=H.origin??L,Z=$.width??H.measured.width??0,Y=$.height??H.measured.height??0,ne={id:H.id,parentId:H.parentId,rect:{width:Z,height:Y,...td({x:$.x??H.position.x,y:$.y??H.position.y},{width:Z,height:Y},H.parentId,b,K)}},J=Qr([ne],b,k,L);N.push(...J),F.x=$.x?Math.max(K[0]*Z,$.x):void 0,F.y=$.y?Math.max(K[1]*Y,$.y):void 0}if(F.x!==void 0&&F.y!==void 0){const K={id:y,type:"position",position:{...F}};N.push(K)}if($.width!==void 0&&$.height!==void 0){const Z={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:$.width,height:$.height}};N.push(Z)}for(const K of D){const Z={...K,type:"position"};N.push(Z)}V(N)},onEnd:({width:$,height:D})=>{const V={id:y,type:"dimensions",resizing:!1,dimensions:{width:$,height:D}};C.getState().triggerNodeChanges([V])}})),A.current.update({controlPosition:B,boundaries:{minWidth:a,minHeight:c,maxWidth:d,maxHeight:x},keepAspectRatio:p,resizeDirection:m,onResizeStart:E,onResize:S,onResizeEnd:R,shouldResize:g}),()=>{A.current?.destroy()}},[B,a,c,d,x,p,E,S,R,g]);const z=B.split("-");return o.jsxRuntimeExports.jsx("div",{className:Le(["react-flow__resize-control","nodrag",...z,n,s]),ref:_,style:{...r,scale:I,...l&&{[M?"backgroundColor":"borderColor"]:l}},children:i})}j.memo(nC);const sC=(e,t)=>e.map((n,s)=>u.K.translate(n,t[s])),ox=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:u.cr.cssString(t)},...n}),oC=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:u.cr.cssString(t),strokeDasharray:"12,4"},...n}),rC=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:u.cr.cssString(t),strokeDasharray:"12,4,4"},...n}),iC=({points:e,color:t,...n})=>{const s=u.K.calculateMiters(e,6),r=e.map((c,d)=>u.K.translate(c,s[d])),i=e.map((c,d)=>u.K.translate(c,u.K.scale(s[d],-1))),l=u.cr.cssString(t),a=.7;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(We,{path:jt(r),style:{stroke:l,opacity:a},...n}),o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:l},...n}),o.jsxRuntimeExports.jsx(We,{path:jt(i),style:{stroke:l,opacity:a},...n})]})},Ol=5,lC=(e,t)=>{const n=[],s=[];for(let a=0;a<e.length-1;a++){const c=u.K.distance(e[a],e[a+1]);s.push(c)}const r=t;let i=0,l=r;for(let a=0;a<s.length;a++){const c=s[a],d=e[a],x=e[a+1];for(;i+c>=l;){const p=(l-i)/c,m={x:d.x+p*(x.x-d.x),y:d.y+p*(x.y-d.y)};let h="x";Math.abs(x.x-d.x)<1&&(h="y"),l+=r,!(u.K.distance(m,x)<Ol||u.K.distance(m,d)<Ol)&&n.push({position:m,direction:h})}i+=c}return n},aC=({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.cr.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(270)`,strokeLinecap:"round"})},cC=({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.K.translateX(t,-10),l=45;return n==="y"&&(i=u.K.translateY(t,-10),l+=90),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.cr.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(${l})`,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.cr.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${i.x},${i.y}) rotate(${l})`,strokeLinecap:"round"})]})},uC=({color:e,position:t})=>o.jsxRuntimeExports.jsx("circle",{cx:t.x,cy:t.y,r:3,fill:"var(--pluto-gray-l0)",stroke:u.cr.cssString(e),strokeWidth:2}),ei=e=>{const t=({points:n,color:s,...r})=>{const i=jt(n),l=lC(n,40);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(We,{path:i,...r,style:{stroke:u.cr.cssString(s)}}),l.map(({position:a,direction:c},d)=>o.jsxRuntimeExports.jsx(e,{position:a,direction:c,color:s},d))]})};return t.displayName=`SymbolLine(${e.displayName})`,t},dC=ei(aC),xC=ei(cC),pC=ei(uC),jt=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],a=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-a)+l.x*a},${i.y*(1-a)+l.y*a}`),r===0?t+=`M${i.x},${i.y}`:r===0&&(t+=`M${i.x*(1-a)+l.x*a},${i.y*(1-a)+l.y*a}`),r===s-1?t+=`L${l.x},${l.y}`:r<s-1&&(t+=`L${i.x*a+l.x*(1-a)},${i.y*a+l.y*(1-a)}`)}return t},rx={pipe:ox,electric:oC,secondary:rC,jacketed:iC,hydraulic:dC,pneumatic:xC,data:pC},ix=ox,mC=[{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"}],fC=e=>o.jsxRuntimeExports.jsx(Pn,{data:mC,...e,resourceName:"Path Type"}),Us=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},Ae=(e,t)=>{const n=Us(t),s=e.getNodes().find(r=>r.id===t);if(s==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return u.Ho.construct(s.position,u._.scale(u.Ho.dims(u.Ho.construct(n)),1/e.getZoom()))},hC=(e,t)=>Ws.fromFlow(e,t);class lx{node_=null;position;orientation;constructor(t,n){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.K.translate(u.Ho.topLeft(this.node.box),this.position)}}class Ws{key;box;handles;constructor(t,n,s){this.key=t,this.box=n,this.handles=s,s.forEach(r=>r.node=this)}static fromFlow(t,n){const s=Ae(n,t),r=Us(t),i=r.getElementsByClassName("react-flow__handle"),l=u.Ho.construct(r),a=Array.from(i).map(c=>{const d=u.Ho.center(u.Ho.construct(c)),x=u.K.translation(u.Ho.topLeft(l),d),p=c.className.match(/react-flow__handle-(\w+)/);if(p==null)throw new Error("[schematic] - cannot find handle orientation");const m=u.K$1.construct(p[0]);return new lx(x,m)});return new Ws(t,s,a)}}const gC=({fromX:e,fromY:t,toX:n,toY:s,fromPosition:r,toPosition:i,fromNode:l,connectionLineStyle:a,connectionStatus:c})=>{const x=document.querySelector(".react-flow__handle-connecting")?.className.match(/react-flow__handle-(\w+)/);if(x!=null){const g=u.K$1.outer.safeParse(x[1]);g.success&&(i=g.data)}const p=Bt(),m=Zt({sourcePos:u.K.construct(e,t),targetPos:u.K.construct(n,s),sourceOrientation:r,targetOrientation:i,sourceBox:Ae(p,l?.id??""),targetBox:Ae(p,l?.id??"")}),h=pu(u.K.construct(e,t),m,p.getZoom(),!1);return o.jsxRuntimeExports.jsx(ix,{points:h,style:{...a,stroke:u.cr.cssString(c==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l11)"),strokeWidth:2,fill:"none"}})},jC=({id:e,source:t,target:n,sourcePosition:s,targetHandleId:r,targetPosition:i,style:l,segments:a=[],onSegmentsChange:c,color:d="var(--pluto-gray-l11)",selected:x=!1,variant:p="pipe",...m})=>{const h=u.K.construct(m.sourceX,m.sourceY),g=j.useRef(h),E=u.K.equals(h,g.current),S=u.K.construct(m.targetX,m.targetY),R=j.useRef(S),v=u.K.equals(S,R.current),y=Bt(),[C,_,M]=f.useCombinedStateAndRef(()=>a.length>0?a:Zt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ae(y,t),targetBox:Ae(y,n)})),I=j.useRef(i),A=j.useRef(s),B=Pe.useDebouncedCallback(c,100,[c]);if(!E||!v){let b=C;const k=u.K.translation(g.current,h),L=u.K.translation(S,R.current);u.K.equals(k,u.K.scale(L,-1),.001)?(g.current=h,R.current=S):(E?v||(b=_E({delta:L,segments:b}),I.current!==i&&(I.current=i,b=Zt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ae(y,t),targetBox:Ae(y,n)})),Pi({sourcePos:h,targetPos:S,next:b,prev:C})||(b=Zt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ae(y,t),targetBox:Ae(y,n)})),R.current=S):(b=vE({delta:k,segments:b}),A.current!==s&&(A.current=s,b=Zt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ae(y,t),targetBox:Ae(y,n)})),Pi({sourcePos:h,targetPos:S,next:b,prev:C})||(b=Zt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ae(y,t),targetBox:Ae(y,n)})),g.current=h),B(b),_(b))}const z=j.useRef(null),$=Pe.useCursorDrag({onStart:j.useCallback((b,k,L)=>{z.current={index:Number(L.currentTarget.id.split("-")[1]),segments:[...M.current]}},[]),onMove:j.useCallback(b=>{if(z.current==null)return;const k=RE({segments:z.current.segments,index:z.current.index,magnitude:u.Ho.dim(b,u.p.swap(z.current.segments[z.current.index].direction),!0)/y.getZoom()});_(k)},[]),onEnd:j.useCallback(()=>c(M.current),[c])}),D=pu(h,C,y.getZoom(),!0),V=rx[p];return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(V,{points:D,color:d}),x&&EC(D).map((b,k)=>{const L=C[k].direction,N=u.p.swap(L),F={[u.p.dimension(L)]:"18px",[u.p.dimension(N)]:"4px"},H={[L]:b[L]-9,[N]:b[N]-2};return o.jsxRuntimeExports.jsxs(j.Fragment,{children:[o.jsxRuntimeExports.jsx("rect",{className:u.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...F,...H,rx:"2px",ry:"2px"}),o.jsxRuntimeExports.jsx("foreignObject",{x:b.x-9,y:b.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(L)),draggable:!0,onDragStart:$})})]},k)})]})},EC=e=>e.slice(1).map((t,n)=>{const s=e[n];return u.K.construct((t.x+s.x)/2,(t.y+s.y)/2)}),yC=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:s={position:u.K.ZERO,zoom:1}})=>{const[r,i]=j.useState(n),[l,a]=j.useState("select"),[c,d]=j.useState(e),[x,p]=j.useState(t),[m,h]=j.useState(s),[g,E]=j.useState(!1);return{viewport:m,onViewportChange:h,edges:x,nodes:c,onNodesChange:d,onEdgesChange:p,editable:r,onEditableChange:i,fitViewOnResize:g,setFitViewOnResize:E,viewportMode:l,onViewportModeChange:a}},SC=()=>!0,RC={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1,nodeClickDistance:5,reconnectRadius:15,connectionRadius:30},CC={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},Wo={maxZoom:1,minZoom:.5,padding:.05},wC={hideAttribution:!0},ax=j.createContext({editable:!0,visible:!0,viewportMode:"select",onViewportModeChange:()=>{},onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),ln=()=>j.use(ax),cx=j.memo(({children:e})=>{const{registerNodeRenderer:t}=ln();return j.useEffect(()=>t(e),[t,e]),null});cx.displayName="NodeRenderer";const bC=["Backspace","Delete"],vC={panOnDrag:[f.MOUSE_LEFT_NUMBER,f.MOUSE_MIDDLE_NUMBER]},_C={selectionOnDrag:!0,panOnDrag:[f.MOUSE_MIDDLE_NUMBER]},kC=e=>e==="pan"?vC:_C,LC=({aetherKey:e,onNodesChange:t,onEdgesChange:n,nodes:s,edges:r,onEditableChange:i,editable:l,viewport:a,triggers:c,onViewportChange:d,fitViewOnResize:x,setFitViewOnResize:p,visible:m,dragHandleSelector:h,viewportMode:g,onViewportModeChange:E,...S})=>{const R=f.useMemoDeepEqual({visible:m}),[{path:v},,y]=f.use$2({aetherKey:e,type:O.Diagram$1.TYPE,schema:O.diagramStateZ,initialState:{position:a.position,region:u.Ho.ZERO,zoom:a.zoom,...R}}),{fitView:C}=Bt(),_=Pe.useDebouncedCallback(X=>void C(X),50,[C]),M=Tn(j.useCallback(X=>{x&&_(Wo),y(de=>({...de,region:X}))},[y,_,x]));j.useEffect(()=>y(X=>({...X,...R})),[R]);const I=u.cr.hex(f.use().colors.gray.l11),A=f.useMemoCompare(()=>c??dr.zoom,f.compareModeConfigs,[c]),B=j.useRef(null),z=j.useCallback(X=>{const de=B.current;de!=null&&de.x===X.x&&de.y===X.y&&de.zoom===X.zoom||(B.current=X,!(isNaN(X.x)||isNaN(X.y)||isNaN(X.zoom))&&(y(be=>({...be,position:X,zoom:X.zoom})),d(Eu(X))))},[y,d]);M4({onStart:z,onChange:z,onEnd:z});const[$,D]=j.useState(()=>()=>null),V=j.useCallback(X=>D(()=>X),[]),b=j.useMemo(()=>({custom:({id:X,positionAbsoluteX:de,positionAbsoluteY:be,selected:Te=!1,draggable:et=!0})=>$({symbolKey:X,position:{x:de,y:be},selected:Te,draggable:et})}),[$]),k=j.useRef(r),L=j.useMemo(()=>(k.current=r,$r(r)),[r]),N=j.useRef(s),F=j.useMemo(()=>(N.current=s,Br(s,h)),[s,h]),H=j.useCallback(X=>t(yu(N.current,de=>kd(X,de)),X),[t]),K=j.useCallback(X=>n(is(k.current,de=>Ld(X,de),I)),[n,I]),Z=j.useCallback((X,de)=>n(is(k.current,be=>Xy(X,de,be),I)),[]),Y=j.useCallback(X=>n(is(k.current,de=>cd(X,de),I)),[n,I]),ne=j.useCallback((X,de)=>{const be=[...k.current],Te=be.findIndex(et=>et.key===X);Te!==-1&&(be[Te]={...be[Te],segments:de},k.current=be,n(be))},[n]),J=l?RC:CC,ce=f.useSyncedRef(ne),le=j.useMemo(()=>({default:X=>o.jsxRuntimeExports.jsx(jC,{...X,segments:X.data?.segments??[],color:X.data?.color,variant:X.data?.variant,onSegmentsChange:j.useCallback(de=>ce.current(X.id,de),[X.id])},X.id)}),[]),se=j.useRef(null);f.use$1({triggers:A.zoomReset,callback:j.useCallback(({stage:X,cursor:de})=>{const be=se.current;be==null||X!=="start"||!u.Ho.contains(be,de)||C()},[C])});const ee=f.purgeMouse(A.select)[0]??null,re=f.purgeMouse(A.pan)[0]??null,ye=f.purgeMouse(A.zoom)[0]??null,Se={selectionOnDrag:ee==null,panOnDrag:re==null,selectionKeyCode:ee,panActivationKeyCode:re,zoomActivationKeyCode:ye},ue=f.useCombinedRefs(se,M),me=j.useMemo(()=>({visible:m,editable:l,onEditableChange:i,registerNodeRenderer:V,fitViewOnResize:x,setFitViewOnResize:p,viewportMode:g,onViewportModeChange:E}),[l,m,i,V,x,g,E]);return o.jsxRuntimeExports.jsx(ax,{value:me,children:o.jsxRuntimeExports.jsx(f.Composite,{path:v,children:m&&o.jsxRuntimeExports.jsx(k4,{...Se,className:u.CSS(u.CSS.B("diagram"),u.CSS.editable(l),u.CSS.BE("symbol","container")),nodes:F,edges:L,nodeTypes:b,edgeTypes:le,ref:ue,fitView:!0,onNodesChange:H,onEdgesChange:K,onConnect:Y,onReconnect:Z,defaultViewport:ju(a),connectionLineComponent:gC,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:SC,connectionMode:Pt.Loose,fitViewOptions:Wo,selectionMode:Jt.Partial,proOptions:wC,deleteKeyCode:bC,...S,style:{[u.CSS.var("diagram-zoom")]:a.zoom,...S.style},...J,...kC(g),nodesDraggable:l})})})},MC=()=>{const{editable:e}=ln();return e?o.jsxRuntimeExports.jsx(O4,{}):null},NC=e=>o.jsxRuntimeExports.jsx(f.Box,{x:!0,className:u.CSS.BE("diagram","controls"),...e}),Xo=u.K$1.BOTTOM_LEFT,PC=({onClick:e,...t})=>{const{editable:n,onEditableChange:s}=ln();return o.jsxRuntimeExports.jsx(Zl.Toggle,{onChange:()=>s(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:Xo,size:"small",tooltip:`${n?"Disable":"Enable"} editing`,...t,children:n?o.jsxRuntimeExports.jsx(f.EditOff,{}):o.jsxRuntimeExports.jsx(f.Edit,{})})},TC=({onClick:e,...t})=>{const{fitView:n}=Bt(),{fitViewOnResize:s,setFitViewOnResize:r}=ln();return o.jsxRuntimeExports.jsx(Zl.Toggle,{onClick:i=>{n(Wo),e?.(i)},value:s,onChange:r,rightClickToggle:!0,tooltip:o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:u.K$1.BOTTOM_LEFT,size:"small",...t,children:o.jsxRuntimeExports.jsx(f.Expand,{})})},ux=["zoom","pan","select"],IC=[["MouseMiddle"]],OC=[["MouseLeft"]],AC=()=>{const{viewportMode:e,onViewportModeChange:t}=ln();return o.jsxRuntimeExports.jsxs(pe.Buttons,{keys:ux,value:e,onChange:t,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"pan",size:"small",tooltip:o.jsxRuntimeExports.jsx(Gt,{mode:"pan",triggers:IC}),tooltipLocation:Xo,children:o.jsxRuntimeExports.jsx(f.Pan,{})}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"select",size:"small",tooltip:o.jsxRuntimeExports.jsx(Gt,{mode:"select",triggers:OC}),tooltipLocation:Xo,children:o.jsxRuntimeExports.jsx(f.Selection,{})})]})},DC=e=>o.jsxRuntimeExports.jsx(ex,{children:o.jsxRuntimeExports.jsx(LC,{...e})}),BC=Object.freeze(Object.defineProperty({__proto__:null,Background:MC,Controls:NC,DefaultPath:ix,Diagram:DC,FitViewControl:TC,HandleLayout:lx,NodeLayout:Ws,NodeRenderer:cx,PATHS:rx,SelectPathType:fC,SelectViewportModeControl:AC,ToggleEditControl:PC,VIEWPORT_MODES:ux,alignNodes:NE,calcPath:jt,edgeConverter:is,edgeZ:LE,nodeConverter:yu,nodeZ:ME,offsetPath:sC,rfEdgeDataZ:fu,selectNode:Us,selectNodeBox:Ae,selectNodeLayout:hC,translateEdgesBackward:gu,translateEdgesForward:$r,translateNodesBackward:hu,translateNodesForward:Br,translateViewportBackward:Eu,translateViewportForward:ju,use:yC,useContext:ln,viewportZ:kE},Symbol.toStringTag,{value:"Module"})),$C=({aetherKey:e,font:t,className:n,visible:s=!0,emptyContent:r=o.jsxRuntimeExports.jsx(f.Summary,{center:!0,level:"h3",variant:"disabled",hideIcon:!0,children:"Empty Log"}),color:i,telem:l,...a})=>{const c=f.useMemoDeepEqual({font:t,color:i,telem:l,visible:s}),[,{scrolling:d,empty:x},p]=f.use$2({type:O.Log.TYPE,schema:O.logState,initialState:{empty:!0,region:u.Ho.ZERO,scrolling:!1,wheelPos:0,...c}});j.useEffect(()=>{p(h=>({...h,...c}))},[c,p]);const m=Tn(j.useCallback(h=>p(g=>({...g,region:h})),[p]));return o.jsxRuntimeExports.jsx("div",{ref:m,className:u.CSS(u.CSS.B("log"),n),onWheel:h=>{p(g=>({...g,wheelPos:g.wheelPos-h.deltaY,scrolling:g.scrolling?g.scrolling:h.deltaY<0}))},...a,children:x?r:o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.BE("log","live"),d&&u.CSS.M("active")),variant:"outlined",onClick:()=>p(h=>({...h,scrolling:!h.scrolling})),tooltip:d?"Resume Scrolling":"Pause Scrolling",tooltipLocation:u.K$1.BOTTOM_LEFT,children:o.jsxRuntimeExports.jsx(f.Dynamic,{})})})},zC=Object.freeze(Object.defineProperty({__proto__:null,Log:$C},Symbol.toStringTag,{value:"Module"})),VC="Schematic.Grid",Xs=u.CSS.B("drag-handle"),FC=e=>{const n=Us(e).closest(".react-flow__pane");n!=null&&f.triggerReflow(n)},Vn=e=>{const t=({symbolKey:s,items:r,onLocationChange:i})=>{const l=`${s}.${VC}`,[a,c]=j.useState(!1),d=j.useMemo(()=>f.canDropOfType(l),[l]),x=f.useSyncedRef(i),{startDrag:p,onDragEnd:m,...h}=f.useDragAndDrop({type:l,canDrop:d,onDrop:j.useCallback(({items:R})=>(c(!1),R),[]),onDragOver:j.useCallback(R=>{const{items:v}=R;c(d(R)),v.forEach(({key:y})=>x.current(y,e))},[])}),g=r.filter(R=>R.location===e),E=j.useCallback((R,v)=>{p([{key:v,type:l}]),document.addEventListener("mousemove",m,{once:!0})},[p,l,m]),S=d(f.useDraggingState());return o.jsxRuntimeExports.jsx(f.Box,{direction:u.K$1.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e),u.CSS.dropRegion(S),a&&u.CSS.B("dragging-over"),S&&u.CSS.B("dragging")),onDragLeave:()=>c(!1),empty:!0,...h,children:g.map(({element:R,key:v})=>o.jsxRuntimeExports.jsx(j.Fragment,{children:j.cloneElement(R,{draggable:!0,onDragStart:y=>E(y,v),onDragEnd:m,style:{...R.props.style,cursor:"grab"}})},v))})};return({symbolKey:s,...r})=>{const{editable:i,items:l}=r;if(i)return o.jsxRuntimeExports.jsx(t,{symbolKey:s,...r});const a=l.filter(c=>c.location===e);return a.length===0?null:o.jsxRuntimeExports.jsx(f.Box,{direction:u.K$1.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e)),empty:!0,children:a.map(({element:c,key:d})=>o.jsxRuntimeExports.jsx(j.Fragment,{children:c},d))})}},HC=Vn("top"),ZC=Vn("left"),KC=Vn("right"),YC=Vn("bottom"),GC=Vn("center"),$t=({editable:e,allowRotate:t=!0,children:n,allowCenter:s,onRotate:r,symbolKey:i,...l})=>{const a=j.useRef(e);return e!==a.current&&(FC(i),a.current=e),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(HC,{editable:e,symbolKey:i,...l},`top-${i}`),o.jsxRuntimeExports.jsx(ZC,{editable:e,symbolKey:i,...l},`left-${i}`),o.jsxRuntimeExports.jsx(KC,{editable:e,symbolKey:i,...l},`right-${i}`),o.jsxRuntimeExports.jsx(YC,{editable:e,symbolKey:i,...l},`bottom-${i}`),s&&o.jsxRuntimeExports.jsx(GC,{editable:e,symbolKey:i,...l},`center-${i}`),e&&t&&o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS.BE("grid","rotate"),size:"tiny",variant:"filled",onClick:r,children:o.jsxRuntimeExports.jsx(f.Rotate,{})}),o.jsxRuntimeExports.jsx("div",{className:Xs,children:n})]})},UC=O.MODES,WC=({aetherKey:e,sink:t,mode:n})=>{const s=f.useMemoDeepEqual({sink:t,mode:n}),r=j.useRef({trigger:0,...s}),{setState:i}=f.useLifecycle({aetherKey:e,type:O.Button.TYPE,schema:O.buttonStateZ,initialState:r.current});j.useEffect(()=>{r.current={...r.current,...s},i(r.current)},[s,i,e]);const l=j.useCallback(()=>{r.current.trigger+=O.MOUSE_UP_INCREMENT,i(r.current)},[i]),a=j.useCallback(()=>{r.current.trigger+=O.MOUSE_DOWN_INCREMENT,i(r.current)},[i]);return{onClick:l,onMouseDown:a,onMouseUp:l}},XC=e=>o.jsxRuntimeExports.jsxs(pe.Buttons,{...e,keys:UC,children:[o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"fire",tooltip:"Output true when clicked",children:"Fire"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"momentary",tooltip:"Output true on press, false on release",children:"Momentary"}),o.jsxRuntimeExports.jsx(pe.Button,{itemKey:"pulse",tooltip:"Output true and then immediately output false on click",children:"Pulse"})]}),qC=({value:e,hideOuter:t=!1,showOuterCenter:n=!1,hideInner:s,onChange:r})=>{const{outer:i}=e,l=c=>()=>r({...e,...c}),a=u.CSS.B("select","orientation");return t?o.jsxRuntimeExports.jsx(Al,{className:a,value:e,onChange:r}):o.jsxRuntimeExports.jsxs(f.Box,{className:a,align:"center",justify:"center",gap:"tiny",children:[o.jsxRuntimeExports.jsx(rt,{selected:i==="top",onClick:l({outer:"top"})}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",justify:"center",gap:"tiny",children:[o.jsxRuntimeExports.jsx(rt,{selected:i==="left",onClick:l({outer:"left"})}),o.jsxRuntimeExports.jsx(Al,{hideInner:s,value:e,onChange:r,showOuterCenter:n}),o.jsxRuntimeExports.jsx(rt,{selected:i==="right",onClick:l({outer:"right"})})]}),o.jsxRuntimeExports.jsx(rt,{selected:i==="bottom",onClick:l({outer:"bottom"})})]})},Al=({value:e,onChange:t,className:n,hideInner:s=!1,showOuterCenter:r=!1,...i})=>{const{inner:l}=e,a=x=>()=>t({...e,...x});let c={};s&&(c={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"});let d=null;return r?d=o.jsxRuntimeExports.jsx(rt,{selected:e.outer==="center",onClick:a({outer:"center"})}):d=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="top",onClick:a({inner:"top"})}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",justify:"center",children:[o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,selected:l==="left",onClick:a({inner:"left"})}),o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,selected:l==="right",onClick:a({inner:"right"})})]}),o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="bottom",onClick:a({inner:"bottom"})})]}),o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(n,u.CSS.B("value"),r&&u.CSS.M("show-outer-center")),y:!0,align:"center",justify:"center",empty:!0,...i,children:d})},rt=({selected:e,className:t,...n})=>o.jsxRuntimeExports.jsx(f.Button,{variant:"text",className:u.CSS(t,u.CSS.selected(e)),size:"tiny",...n,children:o.jsxRuntimeExports.jsx("div",{className:"symbol"})}),Ne=({className:e,direction:t,...n})=>o.jsxRuntimeExports.jsx(f.Box,{direction:t,align:"stretch",className:u.CSS(u.CSS.B("symbol-form"),e),gap:t==="x"?"large":"medium",...n}),yt=({hideOuter:e,hideInner:t,showOuterCenter:n,...s})=>t&&e?null:o.jsxRuntimeExports.jsx(Ee,{label:"Orientation",padHelpText:!1,...s,children:({value:r,onChange:i})=>o.jsxRuntimeExports.jsx(qC,{value:{inner:r.orientation??"top",outer:r.label?.orientation??"top"},hideInner:t,hideOuter:e,showOuterCenter:n,onChange:l=>i({...r,orientation:l.inner,label:{...r.label,orientation:l.outer}})})}),dt=({path:e,omit:t=[]})=>o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ee,{path:`${e}.label`,label:"Label",padHelpText:!1,grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Text$2,{selectOnFocus:!0,...n})}),o.jsxRuntimeExports.jsx($e,{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(Ee,{hideIfNull:!0,visible:!t.includes("level"),path:`${e}.level`,label:"Label Size",padHelpText:!1,children:({value:n,onChange:s})=>o.jsxRuntimeExports.jsx(on,{value:n,onChange:s})}),o.jsxRuntimeExports.jsx(Ee,{visible:!t.includes("align"),path:`${e}.align`,label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:({value:n,onChange:s})=>o.jsxRuntimeExports.jsx(pe.SelectAlignment,{value:n,onChange:s})}),o.jsxRuntimeExports.jsx(Ee,{visible:!t.includes("direction"),path:`${e}.direction`,label:"Label Direction",padHelpText:!1,hideIfNull:!0,children:({value:n,onChange:s})=>o.jsxRuntimeExports.jsx(nc,{value:n,onChange:s,yDirection:"down"})})]}),Be=e=>o.jsxRuntimeExports.jsx(Ee,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(Pe.Swatch,{value:t??u.cr.setAlpha(u.cr.ZERO,1),onChange:n,...r,bordered:!0})}),dx=e=>o.jsxRuntimeExports.jsx(Ee,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(f.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(Ne,{x:!0,align:"stretch",empty:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{omit:e,path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color",optional:!0}),o.jsxRuntimeExports.jsx(Ee,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:s=>o.jsxRuntimeExports.jsx(f.Switch$1,{...s})}),o.jsxRuntimeExports.jsx(dx,{path:"scale"})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:t,hideOuter:n})]}),QC=({path:e})=>{const{value:t,onChange:n}=Et(e),s=O.sourcePipelinePropsZ.parse(t.source?.props),r=O.sinkPipelinePropsZ.parse(t.sink?.props),i=O.streamChannelValuePropsZ.parse(s.segments.valueStream.props),l=O.setChannelValuePropsZ.parse(r.segments.setter.props),a=d=>{d??=0;const x=O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:d}),threshold:O.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:x})},c=d=>{d??=0;const x=O.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:O.setChannelValue({channel:d}),setpoint:O.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),p=O.authoritySource({channel:d}),m=O.acquireChannelControl({channel:d,authority:255});n({...t,sink:x,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:m,source:p},indicator:{statusSource:p}}})};return o.jsxRuntimeExports.jsxs(Ne,{x:!0,grow:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ie.Item,{label:"State Channel",grow:!0,children:o.jsxRuntimeExports.jsx(kt,{value:i.channel,onChange:a})}),o.jsxRuntimeExports.jsx(Ie.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(kt,{value:l.channel,onChange:c})}),o.jsxRuntimeExports.jsx(Ts,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},ti=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],Re=({hideInnerOrientation:e})=>{const t=j.useCallback(({tabKey:s})=>{switch(s){case"control":return o.jsxRuntimeExports.jsx(QC,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{hideInnerOrientation:e})}},[e]),n=Me.useStatic({tabs:ti,content:t});return o.jsxRuntimeExports.jsx(Me.Tabs,{...n})},mt={y:2,x:.25},Sn={lower:0,upper:2e3},Dl={lower:0,upper:51},xx=({includeBorderRadius:e=!1,includeStrokeWidth:t=!1})=>o.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ee,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Dl,endContent:"%",...n})}),o.jsxRuntimeExports.jsx(Ee,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Dl,endContent:"%",...n})}),e&&o.jsxRuntimeExports.jsx(Ee,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Sn,endContent:"px",...n})}),t&&o.jsxRuntimeExports.jsx(Ee,{path:"strokeWidth",hideIfNull:!0,optional:!0,label:"Border Width",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:{lower:0,upper:21},endContent:"px",...n})}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.width",label:"Width",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:n??200,dragScale:mt,bounds:Sn,endContent:"px",...s})}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.height",label:"Height",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:n??200,dragScale:mt,bounds:Sn,endContent:"px",...s})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0,showOuterCenter:!0,label:"Label Location"})]}),JC=()=>o.jsxRuntimeExports.jsx(Ne,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(f.Box,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{direction:"x",children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx($e,{path:"rotation",label:"Rotation",inputProps:{dragScale:{x:1,y:.25},bounds:{lower:0,upper:360},endContent:"°"},grow:!0}),o.jsxRuntimeExports.jsx($e,{path:"numSides",label:"Number of Sides",inputProps:{dragScale:{x:.5,y:.1},bounds:{lower:3,upper:21}},grow:!0}),o.jsxRuntimeExports.jsx($e,{path:"sideLength",label:"Side Length",inputProps:{dragScale:{x:1,y:1},bounds:{lower:10,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx($e,{path:"cornerRounding",label:"Corner Rounding",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:181},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx($e,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),e6=()=>o.jsxRuntimeExports.jsx(Ne,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(f.Box,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{direction:"x",children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx($e,{path:"radius",label:"Radius",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx($e,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),t6=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],n6={dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"},s6=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsxs(Ne,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsx(Or,{path:""}),";"]});case"redline":return o.jsxRuntimeExports.jsx(Ne,{y:!0,empty:!0,children:o.jsxRuntimeExports.jsx(Ir,{path:"redline"})});default:return o.jsxRuntimeExports.jsxs(Ne,{x:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Ee,{path:"units",label:"Units",align:"start",padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(f.Text$2,{...s})}),o.jsxRuntimeExports.jsx($e,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:n6}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:s,onChange:r})=>o.jsxRuntimeExports.jsx(on,{value:s,onChange:r})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0})]})}},[]),t=Me.useStatic({tabs:t6,content:e});return o.jsxRuntimeExports.jsx(Me.Tabs,{...t})},o6=({path:e})=>{const{value:t,onChange:n}=Et(e),s=O.sourcePipelinePropsZ.parse(t.source?.props),r=O.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=O.withinBoundsProps.parse(s.segments.threshold.props),l=c=>{c??=0;const d=O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:c}),threshold:O.withinBounds({trueBound:i.trueBound})},outlet:"threshold"});n({...t,source:d})},a=c=>{const d=O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:r.channel}),threshold:O.withinBounds({trueBound:c})},outlet:"threshold"});n({...t,source:d})};if(typeof r.channel!="number")throw new Error("Channel key must be used for light telemetry");return o.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ie.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(kt,{value:r.channel,onChange:l})}),o.jsxRuntimeExports.jsx(Ie.Item,{label:"Lower Threshold",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:i.trueBound.lower??.9,onChange:c=>a({...i.trueBound,lower:c})})}),o.jsxRuntimeExports.jsx(Ie.Item,{label:"Upper Threshold",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:i.trueBound.upper??1.1,onChange:c=>a({...i.trueBound,upper:c})})})]})},r6=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"}],i6=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsx(o6,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{})}},[]),t=Me.useStatic({tabs:r6,content:e});return o.jsxRuntimeExports.jsx(Me.Tabs,{...t})},l6=({path:e})=>{const{value:t,onChange:n}=Et(e),s=O.sinkPipelinePropsZ.parse(t.sink?.props),r=O.setChannelValuePropsZ.parse(s.segments.setter.props),i=l=>{l??=0;const a=O.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:O.setChannelValue({channel:l}),setpoint:O.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),c=O.authoritySource({channel:l}),d=O.acquireChannelControl({channel:l,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:c},showIndicator:!0,indicator:{statusSource:c}}})};return o.jsxRuntimeExports.jsxs(Ne,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Ie.Item,{label:"Output Channel",grow:!0,padHelpText:!1,children:o.jsxRuntimeExports.jsx(kt,{value:r.channel,onChange:i})}),o.jsxRuntimeExports.jsx($e,{label:"Activation Delay",path:"onClickDelay",inputProps:{endContent:"ms"},hideIfNull:!0,padHelpText:!1}),o.jsxRuntimeExports.jsx(Ts,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0,padHelpText:!1})]}),o.jsxRuntimeExports.jsx(Ee,{path:"mode",label:"Mode",optional:!0,children:({value:l,onChange:a})=>o.jsxRuntimeExports.jsx(XC,{value:l,onChange:a})})]})},a6=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(l6,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{omit:["align","maxInlineSize"],hideInnerOrientation:!0,hideOuterOrientation:!0})}},[]),t=Me.useStatic({tabs:ti,content:e});return o.jsxRuntimeExports.jsx(Me.Tabs,{...t})},c6=({path:e})=>{const{value:t,onChange:n}=Et(e),s=O.sinkPipelinePropsZ.parse(t.sink?.props),r=O.setChannelValuePropsZ.parse(s.segments.setter.props),i=l=>{l??=0;const a=O.sinkPipeline("number",{connections:[],segments:{setter:O.setChannelValue({channel:l})},inlet:"setter"}),c=O.authoritySource({channel:l}),d=O.acquireChannelControl({channel:l,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:c},showIndicator:!0,indicator:{statusSource:c}},disabled:l==0})};return o.jsxRuntimeExports.jsx(Ne,{x:!0,grow:!0,align:"stretch",children:o.jsxRuntimeExports.jsx(Ie.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(kt,{value:r.channel,onChange:i})})})},u6=()=>{const e=j.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(c6,{path:""});default:return o.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,align:"stretch",grow:!0,gap:"small",children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(hr,{path:"units",label:"Units",align:"start",padHelpText:!1}),o.jsxRuntimeExports.jsx(Ee,{path:"size",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:s,onChange:r})=>o.jsxRuntimeExports.jsx(oa,{value:s,onChange:r})}),o.jsxRuntimeExports.jsx(Be,{path:"color"})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0})]})}},[]),t=Me.useStatic({tabs:ti,content:e});return o.jsxRuntimeExports.jsx(Me.Tabs,{...t})},d6=()=>{const e=Et("autoFit",{optional:!0});return o.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",grow:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ee,{path:"value",label:"Text",padHelpText:!1,grow:!0,children:t=>o.jsxRuntimeExports.jsx(f.Text$2,{...t})}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Text Size",padHelpText:!1,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(on,{value:t,onChange:n})}),o.jsxRuntimeExports.jsx(Ee,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(pe.SelectAlignment,{value:t,onChange:n})})]}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Ee,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(f.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:o.jsxRuntimeExports.jsx(f.Button,{onClick:()=>e?.onChange(!0),disabled:e?.value===!0,variant:"outlined",tooltip:e?.value===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:o.jsxRuntimeExports.jsx(f.AutoFitWidth,{})})})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:""})]})},x6=()=>o.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label",omit:["maxInlineSize","align","direction"]}),o.jsxRuntimeExports.jsx(Be,{path:"color"})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideOuter:!0})]}),p6=()=>o.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.width",label:"Width",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:e??200,dragScale:mt,bounds:Sn,endContent:"px",...t})}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.height",label:"Height",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:e??200,dragScale:mt,bounds:Sn,endContent:"px",...t})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0})]}),zt=()=>o.jsxRuntimeExports.jsxs(Ne,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(dx,{path:"scale"}),o.jsxRuntimeExports.jsx(Ts,{path:"clickable",label:"Clickable",hideIfNull:!0,optional:!0})]})]}),o.jsxRuntimeExports.jsx(yt,{path:""})]}),m6=()=>o.jsxRuntimeExports.jsx(xx,{includeBorderRadius:!0,includeStrokeWidth:!0}),f6=()=>o.jsxRuntimeExports.jsx(Re,{hideInnerOrientation:!0}),T=e=>o.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),ge=e=>o.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),ke=e=>o.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),fe=e=>o.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),h6={left:{left:Q.Left,right:Q.Right,top:Q.Top,bottom:Q.Bottom},right:{left:Q.Right,right:Q.Left,top:Q.Bottom,bottom:Q.Top},top:{left:Q.Bottom,right:Q.Top,top:Q.Left,bottom:Q.Right},bottom:{left:Q.Top,right:Q.Bottom,top:Q.Right,bottom:Q.Left}},g6=(e,t)=>h6[t][e],j6=(e,t=!1)=>{if(t)return e;switch(e){case Q.Left:return Q.Right;case Q.Right:return Q.Left;case Q.Top:return Q.Bottom;case Q.Bottom:return Q.Top;default:return Q.Top}},E6=(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},U=({children:e,orientation:t,refreshDeps:n})=>{let s;try{s=L4()}catch{return null}const r=j.useRef(null),i=j.useRef(!0);return j.useEffect(()=>{if(r.current==null)return;if(i.current){i.current=!1;return}const a=r.current.closest(".react-flow__node")?.getAttribute("data-id");a!=null&&s?.(a)},[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,...a})=>{const c=E6(i,s,t,n);return o.jsxRuntimeExports.jsx(Nn,{position:j6(g6(e,t),!r),...a,type:"source",onClick:d=>d.stopPropagation(),className:(u.CSS.B("handle"),u.CSS.BE("handle",a.id)),style:{left:`${c.left}%`,top:`${c.top}%`,...l}})},he=({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.cr.cssString(r),...i}),oe=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.B("symbol-primitive"),e),...t}),y6=.8,q=({dimensions:e,orientation:t="left",children:n,className:s,color:r,style:i={},scale:l=1,...a})=>{e=u.p.construct(t)==="y"?u._.swap(e):e;const d=u.cr.cssString(r),x=f.use();let p={...i,aspectRatio:`${e.width} / ${e.height}`,width:u._.scale(e,l*y6).width};return r!=null&&(p={...p,[u.CSS.var("symbol-color")]:u.cr.rgbString(r),[u.CSS.var("symbol-color-contrast")]:u.cr.rgbString(u.cr.pickByContrast(r,x.colors.gray.l0,x.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:d,stroke:d,...a,style:p,children:o.jsxRuntimeExports.jsx("g",{children:n})})},px=({className:e,orientation:t="left",scale:n,color:s,...r})=>{const i=u.cr.cssString(s);return o.jsxRuntimeExports.jsxs(he,{...r,orientation:t,className:u.CSS(u.CSS.B("four-way-valve"),e),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:108,height:96},color:s,scale:n,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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(T,{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(T,{d:"M8.70001 73.5C24.7 73.5 28.7 86.8333 28.7 93.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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(T,{d:"M99.7 22.5C83.7 22.5 79.7 9.16667 79.7 2.5",strokeLinecap:"round"})]})]})},mx=({color:e,orientation:t="left",scale:n,...s})=>o.jsxRuntimeExports.jsxs(he,{...s,className:u.CSS(u.CSS.B("three-way-valve")),orientation:t,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),fx=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(he,{...s,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:o.jsxRuntimeExports.jsx(T,{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"})})]}),hx=({className:e,color:t,orientation:n="left",normallyOpen:s=!1,scale:r,...i})=>o.jsxRuntimeExports.jsxs(he,{className:u.CSS(u.CSS.B("solenoid-valve"),s&&u.CSS.M("normally-open"),e),...i,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:69},color:t,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{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(fe,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),o.jsxRuntimeExports.jsx(ge,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),gx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{className:u.CSS(u.CSS.B("relief-valve"),e),enabled:r,...i,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:58},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),jx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{orientation:t,className:u.CSS(u.CSS.B("check-valve"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:45,height:43},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(fe,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),Ex=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.cr.cssString(n);return o.jsxRuntimeExports.jsxs(oe,{...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:84,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"7",cy:"7",r:"4",fill:i}),o.jsxRuntimeExports.jsx(T,{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"})]})]})},yx=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.cr.cssString(n);return o.jsxRuntimeExports.jsxs(oe,{orientation:t,className:u.CSS(u.CSS.B("check-valve-with-arrow"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:93,height:57},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M62.5 6H32.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(ke,{cx:"7.5",cy:"13.5",r:"6",fill:i}),o.jsxRuntimeExports.jsx(T,{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"})]})]})},Sx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,orientation:n,className:u.CSS(u.CSS.B("angled-valve"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),Rx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:n,className:u.CSS(u.CSS.B("ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"43.5978",cy:"20.972",r:"19"}),o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),Cx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:n,className:u.CSS(u.CSS.B("three-way-ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"43.5978",cy:"21.722",r:"19"}),o.jsxRuntimeExports.jsx(T,{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(T,{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(T,{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"})]})]}),wx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:n,className:u.CSS(u.CSS.B("gate-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M43.5 2 L43.5 39.7965"})]})]}),bx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-one"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M43.5 2V40"}),o.jsxRuntimeExports.jsx(ke,{cx:"43.5",cy:"21",r:"10",fill:u.cr.cssString(e)})]})]}),vx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-two"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"43.5",cy:"21",r:"10",fill:u.cr.cssString(e)}),o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"83",height:"38",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M2.29001 2.29004L84.7069 39.676"})]})]}),_x=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:n,className:u.CSS(u.CSS.B("breather-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:99,height:57},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"91",cy:"49.5",r:"6",fill:u.cr.cssString(e)}),o.jsxRuntimeExports.jsx(ke,{cx:"8",cy:"7.5",r:"6",fill:u.cr.cssString(e)}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),kx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(fe,{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.cr.cssString(t);return o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(U,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:5,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:40,height:48},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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(T,{d:"M33 24H2",strokeLinecap:"round"})]})]})},Mx=({className:e,color:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(U,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:11.1111,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:36,height:72},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"4",y:"4",width:"28",height:"64",rx:"2",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),Nx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(U,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(q,{color:n,dimensions:{width:26,height:48},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{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"})})]}),Px=({className:e,orientation:t="left",color:n,scale:s=1,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(U,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:50,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(q,{color:n,dimensions:{width:36,height:48},orientation:t,scale:s*.6,children:o.jsxRuntimeExports.jsx(T,{d:"M3 3H30C31.6569 3 33 4.34315 33 6V42C33 43.6569 31.6569 45 30 45H3",strokeLinecap:"round"})})]}),Tx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:t,className:u.CSS(u.CSS.B("manual-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:48},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(fe,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),Ix=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("orifice_plate"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{color:n,dimensions:{width:72,height:36},orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 33V22",strokeLinecap:"round"})]})]}),Bl=(e,t)=>e/t*100,Ox=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:52,height:34},orientation:t,color:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{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"})})]}),Ax=e=>typeof e=="number"?{topLeft:u.K.construct(e),topRight:u.K.construct(e),bottomLeft:u.K.construct(e),bottomRight:u.K.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:u.K.construct(e.topLeft),topRight:u.K.construct(e.topRight),bottomLeft:u.K.construct(e.bottomLeft),bottomRight:u.K.construct(e.bottomRight)}:e,S6=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}%`},Dx={width:40,height:80},ni={x:50,y:10},qs=({className:e,dimensions:t=Dx,borderRadius:n=ni,boxBorderRadius:s,color:r,backgroundColor:i,strokeWidth:l=2,...a})=>{const c=Ax(n),d=s==null,x=f.use(),{width:p,height:m}=t,h=j.useMemo(()=>[t,n,c],[c.bottomLeft,c.bottomRight,c.topLeft,c.topRight,m,p]),g=Bl(1,p),E=100-g,S=Bl(1,m),R=100-S;return o.jsxRuntimeExports.jsx(oe,{className:u.CSS(e,u.CSS.B("tank")),style:{...t,borderRadius:s??S6(c),borderColor:u.cr.cssString(r??x.colors.gray.l11),backgroundColor:u.cr.cssString(i),borderWidth:l},...a,children:o.jsxRuntimeExports.jsxs(U,{refreshDeps:h,orientation:"left",children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:S,id:"1"}),d&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:g,top:c.topLeft.y,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:E,top:c.topRight.y,id:"3"})]}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:R,id:"4"}),d&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:g,top:100-c.bottomLeft.y,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:E,top:100-c.bottomRight.y,id:"6"})]}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:g,top:50,id:"7"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:E,top:50,id:"8"})]})})},R6=20,C6=(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)),a=l+s/2;return Array.from({length:e}).map((c,d)=>{const x=r*d+i-Math.PI/2;return{x:a+l*Math.cos(x),y:a+l*Math.sin(x)}})},w6=(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 a=e[(l-1+i)%i],c=e[l],d=e[(l+1)%i],x=c.x-a.x,p=c.y-a.y,m=d.x-c.x,h=d.y-c.y,g=Math.hypot(x,p),E=Math.hypot(m,h),S=r/g,R=r/E,v=c.x-x*S,y=c.y-p*S,C=c.x+m*R,_=c.y+h*R;l===0?s.push(`M ${v},${y}`):s.push(`L ${v},${y}`),s.push(`Q ${c.x},${c.y} ${C},${_}`)}return s.push("Z"),s.join(" ")},si=({numSides:e,sideLength:t,rotation:n=0,color:s,backgroundColor:r,className:i,cornerRounding:l,strokeWidth:a,...c})=>{const d=f.use(),x=j.useMemo(()=>2*((a??2)+1),[a]),p=j.useMemo(()=>C6(e,t,n,x),[e,t,n,x]),m=j.useMemo(()=>w6(p,t,l??0),[p,t,l]),h=j.useMemo(()=>2*(t/(2*Math.sin(Math.PI/e)))+x,[t,e,x]);return o.jsxRuntimeExports.jsx(oe,{className:u.CSS(i,u.CSS.B("polygon")),...c,children:o.jsxRuntimeExports.jsx(q,{dimensions:{width:h,height:h},children:o.jsxRuntimeExports.jsx(T,{d:m,fill:u.cr.cssString(r??d.colors.gray.l1),stroke:u.cr.cssString(s??d.colors.gray.l9),strokeWidth:a??2})})})},Bx=({radius:e,color:t,backgroundColor:n,className:s,strokeWidth:r,...i})=>{const l=(r??2)+1,a=e*2,c=a+2*l,d=a+2*l;return o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(s,u.CSS.B("circle-shape")),...i,children:[o.jsxRuntimeExports.jsxs(U,{orientation:"left",refreshDeps:e,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:l/d*100,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:(d-l)/d*100,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:l/c*100,top:50,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:(c-l)/c*100,top:50,id:"4"})]}),o.jsxRuntimeExports.jsx(q,{dimensions:{width:c,height:d},children:o.jsxRuntimeExports.jsx(ke,{cx:c/2,cy:d/2,r:e,stroke:u.cr.cssString(t),strokeWidth:r??2,fill:u.cr.cssString(n)})})]})},$x=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:88,height:80},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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(fe,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),zx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator-manual")),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:84},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 20L43.5 2",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M19.5 2L67.5 2",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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(T,{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(T,{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(fe,{x1:"43.5",y1:"63",x2:"43.5",y2:"40"}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),Vx=({className:e,orientation:t="left",scale:n,color:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("orifice"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:70,height:34},orientation:t,color:s,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),Fx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:t,className:u.CSS(u.CSS.B("needle-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:42},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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.cr.cssString(n)}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),Hx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(he,{...i,orientation:n,className:u.CSS(u.CSS.B("angled-relief-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:79},orientation:n,color:e,scale:s,children:[o.jsxRuntimeExports.jsx(fe,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),Zx=({className:e,color:t,dimensions:n,orientation:s="left",units:r="psi",unitsLevel:i="small",children:l,inlineSize:a=80,...c})=>{const d=u.cr.cssString(t),x=f.use(),p=t==null?"var(--pluto-gray-l0)":u.cr.cssString(u.cr.pickByContrast(t,x.colors.gray.l0,x.colors.gray.l11));return o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("value"),e),...c,style:{borderColor:d,height:n?.height,width:"100%"},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n?.width,inlineSize:a,maxWidth:n?.width},children:l}),o.jsxRuntimeExports.jsxs(U,{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:d},children:o.jsxRuntimeExports.jsx(f.Text,{level:i,color:p,children:r})})]})},Kx=({enabled:e=!1,onClick:t,orientation:n="left"})=>o.jsxRuntimeExports.jsxs(oe,{orientation:n,children:[o.jsxRuntimeExports.jsx(f.Switch$1,{value:e,onClick:t,onChange:()=>{}}),o.jsxRuntimeExports.jsxs(U,{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"})]})]}),Yx=({onClick:e,onMouseDown:t,onMouseUp:n,orientation:s="left",label:r="",color:i,size:l,level:a,onClickDelay:c})=>o.jsxRuntimeExports.jsxs(oe,{orientation:s,children:[o.jsxRuntimeExports.jsx(f.Button,{variant:"filled",onClick:e,onMouseDown:t,onMouseUp:n,color:i,size:l,level:a,onClickDelay:c,children:r}),o.jsxRuntimeExports.jsxs(U,{orientation:s,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:s,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:s,left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:s,left:50,top:0,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:s,left:50,top:100,id:"4"})]})]}),Gx=({className:e,orientation:t="left",width:n,color:s,level:r,autoFit:i,align:l="center",value:a,onChange:c,...d})=>{const x={textAlign:l};return u.p.construct(t)==="y"?x.height=i?"fit-content":n:x.width=i?"fit-content":n,o.jsxRuntimeExports.jsx(oe,{style:x,orientation:t,className:u.CSS(u.CSS.B("text-box"),u.CSS.loc(t),e),...d,children:o.jsxRuntimeExports.jsx(f.MaybeEditable,{className:u.CSS.BE("symbol","label"),color:u.cr.cssString(s),level:r,value:a,onChange:c})})},Ux=({orientation:e="left",className:t,onClick:n,children:s,value:r,units:i,color:l,onChange:a,size:c="small",disabled:d,...x})=>{const[p,m]=j.useState(r);return o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("setpoint"),t),orientation:e,...x,children:[o.jsxRuntimeExports.jsxs(U,{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(f.Numeric,{size:c,value:p,onChange:m,showDragHandle:!1,selectOnFocus:!0,endContent:i,color:l,borderWidth:1,disabled:d,children:o.jsxRuntimeExports.jsx(f.Button,{size:c,variant:"filled",onClick:()=>a(p),color:l,children:"Set"})})]})},Wx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("screw-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{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(T,{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)})]})]}),Xx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("vacuum-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{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"})})]}),qx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("cavity-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{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)})]})]}),Qx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("piston-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ke,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 23 32, h 16, m 0 -8, v 16",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),Jx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("static-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:30},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),ep=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("rotary-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:50,height:33},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(fe,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(fe,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),tp=({className:e,color:t,orientation:n="left",enabled:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,orientation:n,className:u.CSS(u.CSS.B("light"),s&&u.CSS.M("enabled"),e),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:t,orientation:n,scale:r,children:o.jsxRuntimeExports.jsx(ke,{cx:"32",cy:"32",r:"30"})})]}),np=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:69},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(ge,{x:"21",y:"6.5",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(T,{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(fe,{x1:"43",y1:"49",x2:"43",y2:"24.5"})]})]}),sp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator-motorized")),...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:87,height:102},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(fe,{x1:"43",y1:"80.5",x2:"43",y2:"56"}),o.jsxRuntimeExports.jsx(T,{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(ge,{x:"21",y:"38",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M43 38V26",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(ke,{cx:"43",cy:"14",r:"12"})]})]}),op=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(he,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(U,{orientation:e,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:50,top:1,id:"4"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:88,height:86},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M43 1L45 65"})]})]}),rp=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(he,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(U,{orientation:e,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),ip=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(he,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(U,{orientation:e,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(fe,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(ge,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),lp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(U,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(fe,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(ge,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),o.jsxRuntimeExports.jsx(fe,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(fe,{x1:"43",y1:"49",x2:"43",y2:"83",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(fe,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"})]})]}),ap=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(U,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(fe,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(fe,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(fe,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(fe,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(ge,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),cp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(U,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(fe,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),up=({id:e,className:t,orientation:n="right",label:s="text",color:r,level:i="p",onLabelChange:l,...a})=>{const c=document.querySelector(`[data-id="${e}"]`);c&&c.classList.add(n);const d=u.p.construct(n)==="y";return o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("arrow"),u.CSS.loc(n),t),orientation:n,...a,children:[o.jsxRuntimeExports.jsx("div",{className:"wrapper",children:o.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:u.cr.cssString(r)},children:o.jsxRuntimeExports.jsx("div",{className:"bg",children:o.jsxRuntimeExports.jsx(f.MaybeEditable,{value:s,onChange:l,level:i,className:u.CSS.BE("symbol","label")})})})}),o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:d,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:d,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"})]})})})]})},dp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("vent"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{color:n,dimensions:{width:22,height:32},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M5 3L16.6325 13.8016C17.9107 14.9885 17.9107 17.0115 16.6325 18.1984L5 29",strokeLinecap:"round"})})]}),xp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("iso-filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:60,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"3",y:"3",width:"54",height:"36",rx:"3",ry:"3"}),o.jsxRuntimeExports.jsx(fe,{x1:"30",y1:"3",x2:"30",y2:"13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(fe,{x1:"30",y1:"17",x2:"30",y2:"25",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(fe,{x1:"30",y1:"29",x2:"30",y2:"39",strokeLinecap:"round"})]})]}),pp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("flow-straightener"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:93,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:72,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2.5",y:"2.5",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M10.5 26.5H60.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M10.5 9.5H60.5",strokeLinecap:"round"})]})]}),mp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("heater-element"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:21,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M2.5 34.0005H14.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M2.5 2.00049L14.5 2.00049",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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(T,{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(T,{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(T,{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"})]})]}),fp=({className:e,dimensions:t=Dx,borderRadius:n=ni,boxBorderRadius:s,color:r,backgroundColor:i,...l})=>{const a=Ax(n),c=f.use(),d=j.useMemo(()=>[t,n,a],[a.bottomLeft,a.bottomRight,a.topLeft,a.topRight,t.height,t.width]),x=u.cr.cssString(r??c.colors.gray.l11),p=i==null?void 0:u.cr.cssString(i),m=t.width/66,h=t.height/180,g=`scale(${m},${h})`;return o.jsxRuntimeExports.jsxs(oe,{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:g,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:x,transform:g,fill:p})}),o.jsxRuntimeExports.jsxs(U,{refreshDeps:d,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"})]})]})},hp=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.cr.cssString(n);return o.jsxRuntimeExports.jsxs(he,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:89,height:76},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M71 38.0014V72.0014",stroke:l,strokeWidth:4,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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(ke,{cx:"44",cy:"55",r:"4",fill:l}),o.jsxRuntimeExports.jsx(T,{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})]})]})},gp=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.cr.cssString(n);return o.jsxRuntimeExports.jsxs(he,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:101},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M48 38.633V72.633",strokeLinecap:"round",strokeWidth:4}),o.jsxRuntimeExports.jsx(T,{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(ke,{cx:"21",cy:"56.0737",r:"4",fill:l}),o.jsxRuntimeExports.jsx(T,{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"})]})]})},jp=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:39,height:21},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{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.cr.cssString(n),stroke:"none"})})]}),Ep=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:39,height:39},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{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.cr.cssString(n),stroke:"none"})})]}),Ye=({position:e,color:t})=>o.jsxRuntimeExports.jsx("text",{x:e?.x??57,y:e?.y??27,style:{fill:u.cr.cssString(t),fontWeight:450},stroke:"none",children:"F"}),yp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-general"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(Ye,{position:{x:56,y:25},color:s})]})]}),Sp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Electromagnetic"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M47.5 17.5H55.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M15.5 17.5H23.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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(T,{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(T,{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(Ye,{position:{x:58,y:29},color:s})]})]}),Rp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-VariableArea"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M46 10V25"}),o.jsxRuntimeExports.jsx(T,{d:"M23 13V22"}),o.jsxRuntimeExports.jsx(T,{d:"M23 13L46 10"}),o.jsxRuntimeExports.jsx(T,{d:"M23 22L46 25"}),o.jsxRuntimeExports.jsx(Ye,{color:s})]})]}),Cp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Coriolis"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M2 17.6024H28.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M28.5 17.6024L34.6834 14.0324",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M34.8 14L45.9058 20.9666",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M51.5 17.6024L46.0141 20.8987",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M20.5 17.6024L26.6574 14.0474",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M26.75 14.1024L37.788 21.0265",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 17.6024L37.8427 21.0017",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 17.6024H69",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ye,{position:{x:58,y:29},color:s})]})]}),wp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Nozzle"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24 2V7V12",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 12H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 23H29H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 33V23",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ye,{color:s})]})]}),bp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Venturi"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,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(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M8 33L26.5329 22.3",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M8 2L26.5329 12.7",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M56 33L26.5876 22.2948",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M56 2L26.5876 12.7052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ye,{position:{x:56,y:29},color:s})]})]}),vp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-RingPiston"),t),children:[o.jsxRuntimeExports.jsxs(U,{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,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(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(ke,{cx:"36.5",cy:"17.5",r:"10.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(ke,{cx:"36.5",cy:"21.5",r:"6.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ye,{position:{x:56,y:29},color:s})]})]}),_p=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-PositiveDisplacement"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:72,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{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(T,{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(Ye,{color:s})]})]}),kp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Turbine"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M16.5 17.5H54.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 9L35.4756 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 26L35.5244 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 26L35.4756 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 9L35.5244 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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(T,{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(Ye,{color:s})]})]}),Lp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Pulse"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M31 13.5H39",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M23 21.5H31",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M39 21.5H47",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M39 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ye,{color:s})]})]}),Mp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-FloatSensor"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M25 8H46",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 27H40",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 27L25.046 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M40 27L45.954 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ye,{color:s})]})]}),Np=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Orifice"),t),children:[o.jsxRuntimeExports.jsxs(U,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(q,{dimensions:{width:72,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 33V22",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ye,{color:s})]})]}),Pp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("heat-exchanger-general"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{d:"M3 33H18.3956L33.1284 18.1508M33.4276 47.8492L48.1604 33H63M33.278 48V18"}),o.jsxRuntimeExports.jsx(T,{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"})]})]}),Tp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M58.9698 18H23.56L38.5623 33.0023M38.5623 32.9977L23.56 48H58.9698"})]})]}),Ip=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:199,height:48},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(ge,{x:"3",y:"3",width:"193",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(ge,{x:"32.397",y:"3",width:"134.206",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(ge,{x:"32.397",y:"13.5",width:"134.206",height:"21",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(fe,{x1:"32.3769",y1:"24",x2:"166.623",y2:"24",strokeWidth:"2"})]})]}),Op=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),Ap=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),Dp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("compressor"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{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"})})]}),Bp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(ke,{cx:"33",cy:"33",r:"14.5"})]})]}),$p=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M35 12.4V20.4"}),o.jsxRuntimeExports.jsx(T,{d:"M3 33H16"}),o.jsxRuntimeExports.jsx(T,{d:"M35 53.6V45.6"})]})]}),zp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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(T,{d:"M39 33H47"}),o.jsxRuntimeExports.jsx(T,{d:"M27 33H19"}),o.jsxRuntimeExports.jsx(T,{d:"M36 27.804L40 20.8758"}),o.jsxRuntimeExports.jsx(T,{d:"M30 27.804L26 20.8758"}),o.jsxRuntimeExports.jsx(T,{d:"M30 38.196L26 45.1242"}),o.jsxRuntimeExports.jsx(T,{d:"M36 38.196L40 45.1242"})]})]}),Vp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),Fp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(he,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{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(T,{d:"M3 33H63"})]})]}),Hp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{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"})})]}),Zp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29.12 65.62L61 34.5"})]})]}),Kp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:60,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2.5",width:"56",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M30 2.5L30 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"})]})]}),Yp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{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(fe,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(fe,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),Gp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29.12 65.62L61 34.5"}),o.jsxRuntimeExports.jsx(T,{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(fe,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(fe,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),Up=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("thruster"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:81,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2.5",y:"2",width:"38",height:"38",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M78.5 37.5117V4.51172"}),o.jsxRuntimeExports.jsx(T,{d:"M40.5 11.5L76.0072 2.6232"}),o.jsxRuntimeExports.jsx(T,{d:"M40.5 30.5L76.0072 39.3768"}),o.jsxRuntimeExports.jsx(T,{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(T,{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"})]})]}),Wp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("nozzle"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:64,height:126},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"12",y:"1.6667",width:"40",height:"40",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M1.3333 124H62.6667",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{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",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M14 41.6667C22.4135 41.6667 29.174 46.3333 21.496 59.3333C4.84066 87.5333 0.555555 119 1.33333 124",strokeLinecap:"round"})]})]}),Xp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M2.293 2.29297L29.9383 66.7986",strokeDasharray:"6 6"})]})]}),qp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(oe,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(U,{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(q,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(ge,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M31 34.5L2.30611 2.33992",strokeDasharray:"6 6"}),o.jsxRuntimeExports.jsx(T,{d:"M31 34.5L2.30611 66.6601",strokeDasharray:"6 6"})]})]}),b6=({aetherKey:e,source:t})=>{const n=f.useMemoDeepEqual({source:t}),[,{enabled:s},r]=f.use$2({aetherKey:e,type:O.Light.TYPE,schema:O.stateZ$1,initialState:{enabled:!1,...n}});return j.useEffect(()=>r(i=>({...i,...n})),[n,r]),{enabled:s}},v6=({aetherKey:e,source:t,sink:n})=>{const s=f.useMemoDeepEqual({source:t,sink:n}),[,{value:r},i]=f.use$2({aetherKey:e,type:O.Setpoint.TYPE,schema:O.setpointStateZ,initialState:{trigger:0,value:0,...s}});return j.useEffect(()=>{i(a=>({...a,...s}))},[s,i]),{set:j.useCallback(a=>i(c=>({...c,trigger:c.trigger+1,command:a})),[i]),value:r}},_6=({aetherKey:e,source:t,sink:n})=>{const s=f.useMemoDeepEqual({source:t,sink:n}),[,{triggered:r,enabled:i},l]=f.use$2({aetherKey:e,type:O.Toggle.TYPE,schema:O.toggleStateZ,initialState:{triggered:!1,enabled:!1,...s}});return j.useEffect(()=>{l(c=>({...c,...s}))},[s,l]),{toggle:j.useCallback(()=>l(c=>({...c,triggered:!c.triggered})),[l]),triggered:r,enabled:i}},an=(e,t)=>{if(e==null)return null;const{label:n,level:s="p",orientation:r="top",direction:i,align:l,maxInlineSize:a}=e;return n==null||n.length===0?null:{key:"label",element:o.jsxRuntimeExports.jsx(f.Editable,{className:u.CSS(u.CSS.BE("symbol","label"),u.CSS.dir(i)),level:s,value:n,onChange:c=>t?.({label:{...e,label:c}}),allowEmpty:!0,style:{textAlign:l,maxInlineSize:a}}),location:r}},oi=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(f.Box,{direction:u.p.swap(l),align:"center",className:u.CSS(u.CSS.B("control-state")),gap:"small",children:[t&&n&&o.jsxRuntimeExports.jsx(Wc,{size:"small",...r}),t&&s&&o.jsxRuntimeExports.jsx(Qc,{...i})]}),location:l}},Ce=(e,t)=>{const n=({symbolKey:s,control:r,source:i,sink:l,label:a,onChange:c,selected:d,orientation:x="left",position:p,...m})=>{const{enabled:h,triggered:g,toggle:E}=_6({aetherKey:s,source:i,sink:l}),S=[],R=an(a,c);R!=null&&S.push(R);const v=oi(r);return v!=null&&S.push(v),o.jsxRuntimeExports.jsx($t,{editable:d,symbolKey:s,items:S,onRotate:()=>c({orientation:u.K$1.rotate90(x)}),onLocationChange:(y,C)=>{y==="label"&&c({label:{...a,orientation:C}}),y==="control"&&c({control:{...r,orientation:C}})},...t?.grid,children:o.jsxRuntimeExports.jsx(e,{enabled:h,triggered:g,onClick:E,orientation:x,...m})})};return n.displayName=e.displayName,n},ae=(e,t)=>{const n=({symbolKey:s,label:r,onChange:i,selected:l,position:a,orientation:c="left",...d})=>{const x=[],p=an(r,i);return p!=null&&x.push(p),o.jsxRuntimeExports.jsx($t,{...t?.grid,items:x,editable:l,symbolKey:s,onRotate:()=>i({orientation:u.K$1.rotate90(c)}),onLocationChange:(m,h)=>{m==="label"&&i({label:{...r,orientation:h}})},children:o.jsxRuntimeExports.jsx(e,{orientation:c,...d})})};return n.displayName=e.displayName,n},St=e=>{const t=({symbolKey:n,label:s,onChange:r,selected:i,position:l,orientation:a="left",enabled:c=!1,clickable:d=!1,...x})=>{const p=[],m=an(s,r);m!=null&&p.push(m);const h=()=>{d&&r({enabled:!c})};return o.jsxRuntimeExports.jsx($t,{items:p,editable:i,symbolKey:n,onRotate:()=>r({orientation:u.K$1.rotate90(a)}),onLocationChange:(g,E)=>{g==="label"&&r({label:{...s,orientation:E}})},children:o.jsxRuntimeExports.jsx(e,{orientation:a,enabled:c,onClick:h,...x})})};return t.displayName=e.displayName,t},Qp=Ce(mx),Jp=Ce(fx),em=Ce(hx),tm=Ce(px),nm=Ce(Sx),sm=Ce(kx),om=Ce(Op),rm=Ce(Ap),im=Ce(Xx),lm=Ce(qx),am=Ce(Qx),cm=Ce(ep),um=Ce(op),dm=Ce(rp),xm=Ce(ip),pm=Ce(lp),mm=Ce(ap),fm=Ce(cp),hm=Ce(Wx),gm=Ce(Dp),jm=Ce(Bp),Em=Ce($p),ym=Ce(zp),Sm=Ce(Vp),Rm=Ce(Fp),Cm=Ce(bx),wm=Ce(vx),bm=Ce(Rx),vm=Ce(Cx),_m=Ce(wx),km=ae($x),Lm=ae(zx),Mm=ae(np),Nm=ae(sp),Pm=ae(Lx),Tm=ae(Nx),Im=ae(Px),Om=ae(Ox),Am=ae(jx),Dm=ae(Ex),Bm=ae(yx),$m=ae(Vx),zm=Ce(Kx,{grid:{allowRotate:!1}}),Vm=ae(dp),Fm=ae(Ix),Hm=ae(xp),Zm=ae(pp),Km=ae(mp),Ym=ae(Mx),Gm=ae(jp),Um=ae(Ep,{grid:{allowRotate:!1}}),Wm=ae(Jx),Xm=ae(yp),qm=ae(Sp),Qm=ae(Rp),Jm=ae(Cp),ef=ae(wp),tf=ae(bp),nf=ae(vp),sf=ae(_p),of=ae(kp),rf=ae(Lp),lf=ae(Mp),af=ae(Np),cf=ae(Pp),uf=ae(Tp),df=ae(Ip),xf=ae(Hp),pf=ae(Kp),mf=ae(Zp),ff=ae(Yp),hf=ae(Gp),gf=ae(Up),jf=ae(Wp),Ef=ae(Xp),yf=ae(qp),Sf=St(Fx),Rf=St(gx),Cf=St(hp),wf=St(gp),bf=St(Tx),vf=St(Hx),_f=St(_x),kf=ae(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(qs,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e}),{grid:{allowCenter:!0,allowRotate:!1}}),Lf=e=>o.jsxRuntimeExports.jsx(qs,{...e,dimensions:{width:25,height:50}}),k6=ae(({sideLength:e,rotation:t,color:n,backgroundColor:s,numSides:r,...i})=>o.jsxRuntimeExports.jsx(si,{numSides:3,sideLength:e,rotation:t,color:n,backgroundColor:s,...i})),Mf=ae(({numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...a})=>o.jsxRuntimeExports.jsx(si,{numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...a})),Nf=ae(({radius:e,color:t,backgroundColor:n,strokeWidth:s,...r})=>o.jsxRuntimeExports.jsx(Bx,{radius:e,color:t,backgroundColor:n,strokeWidth:s,...r}),{grid:{allowRotate:!1}}),Pf=ae(({backgroundColor:e,borderRadius:t,onChange:n,orientation:s,color:r,dimensions:i,strokeWidth:l})=>o.jsxRuntimeExports.jsx(qs,{onResize:a=>n({dimensions:a}),orientation:s,color:r,dimensions:i,boxBorderRadius:t,backgroundColor:e,strokeWidth:l}),{grid:{allowCenter:!0,allowRotate:!1}}),Tf=e=>o.jsxRuntimeExports.jsx(qs,{...e,dimensions:{width:25,height:50},borderRadius:0}),If=({label:e,symbolKey:t,orientation:n="left",control:s,units:r,source:i,sink:l,color:a,onChange:c,selected:d,draggable:x,size:p,disabled:m})=>{const{value:h,set:g}=v6({aetherKey:t,source:i,sink:l}),E=[],S=oi(s);S!=null&&E.push(S);const R=an(e,c);return R!=null&&E.push(R),o.jsxRuntimeExports.jsx($t,{symbolKey:t,allowRotate:!1,editable:d&&!x,onRotate:()=>c({orientation:u.K$1.rotate90(n)}),items:E,onLocationChange:(v,y)=>{v==="label"&&c({label:{...e,orientation:y}})},children:o.jsxRuntimeExports.jsx(Ux,{value:h,onChange:g,units:r,color:a,orientation:n,disabled:m,size:p})})},Of=({className:e,...t})=>o.jsxRuntimeExports.jsx(Ux,{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(f.Text,{children:"10.0"})}),L6=u.K.construct(10,-1),M6=u.K.construct(1,1),Af=({symbolKey:e,label:t,level:n="p",position:s,textColor:r,color:i,telem:l,units:a,onChange:c,inlineSize:d=70,selected:x,draggable:p,notation:m,redline:h})=>{const g=ks.useTypography(n),E=(g.lineHeight+.5)*g.baseSize+2,S=j.useMemo(()=>{if(l==null||h==null)return;const{bounds:C,gradient:_}=h;return O.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:l,scale:O.scaleNumber({scale:u.C.Scale.scale(C).scale(0,1).transform}),gradient:O.colorGradient({gradient:_})},outlet:"gradient"})},[l,h]),{width:R}=Ar({aetherKey:e,color:r,level:n,box:u.Ho.construct(u.K.translateY({...s},1),{height:E,width:d}),telem:l,backgroundTelem:S,minWidth:d,notation:m,useWidthForBackground:!0,valueBackgroundOverScan:L6,valueBackgroundShift:M6}),v=[],y=an(t,c);return y!=null&&v.push(y),o.jsxRuntimeExports.jsx($t,{editable:x&&!p,symbolKey:e,items:v,allowRotate:!1,onLocationChange:(C,_)=>{C==="label"&&c({label:{...t,orientation:_}})},children:o.jsxRuntimeExports.jsx(Zx,{color:i,dimensions:{height:E,width:R},inlineSize:d,units:a,unitsLevel:P.downLevel(n)})})},Df=({color:e})=>o.jsxRuntimeExports.jsx(Zx,{color:e,dimensions:{width:60,height:25},units:"psi",children:o.jsxRuntimeExports.jsx(f.Text,{children:"50.00"})}),Bf=({symbolKey:e,label:t,orientation:n="left",sink:s,control:r,selected:i,draggable:l,onChange:a,mode:c,...d})=>{const{onMouseDown:x,onMouseUp:p}=WC({aetherKey:e,sink:s,mode:c}),m=[],h=oi(r);return h!=null&&m.push(h),o.jsxRuntimeExports.jsx($t,{onRotate:()=>a({orientation:u.K$1.rotate90(n)}),allowRotate:!1,editable:i,symbolKey:e,items:m,onLocationChange:(g,E)=>{g==="label"&&a({label:{...t,orientation:E}})},children:o.jsxRuntimeExports.jsx(Yx,{...t,onMouseDown:x,onMouseUp:p,orientation:n,...d})})},$f=({label:e,...t})=>o.jsxRuntimeExports.jsx(Yx,{label:"Button",...t}),zf=({symbolKey:e,label:t,source:n,onChange:s,selected:r,...i})=>{const{enabled:l}=b6({aetherKey:e,source:n}),a=[],c=an(t,s);return c!=null&&a.push(c),o.jsxRuntimeExports.jsx($t,{items:a,allowRotate:!1,editable:r,symbolKey:e,onLocationChange:(d,x)=>{d==="label"&&s({label:{...t,orientation:x}})},children:o.jsxRuntimeExports.jsx(tp,{enabled:l,...i})})},Vf=({label:{label:e,level:t},orientation:n,color:s,onChange:r})=>o.jsxRuntimeExports.jsx(up,{className:Xs,onLabelChange:i=>r({label:{label:i,level:t}}),label:e,level:t,orientation:n,color:s}),Ff=({label:e,...t})=>o.jsxRuntimeExports.jsx(up,{label:"Off Page",...t,orientation:"right"}),Hf=ae(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(fp,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e})),Zf=e=>o.jsxRuntimeExports.jsx(fp,{...e,dimensions:{width:25,height:50}}),Kf=({onChange:e,symbolKey:t,color:n,width:s,align:r,autoFit:i,level:l,value:a})=>o.jsxRuntimeExports.jsx(Gx,{className:Xs,onChange:c=>e({value:c}),value:a,level:l,color:n,width:s,align:r,autoFit:i},t),Yf=e=>o.jsxRuntimeExports.jsx(Gx,{...e,autoFit:!0,value:"Text Box"}),W=4,Fn=2,N6=["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"],P6=te.z.enum(N6),ie={orientation:"left",scale:1},T6={source:O.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:O.streamChannelValue({channel:0}),rollingAverage:O.rollingAverage({windowSize:1}),stringifier:O.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"})},I6={...ie,source:O.sourcePipeline("number",{connections:[],segments:{valueStream:O.streamChannelValue({channel:0})},outlet:"valueStream"})},O6={...ie,sink:O.sinkPipeline("number",{connections:[],segments:{setter:O.setChannelValue({channel:0})},inlet:"setter"})},Gf={...ie,source:O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:0}),threshold:O.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},Uf={...ie,control:{show:!0},sink:O.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:O.setChannelValue({channel:0}),setpoint:O.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},we={...Gf,...Uf},Vt={...ie,enabled:!1,clickable:!1},G=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center",direction:"x"}}),A6={width:125,height:200},ri={dimensions:A6},D6=3,B6={name:"Three Way Valve",key:"threeWayValve",Form:Re,Symbol:Qp,defaultProps:e=>({color:e.colors.gray.l11,...G("Three Way Valve"),...we}),Preview:mx,zIndex:W},$6={name:"Valve",key:"valve",Form:Re,Symbol:Jp,defaultProps:e=>({color:e.colors.gray.l11,...G("Valve"),...we}),Preview:fx,zIndex:W},z6={name:"Solenoid Valve",key:"solenoidValve",Form:Re,Symbol:em,defaultProps:e=>({color:e.colors.gray.l11,...G("Solenoid Valve"),normallyOpen:!1,...we}),Preview:hx,zIndex:W},V6={name:"Four Way Valve",key:"fourWayValve",Form:Re,Symbol:tm,defaultProps:e=>({color:e.colors.gray.l11,...G("Four Way Valve"),...we}),Preview:px,zIndex:W},F6={name:"Angled Valve",key:"angledValve",Form:Re,Symbol:nm,defaultProps:e=>({color:e.colors.gray.l11,...G("Angled Valve"),...we}),Preview:Sx,zIndex:W},H6={name:"Ball Valve",key:"ballValve",Form:Re,Symbol:bm,defaultProps:e=>({color:e.colors.gray.l11,...G("Ball Valve"),...we}),Preview:Rx,zIndex:W},Z6={name:"Three-Way Ball Valve",key:"threeWayBallValve",Form:Re,Symbol:vm,defaultProps:e=>({color:e.colors.gray.l11,...G("Three-Way Ball Valve"),...we}),Preview:Cx,zIndex:W},K6={name:"Gate Valve",key:"gateValve",Form:Re,Symbol:_m,defaultProps:e=>({color:e.colors.gray.l11,...G("Gate Valve"),...we}),Preview:wx,zIndex:W},Y6={name:"Butterfly Valve (Remote)",key:"butterflyValveOne",Form:Re,Symbol:Cm,defaultProps:e=>({color:e.colors.gray.l11,...G("Butterfly Valve (Remote)"),...we}),Preview:bx,zIndex:W},G6={name:"Butterfly Valve (Manual)",key:"butterflyValveTwo",Form:Re,Symbol:wm,defaultProps:e=>({color:e.colors.gray.l11,...G("Butterfly Valve (Manual)"),...we}),Preview:vx,zIndex:W},U6={name:"Breather Valve",key:"breatherValve",Form:zt,Symbol:_f,defaultProps:e=>({color:e.colors.gray.l11,...G("Breather Valve"),...Vt}),Preview:Xe(_x,["clickable"]),zIndex:W},W6={name:"Pump",key:"pump",Form:Re,Symbol:sm,defaultProps:e=>({color:e.colors.gray.l11,...G("Pump"),...we}),Preview:kx,zIndex:W},X6={name:"Screw Pump",key:"screwPump",Form:Re,Symbol:hm,defaultProps:e=>({color:e.colors.gray.l11,...G("Screw Pump"),...we}),Preview:Wx,zIndex:W},q6={name:"Tank",key:"tank",Form:xx,Symbol:kf,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.cr.setAlpha(e.colors.gray.l1,0),...G("Tank"),borderRadius:ni,...ri,...ie}),Preview:Lf,zIndex:Fn},Q6={name:"Polygon",key:"polygon",Symbol:Mf,Form:JC,defaultProps:e=>({numSides:6,sideLength:R6,cornerRounding:0,rotation:0,color:e.colors.gray.l11,backgroundColor:u.cr.setAlpha(e.colors.gray.l1,0),strokeWidth:2,...G("Polygon")}),Preview:Xe(si,["clickable"]),zIndex:Fn},J6={name:"Circle",key:"circle",Symbol:Nf,Form:e6,defaultProps:e=>({radius:20,color:e.colors.gray.l11,backgroundColor:u.cr.setAlpha(e.colors.gray.l1,0),...G("Circle"),strokeWidth:2}),Preview:Xe(Bx,["clickable"]),zIndex:Fn},e9={name:"Cylinder",key:"cylinder",Form:p6,Symbol:Hf,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.cr.setAlpha(e.colors.gray.l1,0),...G("cylinder"),dimensions:{width:66,height:181},...ie}),Preview:Zf,zIndex:Fn},t9={name:"Box",key:"box",Form:m6,Symbol:Pf,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.cr.setAlpha(e.colors.gray.l1,0),...G("Box"),borderRadius:D6,strokeWidth:2,...ri,...ie}),Preview:Tf,zIndex:Fn},n9={name:"Relief Valve",key:"reliefValve",Form:zt,Symbol:Rf,defaultProps:e=>({color:e.colors.gray.l11,...G("Relief Valve"),...Vt}),Preview:Xe(gx,["clickable"]),zIndex:W},s9={name:"Spring Loaded Relief Valve",key:"springLoadedReliefValve",Form:zt,Symbol:Cf,defaultProps:e=>({color:e.colors.gray.l11,...G("Spring Loaded Relief Valve"),...Vt}),Preview:Xe(hp,["clickable"]),zIndex:W},o9={name:"Angled Spring Loaded Relief Valve",key:"angledSpringLoadedReliefValve",Form:zt,Symbol:wf,defaultProps:e=>({color:e.colors.gray.l11,...G("Angled Spring Loaded Relief Valve"),...Vt}),Preview:Xe(gp,["clickable"]),zIndex:W},r9={name:"Regulator",key:"regulator",Form:xe,Symbol:km,defaultProps:e=>({color:e.colors.gray.l11,...G("Regulator"),...ie}),Preview:$x,zIndex:W},i9={name:"Manual Regulator",key:"regulatorManual",Form:xe,Symbol:Lm,defaultProps:e=>({color:e.colors.gray.l11,...G("Manual Regulator"),...ie}),Preview:Xe(zx,["clickable"]),zIndex:W},l9={name:"Electric Regulator",key:"electricRegulator",Form:xe,Symbol:Mm,defaultProps:e=>({color:e.colors.gray.l11,...G("Electric Regulator"),...ie}),Preview:np,zIndex:W},a9={name:"Electric Regulator Motorized",key:"electricRegulatorMotorized",Form:xe,Symbol:Nm,defaultProps:e=>({color:e.colors.gray.l11,...G("Electric Regulator Motorized"),...ie}),Preview:sp,zIndex:W},c9={name:"Burst Disc",key:"burstDisc",Form:xe,Symbol:Pm,defaultProps:e=>({color:e.colors.gray.l11,...G("Burst Disc"),...ie}),Preview:Lx,zIndex:W},u9={name:"ISO Burst Disc",key:"isoBurstDisc",Form:xe,Symbol:Ym,defaultProps:e=>({color:e.colors.gray.l11,...G("ISO Burst Disc"),...ie}),Preview:Mx,zIndex:W},d9={name:"Cap",key:"cap",Form:xe,Symbol:Tm,defaultProps:e=>({color:e.colors.gray.l11,...G("Cap"),...ie}),Preview:Nx,zIndex:W},x9={name:"ISO Cap",key:"isoCap",Form:xe,Symbol:Im,defaultProps:e=>({color:e.colors.gray.l11,...G("ISO Cap"),...ie}),Preview:Px,zIndex:W},p9={name:"Manual Valve",key:"manualValve",Form:zt,Symbol:bf,defaultProps:e=>({color:e.colors.gray.l11,...G("Manual Valve"),...Vt}),Preview:Xe(Tx,["clickable"]),zIndex:W},m9={name:"Orifice Plate",key:"orificePlate",Form:xe,Symbol:Fm,defaultProps:e=>({color:e.colors.gray.l11,...G("Orifice Plate"),...ie}),Preview:Ix,zIndex:W},f9={name:"ISO Filter",key:"isoFilter",Form:xe,Symbol:Hm,defaultProps:e=>({color:e.colors.gray.l11,...G("ISO Filter"),...ie}),Preview:xp,zIndex:W},h9={name:"Filter",key:"filter",Form:xe,Symbol:Om,defaultProps:e=>({color:e.colors.gray.l11,...G("Filter"),...ie}),Preview:Ox,zIndex:W},g9={name:"Flow Straightener",key:"flowStraightener",Form:xe,Symbol:Zm,defaultProps:e=>({color:e.colors.gray.l11,...G("Flow Straightener"),...ie}),Preview:pp,zIndex:W},j9={name:"Heater Element",key:"heaterElement",Form:xe,Symbol:Km,defaultProps:e=>({color:e.colors.gray.l11,...G("Heater Element"),...ie}),Preview:mp,zIndex:W},E9={name:"Needle Valve",key:"needleValve",Form:zt,Symbol:Sf,defaultProps:e=>({color:e.colors.gray.l11,...G("Needle Valve"),...Vt}),Preview:Xe(Fx,["clickable"]),zIndex:W},y9={name:"Check Valve",key:"checkValve",Form:xe,Symbol:Am,defaultProps:e=>({color:e.colors.gray.l11,...G("Check Valve"),...ie}),Preview:jx,zIndex:W},S9={name:"Orifice",key:"orifice",Form:xe,Symbol:$m,defaultProps:e=>({color:e.colors.gray.l11,...G("Orifice"),...ie}),Preview:Vx,zIndex:W},R9={name:"Angled Relief Valve",key:"angledReliefValve",Form:zt,Symbol:vf,defaultProps:e=>({color:e.colors.gray.l11,...G("Angled Relief Valve"),...Vt}),Preview:Xe(Hx,["clickable"]),zIndex:W},C9={name:"Value",key:"value",Form:s6,Symbol:Af,Preview:Df,defaultProps:e=>({color:e.colors.gray.l11,units:"psi",level:"h5",inlineSize:70,...G("Value"),...ie,telem:T6.source,redline:Tr}),zIndex:W},w9={name:"Button",key:"button",Symbol:Bf,Form:a6,Preview:$f,defaultProps:e=>({color:e.colors.primary.z,...G("Button"),...Uf,mode:"fire",onClickDelay:0,scale:null}),zIndex:W},b9={name:"Switch",key:"switch",Symbol:zm,Form:f6,defaultProps:()=>({...G("Switch"),...we,scale:null}),Preview:Kx,zIndex:W},v9={name:"Vacuum Pump",key:"vacuumPump",Symbol:im,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Vacuum Pump"),...we}),Preview:Xx,zIndex:W},_9={name:"Compressor",key:"compressor",Symbol:gm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Compressor"),...we}),Preview:Dp,zIndex:W},k9={name:"Cavity Pump",key:"cavityPump",Symbol:lm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Cavity Pump"),...we}),Preview:qx,zIndex:W},L9={name:"Piston Pump",key:"pistonPump",Symbol:am,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Piston Pump"),...we}),Preview:Qx,zIndex:W},M9={name:"Static Mixer",key:"staticMixer",Symbol:Wm,Form:xe,defaultProps:e=>({color:e.colors.gray.l11,...G("Static Mixer"),...ie}),Preview:Jx,zIndex:W},N9={name:"Rotary Mixer",key:"rotaryMixer",Symbol:cm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Rotary Mixer"),...we}),Preview:ep,zIndex:W},P9={name:"Light",key:"light",Symbol:zf,Form:i6,defaultProps:e=>({color:e.colors.gray.l11,...G("Light"),...Gf}),Preview:tp,zIndex:W},T9={name:"Setpoint",key:"setpoint",Symbol:If,Form:u6,defaultProps:e=>({units:"mV",color:e.colors.gray.l11,size:"small",...G("Setpoint"),...I6,...O6}),Preview:Of,zIndex:W},I9={name:"Agitator",key:"agitator",Symbol:um,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Agitator"),...we}),Preview:op,zIndex:W},O9={name:"Propeller Agitator",key:"propellerAgitator",Symbol:dm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Propeller Agitator"),...we}),Preview:rp,zIndex:W},A9={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:xm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Flat Blade Agitator"),...we}),Preview:ip,zIndex:W},D9={name:"Paddle Agitator",key:"paddleAgitator",Symbol:pm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Paddle Agitator"),...we}),Preview:lp,zIndex:W},B9={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:mm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Cross Beam Agitator"),...we}),Preview:ap,zIndex:W},$9={name:"Helical Agitator",key:"helicalAgitator",Symbol:fm,Form:Re,defaultProps:e=>({color:e.colors.gray.l11,...G("Helical Agitator"),...we}),Preview:cp,zIndex:W},z9={name:"Text Box",key:"textBox",Symbol:Kf,Form:d6,defaultProps:e=>({color:e.colors.gray.l11,autoFit:!0,align:"center",...G("Text Box"),...ie,...ri,level:"p",value:"Text Box",width:75}),Preview:Yf,zIndex:W},V9={name:"Off Page Reference",key:"offPageReference",Form:x6,Symbol:Vf,defaultProps:e=>({color:e.colors.gray.l11,orientation:"right",...G("Off Page Reference")}),Preview:Ff,zIndex:W},F9={name:"ISO Check Valve",key:"isoCheckValve",Form:xe,Symbol:Dm,defaultProps:e=>({color:e.colors.gray.l11,...G("ISO Check Valve"),...ie}),Preview:Ex,zIndex:W},H9={name:"Check Valve Variant",key:"checkValveWithArrow",Form:xe,Symbol:Bm,defaultProps:e=>({color:e.colors.gray.l11,...G("Check Valve"),...ie}),Preview:yx,zIndex:W},Z9={name:"Vent",key:"vent",Form:xe,Symbol:Vm,defaultProps:e=>({color:e.colors.gray.l11,...G("Vent"),...ie}),Preview:dp,zIndex:W},K9={name:"T Junction",key:"tJunction",Form:xe,Symbol:Gm,defaultProps:e=>({color:e.colors.gray.l11,...G(""),...ie}),Preview:jp,zIndex:W+20},Y9={name:"Cross Junction",key:"crossJunction",Form:xe,Symbol:Um,defaultProps:e=>({color:e.colors.gray.l11,...G(""),...ie}),Preview:Ep,zIndex:W+20},G9={name:"Flowmeter General",key:"flowmeterGeneral",Form:xe,Symbol:Xm,defaultProps:e=>({color:e.colors.gray.l11,...G("General Flowmeter"),...ie}),Preview:yp,zIndex:W},U9={name:"Flowmeter Electromagnetic",key:"flowmeterElectromagnetic",Form:xe,Symbol:qm,defaultProps:e=>({color:e.colors.gray.l11,...G("Electromagnetic Flowmeter"),...ie}),Preview:Sp,zIndex:W},W9={name:"Flowmeter Variable Area",key:"flowmeterVariableArea",Form:xe,Symbol:Qm,defaultProps:e=>({color:e.colors.gray.l11,...G("Variable Area Flowmeter"),...ie}),Preview:Rp,zIndex:W},X9={name:"Flowmeter Coriolis",key:"flowmeterCoriolis",Form:xe,Symbol:Jm,defaultProps:e=>({color:e.colors.gray.l11,...G("Coriolis Flowmeter"),...ie}),Preview:Cp,zIndex:W},q9={name:"Flowmeter Nozzle",key:"flowmeterNozzle",Form:xe,Symbol:ef,defaultProps:e=>({color:e.colors.gray.l11,...G("Nozzle Flowmeter"),...ie}),Preview:wp,zIndex:W},Q9={name:"Flowmeter Venturi",key:"flowmeterVenturi",Form:xe,Symbol:tf,defaultProps:e=>({color:e.colors.gray.l11,...G("Venturi Flowmeter"),...ie}),Preview:bp,zIndex:W},J9={name:"Flowmeter Ring Piston",key:"flowmeterRingPiston",Form:xe,Symbol:nf,defaultProps:e=>({color:e.colors.gray.l11,...G("Ring Piston Flowmeter"),...ie}),Preview:vp,zIndex:W},e7={name:"Flowmeter Positive Displacement",key:"flowmeterPositiveDisplacement",Form:xe,Symbol:sf,defaultProps:e=>({color:e.colors.gray.l11,...G("Positive Displacement Flowmeter"),...ie}),Preview:_p,zIndex:W},t7={name:"Flowmeter Turbine",key:"flowmeterTurbine",Form:xe,Symbol:of,defaultProps:e=>({color:e.colors.gray.l11,...G("Turbine Flowmeter"),...ie}),Preview:kp,zIndex:W},n7={name:"Flowmeter Pulse",key:"flowmeterPulse",Form:xe,Symbol:rf,defaultProps:e=>({color:e.colors.gray.l11,...G("Pulse Flowmeter"),...ie}),Preview:Lp,zIndex:W},s7={name:"Flowmeter Float Sensor",key:"flowmeterFloatSensor",Form:xe,Symbol:lf,defaultProps:e=>({color:e.colors.gray.l11,...G("Float Sensor Flowmeter"),...ie}),Preview:Mp,zIndex:W},o7={name:"Flowmeter Orifice",key:"flowmeterOrifice",Form:xe,Symbol:af,defaultProps:e=>({color:e.colors.gray.l11,...G("Orifice Flowmeter"),...ie}),Preview:Np,zIndex:W},r7={name:"Heat Exchanger General",key:"heatExchangerGeneral",Form:xe,Symbol:cf,defaultProps:e=>({color:e.colors.gray.l11,...G("General Heat Exchanger"),...ie}),Preview:Pp,zIndex:W},i7={name:"Heat Exchanger M",key:"heatExchangerM",Form:xe,Symbol:uf,defaultProps:e=>({color:e.colors.gray.l11,...G("M Heat Exchanger"),...ie}),Preview:Tp,zIndex:W},l7={name:"Heat Exchanger Straight Tube",key:"heatExchangerStraightTube",Form:xe,Symbol:df,defaultProps:e=>({color:e.colors.gray.l11,...G("Straight Tube Heat Exchanger"),...ie}),Preview:Ip,zIndex:W},a7={name:"Turbo Compressor",key:"turboCompressor",Form:Re,Symbol:jm,defaultProps:e=>({color:e.colors.gray.l11,...G("Turbo Compressor"),...we}),Preview:Bp,zIndex:W},c7={name:"Roller Vane Compressor",key:"rollerVaneCompressor",Form:Re,Symbol:Em,defaultProps:e=>({color:e.colors.gray.l11,...G("Roller Vane Compressor"),...we}),Preview:$p,zIndex:W},u7={name:"Liquid Ring Compressor",key:"liquidRingCompressor",Form:Re,Symbol:ym,defaultProps:e=>({color:e.colors.gray.l11,...G("Liquid Ring Compressor"),...we}),Preview:zp,zIndex:W},d7={name:"Ejector Compressor",key:"ejectorCompressor",Form:Re,Symbol:Sm,defaultProps:e=>({color:e.colors.gray.l11,...G("Ejector Compressor"),...we}),Preview:Vp,zIndex:W},x7={name:"Centrifugal Compressor",key:"centrifugalCompressor",Form:Re,Symbol:Rm,defaultProps:e=>({color:e.colors.gray.l11,...G("Centrifugal Compressor"),...we}),Preview:Fp,zIndex:W},p7={name:"Diaphragm Pump",key:"diaphragmPump",Form:Re,Symbol:om,defaultProps:e=>({color:e.colors.gray.l11,...G("Diaphragm Pump"),...we}),Preview:Op,zIndex:W},m7={name:"Ejection Pump",key:"ejectionPump",Form:Re,Symbol:rm,defaultProps:e=>({color:e.colors.gray.l11,...G("Ejection Pump"),...we}),Preview:Ap,zIndex:W},f7={name:"Flame Arrestor",key:"flameArrestor",Form:xe,Symbol:xf,defaultProps:e=>({color:e.colors.gray.l11,...G("Flame Arrestor"),...ie}),Preview:Hp,zIndex:W},h7={name:"Flame Arrestor (Explosion-Proof)",key:"flameArrestorExplosion",Form:xe,Symbol:pf,defaultProps:e=>({color:e.colors.gray.l11,...G("Flame Arrestor (Explosion-Proof)"),...ie}),Preview:Kp,zIndex:W},g7={name:"Flame Arrestor (Detonation-Proof)",key:"flameArrestorDetonation",Form:xe,Symbol:mf,defaultProps:e=>({color:e.colors.gray.l11,...G("Flame Arrestor (Detonation-Proof)"),...ie}),Preview:Zp,zIndex:W},j7={name:"Flame Arrestor (Fire Resistant)",key:"flameArrestorFireRes",Form:xe,Symbol:ff,defaultProps:e=>({color:e.colors.gray.l11,...G("Flame Arrestor (Fire Resistant)"),...ie}),Preview:Yp,zIndex:W},E7={name:"Flame Arrestor (Fire Resistant and Detonation-Proof)",key:"flameArrestorFireResDetonation",Form:xe,Symbol:hf,defaultProps:e=>({color:e.colors.gray.l11,...G("Flame Arrestor (Fire Resistant and Detonation-Proof)"),...ie}),Preview:Gp,zIndex:W},y7={name:"Thruster",key:"thruster",Form:Re,Symbol:gf,defaultProps:e=>({color:e.colors.gray.l11,...G("Thruster"),...we}),Preview:Up,zIndex:W},S7={name:"Nozzle",key:"nozzle",Form:xe,Symbol:jf,defaultProps:e=>({color:e.colors.gray.l11,...G("Nozzle"),...ie}),Preview:Wp,zIndex:W},R7={name:"Strainer",key:"strainer",Form:xe,Symbol:Ef,defaultProps:e=>({color:e.colors.gray.l11,...G("Strainer"),...ie}),Preview:Xp,zIndex:W},C7={name:"Strainer Cone",key:"strainerCone",Form:xe,Symbol:yf,defaultProps:e=>({color:e.colors.gray.l11,...G("Strainer Cone"),...ie}),Preview:qp,zIndex:W},w7={value:C9,button:w9,tank:q6,polygon:Q6,circle:J6,tJunction:K9,crossJunction:Y9,switch:b9,offPageReference:V9,light:P9,setpoint:T9,box:t9,textBox:z9,valve:$6,solenoidValve:z6,threeWayValve:B6,fourWayValve:V6,angledValve:F6,ballValve:H6,threeWayBallValve:Z6,gateValve:K6,butterflyValveOne:Y6,butterflyValveTwo:G6,breatherValve:U6,manualValve:p9,needleValve:E9,reliefValve:n9,angledReliefValve:R9,checkValve:y9,regulator:r9,regulatorManual:i9,electricRegulator:l9,electricRegulatorMotorized:a9,springLoadedReliefValve:s9,angledSpringLoadedReliefValve:o9,pump:W6,pistonPump:L9,screwPump:X6,cavityPump:k9,diaphragmPump:p7,ejectionPump:m7,vacuumPump:v9,compressor:_9,turboCompressor:a7,rollerVaneCompressor:c7,liquidRingCompressor:u7,ejectorCompressor:d7,centrifugalCompressor:x7,staticMixer:M9,rotaryMixer:N9,burstDisc:c9,isoBurstDisc:u9,cap:d9,isoCap:x9,filter:h9,isoFilter:f9,flowStraightener:g9,heaterElement:j9,orifice:S9,orificePlate:m9,agitator:I9,propellerAgitator:O9,flatBladeAgitator:A9,paddleAgitator:D9,crossBeamAgitator:B9,helicalAgitator:$9,isoCheckValve:F9,checkValveWithArrow:H9,vent:Z9,cylinder:e9,flowmeterGeneral:G9,flowmeterElectromagnetic:U9,flowmeterVariableArea:W9,flowmeterCoriolis:X9,flowmeterNozzle:q9,flowmeterVenturi:Q9,flowmeterRingPiston:J9,flowmeterPositiveDisplacement:e7,flowmeterTurbine:t7,flowmeterPulse:n7,flowmeterFloatSensor:s7,flowmeterOrifice:o7,heatExchangerGeneral:r7,heatExchangerM:i7,heatExchangerStraightTube:l7,flameArrestor:f7,flameArrestorExplosion:h7,flameArrestorDetonation:g7,flameArrestorFireRes:j7,flameArrestorFireResDetonation:E7,thruster:y7,nozzle:S7,strainer:R7,strainerCone:C7},b7=Object.freeze(Object.defineProperty({__proto__:null,Agitator:um,AngledReliefValve:vf,AngledSpringLoadedReliefValve:wf,AngledValve:nm,BallValve:bm,Box:Pf,BoxPreview:Tf,BreatherValve:_f,BurstDisc:Pm,ButterflyValveOne:Cm,ButterflyValveTwo:wm,Button:Bf,ButtonPreview:$f,Cap:Tm,CavityPump:lm,CentrifugalCompressor:Rm,CheckValve:Am,CheckValveWithArrow:Bm,Circle:Nf,Compressor:gm,CrossBeamAgitator:mm,CrossJunction:Um,Cylinder:Hf,CylinderPreview:Zf,DRAG_HANDLE_CLASS:Xs,DiaphragmPump:om,EjectionPump:rm,EjectorCompressor:Sm,ElectricRegulator:Mm,ElectricRegulatorMotorized:Nm,Filter:Om,FlameArrestor:xf,FlameArrestorDetonation:mf,FlameArrestorExplosion:pf,FlameArrestorFireRes:ff,FlameArrestorFireResDetonation:hf,FlatBladeAgitator:xm,FlowStraightener:Zm,FlowmeterCoriolis:Jm,FlowmeterElectromagnetic:qm,FlowmeterFloatSensor:lf,FlowmeterGeneral:Xm,FlowmeterNozzle:ef,FlowmeterOrifice:af,FlowmeterPositiveDisplacement:sf,FlowmeterPulse:rf,FlowmeterRingPiston:nf,FlowmeterTurbine:of,FlowmeterVariableArea:Qm,FlowmeterVenturi:tf,FourWayValve:tm,GateValve:_m,HeatExchangerGeneral:cf,HeatExchangerM:uf,HeatExchangerStraightTube:df,HeaterElement:Km,HelicalAgitator:fm,ISOBurstDisc:Ym,ISOCap:Im,ISOCheckValve:Dm,ISOFilter:Hm,Light:zf,LiquidRingCompressor:ym,ManualValve:bf,NeedleValve:Sf,Nozzle:jf,OffPageReference:Vf,OffPageReferencePreview:Ff,Orifice:$m,OrificePlate:Fm,PaddleAgitator:pm,PistonPump:am,PolygonSymbol:Mf,PropellerAgitator:dm,Pump:sm,Regulator:km,RegulatorManual:Lm,ReliefValve:Rf,RollerVaneCompressor:Em,RotaryMixer:cm,SYMBOLS:w7,ScrewPump:hm,Setpoint:If,SetpointPreview:Of,SolenoidValve:em,SpringLoadedReliefValve:Cf,StaticMixer:Wm,Strainer:Ef,StrainerCone:yf,Switch:zm,TJunction:Gm,Tank:kf,TankPreview:Lf,TextBox:Kf,TextBoxPreview:Yf,ThreeWayBallValve:vm,ThreeWayValve:Qp,Thruster:gf,Triangle:k6,TurboCompressor:jm,VacuumPump:im,Value:Af,ValuePreview:Df,Valve:Jp,Vent:Vm,createDummyToggle:St,createLabeled:ae,createToggle:Ce,variantZ:P6},Symbol.toStringTag,{value:"Module"}));exports.Aether=f.main;exports.Divider=f.Divider$2;exports.Generic=f.Generic;exports.Haul=f.Haul;exports.Worker=f.Context;exports.compareArrayDeps=f.compareArrayDeps;exports.preventDefault=f.preventDefault;exports.stopPropagation=f.stopPropagation;exports.useClickOutside=f.useClickOutside;exports.useCombinedRefs=f.useCombinedRefs;exports.useCombinedStateAndRef=f.useCombinedStateAndRef;exports.useEffectCompare=f.useEffectCompare;exports.useInitializerRef=f.useInitializerRef;exports.useMemoCompare=f.useMemoCompare;exports.useMemoDeepEqual=f.useMemoDeepEqual;exports.useMemoPrimitiveArray=f.useMemoPrimitiveArray;exports.usePrevious=f.usePrevious;exports.useRequiredContext=f.useRequiredContext;exports.useResize=f.useResize;exports.useStateRef=f.useStateRef;exports.useSyncedRef=f.useSyncedRef;exports.useWindowResize=f.useWindowResize;exports.CSS=u.CSS;exports.DataType=u.n;exports.Density=u.d;exports.MultiSeries=u.Wt;exports.Rate=u.I;exports.Series=u.v;exports.TimeRange=u.O;exports.TimeSpan=u.i;exports.TimeStamp=u.r;exports.newBEM=u.newBEM;exports.state=P.state;exports.Button=qh.external;exports.Caret=$l.Animated$1;exports.telem=O.external;exports.Theming=ks.external;exports.Color=Pe.external;exports.useDebouncedCallback=Pe.useDebouncedCallback;exports.Triggers=Vl.external;exports.List=nt.external;exports.Dialog=Fl.external;exports.Input=Ie.external;exports.Flex=pe.external;exports.createHexOpacityVariants=Hl.createHexOpacityVariants;exports.unitProperty=Hl.unitProperty;exports.Header=Qh.external;exports.Menu=Jh.external;exports.Tabs=Me.external;exports.Text=eg.external;exports.Tree=tg.external;exports.Video=ng.Video;exports.Breadcrumb=Hg;exports.Canvas=s1;exports.Channel=_0;exports.Component=Tg;exports.Control=O2;exports.Device=A0;exports.Diagram=BC;exports.Direction=k0;exports.Eraser=vg;exports.Flux=m0;exports.Form=i0;exports.Icon=fg;exports.Label=dj;exports.Legend=m1;exports.Line=h1;exports.LinePlot=T1;exports.Log=zC;exports.Measure=D1;exports.Mosaic=kj;exports.Nav=Lg;exports.Note=Mj;exports.OS=Gj;exports.Observe=J1;exports.Ontology=Fj;exports.Override=Wj;exports.Pluto=Z2;exports.Portal=yj;exports.Progress=Y2;exports.Rack=H0;exports.Range=O1;exports.Ranger=v2;exports.Resize=wg;exports.Rule=B1;exports.Schematic=b7;exports.Select=zg;exports.Status=Pg;exports.Steps=U2;exports.Synnax=o0;exports.Table=J2;exports.TableCells=hE;exports.Tag=Ig;exports.Task=tj;exports.Telem=N2;exports.Tooltip=hg;exports.Value=oE;exports.Viewport=N1;exports.Workspace=z2;exports.axis=Qg;exports.control=Jg;exports.proxyMemo=mg;exports.useAsyncEffect=It;exports.useDestructors=Ls;
|
|
38
|
+
`)),x=d.reduce((p,m)=>p.concat(...m),[]);return[d,x]}return[[],[]]},[e]);return j.useEffect(()=>{const c=t?.target??wl,d=t?.actInsideInputWithModifier??!0;if(e!==null){const x=h=>{if(o.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!o.current||o.current&&!d)&&Xu(h))return!1;const E=kl(h.code,a);if(i.current.add(h[E]),vl(l,i.current,!1)){const S=h.composedPath?.()?.[0]||h.target,R=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(o.current||!R)&&h.preventDefault(),s(!0)}},p=h=>{const g=kl(h.code,a);vl(l,i.current,!0)?(s(!1),i.current.clear()):i.current.delete(h[g]),h.key==="Meta"&&i.current.clear(),o.current=!1},m=()=>{i.current.clear(),s(!1)};return c?.addEventListener("keydown",x),c?.addEventListener("keyup",p),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c?.removeEventListener("keydown",x),c?.removeEventListener("keyup",p),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,s]),n}function vl(e,t,n){return e.filter(s=>n||s.length===t.size).some(s=>s.every(o=>t.has(o)))}function kl(e,t){return t.includes(e)?"code":"key"}const _5=()=>{const e=ve();return j.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[s,o,i],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??s,y:t.y??o,zoom:t.zoom??i},n),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)=>e.getState().setCenter(t,n,s),fitBounds:async(t,n)=>{const{width:s,height:o,minZoom:i,maxZoom:l,panZoom:a}=e.getState(),c=Jr(t,s,o,i,l,n?.padding??.1);return a?(await a.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:s,snapGrid:o,snapToGrid:i,domNode:l}=e.getState();if(!l)return t;const{x:a,y:c}=l.getBoundingClientRect(),d={x:t.x-a,y:t.y-c},x=n.snapGrid??o,p=n.snapToGrid??i;return Fn(d,s,p,x)},flowToScreenPosition:t=>{const{transform:n,domNode:s}=e.getState();if(!s)return t;const{x:o,y:i}=s.getBoundingClientRect(),l=Ts(t,n);return{x:l.x+o,y:l.y+i}}}),[])};function yd(e,t){const n=[],s=new Map,o=[];for(const i of e)if(i.type==="add"){o.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 a={...i};for(const c of l)L5(c,a);n.push(a)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function L5(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.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Sd(e,t){return yd(e,t)}function Rd(e,t){return yd(e,t)}function Ct(e,t){return{id:e,type:"select",selected:t}}function Ut(e,t=new Set,n=!1){const s=[];for(const[o,i]of e){const l=t.has(o);!(i.selected===void 0&&!l)&&i.selected!==l&&(n&&(i.selected=l),s.push(Ct(i.id,l)))}return s}function _l({items:e=[],lookup:t}){const n=[],s=new Map(e.map(o=>[o.id,o]));for(const[o,i]of e.entries()){const l=t.get(i.id),a=l?.internals?.userNode??l;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:"replace"}),a===void 0&&n.push({item:i,type:"add",index:o})}for(const[o]of t)s.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function Ll(e){return{id:e.id,type:"remove"}}const Tl=e=>ty(e),T5=e=>Fu(e);function Cd(e){return j.forwardRef(e)}const M5=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Ml(e){const[t,n]=j.useState(BigInt(0)),[s]=j.useState(()=>N5(()=>n(o=>o+BigInt(1))));return M5(()=>{const o=s.get();o.length&&(e(o),s.reset())},[t]),s}function N5(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const bd=j.createContext(null);function P5({children:e}){const t=ve(),n=j.useCallback(a=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:x,onNodesChange:p,nodeLookup:m,fitViewQueued:h}=t.getState();let g=c;for(const S of a)g=typeof S=="function"?S(g):S;const E=_l({items:g,lookup:m});x&&d(g),E.length>0?p?.(E):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:R,setNodes:v}=t.getState();S&&v(R)})},[]),s=Ml(n),o=j.useCallback(a=>{const{edges:c=[],setEdges:d,hasDefaultEdges:x,onEdgesChange:p,edgeLookup:m}=t.getState();let h=c;for(const g of a)h=typeof g=="function"?g(h):g;x?d(h):p&&p(_l({items:h,lookup:m}))},[]),i=Ml(o),l=j.useMemo(()=>({nodeQueue:s,edgeQueue:i}),[]);return r.jsxRuntimeExports.jsx(bd.Provider,{value:l,children:e})}function A5(){const e=j.useContext(bd);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const O5=e=>!!e.panZoom;function zt(){const e=_5(),t=ve(),n=A5(),s=Ee(O5),o=j.useMemo(()=>{const i=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},a=p=>{n.edgeQueue.push(p)},c=p=>{const{nodeLookup:m,nodeOrigin:h}=t.getState(),g=Tl(p)?p:m.get(p.id),E=g.parentId?Uu(g.position,g.measured,g.parentId,m,h):g.position,S={...g,position:E,width:g.measured?.width??g.width,height:g.measured?.height??g.height};return sn(S)},d=(p,m,h={replace:!1})=>{l(g=>g.map(E=>{if(E.id===p){const S=typeof m=="function"?m(E):m;return h.replace&&Tl(S)?S:{...E,...S}}return E}))},x=(p,m,h={replace:!1})=>{a(g=>g.map(E=>{if(E.id===p){const S=typeof m=="function"?m(E):m;return h.replace&&T5(S)?S:{...E,...S}}return E}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>i(p)?.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:a,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(h=>[...h,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(h=>[...h,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:h}=t.getState(),[g,E,S]=h;return{nodes:p.map(R=>({...R})),edges:m.map(R=>({...R})),viewport:{x:g,y:E,zoom:S}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:h,edges:g,onNodesDelete:E,onEdgesDelete:S,triggerNodeChanges:R,triggerEdgeChanges:v,onDelete:y,onBeforeDelete:C}=t.getState(),{nodes:k,edges:T}=await iy({nodesToRemove:p,edgesToRemove:m,nodes:h,edges:g,onBeforeDelete:C}),P=T.length>0,I=k.length>0;if(P){const B=T.map(Ll);S?.(T),v(B)}if(I){const B=k.map(Ll);E?.(k),R(B)}return(I||P)&&y?.({nodes:k,edges:T}),{deletedNodes:k,deletedEdges:T}},getIntersectingNodes:(p,m=!0,h)=>{const g=tl(p),E=g?p:c(p),S=h!==void 0;return E?(h||t.getState().nodes).filter(R=>{const v=t.getState().nodeLookup.get(R.id);if(v&&!g&&(R.id===p.id||!v.internals.positionAbsolute))return!1;const y=sn(S?R:v),C=Tn(y,E);return m&&C>0||C>=E.width*E.height}):[]},isNodeIntersecting:(p,m,h=!0)=>{const E=tl(p)?p:c(p);if(!E)return!1;const S=Tn(E,m);return h&&S>0||S>=E.width*E.height},updateNode:d,updateNodeData:(p,m,h={replace:!1})=>{d(p,g=>{const E=typeof m=="function"?m(g):m;return h.replace?{...g,data:E}:{...g,data:{...g.data,...E}}},h)},updateEdge:x,updateEdgeData:(p,m,h={replace:!1})=>{x(p,g=>{const E=typeof m=="function"?m(g):m;return h.replace?{...g,data:E}:{...g,data:{...g.data,...E}}},h)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:h}=t.getState();return ny(p,{nodeLookup:m,nodeOrigin:h})},getHandleConnections:({type:p,id:m,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${p}${m?`-${m}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:m,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${p?m?`-${p}-${m}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const m=t.getState().fitViewResolver??cy();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(h=>[...h]),m.promise}}},[]);return j.useMemo(()=>({...o,...e,viewportInitialized:s}),[s])}const Nl=e=>e.selected,I5=typeof window<"u"?window:void 0;function D5({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ve(),{deleteElements:s}=zt(),o=Nn(e,{actInsideInputWithModifier:!1}),i=Nn(t,{target:I5});j.useEffect(()=>{if(o){const{edges:l,nodes:a}=n.getState();s({nodes:a.filter(Nl),edges:l.filter(Nl)}),n.setState({nodesSelectionActive:!1})}},[o]),j.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function B5(e){const t=ve();j.useEffect(()=>{const n=()=>{if(!e.current)return!1;const s=ei(e.current);(s.height===0||s.width===0)&&t.getState().onError?.("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 Qs={position:"absolute",width:"100%",height:"100%",top:0,left:0},$5=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function z5({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:s=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=wt.Free,zoomOnDoubleClick:l=!0,panOnDrag:a=!0,defaultViewport:c,translateExtent:d,minZoom:x,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:h=!0,children:g,noWheelClassName:E,noPanClassName:S,onViewportChange:R,isControlledViewport:v,paneClickDistance:y}){const C=ve(),k=j.useRef(null),{userSelectionActive:T,lib:P}=Ee($5,ke),I=Nn(m),B=j.useRef();B5(k);const F=j.useCallback($=>{R?.({x:$[0],y:$[1],zoom:$[2]}),v||C.setState({transform:$})},[R,v]);return j.useEffect(()=>{if(k.current){B.current=Hy({domNode:k.current,minZoom:x,maxZoom:p,translateExtent:d,viewport:c,paneClickDistance:y,onDraggingChange:b=>C.setState({paneDragging:b}),onPanZoomStart:(b,N)=>{const{onViewportChangeStart:_,onMoveStart:M}=C.getState();M?.(b,N),_?.(N)},onPanZoom:(b,N)=>{const{onViewportChange:_,onMove:M}=C.getState();M?.(b,N),_?.(N)},onPanZoomEnd:(b,N)=>{const{onViewportChangeEnd:_,onMoveEnd:M}=C.getState();M?.(b,N),_?.(N)}});const{x:$,y:D,zoom:z}=B.current.getViewport();return C.setState({panZoom:B.current,transform:[$,D,z],domNode:k.current.closest(".react-flow")}),()=>{B.current?.destroy()}}},[]),j.useEffect(()=>{B.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:s,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:l,panOnDrag:a,zoomActivationKeyPressed:I,preventScrolling:h,noPanClassName:S,userSelectionActive:T,noWheelClassName:E,lib:P,onTransformChange:F})},[e,t,n,s,o,i,l,a,I,h,S,T,E,P,F]),r.jsxRuntimeExports.jsx("div",{className:"react-flow__renderer",ref:k,style:Qs,children:g})}const V5=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function F5(){const{userSelectionActive:e,userSelectionRect:t}=Ee(V5,ke);return e&&t?r.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?.(n)},H5=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Z5({isSelecting:e,selectionKeyPressed:t,selectionMode:n=tn.Full,panOnDrag:s,selectionOnDrag:o,onSelectionStart:i,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:c,onPaneScroll:d,onPaneMouseEnter:x,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){const g=ve(),{userSelectionActive:E,elementsSelectable:S,dragging:R,connectionInProgress:v}=Ee(H5,ke),y=S&&(e||E),C=j.useRef(null),k=j.useRef(),T=j.useRef(new Set),P=j.useRef(new Set),I=j.useRef(!1),B=j.useRef(!1),F=M=>{if(I.current||v){I.current=!1;return}a?.(M),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},$=M=>{if(Array.isArray(s)&&s?.includes(2)){M.preventDefault();return}c?.(M)},D=d?M=>d(M):void 0,z=M=>{const{resetSelectedElements:V,domNode:H}=g.getState();if(k.current=H?.getBoundingClientRect(),!S||!e||M.button!==0||M.target!==C.current||!k.current)return;M.target?.setPointerCapture?.(M.pointerId),B.current=!0,I.current=!1;const{x:K,y:Z}=tt(M.nativeEvent,k.current);V(),g.setState({userSelectionRect:{width:0,height:0,startX:K,startY:Z,x:K,y:Z}}),i?.(M)},b=M=>{const{userSelectionRect:V,transform:H,nodeLookup:K,edgeLookup:Z,connectionLookup:G,triggerNodeChanges:Q,triggerEdgeChanges:ee,defaultEdgeOptions:ae}=g.getState();if(!k.current||!V)return;I.current=!0;const{x:re,y:se}=tt(M.nativeEvent,k.current),{startX:te,startY:le}=V,Re={startX:te,startY:le,x:re<te?re:te,y:se<le?se:le,width:Math.abs(re-te),height:Math.abs(se-le)},Ce=T.current,ue=P.current;T.current=new Set(Qr(K,Re,H,n===tn.Partial,!0).map(X=>X.id)),P.current=new Set;const me=ae?.selectable??!0;for(const X of T.current){const de=G.get(X);if(de)for(const{edgeId:we}of de.values()){const Pe=Z.get(we);Pe&&(Pe.selectable??me)&&P.current.add(we)}}if(!nl(Ce,T.current)){const X=Ut(K,T.current,!0);Q(X)}if(!nl(ue,P.current)){const X=Ut(Z,P.current);ee(X)}g.setState({userSelectionRect:Re,userSelectionActive:!0,nodesSelectionActive:!1})},N=M=>{if(M.button!==0||!B.current)return;M.target?.releasePointerCapture?.(M.pointerId);const{userSelectionRect:V}=g.getState();!E&&V&&M.target===C.current&&F?.(M),g.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:T.current.size>0}),l?.(M),(t||o)&&(I.current=!1),B.current=!1},_=s===!0||Array.isArray(s)&&s.includes(0);return r.jsxRuntimeExports.jsxs("div",{className:Te(["react-flow__pane",{draggable:_,dragging:R,selection:e}]),onClick:y?void 0:ko(F,C),onContextMenu:ko($,C),onWheel:ko(D,C),onPointerEnter:y?void 0:x,onPointerDown:y?z:p,onPointerMove:y?b:p,onPointerUp:y?N:void 0,onPointerLeave:m,ref:C,style:Qs,children:[h,r.jsxRuntimeExports.jsx(F5,{})]})}function er({id:e,store:t,unselect:n=!1,nodeRef:s}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:l,nodeLookup:a,onError:c}=t.getState(),d=a.get(e);if(!d){c?.("012",Oe.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&l)&&(i({nodes:[d],edges:[]}),requestAnimationFrame(()=>s?.current?.blur())):o([e])}function wd({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:s,nodeId:o,isSelectable:i,nodeClickDistance:l}){const a=ve(),[c,d]=j.useState(!1),x=j.useRef();return j.useEffect(()=>{x.current=_y({getStoreItems:()=>a.getState(),onNodeMouseDown:p=>{er({id:p,store:a,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),j.useEffect(()=>{if(t)x.current?.destroy();else if(e.current)return x.current?.update({noDragClassName:n,handleSelector:s,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:l}),()=>{x.current?.destroy()}},[n,s,t,i,e,o]),c}const K5=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function vd(){const e=ve();return j.useCallback(n=>{const{nodeExtent:s,snapToGrid:o,snapGrid:i,nodesDraggable:l,onError:a,updateNodePositions:c,nodeLookup:d,nodeOrigin:x}=e.getState(),p=new Map,m=K5(l),h=o?i[0]:5,g=o?i[1]:5,E=n.direction.x*h*n.factor,S=n.direction.y*g*n.factor;for(const[,R]of d){if(!m(R))continue;let v={x:R.internals.positionAbsolute.x+E,y:R.internals.positionAbsolute.y+S};o&&(v=Us(v,i));const{position:y,positionAbsolute:C}=Hu({nodeId:R.id,nextPosition:v,nodeLookup:d,nodeExtent:s,nodeOrigin:x,onError:a});R.position=y,R.internals.positionAbsolute=C,p.set(R.id,R)}c(p)},[])}const ri=j.createContext(null),Y5=ri.Provider;ri.Consumer;const kd=()=>j.useContext(ri),G5=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),U5=(e,t,n)=>s=>{const{connectionClickStartHandle:o,connectionMode:i,connection:l}=s,{fromHandle:a,toHandle:c,isValid:d}=l,x=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:a?.nodeId===e&&a?.id===t&&a?.type===n,connectingTo:x,clickConnecting:o?.nodeId===e&&o?.id===t&&o?.type===n,isPossibleEndHandle:i===Pt.Strict?a?.type!==n:e!==a?.nodeId||t!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!o,valid:x&&d}};function W5({type:e="source",position:t=J.Top,isValidConnection:n,isConnectable:s=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:l,onConnect:a,children:c,className:d,onMouseDown:x,onTouchStart:p,...m},h){const g=l||null,E=e==="target",S=ve(),R=kd(),{connectOnClick:v,noPanClassName:y,rfId:C}=Ee(G5,ke),{connectingFrom:k,connectingTo:T,clickConnecting:P,isPossibleEndHandle:I,connectionInProcess:B,clickConnectionInProcess:F,valid:$}=Ee(U5(R,g,e),ke);R||S.getState().onError?.("010",Oe.error010());const D=N=>{const{defaultEdgeOptions:_,onConnect:M,hasDefaultEdges:V}=S.getState(),H={..._,...N};if(V){const{edges:K,setEdges:Z}=S.getState();Z(nd(H,K))}M?.(H),a?.(H)},z=N=>{if(!R)return;const _=qu(N.nativeEvent);if(o&&(_&&N.button===0||!_)){const M=S.getState();Jo.onPointerDown(N.nativeEvent,{autoPanOnConnect:M.autoPanOnConnect,connectionMode:M.connectionMode,connectionRadius:M.connectionRadius,domNode:M.domNode,nodeLookup:M.nodeLookup,lib:M.lib,isTarget:E,handleId:g,nodeId:R,flowId:M.rfId,panBy:M.panBy,cancelConnection:M.cancelConnection,onConnectStart:M.onConnectStart,onConnectEnd:M.onConnectEnd,updateConnection:M.updateConnection,onConnect:D,isValidConnection:n||M.isValidConnection,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:M.autoPanSpeed,dragThreshold:M.connectionDragThreshold})}_?x?.(N):p?.(N)},b=N=>{const{onClickConnectStart:_,onClickConnectEnd:M,connectionClickStartHandle:V,connectionMode:H,isValidConnection:K,lib:Z,rfId:G,nodeLookup:Q,connection:ee}=S.getState();if(!R||!V&&!o)return;if(!V){_?.(N.nativeEvent,{nodeId:R,handleId:g,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:R,type:e,id:g}});return}const ae=Wu(N.target),re=n||K,{connection:se,isValid:te}=Jo.isValid(N.nativeEvent,{handle:{nodeId:R,id:g,type:e},connectionMode:H,fromNodeId:V.nodeId,fromHandleId:V.id||null,fromType:V.type,isValidConnection:re,flowId:G,doc:ae,lib:Z,nodeLookup:Q});te&&se&&D(se);const le=structuredClone(ee);delete le.inProgress,le.toPosition=le.toHandle?le.toHandle.position:null,M?.(N,le),S.setState({connectionClickStartHandle:null})};return r.jsxRuntimeExports.jsx("div",{"data-handleid":g,"data-nodeid":R,"data-handlepos":t,"data-id":`${C}-${R}-${g}-${e}`,className:Te(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,d,{source:!E,target:E,connectable:s,connectablestart:o,connectableend:i,clickconnecting:P,connectingfrom:k,connectingto:T,valid:$,connectionindicator:s&&(!B||I)&&(B||F?i:o)}]),onMouseDown:z,onTouchStart:z,onClick:v?b:void 0,ref:h,...m,children:c})}const Pn=j.memo(Cd(W5));function X5({data:e,isConnectable:t,sourcePosition:n=J.Bottom}){return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[e?.label,r.jsxRuntimeExports.jsx(Pn,{type:"source",position:n,isConnectable:t})]})}function q5({data:e,isConnectable:t,targetPosition:n=J.Top,sourcePosition:s=J.Bottom}){return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(Pn,{type:"target",position:n,isConnectable:t}),e?.label,r.jsxRuntimeExports.jsx(Pn,{type:"source",position:s,isConnectable:t})]})}function Q5(){return null}function J5({data:e,isConnectable:t,targetPosition:n=J.Top}){return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(Pn,{type:"target",position:n,isConnectable:t}),e?.label]})}const Ns={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Pl={input:X5,default:q5,output:J5,group:Q5};function eS(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const tS=e=>{const{width:t,height:n,x:s,y:o}=Vn(e.nodeLookup,{filter:i=>!!i.selected});return{width:Xe(t)?t:null,height:Xe(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${s}px,${o}px)`}};function nS({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const s=ve(),{width:o,height:i,transformString:l,userSelectionActive:a}=Ee(tS,ke),c=vd(),d=j.useRef(null);if(j.useEffect(()=>{n||d.current?.focus({preventScroll:!0})},[n]),wd({nodeRef:d}),a||!o||!i)return null;const x=e?m=>{const h=s.getState().nodes.filter(g=>g.selected);e(m,h)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Ns,m.key)&&(m.preventDefault(),c({direction:Ns[m.key],factor:m.shiftKey?4:1}))};return r.jsxRuntimeExports.jsx("div",{className:Te(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:r.jsxRuntimeExports.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:o,height:i}})})}const Al=typeof window<"u"?window:void 0,sS=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function _d({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:l,paneClickDistance:a,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:x,selectionMode:p,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:E,zoomActivationKeyCode:S,elementsSelectable:R,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:k,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:I,defaultViewport:B,translateExtent:F,minZoom:$,maxZoom:D,preventScrolling:z,onSelectionContextMenu:b,noWheelClassName:N,noPanClassName:_,disableKeyboardA11y:M,onViewportChange:V,isControlledViewport:H}){const{nodesSelectionActive:K,userSelectionActive:Z}=Ee(sS),G=Nn(d,{target:Al}),Q=Nn(E,{target:Al}),ee=Q||I,ae=Q||C,re=x&&ee!==!0,se=G||Z||re;return D5({deleteKeyCode:c,multiSelectionKeyCode:g}),r.jsxRuntimeExports.jsx(z5,{onPaneContextMenu:i,elementsSelectable:R,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:ae,panOnScrollSpeed:k,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:!G&&ee,defaultViewport:B,translateExtent:F,minZoom:$,maxZoom:D,zoomActivationKeyCode:S,preventScrolling:z,noWheelClassName:N,noPanClassName:_,onViewportChange:V,isControlledViewport:H,paneClickDistance:a,children:r.jsxRuntimeExports.jsxs(Z5,{onSelectionStart:m,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:l,panOnDrag:ee,isSelecting:!!se,selectionMode:p,selectionKeyPressed:G,selectionOnDrag:re,children:[e,K&&r.jsxRuntimeExports.jsx(nS,{onSelectionContextMenu:b,noPanClassName:_,disableKeyboardA11y:M})]})})}_d.displayName="FlowRenderer";const oS=j.memo(_d),rS=e=>t=>e?Qr(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 iS(e){return Ee(j.useCallback(rS(e),[e]),ke)}const lS=e=>e.updateNodeInternals;function aS(){const e=Ee(lS),[t]=j.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const s=new Map;n.forEach(o=>{const i=o.target.getAttribute("data-id");s.set(i,{id:i,nodeElement:o.target,force:!0})}),e(s)}));return j.useEffect(()=>()=>{t?.disconnect()},[t]),t}function cS({node:e,nodeType:t,hasDimensions:n,resizeObserver:s}){const o=ve(),i=j.useRef(null),l=j.useRef(null),a=j.useRef(e.sourcePosition),c=j.useRef(e.targetPosition),d=j.useRef(t),x=n&&!!e.internals.handleBounds;return j.useEffect(()=>{i.current&&!e.hidden&&(!x||l.current!==i.current)&&(l.current&&s?.unobserve(l.current),s?.observe(i.current),l.current=i.current)},[x,e.hidden]),j.useEffect(()=>()=>{l.current&&(s?.unobserve(l.current),l.current=null)},[]),j.useEffect(()=>{if(i.current){const p=d.current!==t,m=a.current!==e.sourcePosition,h=c.current!==e.targetPosition;(p||m||h)&&(d.current=t,a.current=e.sourcePosition,c.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function uS({id:e,onClick:t,onMouseEnter:n,onMouseMove:s,onMouseLeave:o,onContextMenu:i,onDoubleClick:l,nodesDraggable:a,elementsSelectable:c,nodesConnectable:d,nodesFocusable:x,resizeObserver:p,noDragClassName:m,noPanClassName:h,disableKeyboardA11y:g,rfId:E,nodeTypes:S,nodeClickDistance:R,onError:v}){const{node:y,internals:C,isParent:k}=Ee(te=>{const le=te.nodeLookup.get(e),Re=te.parentLookup.has(e);return{node:le,internals:le.internals,isParent:Re}},ke);let T=y.type||"default",P=S?.[T]||Pl[T];P===void 0&&(v?.("003",Oe.error003(T)),T="default",P=Pl.default);const I=!!(y.draggable||a&&typeof y.draggable>"u"),B=!!(y.selectable||c&&typeof y.selectable>"u"),F=!!(y.connectable||d&&typeof y.connectable>"u"),$=!!(y.focusable||x&&typeof y.focusable>"u"),D=ve(),z=Gu(y),b=cS({node:y,nodeType:T,hasDimensions:z,resizeObserver:p}),N=wd({nodeRef:b,disabled:y.hidden||!I,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:B,nodeClickDistance:R}),_=vd();if(y.hidden)return null;const M=dt(y),V=eS(y),H=B||I||t||n||s||o,K=n?te=>n(te,{...C.userNode}):void 0,Z=s?te=>s(te,{...C.userNode}):void 0,G=o?te=>o(te,{...C.userNode}):void 0,Q=i?te=>i(te,{...C.userNode}):void 0,ee=l?te=>l(te,{...C.userNode}):void 0,ae=te=>{const{selectNodesOnDrag:le,nodeDragThreshold:Re}=D.getState();B&&(!le||!I||Re>0)&&er({id:e,store:D,nodeRef:b}),t&&t(te,{...C.userNode})},re=te=>{if(!(Xu(te.nativeEvent)||g)){if(Bu.includes(te.key)&&B){const le=te.key==="Escape";er({id:e,store:D,unselect:le,nodeRef:b})}else if(I&&y.selected&&Object.prototype.hasOwnProperty.call(Ns,te.key)){te.preventDefault();const{ariaLabelConfig:le}=D.getState();D.setState({ariaLiveMessage:le["node.a11yDescription.ariaLiveMessage"]({direction:te.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),_({direction:Ns[te.key],factor:te.shiftKey?4:1})}}},se=()=>{if(g||!b.current?.matches(":focus-visible"))return;const{transform:te,width:le,height:Re,autoPanOnNodeFocus:Ce,setCenter:ue}=D.getState();if(!Ce)return;Qr(new Map([[e,y]]),{x:0,y:0,width:le,height:Re},te,!0).length>0||ue(y.position.x+M.width/2,y.position.y+M.height/2,{zoom:te[2]})};return r.jsxRuntimeExports.jsx("div",{className:Te(["react-flow__node",`react-flow__node-${T}`,{[h]:I},y.className,{selected:y.selected,selectable:B,parent:k,draggable:I,dragging:N}]),ref:b,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:H?"all":"none",visibility:z?"visible":"hidden",...y.style,...V},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:K,onMouseMove:Z,onMouseLeave:G,onContextMenu:Q,onClick:ae,onDoubleClick:ee,onKeyDown:$?re:void 0,tabIndex:$?0:void 0,onFocus:$?se:void 0,role:y.ariaRole??($?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${gd}-${E}`,"aria-label":y.ariaLabel,...y.domAttributes,children:r.jsxRuntimeExports.jsx(Y5,{value:e,children:r.jsxRuntimeExports.jsx(P,{id:e,data:y.data,type:T,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:B,draggable:I,deletable:y.deletable??!0,isConnectable:F,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:N,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...M})})})}const dS=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Ld(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:o,onError:i}=Ee(dS,ke),l=iS(e.onlyRenderVisibleElements),a=aS();return r.jsxRuntimeExports.jsx("div",{className:"react-flow__nodes",style:Qs,children:l.map(c=>r.jsxRuntimeExports.jsx(uS,{id:c,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:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}Ld.displayName="NodeRenderer";const xS=j.memo(Ld);function pS(e){return Ee(j.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const s=[];if(n.width&&n.height)for(const o of n.edges){const i=n.nodeLookup.get(o.source),l=n.nodeLookup.get(o.target);i&&l&&py({sourceNode:i,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&s.push(o.id)}return s},[e]),ke)}const mS=({color:e="none",strokeWidth:t=1})=>r.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),fS=({color:e="none",strokeWidth:t=1})=>r.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Ol={[ks.Arrow]:mS,[ks.ArrowClosed]:fS};function hS(e){const t=ve();return j.useMemo(()=>Object.prototype.hasOwnProperty.call(Ol,e)?Ol[e]:(t.getState().onError?.("009",Oe.error009(e)),null),[e])}const gS=({id:e,type:t,color:n,width:s=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:l,orient:a="auto-start-reverse"})=>{const c=hS(t);return c?r.jsxRuntimeExports.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:r.jsxRuntimeExports.jsx(c,{color:n,strokeWidth:l})}):null},Td=({defaultColor:e,rfId:t})=>{const n=Ee(i=>i.edges),s=Ee(i=>i.defaultEdgeOptions),o=j.useMemo(()=>yy(n,{id:t,defaultColor:e,defaultMarkerStart:s?.markerStart,defaultMarkerEnd:s?.markerEnd}),[n,s,t,e]);return o.length?r.jsxRuntimeExports.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:r.jsxRuntimeExports.jsx("defs",{children:o.map(i=>r.jsxRuntimeExports.jsx(gS,{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};Td.displayName="MarkerDefinitions";var jS=j.memo(Td);function Md({x:e,y:t,label:n,labelStyle:s,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:l=[2,4],labelBgBorderRadius:a=2,children:c,className:d,...x}){const[p,m]=j.useState({x:1,y:0,width:0,height:0}),h=Te(["react-flow__edge-textwrapper",d]),g=j.useRef(null);return j.useEffect(()=>{if(g.current){const E=g.current.getBBox();m({x:E.x,y:E.y,width:E.width,height:E.height})}},[n]),n?r.jsxRuntimeExports.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:h,visibility:p.width?"visible":"hidden",...x,children:[o&&r.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:a,ry:a}),r.jsxRuntimeExports.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:g,style:s,children:n}),c]}):null}Md.displayName="EdgeText";const ES=j.memo(Md);function qe({path:e,labelX:t,labelY:n,label:s,labelStyle:o,labelShowBg:i,labelBgStyle:l,labelBgPadding:a,labelBgBorderRadius:c,interactionWidth:d=20,...x}){return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("path",{...x,d:e,fill:"none",className:Te(["react-flow__edge-path",x.className])}),d&&r.jsxRuntimeExports.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),s&&Xe(t)&&Xe(n)?r.jsxRuntimeExports.jsx(ES,{x:t,y:n,label:s,labelStyle:o,labelShowBg:i,labelBgStyle:l,labelBgPadding:a,labelBgBorderRadius:c}):null]})}function Il({pos:e,x1:t,y1:n,x2:s,y2:o}){return e===J.Left||e===J.Right?[.5*(t+s),n]:[t,.5*(n+o)]}function Nd({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:s,targetY:o,targetPosition:i=J.Top}){const[l,a]=Il({pos:n,x1:e,y1:t,x2:s,y2:o}),[c,d]=Il({pos:i,x1:s,y1:o,x2:e,y2:t}),[x,p,m,h]=Qu({sourceX:e,sourceY:t,targetX:s,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:c,targetControlY:d});return[`M${e},${t} C${l},${a} ${c},${d} ${s},${o}`,x,p,m,h]}function Pd(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:o,targetY:i,sourcePosition:l,targetPosition:a,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,interactionWidth:R})=>{const[v,y,C]=Nd({sourceX:n,sourceY:s,sourcePosition:l,targetX:o,targetY:i,targetPosition:a}),k=e.isInternal?void 0:t;return r.jsxRuntimeExports.jsx(qe,{id:k,path:v,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,interactionWidth:R})})}const yS=Pd({isInternal:!1}),Ad=Pd({isInternal:!0});yS.displayName="SimpleBezierEdge";Ad.displayName="SimpleBezierEdgeInternal";function Od(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:o,targetY:i,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,sourcePosition:h=J.Bottom,targetPosition:g=J.Top,markerEnd:E,markerStart:S,pathOptions:R,interactionWidth:v})=>{const[y,C,k]=Xo({sourceX:n,sourceY:s,sourcePosition:h,targetX:o,targetY:i,targetPosition:g,borderRadius:R?.borderRadius,offset:R?.offset}),T=e.isInternal?void 0:t;return r.jsxRuntimeExports.jsx(qe,{id:T,path:y,labelX:C,labelY:k,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:E,markerStart:S,interactionWidth:v})})}const Id=Od({isInternal:!1}),Dd=Od({isInternal:!0});Id.displayName="SmoothStepEdge";Dd.displayName="SmoothStepEdgeInternal";function Bd(e){return j.memo(({id:t,...n})=>{const s=e.isInternal?void 0:t;return r.jsxRuntimeExports.jsx(Id,{...n,id:s,pathOptions:j.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const SS=Bd({isInternal:!1}),$d=Bd({isInternal:!0});SS.displayName="StepEdge";$d.displayName="StepEdgeInternal";function zd(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:o,targetY:i,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:E})=>{const[S,R,v]=sd({sourceX:n,sourceY:s,targetX:o,targetY:i}),y=e.isInternal?void 0:t;return r.jsxRuntimeExports.jsx(qe,{id:y,path:S,labelX:R,labelY:v,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:E})})}const RS=zd({isInternal:!1}),Vd=zd({isInternal:!0});RS.displayName="StraightEdge";Vd.displayName="StraightEdgeInternal";function Fd(e){return j.memo(({id:t,sourceX:n,sourceY:s,targetX:o,targetY:i,sourcePosition:l=J.Bottom,targetPosition:a=J.Top,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,pathOptions:R,interactionWidth:v})=>{const[y,C,k]=Ju({sourceX:n,sourceY:s,sourcePosition:l,targetX:o,targetY:i,targetPosition:a,curvature:R?.curvature}),T=e.isInternal?void 0:t;return r.jsxRuntimeExports.jsx(qe,{id:T,path:y,labelX:C,labelY:k,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:E,markerStart:S,interactionWidth:v})})}const CS=Fd({isInternal:!1}),Hd=Fd({isInternal:!0});CS.displayName="BezierEdge";Hd.displayName="BezierEdgeInternal";const Dl={default:Hd,straight:Vd,step:$d,smoothstep:Dd,simplebezier:Ad},Bl={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},bS=(e,t,n)=>n===J.Left?e-t:n===J.Right?e+t:e,wS=(e,t,n)=>n===J.Top?e-t:n===J.Bottom?e+t:e,$l="react-flow__edgeupdater";function zl({position:e,centerX:t,centerY:n,radius:s=10,onMouseDown:o,onMouseEnter:i,onMouseOut:l,type:a}){return r.jsxRuntimeExports.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:l,className:Te([$l,`${$l}-${a}`]),cx:bS(t,s,e),cy:wS(n,s,e),r:s,stroke:"transparent",fill:"transparent"})}function vS({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:s,sourceY:o,targetX:i,targetY:l,sourcePosition:a,targetPosition:c,onReconnect:d,onReconnectStart:x,onReconnectEnd:p,setReconnecting:m,setUpdateHover:h}){const g=ve(),E=(C,k)=>{if(C.button!==0)return;const{autoPanOnConnect:T,domNode:P,isValidConnection:I,connectionMode:B,connectionRadius:F,lib:$,onConnectStart:D,onConnectEnd:z,cancelConnection:b,nodeLookup:N,rfId:_,panBy:M,updateConnection:V}=g.getState(),H=k.type==="target",K=(Q,ee)=>{m(!1),p?.(Q,n,k.type,ee)},Z=Q=>d?.(n,Q),G=(Q,ee)=>{m(!0),x?.(C,n,k.type),D?.(Q,ee)};Jo.onPointerDown(C.nativeEvent,{autoPanOnConnect:T,connectionMode:B,connectionRadius:F,domNode:P,handleId:k.id,nodeId:k.nodeId,nodeLookup:N,isTarget:H,edgeUpdaterType:k.type,lib:$,flowId:_,cancelConnection:b,panBy:M,isValidConnection:I,onConnect:Z,onConnectStart:G,onConnectEnd:z,onReconnectEnd:K,updateConnection:V,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold})},S=C=>E(C,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),R=C=>E(C,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>h(!0),y=()=>h(!1);return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[(e===!0||e==="source")&&r.jsxRuntimeExports.jsx(zl,{position:a,centerX:s,centerY:o,radius:t,onMouseDown:S,onMouseEnter:v,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&r.jsxRuntimeExports.jsx(zl,{position:c,centerX:i,centerY:l,radius:t,onMouseDown:R,onMouseEnter:v,onMouseOut:y,type:"target"})]})}function kS({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:s,onClick:o,onDoubleClick:i,onContextMenu:l,onMouseEnter:a,onMouseMove:c,onMouseLeave:d,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,rfId:g,edgeTypes:E,noPanClassName:S,onError:R,disableKeyboardA11y:v}){let y=Ee(ue=>ue.edgeLookup.get(e));const C=Ee(ue=>ue.defaultEdgeOptions);y=C?{...C,...y}:y;let k=y.type||"default",T=E?.[k]||Dl[k];T===void 0&&(R?.("011",Oe.error011(k)),k="default",T=Dl.default);const P=!!(y.focusable||t&&typeof y.focusable>"u"),I=typeof p<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),B=!!(y.selectable||s&&typeof y.selectable>"u"),F=j.useRef(null),[$,D]=j.useState(!1),[z,b]=j.useState(!1),N=ve(),{zIndex:_,sourceX:M,sourceY:V,targetX:H,targetY:K,sourcePosition:Z,targetPosition:G}=Ee(j.useCallback(ue=>{const me=ue.nodeLookup.get(y.source),X=ue.nodeLookup.get(y.target);if(!me||!X)return{zIndex:y.zIndex,...Bl};const de=Ey({id:e,sourceNode:me,targetNode:X,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:ue.connectionMode,onError:R});return{zIndex:xy({selected:y.selected,zIndex:y.zIndex,sourceNode:me,targetNode:X,elevateOnSelect:ue.elevateEdgesOnSelect}),...de||Bl}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),ke),Q=j.useMemo(()=>y.markerStart?`url('#${qo(y.markerStart,g)}')`:void 0,[y.markerStart,g]),ee=j.useMemo(()=>y.markerEnd?`url('#${qo(y.markerEnd,g)}')`:void 0,[y.markerEnd,g]);if(y.hidden||M===null||V===null||H===null||K===null)return null;const ae=ue=>{const{addSelectedEdges:me,unselectNodesAndEdges:X,multiSelectionActive:de}=N.getState();B&&(N.setState({nodesSelectionActive:!1}),y.selected&&de?(X({nodes:[],edges:[y]}),F.current?.blur()):me([e])),o&&o(ue,y)},re=i?ue=>{i(ue,{...y})}:void 0,se=l?ue=>{l(ue,{...y})}:void 0,te=a?ue=>{a(ue,{...y})}:void 0,le=c?ue=>{c(ue,{...y})}:void 0,Re=d?ue=>{d(ue,{...y})}:void 0,Ce=ue=>{if(!v&&Bu.includes(ue.key)&&B){const{unselectNodesAndEdges:me,addSelectedEdges:X}=N.getState();ue.key==="Escape"?(F.current?.blur(),me({edges:[y]})):X([e])}};return r.jsxRuntimeExports.jsx("svg",{style:{zIndex:_},children:r.jsxRuntimeExports.jsxs("g",{className:Te(["react-flow__edge",`react-flow__edge-${k}`,y.className,S,{selected:y.selected,animated:y.animated,inactive:!B&&!o,updating:$,selectable:B}]),onClick:ae,onDoubleClick:re,onContextMenu:se,onMouseEnter:te,onMouseMove:le,onMouseLeave:Re,onKeyDown:P?Ce:void 0,tabIndex:P?0:void 0,role:y.ariaRole??(P?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":P?`${jd}-${g}`:void 0,ref:F,...y.domAttributes,children:[!z&&r.jsxRuntimeExports.jsx(T,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:B,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:M,sourceY:V,targetX:H,targetY:K,sourcePosition:Z,targetPosition:G,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:Q,markerEnd:ee,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),I&&r.jsxRuntimeExports.jsx(vS,{edge:y,isReconnectable:I,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,sourceX:M,sourceY:V,targetX:H,targetY:K,sourcePosition:Z,targetPosition:G,setUpdateHover:D,setReconnecting:b})]})})}const _S=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Zd({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:s,noPanClassName:o,onReconnect:i,onEdgeContextMenu:l,onEdgeMouseEnter:a,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:x,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:E}){const{edgesFocusable:S,edgesReconnectable:R,elementsSelectable:v,onError:y}=Ee(_S,ke),C=pS(t);return r.jsxRuntimeExports.jsxs("div",{className:"react-flow__edges",children:[r.jsxRuntimeExports.jsx(jS,{defaultColor:e,rfId:n}),C.map(k=>r.jsxRuntimeExports.jsx(kS,{id:k,edgesFocusable:S,edgesReconnectable:R,elementsSelectable:v,noPanClassName:o,onReconnect:i,onContextMenu:l,onMouseEnter:a,onMouseMove:c,onMouseLeave:d,onClick:x,reconnectRadius:p,onDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,rfId:n,onError:y,edgeTypes:s,disableKeyboardA11y:E},k))]})}Zd.displayName="EdgeRenderer";const LS=j.memo(Zd),TS=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function MS({children:e}){const t=Ee(TS);return r.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function NS(e){const t=zt(),n=j.useRef(!1);j.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const PS=e=>e.panZoom?.syncViewport;function AS(e){const t=Ee(PS),n=ve();return j.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function OS(e){return e.connection.inProgress?{...e.connection,to:Fn(e.connection.to,e.transform)}:{...e.connection}}function IS(e){return OS}function DS(e){const t=IS();return Ee(t,ke)}const BS=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function $S({containerStyle:e,style:t,type:n,component:s}){const{nodesConnectable:o,width:i,height:l,isValid:a,inProgress:c}=Ee(BS,ke);return!(i&&o&&c)?null:r.jsxRuntimeExports.jsx("svg",{style:e,width:i,height:l,className:"react-flow__connectionline react-flow__container",children:r.jsxRuntimeExports.jsx("g",{className:Te(["react-flow__connection",Vu(a)]),children:r.jsxRuntimeExports.jsx(Kd,{style:t,type:n,CustomComponent:s,isValid:a})})})}const Kd=({style:e,type:t=ft.Bezier,CustomComponent:n,isValid:s})=>{const{inProgress:o,from:i,fromNode:l,fromHandle:a,fromPosition:c,to:d,toNode:x,toHandle:p,toPosition:m}=DS();if(!o)return;if(n)return r.jsxRuntimeExports.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:a,fromX:i.x,fromY:i.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:Vu(s),toNode:x,toHandle:p});let h="";const g={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(t){case ft.Bezier:[h]=Ju(g);break;case ft.SimpleBezier:[h]=Nd(g);break;case ft.Step:[h]=Xo({...g,borderRadius:0});break;case ft.SmoothStep:[h]=Xo(g);break;default:[h]=sd(g)}return r.jsxRuntimeExports.jsx("path",{d:h,fill:"none",className:"react-flow__connection-path",style:e})};Kd.displayName="ConnectionLine";const zS={};function Vl(e=zS){const t=j.useRef(e),n=ve();j.useEffect(()=>{if(process.env.NODE_ENV==="development"){const s=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const o of s)if(t.current[o]!==e[o]){n.getState().onError?.("002",Oe.error002());break}t.current=e}},[e])}function VS(){const e=ve(),t=j.useRef(!1);j.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",Oe.error013("react")),t.current=!0}},[])}function Yd({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:s,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:l,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:x,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:E,connectionLineComponent:S,connectionLineContainerStyle:R,selectionKeyCode:v,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:k,panActivationKeyCode:T,zoomActivationKeyCode:P,deleteKeyCode:I,onlyRenderVisibleElements:B,elementsSelectable:F,defaultViewport:$,translateExtent:D,minZoom:z,maxZoom:b,preventScrolling:N,defaultMarkerColor:_,zoomOnScroll:M,zoomOnPinch:V,panOnScroll:H,panOnScrollSpeed:K,panOnScrollMode:Z,zoomOnDoubleClick:G,panOnDrag:Q,onPaneClick:ee,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:se,onPaneScroll:te,onPaneContextMenu:le,paneClickDistance:Re,nodeClickDistance:Ce,onEdgeContextMenu:ue,onEdgeMouseEnter:me,onEdgeMouseMove:X,onEdgeMouseLeave:de,reconnectRadius:we,onReconnect:Pe,onReconnectStart:et,onReconnectEnd:Kn,noDragClassName:Yn,noWheelClassName:Gn,noPanClassName:un,disableKeyboardA11y:dn,nodeExtent:oo,rfId:Un,viewport:Zt,onViewportChange:xn}){return Vl(e),Vl(t),VS(),NS(n),AS(Zt),r.jsxRuntimeExports.jsx(oS,{onPaneClick:ee,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:se,onPaneContextMenu:le,onPaneScroll:te,paneClickDistance:Re,deleteKeyCode:I,selectionKeyCode:v,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:k,panActivationKeyCode:T,zoomActivationKeyCode:P,elementsSelectable:F,zoomOnScroll:M,zoomOnPinch:V,zoomOnDoubleClick:G,panOnScroll:H,panOnScrollSpeed:K,panOnScrollMode:Z,panOnDrag:Q,defaultViewport:$,translateExtent:D,minZoom:z,maxZoom:b,onSelectionContextMenu:p,preventScrolling:N,noDragClassName:Yn,noWheelClassName:Gn,noPanClassName:un,disableKeyboardA11y:dn,onViewportChange:xn,isControlledViewport:!!Zt,children:r.jsxRuntimeExports.jsxs(MS,{children:[r.jsxRuntimeExports.jsx(LS,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:l,onReconnect:Pe,onReconnectStart:et,onReconnectEnd:Kn,onlyRenderVisibleElements:B,onEdgeContextMenu:ue,onEdgeMouseEnter:me,onEdgeMouseMove:X,onEdgeMouseLeave:de,reconnectRadius:we,defaultMarkerColor:_,noPanClassName:un,disableKeyboardA11y:dn,rfId:Un}),r.jsxRuntimeExports.jsx($S,{style:E,type:g,component:S,containerStyle:R}),r.jsxRuntimeExports.jsx("div",{className:"react-flow__edgelabel-renderer"}),r.jsxRuntimeExports.jsx(xS,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:x,nodeClickDistance:Ce,onlyRenderVisibleElements:B,noPanClassName:un,noDragClassName:Yn,disableKeyboardA11y:dn,nodeExtent:oo,rfId:Un}),r.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport-portal"})]})})}Yd.displayName="GraphView";const FS=j.memo(Yd),Fl=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:o,height:i,fitView:l,fitViewOptions:a,minZoom:c=.5,maxZoom:d=2,nodeOrigin:x,nodeExtent:p}={})=>{const m=new Map,h=new Map,g=new Map,E=new Map,S=s??t??[],R=n??e??[],v=x??[0,0],y=p??Ln;rd(g,E,S);const C=Qo(R,m,h,{nodeOrigin:v,nodeExtent:y,elevateNodesOnSelect:!1});let k=[0,0,1];if(l&&o&&i){const T=Vn(m,{filter:F=>!!((F.width||F.initialWidth)&&(F.height||F.initialHeight))}),{x:P,y:I,zoom:B}=Jr(T,o,i,c,d,a?.padding??.1);k=[P,I,B]}return{rfId:"1",width:0,height:0,transform:k,nodes:R,nodesInitialized:C,nodeLookup:m,parentLookup:h,edges:S,edgeLookup:E,connectionLookup:g,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:Ln,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Pt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:v,nodeDragThreshold:1,connectionDragThreshold: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:a,fitViewResolver:null,connection:{...zu},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Ls,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:$u}},HS=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:o,height:i,fitView:l,fitViewOptions:a,minZoom:c,maxZoom:d,nodeOrigin:x,nodeExtent:p})=>c5((m,h)=>{async function g(){const{nodeLookup:E,panZoom:S,fitViewOptions:R,fitViewResolver:v,width:y,height:C,minZoom:k,maxZoom:T}=h();S&&(await ry({nodes:E,width:y,height:C,panZoom:S,minZoom:k,maxZoom:T},R),v?.resolve(!0),m({fitViewResolver:null}))}return{...Fl({nodes:e,edges:t,width:o,height:i,fitView:l,fitViewOptions:a,minZoom:c,maxZoom:d,nodeOrigin:x,nodeExtent:p,defaultNodes:n,defaultEdges:s}),setNodes:E=>{const{nodeLookup:S,parentLookup:R,nodeOrigin:v,elevateNodesOnSelect:y,fitViewQueued:C}=h(),k=Qo(E,S,R,{nodeOrigin:v,nodeExtent:p,elevateNodesOnSelect:y,checkEquality:!0});C&&k?(g(),m({nodes:E,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:E,nodesInitialized:k})},setEdges:E=>{const{connectionLookup:S,edgeLookup:R}=h();rd(S,R,E),m({edges:E})},setDefaultNodesAndEdges:(E,S)=>{if(E){const{setNodes:R}=h();R(E),m({hasDefaultNodes:!0})}if(S){const{setEdges:R}=h();R(S),m({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:S,nodeLookup:R,parentLookup:v,domNode:y,nodeOrigin:C,nodeExtent:k,debug:T,fitViewQueued:P}=h(),{changes:I,updatedInternals:B}=wy(E,R,v,y,C,k);B&&(Ry(R,v,{nodeOrigin:C,nodeExtent:k}),P?(g(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),I?.length>0&&(T&&console.log("React Flow: trigger node changes",I),S?.(I)))},updateNodePositions:(E,S=!1)=>{const R=[],v=[],{nodeLookup:y,triggerNodeChanges:C}=h();for(const[k,T]of E){const P=y.get(k),I=!!(P?.expandParent&&P?.parentId&&T?.position),B={id:k,type:"position",position:I?{x:Math.max(0,T.position.x),y:Math.max(0,T.position.y)}:T.position,dragging:S};I&&P.parentId&&R.push({id:k,parentId:P.parentId,rect:{...T.internals.positionAbsolute,width:T.measured.width??0,height:T.measured.height??0}}),v.push(B)}if(R.length>0){const{parentLookup:k,nodeOrigin:T}=h(),P=oi(R,y,k,T);v.push(...P)}C(v)},triggerNodeChanges:E=>{const{onNodesChange:S,setNodes:R,nodes:v,hasDefaultNodes:y,debug:C}=h();if(E?.length){if(y){const k=Sd(E,v);R(k)}C&&console.log("React Flow: trigger node changes",E),S?.(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:S,setEdges:R,edges:v,hasDefaultEdges:y,debug:C}=h();if(E?.length){if(y){const k=Rd(E,v);R(k)}C&&console.log("React Flow: trigger edge changes",E),S?.(E)}},addSelectedNodes:E=>{const{multiSelectionActive:S,edgeLookup:R,nodeLookup:v,triggerNodeChanges:y,triggerEdgeChanges:C}=h();if(S){const k=E.map(T=>Ct(T,!0));y(k);return}y(Ut(v,new Set([...E]),!0)),C(Ut(R))},addSelectedEdges:E=>{const{multiSelectionActive:S,edgeLookup:R,nodeLookup:v,triggerNodeChanges:y,triggerEdgeChanges:C}=h();if(S){const k=E.map(T=>Ct(T,!0));C(k);return}C(Ut(R,new Set([...E]))),y(Ut(v,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:S}={})=>{const{edges:R,nodes:v,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:k}=h(),T=E||v,P=S||R,I=T.map(F=>{const $=y.get(F.id);return $&&($.selected=!1),Ct(F.id,!1)}),B=P.map(F=>Ct(F.id,!1));C(I),k(B)},setMinZoom:E=>{const{panZoom:S,maxZoom:R}=h();S?.setScaleExtent([E,R]),m({minZoom:E})},setMaxZoom:E=>{const{panZoom:S,minZoom:R}=h();S?.setScaleExtent([R,E]),m({maxZoom:E})},setTranslateExtent:E=>{h().panZoom?.setTranslateExtent(E),m({translateExtent:E})},setPaneClickDistance:E=>{h().panZoom?.setClickDistance(E)},resetSelectedElements:()=>{const{edges:E,nodes:S,triggerNodeChanges:R,triggerEdgeChanges:v,elementsSelectable:y}=h();if(!y)return;const C=S.reduce((T,P)=>P.selected?[...T,Ct(P.id,!1)]:T,[]),k=E.reduce((T,P)=>P.selected?[...T,Ct(P.id,!1)]:T,[]);R(C),v(k)},setNodeExtent:E=>{const{nodes:S,nodeLookup:R,parentLookup:v,nodeOrigin:y,elevateNodesOnSelect:C,nodeExtent:k}=h();E[0][0]===k[0][0]&&E[0][1]===k[0][1]&&E[1][0]===k[1][0]&&E[1][1]===k[1][1]||(Qo(S,R,v,{nodeOrigin:y,nodeExtent:E,elevateNodesOnSelect:C,checkEquality:!1}),m({nodeExtent:E}))},panBy:E=>{const{transform:S,width:R,height:v,panZoom:y,translateExtent:C}=h();return vy({delta:E,panZoom:y,transform:S,translateExtent:C,width:R,height:v})},setCenter:async(E,S,R)=>{const{width:v,height:y,maxZoom:C,panZoom:k}=h();if(!k)return Promise.resolve(!1);const T=typeof R?.zoom<"u"?R.zoom:C;return await k.setViewport({x:v/2-E*T,y:y/2-S*T,zoom:T},{duration:R?.duration,ease:R?.ease,interpolate:R?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...zu}})},updateConnection:E=>{m({connection:E})},reset:()=>m({...Fl()})}},Object.is);function Gd({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:s,initialWidth:o,initialHeight:i,initialMinZoom:l,initialMaxZoom:a,initialFitViewOptions:c,fitView:d,nodeOrigin:x,nodeExtent:p,children:m}){const[h]=j.useState(()=>HS({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:o,height:i,fitView:d,minZoom:l,maxZoom:a,fitViewOptions:c,nodeOrigin:x,nodeExtent:p}));return r.jsxRuntimeExports.jsx(u5,{value:h,children:r.jsxRuntimeExports.jsx(P5,{children:m})})}function ZS({children:e,nodes:t,edges:n,defaultNodes:s,defaultEdges:o,width:i,height:l,fitView:a,fitViewOptions:c,minZoom:d,maxZoom:x,nodeOrigin:p,nodeExtent:m}){return j.useContext(Xs)?r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:e}):r.jsxRuntimeExports.jsx(Gd,{initialNodes:t,initialEdges:n,defaultNodes:s,defaultEdges:o,initialWidth:i,initialHeight:l,fitView:a,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:x,nodeOrigin:p,nodeExtent:m,children:e})}const KS={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function YS({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,className:o,nodeTypes:i,edgeTypes:l,onNodeClick:a,onEdgeClick:c,onInit:d,onMove:x,onMoveStart:p,onMoveEnd:m,onConnect:h,onConnectStart:g,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:R,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:k,onNodeDoubleClick:T,onNodeDragStart:P,onNodeDrag:I,onNodeDragStop:B,onNodesDelete:F,onEdgesDelete:$,onDelete:D,onSelectionChange:z,onSelectionDragStart:b,onSelectionDrag:N,onSelectionDragStop:_,onSelectionContextMenu:M,onSelectionStart:V,onSelectionEnd:H,onBeforeDelete:K,connectionMode:Z,connectionLineType:G=ft.Bezier,connectionLineStyle:Q,connectionLineComponent:ee,connectionLineContainerStyle:ae,deleteKeyCode:re="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:te=!1,selectionMode:le=tn.Full,panActivationKeyCode:Re="Space",multiSelectionKeyCode:Ce=Ms()?"Meta":"Control",zoomActivationKeyCode:ue=Ms()?"Meta":"Control",snapToGrid:me,snapGrid:X,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:we,nodesDraggable:Pe,autoPanOnNodeFocus:et,nodesConnectable:Kn,nodesFocusable:Yn,nodeOrigin:Gn=Ed,edgesFocusable:un,edgesReconnectable:dn,elementsSelectable:oo=!0,defaultViewport:Un=C5,minZoom:Zt=.5,maxZoom:xn=2,translateExtent:fi=Ln,preventScrolling:ym=!0,nodeExtent:ro,defaultMarkerColor:Sm="#b1b1b7",zoomOnScroll:Rm=!0,zoomOnPinch:Cm=!0,panOnScroll:bm=!1,panOnScrollSpeed:wm=.5,panOnScrollMode:vm=wt.Free,zoomOnDoubleClick:km=!0,panOnDrag:_m=!0,onPaneClick:Lm,onPaneMouseEnter:Tm,onPaneMouseMove:Mm,onPaneMouseLeave:Nm,onPaneScroll:Pm,onPaneContextMenu:Am,paneClickDistance:hi=0,nodeClickDistance:Om=0,children:Im,onReconnect:Dm,onReconnectStart:Bm,onReconnectEnd:$m,onEdgeContextMenu:zm,onEdgeDoubleClick:Vm,onEdgeMouseEnter:Fm,onEdgeMouseMove:Hm,onEdgeMouseLeave:Zm,reconnectRadius:Km=10,onNodesChange:Ym,onEdgesChange:Gm,noDragClassName:Um="nodrag",noWheelClassName:Wm="nowheel",noPanClassName:gi="nopan",fitView:ji,fitViewOptions:Ei,connectOnClick:Xm,attributionPosition:qm,proOptions:Qm,defaultEdgeOptions:Jm,elevateNodesOnSelect:ef,elevateEdgesOnSelect:tf,disableKeyboardA11y:yi=!1,autoPanOnConnect:nf,autoPanOnNodeDrag:sf,autoPanSpeed:of,connectionRadius:rf,isValidConnection:lf,onError:af,style:cf,id:Si,nodeDragThreshold:uf,connectionDragThreshold:df,viewport:xf,onViewportChange:pf,width:mf,height:ff,colorMode:hf="light",debug:gf,onScroll:Ri,ariaLabelConfig:jf,...Ef},yf){const io=Si||"1",Sf=k5(hf),Rf=j.useCallback(Ci=>{Ci.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ri?.(Ci)},[Ri]);return r.jsxRuntimeExports.jsx("div",{"data-testid":"rf__wrapper",...Ef,onScroll:Rf,style:{...cf,...KS},ref:yf,className:Te(["react-flow",o,Sf]),id:Si,role:"application",children:r.jsxRuntimeExports.jsxs(ZS,{nodes:e,edges:t,width:mf,height:ff,fitView:ji,fitViewOptions:Ei,minZoom:Zt,maxZoom:xn,nodeOrigin:Gn,nodeExtent:ro,children:[r.jsxRuntimeExports.jsx(FS,{onInit:d,onNodeClick:a,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:k,onNodeDoubleClick:T,nodeTypes:i,edgeTypes:l,connectionLineType:G,connectionLineStyle:Q,connectionLineComponent:ee,connectionLineContainerStyle:ae,selectionKeyCode:se,selectionOnDrag:te,selectionMode:le,deleteKeyCode:re,multiSelectionKeyCode:Ce,panActivationKeyCode:Re,zoomActivationKeyCode:ue,onlyRenderVisibleElements:de,defaultViewport:Un,translateExtent:fi,minZoom:Zt,maxZoom:xn,preventScrolling:ym,zoomOnScroll:Rm,zoomOnPinch:Cm,zoomOnDoubleClick:km,panOnScroll:bm,panOnScrollSpeed:wm,panOnScrollMode:vm,panOnDrag:_m,onPaneClick:Lm,onPaneMouseEnter:Tm,onPaneMouseMove:Mm,onPaneMouseLeave:Nm,onPaneScroll:Pm,onPaneContextMenu:Am,paneClickDistance:hi,nodeClickDistance:Om,onSelectionContextMenu:M,onSelectionStart:V,onSelectionEnd:H,onReconnect:Dm,onReconnectStart:Bm,onReconnectEnd:$m,onEdgeContextMenu:zm,onEdgeDoubleClick:Vm,onEdgeMouseEnter:Fm,onEdgeMouseMove:Hm,onEdgeMouseLeave:Zm,reconnectRadius:Km,defaultMarkerColor:Sm,noDragClassName:Um,noWheelClassName:Wm,noPanClassName:gi,rfId:io,disableKeyboardA11y:yi,nodeExtent:ro,viewport:xf,onViewportChange:pf}),r.jsxRuntimeExports.jsx(v5,{nodes:e,edges:t,defaultNodes:n,defaultEdges:s,onConnect:h,onConnectStart:g,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:R,nodesDraggable:Pe,autoPanOnNodeFocus:et,nodesConnectable:Kn,nodesFocusable:Yn,edgesFocusable:un,edgesReconnectable:dn,elementsSelectable:oo,elevateNodesOnSelect:ef,elevateEdgesOnSelect:tf,minZoom:Zt,maxZoom:xn,nodeExtent:ro,onNodesChange:Ym,onEdgesChange:Gm,snapToGrid:me,snapGrid:X,connectionMode:Z,translateExtent:fi,connectOnClick:Xm,defaultEdgeOptions:Jm,fitView:ji,fitViewOptions:Ei,onNodesDelete:F,onEdgesDelete:$,onDelete:D,onNodeDragStart:P,onNodeDrag:I,onNodeDragStop:B,onSelectionDrag:N,onSelectionDragStart:b,onSelectionDragStop:_,onMove:x,onMoveStart:p,onMoveEnd:m,noPanClassName:gi,nodeOrigin:Gn,rfId:io,autoPanOnConnect:nf,autoPanOnNodeDrag:sf,autoPanSpeed:of,onError:af,connectionRadius:rf,isValidConnection:lf,selectNodesOnDrag:we,nodeDragThreshold:uf,connectionDragThreshold:df,onBeforeDelete:K,paneClickDistance:hi,debug:gf,ariaLabelConfig:jf}),r.jsxRuntimeExports.jsx(R5,{onSelectionChange:z}),Im,r.jsxRuntimeExports.jsx(g5,{proOptions:Qm,position:qm}),r.jsxRuntimeExports.jsx(h5,{rfId:io,disableKeyboardA11y:yi})]})})}var GS=Cd(YS);function US(){const e=ve();return j.useCallback(t=>{const{domNode:n,updateNodeInternals:s}=e.getState(),o=Array.isArray(t)?t:[t],i=new Map;o.forEach(l=>{const a=n?.querySelector(`.react-flow__node[data-id="${l}"]`);a&&i.set(l,{id:l,nodeElement:a,force:!0})}),requestAnimationFrame(()=>s(i,{triggerFitView:!1}))},[])}function WS({onStart:e,onChange:t,onEnd:n}){const s=ve();j.useEffect(()=>{s.setState({onViewportChangeStart:e})},[e]),j.useEffect(()=>{s.setState({onViewportChange:t})},[t]),j.useEffect(()=>{s.setState({onViewportChangeEnd:n})},[n])}function XS({dimensions:e,lineWidth:t,variant:n,className:s}){return r.jsxRuntimeExports.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Te(["react-flow__background-pattern",n,s])})}function qS({radius:e,className:t}){return r.jsxRuntimeExports.jsx("circle",{cx:e,cy:e,r:e,className:Te(["react-flow__background-pattern","dots",t])})}var gt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(gt||(gt={}));const QS={[gt.Dots]:1,[gt.Lines]:1,[gt.Cross]:6},JS=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Ud({id:e,variant:t=gt.Dots,gap:n=20,size:s,lineWidth:o=1,offset:i=0,color:l,bgColor:a,style:c,className:d,patternClassName:x}){const p=j.useRef(null),{transform:m,patternId:h}=Ee(JS,ke),g=s||QS[t],E=t===gt.Dots,S=t===gt.Cross,R=Array.isArray(n)?n:[n,n],v=[R[0]*m[2]||1,R[1]*m[2]||1],y=g*m[2],C=Array.isArray(i)?i:[i,i],k=S?[y,y]:v,T=[C[0]*m[2]||1+k[0]/2,C[1]*m[2]||1+k[1]/2],P=`${h}${e||""}`;return r.jsxRuntimeExports.jsxs("svg",{className:Te(["react-flow__background",d]),style:{...c,...Qs,"--xy-background-color-props":a,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[r.jsxRuntimeExports.jsx("pattern",{id:P,x:m[0]%v[0],y:m[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:E?r.jsxRuntimeExports.jsx(qS,{radius:y/2,className:x}):r.jsxRuntimeExports.jsx(XS,{dimensions:k,lineWidth:o,variant:t,className:x})}),r.jsxRuntimeExports.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}Ud.displayName="Background";const eR=j.memo(Ud);function tR(){return r.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:r.jsxRuntimeExports.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function nR(){return r.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:r.jsxRuntimeExports.jsx("path",{d:"M0 0h32v4.2H0z"})})}function sR(){return r.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:r.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 oR(){return r.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:r.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 rR(){return r.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:r.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 os({children:e,className:t,...n}){return r.jsxRuntimeExports.jsx("button",{type:"button",className:Te(["react-flow__controls-button",t]),...n,children:e})}const iR=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Wd({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:s=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:l,onFitView:a,onInteractiveChange:c,className:d,children:x,position:p="bottom-left",orientation:m="vertical","aria-label":h}){const g=ve(),{isInteractive:E,minZoomReached:S,maxZoomReached:R,ariaLabelConfig:v}=Ee(iR,ke),{zoomIn:y,zoomOut:C,fitView:k}=zt(),T=()=>{y(),i?.()},P=()=>{C(),l?.()},I=()=>{k(o),a?.()},B=()=>{g.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),c?.(!E)},F=m==="horizontal"?"horizontal":"vertical";return r.jsxRuntimeExports.jsxs(qs,{className:Te(["react-flow__controls",F,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":h??v["controls.ariaLabel"],children:[t&&r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(os,{onClick:T,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:R,children:r.jsxRuntimeExports.jsx(tR,{})}),r.jsxRuntimeExports.jsx(os,{onClick:P,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:S,children:r.jsxRuntimeExports.jsx(nR,{})})]}),n&&r.jsxRuntimeExports.jsx(os,{className:"react-flow__controls-fitview",onClick:I,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:r.jsxRuntimeExports.jsx(sR,{})}),s&&r.jsxRuntimeExports.jsx(os,{className:"react-flow__controls-interactive",onClick:B,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:E?r.jsxRuntimeExports.jsx(rR,{}):r.jsxRuntimeExports.jsx(oR,{})}),x]})}Wd.displayName="Controls";j.memo(Wd);function lR({id:e,x:t,y:n,width:s,height:o,style:i,color:l,strokeColor:a,strokeWidth:c,className:d,borderRadius:x,shapeRendering:p,selected:m,onClick:h}){const{background:g,backgroundColor:E}=i||{},S=l||g||E;return r.jsxRuntimeExports.jsx("rect",{className:Te(["react-flow__minimap-node",{selected:m},d]),x:t,y:n,rx:x,ry:x,width:s,height:o,style:{fill:S,stroke:a,strokeWidth:c},shapeRendering:p,onClick:h?R=>h(R,e):void 0})}const aR=j.memo(lR),cR=e=>e.nodes.map(t=>t.id),_o=e=>e instanceof Function?e:()=>e;function uR({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:s=5,nodeStrokeWidth:o,nodeComponent:i=aR,onClick:l}){const a=Ee(cR,ke),c=_o(t),d=_o(e),x=_o(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:a.map(m=>r.jsxRuntimeExports.jsx(xR,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:x,nodeBorderRadius:s,nodeStrokeWidth:o,NodeComponent:i,onClick:l,shapeRendering:p},m))})}function dR({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:s,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:l,NodeComponent:a,onClick:c}){const{node:d,x,y:p,width:m,height:h}=Ee(g=>{const{internals:E}=g.nodeLookup.get(e),S=E.userNode,{x:R,y:v}=E.positionAbsolute,{width:y,height:C}=dt(S);return{node:S,x:R,y:v,width:y,height:C}},ke);return!d||d.hidden||!Gu(d)?null:r.jsxRuntimeExports.jsx(a,{x,y:p,width:m,height:h,style:d.style,selected:!!d.selected,className:s(d),color:t(d),borderRadius:o,strokeColor:n(d),strokeWidth:i,shapeRendering:l,onClick:c,id:d.id})}const xR=j.memo(dR);var pR=j.memo(uR);const mR=200,fR=150,hR=e=>!e.hidden,gR=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?Yu(Vn(e.nodeLookup,{filter:hR}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},jR="react-flow__minimap-desc";function Xd({style:e,className:t,nodeStrokeColor:n,nodeColor:s,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:l,nodeComponent:a,bgColor:c,maskColor:d,maskStrokeColor:x,maskStrokeWidth:p,position:m="bottom-right",onClick:h,onNodeClick:g,pannable:E=!1,zoomable:S=!1,ariaLabel:R,inversePan:v,zoomStep:y=10,offsetScale:C=5}){const k=ve(),T=j.useRef(null),{boundingRect:P,viewBB:I,rfId:B,panZoom:F,translateExtent:$,flowWidth:D,flowHeight:z,ariaLabelConfig:b}=Ee(gR,ke),N=e?.width??mR,_=e?.height??fR,M=P.width/N,V=P.height/_,H=Math.max(M,V),K=H*N,Z=H*_,G=C*H,Q=P.x-(K-P.width)/2-G,ee=P.y-(Z-P.height)/2-G,ae=K+G*2,re=Z+G*2,se=`${jR}-${B}`,te=j.useRef(0),le=j.useRef();te.current=H,j.useEffect(()=>{if(T.current&&F)return le.current=Ay({domNode:T.current,panZoom:F,getTransform:()=>k.getState().transform,getViewScale:()=>te.current}),()=>{le.current?.destroy()}},[F]),j.useEffect(()=>{le.current?.update({translateExtent:$,width:D,height:z,inversePan:v,pannable:E,zoomStep:y,zoomable:S})},[E,S,v,y,$,D,z]);const Re=h?me=>{const[X,de]=le.current?.pointer(me)||[0,0];h(me,{x:X,y:de})}:void 0,Ce=g?j.useCallback((me,X)=>{const de=k.getState().nodeLookup.get(X).internals.userNode;g(me,de)},[]):void 0,ue=R??b["minimap.ariaLabel"];return r.jsxRuntimeExports.jsx(qs,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*H: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:Te(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:r.jsxRuntimeExports.jsxs("svg",{width:N,height:_,viewBox:`${Q} ${ee} ${ae} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:T,onClick:Re,children:[ue&&r.jsxRuntimeExports.jsx("title",{id:se,children:ue}),r.jsxRuntimeExports.jsx(pR,{onClick:Ce,nodeColor:s,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:l,nodeComponent:a}),r.jsxRuntimeExports.jsx("path",{className:"react-flow__minimap-mask",d:`M${Q-G},${ee-G}h${ae+G*2}v${re+G*2}h${-ae-G*2}z
|
|
39
|
+
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Xd.displayName="MiniMap";j.memo(Xd);const ER=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,yR={[rn.Line]:"right",[rn.Handle]:"bottom-right"};function SR({nodeId:e,position:t,variant:n=rn.Handle,className:s,style:o=void 0,children:i,color:l,minWidth:a=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,autoScale:h=!0,shouldResize:g,onResizeStart:E,onResize:S,onResizeEnd:R}){const v=kd(),y=typeof e=="string"?e:v,C=ve(),k=j.useRef(null),T=n===rn.Handle,P=Ee(j.useCallback(ER(T&&h),[T,h]),ke),I=j.useRef(null),B=t??yR[n];j.useEffect(()=>{if(!(!k.current||!y))return I.current||(I.current=Xy({domNode:k.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:$,transform:D,snapGrid:z,snapToGrid:b,nodeOrigin:N,domNode:_}=C.getState();return{nodeLookup:$,transform:D,snapGrid:z,snapToGrid:b,nodeOrigin:N,paneDomNode:_}},onChange:($,D)=>{const{triggerNodeChanges:z,nodeLookup:b,parentLookup:N,nodeOrigin:_}=C.getState(),M=[],V={x:$.x,y:$.y},H=b.get(y);if(H&&H.expandParent&&H.parentId){const K=H.origin??_,Z=$.width??H.measured.width??0,G=$.height??H.measured.height??0,Q={id:H.id,parentId:H.parentId,rect:{width:Z,height:G,...Uu({x:$.x??H.position.x,y:$.y??H.position.y},{width:Z,height:G},H.parentId,b,K)}},ee=oi([Q],b,N,_);M.push(...ee),V.x=$.x?Math.max(K[0]*Z,$.x):void 0,V.y=$.y?Math.max(K[1]*G,$.y):void 0}if(V.x!==void 0&&V.y!==void 0){const K={id:y,type:"position",position:{...V}};M.push(K)}if($.width!==void 0&&$.height!==void 0){const Z={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:$.width,height:$.height}};M.push(Z)}for(const K of D){const Z={...K,type:"position"};M.push(Z)}z(M)},onEnd:({width:$,height:D})=>{const z={id:y,type:"dimensions",resizing:!1,dimensions:{width:$,height:D}};C.getState().triggerNodeChanges([z])}})),I.current.update({controlPosition:B,boundaries:{minWidth:a,minHeight:c,maxWidth:d,maxHeight:x},keepAspectRatio:p,resizeDirection:m,onResizeStart:E,onResize:S,onResizeEnd:R,shouldResize:g}),()=>{I.current?.destroy()}},[B,a,c,d,x,p,E,S,R,g]);const F=B.split("-");return r.jsxRuntimeExports.jsx("div",{className:Te(["react-flow__resize-control","nodrag",...F,n,s]),ref:k,style:{...o,scale:P,...l&&{[T?"backgroundColor":"borderColor"]:l}},children:i})}j.memo(SR);const A=e=>r.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),je=e=>r.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),Le=e=>r.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),he=e=>r.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),RR={left:{left:J.Left,right:J.Right,top:J.Top,bottom:J.Bottom},right:{left:J.Right,right:J.Left,top:J.Bottom,bottom:J.Top},top:{left:J.Bottom,right:J.Top,top:J.Left,bottom:J.Right},bottom:{left:J.Top,right:J.Bottom,top:J.Right,bottom:J.Left}},CR=(e,t)=>RR[t][e],bR=(e,t=!1)=>{if(t)return e;switch(e){case J.Left:return J.Right;case J.Right:return J.Left;case J.Top:return J.Bottom;case J.Bottom:return J.Top;default:return J.Top}},wR=(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},U=({children:e,orientation:t,refreshDeps:n})=>{let s;try{s=US()}catch{return null}const o=j.useRef(null),i=j.useRef(!0);return j.useEffect(()=>{if(o.current==null)return;if(i.current){i.current=!1;return}const a=o.current.closest(".react-flow__node")?.getAttribute("data-id");a!=null&&s?.(a)},[t,n]),r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("span",{ref:o}),e]})},w=({location:e,orientation:t,preventAutoAdjust:n,left:s,swap:o,top:i,style:l,...a})=>{const c=wR(i,s,t,n);return r.jsxRuntimeExports.jsx(Pn,{position:bR(CR(e,t),!o),...a,type:"source",onClick:d=>d.stopPropagation(),className:(u.CSS.B("handle"),u.CSS.BE("handle",a.id)),style:{left:`${c.left}%`,top:`${c.top}%`,...l}})},fe=({className:e,enabled:t=!1,triggered:n=!1,orientation:s="left",color:o,...i})=>r.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.fr.cssString(o),...i}),oe=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.B("symbol-primitive"),e),...t}),vR=.8,q=({dimensions:e,orientation:t="left",children:n,className:s,color:o,style:i={},scale:l=1,...a})=>{e=u.p.construct(t)==="y"?u._.swap(e):e;const d=u.fr.cssString(o),x=f.use();let p={...i,aspectRatio:`${e.width} / ${e.height}`,width:u._.scale(e,l*vR).width};return o!=null&&(p={...p,[u.CSS.var("symbol-color")]:u.fr.rgbString(o),[u.CSS.var("symbol-color-contrast")]:u.fr.rgbString(u.fr.pickByContrast(o,x.colors.gray.l0,x.colors.gray.l11))}),r.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:u._.svgViewBox(e),className:u.CSS(u.CSS.loc(t),s),fill:d,stroke:d,...a,style:p,children:r.jsxRuntimeExports.jsx("g",{children:n})})},qd=({className:e,orientation:t="left",scale:n,color:s,...o})=>{const i=u.fr.cssString(s);return r.jsxRuntimeExports.jsxs(fe,{...o,orientation:t,className:u.CSS(u.CSS.B("four-way-valve"),e),children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:12.037,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:87.963,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:7.2916,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:92.6084,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:108,height:96},color:s,scale:n,children:[r.jsxRuntimeExports.jsx(A,{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}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M8.70001 73.5C24.7 73.5 28.7 86.8333 28.7 93.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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}),r.jsxRuntimeExports.jsx(A,{d:"M99.7 22.5C83.7 22.5 79.7 9.16667 79.7 2.5",strokeLinecap:"round"})]})]})},Qd=({color:e,orientation:t="left",scale:n,...s})=>r.jsxRuntimeExports.jsxs(fe,{...s,className:u.CSS(u.CSS.B("three-way-valve")),orientation:t,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:97.0278,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:33.1308,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:33.1308,id:"3"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Jd=({orientation:e="left",color:t,scale:n,...s})=>r.jsxRuntimeExports.jsxs(fe,{...s,children:[r.jsxRuntimeExports.jsxs(U,{orientation:e,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:e,left:2.2989,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:e,left:97.7701,top:50,id:"2"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:r.jsxRuntimeExports.jsx(A,{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"})})]}),ex=({className:e,color:t,orientation:n="left",normallyOpen:s=!1,scale:o,...i})=>r.jsxRuntimeExports.jsxs(fe,{className:u.CSS(u.CSS.B("solenoid-valve"),s&&u.CSS.M("normally-open"),e),orientation:n,...i,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:69.5652,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:69.5652,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:33.3333,top:17.7778,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:2.8986,id:"4"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:66.6667,top:17.7778,id:"5"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:69},color:t,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),r.jsxRuntimeExports.jsx(je,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),tx=({specKey:e,enabled:t=!1,triggered:n=!1,orientation:s="left",color:o,scale:i=1,className:l,stateOverrides:a,...c})=>{const d=zs.useDirect({params:{key:e}}),x=j.useRef(null);Vr({container:x.current,orientation:s,activeState:t?"active":"base",externalScale:i,spec:d?.data?.data,stateOverrides:a});const p=d?.data?.data?.handles||[];return r.jsxRuntimeExports.jsx(fe,{ref:x,className:u.CSS(u.CSS.BM("symbol","custom"),u.CSS.B("custom-actuator"),s!=null&&u.CSS.loc(s),t&&u.CSS.M("enabled"),n&&u.CSS.M("triggered"),l),enabled:t,triggered:n,...c,children:r.jsxRuntimeExports.jsx(U,{orientation:s,children:p.map(m=>r.jsxRuntimeExports.jsx(w,{id:m.key,location:m.orientation,orientation:s,left:m.position.x*100,top:m.position.y*100},m.key))})})},nx=({specKey:e,orientation:t="left",color:n,scale:s=1,className:o,stateOverrides:i,...l})=>{const a=zs.useDirect({params:{key:e}}),c=j.useRef(null);Vr({container:c.current,orientation:t,activeState:"base",externalScale:s,spec:a?.data?.data,stateOverrides:i});const d=a?.data?.data?.handles||[];return r.jsxRuntimeExports.jsx(oe,{ref:c,className:u.CSS(u.CSS.BM("symbol","custom"),u.CSS.B("custom-static"),t!=null&&u.CSS.loc(t),o),...l,children:r.jsxRuntimeExports.jsx(U,{orientation:t,children:d.map(x=>r.jsxRuntimeExports.jsx(w,{id:x.key,location:x.orientation,orientation:t,left:x.position.x*100,top:x.position.y*100},x.key))})})},sx=({className:e,orientation:t="left",color:n,scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{className:u.CSS(u.CSS.B("relief-valve"),e),enabled:o,...i,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:63.7931,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:63.7931,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:58},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),ox=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{orientation:t,className:u.CSS(u.CSS.B("check-valve"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:4.2222,top:48.8372,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:94.2038,top:48.8372,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:45,height:43},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(he,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),rx=({className:e,orientation:t="left",color:n,scale:s,...o})=>{const i=u.fr.cssString(n);return r.jsxRuntimeExports.jsxs(oe,{...o,orientation:t,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:8.3333,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.4286,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:84,height:42},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"7",cy:"7",r:"4",fill:i}),r.jsxRuntimeExports.jsx(A,{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"})]})]})},ix=({className:e,orientation:t="left",color:n,scale:s,...o})=>{const i=u.fr.cssString(n);return r.jsxRuntimeExports.jsxs(oe,{orientation:t,className:u.CSS(u.CSS.B("check-valve-with-arrow"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:8.602,top:60.65,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.775,top:60.65,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:93,height:57},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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}),r.jsxRuntimeExports.jsx(A,{d:"M62.5 6H32.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Le,{cx:"7.5",cy:"13.5",r:"6",fill:i}),r.jsxRuntimeExports.jsx(A,{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"})]})]})},lx=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,orientation:n,className:u.CSS(u.CSS.B("angled-valve"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:32.8125,top:97.0278,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.0278,top:32.8125,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),ax=({color:e,className:t,orientation:n="left",scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:n,className:u.CSS(u.CSS.B("ball-valve"),t),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"43.5978",cy:"20.972",r:"19"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),cx=({color:e,className:t,orientation:n="left",scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:n,className:u.CSS(u.CSS.B("three-way-ball-valve"),t),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.8,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:33.1308,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:33.1308,id:"3"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:66},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"43.5978",cy:"21.722",r:"19"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),ux=({color:e,className:t,orientation:n="left",scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:n,className:u.CSS(u.CSS.B("gate-valve"),t),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M43.5 2 L43.5 39.7965"})]})]}),dx=({color:e,className:t,orientation:n="left",scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-one"),t),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M43.5 2V40"}),r.jsxRuntimeExports.jsx(Le,{cx:"43.5",cy:"21",r:"10",fill:u.fr.cssString(e)})]})]}),xx=({color:e,className:t,orientation:n="left",scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-two"),t),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"43.5",cy:"21",r:"10",fill:u.fr.cssString(e)}),r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"83",height:"38",rx:"1"}),r.jsxRuntimeExports.jsx(A,{d:"M2.29001 2.29004L84.7069 39.676"})]})]}),px=({color:e,className:t,orientation:n="left",scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:n,className:u.CSS(u.CSS.B("breather-valve"),t),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:8.081,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:91.919,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:99,height:57},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"91",cy:"49.5",r:"6",fill:u.fr.cssString(e)}),r.jsxRuntimeExports.jsx(Le,{cx:"8",cy:"7.5",r:"6",fill:u.fr.cssString(e)}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),mx=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)})]})]}),fx=({className:e,color:t,orientation:n="left",scale:s,...o})=>{const i=u.fr.cssString(t);return r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("symbol"),e),children:[r.jsxRuntimeExports.jsx(U,{orientation:n,children:r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:5,top:50,id:"1"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:40,height:48},color:t,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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}),r.jsxRuntimeExports.jsx(A,{d:"M33 24H2",strokeLinecap:"round"})]})]})},hx=({className:e,color:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("symbol"),e),children:[r.jsxRuntimeExports.jsx(U,{orientation:n,children:r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:11.1111,top:50,id:"1"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:36,height:72},color:t,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"4",y:"4",width:"28",height:"64",rx:"2",strokeWidth:"2"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),gx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("cap"),e),...o,children:[r.jsxRuntimeExports.jsx(U,{orientation:t,children:r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),r.jsxRuntimeExports.jsx(q,{color:n,dimensions:{width:26,height:48},orientation:t,scale:s,children:r.jsxRuntimeExports.jsx(A,{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"})})]}),jx=({className:e,orientation:t="left",color:n,scale:s=1,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("cap"),e),...o,children:[r.jsxRuntimeExports.jsx(U,{orientation:t,children:r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:50,top:50,id:"1"})}),r.jsxRuntimeExports.jsx(q,{color:n,dimensions:{width:36,height:48},orientation:t,scale:s*.6,children:r.jsxRuntimeExports.jsx(A,{d:"M3 3H30C31.6569 3 33 4.34315 33 6V42C33 43.6569 31.6569 45 30 45H3",strokeLinecap:"round"})})]}),Ex=({className:e,orientation:t="left",color:n,scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:t,className:u.CSS(u.CSS.B("manual-valve"),e),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:56.25,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:56.25,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:48},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(he,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),r.jsxRuntimeExports.jsx(A,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),yx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("orifice_plate"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.875,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{color:n,dimensions:{width:72,height:36},orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M24.5 33V22",strokeLinecap:"round"})]})]}),Hl=(e,t)=>e/t*100,Sx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("filter"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:11.5385,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:88.4615,top:50,id:"2"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:52,height:34},orientation:t,color:n,scale:s,children:r.jsxRuntimeExports.jsx(A,{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"})})]}),Rx=e=>typeof e=="number"?{topLeft:u.K.construct(e),topRight:u.K.construct(e),bottomLeft:u.K.construct(e),bottomRight:u.K.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:u.K.construct(e.topLeft),topRight:u.K.construct(e.topRight),bottomLeft:u.K.construct(e.bottomLeft),bottomRight:u.K.construct(e.bottomRight)}:e,kR=e=>{const{topLeft:t,topRight:n,bottomLeft:s,bottomRight:o}=e;return`${t.x}% ${n.x}% ${o.x}% ${s.x}% / ${t.y}% ${n.y}% ${o.y}% ${s.y}%`},Cx={width:40,height:80},ii={x:50,y:10},Js=({className:e,dimensions:t=Cx,borderRadius:n=ii,boxBorderRadius:s,color:o,backgroundColor:i,strokeWidth:l=2,...a})=>{const c=Rx(n),d=s==null,x=f.use(),{width:p,height:m}=t,h=j.useMemo(()=>[t,n,c],[c.bottomLeft,c.bottomRight,c.topLeft,c.topRight,m,p]),g=Hl(1,p),E=100-g,S=Hl(1,m),R=100-S;return r.jsxRuntimeExports.jsx(oe,{className:u.CSS(e,u.CSS.B("tank")),style:{...t,borderRadius:s??kR(c),borderColor:u.fr.cssString(o??x.colors.gray.l11),backgroundColor:u.fr.cssString(i),borderWidth:l},...a,children:r.jsxRuntimeExports.jsxs(U,{refreshDeps:h,orientation:"left",children:[r.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:S,id:"1"}),d&&r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:g,top:c.topLeft.y,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:E,top:c.topRight.y,id:"3"})]}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:R,id:"4"}),d&&r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:g,top:100-c.bottomLeft.y,id:"5"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:E,top:100-c.bottomRight.y,id:"6"})]}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:g,top:50,id:"7"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:E,top:50,id:"8"})]})})},_R=20,LR=(e,t,n=0,s=4)=>{const o=2*Math.PI/e,i=n*Math.PI/180,l=t/(2*Math.sin(Math.PI/e)),a=l+s/2;return Array.from({length:e}).map((c,d)=>{const x=o*d+i-Math.PI/2;return{x:a+l*Math.cos(x),y:a+l*Math.sin(x)}})},TR=(e,t,n)=>{const s=[],o=Math.min(n,t/2),i=e.length;if(i<3||o<=0)return`M ${e.map(l=>`${l.x},${l.y}`).join(" L ")} Z`;for(let l=0;l<i;l++){const a=e[(l-1+i)%i],c=e[l],d=e[(l+1)%i],x=c.x-a.x,p=c.y-a.y,m=d.x-c.x,h=d.y-c.y,g=Math.hypot(x,p),E=Math.hypot(m,h),S=o/g,R=o/E,v=c.x-x*S,y=c.y-p*S,C=c.x+m*R,k=c.y+h*R;l===0?s.push(`M ${v},${y}`):s.push(`L ${v},${y}`),s.push(`Q ${c.x},${c.y} ${C},${k}`)}return s.push("Z"),s.join(" ")},li=({numSides:e,sideLength:t,rotation:n=0,color:s,backgroundColor:o,className:i,cornerRounding:l,strokeWidth:a,...c})=>{const d=f.use(),x=j.useMemo(()=>2*((a??2)+1),[a]),p=j.useMemo(()=>LR(e,t,n,x),[e,t,n,x]),m=j.useMemo(()=>TR(p,t,l??0),[p,t,l]),h=j.useMemo(()=>2*(t/(2*Math.sin(Math.PI/e)))+x,[t,e,x]);return r.jsxRuntimeExports.jsx(oe,{className:u.CSS(i,u.CSS.B("polygon")),...c,children:r.jsxRuntimeExports.jsx(q,{dimensions:{width:h,height:h},children:r.jsxRuntimeExports.jsx(A,{d:m,fill:u.fr.cssString(o??d.colors.gray.l1),stroke:u.fr.cssString(s??d.colors.gray.l9),strokeWidth:a??2})})})},bx=({radius:e,color:t,backgroundColor:n,className:s,strokeWidth:o,...i})=>{const l=(o??2)+1,a=e*2,c=a+2*l,d=a+2*l;return r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(s,u.CSS.B("circle-shape")),...i,children:[r.jsxRuntimeExports.jsxs(U,{orientation:"left",refreshDeps:e,children:[r.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:l/d*100,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:(d-l)/d*100,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:l/c*100,top:50,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:(c-l)/c*100,top:50,id:"4"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:c,height:d},children:r.jsxRuntimeExports.jsx(Le,{cx:c/2,cy:d/2,r:e,stroke:u.fr.cssString(t),strokeWidth:o??2,fill:u.fr.cssString(n)})})]})},wx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator")),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50.9091,top:12.5,id:"3"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:88,height:80},orientation:t,color:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),vx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator-manual")),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:2.2989,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.381,top:75,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.619,top:75,id:"3"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:84},orientation:t,color:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{d:"M43.5 20L43.5 2",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M19.5 2L67.5 2",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:"43.5",y1:"63",x2:"43.5",y2:"40"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),kx=({className:e,orientation:t="left",scale:n,color:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("orifice"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.8571,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.1429,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:70,height:34},orientation:t,color:s,scale:n,children:[r.jsxRuntimeExports.jsx(A,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),_x=({className:e,orientation:t="left",color:n,scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:t,className:u.CSS(u.CSS.B("needle-valve"),e),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:51.1905,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:51.1905,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:42},orientation:t,color:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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.fr.cssString(n)}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Lx=({color:e,className:t,orientation:n="left",scale:s,enabled:o=!1,...i})=>r.jsxRuntimeExports.jsxs(fe,{...i,orientation:n,className:u.CSS(u.CSS.B("angled-relief-valve"),t),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:32.8125,top:97.5922,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.0278,top:45.5639,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:79},orientation:n,color:e,scale:s,children:[r.jsxRuntimeExports.jsx(he,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Tx=({className:e,color:t,dimensions:n,orientation:s="left",units:o="psi",unitsLevel:i="small",children:l,inlineSize:a=80,...c})=>{const d=u.fr.cssString(t),x=f.use(),p=t==null?"var(--pluto-gray-l0)":u.fr.cssString(u.fr.pickByContrast(t,x.colors.gray.l0,x.colors.gray.l11));return r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("value"),e),...c,style:{borderColor:d,height:n?.height},children:[r.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n?.width,inlineSize:a,maxWidth:n?.width},children:l}),r.jsxRuntimeExports.jsxs(U,{orientation:s,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:0,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:100,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:-2,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:102,id:"4"})]}),r.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.BE("value","units"),u.CSS.M(i)),style:{background:d},children:r.jsxRuntimeExports.jsx(f.Text,{level:i,color:p,children:o})})]})},Mx=({enabled:e=!1,onClick:t,orientation:n="left"})=>r.jsxRuntimeExports.jsxs(oe,{orientation:n,children:[r.jsxRuntimeExports.jsx(f.Switch$1,{value:e,onClick:t,onChange:()=>{}}),r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:0,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:100,top:50,id:"2"})]})]}),Nx=({onClick:e,onMouseDown:t,onMouseUp:n,orientation:s="left",label:o="",color:i,size:l,level:a,onClickDelay:c})=>r.jsxRuntimeExports.jsxs(oe,{orientation:s,children:[r.jsxRuntimeExports.jsx(f.Button,{variant:"filled",onClick:e,onMouseDown:t,onMouseUp:n,color:i,size:l,level:a,onClickDelay:c,children:o}),r.jsxRuntimeExports.jsxs(U,{orientation:s,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:s,left:0,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:s,left:100,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:s,left:50,top:0,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:s,left:50,top:100,id:"4"})]})]}),Px=({className:e,orientation:t="left",width:n,color:s,level:o,autoFit:i,align:l="center",value:a,onChange:c,...d})=>{const x={textAlign:l};return u.p.construct(t)==="y"?x.height=i?"fit-content":n:x.width=i?"fit-content":n,r.jsxRuntimeExports.jsx(oe,{style:x,orientation:t,className:u.CSS(u.CSS.B("text-box"),u.CSS.loc(t),e),...d,children:r.jsxRuntimeExports.jsx(f.MaybeEditable,{className:u.CSS.BE("symbol","label"),color:u.fr.cssString(s),level:o,value:a,onChange:c})})},Ax=({orientation:e="left",className:t,onClick:n,children:s,value:o,units:i,color:l,onChange:a,size:c="small",disabled:d,...x})=>{const[p,m]=j.useState(o);return r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("setpoint"),t),orientation:e,...x,children:[r.jsxRuntimeExports.jsxs(U,{orientation:e,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:e,left:.5,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:e,left:100,top:50,id:"2",style:{zIndex:5}}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:50,top:-2,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:e,left:50,top:102,id:"4"})]}),r.jsxRuntimeExports.jsx(f.Numeric,{size:c,value:p,onChange:m,showDragHandle:!1,selectOnFocus:!0,endContent:i,color:l,borderWidth:1,disabled:d,children:r.jsxRuntimeExports.jsx(f.Button,{size:c,variant:"filled",onClick:()=>a(p),color:l,children:"Set"})})]})},Ox=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("screw-pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(A,{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)}),r.jsxRuntimeExports.jsx(A,{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)})]})]}),Ix=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("vacuum-pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:r.jsxRuntimeExports.jsx(A,{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"})})]}),Dx=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("cavity-pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(A,{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)})]})]}),Bx=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("piston-pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(A,{d:"M 23 32, h 16, m 0 -8, v 16",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),$x=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("static-mixer"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.5152,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.4848,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.3333,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.6667,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:30},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),zx=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("rotary-mixer"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2,top:48.4849,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.5,top:48.4849,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:50,height:33},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),r.jsxRuntimeExports.jsx(he,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Vx=({className:e,color:t,orientation:n="left",enabled:s,scale:o,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,orientation:n,className:u.CSS(u.CSS.B("light"),s&&u.CSS.M("enabled"),e),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.75,id:"4"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:64,height:64},color:t,orientation:n,scale:o,children:r.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"})})]}),Fx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator")),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.29885,top:69.565,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.70115,top:69.565,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:23.1479,top:23.61,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:11.11,id:"4"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:76.8521,top:23.61,id:"5"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:69},orientation:t,color:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(je,{x:"21",y:"6.5",width:"44",height:"18",rx:"2"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"49",x2:"43",y2:"24.5"})]})]}),Hx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("regulator-motorized")),...o,orientation:t,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:35.6321,top:13.72549,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:1.96078,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:64.3679,top:13.72549,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:24.1379,top:46.078,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:75.8621,top:46.078,id:"5"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:78.43137,id:"6"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:78.43137,id:"7"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:102},orientation:t,color:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"80.5",x2:"43",y2:"56"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(je,{x:"21",y:"38",width:"44",height:"18",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M43 38V26",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Le,{cx:"43",cy:"14",r:"12"})]})]}),Zx=({orientation:e="left",color:t,scale:n,...s})=>r.jsxRuntimeExports.jsxs(fe,{...s,className:u.CSS(u.CSS.B("agitator")),children:[r.jsxRuntimeExports.jsx(U,{orientation:e,children:r.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:50,top:1,id:"4"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:88,height:86},color:t,orientation:e,scale:n,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M43 1L45 65"})]})]}),Kx=({orientation:e="left",color:t,scale:n,...s})=>r.jsxRuntimeExports.jsxs(fe,{...s,className:u.CSS(u.CSS.B("agitator")),children:[r.jsxRuntimeExports.jsx(U,{orientation:e,children:r.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:51,top:2,id:"4"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),Yx=({orientation:e="left",color:t,scale:n,...s})=>r.jsxRuntimeExports.jsxs(fe,{...s,className:u.CSS(u.CSS.B("agitator")),children:[r.jsxRuntimeExports.jsx(U,{orientation:e,children:r.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:51,top:2,id:"4"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"1",x2:"43",y2:"49"}),r.jsxRuntimeExports.jsx(je,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),Gx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("agitator")),children:[r.jsxRuntimeExports.jsx(U,{orientation:t,children:r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"1",x2:"43",y2:"49"}),r.jsxRuntimeExports.jsx(je,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),r.jsxRuntimeExports.jsx(he,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"49",x2:"43",y2:"83",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"})]})]}),Ux=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("agitator")),children:[r.jsxRuntimeExports.jsx(U,{orientation:t,children:r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(he,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(he,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(he,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(je,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),Wx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("agitator")),children:[r.jsxRuntimeExports.jsx(U,{orientation:t,children:r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(he,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Xx=({id:e,className:t,orientation:n="right",label:s="text",color:o,level:i="p",onLabelChange:l,...a})=>{const c=document.querySelector(`[data-id="${e}"]`);c&&c.classList.add(n);const d=u.p.construct(n)==="y";return r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("arrow"),u.CSS.loc(n),t),orientation:n,...a,children:[r.jsxRuntimeExports.jsx("div",{className:"wrapper",children:r.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:u.fr.cssString(o)},children:r.jsxRuntimeExports.jsx("div",{className:"bg",children:r.jsxRuntimeExports.jsx(f.MaybeEditable,{value:s,onChange:l,level:i,className:u.CSS.BE("symbol","label")})})})}),r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:d,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:d,id:"2"})]}),r.jsxRuntimeExports.jsx("svg",{style:{visibility:"hidden",position:"absolute"},width:"0",height:"0",xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:r.jsxRuntimeExports.jsx("defs",{children:r.jsxRuntimeExports.jsxs("filter",{id:"goo",children:[r.jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.5",result:"blur"}),r.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"}),r.jsxRuntimeExports.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})},qx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("vent"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:22.7273,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:80,top:50,id:"2"})]}),r.jsxRuntimeExports.jsx(q,{color:n,dimensions:{width:22,height:32},orientation:t,scale:s,children:r.jsxRuntimeExports.jsx(A,{d:"M5 3L16.6325 13.8016C17.9107 14.9885 17.9107 17.0115 16.6325 18.1984L5 29",strokeLinecap:"round"})})]}),Qx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("iso-filter"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:95,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:5,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:60,height:42},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"3",y:"3",width:"54",height:"36",rx:"3",ry:"3"}),r.jsxRuntimeExports.jsx(he,{x1:"30",y1:"3",x2:"30",y2:"13",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(he,{x1:"30",y1:"17",x2:"30",y2:"25",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(he,{x1:"30",y1:"29",x2:"30",y2:"39",strokeLinecap:"round"})]})]}),Jx=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("flow-straightener"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:93,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:72,height:36},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2.5",y:"2.5",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M10.5 26.5H60.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M10.5 9.5H60.5",strokeLinecap:"round"})]})]}),ep=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("heater-element"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:11.9,top:5.55555556,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:11.9,top:94,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:21,height:36},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(A,{d:"M2.5 34.0005H14.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M2.5 2.00049L14.5 2.00049",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),tp=({className:e,dimensions:t=Cx,borderRadius:n=ii,boxBorderRadius:s,color:o,backgroundColor:i,...l})=>{const a=Rx(n),c=f.use(),d=j.useMemo(()=>[t,n,a],[a.bottomLeft,a.bottomRight,a.topLeft,a.topRight,t.height,t.width]),x=u.fr.cssString(o??c.colors.gray.l11),p=i==null?void 0:u.fr.cssString(i),m=t.width/66,h=t.height/180,g=`scale(${m},${h})`;return r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(e,u.CSS.B("cylinder")),style:{...t},...l,children:[r.jsxRuntimeExports.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:g,children:r.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:x,transform:g,fill:p})}),r.jsxRuntimeExports.jsxs(U,{refreshDeps:d,orientation:"left",children:[r.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:2,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:35,top:10,id:"9"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:65,top:10,id:"10"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:98.3333,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:40,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:40,id:"4"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:60,id:"5"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:60,id:"6"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:80,id:"7"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:80,id:"8"})]})]})},np=({className:e,orientation:t="left",color:n,scale:s,enabled:o=!1,...i})=>{const l=u.fr.cssString(n);return r.jsxRuntimeExports.jsxs(fe,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.1373,top:69.0785,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.7416,top:72.368,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:89,height:76},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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}),r.jsxRuntimeExports.jsx(A,{d:"M71 38.0014V72.0014",stroke:l,strokeWidth:4,strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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}),r.jsxRuntimeExports.jsx(Le,{cx:"44",cy:"55",r:"4",fill:l}),r.jsxRuntimeExports.jsx(A,{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})]})]})},sp=({className:e,orientation:t="left",color:n,scale:s,enabled:o=!1,...i})=>{const l=u.fr.cssString(n);return r.jsxRuntimeExports.jsxs(fe,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:31.8182,top:98,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:95.6061,top:55.5185,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:101},color:n,orientation:t,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M48 38.633V72.633",strokeLinecap:"round",strokeWidth:4}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(Le,{cx:"21",cy:"56.0737",r:"4",fill:l}),r.jsxRuntimeExports.jsx(A,{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"})]})]})},op=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("t-junction"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.8462,top:22.3095,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.1538,top:22.3095,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:92.8571,id:"3"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:39,height:21},color:n,orientation:t,scale:s,children:r.jsxRuntimeExports.jsx(A,{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.fr.cssString(n),stroke:"none"})})]}),rp=({className:e,orientation:t="left",color:n,scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{className:u.CSS(u.CSS.B("t-junction"),e),...o,children:[r.jsxRuntimeExports.jsxs(U,{orientation:t,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.8462,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.1539,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50.5,top:96.1539,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50.5,top:3.8462,id:"4"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:39,height:39},color:n,orientation:t,scale:s,children:r.jsxRuntimeExports.jsx(A,{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.fr.cssString(n),stroke:"none"})})]}),Ue=({position:e,color:t})=>r.jsxRuntimeExports.jsx("text",{x:e?.x??57,y:e?.y??27,style:{fill:u.fr.cssString(t),fontWeight:450},stroke:"none",children:"F"}),ip=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-general"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(Ue,{position:{x:56,y:25},color:s})]})]}),lp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Electromagnetic"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M47.5 17.5H55.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M15.5 17.5H23.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(Ue,{position:{x:58,y:29},color:s})]})]}),ap=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-VariableArea"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M46 10V25"}),r.jsxRuntimeExports.jsx(A,{d:"M23 13V22"}),r.jsxRuntimeExports.jsx(A,{d:"M23 13L46 10"}),r.jsxRuntimeExports.jsx(A,{d:"M23 22L46 25"}),r.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),cp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Coriolis"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M2 17.6024H28.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M28.5 17.6024L34.6834 14.0324",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M34.8 14L45.9058 20.9666",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M51.5 17.6024L46.0141 20.8987",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M20.5 17.6024L26.6574 14.0474",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M26.75 14.1024L37.788 21.0265",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M43.5 17.6024L37.8427 21.0017",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M43.5 17.6024H69",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Ue,{position:{x:58,y:29},color:s})]})]}),up=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Nozzle"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M24 2V7V12",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M24 12H34",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M24 23H29H34",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M24 33V23",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),dp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Venturi"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M8 33L26.5329 22.3",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M8 2L26.5329 12.7",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M56 33L26.5876 22.2948",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M56 2L26.5876 12.7052",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Ue,{position:{x:56,y:29},color:s})]})]}),xp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-RingPiston"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(Le,{cx:"36.5",cy:"17.5",r:"10.5",strokeWidth:"2"}),r.jsxRuntimeExports.jsx(Le,{cx:"36.5",cy:"21.5",r:"6.5",strokeWidth:"2"}),r.jsxRuntimeExports.jsx(Ue,{position:{x:56,y:29},color:s})]})]}),pp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-PositiveDisplacement"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:72,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),mp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Turbine"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M16.5 17.5H54.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M32.5 9L35.4756 17.1753",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M38.5 26L35.5244 17.8247",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M32.5 26L35.4756 17.8247",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M38.5 9L35.5244 17.1753",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),fp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Pulse"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M31 13.5H39",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M23 21.5H31",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M39 21.5H47",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M39 13.5V21.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M31 13.5V21.5",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),hp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-FloatSensor"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:71,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M25 8H46",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M31 27H40",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M31 27L25.046 8.11641",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M40 27L45.954 8.11641",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),gp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("flowmeter-Orifice"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:72,height:36},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M24.5 33V22",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(Ue,{color:s})]})]}),jp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("heat-exchanger-general"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.545,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.454,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.454,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:66},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(A,{d:"M3 33H18.3956L33.1284 18.1508M33.4276 47.8492L48.1604 33H63M33.278 48V18"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Ep=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:89,top:27.27,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:89,top:72.73,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.455,id:"4"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.545,top:50,id:"5"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:66},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M58.9698 18H23.56L38.5623 33.0023M38.5623 32.9977L23.56 48H58.9698"})]})]}),yp=({id:e,className:t,orientation:n="right",color:s,scale:o=1,...i})=>r.jsxRuntimeExports.jsxs(oe,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:9,top:6.25,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:24,top:93.75,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:76,top:6.25,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:91,top:93.75,id:"4"}),r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.508,top:50,id:"5"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.492,top:50,id:"6"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:199,height:48},color:s,orientation:n,scale:o,children:[r.jsxRuntimeExports.jsx(je,{x:"3",y:"3",width:"193",height:"42",rx:"1",strokeWidth:"2"}),r.jsxRuntimeExports.jsx(je,{x:"32.397",y:"3",width:"134.206",height:"42",rx:"1",strokeWidth:"2"}),r.jsxRuntimeExports.jsx(je,{x:"32.397",y:"13.5",width:"134.206",height:"21",rx:"1",strokeWidth:"2"}),r.jsxRuntimeExports.jsx(he,{x1:"32.3769",y1:"24",x2:"166.623",y2:"24",strokeWidth:"2"})]})]}),Sp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Rp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Cp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("compressor"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:r.jsxRuntimeExports.jsx(A,{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"})})]}),bp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(Le,{cx:"33",cy:"33",r:"14.5"})]})]}),wp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M35 12.4V20.4"}),r.jsxRuntimeExports.jsx(A,{d:"M3 33H16"}),r.jsxRuntimeExports.jsx(A,{d:"M35 53.6V45.6"})]})]}),vp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M39 33H47"}),r.jsxRuntimeExports.jsx(A,{d:"M27 33H19"}),r.jsxRuntimeExports.jsx(A,{d:"M36 27.804L40 20.8758"}),r.jsxRuntimeExports.jsx(A,{d:"M30 27.804L26 20.8758"}),r.jsxRuntimeExports.jsx(A,{d:"M30 38.196L26 45.1242"}),r.jsxRuntimeExports.jsx(A,{d:"M36 38.196L40 45.1242"})]})]}),kp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),_p=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(fe,{...o,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{d:"M3 33H63"})]})]}),Lp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:7.575,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:92.425,top:50,id:"2"})]}),r.jsxRuntimeExports.jsx(q,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:r.jsxRuntimeExports.jsx(A,{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"})})]}),Tp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),r.jsxRuntimeExports.jsx(A,{d:"M16 2.5L16 66.5"}),r.jsxRuntimeExports.jsx(A,{d:"M2 34.5H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 19H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 50H30"}),r.jsxRuntimeExports.jsx(A,{d:"M29.121 3.37903L61 34.5"}),r.jsxRuntimeExports.jsx(A,{d:"M29.12 65.62L61 34.5"})]})]}),Mp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:60,height:69},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2.5",width:"56",height:"64",rx:"3"}),r.jsxRuntimeExports.jsx(A,{d:"M30 2.5L30 66.5"}),r.jsxRuntimeExports.jsx(A,{d:"M16 2.5L16 66.5"}),r.jsxRuntimeExports.jsx(A,{d:"M2 34.5H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 19H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 50H30"})]})]}),Np=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),r.jsxRuntimeExports.jsx(A,{d:"M16 2.5L16 66.5"}),r.jsxRuntimeExports.jsx(A,{d:"M2 34.5H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 19H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 50H30"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),r.jsxRuntimeExports.jsx(he,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),Pp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),r.jsxRuntimeExports.jsx(A,{d:"M16 2.5L16 66.5"}),r.jsxRuntimeExports.jsx(A,{d:"M2 34.5H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 19H30"}),r.jsxRuntimeExports.jsx(A,{d:"M2 50H30"}),r.jsxRuntimeExports.jsx(A,{d:"M29.121 3.37903L61 34.5"}),r.jsxRuntimeExports.jsx(A,{d:"M29.12 65.62L61 34.5"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(he,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),r.jsxRuntimeExports.jsx(he,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),Ap=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("thruster"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:25.3,top:4.76,id:"3"}),r.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:25.3,top:95.24,id:"4"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:81,height:42},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2.5",y:"2",width:"38",height:"38",rx:"3"}),r.jsxRuntimeExports.jsx(A,{d:"M78.5 37.5117V4.51172"}),r.jsxRuntimeExports.jsx(A,{d:"M40.5 11.5L76.0072 2.6232"}),r.jsxRuntimeExports.jsx(A,{d:"M40.5 30.5L76.0072 39.3768"}),r.jsxRuntimeExports.jsx(A,{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"}),r.jsxRuntimeExports.jsx(A,{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"})]})]}),Op=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("nozzle"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:18.75,top:17.46,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:1.5873,id:"2"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:81.25,top:17.46,id:"3"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:64,height:126},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"12",y:"1.6667",width:"40",height:"40",rx:"2"}),r.jsxRuntimeExports.jsx(A,{d:"M1.3333 124H62.6667",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{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",strokeLinecap:"round"}),r.jsxRuntimeExports.jsx(A,{d:"M14 41.6667C22.4135 41.6667 29.174 46.3333 21.496 59.3333C4.84066 87.5333 0.555555 119 1.33333 124",strokeLinecap:"round"})]})]}),Ip=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("strainer"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),r.jsxRuntimeExports.jsx(A,{d:"M2.293 2.29297L29.9383 66.7986",strokeDasharray:"6 6"})]})]}),Dp=({color:e,className:t,orientation:n="left",scale:s,...o})=>r.jsxRuntimeExports.jsxs(oe,{...o,className:u.CSS(u.CSS.B("strainer"),t),children:[r.jsxRuntimeExports.jsxs(U,{orientation:n,children:[r.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),r.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),r.jsxRuntimeExports.jsxs(q,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[r.jsxRuntimeExports.jsx(je,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),r.jsxRuntimeExports.jsx(A,{d:"M31 34.5L2.30611 2.33992",strokeDasharray:"6 6"}),r.jsxRuntimeExports.jsx(A,{d:"M31 34.5L2.30611 66.6601",strokeDasharray:"6 6"})]})]}),eo=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},Ie=(e,t)=>{const n=eo(t),s=e.getNodes().find(o=>o.id===t);if(s==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return u.Ho.construct(s.position,u._.scale(u.Ho.dims(u.Ho.construct(n)),1/e.getZoom()))},MR=(e,t)=>to.fromFlow(e,t);class Bp{node_=null;position;orientation;constructor(t,n){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.K.translate(u.Ho.topLeft(this.node.box),this.position)}}class to{key;box;handles;constructor(t,n,s){this.key=t,this.box=n,this.handles=s,s.forEach(o=>o.node=this)}static fromFlow(t,n){const s=Ie(n,t),o=eo(t),i=o.getElementsByClassName("react-flow__handle"),l=u.Ho.construct(o),a=Array.from(i).map(c=>{const d=u.Ho.center(u.Ho.construct(c)),x=u.K.translation(u.Ho.topLeft(l),d),p=c.className.match(/react-flow__handle-(\w+)/);if(p==null)throw new Error("[schematic] - cannot find handle orientation");const m=u.K$1.construct(p[0]);return new Bp(x,m)});return new to(t,s,a)}}const NR="Schematic.Grid",no=u.CSS.B("drag-handle"),PR=e=>{const n=eo(e).closest(".react-flow__pane");n!=null&&f.triggerReflow(n)},Hn=e=>{const t=({symbolKey:s,items:o,onLocationChange:i})=>{const l=`${s}.${NR}`,[a,c]=j.useState(!1),d=j.useMemo(()=>f.canDropOfType(l),[l]),x=f.useSyncedRef(i),{startDrag:p,onDragEnd:m,...h}=f.useDragAndDrop({type:l,canDrop:d,onDrop:j.useCallback(({items:R})=>(c(!1),R),[]),onDragOver:j.useCallback(R=>{const{items:v}=R;c(d(R)),v.forEach(({key:y})=>x.current(y,e))},[])}),g=o.filter(R=>R.location===e),E=j.useCallback((R,v)=>{p([{key:v,type:l}]),document.addEventListener("mousemove",m,{once:!0})},[p,l,m]),S=d(f.useDraggingState());return r.jsxRuntimeExports.jsx(f.Box,{direction:u.K$1.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e),u.CSS.dropRegion(S),a&&u.CSS.B("dragging-over"),S&&u.CSS.B("dragging")),onDragLeave:()=>c(!1),empty:!0,...h,children:g.map(({element:R,key:v})=>r.jsxRuntimeExports.jsx(j.Fragment,{children:j.cloneElement(R,{draggable:!0,onDragStart:y=>E(y,v),onDragEnd:m,style:{...R.props.style,cursor:"grab"}})},v))})};return({symbolKey:s,...o})=>{const{editable:i,items:l}=o;if(i)return r.jsxRuntimeExports.jsx(t,{symbolKey:s,...o});const a=l.filter(c=>c.location===e);return a.length===0?null:r.jsxRuntimeExports.jsx(f.Box,{direction:u.K$1.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e)),empty:!0,children:a.map(({element:c,key:d})=>r.jsxRuntimeExports.jsx(j.Fragment,{children:c},d))})}},AR=Hn("top"),OR=Hn("left"),IR=Hn("right"),DR=Hn("bottom"),BR=Hn("center"),Vt=({editable:e,allowRotate:t=!0,children:n,allowCenter:s,onRotate:o,symbolKey:i,...l})=>{const a=j.useRef(e);return e!==a.current&&(PR(i),a.current=e),r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(AR,{editable:e,symbolKey:i,...l},`top-${i}`),r.jsxRuntimeExports.jsx(OR,{editable:e,symbolKey:i,...l},`left-${i}`),r.jsxRuntimeExports.jsx(IR,{editable:e,symbolKey:i,...l},`right-${i}`),r.jsxRuntimeExports.jsx(DR,{editable:e,symbolKey:i,...l},`bottom-${i}`),s&&r.jsxRuntimeExports.jsx(BR,{editable:e,symbolKey:i,...l},`center-${i}`),e&&t&&r.jsxRuntimeExports.jsx(f.Button,{className:u.CSS.BE("grid","rotate"),size:"tiny",variant:"filled",onClick:o,children:r.jsxRuntimeExports.jsx(f.Rotate,{})}),r.jsxRuntimeExports.jsx("div",{className:no,children:n})]})},$R=e=>{switch(e.variant){case"disabled":return e.details?.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 e.details?.authority===L.Wb.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 schematic to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},$p=({source:e,sink:t,className:n,...s})=>{const o=f.useMemoDeepEqual({source:e,sink:t}),[,{status:i},l]=f.use$2({type:O.Chip.TYPE,schema:O.chipStateZ,initialState:{triggered:!1,...o,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:u.r.now(),details:{}}}});j.useEffect(()=>{l(m=>({...m,...o}))},[o,l]);const a=j.useCallback(()=>l(m=>({...m,triggered:!m.triggered})),[l]),{message:c,chipColor:d,buttonStyle:x,disabled:p}=$R(i);return r.jsxRuntimeExports.jsx(f.Button,{variant:"text",className:u.CSS(u.CSS.B("control-chip"),n),disabled:p,onClick:a,tooltip:r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:c}),style:x,...s,children:r.jsxRuntimeExports.jsx(f.Circle,{color:d})})},zp=j.createContext({needsControlOf:[]}),Vp=()=>j.use(zp),zR=({children:e,onStatusChange:t,...n})=>{const s=f.useMemoDeepEqual(n),[{path:o},{status:i,needsControlOf:l},a]=f.use$2({type:O.Controller.TYPE,schema:O.controllerStateZ,initialState:s});return j.useEffect(()=>{i!=null&&t?.(i)},[i,t]),j.useEffect(()=>{a(c=>({...c,...s}))},[s,a]),j.useEffect(()=>()=>t?.("released"),[]),r.jsxRuntimeExports.jsxs(zp,{value:{needsControlOf:l},children:[r.jsxRuntimeExports.jsx(f.Composite,{path:o,children:e}),";"]})},Fp=({colorSource:e,statusSource:t})=>{const n=f.useMemoDeepEqual({colorSource:e,statusSource:t}),[,{color:s,status:o},i]=f.use$2({type:O.Indicator.TYPE,initialState:{...n,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:u.r.now(),details:{color:void 0}}},schema:O.indicatorStateZ});j.useEffect(()=>{i(a=>({...a,...n}))},[n,i]);let l;return o.details?.color!=null?l=u.fr.colorZ.parse(o.details.color):s!=null&&!u.fr.isZero(s)?l=s:l="var(--pluto-gray-l10)",r.jsxRuntimeExports.jsxs(f.Dialog$1,{location:{x:"center",y:"bottom"},children:[r.jsxRuntimeExports.jsx(f.Text,{children:o.message}),r.jsxRuntimeExports.jsx("div",{className:u.CSS.B("indicator"),style:{backgroundColor:u.fr.cssString(l),flexGrow:1}})]})},VR=e=>{const{needsControlOf:t}=Vp(),[,{states:n},s]=f.use$2({type:O.Legend.TYPE,schema:O.legendStateZ,initialState:{states:[],needsControlOf:t}});j.useEffect(()=>{s(l=>({...l,needsControlOf:t}))},[t]);const i=u.c.unique(n.map(l=>l.subject.key)).map(l=>{const a=n.find(c=>c.subject.key===l);if(a==null)throw new L.Tt("Legend subject not found");return{key:a.subject.key,label:a.subject.name,color:a.subjectColor}});return r.jsxRuntimeExports.jsx(fr,{data:i,...e})},Hp=({children:e})=>{const[{path:t}]=f.use$2({type:O.StateProvider.TYPE,schema:O.stateProviderStateZ,initialState:{}});return r.jsxRuntimeExports.jsx(f.Composite,{path:t,children:e})},FR=Object.freeze(Object.defineProperty({__proto__:null,Chip:$p,Controller:zR,Indicator:Fp,Legend:VR,StateProvider:Hp,useContext:Vp},Symbol.toStringTag,{value:"Module"})),HR=({aetherKey:e,source:t})=>{const n=f.useMemoDeepEqual({source:t}),[,{enabled:s},o]=f.use$2({aetherKey:e,type:O.Light.TYPE,schema:O.stateZ$1,initialState:{enabled:!1,...n}});return j.useEffect(()=>o(i=>({...i,...n})),[n,o]),{enabled:s}},ZR=({aetherKey:e,source:t,sink:n})=>{const s=f.useMemoDeepEqual({source:t,sink:n}),[,{value:o},i]=f.use$2({aetherKey:e,type:O.Setpoint.TYPE,schema:O.stateZ$2,initialState:{trigger:0,value:0,...s}});return j.useEffect(()=>{i(a=>({...a,...s}))},[s,i]),{set:j.useCallback(a=>i(c=>({...c,trigger:c.trigger+1,command:a})),[i]),value:o}},KR=({aetherKey:e,source:t,sink:n})=>{const s=f.useMemoDeepEqual({source:t,sink:n}),[,{triggered:o,enabled:i},l]=f.use$2({aetherKey:e,type:O.Toggle.TYPE,schema:O.toggleStateZ,initialState:{triggered:!1,enabled:!1,...s}});return j.useEffect(()=>{l(c=>({...c,...s}))},[s,l]),{toggle:j.useCallback(()=>l(c=>({...c,triggered:!c.triggered})),[l]),triggered:o,enabled:i}},an=(e,t)=>{if(e==null)return null;const{label:n,level:s="p",orientation:o="top",direction:i,align:l,maxInlineSize:a}=e;return n==null||n.length===0?null:{key:"label",element:r.jsxRuntimeExports.jsx(f.Editable,{className:u.CSS(u.CSS.BE("symbol","label"),u.CSS.dir(i)),level:s,value:n,onChange:c=>t?.({label:{...e,label:c}}),allowEmpty:!0,style:{textAlign:l,maxInlineSize:a}}),location:o}},ai=e=>{if(e==null)return null;const{show:t=!0,showChip:n=!0,showIndicator:s=!0,chip:o,indicator:i,orientation:l="bottom"}=e;return{key:"control",element:r.jsxRuntimeExports.jsxs(f.Box,{direction:u.p.swap(l),align:"center",className:u.CSS(u.CSS.B("control-state")),gap:"small",children:[t&&n&&r.jsxRuntimeExports.jsx($p,{size:"small",...o}),t&&s&&r.jsxRuntimeExports.jsx(Fp,{...i})]}),location:l}},be=(e,t)=>{const n=({symbolKey:s,control:o,source:i,sink:l,label:a,onChange:c,selected:d,orientation:x="left",position:p,...m})=>{const{enabled:h,triggered:g,toggle:E}=KR({aetherKey:s,source:i,sink:l}),S=[],R=an(a,c);R!=null&&S.push(R);const v=ai(o);return v!=null&&S.push(v),r.jsxRuntimeExports.jsx(Vt,{editable:d,symbolKey:s,items:S,onRotate:()=>c({orientation:u.K$1.rotate90(x)}),onLocationChange:(y,C)=>{y==="label"&&c({label:{...a,orientation:C}}),y==="control"&&c({control:{...o,orientation:C}})},...t?.grid,children:r.jsxRuntimeExports.jsx(e,{enabled:h,triggered:g,onClick:E,orientation:x,...m})})};return n.displayName=e.displayName,n},ce=(e,t)=>{const n=({symbolKey:s,label:o,onChange:i,selected:l,position:a,orientation:c="left",...d})=>{const x=[],p=an(o,i);return p!=null&&x.push(p),r.jsxRuntimeExports.jsx(Vt,{...t?.grid,items:x,editable:l,symbolKey:s,onRotate:()=>i({orientation:u.K$1.rotate90(c)}),onLocationChange:(m,h)=>{m==="label"&&i({label:{...o,orientation:h}})},children:r.jsxRuntimeExports.jsx(e,{orientation:c,...d})})};return n.displayName=e.displayName,n},Ft=e=>{const t=({symbolKey:n,label:s,onChange:o,selected:i,position:l,orientation:a="left",enabled:c=!1,clickable:d=!1,...x})=>{const p=[],m=an(s,o);m!=null&&p.push(m);const h=()=>{d&&o({enabled:!c})};return r.jsxRuntimeExports.jsx(Vt,{items:p,editable:i,symbolKey:n,onRotate:()=>o({orientation:u.K$1.rotate90(a)}),onLocationChange:(g,E)=>{g==="label"&&o({label:{...s,orientation:E}})},children:r.jsxRuntimeExports.jsx(e,{orientation:a,enabled:c,onClick:h,...x})})};return t.displayName=e.displayName,t},YR=be(tx),GR=be(Qd),UR=be(Jd),WR=be(ex),XR=be(qd),qR=be(lx),QR=be(mx),JR=be(Sp),e4=be(Rp),t4=be(Ix),n4=be(Dx),s4=be(Bx),o4=be(zx),r4=be(Zx),i4=be(Kx),l4=be(Yx),a4=be(Gx),c4=be(Ux),u4=be(Wx),d4=be(Ox),x4=be(Cp),p4=be(bp),m4=be(wp),f4=be(vp),h4=be(kp),g4=be(_p),j4=be(dx),E4=be(xx),y4=be(ax),S4=be(cx),R4=be(ux),C4=ce(wx),b4=ce(vx),w4=ce(Fx),v4=ce(Hx),k4=ce(fx),_4=ce(gx),L4=ce(jx),T4=ce(Sx),M4=ce(ox),N4=ce(rx),P4=ce(ix),A4=ce(kx),O4=be(Mx,{grid:{allowRotate:!1}}),I4=ce(qx),D4=ce(yx),B4=ce(Qx),$4=ce(Jx),z4=ce(ep),V4=ce(hx),F4=ce(nx),H4=ce(op),Z4=ce(rp,{grid:{allowRotate:!1}}),K4=ce($x),Y4=ce(ip),G4=ce(lp),U4=ce(ap),W4=ce(cp),X4=ce(up),q4=ce(dp),Q4=ce(xp),J4=ce(pp),eC=ce(mp),tC=ce(fp),nC=ce(hp),sC=ce(gp),oC=ce(jp),rC=ce(Ep),iC=ce(yp),lC=ce(Lp),aC=ce(Mp),cC=ce(Tp),uC=ce(Np),dC=ce(Pp),xC=ce(Ap),pC=ce(Op),mC=ce(Ip),fC=ce(Dp),hC=Ft(_x),gC=Ft(sx),jC=Ft(np),EC=Ft(sp),yC=Ft(Ex),SC=Ft(Lx),RC=Ft(px),CC=ce(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:o,borderRadius:i})=>r.jsxRuntimeExports.jsx(Js,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:o,borderRadius:i,backgroundColor:e}),{grid:{allowCenter:!0,allowRotate:!1}}),bC=e=>r.jsxRuntimeExports.jsx(Js,{...e,dimensions:{width:25,height:50}});ce(({sideLength:e,rotation:t,color:n,backgroundColor:s,numSides:o,...i})=>r.jsxRuntimeExports.jsx(li,{numSides:3,sideLength:e,rotation:t,color:n,backgroundColor:s,...i}));const wC=ce(({numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:o,backgroundColor:i,strokeWidth:l,...a})=>r.jsxRuntimeExports.jsx(li,{numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:o,backgroundColor:i,strokeWidth:l,...a})),vC=ce(({radius:e,color:t,backgroundColor:n,strokeWidth:s,...o})=>r.jsxRuntimeExports.jsx(bx,{radius:e,color:t,backgroundColor:n,strokeWidth:s,...o}),{grid:{allowRotate:!1}}),kC=ce(({backgroundColor:e,borderRadius:t,onChange:n,orientation:s,color:o,dimensions:i,strokeWidth:l})=>r.jsxRuntimeExports.jsx(Js,{onResize:a=>n({dimensions:a}),orientation:s,color:o,dimensions:i,boxBorderRadius:t,backgroundColor:e,strokeWidth:l}),{grid:{allowCenter:!0,allowRotate:!1}}),_C=e=>r.jsxRuntimeExports.jsx(Js,{...e,dimensions:{width:25,height:50},borderRadius:0}),LC=({label:e,symbolKey:t,orientation:n="left",control:s,units:o,source:i,sink:l,color:a,onChange:c,selected:d,draggable:x,size:p,disabled:m})=>{const{value:h,set:g}=ZR({aetherKey:t,source:i,sink:l}),E=[],S=ai(s);S!=null&&E.push(S);const R=an(e,c);return R!=null&&E.push(R),r.jsxRuntimeExports.jsx(Vt,{symbolKey:t,allowRotate:!1,editable:d&&!x,onRotate:()=>c({orientation:u.K$1.rotate90(n)}),items:E,onLocationChange:(v,y)=>{v==="label"&&c({label:{...e,orientation:y}})},children:r.jsxRuntimeExports.jsx(Ax,{value:h,onChange:g,units:o,color:a,orientation:n,disabled:m,size:p})})},TC=({className:e,...t})=>r.jsxRuntimeExports.jsx(Ax,{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:r.jsxRuntimeExports.jsx(f.Text,{children:"10.0"})}),MC=u.K.construct(10,-3),NC=u.K.construct(1,1),PC=({symbolKey:e,label:t,level:n="p",position:s,textColor:o,color:i,telem:l,units:a,onChange:c,inlineSize:d=70,selected:x,draggable:p,notation:m,stalenessColor:h,stalenessTimeout:g,redline:E})=>{const S=Ps.useTypography(n),R=(S.lineHeight+.5)*S.baseSize+2,v=j.useMemo(()=>{if(l==null||E==null)return;const{bounds:T,gradient:P}=E;return O.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:l,scale:O.scaleNumber({scale:u.C.Scale.scale(T).scale(0,1).transform}),gradient:O.colorGradient({gradient:P})},outlet:"gradient"})},[l,E]),{width:y}=Zr({aetherKey:e,color:o,level:n,box:u.Ho.construct(u.K.translateY({...s},1),{height:R,width:d}),telem:l,backgroundTelem:v,minWidth:d,stalenessColor:h,stalenessTimeout:g,notation:m,useWidthForBackground:!0,valueBackgroundOverScan:MC,valueBackgroundShift:NC}),C=[],k=an(t,c);return k!=null&&C.push(k),r.jsxRuntimeExports.jsx(Vt,{editable:x&&!p,symbolKey:e,items:C,allowRotate:!1,onLocationChange:(T,P)=>{T==="label"&&c({label:{...t,orientation:P}})},children:r.jsxRuntimeExports.jsx(Tx,{color:i,dimensions:{height:R,width:y},inlineSize:d,units:a,unitsLevel:L.downLevel(n)})})},AC=({color:e})=>r.jsxRuntimeExports.jsx(Tx,{color:e,dimensions:{width:60,height:25},units:"psi",children:r.jsxRuntimeExports.jsx(f.Text,{children:"50.00"})}),OC=({symbolKey:e,label:t,orientation:n="left",sink:s,control:o,selected:i,draggable:l,onChange:a,mode:c,...d})=>{const{onMouseDown:x,onMouseUp:p}=b0({aetherKey:e,sink:s,mode:c}),m=[],h=ai(o);return h!=null&&m.push(h),r.jsxRuntimeExports.jsx(Vt,{onRotate:()=>a({orientation:u.K$1.rotate90(n)}),allowRotate:!1,editable:i,symbolKey:e,items:m,onLocationChange:(g,E)=>{g==="label"&&a({label:{...t,orientation:E}})},children:r.jsxRuntimeExports.jsx(Nx,{...t,onMouseDown:x,onMouseUp:p,orientation:n,...d})})},IC=({label:e,...t})=>r.jsxRuntimeExports.jsx(Nx,{label:"Button",...t}),DC=({symbolKey:e,label:t,source:n,onChange:s,selected:o,...i})=>{const{enabled:l}=HR({aetherKey:e,source:n}),a=[],c=an(t,s);return c!=null&&a.push(c),r.jsxRuntimeExports.jsx(Vt,{items:a,allowRotate:!1,editable:o,symbolKey:e,onLocationChange:(d,x)=>{d==="label"&&s({label:{...t,orientation:x}})},children:r.jsxRuntimeExports.jsx(Vx,{enabled:l,...i})})},BC=({label:{label:e,level:t},orientation:n,color:s,onChange:o})=>r.jsxRuntimeExports.jsx(Xx,{className:no,onLabelChange:i=>o({label:{label:i,level:t}}),label:e,level:t,orientation:n,color:s}),$C=({label:e,...t})=>r.jsxRuntimeExports.jsx(Xx,{label:"Off Page",...t,orientation:"right"}),zC=ce(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:o,borderRadius:i})=>r.jsxRuntimeExports.jsx(tp,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:o,borderRadius:i,backgroundColor:e})),VC=e=>r.jsxRuntimeExports.jsx(tp,{...e,dimensions:{width:25,height:50}}),FC=({onChange:e,symbolKey:t,color:n,width:s,align:o,autoFit:i,level:l,value:a})=>r.jsxRuntimeExports.jsx(Px,{className:no,onChange:c=>e({value:c}),value:a,level:l,color:n,width:s,align:o,autoFit:i},t),HC=e=>r.jsxRuntimeExports.jsx(Px,{...e,autoFit:!0,value:"Text Box"}),W=4,Zn=2,ZC=["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","customActuator","customStatic"],KC=ne.z.enum(ZC),ie={orientation:"left",scale:1},YC={source:O.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:O.streamChannelValue({channel:0}),rollingAverage:O.rollingAverage({windowSize:1}),stringifier:O.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"})},GC={...ie,source:O.sourcePipeline("number",{connections:[],segments:{valueStream:O.streamChannelValue({channel:0})},outlet:"valueStream"})},UC={...ie,sink:O.sinkPipeline("number",{connections:[],segments:{setter:O.setChannelValue({channel:0})},inlet:"setter"})},Zp={...ie,source:O.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:O.streamChannelValue({channel:0}),threshold:O.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},Kp={...ie,control:{show:!0},sink:O.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:O.setChannelValue({channel:0}),setpoint:O.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},Se={...Zp,...Kp},Ht={...ie,enabled:!1,clickable:!1},Y=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center",direction:"x"}}),WC={width:125,height:200},ci={dimensions:WC},XC=3,qC={name:"Three Way",key:"threeWayValve",Form:ye,Symbol:GR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Three Way"),...Se}),Preview:Qd,zIndex:W},QC={name:"Generic",key:"valve",Form:ye,Symbol:UR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Valve"),...Se}),Preview:Jd,zIndex:W},JC={name:"Solenoid",key:"solenoidValve",Form:ye,Symbol:WR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Solenoid Valve"),normallyOpen:!1,...Se}),Preview:ex,zIndex:W},e6={name:"Four Way",key:"fourWayValve",Form:ye,Symbol:XR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Four Way Valve"),...Se}),Preview:qd,zIndex:W},t6={name:"Angled",key:"angledValve",Form:ye,Symbol:qR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Valve"),...Se}),Preview:lx,zIndex:W},n6={name:"Ball",key:"ballValve",Form:ye,Symbol:y4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ball Valve"),...Se}),Preview:ax,zIndex:W},s6={name:"Three-Way Ball",key:"threeWayBallValve",Form:ye,Symbol:S4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Three-Way Ball Valve"),...Se}),Preview:cx,zIndex:W},o6={name:"Gate",key:"gateValve",Form:ye,Symbol:R4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Gate Valve"),...Se}),Preview:ux,zIndex:W},r6={name:"Butterfly (Remote)",key:"butterflyValveOne",Form:ye,Symbol:j4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Butterfly Valve (Remote)"),...Se}),Preview:dx,zIndex:W},i6={name:"Butterfly (Manual)",key:"butterflyValveTwo",Form:ye,Symbol:E4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Butterfly Valve (Manual)"),...Se}),Preview:xx,zIndex:W},l6={name:"Breather",key:"breatherValve",Form:$t,Symbol:RC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Breather Valve"),...Ht}),Preview:Qe(px,["clickable"]),zIndex:W},a6={name:"Pump",key:"pump",Form:ye,Symbol:QR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Pump"),...Se}),Preview:mx,zIndex:W},c6={name:"Screw",key:"screwPump",Form:ye,Symbol:d4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Screw Pump"),...Se}),Preview:Ox,zIndex:W},u6={name:"Tank",key:"tank",Form:pu,Symbol:CC,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.fr.setAlpha(e.colors.gray.l1,0),...Y("Tank"),borderRadius:ii,...ci,...ie}),Preview:bC,zIndex:Zn},d6={name:"Polygon",key:"polygon",Symbol:wC,Form:A0,defaultProps:e=>({numSides:6,sideLength:_R,cornerRounding:0,rotation:0,color:e.colors.gray.l11,backgroundColor:u.fr.setAlpha(e.colors.gray.l1,0),strokeWidth:2,...Y("Polygon")}),Preview:Qe(li,["clickable"]),zIndex:Zn},x6={name:"Circle",key:"circle",Symbol:vC,Form:O0,defaultProps:e=>({radius:20,color:e.colors.gray.l11,backgroundColor:u.fr.setAlpha(e.colors.gray.l1,0),...Y("Circle"),strokeWidth:2}),Preview:Qe(bx,["clickable"]),zIndex:Zn},p6={name:"Cylinder",key:"cylinder",Form:U0,Symbol:zC,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.fr.setAlpha(e.colors.gray.l1,0),...Y("cylinder"),dimensions:{width:66,height:181},...ie}),Preview:VC,zIndex:Zn},m6={name:"Box",key:"box",Form:W0,Symbol:kC,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.fr.setAlpha(e.colors.gray.l1,0),...Y("Box"),borderRadius:XC,strokeWidth:2,...ci,...ie}),Preview:_C,zIndex:Zn},f6={name:"Relief",key:"reliefValve",Form:$t,Symbol:gC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Relief Valve"),...Ht}),Preview:Qe(sx,["clickable"]),zIndex:W},h6={name:"Spring Loaded Relief",key:"springLoadedReliefValve",Form:$t,Symbol:jC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Spring Loaded Relief Valve"),...Ht}),Preview:Qe(np,["clickable"]),zIndex:W},g6={name:"Angled Spring Loaded Relief",key:"angledSpringLoadedReliefValve",Form:$t,Symbol:EC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Spring Loaded Relief Valve"),...Ht}),Preview:Qe(sp,["clickable"]),zIndex:W},j6={name:"Regulator",key:"regulator",Form:xe,Symbol:C4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Regulator"),...ie}),Preview:wx,zIndex:W},E6={name:"Manual",key:"regulatorManual",Form:xe,Symbol:b4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Manual Regulator"),...ie}),Preview:Qe(vx,["clickable"]),zIndex:W},y6={name:"Electric",key:"electricRegulator",Form:xe,Symbol:w4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electric Regulator"),...ie}),Preview:Fx,zIndex:W},S6={name:"Motorized",key:"electricRegulatorMotorized",Form:xe,Symbol:v4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electric Regulator Motorized"),...ie}),Preview:Hx,zIndex:W},R6={name:"Standard",key:"burstDisc",Form:xe,Symbol:k4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Burst Disc"),...ie}),Preview:fx,zIndex:W},C6={name:"ISO",key:"isoBurstDisc",Form:xe,Symbol:V4,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Burst Disc"),...ie}),Preview:hx,zIndex:W},b6={name:"Cap",key:"cap",Form:xe,Symbol:_4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cap"),...ie}),Preview:gx,zIndex:W},w6={name:"ISO Cap",key:"isoCap",Form:xe,Symbol:L4,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Cap"),...ie}),Preview:jx,zIndex:W},v6={name:"Manual",key:"manualValve",Form:$t,Symbol:yC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Manual Valve"),...Ht}),Preview:Qe(Ex,["clickable"]),zIndex:W},k6={name:"Plate",key:"orificePlate",Form:xe,Symbol:D4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice Plate"),...ie}),Preview:yx,zIndex:W},_6={name:"ISO Filter",key:"isoFilter",Form:xe,Symbol:B4,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Filter"),...ie}),Preview:Qx,zIndex:W},L6={name:"Filter",key:"filter",Form:xe,Symbol:T4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Filter"),...ie}),Preview:Sx,zIndex:W},T6={name:"Flow Straightener",key:"flowStraightener",Form:xe,Symbol:$4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flow Straightener"),...ie}),Preview:Jx,zIndex:W},M6={name:"Heater",key:"heaterElement",Form:xe,Symbol:z4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Heater Element"),...ie}),Preview:ep,zIndex:W},N6={name:"Needle",key:"needleValve",Form:$t,Symbol:hC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Needle Valve"),...Ht}),Preview:Qe(_x,["clickable"]),zIndex:W},P6={name:"Check",key:"checkValve",Form:xe,Symbol:M4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Check Valve"),...ie}),Preview:ox,zIndex:W},A6={name:"Orifice",key:"orifice",Form:xe,Symbol:A4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice"),...ie}),Preview:kx,zIndex:W},O6={name:"Angled Relief",key:"angledReliefValve",Form:$t,Symbol:SC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Relief Valve"),...Ht}),Preview:Qe(Lx,["clickable"]),zIndex:W},I6={name:"Value",key:"value",Form:B0,Symbol:PC,Preview:AC,defaultProps:e=>({color:e.colors.gray.l11,units:"psi",level:"h5",inlineSize:70,...Y("Value"),...ie,stalenessTimeout:5,stalenessColor:e.colors.warning.m1,telem:YC.source,redline:vn}),zIndex:W},D6={name:"Button",key:"button",Symbol:OC,Form:H0,Preview:IC,defaultProps:e=>({color:e.colors.primary.z,...Y("Button"),...Kp,mode:"fire",onClickDelay:0,scale:null}),zIndex:W},B6={name:"Switch",key:"switch",Symbol:O4,Form:X0,defaultProps:()=>({...Y("Switch"),...Se,scale:null}),Preview:Mx,zIndex:W},$6={name:"Vacuum",key:"vacuumPump",Symbol:t4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Vacuum Pump"),...Se}),Preview:Ix,zIndex:W},z6={name:"Compressor",key:"compressor",Symbol:x4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Compressor"),...Se}),Preview:Cp,zIndex:W},V6={name:"Cavity",key:"cavityPump",Symbol:n4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cavity Pump"),...Se}),Preview:Dx,zIndex:W},F6={name:"Piston",key:"pistonPump",Symbol:s4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Piston Pump"),...Se}),Preview:Bx,zIndex:W},H6={name:"Static Mixer",key:"staticMixer",Symbol:K4,Form:xe,defaultProps:e=>({color:e.colors.gray.l11,...Y("Static Mixer"),...ie}),Preview:$x,zIndex:W},Z6={name:"Rotary Mixer",key:"rotaryMixer",Symbol:o4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Rotary Mixer"),...Se}),Preview:zx,zIndex:W},K6={name:"Light",key:"light",Symbol:DC,Form:V0,defaultProps:e=>({color:e.colors.gray.l11,...Y("Light"),...Zp}),Preview:Vx,zIndex:W},Y6={name:"Setpoint",key:"setpoint",Symbol:LC,Form:K0,defaultProps:e=>({units:"mV",color:e.colors.gray.l11,size:"small",...Y("Setpoint"),...GC,...UC}),Preview:TC,zIndex:W},G6={name:"Agitator",key:"agitator",Symbol:r4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Agitator"),...Se}),Preview:Zx,zIndex:W},U6={name:"Propeller Agitator",key:"propellerAgitator",Symbol:i4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Propeller Agitator"),...Se}),Preview:Kx,zIndex:W},W6={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:l4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flat Blade Agitator"),...Se}),Preview:Yx,zIndex:W},X6={name:"Paddle Agitator",key:"paddleAgitator",Symbol:a4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Paddle Agitator"),...Se}),Preview:Gx,zIndex:W},q6={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:c4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cross Beam Agitator"),...Se}),Preview:Ux,zIndex:W},Q6={name:"Helical Agitator",key:"helicalAgitator",Symbol:u4,Form:ye,defaultProps:e=>({color:e.colors.gray.l11,...Y("Helical Agitator"),...Se}),Preview:Wx,zIndex:W},J6={name:"Text Box",key:"textBox",Symbol:FC,Form:Y0,defaultProps:e=>({color:e.colors.gray.l11,autoFit:!0,align:"center",...Y("Text Box"),...ie,...ci,level:"p",value:"Text Box",width:75}),Preview:HC,zIndex:W},eb={name:"Off Page",key:"offPageReference",Form:G0,Symbol:BC,defaultProps:e=>({color:e.colors.gray.l11,orientation:"right",...Y("Off Page Reference")}),Preview:$C,zIndex:W},tb={name:"ISO Check",key:"isoCheckValve",Form:xe,Symbol:N4,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Check Valve"),...ie}),Preview:rx,zIndex:W},nb={name:"Check (Arrow)",key:"checkValveWithArrow",Form:xe,Symbol:P4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Check Valve"),...ie}),Preview:ix,zIndex:W},sb={name:"Vent",key:"vent",Form:xe,Symbol:I4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Vent"),...ie}),Preview:qx,zIndex:W},ob={name:"T Junction",key:"tJunction",Form:xe,Symbol:H4,defaultProps:e=>({color:e.colors.gray.l11,...Y(""),...ie}),Preview:op,zIndex:W+20},rb={name:"Cross Junction",key:"crossJunction",Form:xe,Symbol:Z4,defaultProps:e=>({color:e.colors.gray.l11,...Y(""),...ie}),Preview:rp,zIndex:W+20},ib={name:"General",key:"flowmeterGeneral",Form:xe,Symbol:Y4,defaultProps:e=>({color:e.colors.gray.l11,...Y("General Flowmeter"),...ie}),Preview:ip,zIndex:W},lb={name:"Electromagnetic",key:"flowmeterElectromagnetic",Form:xe,Symbol:G4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electromagnetic Flowmeter"),...ie}),Preview:lp,zIndex:W},ab={name:"Variable Area",key:"flowmeterVariableArea",Form:xe,Symbol:U4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Variable Area Flowmeter"),...ie}),Preview:ap,zIndex:W},cb={name:"Coriolis",key:"flowmeterCoriolis",Form:xe,Symbol:W4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Coriolis Flowmeter"),...ie}),Preview:cp,zIndex:W},ub={name:"Nozzle",key:"flowmeterNozzle",Form:xe,Symbol:X4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Nozzle Flowmeter"),...ie}),Preview:up,zIndex:W},db={name:"Venturi",key:"flowmeterVenturi",Form:xe,Symbol:q4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Venturi Flowmeter"),...ie}),Preview:dp,zIndex:W},xb={name:"Ring Piston",key:"flowmeterRingPiston",Form:xe,Symbol:Q4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ring Piston Flowmeter"),...ie}),Preview:xp,zIndex:W},pb={name:"Positive Displacement",key:"flowmeterPositiveDisplacement",Form:xe,Symbol:J4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Positive Displacement Flowmeter"),...ie}),Preview:pp,zIndex:W},mb={name:"Turbine",key:"flowmeterTurbine",Form:xe,Symbol:eC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Turbine Flowmeter"),...ie}),Preview:mp,zIndex:W},fb={name:"Pulse",key:"flowmeterPulse",Form:xe,Symbol:tC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Pulse Flowmeter"),...ie}),Preview:fp,zIndex:W},hb={name:"Float Sensor",key:"flowmeterFloatSensor",Form:xe,Symbol:nC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Float Sensor Flowmeter"),...ie}),Preview:hp,zIndex:W},gb={name:"Orifice",key:"flowmeterOrifice",Form:xe,Symbol:sC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice Flowmeter"),...ie}),Preview:gp,zIndex:W},jb={name:"Heat Exchanger",key:"heatExchangerGeneral",Form:xe,Symbol:oC,defaultProps:e=>({color:e.colors.gray.l11,...Y("General Heat Exchanger"),...ie}),Preview:jp,zIndex:W},Eb={name:"M-Type Heat Exchanger",key:"heatExchangerM",Form:xe,Symbol:rC,defaultProps:e=>({color:e.colors.gray.l11,...Y("M Heat Exchanger"),...ie}),Preview:Ep,zIndex:W},yb={name:"Straight Tube Heat Exchanger",key:"heatExchangerStraightTube",Form:xe,Symbol:iC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Straight Tube Heat Exchanger"),...ie}),Preview:yp,zIndex:W},Sb={name:"Turbo Compressor",key:"turboCompressor",Form:ye,Symbol:p4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Turbo Compressor"),...Se}),Preview:bp,zIndex:W},Rb={name:"Roller Vane Compressor",key:"rollerVaneCompressor",Form:ye,Symbol:m4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Roller Vane Compressor"),...Se}),Preview:wp,zIndex:W},Cb={name:"Liquid Ring Compressor",key:"liquidRingCompressor",Form:ye,Symbol:f4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Liquid Ring Compressor"),...Se}),Preview:vp,zIndex:W},bb={name:"Ejector Compressor",key:"ejectorCompressor",Form:ye,Symbol:h4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ejector Compressor"),...Se}),Preview:kp,zIndex:W},wb={name:"Centrifugal Compressor",key:"centrifugalCompressor",Form:ye,Symbol:g4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Centrifugal Compressor"),...Se}),Preview:_p,zIndex:W},vb={name:"Diaphragm Pump",key:"diaphragmPump",Form:ye,Symbol:JR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Diaphragm Pump"),...Se}),Preview:Sp,zIndex:W},kb={name:"Ejection",key:"ejectionPump",Form:ye,Symbol:e4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ejection Pump"),...Se}),Preview:Rp,zIndex:W},_b={name:"Standard",key:"flameArrestor",Form:xe,Symbol:lC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor"),...ie}),Preview:Lp,zIndex:W},Lb={name:"Explosion-Proof",key:"flameArrestorExplosion",Form:xe,Symbol:aC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Explosion-Proof)"),...ie}),Preview:Mp,zIndex:W},Tb={name:"Detonation-Proof",key:"flameArrestorDetonation",Form:xe,Symbol:cC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Detonation-Proof)"),...ie}),Preview:Tp,zIndex:W},Mb={name:"Fire Resistant",key:"flameArrestorFireRes",Form:xe,Symbol:uC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Fire Resistant)"),...ie}),Preview:Np,zIndex:W},Nb={name:"Fire Resistant & Detonation-Proof",key:"flameArrestorFireResDetonation",Form:xe,Symbol:dC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Fire Resistant and Detonation-Proof)"),...ie}),Preview:Pp,zIndex:W},Pb={name:"Thruster",key:"thruster",Form:ye,Symbol:xC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Thruster"),...Se}),Preview:Ap,zIndex:W},Ab={name:"Nozzle",key:"nozzle",Form:xe,Symbol:pC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Nozzle"),...ie}),Preview:Op,zIndex:W},Ob={name:"Strainer",key:"strainer",Form:xe,Symbol:mC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Strainer"),...ie}),Preview:Ip,zIndex:W},Ib={name:"Cone",key:"strainerCone",Form:xe,Symbol:fC,defaultProps:e=>({color:e.colors.gray.l11,...Y("Strainer Cone"),...ie}),Preview:Dp,zIndex:W},Db={name:"Custom Actuator",key:"customActuator",Form:ye,Symbol:YR,defaultProps:e=>({color:e.colors.gray.l11,...Y("Custom Actuator"),...Se,specKey:"",stateOverrides:[]}),Preview:tx,zIndex:W},Bb={name:"Custom Static",key:"customStatic",Form:xe,Symbol:F4,defaultProps:e=>({color:e.colors.gray.l11,...Y("Custom Static"),...ie,specKey:"",stateOverrides:[]}),Preview:nx,zIndex:W},$b={value:I6,button:D6,tank:u6,polygon:d6,circle:x6,tJunction:ob,crossJunction:rb,switch:B6,offPageReference:eb,light:K6,setpoint:Y6,box:m6,textBox:J6,valve:QC,solenoidValve:JC,threeWayValve:qC,fourWayValve:e6,angledValve:t6,ballValve:n6,threeWayBallValve:s6,gateValve:o6,butterflyValveOne:r6,butterflyValveTwo:i6,breatherValve:l6,manualValve:v6,needleValve:N6,reliefValve:f6,angledReliefValve:O6,checkValve:P6,regulator:j6,regulatorManual:E6,electricRegulator:y6,electricRegulatorMotorized:S6,springLoadedReliefValve:h6,angledSpringLoadedReliefValve:g6,pump:a6,pistonPump:F6,screwPump:c6,cavityPump:V6,diaphragmPump:vb,ejectionPump:kb,vacuumPump:$6,compressor:z6,turboCompressor:Sb,rollerVaneCompressor:Rb,liquidRingCompressor:Cb,ejectorCompressor:bb,centrifugalCompressor:wb,staticMixer:H6,rotaryMixer:Z6,burstDisc:R6,isoBurstDisc:C6,cap:b6,isoCap:w6,filter:L6,isoFilter:_6,flowStraightener:T6,heaterElement:M6,orifice:A6,orificePlate:k6,agitator:G6,propellerAgitator:U6,flatBladeAgitator:W6,paddleAgitator:X6,crossBeamAgitator:q6,helicalAgitator:Q6,isoCheckValve:tb,checkValveWithArrow:nb,vent:sb,cylinder:p6,flowmeterGeneral:ib,flowmeterElectromagnetic:lb,flowmeterVariableArea:ab,flowmeterCoriolis:cb,flowmeterNozzle:ub,flowmeterVenturi:db,flowmeterRingPiston:xb,flowmeterPositiveDisplacement:pb,flowmeterTurbine:mb,flowmeterPulse:fb,flowmeterFloatSensor:hb,flowmeterOrifice:gb,heatExchangerGeneral:jb,heatExchangerM:Eb,heatExchangerStraightTube:yb,flameArrestor:_b,flameArrestorExplosion:Lb,flameArrestorDetonation:Tb,flameArrestorFireRes:Mb,flameArrestorFireResDetonation:Nb,thruster:Pb,nozzle:Ab,strainer:Ob,strainerCone:Ib,customActuator:Db,customStatic:Bb},zb=[{key:"general",Icon:f.Channel,name:"General",symbols:["value","setpoint","textBox","offPageReference","button","switch","light","polygon","circle","box"]},{key:"vessels",name:"Vessels",Icon:f.Tank,symbols:["tank","cylinder","tJunction","crossJunction"]},{key:"valves",name:"Valves",Icon:f.Valve,symbols:["valve","solenoidValve","threeWayValve","fourWayValve","angledValve","ballValve","threeWayBallValve","gateValve","butterflyValveOne","butterflyValveTwo","breatherValve","manualValve","needleValve","reliefValve","angledReliefValve","springLoadedReliefValve","angledSpringLoadedReliefValve","checkValve","isoCheckValve","checkValveWithArrow","regulator","regulatorManual","electricRegulator","electricRegulatorMotorized"]},{key:"pumps",name:"Pumps",Icon:f.Pump,symbols:["pump","screwPump","pistonPump","cavityPump","diaphragmPump","ejectionPump","vacuumPump","compressor","turboCompressor","rollerVaneCompressor","liquidRingCompressor","ejectorCompressor","centrifugalCompressor"]},{key:"meters",name:"Flow Meters",Icon:f.Rule,symbols:["flowmeterGeneral","flowmeterElectromagnetic","flowmeterVariableArea","flowmeterCoriolis","flowmeterNozzle","flowmeterVenturi","flowmeterRingPiston","flowmeterPositiveDisplacement","flowmeterTurbine","flowmeterPulse","flowmeterFloatSensor","flowmeterOrifice"]},{key:"process",name:"Process",Icon:f.Process,symbols:["heatExchangerGeneral","heatExchangerM","heatExchangerStraightTube","staticMixer","rotaryMixer","agitator","propellerAgitator","flatBladeAgitator","paddleAgitator","crossBeamAgitator","helicalAgitator"]},{key:"safety",name:"Safety",Icon:f.Safety,symbols:["burstDisc","isoBurstDisc","flameArrestor","flameArrestorDetonation","flameArrestorExplosion","flameArrestorFireRes","flameArrestorFireResDetonation"]},{key:"fittings",name:"Fittings",Icon:f.Fitting,symbols:["cap","isoCap","orifice","orificePlate","vent","nozzle","heaterElement","thruster","filter","isoFilter","strainer","strainerCone","flowStraightener"]}],Vb=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_KEY:iu,GROUPS:zb,REGISTRY:$b,STORE_CONFIG:lu,StateOverrideControls:cu,extractRegions:S0,formSchema:au,retrieve:zs,retrieveGroup:d0,useCustom:Vr,useDelete:u0,useForm:a0,useList:l0,useRename:c0,variantZ:KC},Symbol.toStringTag,{value:"Module"})),Fb=Object.freeze(Object.defineProperty({__proto__:null,DRAG_HANDLE_CLASS:no,Symbol:Vb},Symbol.toStringTag,{value:"Module"})),Yp=({children:e})=>{const{path:t}=f.useUnidirectional({type:O.BaseProvider.TYPE,schema:O.providerStateZ$2,state:{}});return r.jsxRuntimeExports.jsx(f.Composite,{path:t,children:e})},Hb=new Set([u.n.UUID,u.n.JSON]),Zb=e=>{if(e.equals(u.n.JSON))return r.jsxRuntimeExports.jsx(f.JSON,{});if(e.isInteger)return r.jsxRuntimeExports.jsx(f.Binary,{});if(e.isFloat)return r.jsxRuntimeExports.jsx(f.Decimal,{});if(e.equals(u.n.STRING)||e.equals(u.n.UUID))return r.jsxRuntimeExports.jsx(f.String,{});if(e.equals(u.n.TIMESTAMP))return r.jsxRuntimeExports.jsx(f.Time$1,{})},Gp=u.n.ALL.filter(e=>e!==u.n.UNKNOWN).map(e=>({key:e.toString(),name:Hb.has(e)?e.toString().toUpperCase():u.U.capitalize(e.toString()),icon:Zb(e)})),Kb=Gp.filter(e=>!new u.n(e.key).isVariable),Yb=({hideVariableDensity:e=!1,...t})=>{const n=e?Kb:Gp;return r.jsxRuntimeExports.jsx(An,{...t,data:n,resourceName:"Data Type"})},Gb=Object.freeze(Object.defineProperty({__proto__:null,Provider:Yp,SelectDataType:Yb},Symbol.toStringTag,{value:"Module"})),Up=e=>{const t=({disabled:n=!1,...s})=>n?s.children:r.jsxRuntimeExports.jsx(e,{...s});return t.displayName=e.displayName,t},Wp="workspaces",Ub={channel:L.pT.SET_CHANNEL_NAME,schema:L.pT.workspaceZ,onChange:({store:e,changed:t})=>e.workspaces.set(t.key,t)},Wb={channel:L.pT.DELETE_CHANNEL_NAME,schema:L.pT.keyZ,onChange:({store:e,changed:t})=>e.workspaces.delete(t)},Xp={listeners:[Ub,Wb]},Xb=Ye({name:"Workspace",retrieve:({params:e,client:t})=>t.workspaces.retrieve(e.key),mountListeners:({store:e,params:t,onChange:n})=>[e.workspaces.onSet(n,t.key)]}),qb=Ve({name:"Workspace",retrieve:async({client:e,params:t})=>await e.workspaces.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.workspaces.retrieve(t),mountListeners:({store:e,onChange:t,onDelete:n})=>[e.workspaces.onSet(s=>t(s.key,s)),e.workspaces.onDelete(n)]}),Qb=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:Xp,FLUX_STORE_KEY:Wp,retrieve:Xb,useList:qb},Symbol.toStringTag,{value:"Module"})),Jb=Up(Yp),e9=Up(f.Provider$4),qp={[O.FLUX_STORE_KEY]:O.FLUX_STORE_CONFIG,[Lc]:Tc,[Sc]:Rc,[hc]:gc,[kc]:_c,[Wp]:Xp,[Vc]:Hc,[Fc]:Zc,[Gc]:eu,[sc]:oc,[Uc]:nu,[iu]:lu,[mc]:fc},t9=({children:e,connParams:t,workerEnabled:n=!0,workerURL:s,theming:o,tooltip:i,triggers:l,alamos:a,haul:c,telem:d,color:x})=>r.jsxRuntimeExports.jsx(f.Provider$1,{...l,children:r.jsxRuntimeExports.jsx(f.Config,{...i,children:r.jsxRuntimeExports.jsx(f.Provider$2,{...c,children:r.jsxRuntimeExports.jsx(f.Provider$3,{url:s??Nj,enabled:n,children:r.jsxRuntimeExports.jsx(e9,{workerKey:"vis",children:r.jsxRuntimeExports.jsx(Mj,{...a,children:r.jsxRuntimeExports.jsx(f.Aggregator,{children:r.jsxRuntimeExports.jsx(Xa,{connParams:t,children:r.jsxRuntimeExports.jsx(Qa,{storeConfig:qp,children:r.jsxRuntimeExports.jsx(_e.Provider,{...x,children:r.jsxRuntimeExports.jsx(f.Provider,{...o,children:r.jsxRuntimeExports.jsx(Jb,{...d,children:r.jsxRuntimeExports.jsx(Hp,{children:e})})})})})})})})})})})})}),n9=Object.freeze(Object.defineProperty({__proto__:null,FLUX_STORE_CONFIG:qp,Provider:t9},Symbol.toStringTag,{value:"Module"})),s9=({value:e})=>r.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress"),children:r.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress-bar"),style:{width:`${e}%`}})}),o9=Object.freeze(Object.defineProperty({__proto__:null,Progress:s9},Symbol.toStringTag,{value:"Module"})),r9=({steps:e,value:t,onChange:n,...s})=>{const o=e.findIndex(i=>i.key===t);return r.jsxRuntimeExports.jsx(f.Box,{x:!0,align:"center",className:u.CSS.B("steps"),...s,children:e.map((i,l)=>r.jsxRuntimeExports.jsxs(j.Fragment,{children:[r.jsxRuntimeExports.jsxs(f.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:l>o,children:[l+1,". ",i.title]},i.key),l!==e.length-1&&r.jsxRuntimeExports.jsx(f.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l10)"}})]},i.key))})},i9=Object.freeze(Object.defineProperty({__proto__:null,Steps:r9},Symbol.toStringTag,{value:"Module"})),l9=({children:e,className:t,visible:n,...s})=>{const[{path:o},,i]=f.use$2({type:O.Table.TYPE,schema:O.Table.stateZ,initialState:{region:u.Ho.ZERO,visible:n}});j.useEffect(()=>{i(a=>({...a,visible:n}))},[n]);const l=On(a=>i(c=>({...c,region:a})));return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("div",{ref:l,style:{right:0,bottom:0,position:"absolute",top:6,left:6}}),r.jsxRuntimeExports.jsx("table",{className:u.CSS(u.CSS.B("table"),t),...s,children:r.jsxRuntimeExports.jsx("tbody",{children:r.jsxRuntimeExports.jsx(f.Composite,{path:o,children:e})})})]})},a9=({children:e,className:t,size:n,index:s,onResize:o,onSelect:i,position:l,...a})=>r.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),t),...a,children:[o!=null&&r.jsxRuntimeExports.jsx(Jp,{onSelect:i,index:s,value:n,onChange:o,position:l,direction:"y"}),e]}),ui=({ref:e,children:t,className:n,selected:s=!1,...o})=>r.jsxRuntimeExports.jsx("td",{ref:e,...o,className:u.CSS(u.CSS.BE("table","cell"),u.CSS.selected(s),n),children:t}),Qp="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c9=e=>Qp[e],Jp=({value:e,selected:t=!1,index:n,onChange:s,position:o,direction:i="x",onSelect:l})=>{const a=f.useSyncedRef(e),c=j.useRef(e),d=_e.useCursorDrag({onStart:j.useCallback(()=>{c.current=a.current},[]),onMove:j.useCallback(x=>s(c.current+u.Ho.dim(x,i,!0),n),[s,n])});return r.jsxRuntimeExports.jsxs("td",{id:`resizer-${i}-${n}`,className:u.CSS(u.CSS.BE("table","resizer"),u.CSS.dir(i),u.CSS.selected(t),f.CONTEXT_TARGET,t&&f.CONTEXT_SELECTED),style:{[u.p.dimension(i)]:e},onClick:()=>l(n),onContextMenu:()=>l(n),children:[r.jsxRuntimeExports.jsx(f.Text,{full:"x",justify:"center",align:"center",square:!1,children:i==="x"?Qp[n]:n+1}),r.jsxRuntimeExports.jsx("button",{onClick:x=>x.stopPropagation(),style:{[u.p.location(i)]:o+e},onDragStart:d,draggable:!0})]})},u9=({selected:e,onSelect:t,columns:n,onResize:s})=>{let o=15;return r.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),u.CSS.BE("table","col-resizer")),children:[r.jsxRuntimeExports.jsx("td",{}),n.map((i,l)=>{const a=o;return o+=i,r.jsxRuntimeExports.jsx(Jp,{onSelect:t,position:a,selected:e.includes(l),index:l,value:i,onChange:c=>s(c,l),direction:"x"},l)})]})},d9=Object.freeze(Object.defineProperty({__proto__:null,Cell:ui,ColumnIndicators:u9,Row:a9,Table:l9,getCellColumn:c9},Symbol.toStringTag,{value:"Module"})),x9="text",em=ne.z.object({value:ne.z.string(),level:L.levelZ,weight:L.weightZ,align:u.K$1.x.or(u.K$1.center),backgroundColor:u.fr.crudeZ}),tm=({cellKey:e,onChange:t,value:n,selected:s,onSelect:o,align:i,level:l,weight:a,backgroundColor:c})=>{const d=p=>o(e,p),x=p=>t({level:l,value:p,weight:a,align:i,backgroundColor:c});return r.jsxRuntimeExports.jsx(ui,{id:e,className:u.CSS(f.CONTEXT_TARGET,s&&f.CONTEXT_SELECTED,u.CSS.BEM("table","cell","text")),selected:s,onClick:d,onContextMenu:d,style:{backgroundColor:u.fr.cssString(c)},children:r.jsxRuntimeExports.jsx(f.Editable,{level:l,value:n,weight:a,onChange:x,style:{justifyContent:i},allowEmpty:!0,outline:!1})})},p9="value",nm=ne.z.object({telem:O.stringSourceSpecZ,redline:du,level:L.levelZ,color:ne.z.string(),units:ne.z.string(),stalenessTimeout:ne.z.number().optional().default(5),stalenessColor:u.fr.colorZ.optional().default(u.fr.ZERO)}),sm=({cellKey:e,telem:t,level:n,color:s,redline:{gradient:o,bounds:i},selected:l,box:a,onSelect:c,stalenessTimeout:d,stalenessColor:x})=>{const{width:p}=Zr({aetherKey:e,box:a,telem:t,level:n,color:s,stalenessTimeout:d,stalenessColor:x,backgroundTelem:O.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:t,scale:O.scaleNumber({scale:u.C.Scale.scale(i).scale(0,1).transform}),gradient:O.colorGradient({gradient:o})},outlet:"gradient"}),location:{x:"center",y:"center"}}),m=h=>c(e,h);return r.jsxRuntimeExports.jsx(ui,{id:e,selected:l,onClick:m,onContextMenu:m,style:{height:"5rem",width:p},className:u.CSS(f.CONTEXT_TARGET,l&&f.CONTEXT_SELECTED,u.CSS.BEM("table","cell","value"))})},m9={padding:"2rem"},Lo=e=>r.jsxRuntimeExports.jsx(f.Box,{...e,style:m9,y:!0}),f9=[{tabKey:"style",name:"Style"},{tabKey:"telem",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],om=({onVariantChange:e})=>{const t=j.useCallback(({tabKey:s})=>{switch(s){case"telem":return r.jsxRuntimeExports.jsx(Lo,{children:r.jsxRuntimeExports.jsx(Hr,{path:""})});case"redline":return r.jsxRuntimeExports.jsx(Lo,{children:r.jsxRuntimeExports.jsx(Fr,{path:"redline"})});default:return r.jsxRuntimeExports.jsx(Lo,{children:r.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[r.jsxRuntimeExports.jsx(Ae.Item,{label:"Variant",padHelpText:!1,children:r.jsxRuntimeExports.jsx(di,{onChange:e,value:"value"})}),r.jsxRuntimeExports.jsx(ge,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,path:"color",children:({value:o,onChange:i,variant:l,...a})=>r.jsxRuntimeExports.jsx(_e.Swatch,{value:o??u.fr.setAlpha(u.fr.ZERO,1),onChange:i,...a,bordered:!0})}),r.jsxRuntimeExports.jsx(ge,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:o,onChange:i,variant:l,...a})=>r.jsxRuntimeExports.jsx(ln,{value:o,onChange:i,...a})})]})})}},[]),n=Me.useStatic({tabs:f9,content:t});return r.jsxRuntimeExports.jsx(Me.Tabs,{...n})},h9={padding:"2rem"},rm=({onVariantChange:e})=>r.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,style:h9,children:[r.jsxRuntimeExports.jsx(Ae.Item,{label:"Variant",padHelpText:!1,children:r.jsxRuntimeExports.jsx(di,{onChange:e,value:"text"})}),r.jsxRuntimeExports.jsx(wr,{path:"value",label:"Text"}),r.jsxRuntimeExports.jsx(ge,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:t,onChange:n,variant:s,...o})=>r.jsxRuntimeExports.jsx(ln,{value:t,onChange:n,...o})}),r.jsxRuntimeExports.jsx(ge,{path:"weight",label:"Weight",padHelpText:!1,children:({value:t,onChange:n,variant:s,...o})=>r.jsxRuntimeExports.jsx(Ea,{value:t,onChange:n,...o})}),r.jsxRuntimeExports.jsx(ge,{path:"align",label:"Alignment",hideIfNull:!0,children:({value:t,onChange:n,variant:s,...o})=>r.jsxRuntimeExports.jsx(pe.SelectAlignment,{value:t,onChange:n,...o})}),r.jsxRuntimeExports.jsx(ge,{path:"backgroundColor",label:"Background",align:"start",padHelpText:!1,children:({value:t,onChange:n})=>r.jsxRuntimeExports.jsx(_e.Swatch,{value:t,onChange:n})})]}),g9=[{key:"text",name:"Text",icon:r.jsxRuntimeExports.jsx(f.Text$3,{})},{key:"value",name:"Value",icon:r.jsxRuntimeExports.jsx(f.Channel,{})}],di=e=>r.jsxRuntimeExports.jsx(An,{...e,data:g9,resourceName:"Variant"}),j9=["text","value"],E9=ne.z.enum(j9),y9={key:"value",name:"Value",Form:om,Cell:sm,defaultProps:e=>({telem:O.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:O.streamChannelValue({channel:0}),rollingAverage:O.rollingAverage({windowSize:1}),stringifier:O.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"}),redline:vn,color:u.fr.hex(e.colors.gray.l10),level:"h5",units:"",stalenessTimeout:5,stalenessColor:e.colors.warning.m1}),schema:nm},S9={key:"text",name:"Text",Form:rm,Cell:tm,defaultProps:()=>({value:"",level:"h5",units:"",weight:400,align:"center",backgroundColor:"#00000000"}),schema:em},R9={text:S9,value:y9},C9=Object.freeze(Object.defineProperty({__proto__:null,CELLS:R9,SelectVariant:di,TEXT_TYPE:x9,Text:tm,TextForm:rm,VALUE_TYPE:p9,Value:sm,ValueForm:om,textPropsZ:em,valuePropsZ:nm,variantZ:E9},Symbol.toStringTag,{value:"Module"})),Zl=({sourcePos:e,targetPos:t,next:n,prev:s})=>{const o=bt(e,...n);return u.K.distance(o,t)<1?!0:(console.warn("Connector is out of sync with target"),console.log("Theoretical target",o),console.log("Actual target",t),console.log("Segments",n),console.log("Prev segments",s),!1)},Kl=({sourceStumpTip:e,sourceOrientation:t,sourceBox:n,targetStumpTip:s,targetOrientation:o,targetBox:i})=>{if(!b9({sourcePos:e,sourceOrientation:t,targetPos:s}))return;const l=u.p.construct(t),a=u.p.swap(l);let c=vt(a,s[a]-e[a]);const d=u.Ho.loc(n,c);if(u.K$1.swap(t)===o){const x=u.Ho.loc(i,u.K$1.swap(c));Math.abs(d-x)<De&&(c=u.K$1.swap(c))}return{direction:a,length:d-e[a]+Ot(c,De)}},tr=ne.z.object({direction:u.p.direction,length:ne.z.number()}),bt=(e,...t)=>{let n=e;for(const s of t)n=u.K.translate(n,s.direction,s.length);return n},im=(e,t,n,s)=>{try{let o=e;const i=[e,...t.map(h=>(o=u.K.translate(o,h.direction,h.length),o))];if(!s)return i;const l=t[0],a=vt(l.direction,l.length),c=Yl(a),d=4*(2-n**.5);i[0]=u.K.translate(i[0],{[l.direction]:-1*c*d,[u.p.swap(l.direction)]:0});const x=t[t.length-1],p=vt(x.direction,x.length),m=Yl(p);return i[i.length-1]=u.K.translate(i[i.length-1],{[x.direction]:m*d,[u.p.swap(x.direction)]:0}),i}catch{return[]}},De=10,Yl=e=>e==="top"||e==="left"?-1:1,Ot=(e,t)=>e==="top"||e==="left"?-t:t,vt=(e,t)=>e==="x"?t>0?"right":"left":t>0?"bottom":"top",ht=e=>vt(e.direction,e.length),b9=({sourcePos:e,targetPos:t,sourceOrientation:n})=>{const s=u.p.construct(n),o=t[s]-e[s];return Ot(n,o)<0},rs=e=>({direction:u.p.construct(e),length:Ot(e,De)}),Gl={top:rs("top"),bottom:rs("bottom"),left:rs("left"),right:rs("right")},w9=4,v9=.25,so=e=>nr(k9(nr(e))),k9=e=>{const t=[...e],n=e.findIndex((s,o)=>{const i=Math.abs(s.length);if(i<w9){if(o===0||o===e.length-1)return!1;if(i<v9)return!0;if(e.length<=3)return!1;if(o+2<e.length){const l=t[o+2];if(l.direction!==s.direction)return!1;t[o+2]={...l,length:l.length+s.length}}else{const l=t[o-2];if(l.direction!==s.direction)return!1;t[o-2]={...l,length:l.length+s.length}}return!0}return!1});return n!==-1&&t.splice(n,1),t},nr=e=>{const t=[...e];return e.findIndex((s,o)=>{const i=t[o-1];if(o===0||s.direction!==i.direction)return!1;if(o===1){const l=o-1,a=o,c=ht(i),d=ht(s);if(c===d)return t[o-1]={direction:t[o-1].direction,length:t[o-1].length+t[o].length},t.splice(o,1),!0;if(Math.abs(i.length)===De)return!1;const x=Ot(c,De),p=t[l].length-x,m=t[a].length+p;return Math.abs(m)<De?!1:(t[l]={...t[l],length:x},t[a]={...t[a],length:m},!0)}if(o===e.length-1){const l=o,a=o-1,c=ht(s),d=ht(i);if(c===d)return t[o-1]={direction:t[o-1].direction,length:t[o-1].length+t[o].length},t.splice(o,1),!0;if(Math.abs(s.length)===De)return!1;const x=Ot(c,De),p=t[l].length-x,m=t[a].length+p;return Math.abs(m)<De?!1:(t[l]={...t[l],length:x},t[a]={...t[a],length:m},!0)}return t[o-1]={direction:t[o-1].direction,length:t[o-1].length+t[o].length},t.splice(o,1),!0})!==-1?nr(t):t},Yt=e=>so(_9(e)),_9=({sourceBox:e,targetBox:t,sourcePos:n,targetPos:s,targetOrientation:o,sourceOrientation:i})=>{let l=i,a=o,c={...Gl[i]},d=bt(n,c);const x={...Gl[o]};let p=bt(s,x);const m=Math.abs(d.x-p.x),h=Math.abs(d.y-p.y);m<2*De&&h<10&&(c.length-=m/2,x.length+=m/2,d=bt(n,c),p=bt(s,x));const g=[c],E=Kl({sourceStumpTip:d,sourceOrientation:i,sourceBox:e,targetStumpTip:p,targetOrientation:o,targetBox:t});E!=null&&(g.push(E),d=bt(d,E),l=ht(E),c=E);const S=Kl({sourceStumpTip:p,sourceOrientation:a,sourceBox:t,targetStumpTip:d,targetOrientation:l,targetBox:e});S!=null&&(p=bt(p,S),a=vt(S.direction,S.length));const R=()=>{S!=null&&(S.length*=-1,g.push(S)),x.length*=-1,g.push(x)};if(u.K$1.swap(l)===o){const P=u.p.construct(l),I=(p[P]-d[P])/2;g.push({direction:P,length:I});const B=u.p.swap(P);return g.push({direction:B,length:p[B]-d[B]}),g.push({direction:P,length:I}),R(),g}const v=p[c.direction]-d[c.direction];let y=u.p.swap(c.direction);const C=d[y]-p[y];let k;vt(c.direction,v)===l&&vt(y,C)===a?k={direction:c.direction,length:v}:(k={direction:y,length:p[y]-d[y]},y=u.p.swap(y)),g.push(k);const T={direction:y,length:p[y]-d[y]};return g.push(T),R(),g},L9=e=>so(T9(e)),T9=({segments:e,index:t,magnitude:n})=>{const s=[...e],o=s[t],i=u.p.swap(o.direction),l=ht(o);if(t===0){s.unshift({direction:i,length:n});const a=Ot(l,De);s.unshift({direction:o.direction,length:a}),t+=2,s[t]={...s[t],length:s[t].length-a}}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 a=Ot(l,De);s.push({direction:o.direction,length:a}),s[t]={...s[t],length:s[t].length-a}}else s[t+1]={direction:s[t+1].direction,length:s[t+1].length-n};return s},M9=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1},N9=(e,t,n=!1,...s)=>{const o=(i,l)=>!s.includes(l)&&t(i,l);return n?M9(e,o):e.findIndex(o)},P9=({delta:e,segments:t})=>so(lm(e,t,!1)),A9=({delta:e,segments:t})=>so(lm(e,t,!0)),lm=(e,t,n)=>{let s=[...t];return e.x!==0&&(s=Wl("x",e,s,n)),e.y!==0&&(s=Wl("y",e,s,n)),s},Ul=(e,t,n)=>{if(t.direction!==e)return!1;const s={...t,length:t.length-n[e]},o=ht(t),i=ht(s),l=Math.abs(s.length),a=Math.abs(t.length);return(l>a||l>De)&&o===i},Wl=(e,t,n,s)=>{const o=u.p.swap(e),i=s?n.length-1:0,l=n[i];if(Ul(e,l,t)){const p=n[n.length-1];return p.direction===e&&Math.abs(l.length)<De?(n[n.length-1]={...p,length:p.length-t[e]},n):(n[i]={...l,length:l.length-t[e]},n)}const a=s?0:n.length-1,d=N9(n,p=>p.direction===e,s,i);if(d===a){const p=n[a];return Ul(e,p,t)?(n[a]={...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[a]={...p,length:p.length-t[e]},n)}if(d===-1)return n.length===1?n[0].direction===e?[{direction:e,length:n[0].length-t[e]}]:[{direction:o,length:n[0].length/2},{direction:e,length:-t[e]},{direction:o,length:n[0].length/2}]:l.direction===e?(n[i]={...l,length:l.length-t[e]},n):[{direction:o,length:n[0].length},{direction:e,length:-t[e]},...n.slice(1)];const x=n[d];return n[d]={...x,length:x.length-t[e]},n},O9=ne.z.object({position:u.K.xy,zoom:ne.z.number()}),am=ne.z.object({color:u.fr.crudeZ,variant:ne.z.string().optional(),segments:ne.z.array(tr)}),I9=am.extend({key:ne.z.string(),source:ne.z.string(),target:ne.z.string(),segments:ne.z.array(tr),color:u.fr.crudeZ,id:ne.z.string(),data:ne.z.object({segments:ne.z.array(tr),color:u.fr.crudeZ,variant:ne.z.string().optional()}).optional(),selected:ne.z.boolean(),sourceHandle:ne.z.string().nullable().optional(),targetHandle:ne.z.string().nullable().optional()}),D9=ne.z.object({key:ne.z.string(),position:u.K.xy,selected:ne.z.boolean().optional(),zIndex:ne.z.number().optional(),type:ne.z.string().optional(),data:u.l$1.unknownZ.optional(),measured:ne.z.object({width:ne.z.number().optional(),height:ne.z.number().optional()}).optional()}),xi=(e,t)=>e.map(n=>({id:n.key,type:"custom",zIndex:n.zIndex,measured:{...n.measured},position:{...n.position},selected:n.selected,data:{},dragHandle:t})),pi=e=>e.map(({segments:t,color:n,variant:s,...o})=>({...o,id:o.key,data:{segments:t,color:n,variant:s}})),cm=e=>e.map(t=>({key:t.id,...t})),um=(e,t)=>e.map(n=>(n.data??={segments:[],color:t,variant:"pipe"},{key:n.id,segments:n.data?.segments??[],selected:n.selected??!1,color:n.data?.color??t,variant:n.data?.variant??"pipe",...n})),dm=e=>({...e.position,zoom:e.zoom}),xm=e=>({position:u.K.construct(e),zoom:e.zoom}),pm=(e,t)=>cm(t(xi(e))),xs=(e,t,n)=>um(t(pi(e)),n),B9=(e,t="x")=>{if(e.length===0)return[];const n=u.K$1.construct(t),s=u.K$1.swap(n);return e.sort((o,i)=>u.Ho.loc(o.box,n)-u.Ho.loc(i.box,n)),e.forEach((o,i)=>{if(i===0)return;const a=e[i-1].handles.find(h=>h.orientation===s),c=o.handles.find(h=>h.orientation===n);if(a==null||c==null)return;const d=a.absolutePosition,x=c.absolutePosition,p=u.K.set(u.K.translation(x,d),t,0),m=u.K.translate(u.Ho.topLeft(o.box),p);o.box=u.Ho.construct(m,u.Ho.dims(o.box))}),e},$9=(e,t)=>e.map((n,s)=>u.K.translate(n,t[s])),mm=({points:e,color:t,...n})=>r.jsxRuntimeExports.jsx(qe,{path:jt(e),style:{stroke:u.fr.cssString(t)},...n}),z9=({points:e,color:t,...n})=>r.jsxRuntimeExports.jsx(qe,{path:jt(e),style:{stroke:u.fr.cssString(t),strokeDasharray:"12,4"},...n}),V9=({points:e,color:t,...n})=>r.jsxRuntimeExports.jsx(qe,{path:jt(e),style:{stroke:u.fr.cssString(t),strokeDasharray:"12,4,4"},...n}),F9=({points:e,color:t,...n})=>{const s=u.K.calculateMiters(e,6),o=e.map((c,d)=>u.K.translate(c,s[d])),i=e.map((c,d)=>u.K.translate(c,u.K.scale(s[d],-1))),l=u.fr.cssString(t),a=.7;return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(qe,{path:jt(o),style:{stroke:l,opacity:a},...n}),r.jsxRuntimeExports.jsx(qe,{path:jt(e),style:{stroke:l},...n}),r.jsxRuntimeExports.jsx(qe,{path:jt(i),style:{stroke:l,opacity:a},...n})]})},Xl=5,H9=(e,t)=>{const n=[],s=[];for(let a=0;a<e.length-1;a++){const c=u.K.distance(e[a],e[a+1]);s.push(c)}const o=t;let i=0,l=o;for(let a=0;a<s.length;a++){const c=s[a],d=e[a],x=e[a+1];for(;i+c>=l;){const p=(l-i)/c,m={x:d.x+p*(x.x-d.x),y:d.y+p*(x.y-d.y)};let h="x";Math.abs(x.x-d.x)<1&&(h="y"),l+=o,!(u.K.distance(m,x)<Xl||u.K.distance(m,d)<Xl)&&n.push({position:m,direction:h})}i+=c}return n},Z9=({color:e,position:t,direction:n})=>{const o="M0,0 L0,-10 L10,-10";return n==="x"?t.y+=10/2:t.x+=10/2,r.jsxRuntimeExports.jsx("path",{d:o,stroke:u.fr.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(270)`,strokeLinecap:"round"})},K9=({color:e,position:t,direction:n})=>{const o="M0,0 L0,-10";n==="x"?t.y+=10/3:t.x-=10/3;let i=u.K.translateX(t,-10),l=45;return n==="y"&&(i=u.K.translateY(t,-10),l+=90),r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("path",{d:o,stroke:u.fr.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(${l})`,strokeLinecap:"round"}),r.jsxRuntimeExports.jsx("path",{d:o,stroke:u.fr.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${i.x},${i.y}) rotate(${l})`,strokeLinecap:"round"})]})},Y9=({color:e,position:t})=>r.jsxRuntimeExports.jsx("circle",{cx:t.x,cy:t.y,r:3,fill:"var(--pluto-gray-l0)",stroke:u.fr.cssString(e),strokeWidth:2}),mi=e=>{const t=({points:n,color:s,...o})=>{const i=jt(n),l=H9(n,40);return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(qe,{path:i,...o,style:{stroke:u.fr.cssString(s)}}),l.map(({position:a,direction:c},d)=>r.jsxRuntimeExports.jsx(e,{position:a,direction:c,color:s},d))]})};return t.displayName=`SymbolLine(${e.displayName})`,t},G9=mi(Z9),U9=mi(K9),W9=mi(Y9),jt=e=>{let t="";const s=e.length+-1;for(let o=0;o<s;o++){const i=e[o%e.length],l=e[(o+1)%e.length],a=Math.min(6/Math.hypot(l.x-i.x,l.y-i.y),.5);o>0&&(t+=`Q${i.x},${i.y} ${i.x*(1-a)+l.x*a},${i.y*(1-a)+l.y*a}`),o===0?t+=`M${i.x},${i.y}`:o===0&&(t+=`M${i.x*(1-a)+l.x*a},${i.y*(1-a)+l.y*a}`),o===s-1?t+=`L${l.x},${l.y}`:o<s-1&&(t+=`L${i.x*a+l.x*(1-a)},${i.y*a+l.y*(1-a)}`)}return t},fm={pipe:mm,electric:z9,secondary:V9,jacketed:F9,hydraulic:G9,pneumatic:U9,data:W9},hm=mm,X9=[{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"}],q9=e=>r.jsxRuntimeExports.jsx(An,{data:X9,...e,resourceName:"Path Type"}),Q9=({fromX:e,fromY:t,toX:n,toY:s,fromPosition:o,toPosition:i,fromNode:l,connectionLineStyle:a,connectionStatus:c})=>{const x=document.querySelector(".react-flow__handle-connecting")?.className.match(/react-flow__handle-(\w+)/);if(x!=null){const g=u.K$1.outer.safeParse(x[1]);g.success&&(i=g.data)}const p=zt(),m=Yt({sourcePos:u.K.construct(e,t),targetPos:u.K.construct(n,s),sourceOrientation:o,targetOrientation:i,sourceBox:Ie(p,l?.id??""),targetBox:Ie(p,l?.id??"")}),h=im(u.K.construct(e,t),m,p.getZoom(),!1);return r.jsxRuntimeExports.jsx(hm,{points:h,style:{...a,stroke:u.fr.cssString(c==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l11)"),strokeWidth:2,fill:"none"}})},J9=({id:e,source:t,target:n,sourcePosition:s,targetHandleId:o,targetPosition:i,style:l,segments:a=[],onSegmentsChange:c,color:d="var(--pluto-gray-l11)",selected:x=!1,variant:p="pipe",...m})=>{const h=u.K.construct(m.sourceX,m.sourceY),g=j.useRef(h),E=u.K.equals(h,g.current),S=u.K.construct(m.targetX,m.targetY),R=j.useRef(S),v=u.K.equals(S,R.current),y=zt(),[C,k,T]=f.useCombinedStateAndRef(()=>a.length>0?a:Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ie(y,t),targetBox:Ie(y,n)})),P=j.useRef(i),I=j.useRef(s),B=_e.useDebouncedCallback(c,100,[c]);if(!E||!v){let b=C;const N=u.K.translation(g.current,h),_=u.K.translation(S,R.current);u.K.equals(N,u.K.scale(_,-1),.001)?(g.current=h,R.current=S):(E?v||(b=A9({delta:_,segments:b}),P.current!==i&&(P.current=i,b=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ie(y,t),targetBox:Ie(y,n)})),Zl({sourcePos:h,targetPos:S,next:b,prev:C})||(b=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ie(y,t),targetBox:Ie(y,n)})),R.current=S):(b=P9({delta:N,segments:b}),I.current!==s&&(I.current=s,b=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ie(y,t),targetBox:Ie(y,n)})),Zl({sourcePos:h,targetPos:S,next:b,prev:C})||(b=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Ie(y,t),targetBox:Ie(y,n)})),g.current=h),B(b),k(b))}const F=j.useRef(null),$=_e.useCursorDrag({onStart:j.useCallback((b,N,_)=>{F.current={index:Number(_.currentTarget.id.split("-")[1]),segments:[...T.current]}},[]),onMove:j.useCallback(b=>{if(F.current==null)return;const N=L9({segments:F.current.segments,index:F.current.index,magnitude:u.Ho.dim(b,u.p.swap(F.current.segments[F.current.index].direction),!0)/y.getZoom()});k(N)},[]),onEnd:j.useCallback(()=>c(T.current),[c])}),D=im(h,C,y.getZoom(),!0),z=fm[p];return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(z,{points:D,color:d}),x&&e7(D).map((b,N)=>{const _=C[N].direction,M=u.p.swap(_),V={[u.p.dimension(_)]:"18px",[u.p.dimension(M)]:"4px"},H={[_]:b[_]-9,[M]:b[M]-2};return r.jsxRuntimeExports.jsxs(j.Fragment,{children:[r.jsxRuntimeExports.jsx("rect",{className:u.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...V,...H,rx:"2px",ry:"2px"}),r.jsxRuntimeExports.jsx("foreignObject",{x:b.x-9,y:b.y-9,width:"18px",height:"18px",children:r.jsxRuntimeExports.jsx("div",{id:`handle-${N}`,className:u.CSS(u.CSS.BE("diagram-edge-handle","dragger"),u.CSS.dir(_)),draggable:!0,onDragStart:$})})]},N)})]})},e7=e=>e.slice(1).map((t,n)=>{const s=e[n];return u.K.construct((t.x+s.x)/2,(t.y+s.y)/2)}),t7=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:s={position:u.K.ZERO,zoom:1}})=>{const[o,i]=j.useState(n),[l,a]=j.useState("select"),[c,d]=j.useState(e),[x,p]=j.useState(t),[m,h]=j.useState(s),[g,E]=j.useState(!1);return{viewport:m,onViewportChange:h,edges:x,nodes:c,onNodesChange:d,onEdgesChange:p,editable:o,onEditableChange:i,fitViewOnResize:g,setFitViewOnResize:E,viewportMode:l,onViewportModeChange:a}},n7=()=>!0,s7={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1,nodeClickDistance:5,reconnectRadius:15,connectionRadius:30},o7={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},sr={maxZoom:1,minZoom:.5,padding:.05},r7={hideAttribution:!0},gm=j.createContext({editable:!0,visible:!0,viewportMode:"select",onViewportModeChange:()=>{},onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),cn=()=>j.use(gm),jm=j.memo(({children:e})=>{const{registerNodeRenderer:t}=cn();return j.useEffect(()=>t(e),[t,e]),null});jm.displayName="NodeRenderer";const i7=["Backspace","Delete"],l7={panOnDrag:[f.MOUSE_LEFT_NUMBER,f.MOUSE_MIDDLE_NUMBER]},a7={selectionOnDrag:!0,panOnDrag:[f.MOUSE_MIDDLE_NUMBER]},c7=e=>e==="pan"?l7:a7,u7=({aetherKey:e,onNodesChange:t,onEdgesChange:n,nodes:s,edges:o,onEditableChange:i,editable:l,viewport:a,triggers:c,onViewportChange:d,fitViewOnResize:x,setFitViewOnResize:p,visible:m,dragHandleSelector:h,viewportMode:g,onViewportModeChange:E,...S})=>{const R=f.useMemoDeepEqual({visible:m}),[{path:v},,y]=f.use$2({aetherKey:e,type:O.Diagram$1.TYPE,schema:O.diagramStateZ,initialState:{position:a.position,region:u.Ho.ZERO,zoom:a.zoom,...R}}),{fitView:C}=zt(),k=_e.useDebouncedCallback(X=>void C(X),50,[C]),T=On(j.useCallback(X=>{x&&k(sr),y(de=>({...de,region:X}))},[y,k,x]));j.useEffect(()=>y(X=>({...X,...R})),[R]);const P=u.fr.hex(f.use().colors.gray.l11),I=f.useMemoCompare(()=>c??Er.zoom,f.compareModeConfigs,[c]),B=j.useRef(null),F=j.useCallback(X=>{const de=B.current;de!=null&&de.x===X.x&&de.y===X.y&&de.zoom===X.zoom||(B.current=X,!(isNaN(X.x)||isNaN(X.y)||isNaN(X.zoom))&&(y(we=>({...we,position:X,zoom:X.zoom})),d(xm(X))))},[y,d]);WS({onStart:F,onChange:F,onEnd:F});const[$,D]=j.useState(()=>()=>null),z=j.useCallback(X=>D(()=>X),[]),b=j.useMemo(()=>({custom:({id:X,positionAbsoluteX:de,positionAbsoluteY:we,selected:Pe=!1,draggable:et=!0})=>$({symbolKey:X,position:{x:de,y:we},selected:Pe,draggable:et})}),[$]),N=j.useRef(o),_=j.useMemo(()=>(N.current=o,pi(o)),[o]),M=j.useRef(s),V=j.useMemo(()=>(M.current=s,xi(s,h)),[s,h]),H=j.useCallback(X=>t(pm(M.current,de=>Sd(X,de)),X),[t]),K=j.useCallback(X=>n(xs(N.current,de=>Rd(X,de),P)),[n,P]),Z=j.useCallback((X,de)=>n(xs(N.current,we=>fy(X,de,we),P)),[]),G=j.useCallback(X=>n(xs(N.current,de=>nd(X,de),P)),[n,P]),Q=j.useCallback((X,de)=>{const we=[...N.current],Pe=we.findIndex(et=>et.key===X);Pe!==-1&&(we[Pe]={...we[Pe],segments:de},N.current=we,n(we))},[n]),ee=l?s7:o7,ae=f.useSyncedRef(Q),re=j.useMemo(()=>({default:X=>r.jsxRuntimeExports.jsx(J9,{...X,segments:X.data?.segments??[],color:X.data?.color,variant:X.data?.variant,onSegmentsChange:j.useCallback(de=>ae.current(X.id,de),[X.id])},X.id)}),[]),se=j.useRef(null);f.use$1({triggers:I.zoomReset,callback:j.useCallback(({stage:X,cursor:de})=>{const we=se.current;we==null||X!=="start"||!u.Ho.contains(we,de)||C()},[C])});const te=f.purgeMouse(I.select)[0]??null,le=f.purgeMouse(I.pan)[0]??null,Re=f.purgeMouse(I.zoom)[0]??null,Ce={selectionOnDrag:te==null,panOnDrag:le==null,selectionKeyCode:te,panActivationKeyCode:le,zoomActivationKeyCode:Re},ue=f.useCombinedRefs(se,T),me=j.useMemo(()=>({visible:m,editable:l,onEditableChange:i,registerNodeRenderer:z,fitViewOnResize:x,setFitViewOnResize:p,viewportMode:g,onViewportModeChange:E}),[l,m,i,z,x,g,E]);return r.jsxRuntimeExports.jsx(gm,{value:me,children:r.jsxRuntimeExports.jsx(f.Composite,{path:v,children:m&&r.jsxRuntimeExports.jsx(GS,{...Ce,className:u.CSS(u.CSS.B("diagram"),u.CSS.editable(l),u.CSS.BE("symbol","container")),nodes:V,edges:_,nodeTypes:b,edgeTypes:re,ref:ue,fitView:!0,onNodesChange:H,onEdgesChange:K,onConnect:G,onReconnect:Z,defaultViewport:dm(a),connectionLineComponent:Q9,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:n7,connectionMode:Pt.Loose,fitViewOptions:sr,selectionMode:tn.Partial,proOptions:r7,deleteKeyCode:i7,...S,style:{[u.CSS.var("diagram-zoom")]:a.zoom,...S.style},...ee,...c7(g),nodesDraggable:l})})})},d7=()=>{const{editable:e}=cn();return e?r.jsxRuntimeExports.jsx(eR,{}):null},x7=e=>r.jsxRuntimeExports.jsx(f.Box,{x:!0,className:u.CSS.BE("diagram","controls"),...e}),or=u.K$1.BOTTOM_LEFT,p7=({onClick:e,...t})=>{const{editable:n,onEditableChange:s}=cn();return r.jsxRuntimeExports.jsx(na.Toggle,{onChange:()=>s(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:or,size:"small",tooltip:`${n?"Disable":"Enable"} editing`,...t,children:n?r.jsxRuntimeExports.jsx(f.EditOff,{}):r.jsxRuntimeExports.jsx(f.Edit,{})})},m7=({onClick:e,...t})=>{const{fitView:n}=zt(),{fitViewOnResize:s,setFitViewOnResize:o}=cn();return r.jsxRuntimeExports.jsx(na.Toggle,{onClick:i=>{n(sr),e?.(i)},value:s,onChange:o,rightClickToggle:!0,tooltip:r.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:u.K$1.BOTTOM_LEFT,size:"small",...t,children:r.jsxRuntimeExports.jsx(f.Expand,{})})},Em=["zoom","pan","select"],f7=[["MouseMiddle"]],h7=[["MouseLeft"]],g7=()=>{const{viewportMode:e,onViewportModeChange:t}=cn();return r.jsxRuntimeExports.jsxs(pe.Buttons,{keys:Em,value:e,onChange:t,children:[r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"pan",size:"small",tooltip:r.jsxRuntimeExports.jsx(Wt,{mode:"pan",triggers:f7}),tooltipLocation:or,children:r.jsxRuntimeExports.jsx(f.Pan,{})}),r.jsxRuntimeExports.jsx(pe.Button,{itemKey:"select",size:"small",tooltip:r.jsxRuntimeExports.jsx(Wt,{mode:"select",triggers:h7}),tooltipLocation:or,children:r.jsxRuntimeExports.jsx(f.Selection,{})})]})},j7=e=>r.jsxRuntimeExports.jsx(Gd,{children:r.jsxRuntimeExports.jsx(u7,{...e})}),E7=Object.freeze(Object.defineProperty({__proto__:null,Background:d7,Controls:x7,DefaultPath:hm,Diagram:j7,FitViewControl:m7,HandleLayout:Bp,NodeLayout:to,NodeRenderer:jm,PATHS:fm,SelectPathType:q9,SelectViewportModeControl:g7,ToggleEditControl:p7,VIEWPORT_MODES:Em,alignNodes:B9,calcPath:jt,edgeConverter:xs,edgeZ:I9,nodeConverter:pm,nodeZ:D9,offsetPath:$9,rfEdgeDataZ:am,selectNode:eo,selectNodeBox:Ie,selectNodeLayout:MR,translateEdgesBackward:um,translateEdgesForward:pi,translateNodesBackward:cm,translateNodesForward:xi,translateViewportBackward:xm,translateViewportForward:dm,use:t7,useContext:cn,viewportZ:O9},Symbol.toStringTag,{value:"Module"})),y7=({aetherKey:e,font:t,className:n,visible:s=!0,emptyContent:o=r.jsxRuntimeExports.jsx(f.Summary,{center:!0,level:"h3",variant:"disabled",hideIcon:!0,children:"Empty Log"}),color:i,telem:l,...a})=>{const c=f.useMemoDeepEqual({font:t,color:i,telem:l,visible:s}),[,{scrolling:d,empty:x},p]=f.use$2({type:O.Log.TYPE,schema:O.logState,initialState:{empty:!0,region:u.Ho.ZERO,scrolling:!1,wheelPos:0,...c}});j.useEffect(()=>{p(h=>({...h,...c}))},[c,p]);const m=On(j.useCallback(h=>p(g=>({...g,region:h})),[p]));return r.jsxRuntimeExports.jsx("div",{ref:m,className:u.CSS(u.CSS.B("log"),n),onWheel:h=>{p(g=>({...g,wheelPos:g.wheelPos-h.deltaY,scrolling:g.scrolling?g.scrolling:h.deltaY<0}))},...a,children:x?o:r.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.BE("log","live"),d&&u.CSS.M("active")),variant:"outlined",onClick:()=>p(h=>({...h,scrolling:!h.scrolling})),tooltip:d?"Resume Scrolling":"Pause Scrolling",tooltipLocation:u.K$1.BOTTOM_LEFT,children:r.jsxRuntimeExports.jsx(f.Dynamic,{})})})},S7=Object.freeze(Object.defineProperty({__proto__:null,Log:y7},Symbol.toStringTag,{value:"Module"}));exports.Aether=f.main;exports.Divider=f.Divider$2;exports.Generic=f.Generic;exports.Haul=f.Haul;exports.Worker=f.Context;exports.compareArrayDeps=f.compareArrayDeps;exports.preventDefault=f.preventDefault;exports.stopPropagation=f.stopPropagation;exports.useClickOutside=f.useClickOutside;exports.useCombinedRefs=f.useCombinedRefs;exports.useCombinedStateAndRef=f.useCombinedStateAndRef;exports.useEffectCompare=f.useEffectCompare;exports.useInitializerRef=f.useInitializerRef;exports.useMemoCompare=f.useMemoCompare;exports.useMemoDeepEqual=f.useMemoDeepEqual;exports.useMemoPrimitiveArray=f.useMemoPrimitiveArray;exports.usePrevious=f.usePrevious;exports.useRequiredContext=f.useRequiredContext;exports.useResize=f.useResize;exports.useStateRef=f.useStateRef;exports.useSyncedRef=f.useSyncedRef;exports.useWindowResize=f.useWindowResize;exports.CSS=u.CSS;exports.DataType=u.n;exports.Density=u.d;exports.MultiSeries=u.Wt;exports.Rate=u.b;exports.Series=u.A;exports.TimeRange=u.O;exports.TimeSpan=u.i;exports.TimeStamp=u.r;exports.newBEM=u.newBEM;exports.state=L.state;exports.Button=Cf.external;exports.Caret=ql.Animated$1;exports.telem=O.external;exports.Theming=Ps.external;exports.Color=_e.external;exports.useCursorDrag=_e.useCursorDrag;exports.useDebouncedCallback=_e.useDebouncedCallback;exports.Triggers=Jl.external;exports.List=nt.external;exports.Dialog=ea.external;exports.Input=Ae.external;exports.Flex=pe.external;exports.createHexOpacityVariants=ta.createHexOpacityVariants;exports.unitProperty=ta.unitProperty;exports.Header=bf.external;exports.Menu=wf.external;exports.Tabs=Me.external;exports.Text=vf.external;exports.Tree=kf.external;exports.Video=_f.Video;exports.Breadcrumb=hh;exports.Canvas=Th;exports.Channel=t1;exports.Component=rh;exports.Control=FR;exports.Device=g1;exports.Diagram=E7;exports.Direction=n1;exports.Eraser=Qf;exports.Flux=Fg;exports.Form=Pg;exports.Group=c1;exports.Icon=Vf;exports.Label=Y1;exports.Legend=Vh;exports.Line=Hh;exports.LinePlot=ig;exports.Log=S7;exports.Measure=ug;exports.Mosaic=cj;exports.Nav=th;exports.Note=dj;exports.OS=_j;exports.Observe=vg;exports.Ontology=Cj;exports.Override=Tj;exports.Pluto=n9;exports.Portal=tj;exports.Progress=o9;exports.Rack=b1;exports.Range=ag;exports.Ranger=o0;exports.Resize=Xf;exports.Rule=dg;exports.Schematic=Fb;exports.Select=xh;exports.Status=oh;exports.Steps=i9;exports.Synnax=Mg;exports.Table=d9;exports.TableCells=C9;exports.Tag=ih;exports.Task=I1;exports.Telem=Gb;exports.Tooltip=Ff;exports.Value=T0;exports.Viewport=og;exports.Workspace=Qb;exports.axis=wh;exports.control=vh;exports.proxyMemo=zf;exports.useAsyncEffect=It;exports.useDestructors=Is;exports.useVirtualCursorDrag=ph;
|