@notmrabhi/flowforge 0.1.5 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notmrabhi/flowforge",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Schema-driven form renderer and workflow engine for miniOrange IAM",
5
5
  "license": "UNLICENSED",
6
6
  "author": "miniOrange",
@@ -1 +0,0 @@
1
- "use strict";const e=require("react"),i=require("reactflow"),C=require("@mui/material"),se=require("react-icons/gr"),ce=require("./messages-O9Tw_XXR.js"),E=require("react-icons/md"),W=require("react-icons/fa"),fe=require("react-icons/fi"),I=require("./canvasTokens-gKNYrPl4.js"),V=e.createContext({onEditNode:()=>{},onDeleteNode:()=>{},onAddStep:()=>{},onClickAddTrigger:()=>{},messages:ce.defaultFlowForgeMessages,nodeRegistry:null,nodeBody:"full"}),w=()=>e.useContext(V),Z=()=>e.createElement("div",{style:{width:350,display:"flex",justifyContent:"center"}},e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0,left:"50%"}}),e.createElement("div",{style:{padding:"8px 28px",borderRadius:999,background:"#f5f5f5",border:"1.5px solid #bdbdbd",fontSize:13,fontWeight:500,color:"#424242",userSelect:"none"}},"Start")),Y=()=>e.createElement("div",{style:{width:350,display:"flex",justifyContent:"center"}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0,left:"50%"}}),e.createElement("div",{style:{padding:"8px 28px",borderRadius:999,background:"#f5f5f5",border:"1.5px solid #bdbdbd",fontSize:13,fontWeight:500,color:"#424242",userSelect:"none"}},"End")),J=()=>{const{onClickAddTrigger:t,messages:l}=w();return e.createElement("div",{style:{width:350,display:"flex",justifyContent:"center"}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0,left:"50%"}}),e.createElement(C.Tooltip,{title:l.addTriggerTooltip,placement:"top",arrow:!0},e.createElement("div",{onClick:t,role:"button",tabIndex:0,onKeyDown:s=>{s.key==="Enter"&&t()},style:{padding:"10px 24px",borderRadius:8,border:"1.5px dashed #d0d0d0",background:"#fff",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:8}},e.createElement(se.GrTrigger,{size:16}),e.createElement("span",{className:"ff-text-black",style:{fontSize:13},"data-testid":"add-trigger-btn-text"},l.addTriggerButton))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0,left:"50%"}}))},de=({id:t})=>{const{onAddStep:l}=w();return e.createElement("div",{onClick:()=>l(t),role:"button",tabIndex:0,onKeyDown:s=>{s.key==="Enter"&&l(t)},style:{width:28,height:28,borderRadius:"50%",border:"1.5px solid #9e9e9e",background:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:18,color:"#757575",lineHeight:1,userSelect:"none"}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),"+",e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))};function me(t){return t?t==="END_USER_CREATION"?"New User Registration":t==="END_USER_UPDATION"?"On User Update":t.replace(/[_-]+/g," ").replace(/\b\w/g,l=>l.toUpperCase()):""}function pe(t){const l=typeof t=="string"?t:t.value??"";return l==="SIGNUP_FLOW"?"User Self-Registration":l==="ADMIN_CREATION_FLOW"?"Create User via Admin Portal":l==="SHEDULAR"?"Scheduler":typeof t!="string"&&t.label?t.label:l.replace(/[_-]+/g," ").replace(/\b\w/g,s=>s.toUpperCase())}const Q=({data:t})=>{const{onClickAddTrigger:l}=w(),{type:s,eventType:m,sources:a,label:r,source:p,previewWorkflow:n,executionStatus:o,infoText:f="This node decides the flow trigger type and configuration."}=t??{},u=b=>{b==null||b.stopPropagation(),l()},g=Array.isArray(a)&&a.length>0,x=!!(r||p),d=s==="scheduler"?"Scheduler Trigger":s==="event"||g||x?"Event Trigger Source":"Select Trigger",c=s==="scheduler"?e.createElement("span",null,"Scheduler to be configured"):s==="event"||g?e.createElement("div",null,e.createElement("div",{className:"ff-d-flex ff-align-items-center"},e.createElement("span",{style:{fontWeight:600}},me(m)),e.createElement("span",{className:"ff-ms-2 ff-text-muted",style:{fontSize:12}},"via")),e.createElement("div",{className:"ff-d-flex ff-flex-wrap ff-mt-2",style:{gap:4}},g?a.map((b,k)=>e.createElement(C.Chip,{key:k,label:pe(b),variant:"outlined",size:"small",className:"ff-text-dark"})):e.createElement("span",{className:"ff-text-muted",style:{fontSize:12}},"No source selected"))):x?e.createElement("div",{className:"ff-d-flex ff-flex-wrap ff-align-items-center",style:{gap:6}},r&&e.createElement("span",{style:{fontWeight:600}},r),p&&e.createElement(C.Chip,{label:p,variant:"outlined",size:"small"})):e.createElement("span",{role:"button",tabIndex:0,onClick:u,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&u(b)},style:{cursor:"pointer",color:"#1e88e5"}},"Click to select a trigger to start your workflow"),N=o?e.createElement(e.Fragment,null,o.status==="success"&&e.createElement(W.FaCheckCircle,{size:16,color:"#1DBF60",style:{marginRight:8}}),o.status==="failed"&&e.createElement(W.FaTimesCircle,{size:16,color:"#f44336",style:{marginRight:8}})):e.createElement("div",{className:"ff-d-flex ff-align-items-center"},!n&&e.createElement("div",{role:"button",tabIndex:0,onClick:u,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&u(b)},className:"ff-me-2",style:{cursor:"pointer",color:"#212121"},"aria-label":"Edit trigger"},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement(C.Tooltip,{title:e.createElement("div",null,f),placement:"right",arrow:!0},e.createElement("span",null,e.createElement(E.MdInfoOutline,{color:"gray",size:16}))));return e.createElement("div",{style:{width:350}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #a5d6a7",borderRadius:8,background:"#fff",overflow:"hidden"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center",style:{padding:"10px 6px"}},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{style:{width:28,height:28,borderRadius:6,background:"rgba(76,175,80,0.1)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(E.MdInput,{size:16,color:"#388e3c"})),e.createElement("span",{style:{fontSize:14,fontWeight:600,color:"#212121"}},d)),e.createElement("div",{className:"ff-d-flex ff-align-items-center"},N)),e.createElement("div",{style:{background:"#f5f5f5",fontSize:12,color:"#212121",padding:"10px 6px",margin:"0 12px 12px",borderRadius:6}},c)),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0},id:"1"}))},X=({rail:t,cardWidth:l})=>{const s=l/2;l/2+t.indent;const m="var(--ff-edge-color, #b0bec5)";return e.createElement("svg",{width:l+t.indent+200,height:t.height,style:{position:"absolute",left:0,top:"100%",pointerEvents:"none",overflow:"visible"}},e.createElement("line",{x1:s,y1:0,x2:s,y2:t.height,stroke:m,strokeWidth:1.5}),t.branches.map((a,r)=>{const p=a.y;return e.createElement("g",{key:r,transform:`translate(0, ${p})`},e.createElement("rect",{x:s-5,y:-5,width:10,height:10,fill:"#fff",stroke:m,strokeWidth:1.5,transform:`rotate(45, ${s}, 0)`}),e.createElement("text",{x:s+14,y:4,fontSize:12,fontWeight:500,fill:"var(--ff-text, #212121)",style:{fontFamily:"sans-serif"}},a.label))}))},ee=({id:t,data:l})=>{const{onEditNode:s,onDeleteNode:m}=w(),{conditions:a=[],infoText:r="Filter conditions applied to workflow data",_branchRail:p}=l;return e.createElement("div",{style:{width:350,position:"relative"}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #ffe082",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-mb-2 ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2"},e.createElement("div",{className:"ff-d-flex ff-align-items-center"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded",style:{width:25,height:25,background:"rgba(255,160,0,0.1)"}},e.createElement(fe.FiFilter,{className:"ff-text-warning",size:16})),e.createElement("span",{className:"ff-ms-2 ff-fw-medium ff-text-dark",style:{fontSize:14}},"Filter")),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},e.createElement("div",{role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),s(t)},onKeyDown:n=>{n.key==="Enter"&&(n.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),m(t)},onKeyDown:n=>{n.key==="Enter"&&(n.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})),e.createElement(C.Tooltip,{title:r,placement:"right",arrow:!0},e.createElement("div",{className:"ff-ms-2"},e.createElement(E.MdInfoOutline,{color:"gray",size:16}))))),e.createElement("div",{className:"ff-p-2 ff-mx-2 ff-mb-2 ff-rounded",style:{background:"#fafafa",fontSize:12}},a.length===0?e.createElement("span",{className:"ff-text-muted"},"No conditions configured"):a.map((n,o)=>e.createElement("div",{key:o,className:"ff-d-flex ff-align-items-center ff-mb-1"},e.createElement("p",{className:"ff-m-0 ff-fw-bold ff-me-1 ff-text-truncate",style:{maxWidth:100},title:n.field},n.field),e.createElement("span",{className:"ff-text-muted"},n.operator),e.createElement("p",{className:"ff-text-dark ff-text-truncate ff-mx-1 ff-m-0",title:n.value},n.value),o<a.length-1&&e.createElement("p",{className:"ff-bg-primary ff-text-white ff-fw-bold ff-ms-1 ff-px-1 ff-rounded-1 ff-m-0"},n.logicalOperator))))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}),p&&e.createElement(X,{rail:p,cardWidth:350}))},te=({id:t,data:l})=>{const{onEditNode:s,onDeleteNode:m,nodeRegistry:a,nodeBody:r="full"}=w(),{title:p="Task",descriptorType:n,groupBlocks:o,groups:f,roles:u,groupId:g,roleId:x,infoText:d=""}=l,c=n?a==null?void 0:a.forType(n):void 0,N=c==null?void 0:c.icon,b=y=>y==null?"":typeof y=="string"?y:typeof y=="object"&&"label"in y?String(y.label):String(y),k=y=>Array.isArray(y)?y.map(b).filter(Boolean):y!=null&&y!==""?[b(y)]:[],h=(o==null?void 0:o.flatMap(y=>y.groups??[]))??[...k(f),...k(u),...k(g),...k(x)],T=h.length>0;return e.createElement("div",{style:{width:350}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #b0bec5",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},N&&e.createElement("div",{style:{display:"flex",alignItems:"center"}},N),e.createElement("span",{className:"ff-fw-medium ff-text-dark",style:{fontSize:14}},p)),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},e.createElement("div",{role:"button",tabIndex:0,onClick:y=>{y.stopPropagation(),s(t)},onKeyDown:y=>{y.key==="Enter"&&(y.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,onClick:y=>{y.stopPropagation(),m(t)},onKeyDown:y=>{y.key==="Enter"&&(y.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})),d&&e.createElement(C.Tooltip,{title:d,placement:"right",arrow:!0},e.createElement("div",{className:"ff-ms-2"},e.createElement(E.MdInfoOutline,{color:"gray",size:16}))))),r!=="title-only"&&e.createElement("div",{className:"ff-mx-2 ff-mb-2 ff-p-2 ff-rounded",style:{background:"#fafafa",fontSize:12}},c!=null&&c.renderNode?c.renderNode(l):T?e.createElement("div",{className:"ff-d-flex ff-flex-wrap ff-gap-1"},h.map((y,P)=>e.createElement("span",{key:P,className:"ff-badge ff-bg-dark ff-text-white ff-py-1 ff-px-2 ff-rounded",style:{fontSize:11},title:y},y))):e.createElement("span",{className:"ff-text-muted"},"Not configured"))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))},F=5,ne=({id:t,data:l})=>{const{onEditNode:s,onDeleteNode:m}=w(),{approvalData:a,isPreview:r=!1,_branchRail:p}=l,n=(a==null?void 0:a.policy)??{},o=n.stages??[],f=o.length,u=o.slice(0,F),g=f-F,x=n.name??n.policyName??"Untitled Policy";return e.createElement("div",{style:{width:350,position:"relative"}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #ffe082",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-mb-2 ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded",style:{width:25,height:25,background:"rgba(251,192,45,0.2)"}},e.createElement(E.MdCheckCircle,{style:{color:"#FBC02D"},size:16})),e.createElement("span",{className:"ff-fw-medium ff-text-dark",style:{fontSize:14}},"Approval Policy")),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},!r&&e.createElement("div",{role:"button",tabIndex:0,style:{cursor:"pointer"},onClick:d=>{d.stopPropagation(),s(t)},onKeyDown:d=>{d.key==="Enter"&&(d.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16,className:"ff-text-secondary"})),!r&&e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,style:{cursor:"pointer"},onClick:d=>{d.stopPropagation(),m(t)},onKeyDown:d=>{d.key==="Enter"&&(d.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})),e.createElement(C.Tooltip,{title:"This approval policy determines who must approve a request before the workflow continues.",arrow:!0,placement:"right"},e.createElement("span",{className:"ff-ms-2 ff-d-inline-flex"},e.createElement(E.MdInfoOutline,{color:"gray",size:16}))))),e.createElement("div",{className:"ff-p-2 ff-rounded ff-mx-2 ff-mb-2",style:{background:"#FCFCFC"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-start ff-align-items-center ff-mb-2"},e.createElement("h6",{className:"ff-text-dark ff-mb-0 ff-text-truncate ff-flex-grow-1 ff-me-2",style:{fontSize:13,fontWeight:700},title:x},x),e.createElement("span",{className:"ff-badge ff-rounded-pill ff-px-2 ff-py-1 ff-flex-shrink-0",style:{background:"#FFF9C4",color:"#616161",fontSize:11,fontWeight:600}},f," Stage",f!==1?"s":"")),o.length>0?e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:8}},u.map((d,c)=>{var P,z,S;const N=((P=d.stageName)==null?void 0:P.trim())||`Stage ${c+1}`,b=Array.isArray(d.userIds)?d.userIds.length:0,k=((z=d.groupName)==null?void 0:z.trim())??"",h=((S=d.roleName)==null?void 0:S.trim())??"",T=b>0||k||h;let y="Not configured";return k?y=`Group: ${k}`:h?y=`Role: ${h}`:b>0&&(y=`${b} approver${b!==1?"s":""}`),e.createElement("div",{key:c,className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{className:"ff-rounded-circle ff-d-flex ff-align-items-center ff-justify-content-center ff-flex-shrink-0",style:{width:28,height:28,background:"#FFF9C4",color:"#5D4037",fontSize:12,fontWeight:700}},c+1),e.createElement("div",{className:"ff-flex-grow-1 ff-rounded ff-p-2 ff-d-flex ff-justify-content-between ff-align-items-center ff-border",style:{background:"#FFFDE7",borderColor:"#FEE79A"}},e.createElement("span",{style:{fontSize:12,fontWeight:700,color:"#212121"}},N),e.createElement("span",{className:`ff-d-flex ff-align-items-center ff-gap-1 ${T?"ff-text-dark":"ff-text-muted"}`,style:{fontSize:12}},e.createElement(E.MdPeople,{size:16,className:"ff-flex-shrink-0",style:{color:T?"#5D4037":"#9E9E9E"}}),y)))}),g>0&&e.createElement("div",{className:"ff-text-center ff-fw-bold ff-py-2 ff-border ff-rounded",style:{fontSize:11,color:"#1976d2",borderColor:"#FEE79A",background:"#FFFDE7",borderStyle:"dashed",cursor:r?"default":"pointer"},role:r?void 0:"button",tabIndex:r?void 0:0,onClick:d=>{r||(d.stopPropagation(),s(t))},onKeyDown:d=>{r||d.key!=="Enter"||(d.stopPropagation(),s(t))}},"+ ",g," More Stage",g>1?"s":"")):e.createElement("div",{className:"ff-text-center ff-py-3 ff-rounded ff-border",style:{fontSize:12,color:"#9e9e9e",background:"#FFFDE7",borderColor:"#FEE79A",borderStyle:"dashed"}},"No stages configured"))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}),p&&e.createElement(X,{rail:p,cardWidth:350}))},oe=({id:t,data:l})=>{const{onEditNode:s,onDeleteNode:m}=w(),{duration:a,unit:r}=l,p=a!=null&&r,n=p?`Wait ${a} ${r}`:"Not configured";return e.createElement("div",{style:{width:350}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #b0bec5",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded",style:{width:25,height:25,background:"rgba(33,150,243,0.1)"}},e.createElement(E.MdSchedule,{size:16,color:"#1976d2"})),e.createElement("span",{className:"ff-fw-medium ff-text-dark",style:{fontSize:14}},"Delay")),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},e.createElement("div",{role:"button",tabIndex:0,onClick:o=>{o.stopPropagation(),s(t)},onKeyDown:o=>{o.key==="Enter"&&(o.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,onClick:o=>{o.stopPropagation(),m(t)},onKeyDown:o=>{o.key==="Enter"&&(o.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})))),e.createElement("div",{className:"ff-mx-2 ff-mb-2 ff-p-2 ff-rounded",style:{background:"#fafafa",fontSize:12}},e.createElement("span",{className:p?"ff-text-dark ff-fw-medium":"ff-text-muted"},n))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))},R={email:{label:"Email",bg:"#e3f2fd",color:"#1565c0",iconType:E.MdEmail},slack:{label:"Slack",bg:"#e8f5e9",color:"#2e7d32",iconType:E.MdNotifications},teams:{label:"MS Teams",bg:"#ede7f6",color:"#4527a0",iconType:E.MdNotifications},sms:{label:"SMS",bg:"#fce4ec",color:"#880e4f",iconType:E.MdSms},"in-app":{label:"In-App",bg:"#fff3e0",color:"#e65100",iconType:E.MdNotifications},webhook:{label:"Webhook",bg:"#f3e5f5",color:"#6a1b9a",iconType:E.MdWebhook}},ge={label:"Notification",bg:"rgba(156,39,176,0.1)",color:"#7b1fa2",iconType:E.MdNotifications};function ue(t){var l;switch(t.channel){case"email":return((l=t.emailTo)==null?void 0:l.join(", "))??t.recipient??null;case"slack":return t.slackChannel??null;case"teams":return t.teamsMessage?"Message configured":null;case"sms":return t.smsTo??null;case"in-app":return t.inAppRecipient??null;case"webhook":return t.webhookUrl??null;default:return t.recipient??null}}function ye(t){switch(t.channel){case"email":return t.emailSubject??t.subject??null;case"slack":{const l=t.slackMessage;return l?l.length>60?`${l.slice(0,60)}…`:l:null}case"in-app":return t.inAppTitle??null;default:return t.subject??null}}const le=({id:t,data:l})=>{const{onEditNode:s,onDeleteNode:m}=w(),a=l,r=a.channel&&R[a.channel]?R[a.channel]:ge,p=ue(a),n=ye(a),o=!!(a.channel&&p),f=r.iconType;return e.createElement("div",{style:{width:I.NODE_WIDTH}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #b0bec5",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded",style:{width:25,height:25,background:r.bg}},e.createElement(f,{size:16,color:r.color})),e.createElement("span",{className:"ff-fw-medium ff-text-dark",style:{fontSize:14}},a.channel?`${r.label} Notification`:"Notification")),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},e.createElement("div",{role:"button",tabIndex:0,onClick:u=>{u.stopPropagation(),s(t)},onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,onClick:u=>{u.stopPropagation(),m(t)},onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})))),e.createElement("div",{className:"ff-mx-2 ff-mb-2 ff-p-2 ff-rounded",style:{background:"#fafafa",fontSize:12}},o?e.createElement("div",{className:"ff-d-flex ff-flex-column ff-gap-1"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("span",{className:"ff-px-2 ff-py-1 ff-rounded",style:{fontSize:10,background:r.bg,color:r.color,fontWeight:600,flexShrink:0}},r.label),e.createElement("span",{className:"ff-text-dark ff-text-truncate",style:{maxWidth:220}},p)),n&&e.createElement("span",{className:"ff-text-muted ff-text-truncate",style:{maxWidth:280}},n)):e.createElement("span",{className:"ff-text-muted"},"Not configured"))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))},H={"api-key":"API Key",hmac:"HMAC"},re=({data:t})=>{const{onClickAddTrigger:l}=w(),{label:s="Webhook Trigger",endpointUrl:m,authMethod:a,source:r}=t,p=o=>{o.stopPropagation(),l()},n=o=>{o.stopPropagation(),m&&navigator.clipboard.writeText(m).catch(()=>{})};return e.createElement("div",{style:{width:I.NODE_WIDTH}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #90caf9",borderRadius:8,background:"#fff",overflow:"hidden"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-2"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{style:{width:28,height:28,borderRadius:6,background:"rgba(33,150,243,0.1)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(E.MdWebhook,{size:16,color:"#1565c0"})),e.createElement("span",{style:{fontSize:13,fontWeight:600,color:"#212121"}},"Webhook Trigger")),e.createElement("div",{role:"button",tabIndex:0,onClick:p,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&p(o)},className:"ff-d-flex ff-align-items-center",style:{paddingRight:4,cursor:"pointer"}},e.createElement(E.MdOutlineModeEdit,{size:16,color:"#555"}))),e.createElement("div",{className:"ff-mx-2 ff-mb-2 ff-p-2 ff-rounded",style:{background:"#e3f2fd",border:"1px solid #90caf9"}},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-flex-wrap ff-gap-2 ff-mb-1"},e.createElement("span",{style:{fontSize:12,color:"#1565c0",fontWeight:600}},s),r&&e.createElement("span",{className:"ff-px-2 ff-py-1 ff-rounded",style:{fontSize:11,background:"#fff",border:"1px solid #90caf9",color:"#1565c0"}},r),a&&a!=="none"&&H[a]&&e.createElement("span",{className:"ff-px-2 ff-py-1 ff-rounded",style:{fontSize:10,background:"#1565c0",color:"#fff",fontWeight:600}},H[a])),m&&e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-1",style:{marginTop:4}},e.createElement("span",{style:{fontSize:10,color:"#1565c0",fontFamily:"monospace",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},m),e.createElement(C.Tooltip,{title:"Copy URL",placement:"top",arrow:!0},e.createElement("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&n(o)},style:{cursor:"pointer",flexShrink:0}},e.createElement(E.MdContentCopy,{size:12,color:"#1565c0"})))))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))},ie=({id:t,data:l})=>{var x;const{onEditNode:s,onDeleteNode:m,nodeRegistry:a}=w(),{method:r,url:p,descriptorType:n}=l,o=n?(x=a==null?void 0:a.forType(n))==null?void 0:x.icon:e.createElement(E.MdHttp,{size:16,color:"#546e7a"}),f=!!(r&&p),u=(r==null?void 0:r.toUpperCase())??"",g=I.HTTP_METHOD_STYLE[u]??null;return e.createElement("div",{style:{width:I.NODE_WIDTH}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #b0bec5",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{style:{width:25,height:25,display:"flex",alignItems:"center",justifyContent:"center"}},o),e.createElement("span",{className:"ff-fw-medium ff-text-dark",style:{fontSize:14}},"REST API Call")),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},e.createElement("div",{role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),s(t)},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),m(t)},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})))),e.createElement("div",{className:"ff-mx-2 ff-mb-2 ff-p-2 ff-rounded",style:{background:"#fafafa",fontSize:12}},f?e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},g&&e.createElement("span",{style:{fontSize:10,fontWeight:700,padding:"2px 6px",borderRadius:4,background:g.bg,color:g.color,flexShrink:0}},u),e.createElement("span",{className:"ff-text-dark ff-text-truncate",style:{fontFamily:"monospace",fontSize:11},title:p},p)):e.createElement("span",{className:"ff-text-muted"},"Not configured"))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))},Ee={eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤",contains:"contains",startsWith:"starts with",endsWith:"ends with",isEmpty:"is empty",isNotEmpty:"is not empty"},be=({id:t,data:l})=>{const{onEditNode:s,onDeleteNode:m}=w(),{title:a="Condition Branch",branchConfigs:r=[],defaultBranch:p}=l,n=r.length>0;return e.createElement("div",{style:{width:I.NODE_WIDTH}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #b39ddb",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{style:{width:25,height:25,borderRadius:6,background:"rgba(103,58,183,0.1)",display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement(E.MdCallSplit,{size:16,color:"#512da8"})),e.createElement("span",{className:"ff-fw-medium ff-text-dark",style:{fontSize:14}},a)),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},e.createElement("div",{role:"button",tabIndex:0,onClick:o=>{o.stopPropagation(),s(t)},onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,onClick:o=>{o.stopPropagation(),m(t)},onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})))),e.createElement("div",{className:"ff-mx-2 ff-mb-2 ff-p-2 ff-rounded",style:{background:"#fafafa",fontSize:12}},n?e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4}},r.map((o,f)=>{var d,c;const u=I.BRANCH_PALETTE[f%I.BRANCH_PALETTE.length],g=(d=o.conditions)==null?void 0:d[0],x=(((c=o.conditions)==null?void 0:c.length)??0)-1;return e.createElement("div",{key:o.key,style:{display:"flex",alignItems:"center",gap:6}},e.createElement("span",{style:{fontSize:10,fontWeight:600,padding:"2px 7px",borderRadius:10,background:u.bg,color:u.color,flexShrink:0}},o.label||o.key),g?e.createElement("span",{style:{fontSize:11,color:"#616161",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},g.field," ",Ee[g.operator]??g.operator,g.value?` ${g.value}`:"",x>0?` +${x} more`:""):e.createElement("span",{style:{fontSize:11,color:"#9e9e9e"}},"No conditions yet"))}),p&&e.createElement("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:2}},e.createElement("span",{style:{fontSize:10,fontWeight:600,padding:"2px 7px",borderRadius:10,background:"#f5f5f5",color:"#757575",flexShrink:0}},"Default"),e.createElement("span",{style:{fontSize:11,color:"#9e9e9e"}},"fallback path"))):e.createElement("span",{className:"ff-text-muted"},"Not configured — click edit to add branches"))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))},xe=({id:t,data:l})=>{var d;const{onEditNode:s,onDeleteNode:m,nodeRegistry:a}=w(),{title:r="Sub-Workflow",workflowId:p,workflowLabel:n,descriptorType:o,onPreview:f}=l,u=o?(d=a==null?void 0:a.forType(o))==null?void 0:d.icon:e.createElement(E.MdAccountTree,{size:16,color:"#00695c"}),g=!!p,x=c=>{c.stopPropagation(),p&&f&&f(p)};return e.createElement("div",{style:{width:I.NODE_WIDTH}},e.createElement(i.Handle,{type:"target",position:i.Position.Top,style:{opacity:0}}),e.createElement("div",{style:{border:"1.5px solid #80cbc4",borderRadius:8,background:"#fff"}},e.createElement("div",{className:"ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1"},e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-gap-2"},e.createElement("div",{style:{width:25,height:25,borderRadius:6,background:"rgba(0,137,123,0.1)",display:"flex",alignItems:"center",justifyContent:"center"}},u),e.createElement("span",{className:"ff-fw-medium ff-text-dark",style:{fontSize:14}},r)),e.createElement("div",{className:"node-actions ff-d-flex ff-align-items-center"},e.createElement("div",{role:"button",tabIndex:0,onClick:c=>{c.stopPropagation(),s(t)},onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.stopPropagation(),s(t))}},e.createElement(E.MdOutlineModeEdit,{size:16})),e.createElement("div",{className:"ff-ms-2",role:"button",tabIndex:0,onClick:c=>{c.stopPropagation(),m(t)},onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.stopPropagation(),m(t))}},e.createElement(E.MdDeleteOutline,{color:"red",size:16})))),e.createElement("div",{className:"ff-mx-2 ff-mb-2 ff-p-2 ff-rounded",style:{background:g?"#e0f2f1":"#fafafa",fontSize:12,border:g?"1px solid #b2dfdb":"none"}},g?e.createElement("div",{className:"ff-d-flex ff-align-items-center ff-justify-content-between"},e.createElement("div",{className:"ff-d-flex ff-flex-column ff-gap-1"},e.createElement("span",{style:{fontSize:12,fontWeight:600,color:"#00695c"}},n||p),e.createElement("span",{style:{fontSize:10,color:"#80cbc4",fontFamily:"monospace"}},"ID: ",p)),f&&e.createElement("div",{role:"button",tabIndex:0,onClick:x,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&x(c)},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:3,fontSize:11,color:"#00897b"}},e.createElement(E.MdOpenInNew,{size:13}),"Preview")):e.createElement("span",{className:"ff-text-muted"},"Not configured — select a workflow"))),e.createElement(i.Handle,{type:"source",position:i.Position.Bottom,style:{opacity:0}}))},he={startNode:Z,endNode:Y,addTriggerNode:J,addStepNode:de,triggerNode:Q,filterNode:ee,actionNode:te,approvalNode:ne,delayNode:oe,notificationNode:le,webhookTriggerNode:re,restApiNode:ie,conditionBranchNode:be,subWorkflowNode:xe},Ne=11.5,$=2,A=6,B=40,O=20,_=4,ke=({id:t,sourceX:l,sourceY:s,targetX:m,targetY:a,sourcePosition:r,targetPosition:p,source:n,target:o,data:f})=>{const[u,g,x]=i.getStraightPath({sourceX:l,sourceY:s,targetX:m,targetY:a}),d=f==null?void 0:f.label,c=d==="Pass",N=c||d==="Fail",b=l+(m-l)/3,k=s+(a-s)/3,h=l+2*(m-l)/3,T=s+2*(a-s)/3,y=f==null?void 0:f.onAddStepClick,P=D=>{if(D.stopPropagation(),typeof y!="function")return;const ae={edgeId:t,nodeId:n,sourceNodeId:n,targetNodeId:o,position:"between",referenceNodeId:n,referenceNodeType:f==null?void 0:f.referenceNodeType,stepVisibility:f==null?void 0:f.stepVisibility};y(n,ae)},z=D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),P(D))},S=()=>e.createElement(e.Fragment,null,e.createElement("g",{className:"plus-icon-container"},e.createElement("circle",{r:Ne,className:"edge-plus-circle"}),e.createElement("line",{x1:0,y1:-A,x2:0,y2:A,strokeWidth:$,strokeLinecap:"round",className:"plus-line"}),e.createElement("line",{x1:-A,y1:0,x2:A,y2:0,strokeWidth:$,strokeLinecap:"round",className:"plus-line"})),e.createElement("g",{className:"edge-plus-tooltip",transform:"translate(18, 0)"},e.createElement("rect",{x:0,y:-10,width:65,height:20,rx:4,className:"tooltip-bg"}),e.createElement("path",{d:"M0 -4 L-4 0 L0 4 Z",className:"tooltip-bg"}),e.createElement("text",{x:32,y:0,textAnchor:"middle",dominantBaseline:"central",fill:"white",style:{fontSize:10,fontWeight:600,pointerEvents:"none"}},"Add Step"))),v=y?{onClick:P,onKeyDown:z,role:"button",tabIndex:0,style:{cursor:"pointer",pointerEvents:"all"}}:{style:{cursor:"default",pointerEvents:"all"}};return e.createElement("g",{className:"edge-with-plus-wrapper"},e.createElement(i.BaseEdge,{id:t,path:u}),N?e.createElement(e.Fragment,null,e.createElement("g",{transform:`translate(${b}, ${k})`},e.createElement("rect",{x:-B/2,y:-O/2,width:B,height:O,rx:_,ry:_,fill:c?"#ADE6C5":"#FDBFBF"}),e.createElement("text",{textAnchor:"middle",dominantBaseline:"central",fill:c?"#1DBF60":"#C50000",style:{fontSize:12,fontWeight:500}},d)),e.createElement("g",{className:"nodrag nopan edge-plus-svg",transform:`translate(${h}, ${T})`,"data-testid":"plus-node-icon",...v},e.createElement(S,null))):e.createElement("g",{className:"nodrag nopan edge-plus-svg",transform:`translate(${g}, ${x})`,"data-testid":"plus-node-icon",...v},e.createElement(S,null)))},ve=11.5,K=2,M=6,we=({id:t,sourceX:l,sourceY:s,targetX:m,targetY:a,source:r,target:p,data:n})=>{const[o,f,u]=i.getStraightPath({sourceX:l,sourceY:s,targetX:m,targetY:a}),g=n==null?void 0:n.onAddStepClick,x=c=>{c.stopPropagation(),typeof g=="function"&&g(r,{edgeId:t,nodeId:r,sourceNodeId:r,targetNodeId:p,position:"between",referenceNodeId:r,referenceNodeType:n==null?void 0:n.referenceNodeType,stepVisibility:n==null?void 0:n.stepVisibility,filterId:n==null?void 0:n.filterId,branch:n==null?void 0:n.branch})},d=c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),x(c))};return e.createElement("g",{className:"edge-with-plus-wrapper"},e.createElement(i.BaseEdge,{id:t,path:o,style:{stroke:"#b0bec5"}}),e.createElement("g",{className:"nodrag nopan edge-plus-svg",transform:`translate(${f}, ${u})`,style:{cursor:g?"pointer":"default",pointerEvents:"all",outline:"none"},onClick:g?x:void 0,onKeyDown:g?d:void 0,role:g?"button":void 0,tabIndex:g?0:void 0,"data-testid":"plus-node-icon"},e.createElement("circle",{r:ve,className:"edge-plus-circle"}),e.createElement("line",{x1:0,y1:-M,x2:0,y2:M,strokeWidth:K,strokeLinecap:"round",className:"plus-line"}),e.createElement("line",{x1:-M,y1:0,x2:M,y2:0,strokeWidth:K,strokeLinecap:"round",className:"plus-line"}),e.createElement("g",{className:"edge-plus-tooltip",transform:"translate(18, 0)"},e.createElement("rect",{x:0,y:-10,width:65,height:20,rx:4,className:"tooltip-bg"}),e.createElement("path",{d:"M0 -4 L-4 0 L0 4 Z",className:"tooltip-bg"}),e.createElement("text",{x:32,y:0,textAnchor:"middle",dominantBaseline:"central",fill:"white",style:{fontSize:10,fontWeight:600,pointerEvents:"none"}},"Add Step"))))},Se=({id:t,sourceX:l,sourceY:s,targetX:m,targetY:a})=>{const[r]=i.getStraightPath({sourceX:l,sourceY:s,targetX:m,targetY:a});return e.createElement(i.BaseEdge,{id:t,path:r,style:{stroke:"#b0bec5"}})},Pe=11.5,j=2,L=6,Te=-24,U=40,q=20,G=4,Ce=({id:t,sourceX:l,sourceY:s,targetX:m,targetY:a,source:r,target:p,data:n})=>{const[o,f,u]=i.getStraightPath({sourceX:l,sourceY:s,targetX:m,targetY:a}),g=n==null?void 0:n.label,x=g==="Pass",d=x||g==="Fail",c=n==null?void 0:n.onAddStepClick,N=(n==null?void 0:n.showPlus)!==!1&&!!c,b=h=>{h.stopPropagation(),typeof c=="function"&&c(r,{edgeId:t,nodeId:r,sourceNodeId:r,targetNodeId:p,position:"between",referenceNodeId:r,referenceNodeType:n==null?void 0:n.referenceNodeType,stepVisibility:n==null?void 0:n.stepVisibility})},k=h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),b(h))};return e.createElement("g",{className:"edge-with-plus-wrapper"},e.createElement(i.BaseEdge,{id:t,path:o,style:{stroke:"#b0bec5"}}),e.createElement("g",{className:"nodrag nopan edge-plus-svg",transform:`translate(${f}, ${u})`,style:{cursor:c?"pointer":"default",pointerEvents:"all",outline:"none"},onClick:c?b:void 0,onKeyDown:c?k:void 0,role:c?"button":void 0,tabIndex:c?0:void 0},d&&e.createElement("g",{transform:`translate(0, ${N?Te:0})`},e.createElement("rect",{x:-U/2,y:-q/2,width:U,height:q,rx:G,ry:G,fill:x?"#ADE6C5":"#FDBFBF"}),e.createElement("text",{textAnchor:"middle",dominantBaseline:"central",fill:x?"#1DBF60":"#C50000",style:{fontSize:12,fontWeight:500}},g)),N&&e.createElement("g",{className:"plus-icon-container"},e.createElement("circle",{r:Pe,className:"edge-plus-circle"}),e.createElement("line",{x1:0,y1:-L,x2:0,y2:L,strokeWidth:j,strokeLinecap:"round",className:"plus-line"}),e.createElement("line",{x1:-L,y1:0,x2:L,y2:0,strokeWidth:j,strokeLinecap:"round",className:"plus-line"})),N&&e.createElement("g",{className:"edge-plus-tooltip",transform:"translate(22, 0)"},e.createElement("rect",{x:0,y:-10,width:65,height:20,rx:4,className:"tooltip-bg"}),e.createElement("path",{d:"M0 -4 L-4 0 L0 4 Z",className:"tooltip-bg"}),e.createElement("text",{x:32,y:0,textAnchor:"middle",dominantBaseline:"central",fill:"white",style:{fontSize:10,fontWeight:600,pointerEvents:"none"}},"Add Step"))))},Ie=({id:t,source:l,target:s,sourceX:m,sourceY:a,targetX:r,targetY:p,style:n={},markerEnd:o,data:f})=>{const u=(f==null?void 0:f.verticalRouting)??!1,g=30,x=u?(()=>{const v=p-g;return`M ${m},${v} L ${r},${v} L ${r},${p}`})():(()=>{const v=a+30;return`M ${m},${a} L ${m},${v} L ${r},${v} L ${r},${p}`})(),d=n.stroke||"#d1d5db",c=f==null?void 0:f.label,N=(f==null?void 0:f.isFirst)??!1,b=f==null?void 0:f.onAddStepClick,k=u?p-g:a+30,h=m+(r-m)*(u?.25:.35),T=m+(r-m)*(u?.65:.7),y=k,P=v=>{v.stopPropagation(),b&&b(l,{edgeId:t,nodeId:l,sourceNodeId:l,targetNodeId:s,position:"between",referenceNodeId:l,filterId:f==null?void 0:f.filterId,branch:f==null?void 0:f.branch})},z=11.5,S=6;return e.createElement("g",null,e.createElement("path",{id:t,d:x,fill:"none",stroke:d,strokeWidth:1.5,markerEnd:o}),c&&!u&&e.createElement("g",{transform:`translate(${h}, ${y})`},(()=>{const v=Math.max(44,c.length*7+20);return e.createElement(e.Fragment,null,e.createElement("rect",{x:-v/2,y:-11,width:v,height:22,rx:11,fill:N?"#e8f5e9":"#ffebee",stroke:N?"#81c784":"#e57373",strokeWidth:1}),e.createElement("text",{x:0,y:4,textAnchor:"middle",fontSize:10,fontWeight:600,fill:N?"#2e7d32":"#c62828",style:{fontFamily:"sans-serif",pointerEvents:"none"}},c))})()),b&&e.createElement("g",{transform:`translate(${T}, ${y})`,onClick:P,style:{cursor:"pointer",pointerEvents:"all"},className:"nodrag nopan edge-plus-svg"},e.createElement("circle",{r:z,className:"edge-plus-circle"}),e.createElement("line",{x1:0,y1:-S,x2:0,y2:S,strokeWidth:2,strokeLinecap:"round",className:"plus-line"}),e.createElement("line",{x1:-S,y1:0,x2:S,y2:0,strokeWidth:2,strokeLinecap:"round",className:"plus-line"})))};exports.ActionNode=te;exports.AddTriggerNode=J;exports.ApprovalNode=ne;exports.DelayNode=oe;exports.EdgeWithPlusLabel=ke;exports.EndNode=Y;exports.FilterNode=ee;exports.GatewayBranchEdge=Ie;exports.LabelPlusEdge=Ce;exports.NotificationNode=le;exports.PlainEdge=Se;exports.PlusEdge=we;exports.RestApiNode=ie;exports.StartNode=Z;exports.TriggerNode=Q;exports.WebhookTriggerNode=re;exports.WorkflowCanvasContext=V;exports.builtInNodeTypes=he;