@wandelbots/wandelbots-js-react-components 3.3.2 → 3.4.0-pr.feat-yaskawa-gp200s.437.5d50e5b
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/core.cjs.js +1 -1
- package/dist/core.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{theming-j4s40Rk-.cjs → theming-BQcKj8Gp.cjs} +5 -5
- package/dist/theming-BQcKj8Gp.cjs.map +1 -0
- package/dist/{theming-Bd0vaauc.js → theming-Bafjg0Wg.js} +420 -420
- package/dist/theming-Bafjg0Wg.js.map +1 -0
- package/package.json +13 -13
- package/dist/theming-Bd0vaauc.js.map +0 -1
- package/dist/theming-j4s40Rk-.cjs.map +0 -1
|
@@ -125,9 +125,9 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
125
125
|
`).map(r=>G({text:r},t?pS(r,e):{width:0,height:0}))}function xS(){const[e,t]=j.useState(!1);return j.useEffect(()=>{t(!0)},[]),e}const bS=["x","y","style","text","ownerState"],vS=["angle","textAnchor","dominantBaseline"];function hh(e){const{x:t,y:n,style:r,text:i}=e,o=ft(e,bS),s=r??{},{angle:a,textAnchor:l,dominantBaseline:c}=s,u=ft(s,vS),d=xS(),h=j.useMemo(()=>yS({style:u,needsComputation:d&&i.includes(`
|
|
126
126
|
`),text:i}),[u,i,d]);let f;switch(c){case"hanging":case"text-before-edge":f=0;break;case"central":f=(h.length-1)/2*-h[0].height;break;default:f=(h.length-1)*-h[0].height;break}return y.jsxRuntimeExports.jsx("text",G({},o,{transform:a?`rotate(${a}, ${t}, ${n})`:void 0,x:t,y:n,textAnchor:l,dominantBaseline:c,style:u,children:h.map((m,p)=>y.jsxRuntimeExports.jsx("tspan",{x:t,dy:`${p===0?f:h[0].height}px`,dominantBaseline:c,children:m.text},p))}))}process.env.NODE_ENV!=="production"&&(hh.propTypes={lineHeight:b.number,needsComputation:b.bool,ownerState:b.any,style:b.object,text:b.string.isRequired});const SS=["text","className"];function wS({value:e}){return e===null?null:e.toLocaleString()}function fh(e){const{text:t=wS,className:n}=e,r=ft(e,SS),{value:i,valueMin:o,valueMax:s,cx:a,cy:l}=ka(),c=typeof t=="function"?t({value:i,valueMin:o,valueMax:s}):t;return c===null?null:y.jsxRuntimeExports.jsx("g",{className:$e(Pa.valueText,n),children:y.jsxRuntimeExports.jsx(hh,G({x:a,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},r))})}process.env.NODE_ENV!=="production"&&(fh.propTypes={lineHeight:b.number,needsComputation:b.bool,ownerState:b.any,style:b.object,text:b.oneOfType([b.func,b.string])});const ES=["text","children","classes","className","skipAnimation"],TS=e=>{const{classes:t}=e;return Cr({root:["root"]},nS,t)},Da=j.forwardRef(function(t,n){const{text:r,children:i,className:o,skipAnimation:s}=t,a=ft(t,ES),l=TS(t);return y.jsxRuntimeExports.jsxs(Oa,G({},a,{className:$e(l.root,o),ref:n,children:[y.jsxRuntimeExports.jsx(lS,{}),y.jsxRuntimeExports.jsx(lh,{skipAnimation:s}),y.jsxRuntimeExports.jsx(fh,{text:r}),i]}))});process.env.NODE_ENV!=="production"&&(Da.displayName="Gauge");process.env.NODE_ENV!=="production"&&(Da.propTypes={children:b.node,classes:b.object,className:b.string,cornerRadius:b.oneOfType([b.number,b.string]),cx:b.oneOfType([b.number,b.string]),cy:b.oneOfType([b.number,b.string]),desc:b.string,endAngle:b.number,height:b.number,id:b.string,innerRadius:b.oneOfType([b.number,b.string]),margin:b.oneOfType([b.number,b.shape({bottom:b.number,left:b.number,right:b.number,top:b.number})]),outerRadius:b.oneOfType([b.number,b.string]),skipAnimation:b.bool,startAngle:b.number,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),text:b.oneOfType([b.func,b.string]),title:b.string,value:b.number,valueMax:b.number,valueMin:b.number,width:b.number});const CS=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,o=[];return t>0?(o.push(t.toString()),o.push(n.toString().padStart(2,"0")),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):n>0?(o.push(n.toString()),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):(o.push(r.toString()),o.push(i.toString().padStart(2,"0"))),o.join(":")},lt=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(o>0||Object.keys(a).length===0)&&(a.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},_S=(e,t,n)=>e==="countdown"&&n!==null?Math.min(100,t/n*100):e==="measuring"?t/60%1*100:0,MS=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i,i18n:o}=fe.useTranslation(),s=R.useTheme(),{currentState:a,remainingTime:l,maxTime:c,currentProgress:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:f,pulsatingFinished:m,showLabels:p,showMainText:g,showIdlePulsating:v,idleDotsCount:C}=t;return y.jsxRuntimeExports.jsxs(R.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[y.jsxRuntimeExports.jsx(Da,{width:264,height:264,value:a==="idle"?0:u,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:h||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?s.palette.error.light:s.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"}}}),y.jsxRuntimeExports.jsxs(R.Box,{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:[y.jsxRuntimeExports.jsx(R.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:y.jsxRuntimeExports.jsx(R.Fade,{in:p&&!n&&a!=="idle"&&a!=="success",timeout:300,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:a==="measured"&&(f||m)?s.palette.success.main:s.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:y.jsxRuntimeExports.jsx("span",{style:{opacity:a==="measured"&&m?f?1:.6:1,transition:"opacity 2s ease-in-out"},children:a==="measuring"||a==="measured"?i("CycleTimer.CycleTime.lb","Cycle Time"):a==="countdown"?i("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),y.jsxRuntimeExports.jsxs(R.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[y.jsxRuntimeExports.jsx(R.Fade,{in:g&&a==="idle"&&!n,timeout:200,children:y.jsxRuntimeExports.jsxs(R.Typography,{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:[y.jsxRuntimeExports.jsx("span",{style:{opacity:v?1:.6,transition:"opacity 2s ease-in-out"},children:i("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),y.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:v?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(C)})]})}),y.jsxRuntimeExports.jsx(R.Fade,{in:g&&n,timeout:200,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:i("CycleTimer.Error.lb","Error")})}),y.jsxRuntimeExports.jsx(R.Fade,{in:g&&!n&&a!=="idle"&&a!=="success",timeout:300,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:y.jsxRuntimeExports.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:CS(l)})})})]}),y.jsxRuntimeExports.jsx(R.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:y.jsxRuntimeExports.jsx(R.Fade,{in:p&&!n&&a!=="idle"&&a!=="success",timeout:300,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:a==="measured"&&(f||m)?s.palette.success.main:s.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:y.jsxRuntimeExports.jsx("span",{style:{opacity:a==="measured"&&m?f?1:.6:1,transition:"opacity 2s ease-in-out"},children:a==="measuring"?i("CycleTimer.Measuring.lb","measuring..."):a==="measured"?i("CycleTimer.Determined.lb","determined"):a==="countdown"&&c!==null?i("CycleTimer.OfTime.lb",{time:lt(c,o.language)}):""})})})})]})]})},RS=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:o,i18n:s}=fe.useTranslation(),a=R.useTheme(),{currentState:l,remainingTime:c,maxTime:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:f,pulsatingFinished:m,showIdlePulsating:p,idleDotsCount:g}=t;return r&&l==="idle"?y.jsxRuntimeExports.jsx(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?o("CycleTimer.Error.lb","Error"):l==="idle"?"0s":lt(c,s.language)})}):y.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&r)&&y.jsxRuntimeExports.jsx(R.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:h||d?.6:1,transition:"opacity 0.5s ease-out"},children:y.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[y.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:l==="measured"?f||m?a.palette.success.main:a.palette.text.secondary:a.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&m?f?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),y.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:l==="measured"?f||m?a.palette.success.main:a.palette.text.secondary:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:e.currentProgress)/100)}`,style:{opacity:l==="measured"&&m?f?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?f||m?a.palette.success.main:a.palette.text.secondary:a.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?p?1:.6:l==="measured"&&m?f?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:n?o("CycleTimer.Error.lb","Error"):l==="idle"?y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx("span",{children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),y.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(g)})]}):l==="measuring"?r?lt(c,s.language):`${lt(c,s.language)} / ${o("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?r?lt(c,s.language):`${lt(c,s.language)} / ${o("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&u!==null?r?lt(c,s.language):`${lt(c,s.language)} / ${o("CycleTimer.Time.lb",{time:lt(u,s.language)})}`:lt(c,s.language)})]})},IS=()=>{const[e,t]=$.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),n=$.useRef(null),r=$.useRef(null),i=$.useRef(null),o=$.useRef(null),s=$.useRef(0),a=$.useRef(null),l=$.useRef(null),c=$.useCallback(()=>{t(w=>({...w,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(w=>({...w,showPauseAnimation:!1}))},800)},[]),u=$.useCallback(()=>{t(w=>({...w,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(w=>({...w,showErrorAnimation:!1}))},600)},[]),d=$.useCallback(()=>{t(w=>({...w,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),h=$.useCallback(w=>{s.current=0,t(E=>({...E,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(E=>({...E,pulsatingFinished:!0})),i.current=setInterval(()=>{t(E=>({...E,showPulsatingText:!E.showPulsatingText}))},2e3),w&&w()},800)},[]),f=$.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),t(w=>({...w,showPulsatingText:!1,pulsatingFinished:!1})),s.current=0},[]),m=$.useCallback(()=>{t(w=>({...w,showIdlePulsating:!0})),a.current=setInterval(()=>{t(w=>({...w,showIdlePulsating:!w.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(w=>({...w,idleDotsCount:(w.idleDotsCount+1)%4}))},800)},[]),p=$.useCallback(()=>{a.current&&(clearInterval(a.current),a.current=null),l.current&&(clearInterval(l.current),l.current=null),t(w=>({...w,showIdlePulsating:!1,idleDotsCount:0}))},[]),g=$.useCallback(()=>{t(w=>({...w,showLabels:!1,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},200)},[]),v=$.useCallback(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},[]),C=$.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),o.current&&clearTimeout(o.current),i.current&&clearInterval(i.current),a.current&&clearInterval(a.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:p,triggerFadeTransition:g,setInitialAnimationState:v,cleanup:C}},AS=({autoStart:e,onCycleEnd:t,onMeasuringComplete:n,hasError:r,onPauseAnimation:i,onErrorAnimation:o,onClearErrorAnimation:s,onStartPulsating:a})=>{const[l,c]=$.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=$.useRef(null),d=$.useRef(null),h=$.useRef(0),[f]=de.useInterpolation([0],{tension:80,friction:18,onChange:([_])=>{c(S=>({...S,currentProgress:_}))}}),m=$.useCallback(()=>{c(_=>({..._,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,f.setImmediate([0])},[f]),p=$.useCallback((_=0)=>{const S=_/60%1*100;c(T=>({...T,currentState:"measuring",maxTime:null,remainingTime:_,isPausedState:!1,currentProgress:S})),h.current=0,f.setImmediate([S]),e?(d.current=Date.now()-_*1e3,c(T=>({...T,isRunning:!0}))):d.current=null},[e,f]),g=$.useCallback((_,S=0)=>{c(O=>({...O,isRunning:!1})),d.current=null,c(O=>({...O,currentState:"countdown",maxTime:_,isPausedState:!1})),h.current=0;const T=Math.max(0,_-S),A=S>0?S/_*100:0;c(O=>({...O,remainingTime:T,currentProgress:A})),f.setImmediate([A]),T===0?(c(O=>({...O,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-S*1e3,c(O=>({...O,isRunning:!0}))},0):d.current=null},[e,t,f]),v=$.useCallback(()=>{c(_=>({..._,isRunning:!1,currentState:"measured"})),d.current=null,a(()=>{n&&n()})},[a,n]),C=$.useCallback(()=>{if(d.current&&l.isRunning){const S=Date.now()-d.current;h.current+=S;const T=h.current/1e3,A=_S(l.currentState,T,l.maxTime);f.setTarget([A])}c(_=>({..._,isRunning:!1,isPausedState:!0})),i()},[l.isRunning,l.currentState,l.maxTime,f,i]),w=$.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(_=>({..._,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),E=$.useCallback(()=>l.isPausedState,[l.isPausedState]);return $.useEffect(()=>{r?(l.isRunning&&!l.isPausedState&&(c(_=>({..._,wasRunningBeforeError:!0})),C()),o()):(l.wasRunningBeforeError&&l.isPausedState&&(c(_=>({..._,wasRunningBeforeError:!1})),w()),s())},[r,l.isRunning,l.isPausedState,l.wasRunningBeforeError,C,w,o,s]),$.useEffect(()=>{if(l.isRunning){const _=()=>{if(d.current){const T=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const A=Math.max(0,l.maxTime-T);c(D=>({...D,remainingTime:Math.ceil(A)}));const O=Math.min(100,T/l.maxTime*100);if(f.setTarget([O]),A<=0){c(D=>({...D,isRunning:!1,remainingTime:0})),d.current=null,f.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(O=>({...O,remainingTime:Math.floor(T)}));const A=T/60%1*100;f.setTarget([A])}l.isRunning&&(u.current=requestAnimationFrame(_))}};u.current=requestAnimationFrame(_)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,f]),$.useEffect(()=>{let _=null;const S=()=>{f.update(1/60),_=requestAnimationFrame(S)};return _=requestAnimationFrame(S),()=>{_&&cancelAnimationFrame(_)}},[f]),{timerState:l,controls:{startNewCycle:g,startMeasuring:p,setIdle:m,completeMeasuring:v,pause:C,resume:w,isPaused:E}}},jS=y.externalizeComponent(ie.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:n,autoStart:r=!0,variant:i="default",compact:o=!1,className:s,hasError:a=!1})=>{const l=$.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:f,stopPulsatingAnimation:m,startIdleAnimations:p,stopIdleAnimations:g,triggerFadeTransition:v,setInitialAnimationState:C,cleanup:w}=IS(),{timerState:E,controls:_}=AS({autoStart:r,onCycleEnd:t,onMeasuringComplete:n,hasError:a,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:f});return $.useEffect(()=>{const S=l.current;l.current!==void 0&&S!==E.currentState?(S==="measured"&&m(),S==="idle"&&g(),v()):C(),E.currentState==="idle"&&p(),l.current=E.currentState},[E.currentState,m,g,p,v,C]),$.useEffect(()=>{let S=!0;const T=setTimeout(()=>{S&&e(_)},0);return()=>{S=!1,clearTimeout(T)}},[e,_]),$.useEffect(()=>w,[w]),i==="small"?y.jsxRuntimeExports.jsx(RS,{timerState:E,animationState:c,hasError:a,compact:o,className:s}):y.jsxRuntimeExports.jsx(MS,{timerState:E,animationState:c,hasError:a,className:s})})),vn=um;process.env.NODE_ENV!=="production"&&(b.node,b.object.isRequired);function $a(e){return sm(e)}function kS(e){return pn("MuiSvgIcon",e)}Hi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const OS=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(n)}`]};return Cr(i,kS,r)},PS=Ue("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${De(n.color)}`],t[`fontSize${De(n.fontSize)}`]]}})(vn(({theme:e})=>{var t,n,r,i,o,s,a,l,c,u,d,h,f,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:p=>!p.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,p])=>p&&p.main).map(([p])=>{var g,v;return{props:{color:p},style:{color:(v=(g=(e.vars??e).palette)==null?void 0:g[p])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(m=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ji=j.forwardRef(function(t,n){const r=$a({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...f}=r,m=j.isValidElement(i)&&i.type==="svg",p={...r,color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:m},g={};u||(g.viewBox=h);const v=OS(p);return y.jsxRuntimeExports.jsxs(PS,{as:a,className:$e(v.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...g,...f,...m&&i.props,ownerState:p,children:[m?i.props.children:i,d?y.jsxRuntimeExports.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(ji.propTypes={children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),b.string]),component:b.elementType,fontSize:b.oneOfType([b.oneOf(["inherit","large","medium","small"]),b.string]),htmlColor:b.string,inheritViewBox:b.bool,shapeRendering:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),titleAccess:b.string,viewBox:b.string});ji.muiName="SvgIcon";function Xt(e,t){function n(r,i){return y.jsxRuntimeExports.jsx(ji,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=ji.muiName,j.memo(j.forwardRef(n))}function DS(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:o}=j.useRef(t!==void 0),[s,a]=j.useState(n),l=o?t:s;if(process.env.NODE_ENV!=="production"){j.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${i} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
127
127
|
`))},[i,r,t]);const{current:u}=j.useRef(n);j.useEffect(()=>{!o&&JSON.stringify(n)!==JSON.stringify(u)&&console.error([`MUI: A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
|
|
128
|
-
`))},[JSON.stringify(n)])}const c=j.useCallback(u=>{o||a(u)},[]);return[l,c]}const $S=Xt(y.jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),LS=Xt(y.jsxRuntimeExports.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Ac=Xt(y.jsxRuntimeExports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),ph=y.externalizeComponent(ie.observer(({data:e,columns:t,getRowData:n,onRowClick:r,selectedItem:i,getItemId:o,title:s,showCount:a=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var A;const f=R.useTheme(),m=et.useGridApiRef(),p=$.useRef(null),[g,v]=$.useState(null),C=$.useMemo(()=>e.map(n),[e,n]);$.useEffect(()=>{m.current&&C.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(O=>O.field)})},[C,t,m]),$.useEffect(()=>{if(!p.current||!m.current)return;const O=new ResizeObserver(()=>{setTimeout(()=>{m.current&&C.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(D=>D.field)})},100)});return O.observe(p.current),()=>{O.disconnect()}},[m,C.length,t]);const w=$.useMemo(()=>{if(i!==void 0)return i;if(g!==null)return g;if(d&&e.length>0){const O=e[0];return v(O),O}return null},[d,e,i,g]),E=O=>{const D=e.find(k=>n(k).id===O.id);D&&(i===void 0&&v(D),r&&r(D,O))},_=$.useMemo(()=>!w||!o?null:o(w),[w,o]);function S(){return y.jsxRuntimeExports.jsx(et.Toolbar,{children:y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[s&&y.jsxRuntimeExports.jsxs(R.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,a&&` (${e.length})`]}),y.jsxRuntimeExports.jsxs(R.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[y.jsxRuntimeExports.jsx(et.FilterPanelTrigger,{render:y.jsxRuntimeExports.jsx(et.ToolbarButton,{"aria-label":"Show filters",children:y.jsxRuntimeExports.jsx(LS,{fontSize:"small"})})}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),y.jsxRuntimeExports.jsx(et.QuickFilter,{render:(O,D)=>y.jsxRuntimeExports.jsxs(R.Box,{...O,sx:{display:"flex",overflow:"hidden"},children:[!D.expanded&&y.jsxRuntimeExports.jsx(et.QuickFilterTrigger,{render:y.jsxRuntimeExports.jsx(et.ToolbarButton,{"aria-label":"Search",children:y.jsxRuntimeExports.jsx(Ac,{fontSize:"small"})})}),y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:D.expanded?"200px":"0px",position:"relative"},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:D.expanded&&D.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:[D.expanded&&y.jsxRuntimeExports.jsx(Ac,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),y.jsxRuntimeExports.jsx(et.QuickFilterControl,{placeholder:l})]}),D.expanded&&D.value!==""&&y.jsxRuntimeExports.jsx(et.QuickFilterClear,{render:y.jsxRuntimeExports.jsx(R.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:y.jsxRuntimeExports.jsx(R.Box,{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:y.jsxRuntimeExports.jsx(et.ToolbarButton,{"aria-label":"Clear",children:y.jsxRuntimeExports.jsx($S,{fontSize:"small"})})})})})]})]})})]})]})})}const T=u||S;return y.jsxRuntimeExports.jsx(R.Box,{ref:p,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${f.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:f.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:f.palette.action.hover}},...h},children:y.jsxRuntimeExports.jsx(et.DataGrid,{apiRef:m,rows:C,columns:t,onRowClick:E,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:T},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((A=c==null?void 0:c.autosizeOptions)==null?void 0:A.columns)||t.map(O=>O.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"}},..._!==null&&{[`&[data-id="${_}"]`]:{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":{},...c==null?void 0:c.sx}})})}));ph.displayName="WandelbotsDataGrid";const Fn=wm({createStyledComponent:Ue("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>$a({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(Fn.propTypes={children:b.node,component:b.elementType,direction:b.oneOfType([b.oneOf(["column-reverse","column","row-reverse","row"]),b.arrayOf(b.oneOf(["column-reverse","column","row-reverse","row"])),b.object]),divider:b.node,spacing:b.oneOfType([b.arrayOf(b.oneOfType([b.number,b.string])),b.number,b.object,b.string]),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),useFlexGap:b.bool});const NS=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("g",{id:"JogMinus"},j.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),zS=$.forwardRef(NS),FS=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("g",{id:"JogPlus"},j.createElement("g",{id:"Plus"},j.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),j.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),j.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),BS=$.forwardRef(FS),_s=y.externalizeComponent(ie.observer(({colors:e,label:t,getDisplayedValue:n,startJogging:r,stopJogging:i,disabled:o,activeJoggingDirection:s,...a})=>{var w,E,_,S,T,A,O;de.useAnimationFrame(()=>{const D=n(),k=h.current;k&&(k.textContent=D)});const l=R.useTheme(),[c,u]=$.useState(null);$.useEffect(()=>{o&&C()},[o]);const d=s||c,h=$.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const f=d?(w=e.buttonBackgroundColor)==null?void 0:w.pressed:e.borderColor,m={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},p={...m,backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.default,":hover":{backgroundColor:(_=e.buttonBackgroundColor)==null?void 0:_.hovered},":active":{backgroundColor:(S=e.buttonBackgroundColor)==null?void 0:S.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.disabled,"svg path":{fill:l.palette.action.disabled}}},g={...m,backgroundColor:(A=e.buttonBackgroundColor)==null?void 0:A.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.pressed,"svg path":{fill:l.palette.action.disabled}}};function v(D,k){o||D.button===0&&(u(k),r(k))}function C(){u(null),i()}return y.jsxRuntimeExports.jsxs(Fn,{height:"64px",direction:"row",justifyContent:"center",...a,children:[y.jsxRuntimeExports.jsx(R.IconButton,{disabled:o,disableRipple:!0,onPointerDown:D=>v(D,"-"),onPointerUp:C,onPointerOut:C,size:"large",sx:{...d==="-"?g:p,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${f??"#fff"}`,borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:y.jsxRuntimeExports.jsx(zS,{})}),y.jsxRuntimeExports.jsxs(Fn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:[y.jsxRuntimeExports.jsx(Fn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...o?{color:l.palette.action.disabled}:{}},...o?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),y.jsxRuntimeExports.jsx(R.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:n()})]}),y.jsxRuntimeExports.jsx(R.IconButton,{disableRipple:!0,disabled:o,onPointerDown:D=>v(D,"+"),onPointerUp:C,onPointerOut:C,size:"large",sx:{...d==="+"?g:p,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${f??"#fff"}`,borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:y.jsxRuntimeExports.jsx(BS,{})})]})})),GS=Xt(y.jsxRuntimeExports.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),VS=Xt(y.jsxRuntimeExports.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function dn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var mh=typeof global=="object"&&global&&global.Object===Object&&global,US=typeof self=="object"&&self&&self.Object===Object&&self,yt=mh||US||Function("return this")(),ts=function(){return yt.Date.now()},WS=/\s/;function HS(e){for(var t=e.length;t--&&WS.test(e.charAt(t)););return t}var YS=/^\s+/;function qS(e){return e&&e.slice(0,HS(e)+1).replace(YS,"")}var Ut=yt.Symbol,gh=Object.prototype,JS=gh.hasOwnProperty,KS=gh.toString,or=Ut?Ut.toStringTag:void 0;function XS(e){var t=JS.call(e,or),n=e[or];try{e[or]=void 0;var r=!0}catch{}var i=KS.call(e);return r&&(t?e[or]=n:delete e[or]),i}var ZS=Object.prototype,QS=ZS.toString;function e2(e){return QS.call(e)}var t2="[object Null]",n2="[object Undefined]",jc=Ut?Ut.toStringTag:void 0;function Sn(e){return e==null?e===void 0?n2:t2:jc&&jc in Object(e)?XS(e):e2(e)}function hn(e){return e!=null&&typeof e=="object"}var r2="[object Symbol]";function go(e){return typeof e=="symbol"||hn(e)&&Sn(e)==r2}var kc=NaN,i2=/^[-+]0x[0-9a-f]+$/i,o2=/^0b[01]+$/i,s2=/^0o[0-7]+$/i,a2=parseInt;function Oc(e){if(typeof e=="number")return e;if(go(e))return kc;if(dn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=dn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qS(e);var n=o2.test(e);return n||s2.test(e)?a2(e.slice(2),n?2:8):i2.test(e)?kc:+e}var l2="Expected a function",c2=Math.max,u2=Math.min;function d2(e,t,n){var r,i,o,s,a,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(l2);t=Oc(t)||0,dn(n)&&(u=!!n.leading,d="maxWait"in n,o=d?c2(Oc(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function f(S){var T=r,A=i;return r=i=void 0,c=S,s=e.apply(A,T),s}function m(S){return c=S,a=setTimeout(v,t),u?f(S):s}function p(S){var T=S-l,A=S-c,O=t-T;return d?u2(O,o-A):O}function g(S){var T=S-l,A=S-c;return l===void 0||T>=t||T<0||d&&A>=o}function v(){var S=ts();if(g(S))return C(S);a=setTimeout(v,p(S))}function C(S){return a=void 0,h&&r?f(S):(r=i=void 0,s)}function w(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function E(){return a===void 0?s:C(ts())}function _(){var S=ts(),T=g(S);if(r=arguments,i=this,l=S,T){if(a===void 0)return m(l);if(d)return clearTimeout(a),a=setTimeout(v,t),f(l)}return a===void 0&&(a=setTimeout(v,t)),s}return _.cancel=w,_.flush=E,_}var h2="Expected a function";function f2(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(h2);return dn(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),d2(e,t,{leading:r,maxWait:t,trailing:i})}const yh=y.externalizeComponent(ie.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:n,upperLimitDegs:r,getValueDegs:i,disabled:o,...s})=>{var w,E,_,S,T,A,O,D,k,x,I,M,F,N,W;const{t:a}=fe.useTranslation(),[l,c]=$.useState(),u=R.useTheme(),d={background:(w=u.palette.backgroundPaperElevation)==null?void 0:w[4],color:(E=u.palette.backgroundPaperElevation)==null?void 0:E[11]},h=ie.useLocalObservable(()=>({activeJoggingDir:null,startJogging(B){this.activeJoggingDir=B,e(B)},stopJogging(){this.activeJoggingDir=null,t()}})),f=f2(()=>{c(i())},50);de.useAnimationFrame(f);function m(B){B.button===0&&h.startJogging("-")}function p(B){B.button===0&&h.startJogging("+")}function g(B){h.stopJogging()}function v(B){h.stopJogging()}function C(B,K=1){if(B===void 0||isNaN(B))return"";const ce=a("General.degree.variable",{amount:B.toFixed(K)});return B>0&&K===0?`+${ce}`:ce}return y.jsxRuntimeExports.jsxs(Fn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(_=u.palette.backgroundPaperElevation)==null?void 0:_[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(S=u.palette.backgroundPaperElevation)==null?void 0:S[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[9]},"&:active":{...d}}},children:[y.jsxRuntimeExports.jsx(R.IconButton,{onPointerDown:m,onPointerUp:g,onPointerOut:v,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:y.jsxRuntimeExports.jsx(GS,{sx:{pointerEvents:"none",color:(k=(D=(O=(A=u.componentsExt)==null?void 0:A.JoggingPanel)==null?void 0:O.JoggingJoint)==null?void 0:D.Joint)==null?void 0:k.arrowColor}})}),y.jsxRuntimeExports.jsxs(Fn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(x=u.palette.backgroundPaperElevation)==null?void 0:x[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:C(l)}),y.jsxRuntimeExports.jsx(R.Slider,{disabled:!0,"aria-label":"Joint position",min:n,max:r,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:o?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:o?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[5],opacity:1}},marks:n!==void 0&&r!==void 0&&[{value:n,label:C(n,0)},{value:r,label:C(r,0)}]})]}),y.jsxRuntimeExports.jsx(R.IconButton,{onPointerDown:p,onPointerUp:g,onPointerOut:v,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:y.jsxRuntimeExports.jsx(VS,{sx:{pointerEvents:"none",color:(W=(N=(F=(M=u.componentsExt)==null?void 0:M.JoggingPanel)==null?void 0:F.JoggingJoint)==null?void 0:N.Joint)==null?void 0:W.arrowColor}})})]})})),p2=Xt(y.jsxRuntimeExports.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),m2=Xt(y.jsxRuntimeExports.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function Et(e,t,n){return Math.max(t,Math.min(n,e))}class g2{constructor(t=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=t,this._y=n,this._z=r,this._w=i}static slerpFlat(t,n,r,i,o,s,a){let l=r[i+0],c=r[i+1],u=r[i+2],d=r[i+3];const h=o[s+0],f=o[s+1],m=o[s+2],p=o[s+3];if(a===0){t[n+0]=l,t[n+1]=c,t[n+2]=u,t[n+3]=d;return}if(a===1){t[n+0]=h,t[n+1]=f,t[n+2]=m,t[n+3]=p;return}if(d!==p||l!==h||c!==f||u!==m){let g=1-a;const v=l*h+c*f+u*m+d*p,C=v>=0?1:-1,w=1-v*v;if(w>Number.EPSILON){const _=Math.sqrt(w),S=Math.atan2(_,v*C);g=Math.sin(g*S)/_,a=Math.sin(a*S)/_}const E=a*C;if(l=l*g+h*E,c=c*g+f*E,u=u*g+m*E,d=d*g+p*E,g===1-a){const _=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=_,c*=_,u*=_,d*=_}}t[n]=l,t[n+1]=c,t[n+2]=u,t[n+3]=d}static multiplyQuaternionsFlat(t,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],h=o[s+1],f=o[s+2],m=o[s+3];return t[n]=a*m+u*d+l*f-c*h,t[n+1]=l*m+u*h+c*d-a*f,t[n+2]=c*m+u*f+a*h-l*d,t[n+3]=u*m-a*d-l*h-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,n,r,i){return this._x=t,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,n=!0){const r=t._x,i=t._y,o=t._z,s=t._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),h=l(r/2),f=l(i/2),m=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"YXZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"ZXY":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"ZYX":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"YZX":this._x=h*u*d+c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d-h*f*m;break;case"XZY":this._x=h*u*d-c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d+h*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,n){const r=n/2,i=Math.sin(r);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(t){const n=t.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=r+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-i)*f}else if(r>a&&r>d){const f=2*Math.sqrt(1+r-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(i+s)/f,this._z=(o+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-r-d);this._w=(o-c)/f,this._x=(i+s)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-r-a);this._w=(s-i)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,n){let r=t.dot(n)+1;return r<Number.EPSILON?(r=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=r):(this._x=0,this._y=-t.z,this._z=t.y,this._w=r)):(this._x=t.y*n.z-t.z*n.y,this._y=t.z*n.x-t.x*n.z,this._z=t.x*n.y-t.y*n.x,this._w=r),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Et(this.dot(t),-1,1)))}rotateTowards(t,n){const r=this.angleTo(t);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,n){const r=t._x,i=t._y,o=t._z,s=t._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(t,n){if(n===0)return this;if(n===1)return this.copy(t);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*t._w+r*t._x+i*t._y+o*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-n;return this._w=f*s+n*this._w,this._x=f*r+n*this._x,this._y=f*i+n*this._y,this._z=f*o+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=s*d+this._w*h,this._x=r*d+this._x*h,this._y=i*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,n,r){return this.copy(t).slerp(n,r)}random(){const t=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),o=Math.sqrt(r);return this.set(i*Math.sin(t),i*Math.cos(t),o*Math.sin(n),o*Math.cos(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,n=0){return this._x=t[n],this._y=t[n+1],this._z=t[n+2],this._w=t[n+3],this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._w,t}fromBufferAttribute(t,n){return this._x=t.getX(n),this._y=t.getY(n),this._z=t.getZ(n),this._w=t.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Bn{constructor(t=0,n=0,r=0){Bn.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(t,n,r){return r===void 0&&(r=this.z),this.x=t,this.y=n,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,n){return this.x=t.x*n.x,this.y=t.y*n.y,this.z=t.z*n.z,this}applyEuler(t){return this.applyQuaternion(Pc.setFromEuler(t))}applyAxisAngle(t,n){return this.applyQuaternion(Pc.setFromAxisAngle(t,n))}applyMatrix3(t){const n=this.x,r=this.y,i=this.z,o=t.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const n=this.x,r=this.y,i=this.z,o=t.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(t){const n=this.x,r=this.y,i=this.z,o=t.x,s=t.y,a=t.z,l=t.w,c=2*(s*i-a*r),u=2*(a*n-o*i),d=2*(o*r-s*n);return this.x=n+l*c+s*d-a*u,this.y=r+l*u+a*c-o*d,this.z=i+l*d+o*u-s*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const n=this.x,r=this.y,i=this.z,o=t.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,n){return this.x=Et(this.x,t.x,n.x),this.y=Et(this.y,t.y,n.y),this.z=Et(this.z,t.z,n.z),this}clampScalar(t,n){return this.x=Et(this.x,t,n),this.y=Et(this.y,t,n),this.z=Et(this.z,t,n),this}clampLength(t,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Et(r,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this}lerpVectors(t,n,r){return this.x=t.x+(n.x-t.x)*r,this.y=t.y+(n.y-t.y)*r,this.z=t.z+(n.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,n){const r=t.x,i=t.y,o=t.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(t){const n=t.lengthSq();if(n===0)return this.set(0,0,0);const r=t.dot(this)/n;return this.copy(t).multiplyScalar(r)}projectOnPlane(t){return ns.copy(this).projectOnVector(t),this.sub(ns)}reflect(t){return this.sub(ns.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(t)/n;return Math.acos(Et(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return n*n+r*r+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,n,r){const i=Math.sin(n)*t;return this.x=i*Math.sin(r),this.y=Math.cos(n)*t,this.z=i*Math.cos(r),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,n,r){return this.x=t*Math.sin(n),this.y=r,this.z=t*Math.cos(n),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(t){const n=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(t,n){return this.fromArray(t.elements,n*4)}setFromMatrix3Column(t,n){return this.fromArray(t.elements,n*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(t),this.y=n,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ns=new Bn,Pc=new g2;function La(e,t,n){if(t.length!==e.length)return!0;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-e[r])>n)return!1;return!0}function xh(e,t,n){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let r=0;return r+=Math.abs(e.orientation[0]-t.orientation[0]),r+=Math.abs(e.orientation[1]-t.orientation[1]),r+=Math.abs(e.orientation[2]-t.orientation[2]),r+=Math.abs(e.position[0]-t.position[0]),r+=Math.abs(e.position[1]-t.position[1]),r+=Math.abs(e.position[2]-t.position[2]),r<=n}function Na(e,t,n){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&xh(e.tcp_pose,t.tcp_pose,n)}function bh(e,t){const n=new ss.Vector3(t[0],t[1],t[2]),r=new ss.Vector3(e[0],e[1],e[2]),i=n.length(),o=n.normalize();let s=r.length(),a=r.normalize();a.dot(o)<0&&(s=-s,a=a.multiplyScalar(-1));let l=s-i;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),s=i+l,[...a.multiplyScalar(s)]}const Dc=1e-4;class yo{constructor(t,n,r,i,o,s){this.nova=t,this.controller=n,this.motionGroup=r,this.description=i,this.initialMotionState=o,this.motionStateSocket=s,this.rapidlyChangingMotionState=o,s.addEventListener("message",a=>{var c;const l=(c=Te.tryParseJson(a.data))==null?void 0:c.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${a.data}`);La(this.rapidlyChangingMotionState.joint_position,l.joint_position,Dc)||he.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=l.joint_position}),Na(this.rapidlyChangingMotionState,l,Dc)||he.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(u=l.tcp_pose)!=null&&u.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:bh(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&he.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),he.makeAutoObservable(this)}static async open(t,n){var d;const[r,i]=n.split("@"),o=await t.api.controller.getCurrentRobotControllerState(i),s=o==null?void 0:o.motion_groups.find(h=>h.motion_group===n);if(!o||!s)throw new Error(`Controller ${i} or motion group ${n} not found`);const a=t.openReconnectingWebsocket(`/controllers/${i}/motion-groups/${n}/state-stream`),l=await a.firstMessage(),c=(d=Te.tryParseJson(l.data))==null?void 0:d.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${s.motion_group}. Initial state:
|
|
129
|
-
`,c);const u=await t.api.motionGroup.getMotionGroupDescription(i,s.motion_group);return new yo(t,o,s,u,c,a)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}dispose(){this.motionStateSocket.close()}}const $c="Movement request rejected. Another client is currently executing a 'Jogging' motion!";class xo{constructor(t,n={}){this.motionStream=t,this.options=n,this.ENDPOINT_JOGGING="/execution/jogging",this.ENDPOINT_TRAJECTORY="/execution/trajectory",this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",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=(n==null?void 0:n.tcp)||t.motionGroup.tcp||this.DEFAULT_TCP,this.orientation=(n==null?void 0:n.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(n==null?void 0:n.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(n==null?void 0:n.mode)||this.DEFAULT_MODE,this.onError=n==null?void 0:n.onError}static async open(t,n,r={}){const i=await yo.open(t,n),o=new xo(i,r);return await o.setJoggingMode(o.mode),o}async setOptions(t){t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.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 t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=[this.joggingSocket,this.trajectorySocket].filter(n=>n!==null);return t.forEach(n=>{n.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(n=>n.closed()))}async setJoggingMode(t,n=!0){if(!(this.mode===t&&n)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,n)=>{const r=setTimeout(()=>{n(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",i=>{var s,a,l,c;const o=Te.tryParseJson(i.data);if(((s=o==null?void 0:o.result)==null?void 0:s.kind)==="INITIALIZE_RECEIVED"){clearTimeout(r),t();return}if(((a=o==null?void 0:o.result)==null?void 0:a.kind)==="MOTION_ERROR")if(clearTimeout(r),this.onBlocked&&((l=o==null?void 0:o.result)!=null&&l.message.includes($c))){(c=this.joggingSocket)==null||c.dispose(),this.onBlocked();return}else this.onError?this.onError(i.data):n(new Error(i.data))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,tcp:this.tcp})})}async rotateJoints({joint:t,direction:n,velocityRadsPerSec:r}){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[t]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:i})}async translateTCP({axis:t,direction:n,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 i=[0,0,0],o=[0,0,0];o[Te.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:o,rotation:i,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:n,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 i=[0,0,0],o=[0,0,0];i[Te.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:o,rotation:i})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:n,velocityInRelevantUnits:r,axis:i,direction:o,motion:s}){const a=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(s.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const g=[...t.position];g[Te.XYZ_TO_VECTOR[i]]+=s.distanceMm*(o==="-"?-1:1),a.push({limits_override:{tcp_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:g,orientation:t.orientation}}})}else if(s.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const g=new Bn(t.orientation[0],t.orientation[1],t.orientation[2]),v=g.length(),C=g.clone().normalize(),w=s.distanceRads*(o==="-"?-1:1),E=new Bn(0,0,0);E[i]=1;const _=Math.cos(.5*w)*Math.cos(.5*v),S=Math.sin(.5*w)*Math.sin(.5*v),T=Math.sin(.5*w)*Math.cos(.5*v),A=Math.cos(.5*w)*Math.sin(.5*v),O=E.dot(C),D=E.clone().cross(C),k=2*Math.acos(_-S*O),x=k/Math.sin(.5*k),I=new Bn().addScaledVector(D,S).addScaledVector(E,T).addScaledVector(C,A).multiplyScalar(x);a.push({limits_override:{tcp_orientation_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...I]}}})}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 c={motion_group_model:l.motion_group_model,cycle_time:l.cycle_time,mounting:l.mounting,global:l.operation_limits.auto_limits},u=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:c,start_joint_position:n,motion_commands:a}),d=u.response;if(!d)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(u)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const h=g=>{var v;if(!g||g.add_trajectory_error||g.message)if(this.onError)this.onError(g);else throw new Error(((v=g==null?void 0:g.add_trajectory_error)==null?void 0:v.message)||(g==null?void 0:g.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"})},f=async()=>{var g;await he.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await he.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(g=this.trajectorySocket)==null||g.dispose(),this.trajectorySocket=null},m=async()=>{var g;await he.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(g=this.trajectorySocket)==null||g.dispose(),this.trajectorySocket=null},p=async g=>{if(g!=null&&g.message)if(this.onError){this.onError(g);return}else throw new Error(g.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await f():await m()};this.trajectorySocket.addEventListener("message",g=>{var C,w;const v=Te.tryParseJson(g.data);if(!((C=v==null?void 0:v.result)!=null&&C.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${g.data}`);if(this.onBlocked&&((w=v.result.message)!=null&&w.includes($c))){this.onBlocked();return}if(v.result.kind==="INITIALIZE_RECEIVED")h(v.result);else if(v.result.kind==="START_RECEIVED")p(v);else if(v.result.kind!=="PAUSE_RECEIVED")if(v.result.kind==="MOTION_ERROR"&&v.result.message)if(this.onError){this.onError(v);return}else throw new Error(v.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${v.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:d,tcp:this.tcp}})}}var y2="[object AsyncFunction]",x2="[object Function]",b2="[object GeneratorFunction]",v2="[object Proxy]";function vh(e){if(!dn(e))return!1;var t=Sn(e);return t==x2||t==b2||t==y2||t==v2}var rs=yt["__core-js_shared__"],Lc=(function(){var e=/[^.]+$/.exec(rs&&rs.keys&&rs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function S2(e){return!!Lc&&Lc in e}var w2=Function.prototype,E2=w2.toString;function wn(e){if(e!=null){try{return E2.call(e)}catch{}try{return e+""}catch{}}return""}var T2=/[\\^$.*+?()[\]{}|]/g,C2=/^\[object .+?Constructor\]$/,_2=Function.prototype,M2=Object.prototype,R2=_2.toString,I2=M2.hasOwnProperty,A2=RegExp("^"+R2.call(I2).replace(T2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function j2(e){if(!dn(e)||S2(e))return!1;var t=vh(e)?A2:C2;return t.test(wn(e))}function k2(e,t){return e==null?void 0:e[t]}function En(e,t){var n=k2(e,t);return j2(n)?n:void 0}var Nc=(function(){try{var e=En(Object,"defineProperty");return e({},"",{}),e}catch{}})();function O2(e,t,n){t=="__proto__"&&Nc?Nc(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function P2(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function D2(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[++i];if(n(o[l],l,o)===!1)break}return t}}var $2=D2();function L2(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var N2="[object Arguments]";function zc(e){return hn(e)&&Sn(e)==N2}var Sh=Object.prototype,z2=Sh.hasOwnProperty,F2=Sh.propertyIsEnumerable,wh=zc((function(){return arguments})())?zc:function(e){return hn(e)&&z2.call(e,"callee")&&!F2.call(e,"callee")},mt=Array.isArray;function B2(){return!1}var Eh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fc=Eh&&typeof module=="object"&&module&&!module.nodeType&&module,G2=Fc&&Fc.exports===Eh,Bc=G2?yt.Buffer:void 0,V2=Bc?Bc.isBuffer:void 0,Ms=V2||B2,U2=9007199254740991,W2=/^(?:0|[1-9]\d*)$/;function Th(e,t){var n=typeof e;return t=t??U2,!!t&&(n=="number"||n!="symbol"&&W2.test(e))&&e>-1&&e%1==0&&e<t}var H2=9007199254740991;function za(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=H2}var Y2="[object Arguments]",q2="[object Array]",J2="[object Boolean]",K2="[object Date]",X2="[object Error]",Z2="[object Function]",Q2="[object Map]",ew="[object Number]",tw="[object Object]",nw="[object RegExp]",rw="[object Set]",iw="[object String]",ow="[object WeakMap]",sw="[object ArrayBuffer]",aw="[object DataView]",lw="[object Float32Array]",cw="[object Float64Array]",uw="[object Int8Array]",dw="[object Int16Array]",hw="[object Int32Array]",fw="[object Uint8Array]",pw="[object Uint8ClampedArray]",mw="[object Uint16Array]",gw="[object Uint32Array]",pe={};pe[lw]=pe[cw]=pe[uw]=pe[dw]=pe[hw]=pe[fw]=pe[pw]=pe[mw]=pe[gw]=!0;pe[Y2]=pe[q2]=pe[sw]=pe[J2]=pe[aw]=pe[K2]=pe[X2]=pe[Z2]=pe[Q2]=pe[ew]=pe[tw]=pe[nw]=pe[rw]=pe[iw]=pe[ow]=!1;function yw(e){return hn(e)&&za(e.length)&&!!pe[Sn(e)]}function xw(e){return function(t){return e(t)}}var Ch=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fr=Ch&&typeof module=="object"&&module&&!module.nodeType&&module,bw=fr&&fr.exports===Ch,is=bw&&mh.process,Gc=(function(){try{var e=fr&&fr.require&&fr.require("util").types;return e||is&&is.binding&&is.binding("util")}catch{}})(),Vc=Gc&&Gc.isTypedArray,_h=Vc?xw(Vc):yw,vw=Object.prototype,Sw=vw.hasOwnProperty;function ww(e,t){var n=mt(e),r=!n&&wh(e),i=!n&&!r&&Ms(e),o=!n&&!r&&!i&&_h(e),s=n||r||i||o,a=s?L2(e.length,String):[],l=a.length;for(var c in e)Sw.call(e,c)&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Th(c,l)))&&a.push(c);return a}var Ew=Object.prototype;function Tw(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ew;return e===n}function Cw(e,t){return function(n){return e(t(n))}}var _w=Cw(Object.keys,Object),Mw=Object.prototype,Rw=Mw.hasOwnProperty;function Iw(e){if(!Tw(e))return _w(e);var t=[];for(var n in Object(e))Rw.call(e,n)&&n!="constructor"&&t.push(n);return t}function Mh(e){return e!=null&&za(e.length)&&!vh(e)}function Fa(e){return Mh(e)?ww(e):Iw(e)}function Aw(e,t){return e&&$2(e,t,Fa)}function jw(e,t){return function(n,r){if(n==null)return n;if(!Mh(n))return e(n,r);for(var i=n.length,o=-1,s=Object(n);++o<i&&r(s[o],o,s)!==!1;);return n}}var kw=jw(Aw);function Ow(e,t,n,r){return kw(e,function(i,o,s){t(r,i,n(i),s)}),r}function Pw(){this.__data__=[],this.size=0}function Rh(e,t){return e===t||e!==e&&t!==t}function bo(e,t){for(var n=e.length;n--;)if(Rh(e[n][0],t))return n;return-1}var Dw=Array.prototype,$w=Dw.splice;function Lw(e){var t=this.__data__,n=bo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$w.call(t,n,1),--this.size,!0}function Nw(e){var t=this.__data__,n=bo(t,e);return n<0?void 0:t[n][1]}function zw(e){return bo(this.__data__,e)>-1}function Fw(e,t){var n=this.__data__,r=bo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Pt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pt.prototype.clear=Pw;Pt.prototype.delete=Lw;Pt.prototype.get=Nw;Pt.prototype.has=zw;Pt.prototype.set=Fw;function Bw(){this.__data__=new Pt,this.size=0}function Gw(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Vw(e){return this.__data__.get(e)}function Uw(e){return this.__data__.has(e)}var Er=En(yt,"Map"),Tr=En(Object,"create");function Ww(){this.__data__=Tr?Tr(null):{},this.size=0}function Hw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Yw="__lodash_hash_undefined__",qw=Object.prototype,Jw=qw.hasOwnProperty;function Kw(e){var t=this.__data__;if(Tr){var n=t[e];return n===Yw?void 0:n}return Jw.call(t,e)?t[e]:void 0}var Xw=Object.prototype,Zw=Xw.hasOwnProperty;function Qw(e){var t=this.__data__;return Tr?t[e]!==void 0:Zw.call(t,e)}var eE="__lodash_hash_undefined__";function tE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tr&&t===void 0?eE:t,this}function fn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fn.prototype.clear=Ww;fn.prototype.delete=Hw;fn.prototype.get=Kw;fn.prototype.has=Qw;fn.prototype.set=tE;function nE(){this.size=0,this.__data__={hash:new fn,map:new(Er||Pt),string:new fn}}function rE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vo(e,t){var n=e.__data__;return rE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function iE(e){var t=vo(this,e).delete(e);return this.size-=t?1:0,t}function oE(e){return vo(this,e).get(e)}function sE(e){return vo(this,e).has(e)}function aE(e,t){var n=vo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Dt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dt.prototype.clear=nE;Dt.prototype.delete=iE;Dt.prototype.get=oE;Dt.prototype.has=sE;Dt.prototype.set=aE;var lE=200;function cE(e,t){var n=this.__data__;if(n instanceof Pt){var r=n.__data__;if(!Er||r.length<lE-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dt(r)}return n.set(e,t),this.size=n.size,this}function _t(e){var t=this.__data__=new Pt(e);this.size=t.size}_t.prototype.clear=Bw;_t.prototype.delete=Gw;_t.prototype.get=Vw;_t.prototype.has=Uw;_t.prototype.set=cE;var uE="__lodash_hash_undefined__";function dE(e){return this.__data__.set(e,uE),this}function hE(e){return this.__data__.has(e)}function ki(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Dt;++t<n;)this.add(e[t])}ki.prototype.add=ki.prototype.push=dE;ki.prototype.has=hE;function fE(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function pE(e,t){return e.has(t)}var mE=1,gE=2;function Ih(e,t,n,r,i,o){var s=n&mE,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&gE?new ki:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var m=e[d],p=t[d];if(r)var g=s?r(p,m,d,t,e,o):r(m,p,d,e,t,o);if(g!==void 0){if(g)continue;h=!1;break}if(f){if(!fE(t,function(v,C){if(!pE(f,C)&&(m===v||i(m,v,n,r,o)))return f.push(C)})){h=!1;break}}else if(!(m===p||i(m,p,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var Uc=yt.Uint8Array;function yE(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function xE(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var bE=1,vE=2,SE="[object Boolean]",wE="[object Date]",EE="[object Error]",TE="[object Map]",CE="[object Number]",_E="[object RegExp]",ME="[object Set]",RE="[object String]",IE="[object Symbol]",AE="[object ArrayBuffer]",jE="[object DataView]",Wc=Ut?Ut.prototype:void 0,os=Wc?Wc.valueOf:void 0;function kE(e,t,n,r,i,o,s){switch(n){case jE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case AE:return!(e.byteLength!=t.byteLength||!o(new Uc(e),new Uc(t)));case SE:case wE:case CE:return Rh(+e,+t);case EE:return e.name==t.name&&e.message==t.message;case _E:case RE:return e==t+"";case TE:var a=yE;case ME:var l=r&bE;if(a||(a=xE),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=vE,s.set(e,t);var u=Ih(a(e),a(t),r,i,o,s);return s.delete(e),u;case IE:if(os)return os.call(e)==os.call(t)}return!1}function OE(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function PE(e,t,n){var r=t(e);return mt(e)?r:OE(r,n(e))}function DE(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function $E(){return[]}var LE=Object.prototype,NE=LE.propertyIsEnumerable,Hc=Object.getOwnPropertySymbols,zE=Hc?function(e){return e==null?[]:(e=Object(e),DE(Hc(e),function(t){return NE.call(e,t)}))}:$E;function Yc(e){return PE(e,Fa,zE)}var FE=1,BE=Object.prototype,GE=BE.hasOwnProperty;function VE(e,t,n,r,i,o){var s=n&FE,a=Yc(e),l=a.length,c=Yc(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=a[d];if(!(s?h in t:GE.call(t,h)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var p=!0;o.set(e,t),o.set(t,e);for(var g=s;++d<l;){h=a[d];var v=e[h],C=t[h];if(r)var w=s?r(C,v,h,t,e,o):r(v,C,h,e,t,o);if(!(w===void 0?v===C||i(v,C,n,r,o):w)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var E=e.constructor,_=t.constructor;E!=_&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof _=="function"&&_ instanceof _)&&(p=!1)}return o.delete(e),o.delete(t),p}var Rs=En(yt,"DataView"),Is=En(yt,"Promise"),As=En(yt,"Set"),js=En(yt,"WeakMap"),qc="[object Map]",UE="[object Object]",Jc="[object Promise]",Kc="[object Set]",Xc="[object WeakMap]",Zc="[object DataView]",WE=wn(Rs),HE=wn(Er),YE=wn(Is),qE=wn(As),JE=wn(js),Ft=Sn;(Rs&&Ft(new Rs(new ArrayBuffer(1)))!=Zc||Er&&Ft(new Er)!=qc||Is&&Ft(Is.resolve())!=Jc||As&&Ft(new As)!=Kc||js&&Ft(new js)!=Xc)&&(Ft=function(e){var t=Sn(e),n=t==UE?e.constructor:void 0,r=n?wn(n):"";if(r)switch(r){case WE:return Zc;case HE:return qc;case YE:return Jc;case qE:return Kc;case JE:return Xc}return t});var KE=1,Qc="[object Arguments]",eu="[object Array]",Qr="[object Object]",XE=Object.prototype,tu=XE.hasOwnProperty;function ZE(e,t,n,r,i,o){var s=mt(e),a=mt(t),l=s?eu:Ft(e),c=a?eu:Ft(t);l=l==Qc?Qr:l,c=c==Qc?Qr:c;var u=l==Qr,d=c==Qr,h=l==c;if(h&&Ms(e)){if(!Ms(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new _t),s||_h(e)?Ih(e,t,n,r,i,o):kE(e,t,l,n,r,i,o);if(!(n&KE)){var f=u&&tu.call(e,"__wrapped__"),m=d&&tu.call(t,"__wrapped__");if(f||m){var p=f?e.value():e,g=m?t.value():t;return o||(o=new _t),i(p,g,n,r,o)}}return h?(o||(o=new _t),VE(e,t,n,r,i,o)):!1}function So(e,t,n,r,i){return e===t?!0:e==null||t==null||!hn(e)&&!hn(t)?e!==e&&t!==t:ZE(e,t,n,r,So,i)}var QE=1,eT=2;function tT(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var a=s[0],l=e[a],c=s[1];if(s[2]){if(l===void 0&&!(a in e))return!1}else{var u=new _t,d;if(!(d===void 0?So(c,l,QE|eT,r,u):d))return!1}}return!0}function Ah(e){return e===e&&!dn(e)}function nT(e){for(var t=Fa(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ah(i)]}return t}function jh(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function rT(e){var t=nT(e);return t.length==1&&t[0][2]?jh(t[0][0],t[0][1]):function(n){return n===e||tT(n,e,t)}}var iT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oT=/^\w*$/;function Ba(e,t){if(mt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||go(e)?!0:oT.test(e)||!iT.test(e)||t!=null&&e in Object(t)}var sT="Expected a function";function Ga(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(sT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ga.Cache||Dt),n}Ga.Cache=Dt;var aT=500;function lT(e){var t=Ga(e,function(r){return n.size===aT&&n.clear(),r}),n=t.cache;return t}var cT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,uT=/\\(\\)?/g,dT=lT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cT,function(n,r,i,o){t.push(i?o.replace(uT,"$1"):r||n)}),t});function hT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var nu=Ut?Ut.prototype:void 0,ru=nu?nu.toString:void 0;function kh(e){if(typeof e=="string")return e;if(mt(e))return hT(e,kh)+"";if(go(e))return ru?ru.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Oh(e){return e==null?"":kh(e)}function Ph(e,t){return mt(e)?e:Ba(e,t)?[e]:dT(Oh(e))}function wo(e){if(typeof e=="string"||go(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Dh(e,t){t=Ph(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[wo(t[n++])];return n&&n==r?e:void 0}function fT(e,t,n){var r=e==null?void 0:Dh(e,t);return r===void 0?n:r}function pT(e,t){return e!=null&&t in Object(e)}function mT(e,t,n){t=Ph(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=wo(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&za(i)&&Th(s,i)&&(mt(e)||wh(e)))}function gT(e,t){return e!=null&&mT(e,t,pT)}var yT=1,xT=2;function bT(e,t){return Ba(e)&&Ah(t)?jh(wo(e),t):function(n){var r=fT(n,e);return r===void 0&&r===t?gT(n,e):So(t,r,yT|xT)}}function vT(e){return e}function ST(e){return function(t){return t==null?void 0:t[e]}}function wT(e){return function(t){return Dh(t,e)}}function ET(e){return Ba(e)?ST(wo(e)):wT(e)}function TT(e){return typeof e=="function"?e:e==null?vT:typeof e=="object"?mt(e)?bT(e[0],e[1]):rT(e):ET(e)}function CT(e,t){return function(n,r){var i=mt(n)?P2:Ow,o={};return i(n,e,TT(r),o)}}var ei=CT(function(e,t,n){O2(e,n,t)}),_T=0;function MT(e){var t=++_T;return Oh(e)+t}const ks=[{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}],RT=[{id:"continuous"},...ks],IT=["coordsys","tool"];class Eo{constructor(t,n,r,i){var o,s;this.jogger=t,this.coordSystems=n,this.motionGroupDescription=r,this.tcps=i,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,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.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,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=[];for(const a of n)if(a.coordinate_system===""){a.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((s=i[0])==null?void 0:s.id)||"",he.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()},this.loadFromLocalStorage(),this.disposers.push(he.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:n}=t,[r,i]=await Promise.all([n.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),n.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),o=Object.entries(i.tcps||{}).map(([s,a])=>({id:s,readable_name:a.name,position:a.pose.position,orientation:a.pose.orientation}));return new Eo(t,r||[],i,o)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return fu.countBy(this.coordSystems,t=>t.name)}async deactivate(){if(this.jogger.mode==="jogging")return this.jogger.stop()}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 t=Te.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.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(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return RT}get discreteIncrementOptions(){return ks}get incrementOptionsById(){return ei(this.incrementOptions,t=>t.id)}get tabsById(){return ei(this.tabs,t=>t.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return ei(this.coordSystems,t=>t.coordinate_system)}get selectedCoordSystem(){return this.coordSystemsById[this.selectedCoordSystemId]}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return ei(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:ks.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,n){const r=this.tabs[n]||this.tabs[0];this.selectedTabId=r.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket()}async withMotionLock(t){const n=MT();this.lock(n);try{return await t()}finally{this.unlock(n)}}}const AT=ie.observer(({store:e})=>{const{t}=fe.useTranslation();return y.jsxRuntimeExports.jsx(R.Backdrop,{open:!0,sx:{position:"absolute",zIndex:n=>n.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:y.jsxRuntimeExports.jsxs(R.Stack,{sx:{m:2,width:"100%"},children:[y.jsxRuntimeExports.jsxs(R.Alert,{severity:"error",sx:{mb:2},children:[y.jsxRuntimeExports.jsx(R.AlertTitle,{children:t("Jogging.Blocked.ti")}),t("Jogging.Blocked.lb")]}),y.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",onClick:()=>e.unblock(),children:t("Jogging.Blocked.Reenable.bt")})]})})}),jT=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),kT=$.forwardRef(jT),OT=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),PT=$.forwardRef(OT),DT=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),$T=$.forwardRef(DT),LT=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),NT=$.forwardRef(LT);function zT(e,t){return So(e,t)}const $h=({store:e})=>{const{t}=fe.useTranslation(),[n,r]=$.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),i=$.useRef(n);de.useAnimationFrame(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;zT(i.current,s)||(i.current=s,r(s))});const o=[];for(const[s,a]of n.entries())a&&o.push(s);return y.jsxRuntimeExports.jsx(R.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},FT=R.styled(R.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function ti({labelValue:e,...t}){return y.jsxRuntimeExports.jsxs(FT,{fullWidth:!0,variant:"filled",children:[y.jsxRuntimeExports.jsx(R.InputLabel,{id:t.labelId,children:e}),y.jsxRuntimeExports.jsx(R.Select,{...t})]})}const BT=ie.observer(({store:e})=>{var o;const{t}=fe.useTranslation(),n=$.useId(),r=[];function i(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(y.jsxRuntimeExports.jsx(ti,{labelId:`jogging-coord-select-${n}`,labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(y.jsxRuntimeExports.jsx(ti,{labelId:`jogging-tcp-select-${n}`,labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(y.jsxRuntimeExports.jsx(ti,{labelValue:t("Jogging.Cartesian.Orientation.lb"),labelId:`orientation-select-${n}`,value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:IT.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s,children:i(s)},s))},"orientation")),e.showIncrementSelect&&r.push(y.jsxRuntimeExports.jsxs(ti,{labelValue:t("Jogging.Increment.hlb"),labelId:`jogging-increment-select-${n}`,size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[y.jsxRuntimeExports.jsx(R.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),y.jsxRuntimeExports.jsx(R.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,a)=>y.jsxRuntimeExports.jsx(R.Box,{sx:{gridColumn:r.length%2===1&&a===r.length-1?"span 2":"auto"},children:s},a))})}),GT=R.styled(R.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[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"}}}}});function iu(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function pr(e){return typeof e=="string"}function VT(e,t,n){return e===void 0||pr(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function ci(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function ou(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function UT(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const f=$e(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},p={...n,...i,...r};return f.length>0&&(p.className=f),Object.keys(m).length>0&&(p.style=m),{props:p,internalRef:void 0}}const s=ci({...i,...r}),a=ou(r),l=ou(i),c=t(s),u=$e(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},h={...c,...n,...l,...a};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function WT(e,t,n){return typeof e=="function"?e(t,n):e}function Nt(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,s=i?{}:WT(n,r),{props:a,internalRef:l}=UT({...o,externalSlotProps:s}),c=Ki(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return VT(t,{...a,ref:c},r)}function su(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
130
|
-
`))}return!1}const HT={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function YT(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const qT=2;function On(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function Lh(e,t){return e-t}function au(e,t){const{index:n}=e.reduce((r,i,o)=>{const s=Math.abs(t-i);return r===null||s<r.distance||s===r.distance?{distance:s,index:o}:r},null)??{};return n}function ni(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===t.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Oi(e,t,n){return(e-t)*100/(n-t)}function JT(e,t,n){return(n-t)*e+t}function KT(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function XT(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(KT(t)))}function lu({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(Lh)}function ri({sliderRef:e,activeIndex:t,setActive:n}){var i,o,s;const r=dr(e.current);(!((i=e.current)!=null&&i.contains(r.activeElement))||Number((o=r==null?void 0:r.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),n&&n(t)}function ii(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?YT(e,t):!1}const ZT={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},QT=e=>e;let oi;function cu(){return oi===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?oi=CSS.supports("touch-action","none"):oi=!0),oi}function eC(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:f,scale:m=QT,step:p=1,shiftStep:g=10,tabIndex:v,value:C}=e,w=j.useRef(void 0),[E,_]=j.useState(-1),[S,T]=j.useState(-1),[A,O]=j.useState(!1),D=j.useRef(0),k=j.useRef(null),[x,I]=DS({controlled:C,default:n??l,name:"Slider"}),M=u&&((z,U,Y)=>{const te=z.nativeEvent||z,ue=new te.constructor(te.type,te);Object.defineProperty(ue,"target",{writable:!0,value:{value:U,name:c}}),k.current=U,u(ue,U,Y)}),F=Array.isArray(x);let N=F?x.slice().sort(Lh):[x];N=N.map(z=>z==null?l:Pn(z,l,a));const W=s===!0&&p!==null?[...Array(Math.floor((a-l)/p)+1)].map((z,U)=>({value:l+p*U})):s||[],B=W.map(z=>z.value),[K,ce]=j.useState(-1),Q=j.useRef(null),Ne=Ki(f,Q),xt=z=>U=>{var te;const Y=Number(U.currentTarget.getAttribute("data-index"));su(U.target)&&ce(Y),T(Y),(te=z==null?void 0:z.onFocus)==null||te.call(z,U)},bt=z=>U=>{var Y;su(U.target)||ce(-1),T(-1),(Y=z==null?void 0:z.onBlur)==null||Y.call(z,U)},ke=(z,U)=>{const Y=Number(z.currentTarget.getAttribute("data-index")),te=N[Y],ue=B.indexOf(te);let J=U;if(W&&p==null){const Me=B[B.length-1];J>=Me?J=Me:J<=B[0]?J=B[0]:J=J<te?B[ue-1]:B[ue+1]}if(J=Pn(J,l,a),F){i&&(J=Pn(J,N[Y-1]||-1/0,N[Y+1]||1/0));const Me=J;J=lu({values:N,newValue:J,index:Y});let Pe=Y;i||(Pe=J.indexOf(Me)),ri({sliderRef:Q,activeIndex:Pe})}I(J),ce(Y),M&&!ii(J,x)&&M(z,J,Y),d&&d(z,k.current??J)},vt=z=>U=>{var Y;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(U.key)){U.preventDefault();const te=Number(U.currentTarget.getAttribute("data-index")),ue=N[te];let J=null;if(p!=null){const Me=U.shiftKey?g:p;switch(U.key){case"ArrowUp":J=On(ue,Me,1,l,a);break;case"ArrowRight":J=On(ue,Me,o?-1:1,l,a);break;case"ArrowDown":J=On(ue,Me,-1,l,a);break;case"ArrowLeft":J=On(ue,Me,o?1:-1,l,a);break;case"PageUp":J=On(ue,g,1,l,a);break;case"PageDown":J=On(ue,g,-1,l,a);break;case"Home":J=l;break;case"End":J=a;break}}else if(W){const Me=B[B.length-1],Pe=B.indexOf(ue),Se=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],We=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Se.includes(U.key)?Pe===0?J=B[0]:J=B[Pe-1]:We.includes(U.key)&&(Pe===B.length-1?J=Me:J=B[Pe+1])}J!=null&&ke(U,J)}(Y=z==null?void 0:z.onKeyDown)==null||Y.call(z,U)};pt(()=>{var z;r&&Q.current.contains(document.activeElement)&&((z=document.activeElement)==null||z.blur())},[r]),r&&E!==-1&&_(-1),r&&K!==-1&&ce(-1);const ot=z=>U=>{var Y;(Y=z.onChange)==null||Y.call(z,U),ke(U,U.target.valueAsNumber)},Ge=j.useRef(void 0);let V=h;o&&h==="horizontal"&&(V+="-reverse");const q=({finger:z,move:U=!1})=>{const{current:Y}=Q,{width:te,height:ue,bottom:J,left:Me}=Y.getBoundingClientRect();let Pe;V.startsWith("vertical")?Pe=(J-z.y)/ue:Pe=(z.x-Me)/te,V.includes("-reverse")&&(Pe=1-Pe);let Se;if(Se=JT(Pe,l,a),p)Se=XT(Se,p,l);else{const Qn=au(B,Se);Se=B[Qn]}Se=Pn(Se,l,a);let We=0;if(F){U?We=Ge.current:We=au(N,Se),i&&(Se=Pn(Se,N[We-1]||-1/0,N[We+1]||1/0));const Qn=Se;Se=lu({values:N,newValue:Se,index:We}),i&&U||(We=Se.indexOf(Qn),Ge.current=We)}return{newValue:Se,activeIndex:We}},Z=ht(z=>{const U=ni(z,w);if(!U)return;if(D.current+=1,z.type==="mousemove"&&z.buttons===0){L(z);return}const{newValue:Y,activeIndex:te}=q({finger:U,move:!0});ri({sliderRef:Q,activeIndex:te,setActive:_}),I(Y),!A&&D.current>qT&&O(!0),M&&!ii(Y,x)&&M(z,Y,te)}),L=ht(z=>{const U=ni(z,w);if(O(!1),!U)return;const{newValue:Y}=q({finger:U,move:!0});_(-1),z.type==="touchend"&&T(-1),d&&d(z,k.current??Y),w.current=void 0,ee()}),re=ht(z=>{if(r)return;cu()||z.preventDefault();const U=z.changedTouches[0];U!=null&&(w.current=U.identifier);const Y=ni(z,w);if(Y!==!1){const{newValue:ue,activeIndex:J}=q({finger:Y});ri({sliderRef:Q,activeIndex:J,setActive:_}),I(ue),M&&!ii(ue,x)&&M(z,ue,J)}D.current=0;const te=dr(Q.current);te.addEventListener("touchmove",Z,{passive:!0}),te.addEventListener("touchend",L,{passive:!0})}),ee=j.useCallback(()=>{const z=dr(Q.current);z.removeEventListener("mousemove",Z),z.removeEventListener("mouseup",L),z.removeEventListener("touchmove",Z),z.removeEventListener("touchend",L)},[L,Z]);j.useEffect(()=>{const{current:z}=Q;return z.addEventListener("touchstart",re,{passive:cu()}),()=>{z.removeEventListener("touchstart",re),ee()}},[ee,re]),j.useEffect(()=>{r&&ee()},[r,ee]);const Ae=z=>U=>{var ue;if((ue=z.onMouseDown)==null||ue.call(z,U),r||U.defaultPrevented||U.button!==0)return;U.preventDefault();const Y=ni(U,w);if(Y!==!1){const{newValue:J,activeIndex:Me}=q({finger:Y});ri({sliderRef:Q,activeIndex:Me,setActive:_}),I(J),M&&!ii(J,x)&&M(U,J,Me)}D.current=0;const te=dr(Q.current);te.addEventListener("mousemove",Z,{passive:!0}),te.addEventListener("mouseup",L)},_e=Oi(F?N[0]:l,l,a),ge=Oi(N[N.length-1],l,a)-_e,$t=(z={})=>{const U=ci(z),Y={onMouseDown:Ae(U||{})},te={...U,...Y};return{...z,ref:Ne,...te}},Pr=z=>U=>{var te;(te=z.onMouseOver)==null||te.call(z,U);const Y=Number(U.currentTarget.getAttribute("data-index"));T(Y)},Dr=z=>U=>{var Y;(Y=z.onMouseLeave)==null||Y.call(z,U),T(-1)},$r=(z={})=>{const U=ci(z),Y={onMouseOver:Pr(U||{}),onMouseLeave:Dr(U||{})};return{...z,...U,...Y}},Lr=z=>({pointerEvents:E!==-1&&E!==z?"none":void 0});let Tn;return h==="vertical"&&(Tn=o?"vertical-rl":"vertical-lr"),{active:E,axis:V,axisProps:ZT,dragging:A,focusedThumbIndex:K,getHiddenInputProps:(z={})=>{const U=ci(z),Y={onChange:ot(U||{}),onFocus:xt(U||{}),onBlur:bt(U||{}),onKeyDown:vt(U||{})},te={...U,...Y};return{tabIndex:v,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":m(a),"aria-valuemin":m(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...z,...te,style:{...HT,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Tn}}},getRootProps:$t,getThumbProps:$r,marks:W,open:S,range:F,rootRef:Ne,trackLeap:ge,trackOffset:_e,values:N,getThumbStyle:Lr}}const tC=e=>!e||!pr(e);function nC(e){return typeof e.main=="string"}function rC(e,t=[]){if(!nC(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Va(e=[]){return([,t])=>t&&rC(t,e)}function iC(e){return pn("MuiSlider",e)}const Xe=Hi("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),oC=e=>{const{open:t}=e;return{offset:$e(t&&Xe.valueLabelOpen),circle:Xe.valueLabelCircle,label:Xe.valueLabelLabel}};function Nh(e){const{children:t,className:n,value:r}=e,i=oC(e);return t?j.cloneElement(t,{className:t.props.className},y.jsxRuntimeExports.jsxs(j.Fragment,{children:[t.props.children,y.jsxRuntimeExports.jsx("span",{className:$e(i.offset,n),"aria-hidden":!0,children:y.jsxRuntimeExports.jsx("span",{className:i.circle,children:y.jsxRuntimeExports.jsx("span",{className:i.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(Nh.propTypes={children:b.element.isRequired,className:b.string,value:b.node});function uu(e){return e}const sC=Ue("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${De(n.color)}`],n.size!=="medium"&&t[`size${De(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(vn(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Xe.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Xe.dragging}`]:{[`& .${Xe.thumb}, & .${Xe.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Va()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),aC=Ue("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),lC=Ue("span",{name:"MuiSlider",slot:"Track"})(vn(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Va()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),cC=Ue("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${De(n.color)}`],n.size!=="medium"&&t[`thumbSize${De(n.size)}`]]}})(vn(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Xe.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Va()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Xe.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Xe.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),zh=Ue(Nh,{name:"MuiSlider",slot:"ValueLabel"})(vn(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Xe.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Xe.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(zh.propTypes={children:b.element.isRequired,index:b.number.isRequired,open:b.bool.isRequired,value:b.node});const uC=Ue("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Ns(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(vn(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),dC=Ue("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Ns(e)&&e!=="markLabelActive"})(vn(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),hC=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:l}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${De(a)}`,l&&`size${De(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${De(l)}`,a&&`thumbColor${De(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Cr(c,iC,s)},fC=({children:e})=>e,Fh=j.forwardRef(function(t,n){const r=$a({props:t,name:"MuiSlider"}),i=rm(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":a,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:f,disableSwap:m=!1,disabled:p=!1,getAriaLabel:g,getAriaValueText:v,marks:C=!1,max:w=100,min:E=0,name:_,onChange:S,onChangeCommitted:T,orientation:A="horizontal",shiftStep:O=10,size:D="medium",step:k=1,scale:x=uu,slotProps:I,slots:M,tabIndex:F,track:N="normal",value:W,valueLabelDisplay:B="off",valueLabelFormat:K=uu,...ce}=r,Q={...r,isRtl:i,max:w,min:E,classes:h,disabled:p,disableSwap:m,orientation:A,marks:C,color:d,size:D,step:k,shiftStep:O,scale:x,track:N,valueLabelDisplay:B,valueLabelFormat:K},{axisProps:Ne,getRootProps:xt,getHiddenInputProps:bt,getThumbProps:ke,open:vt,active:ot,axis:Ge,focusedThumbIndex:V,range:q,dragging:Z,marks:L,values:re,trackOffset:ee,trackLeap:Ae,getThumbStyle:_e}=eC({...Q,rootRef:n});Q.marked=L.length>0&&L.some(ve=>ve.label),Q.dragging=Z,Q.focusedThumbIndex=V;const ge=hC(Q),$t=(M==null?void 0:M.root)??c.Root??sC,Pr=(M==null?void 0:M.rail)??c.Rail??aC,Dr=(M==null?void 0:M.track)??c.Track??lC,$r=(M==null?void 0:M.thumb)??c.Thumb??cC,Lr=(M==null?void 0:M.valueLabel)??c.ValueLabel??zh,Tn=(M==null?void 0:M.mark)??c.Mark??uC,Nr=(M==null?void 0:M.markLabel)??c.MarkLabel??dC,z=(M==null?void 0:M.input)??c.Input??"input",U=(I==null?void 0:I.root)??u.root,Y=(I==null?void 0:I.rail)??u.rail,te=(I==null?void 0:I.track)??u.track,ue=(I==null?void 0:I.thumb)??u.thumb,J=(I==null?void 0:I.valueLabel)??u.valueLabel,Me=(I==null?void 0:I.mark)??u.mark,Pe=(I==null?void 0:I.markLabel)??u.markLabel,Se=(I==null?void 0:I.input)??u.input,We=Nt({elementType:$t,getSlotProps:xt,externalSlotProps:U,externalForwardedProps:ce,additionalProps:{...tC($t)&&{as:l}},ownerState:{...Q,...U==null?void 0:U.ownerState},className:[ge.root,f]}),Qn=Nt({elementType:Pr,externalSlotProps:Y,ownerState:Q,className:ge.rail}),qh=Nt({elementType:Dr,externalSlotProps:te,additionalProps:{style:{...Ne[Ge].offset(ee),...Ne[Ge].leap(Ae)}},ownerState:{...Q,...te==null?void 0:te.ownerState},className:ge.track}),To=Nt({elementType:$r,getSlotProps:ke,externalSlotProps:ue,ownerState:{...Q,...ue==null?void 0:ue.ownerState},className:ge.thumb}),Jh=Nt({elementType:Lr,externalSlotProps:J,ownerState:{...Q,...J==null?void 0:J.ownerState},className:ge.valueLabel}),Co=Nt({elementType:Tn,externalSlotProps:Me,ownerState:Q,className:ge.mark}),_o=Nt({elementType:Nr,externalSlotProps:Pe,ownerState:Q,className:ge.markLabel}),Kh=Nt({elementType:z,getSlotProps:bt,externalSlotProps:Se,ownerState:Q});return y.jsxRuntimeExports.jsxs($t,{...We,children:[y.jsxRuntimeExports.jsx(Pr,{...Qn}),y.jsxRuntimeExports.jsx(Dr,{...qh}),L.filter(ve=>ve.value>=E&&ve.value<=w).map((ve,je)=>{const Mo=Oi(ve.value,E,w),zr=Ne[Ge].offset(Mo);let St;return N===!1?St=re.includes(ve.value):St=N==="normal"&&(q?ve.value>=re[0]&&ve.value<=re[re.length-1]:ve.value<=re[0])||N==="inverted"&&(q?ve.value<=re[0]||ve.value>=re[re.length-1]:ve.value>=re[0]),y.jsxRuntimeExports.jsxs(j.Fragment,{children:[y.jsxRuntimeExports.jsx(Tn,{"data-index":je,...Co,...!pr(Tn)&&{markActive:St},style:{...zr,...Co.style},className:$e(Co.className,St&&ge.markActive)}),ve.label!=null?y.jsxRuntimeExports.jsx(Nr,{"aria-hidden":!0,"data-index":je,..._o,...!pr(Nr)&&{markLabelActive:St},style:{...zr,..._o.style},className:$e(ge.markLabel,_o.className,St&&ge.markLabelActive),children:ve.label}):null]},je)}),re.map((ve,je)=>{const Mo=Oi(ve,E,w),zr=Ne[Ge].offset(Mo),St=B==="off"?fC:Lr;return y.jsxRuntimeExports.jsx(St,{...!pr(St)&&{valueLabelFormat:K,valueLabelDisplay:B,value:typeof K=="function"?K(x(ve),je):K,index:je,open:vt===je||ot===je||B==="on",disabled:p},...Jh,children:y.jsxRuntimeExports.jsx($r,{"data-index":je,...To,className:$e(ge.thumb,To.className,ot===je&&ge.active,V===je&&ge.focusVisible),style:{...zr,..._e(je),...To.style},children:y.jsxRuntimeExports.jsx(z,{"data-index":je,"aria-label":g?g(je):o,"aria-valuenow":x(ve),"aria-labelledby":a,"aria-valuetext":v?v(x(ve),je):s,value:re[je],...Kh})})},je)})]})});process.env.NODE_ENV!=="production"&&(Fh.propTypes={"aria-label":iu(b.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":b.string,"aria-valuetext":iu(b.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["primary","secondary","error","info","success","warning"]),b.string]),components:b.shape({Input:b.elementType,Mark:b.elementType,MarkLabel:b.elementType,Rail:b.elementType,Root:b.elementType,Thumb:b.elementType,Track:b.elementType,ValueLabel:b.elementType}),componentsProps:b.shape({input:b.oneOfType([b.func,b.object]),mark:b.oneOfType([b.func,b.object]),markLabel:b.oneOfType([b.func,b.object]),rail:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),thumb:b.oneOfType([b.func,b.object]),track:b.oneOfType([b.func,b.object]),valueLabel:b.oneOfType([b.func,b.shape({children:b.element,className:b.string,open:b.bool,style:b.object,value:b.node,valueLabelDisplay:b.oneOf(["auto","off","on"])})])}),defaultValue:b.oneOfType([b.arrayOf(b.number),b.number]),disabled:b.bool,disableSwap:b.bool,getAriaLabel:b.func,getAriaValueText:b.func,marks:b.oneOfType([b.arrayOf(b.shape({label:b.node,value:b.number.isRequired})),b.bool]),max:b.number,min:b.number,name:b.string,onChange:b.func,onChangeCommitted:b.func,orientation:b.oneOf(["horizontal","vertical"]),scale:b.func,shiftStep:b.number,size:b.oneOfType([b.oneOf(["small","medium"]),b.string]),slotProps:b.shape({input:b.oneOfType([b.func,b.object]),mark:b.oneOfType([b.func,b.object]),markLabel:b.oneOfType([b.func,b.object]),rail:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),thumb:b.oneOfType([b.func,b.object]),track:b.oneOfType([b.func,b.object]),valueLabel:b.oneOfType([b.func,b.shape({children:b.element,className:b.string,open:b.bool,style:b.object,value:b.node,valueLabelDisplay:b.oneOf(["auto","off","on"])})])}),slots:b.shape({input:b.elementType,mark:b.elementType,markLabel:b.elementType,rail:b.elementType,root:b.elementType,thumb:b.elementType,track:b.elementType,valueLabel:b.elementType}),step:b.number,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),tabIndex:b.number,track:b.oneOf(["inverted","normal",!1]),value:b.oneOfType([b.arrayOf(b.number),b.number]),valueLabelDisplay:b.oneOf(["auto","off","on"]),valueLabelFormat:b.oneOfType([b.func,b.string])});var pC="[object Number]";function mC(e){return typeof e=="number"||hn(e)&&Sn(e)==pC}const Bh=ie.observer(e=>{var o,s,a;const t=R.useTheme(),{store:n}=e,{t:r}=fe.useTranslation();function i(l,c){c===e.velocity||!mC(c)||e.onVelocityChange(c)}return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[n.showVelocityLegend&&y.jsxRuntimeExports.jsx(R.Typography,{sx:{color:(a=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:a.sliderLegendColor,fontSize:"14px"},children:r("Jogging.Velocity.bt")}),y.jsxRuntimeExports.jsx(Fh,{value:e.velocity,color:"secondary",onChange:i,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),n.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):y.jsxRuntimeExports.jsx(Ua,{value:e.velocity.toString()}))]})});function Ua({value:e,sx:t}){var r;const n=R.useTheme();return y.jsxRuntimeExports.jsx(R.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(r=n.palette.backgroundPaperElevation)==null?void 0:r[8],borderRadius:"10px",minWidth:"111px",...t},children:y.jsxRuntimeExports.jsx(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:n.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Gh=ie.observer(({store:e})=>{const{t}=fe.useTranslation(),n=ie.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?r=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:r})}`:r=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:r})}`}}));return y.jsxRuntimeExports.jsx(Bh,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:r=>y.jsxRuntimeExports.jsx(Ua,{value:n.valueLabelFormat(r),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),gC=ie.observer(({store:e,children:t})=>{const{t:n}=fe.useTranslation(),r=R.useTheme();function i(h,f){(f==="translate"||f==="rotate")&&e.setSelectedCartesianMotionType(f)}de.useReaction(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function o(h,f){const m=await e.activate(),p=m.motionStream.rapidlyChangingMotionState.tcp_pose,g=m.motionStream.rapidlyChangingMotionState.joint_position;p&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:p,currentJoints:g,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:f.mm}:{type:"rotate",distanceRads:Te.degreesToRadians(f.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function a(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,f,m){var g,v,C;const p=(C=(v=(g=m.componentsExt)==null?void 0:g.JoggingPanel)==null?void 0:v.JoggingCartesian)==null?void 0:C.Axis;if(p)return f==="translate"?p[h]:p.CustomRotation??p[h]}const c=[{id:"x",icon:y.jsxRuntimeExports.jsx(kT,{}),colors:l("X",e.selectedCartesianMotionType,r)},{id:"y",icon:y.jsxRuntimeExports.jsx(PT,{}),colors:l("Y",e.selectedCartesianMotionType,r)},{id:"z",icon:y.jsxRuntimeExports.jsx($T,{}),colors:l("Z",e.selectedCartesianMotionType,r)}];function u(h){return n("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return n("General.degree.variable",{amount:Te.radiansToDegrees(h).toFixed(1)})}return y.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[y.jsxRuntimeExports.jsxs(R.Stack,{gap:2,children:[y.jsxRuntimeExports.jsx(BT,{store:e}),y.jsxRuntimeExports.jsx(Gh,{store:e}),y.jsxRuntimeExports.jsx(R.Divider,{})]}),y.jsxRuntimeExports.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:y.jsxRuntimeExports.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[y.jsxRuntimeExports.jsxs(GT,{value:e.selectedCartesianMotionType,onChange:i,exclusive:!0,"aria-label":n("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[y.jsxRuntimeExports.jsx(R.ToggleButton,{value:"translate",children:n("Jogging.Cartesian.Translation.bt")}),y.jsxRuntimeExports.jsx(R.ToggleButton,{value:"rotate",children:n("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var f,m;return y.jsxRuntimeExports.jsx(_s,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[h.icon,y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,g;return u(((g=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.position)==null?void 0:g[Te.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"translate",direction:p}),stopJogging:a},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var f,m;return y.jsxRuntimeExports.jsx(_s,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx(NT,{}),y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,g;return d(((g=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.orientation)==null?void 0:g[Te.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"rotate",direction:p}),stopJogging:a},h.id)})]})}),y.jsxRuntimeExports.jsx($h,{store:e}),t&&y.jsxRuntimeExports.jsx(R.Divider,{}),t]})}),yC=ie.observer(({store:e,children:t})=>{const n=R.useTheme();async function r(o){await e.activate(),await e.jogger.rotateJoints({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function i(){await e.jogger.stop(),await e.deactivate()}return y.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[y.jsxRuntimeExports.jsx(Gh,{store:e}),y.jsxRuntimeExports.jsx(R.Divider,{}),y.jsxRuntimeExports.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},children:y.jsxRuntimeExports.jsx(R.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c,u,d;const s=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[o.index])==null?void 0:d.position,a=(s==null?void 0:s.lower_limit)!==void 0?Te.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Te.radiansToDegrees(s.upper_limit):void 0;return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&y.jsxRuntimeExports.jsx(R.Typography,{color:e.isLocked?n.palette.text.disabled:n.palette.text.secondary,children:`G${o.index+1}`}),y.jsxRuntimeExports.jsx(yh,{disabled:e.isLocked,lowerLimitDegs:a,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[o.index];return h!==void 0?Te.radiansToDegrees(h):void 0},startJogging:h=>r({joint:o.index,direction:h}),stopJogging:i})]},`joint-${o.index}`)})})}),y.jsxRuntimeExports.jsx($h,{store:e}),t&&y.jsxRuntimeExports.jsx(R.Divider,{}),t]})}),xC=y.externalizeComponent(ie.observer(e=>{const t=fu.isString(e.nova)?new Ef({instanceUrl:e.nova}):e.nova,n=ie.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){he.runInAction(()=>{n.loadingError=null,n.joggingStore=null});try{let i=e.store;if(!i){const o=await xo.open(t,e.motionGroupId);i=await Eo.loadFor(o)}he.runInAction(()=>{n.joggingStore=i}),e.onSetup&&e.onSetup(i)}catch(i){n.loadingError=i}}return $.useEffect(()=>(r(),e.store?()=>null:()=>{var i;(i=n.joggingStore)==null||i.dispose()}),[e.store,e.nova,e.motionGroupId]),$.useEffect(()=>{const i=n.joggingStore;i&&(e.locked?i.lock("external"):i.unlock("external"))},[n.joggingStore,e.locked]),y.jsxRuntimeExports.jsx(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:n.joggingStore?y.jsxRuntimeExports.jsx(bC,{store:n.joggingStore,children:e.children}):y.jsxRuntimeExports.jsx(pu.LoadingCover,{message:"Loading jogging",error:n.loadingError})})})),bC=ie.observer(({store:e,children:t})=>{const{t:n}=fe.useTranslation();function r(){if(e.currentTab.id==="cartesian")return y.jsxRuntimeExports.jsx(y.jsxRuntimeExports.Fragment,{children:y.jsxRuntimeExports.jsx(gC,{store:e,children:t})});if(e.currentTab.id==="joint")return y.jsxRuntimeExports.jsx(y.jsxRuntimeExports.Fragment,{children:y.jsxRuntimeExports.jsx(yC,{store:e,children:t})})}return y.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[y.jsxRuntimeExports.jsx(R.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(i=>{const o=i.label==="cartesian"?n("Jogging.Cartesian.bt"):n("Jogging.Joints.bt"),s=i.label==="cartesian"?y.jsxRuntimeExports.jsx(p2,{fontSize:"small",sx:{mr:1}}):y.jsxRuntimeExports.jsx(m2,{fontSize:"small",sx:{mr:1}});return y.jsxRuntimeExports.jsx(R.Tab,{label:e.showTabIcons?y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${i.id}`,"aria-controls":`jogging-tab-${i.id}`},i.id)})}),y.jsxRuntimeExports.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()}),e.blocked&&y.jsxRuntimeExports.jsx(AT,{store:e})]})}),Vh=e=>{var a;const{value:t,ref:n}=e,r=R.useTheme(),[i,o]=$.useState(!1);async function s(){if(!n||!("current"in n))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&n&&"current"in n&&n.current){const u=document.createRange();u.selectNodeContents(n.current),c.removeAllRanges(),c.addRange(u)}}return!1}return $.useEffect(()=>{if(!i)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[i]),y.jsxRuntimeExports.jsx(R.Tooltip,{open:i,title:"Copied!",children:y.jsxRuntimeExports.jsx(R.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(a=r.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:y.jsxRuntimeExports.jsx(R.Typography,{ref:n,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:r.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},vC=y.externalizeComponent(ie.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[n,r]=$.useState(null),i=Tf(e),o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[y.jsxRuntimeExports.jsx(Vh,{value:i}),t&&y.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})})),SC=y.externalizeComponent(ie.observer(({joints:e,showCopyButton:t=!1})=>{const[n,r]=$.useState(null),i=`[${e.map(s=>parseFloat(s.toFixed(4))).join(", ")}]`,o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[y.jsxRuntimeExports.jsx(Vh,{value:i}),t&&y.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})}));class Uh{constructor(){this.messages=[],this.addMessage=(t,n="info")=>{const r={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:n};this.messages.push(r)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},he.makeObservable(this,{messages:he.observable,addMessage:he.action,clearMessages:he.action})}}const Or=(e,t,n)=>({id:n||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),wC=(e,t)=>Or(e,"debug",t),EC=(e,t)=>Or(e,"info",t),TC=(e,t)=>Or(e,"warning",t),CC=(e,t)=>Or(e,"error",t),Wh=y.externalizeComponent(ie.observer(e=>{var u;const{messages:t=[],onClear:n,height:r=400,sx:i}=e,o=R.useTheme(),s=$.useRef(null);$.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const a=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},c=({message:d})=>{const[h,f]=$.useState(!1),[m,p]=$.useState(!1),[g,v]=$.useState(!1),C=d.message.length>150,w=async()=>{try{await navigator.clipboard.writeText(d.message),p(!0),setTimeout(()=>p(!1),2e3)}catch(_){console.error("Failed to copy message:",_)}},E=C&&!h?d.message.substring(0,150)+"...":d.message;return y.jsxRuntimeExports.jsx(R.Box,{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",gap:1},children:[y.jsxRuntimeExports.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",a(d.timestamp),"]"]}),y.jsxRuntimeExports.jsx(R.Typography,{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:E}),y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:g?1:0,transition:"opacity 0.2s ease-in-out",visibility:g?"visible":"hidden"},children:[y.jsxRuntimeExports.jsx(R.IconButton,{size:"small",onClick:w,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:m?"Copied!":"Copy message",children:y.jsxRuntimeExports.jsx(Fr.ContentCopy,{sx:{fontSize:12}})}),C&&y.jsxRuntimeExports.jsx(R.IconButton,{size:"small",onClick:()=>f(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?y.jsxRuntimeExports.jsx(Fr.ExpandLess,{sx:{fontSize:12}}):y.jsxRuntimeExports.jsx(Fr.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return y.jsxRuntimeExports.jsxs(R.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:r,display:"flex",flexDirection:"column",overflow:"hidden",...i},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[y.jsxRuntimeExports.jsx(Fr.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),y.jsxRuntimeExports.jsx(R.Button,{onClick:n,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),y.jsxRuntimeExports.jsx(R.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?y.jsxRuntimeExports.jsx(R.Typography,{sx:{color:o.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>y.jsxRuntimeExports.jsx(c,{message:d},d.id))})]})})),_C=y.externalizeComponent(ie.observer(e=>{const{store:t,onStoreReady:n,...r}=e,i=$.useRef(n);$.useEffect(()=>{i.current=n},[n]);const o=$.useMemo(()=>{var l;const a=t||new Uh;return(l=i.current)==null||l.call(i,a),a},[t]),s=()=>{o.clearMessages()};return y.jsxRuntimeExports.jsx(Wh,{...r,messages:o.messages,onClear:s})}));function MC(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function RC({baseUrl:e=MC(),...t}){return y.jsxRuntimeExports.jsxs(R.Dialog,{"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:[y.jsxRuntimeExports.jsx(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),y.jsxRuntimeExports.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[y.jsxRuntimeExports.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),y.jsxRuntimeExports.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),y.jsxRuntimeExports.jsx(R.DialogActions,{children:y.jsxRuntimeExports.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[y.jsxRuntimeExports.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),y.jsxRuntimeExports.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const IC=Xt(y.jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),AC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),jC=$.forwardRef(AC);var Wa=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Wa||{});const Hh=y.externalizeComponent(ie.observer(({setupState:e,className:t})=>{const n=R.useTheme(),{t:r}=fe.useTranslation(),i=()=>{var c,u,d,h,f,m,p;switch(e){case"READY":return{label:r("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=n.palette.tertiary)==null?void 0:c.main)||n.palette.primary.main,backgroundColor:((u=n.palette.backgroundPaperElevation)==null?void 0:u[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:n.palette.error.main,backgroundColor:((d=n.palette.backgroundPaperElevation)==null?void 0:d[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"CELL_OPEN":return{label:r("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:n.palette.error.main,backgroundColor:((h=n.palette.backgroundPaperElevation)==null?void 0:h[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"E_STOP":return{label:r("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:n.palette.error.main,backgroundColor:((f=n.palette.backgroundPaperElevation)==null?void 0:f[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"MANUAL_MODE":return{label:r("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:n.palette.error.main,backgroundColor:((m=n.palette.backgroundPaperElevation)==null?void 0:m[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:r("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:n.palette.error.main,backgroundColor:((p=n.palette.backgroundPaperElevation)==null?void 0:p[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText}}},{label:o,indicatorColor:s,backgroundColor:a,textColor:l}=i();return y.jsxRuntimeExports.jsx(R.Chip,{className:t,label:y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[y.jsxRuntimeExports.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:a,color:n.palette.getContrastText(a),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),kC=y.externalizeComponent(ie.observer(({robotName:e,robotType:t,setupState:n,PreconditionComponent:r=Hh,className:i})=>{var l;const o=R.useTheme(),s=t||"Robot",a=n===Wa.READY;return y.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[a?y.jsxRuntimeExports.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:y.jsxRuntimeExports.jsx(jC,{})}):y.jsxRuntimeExports.jsx(IC,{sx:{color:o.palette.error.main,fontSize:24}}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),r&&y.jsxRuntimeExports.jsx(r,{setupState:n})]})})),OC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),PC=$.forwardRef(OC),DC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),$C=$.forwardRef(DC),ut=ie.observer(({id:e,icon:t,color:n,title:r,name:i,label:o,explanation:s,literalValue:a,anchorOrigin:l,transformOrigin:c})=>{const u=ie.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsxs(R.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[y.jsxRuntimeExports.jsx(R.SvgIcon,{component:t,sx:{color:n}}),o&&y.jsxRuntimeExports.jsx("div",{style:{color:n},children:o})]}),y.jsxRuntimeExports.jsx(R.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:y.jsxRuntimeExports.jsxs(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[y.jsxRuntimeExports.jsxs("div",{children:[r&&y.jsxRuntimeExports.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${r}: `}),y.jsxRuntimeExports.jsx(R.Typography,{component:"span",color:n,fontWeight:"bold",fontSize:"14px",children:i})]}),y.jsxRuntimeExports.jsx(R.Typography,{fontSize:"14px",children:s}),a&&y.jsxRuntimeExports.jsx(R.Typography,{fontSize:"12px",children:a})]})})]})}),LC=ie.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:n,transformOrigin:r,compact:i})=>{const o=R.useTheme(),s=$.useId(),{t:a}=fe.useTranslation();return e?y.jsxRuntimeExports.jsx(ut,{id:`motion-group-virtual-${s}`,icon:$C,color:o.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:i?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:y.jsxRuntimeExports.jsxs(fe.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",y.jsxRuntimeExports.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:n,transformOrigin:r}):y.jsxRuntimeExports.jsx(ut,{id:`motion-group-physical-${s}`,icon:PC,color:o.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:i?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:y.jsxRuntimeExports.jsx("code",{}),strong:y.jsxRuntimeExports.jsx("strong",{})}}),anchorOrigin:n,transformOrigin:r})}),NC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),zC=$.forwardRef(NC),FC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),BC=$.forwardRef(FC),GC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),VC=$.forwardRef(GC),UC=ie.observer(({operationMode:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=fe.useTranslation(),o=R.useTheme(),s=$.useId();switch(e){case"OPERATION_MODE_AUTO":return y.jsxRuntimeExports.jsx(ut,{id:`operation-mode-auto-${s}`,icon:zC,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Automatic.ti"),label:r?null:i("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:n});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return y.jsxRuntimeExports.jsx(ut,{id:`operation-mode-manual-${s}`,icon:VC,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Manual.lb"),label:r?null:i("SafetyBar.OperationMode.Manual.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:n});default:return y.jsxRuntimeExports.jsx(ut,{id:`operation-mode-error-${s}`,icon:BC,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Error.lb"),label:r?null:i("SafetyBar.OperationMode.Error.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:n})}}),WC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),HC=$.forwardRef(WC),YC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),qC=$.forwardRef(YC),JC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),KC=$.forwardRef(JC),XC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),ZC=$.forwardRef(XC),QC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),e5=$.forwardRef(QC),t5=ie.observer(({safetyState:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=fe.useTranslation(),o=R.useTheme(),s=$.useId();switch(e){case"SAFETY_STATE_NORMAL":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-normal-${s}`,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Normal.lb"),label:r?null:i("SafetyBar.SafetyState.Normal.lb"),icon:ZC,color:o.palette.text.secondary,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-estop-${s}`,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Estop.lb"),label:r?null:i("SafetyBar.SafetyState.Estop.lb"),icon:qC,color:o.palette.error.main,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-stop-${s}`,icon:e5,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Stop.lb"),label:r?null:i("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-manual-action-required-${s}`,icon:KC,color:o.palette.warning.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.ManualActionRequired.lb"),label:r?null:i("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-error-${s}`,icon:HC,color:o.palette.error.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Error.lb"),label:r?null:i("SafetyBar.SafetyState.Error.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:n});default:pu.assertUnreachable(e,`Unknown safety state ${e}`)}}),n5=y.externalizeComponent(ie.observer(({isVirtual:e,motionGroupId:t,operationMode:n,safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s=!0})=>{const a=s?1:2;return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",gap:a,alignItems:"center",sx:{height:"24px"},children:[y.jsxRuntimeExports.jsx(t5,{safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),y.jsxRuntimeExports.jsx(UC,{operationMode:n,anchorOrigin:i,transformOrigin:o,compact:s}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),y.jsxRuntimeExports.jsx(LC,{isVirtual:e,motionGroupId:t,anchorOrigin:i,transformOrigin:o,compact:s})]})})),r5=R.styled(R.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,n,r;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:i})=>!i,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:i})=>i,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),i5=e=>{const{ref:t,...n}=e;return y.jsxRuntimeExports.jsx(r5,{ref:t,selected:e.selected,...n,color:"secondary",variant:"circular"})};function o5(e){const{children:t,value:n,index:r,...i}=e;return y.jsxRuntimeExports.jsx("div",{role:"tabpanel",hidden:n!==r,id:`tabpanel-${r}`,"aria-labelledby":`tab-${r}`,...i,children:n===r&&y.jsxRuntimeExports.jsx(R.Box,{children:t})})}function s5({children:e,...t}){const{fullWidth:n,indicator:r,onChange:i,orientation:o,scrollButtons:s,selectionFollowsFocus:a,textColor:l,value:c,variant:u,...d}=t;return y.jsxRuntimeExports.jsx(R.Box,{...d,children:e})}const a5=y.externalizeComponent(ie.observer(e=>{const{items:t,activeTab:n,defaultActiveTab:r=0,onTabChange:i,sx:o,ref:s}=e,a=n!==void 0,[l,c]=$.useState(r),u=a?n:l;$.useEffect(()=>{a||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,a,l]);const d=(h,f)=>{a||c(f),i==null||i(f)};return y.jsxRuntimeExports.jsxs(R.Box,{ref:s,sx:{height:"100%",display:"flex",flexDirection:"column",...o},children:[y.jsxRuntimeExports.jsx(R.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:y.jsxRuntimeExports.jsx(R.Tabs,{value:u,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:t.map((h,f)=>{var E,_,S;const m=()=>{if(!h.badge)return;const T=h.badge.content,A=h.badge.max;return typeof T=="number"&&A&&T>A?`${A}+`:T},p=()=>{if(!h.badge)return!1;const T=h.badge.content,A=h.badge.showZero;return!(T===0&&!A)},g=m(),v=p(),C=()=>{a||c(f),i==null||i(f)},w=y.jsxRuntimeExports.jsx(R.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:C,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:T=>{var A;return((A=T.palette.backgroundPaperElevation)==null?void 0:A[11])||"#32344B"},color:"text.primary",opacity:u===f?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===f?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:T=>{var A;return((A=T.palette.backgroundPaperElevation)==null?void 0:A[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return v?y.jsxRuntimeExports.jsx(s5,{component:"span",sx:{display:"inline-flex"},children:y.jsxRuntimeExports.jsx(R.Badge,{badgeContent:g,color:((E=h.badge)==null?void 0:E.color)||"error",max:(_=h.badge)==null?void 0:_.max,showZero:(S=h.badge)==null?void 0:S.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:w})},h.id):w})})}),y.jsxRuntimeExports.jsx(R.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),y.jsxRuntimeExports.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,f)=>y.jsxRuntimeExports.jsx(o5,{value:u,index:f,children:h.content},h.id))})]})})),l5=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,o=[];return t>0?(o.push(t.toString()),o.push(n.toString().padStart(2,"0")),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):n>0?(o.push(n.toString()),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):(o.push(r.toString()),o.push(i.toString().padStart(2,"0"))),o.join(":")},du=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(o>0||Object.keys(a).length===0)&&(a.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},c5=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i}=fe.useTranslation(),o=Fu(),{elapsedTime:s,currentProgress:a}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return y.jsxRuntimeExports.jsxs(R.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[y.jsxRuntimeExports.jsx(tf.Gauge,{width:264,height:264,value:a,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?o.palette.error.light:o.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"}}}),y.jsxRuntimeExports.jsx(R.Box,{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:y.jsxRuntimeExports.jsxs(R.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[y.jsxRuntimeExports.jsx(R.Fade,{in:u&&n,timeout:200,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:o.palette.error.light},children:i("timer.error")})}),y.jsxRuntimeExports.jsx(R.Fade,{in:u&&!n,timeout:300,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:l5(s)})})]})})]})},u5=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:o,i18n:s}=fe.useTranslation(),a=Fu(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return r?y.jsxRuntimeExports.jsx(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?o("timer.error"):du(l,s.language)})}):y.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[y.jsxRuntimeExports.jsx(R.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:y.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[y.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),y.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.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:n?o("timer.error"):du(l,s.language)})]})},d5=()=>{const[e,t]=$.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),n=$.useRef(null),r=$.useRef(null),i=$.useRef(null),o=$.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),s=$.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),a=$.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),l=$.useCallback(()=>{t(d=>({...d,showMainText:!1})),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=$.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=$.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),i.current&&clearTimeout(i.current)},[]);return{animationState:e,triggerPauseAnimation:o,triggerErrorAnimation:s,clearErrorAnimation:a,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},h5=({autoStart:e,hasError:t,onPauseAnimation:n,onErrorAnimation:r,onClearErrorAnimation:i})=>{const[o,s]=$.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),a=$.useRef(null),l=$.useRef(null),c=$.useRef(0),u=$.useRef(0),[d]=de.useInterpolation([0],{tension:80,friction:18,onChange:([v])=>{s(C=>({...C,currentProgress:v}))}}),h=$.useCallback((v=0)=>{const C=v/60%1*100;s(w=>({...w,elapsedTime:v,isPausedState:!1,currentProgress:C})),c.current=0,u.current=C,d.setImmediate([C]),e?(l.current=Date.now()-v*1e3,s(w=>({...w,isRunning:!0}))):l.current=null},[e,d]),f=$.useCallback(()=>{if(l.current&&o.isRunning){const C=(Date.now()-l.current)/1e3+c.current,w=C/60%1*100;d.setTarget([w]),s(E=>({...E,elapsedTime:Math.floor(C)}))}s(v=>({...v,isRunning:!1,isPausedState:!0})),n()},[o.isRunning,d,n]),m=$.useCallback(()=>{o.isPausedState&&(c.current=o.elapsedTime,l.current=Date.now(),s(v=>({...v,isRunning:!0,isPausedState:!1})))},[o.isPausedState,o.elapsedTime]),p=$.useCallback(()=>{s(v=>({...v,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),g=$.useCallback(()=>o.isPausedState,[o.isPausedState]);return $.useEffect(()=>{t?(o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!0})),f()),r()):(o.wasRunningBeforeError&&!o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!1})),m()),i())},[t,o.isRunning,o.wasRunningBeforeError,f,m,r,i]),$.useEffect(()=>{if(o.isRunning){const v=()=>{if(l.current){const w=(Date.now()-l.current)/1e3+c.current,E=w/60%1*100;s(S=>({...S,elapsedTime:Math.floor(w)})),Math.abs(E-u.current)>.1&&(d.setTarget([E]),u.current=E)}a.current=requestAnimationFrame(v)};a.current=requestAnimationFrame(v)}else a.current&&(cancelAnimationFrame(a.current),a.current=null);return()=>{a.current&&(cancelAnimationFrame(a.current),a.current=null)}},[o.isRunning,d]),$.useEffect(()=>{let v=null;const C=()=>{d.update(),v=requestAnimationFrame(C)};return v=requestAnimationFrame(C),()=>{v&&cancelAnimationFrame(v)}},[d]),{timerState:o,controls:{start:h,pause:f,resume:m,reset:p,isPaused:g}}},f5=y.externalizeComponent(ie.observer(({onTimerReady:e,autoStart:t=!0,variant:n="default",compact:r=!1,className:i,hasError:o=!1})=>{const{animationState:s,triggerPauseAnimation:a,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=d5(),{timerState:h,controls:f}=h5({autoStart:t,hasError:o,onPauseAnimation:a,onErrorAnimation:l,onClearErrorAnimation:c});return $.useEffect(()=>{u()},[u]),$.useEffect(()=>{let m=!0;const p=setTimeout(()=>{m&&e(f)},0);return()=>{m=!1,clearTimeout(p)}},[e,f]),$.useEffect(()=>d,[d]),n==="small"?y.jsxRuntimeExports.jsx(u5,{timerState:h,animationState:s,hasError:o,compact:r,className:i}):y.jsxRuntimeExports.jsx(c5,{timerState:h,animationState:s,hasError:o,className:i})})),hu=1e-4,p5={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class Pi{constructor(t,n,r,i,o,s,a,l,c,u){this.nova=t,this.controller=n,this.motionGroup=r,this.initialMotionState=i,this.motionStateSocket=o,this.isVirtual=s,this.tcps=a,this.description=l,this.initialControllerState=c,this.controllerStateSocket=u,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=i,this.controllerState=c,u.addEventListener("message",d=>{var f;const h=(f=Te.tryParseJson(d.data))==null?void 0:f.result;h&&he.runInAction(()=>{this.controllerState=h})}),o.addEventListener("message",d=>{var f;const h=(f=Te.tryParseJson(d.data))==null?void 0:f.result;if(!h)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${d.data}`);La(this.rapidlyChangingMotionState.joint_position,h.joint_position,hu)||he.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=h.joint_position}),Na(this.rapidlyChangingMotionState,h,hu)||he.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=h.tcp_pose}),this.rapidlyChangingMotionState.standstill!==h.standstill&&he.runInAction(()=>{this.rapidlyChangingMotionState.standstill=h.standstill})}),he.makeAutoObservable(this)}static async connectMultiple(t,n){return Promise.all(n.map(r=>Pi.connect(t,r)))}static async connect(t,n){var v,C;const[r,i]=n.split("@"),o=await t.api.controller.getCurrentRobotControllerState(i),s=o==null?void 0:o.motion_groups.find(w=>w.motion_group===n);if(!o||!s)throw new Error(`Controller ${i} or motion group ${n} not found`);const a=t.openReconnectingWebsocket(`/controllers/${i}/motion-groups/${n}/state-stream`),l=await a.firstMessage(),c=(v=Te.tryParseJson(l.data))==null?void 0:v.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${s.motion_group}. Initial state:
|
|
128
|
+
`))},[JSON.stringify(n)])}const c=j.useCallback(u=>{o||a(u)},[]);return[l,c]}const $S=Xt(y.jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),LS=Xt(y.jsxRuntimeExports.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Ac=Xt(y.jsxRuntimeExports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),ph=y.externalizeComponent(ie.observer(({data:e,columns:t,getRowData:n,onRowClick:r,selectedItem:i,getItemId:o,title:s,showCount:a=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var A;const f=R.useTheme(),m=et.useGridApiRef(),p=$.useRef(null),[g,v]=$.useState(null),C=$.useMemo(()=>e.map(n),[e,n]);$.useEffect(()=>{m.current&&C.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(O=>O.field)})},[C,t,m]),$.useEffect(()=>{if(!p.current||!m.current)return;const O=new ResizeObserver(()=>{setTimeout(()=>{m.current&&C.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(D=>D.field)})},100)});return O.observe(p.current),()=>{O.disconnect()}},[m,C.length,t]);const w=$.useMemo(()=>{if(i!==void 0)return i;if(g!==null)return g;if(d&&e.length>0){const O=e[0];return v(O),O}return null},[d,e,i,g]),E=O=>{const D=e.find(k=>n(k).id===O.id);D&&(i===void 0&&v(D),r&&r(D,O))},_=$.useMemo(()=>!w||!o?null:o(w),[w,o]);function S(){return y.jsxRuntimeExports.jsx(et.Toolbar,{children:y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[s&&y.jsxRuntimeExports.jsxs(R.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,a&&` (${e.length})`]}),y.jsxRuntimeExports.jsxs(R.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[y.jsxRuntimeExports.jsx(et.FilterPanelTrigger,{render:y.jsxRuntimeExports.jsx(et.ToolbarButton,{"aria-label":"Show filters",children:y.jsxRuntimeExports.jsx(LS,{fontSize:"small"})})}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),y.jsxRuntimeExports.jsx(et.QuickFilter,{render:(O,D)=>y.jsxRuntimeExports.jsxs(R.Box,{...O,sx:{display:"flex",overflow:"hidden"},children:[!D.expanded&&y.jsxRuntimeExports.jsx(et.QuickFilterTrigger,{render:y.jsxRuntimeExports.jsx(et.ToolbarButton,{"aria-label":"Search",children:y.jsxRuntimeExports.jsx(Ac,{fontSize:"small"})})}),y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:D.expanded?"200px":"0px",position:"relative"},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:D.expanded&&D.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:[D.expanded&&y.jsxRuntimeExports.jsx(Ac,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),y.jsxRuntimeExports.jsx(et.QuickFilterControl,{placeholder:l})]}),D.expanded&&D.value!==""&&y.jsxRuntimeExports.jsx(et.QuickFilterClear,{render:y.jsxRuntimeExports.jsx(R.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:y.jsxRuntimeExports.jsx(R.Box,{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:y.jsxRuntimeExports.jsx(et.ToolbarButton,{"aria-label":"Clear",children:y.jsxRuntimeExports.jsx($S,{fontSize:"small"})})})})})]})]})})]})]})})}const T=u||S;return y.jsxRuntimeExports.jsx(R.Box,{ref:p,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${f.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:f.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:f.palette.action.hover}},...h},children:y.jsxRuntimeExports.jsx(et.DataGrid,{apiRef:m,rows:C,columns:t,onRowClick:E,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:T},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((A=c==null?void 0:c.autosizeOptions)==null?void 0:A.columns)||t.map(O=>O.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"}},..._!==null&&{[`&[data-id="${_}"]`]:{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":{},...c==null?void 0:c.sx}})})}));ph.displayName="WandelbotsDataGrid";const Fn=wm({createStyledComponent:Ue("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>$a({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(Fn.propTypes={children:b.node,component:b.elementType,direction:b.oneOfType([b.oneOf(["column-reverse","column","row-reverse","row"]),b.arrayOf(b.oneOf(["column-reverse","column","row-reverse","row"])),b.object]),divider:b.node,spacing:b.oneOfType([b.arrayOf(b.oneOfType([b.number,b.string])),b.number,b.object,b.string]),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),useFlexGap:b.bool});const NS=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("g",{id:"JogMinus"},j.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),zS=$.forwardRef(NS),FS=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("g",{id:"JogPlus"},j.createElement("g",{id:"Plus"},j.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),j.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),j.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),BS=$.forwardRef(FS),_s=y.externalizeComponent(ie.observer(({colors:e,label:t,getDisplayedValue:n,startJogging:r,stopJogging:i,disabled:o,activeJoggingDirection:s,...a})=>{var w,E,_,S,T,A,O;de.useAnimationFrame(()=>{const D=n(),k=h.current;k&&(k.textContent=D)});const l=R.useTheme(),[c,u]=$.useState(null);$.useEffect(()=>{o&&C()},[o]);const d=s||c,h=$.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const f=d?(w=e.buttonBackgroundColor)==null?void 0:w.pressed:e.borderColor,m={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},p={...m,backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.default,":hover":{backgroundColor:(_=e.buttonBackgroundColor)==null?void 0:_.hovered},":active":{backgroundColor:(S=e.buttonBackgroundColor)==null?void 0:S.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.disabled,"svg path":{fill:l.palette.action.disabled}}},g={...m,backgroundColor:(A=e.buttonBackgroundColor)==null?void 0:A.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.pressed,"svg path":{fill:l.palette.action.disabled}}};function v(D,k){o||D.button===0&&(u(k),r(k))}function C(){u(null),i()}return y.jsxRuntimeExports.jsxs(Fn,{height:"64px",direction:"row",justifyContent:"center",...a,children:[y.jsxRuntimeExports.jsx(R.IconButton,{disabled:o,disableRipple:!0,onPointerDown:D=>v(D,"-"),onPointerUp:C,onPointerOut:C,size:"large",sx:{...d==="-"?g:p,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${f??"#fff"}`,borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:y.jsxRuntimeExports.jsx(zS,{})}),y.jsxRuntimeExports.jsxs(Fn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:[y.jsxRuntimeExports.jsx(Fn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...o?{color:l.palette.action.disabled}:{}},...o?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),y.jsxRuntimeExports.jsx(R.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:n()})]}),y.jsxRuntimeExports.jsx(R.IconButton,{disableRipple:!0,disabled:o,onPointerDown:D=>v(D,"+"),onPointerUp:C,onPointerOut:C,size:"large",sx:{...d==="+"?g:p,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${f??"#fff"}`,borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:y.jsxRuntimeExports.jsx(BS,{})})]})})),GS=Xt(y.jsxRuntimeExports.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),VS=Xt(y.jsxRuntimeExports.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function dn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var mh=typeof global=="object"&&global&&global.Object===Object&&global,US=typeof self=="object"&&self&&self.Object===Object&&self,yt=mh||US||Function("return this")(),ts=function(){return yt.Date.now()},WS=/\s/;function HS(e){for(var t=e.length;t--&&WS.test(e.charAt(t)););return t}var YS=/^\s+/;function qS(e){return e&&e.slice(0,HS(e)+1).replace(YS,"")}var Ut=yt.Symbol,gh=Object.prototype,JS=gh.hasOwnProperty,KS=gh.toString,or=Ut?Ut.toStringTag:void 0;function XS(e){var t=JS.call(e,or),n=e[or];try{e[or]=void 0;var r=!0}catch{}var i=KS.call(e);return r&&(t?e[or]=n:delete e[or]),i}var ZS=Object.prototype,QS=ZS.toString;function e2(e){return QS.call(e)}var t2="[object Null]",n2="[object Undefined]",jc=Ut?Ut.toStringTag:void 0;function Sn(e){return e==null?e===void 0?n2:t2:jc&&jc in Object(e)?XS(e):e2(e)}function hn(e){return e!=null&&typeof e=="object"}var r2="[object Symbol]";function go(e){return typeof e=="symbol"||hn(e)&&Sn(e)==r2}var kc=NaN,i2=/^[-+]0x[0-9a-f]+$/i,o2=/^0b[01]+$/i,s2=/^0o[0-7]+$/i,a2=parseInt;function Oc(e){if(typeof e=="number")return e;if(go(e))return kc;if(dn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=dn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qS(e);var n=o2.test(e);return n||s2.test(e)?a2(e.slice(2),n?2:8):i2.test(e)?kc:+e}var l2="Expected a function",c2=Math.max,u2=Math.min;function d2(e,t,n){var r,i,o,s,a,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(l2);t=Oc(t)||0,dn(n)&&(u=!!n.leading,d="maxWait"in n,o=d?c2(Oc(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function f(S){var T=r,A=i;return r=i=void 0,c=S,s=e.apply(A,T),s}function m(S){return c=S,a=setTimeout(v,t),u?f(S):s}function p(S){var T=S-l,A=S-c,O=t-T;return d?u2(O,o-A):O}function g(S){var T=S-l,A=S-c;return l===void 0||T>=t||T<0||d&&A>=o}function v(){var S=ts();if(g(S))return C(S);a=setTimeout(v,p(S))}function C(S){return a=void 0,h&&r?f(S):(r=i=void 0,s)}function w(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function E(){return a===void 0?s:C(ts())}function _(){var S=ts(),T=g(S);if(r=arguments,i=this,l=S,T){if(a===void 0)return m(l);if(d)return clearTimeout(a),a=setTimeout(v,t),f(l)}return a===void 0&&(a=setTimeout(v,t)),s}return _.cancel=w,_.flush=E,_}var h2="Expected a function";function f2(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(h2);return dn(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),d2(e,t,{leading:r,maxWait:t,trailing:i})}const yh=y.externalizeComponent(ie.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:n,upperLimitDegs:r,getValueDegs:i,disabled:o,...s})=>{var w,E,_,S,T,A,O,D,k,x,I,M,F,N,W;const{t:a}=fe.useTranslation(),[l,c]=$.useState(),u=R.useTheme(),d={background:(w=u.palette.backgroundPaperElevation)==null?void 0:w[4],color:(E=u.palette.backgroundPaperElevation)==null?void 0:E[11]},h=ie.useLocalObservable(()=>({activeJoggingDir:null,startJogging(B){this.activeJoggingDir=B,e(B)},stopJogging(){this.activeJoggingDir=null,t()}})),f=f2(()=>{c(i())},50);de.useAnimationFrame(f);function m(B){B.button===0&&h.startJogging("-")}function p(B){B.button===0&&h.startJogging("+")}function g(B){h.stopJogging()}function v(B){h.stopJogging()}function C(B,K=1){if(B===void 0||isNaN(B))return"";const ce=a("General.degree.variable",{amount:B.toFixed(K)});return B>0&&K===0?`+${ce}`:ce}return y.jsxRuntimeExports.jsxs(Fn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(_=u.palette.backgroundPaperElevation)==null?void 0:_[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(S=u.palette.backgroundPaperElevation)==null?void 0:S[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[9]},"&:active":{...d}}},children:[y.jsxRuntimeExports.jsx(R.IconButton,{onPointerDown:m,onPointerUp:g,onPointerOut:v,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:y.jsxRuntimeExports.jsx(GS,{sx:{pointerEvents:"none",color:(k=(D=(O=(A=u.componentsExt)==null?void 0:A.JoggingPanel)==null?void 0:O.JoggingJoint)==null?void 0:D.Joint)==null?void 0:k.arrowColor}})}),y.jsxRuntimeExports.jsxs(Fn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(x=u.palette.backgroundPaperElevation)==null?void 0:x[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:C(l)}),y.jsxRuntimeExports.jsx(R.Slider,{disabled:!0,"aria-label":"Joint position",min:n,max:r,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:o?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:o?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[5],opacity:1}},marks:n!==void 0&&r!==void 0&&[{value:n,label:C(n,0)},{value:r,label:C(r,0)}]})]}),y.jsxRuntimeExports.jsx(R.IconButton,{onPointerDown:p,onPointerUp:g,onPointerOut:v,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:y.jsxRuntimeExports.jsx(VS,{sx:{pointerEvents:"none",color:(W=(N=(F=(M=u.componentsExt)==null?void 0:M.JoggingPanel)==null?void 0:F.JoggingJoint)==null?void 0:N.Joint)==null?void 0:W.arrowColor}})})]})})),p2=Xt(y.jsxRuntimeExports.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),m2=Xt(y.jsxRuntimeExports.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function g2(...e){const t="THREE."+e.shift();console.warn(t,...e)}function Et(e,t,n){return Math.max(t,Math.min(n,e))}class y2{constructor(t=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=t,this._y=n,this._z=r,this._w=i}static slerpFlat(t,n,r,i,o,s,a){let l=r[i+0],c=r[i+1],u=r[i+2],d=r[i+3],h=o[s+0],f=o[s+1],m=o[s+2],p=o[s+3];if(a<=0){t[n+0]=l,t[n+1]=c,t[n+2]=u,t[n+3]=d;return}if(a>=1){t[n+0]=h,t[n+1]=f,t[n+2]=m,t[n+3]=p;return}if(d!==p||l!==h||c!==f||u!==m){let g=l*h+c*f+u*m+d*p;g<0&&(h=-h,f=-f,m=-m,p=-p,g=-g);let v=1-a;if(g<.9995){const C=Math.acos(g),w=Math.sin(C);v=Math.sin(v*C)/w,a=Math.sin(a*C)/w,l=l*v+h*a,c=c*v+f*a,u=u*v+m*a,d=d*v+p*a}else{l=l*v+h*a,c=c*v+f*a,u=u*v+m*a,d=d*v+p*a;const C=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=C,c*=C,u*=C,d*=C}}t[n]=l,t[n+1]=c,t[n+2]=u,t[n+3]=d}static multiplyQuaternionsFlat(t,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],h=o[s+1],f=o[s+2],m=o[s+3];return t[n]=a*m+u*d+l*f-c*h,t[n+1]=l*m+u*h+c*d-a*f,t[n+2]=c*m+u*f+a*h-l*d,t[n+3]=u*m-a*d-l*h-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,n,r,i){return this._x=t,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,n=!0){const r=t._x,i=t._y,o=t._z,s=t._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),h=l(r/2),f=l(i/2),m=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"YXZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"ZXY":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"ZYX":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"YZX":this._x=h*u*d+c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d-h*f*m;break;case"XZY":this._x=h*u*d-c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d+h*f*m;break;default:g2("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,n){const r=n/2,i=Math.sin(r);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(t){const n=t.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=r+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-i)*f}else if(r>a&&r>d){const f=2*Math.sqrt(1+r-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(i+s)/f,this._z=(o+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-r-d);this._w=(o-c)/f,this._x=(i+s)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-r-a);this._w=(s-i)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,n){let r=t.dot(n)+1;return r<1e-8?(r=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=r):(this._x=0,this._y=-t.z,this._z=t.y,this._w=r)):(this._x=t.y*n.z-t.z*n.y,this._y=t.z*n.x-t.x*n.z,this._z=t.x*n.y-t.y*n.x,this._w=r),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Et(this.dot(t),-1,1)))}rotateTowards(t,n){const r=this.angleTo(t);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,n){const r=t._x,i=t._y,o=t._z,s=t._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(t,n){if(n<=0)return this;if(n>=1)return this.copy(t);let r=t._x,i=t._y,o=t._z,s=t._w,a=this.dot(t);a<0&&(r=-r,i=-i,o=-o,s=-s,a=-a);let l=1-n;if(a<.9995){const c=Math.acos(a),u=Math.sin(c);l=Math.sin(l*c)/u,n=Math.sin(n*c)/u,this._x=this._x*l+r*n,this._y=this._y*l+i*n,this._z=this._z*l+o*n,this._w=this._w*l+s*n,this._onChangeCallback()}else this._x=this._x*l+r*n,this._y=this._y*l+i*n,this._z=this._z*l+o*n,this._w=this._w*l+s*n,this.normalize();return this}slerpQuaternions(t,n,r){return this.copy(t).slerp(n,r)}random(){const t=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),o=Math.sqrt(r);return this.set(i*Math.sin(t),i*Math.cos(t),o*Math.sin(n),o*Math.cos(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,n=0){return this._x=t[n],this._y=t[n+1],this._z=t[n+2],this._w=t[n+3],this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._w,t}fromBufferAttribute(t,n){return this._x=t.getX(n),this._y=t.getY(n),this._z=t.getZ(n),this._w=t.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Bn{constructor(t=0,n=0,r=0){Bn.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(t,n,r){return r===void 0&&(r=this.z),this.x=t,this.y=n,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,n){return this.x=t.x*n.x,this.y=t.y*n.y,this.z=t.z*n.z,this}applyEuler(t){return this.applyQuaternion(Pc.setFromEuler(t))}applyAxisAngle(t,n){return this.applyQuaternion(Pc.setFromAxisAngle(t,n))}applyMatrix3(t){const n=this.x,r=this.y,i=this.z,o=t.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const n=this.x,r=this.y,i=this.z,o=t.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(t){const n=this.x,r=this.y,i=this.z,o=t.x,s=t.y,a=t.z,l=t.w,c=2*(s*i-a*r),u=2*(a*n-o*i),d=2*(o*r-s*n);return this.x=n+l*c+s*d-a*u,this.y=r+l*u+a*c-o*d,this.z=i+l*d+o*u-s*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const n=this.x,r=this.y,i=this.z,o=t.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,n){return this.x=Et(this.x,t.x,n.x),this.y=Et(this.y,t.y,n.y),this.z=Et(this.z,t.z,n.z),this}clampScalar(t,n){return this.x=Et(this.x,t,n),this.y=Et(this.y,t,n),this.z=Et(this.z,t,n),this}clampLength(t,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Et(r,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this}lerpVectors(t,n,r){return this.x=t.x+(n.x-t.x)*r,this.y=t.y+(n.y-t.y)*r,this.z=t.z+(n.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,n){const r=t.x,i=t.y,o=t.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(t){const n=t.lengthSq();if(n===0)return this.set(0,0,0);const r=t.dot(this)/n;return this.copy(t).multiplyScalar(r)}projectOnPlane(t){return ns.copy(this).projectOnVector(t),this.sub(ns)}reflect(t){return this.sub(ns.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(t)/n;return Math.acos(Et(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return n*n+r*r+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,n,r){const i=Math.sin(n)*t;return this.x=i*Math.sin(r),this.y=Math.cos(n)*t,this.z=i*Math.cos(r),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,n,r){return this.x=t*Math.sin(n),this.y=r,this.z=t*Math.cos(n),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(t){const n=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(t,n){return this.fromArray(t.elements,n*4)}setFromMatrix3Column(t,n){return this.fromArray(t.elements,n*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(t),this.y=n,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ns=new Bn,Pc=new y2;function La(e,t,n){if(t.length!==e.length)return!0;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-e[r])>n)return!1;return!0}function xh(e,t,n){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let r=0;return r+=Math.abs(e.orientation[0]-t.orientation[0]),r+=Math.abs(e.orientation[1]-t.orientation[1]),r+=Math.abs(e.orientation[2]-t.orientation[2]),r+=Math.abs(e.position[0]-t.position[0]),r+=Math.abs(e.position[1]-t.position[1]),r+=Math.abs(e.position[2]-t.position[2]),r<=n}function Na(e,t,n){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&xh(e.tcp_pose,t.tcp_pose,n)}function bh(e,t){const n=new ss.Vector3(t[0],t[1],t[2]),r=new ss.Vector3(e[0],e[1],e[2]),i=n.length(),o=n.normalize();let s=r.length(),a=r.normalize();a.dot(o)<0&&(s=-s,a=a.multiplyScalar(-1));let l=s-i;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),s=i+l,[...a.multiplyScalar(s)]}const Dc=1e-4;class yo{constructor(t,n,r,i,o,s){this.nova=t,this.controller=n,this.motionGroup=r,this.description=i,this.initialMotionState=o,this.motionStateSocket=s,this.rapidlyChangingMotionState=o,s.addEventListener("message",a=>{var c;const l=(c=Te.tryParseJson(a.data))==null?void 0:c.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${a.data}`);La(this.rapidlyChangingMotionState.joint_position,l.joint_position,Dc)||he.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=l.joint_position}),Na(this.rapidlyChangingMotionState,l,Dc)||he.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(u=l.tcp_pose)!=null&&u.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:bh(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&he.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),he.makeAutoObservable(this)}static async open(t,n){var d;const[r,i]=n.split("@"),o=await t.api.controller.getCurrentRobotControllerState(i),s=o==null?void 0:o.motion_groups.find(h=>h.motion_group===n);if(!o||!s)throw new Error(`Controller ${i} or motion group ${n} not found`);const a=t.openReconnectingWebsocket(`/controllers/${i}/motion-groups/${n}/state-stream`),l=await a.firstMessage(),c=(d=Te.tryParseJson(l.data))==null?void 0:d.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${s.motion_group}. Initial state:
|
|
129
|
+
`,c);const u=await t.api.motionGroup.getMotionGroupDescription(i,s.motion_group);return new yo(t,o,s,u,c,a)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}dispose(){this.motionStateSocket.close()}}const $c="Movement request rejected. Another client is currently executing a 'Jogging' motion!";class xo{constructor(t,n={}){this.motionStream=t,this.options=n,this.ENDPOINT_JOGGING="/execution/jogging",this.ENDPOINT_TRAJECTORY="/execution/trajectory",this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",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=(n==null?void 0:n.tcp)||t.motionGroup.tcp||this.DEFAULT_TCP,this.orientation=(n==null?void 0:n.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(n==null?void 0:n.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(n==null?void 0:n.mode)||this.DEFAULT_MODE,this.onError=n==null?void 0:n.onError}static async open(t,n,r={}){const i=await yo.open(t,n),o=new xo(i,r);return await o.setJoggingMode(o.mode),o}async setOptions(t){t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.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 t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=[this.joggingSocket,this.trajectorySocket].filter(n=>n!==null);return t.forEach(n=>{n.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(n=>n.closed()))}async setJoggingMode(t,n=!0){if(!(this.mode===t&&n)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,n)=>{const r=setTimeout(()=>{n(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",i=>{var s,a,l,c;const o=Te.tryParseJson(i.data);if(((s=o==null?void 0:o.result)==null?void 0:s.kind)==="INITIALIZE_RECEIVED"){clearTimeout(r),t();return}if(((a=o==null?void 0:o.result)==null?void 0:a.kind)==="MOTION_ERROR")if(clearTimeout(r),this.onBlocked&&((l=o==null?void 0:o.result)!=null&&l.message.includes($c))){(c=this.joggingSocket)==null||c.dispose(),this.onBlocked();return}else this.onError?this.onError(i.data):n(new Error(i.data))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,tcp:this.tcp})})}async rotateJoints({joint:t,direction:n,velocityRadsPerSec:r}){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[t]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:i})}async translateTCP({axis:t,direction:n,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 i=[0,0,0],o=[0,0,0];o[Te.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:o,rotation:i,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:n,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 i=[0,0,0],o=[0,0,0];i[Te.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:o,rotation:i})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:n,velocityInRelevantUnits:r,axis:i,direction:o,motion:s}){const a=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(s.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const g=[...t.position];g[Te.XYZ_TO_VECTOR[i]]+=s.distanceMm*(o==="-"?-1:1),a.push({limits_override:{tcp_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:g,orientation:t.orientation}}})}else if(s.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const g=new Bn(t.orientation[0],t.orientation[1],t.orientation[2]),v=g.length(),C=g.clone().normalize(),w=s.distanceRads*(o==="-"?-1:1),E=new Bn(0,0,0);E[i]=1;const _=Math.cos(.5*w)*Math.cos(.5*v),S=Math.sin(.5*w)*Math.sin(.5*v),T=Math.sin(.5*w)*Math.cos(.5*v),A=Math.cos(.5*w)*Math.sin(.5*v),O=E.dot(C),D=E.clone().cross(C),k=2*Math.acos(_-S*O),x=k/Math.sin(.5*k),I=new Bn().addScaledVector(D,S).addScaledVector(E,T).addScaledVector(C,A).multiplyScalar(x);a.push({limits_override:{tcp_orientation_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...I]}}})}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 c={motion_group_model:l.motion_group_model,cycle_time:l.cycle_time,mounting:l.mounting,global:l.operation_limits.auto_limits},u=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:c,start_joint_position:n,motion_commands:a}),d=u.response;if(!d)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(u)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const h=g=>{var v;if(!g||g.add_trajectory_error||g.message)if(this.onError)this.onError(g);else throw new Error(((v=g==null?void 0:g.add_trajectory_error)==null?void 0:v.message)||(g==null?void 0:g.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"})},f=async()=>{var g;await he.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await he.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(g=this.trajectorySocket)==null||g.dispose(),this.trajectorySocket=null},m=async()=>{var g;await he.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(g=this.trajectorySocket)==null||g.dispose(),this.trajectorySocket=null},p=async g=>{if(g!=null&&g.message)if(this.onError){this.onError(g);return}else throw new Error(g.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await f():await m()};this.trajectorySocket.addEventListener("message",g=>{var C,w;const v=Te.tryParseJson(g.data);if(!((C=v==null?void 0:v.result)!=null&&C.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${g.data}`);if(this.onBlocked&&((w=v.result.message)!=null&&w.includes($c))){this.onBlocked();return}if(v.result.kind==="INITIALIZE_RECEIVED")h(v.result);else if(v.result.kind==="START_RECEIVED")p(v);else if(v.result.kind!=="PAUSE_RECEIVED")if(v.result.kind==="MOTION_ERROR"&&v.result.message)if(this.onError){this.onError(v);return}else throw new Error(v.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${v.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:d,tcp:this.tcp}})}}var x2="[object AsyncFunction]",b2="[object Function]",v2="[object GeneratorFunction]",S2="[object Proxy]";function vh(e){if(!dn(e))return!1;var t=Sn(e);return t==b2||t==v2||t==x2||t==S2}var rs=yt["__core-js_shared__"],Lc=(function(){var e=/[^.]+$/.exec(rs&&rs.keys&&rs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function w2(e){return!!Lc&&Lc in e}var E2=Function.prototype,T2=E2.toString;function wn(e){if(e!=null){try{return T2.call(e)}catch{}try{return e+""}catch{}}return""}var C2=/[\\^$.*+?()[\]{}|]/g,_2=/^\[object .+?Constructor\]$/,M2=Function.prototype,R2=Object.prototype,I2=M2.toString,A2=R2.hasOwnProperty,j2=RegExp("^"+I2.call(A2).replace(C2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function k2(e){if(!dn(e)||w2(e))return!1;var t=vh(e)?j2:_2;return t.test(wn(e))}function O2(e,t){return e==null?void 0:e[t]}function En(e,t){var n=O2(e,t);return k2(n)?n:void 0}var Nc=(function(){try{var e=En(Object,"defineProperty");return e({},"",{}),e}catch{}})();function P2(e,t,n){t=="__proto__"&&Nc?Nc(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function D2(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function $2(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[++i];if(n(o[l],l,o)===!1)break}return t}}var L2=$2();function N2(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var z2="[object Arguments]";function zc(e){return hn(e)&&Sn(e)==z2}var Sh=Object.prototype,F2=Sh.hasOwnProperty,B2=Sh.propertyIsEnumerable,wh=zc((function(){return arguments})())?zc:function(e){return hn(e)&&F2.call(e,"callee")&&!B2.call(e,"callee")},mt=Array.isArray;function G2(){return!1}var Eh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fc=Eh&&typeof module=="object"&&module&&!module.nodeType&&module,V2=Fc&&Fc.exports===Eh,Bc=V2?yt.Buffer:void 0,U2=Bc?Bc.isBuffer:void 0,Ms=U2||G2,W2=9007199254740991,H2=/^(?:0|[1-9]\d*)$/;function Th(e,t){var n=typeof e;return t=t??W2,!!t&&(n=="number"||n!="symbol"&&H2.test(e))&&e>-1&&e%1==0&&e<t}var Y2=9007199254740991;function za(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Y2}var q2="[object Arguments]",J2="[object Array]",K2="[object Boolean]",X2="[object Date]",Z2="[object Error]",Q2="[object Function]",ew="[object Map]",tw="[object Number]",nw="[object Object]",rw="[object RegExp]",iw="[object Set]",ow="[object String]",sw="[object WeakMap]",aw="[object ArrayBuffer]",lw="[object DataView]",cw="[object Float32Array]",uw="[object Float64Array]",dw="[object Int8Array]",hw="[object Int16Array]",fw="[object Int32Array]",pw="[object Uint8Array]",mw="[object Uint8ClampedArray]",gw="[object Uint16Array]",yw="[object Uint32Array]",pe={};pe[cw]=pe[uw]=pe[dw]=pe[hw]=pe[fw]=pe[pw]=pe[mw]=pe[gw]=pe[yw]=!0;pe[q2]=pe[J2]=pe[aw]=pe[K2]=pe[lw]=pe[X2]=pe[Z2]=pe[Q2]=pe[ew]=pe[tw]=pe[nw]=pe[rw]=pe[iw]=pe[ow]=pe[sw]=!1;function xw(e){return hn(e)&&za(e.length)&&!!pe[Sn(e)]}function bw(e){return function(t){return e(t)}}var Ch=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fr=Ch&&typeof module=="object"&&module&&!module.nodeType&&module,vw=fr&&fr.exports===Ch,is=vw&&mh.process,Gc=(function(){try{var e=fr&&fr.require&&fr.require("util").types;return e||is&&is.binding&&is.binding("util")}catch{}})(),Vc=Gc&&Gc.isTypedArray,_h=Vc?bw(Vc):xw,Sw=Object.prototype,ww=Sw.hasOwnProperty;function Ew(e,t){var n=mt(e),r=!n&&wh(e),i=!n&&!r&&Ms(e),o=!n&&!r&&!i&&_h(e),s=n||r||i||o,a=s?N2(e.length,String):[],l=a.length;for(var c in e)ww.call(e,c)&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Th(c,l)))&&a.push(c);return a}var Tw=Object.prototype;function Cw(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Tw;return e===n}function _w(e,t){return function(n){return e(t(n))}}var Mw=_w(Object.keys,Object),Rw=Object.prototype,Iw=Rw.hasOwnProperty;function Aw(e){if(!Cw(e))return Mw(e);var t=[];for(var n in Object(e))Iw.call(e,n)&&n!="constructor"&&t.push(n);return t}function Mh(e){return e!=null&&za(e.length)&&!vh(e)}function Fa(e){return Mh(e)?Ew(e):Aw(e)}function jw(e,t){return e&&L2(e,t,Fa)}function kw(e,t){return function(n,r){if(n==null)return n;if(!Mh(n))return e(n,r);for(var i=n.length,o=-1,s=Object(n);++o<i&&r(s[o],o,s)!==!1;);return n}}var Ow=kw(jw);function Pw(e,t,n,r){return Ow(e,function(i,o,s){t(r,i,n(i),s)}),r}function Dw(){this.__data__=[],this.size=0}function Rh(e,t){return e===t||e!==e&&t!==t}function bo(e,t){for(var n=e.length;n--;)if(Rh(e[n][0],t))return n;return-1}var $w=Array.prototype,Lw=$w.splice;function Nw(e){var t=this.__data__,n=bo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Lw.call(t,n,1),--this.size,!0}function zw(e){var t=this.__data__,n=bo(t,e);return n<0?void 0:t[n][1]}function Fw(e){return bo(this.__data__,e)>-1}function Bw(e,t){var n=this.__data__,r=bo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Pt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pt.prototype.clear=Dw;Pt.prototype.delete=Nw;Pt.prototype.get=zw;Pt.prototype.has=Fw;Pt.prototype.set=Bw;function Gw(){this.__data__=new Pt,this.size=0}function Vw(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Uw(e){return this.__data__.get(e)}function Ww(e){return this.__data__.has(e)}var Er=En(yt,"Map"),Tr=En(Object,"create");function Hw(){this.__data__=Tr?Tr(null):{},this.size=0}function Yw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var qw="__lodash_hash_undefined__",Jw=Object.prototype,Kw=Jw.hasOwnProperty;function Xw(e){var t=this.__data__;if(Tr){var n=t[e];return n===qw?void 0:n}return Kw.call(t,e)?t[e]:void 0}var Zw=Object.prototype,Qw=Zw.hasOwnProperty;function eE(e){var t=this.__data__;return Tr?t[e]!==void 0:Qw.call(t,e)}var tE="__lodash_hash_undefined__";function nE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tr&&t===void 0?tE:t,this}function fn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fn.prototype.clear=Hw;fn.prototype.delete=Yw;fn.prototype.get=Xw;fn.prototype.has=eE;fn.prototype.set=nE;function rE(){this.size=0,this.__data__={hash:new fn,map:new(Er||Pt),string:new fn}}function iE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vo(e,t){var n=e.__data__;return iE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function oE(e){var t=vo(this,e).delete(e);return this.size-=t?1:0,t}function sE(e){return vo(this,e).get(e)}function aE(e){return vo(this,e).has(e)}function lE(e,t){var n=vo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Dt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dt.prototype.clear=rE;Dt.prototype.delete=oE;Dt.prototype.get=sE;Dt.prototype.has=aE;Dt.prototype.set=lE;var cE=200;function uE(e,t){var n=this.__data__;if(n instanceof Pt){var r=n.__data__;if(!Er||r.length<cE-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dt(r)}return n.set(e,t),this.size=n.size,this}function _t(e){var t=this.__data__=new Pt(e);this.size=t.size}_t.prototype.clear=Gw;_t.prototype.delete=Vw;_t.prototype.get=Uw;_t.prototype.has=Ww;_t.prototype.set=uE;var dE="__lodash_hash_undefined__";function hE(e){return this.__data__.set(e,dE),this}function fE(e){return this.__data__.has(e)}function ki(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Dt;++t<n;)this.add(e[t])}ki.prototype.add=ki.prototype.push=hE;ki.prototype.has=fE;function pE(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function mE(e,t){return e.has(t)}var gE=1,yE=2;function Ih(e,t,n,r,i,o){var s=n&gE,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&yE?new ki:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var m=e[d],p=t[d];if(r)var g=s?r(p,m,d,t,e,o):r(m,p,d,e,t,o);if(g!==void 0){if(g)continue;h=!1;break}if(f){if(!pE(t,function(v,C){if(!mE(f,C)&&(m===v||i(m,v,n,r,o)))return f.push(C)})){h=!1;break}}else if(!(m===p||i(m,p,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var Uc=yt.Uint8Array;function xE(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function bE(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var vE=1,SE=2,wE="[object Boolean]",EE="[object Date]",TE="[object Error]",CE="[object Map]",_E="[object Number]",ME="[object RegExp]",RE="[object Set]",IE="[object String]",AE="[object Symbol]",jE="[object ArrayBuffer]",kE="[object DataView]",Wc=Ut?Ut.prototype:void 0,os=Wc?Wc.valueOf:void 0;function OE(e,t,n,r,i,o,s){switch(n){case kE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case jE:return!(e.byteLength!=t.byteLength||!o(new Uc(e),new Uc(t)));case wE:case EE:case _E:return Rh(+e,+t);case TE:return e.name==t.name&&e.message==t.message;case ME:case IE:return e==t+"";case CE:var a=xE;case RE:var l=r&vE;if(a||(a=bE),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=SE,s.set(e,t);var u=Ih(a(e),a(t),r,i,o,s);return s.delete(e),u;case AE:if(os)return os.call(e)==os.call(t)}return!1}function PE(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function DE(e,t,n){var r=t(e);return mt(e)?r:PE(r,n(e))}function $E(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function LE(){return[]}var NE=Object.prototype,zE=NE.propertyIsEnumerable,Hc=Object.getOwnPropertySymbols,FE=Hc?function(e){return e==null?[]:(e=Object(e),$E(Hc(e),function(t){return zE.call(e,t)}))}:LE;function Yc(e){return DE(e,Fa,FE)}var BE=1,GE=Object.prototype,VE=GE.hasOwnProperty;function UE(e,t,n,r,i,o){var s=n&BE,a=Yc(e),l=a.length,c=Yc(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=a[d];if(!(s?h in t:VE.call(t,h)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var p=!0;o.set(e,t),o.set(t,e);for(var g=s;++d<l;){h=a[d];var v=e[h],C=t[h];if(r)var w=s?r(C,v,h,t,e,o):r(v,C,h,e,t,o);if(!(w===void 0?v===C||i(v,C,n,r,o):w)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var E=e.constructor,_=t.constructor;E!=_&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof _=="function"&&_ instanceof _)&&(p=!1)}return o.delete(e),o.delete(t),p}var Rs=En(yt,"DataView"),Is=En(yt,"Promise"),As=En(yt,"Set"),js=En(yt,"WeakMap"),qc="[object Map]",WE="[object Object]",Jc="[object Promise]",Kc="[object Set]",Xc="[object WeakMap]",Zc="[object DataView]",HE=wn(Rs),YE=wn(Er),qE=wn(Is),JE=wn(As),KE=wn(js),Ft=Sn;(Rs&&Ft(new Rs(new ArrayBuffer(1)))!=Zc||Er&&Ft(new Er)!=qc||Is&&Ft(Is.resolve())!=Jc||As&&Ft(new As)!=Kc||js&&Ft(new js)!=Xc)&&(Ft=function(e){var t=Sn(e),n=t==WE?e.constructor:void 0,r=n?wn(n):"";if(r)switch(r){case HE:return Zc;case YE:return qc;case qE:return Jc;case JE:return Kc;case KE:return Xc}return t});var XE=1,Qc="[object Arguments]",eu="[object Array]",Qr="[object Object]",ZE=Object.prototype,tu=ZE.hasOwnProperty;function QE(e,t,n,r,i,o){var s=mt(e),a=mt(t),l=s?eu:Ft(e),c=a?eu:Ft(t);l=l==Qc?Qr:l,c=c==Qc?Qr:c;var u=l==Qr,d=c==Qr,h=l==c;if(h&&Ms(e)){if(!Ms(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new _t),s||_h(e)?Ih(e,t,n,r,i,o):OE(e,t,l,n,r,i,o);if(!(n&XE)){var f=u&&tu.call(e,"__wrapped__"),m=d&&tu.call(t,"__wrapped__");if(f||m){var p=f?e.value():e,g=m?t.value():t;return o||(o=new _t),i(p,g,n,r,o)}}return h?(o||(o=new _t),UE(e,t,n,r,i,o)):!1}function So(e,t,n,r,i){return e===t?!0:e==null||t==null||!hn(e)&&!hn(t)?e!==e&&t!==t:QE(e,t,n,r,So,i)}var eT=1,tT=2;function nT(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var a=s[0],l=e[a],c=s[1];if(s[2]){if(l===void 0&&!(a in e))return!1}else{var u=new _t,d;if(!(d===void 0?So(c,l,eT|tT,r,u):d))return!1}}return!0}function Ah(e){return e===e&&!dn(e)}function rT(e){for(var t=Fa(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ah(i)]}return t}function jh(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function iT(e){var t=rT(e);return t.length==1&&t[0][2]?jh(t[0][0],t[0][1]):function(n){return n===e||nT(n,e,t)}}var oT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sT=/^\w*$/;function Ba(e,t){if(mt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||go(e)?!0:sT.test(e)||!oT.test(e)||t!=null&&e in Object(t)}var aT="Expected a function";function Ga(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(aT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ga.Cache||Dt),n}Ga.Cache=Dt;var lT=500;function cT(e){var t=Ga(e,function(r){return n.size===lT&&n.clear(),r}),n=t.cache;return t}var uT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dT=/\\(\\)?/g,hT=cT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(uT,function(n,r,i,o){t.push(i?o.replace(dT,"$1"):r||n)}),t});function fT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var nu=Ut?Ut.prototype:void 0,ru=nu?nu.toString:void 0;function kh(e){if(typeof e=="string")return e;if(mt(e))return fT(e,kh)+"";if(go(e))return ru?ru.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Oh(e){return e==null?"":kh(e)}function Ph(e,t){return mt(e)?e:Ba(e,t)?[e]:hT(Oh(e))}function wo(e){if(typeof e=="string"||go(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Dh(e,t){t=Ph(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[wo(t[n++])];return n&&n==r?e:void 0}function pT(e,t,n){var r=e==null?void 0:Dh(e,t);return r===void 0?n:r}function mT(e,t){return e!=null&&t in Object(e)}function gT(e,t,n){t=Ph(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=wo(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&za(i)&&Th(s,i)&&(mt(e)||wh(e)))}function yT(e,t){return e!=null&&gT(e,t,mT)}var xT=1,bT=2;function vT(e,t){return Ba(e)&&Ah(t)?jh(wo(e),t):function(n){var r=pT(n,e);return r===void 0&&r===t?yT(n,e):So(t,r,xT|bT)}}function ST(e){return e}function wT(e){return function(t){return t==null?void 0:t[e]}}function ET(e){return function(t){return Dh(t,e)}}function TT(e){return Ba(e)?wT(wo(e)):ET(e)}function CT(e){return typeof e=="function"?e:e==null?ST:typeof e=="object"?mt(e)?vT(e[0],e[1]):iT(e):TT(e)}function _T(e,t){return function(n,r){var i=mt(n)?D2:Pw,o={};return i(n,e,CT(r),o)}}var ei=_T(function(e,t,n){P2(e,n,t)}),MT=0;function RT(e){var t=++MT;return Oh(e)+t}const ks=[{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}],IT=[{id:"continuous"},...ks],AT=["coordsys","tool"];class Eo{constructor(t,n,r,i){var o,s;this.jogger=t,this.coordSystems=n,this.motionGroupDescription=r,this.tcps=i,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,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.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,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=[];for(const a of n)if(a.coordinate_system===""){a.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((s=i[0])==null?void 0:s.id)||"",he.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()},this.loadFromLocalStorage(),this.disposers.push(he.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:n}=t,[r,i]=await Promise.all([n.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),n.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),o=Object.entries(i.tcps||{}).map(([s,a])=>({id:s,readable_name:a.name,position:a.pose.position,orientation:a.pose.orientation}));return new Eo(t,r||[],i,o)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return fu.countBy(this.coordSystems,t=>t.name)}async deactivate(){if(this.jogger.mode==="jogging")return this.jogger.stop()}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 t=Te.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.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(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return IT}get discreteIncrementOptions(){return ks}get incrementOptionsById(){return ei(this.incrementOptions,t=>t.id)}get tabsById(){return ei(this.tabs,t=>t.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return ei(this.coordSystems,t=>t.coordinate_system)}get selectedCoordSystem(){return this.coordSystemsById[this.selectedCoordSystemId]}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return ei(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:ks.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,n){const r=this.tabs[n]||this.tabs[0];this.selectedTabId=r.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket()}async withMotionLock(t){const n=RT();this.lock(n);try{return await t()}finally{this.unlock(n)}}}const jT=ie.observer(({store:e})=>{const{t}=fe.useTranslation();return y.jsxRuntimeExports.jsx(R.Backdrop,{open:!0,sx:{position:"absolute",zIndex:n=>n.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:y.jsxRuntimeExports.jsxs(R.Stack,{sx:{m:2,width:"100%"},children:[y.jsxRuntimeExports.jsxs(R.Alert,{severity:"error",sx:{mb:2},children:[y.jsxRuntimeExports.jsx(R.AlertTitle,{children:t("Jogging.Blocked.ti")}),t("Jogging.Blocked.lb")]}),y.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",onClick:()=>e.unblock(),children:t("Jogging.Blocked.Reenable.bt")})]})})}),kT=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),OT=$.forwardRef(kT),PT=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),DT=$.forwardRef(PT),$T=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),LT=$.forwardRef($T),NT=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),zT=$.forwardRef(NT);function FT(e,t){return So(e,t)}const $h=({store:e})=>{const{t}=fe.useTranslation(),[n,r]=$.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),i=$.useRef(n);de.useAnimationFrame(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;FT(i.current,s)||(i.current=s,r(s))});const o=[];for(const[s,a]of n.entries())a&&o.push(s);return y.jsxRuntimeExports.jsx(R.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},BT=R.styled(R.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function ti({labelValue:e,...t}){return y.jsxRuntimeExports.jsxs(BT,{fullWidth:!0,variant:"filled",children:[y.jsxRuntimeExports.jsx(R.InputLabel,{id:t.labelId,children:e}),y.jsxRuntimeExports.jsx(R.Select,{...t})]})}const GT=ie.observer(({store:e})=>{var o;const{t}=fe.useTranslation(),n=$.useId(),r=[];function i(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(y.jsxRuntimeExports.jsx(ti,{labelId:`jogging-coord-select-${n}`,labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(y.jsxRuntimeExports.jsx(ti,{labelId:`jogging-tcp-select-${n}`,labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(y.jsxRuntimeExports.jsx(ti,{labelValue:t("Jogging.Cartesian.Orientation.lb"),labelId:`orientation-select-${n}`,value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:AT.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s,children:i(s)},s))},"orientation")),e.showIncrementSelect&&r.push(y.jsxRuntimeExports.jsxs(ti,{labelValue:t("Jogging.Increment.hlb"),labelId:`jogging-increment-select-${n}`,size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[y.jsxRuntimeExports.jsx(R.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>y.jsxRuntimeExports.jsx(R.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),y.jsxRuntimeExports.jsx(R.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,a)=>y.jsxRuntimeExports.jsx(R.Box,{sx:{gridColumn:r.length%2===1&&a===r.length-1?"span 2":"auto"},children:s},a))})}),VT=R.styled(R.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[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"}}}}});function iu(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function pr(e){return typeof e=="string"}function UT(e,t,n){return e===void 0||pr(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function ci(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function ou(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function WT(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const f=$e(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},p={...n,...i,...r};return f.length>0&&(p.className=f),Object.keys(m).length>0&&(p.style=m),{props:p,internalRef:void 0}}const s=ci({...i,...r}),a=ou(r),l=ou(i),c=t(s),u=$e(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},h={...c,...n,...l,...a};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function HT(e,t,n){return typeof e=="function"?e(t,n):e}function Nt(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,s=i?{}:HT(n,r),{props:a,internalRef:l}=WT({...o,externalSlotProps:s}),c=Ki(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return UT(t,{...a,ref:c},r)}function su(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
130
|
+
`))}return!1}const YT={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function qT(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const JT=2;function On(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function Lh(e,t){return e-t}function au(e,t){const{index:n}=e.reduce((r,i,o)=>{const s=Math.abs(t-i);return r===null||s<r.distance||s===r.distance?{distance:s,index:o}:r},null)??{};return n}function ni(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===t.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Oi(e,t,n){return(e-t)*100/(n-t)}function KT(e,t,n){return(n-t)*e+t}function XT(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function ZT(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(XT(t)))}function lu({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(Lh)}function ri({sliderRef:e,activeIndex:t,setActive:n}){var i,o,s;const r=dr(e.current);(!((i=e.current)!=null&&i.contains(r.activeElement))||Number((o=r==null?void 0:r.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),n&&n(t)}function ii(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?qT(e,t):!1}const QT={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},eC=e=>e;let oi;function cu(){return oi===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?oi=CSS.supports("touch-action","none"):oi=!0),oi}function tC(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:f,scale:m=eC,step:p=1,shiftStep:g=10,tabIndex:v,value:C}=e,w=j.useRef(void 0),[E,_]=j.useState(-1),[S,T]=j.useState(-1),[A,O]=j.useState(!1),D=j.useRef(0),k=j.useRef(null),[x,I]=DS({controlled:C,default:n??l,name:"Slider"}),M=u&&((z,U,Y)=>{const te=z.nativeEvent||z,ue=new te.constructor(te.type,te);Object.defineProperty(ue,"target",{writable:!0,value:{value:U,name:c}}),k.current=U,u(ue,U,Y)}),F=Array.isArray(x);let N=F?x.slice().sort(Lh):[x];N=N.map(z=>z==null?l:Pn(z,l,a));const W=s===!0&&p!==null?[...Array(Math.floor((a-l)/p)+1)].map((z,U)=>({value:l+p*U})):s||[],B=W.map(z=>z.value),[K,ce]=j.useState(-1),Q=j.useRef(null),Ne=Ki(f,Q),xt=z=>U=>{var te;const Y=Number(U.currentTarget.getAttribute("data-index"));su(U.target)&&ce(Y),T(Y),(te=z==null?void 0:z.onFocus)==null||te.call(z,U)},bt=z=>U=>{var Y;su(U.target)||ce(-1),T(-1),(Y=z==null?void 0:z.onBlur)==null||Y.call(z,U)},ke=(z,U)=>{const Y=Number(z.currentTarget.getAttribute("data-index")),te=N[Y],ue=B.indexOf(te);let J=U;if(W&&p==null){const Me=B[B.length-1];J>=Me?J=Me:J<=B[0]?J=B[0]:J=J<te?B[ue-1]:B[ue+1]}if(J=Pn(J,l,a),F){i&&(J=Pn(J,N[Y-1]||-1/0,N[Y+1]||1/0));const Me=J;J=lu({values:N,newValue:J,index:Y});let Pe=Y;i||(Pe=J.indexOf(Me)),ri({sliderRef:Q,activeIndex:Pe})}I(J),ce(Y),M&&!ii(J,x)&&M(z,J,Y),d&&d(z,k.current??J)},vt=z=>U=>{var Y;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(U.key)){U.preventDefault();const te=Number(U.currentTarget.getAttribute("data-index")),ue=N[te];let J=null;if(p!=null){const Me=U.shiftKey?g:p;switch(U.key){case"ArrowUp":J=On(ue,Me,1,l,a);break;case"ArrowRight":J=On(ue,Me,o?-1:1,l,a);break;case"ArrowDown":J=On(ue,Me,-1,l,a);break;case"ArrowLeft":J=On(ue,Me,o?1:-1,l,a);break;case"PageUp":J=On(ue,g,1,l,a);break;case"PageDown":J=On(ue,g,-1,l,a);break;case"Home":J=l;break;case"End":J=a;break}}else if(W){const Me=B[B.length-1],Pe=B.indexOf(ue),Se=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],We=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Se.includes(U.key)?Pe===0?J=B[0]:J=B[Pe-1]:We.includes(U.key)&&(Pe===B.length-1?J=Me:J=B[Pe+1])}J!=null&&ke(U,J)}(Y=z==null?void 0:z.onKeyDown)==null||Y.call(z,U)};pt(()=>{var z;r&&Q.current.contains(document.activeElement)&&((z=document.activeElement)==null||z.blur())},[r]),r&&E!==-1&&_(-1),r&&K!==-1&&ce(-1);const ot=z=>U=>{var Y;(Y=z.onChange)==null||Y.call(z,U),ke(U,U.target.valueAsNumber)},Ge=j.useRef(void 0);let V=h;o&&h==="horizontal"&&(V+="-reverse");const q=({finger:z,move:U=!1})=>{const{current:Y}=Q,{width:te,height:ue,bottom:J,left:Me}=Y.getBoundingClientRect();let Pe;V.startsWith("vertical")?Pe=(J-z.y)/ue:Pe=(z.x-Me)/te,V.includes("-reverse")&&(Pe=1-Pe);let Se;if(Se=KT(Pe,l,a),p)Se=ZT(Se,p,l);else{const Qn=au(B,Se);Se=B[Qn]}Se=Pn(Se,l,a);let We=0;if(F){U?We=Ge.current:We=au(N,Se),i&&(Se=Pn(Se,N[We-1]||-1/0,N[We+1]||1/0));const Qn=Se;Se=lu({values:N,newValue:Se,index:We}),i&&U||(We=Se.indexOf(Qn),Ge.current=We)}return{newValue:Se,activeIndex:We}},Z=ht(z=>{const U=ni(z,w);if(!U)return;if(D.current+=1,z.type==="mousemove"&&z.buttons===0){L(z);return}const{newValue:Y,activeIndex:te}=q({finger:U,move:!0});ri({sliderRef:Q,activeIndex:te,setActive:_}),I(Y),!A&&D.current>JT&&O(!0),M&&!ii(Y,x)&&M(z,Y,te)}),L=ht(z=>{const U=ni(z,w);if(O(!1),!U)return;const{newValue:Y}=q({finger:U,move:!0});_(-1),z.type==="touchend"&&T(-1),d&&d(z,k.current??Y),w.current=void 0,ee()}),re=ht(z=>{if(r)return;cu()||z.preventDefault();const U=z.changedTouches[0];U!=null&&(w.current=U.identifier);const Y=ni(z,w);if(Y!==!1){const{newValue:ue,activeIndex:J}=q({finger:Y});ri({sliderRef:Q,activeIndex:J,setActive:_}),I(ue),M&&!ii(ue,x)&&M(z,ue,J)}D.current=0;const te=dr(Q.current);te.addEventListener("touchmove",Z,{passive:!0}),te.addEventListener("touchend",L,{passive:!0})}),ee=j.useCallback(()=>{const z=dr(Q.current);z.removeEventListener("mousemove",Z),z.removeEventListener("mouseup",L),z.removeEventListener("touchmove",Z),z.removeEventListener("touchend",L)},[L,Z]);j.useEffect(()=>{const{current:z}=Q;return z.addEventListener("touchstart",re,{passive:cu()}),()=>{z.removeEventListener("touchstart",re),ee()}},[ee,re]),j.useEffect(()=>{r&&ee()},[r,ee]);const Ae=z=>U=>{var ue;if((ue=z.onMouseDown)==null||ue.call(z,U),r||U.defaultPrevented||U.button!==0)return;U.preventDefault();const Y=ni(U,w);if(Y!==!1){const{newValue:J,activeIndex:Me}=q({finger:Y});ri({sliderRef:Q,activeIndex:Me,setActive:_}),I(J),M&&!ii(J,x)&&M(U,J,Me)}D.current=0;const te=dr(Q.current);te.addEventListener("mousemove",Z,{passive:!0}),te.addEventListener("mouseup",L)},_e=Oi(F?N[0]:l,l,a),ge=Oi(N[N.length-1],l,a)-_e,$t=(z={})=>{const U=ci(z),Y={onMouseDown:Ae(U||{})},te={...U,...Y};return{...z,ref:Ne,...te}},Pr=z=>U=>{var te;(te=z.onMouseOver)==null||te.call(z,U);const Y=Number(U.currentTarget.getAttribute("data-index"));T(Y)},Dr=z=>U=>{var Y;(Y=z.onMouseLeave)==null||Y.call(z,U),T(-1)},$r=(z={})=>{const U=ci(z),Y={onMouseOver:Pr(U||{}),onMouseLeave:Dr(U||{})};return{...z,...U,...Y}},Lr=z=>({pointerEvents:E!==-1&&E!==z?"none":void 0});let Tn;return h==="vertical"&&(Tn=o?"vertical-rl":"vertical-lr"),{active:E,axis:V,axisProps:QT,dragging:A,focusedThumbIndex:K,getHiddenInputProps:(z={})=>{const U=ci(z),Y={onChange:ot(U||{}),onFocus:xt(U||{}),onBlur:bt(U||{}),onKeyDown:vt(U||{})},te={...U,...Y};return{tabIndex:v,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":m(a),"aria-valuemin":m(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...z,...te,style:{...YT,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Tn}}},getRootProps:$t,getThumbProps:$r,marks:W,open:S,range:F,rootRef:Ne,trackLeap:ge,trackOffset:_e,values:N,getThumbStyle:Lr}}const nC=e=>!e||!pr(e);function rC(e){return typeof e.main=="string"}function iC(e,t=[]){if(!rC(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Va(e=[]){return([,t])=>t&&iC(t,e)}function oC(e){return pn("MuiSlider",e)}const Xe=Hi("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),sC=e=>{const{open:t}=e;return{offset:$e(t&&Xe.valueLabelOpen),circle:Xe.valueLabelCircle,label:Xe.valueLabelLabel}};function Nh(e){const{children:t,className:n,value:r}=e,i=sC(e);return t?j.cloneElement(t,{className:t.props.className},y.jsxRuntimeExports.jsxs(j.Fragment,{children:[t.props.children,y.jsxRuntimeExports.jsx("span",{className:$e(i.offset,n),"aria-hidden":!0,children:y.jsxRuntimeExports.jsx("span",{className:i.circle,children:y.jsxRuntimeExports.jsx("span",{className:i.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(Nh.propTypes={children:b.element.isRequired,className:b.string,value:b.node});function uu(e){return e}const aC=Ue("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${De(n.color)}`],n.size!=="medium"&&t[`size${De(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(vn(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Xe.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Xe.dragging}`]:{[`& .${Xe.thumb}, & .${Xe.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Va()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),lC=Ue("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),cC=Ue("span",{name:"MuiSlider",slot:"Track"})(vn(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Va()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),uC=Ue("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${De(n.color)}`],n.size!=="medium"&&t[`thumbSize${De(n.size)}`]]}})(vn(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Xe.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Va()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Xe.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Xe.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),zh=Ue(Nh,{name:"MuiSlider",slot:"ValueLabel"})(vn(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Xe.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Xe.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(zh.propTypes={children:b.element.isRequired,index:b.number.isRequired,open:b.bool.isRequired,value:b.node});const dC=Ue("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Ns(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(vn(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),hC=Ue("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Ns(e)&&e!=="markLabelActive"})(vn(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),fC=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:l}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${De(a)}`,l&&`size${De(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${De(l)}`,a&&`thumbColor${De(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Cr(c,oC,s)},pC=({children:e})=>e,Fh=j.forwardRef(function(t,n){const r=$a({props:t,name:"MuiSlider"}),i=rm(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":a,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:f,disableSwap:m=!1,disabled:p=!1,getAriaLabel:g,getAriaValueText:v,marks:C=!1,max:w=100,min:E=0,name:_,onChange:S,onChangeCommitted:T,orientation:A="horizontal",shiftStep:O=10,size:D="medium",step:k=1,scale:x=uu,slotProps:I,slots:M,tabIndex:F,track:N="normal",value:W,valueLabelDisplay:B="off",valueLabelFormat:K=uu,...ce}=r,Q={...r,isRtl:i,max:w,min:E,classes:h,disabled:p,disableSwap:m,orientation:A,marks:C,color:d,size:D,step:k,shiftStep:O,scale:x,track:N,valueLabelDisplay:B,valueLabelFormat:K},{axisProps:Ne,getRootProps:xt,getHiddenInputProps:bt,getThumbProps:ke,open:vt,active:ot,axis:Ge,focusedThumbIndex:V,range:q,dragging:Z,marks:L,values:re,trackOffset:ee,trackLeap:Ae,getThumbStyle:_e}=tC({...Q,rootRef:n});Q.marked=L.length>0&&L.some(ve=>ve.label),Q.dragging=Z,Q.focusedThumbIndex=V;const ge=fC(Q),$t=(M==null?void 0:M.root)??c.Root??aC,Pr=(M==null?void 0:M.rail)??c.Rail??lC,Dr=(M==null?void 0:M.track)??c.Track??cC,$r=(M==null?void 0:M.thumb)??c.Thumb??uC,Lr=(M==null?void 0:M.valueLabel)??c.ValueLabel??zh,Tn=(M==null?void 0:M.mark)??c.Mark??dC,Nr=(M==null?void 0:M.markLabel)??c.MarkLabel??hC,z=(M==null?void 0:M.input)??c.Input??"input",U=(I==null?void 0:I.root)??u.root,Y=(I==null?void 0:I.rail)??u.rail,te=(I==null?void 0:I.track)??u.track,ue=(I==null?void 0:I.thumb)??u.thumb,J=(I==null?void 0:I.valueLabel)??u.valueLabel,Me=(I==null?void 0:I.mark)??u.mark,Pe=(I==null?void 0:I.markLabel)??u.markLabel,Se=(I==null?void 0:I.input)??u.input,We=Nt({elementType:$t,getSlotProps:xt,externalSlotProps:U,externalForwardedProps:ce,additionalProps:{...nC($t)&&{as:l}},ownerState:{...Q,...U==null?void 0:U.ownerState},className:[ge.root,f]}),Qn=Nt({elementType:Pr,externalSlotProps:Y,ownerState:Q,className:ge.rail}),qh=Nt({elementType:Dr,externalSlotProps:te,additionalProps:{style:{...Ne[Ge].offset(ee),...Ne[Ge].leap(Ae)}},ownerState:{...Q,...te==null?void 0:te.ownerState},className:ge.track}),To=Nt({elementType:$r,getSlotProps:ke,externalSlotProps:ue,ownerState:{...Q,...ue==null?void 0:ue.ownerState},className:ge.thumb}),Jh=Nt({elementType:Lr,externalSlotProps:J,ownerState:{...Q,...J==null?void 0:J.ownerState},className:ge.valueLabel}),Co=Nt({elementType:Tn,externalSlotProps:Me,ownerState:Q,className:ge.mark}),_o=Nt({elementType:Nr,externalSlotProps:Pe,ownerState:Q,className:ge.markLabel}),Kh=Nt({elementType:z,getSlotProps:bt,externalSlotProps:Se,ownerState:Q});return y.jsxRuntimeExports.jsxs($t,{...We,children:[y.jsxRuntimeExports.jsx(Pr,{...Qn}),y.jsxRuntimeExports.jsx(Dr,{...qh}),L.filter(ve=>ve.value>=E&&ve.value<=w).map((ve,je)=>{const Mo=Oi(ve.value,E,w),zr=Ne[Ge].offset(Mo);let St;return N===!1?St=re.includes(ve.value):St=N==="normal"&&(q?ve.value>=re[0]&&ve.value<=re[re.length-1]:ve.value<=re[0])||N==="inverted"&&(q?ve.value<=re[0]||ve.value>=re[re.length-1]:ve.value>=re[0]),y.jsxRuntimeExports.jsxs(j.Fragment,{children:[y.jsxRuntimeExports.jsx(Tn,{"data-index":je,...Co,...!pr(Tn)&&{markActive:St},style:{...zr,...Co.style},className:$e(Co.className,St&&ge.markActive)}),ve.label!=null?y.jsxRuntimeExports.jsx(Nr,{"aria-hidden":!0,"data-index":je,..._o,...!pr(Nr)&&{markLabelActive:St},style:{...zr,..._o.style},className:$e(ge.markLabel,_o.className,St&&ge.markLabelActive),children:ve.label}):null]},je)}),re.map((ve,je)=>{const Mo=Oi(ve,E,w),zr=Ne[Ge].offset(Mo),St=B==="off"?pC:Lr;return y.jsxRuntimeExports.jsx(St,{...!pr(St)&&{valueLabelFormat:K,valueLabelDisplay:B,value:typeof K=="function"?K(x(ve),je):K,index:je,open:vt===je||ot===je||B==="on",disabled:p},...Jh,children:y.jsxRuntimeExports.jsx($r,{"data-index":je,...To,className:$e(ge.thumb,To.className,ot===je&&ge.active,V===je&&ge.focusVisible),style:{...zr,..._e(je),...To.style},children:y.jsxRuntimeExports.jsx(z,{"data-index":je,"aria-label":g?g(je):o,"aria-valuenow":x(ve),"aria-labelledby":a,"aria-valuetext":v?v(x(ve),je):s,value:re[je],...Kh})})},je)})]})});process.env.NODE_ENV!=="production"&&(Fh.propTypes={"aria-label":iu(b.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":b.string,"aria-valuetext":iu(b.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["primary","secondary","error","info","success","warning"]),b.string]),components:b.shape({Input:b.elementType,Mark:b.elementType,MarkLabel:b.elementType,Rail:b.elementType,Root:b.elementType,Thumb:b.elementType,Track:b.elementType,ValueLabel:b.elementType}),componentsProps:b.shape({input:b.oneOfType([b.func,b.object]),mark:b.oneOfType([b.func,b.object]),markLabel:b.oneOfType([b.func,b.object]),rail:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),thumb:b.oneOfType([b.func,b.object]),track:b.oneOfType([b.func,b.object]),valueLabel:b.oneOfType([b.func,b.shape({children:b.element,className:b.string,open:b.bool,style:b.object,value:b.node,valueLabelDisplay:b.oneOf(["auto","off","on"])})])}),defaultValue:b.oneOfType([b.arrayOf(b.number),b.number]),disabled:b.bool,disableSwap:b.bool,getAriaLabel:b.func,getAriaValueText:b.func,marks:b.oneOfType([b.arrayOf(b.shape({label:b.node,value:b.number.isRequired})),b.bool]),max:b.number,min:b.number,name:b.string,onChange:b.func,onChangeCommitted:b.func,orientation:b.oneOf(["horizontal","vertical"]),scale:b.func,shiftStep:b.number,size:b.oneOfType([b.oneOf(["small","medium"]),b.string]),slotProps:b.shape({input:b.oneOfType([b.func,b.object]),mark:b.oneOfType([b.func,b.object]),markLabel:b.oneOfType([b.func,b.object]),rail:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),thumb:b.oneOfType([b.func,b.object]),track:b.oneOfType([b.func,b.object]),valueLabel:b.oneOfType([b.func,b.shape({children:b.element,className:b.string,open:b.bool,style:b.object,value:b.node,valueLabelDisplay:b.oneOf(["auto","off","on"])})])}),slots:b.shape({input:b.elementType,mark:b.elementType,markLabel:b.elementType,rail:b.elementType,root:b.elementType,thumb:b.elementType,track:b.elementType,valueLabel:b.elementType}),step:b.number,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),tabIndex:b.number,track:b.oneOf(["inverted","normal",!1]),value:b.oneOfType([b.arrayOf(b.number),b.number]),valueLabelDisplay:b.oneOf(["auto","off","on"]),valueLabelFormat:b.oneOfType([b.func,b.string])});var mC="[object Number]";function gC(e){return typeof e=="number"||hn(e)&&Sn(e)==mC}const Bh=ie.observer(e=>{var o,s,a;const t=R.useTheme(),{store:n}=e,{t:r}=fe.useTranslation();function i(l,c){c===e.velocity||!gC(c)||e.onVelocityChange(c)}return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[n.showVelocityLegend&&y.jsxRuntimeExports.jsx(R.Typography,{sx:{color:(a=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:a.sliderLegendColor,fontSize:"14px"},children:r("Jogging.Velocity.bt")}),y.jsxRuntimeExports.jsx(Fh,{value:e.velocity,color:"secondary",onChange:i,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),n.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):y.jsxRuntimeExports.jsx(Ua,{value:e.velocity.toString()}))]})});function Ua({value:e,sx:t}){var r;const n=R.useTheme();return y.jsxRuntimeExports.jsx(R.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(r=n.palette.backgroundPaperElevation)==null?void 0:r[8],borderRadius:"10px",minWidth:"111px",...t},children:y.jsxRuntimeExports.jsx(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:n.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Gh=ie.observer(({store:e})=>{const{t}=fe.useTranslation(),n=ie.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?r=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:r})}`:r=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:r})}`}}));return y.jsxRuntimeExports.jsx(Bh,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:r=>y.jsxRuntimeExports.jsx(Ua,{value:n.valueLabelFormat(r),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),yC=ie.observer(({store:e,children:t})=>{const{t:n}=fe.useTranslation(),r=R.useTheme();function i(h,f){(f==="translate"||f==="rotate")&&e.setSelectedCartesianMotionType(f)}de.useReaction(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function o(h,f){const m=await e.activate(),p=m.motionStream.rapidlyChangingMotionState.tcp_pose,g=m.motionStream.rapidlyChangingMotionState.joint_position;p&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:p,currentJoints:g,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:f.mm}:{type:"rotate",distanceRads:Te.degreesToRadians(f.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function a(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,f,m){var g,v,C;const p=(C=(v=(g=m.componentsExt)==null?void 0:g.JoggingPanel)==null?void 0:v.JoggingCartesian)==null?void 0:C.Axis;if(p)return f==="translate"?p[h]:p.CustomRotation??p[h]}const c=[{id:"x",icon:y.jsxRuntimeExports.jsx(OT,{}),colors:l("X",e.selectedCartesianMotionType,r)},{id:"y",icon:y.jsxRuntimeExports.jsx(DT,{}),colors:l("Y",e.selectedCartesianMotionType,r)},{id:"z",icon:y.jsxRuntimeExports.jsx(LT,{}),colors:l("Z",e.selectedCartesianMotionType,r)}];function u(h){return n("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return n("General.degree.variable",{amount:Te.radiansToDegrees(h).toFixed(1)})}return y.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[y.jsxRuntimeExports.jsxs(R.Stack,{gap:2,children:[y.jsxRuntimeExports.jsx(GT,{store:e}),y.jsxRuntimeExports.jsx(Gh,{store:e}),y.jsxRuntimeExports.jsx(R.Divider,{})]}),y.jsxRuntimeExports.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:y.jsxRuntimeExports.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[y.jsxRuntimeExports.jsxs(VT,{value:e.selectedCartesianMotionType,onChange:i,exclusive:!0,"aria-label":n("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[y.jsxRuntimeExports.jsx(R.ToggleButton,{value:"translate",children:n("Jogging.Cartesian.Translation.bt")}),y.jsxRuntimeExports.jsx(R.ToggleButton,{value:"rotate",children:n("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var f,m;return y.jsxRuntimeExports.jsx(_s,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[h.icon,y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,g;return u(((g=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.position)==null?void 0:g[Te.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"translate",direction:p}),stopJogging:a},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var f,m;return y.jsxRuntimeExports.jsx(_s,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsx(zT,{}),y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,g;return d(((g=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.orientation)==null?void 0:g[Te.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"rotate",direction:p}),stopJogging:a},h.id)})]})}),y.jsxRuntimeExports.jsx($h,{store:e}),t&&y.jsxRuntimeExports.jsx(R.Divider,{}),t]})}),xC=ie.observer(({store:e,children:t})=>{const n=R.useTheme();async function r(o){await e.activate(),await e.jogger.rotateJoints({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function i(){await e.jogger.stop(),await e.deactivate()}return y.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[y.jsxRuntimeExports.jsx(Gh,{store:e}),y.jsxRuntimeExports.jsx(R.Divider,{}),y.jsxRuntimeExports.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},children:y.jsxRuntimeExports.jsx(R.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c,u,d;const s=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[o.index])==null?void 0:d.position,a=(s==null?void 0:s.lower_limit)!==void 0?Te.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Te.radiansToDegrees(s.upper_limit):void 0;return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&y.jsxRuntimeExports.jsx(R.Typography,{color:e.isLocked?n.palette.text.disabled:n.palette.text.secondary,children:`G${o.index+1}`}),y.jsxRuntimeExports.jsx(yh,{disabled:e.isLocked,lowerLimitDegs:a,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[o.index];return h!==void 0?Te.radiansToDegrees(h):void 0},startJogging:h=>r({joint:o.index,direction:h}),stopJogging:i})]},`joint-${o.index}`)})})}),y.jsxRuntimeExports.jsx($h,{store:e}),t&&y.jsxRuntimeExports.jsx(R.Divider,{}),t]})}),bC=y.externalizeComponent(ie.observer(e=>{const t=fu.isString(e.nova)?new Ef({instanceUrl:e.nova}):e.nova,n=ie.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){he.runInAction(()=>{n.loadingError=null,n.joggingStore=null});try{let i=e.store;if(!i){const o=await xo.open(t,e.motionGroupId);i=await Eo.loadFor(o)}he.runInAction(()=>{n.joggingStore=i}),e.onSetup&&e.onSetup(i)}catch(i){n.loadingError=i}}return $.useEffect(()=>(r(),e.store?()=>null:()=>{var i;(i=n.joggingStore)==null||i.dispose()}),[e.store,e.nova,e.motionGroupId]),$.useEffect(()=>{const i=n.joggingStore;i&&(e.locked?i.lock("external"):i.unlock("external"))},[n.joggingStore,e.locked]),y.jsxRuntimeExports.jsx(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:n.joggingStore?y.jsxRuntimeExports.jsx(vC,{store:n.joggingStore,children:e.children}):y.jsxRuntimeExports.jsx(pu.LoadingCover,{message:"Loading jogging",error:n.loadingError})})})),vC=ie.observer(({store:e,children:t})=>{const{t:n}=fe.useTranslation();function r(){if(e.currentTab.id==="cartesian")return y.jsxRuntimeExports.jsx(y.jsxRuntimeExports.Fragment,{children:y.jsxRuntimeExports.jsx(yC,{store:e,children:t})});if(e.currentTab.id==="joint")return y.jsxRuntimeExports.jsx(y.jsxRuntimeExports.Fragment,{children:y.jsxRuntimeExports.jsx(xC,{store:e,children:t})})}return y.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[y.jsxRuntimeExports.jsx(R.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(i=>{const o=i.label==="cartesian"?n("Jogging.Cartesian.bt"):n("Jogging.Joints.bt"),s=i.label==="cartesian"?y.jsxRuntimeExports.jsx(p2,{fontSize:"small",sx:{mr:1}}):y.jsxRuntimeExports.jsx(m2,{fontSize:"small",sx:{mr:1}});return y.jsxRuntimeExports.jsx(R.Tab,{label:e.showTabIcons?y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${i.id}`,"aria-controls":`jogging-tab-${i.id}`},i.id)})}),y.jsxRuntimeExports.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()}),e.blocked&&y.jsxRuntimeExports.jsx(jT,{store:e})]})}),Vh=e=>{var a;const{value:t,ref:n}=e,r=R.useTheme(),[i,o]=$.useState(!1);async function s(){if(!n||!("current"in n))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&n&&"current"in n&&n.current){const u=document.createRange();u.selectNodeContents(n.current),c.removeAllRanges(),c.addRange(u)}}return!1}return $.useEffect(()=>{if(!i)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[i]),y.jsxRuntimeExports.jsx(R.Tooltip,{open:i,title:"Copied!",children:y.jsxRuntimeExports.jsx(R.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(a=r.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:y.jsxRuntimeExports.jsx(R.Typography,{ref:n,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:r.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},SC=y.externalizeComponent(ie.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[n,r]=$.useState(null),i=Tf(e),o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[y.jsxRuntimeExports.jsx(Vh,{value:i}),t&&y.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})})),wC=y.externalizeComponent(ie.observer(({joints:e,showCopyButton:t=!1})=>{const[n,r]=$.useState(null),i=`[${e.map(s=>parseFloat(s.toFixed(4))).join(", ")}]`,o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[y.jsxRuntimeExports.jsx(Vh,{value:i}),t&&y.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})}));class Uh{constructor(){this.messages=[],this.addMessage=(t,n="info")=>{const r={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:n};this.messages.push(r)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},he.makeObservable(this,{messages:he.observable,addMessage:he.action,clearMessages:he.action})}}const Or=(e,t,n)=>({id:n||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),EC=(e,t)=>Or(e,"debug",t),TC=(e,t)=>Or(e,"info",t),CC=(e,t)=>Or(e,"warning",t),_C=(e,t)=>Or(e,"error",t),Wh=y.externalizeComponent(ie.observer(e=>{var u;const{messages:t=[],onClear:n,height:r=400,sx:i}=e,o=R.useTheme(),s=$.useRef(null);$.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const a=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},c=({message:d})=>{const[h,f]=$.useState(!1),[m,p]=$.useState(!1),[g,v]=$.useState(!1),C=d.message.length>150,w=async()=>{try{await navigator.clipboard.writeText(d.message),p(!0),setTimeout(()=>p(!1),2e3)}catch(_){console.error("Failed to copy message:",_)}},E=C&&!h?d.message.substring(0,150)+"...":d.message;return y.jsxRuntimeExports.jsx(R.Box,{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",gap:1},children:[y.jsxRuntimeExports.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",a(d.timestamp),"]"]}),y.jsxRuntimeExports.jsx(R.Typography,{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:E}),y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:g?1:0,transition:"opacity 0.2s ease-in-out",visibility:g?"visible":"hidden"},children:[y.jsxRuntimeExports.jsx(R.IconButton,{size:"small",onClick:w,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:m?"Copied!":"Copy message",children:y.jsxRuntimeExports.jsx(Fr.ContentCopy,{sx:{fontSize:12}})}),C&&y.jsxRuntimeExports.jsx(R.IconButton,{size:"small",onClick:()=>f(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?y.jsxRuntimeExports.jsx(Fr.ExpandLess,{sx:{fontSize:12}}):y.jsxRuntimeExports.jsx(Fr.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return y.jsxRuntimeExports.jsxs(R.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:r,display:"flex",flexDirection:"column",overflow:"hidden",...i},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[y.jsxRuntimeExports.jsx(Fr.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),y.jsxRuntimeExports.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),y.jsxRuntimeExports.jsx(R.Button,{onClick:n,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),y.jsxRuntimeExports.jsx(R.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?y.jsxRuntimeExports.jsx(R.Typography,{sx:{color:o.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>y.jsxRuntimeExports.jsx(c,{message:d},d.id))})]})})),MC=y.externalizeComponent(ie.observer(e=>{const{store:t,onStoreReady:n,...r}=e,i=$.useRef(n);$.useEffect(()=>{i.current=n},[n]);const o=$.useMemo(()=>{var l;const a=t||new Uh;return(l=i.current)==null||l.call(i,a),a},[t]),s=()=>{o.clearMessages()};return y.jsxRuntimeExports.jsx(Wh,{...r,messages:o.messages,onClear:s})}));function RC(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function IC({baseUrl:e=RC(),...t}){return y.jsxRuntimeExports.jsxs(R.Dialog,{"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:[y.jsxRuntimeExports.jsx(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),y.jsxRuntimeExports.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[y.jsxRuntimeExports.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),y.jsxRuntimeExports.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),y.jsxRuntimeExports.jsx(R.DialogActions,{children:y.jsxRuntimeExports.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[y.jsxRuntimeExports.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),y.jsxRuntimeExports.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const AC=Xt(y.jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),jC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),kC=$.forwardRef(jC);var Wa=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Wa||{});const Hh=y.externalizeComponent(ie.observer(({setupState:e,className:t})=>{const n=R.useTheme(),{t:r}=fe.useTranslation(),i=()=>{var c,u,d,h,f,m,p;switch(e){case"READY":return{label:r("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=n.palette.tertiary)==null?void 0:c.main)||n.palette.primary.main,backgroundColor:((u=n.palette.backgroundPaperElevation)==null?void 0:u[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:n.palette.error.main,backgroundColor:((d=n.palette.backgroundPaperElevation)==null?void 0:d[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"CELL_OPEN":return{label:r("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:n.palette.error.main,backgroundColor:((h=n.palette.backgroundPaperElevation)==null?void 0:h[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"E_STOP":return{label:r("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:n.palette.error.main,backgroundColor:((f=n.palette.backgroundPaperElevation)==null?void 0:f[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"MANUAL_MODE":return{label:r("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:n.palette.error.main,backgroundColor:((m=n.palette.backgroundPaperElevation)==null?void 0:m[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:r("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:n.palette.error.main,backgroundColor:((p=n.palette.backgroundPaperElevation)==null?void 0:p[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText}}},{label:o,indicatorColor:s,backgroundColor:a,textColor:l}=i();return y.jsxRuntimeExports.jsx(R.Chip,{className:t,label:y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[y.jsxRuntimeExports.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:a,color:n.palette.getContrastText(a),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),OC=y.externalizeComponent(ie.observer(({robotName:e,robotType:t,setupState:n,PreconditionComponent:r=Hh,className:i})=>{var l;const o=R.useTheme(),s=t||"Robot",a=n===Wa.READY;return y.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[y.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[a?y.jsxRuntimeExports.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:y.jsxRuntimeExports.jsx(kC,{})}):y.jsxRuntimeExports.jsx(AC,{sx:{color:o.palette.error.main,fontSize:24}}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),r&&y.jsxRuntimeExports.jsx(r,{setupState:n})]})})),PC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),DC=$.forwardRef(PC),$C=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),LC=$.forwardRef($C),ut=ie.observer(({id:e,icon:t,color:n,title:r,name:i,label:o,explanation:s,literalValue:a,anchorOrigin:l,transformOrigin:c})=>{const u=ie.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[y.jsxRuntimeExports.jsxs(R.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[y.jsxRuntimeExports.jsx(R.SvgIcon,{component:t,sx:{color:n}}),o&&y.jsxRuntimeExports.jsx("div",{style:{color:n},children:o})]}),y.jsxRuntimeExports.jsx(R.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:y.jsxRuntimeExports.jsxs(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[y.jsxRuntimeExports.jsxs("div",{children:[r&&y.jsxRuntimeExports.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${r}: `}),y.jsxRuntimeExports.jsx(R.Typography,{component:"span",color:n,fontWeight:"bold",fontSize:"14px",children:i})]}),y.jsxRuntimeExports.jsx(R.Typography,{fontSize:"14px",children:s}),a&&y.jsxRuntimeExports.jsx(R.Typography,{fontSize:"12px",children:a})]})})]})}),NC=ie.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:n,transformOrigin:r,compact:i})=>{const o=R.useTheme(),s=$.useId(),{t:a}=fe.useTranslation();return e?y.jsxRuntimeExports.jsx(ut,{id:`motion-group-virtual-${s}`,icon:LC,color:o.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:i?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:y.jsxRuntimeExports.jsxs(fe.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",y.jsxRuntimeExports.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:n,transformOrigin:r}):y.jsxRuntimeExports.jsx(ut,{id:`motion-group-physical-${s}`,icon:DC,color:o.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:i?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:y.jsxRuntimeExports.jsx("code",{}),strong:y.jsxRuntimeExports.jsx("strong",{})}}),anchorOrigin:n,transformOrigin:r})}),zC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),FC=$.forwardRef(zC),BC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),GC=$.forwardRef(BC),VC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),UC=$.forwardRef(VC),WC=ie.observer(({operationMode:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=fe.useTranslation(),o=R.useTheme(),s=$.useId();switch(e){case"OPERATION_MODE_AUTO":return y.jsxRuntimeExports.jsx(ut,{id:`operation-mode-auto-${s}`,icon:FC,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Automatic.ti"),label:r?null:i("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:n});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return y.jsxRuntimeExports.jsx(ut,{id:`operation-mode-manual-${s}`,icon:UC,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Manual.lb"),label:r?null:i("SafetyBar.OperationMode.Manual.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:n});default:return y.jsxRuntimeExports.jsx(ut,{id:`operation-mode-error-${s}`,icon:GC,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Error.lb"),label:r?null:i("SafetyBar.OperationMode.Error.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:n})}}),HC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),YC=$.forwardRef(HC),qC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),JC=$.forwardRef(qC),KC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),XC=$.forwardRef(KC),ZC=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),QC=$.forwardRef(ZC),e5=({title:e,titleId:t,...n},r)=>j.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),t5=$.forwardRef(e5),n5=ie.observer(({safetyState:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=fe.useTranslation(),o=R.useTheme(),s=$.useId();switch(e){case"SAFETY_STATE_NORMAL":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-normal-${s}`,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Normal.lb"),label:r?null:i("SafetyBar.SafetyState.Normal.lb"),icon:QC,color:o.palette.text.secondary,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-estop-${s}`,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Estop.lb"),label:r?null:i("SafetyBar.SafetyState.Estop.lb"),icon:JC,color:o.palette.error.main,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-stop-${s}`,icon:t5,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Stop.lb"),label:r?null:i("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-manual-action-required-${s}`,icon:XC,color:o.palette.warning.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.ManualActionRequired.lb"),label:r?null:i("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:n});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return y.jsxRuntimeExports.jsx(ut,{id:`safety-state-error-${s}`,icon:YC,color:o.palette.error.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Error.lb"),label:r?null:i("SafetyBar.SafetyState.Error.lb"),explanation:y.jsxRuntimeExports.jsx(fe.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:n});default:pu.assertUnreachable(e,`Unknown safety state ${e}`)}}),r5=y.externalizeComponent(ie.observer(({isVirtual:e,motionGroupId:t,operationMode:n,safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s=!0})=>{const a=s?1:2;return y.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",gap:a,alignItems:"center",sx:{height:"24px"},children:[y.jsxRuntimeExports.jsx(n5,{safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),y.jsxRuntimeExports.jsx(WC,{operationMode:n,anchorOrigin:i,transformOrigin:o,compact:s}),y.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),y.jsxRuntimeExports.jsx(NC,{isVirtual:e,motionGroupId:t,anchorOrigin:i,transformOrigin:o,compact:s})]})})),i5=R.styled(R.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,n,r;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:i})=>!i,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:i})=>i,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),o5=e=>{const{ref:t,...n}=e;return y.jsxRuntimeExports.jsx(i5,{ref:t,selected:e.selected,...n,color:"secondary",variant:"circular"})};function s5(e){const{children:t,value:n,index:r,...i}=e;return y.jsxRuntimeExports.jsx("div",{role:"tabpanel",hidden:n!==r,id:`tabpanel-${r}`,"aria-labelledby":`tab-${r}`,...i,children:n===r&&y.jsxRuntimeExports.jsx(R.Box,{children:t})})}function a5({children:e,...t}){const{fullWidth:n,indicator:r,onChange:i,orientation:o,scrollButtons:s,selectionFollowsFocus:a,textColor:l,value:c,variant:u,...d}=t;return y.jsxRuntimeExports.jsx(R.Box,{...d,children:e})}const l5=y.externalizeComponent(ie.observer(e=>{const{items:t,activeTab:n,defaultActiveTab:r=0,onTabChange:i,sx:o,ref:s}=e,a=n!==void 0,[l,c]=$.useState(r),u=a?n:l;$.useEffect(()=>{a||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,a,l]);const d=(h,f)=>{a||c(f),i==null||i(f)};return y.jsxRuntimeExports.jsxs(R.Box,{ref:s,sx:{height:"100%",display:"flex",flexDirection:"column",...o},children:[y.jsxRuntimeExports.jsx(R.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:y.jsxRuntimeExports.jsx(R.Tabs,{value:u,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:t.map((h,f)=>{var E,_,S;const m=()=>{if(!h.badge)return;const T=h.badge.content,A=h.badge.max;return typeof T=="number"&&A&&T>A?`${A}+`:T},p=()=>{if(!h.badge)return!1;const T=h.badge.content,A=h.badge.showZero;return!(T===0&&!A)},g=m(),v=p(),C=()=>{a||c(f),i==null||i(f)},w=y.jsxRuntimeExports.jsx(R.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:C,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:T=>{var A;return((A=T.palette.backgroundPaperElevation)==null?void 0:A[11])||"#32344B"},color:"text.primary",opacity:u===f?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===f?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:T=>{var A;return((A=T.palette.backgroundPaperElevation)==null?void 0:A[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return v?y.jsxRuntimeExports.jsx(a5,{component:"span",sx:{display:"inline-flex"},children:y.jsxRuntimeExports.jsx(R.Badge,{badgeContent:g,color:((E=h.badge)==null?void 0:E.color)||"error",max:(_=h.badge)==null?void 0:_.max,showZero:(S=h.badge)==null?void 0:S.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:w})},h.id):w})})}),y.jsxRuntimeExports.jsx(R.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),y.jsxRuntimeExports.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,f)=>y.jsxRuntimeExports.jsx(s5,{value:u,index:f,children:h.content},h.id))})]})})),c5=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,o=[];return t>0?(o.push(t.toString()),o.push(n.toString().padStart(2,"0")),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):n>0?(o.push(n.toString()),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):(o.push(r.toString()),o.push(i.toString().padStart(2,"0"))),o.join(":")},du=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(o>0||Object.keys(a).length===0)&&(a.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},u5=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i}=fe.useTranslation(),o=Fu(),{elapsedTime:s,currentProgress:a}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return y.jsxRuntimeExports.jsxs(R.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[y.jsxRuntimeExports.jsx(tf.Gauge,{width:264,height:264,value:a,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?o.palette.error.light:o.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"}}}),y.jsxRuntimeExports.jsx(R.Box,{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:y.jsxRuntimeExports.jsxs(R.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[y.jsxRuntimeExports.jsx(R.Fade,{in:u&&n,timeout:200,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:o.palette.error.light},children:i("timer.error")})}),y.jsxRuntimeExports.jsx(R.Fade,{in:u&&!n,timeout:300,children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:c5(s)})})]})})]})},d5=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:o,i18n:s}=fe.useTranslation(),a=Fu(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return r?y.jsxRuntimeExports.jsx(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?o("timer.error"):du(l,s.language)})}):y.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[y.jsxRuntimeExports.jsx(R.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:y.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[y.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),y.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),y.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.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:n?o("timer.error"):du(l,s.language)})]})},h5=()=>{const[e,t]=$.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),n=$.useRef(null),r=$.useRef(null),i=$.useRef(null),o=$.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),s=$.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),a=$.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),l=$.useCallback(()=>{t(d=>({...d,showMainText:!1})),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=$.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=$.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),i.current&&clearTimeout(i.current)},[]);return{animationState:e,triggerPauseAnimation:o,triggerErrorAnimation:s,clearErrorAnimation:a,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},f5=({autoStart:e,hasError:t,onPauseAnimation:n,onErrorAnimation:r,onClearErrorAnimation:i})=>{const[o,s]=$.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),a=$.useRef(null),l=$.useRef(null),c=$.useRef(0),u=$.useRef(0),[d]=de.useInterpolation([0],{tension:80,friction:18,onChange:([v])=>{s(C=>({...C,currentProgress:v}))}}),h=$.useCallback((v=0)=>{const C=v/60%1*100;s(w=>({...w,elapsedTime:v,isPausedState:!1,currentProgress:C})),c.current=0,u.current=C,d.setImmediate([C]),e?(l.current=Date.now()-v*1e3,s(w=>({...w,isRunning:!0}))):l.current=null},[e,d]),f=$.useCallback(()=>{if(l.current&&o.isRunning){const C=(Date.now()-l.current)/1e3+c.current,w=C/60%1*100;d.setTarget([w]),s(E=>({...E,elapsedTime:Math.floor(C)}))}s(v=>({...v,isRunning:!1,isPausedState:!0})),n()},[o.isRunning,d,n]),m=$.useCallback(()=>{o.isPausedState&&(c.current=o.elapsedTime,l.current=Date.now(),s(v=>({...v,isRunning:!0,isPausedState:!1})))},[o.isPausedState,o.elapsedTime]),p=$.useCallback(()=>{s(v=>({...v,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),g=$.useCallback(()=>o.isPausedState,[o.isPausedState]);return $.useEffect(()=>{t?(o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!0})),f()),r()):(o.wasRunningBeforeError&&!o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!1})),m()),i())},[t,o.isRunning,o.wasRunningBeforeError,f,m,r,i]),$.useEffect(()=>{if(o.isRunning){const v=()=>{if(l.current){const w=(Date.now()-l.current)/1e3+c.current,E=w/60%1*100;s(S=>({...S,elapsedTime:Math.floor(w)})),Math.abs(E-u.current)>.1&&(d.setTarget([E]),u.current=E)}a.current=requestAnimationFrame(v)};a.current=requestAnimationFrame(v)}else a.current&&(cancelAnimationFrame(a.current),a.current=null);return()=>{a.current&&(cancelAnimationFrame(a.current),a.current=null)}},[o.isRunning,d]),$.useEffect(()=>{let v=null;const C=()=>{d.update(),v=requestAnimationFrame(C)};return v=requestAnimationFrame(C),()=>{v&&cancelAnimationFrame(v)}},[d]),{timerState:o,controls:{start:h,pause:f,resume:m,reset:p,isPaused:g}}},p5=y.externalizeComponent(ie.observer(({onTimerReady:e,autoStart:t=!0,variant:n="default",compact:r=!1,className:i,hasError:o=!1})=>{const{animationState:s,triggerPauseAnimation:a,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=h5(),{timerState:h,controls:f}=f5({autoStart:t,hasError:o,onPauseAnimation:a,onErrorAnimation:l,onClearErrorAnimation:c});return $.useEffect(()=>{u()},[u]),$.useEffect(()=>{let m=!0;const p=setTimeout(()=>{m&&e(f)},0);return()=>{m=!1,clearTimeout(p)}},[e,f]),$.useEffect(()=>d,[d]),n==="small"?y.jsxRuntimeExports.jsx(d5,{timerState:h,animationState:s,hasError:o,compact:r,className:i}):y.jsxRuntimeExports.jsx(u5,{timerState:h,animationState:s,hasError:o,className:i})})),hu=1e-4,m5={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class Pi{constructor(t,n,r,i,o,s,a,l,c,u){this.nova=t,this.controller=n,this.motionGroup=r,this.initialMotionState=i,this.motionStateSocket=o,this.isVirtual=s,this.tcps=a,this.description=l,this.initialControllerState=c,this.controllerStateSocket=u,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=i,this.controllerState=c,u.addEventListener("message",d=>{var f;const h=(f=Te.tryParseJson(d.data))==null?void 0:f.result;h&&he.runInAction(()=>{this.controllerState=h})}),o.addEventListener("message",d=>{var f;const h=(f=Te.tryParseJson(d.data))==null?void 0:f.result;if(!h)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${d.data}`);La(this.rapidlyChangingMotionState.joint_position,h.joint_position,hu)||he.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=h.joint_position}),Na(this.rapidlyChangingMotionState,h,hu)||he.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=h.tcp_pose}),this.rapidlyChangingMotionState.standstill!==h.standstill&&he.runInAction(()=>{this.rapidlyChangingMotionState.standstill=h.standstill})}),he.makeAutoObservable(this)}static async connectMultiple(t,n){return Promise.all(n.map(r=>Pi.connect(t,r)))}static async connect(t,n){var v,C;const[r,i]=n.split("@"),o=await t.api.controller.getCurrentRobotControllerState(i),s=o==null?void 0:o.motion_groups.find(w=>w.motion_group===n);if(!o||!s)throw new Error(`Controller ${i} or motion group ${n} not found`);const a=t.openReconnectingWebsocket(`/controllers/${i}/motion-groups/${n}/state-stream`),l=await a.firstMessage(),c=(v=Te.tryParseJson(l.data))==null?void 0:v.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${s.motion_group}. Initial state:
|
|
131
131
|
`,c);const d=(await t.api.controller.getRobotController(o.controller)).configuration.kind==="VirtualController",h=await t.api.motionGroup.getMotionGroupDescription(i,s.motion_group),f=Object.entries(h.tcps||{}).map(([w,E])=>({id:w,readable_name:E.name,position:E.pose.position,orientation:E.pose.orientation})),m=t.openReconnectingWebsocket(`/controllers/${o.controller}/state-stream?response_rate=1000`),p=await m.firstMessage(),g=(C=Te.tryParseJson(p.data))==null?void 0:C.result;if(!g)throw new Error(`Unable to parse initial controller state message ${p.data}`);return console.log(`Connected controller state websocket to controller ${o.controller}. Initial state:
|
|
132
|
-
`,g),new Pi(t,o,s,c,a,d,f,h,g,m)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(t=>({...p5,...t}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var t,n,r;return this.description.mounting?[(((t=this.description.mounting.position)==null?void 0:t[0])||0)/1e3,(((n=this.description.mounting.position)==null?void 0:n[1])||0)/1e3,(((r=this.description.mounting.position)==null?void 0:r[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var i,o,s,a,l,c;const t=new Ha.Vector3(((o=(i=this.description.mounting)==null?void 0:i.orientation)==null?void 0:o[0])||0,((a=(s=this.description.mounting)==null?void 0:s.orientation)==null?void 0:a[1])||0,((c=(l=this.description.mounting)==null?void 0:l.orientation)==null?void 0:c[2])||0),n=t.length(),r=t.normalize();return new Ha.Quaternion().setFromAxisAngle(r,n)}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}he.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),he.runInAction(()=>{this.activationState="inactive"})}catch(t){throw he.runInAction(()=>{this.activationState="active"}),t}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}he.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),he.runInAction(()=>{this.activationState="active"})}catch(t){throw he.runInAction(()=>{this.activationState="inactive"}),t}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}}function Yh(){var t,n,r,i,o,s,a;const e=R.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{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.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 ${e.palette.divider}`,background:(r=(n=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:n.tonal)==null?void 0:r.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(i=e.palette.backgroundPaperElevation)==null?void 0:i[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:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.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:e.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:e.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:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":R.rgbToHex(((a=e.palette.backgroundPaperElevation)==null?void 0:a[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function m5(){const e=Yh();return e.palette.mode="light",e}function g5(e){var r,i,o,s;let t=!0;((r=e.palette)==null?void 0:r.mode)==="light"?t=!1:((i=e.palette)==null?void 0:i.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const n=t?Yh():m5();return zu(n,e)}exports.AppHeader=_f;exports.ConnectedMotionGroup=Pi;exports.CycleTimer=jS;exports.JoggerConnection=xo;exports.JoggingCartesianAxisControl=_s;exports.JoggingJointRotationControl=yh;exports.JoggingPanel=xC;exports.JoggingStore=Eo;exports.LogPanel=_C;exports.LogStore=Uh;exports.LogViewer=Wh;exports.MotionStreamConnection=yo;exports.NoMotionGroupModal=RC;exports.PoseCartesianValues=vC;exports.PoseJointValues=SC;exports.RobotListItem=kC;exports.RobotSetupReadinessIndicator=Hh;exports.RobotSetupReadinessState=Wa;exports.SafetyBar=n5;exports.SelectableFab=i5;exports.TabBar=a5;exports.Timer=f5;exports.VelocitySlider=Bh;exports.VelocitySliderLabel=Ua;exports.WandelbotsDataGrid=ph;exports.createDebugMessage=wC;exports.createErrorMessage=CC;exports.createInfoMessage=EC;exports.createLogMessage=Or;exports.createNovaMuiTheme=g5;exports.createWarningMessage=TC;exports.jointValuesEqual=La;exports.poseEqual=xh;exports.tcpMotionEqual=Na;exports.unwrapRotationVector=bh;
|
|
133
|
-
//# sourceMappingURL=theming-
|
|
132
|
+
`,g),new Pi(t,o,s,c,a,d,f,h,g,m)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(t=>({...m5,...t}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var t,n,r;return this.description.mounting?[(((t=this.description.mounting.position)==null?void 0:t[0])||0)/1e3,(((n=this.description.mounting.position)==null?void 0:n[1])||0)/1e3,(((r=this.description.mounting.position)==null?void 0:r[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var i,o,s,a,l,c;const t=new Ha.Vector3(((o=(i=this.description.mounting)==null?void 0:i.orientation)==null?void 0:o[0])||0,((a=(s=this.description.mounting)==null?void 0:s.orientation)==null?void 0:a[1])||0,((c=(l=this.description.mounting)==null?void 0:l.orientation)==null?void 0:c[2])||0),n=t.length(),r=t.normalize();return new Ha.Quaternion().setFromAxisAngle(r,n)}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}he.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),he.runInAction(()=>{this.activationState="inactive"})}catch(t){throw he.runInAction(()=>{this.activationState="active"}),t}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}he.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),he.runInAction(()=>{this.activationState="active"})}catch(t){throw he.runInAction(()=>{this.activationState="inactive"}),t}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}}function Yh(){var t,n,r,i,o,s,a;const e=R.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{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.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 ${e.palette.divider}`,background:(r=(n=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:n.tonal)==null?void 0:r.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(i=e.palette.backgroundPaperElevation)==null?void 0:i[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:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.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:e.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:e.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:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":R.rgbToHex(((a=e.palette.backgroundPaperElevation)==null?void 0:a[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function g5(){const e=Yh();return e.palette.mode="light",e}function y5(e){var r,i,o,s;let t=!0;((r=e.palette)==null?void 0:r.mode)==="light"?t=!1:((i=e.palette)==null?void 0:i.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const n=t?Yh():g5();return zu(n,e)}exports.AppHeader=_f;exports.ConnectedMotionGroup=Pi;exports.CycleTimer=jS;exports.JoggerConnection=xo;exports.JoggingCartesianAxisControl=_s;exports.JoggingJointRotationControl=yh;exports.JoggingPanel=bC;exports.JoggingStore=Eo;exports.LogPanel=MC;exports.LogStore=Uh;exports.LogViewer=Wh;exports.MotionStreamConnection=yo;exports.NoMotionGroupModal=IC;exports.PoseCartesianValues=SC;exports.PoseJointValues=wC;exports.RobotListItem=OC;exports.RobotSetupReadinessIndicator=Hh;exports.RobotSetupReadinessState=Wa;exports.SafetyBar=r5;exports.SelectableFab=o5;exports.TabBar=l5;exports.Timer=p5;exports.VelocitySlider=Bh;exports.VelocitySliderLabel=Ua;exports.WandelbotsDataGrid=ph;exports.createDebugMessage=EC;exports.createErrorMessage=_C;exports.createInfoMessage=TC;exports.createLogMessage=Or;exports.createNovaMuiTheme=y5;exports.createWarningMessage=CC;exports.jointValuesEqual=La;exports.poseEqual=xh;exports.tcpMotionEqual=Na;exports.unwrapRotationVector=bh;
|
|
133
|
+
//# sourceMappingURL=theming-BQcKj8Gp.cjs.map
|