sweet-diagram
Version:
A modern and intuitive diagram editor component for React applications with 3D visualization support
348 lines (344 loc) • 444 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),g=({id:t="",text:r="",width:a=120,height:s=60,x:d=0,y:i=0,textDirection:o="horizontal",verticalDirection:h="lr",className:k="bg-[#0066ff] text-white border-blue-800 border-2 rounded-lg text-sm",onClick:N=null})=>{let l,m;try{const C=Se();l=C.registerBox,m=C.unregisterBox}catch{l=null,m=null}c.useEffect(()=>{t&&l&&l(t,{id:t,x:d,y:i,width:a,height:s})},[t,d,i,a,s,l]),c.useEffect(()=>()=>{t&&m&&m(t)},[t,m]);const b=C=>{N&&N(C,{id:t,x:d,y:i,width:a,height:s})},S=C=>{(C.key==="Enter"||C.key===" ")&&b(C)},f=()=>o==="vertical"?{writingMode:`vertical-${h}`,textOrientation:"mixed",textAlign:"center"}:{textAlign:"center"},M={top:{x:d+a/2,y:i},right:{x:d+a,y:i+s/2},bottom:{x:d+a/2,y:i+s},left:{x:d,y:i+s/2}};return e.jsxs("div",{className:`absolute z-10 ${k}`,style:{left:`${d}px`,top:`${i}px`,width:`${a}px`,height:`${s}px`,transform:"translate3d(0,0,0)"},"data-box-id":t,onClick:b,onKeyDown:S,tabIndex:"0",role:"button","aria-label":`Box component: ${r} ${t?`(ID: ${t})`:""}`,children:[e.jsx("div",{className:"flex items-center justify-center w-full h-full cursor-pointer select-none transition-all duration-200 hover:shadow-lg hover:scale-105 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",children:e.jsx("span",{className:"font-medium px-2 leading-tight",style:f(),children:r})}),Object.entries(M).map(([C,T])=>e.jsx("div",{className:"absolute w-2 h-2 bg-[#0066ff] rounded-full opacity-0 hover:opacity-100 transition-all duration-200 cursor-crosshair hover:scale-150 hover:bg-[#0066ff] z-20",style:{left:`${T.x-d-4}px`,top:`${T.y-i-4}px`},"data-connection-point":C,"data-box-id":t,"data-x":T.x,"data-y":T.y,title:`${t?`${t} - `:""}${C} connection point`},C))]})},Ze=c.createContext(),Se=()=>{const t=c.useContext(Ze);if(!t)throw new Error("useDiagram must be used within a DiagramProvider");return t},Te=({children:t,className:r="",style:a={}})=>{const[s,d]=c.useState(new Map),[i,o]=c.useState([]),[h,k]=c.useState(null),[N,l]=c.useState(new Set),[m,b]=c.useState(!1),[S,f]=c.useState(!1),[w,M]=c.useState(null),[C,T]=c.useState([]),[P,E]=c.useState(-1),[Z,z]=c.useState(1),[I,_]=c.useState({x:0,y:0}),[ne,n]=c.useState(new Map),p=c.useRef(null),$=c.useCallback((A,B)=>{d(X=>{const G=new Map(X),de={id:A,x:B.x,y:B.y,width:B.width,height:B.height,element:B.element,...B};return G.set(A,de),G})},[]),ee=c.useCallback(A=>{const B=A.id||`dynamic-box-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,X={id:B,x:A.x||Math.random()*400+50,y:A.y||Math.random()*300+50,width:A.width||120,height:A.height||80,text:A.text||`박스 ${B}`,className:A.className||"bg-blue-500 text-white border-blue-600 border-2 rounded-lg",...A};return n(G=>{const de=new Map(G);return de.set(B,X),de}),d(G=>{const de=new Map(G);return de.set(B,X),de}),B},[]),q=c.useCallback(A=>{n(B=>{const X=new Map(B);return X.delete(A),X}),ce(A)},[]),te=c.useCallback((A,B)=>{d(X=>{const G=new Map(X),de=G.get(A);if(de&&(de.x!==B.x||de.y!==B.y)){const ue={...de,...B};return G.set(A,ue),n(x=>{const u=new Map(x);return u.has(A)&&u.set(A,ue),u}),G}return X})},[]),ce=c.useCallback(A=>{d(B=>{const X=new Map(B);return X.delete(A),X}),o(B=>B.filter(X=>{var G,de;return((G=X.fromBox)==null?void 0:G.id)!==A&&((de=X.toBox)==null?void 0:de.id)!==A})),l(B=>{const X=new Set(B);return X.delete(A),X})},[]),se=c.useCallback(A=>s.get(A),[s]),Q=c.useCallback(()=>Array.from(s.values()),[s]),le=c.useCallback((A,B=!1)=>{l(X=>{const G=new Set;return B?(G.add(...X),X.has(A)?G.delete(A):G.add(A)):X.has(A)&&X.size===1||G.add(A),G})},[]),F=c.useCallback(()=>{l(new Set)},[]),W=c.useCallback(A=>{const B={id:`conn_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,...A};return o(X=>[...X,B]),B.id},[]),L=c.useCallback(A=>{o(B=>B.filter(X=>X.id!==A))},[]),ie=c.useCallback((A,B)=>{o(X=>X.map(G=>G.id===A?{...G,...B}:G))},[]),he=c.useCallback((A,B)=>{const X=s.get(A),G=s.get(B);if(!X||!G)return null;const de={x:X.x+X.width/2,y:X.y+X.height/2},ue={x:G.x+G.width/2,y:G.y+G.height/2},x=ue.x-de.x,u=ue.y-de.y;let j,v;return Math.abs(x)>Math.abs(u)?x>0?(j="right",v="left"):(j="left",v="right"):u>0?(j="bottom",v="top"):(j="top",v="bottom"),{fromPosition:j,toPosition:v}},[s]),be=c.useCallback(()=>{const A={boxes:new Map(s),connections:[...i],dynamicBoxes:new Map(ne),timestamp:Date.now()};T(B=>{const X=B.slice(0,P+1);return X.push(A),X.slice(-50)}),E(B=>Math.min(B+1,49))},[s,i,ne,P]),fe=c.useCallback(()=>{if(P>0){const A=C[P-1];d(new Map(A.boxes)),o([...A.connections]),n(new Map(A.dynamicBoxes||new Map)),E(B=>B-1)}},[C,P]),Ce=c.useCallback(()=>{if(P<C.length-1){const A=C[P+1];d(new Map(A.boxes)),o([...A.connections]),n(new Map(A.dynamicBoxes||new Map)),E(B=>B+1)}},[C,P]),Me=c.useCallback(()=>{d(new Map),o([]),n(new Map),l(new Set),k(null),be()},[be]),We=c.useCallback(()=>{z(A=>Math.min(A*1.2,3))},[]),Oe=c.useCallback(()=>{z(A=>Math.max(A/1.2,.1))},[]),Ve=c.useCallback(()=>{z(1),_({x:0,y:0})},[]),He=c.useCallback(()=>({boxCount:s.size,connectionCount:i.length,selectedBoxCount:N.size,canUndo:P>0,canRedo:P<C.length-1,scale:Z,panOffset:I}),[s.size,i.length,N.size,P,C.length,Z,I]),Ae=c.useCallback(A=>Array.from(s.values()).filter(A),[s]),V=c.useCallback(A=>i.filter(A),[i]),U=c.useCallback(()=>{const A=Array.from(s.values());if(A.length===0)return;const B=new Map,X=50,G=800,de=600;A.forEach(ue=>{B.set(ue.id,{...ue})});for(let ue=0;ue<X;ue++){const x=new Map;A.forEach(u=>{let j=0,v=0;const D=B.get(u.id);A.forEach(xe=>{if(u.id!==xe.id){const ae=B.get(xe.id),ye=D.x-ae.x,pe=D.y-ae.y,J=Math.sqrt(ye*ye+pe*pe)||1,K=Math.min(1e3/(J*J),10);j+=ye/J*K,v+=pe/J*K}}),i.forEach(xe=>{var ye,pe,J,K;let ae=null;if(((ye=xe.fromBox)==null?void 0:ye.id)===u.id?ae=B.get((pe=xe.toBox)==null?void 0:pe.id):((J=xe.toBox)==null?void 0:J.id)===u.id&&(ae=B.get((K=xe.fromBox)==null?void 0:K.id)),ae){const Ne=ae.x-D.x,ke=ae.y-D.y,Le=Math.sqrt(Ne*Ne+ke*ke)||1,Ye=(Le-150)*.05;j+=Ne/Le*Ye,v+=ke/Le*Ye}});const O=G/2,H=de/2,Y=(O-D.x)*.001,re=(H-D.y)*.001;j+=Y,v+=re,x.set(u.id,{fx:j,fy:v})}),A.forEach(u=>{const j=x.get(u.id),v=B.get(u.id),D=.1;let O=v.x+j.fx*D,H=v.y+j.fy*D;O=Math.max(10,Math.min(G-v.width-10,O)),H=Math.max(10,Math.min(de-v.height-10,H)),B.set(u.id,{...v,x:O,y:H})})}d(B),n(ue=>{const x=new Map(ue);return B.forEach((u,j)=>{x.has(j)&&x.set(j,u)}),x}),be()},[s,i,be]),je={boxes:s,registerBox:$,unregisterBox:ce,updateBoxPosition:te,getBox:se,getAllBoxes:Q,selectBox:le,clearSelection:F,selectedBoxes:N,findBoxes:Ae,addDynamicBox:ee,removeDynamicBox:q,dynamicBoxes:ne,connections:i,addConnection:W,removeConnection:L,updateConnection:ie,selectedConnection:h,setSelectedConnection:k,getOptimalConnectionPoints:he,findConnections:V,isDragging:m,setIsDragging:b,isConnecting:S,setIsConnecting:f,connectionStartBox:w,setConnectionStartBox:M,undo:fe,redo:Ce,saveState:be,clearDiagram:Me,scale:Z,setScale:z,panOffset:I,setPanOffset:_,zoomIn:We,zoomOut:Oe,resetZoom:Ve,getDiagramStats:He,optimizeLayout:U,containerRef:p},ve={position:"relative",width:"100%",height:"100%",...a},ze=`sweet-diagram-provider diagram-container ${r}`;return e.jsx(Ze.Provider,{value:je,children:e.jsx("div",{ref:p,className:ze,style:ve,children:t})})},y=({startPoint:t=null,endPoint:r=null,fromBox:a=null,toBox:s=null,fromCustomPoint:d=null,toCustomPoint:i=null,fromBoxCustom:o=null,toBoxCustom:h=null,connectionType:k="straight",strokeWidth:N=2,animated:l=!1,animationType:m="dash",animationSpeed:b=2,className:S="",arrowSize:f=8,arrowDirection:w="forward",arrowColor:M="current",arrowShape:C="triangle",bendPoints:T,cornerRadius:P=0,orthogonalDirection:E="auto",stepOffset:Z=50})=>{let z=null;try{z=Se().getBox}catch{z=null}const I=Array.isArray(T)?T:void 0,_=w==="none"?!1:w==="forward"||w==="both",ne=w==="none"?!1:w==="backward"||w==="both",n=()=>M==="current"?"fill-current":{red:"fill-red-500",blue:"fill-blue-500",green:"fill-green-500",yellow:"fill-yellow-500",purple:"fill-purple-500",pink:"fill-pink-500",indigo:"fill-indigo-500",gray:"fill-gray-500",black:"fill-black",white:"fill-white"}[M]||`fill-${M}`||"fill-current",p=(x,u,j,v,D,O,H)=>{switch(C){case"triangle":return`${x},${u} ${j},${v} ${D},${O}`;case"diamond":{const Y=Math.atan2(v-u,j-x),re=x-H*.6*Math.cos(Y),xe=u-H*.6*Math.sin(Y),ae=x+H*.6*Math.cos(Y),ye=u+H*.6*Math.sin(Y),pe=x+H*.4*Math.cos(Y+Math.PI/2),J=u+H*.4*Math.sin(Y+Math.PI/2),K=x+H*.4*Math.cos(Y-Math.PI/2),Ne=u+H*.4*Math.sin(Y-Math.PI/2);return`${re},${xe} ${pe},${J} ${ae},${ye} ${K},${Ne}`}case"circle":return null;case"square":{const re=H*.8/2;return`${x-re},${u-re} ${x+re},${u-re} ${x+re},${u+re} ${x-re},${u+re}`}default:return`${x},${u} ${j},${v} ${D},${O}`}},$=(x,u,j,v)=>C!=="circle"?null:e.jsx("circle",{cx:x-j,cy:u-v,r:F*.6,className:n()}),ee=(x,u,j={x:0,y:0})=>{if(!x||typeof x.x!="number"||typeof x.y!="number")return null;const{x:v,y:D,width:O,height:H}=x;let Y={x:0,y:0};switch(u){case"top":Y={x:v+O/2,y:D};break;case"right":Y={x:v+O,y:D+H/2};break;case"bottom":Y={x:v+O/2,y:D+H};break;case"left":Y={x:v,y:D+H/2};break;case"center":Y={x:v+O/2,y:D+H/2};break;default:Y={x:v+O/2,y:D+H/2}}return{x:Y.x+((j==null?void 0:j.x)||0),y:Y.y+((j==null?void 0:j.y)||0)}},q=x=>{if(!z)return null;const u=z(x.id);if(!u)return null;const{x:j,y:v,width:D,height:O}=u,{customPoint:H}=x,Y=Math.max(0,Math.min(1,H.x)),re=Math.max(0,Math.min(1,H.y)),xe=j+D*Y,ae=v+O*re;return{x:xe,y:ae}},te=()=>{let x=t,u=r;if(d&&i)x=d,u=i;else if(o&&h&&z){const j=q(o),v=q(h);j&&v&&(x=j,u=v)}else if((a||o)&&(s||h||d||i)){if(o&&z)x=q(o);else if(a&&a.id&&z){const j=z(a.id);j&&(x=ee(j,a.position,a.offset))}else d&&(x=d);if(h&&z)u=q(h);else if(s&&s.id&&z){const j=z(s.id);j&&(u=ee(j,s.position,s.offset))}else i&&(u=i)}else if(a&&s&&a.id&&s.id&&z){const j=z(a.id),v=z(s.id);if(j&&v){const D=ee(j,a.position,a.offset),O=ee(v,s.position,s.offset);D&&O&&(x=D,u=O)}else I&&I.length>=2&&(x=I[0],u=I[I.length-1])}return{actualStartPoint:x,actualEndPoint:u}},{actualStartPoint:ce,actualEndPoint:se}=te(),Q={x:(ce==null?void 0:ce.x)??100,y:(ce==null?void 0:ce.y)??100},le={x:(se==null?void 0:se.x)??300,y:(se==null?void 0:se.y)??200},F=typeof f=="number"&&!isNaN(f)?f:8,W=typeof N=="number"&&!isNaN(N)?N:2,ie=(()=>{if(k==="custom"&&(!I||I.length===0))return console.warn("⚠️ connectionType='custom'이지만 bendPoints가 정의되지 않았습니다. 'straight' 타입으로 fallback합니다."),"straight";if(k!=="auto")return k;if(a&&s&&a.position&&s.position){const{position:x}=a;return x==="right"&&s.position==="left"||x==="left"&&s.position==="right"||x==="top"&&s.position==="bottom"||x==="bottom"&&s.position==="top"?"straight":"orthogonal"}return"straight"})(),he=()=>{const{x,y:u}=Q,{x:j,y:v}=le;let D=`M ${x} ${u}`;if(a&&s&&a.position&&s.position){const{position:O}=a;if(O==="right"||O==="left"){const H=O==="right"?x+Z:x-Z;D+=` L ${H} ${u} L ${H} ${v} L ${j} ${v}`}else{const H=O==="bottom"?u+Z:u-Z;D+=` L ${x} ${H} L ${j} ${H} L ${j} ${v}`}}else if(E==="horizontal-first"){const O=x+Z;D+=` L ${O} ${u} L ${O} ${v} L ${j} ${v}`}else if(E==="vertical-first"){const O=u+Z;D+=` L ${x} ${O} L ${j} ${O} L ${j} ${v}`}else{const O=Math.abs(j-x),H=Math.abs(v-u);if(O>H){const Y=x+(j-x)*.5;D+=` L ${Y} ${u} L ${Y} ${v} L ${j} ${v}`}else{const Y=u+(v-u)*.5;D+=` L ${x} ${Y} L ${j} ${Y} L ${j} ${v}`}}return D},be=()=>{const{x,y:u}=Q,{x:j,y:v}=le,D=3,O=(j-x)/D,H=(v-u)/D;let Y=`M ${x} ${u}`;for(let re=1;re<=D;re++){const xe=x+O*re,ae=u+H*(re-1),ye=u+H*re;Y+=` L ${xe} ${ae} L ${xe} ${ye}`}return Y},fe=()=>{const{x,y:u}=Q,{x:j,y:v}=le;let D=`M ${x} ${u}`;if(I&&I.length>0){I.forEach(H=>{H&&typeof H.x=="number"&&typeof H.y=="number"&&(D+=` L ${H.x} ${H.y}`)});const O=I[I.length-1];O&&(O.x!==j||O.y!==v)&&(D+=` L ${j} ${v}`)}else D+=` L ${j} ${v}`;return D},Ce=()=>{const{x,y:u}=Q,{x:j,y:v}=le,D=j-x,O=v-u;if(a&&s&&a.position&&s.position){const{position:pe}=a;let J=x,K=u,Ne=j,ke=v;return pe==="right"?J=x+Math.abs(D)*.5:pe==="left"?J=x-Math.abs(D)*.5:pe==="bottom"?K=u+Math.abs(O)*.5:pe==="top"&&(K=u-Math.abs(O)*.5),s.position==="left"?Ne=j-Math.abs(D)*.5:s.position==="right"?Ne=j+Math.abs(D)*.5:s.position==="top"?ke=v-Math.abs(O)*.5:s.position==="bottom"&&(ke=v+Math.abs(O)*.5),`M ${x} ${u} C ${J} ${K} ${Ne} ${ke} ${j} ${v}`}const H=Math.sqrt(D*D+O*O),Y=Math.min(H*.3,100),re=x+Y,xe=u,ae=j-Y;return`M ${x} ${u} C ${re} ${xe} ${ae} ${v} ${j} ${v}`},Me=()=>{const{x,y:u}=Q,{x:j,y:v}=le;return`M ${x} ${u} L ${j} ${v}`},We=()=>{switch(ie){case"curved":return Ce();case"orthogonal":return he();case"stepped":return be();case"custom":return fe();default:return Me()}},Oe=()=>{const x=We();return P<=0||ie==="curved"||ie==="orthogonal",x},Ve=()=>{const{x,y:u}=Q,{x:j,y:v}=le;if(s&&s.position&&a){const{position:J}=s;let K;switch(J){case"left":K=0;break;case"right":K=Math.PI;break;case"top":K=Math.PI/2;break;case"bottom":K=-Math.PI/2;break;default:K=Math.atan2(v-u,j-x)}const Ne={x:j-F*Math.cos(K-Math.PI/6),y:v-F*Math.sin(K-Math.PI/6)},ke={x:j-F*Math.cos(K+Math.PI/6),y:v-F*Math.sin(K+Math.PI/6)};return{arrowHead1:Ne,arrowHead2:ke}}let D=x,O=u,H=j,Y=v;if(ie==="custom"&&I&&I.length>0){const J=I[I.length-1];J&&typeof J.x=="number"&&typeof J.y=="number"&&(D=J.x,O=J.y)}else ie==="orthogonal"&&(Math.abs(j-x)>Math.abs(v-u)?O=v:D=j);const re=H-D,xe=Y-O,ae=Math.atan2(xe,re),ye={x:j-F*Math.cos(ae-Math.PI/6),y:v-F*Math.sin(ae-Math.PI/6)},pe={x:j-F*Math.cos(ae+Math.PI/6),y:v-F*Math.sin(ae+Math.PI/6)};return{arrowHead1:ye,arrowHead2:pe}},He=()=>{const{x,y:u}=Q,{x:j,y:v}=le;if(a&&a.position&&s){const{position:J}=a;let K;switch(J){case"right":K=0;break;case"left":K=Math.PI;break;case"bottom":K=Math.PI/2;break;case"top":K=-Math.PI/2;break;default:K=Math.atan2(v-u,j-x)}const Ne={x:x+F*Math.cos(K-Math.PI/6),y:u+F*Math.sin(K-Math.PI/6)},ke={x:x+F*Math.cos(K+Math.PI/6),y:u+F*Math.sin(K+Math.PI/6)};return{startArrowHead1:Ne,startArrowHead2:ke}}let D=x,O=u,H=j,Y=v;if(ie==="custom"&&I&&I.length>0){const J=I[0];J&&typeof J.x=="number"&&typeof J.y=="number"&&(H=J.x,Y=J.y)}else ie==="orthogonal"&&(Math.abs(j-x)>Math.abs(v-u)?Y=u:H=x);const re=H-D,xe=Y-O,ae=Math.atan2(xe,re),ye={x:x+F*Math.cos(ae-Math.PI/6),y:u+F*Math.sin(ae-Math.PI/6)},pe={x:x+F*Math.cos(ae+Math.PI/6),y:u+F*Math.sin(ae+Math.PI/6)};return{startArrowHead1:ye,startArrowHead2:pe}},{arrowHead1:Ae,arrowHead2:V}=_?Ve():{arrowHead1:null,arrowHead2:null},{startArrowHead1:U,startArrowHead2:je}=ne?He():{startArrowHead1:null,startArrowHead2:null},ve=I?I.filter(x=>x&&typeof x.x=="number"&&typeof x.y=="number"&&!isNaN(x.x)&&!isNaN(x.y)):[],ze=[Q,le,...ve],A=Math.min(...ze.map(x=>x.x))-F,B=Math.min(...ze.map(x=>x.y))-F,X=Math.max(...ze.map(x=>x.x))+F,G=Math.max(...ze.map(x=>x.y))+F,de=()=>{if(!l)return"";const x=b||2;switch(console.log(`Animation enabled: ${l}, Type: ${m}, Speed: ${x}`),m){case"electric":return`
.electric-path {
stroke-dasharray: 8, 4, 2, 4;
animation: electricFlow ${x*.9}s linear infinite, electricGlow ${x*2}s ease-in-out infinite alternate;
filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.7));
stroke-linecap: round;
}
@keyframes electricFlow {
0% {
stroke-dashoffset: 0;
opacity: 0.8;
}
25% {
opacity: 1;
}
50% {
opacity: 0.9;
}
75% {
opacity: 1;
}
100% {
stroke-dashoffset: -14;
opacity: 0.8;
}
}
@keyframes electricGlow {
0% {
filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.7));
}
100% {
filter: drop-shadow(0 0 12px rgba(59, 130, 246, 1)) drop-shadow(0 0 20px rgba(96, 165, 250, 0.6));
}
}
`;case"water":return`
.water-path {
stroke-dasharray: 12, 6, 4, 6;
animation: waterFlow ${x*1.1}s ease-in-out infinite, waterWave ${x*2}s ease-in-out infinite;
filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.6));
stroke-linecap: round;
}
@keyframes waterFlow {
0% {
stroke-dashoffset: 0;
opacity: 0.7;
}
25% {
opacity: 0.9;
}
50% {
opacity: 1;
}
75% {
opacity: 0.8;
}
100% {
stroke-dashoffset: -16;
opacity: 0.7;
}
}
@keyframes waterWave {
0% {
filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.6));
}
50% {
filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.8)) drop-shadow(0 0 14px rgba(14, 165, 233, 0.5));
}
100% {
filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.6));
}
}
`;case"wind":return`
.wind-path {
stroke-dasharray: 6, 10, 4, 8;
animation: windFlow ${x*.8}s ease-in-out infinite, windGust ${x*2.2}s ease-in-out infinite;
filter: drop-shadow(0 0 3px rgba(156, 163, 175, 0.5));
stroke-linecap: round;
}
@keyframes windFlow {
0% {
stroke-dashoffset: 0;
opacity: 0.5;
}
20% {
opacity: 0.7;
}
40% {
opacity: 0.4;
}
60% {
opacity: 0.8;
}
80% {
opacity: 0.6;
}
100% {
stroke-dashoffset: -18;
opacity: 0.5;
}
}
@keyframes windGust {
0% {
filter: drop-shadow(0 0 3px rgba(156, 163, 175, 0.5));
}
50% {
filter: drop-shadow(0 0 6px rgba(156, 163, 175, 0.7)) drop-shadow(0 0 12px rgba(107, 114, 128, 0.4));
}
100% {
filter: drop-shadow(0 0 3px rgba(156, 163, 175, 0.5));
}
}
`;case"gas":return`
.gas-path {
stroke-dasharray: 6, 8, 4, 6;
animation: gasFlow ${x*1.2}s ease-in-out infinite, gasDiffusion ${x*2.5}s ease-in-out infinite;
filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
stroke-linecap: round;
}
@keyframes gasFlow {
0% {
stroke-dashoffset: 0;
opacity: 0.6;
}
20% {
opacity: 0.8;
}
40% {
opacity: 0.5;
}
60% {
opacity: 0.9;
}
80% {
opacity: 0.7;
}
100% {
stroke-dashoffset: -14;
opacity: 0.6;
}
}
@keyframes gasDiffusion {
0% {
filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}
50% {
filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8)) drop-shadow(0 0 15px rgba(245, 158, 11, 0.5));
}
100% {
filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}
}
`;case"data":return`
.data-path {
stroke-dasharray: 4, 3, 2, 3;
animation: dataTransfer ${x*.9}s linear infinite, dataGlow ${x*2}s ease-in-out infinite;
filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.7));
stroke-linecap: round;
}
@keyframes dataTransfer {
0% {
stroke-dashoffset: 0;
opacity: 0.8;
}
25% {
opacity: 1;
}
50% {
opacity: 0.9;
}
75% {
opacity: 1;
}
100% {
stroke-dashoffset: -12;
opacity: 0.8;
}
}
@keyframes dataGlow {
0% {
filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.7));
}
50% {
filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.9)) drop-shadow(0 0 18px rgba(16, 185, 129, 0.6));
}
100% {
filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.7));
}
}
.data-packets {
animation: dataPacket ${x*.6}s linear infinite;
}
@keyframes dataPacket {
0% {
opacity: 0;
r: 1;
fill: #22c55e;
}
20% {
opacity: 0.7;
r: 1.5;
fill: #10b981;
}
40% {
opacity: 1;
r: 2;
fill: #059669;
}
60% {
opacity: 0.8;
r: 1.8;
fill: #047857;
}
80% {
opacity: 0.4;
r: 1.2;
fill: #065f46;
}
100% {
opacity: 0;
r: 1;
fill: #22c55e;
}
}
`;default:return`
.dash-path {
stroke-dasharray: 8, 4;
animation: dashFlow ${x}s linear infinite;
stroke-linecap: round;
opacity: 0.8;
}
@keyframes dashFlow {
0% {
stroke-dashoffset: 0;
}
100% {
stroke-dashoffset: -12;
}
}
`}},ue=()=>null;return e.jsxs("svg",{className:`absolute pointer-events-none z-10 ${S}`,style:{left:A,top:B,width:X-A,height:G-B},children:[l&&e.jsx("defs",{children:e.jsx("style",{children:de()})}),e.jsx("path",{d:Oe(),strokeWidth:W,fill:"none",className:`stroke-current ${l?`${m}-path`:""}`,transform:`translate(${-A}, ${-B})`,strokeLinecap:"round",strokeLinejoin:"round"}),ue(),_&&Ae&&V&&e.jsx(e.Fragment,{children:C==="circle"?$(le.x,le.y,A,B):e.jsx("polygon",{points:p(le.x,le.y,Ae.x,Ae.y,V.x,V.y,F),className:n(),transform:`translate(${-A}, ${-B})`})}),ne&&U&&je&&e.jsx(e.Fragment,{children:C==="circle"?$(Q.x,Q.y,A,B):e.jsx("polygon",{points:p(Q.x,Q.y,U.x,U.y,je.x,je.y,F),className:n(),transform:`translate(${-A}, ${-B})`})})]})},Be=({direction:t="right",length:r=100,strokeWidth:a=2,startPoint:s={x:0,y:0},endPoint:d=null,className:i="text-blue-600 hover:text-blue-700 transition-colors duration-200",arrowSize:o=8,showStartArrow:h=!1,showEndArrow:k=!0,onClick:N=null})=>{const l={x:typeof(s==null?void 0:s.x)=="number"&&!isNaN(s.x)?s.x:0,y:typeof(s==null?void 0:s.y)=="number"&&!isNaN(s.y)?s.y:0},m=typeof r=="number"&&!isNaN(r)?r:100,b=typeof o=="number"&&!isNaN(o)?o:8,S=typeof a=="number"&&!isNaN(a)?a:2,w=(()=>{if(d&&typeof d.x=="number"&&typeof d.y=="number"&&!isNaN(d.x)&&!isNaN(d.y))return d;const z={right:{x:l.x+m,y:l.y},left:{x:l.x-m,y:l.y},up:{x:l.x,y:l.y-m},down:{x:l.x,y:l.y+m},"up-right":{x:l.x+m*.7,y:l.y-m*.7},"down-right":{x:l.x+m*.7,y:l.y+m*.7},"up-left":{x:l.x-m*.7,y:l.y-m*.7},"down-left":{x:l.x-m*.7,y:l.y+m*.7}};return z[t]||z.right})(),M=()=>{const z=w.x-l.x,I=w.y-l.y,_=Math.atan2(I,z),ne={x:w.x-b*Math.cos(_-Math.PI/6),y:w.y-b*Math.sin(_-Math.PI/6)},n={x:w.x-b*Math.cos(_+Math.PI/6),y:w.y-b*Math.sin(_+Math.PI/6)};return{arrowHead1:ne,arrowHead2:n}},C=()=>{const z=l.x-w.x,I=l.y-w.y,_=Math.atan2(I,z),ne={x:l.x-b*Math.cos(_-Math.PI/6),y:l.y-b*Math.sin(_-Math.PI/6)},n={x:l.x-b*Math.cos(_+Math.PI/6),y:l.y-b*Math.sin(_+Math.PI/6)};return{arrowHead1:ne,arrowHead2:n}},T=k?M():null,P=h?C():null,E=z=>{N&&N(z,{startPoint:l,endPoint:w,arrowSize:b})},Z=z=>{(z.key==="Enter"||z.key===" ")&&E(z)};return e.jsxs("svg",{className:`absolute ${N?"cursor-pointer":"pointer-events-none"} ${i}`,style:{left:Math.min(l.x,w.x)-b,top:Math.min(l.y,w.y)-b,width:Math.abs(w.x-l.x)+b*2,height:Math.abs(w.y-l.y)+b*2},onClick:N?E:void 0,onKeyDown:N?Z:void 0,tabIndex:N?0:void 0,role:N?"button":void 0,"aria-label":N?"화살표":void 0,children:[e.jsx("line",{x1:l.x-Math.min(l.x,w.x)+b,y1:l.y-Math.min(l.y,w.y)+b,x2:w.x-Math.min(l.x,w.x)+b,y2:w.y-Math.min(l.y,w.y)+b,strokeWidth:S,className:"stroke-current",strokeLinecap:"round"}),k&&T&&e.jsx("polygon",{points:`${w.x-Math.min(l.x,w.x)+b},${w.y-Math.min(l.y,w.y)+b} ${T.arrowHead1.x-Math.min(l.x,w.x)+b},${T.arrowHead1.y-Math.min(l.y,w.y)+b} ${T.arrowHead2.x-Math.min(l.x,w.x)+b},${T.arrowHead2.y-Math.min(l.y,w.y)+b}`,className:"fill-current"}),h&&P&&e.jsx("polygon",{points:`${l.x-Math.min(l.x,w.x)+b},${l.y-Math.min(l.y,w.y)+b} ${P.arrowHead1.x-Math.min(l.x,w.x)+b},${P.arrowHead1.y-Math.min(l.y,w.y)+b} ${P.arrowHead2.x-Math.min(l.x,w.x)+b},${P.arrowHead2.y-Math.min(l.y,w.y)+b}`,className:"fill-current"})]})},me=({startPoint:t={x:0,y:0},endPoint:r={x:100,y:0},strokeWidth:a=2,lineType:s="straight",className:d="text-gray-500 hover:text-gray-600 transition-colors duration-200",dashArray:i=null})=>{const o={x:typeof(t==null?void 0:t.x)=="number"&&!isNaN(t.x)?t.x:0,y:typeof(t==null?void 0:t.y)=="number"&&!isNaN(t.y)?t.y:0},h={x:typeof(r==null?void 0:r.x)=="number"&&!isNaN(r.x)?r.x:100,y:typeof(r==null?void 0:r.y)=="number"&&!isNaN(r.y)?r.y:0},k=typeof a=="number"&&!isNaN(a)?a:2,N=()=>{const{x:f,y:w}=o,{x:M,y:C}=h;switch(s){case"curved":{const T=(f+M)/2,P=(w+C)/2,E=T,Z=P-Math.abs(M-f)*.2;return`M ${f} ${w} Q ${E} ${Z} ${M} ${C}`}case"stepped":{const T=f+(M-f)*.5;return`M ${f} ${w} L ${T} ${w} L ${T} ${C} L ${M} ${C}`}default:return`M ${f} ${w} L ${M} ${C}`}},l=Math.min(o.x,h.x),m=Math.min(o.y,h.y),b=Math.max(o.x,h.x),S=Math.max(o.y,h.y);return e.jsxs("svg",{className:`absolute pointer-events-none ${d}`,style:{left:l-k,top:m-k,width:b-l+k*2,height:S-m+k*2},children:[e.jsx("path",{d:N(),strokeWidth:k,fill:"none",strokeDasharray:i,transform:`translate(${-l+k}, ${-m+k})`,className:"stroke-current",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:o.x-l+k,cy:o.y-m+k,r:"3",className:"opacity-50 hover:opacity-100 transition-opacity fill-current"}),e.jsx("circle",{cx:h.x-l+k,cy:h.y-m+k,r:"3",className:"opacity-50 hover:opacity-100 transition-opacity fill-current"})]})},De=({direction:t="up",size:r=40,x:a=0,y:s=0,className:d="text-emerald-600 hover:text-emerald-700 transition-colors duration-200",onClick:i=null})=>{const o=m=>{i&&i(m,{x:a,y:s,size:r,direction:t})},h=m=>{(m.key==="Enter"||m.key===" ")&&o(m)},k=()=>{const m=r/2;switch(t){case"up":return`${m},0 0,${r} ${r},${r}`;case"down":return`0,0 ${r},0 ${m},${r}`;case"left":return`${r},0 ${r},${r} 0,${m}`;case"right":return`0,0 0,${r} ${r},${m}`;default:return`${m},0 0,${r} ${r},${r}`}},l=(()=>{const m=r/2;switch(t){case"up":return{top:{x:a+m,y:s},bottom:{x:a+m,y:s+r},left:{x:a,y:s+r},right:{x:a+r,y:s+r}};case"down":return{top:{x:a+m,y:s},bottom:{x:a+m,y:s+r},left:{x:a,y:s},right:{x:a+r,y:s}};case"left":return{top:{x:a+r,y:s},bottom:{x:a+r,y:s+r},left:{x:a,y:s+m},right:{x:a+r,y:s+m}};case"right":return{top:{x:a,y:s},bottom:{x:a,y:s+r},left:{x:a,y:s+m},right:{x:a+r,y:s+m}};default:return{top:{x:a+m,y:s},bottom:{x:a+m,y:s+r},left:{x:a,y:s+r},right:{x:a+r,y:s+r}}}})();return e.jsxs("div",{className:`absolute ${d}`,style:{left:`${a}px`,top:`${s}px`},children:[e.jsx("svg",{width:r,height:r,className:`cursor-pointer transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-opacity-50 ${d}`,onClick:o,onKeyDown:h,tabIndex:"0",role:"button","aria-label":`Triangle pointing ${t}`,children:e.jsx("polygon",{points:k(),className:"fill-current stroke-current stroke-2 transition-colors duration-200 hover:opacity-80"})}),Object.entries(l).map(([m,b])=>e.jsx("div",{className:"absolute w-2 h-2 bg-emerald-600 rounded-full opacity-0 hover:opacity-100 transition-all duration-200 cursor-crosshair hover:scale-150 hover:bg-emerald-500",style:{left:`${b.x-a-4}px`,top:`${b.y-s-4}px`},"data-connection-point":m,"data-x":b.x,"data-y":b.y},m))]})};/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const st=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rt=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,a,s)=>s?s.toUpperCase():a.toLowerCase()),Re=t=>{const r=rt(t);return r.charAt(0).toUpperCase()+r.slice(1)},Qe=(...t)=>t.filter((r,a,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===a).join(" ").trim(),at=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var ot={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nt=c.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:d="",children:i,iconNode:o,...h},k)=>c.createElement("svg",{ref:k,...ot,width:r,height:r,stroke:t,strokeWidth:s?Number(a)*24/Number(r):a,className:Qe("lucide",d),...!i&&!at(h)&&{"aria-hidden":"true"},...h},[...o.map(([N,l])=>c.createElement(N,l)),...Array.isArray(i)?i:[i]]));/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ge=(t,r)=>{const a=c.forwardRef(({className:s,...d},i)=>c.createElement(nt,{ref:i,iconNode:r,className:Qe(`lucide-${st(Re(t))}`,`lucide-${t}`,s),...d}));return a.displayName=Re(t),a};/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lt=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],it=ge("activity",lt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dt=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ct=ge("arrow-left",dt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xt=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],mt=ge("arrow-right",xt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ht=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pt=ge("circle-check-big",ht);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],bt=ge("circle-x",gt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ut=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],yt=ge("circle",ut);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jt=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Nt=ge("gauge",jt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ft=[["path",{d:"M5 12h14",key:"1ays0h"}]],wt=ge("minus",ft);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vt=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],kt=ge("plus",vt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ct=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Pt=ge("power",Ct);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const At=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],St=ge("rotate-cw",At);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bt=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Xe=ge("settings",Bt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],zt=ge("square",Tt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dt=[["path",{d:"M12 9a4 4 0 0 0-2 7.5",key:"1jvsq6"}],["path",{d:"M12 3v2",key:"1w22ol"}],["path",{d:"m6.6 18.4-1.4 1.4",key:"w2yidj"}],["path",{d:"M20 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"iof6y5"}],["path",{d:"M4 13H2",key:"118le4"}],["path",{d:"M6.34 7.34 4.93 5.93",key:"1brd51"}]],Mt=ge("thermometer-sun",Dt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wt=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ot=ge("triangle-alert",Wt);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ht=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],Vt=ge("wrench",Ht);/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lt=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Xt=ge("zap",Lt),R=({type:t="gate",size:r=50,x:a=0,y:s=0,isOpen:d=!0,className:i="text-amber-500 hover:text-amber-600 transition-colors duration-200",onClick:o=null,showIcon:h=!1,customIcon:k=null,iconPosition:N="top",iconSize:l=16,iconColor:m=null,iconOffset:b=8,showStatus:S=!1,status:f="normal"})=>{const w=n=>{o&&o(n,{x:a,y:s,size:r,type:t,isOpen:d,status:f})},M=n=>{(n.key==="Enter"||n.key===" ")&&w(n)},C=()=>{const n={width:`${l}px`,height:`${l}px`};switch(t){case"gate":return d?e.jsx(zt,{style:n}):e.jsx(wt,{style:n});case"ball":return d?e.jsx(yt,{style:n}):e.jsx(Pt,{style:n});case"check":return d?e.jsx(mt,{style:n}):e.jsx(ct,{style:n});case"butterfly":return d?e.jsx(St,{style:n}):e.jsx(Xe,{style:n});case"needle":return d?e.jsx(kt,{style:n}):e.jsx(Xt,{style:n});default:return e.jsx(Xe,{style:n})}},T=()=>{const n={width:`${l}px`,height:`${l}px`};switch(f){case"normal":return e.jsx(pt,{style:n});case"warning":return e.jsx(Ot,{style:n});case"error":return e.jsx(bt,{style:n});case"maintenance":return e.jsx(Vt,{style:n});default:return e.jsx(it,{style:n})}},P=()=>k||(S?T():C()),E=()=>{const n=l/2,p=b;switch(N){case"top":return{x:r/2-n,y:-l-p};case"bottom":return{x:r/2-n,y:r+p};case"left":return{x:-l-p,y:r/2-n};case"right":return{x:r+p,y:r/2-n};case"top-left":return{x:-n-p,y:-n-p};case"top-right":return{x:r-n+p,y:-n-p};case"bottom-left":return{x:-n-p,y:r-n+p};case"bottom-right":return{x:r-n+p,y:r-n+p};case"center":return{x:r/2-n,y:r/2-n};default:return{x:r/2-n,y:-l-p}}},Z=()=>{if(m)return m;if(S)switch(f){case"normal":return"text-emerald-600";case"warning":return"text-yellow-500";case"error":return"text-red-500";case"maintenance":return"text-blue-500";default:return"text-gray-500"}return d?"text-emerald-600":"text-red-500"},z=()=>{const n=r/2,p=r/4;switch(t){case"gate":return e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:p,y:p,width:n,height:n,className:"fill-current stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:0,x2:n,y2:p,className:"stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:r-p,x2:n,y2:r,className:"stroke-current stroke-2"}),!d&&e.jsx("line",{x1:p,y1:n,x2:r-p,y2:n,className:"stroke-red-500 stroke-[3]"})]});case"ball":return e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:n,cy:n,r:p,className:"fill-current stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:0,x2:n,y2:n-p,className:"stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:n+p,x2:n,y2:r,className:"stroke-current stroke-2"}),d?e.jsx("line",{x1:n-p/2,y1:n,x2:n+p/2,y2:n,className:"stroke-emerald-600 stroke-2"}):e.jsx("line",{x1:n,y1:n-p/2,x2:n,y2:n+p/2,className:"stroke-red-500 stroke-2"})]});case"check":return e.jsxs(e.Fragment,{children:[e.jsx("polygon",{points:`${p},${p} ${r-p},${p} ${n},${r-p}`,className:"fill-current stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:0,x2:n,y2:p,className:"stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:r-p,x2:n,y2:r,className:"stroke-current stroke-2"})]});case"butterfly":return e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:n,cy:n,r:p,className:"fill-none stroke-current stroke-2"}),e.jsx("ellipse",{cx:n,cy:n,rx:d?2:p,ry:p,className:"fill-current stroke-current stroke-2",transform:d?`rotate(90 ${n} ${n})`:""}),e.jsx("line",{x1:n,y1:0,x2:n,y2:p,className:"stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:r-p,x2:n,y2:r,className:"stroke-current stroke-2"})]});case"needle":return e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:n,cy:n,r:p,className:"fill-none stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:n-p,x2:n,y2:n+p,className:"stroke-current stroke-2"}),e.jsx("line",{x1:n-p,y1:n,x2:n+p,y2:n,className:"stroke-current stroke-2"}),e.jsx("circle",{cx:n,cy:n,r:p/3,className:`fill-current ${d?"stroke-emerald-600":"stroke-red-500"} stroke-2`}),e.jsx("line",{x1:n,y1:0,x2:n,y2:p,className:"stroke-current stroke-2"}),e.jsx("line",{x1:n,y1:r-p,x2:n,y2:r,className:"stroke-current stroke-2"})]});default:return e.jsx(e.Fragment,{children:e.jsx("rect",{x:p,y:p,width:n,height:n,className:"fill-current stroke-current stroke-2"})})}},_={top:{x:a+r/2,y:s},bottom:{x:a+r/2,y:s+r},left:{x:a,y:s+r/2},right:{x:a+r,y:s+r/2}},ne=E();return e.jsxs("div",{className:`absolute ${i}`,style:{left:a,top:s},children:[e.jsx("svg",{width:r,height:r,className:`cursor-pointer transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-amber-500 focus:ring-opacity-50 ${i}`,onClick:w,onKeyDown:M,tabIndex:"0",role:"button","aria-label":`${t} valve - ${d?"open":"closed"} - status: ${f}`,children:e.jsx("g",{className:"transition-colors duration-200 hover:opacity-80",children:z()})}),h&&e.jsx("div",{className:`absolute flex items-center justify-center transition-all duration-200 ${Z()}`,style:{left:ne.x,top:ne.y,width:`${l}px`,height:`${l}px`},title:S?`Status: ${f}`:`${t} valve: ${d?"open":"closed"}`,children:P()}),Object.entries(_).map(([n,p])=>e.jsx("div",{className:"absolute w-2 h-2 bg-amber-600 rounded-full opacity-0 hover:opacity-100 transition-all duration-200 cursor-crosshair hover:scale-150 hover:bg-amber-500",style:{left:p.x-a-4,top:p.y-s-4},"data-connection-point":n,"data-x":p.x,"data-y":p.y},n))]})},Ue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAn4AAAKACAYAAAACSHUJAADvpUlEQVR42uydCXSU9b33HzPx3ve+vffa3t779r232tZbbdmzSmvLdUFtBRIIJLPPPNkhYJRaq7VVyYTsmUwCEQhBCgJtFSEsIYBAEZRNoCwiKlkhG2SbLdtkmZnf/T/PTHRAQJYsk+T7Oed7ZpLJMpzjab79Ld8fBwAAAAAABg56TyoRH5Ok/0DHdAuZTjsOLep2HF7U4TimO0hHksI4N5SU5MMBAAAAAIDhB11Z7Ss+XigIoPP6E3Qhh+hMJtHxFJfOZRNdyCP6PHsFUce9HINOx0ho+RoYQAAAAACA4QLl/9pl+g6+8ASdSK6lo0ndjgOvtjgO/KHFcfCPZiaL48DvW+wHXjXSsTccdOClNbR15o84N0SFMH8AAAAAAN4MEXcPHZgvEZ8XRSygbeHdjnUhPfY10zrsa6fbHGumCepyy2YX9KdnO+nPM4neC2unnYotVCQP4hiU9xbMHwAAAACAN0KZnI9g/MTn2yKSqUROTmbonOtnEf057Kayr5vlpA0zibZKiX2vjYrmzOQYdCJWwgEAAAAAAO+Blr3tIz4u4nxoo7KQdinIvn6mXTB0zg2z6FZkXz/LaV8f2kPvzCYmM9Hj3yGOu4dWYeYPAAAAAMAroNPxEleV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