import{a$ as k,r as p,be as e}from"./index-_6SmYgWK.js";import{d as N,e as _,f as S,P as R,h as x,s as H}from"./DocStoreInputHandler-CaPW_OoW.js";/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var K=k("outline","artboard-off","IconArtboardOff",[["path",{d:"M12 8h3a1 1 0 0 1 1 1v3",key:"svg-0"}],["path",{d:"M15.716 15.698a1 1 0 0 1 -.716 .302h-6a1 1 0 0 1 -1 -1v-6c0 -.273 .11 -.52 .287 -.7",key:"svg-1"}],["path",{d:"M3 8h1",key:"svg-2"}],["path",{d:"M3 16h1",key:"svg-3"}],["path",{d:"M8 3v1",key:"svg-4"}],["path",{d:"M16 3v1",key:"svg-5"}],["path",{d:"M20 8h1",key:"svg-6"}],["path",{d:"M20 16h1",key:"svg-7"}],["path",{d:"M8 20v1",key:"svg-8"}],["path",{d:"M16 20v1",key:"svg-9"}],["path",{d:"M3 3l18 18",key:"svg-10"}]]);/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Q=k("outline","artboard","IconArtboard",[["path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M3 8l1 0",key:"svg-1"}],["path",{d:"M3 16l1 0",key:"svg-2"}],["path",{d:"M8 3l0 1",key:"svg-3"}],["path",{d:"M16 3l0 1",key:"svg-4"}],["path",{d:"M20 8l1 0",key:"svg-5"}],["path",{d:"M20 16l1 0",key:"svg-6"}],["path",{d:"M8 20l0 1",key:"svg-7"}],["path",{d:"M16 20l0 1",key:"svg-8"}]]);/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Z=k("outline","magnet-off","IconMagnetOff",[["path",{d:"M7 3a2 2 0 0 1 2 2m0 4v4a3 3 0 0 0 5.552 1.578m.448 -3.578v-6a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a7.99 7.99 0 0 1 -.424 2.577m-1.463 2.584a8 8 0 0 1 -14.113 -5.161v-8c0 -.297 .065 -.58 .181 -.833",key:"svg-0"}],["path",{d:"M4 8h4",key:"svg-1"}],["path",{d:"M15 8h4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var ee=k("filled","magnet-filled","IconMagnetFilled",[["path",{d:"M21 9v4a9 9 0 0 1 -18 0v-4h7v4a2 2 0 1 0 4 0v-4zm-3 -7a3 3 0 0 1 3 3v2h-7v-2a3 3 0 0 1 3 -3zm-11 0a3 3 0 0 1 3 3v2h-7v-2a3 3 0 0 1 3 -3z",key:"svg-0"}]]);function L(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},e.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function P(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},e.createElement("path",{d:"M0 0h32v4.2H0z"}))}function O(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},e.createElement("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 U(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},e.createElement("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 F(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},e.createElement("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"}))}const g=({children:t,className:a,...n})=>e.createElement("button",{type:"button",className:x(["react-flow__controls-button",a]),...n},t);g.displayName="ControlButton";const T=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),I=({style:t,showZoom:a=!0,showFitView:n=!0,showInteractive:E=!0,fitViewOptions:b,onZoomIn:s,onZoomOut:m,onFitView:v,onInteractiveChange:d,className:z,children:r,position:u="bottom-left"})=>{const f=N(),[C,M]=p.useState(!1),{isInteractive:l,minZoomReached:w,maxZoomReached:c}=_(T,H),{zoomIn:i,zoomOut:h,fitView:y}=S();if(p.useEffect(()=>{M(!0)},[]),!C)return null;const $=()=>{i(),s==null||s()},A=()=>{h(),m==null||m()},B=()=>{y(b),v==null||v()},D=()=>{f.setState({nodesDraggable:!l,nodesConnectable:!l,elementsSelectable:!l}),d==null||d(!l)};return e.createElement(R,{className:x(["react-flow__controls",z]),position:u,style:t,"data-testid":"rf__controls"},a&&e.createElement(e.Fragment,null,e.createElement(g,{onClick:$,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:c},e.createElement(L,null)),e.createElement(g,{onClick:A,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:w},e.createElement(P,null))),n&&e.createElement(g,{className:"react-flow__controls-fitview",onClick:B,title:"fit view","aria-label":"fit view"},e.createElement(O,null)),E&&e.createElement(g,{className:"react-flow__controls-interactive",onClick:D,title:"toggle interactivity","aria-label":"toggle interactivity"},l?e.createElement(F,null):e.createElement(U,null)),r)};I.displayName="Controls";var te=p.memo(I),o;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(o||(o={}));function W({color:t,dimensions:a,lineWidth:n}){return e.createElement("path",{stroke:t,strokeWidth:n,d:`M${a[0]/2} 0 V${a[1]} M0 ${a[1]/2} H${a[0]}`})}function G({color:t,radius:a}){return e.createElement("circle",{cx:a,cy:a,r:a,fill:t})}const X={[o.Dots]:"#91919a",[o.Lines]:"#eee",[o.Cross]:"#e2e2e2"},Y={[o.Dots]:1,[o.Lines]:1,[o.Cross]:6},j=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function V({id:t,variant:a=o.Dots,gap:n=20,size:E,lineWidth:b=1,offset:s=2,color:m,style:v,className:d}){const z=p.useRef(null),{transform:r,patternId:u}=_(j,H),f=m||X[a],C=E||Y[a],M=a===o.Dots,l=a===o.Cross,w=Array.isArray(n)?n:[n,n],c=[w[0]*r[2]||1,w[1]*r[2]||1],i=C*r[2],h=l?[i,i]:c,y=M?[i/s,i/s]:[h[0]/s,h[1]/s];return e.createElement("svg",{className:x(["react-flow__background",d]),style:{...v,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:z,"data-testid":"rf__background"},e.createElement("pattern",{id:u+t,x:r[0]%c[0],y:r[1]%c[1],width:c[0],height:c[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${y[0]},-${y[1]})`},M?e.createElement(G,{color:f,radius:i/s}):e.createElement(W,{dimensions:h,color:f,lineWidth:b})),e.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${u+t})`}))}V.displayName="Background";var ae=p.memo(V);export{ae as B,te as C,ee as I,Z as a,Q as b,K as c};
