@wandelbots/wandelbots-js-react-components 5.5.4 → 5.5.5-pr.feat-RB-3582-limits-from-api.605.fd3b200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3d.cjs +1 -1
- package/dist/3d.js +1 -1
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.js +1 -1
- package/dist/chunks/{MotionGroupVisualizer-EN8Nw5xP.cjs → MotionGroupVisualizer-DXWOeeh1.cjs} +1 -1
- package/dist/chunks/{MotionGroupVisualizer-BXDggjVD.js → MotionGroupVisualizer-FslyKR4F.js} +2 -2
- package/dist/chunks/{SafetyBar-C8whliAf.js → SafetyBar-C6Kcqza9.js} +1 -1
- package/dist/chunks/{SafetyBar-CLm3UQRA.cjs → SafetyBar-n6391WIY.cjs} +1 -1
- package/dist/chunks/{externalizeComponent-D6S3WLFc.js → externalizeComponent-BLilFZni.js} +13 -9
- package/dist/chunks/{externalizeComponent-BHZdH14U.cjs → externalizeComponent-CqnB_8q-.cjs} +2 -2
- package/dist/chunks/{interpolation-D9WFd-j_.js → interpolation-BDCy5Kcc.js} +1 -1
- package/dist/chunks/{interpolation-B84QX33C.cjs → interpolation-Cy1f8c4M.cjs} +1 -1
- package/dist/chunks/{theming-U5DTlp9R.js → theming-DW-GUJAo.js} +1011 -951
- package/dist/chunks/theming-kJuzfb6S.cjs +4 -0
- package/dist/components/jogging/JoggingStore.d.ts +32 -7
- package/dist/components/jogging/JoggingVelocitySlider.d.ts +2 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunks/theming-Bshha-6d.cjs +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),A=require("@mui/material/styles"),He=require("@mui/material/AppBar"),Ee=require("@mui/material/Backdrop"),T=require("@mui/material/Box"),G=require("@mui/material/IconButton"),Ye=require("@mui/material/Menu"),W=require("@mui/material/MenuItem"),Ze=require("@mui/material/Toolbar"),R=require("@mui/material/Typography"),D=require("mobx-react-lite"),m=require("react"),B=require("./externalizeComponent-CqnB_8q-.cjs"),Xe=require("@mui/material/SvgIcon"),q=require("@mui/material/Fade"),Qe=require("@mui/x-charts/Gauge"),L=require("react-i18next"),Y=require("./interpolation-Cy1f8c4M.cjs"),Ke=require("@mui/icons-material/Clear"),et=require("@mui/icons-material/FilterList"),Ce=require("@mui/icons-material/Search"),U=require("@mui/material/Divider"),V=require("@mui/x-data-grid"),tt=require("@mui/icons-material/OpenWith"),ot=require("@mui/icons-material/Share"),_=require("@mui/material/Stack"),_e=require("@mui/material/Tab"),Pe=require("@mui/material/Tabs"),z=require("@wandelbots/nova-js/v2"),ue=require("lodash-es"),P=require("mobx"),J=require("@wandelbots/nova-js"),se=require("three/src/math/Vector3.js"),nt=require("@mui/material/CircularProgress"),it=require("@mui/material/utils"),rt=require("./SafetyBar-n6391WIY.cjs"),at=require("@mui/material/Alert"),st=require("@mui/material/AlertTitle"),H=require("@mui/material/Button"),Te=require("@mui/material/ToggleButton"),N=require("./robot-SEtfVAmf.cjs"),lt=require("lodash-es/isEqual.js"),ct=require("@mui/material/FormControl"),dt=require("@mui/material/InputLabel"),ut=require("@mui/material/Select"),te=require("lodash-es/keyBy.js"),gt=require("lodash-es/uniqueId.js"),pt=require("@mui/material/ToggleButtonGroup"),Oe=require("@mui/material/Slider"),mt=require("lodash-es/isNumber.js"),ht=require("@mui/icons-material/ChevronLeft"),ft=require("@mui/icons-material/ChevronRight"),xt=require("lodash-es/throttle.js"),bt=require("@mui/material/Tooltip"),yt=require("@mui/icons-material/ContentCopy"),St=require("@mui/icons-material/DescriptionOutlined"),vt=require("@mui/icons-material/ExpandLess"),jt=require("@mui/icons-material/ExpandMore"),Ct=require("@mui/material/Paper"),Tt=require("@mui/material/Dialog"),wt=require("@mui/material/DialogActions"),Mt=require("@mui/material/DialogContent"),kt=require("@mui/material/DialogTitle"),It=require("@mui/icons-material/Error"),Rt=require("@mui/material/Chip"),Et=require("@mui/material/Fab"),_t=require("@mui/material/Badge"),Pt=require("@mui/x-charts"),le=require("three");function Ot(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,r.get?r:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const we=Ot(le),At=t=>n.jsx(Xe,{...t,viewBox:"0 0 10 8",children:n.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),Dt=B.externalizeComponent(D.observer(t=>{const{appIcon:e,appName:o,apps:r=[],onAppSelect:a,disabled:i=!1,sx:c}=t,[s,l]=m.useState(null),g=!!s,h=p=>{l(p.currentTarget)},d=()=>{l(null)},u=p=>{d(),p.onClick?p.onClick():p.href&&(window.location.href=p.href),a==null||a(p)};return n.jsxs(n.Fragment,{children:[n.jsx(He,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...c},children:n.jsxs(Ze,{sx:{minHeight:"62px !important"},children:[n.jsx(T,{sx:{mr:1,display:"flex",alignItems:"center"},children:e}),n.jsxs(T,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[n.jsx(R,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:o}),r.length>0&&n.jsx(G,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:h,disabled:i,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:p=>A.alpha(p.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:p=>A.alpha(p.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:n.jsx(At,{})})]})]})}),n.jsx(Ee,{open:g,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:p=>p.zIndex.modal-1}}),n.jsx(Ye,{id:"app-menu",anchorEl:s,open:g,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:p=>p.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:r.map(p=>n.jsxs(W,{onClick:()=>u(p),children:[n.jsx(T,{sx:{display:"flex",alignItems:"center"},children:p.icon}),n.jsx(R,{variant:"body1",sx:{ml:2},children:p.name})]},p.id))})]})})),Jt=t=>{const e=Math.floor(t/86400),o=Math.floor(t%86400/3600),r=Math.floor(t%3600/60),a=t%60,i=[];return e>0?(i.push(e.toString()),i.push(o.toString().padStart(2,"0")),i.push(r.toString().padStart(2,"0")),i.push(a.toString().padStart(2,"0"))):o>0?(i.push(o.toString()),i.push(r.toString().padStart(2,"0")),i.push(a.toString().padStart(2,"0"))):(i.push(r.toString()),i.push(a.toString().padStart(2,"0"))),i.join(":")},$=(t,e)=>{const o=Math.floor(t/86400),r=Math.floor(t%86400/3600),a=Math.floor(t%3600/60),i=t%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const s={};return o>0&&(s.days=o),r>0&&(s.hours=r),a>0&&(s.minutes=a),(i>0||Object.keys(s).length===0)&&(s.seconds=i),new Intl.DurationFormat(e,{style:"narrow"}).format(s)}catch{}const c=[];return o>0&&c.push(`${o}d`),r>0&&c.push(`${r}h`),a>0&&c.push(`${a}m`),(i>0||c.length===0)&&c.push(`${i}s`),c.join(" ")},Bt=(t,e,o)=>t==="countdown"&&o!==null?Math.min(100,e/o*100):t==="measuring"?e/60%1*100:0,Ft=({timerState:t,animationState:e,hasError:o,className:r})=>{const{t:a,i18n:i}=L.useTranslation(),c=A.useTheme(),{currentState:s,remainingTime:l,maxTime:g,currentProgress:h}=t,{showErrorAnimation:d,showPauseAnimation:u,showPulsatingText:p,pulsatingFinished:y,showLabels:S,showMainText:x,showIdlePulsating:f,idleDotsCount:v}=e;return n.jsxs(T,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx(Qe.Gauge,{width:264,height:264,value:s==="idle"?0:h,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:u||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:o?c.palette.error.light:c.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),n.jsxs(T,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[n.jsx(T,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:n.jsx(q,{in:S&&!o&&s!=="idle"&&s!=="success",timeout:300,children:n.jsx(R,{variant:"body2",sx:{fontSize:"12px",color:s==="measured"&&(p||y)?c.palette.success.main:c.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:n.jsx("span",{style:{opacity:s==="measured"&&y?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:s==="measuring"||s==="measured"?a("CycleTimer.CycleTime.lb","Cycle Time"):s==="countdown"?a("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),n.jsxs(T,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[n.jsx(q,{in:x&&s==="idle"&&!o,timeout:200,children:n.jsxs(R,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx("span",{style:{opacity:f?1:.6,transition:"opacity 2s ease-in-out"},children:a("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),n.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:f?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(v)})]})}),n.jsx(q,{in:x&&o,timeout:200,children:n.jsx(R,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:a("CycleTimer.Error.lb","Error")})}),n.jsx(q,{in:x&&!o&&s!=="idle"&&s!=="success",timeout:300,children:n.jsx(R,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:c.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:n.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:Jt(l)})})})]}),n.jsx(T,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:n.jsx(q,{in:S&&!o&&s!=="idle"&&s!=="success",timeout:300,children:n.jsx(R,{variant:"body2",sx:{fontSize:"12px",color:s==="measured"&&(p||y)?c.palette.success.main:c.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:n.jsx("span",{style:{opacity:s==="measured"&&y?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:s==="measuring"?a("CycleTimer.Measuring.lb","measuring..."):s==="measured"?a("CycleTimer.Determined.lb","determined"):s==="countdown"&&g!==null?a("CycleTimer.OfTime.lb",{time:$(g,i.language)}):""})})})})]})]})},Lt=({timerState:t,animationState:e,hasError:o,compact:r,className:a})=>{const{t:i,i18n:c}=L.useTranslation(),s=A.useTheme(),{currentState:l,remainingTime:g,maxTime:h}=t,{showErrorAnimation:d,showPauseAnimation:u,showPulsatingText:p,pulsatingFinished:y,showIdlePulsating:S,idleDotsCount:x}=e;return r&&l==="idle"?n.jsx(T,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:n.jsx(R,{variant:"body2",sx:{color:o?s.palette.error.light:s.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:o?i("CycleTimer.Error.lb","Error"):l==="idle"?"0s":$(g,c.language)})}):n.jsxs(T,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&r)&&n.jsx(T,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:u||d?.6:1,transition:"opacity 0.5s ease-out"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[n.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:o?s.palette.error.light:l==="measured"?p||y?s.palette.success.main:s.palette.text.secondary:s.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&y?p?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),n.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:o?s.palette.error.light:l==="measured"?p||y?s.palette.success.main:s.palette.text.secondary:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:t.currentProgress)/100)}`,style:{opacity:l==="measured"&&y?p?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),n.jsx(R,{variant:"body2",sx:{color:o?s.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?p||y?s.palette.success.main:s.palette.text.secondary:s.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?S?1:.6:l==="measured"&&y?p?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:o?i("CycleTimer.Error.lb","Error"):l==="idle"?n.jsxs(n.Fragment,{children:[n.jsx("span",{children:i("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),n.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(x)})]}):l==="measuring"?r?$(g,c.language):`${$(g,c.language)} / ${i("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?r?$(g,c.language):`${$(g,c.language)} / ${i("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&h!==null?r?$(g,c.language):`${$(g,c.language)} / ${i("CycleTimer.Time.lb",{time:$(h,c.language)})}`:$(g,c.language)})]})},zt=()=>{const[t,e]=m.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),o=m.useRef(null),r=m.useRef(null),a=m.useRef(null),i=m.useRef(null),c=m.useRef(0),s=m.useRef(null),l=m.useRef(null),g=m.useCallback(()=>{e(b=>({...b,showPauseAnimation:!0})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{e(b=>({...b,showPauseAnimation:!1}))},800)},[]),h=m.useCallback(()=>{e(b=>({...b,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{e(b=>({...b,showErrorAnimation:!1}))},600)},[]),d=m.useCallback(()=>{e(b=>({...b,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),u=m.useCallback(b=>{c.current=0,e(C=>({...C,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{e(C=>({...C,pulsatingFinished:!0})),a.current=setInterval(()=>{e(C=>({...C,showPulsatingText:!C.showPulsatingText}))},2e3),b&&b()},800)},[]),p=m.useCallback(()=>{a.current&&(clearInterval(a.current),a.current=null),e(b=>({...b,showPulsatingText:!1,pulsatingFinished:!1})),c.current=0},[]),y=m.useCallback(()=>{e(b=>({...b,showIdlePulsating:!0})),s.current=setInterval(()=>{e(b=>({...b,showIdlePulsating:!b.showIdlePulsating}))},2e3),l.current=setInterval(()=>{e(b=>({...b,idleDotsCount:(b.idleDotsCount+1)%4}))},800)},[]),S=m.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),l.current&&(clearInterval(l.current),l.current=null),e(b=>({...b,showIdlePulsating:!1,idleDotsCount:0}))},[]),x=m.useCallback(()=>{e(b=>({...b,showLabels:!1,showMainText:!1})),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{e(b=>({...b,showLabels:!0,showMainText:!0}))},200)},[]),f=m.useCallback(()=>{e(b=>({...b,showLabels:!0,showMainText:!0}))},[]),v=m.useCallback(()=>{o.current&&clearTimeout(o.current),r.current&&clearTimeout(r.current),i.current&&clearTimeout(i.current),a.current&&clearInterval(a.current),s.current&&clearInterval(s.current),l.current&&clearInterval(l.current)},[]);return{animationState:t,triggerPauseAnimation:g,triggerErrorAnimation:h,clearErrorAnimation:d,startPulsatingAnimation:u,stopPulsatingAnimation:p,startIdleAnimations:y,stopIdleAnimations:S,triggerFadeTransition:x,setInitialAnimationState:f,cleanup:v}},Vt=({autoStart:t,onCycleEnd:e,onMeasuringComplete:o,hasError:r,onPauseAnimation:a,onErrorAnimation:i,onClearErrorAnimation:c,onStartPulsating:s})=>{const[l,g]=m.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),h=m.useRef(null),d=m.useRef(null),u=m.useRef(0),[p]=Y.useInterpolation([0],{tension:80,friction:18,onChange:([j])=>{g(w=>({...w,currentProgress:j}))}}),y=m.useCallback(()=>{g(j=>({...j,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),u.current=0,d.current=null,p.setImmediate([0])},[p]),S=m.useCallback((j=0)=>{const w=j/60%1*100;g(k=>({...k,currentState:"measuring",maxTime:null,remainingTime:j,isPausedState:!1,currentProgress:w})),u.current=0,p.setImmediate([w]),t?(d.current=Date.now()-j*1e3,g(k=>({...k,isRunning:!0}))):d.current=null},[t,p]),x=m.useCallback((j,w=0)=>{g(M=>({...M,isRunning:!1})),d.current=null,g(M=>({...M,currentState:"countdown",maxTime:j,isPausedState:!1})),u.current=0;const k=Math.max(0,j-w),I=w>0?w/j*100:0;g(M=>({...M,remainingTime:k,currentProgress:I})),p.setImmediate([I]),k===0?(g(M=>({...M,isRunning:!1})),d.current=null,e&&queueMicrotask(()=>e())):t?setTimeout(()=>{d.current=Date.now()-w*1e3,g(M=>({...M,isRunning:!0}))},0):d.current=null},[t,e,p]),f=m.useCallback(()=>{g(j=>({...j,isRunning:!1,currentState:"measured"})),d.current=null,s(()=>{o&&o()})},[s,o]),v=m.useCallback(()=>{if(d.current&&l.isRunning){const w=Date.now()-d.current;u.current+=w;const k=u.current/1e3,I=Bt(l.currentState,k,l.maxTime);p.setTarget([I])}g(j=>({...j,isRunning:!1,isPausedState:!0})),a()},[l.isRunning,l.currentState,l.maxTime,p,a]),b=m.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),g(j=>({...j,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),C=m.useCallback(()=>l.isPausedState,[l.isPausedState]);return m.useEffect(()=>{r?(l.isRunning&&!l.isPausedState&&(g(j=>({...j,wasRunningBeforeError:!0})),v()),i()):(l.wasRunningBeforeError&&l.isPausedState&&(g(j=>({...j,wasRunningBeforeError:!1})),b()),c())},[r,l.isRunning,l.isPausedState,l.wasRunningBeforeError,v,b,i,c]),m.useEffect(()=>{if(l.isRunning){const j=()=>{if(d.current){const k=(Date.now()-d.current+u.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const I=Math.max(0,l.maxTime-k);g(E=>({...E,remainingTime:Math.ceil(I)}));const M=Math.min(100,k/l.maxTime*100);if(p.setTarget([M]),I<=0){g(E=>({...E,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),e&&queueMicrotask(()=>e());return}}else if(l.currentState==="measuring"){g(M=>({...M,remainingTime:Math.floor(k)}));const I=k/60%1*100;p.setTarget([I])}l.isRunning&&(h.current=requestAnimationFrame(j))}};h.current=requestAnimationFrame(j)}else h.current&&(cancelAnimationFrame(h.current),h.current=null);return()=>{h.current&&cancelAnimationFrame(h.current)}},[l.isRunning,e,l.currentState,l.maxTime,p]),m.useEffect(()=>{let j=null;const w=()=>{p.update(1/60),j=requestAnimationFrame(w)};return j=requestAnimationFrame(w),()=>{j&&cancelAnimationFrame(j)}},[p]),{timerState:l,controls:{startNewCycle:x,startMeasuring:S,setIdle:y,completeMeasuring:f,pause:v,resume:b,isPaused:C}}},$t=B.externalizeComponent(D.observer(({onCycleComplete:t,onCycleEnd:e,onMeasuringComplete:o,autoStart:r=!0,variant:a="default",compact:i=!1,className:c,hasError:s=!1})=>{const l=m.useRef(void 0),{animationState:g,triggerPauseAnimation:h,triggerErrorAnimation:d,clearErrorAnimation:u,startPulsatingAnimation:p,stopPulsatingAnimation:y,startIdleAnimations:S,stopIdleAnimations:x,triggerFadeTransition:f,setInitialAnimationState:v,cleanup:b}=zt(),{timerState:C,controls:j}=Vt({autoStart:r,onCycleEnd:e,onMeasuringComplete:o,hasError:s,onPauseAnimation:h,onErrorAnimation:d,onClearErrorAnimation:u,onStartPulsating:p});return m.useEffect(()=>{const w=l.current;l.current!==void 0&&w!==C.currentState?(w==="measured"&&y(),w==="idle"&&x(),f()):v(),C.currentState==="idle"&&S(),l.current=C.currentState},[C.currentState,y,x,S,f,v]),m.useEffect(()=>{let w=!0;const k=setTimeout(()=>{w&&t(j)},0);return()=>{w=!1,clearTimeout(k)}},[t,j]),m.useEffect(()=>b,[b]),a==="small"?n.jsx(Lt,{timerState:C,animationState:g,hasError:s,compact:i,className:c}):n.jsx(Ft,{timerState:C,animationState:g,hasError:s,className:c})})),Ae=B.externalizeComponent(D.observer(({data:t,columns:e,getRowData:o,onRowClick:r,selectedItem:a,getItemId:i,title:c,showCount:s=!0,searchPlaceholder:l="Search programs",dataGridProps:g,CustomToolbar:h,selectFirstByDefault:d=!1,sx:u})=>{var I;const p=A.useTheme(),y=V.useGridApiRef(),S=m.useRef(null),[x,f]=m.useState(null),v=m.useMemo(()=>t.map(o),[t,o]);m.useEffect(()=>{y.current&&v.length>0&&y.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:e.map(M=>M.field)})},[v,e,y]),m.useEffect(()=>{if(!S.current||!y.current)return;const M=new ResizeObserver(()=>{setTimeout(()=>{y.current&&v.length>0&&y.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:e.map(E=>E.field)})},100)});return M.observe(S.current),()=>{M.disconnect()}},[y,v.length,e]);const b=m.useMemo(()=>{if(a!==void 0)return a;if(x!==null)return x;if(d&&t.length>0){const M=t[0];return f(M),M}return null},[d,t,a,x]),C=M=>{const E=t.find(F=>o(F).id===M.id);E&&(a===void 0&&f(E),r&&r(E,M))},j=m.useMemo(()=>!b||!i?null:i(b),[b,i]);function w(){return n.jsx(V.Toolbar,{children:n.jsxs(T,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[c&&n.jsxs(R,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[c,s&&` (${t.length})`]}),n.jsxs(T,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[n.jsx(V.FilterPanelTrigger,{render:n.jsx(V.ToolbarButton,{"aria-label":"Show filters",children:n.jsx(et,{fontSize:"small"})})}),n.jsx(U,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),n.jsx(V.QuickFilter,{render:(M,E)=>n.jsxs(T,{...M,sx:{display:"flex",overflow:"hidden"},children:[!E.expanded&&n.jsx(V.QuickFilterTrigger,{render:n.jsx(V.ToolbarButton,{"aria-label":"Search",children:n.jsx(Ce,{fontSize:"small"})})}),n.jsxs(T,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:E.expanded?"200px":"0px",position:"relative"},children:[n.jsxs(T,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:E.expanded&&E.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[E.expanded&&n.jsx(Ce,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),n.jsx(V.QuickFilterControl,{placeholder:l})]}),E.expanded&&E.value!==""&&n.jsx(V.QuickFilterClear,{render:n.jsx(T,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:n.jsx(T,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:n.jsx(V.ToolbarButton,{"aria-label":"Clear",children:n.jsx(Ke,{fontSize:"small"})})})})})]})]})})]})]})})}const k=h||w;return n.jsx(T,{ref:S,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...u},children:n.jsx(V.DataGrid,{apiRef:y,rows:v,columns:e,onRowClick:C,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:k},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...g==null?void 0:g.initialState},...g,autosizeOnMount:!0,autosizeOptions:{...(g==null?void 0:g.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((I=g==null?void 0:g.autosizeOptions)==null?void 0:I.columns)||e.map(M=>M.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:r?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...j!==null&&{[`&[data-id="${j}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...g==null?void 0:g.sx}})})}));Ae.displayName="WandelbotsDataGrid";const ce=B.externalizeComponent(D.observer(({colors:t,label:e,getDisplayedValue:o,startJogging:r,stopJogging:a,disabled:i,activeJoggingDirection:c,...s})=>{var b,C,j,w,k,I,M;Y.useAnimationFrame(()=>{const E=o(),F=u.current;F&&(F.textContent=E)});const l=A.useTheme(),[g,h]=m.useState(null);m.useEffect(()=>{i&&v()},[i]);const d=c||g,u=m.useRef(null);t||(t={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(b=t.buttonBackgroundColor)==null?void 0:b.pressed:t.borderColor,y={width:"55px",color:t.color,path:{fill:t.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},S={...y,backgroundColor:(C=t.buttonBackgroundColor)==null?void 0:C.default,":hover":{backgroundColor:(j=t.buttonBackgroundColor)==null?void 0:j.hovered},":active":{backgroundColor:(w=t.buttonBackgroundColor)==null?void 0:w.pressed,color:t.backgroundColor,path:{fill:t.backgroundColor}},":disabled":{backgroundColor:(k=t.buttonBackgroundColor)==null?void 0:k.disabled,"svg path":{fill:l.palette.action.disabled}}},x={...y,backgroundColor:(I=t.buttonBackgroundColor)==null?void 0:I.pressed,color:t.backgroundColor,path:{fill:t.backgroundColor},":disabled":{backgroundColor:(M=t.buttonBackgroundColor)==null?void 0:M.pressed,"svg path":{fill:l.palette.action.disabled}}};function f(E,F){i||E.button===0&&(h(F),r(F))}function v(){h(null),a()}return n.jsxs(_,{height:"64px",direction:"row",justifyContent:"center",...s,children:[n.jsx(G,{disabled:i,disableRipple:!0,onPointerDown:E=>f(E,"-"),onPointerUp:v,onPointerOut:v,size:"large",sx:{...d==="-"?x:S,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:n.jsx(N.ForwardRef$3,{})}),n.jsxs(_,{spacing:"6px",sx:{width:"150px",backgroundColor:t.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:[n.jsx(_,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:t.color,".MuiTypography-root":{fontWeight:700,...i?{color:l.palette.action.disabled}:{}},...i?{"svg path":{fill:l.palette.action.disabled}}:{}},children:e}),n.jsx(R,{height:"22px",sx:{fontSize:"15px",color:i?l.palette.action.disabled:t.color,fontWeight:700,fontVariantNumeric:"tabular-nums",minWidth:"80px",textAlign:"center"},ref:u,children:o()})]}),n.jsx(G,{disableRipple:!0,disabled:i,onPointerDown:E=>f(E,"+"),onPointerUp:v,onPointerOut:v,size:"large",sx:{...d==="+"?x:S,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:n.jsx(N.ForwardRef$4,{})})]})})),De=B.externalizeComponent(D.observer(({startJogging:t,stopJogging:e,lowerLimit:o,upperLimit:r,useDegree:a,getValue:i,disabled:c,...s})=>{var w,k,I,M,E,F,Z,ee,fe,xe,be,ye,Se,ve,je;const{t:l}=L.useTranslation(),[g,h]=m.useState(),d=A.useTheme(),u={background:(w=d.palette.backgroundPaperElevation)==null?void 0:w[4],color:(k=d.palette.backgroundPaperElevation)==null?void 0:k[11]},p=D.useLocalObservable(()=>({activeJoggingDir:null,startJogging(O){this.activeJoggingDir=O,t(O)},stopJogging(){this.activeJoggingDir=null,e()}})),y=xt(()=>{const O=a?S(i()):i();(O===void 0||g===void 0||Math.abs(g-O)>1e-9)&&h(O)},50);Y.useAnimationFrame(y);function S(O){if(O!==void 0)return J.radiansToDegrees(O)}function x(O){O.button===0&&p.startJogging("-")}function f(O){O.button===0&&p.startJogging("+")}function v(O){p.stopJogging()}function b(O){p.stopJogging()}function C(O,X=1){if(O===void 0||Number.isNaN(O))return"";const Q=l("General.degree.variable",{amount:O.toFixed(X)});return O>0&&X===0?`+${Q}`:Q}function j(O,X=1){if(O===void 0||Number.isNaN(O))return"";const Q=l("General.mm.variable",{amount:O.toFixed(X)});return O>0&&X===0?`+${Q}`:Q}return n.jsxs(_,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:d.palette.text.primary,alignContent:"center",backgroundColor:(I=d.palette.backgroundPaperElevation)==null?void 0:I[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(M=d.palette.backgroundPaperElevation)==null?void 0:M[11],color:d.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(E=d.palette.backgroundPaperElevation)==null?void 0:E[9]},"&:active":{...u}}},children:[n.jsx(G,{onPointerDown:x,onPointerUp:v,onPointerOut:b,disabled:c,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...p.activeJoggingDir==="-"?u:{}},children:n.jsx(ht,{sx:{pointerEvents:"none",color:(fe=(ee=(Z=(F=d.componentsExt)==null?void 0:F.JoggingPanel)==null?void 0:Z.JoggingJoint)==null?void 0:ee.Joint)==null?void 0:fe.arrowColor}})}),n.jsxs(_,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(xe=d.palette.backgroundPaperElevation)==null?void 0:xe[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[n.jsx(R,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",fontVariantNumeric:"tabular-nums",minWidth:"80px",textAlign:"center",color:c?d.palette.action.disabled:d.palette.text.primary},children:a?C(g):j(g)}),n.jsx(Oe,{disabled:!0,"aria-label":"Joint position",min:a?S(o):o,max:a?S(r):r,value:g||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:c?d.palette.action.disabled:d.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:c?d.palette.action.disabled:d.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(be=d.palette.backgroundPaperElevation)==null?void 0:be[5],opacity:1}},marks:o!==void 0&&r!==void 0&&[{value:a?S(o):o,label:a?C(S(o),0):j(o)},{value:a?S(r):r,label:a?C(S(r),0):j(r)}]})]}),n.jsx(G,{onPointerDown:f,onPointerUp:v,onPointerOut:b,disabled:c,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...p.activeJoggingDir==="+"?u:{}},children:n.jsx(ft,{sx:{pointerEvents:"none",color:(je=(ve=(Se=(ye=d.componentsExt)==null?void 0:ye.JoggingPanel)==null?void 0:Se.JoggingJoint)==null?void 0:ve.Joint)==null?void 0:je.arrowColor}})})]})}));function ge(t,e,o){if(e.length!==t.length)return!0;for(let r=0;r<e.length;r++)if(Math.abs(e[r]-t[r])>o)return!1;return!0}function Je(t,e,o){if(t===void 0&&e||t&&e===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.position)===void 0||(e==null?void 0:e.position)===void 0)return!1;if(t===void 0||e===void 0)return!0;let r=0;return r+=Math.abs(t.orientation[0]-e.orientation[0]),r+=Math.abs(t.orientation[1]-e.orientation[1]),r+=Math.abs(t.orientation[2]-e.orientation[2]),r+=Math.abs(t.position[0]-e.position[0]),r+=Math.abs(t.position[1]-e.position[1]),r+=Math.abs(t.position[2]-e.position[2]),r<=o}function pe(t,e,o){return t.coordinate_system===e.coordinate_system&&t.tcp===e.tcp&&Je(t.tcp_pose,e.tcp_pose,o)}function Be(t,e){const o=new le.Vector3(e[0],e[1],e[2]),r=new le.Vector3(t[0],t[1],t[2]),a=o.length(),i=o.normalize();let c=r.length(),s=r.normalize();s.dot(i)<0&&(c=-c,s=s.multiplyScalar(-1));let l=c-a;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),c=a+l,[...s.multiplyScalar(c)]}const Me=1e-4;class ie{constructor(e,o,r,a,i,c){this.nova=e,this.controller=o,this.motionGroup=r,this.description=a,this.initialMotionState=i,this.motionStateSocket=c,this.rapidlyChangingMotionState=i,c.addEventListener("message",s=>{var g;const l=(g=J.tryParseJson(s.data))==null?void 0:g.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);ge(this.rapidlyChangingMotionState.joint_position,l.joint_position,Me)||P.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=l.joint_position}),pe(this.rapidlyChangingMotionState,l,Me)||P.runInAction(()=>{var h,d,u;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(h=l.tcp_pose)!=null&&h.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((u=this.rapidlyChangingMotionState.tcp_pose)!=null&&u.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:Be(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&P.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),P.makeAutoObservable(this)}static async open(e,o){var d;const[r,a]=o.split("@"),i=await e.api.controller.getCurrentRobotControllerState(a),c=i==null?void 0:i.motion_groups.find(u=>u.motion_group===o);if(!i||!c)throw new Error(`Controller ${a} or motion group ${o} not found`);const s=e.openReconnectingWebsocket(`/controllers/${a}/motion-groups/${o}/state-stream`),l=await s.firstMessage(),g=(d=J.tryParseJson(l.data))==null?void 0:d.result;if(!g)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
2
|
+
`,g);const h=await e.api.motionGroup.getMotionGroupDescription(a,c.motion_group);return new ie(e,i,c,h,g,s)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get joints(){return this.initialMotionState.joint_position.map((e,o)=>({index:o}))}dispose(){this.motionStateSocket.close()}}const ke="Movement request rejected. Another client is currently executing a 'Jogging' motion!";class re{constructor(e,o={}){this.motionStream=e,this.options=o,this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.NO_TCP=void 0,this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.tcp=(o==null?void 0:o.tcp)||e.motionGroup.tcp||this.getDefaultTcp(e),this.orientation=(o==null?void 0:o.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(o==null?void 0:o.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(o==null?void 0:o.mode)||this.DEFAULT_MODE,this.onError=o==null?void 0:o.onError}static async open(e,o,r={}){const a=await ie.open(e,o),i=new re(a,r);return await i.setJoggingMode(i.mode),i}getDefaultTcp(e){var r,a;const o=(a=(r=e.description.dh_parameters)==null?void 0:r[0])==null?void 0:a.type;return e.joints.length<6&&(o===z.JointTypeEnum.RevoluteJoint||o===z.JointTypeEnum.PrismaticJoint)?this.NO_TCP:this.DEFAULT_TCP}async setOptions(e){e.tcp&&(this.tcp=e.tcp),e.orientation&&(this.orientation=e.orientation),e.timeout&&(this.timeout=e.timeout),e.mode&&(this.mode=e.mode),e.onError&&(this.onError=e.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const e=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:e})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const e=[this.joggingSocket,this.trajectorySocket].filter(o=>o!==null);return e.forEach(o=>{o.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(e.map(o=>o.closed()))}async setJoggingMode(e,o=!0){if(!(this.mode===e&&o)&&(this.dispose(),this.mode=e,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((e,o)=>{const r=setTimeout(()=>{o(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(`/controllers/${this.motionStream.controllerId}/execution/jogging`),this.joggingSocket.addEventListener("message",a=>{var c,s,l,g;const i=J.tryParseJson(a.data);if(((c=i==null?void 0:i.result)==null?void 0:c.kind)==="INITIALIZE_RECEIVED"){clearTimeout(r),e();return}if(((s=i==null?void 0:i.result)==null?void 0:s.kind)==="MOTION_ERROR")if(clearTimeout(r),this.onBlocked&&((l=i==null?void 0:i.result)!=null&&l.message.includes(ke))){(g=this.joggingSocket)==null||g.dispose(),this.onBlocked();return}else this.onError?this.onError(a.data):o(new Error(a.data))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,...this.tcp?{tcp:this.tcp}:{}})})}async rotateJoints({joint:e,direction:o,velocityValue:r,velocityUnit:a}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const i=new Array(this.numJoints).fill(0);i[e]=o==="-"?-r:r,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:i})}async translateTCP({axis:e,direction:o,velocityMmPerSec:r}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const a=[0,0,0],i=[0,0,0];i[J.XYZ_TO_VECTOR[e]]=o==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:i,rotation:a,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:e,direction:o,velocityRadsPerSec:r}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const a=[0,0,0],i=[0,0,0];a[J.XYZ_TO_VECTOR[e]]=o==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:i,rotation:a,use_tool_coordinate_system:this.orientation==="tool"})}async runIncrementalCartesianMotion({currentTcpPose:e,currentJoints:o,velocityInRelevantUnits:r,axis:a,direction:i,motion:c}){const s=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(c.type==="translate"){if(!e.position)throw new Error("Current pose has no position, cannot perform translation");const x=[...e.position];x[J.XYZ_TO_VECTOR[a]]+=c.distanceMm*(i==="-"?-1:1),s.push({limits_override:{tcp_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:x,orientation:e.orientation}}})}else if(c.type==="rotate"){if(!e.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const x=new se.Vector3(e.orientation[0],e.orientation[1],e.orientation[2]),f=x.length(),v=x.clone().normalize(),b=c.distanceRads*(i==="-"?-1:1),C=new se.Vector3(0,0,0);C[a]=1;const j=Math.cos(.5*b)*Math.cos(.5*f),w=Math.sin(.5*b)*Math.sin(.5*f),k=Math.sin(.5*b)*Math.cos(.5*f),I=Math.cos(.5*b)*Math.sin(.5*f),M=C.dot(v),E=C.clone().cross(v),F=2*Math.acos(j-w*M),Z=F/Math.sin(.5*F),ee=new se.Vector3().addScaledVector(E,w).addScaledVector(C,k).addScaledVector(v,I).multiplyScalar(Z);s.push({limits_override:{tcp_orientation_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:e.position,orientation:[...ee]}}})}const l=this.motionStream.description;if(l.cycle_time===void 0){console.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const g={motion_group_model:l.motion_group_model,cycle_time:l.cycle_time,mounting:l.mounting,global:l.operation_limits.auto_limits},h=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:g,start_joint_position:o,motion_commands:s}),d=h.response;if(!d)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(h)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(`/controllers/${this.motionStream.controllerId}/execution/trajectory`);const u=x=>{var f;if(!x||x.add_trajectory_error||x.message)if(this.onError)this.onError(x);else throw new Error(((f=x==null?void 0:x.add_trajectory_error)==null?void 0:f.message)||(x==null?void 0:x.message)||"Failed to execute trajectory, unknown error");if(!this.trajectorySocket)throw new Error("Failed to execute trajectory, websocket not available anymore");this.trajectorySocket.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})},p=async()=>{var x;await P.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await P.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(x=this.trajectorySocket)==null||x.dispose(),this.trajectorySocket=null},y=async()=>{var x;await P.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(x=this.trajectorySocket)==null||x.dispose(),this.trajectorySocket=null},S=async x=>{if(x!=null&&x.message)if(this.onError){this.onError(x);return}else throw new Error(x.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await p():await y()};this.trajectorySocket.addEventListener("message",x=>{var v,b;const f=J.tryParseJson(x.data);if(!((v=f==null?void 0:f.result)!=null&&v.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${x.data}`);if(this.onBlocked&&((b=f.result.message)!=null&&b.includes(ke))){this.onBlocked();return}if(f.result.kind==="INITIALIZE_RECEIVED")u(f.result);else if(f.result.kind==="START_RECEIVED")S(f);else if(f.result.kind!=="PAUSE_RECEIVED")if(f.result.kind==="MOTION_ERROR"&&f.result.message)if(this.onError){this.onError(f);return}else throw new Error(f.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${f.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:d,tcp:this.tcp}})}}const Fe=t=>{const e=t.softTimeout||3e3,[o,r]=m.useState(!1),a=A.useTheme();return m.useEffect(()=>{const i=setTimeout(()=>{r(!0)},e);return()=>clearTimeout(i)}),n.jsx(_,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:t.error?n.jsx(Le,{loadingMessage:t.message,error:t.error}):n.jsxs(n.Fragment,{children:[n.jsx(nt,{sx:{marginBottom:"24px"}}),!!t.message&&n.jsx("div",{children:t.message}),n.jsx(_,{sx:{visibility:o?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Le=t=>{const e=rt.makeErrorMessage(t.error),o=t.error instanceof Error?t.error.stack:null,r=A.useTheme();return n.jsxs(_,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:r.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(t.loadingMessage?`Error while ${ue.lowerFirst(it.capitalize(t.loadingMessage))} - `:"")+e,n.jsx("br",{}),o&&n.jsx("pre",{children:o})]})},qt=D.observer(({store:t})=>{const{t:e}=L.useTranslation();return n.jsx(Ee,{"data-testid":"jogging-blocked","aria-label":"jogging-blocked",open:!0,sx:{position:"absolute",zIndex:o=>o.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:n.jsxs(_,{sx:{m:2,width:"100%"},children:[n.jsxs(at,{severity:"error",sx:{mb:2},children:[n.jsx(st,{children:e("Jogging.Blocked.ti")}),e("Jogging.Blocked.lb")]}),n.jsx(H,{variant:"contained",color:"secondary",onClick:()=>t.unblock(),children:e("Jogging.Blocked.Reenable.bt")})]})})}),ze=D.observer(({store:t})=>{const{t:e}=L.useTranslation(),[o,r]=m.useState(t.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),a=m.useRef(o);Y.useAnimationFrame(()=>{const c=t.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;lt(a.current,c)||(a.current=c,r(c))});const i=[];for(const[c,s]of o.entries())s&&i.push(c);return n.jsx(R,{"data-testid":"jogging-joint-limit-detector","aria-label":"jogging-joint-limit-detector",color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:i.length?"visible":"hidden"},children:e("Jogging.JointLimitsReached.lb",{jointNumbers:i.map(c=>c+1).join(", ")})})}),Nt=A.styled(ct)(({theme:t})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:t.palette.text.primary}}}}));function oe({labelValue:t,...e}){return n.jsxs(Nt,{fullWidth:!0,variant:"filled",children:[n.jsx(dt,{id:e.labelId,children:t}),n.jsx(ut,{...e})]})}const de=[{id:"0.1",mm:.1,degrees:.05},{id:"1",mm:1,degrees:.5},{id:"5",mm:5,degrees:2.5},{id:"10",mm:10,degrees:5}],Gt=[{id:"continuous"},...de],Wt=["coordsys","tool"];class ae{constructor(e,o,r,a,i){var c,s,l,g;this.jogger=e,this.coordSystems=o,this.motionGroupDescription=r,this.tcps=a,this.inverseSolverValue=i,this.selectedTabId="cartesian",this.locks=new Set,this.blocked=!1,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.minRotationVelocityDegPerSec=1,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[],this.inverseSolver=void 0,this.jointType=z.JointTypeEnum.RevoluteJoint,this.operationMode=null,this.safetyState=null;for(const h of o)if(h.coordinate_system===""){h.coordinate_system="world";break}this.operationMode=e.motionStream.controller.operation_mode,this.safetyState=e.motionStream.controller.safety_state,this.selectedCoordSystemId=((c=o[0])==null?void 0:c.coordinate_system)||"world",this.selectedTcpId=((s=a[0])==null?void 0:s.id)||"",this.inverseSolver=i,this.jointType=((g=(l=r==null?void 0:r.dh_parameters)==null?void 0:l[0])==null?void 0:g.type)??z.JointTypeEnum.RevoluteJoint,P.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()},this.loadFromLocalStorage(),this.disposers.push(P.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(e){const{nova:o}=e,[r,a]=await Promise.all([o.api.controller.listCoordinateSystems(e.motionStream.controllerId,"ROTATION_VECTOR"),o.api.motionGroup.getMotionGroupDescription(e.motionStream.controllerId,e.motionGroupId)]),i=await o.api.motionGroupModels.getMotionGroupKinematicModel(a.motion_group_model),c=Object.entries(a.tcps||{}).map(([s,l])=>({id:s,readable_name:l.name,position:l.pose.position,orientation:l.pose.orientation}));return new ae(e,r||[],a,c,i.inverse_solver)}dispose(){for(const e of this.disposers)e();this.jogger.dispose()}get coordSystemCountByName(){return ue.countBy(this.coordSystems,e=>e.name)}async deactivate(){this.jogger.mode==="jogging"&&await this.jogger.setJoggingMode("off")}async activate(){return this.currentTab.id==="cartesian"?((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&this.jogger.setOptions({tcp:this.selectedTcpId,orientation:this.selectedOrientation}),this.activeDiscreteIncrement?this.jogger.setJoggingMode("trajectory"):this.jogger.setJoggingMode("jogging")):this.jogger.setJoggingMode("jogging"),this.jogger}loadFromLocalStorage(){const e=J.tryParseJson(localStorage.getItem("joggingToolStore"));e&&(this.tabsById[e.selectedTabId]&&(this.selectedTabId=e.selectedTabId),this.coordSystemsById[e.selectedCoordSystemId]&&(this.selectedCoordSystemId=e.selectedCoordSystemId),this.tcpsById[e.selectedTcpId]&&(this.selectedTcpId=e.selectedTcpId),this.incrementOptionsById[e.selectedIncrementId]&&(this.selectedIncrementId=e.selectedIncrementId),["translate","rotate"].includes(e.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=e.selectedCartesianMotionType),["coordsys","tool"].includes(e.selectedOrientation)&&(this.selectedOrientation=e.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){const e=[{id:"joint",label:"Joints"}];return this.inverseSolver!==null&&e.unshift({id:"cartesian",label:"Cartesian"}),e}get incrementOptions(){return Gt}get discreteIncrementOptions(){return de}get incrementOptionsById(){return te(this.incrementOptions,e=>e.id)}get tabsById(){return te(this.tabs,e=>e.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return te(this.coordSystems,e=>e.coordinate_system)}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return te(this.tcps,e=>e.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:de.find(e=>e.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}velocityInDisplayUnits(e){return e?this.rotationVelocityDegPerSec:this.translationVelocityMmPerSec}get isAutoMode(){return this.operationMode===z.OperationMode.OperationModeAuto}get isSafetyStateNormal(){return this.safetyState===z.SafetyStateType.SafetyStateNormal}get maxRotationVelocityDegPerSec(){var o,r,a,i;if(this.operationMode&&this.safetyState&&this.motionGroupDescription){const c=this.isAutoMode?(r=(o=this.motionGroupDescription.operation_limits.auto_limits)==null?void 0:o.tcp)==null?void 0:r.orientation_velocity:(i=(a=this.motionGroupDescription.operation_limits[this.isSafetyStateNormal?"manual_t1_limits":"manual_t2_limits"])==null?void 0:a.tcp)==null?void 0:i.orientation_velocity;return c?B.radiansToDegree(c):60}return 60}get maxTranslationVelocityMmPerSec(){var o,r,a,i;return this.operationMode&&this.safetyState&&this.motionGroupDescription?(this.isAutoMode?(r=(o=this.motionGroupDescription.operation_limits.auto_limits)==null?void 0:o.tcp)==null?void 0:r.velocity:(i=(a=this.motionGroupDescription.operation_limits[this.isSafetyStateNormal?"manual_t1_limits":"manual_t2_limits"])==null?void 0:a.tcp)==null?void 0:i.velocity)??250:250}getJointVelocity(e,o){return e.velocity?B.radiansToDegree(e.velocity):o}get maxJointVelocityInDisplayUnits(){var o,r,a,i;if(this.operationMode&&this.safetyState&&this.motionGroupDescription){const c=((r=(o=this.motionGroupDescription.operation_limits.auto_limits)==null?void 0:o.joints)==null?void 0:r.map(l=>this.getJointVelocity(l,60)))??[],s=((i=(a=this.motionGroupDescription.operation_limits[this.isSafetyStateNormal?"manual_t1_limits":"manual_t2_limits"])==null?void 0:a.joints)==null?void 0:i.map(l=>this.getJointVelocity(l,60)))??[];return Math.floor(this.isAutoMode?Math.max(...c):Math.max(...s))}return 60}minVelocityInDisplayUnits(e){return e?this.minRotationVelocityDegPerSec:this.minTranslationVelocityMmPerSec}maxVelocityInDisplayUnits(e){return Math.floor(e?this.maxRotationVelocityDegPerSec:this.maxTranslationVelocityMmPerSec)}onTabChange(e,o){const r=this.tabs[o]||this.tabs[0];this.selectedTabId=r.id}setSelectedCoordSystemId(e){this.selectedCoordSystemId=e}setSelectedTcpId(e){this.selectedTcpId=e}setSelectedOrientation(e){this.selectedOrientation=e}setSelectedIncrementId(e){this.selectedIncrementId=e}setCurrentIncrementJog(e){this.incrementJogInProgress=e}setVelocityFromSlider(e,o){o?this.rotationVelocityDegPerSec=e:this.translationVelocityMmPerSec=e}setSelectedCartesianMotionType(e){this.selectedCartesianMotionType=e}lock(e){this.locks.add(e)}unlock(e){this.locks.delete(e)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket()}async withMotionLock(e){const o=gt();this.lock(o);try{return await e()}finally{this.unlock(o)}}}const Ut=D.observer(({store:t,useDegree:e})=>{var c;const{t:o}=L.useTranslation(),r=m.useId(),a=[];function i(s){switch(s){case"coordsys":return o("Jogging.Orientation.coordsys");case"tool":return o("Jogging.Orientation.tool");default:return s}}return t.showCoordSystemSelect&&a.push(n.jsx(oe,{labelId:`jogging-coord-select-${r}`,labelValue:o("Jogging.CoordinateSystem.hlb"),value:t.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>t.setSelectedCoordSystemId(s.target.value),disabled:t.isLocked,children:t.coordSystems.map(s=>n.jsx(W,{value:s.coordinate_system,children:s.name&&t.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),t.showTcpSelect&&a.push(n.jsx(oe,{labelId:`jogging-tcp-select-${r}`,labelValue:"TCP",value:t.selectedTcpId,size:"small",variant:"filled",onChange:s=>t.setSelectedTcpId(s.target.value),disabled:t.isLocked,children:t.tcps.map(s=>n.jsx(W,{value:s.id,children:s.id},s.id))},"tcp")),t.showOrientationSelect&&a.push(n.jsx(oe,{labelValue:o("Jogging.Cartesian.Orientation.lb"),labelId:`orientation-select-${r}`,value:t.selectedOrientation,onChange:s=>t.setSelectedOrientation(s.target.value),disabled:t.isLocked,children:Wt.map(s=>n.jsx(W,{value:s,children:i(s)},s))},"orientation")),t.showIncrementSelect&&a.push(n.jsxs(oe,{labelValue:o("Jogging.Increment.hlb"),labelId:`jogging-increment-select-${r}`,size:"small",variant:"filled",value:((c=t.activeDiscreteIncrement)==null?void 0:c.id)||"continuous",onChange:s=>t.setSelectedIncrementId(s.target.value),disabled:t.isLocked,children:[n.jsx(W,{value:"continuous",children:o("Jogging.Increment.Continuous.dd")},"continuous"),t.selectedOrientation==="tool"?null:t.discreteIncrementOptions.map(s=>n.jsx(W,{value:s.id,children:e?`${s.degrees}°`:`${s.mm}mm`},s.id))]},"increment")),n.jsx(T,{component:"div","data-testid":"jogging-options","aria-label":"jogging-options",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:a.map((s,l)=>n.jsx(T,{sx:{gridColumn:a.length%2===1&&l===a.length-1?"span 2":"auto"},children:s},l))})}),Ht=A.styled(pt)(({theme:t})=>{var e;return{"&.MuiToggleButtonGroup-root":{background:(e=t.palette.backgroundPaperElevation)==null?void 0:e[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}}),Ve=D.observer(t=>{var i,c,s;const e=A.useTheme(),{store:o}=t,{t:r}=L.useTranslation();function a(l,g){g===t.velocity||!mt(g)||t.onVelocityChange(g,t.useDegree)}return n.jsxs(_,{direction:"row",gap:2,alignItems:"center","data-testid":"velocity-slider","aria-label":"velocity-slider",children:[o.showVelocityLegend&&n.jsx(R,{sx:{color:(s=(c=(i=e.componentsExt)==null?void 0:i.JoggingPanel)==null?void 0:c.VelocitySlider)==null?void 0:s.sliderLegendColor,fontSize:"14px"},children:r("Jogging.Velocity.bt")}),n.jsx(Oe,{value:t.velocity,color:"secondary",onChange:a,min:t.min,max:t.max,"aria-labelledby":"input-slider",disabled:t.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),o.showVelocitySliderLabel&&(t.renderValue?t.renderValue(t.velocity):n.jsx(me,{value:t.velocity.toString()}))]})});function me({value:t,sx:e}){var r;const o=A.useTheme();return n.jsx(_,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(r=o.palette.backgroundPaperElevation)==null?void 0:r[8],borderRadius:"10px",minWidth:"111px",...e},children:n.jsx(R,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:o.palette.text.primary,whiteSpace:"nowrap"},children:t})})}const $e=D.observer(({store:t,useDegree:e,isJointVelocitySlider:o})=>{const{t:r}=L.useTranslation();function a(i,c){return c?`ω = ${r("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:i})}`:`v = ${r("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:i})}`}return n.jsx(Ve,{store:t,velocity:t.velocityInDisplayUnits(e),min:t.minVelocityInDisplayUnits(e),max:o?t.maxJointVelocityInDisplayUnits:t.maxVelocityInDisplayUnits(e),onVelocityChange:t.setVelocityFromSlider,useDegree:e,disabled:t.isLocked,renderValue:i=>n.jsx(me,{value:a(i,e),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Yt=D.observer(({store:t,children:e})=>{const{t:o}=L.useTranslation(),r=A.useTheme();function a(u,p){(p==="translate"||p==="rotate")&&t.setSelectedCartesianMotionType(p)}Y.useReaction(()=>[t.selectedCoordSystemId,t.selectedTcpId],()=>{t.jogger.motionStream.motionStateSocket.changeUrl(t.jogger.nova.makeWebsocketURL(`/controllers/${t.jogger.motionStream.controllerId}/motion-groups/${t.jogger.motionGroupId}/state-stream?tcp=${t.selectedTcpId}`))},{fireImmediately:!0});async function i(u,p){const y=await t.activate(),S=y.motionStream.rapidlyChangingMotionState.tcp_pose,x=y.motionStream.rapidlyChangingMotionState.joint_position;S&&await t.withMotionLock(async()=>{try{t.setCurrentIncrementJog({axis:u.axis,direction:u.direction}),await t.jogger.runIncrementalCartesianMotion({currentTcpPose:S,currentJoints:x,coordSystemId:t.activeCoordSystemId,velocityInRelevantUnits:t.selectedCartesianMotionType==="translate"?t.translationVelocityMmPerSec:t.rotationVelocityRadsPerSec,axis:u.axis,direction:u.direction,motion:t.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:J.degreesToRadians(p.degrees)}})}finally{t.setCurrentIncrementJog(null),await t.deactivate()}})}async function c(u){if(!t.isLocked){if(await t.activate(),t.activeDiscreteIncrement)return i(u,t.activeDiscreteIncrement);u.motionType==="translate"?await t.jogger.translateTCP({axis:u.axis,direction:u.direction,velocityMmPerSec:t.translationVelocityMmPerSec}):await t.jogger.rotateTCP({axis:u.axis,direction:u.direction,velocityRadsPerSec:t.rotationVelocityRadsPerSec})}}async function s(){t.isLocked||t.activeDiscreteIncrement||await t.deactivate()}function l(u,p,y){var x,f,v;const S=(v=(f=(x=y.componentsExt)==null?void 0:x.JoggingPanel)==null?void 0:f.JoggingCartesian)==null?void 0:v.Axis;if(S)return p==="translate"?S[u]:S.CustomRotation??S[u]}const g=[{id:"x",icon:n.jsx(N.ForwardRef,{}),colors:l("X",t.selectedCartesianMotionType,r)},{id:"y",icon:n.jsx(N.ForwardRef$1,{}),colors:l("Y",t.selectedCartesianMotionType,r)},{id:"z",icon:n.jsx(N.ForwardRef$2,{}),colors:l("Z",t.selectedCartesianMotionType,r)}];function h(u){return o("General.mm.variable",{amount:u.toFixed(1)})}function d(u){return o("General.degree.variable",{amount:J.radiansToDegrees(u).toFixed(1)})}return n.jsxs(_,{"data-testid":"jogging-cartesian-tab","aria-label":"jogging-cartesian-tab",flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[n.jsxs(_,{gap:2,children:[n.jsx(Ut,{store:t,useDegree:t.selectedCartesianMotionType==="rotate"}),n.jsx($e,{store:t,useDegree:t.selectedCartesianMotionType==="rotate"}),n.jsx(U,{})]}),n.jsx(_,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:n.jsxs(_,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[n.jsxs(Ht,{value:t.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":o("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[n.jsx(Te,{value:"translate",children:o("Jogging.Cartesian.Translation.bt")}),n.jsx(Te,{value:"rotate",children:o("Jogging.Cartesian.Rotation.bt")})]}),t.selectedCartesianMotionType==="translate"&&g.map(u=>{var p,y;return n.jsx(ce,{"data-testid":`jogging-cartesian-axis-control-${u.id}`,"aria-label":`jogging-cartesian-axis-control-${u.id}`,colors:u.colors,disabled:t.isLocked,activeJoggingDirection:((p=t.incrementJogInProgress)==null?void 0:p.axis)===u.id?t.incrementJogInProgress.direction:void 0,label:n.jsxs(n.Fragment,{children:[u.icon,n.jsx(R,{sx:{fontSize:"24px",color:((y=u.colors)==null?void 0:y.labelColor)??r.palette.text.primary},children:u.id.toUpperCase()})]}),getDisplayedValue:()=>{var S,x;return h(((x=(S=t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:S.position)==null?void 0:x[J.XYZ_TO_VECTOR[u.id]])||0)},startJogging:S=>c({axis:u.id,motionType:"translate",direction:S}),stopJogging:s},u.id)}),t.selectedCartesianMotionType==="rotate"&&g.map(u=>{var p,y;return n.jsx(ce,{"data-testid":`jogging-cartesian-axis-control-${u.id}`,"aria-label":`jogging-cartesian-axis-control-${u.id}`,colors:u.colors,disabled:t.isLocked,activeJoggingDirection:((p=t.incrementJogInProgress)==null?void 0:p.axis)===u.id?t.incrementJogInProgress.direction:void 0,label:n.jsxs(n.Fragment,{children:[n.jsx(N.ForwardRef$6,{}),n.jsx(R,{sx:{fontSize:"24px",color:((y=u.colors)==null?void 0:y.labelColor)??r.palette.text.primary},children:u.id.toUpperCase()})]}),getDisplayedValue:()=>{var S,x;return d(((x=(S=t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:S.orientation)==null?void 0:x[J.XYZ_TO_VECTOR[u.id]])||0)},startJogging:S=>c({axis:u.id,motionType:"rotate",direction:S}),stopJogging:s},u.id)})]})}),n.jsx(ze,{store:t}),e&&n.jsx(U,{}),e]})}),Zt=D.observer(({store:t,children:e})=>{const o=A.useTheme();async function r(i){await t.activate(),await t.jogger.rotateJoints({joint:i.joint,direction:i.direction,velocityUnit:t.jointType===z.JointTypeEnum.PrismaticJoint?"mm/s":"rad/s",velocityValue:t.jointType===z.JointTypeEnum.PrismaticJoint?t.translationVelocityMmPerSec:t.rotationVelocityRadsPerSec})}async function a(){await t.jogger.stop(),await t.deactivate()}return n.jsxs(_,{"data-testid":"jogging-joint-tab","aria-label":"jogging-joint-tab",flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[n.jsx($e,{store:t,useDegree:t.jointType===z.JointTypeEnum.RevoluteJoint,isJointVelocitySlider:!0}),n.jsx(U,{}),n.jsx(_,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},children:n.jsx(_,{"data-testid":"jogging-joint-value-controls-wrapper","aria-label":"jogging-joint-value-controls-wrapper",alignItems:"center",gap:"24px",children:t.jogger.motionStream.joints.map(i=>{var s,l,g;const c=(g=(l=(s=t.motionGroupDescription.operation_limits.auto_limits)==null?void 0:s.joints)==null?void 0:l[i.index])==null?void 0:g.position;return n.jsxs(_,{"data-testid":`jogging-joint-value-control-${i.index}`,"aria-label":`jogging-joint-value-control-${i.index}`,direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[t.showJointsLegend&&n.jsx(R,{color:t.isLocked?o.palette.text.disabled:o.palette.text.secondary,children:`G${i.index+1}`}),n.jsx(De,{disabled:t.isLocked,lowerLimit:c==null?void 0:c.lower_limit,upperLimit:c==null?void 0:c.upper_limit,useDegree:t.jointType===z.JointTypeEnum.RevoluteJoint,getValue:()=>{const h=t.jogger.motionStream.rapidlyChangingMotionState.joint_position[i.index];return h!==void 0?h:void 0},startJogging:h=>r({joint:i.index,direction:h}),stopJogging:a})]},`joint-${i.index}`)})})}),n.jsx(ze,{store:t}),e&&n.jsx(U,{}),e]})}),Xt=B.externalizeComponent(D.observer(t=>{const e=ue.isString(t.nova)?new z.NovaClient({instanceUrl:t.nova}):t.nova,o=D.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){P.runInAction(()=>{o.loadingError=null,o.joggingStore=null});try{let a=t.store;if(!a){const i=await re.open(e,t.motionGroupId);a=await ae.loadFor(i)}P.runInAction(()=>{o.joggingStore=a}),t.onSetup&&t.onSetup(a)}catch(a){o.loadingError=a}}return m.useEffect(()=>(r(),t.store?()=>null:()=>{var a;(a=o.joggingStore)==null||a.dispose()}),[t.store,t.nova,t.motionGroupId]),m.useEffect(()=>{const a=o.joggingStore;a&&(t.locked?a.lock("external"):a.unlock("external"))},[o.joggingStore,t.locked]),n.jsx(_,{"data-testid":"jogging-panel","aria-label":"jogging-panel",sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...t.sx},children:o.joggingStore?n.jsx(Qt,{store:o.joggingStore,children:t.children}):n.jsx(Fe,{message:"Loading jogging",error:o.loadingError})})})),Qt=D.observer(({store:t,children:e})=>{const{t:o}=L.useTranslation();function r(){if(t.currentTab.id==="cartesian")return n.jsx(Yt,{store:t,children:e});if(t.currentTab.id==="joint")return n.jsx(Zt,{store:t,children:e})}return n.jsxs(_,{flexGrow:1,sx:{overflow:"hidden"},children:[n.jsx(Pe,{"data-testid":"jogging-tabs","aria-label":"jogging-tabs",value:t.tabIndex,onChange:t.onTabChange,variant:"fullWidth",children:t.tabs.map(a=>{const i=a.label==="Cartesian"?o("Jogging.Cartesian.bt"):o("Jogging.Joints.bt"),c=a.label==="cartesian"?n.jsx(tt,{fontSize:"small",sx:{mr:1}}):n.jsx(ot,{fontSize:"small",sx:{mr:1}});return n.jsx(_e,{"data-testid":`jogging-tab-${a.id}`,"aria-label":`jogging-tab-${a.id}`,label:t.showTabIcons?n.jsxs(_,{direction:"row",alignItems:"center",children:[c,i]}):i,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),n.jsx(_,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()}),t.blocked&&n.jsx(qt,{store:t})]})}),qe=t=>{var s;const{value:e,ref:o}=t,r=A.useTheme(),[a,i]=m.useState(!1);async function c(){if(!o||!("current"in o))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(e),console.log("Copied!"),i(!0),!0}catch(l){console.error(l);const g=window.getSelection();if(g&&o&&"current"in o&&o.current){const h=document.createRange();h.selectNodeContents(o.current),g.removeAllRanges(),g.addRange(h)}}return!1}return m.useEffect(()=>{if(!a)return;const l=setTimeout(()=>i(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),n.jsx(bt,{open:a,title:"Copied!",children:n.jsx(_,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(s=r.palette.backgroundPaperElevation)==null?void 0:s[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>c(),children:n.jsx(R,{ref:o,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:r.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:e})})})},Kt=B.externalizeComponent(D.observer(({tcpPose:t,showCopyButton:e=!1})=>{const[o,r]=m.useState(null),a=z.poseToWandelscriptString(t),i=async()=>{try{await navigator.clipboard.writeText(a),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return n.jsxs(_,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[n.jsx(qe,{value:a}),e&&n.jsx(H,{variant:"contained",color:"secondary",size:"small",onClick:i,sx:{flexShrink:0},children:o||"Copy"})]})})),eo=B.externalizeComponent(D.observer(({joints:t,showCopyButton:e=!1})=>{const[o,r]=m.useState(null),a=`[${t.map(c=>parseFloat(c.toFixed(4))).join(", ")}]`,i=async()=>{try{await navigator.clipboard.writeText(a),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return n.jsxs(_,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[n.jsx(qe,{value:a}),e&&n.jsx(H,{variant:"contained",color:"secondary",size:"small",onClick:i,sx:{flexShrink:0},children:o||"Copy"})]})}));class Ne{constructor(){this.messages=[],this.addMessage=(e,o="info")=>{const r={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:e,level:o};this.messages.push(r)},this.clearMessages=()=>{this.messages=[]},this.addInfo=e=>{this.addMessage(e,"info")},this.addWarning=e=>{this.addMessage(e,"warning")},this.addError=e=>{this.addMessage(e,"error")},this.addDebug=e=>{this.addMessage(e,"debug")},P.makeObservable(this,{messages:P.observable,addMessage:P.action,clearMessages:P.action})}}const K=(t,e,o)=>({id:o||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:t,level:e}),to=(t,e)=>K(t,"debug",e),oo=(t,e)=>K(t,"info",e),no=(t,e)=>K(t,"warning",e),io=(t,e)=>K(t,"error",e),Ge=B.externalizeComponent(D.observer(t=>{var h;const{messages:e=[],onClear:o,height:r=400,sx:a}=t,i=A.useTheme(),c=m.useRef(null);m.useEffect(()=>{if(e.length===0)return;const d=c.current;if(!d)return;const u=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(u)},[e.length]);const s=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return i.palette.error.main;case"warning":return i.palette.warning.main;case"info":return i.palette.info.main;case"debug":return i.palette.text.disabled;default:return i.palette.text.secondary}},g=({message:d})=>{const[u,p]=m.useState(!1),[y,S]=m.useState(!1),[x,f]=m.useState(!1),v=d.message.length>150,b=async()=>{try{await navigator.clipboard.writeText(d.message),S(!0),setTimeout(()=>S(!1),2e3)}catch(j){console.error("Failed to copy message:",j)}},C=v&&!u?`${d.message.substring(0,150)}...`:d.message;return n.jsx(T,{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:i.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:n.jsxs(T,{sx:{display:"flex",gap:1},children:[n.jsxs(R,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:i.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",s(d.timestamp),"]"]}),n.jsx(R,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:C}),n.jsxs(T,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:x?1:0,transition:"opacity 0.2s ease-in-out",visibility:x?"visible":"hidden"},children:[n.jsx(G,{size:"small",onClick:b,sx:{padding:"2px",color:i.palette.text.secondary,"&:hover":{backgroundColor:i.palette.action.hover}},title:y?"Copied!":"Copy message",children:n.jsx(yt,{sx:{fontSize:12}})}),v&&n.jsx(G,{size:"small",onClick:()=>p(!u),sx:{padding:"2px",color:i.palette.text.secondary,"&:hover":{backgroundColor:i.palette.action.hover}},title:u?"Collapse":"Expand",children:u?n.jsx(vt,{sx:{fontSize:12}}):n.jsx(jt,{sx:{fontSize:12}})})]})]})},d.id)};return n.jsxs(Ct,{sx:{backgroundColor:((h=i.palette.backgroundPaperElevation)==null?void 0:h[2])||"#171927",backgroundImage:"none",height:r,display:"flex",flexDirection:"column",overflow:"hidden",...a},children:[n.jsxs(T,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[n.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsx(St,{sx:{fontSize:16,color:i.palette.action.active,opacity:.56}}),n.jsx(R,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:i.palette.text.primary},children:"Log"})]}),n.jsx(H,{onClick:o,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:i.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:`${i.palette.primary.main}14`}},children:"Clear"})]}),n.jsx(T,{ref:c,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${i.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:i.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:i.palette.divider}}},children:e.length===0?n.jsx(R,{sx:{color:i.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):e.map(d=>n.jsx(g,{message:d},d.id))})]})})),ro=B.externalizeComponent(D.observer(t=>{const{store:e,onStoreReady:o,...r}=t,a=m.useRef(o);m.useEffect(()=>{a.current=o},[o]);const i=m.useMemo(()=>{var l;const s=e||new Ne;return(l=a.current)==null||l.call(a,s),s},[e]),c=()=>{i.clearMessages()};return n.jsx(Ge,{...r,messages:i.messages,onClear:c})}));function ao(){const t=window.location.href;return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function so({baseUrl:t=ao(),...e}){return n.jsxs(Tt,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[n.jsx(kt,{id:"no-motion-group-modal-title",children:"No motion group found"}),n.jsxs(Mt,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[n.jsx(R,{color:"#fff",children:"Found no devices to connect to."}),n.jsx(R,{color:"#fff",children:"Please ensure a motion group has been created."})]}),n.jsx(wt,{children:n.jsxs(_,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[n.jsx(H,{href:`${t}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),n.jsx(H,{href:`${t}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var he=(t=>(t.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",t.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",t.CELL_OPEN="CELL_OPEN",t.E_STOP="E_STOP",t.MANUAL_MODE="MANUAL_MODE",t.READY="READY",t))(he||{});const We=B.externalizeComponent(D.observer(({setupState:t,className:e})=>{const o=A.useTheme(),{t:r}=L.useTranslation(),a=()=>{var g,h,d,u,p,y,S;switch(t){case"READY":return{label:r("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((g=o.palette.tertiary)==null?void 0:g.main)||o.palette.primary.main,backgroundColor:((h=o.palette.backgroundPaperElevation)==null?void 0:h[11])||o.palette.background.paper,textColor:o.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:o.palette.error.main,backgroundColor:((d=o.palette.backgroundPaperElevation)==null?void 0:d[11])||o.palette.background.paper,textColor:o.palette.secondary.contrastText};case"CELL_OPEN":return{label:r("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:o.palette.error.main,backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[11])||o.palette.background.paper,textColor:o.palette.secondary.contrastText};case"E_STOP":return{label:r("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:o.palette.error.main,backgroundColor:((p=o.palette.backgroundPaperElevation)==null?void 0:p[11])||o.palette.background.paper,textColor:o.palette.secondary.contrastText};case"MANUAL_MODE":return{label:r("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:o.palette.error.main,backgroundColor:((y=o.palette.backgroundPaperElevation)==null?void 0:y[11])||o.palette.background.paper,textColor:o.palette.secondary.contrastText};default:return{label:r("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:o.palette.error.main,backgroundColor:((S=o.palette.backgroundPaperElevation)==null?void 0:S[11])||o.palette.background.paper,textColor:o.palette.secondary.contrastText}}},{label:i,indicatorColor:c,backgroundColor:s,textColor:l}=a();return n.jsx(Rt,{className:e,label:n.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsx(T,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:c,flexShrink:0}}),n.jsx(R,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:i})]}),variant:"filled",sx:{backgroundColor:s,color:o.palette.getContrastText(s),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),lo=B.externalizeComponent(D.observer(({robotName:t,robotType:e,setupState:o,PreconditionComponent:r=We,className:a})=>{var l;const i=A.useTheme(),c=e||"Robot",s=o===he.READY;return n.jsxs(T,{className:a,sx:{border:`1px solid ${i.palette.divider}`,background:((l=i.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[n.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[s?n.jsx(T,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${i.palette.primary.main} !important`},"& svg path":{fill:`${i.palette.primary.main} !important`}},children:n.jsx(N.ForwardRef$5,{})}):n.jsx(It,{sx:{color:i.palette.error.main,fontSize:24}}),n.jsx(R,{variant:"body1",sx:{fontWeight:500,color:i.palette.text.primary},children:t}),n.jsx(U,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:i.palette.text.secondary,opacity:.3,width:"1px"}}),n.jsx(R,{variant:"body2",sx:{color:i.palette.text.secondary},children:c})]}),r&&n.jsx(r,{setupState:o})]})})),co=A.styled(Et,{shouldForwardProp:t=>t!=="selected"})(({theme:t})=>{var e,o,r;return{borderRadius:"20px","&:hover":{background:(e=t.palette.backgroundPaperElevation)==null?void 0:e[7]},variants:[{props:({selected:a})=>!a,style:{background:(o=t.palette.backgroundPaperElevation)==null?void 0:o[0],color:t.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(r=t.palette.backgroundPaperElevation)==null?void 0:r[11],border:`1px solid ${t.palette.divider}`,color:t.palette.primary.contrastText}}]}}),uo=t=>{const{ref:e,...o}=t;return n.jsx(co,{ref:e,selected:t.selected,...o,color:"secondary",variant:"circular"})};function go(t){const{children:e,value:o,index:r,...a}=t;return n.jsx("div",{role:"tabpanel",hidden:o!==r,id:`tabpanel-${r}`,"aria-labelledby":`tab-${r}`,...a,children:o===r&&n.jsx(T,{children:e})})}function po({children:t,...e}){const{fullWidth:o,indicator:r,onChange:a,orientation:i,scrollButtons:c,selectionFollowsFocus:s,textColor:l,value:g,variant:h,...d}=e;return n.jsx(T,{...d,children:t})}const mo=B.externalizeComponent(D.observer(t=>{const{items:e,activeTab:o,defaultActiveTab:r=0,onTabChange:a,sx:i,ref:c}=t,s=o!==void 0,[l,g]=m.useState(r),h=s?o:l;m.useEffect(()=>{s||e.length!==0&&(l<0||l>e.length-1)&&g(0)},[e.length,s,l]);const d=(u,p)=>{s||g(p),a==null||a(p)};return n.jsxs(T,{ref:c,sx:{height:"100%",display:"flex",flexDirection:"column",...i},children:[n.jsx(T,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:u=>u.spacing(2),paddingRight:u=>u.spacing(2.5)},children:n.jsx(Pe,{value:h,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:e.map((u,p)=>{var C,j,w;const y=()=>{if(!u.badge)return;const k=u.badge.content,I=u.badge.max;return typeof k=="number"&&I&&k>I?`${I}+`:k},S=()=>{if(!u.badge)return!1;const k=u.badge.content,I=u.badge.showZero;return!(k===0&&!I)},x=y(),f=S(),v=()=>{s||g(p),a==null||a(p)},b=n.jsx(_e,{label:u.label,icon:u.icon,iconPosition:"start",disableRipple:!0,onClick:v,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:k=>{var I;return((I=k.palette.backgroundPaperElevation)==null?void 0:I[11])||"#32344B"},color:"text.primary",opacity:h===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:h===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:k=>{var I;return((I=k.palette.backgroundPaperElevation)==null?void 0:I[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},u.id);return f?n.jsx(po,{component:"span",sx:{display:"inline-flex"},children:n.jsx(_t,{badgeContent:x,color:((C=u.badge)==null?void 0:C.color)||"error",max:(j=u.badge)==null?void 0:j.max,showZero:(w=u.badge)==null?void 0:w.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:b})},u.id):b})})}),n.jsx(T,{sx:{mt:u=>u.spacing(2),borderBottom:1,borderColor:"divider"}}),n.jsx(T,{sx:{flex:1,overflow:"auto"},children:e.map((u,p)=>n.jsx(go,{value:h,index:p,children:u.content},u.id))})]})})),ho=t=>{const e=Math.floor(t/86400),o=Math.floor(t%86400/3600),r=Math.floor(t%3600/60),a=t%60,i=[];return e>0?(i.push(e.toString()),i.push(o.toString().padStart(2,"0")),i.push(r.toString().padStart(2,"0")),i.push(a.toString().padStart(2,"0"))):o>0?(i.push(o.toString()),i.push(r.toString().padStart(2,"0")),i.push(a.toString().padStart(2,"0"))):(i.push(r.toString()),i.push(a.toString().padStart(2,"0"))),i.join(":")},Ie=(t,e)=>{const o=Math.floor(t/86400),r=Math.floor(t%86400/3600),a=Math.floor(t%3600/60),i=t%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const s={};return o>0&&(s.days=o),r>0&&(s.hours=r),a>0&&(s.minutes=a),(i>0||Object.keys(s).length===0)&&(s.seconds=i),new Intl.DurationFormat(e,{style:"narrow"}).format(s)}catch{}const c=[];return o>0&&c.push(`${o}d`),r>0&&c.push(`${r}h`),a>0&&c.push(`${a}m`),(i>0||c.length===0)&&c.push(`${i}s`),c.join(" ")},fo=({timerState:t,animationState:e,hasError:o,className:r})=>{const{t:a}=L.useTranslation(),i=A.useTheme(),{elapsedTime:c,currentProgress:s}=t,{showErrorAnimation:l,showPauseAnimation:g,showMainText:h}=e;return n.jsxs(T,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx(Pt.Gauge,{width:264,height:264,value:s,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:g||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:o?i.palette.error.light:i.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),n.jsx(T,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:n.jsxs(T,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[n.jsx(q,{in:h&&o,timeout:200,children:n.jsx(R,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:i.palette.error.light},children:a("timer.error")})}),n.jsx(q,{in:h&&!o,timeout:300,children:n.jsx(R,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:i.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:ho(c)})})]})})]})},xo=({timerState:t,animationState:e,hasError:o,compact:r,className:a})=>{const{t:i,i18n:c}=L.useTranslation(),s=A.useTheme(),{elapsedTime:l,currentProgress:g}=t,{showErrorAnimation:h,showPauseAnimation:d}=e;return r?n.jsx(T,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:n.jsx(R,{variant:"body2",sx:{color:o?s.palette.error.light:s.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:o?i("timer.error"):Ie(l,c.language)})}):n.jsxs(T,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[n.jsx(T,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||h?.6:1,transition:"opacity 0.5s ease-out"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[n.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:o?s.palette.error.light:s.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),n.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:o?s.palette.error.light:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-g/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),n.jsx(R,{variant:"body2",sx:{color:o?s.palette.error.light:s.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:o?i("timer.error"):Ie(l,c.language)})]})},bo=()=>{const[t,e]=m.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),o=m.useRef(null),r=m.useRef(null),a=m.useRef(null),i=m.useCallback(()=>{e(d=>({...d,showPauseAnimation:!0})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{e(d=>({...d,showPauseAnimation:!1}))},800)},[]),c=m.useCallback(()=>{e(d=>({...d,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{e(d=>({...d,showErrorAnimation:!1}))},600)},[]),s=m.useCallback(()=>{e(d=>({...d,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),l=m.useCallback(()=>{e(d=>({...d,showMainText:!1})),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{e(d=>({...d,showMainText:!0}))},200)},[]),g=m.useCallback(()=>{e(d=>({...d,showMainText:!0}))},[]),h=m.useCallback(()=>{o.current&&clearTimeout(o.current),r.current&&clearTimeout(r.current),a.current&&clearTimeout(a.current)},[]);return{animationState:t,triggerPauseAnimation:i,triggerErrorAnimation:c,clearErrorAnimation:s,triggerFadeTransition:l,setInitialAnimationState:g,cleanup:h}},yo=({autoStart:t,hasError:e,onPauseAnimation:o,onErrorAnimation:r,onClearErrorAnimation:a})=>{const[i,c]=m.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),s=m.useRef(null),l=m.useRef(null),g=m.useRef(0),h=m.useRef(0),[d]=Y.useInterpolation([0],{tension:80,friction:18,onChange:([f])=>{c(v=>({...v,currentProgress:f}))}}),u=m.useCallback((f=0)=>{const v=f/60%1*100;c(b=>({...b,elapsedTime:f,isPausedState:!1,currentProgress:v})),g.current=0,h.current=v,d.setImmediate([v]),t?(l.current=Date.now()-f*1e3,c(b=>({...b,isRunning:!0}))):l.current=null},[t,d]),p=m.useCallback(()=>{if(l.current&&i.isRunning){const v=(Date.now()-l.current)/1e3+g.current,b=v/60%1*100;d.setTarget([b]),c(C=>({...C,elapsedTime:Math.floor(v)}))}c(f=>({...f,isRunning:!1,isPausedState:!0})),o()},[i.isRunning,d,o]),y=m.useCallback(()=>{i.isPausedState&&(g.current=i.elapsedTime,l.current=Date.now(),c(f=>({...f,isRunning:!0,isPausedState:!1})))},[i.isPausedState,i.elapsedTime]),S=m.useCallback(()=>{c(f=>({...f,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),g.current=0,l.current=null,h.current=0,d.setImmediate([0])},[d]),x=m.useCallback(()=>i.isPausedState,[i.isPausedState]);return m.useEffect(()=>{e?(i.isRunning&&(c(f=>({...f,wasRunningBeforeError:!0})),p()),r()):(i.wasRunningBeforeError&&!i.isRunning&&(c(f=>({...f,wasRunningBeforeError:!1})),y()),a())},[e,i.isRunning,i.wasRunningBeforeError,p,y,r,a]),m.useEffect(()=>{if(i.isRunning){const f=()=>{if(l.current){const b=(Date.now()-l.current)/1e3+g.current,C=b/60%1*100;c(w=>({...w,elapsedTime:Math.floor(b)})),Math.abs(C-h.current)>.1&&(d.setTarget([C]),h.current=C)}s.current=requestAnimationFrame(f)};s.current=requestAnimationFrame(f)}else s.current&&(cancelAnimationFrame(s.current),s.current=null);return()=>{s.current&&(cancelAnimationFrame(s.current),s.current=null)}},[i.isRunning,d]),m.useEffect(()=>{let f=null;const v=()=>{d.update(),f=requestAnimationFrame(v)};return f=requestAnimationFrame(v),()=>{f&&cancelAnimationFrame(f)}},[d]),{timerState:i,controls:{start:u,pause:p,resume:y,reset:S,isPaused:x}}},So=B.externalizeComponent(D.observer(({onTimerReady:t,autoStart:e=!0,variant:o="default",compact:r=!1,className:a,hasError:i=!1})=>{const{animationState:c,triggerPauseAnimation:s,triggerErrorAnimation:l,clearErrorAnimation:g,setInitialAnimationState:h,cleanup:d}=bo(),{timerState:u,controls:p}=yo({autoStart:e,hasError:i,onPauseAnimation:s,onErrorAnimation:l,onClearErrorAnimation:g});return m.useEffect(()=>{h()},[h]),m.useEffect(()=>{let y=!0;const S=setTimeout(()=>{y&&t(p)},0);return()=>{y=!1,clearTimeout(S)}},[t,p]),m.useEffect(()=>d,[d]),o==="small"?n.jsx(xo,{timerState:u,animationState:c,hasError:i,compact:r,className:a}):n.jsx(fo,{timerState:u,animationState:c,hasError:i,className:a})})),Re=1e-4,vo={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class ne{constructor(e,o,r,a,i,c,s,l,g,h){this.nova=e,this.controller=o,this.motionGroup=r,this.initialMotionState=a,this.motionStateSocket=i,this.isVirtual=c,this.tcps=s,this.description=l,this.initialControllerState=g,this.controllerStateSocket=h,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=a,this.controllerState=g,h.addEventListener("message",d=>{var p;const u=(p=J.tryParseJson(d.data))==null?void 0:p.result;u&&P.runInAction(()=>{this.controllerState=u})}),i.addEventListener("message",d=>{var p;const u=(p=J.tryParseJson(d.data))==null?void 0:p.result;if(!u)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${d.data}`);ge(this.rapidlyChangingMotionState.joint_position,u.joint_position,Re)||P.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=u.joint_position}),pe(this.rapidlyChangingMotionState,u,Re)||P.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=u.tcp_pose}),this.rapidlyChangingMotionState.standstill!==u.standstill&&P.runInAction(()=>{this.rapidlyChangingMotionState.standstill=u.standstill})}),P.makeAutoObservable(this)}static async connectMultiple(e,o){return Promise.all(o.map(r=>ne.connect(e,r)))}static async connect(e,o){var f,v;const[r,a]=o.split("@"),i=await e.api.controller.getCurrentRobotControllerState(a),c=i==null?void 0:i.motion_groups.find(b=>b.motion_group===o);if(!i||!c)throw new Error(`Controller ${a} or motion group ${o} not found`);const s=e.openReconnectingWebsocket(`/controllers/${a}/motion-groups/${o}/state-stream`),l=await s.firstMessage(),g=(f=J.tryParseJson(l.data))==null?void 0:f.result;if(!g)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
3
|
+
`,g);const d=(await e.api.controller.getRobotController(i.controller)).configuration.kind==="VirtualController",u=await e.api.motionGroup.getMotionGroupDescription(a,c.motion_group),p=Object.entries(u.tcps||{}).map(([b,C])=>({id:b,readable_name:C.name,position:C.pose.position,orientation:C.pose.orientation})),y=e.openReconnectingWebsocket(`/controllers/${i.controller}/state-stream?response_rate=1000`),S=await y.firstMessage(),x=(v=J.tryParseJson(S.data))==null?void 0:v.result;if(!x)throw new Error(`Unable to parse initial controller state message ${S.data}`);return console.log(`Connected controller state websocket to controller ${i.controller}. Initial state:
|
|
4
|
+
`,x),new ne(e,i,c,g,s,d,p,u,x,y)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((e,o)=>({index:o}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(e=>({...vo,...e}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var e,o,r;return this.description.mounting?[(((e=this.description.mounting.position)==null?void 0:e[0])||0)/1e3,(((o=this.description.mounting.position)==null?void 0:o[1])||0)/1e3,(((r=this.description.mounting.position)==null?void 0:r[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var a,i,c,s,l,g;const e=new we.Vector3(((i=(a=this.description.mounting)==null?void 0:a.orientation)==null?void 0:i[0])||0,((s=(c=this.description.mounting)==null?void 0:c.orientation)==null?void 0:s[1])||0,((g=(l=this.description.mounting)==null?void 0:l.orientation)==null?void 0:g[2])||0),o=e.length(),r=e.normalize();return new we.Quaternion().setFromAxisAngle(r,o)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}async deactivate(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}P.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),P.runInAction(()=>{this.activationState="inactive"})}catch(e){throw P.runInAction(()=>{this.activationState="active"}),e}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}P.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),P.runInAction(()=>{this.activationState="active"})}catch(e){throw P.runInAction(()=>{this.activationState="inactive"}),e}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(e){this.joggingVelocity=e}}function Ue(){var e,o,r,a,i,c;const t=A.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...t,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${t.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${t.palette.divider}`,background:(r=(o=(e=t.paletteExt)==null?void 0:e.secondary)==null?void 0:o.tonal)==null?void 0:r.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${t.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:t.palette.text.secondary,"&.Mui-selected":{color:t.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(a=t.palette.backgroundPaperElevation)==null?void 0:a[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(c=(i=t.paletteExt)==null?void 0:i.secondary)==null?void 0:c.tonal}},variants:[{props:{color:"primary"},style:{background:t.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:t.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:t.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:t.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:t.palette.text.primary}},VelocitySlider:{sliderLegendColor:t.palette.text.primary}}}}}function jo(){const t=Ue();return t.palette.mode="light",t}function Co(t){var r,a,i,c;let e=!0;((r=t.palette)==null?void 0:r.mode)==="light"?e=!1:((a=t.palette)==null?void 0:a.mode)!=="dark"&&(e=!(typeof window<"u"&&((c=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:c.matches)));const o=e?Ue():jo();return A.createTheme(o,t)}exports.AppHeader=Dt;exports.ConnectedMotionGroup=ne;exports.CycleTimer=$t;exports.JoggerConnection=re;exports.JoggingCartesianAxisControl=ce;exports.JoggingJointValueControl=De;exports.JoggingPanel=Xt;exports.JoggingStore=ae;exports.LoadingCover=Fe;exports.LoadingErrorMessage=Le;exports.LogPanel=ro;exports.LogStore=Ne;exports.LogViewer=Ge;exports.MotionStreamConnection=ie;exports.NoMotionGroupModal=so;exports.PoseCartesianValues=Kt;exports.PoseJointValues=eo;exports.RobotListItem=lo;exports.RobotSetupReadinessIndicator=We;exports.RobotSetupReadinessState=he;exports.SelectableFab=uo;exports.TabBar=mo;exports.Timer=So;exports.VelocitySlider=Ve;exports.VelocitySliderLabel=me;exports.WandelbotsDataGrid=Ae;exports.createDebugMessage=to;exports.createErrorMessage=io;exports.createInfoMessage=oo;exports.createLogMessage=K;exports.createNovaMuiTheme=Co;exports.createWarningMessage=no;exports.jointValuesEqual=ge;exports.poseEqual=Je;exports.tcpMotionEqual=pe;exports.unwrapRotationVector=Be;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JointTypeEnum, type CoordinateSystem, type MotionGroupDescription, type RobotTcp } from "@wandelbots/nova-js/v2";
|
|
1
|
+
import { JointTypeEnum, OperationMode, SafetyStateType, type CoordinateSystem, type MotionGroupDescription, type RobotTcp } from "@wandelbots/nova-js/v2";
|
|
2
2
|
import { type IReactionDisposer } from "mobx";
|
|
3
3
|
import type { JoggerConnection } from "../../lib/JoggerConnection";
|
|
4
4
|
declare const discreteIncrementOptions: {
|
|
@@ -71,12 +71,8 @@ export declare class JoggingStore {
|
|
|
71
71
|
rotationVelocityDegPerSec: number;
|
|
72
72
|
/** Minimum translation velocity user can choose on the velocity slider in °/s */
|
|
73
73
|
minTranslationVelocityMmPerSec: number;
|
|
74
|
-
/** Maximum translation velocity user can choose on the velocity slider in °/s */
|
|
75
|
-
maxTranslationVelocityMmPerSec: number;
|
|
76
74
|
/** Minimum rotation velocity user can choose on the velocity slider in °/s */
|
|
77
75
|
minRotationVelocityDegPerSec: number;
|
|
78
|
-
/** Maximum rotation velocity user can choose on the velocity slider in °/s */
|
|
79
|
-
maxRotationVelocityDegPerSec: number;
|
|
80
76
|
/** Whether to show the coordinate system select dropdown in the UI */
|
|
81
77
|
showCoordSystemSelect: boolean;
|
|
82
78
|
/** Whether to show the TCP select dropdown in the UI */
|
|
@@ -103,6 +99,8 @@ export declare class JoggingStore {
|
|
|
103
99
|
* should be rendered by the JoggingPanel component.
|
|
104
100
|
*/
|
|
105
101
|
jointType: JointTypeEnum;
|
|
102
|
+
operationMode: OperationMode | null;
|
|
103
|
+
safetyState: SafetyStateType | null;
|
|
106
104
|
/**
|
|
107
105
|
* Load a jogging store with the relevant data it needs
|
|
108
106
|
* from the backend
|
|
@@ -174,9 +172,36 @@ export declare class JoggingStore {
|
|
|
174
172
|
get rotationVelocityRadsPerSec(): number;
|
|
175
173
|
/** Selected velocity in mm/sec or deg/sec */
|
|
176
174
|
velocityInDisplayUnits(useDegree: boolean): number;
|
|
177
|
-
|
|
175
|
+
get isAutoMode(): boolean;
|
|
176
|
+
get isSafetyStateNormal(): boolean;
|
|
177
|
+
/** Maximum rotation velocity user can choose on the velocity slider in °/s */
|
|
178
|
+
get maxRotationVelocityDegPerSec(): number;
|
|
179
|
+
/** Maximum translation velocity user can choose on the velocity slider in mm/s */
|
|
180
|
+
get maxTranslationVelocityMmPerSec(): number;
|
|
181
|
+
/**
|
|
182
|
+
* Returns joint velocity in °/s
|
|
183
|
+
* @param joint JointLimits
|
|
184
|
+
* @param fallback number
|
|
185
|
+
* @private
|
|
186
|
+
*/
|
|
187
|
+
private getJointVelocity;
|
|
188
|
+
/**
|
|
189
|
+
* Maximum joint rotation velocity user can choose on the velocity slider in °/s
|
|
190
|
+
*/
|
|
191
|
+
get maxJointVelocityInDisplayUnits(): number;
|
|
192
|
+
/** Minimum selectable velocity in mm/sec or deg/sec */
|
|
178
193
|
minVelocityInDisplayUnits(useDegree: boolean): number;
|
|
179
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* Maximum selectable velocity in mm/sec or deg/sec
|
|
196
|
+
*
|
|
197
|
+
* If data provided by the api is already present - read out the limits from the motionGroupDescription
|
|
198
|
+
*
|
|
199
|
+
* Automatic mode -> auto_limits
|
|
200
|
+
* Manual mode t1 -> manual_t1_limits
|
|
201
|
+
* Manual mode t2 -> manual_t2_limits
|
|
202
|
+
*
|
|
203
|
+
* In other case - return the fallbacks
|
|
204
|
+
*/
|
|
180
205
|
maxVelocityInDisplayUnits(useDegree: boolean): number;
|
|
181
206
|
onTabChange(_event: React.SyntheticEvent, newValue: number): void;
|
|
182
207
|
setSelectedCoordSystemId(id: string): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { JoggingStore } from "./JoggingStore";
|
|
2
|
-
export declare const JoggingVelocitySlider: (({ store, useDegree }: {
|
|
2
|
+
export declare const JoggingVelocitySlider: (({ store, useDegree, isJointVelocitySlider, }: {
|
|
3
3
|
store: JoggingStore;
|
|
4
4
|
useDegree: boolean;
|
|
5
|
+
isJointVelocitySlider?: boolean;
|
|
5
6
|
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/theming-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/theming-kJuzfb6S.cjs"),o=require("./chunks/interpolation-Cy1f8c4M.cjs"),t=require("./chunks/externalizeComponent-CqnB_8q-.cjs"),a=require("./chunks/SafetyBar-n6391WIY.cjs");exports.AppHeader=e.AppHeader;exports.ConnectedMotionGroup=e.ConnectedMotionGroup;exports.CycleTimer=e.CycleTimer;exports.JoggerConnection=e.JoggerConnection;exports.JoggingCartesianAxisControl=e.JoggingCartesianAxisControl;exports.JoggingJointValueControl=e.JoggingJointValueControl;exports.JoggingPanel=e.JoggingPanel;exports.JoggingStore=e.JoggingStore;exports.LoadingCover=e.LoadingCover;exports.LoadingErrorMessage=e.LoadingErrorMessage;exports.LogPanel=e.LogPanel;exports.LogStore=e.LogStore;exports.LogViewer=e.LogViewer;exports.MotionStreamConnection=e.MotionStreamConnection;exports.NoMotionGroupModal=e.NoMotionGroupModal;exports.PoseCartesianValues=e.PoseCartesianValues;exports.PoseJointValues=e.PoseJointValues;exports.RobotListItem=e.RobotListItem;exports.RobotSetupReadinessIndicator=e.RobotSetupReadinessIndicator;exports.RobotSetupReadinessState=e.RobotSetupReadinessState;exports.SelectableFab=e.SelectableFab;exports.TabBar=e.TabBar;exports.Timer=e.Timer;exports.VelocitySlider=e.VelocitySlider;exports.VelocitySliderLabel=e.VelocitySliderLabel;exports.WandelbotsDataGrid=e.WandelbotsDataGrid;exports.createDebugMessage=e.createDebugMessage;exports.createErrorMessage=e.createErrorMessage;exports.createInfoMessage=e.createInfoMessage;exports.createLogMessage=e.createLogMessage;exports.createNovaMuiTheme=e.createNovaMuiTheme;exports.createWarningMessage=e.createWarningMessage;exports.jointValuesEqual=e.jointValuesEqual;exports.poseEqual=e.poseEqual;exports.tcpMotionEqual=e.tcpMotionEqual;exports.unwrapRotationVector=e.unwrapRotationVector;exports.ProgramControl=o.ProgramControl;exports.ProgramState=o.ProgramState;exports.ProgramStateIndicator=o.ProgramStateIndicator;exports.ValueInterpolator=o.ValueInterpolator;exports.useAnimationFrame=o.useAnimationFrame;exports.useAutorun=o.useAutorun;exports.useInterpolation=o.useInterpolation;exports.useMounted=o.useMounted;exports.useReaction=o.useReaction;exports.i18n=t.i18n;exports.SafetyBar=a.SafetyBar;
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as o, s, C as t, t as r, a as n, b as i, d as g, J as l, f as u, g as c, h as d, L as p, n as m, M, N as S, P as b, e as C, R as V, p as L, o as P, S as f, T as J, q as R, V as x, r as I, W as A, j as E, m as T, k as q, i as y, c as v, l as w, u as G, v as N, w as W, x as h } from "./chunks/theming-
|
|
2
|
-
import { a as B, P as D, b as F, V as k, e as H, c as z, f as K, u as O, d as Q } from "./chunks/interpolation-
|
|
3
|
-
import { i as X } from "./chunks/externalizeComponent-
|
|
4
|
-
import { S as Z } from "./chunks/SafetyBar-
|
|
1
|
+
import { A as o, s, C as t, t as r, a as n, b as i, d as g, J as l, f as u, g as c, h as d, L as p, n as m, M, N as S, P as b, e as C, R as V, p as L, o as P, S as f, T as J, q as R, V as x, r as I, W as A, j as E, m as T, k as q, i as y, c as v, l as w, u as G, v as N, w as W, x as h } from "./chunks/theming-DW-GUJAo.js";
|
|
2
|
+
import { a as B, P as D, b as F, V as k, e as H, c as z, f as K, u as O, d as Q } from "./chunks/interpolation-BDCy5Kcc.js";
|
|
3
|
+
import { i as X } from "./chunks/externalizeComponent-BLilFZni.js";
|
|
4
|
+
import { S as Z } from "./chunks/SafetyBar-C6Kcqza9.js";
|
|
5
5
|
export {
|
|
6
6
|
o as AppHeader,
|
|
7
7
|
s as ConnectedMotionGroup,
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/MotionGroupVisualizer-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/MotionGroupVisualizer-DXWOeeh1.cjs"),e=require("./chunks/theming-kJuzfb6S.cjs"),t=require("./chunks/interpolation-Cy1f8c4M.cjs"),i=require("./chunks/externalizeComponent-CqnB_8q-.cjs"),s=require("./chunks/SafetyBar-n6391WIY.cjs"),a=require("./chunks/robot-SEtfVAmf.cjs"),n=require("./chunks/wbLogo-G_IfZ03l.cjs"),r=require("./chunks/safety-state-stop-CgPfwC18.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.LinearAxis=o.LinearAxis;exports.MANUFACTURER_HOME_CONFIGS=o.MANUFACTURER_HOME_CONFIGS;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.PresetEnvironment=o.PresetEnvironment;exports.Robot=o.Robot;exports.RobotCard=o.RobotCard;exports.SafetyZonesRenderer=o.SafetyZonesRenderer;exports.SupportedLinearAxis=o.SupportedLinearAxis;exports.SupportedRobot=o.SupportedRobot;exports.TrajectoryRenderer=o.TrajectoryRenderer;exports.defaultAxisConfig=o.defaultAxisConfig;exports.defaultGetModel=o.defaultGetModel;exports.extractManufacturer=o.extractManufacturer;exports.getDefaultHomeConfig=o.getDefaultHomeConfig;exports.AppHeader=e.AppHeader;exports.ConnectedMotionGroup=e.ConnectedMotionGroup;exports.CycleTimer=e.CycleTimer;exports.JoggerConnection=e.JoggerConnection;exports.JoggingCartesianAxisControl=e.JoggingCartesianAxisControl;exports.JoggingJointValueControl=e.JoggingJointValueControl;exports.JoggingPanel=e.JoggingPanel;exports.JoggingStore=e.JoggingStore;exports.LoadingCover=e.LoadingCover;exports.LoadingErrorMessage=e.LoadingErrorMessage;exports.LogPanel=e.LogPanel;exports.LogStore=e.LogStore;exports.LogViewer=e.LogViewer;exports.MotionStreamConnection=e.MotionStreamConnection;exports.NoMotionGroupModal=e.NoMotionGroupModal;exports.PoseCartesianValues=e.PoseCartesianValues;exports.PoseJointValues=e.PoseJointValues;exports.RobotListItem=e.RobotListItem;exports.RobotSetupReadinessIndicator=e.RobotSetupReadinessIndicator;exports.RobotSetupReadinessState=e.RobotSetupReadinessState;exports.SelectableFab=e.SelectableFab;exports.TabBar=e.TabBar;exports.Timer=e.Timer;exports.VelocitySlider=e.VelocitySlider;exports.VelocitySliderLabel=e.VelocitySliderLabel;exports.WandelbotsDataGrid=e.WandelbotsDataGrid;exports.createDebugMessage=e.createDebugMessage;exports.createErrorMessage=e.createErrorMessage;exports.createInfoMessage=e.createInfoMessage;exports.createLogMessage=e.createLogMessage;exports.createNovaMuiTheme=e.createNovaMuiTheme;exports.createWarningMessage=e.createWarningMessage;exports.jointValuesEqual=e.jointValuesEqual;exports.poseEqual=e.poseEqual;exports.tcpMotionEqual=e.tcpMotionEqual;exports.unwrapRotationVector=e.unwrapRotationVector;exports.ProgramControl=t.ProgramControl;exports.ProgramState=t.ProgramState;exports.ProgramStateIndicator=t.ProgramStateIndicator;exports.ValueInterpolator=t.ValueInterpolator;exports.useAnimationFrame=t.useAnimationFrame;exports.useAutorun=t.useAutorun;exports.useInterpolation=t.useInterpolation;exports.useMounted=t.useMounted;exports.useReaction=t.useReaction;exports.i18n=i.i18n;exports.SafetyBar=s.SafetyBar;exports.AxisXIcon=a.ForwardRef;exports.AxisYIcon=a.ForwardRef$1;exports.AxisZIcon=a.ForwardRef$2;exports.JogMinusIcon=a.ForwardRef$3;exports.JogPlusIcon=a.ForwardRef$4;exports.RobotIcon=a.ForwardRef$5;exports.RotationIcon=a.ForwardRef$6;exports.HomeIcon=n.ForwardRef;exports.JoggingIcon=n.ForwardRef$1;exports.OrientationCoordSystemIcon=n.ForwardRef$2;exports.OrientationToolIcon=n.ForwardRef$3;exports.WBLogoIcon=n.ForwardRef$4;exports.ControllerTypePhysicalIcon=r.ForwardRef;exports.ControllerTypeVirtualIcon=r.ForwardRef$1;exports.OperationModeAutomaticIcon=r.ForwardRef$2;exports.OperationModeErrorIcon=r.ForwardRef$3;exports.OperationModeManualIcon=r.ForwardRef$4;exports.SafetyStateErrorIcon=r.ForwardRef$5;exports.SafetyStateEstopIcon=r.ForwardRef$6;exports.SafetyStateManualActionRequiredIcon=r.ForwardRef$7;exports.SafetyStateNormalIcon=r.ForwardRef$8;exports.SafetyStateStopIcon=r.ForwardRef$9;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as e, L as s, M as t, h as r, P as n, b as i, R as c, S as l, c as g, f as u, T as d, a as p, d as S, e as I, g as f } from "./chunks/MotionGroupVisualizer-
|
|
2
|
-
import { A as m, s as C, C as R, t as b, a as x, b as y, d as A, J as L, f as P, g as V, h as E, L as J, n as T, M as F, N as O, P as G, e as N, R as h, p as q, o as v, S as H, T as W, q as j, V as w, r as B, W as D, j as U, m as Z, k as _, i as k, c as z, l as X, u as Y, v as K, w as Q, x as $ } from "./chunks/theming-
|
|
3
|
-
import { a as oa, P as ea, b as sa, V as ta, e as ra, c as na, f as ia, u as ca, d as la } from "./chunks/interpolation-
|
|
4
|
-
import { i as ua } from "./chunks/externalizeComponent-
|
|
5
|
-
import { S as pa } from "./chunks/SafetyBar-
|
|
1
|
+
import { C as e, L as s, M as t, h as r, P as n, b as i, R as c, S as l, c as g, f as u, T as d, a as p, d as S, e as I, g as f } from "./chunks/MotionGroupVisualizer-FslyKR4F.js";
|
|
2
|
+
import { A as m, s as C, C as R, t as b, a as x, b as y, d as A, J as L, f as P, g as V, h as E, L as J, n as T, M as F, N as O, P as G, e as N, R as h, p as q, o as v, S as H, T as W, q as j, V as w, r as B, W as D, j as U, m as Z, k as _, i as k, c as z, l as X, u as Y, v as K, w as Q, x as $ } from "./chunks/theming-DW-GUJAo.js";
|
|
3
|
+
import { a as oa, P as ea, b as sa, V as ta, e as ra, c as na, f as ia, u as ca, d as la } from "./chunks/interpolation-BDCy5Kcc.js";
|
|
4
|
+
import { i as ua } from "./chunks/externalizeComponent-BLilFZni.js";
|
|
5
|
+
import { S as pa } from "./chunks/SafetyBar-C6Kcqza9.js";
|
|
6
6
|
import { F as Ia, a as fa, b as Ma, c as ma, d as Ca, e as Ra, f as ba } from "./chunks/robot-Cy9ST5-m.js";
|
|
7
7
|
import { F as ya, a as Aa, b as La, c as Pa, d as Va } from "./chunks/wbLogo-CObCmqTw.js";
|
|
8
8
|
import { F as Ja, a as Ta, b as Fa, c as Oa, d as Ga, e as Na, f as ha, g as qa, h as va, i as Ha } from "./chunks/safety-state-stop-CJW5CKkp.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.5-pr.feat-RB-3582-limits-from-api.605.fd3b200",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|