diff --git a/robotframework-ls/assets/robot_flow_explorer_bundle.js b/robotframework-ls/assets/robot_flow_explorer_bundle.js index eb6041b8e8..3b57e0c028 100644 --- a/robotframework-ls/assets/robot_flow_explorer_bundle.js +++ b/robotframework-ls/assets/robot_flow_explorer_bundle.js @@ -1,4 +1,4 @@ -/*! Robot Flow Explorer Version: 0.3.3 */ +/*! Robot Flow Explorer Version: 0.3.4 */ /*! * Apache License * Version 2.0, January 2004 @@ -2783,7 +2783,7 @@ max-width: 320px; left: 32px; z-index: 999; cursor: pointer; -`;t.Copyright=({showCopyright:e=!1})=>{const t="copyright-icon-text",n=(0,i.useTheme)();return e?(0,r.jsx)(a,{id:t,color:"dark"===n.name?n.colors.dark0:n.colors.light0,onClick:()=>window.open("https://robocorp.com","_blank"),children:(0,r.jsx)(o.IconRobocorpOutline,{size:"large"})},t):null}},618:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3823),i=n(9220),o=n(7968),a=n(7571),s=n(3252),l=n(7722),c=n(1022),u=i.styled.div` +`;t.Copyright=({showCopyright:e=!1})=>{const t="copyright-icon-text",n=(0,i.useTheme)();return e?(0,r.jsx)(a,{id:t,color:"dark"===n.name?n.colors.dark0:n.colors.light0,onClick:()=>window.open("https://robocorp.com","_blank"),children:(0,r.jsx)(o.IconRobocorpOutline,{size:"large"})},t):null}},618:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3823),i=n(9220),o=n(7968),a=n(7571),s=n(3252),l=n(7722),c=n(725),u=n(1022),d=i.styled.div` display: flex; flex-direction: row; justify-content: center; @@ -2793,19 +2793,19 @@ max-width: 320px; font-size: 12px; position: relative; gap: 15px; -`,d=i.styled.div` +`,h=i.styled.div` position: absolute; top: -20px; left: 50%; width: 0px; height: 0px; -`,h=i.styled.div` +`,f=i.styled.div` position: absolute; bottom: -6px; left: 50%; width: 0px; height: 0px; -`;t.default=({id:e,ifCondition:t,elseIfCondition:n,ifBlock:i,elseIfBlock:f,elseBlock:p,darkenBG:m=!1})=>{const g=f&&f.length>0;return(0,r.jsx)(u,{id:e,style:{marginBottom:g||p?"16px":"0px",marginTop:g||p?"16px":"0px"},children:(0,r.jsxs)(o.Xwrapper,{children:[g||p?(0,r.jsx)(d,{id:`${e}-head`},`${e}-head`):null,(0,r.jsx)(l.CodeBlock,{id:`${e}-if-branch`,header:"IF",headerIcon:(0,r.jsx)(a.IconBranch,{size:15}),subHeader:(0,c.getStringFromVariable)(t),darkerBG:m,children:i}),g?f?.map(((t,i)=>(0,r.jsx)(l.CodeBlock,{id:`${e}-else-if-branch-${i}`,header:"ELSE IF",subHeader:n?n[i]:"",darkerBG:m,children:t}))):null,p?(0,r.jsx)(l.CodeBlock,{id:`${e}-else-branch`,header:"ELSE",darkerBG:m,children:p},`${e}-else-branch`):null,g||p?(0,r.jsx)(h,{id:`${e}-combine`},`${e}-tail-combine`):null,g||p?(0,r.jsx)(h,{id:`${e}-exit`,style:{bottom:"-20px"}},`${e}-tail-exit`):null,p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-if-branch`,endAnchor:"top"}),(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-else-branch`,endAnchor:"top"}),(0,r.jsx)(s.Arrow,{start:`${e}-if-branch`,end:`${e}-combine`,endAnchor:"left",showHead:!1}),(0,r.jsx)(s.Arrow,{start:`${e}-else-branch`,end:`${e}-combine`,endAnchor:"right",showHead:!1}),(0,r.jsx)(s.Arrow,{start:`${e}-combine`,end:`${e}-exit`,endAnchor:"top"})]}):null,g?(0,r.jsxs)(r.Fragment,{children:[p?null:(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-if-branch`,endAnchor:"top"}),g?f.map(((t,n)=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-else-if-branch-${n}`,endAnchor:"top"}),(0,r.jsx)(s.Arrow,{start:`${e}-else-if-branch-${n}`,end:`${e}-combine`,endAnchor:"left",showHead:!1})]}))):null,p?null:(0,r.jsx)(s.Arrow,{start:`${e}-if-branch`,end:`${e}-combine`,endAnchor:"left",showHead:!1}),p?null:(0,r.jsx)(s.Arrow,{start:`${e}-combine`,end:`${e}-exit`,endAnchor:"top",showHead:!1})]}):null]})})}},4059:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Continue=t.Break=t.Return=t.GenericControlStatement=void 0;const r=n(3823),i=n(9220),o=n(7571),a=n(4633),s=i.styled.div` +`;t.default=({id:e,ifCondition:t,elseIfCondition:n,ifBlock:i,elseIfBlock:p,elseBlock:m,darkenBG:g=!1})=>{const v=p&&p.length>0;return(0,r.jsx)(d,{id:e,style:{marginBottom:v||m?"16px":"0px",marginTop:v||m?"16px":"0px"},children:(0,r.jsxs)(o.Xwrapper,{children:[v||m?(0,r.jsx)(h,{id:`${e}-head`},`${e}-head`):null,(0,r.jsx)(l.CodeBlock,{id:`${e}-if-branch`,header:"IF",headerIcon:(0,r.jsx)(a.IconBranch,{size:15}),subHeader:"string"!=typeof t&&t.type===c.Type.Conditional?(0,u.stringifyConditional)(t):(0,u.stringifyVariable)(t),darkerBG:g,children:i}),v?p?.map(((t,i)=>{const o=n?n[i]:"",a=n?"string"!=typeof o&&o.type===c.Type.Conditional?(0,u.stringifyConditional)(o):(0,u.stringifyVariable)(o):"";return(0,r.jsx)(l.CodeBlock,{id:`${e}-else-if-branch-${i}`,header:"ELSE IF",subHeader:a,darkerBG:g,children:t})})):null,m?(0,r.jsx)(l.CodeBlock,{id:`${e}-else-branch`,header:"ELSE",darkerBG:g,children:m},`${e}-else-branch`):null,v||m?(0,r.jsx)(f,{id:`${e}-combine`},`${e}-tail-combine`):null,v||m?(0,r.jsx)(f,{id:`${e}-exit`,style:{bottom:"-20px"}},`${e}-tail-exit`):null,m?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-if-branch`,endAnchor:"top"}),(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-else-branch`,endAnchor:"top"}),(0,r.jsx)(s.Arrow,{start:`${e}-if-branch`,end:`${e}-combine`,endAnchor:"left",showHead:!1}),(0,r.jsx)(s.Arrow,{start:`${e}-else-branch`,end:`${e}-combine`,endAnchor:"right",showHead:!1}),(0,r.jsx)(s.Arrow,{start:`${e}-combine`,end:`${e}-exit`,endAnchor:"top"})]}):null,v?(0,r.jsxs)(r.Fragment,{children:[m?null:(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-if-branch`,endAnchor:"top"}),v?p.map(((t,n)=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Arrow,{start:`${e}-head`,end:`${e}-else-if-branch-${n}`,endAnchor:"top"}),(0,r.jsx)(s.Arrow,{start:`${e}-else-if-branch-${n}`,end:`${e}-combine`,endAnchor:"left",showHead:!1})]}))):null,m?null:(0,r.jsx)(s.Arrow,{start:`${e}-if-branch`,end:`${e}-combine`,endAnchor:"left",showHead:!1}),m?null:(0,r.jsx)(s.Arrow,{start:`${e}-combine`,end:`${e}-exit`,endAnchor:"top",showHead:!1})]}):null]})})}},4059:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Continue=t.Break=t.Return=t.GenericControlStatement=void 0;const r=n(3823),i=n(9220),o=n(7571),a=n(4633),s=i.styled.div` display: flex; justify-content: center; align-items: center; @@ -2969,7 +2969,7 @@ max-width: 320px; font-size: 11px; line-height: 14px; position: relative; -`;t.default=({id:e,name:t})=>{const[n,o]=(0,i.useState)(!1),l=t?.toLowerCase().startsWith("builtin.comment")||t?.toLowerCase().startsWith("comment");return(0,r.jsx)(a.StyledToolTip,{variant:"arrow",placement:"right",text:n?`RecursionError detected: ${t}`:"",children:(0,r.jsx)(s,{id:e,hasWarning:l||!1,onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},children:t?(0,a.trimToFitKeyword)(t):"Unknown keyword"})})}},6082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3823),i=n(550),o=n(7722);t.default=({id:e,type:t,flavor:n,variables:a,values:s,children:l,darkerBG:c=!1})=>{const u=a?.map((e=>"string"==typeof e?e:e.name)).join(", "),d=s?.map((e=>"string"==typeof e?e:e.name)).join(", ");return(0,r.jsx)(o.CodeBlock,{id:e,header:t||"LOOP",headerIcon:(0,r.jsx)(i.IconRotationRight,{size:15}),subHeader:(u?` ${u}`:"")+(n?` ${n.toUpperCase()}`:"")+(d?` ${d}`:""),darkerBG:c,children:l})}},6223:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(3823),o=n(550),a=n(7722),s=r(n(6484));t.default=({id:e,name:t,args:n,darkerBG:r=!1})=>{if("run keyword"===t.toLowerCase()&&("name"in n||0!==n.length)){const l="name"in n?n.name:n[0];return(0,i.jsx)(a.CodeBlock,{id:e,header:"Setup",subHeader:t,headerIcon:(0,i.jsx)(o.IconLogIn,{size:15}),darkerBG:r,children:(0,i.jsx)(s.default,{id:l,name:l},l)})}return(0,i.jsx)(a.CodeBlock,{id:e,header:"Setup",headerIcon:(0,i.jsx)(o.IconLogIn,{size:15}),darkerBG:r,children:(0,i.jsx)(s.default,{id:t,name:t},t)})}},2658:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.End=t.Start=void 0;const r=n(3823),i=n(9220),o=n(7968),a=n(3252),s=i.styled.div` +`;t.default=({id:e,name:t})=>{const[n,o]=(0,i.useState)(!1),l=t?.toLowerCase().startsWith("builtin.comment")||t?.toLowerCase().startsWith("comment");return(0,r.jsx)(a.StyledToolTip,{variant:"arrow",placement:"right",text:n?`RecursionError detected: ${t}`:"",children:(0,r.jsx)(s,{id:e,hasWarning:l||!1,onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},children:t?(0,a.trimToFitKeyword)(t):"Unknown keyword"})})}},6082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3823),i=n(550),o=n(7722),a=n(1022);t.default=({id:e,type:t,flavor:n,variables:s,values:l,children:c,darkerBG:u=!1})=>{const d=s?.map((e=>"string"==typeof e?(0,a.stringifyVariable)(e):(0,a.stringifyVariable)(e.name))).join(", "),h=l?.map((e=>"string"==typeof e?(0,a.stringifyVariable)(e):(0,a.stringifyVariable)(e.name))).join(", ");return(0,r.jsx)(o.CodeBlock,{id:e,header:t||"LOOP",headerIcon:(0,r.jsx)(i.IconRotationRight,{size:15}),subHeader:(d?` ${d}`:"")+(n?` ${n.toUpperCase()}`:"")+(h?` ${h}`:""),darkerBG:u,children:c})}},6223:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(3823),o=n(550),a=n(7722),s=r(n(6484));t.default=({id:e,name:t,args:n,darkerBG:r=!1})=>{if("run keyword"===t.toLowerCase()&&("name"in n||0!==n.length)){const l="name"in n?n.name:n[0];return(0,i.jsx)(a.CodeBlock,{id:e,header:"Setup",subHeader:t,headerIcon:(0,i.jsx)(o.IconLogIn,{size:15}),darkerBG:r,children:(0,i.jsx)(s.default,{id:l,name:l},l)})}return(0,i.jsx)(a.CodeBlock,{id:e,header:"Setup",headerIcon:(0,i.jsx)(o.IconLogIn,{size:15}),darkerBG:r,children:(0,i.jsx)(s.default,{id:t,name:t},t)})}},2658:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.End=t.Start=void 0;const r=n(3823),i=n(9220),o=n(7968),a=n(3252),s=i.styled.div` display: flex; justify-content: center; align-items: center; @@ -3116,10 +3116,10 @@ max-width: 320px; width: 36px; height: 36px; } -`;t.TaskDropdownSelector=({id:e,displayTaskTitle:t,tasksOrKeywords:n,onItemSelection:s,position:f="top-left",options:p=c})=>{const m={...c,...p};return(0,r.jsxs)(u,{id:e,position:f,children:[(0,r.jsx)(h,{id:`${e}-dropdown`,variant:"secondary",icon:o.IconLayers,width:"auto",size:"small",children:m.showDropItems?n?.map(((n,o)=>(0,r.jsx)(i.Dropdown.Item,{id:`${e}-item-${o}`,active:t===(n.internal_name||n.name),onClick:()=>{s(n)},label:(0,r.jsxs)(i.Box,{display:"flex",flexDirection:"column",children:[(0,r.jsx)(i.Box,{mb:1,style:{fontWeight:600},children:n.name}),(0,r.jsx)(i.Box,{fontSize:10,children:`${(0,l.capitalize)(n.type)} (${l.shortNameTypeMap[n.type]})`})]})},`${e}-item-${(0,a.v4)()}`))):null},`${e}-dropdown`),(0,r.jsxs)(d,{id:`${e}-name-container`,children:[(0,r.jsx)("h5",{style:{fontWeight:600},children:t}),(0,r.jsx)("h5",{children:m?.type?`${(0,l.capitalize)(m.type)} (${l.shortNameTypeMap[m.type]})`:null})]},`${e}-name-container`)]})},t.default=t.TaskDropdownSelector},7836:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskRenderer=t.exploreTask=t.exploreBody=t.exploreTeardown=t.exploreSetup=void 0;const i=n(3823),o=n(9220),a=n(5466),s=n(9233),l=n(4059),c=r(n(618)),u=r(n(387)),d=r(n(6082)),h=r(n(6484)),f=r(n(7369)),p=r(n(9479)),m=n(725),g=r(n(8362)),v=r(n(6223)),y=r(n(5551)),b=o.styled.div` +`;t.TaskDropdownSelector=({id:e,displayTaskTitle:t,tasksOrKeywords:n,onItemSelection:s,position:f="top-left",options:p=c})=>{const m={...c,...p};return(0,r.jsxs)(u,{id:e,position:f,children:[(0,r.jsx)(h,{id:`${e}-dropdown`,variant:"secondary",icon:o.IconLayers,width:"auto",size:"small",children:m.showDropItems?n?.map(((n,o)=>(0,r.jsx)(i.Dropdown.Item,{id:`${e}-item-${o}`,active:t===(n.internal_name||n.name),onClick:()=>{s(n)},label:(0,r.jsxs)(i.Box,{display:"flex",flexDirection:"column",children:[(0,r.jsx)(i.Box,{mb:1,style:{fontWeight:600},children:n.name}),(0,r.jsx)(i.Box,{fontSize:10,children:`${(0,l.capitalize)(n.type)} (${l.shortNameTypeMap[n.type]})`})]})},`${e}-item-${(0,a.v4)()}`))):null},`${e}-dropdown`),(0,r.jsxs)(d,{id:`${e}-name-container`,children:[(0,r.jsx)("h5",{style:{fontWeight:600},children:t}),(0,r.jsx)("h5",{children:m?.type?`${(0,l.capitalize)(m.type)} (${l.shortNameTypeMap[m.type]})`:null})]},`${e}-name-container`)]})},t.default=t.TaskDropdownSelector},7836:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskRenderer=t.exploreTask=t.exploreBody=t.exploreTeardown=t.exploreSetup=void 0;const i=n(3823),o=n(9220),a=n(5466),s=n(9233),l=n(4059),c=r(n(618)),u=r(n(387)),d=r(n(6082)),h=r(n(6484)),f=r(n(7369)),p=r(n(9479)),m=n(725),g=r(n(8362)),v=r(n(6223)),y=r(n(5551)),b=n(1022),w=o.styled.div` display: inline-block; background-color: ${({theme:e})=>e.color("dark100","light80")}; -`;t.exploreSetup=e=>(0,i.jsx)(v.default,{id:"task-setup",name:e.name,args:"args"in e?e.args:[]});t.exploreTeardown=e=>(0,i.jsx)(y.default,{id:"task-teardown",name:e.name,args:"args"in e?e.args:[]});t.exploreBody=(e,n,r)=>{const o=[];if(!e)return o;for(let a=0;a{switch(e?.type){case"if-branch":y=(0,t.exploreBody)(e?.body,n,!r),x=e.condition;break;case"else-if-branch":b.push((0,t.exploreBody)(e?.body,n,!r)),k.push(e.condition);break;case"else-branch":w=(0,t.exploreBody)(e?.body,n,!r)}})),o.push((0,i.jsx)(c.default,{id:`if-statement-${(0,s.v1)()}`,ifCondition:x,ifBlock:y,elseIfCondition:k,elseIfBlock:b,elseBlock:w,darkenBG:r},`if-statement-${(0,s.v1)()}`));break;case"for":o.push((0,i.jsx)(d.default,{id:`for-loop-statement-${(0,s.v1)()}`,type:"FOR",flavor:f.kind,variables:f.variables,values:f.values,darkerBG:r,children:(0,t.exploreBody)(f?.body,n,!r)},`for-loop-statement-${(0,s.v1)()}`));break;case"while":o.push((0,i.jsx)(d.default,{id:`while-loop-statement-${(0,s.v1)()}`,type:"WHILE",values:[f.condition?f.condition:""],darkerBG:r,children:(0,t.exploreBody)(f?.body,n,!r)},`while-loop-statement-${(0,s.v1)()}`));break;case"try":f?.body?.forEach((e=>{switch(e?.type){case"try-branch":S=(0,t.exploreBody)(e?.body,n,!r);break;case"except-branch":C.push((0,t.exploreBody)(e?.body,n,!r)),j.push(e.patterns?e.patterns?.join(", "):"");break;case"else-branch":O=(0,t.exploreBody)(e?.body,n,!r);break;case"finally-branch":M=(0,t.exploreBody)(e?.body,n,!r)}})),o.push((0,i.jsx)(p.default,{id:`try-statement-${(0,s.v1)()}`,tryBlock:S,exceptBlock:C,exceptPatterns:j,elseBlock:O,finallyBlock:M,darkerBG:r},`try-statement-${(0,s.v1)()}`))}}return o};t.exploreTask=(e,n)=>e?(0,i.jsxs)(f.default,{name:e.name,children:[e.type===m.Type.Task&&e.setup?(0,t.exploreSetup)(e.setup):null,(0,t.exploreBody)(e.body,n,!0),e.type===m.Type.Task&&e.teardown?(0,t.exploreTeardown)(e.teardown):null]},`${e.name}`):null;t.TaskRenderer=({id:e,taskOrKeyword:n,pushToFlowHistory:r,afterRender:o=(()=>{})})=>{const[s,l]=(0,a.useState)((0,t.exploreTask)(n,r)),c=(0,a.useCallback)((e=>{null!==e&&o()}),[s]);return(0,a.useEffect)((()=>{l((0,t.exploreTask)(n,r))}),[n]),(0,i.jsx)(b,{ref:c,id:e,children:s})}},5043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskViewControls=void 0;const r=n(3823),i=n(9220),o=n(550),a=n(7968),s=n(4097),l=n(7571),c={showDownload:!0,showReset:!0,showZoomIn:!0,showZoomOut:!0},u=i.styled.div` +`;t.exploreSetup=e=>(0,i.jsx)(v.default,{id:"task-setup",name:e.name,args:"args"in e?e.args:[]});t.exploreTeardown=e=>(0,i.jsx)(y.default,{id:"task-teardown",name:e.name,args:"args"in e?e.args:[]});t.exploreBody=(e,n,r)=>{const o=[];if(!e)return o;for(let a=0;a{switch(e?.type){case"if-branch":y=(0,t.exploreBody)(e?.body,n,!r),k=e.condition;break;case"else-if-branch":w.push((0,t.exploreBody)(e?.body,n,!r)),S.push(e.condition);break;case"else-branch":x=(0,t.exploreBody)(e?.body,n,!r)}})),console.log(">> ifCondition:",k),o.push((0,i.jsx)(c.default,{id:`if-statement-${(0,s.v1)()}`,ifCondition:k,ifBlock:y,elseIfCondition:S,elseIfBlock:w,elseBlock:x,darkenBG:r},`if-statement-${(0,s.v1)()}`));break;case"for":o.push((0,i.jsx)(d.default,{id:`for-loop-statement-${(0,s.v1)()}`,type:"FOR",flavor:f.kind,variables:f.variables,values:f.values,darkerBG:r,children:(0,t.exploreBody)(f?.body,n,!r)},`for-loop-statement-${(0,s.v1)()}`));break;case"while":const e=f.condition||"";o.push((0,i.jsx)(d.default,{id:`while-loop-statement-${(0,s.v1)()}`,type:"WHILE",values:["string"==typeof e?e:e.type===m.Type.Variable?(0,b.stringifyVariable)(e):(0,b.stringifyConditional)(e)],darkerBG:r,children:(0,t.exploreBody)(f?.body,n,!r)},`while-loop-statement-${(0,s.v1)()}`));break;case"try":f?.body?.forEach((e=>{switch(e?.type){case"try-branch":C=(0,t.exploreBody)(e?.body,n,!r);break;case"except-branch":j.push((0,t.exploreBody)(e?.body,n,!r)),O.push(e.patterns?e.patterns?.join(", "):"");break;case"else-branch":M=(0,t.exploreBody)(e?.body,n,!r);break;case"finally-branch":P=(0,t.exploreBody)(e?.body,n,!r)}})),o.push((0,i.jsx)(p.default,{id:`try-statement-${(0,s.v1)()}`,tryBlock:C,exceptBlock:j,exceptPatterns:O,elseBlock:M,finallyBlock:P,darkerBG:r},`try-statement-${(0,s.v1)()}`))}}return o};t.exploreTask=(e,n)=>e?(0,i.jsxs)(f.default,{name:e.name,children:[e.type===m.Type.Task&&e.setup?(0,t.exploreSetup)(e.setup):null,(0,t.exploreBody)(e.body,n,!0),e.type===m.Type.Task&&e.teardown?(0,t.exploreTeardown)(e.teardown):null]},`${e.name}`):null;t.TaskRenderer=({id:e,taskOrKeyword:n,pushToFlowHistory:r,afterRender:o=(()=>{})})=>{const[s,l]=(0,a.useState)((0,t.exploreTask)(n,r)),c=(0,a.useCallback)((e=>{null!==e&&o()}),[s]);return(0,a.useEffect)((()=>{l((0,t.exploreTask)(n,r))}),[n]),(0,i.jsx)(w,{ref:c,id:e,children:s})}},5043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskViewControls=void 0;const r=n(3823),i=n(9220),o=n(550),a=n(7968),s=n(4097),l=n(7571),c={showDownload:!0,showReset:!0,showZoomIn:!0,showZoomOut:!0},u=i.styled.div` display: flex; justify-content: ${({position:e})=>"top-left"===e||"bottom-left"===e?"flex-start":"flex-end"}; flex-direction: row; @@ -3140,7 +3140,7 @@ max-width: 320px; width: auto; height: fit-content; position: relative; -`;t.TaskViewControls=({id:e,onReset:t,onZoomIn:n,onZoomOut:h,onDownloadImg:f=(()=>{}),domIDToSaveImgOf:p,imageName:m,position:g="bottom-right",options:v=c})=>{const y={...c,...v},b=(0,a.useXarrow)(),w=(0,i.useTheme)();return(0,r.jsx)(u,{id:e,position:g,numberOfButtons:4,children:(0,r.jsxs)(d,{id:`${e}-nav`,children:[y.showZoomIn&&void 0!==n?(0,r.jsx)(i.Button,{id:`${e}-nav-zoomIn`,icon:o.IconPlus,size:"medium",variant:"ghost",onClick:()=>{n(),b()}},`${e}-nav-zoomIn`):null,y.showZoomOut&&void 0!==h?(0,r.jsx)(i.Button,{id:`${e}-nav-zoomOut`,icon:o.IconMinus,size:"medium",variant:"ghost",onClick:()=>{h(),b()}},`${e}-nav-zoomOut`):null,y.showReset&&void 0!==t?(0,r.jsx)(i.Button,{id:`${e}-nav-reset`,icon:o.IconTarget,size:"medium",variant:"ghost",onClick:()=>{t(),b()}},`${e}-nav-reset`):null,y.showDownload&&void 0!==p?(0,r.jsx)(i.Button,{id:`${e}-nav-download`,icon:l.IconCamera,size:"medium",variant:"ghost",onClick:()=>{f(),setTimeout((()=>{const e=document.getElementById(p);if(e){const t=document.createElement("div");t.id="robocorp-watermark",t.style.cssText="position:relative;\n top:-20px;\n left:20px;\n width:100%;\n height:auto;\n opacity:0.2;\n z-index:9999;",t.style.fontSize="16px",t.innerHTML="Created with Robocorp
\n

http://www.robocorp.com/

",e.appendChild(t);const n=document.createElement("div");n.style.cssText="position:absolute;top:0px;left:0px;width:100%;height:100%;opacity:0.9;z-index:9999;",n.style.background="dark"===w.name?w.colors.dark100:w.colors.light100,e.parentNode?.appendChild(n),(0,s.toPng)(e,{cacheBust:!0}).then((r=>{const i=document.createElement("a");i.download=m?`${m}.png`:`${p}.png`,i.href=r,i.click(),e.removeChild(t),e.parentNode?.removeChild(n)}))}}),50)}},`${e}-nav-download`):null]},`${e}-nav`)})},t.default=t.TaskViewControls},725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ForKind=t.LogLevel=t.Status=t.PatternType=t.ImportKind=t.VariableKind=t.KeywordKind=t.Type=void 0,function(e){e.Suite="suite",e.Task="task",e.UserKeyword="user-keyword",e.Import="import",e.SuiteVariable="suite-variable",e.Variable="variable",e.Keyword="keyword",e.For="for",e.ForIteration="for-iteration",e.While="while",e.If="if",e.IfBranch="if-branch",e.ElseIfBranch="else-if-branch",e.ElseBranch="else-branch",e.Try="try",e.TryBranch="try-branch",e.ExceptBranch="except-branch",e.FinallyBranch="finally-branch",e.Return="return",e.Break="break",e.Continue="continue"}(t.Type||(t.Type={})),function(e){e.Simple="simple",e.Implemented="implemented",e.RecursionLeaf="recursion-leaf"}(t.KeywordKind||(t.KeywordKind={})),function(e){e.Scalar="scalar",e.List="list",e.Dictionary="dictionary",e.Environment="environment",e.Constant="constant",e.Locator="locator"}(t.VariableKind||(t.VariableKind={})),function(e){e.Library="library",e.Resource="resource",e.Variables="variables"}(t.ImportKind||(t.ImportKind={})),function(e){e.Glob="glob",e.Regexp="regexp",e.Start="start",e.Literal="literal"}(t.PatternType||(t.PatternType={})),function(e){e.Pass="pass",e.Fail="fail",e.Skip="skip",e.NotRun="not-run",e.NotSet="not-set"}(t.Status||(t.Status={})),function(e){e.Trace="trace",e.Debug="debug",e.Info="info",e.Warn="warn",e.Error="error",e.Fail="fail"}(t.LogLevel||(t.LogLevel={})),function(e){e.In="in",e.InRange="in-range",e.InEnumerate="in-enumerate",e.InZip="in-zip"}(t.ForKind||(t.ForKind={}))},1022:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskOrKeywordFromSuite=t.getKeywordFromSuite=t.getTaskFromSuite=t.getFirstTaskOrKeywordFromSuite=t.getSuiteFromValidList=t.getFirstSuite=t.createValidSuiteList=t.isSuiteValid=t.getStringFromVariable=t.shortNameTypeMap=t.capitalize=void 0;t.capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1),t.shortNameTypeMap={task:"T","user-keyword":"UK",keyword:"UK"};t.getStringFromVariable=e=>"string"==typeof e?e:`\${${e.name}}`;t.isSuiteValid=e=>0!==e?.tasks?.length||0!==e?.keywords?.length;t.createValidSuiteList=e=>{const n=[];return(0,t.isSuiteValid)(e)&&n.push(e),e?.suites?.forEach((e=>{const r=(0,t.createValidSuiteList)(e);n.push(...r)})),n};t.getFirstSuite=e=>0===e?.length?void 0:e[0];t.getSuiteFromValidList=(e,t)=>0===t?.length?void 0:t.find((t=>(t?.internal_name||t?.name)===e));t.getFirstTaskOrKeywordFromSuite=e=>e?e?.tasks?.length>0?e?.tasks[0]:e?.keywords?.length>0?e?.keywords[0]:void 0:void 0;t.getTaskFromSuite=(e,t)=>{if(e&&t&&0!==t?.tasks?.length)return t.tasks.find((t=>(t.internal_name||t.name)===e))};t.getKeywordFromSuite=(e,t)=>{if(e&&t&&0!==t?.keywords?.length)return t.keywords.find((t=>(t.internal_name||t.name)===e))};t.getTaskOrKeywordFromSuite=(e,n)=>e?(0,t.getTaskFromSuite)(e,n)||(0,t.getKeywordFromSuite)(e,n):void 0},5478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HideEverythingPanel=t.defaultAnimationDuration=void 0;const r=n(9220);t.defaultAnimationDuration="0.2";const i=r.keyframes` +`;t.TaskViewControls=({id:e,onReset:t,onZoomIn:n,onZoomOut:h,onDownloadImg:f=(()=>{}),domIDToSaveImgOf:p,imageName:m,position:g="bottom-right",options:v=c})=>{const y={...c,...v},b=(0,a.useXarrow)(),w=(0,i.useTheme)();return(0,r.jsx)(u,{id:e,position:g,numberOfButtons:4,children:(0,r.jsxs)(d,{id:`${e}-nav`,children:[y.showZoomIn&&void 0!==n?(0,r.jsx)(i.Button,{id:`${e}-nav-zoomIn`,icon:o.IconPlus,size:"medium",variant:"ghost",onClick:()=>{n(),b()}},`${e}-nav-zoomIn`):null,y.showZoomOut&&void 0!==h?(0,r.jsx)(i.Button,{id:`${e}-nav-zoomOut`,icon:o.IconMinus,size:"medium",variant:"ghost",onClick:()=>{h(),b()}},`${e}-nav-zoomOut`):null,y.showReset&&void 0!==t?(0,r.jsx)(i.Button,{id:`${e}-nav-reset`,icon:o.IconTarget,size:"medium",variant:"ghost",onClick:()=>{t(),b()}},`${e}-nav-reset`):null,y.showDownload&&void 0!==p?(0,r.jsx)(i.Button,{id:`${e}-nav-download`,icon:l.IconCamera,size:"medium",variant:"ghost",onClick:()=>{f(),setTimeout((()=>{const e=document.getElementById(p);if(e){const t=document.createElement("div");t.id="robocorp-watermark",t.style.cssText="position:relative;\n top:-20px;\n left:20px;\n width:100%;\n height:auto;\n opacity:0.2;\n z-index:9999;",t.style.fontSize="16px",t.innerHTML="Created with Robocorp
\n

http://www.robocorp.com/

",e.appendChild(t);const n=document.createElement("div");n.style.cssText="position:absolute;top:0px;left:0px;width:100%;height:100%;opacity:0.9;z-index:9999;",n.style.background="dark"===w.name?w.colors.dark100:w.colors.light100,e.parentNode?.appendChild(n),(0,s.toPng)(e,{cacheBust:!0}).then((r=>{const i=document.createElement("a");i.download=m?`${m}.png`:`${p}.png`,i.href=r,i.click(),e.removeChild(t),e.parentNode?.removeChild(n)}))}}),50)}},`${e}-nav-download`):null]},`${e}-nav`)})},t.default=t.TaskViewControls},725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ForKind=t.LogicalOperators=t.ComparisonOperators=t.LogLevel=t.Status=t.PatternType=t.ImportKind=t.VariableKind=t.KeywordKind=t.Type=void 0,function(e){e.Suite="suite",e.Task="task",e.UserKeyword="user-keyword",e.Import="import",e.SuiteVariable="suite-variable",e.Variable="variable",e.Keyword="keyword",e.For="for",e.ForIteration="for-iteration",e.While="while",e.If="if",e.IfBranch="if-branch",e.ElseIfBranch="else-if-branch",e.ElseBranch="else-branch",e.Try="try",e.TryBranch="try-branch",e.ExceptBranch="except-branch",e.FinallyBranch="finally-branch",e.Return="return",e.Break="break",e.Continue="continue",e.Conditional="conditional",e.Expression="expression",e.ExpressionGroup="expression_group"}(t.Type||(t.Type={})),function(e){e.Simple="simple",e.Implemented="implemented",e.RecursionLeaf="recursion-leaf"}(t.KeywordKind||(t.KeywordKind={})),function(e){e.Scalar="scalar",e.List="list",e.Dictionary="dictionary",e.Environment="environment",e.Constant="constant",e.Locator="locator"}(t.VariableKind||(t.VariableKind={})),function(e){e.Library="library",e.Resource="resource",e.Variables="variables"}(t.ImportKind||(t.ImportKind={})),function(e){e.Glob="glob",e.Regexp="regexp",e.Start="start",e.Literal="literal"}(t.PatternType||(t.PatternType={})),function(e){e.Pass="pass",e.Fail="fail",e.Skip="skip",e.NotRun="not-run",e.NotSet="not-set"}(t.Status||(t.Status={})),function(e){e.Trace="trace",e.Debug="debug",e.Info="info",e.Warn="warn",e.Error="error",e.Fail="fail"}(t.LogLevel||(t.LogLevel={})),function(e){e.Equals="==",e.NotEqual="!=",e.GreaterThan=">",e.GreaterThanOrEqualTo=">=",e.LessThan="<",e.LessThanOrEqualTo="<=",e.Is="is",e.IsNot="is not",e.In="in",e.NotIn="not in"}(t.ComparisonOperators||(t.ComparisonOperators={})),function(e){e.And="and",e.Or="or",e.Not="not"}(t.LogicalOperators||(t.LogicalOperators={})),function(e){e.In="in",e.InRange="in-range",e.InEnumerate="in-enumerate",e.InZip="in-zip"}(t.ForKind||(t.ForKind={}))},1022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskOrKeywordFromSuite=t.getKeywordFromSuite=t.getTaskFromSuite=t.getFirstTaskOrKeywordFromSuite=t.getSuiteFromValidList=t.getFirstSuite=t.createValidSuiteList=t.isSuiteValid=t.stringifyConditional=t.stringifyExpressionGroup=t.stringifyExpression=t.stringifyVariable=t.shortNameTypeMap=t.capitalize=void 0;const r=n(725);t.capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1),t.shortNameTypeMap={task:"T","user-keyword":"UK",keyword:"UK"};t.stringifyVariable=e=>{if(!e||"string"==typeof e)return e;let t="";switch(e.kind){case r.VariableKind.List:t+=`@{${e.name}}`;break;case r.VariableKind.Environment:t+=`%{${e.name}}`;break;default:t+=`\${${e.name}}`}const n=e.index?.map((e=>`[${e}]`)).join("");return n&&(t+=n),t};t.stringifyExpression=e=>{let n="string"==typeof e.left?`${e.left}`:(0,t.stringifyVariable)(e.left);return e.operator&&(n+=` ${e.operator}`),e.right&&(n+="string"==typeof e.right?` ${e.right}`:` ${(0,t.stringifyVariable)(e.right)}`),n};t.stringifyExpressionGroup=e=>{if(!e||0===e.expressions.length)return"";const n=[];return e.expressions.forEach(((i,o)=>{i&&(i.type===r.Type.Variable?n.push((0,t.stringifyVariable)(i)):i.type===r.Type.Expression?n.push((0,t.stringifyExpression)(i)):e.condition!==r.LogicalOperators.Not?n.push(`(${(0,t.stringifyExpressionGroup)(i)})`):n.push(`${(0,t.stringifyExpressionGroup)(i)}`),o"string"==typeof e.value?e.value:e.value.type===r.Type.Variable?(0,t.stringifyVariable)(e.value):e.value.type===r.Type.Expression?(0,t.stringifyExpression)(e.value):(0,t.stringifyExpressionGroup)(e.value);t.isSuiteValid=e=>0!==e?.tasks?.length||0!==e?.keywords?.length;t.createValidSuiteList=e=>{const n=[];return(0,t.isSuiteValid)(e)&&n.push(e),e?.suites?.forEach((e=>{const r=(0,t.createValidSuiteList)(e);n.push(...r)})),n};t.getFirstSuite=e=>0===e?.length?void 0:e[0];t.getSuiteFromValidList=(e,t)=>0===t?.length?void 0:t.find((t=>(t?.internal_name||t?.name)===e));t.getFirstTaskOrKeywordFromSuite=e=>e?e?.tasks?.length>0?e?.tasks[0]:e?.keywords?.length>0?e?.keywords[0]:void 0:void 0;t.getTaskFromSuite=(e,t)=>{if(e&&t&&0!==t?.tasks?.length)return t.tasks.find((t=>(t.internal_name||t.name)===e))};t.getKeywordFromSuite=(e,t)=>{if(e&&t&&0!==t?.keywords?.length)return t.keywords.find((t=>(t.internal_name||t.name)===e))};t.getTaskOrKeywordFromSuite=(e,n)=>e?(0,t.getTaskFromSuite)(e,n)||(0,t.getKeywordFromSuite)(e,n):void 0},5478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HideEverythingPanel=t.defaultAnimationDuration=void 0;const r=n(9220);t.defaultAnimationDuration="0.2";const i=r.keyframes` 0% { opacity: 0; transform: scale(0); } 1% { opacity: 0; transform: scale(1); } 100% { opacity: 1; transform: scale(1); }