@wandelbots/wandelbots-js-react-components 1.17.6 → 1.17.7
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/components/jogging/JoggingCartesianTab.d.ts +3 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointTab.d.ts +3 -1
- package/dist/components/jogging/JoggingJointTab.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +149 -149
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/jogging/JoggingCartesianTab.tsx +20 -11
- package/src/components/jogging/JoggingJointTab.tsx +3 -2
- package/src/components/jogging/JoggingPanel.tsx +2 -4
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import type { JoggingStore } from "./JoggingStore";
|
|
2
|
-
export declare const JoggingCartesianTab: (({ store }: {
|
|
3
|
+
export declare const JoggingCartesianTab: (({ store, children }: {
|
|
3
4
|
store: JoggingStore;
|
|
5
|
+
children?: ReactNode;
|
|
4
6
|
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
5
7
|
displayName: string;
|
|
6
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoggingCartesianTab.d.ts","sourceRoot":"","sources":["../../../src/components/jogging/JoggingCartesianTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JoggingCartesianTab.d.ts","sourceRoot":"","sources":["../../../src/components/jogging/JoggingCartesianTab.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYtC,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAS3E,eAAO,MAAM,mBAAmB,yBACR;IAAE,KAAK,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE;;CAiPpE,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import type { JoggingStore } from "./JoggingStore";
|
|
2
|
-
export declare const JoggingJointTab: (({ store }: {
|
|
3
|
+
export declare const JoggingJointTab: (({ store, children }: {
|
|
3
4
|
store: JoggingStore;
|
|
5
|
+
children: ReactNode;
|
|
4
6
|
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
5
7
|
displayName: string;
|
|
6
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoggingJointTab.d.ts","sourceRoot":"","sources":["../../../src/components/jogging/JoggingJointTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JoggingJointTab.d.ts","sourceRoot":"","sources":["../../../src/components/jogging/JoggingJointTab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGlD,eAAO,MAAM,eAAe,yBACJ;IAAE,KAAK,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE;;CAqFnE,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -80,5 +80,5 @@ const theme2 = createTheme({ palette: {
|
|
|
80
80
|
} });`:Kr(12,g?` (${g})`:"",JSON.stringify(y.main)));return Ws(y,"light",j,r),Ws(y,"dark",C,r),y.contrastText||(y.contrastText=h(y.main)),y},v={dark:Fa,light:zs};return process.env.NODE_ENV!=="production"&&(v[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),et(A({common:A({},Xr),mode:t,primary:m({color:s,name:"primary"}),secondary:m({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:l,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:c,name:"success"}),grey:T0,contrastThreshold:n,getContrastText:h,augmentColor:m,tonalOffset:r},v[t]),a)}const D0=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function B0(e){return Math.round(e*1e5)/1e5}const Ks={textTransform:"uppercase"},Hs='"Roboto", "Helvetica", "Arial", sans-serif';function U0(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Hs,fontSize:a=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:h}=n,m=Be(n,D0);process.env.NODE_ENV!=="production"&&(typeof a!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const v=a/14,_=h||(x=>`${x/c*v}rem`),y=(x,j,C,L,R)=>A({fontFamily:r,fontWeight:x,fontSize:_(j),lineHeight:C},r===Hs?{letterSpacing:`${B0(L/j)}em`}:{},R,d),g={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(i,48,1.167,0),h4:y(i,34,1.235,.25),h5:y(i,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(i,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(i,16,1.5,.15),body2:y(i,14,1.43,.15),button:y(l,14,1.75,.4,Ks),caption:y(i,12,1.66,.4),overline:y(i,12,2.66,1,Ks),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return et(A({htmlFontSize:c,pxToRem:_,fontFamily:r,fontSize:a,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:l,fontWeightBold:u},g),m,{clone:!1})}const J0=.2,V0=.14,G0=.12;function me(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${J0})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${V0})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${G0})`].join(",")}const z0=["none",me(0,2,1,-1,0,1,1,0,0,1,3,0),me(0,3,1,-2,0,2,2,0,0,1,5,0),me(0,3,3,-2,0,3,4,0,0,1,8,0),me(0,2,4,-1,0,4,5,0,0,1,10,0),me(0,3,5,-1,0,5,8,0,0,1,14,0),me(0,3,5,-1,0,6,10,0,0,1,18,0),me(0,4,5,-2,0,7,10,1,0,2,16,1),me(0,5,5,-3,0,8,10,1,0,3,14,2),me(0,5,6,-3,0,9,12,1,0,3,16,2),me(0,6,6,-3,0,10,14,1,0,4,18,3),me(0,6,7,-4,0,11,15,1,0,4,20,3),me(0,7,8,-4,0,12,17,2,0,5,22,4),me(0,7,8,-4,0,13,19,2,0,5,24,4),me(0,7,9,-4,0,14,21,2,0,5,26,4),me(0,8,9,-5,0,15,22,2,0,6,28,5),me(0,8,10,-5,0,16,24,2,0,6,30,5),me(0,8,11,-5,0,17,26,2,0,6,32,5),me(0,9,11,-5,0,18,28,2,0,7,34,6),me(0,9,12,-6,0,19,29,2,0,7,36,6),me(0,10,13,-6,0,20,31,3,0,8,38,7),me(0,10,13,-6,0,21,33,3,0,8,40,7),me(0,10,14,-6,0,22,35,3,0,8,42,7),me(0,11,14,-7,0,23,36,3,0,9,44,8),me(0,11,15,-7,0,24,38,3,0,9,46,8)],W0=["duration","easing","delay"],K0={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},H0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function qs(e){return`${Math.round(e)}ms`}function q0(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function X0(e){const t=A({},K0,e.easing),n=A({},H0,e.duration);return A({getAutoHeightDuration:q0,create:(a=["all"],s={})=>{const{duration:i=n.standard,easing:l=t.easeInOut,delay:u=0}=s,c=Be(s,W0);if(process.env.NODE_ENV!=="production"){const d=m=>typeof m=="string",h=m=>!isNaN(parseFloat(m));!d(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(i)&&!d(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),d(l)||console.error('MUI: Argument "easing" must be a string.'),!h(u)&&!d(u)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
81
81
|
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(d=>`${d} ${typeof i=="string"?i:qs(i)} ${l} ${typeof u=="string"?u:qs(u)}`).join(",")}},e,{easing:t,duration:n})}const Y0={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Z0=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function uo(e={},...t){const{mixins:n={},palette:r={},transitions:a={},typography:s={}}=e,i=Be(e,Z0);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Kr(18));const l=F0(r),u=sn(e);let c=et(u,{mixins:y0(u.breakpoints,n),palette:l,shadows:z0.slice(),typography:U0(l,s),transitions:X0(a),zIndex:A({},Y0)});if(c=et(c,i),c=t.reduce((d,h)=>et(d,h),c),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(m,v)=>{let _;for(_ in m){const y=m[_];if(d.indexOf(_)!==-1&&Object.keys(y).length>0){if(process.env.NODE_ENV!=="production"){const g=ln("",_);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${_}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${g}' syntax:`,JSON.stringify({root:{[`&.${g}`]:y}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
82
82
|
`))}m[_]={}}}};Object.keys(c.components).forEach(m=>{const v=c.components[m].styleOverrides;v&&m.indexOf("Mui")===0&&h(v,m)})}return c.unstable_sxConfig=A({},an,i==null?void 0:i.unstable_sxConfig),c.unstable_sx=function(h){return on({sx:h,theme:this})},c}const Q0=uo(),ep="$$material";function No(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const tp=e=>No(e)&&e!=="classes",Ct=r0({themeId:ep,defaultTheme:Q0,rootShouldForwardProp:tp});process.env.NODE_ENV!=="production"&&(f.node,f.object.isRequired);function Fo(e){return Df(e)}const _r=Kf({createStyledComponent:Ct("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Fo({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(_r.propTypes={children:f.node,component:f.elementType,direction:f.oneOfType([f.oneOf(["column-reverse","column","row-reverse","row"]),f.arrayOf(f.oneOf(["column-reverse","column","row-reverse","row"])),f.object]),divider:f.node,spacing:f.oneOfType([f.arrayOf(f.oneOfType([f.number,f.string])),f.number,f.object,f.string]),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),useFlexGap:f.bool});const co=Qr(Ie.observer(({color:e,label:t,getDisplayedValue:n,startJogging:r,stopJogging:a,disabled:s,...i})=>{xr(()=>{const d=n(),h=l.current;h&&(h.textContent=d)});const l=Z.useRef(null);e=e||"#F14D42";function u(d){d.button===0&&r("-")}function c(d){d.button===0&&r("+")}return o.jsxs(_r,{height:"72px",direction:"row",...i,children:[o.jsx(M.Button,{onPointerDown:u,onPointerUp:a,onPointerOut:a,disabled:s,sx:{width:"105px",backgroundColor:e,color:"white",alignContent:"center",fontSize:"37px",borderRadius:"16px 0px 0px 16px",":hover":{color:"white",backgroundColor:e}},children:"-"}),o.jsxs(_r,{spacing:"6px",sx:{width:"184px",backgroundColor:e,alignItems:"center",justifyContent:"center",opacity:"0.9"},children:[o.jsx(_r,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:"white"},children:t}),o.jsx(M.Typography,{height:"22px",sx:{fontSize:"15px",color:"white"},ref:l,children:n()})]}),o.jsx(M.Button,{onPointerDown:c,onPointerUp:a,onPointerOut:a,disabled:s,sx:{width:"105px",backgroundColor:e,color:"white",alignContent:"center",fontSize:"37px",borderRadius:"0px 16px 16px 0px",":hover":{color:"white",backgroundColor:e}},children:"+"})]})}));var Do={},Da={};function rp(e){return ln("MuiSvgIcon",e)}Jl("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const np=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ap=e=>{const{color:t,fontSize:n,classes:r}=e,a={root:["root",t!=="inherit"&&`color${Ae(t)}`,`fontSize${Ae(n)}`]};return Eo(a,rp,r)},op=Ct("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ae(n.color)}`],t[`fontSize${Ae(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,a,s,i,l,u,c,d,h,m,v,_;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(a=e.transitions)==null||(a=a.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((l=e.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem",large:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}[t.fontSize],color:(h=(m=(e.vars||e).palette)==null||(m=m[t.color])==null?void 0:m.main)!=null?h:{action:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.active,disabled:(_=(e.vars||e).palette)==null||(_=_.action)==null?void 0:_.disabled,inherit:void 0}[t.color]}}),Gn=N.forwardRef(function(t,n){const r=Fo({props:t,name:"MuiSvgIcon"}),{children:a,className:s,color:i="inherit",component:l="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:h,viewBox:m="0 0 24 24"}=r,v=Be(r,np),_=N.isValidElement(a)&&a.type==="svg",y=A({},r,{color:i,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:m,hasSvgAsChild:_}),g={};d||(g.viewBox=m);const x=ap(y);return o.jsxs(op,A({as:l,className:gt(x.root,s),focusable:"false",color:c,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},g,v,_&&a.props,{ownerState:y,children:[_?a.props.children:a,h?o.jsx("title",{children:h}):null]}))});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),f.string]),component:f.elementType,fontSize:f.oneOfType([f.oneOf(["inherit","large","medium","small"]),f.string]),htmlColor:f.string,inheritViewBox:f.bool,shapeRendering:f.string,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),titleAccess:f.string,viewBox:f.string});Gn.muiName="SvgIcon";function sp(e,t){function n(r,a){return o.jsx(Gn,A({"data-testid":`${t}Icon`,ref:a},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Gn.muiName,N.memo(N.forwardRef(n))}const ip={configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
83
|
-
`)),Bl.configure(e)}},lp=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Ae,createChainedFunction:ff,createSvgIcon:sp,debounce:pf,deprecatedPropType:gf,isMuiElement:yf,ownerDocument:yr,ownerWindow:_f,requirePropFactory:vf,setRef:Wl,unstable_ClassNameGenerator:ip,unstable_useEnhancedEffect:Mo,unstable_useId:Sf,unsupportedProp:xf,useControlled:Kl,useEventCallback:On,useForkRef:Jn,useIsFocusVisible:Hl},Symbol.toStringTag,{value:"Module"})),up=Rt(lp);var Xs;function nu(){return Xs||(Xs=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=up}(Da)),Da}var cp=ha;Object.defineProperty(Do,"__esModule",{value:!0});var au=Do.default=void 0,dp=cp(nu()),mp=o;au=Do.default=(0,dp.default)((0,mp.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Bo={},hp=ha;Object.defineProperty(Bo,"__esModule",{value:!0});var ou=Bo.default=void 0,fp=hp(nu()),pp=o;ou=Bo.default=(0,fp.default)((0,pp.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function qt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var su=typeof global=="object"&&global&&global.Object===Object&&global,gp=typeof self=="object"&&self&&self.Object===Object&&self,_t=su||gp||Function("return this")(),Ba=function(){return _t.Date.now()},yp=/\s/;function _p(e){for(var t=e.length;t--&&yp.test(e.charAt(t)););return t}var vp=/^\s+/;function bp(e){return e&&e.slice(0,_p(e)+1).replace(vp,"")}var Nt=_t.Symbol,iu=Object.prototype,Sp=iu.hasOwnProperty,xp=iu.toString,Br=Nt?Nt.toStringTag:void 0;function wp(e){var t=Sp.call(e,Br),n=e[Br];try{e[Br]=void 0;var r=!0}catch{}var a=xp.call(e);return r&&(t?e[Br]=n:delete e[Br]),a}var jp=Object.prototype,Rp=jp.toString;function Cp(e){return Rp.call(e)}var Ap="[object Null]",Pp="[object Undefined]",Ys=Nt?Nt.toStringTag:void 0;function Zt(e){return e==null?e===void 0?Pp:Ap:Ys&&Ys in Object(e)?wp(e):Cp(e)}function Xt(e){return e!=null&&typeof e=="object"}var Op="[object Symbol]";function fa(e){return typeof e=="symbol"||Xt(e)&&Zt(e)==Op}var Zs=NaN,Tp=/^[-+]0x[0-9a-f]+$/i,Mp=/^0b[01]+$/i,Ip=/^0o[0-7]+$/i,Ep=parseInt;function Qs(e){if(typeof e=="number")return e;if(fa(e))return Zs;if(qt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=bp(e);var n=Mp.test(e);return n||Ip.test(e)?Ep(e.slice(2),n?2:8):Tp.test(e)?Zs:+e}var kp="Expected a function",Lp=Math.max,$p=Math.min;function Np(e,t,n){var r,a,s,i,l,u,c=0,d=!1,h=!1,m=!0;if(typeof e!="function")throw new TypeError(kp);t=Qs(t)||0,qt(n)&&(d=!!n.leading,h="maxWait"in n,s=h?Lp(Qs(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m);function v(P){var O=r,z=a;return r=a=void 0,c=P,i=e.apply(z,O),i}function _(P){return c=P,l=setTimeout(x,t),d?v(P):i}function y(P){var O=P-u,z=P-c,le=t-O;return h?$p(le,s-z):le}function g(P){var O=P-u,z=P-c;return u===void 0||O>=t||O<0||h&&z>=s}function x(){var P=Ba();if(g(P))return j(P);l=setTimeout(x,y(P))}function j(P){return l=void 0,m&&r?v(P):(r=a=void 0,i)}function C(){l!==void 0&&clearTimeout(l),c=0,r=u=a=l=void 0}function L(){return l===void 0?i:j(Ba())}function R(){var P=Ba(),O=g(P);if(r=arguments,a=this,u=P,O){if(l===void 0)return _(u);if(h)return clearTimeout(l),l=setTimeout(x,t),v(u)}return l===void 0&&(l=setTimeout(x,t)),i}return R.cancel=C,R.flush=L,R}var Fp="Expected a function";function Dp(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Fp);return qt(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Np(e,t,{leading:r,maxWait:t,trailing:a})}const lu=Qr(Ie.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:n,upperLimitDegs:r,getValueDegs:a,disabled:s,...i})=>{const{t:l}=Ft.useTranslation(),[u,c]=Z.useState(),d=Ie.useLocalObservable(()=>({activeJoggingDir:null,startJogging(x){this.activeJoggingDir=x,e(x)},stopJogging(){this.activeJoggingDir=null,t()}})),h=Dp(()=>{c(a())},50);xr(h);function m(x){x.button===0&&d.startJogging("-")}function v(x){x.button===0&&d.startJogging("+")}function _(x){d.stopJogging()}function y(x){x.target===x.currentTarget&&d.stopJogging()}function g(x,j=1){if(x===void 0||isNaN(x))return"";const C=l("General.degree.variable",{amount:x.toFixed(j)});return x>0&&j===0?`+${C}`:C}return o.jsxs(_r,{height:"64px",width:"100%",maxWidth:"300px",direction:"row",...i,sx:{"& .MuiIconButton-root":{width:"52px",color:"white",alignContent:"center",backgroundColor:"#38445A","&:disabled":{opacity:.5,backgroundColor:"#38445A"},"& svg":{width:"42px",height:"42px"}}},children:[o.jsx(M.IconButton,{onPointerDown:m,onPointerUp:_,onPointerOut:y,disabled:s,sx:{borderRadius:"16px 0px 0px 16px",backgroundColor:d.activeJoggingDir==="-"?"#495975":void 0},children:o.jsx(au,{})}),o.jsxs(_r,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:"4px",borderBottomWidth:"4px",backgroundColor:"#38445A",borderColor:"#38445A",paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[o.jsx(M.Typography,{sx:{fontSize:"15px",position:"relative",top:"5px",color:"white"},children:g(u)}),o.jsx(M.Slider,{disabled:!0,"aria-label":"Joint position",min:n,max:r,value:u||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"10px",borderRadius:"2px"},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:"white"},"& .MuiSlider-rail":{backgroundColor:"#1F283A",opacity:1}},marks:n!==void 0&&r!==void 0&&[{value:n,label:g(n,0)},{value:r,label:g(r,0)}]})]}),o.jsx(M.IconButton,{onPointerDown:v,onPointerUp:_,onPointerOut:y,disabled:s,sx:{borderRadius:"0px 16px 16px 0px",backgroundColor:d.activeJoggingDir==="+"?"#495975 !important":"#38445A"},children:o.jsx(ou,{})})]})})),Bp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.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"})),Up=Z.forwardRef(Bp),Jp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.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"})),Vp=Z.forwardRef(Jp),Gp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.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"})),zp=Z.forwardRef(Gp),Wp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:1.5,d:"M18.5 12a6 6 0 1 0-6 6"}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m16.5 11 2 2.5 2-2.5"})),Kp=Z.forwardRef(Wp),ei=e=>o.jsx(M.Stack,{position:"absolute",left:0,top:0,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(1px)",zIndex:100,...e.sx||{}},..._o.omit(e,"sx")}),uu=Ie.observer(({store:e,children:t})=>{const{t:n}=Ft.useTranslation();function r(){if(e.activationState==="inactive"&&!e.activationError)return o.jsx(ei,{sx:{borderRadius:"6px"},children:o.jsx(M.Button,{color:"primary",variant:"contained",onClick:()=>e.activate({manual:!0}),disabled:e.isLocked,children:n("Jogging.Activate.bt")})});if(e.activationState==="loading"||e.activationError)return o.jsx(ei,{children:o.jsx(Qn,{message:n("Jogging.Activating.lb"),error:e.activationError})})}return o.jsxs(M.Stack,{sx:{position:"relative",padding:"6px"},children:[r(),t]})}),cu=Z.forwardRef(({label:e,value:t},n)=>o.jsxs(o.Fragment,{children:[e&&o.jsx(M.InputLabel,{children:e}),o.jsx(M.Chip,{ref:n,sx:{fontSize:"14px",opacity:.8,marginTop:"4px !important"},value:t})]})),Hp=Ie.observer(({store:e})=>{const t=Z.useRef(null);function n(){const r=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose;return r?$t.poseToWandelscriptString(r):""}return xr(()=>{t.current&&(t.current.textContent=n())}),o.jsx(M.Stack,{alignItems:"left",spacing:2,sx:{padding:"8px 16px",paddingTop:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:o.jsx(cu,{label:"Pose",value:n(),ref:t})})});function qp(){this.__data__=[],this.size=0}function du(e,t){return e===t||e!==e&&t!==t}function pa(e,t){for(var n=e.length;n--;)if(du(e[n][0],t))return n;return-1}var Xp=Array.prototype,Yp=Xp.splice;function Zp(e){var t=this.__data__,n=pa(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Yp.call(t,n,1),--this.size,!0}function Qp(e){var t=this.__data__,n=pa(t,e);return n<0?void 0:t[n][1]}function eg(e){return pa(this.__data__,e)>-1}function tg(e,t){var n=this.__data__,r=pa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function At(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])}}At.prototype.clear=qp;At.prototype.delete=Zp;At.prototype.get=Qp;At.prototype.has=eg;At.prototype.set=tg;function rg(){this.__data__=new At,this.size=0}function ng(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ag(e){return this.__data__.get(e)}function og(e){return this.__data__.has(e)}var sg="[object AsyncFunction]",ig="[object Function]",lg="[object GeneratorFunction]",ug="[object Proxy]";function mu(e){if(!qt(e))return!1;var t=Zt(e);return t==ig||t==lg||t==sg||t==ug}var Ua=_t["__core-js_shared__"],ti=function(){var e=/[^.]+$/.exec(Ua&&Ua.keys&&Ua.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function cg(e){return!!ti&&ti in e}var dg=Function.prototype,mg=dg.toString;function Qt(e){if(e!=null){try{return mg.call(e)}catch{}try{return e+""}catch{}}return""}var hg=/[\\^$.*+?()[\]{}|]/g,fg=/^\[object .+?Constructor\]$/,pg=Function.prototype,gg=Object.prototype,yg=pg.toString,_g=gg.hasOwnProperty,vg=RegExp("^"+yg.call(_g).replace(hg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bg(e){if(!qt(e)||cg(e))return!1;var t=mu(e)?vg:fg;return t.test(Qt(e))}function Sg(e,t){return e==null?void 0:e[t]}function er(e,t){var n=Sg(e,t);return bg(n)?n:void 0}var Yr=er(_t,"Map"),Zr=er(Object,"create");function xg(){this.__data__=Zr?Zr(null):{},this.size=0}function wg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jg="__lodash_hash_undefined__",Rg=Object.prototype,Cg=Rg.hasOwnProperty;function Ag(e){var t=this.__data__;if(Zr){var n=t[e];return n===jg?void 0:n}return Cg.call(t,e)?t[e]:void 0}var Pg=Object.prototype,Og=Pg.hasOwnProperty;function Tg(e){var t=this.__data__;return Zr?t[e]!==void 0:Og.call(t,e)}var Mg="__lodash_hash_undefined__";function Ig(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Zr&&t===void 0?Mg:t,this}function Yt(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])}}Yt.prototype.clear=xg;Yt.prototype.delete=wg;Yt.prototype.get=Ag;Yt.prototype.has=Tg;Yt.prototype.set=Ig;function Eg(){this.size=0,this.__data__={hash:new Yt,map:new(Yr||At),string:new Yt}}function kg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ga(e,t){var n=e.__data__;return kg(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Lg(e){var t=ga(this,e).delete(e);return this.size-=t?1:0,t}function $g(e){return ga(this,e).get(e)}function Ng(e){return ga(this,e).has(e)}function Fg(e,t){var n=ga(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,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=Eg;Pt.prototype.delete=Lg;Pt.prototype.get=$g;Pt.prototype.has=Ng;Pt.prototype.set=Fg;var Dg=200;function Bg(e,t){var n=this.__data__;if(n instanceof At){var r=n.__data__;if(!Yr||r.length<Dg-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pt(r)}return n.set(e,t),this.size=n.size,this}function jt(e){var t=this.__data__=new At(e);this.size=t.size}jt.prototype.clear=rg;jt.prototype.delete=ng;jt.prototype.get=ag;jt.prototype.has=og;jt.prototype.set=Bg;var Ug="__lodash_hash_undefined__";function Jg(e){return this.__data__.set(e,Ug),this}function Vg(e){return this.__data__.has(e)}function zn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Pt;++t<n;)this.add(e[t])}zn.prototype.add=zn.prototype.push=Jg;zn.prototype.has=Vg;function Gg(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 zg(e,t){return e.has(t)}var Wg=1,Kg=2;function hu(e,t,n,r,a,s){var i=n&Wg,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,m=!0,v=n&Kg?new zn:void 0;for(s.set(e,t),s.set(t,e);++h<l;){var _=e[h],y=t[h];if(r)var g=i?r(y,_,h,t,e,s):r(_,y,h,e,t,s);if(g!==void 0){if(g)continue;m=!1;break}if(v){if(!Gg(t,function(x,j){if(!zg(v,j)&&(_===x||a(_,x,n,r,s)))return v.push(j)})){m=!1;break}}else if(!(_===y||a(_,y,n,r,s))){m=!1;break}}return s.delete(e),s.delete(t),m}var ri=_t.Uint8Array;function Hg(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}function qg(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Xg=1,Yg=2,Zg="[object Boolean]",Qg="[object Date]",ey="[object Error]",ty="[object Map]",ry="[object Number]",ny="[object RegExp]",ay="[object Set]",oy="[object String]",sy="[object Symbol]",iy="[object ArrayBuffer]",ly="[object DataView]",ni=Nt?Nt.prototype:void 0,Ja=ni?ni.valueOf:void 0;function uy(e,t,n,r,a,s,i){switch(n){case ly:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case iy:return!(e.byteLength!=t.byteLength||!s(new ri(e),new ri(t)));case Zg:case Qg:case ry:return du(+e,+t);case ey:return e.name==t.name&&e.message==t.message;case ny:case oy:return e==t+"";case ty:var l=Hg;case ay:var u=r&Xg;if(l||(l=qg),e.size!=t.size&&!u)return!1;var c=i.get(e);if(c)return c==t;r|=Yg,i.set(e,t);var d=hu(l(e),l(t),r,a,s,i);return i.delete(e),d;case sy:if(Ja)return Ja.call(e)==Ja.call(t)}return!1}function cy(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var yt=Array.isArray;function dy(e,t,n){var r=t(e);return yt(e)?r:cy(r,n(e))}function my(e,t){for(var n=-1,r=e==null?0:e.length,a=0,s=[];++n<r;){var i=e[n];t(i,n,e)&&(s[a++]=i)}return s}function hy(){return[]}var fy=Object.prototype,py=fy.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,gy=ai?function(e){return e==null?[]:(e=Object(e),my(ai(e),function(t){return py.call(e,t)}))}:hy;function yy(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var _y="[object Arguments]";function oi(e){return Xt(e)&&Zt(e)==_y}var fu=Object.prototype,vy=fu.hasOwnProperty,by=fu.propertyIsEnumerable,pu=oi(function(){return arguments}())?oi:function(e){return Xt(e)&&vy.call(e,"callee")&&!by.call(e,"callee")};function Sy(){return!1}var gu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,si=gu&&typeof module=="object"&&module&&!module.nodeType&&module,xy=si&&si.exports===gu,ii=xy?_t.Buffer:void 0,wy=ii?ii.isBuffer:void 0,mo=wy||Sy,jy=9007199254740991,Ry=/^(?:0|[1-9]\d*)$/;function yu(e,t){var n=typeof e;return t=t??jy,!!t&&(n=="number"||n!="symbol"&&Ry.test(e))&&e>-1&&e%1==0&&e<t}var Cy=9007199254740991;function Uo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cy}var Ay="[object Arguments]",Py="[object Array]",Oy="[object Boolean]",Ty="[object Date]",My="[object Error]",Iy="[object Function]",Ey="[object Map]",ky="[object Number]",Ly="[object Object]",$y="[object RegExp]",Ny="[object Set]",Fy="[object String]",Dy="[object WeakMap]",By="[object ArrayBuffer]",Uy="[object DataView]",Jy="[object Float32Array]",Vy="[object Float64Array]",Gy="[object Int8Array]",zy="[object Int16Array]",Wy="[object Int32Array]",Ky="[object Uint8Array]",Hy="[object Uint8ClampedArray]",qy="[object Uint16Array]",Xy="[object Uint32Array]",de={};de[Jy]=de[Vy]=de[Gy]=de[zy]=de[Wy]=de[Ky]=de[Hy]=de[qy]=de[Xy]=!0;de[Ay]=de[Py]=de[By]=de[Oy]=de[Uy]=de[Ty]=de[My]=de[Iy]=de[Ey]=de[ky]=de[Ly]=de[$y]=de[Ny]=de[Fy]=de[Dy]=!1;function Yy(e){return Xt(e)&&Uo(e.length)&&!!de[Zt(e)]}function Zy(e){return function(t){return e(t)}}var _u=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=_u&&typeof module=="object"&&module&&!module.nodeType&&module,Qy=Gr&&Gr.exports===_u,Va=Qy&&su.process,li=function(){try{var e=Gr&&Gr.require&&Gr.require("util").types;return e||Va&&Va.binding&&Va.binding("util")}catch{}}(),ui=li&&li.isTypedArray,vu=ui?Zy(ui):Yy,e1=Object.prototype,t1=e1.hasOwnProperty;function r1(e,t){var n=yt(e),r=!n&&pu(e),a=!n&&!r&&mo(e),s=!n&&!r&&!a&&vu(e),i=n||r||a||s,l=i?yy(e.length,String):[],u=l.length;for(var c in e)t1.call(e,c)&&!(i&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||yu(c,u)))&&l.push(c);return l}var n1=Object.prototype;function a1(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||n1;return e===n}function o1(e,t){return function(n){return e(t(n))}}var s1=o1(Object.keys,Object),i1=Object.prototype,l1=i1.hasOwnProperty;function u1(e){if(!a1(e))return s1(e);var t=[];for(var n in Object(e))l1.call(e,n)&&n!="constructor"&&t.push(n);return t}function bu(e){return e!=null&&Uo(e.length)&&!mu(e)}function Jo(e){return bu(e)?r1(e):u1(e)}function ci(e){return dy(e,Jo,gy)}var c1=1,d1=Object.prototype,m1=d1.hasOwnProperty;function h1(e,t,n,r,a,s){var i=n&c1,l=ci(e),u=l.length,c=ci(t),d=c.length;if(u!=d&&!i)return!1;for(var h=u;h--;){var m=l[h];if(!(i?m in t:m1.call(t,m)))return!1}var v=s.get(e),_=s.get(t);if(v&&_)return v==t&&_==e;var y=!0;s.set(e,t),s.set(t,e);for(var g=i;++h<u;){m=l[h];var x=e[m],j=t[m];if(r)var C=i?r(j,x,m,t,e,s):r(x,j,m,e,t,s);if(!(C===void 0?x===j||a(x,j,n,r,s):C)){y=!1;break}g||(g=m=="constructor")}if(y&&!g){var L=e.constructor,R=t.constructor;L!=R&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(y=!1)}return s.delete(e),s.delete(t),y}var ho=er(_t,"DataView"),fo=er(_t,"Promise"),po=er(_t,"Set"),go=er(_t,"WeakMap"),di="[object Map]",f1="[object Object]",mi="[object Promise]",hi="[object Set]",fi="[object WeakMap]",pi="[object DataView]",p1=Qt(ho),g1=Qt(Yr),y1=Qt(fo),_1=Qt(po),v1=Qt(go),Lt=Zt;(ho&&Lt(new ho(new ArrayBuffer(1)))!=pi||Yr&&Lt(new Yr)!=di||fo&&Lt(fo.resolve())!=mi||po&&Lt(new po)!=hi||go&&Lt(new go)!=fi)&&(Lt=function(e){var t=Zt(e),n=t==f1?e.constructor:void 0,r=n?Qt(n):"";if(r)switch(r){case p1:return pi;case g1:return di;case y1:return mi;case _1:return hi;case v1:return fi}return t});var b1=1,gi="[object Arguments]",yi="[object Array]",yn="[object Object]",S1=Object.prototype,_i=S1.hasOwnProperty;function x1(e,t,n,r,a,s){var i=yt(e),l=yt(t),u=i?yi:Lt(e),c=l?yi:Lt(t);u=u==gi?yn:u,c=c==gi?yn:c;var d=u==yn,h=c==yn,m=u==c;if(m&&mo(e)){if(!mo(t))return!1;i=!0,d=!1}if(m&&!d)return s||(s=new jt),i||vu(e)?hu(e,t,n,r,a,s):uy(e,t,u,n,r,a,s);if(!(n&b1)){var v=d&&_i.call(e,"__wrapped__"),_=h&&_i.call(t,"__wrapped__");if(v||_){var y=v?e.value():e,g=_?t.value():t;return s||(s=new jt),a(y,g,n,r,s)}}return m?(s||(s=new jt),h1(e,t,n,r,a,s)):!1}function ya(e,t,n,r,a){return e===t?!0:e==null||t==null||!Xt(e)&&!Xt(t)?e!==e&&t!==t:x1(e,t,n,r,ya,a)}function w1(e,t){return ya(e,t)}const Su=({store:e})=>{const{t}=Ft.useTranslation(),[n,r]=Z.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=Z.useRef(n);xr(()=>{const i=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;w1(a.current,i)||(a.current=i,r(i))});const s=[];for(const[i,l]of n.entries())l&&s.push(i);return o.jsx(M.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(i=>i+1).join(", ")})})},j1=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:21,height:21,fill:"none",viewBox:"0 0 23 22",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"m21.71 16.262-1.09.346.66 2.071-2.923-1.461V9.857l-6.285-3.143V2.893L13.38 4.21l.812-.806-2.674-2.69-2.706 2.687.805.812L10.93 2.91v3.803L4.643 9.857v7.36l-2.914 1.458.657-2.067-1.09-.346-1.225 3.88 3.826 1.144.346-1.09-1.836-.583 2.874-1.436 6.22 3.109 6.217-3.11 2.877 1.439-1.831.581.345 1.09 3.82-1.143zM11.5 12.646l-4.94-2.47 4.94-2.47 4.94 2.47zm.572.993 5.143-2.572v6.083l-5.143 2.572zm-6.286-2.572 5.143 2.572v6.083L5.786 17.15z"})),R1=Z.forwardRef(j1),C1=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:17,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"M12.9 7.667c-.133-.534-.533-1-1-1.134L10.367 6l-.4 1.267L11.5 7.8c.067 0 .133.067.133.2l1.067 4.867a.32.32 0 0 1-.133.4l-2.267 1.8c-.267.2-.333.666-.133.933s.666.333.933.133l2.267-1.8c.533-.4.733-1.133.6-1.733zM12.5 0H1.833A1.65 1.65 0 0 0 .167 1.667v1.4c0 .866.733 1.6 1.666 1.6h10.734c.866 0 1.6-.734 1.6-1.667V1.667A1.65 1.65 0 0 0 12.5 0M1.633 12.8 2.7 8c0-.067.067-.133.133-.2l1.534-.533-.4-1.2-1.534.466c-.533.2-.933.6-1 1.134L.367 12.533c-.134.667.066 1.334.6 1.734l2.266 1.8c.267.266.734.2.934-.067s.2-.733-.134-.933l-2.266-1.8c-.134-.134-.2-.267-.134-.467"})),A1=Z.forwardRef(C1),P1=Ie.observer(({store:e})=>{var r;const{t}=Ft.useTranslation();function n(a,s){(s==="coordsys"||s==="tool")&&e.setSelectedOrientation(s)}return o.jsxs(o.Fragment,{children:[o.jsxs(M.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"6px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[o.jsxs(M.Stack,{width:"50%",children:[o.jsx(M.InputLabel,{id:"jogging-coord-select",children:"Coordinate Sys."}),o.jsx(M.Select,{labelId:"jogging-coord-select",value:e.selectedCoordSystemId,displayEmpty:!0,onChange:a=>{e.setSelectedCoordSystemId(a.target.value)},disabled:e.isLocked,children:e.coordSystems.map(a=>o.jsx(M.MenuItem,{value:a.coordinate_system,children:a.name||a.coordinate_system},a.coordinate_system))})]}),o.jsxs(M.Stack,{width:"50%",children:[o.jsx(M.InputLabel,{id:"jogging-tcp-select",children:"TCP"}),o.jsx(M.Select,{labelId:"jogging-tcp-select",value:e.selectedTcpId,onChange:a=>{e.setSelectedTcpId(a.target.value)},disabled:e.isLocked,children:e.tcps.map(a=>o.jsx(M.MenuItem,{value:a.id,children:a.id},a.id))})]})]}),o.jsxs(M.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"6px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[o.jsxs(M.Stack,{width:"35%",children:[o.jsx(M.InputLabel,{id:"orientation-select",children:t("Jogging.Cartesian.Orientation.lb")}),o.jsxs(M.ToggleButtonGroup,{value:e.selectedOrientation,onChange:n,exclusive:!0,"aria-labelledby":"orientation-select",disabled:e.isLocked,children:[o.jsx(M.ToggleButton,{value:"coordsys",children:o.jsx(R1,{})}),o.jsx(M.ToggleButton,{value:"tool",children:o.jsx(A1,{})})]})]}),o.jsxs(M.Stack,{width:"65%",children:[o.jsx(M.InputLabel,{id:"jogging-increment-select",children:"Increment"}),o.jsxs(M.Select,{labelId:"jogging-increment-select",value:((r=e.activeDiscreteIncrement)==null?void 0:r.id)||"continuous",onChange:a=>{e.setSelectedIncrementId(a.target.value)},disabled:e.isLocked,children:[o.jsx(M.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(a=>o.jsx(M.MenuItem,{value:a.id,children:e.currentMotionType==="translate"?`${a.mm}mm`:`${a.degrees}°`},a.id))]})]})]})]})});function O1(e,t,n=(r,a)=>r===a){return e.length===t.length&&e.every((r,a)=>n(r,t[a]))}const T1=2;function xu(e,t){return e-t}function vi(e,t){var n;const{index:r}=(n=e.reduce((a,s,i)=>{const l=Math.abs(t-s);return a===null||l<a.distance||l===a.distance?{distance:l,index:i}:a},null))!=null?n:{};return r}function _n(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const a=n.changedTouches[r];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Wn(e,t,n){return(e-t)*100/(n-t)}function M1(e,t,n){return(n-t)*e+t}function I1(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 E1(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(I1(t)))}function bi({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(xu)}function vn({sliderRef:e,activeIndex:t,setActive:n}){var r,a;const s=yr(e.current);if(!((r=e.current)!=null&&r.contains(s.activeElement))||Number(s==null||(a=s.activeElement)==null?void 0:a.getAttribute("data-index"))!==t){var i;(i=e.current)==null||i.querySelector(`[type="range"][data-index="${t}"]`).focus()}n&&n(t)}function bn(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?O1(e,t):!1}const k1={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}%`})}},L1=e=>e;let Sn;function Si(){return Sn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Sn=CSS.supports("touch-action","none"):Sn=!0),Sn}function $1(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:a=!1,isRtl:s=!1,marks:i=!1,max:l=100,min:u=0,name:c,onChange:d,onChangeCommitted:h,orientation:m="horizontal",rootRef:v,scale:_=L1,step:y=1,shiftStep:g=10,tabIndex:x,value:j}=e,C=N.useRef(),[L,R]=N.useState(-1),[P,O]=N.useState(-1),[z,le]=N.useState(!1),ce=N.useRef(0),[D,q]=Kl({controlled:j,default:n??u,name:"Slider"}),G=d&&((T,k,F)=>{const W=T.nativeEvent||T,Y=new W.constructor(W.type,W);Object.defineProperty(Y,"target",{writable:!0,value:{value:k,name:c}}),d(Y,k,F)}),X=Array.isArray(D);let H=X?D.slice().sort(xu):[D];H=H.map(T=>T==null?u:hr(T,u,l));const xe=i===!0&&y!==null?[...Array(Math.floor((l-u)/y)+1)].map((T,k)=>({value:u+y*k})):i||[],ue=xe.map(T=>T.value),{isFocusVisibleRef:Q,onBlur:Re,onFocus:Ee,ref:nt}=Hl(),[vt,Ke]=N.useState(-1),we=N.useRef(),Ot=Jn(nt,we),lt=Jn(v,Ot),He=T=>k=>{var F;const W=Number(k.currentTarget.getAttribute("data-index"));Ee(k),Q.current===!0&&Ke(W),O(W),T==null||(F=T.onFocus)==null||F.call(T,k)},Ue=T=>k=>{var F;Re(k),Q.current===!1&&Ke(-1),O(-1),T==null||(F=T.onBlur)==null||F.call(T,k)},ut=(T,k)=>{const F=Number(T.currentTarget.getAttribute("data-index")),W=H[F],Y=ue.indexOf(W);let K=k;if(xe&&y==null){const Ve=ue[ue.length-1];K>Ve?K=Ve:K<ue[0]?K=ue[0]:K=K<W?ue[Y-1]:ue[Y+1]}if(K=hr(K,u,l),X){a&&(K=hr(K,H[F-1]||-1/0,H[F+1]||1/0));const Ve=K;K=bi({values:H,newValue:K,index:F});let qe=F;a||(qe=K.indexOf(Ve)),vn({sliderRef:we,activeIndex:qe})}q(K),Ke(F),G&&!bn(K,D)&&G(T,K,F),h&&h(T,K)},ct=T=>k=>{var F;if(y!==null){const W=Number(k.currentTarget.getAttribute("data-index")),Y=H[W];let K=null;(k.key==="ArrowLeft"||k.key==="ArrowDown")&&k.shiftKey||k.key==="PageDown"?K=Math.max(Y-g,u):((k.key==="ArrowRight"||k.key==="ArrowUp")&&k.shiftKey||k.key==="PageUp")&&(K=Math.min(Y+g,l)),K!==null&&(ut(k,K),k.preventDefault())}T==null||(F=T.onKeyDown)==null||F.call(T,k)};Mo(()=>{if(r&&we.current.contains(document.activeElement)){var T;(T=document.activeElement)==null||T.blur()}},[r]),r&&L!==-1&&R(-1),r&&vt!==-1&&Ke(-1);const Bt=T=>k=>{var F;(F=T.onChange)==null||F.call(T,k),ut(k,k.target.valueAsNumber)},bt=N.useRef();let Je=m;s&&m==="horizontal"&&(Je+="-reverse");const I=({finger:T,move:k=!1})=>{const{current:F}=we,{width:W,height:Y,bottom:K,left:Ve}=F.getBoundingClientRect();let qe;Je.indexOf("vertical")===0?qe=(K-T.y)/Y:qe=(T.x-Ve)/W,Je.indexOf("-reverse")!==-1&&(qe=1-qe);let te;if(te=M1(qe,u,l),y)te=E1(te,y,u);else{const It=vi(ue,te);te=ue[It]}te=hr(te,u,l);let $e=0;if(X){k?$e=bt.current:$e=vi(H,te),a&&(te=hr(te,H[$e-1]||-1/0,H[$e+1]||1/0));const It=te;te=bi({values:H,newValue:te,index:$e}),a&&k||($e=te.indexOf(It),bt.current=$e)}return{newValue:te,activeIndex:$e}},ee=On(T=>{const k=_n(T,C);if(!k)return;if(ce.current+=1,T.type==="mousemove"&&T.buttons===0){he(T);return}const{newValue:F,activeIndex:W}=I({finger:k,move:!0});vn({sliderRef:we,activeIndex:W,setActive:R}),q(F),!z&&ce.current>T1&&le(!0),G&&!bn(F,D)&&G(T,F,W)}),he=On(T=>{const k=_n(T,C);if(le(!1),!k)return;const{newValue:F}=I({finger:k,move:!0});R(-1),T.type==="touchend"&&O(-1),h&&h(T,F),C.current=void 0,Le()}),ke=On(T=>{if(r)return;Si()||T.preventDefault();const k=T.changedTouches[0];k!=null&&(C.current=k.identifier);const F=_n(T,C);if(F!==!1){const{newValue:Y,activeIndex:K}=I({finger:F});vn({sliderRef:we,activeIndex:K,setActive:R}),q(Y),G&&!bn(Y,D)&&G(T,Y,K)}ce.current=0;const W=yr(we.current);W.addEventListener("touchmove",ee,{passive:!0}),W.addEventListener("touchend",he,{passive:!0})}),Le=N.useCallback(()=>{const T=yr(we.current);T.removeEventListener("mousemove",ee),T.removeEventListener("mouseup",he),T.removeEventListener("touchmove",ee),T.removeEventListener("touchend",he)},[he,ee]);N.useEffect(()=>{const{current:T}=we;return T.addEventListener("touchstart",ke,{passive:Si()}),()=>{T.removeEventListener("touchstart",ke),Le()}},[Le,ke]),N.useEffect(()=>{r&&Le()},[r,Le]);const Tt=T=>k=>{var F;if((F=T.onMouseDown)==null||F.call(T,k),r||k.defaultPrevented||k.button!==0)return;k.preventDefault();const W=_n(k,C);if(W!==!1){const{newValue:K,activeIndex:Ve}=I({finger:W});vn({sliderRef:we,activeIndex:Ve,setActive:R}),q(K),G&&!bn(K,D)&&G(k,K,Ve)}ce.current=0;const Y=yr(we.current);Y.addEventListener("mousemove",ee,{passive:!0}),Y.addEventListener("mouseup",he)},je=Wn(X?H[0]:u,u,l),Mt=Wn(H[H.length-1],u,l)-je,Ut=(T={})=>{const k=Tn(T),F={onMouseDown:Tt(k||{})},W=A({},k,F);return A({},T,{ref:lt},W)},Cr=T=>k=>{var F;(F=T.onMouseOver)==null||F.call(T,k);const W=Number(k.currentTarget.getAttribute("data-index"));O(W)},Ar=T=>k=>{var F;(F=T.onMouseLeave)==null||F.call(T,k),O(-1)};return{active:L,axis:Je,axisProps:k1,dragging:z,focusedThumbIndex:vt,getHiddenInputProps:(T={})=>{var k;const F=Tn(T),W={onChange:Bt(F||{}),onFocus:He(F||{}),onBlur:Ue(F||{}),onKeyDown:ct(F||{})},Y=A({},F,W);return A({tabIndex:x,"aria-labelledby":t,"aria-orientation":m,"aria-valuemax":_(l),"aria-valuemin":_(u),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(k=e.step)!=null?k:void 0,disabled:r},T,Y,{style:A({},Tf,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Ut,getThumbProps:(T={})=>{const k=Tn(T),F={onMouseOver:Cr(k||{}),onMouseLeave:Ar(k||{})};return A({},T,k,F)},marks:xe,open:P,range:X,rootRef:lt,trackLeap:Mt,trackOffset:je,values:H,getThumbStyle:T=>({pointerEvents:L!==-1&&L!==T?"none":void 0})}}const N1=e=>!e||!Vr(e);function F1(e){return ln("MuiSlider",e)}const Qe=Jl("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"]),D1=e=>{const{open:t}=e;return{offset:gt(t&&Qe.valueLabelOpen),circle:Qe.valueLabelCircle,label:Qe.valueLabelLabel}};function wu(e){const{children:t,className:n,value:r}=e,a=D1(e);return t?N.cloneElement(t,{className:gt(t.props.className)},o.jsxs(N.Fragment,{children:[t.props.children,o.jsx("span",{className:gt(a.offset,n),"aria-hidden":!0,children:o.jsx("span",{className:a.circle,children:o.jsx("span",{className:a.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(wu.propTypes={children:f.element.isRequired,className:f.string,value:f.node});const B1=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function xi(e){return e}const U1=Ct("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ae(n.color)}`],n.size!=="medium"&&t[`size${Ae(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Qe.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Qe.dragging}`]:{[`& .${Qe.thumb}, & .${Qe.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{color:(e.vars||e).palette[n].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}}]}}),J1=Ct("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.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}}]}),V1=Ct("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{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.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:A({},e.vars?{backgroundColor:e.vars.palette.Slider[`${n}Track`],borderColor:e.vars.palette.Slider[`${n}Track`]}:A({backgroundColor:lo(e.palette[n].main,.62),borderColor:lo(e.palette[n].main,.62)},e.applyStyles("dark",{backgroundColor:io(e.palette[n].main,.5)}),e.applyStyles("dark",{borderColor:io(e.palette[n].main,.5)})))}))]}}),G1=Ct("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Ae(n.color)}`],n.size!=="medium"&&t[`thumbSize${Ae(n.size)}`]]}})(({theme:e})=>{var t;return{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%)"},[`&.${Qe.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.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${Qe.focusVisible}`]:A({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Js(e.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${Qe.active}`]:A({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Js(e.palette[n].main,.16)}`})}}))]}}),z1=Ct(wu,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>A({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%"},[`&.${Qe.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%"},[`&.${Qe.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"}}]})),W1=Ct("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>No(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({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}}]})),K1=Ct("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>No(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>A({},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}}]})),H1=e=>{const{disabled:t,dragging:n,marked:r,orientation:a,track:s,classes:i,color:l,size:u}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked",a==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",l&&`color${Ae(l)}`,u&&`size${Ae(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${Ae(u)}`,l&&`thumbColor${Ae(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Eo(c,F1,i)},q1=({children:e})=>e,ju=N.forwardRef(function(t,n){var r,a,s,i,l,u,c,d,h,m,v,_,y,g,x,j,C,L,R,P,O,z,le,ce;const D=Fo({props:t,name:"MuiSlider"}),q=$f(),{"aria-label":G,"aria-valuetext":X,"aria-labelledby":H,component:xe="span",components:ue={},componentsProps:Q={},color:Re="primary",classes:Ee,className:nt,disableSwap:vt=!1,disabled:Ke=!1,getAriaLabel:we,getAriaValueText:Ot,marks:lt=!1,max:He=100,min:Ue=0,orientation:ut="horizontal",shiftStep:ct=10,size:Bt="medium",step:bt=1,scale:Je=xi,slotProps:I,slots:ee,track:he="normal",valueLabelDisplay:ke="off",valueLabelFormat:Le=xi}=D,Tt=Be(D,B1),je=A({},D,{isRtl:q,max:He,min:Ue,classes:Ee,disabled:Ke,disableSwap:vt,orientation:ut,marks:lt,color:Re,size:Bt,step:bt,shiftStep:ct,scale:Je,track:he,valueLabelDisplay:ke,valueLabelFormat:Le}),{axisProps:Mt,getRootProps:Ut,getHiddenInputProps:Cr,getThumbProps:Ar,open:Pr,active:tr,axis:at,focusedThumbIndex:T,range:k,dragging:F,marks:W,values:Y,trackOffset:K,trackLeap:Ve,getThumbStyle:qe}=$1(A({},je,{rootRef:n}));je.marked=W.length>0&&W.some($=>$.label),je.dragging=F,je.focusedThumbIndex=T;const te=H1(je),$e=(r=(a=ee==null?void 0:ee.root)!=null?a:ue.Root)!=null?r:U1,It=(s=(i=ee==null?void 0:ee.rail)!=null?i:ue.Rail)!=null?s:J1,rr=(l=(u=ee==null?void 0:ee.track)!=null?u:ue.Track)!=null?l:V1,Or=(c=(d=ee==null?void 0:ee.thumb)!=null?d:ue.Thumb)!=null?c:G1,St=(h=(m=ee==null?void 0:ee.valueLabel)!=null?m:ue.ValueLabel)!=null?h:z1,Jt=(v=(_=ee==null?void 0:ee.mark)!=null?_:ue.Mark)!=null?v:W1,Vt=(y=(g=ee==null?void 0:ee.markLabel)!=null?g:ue.MarkLabel)!=null?y:K1,Tr=(x=(j=ee==null?void 0:ee.input)!=null?j:ue.Input)!=null?x:"input",Mr=(C=I==null?void 0:I.root)!=null?C:Q.root,cn=(L=I==null?void 0:I.rail)!=null?L:Q.rail,Ir=(R=I==null?void 0:I.track)!=null?R:Q.track,nr=(P=I==null?void 0:I.thumb)!=null?P:Q.thumb,ar=(O=I==null?void 0:I.valueLabel)!=null?O:Q.valueLabel,va=(z=I==null?void 0:I.mark)!=null?z:Q.mark,ba=(le=I==null?void 0:I.markLabel)!=null?le:Q.markLabel,dn=(ce=I==null?void 0:I.input)!=null?ce:Q.input,mn=kt({elementType:$e,getSlotProps:Ut,externalSlotProps:Mr,externalForwardedProps:Tt,additionalProps:A({},N1($e)&&{as:xe}),ownerState:A({},je,Mr==null?void 0:Mr.ownerState),className:[te.root,nt]}),Sa=kt({elementType:It,externalSlotProps:cn,ownerState:je,className:te.rail}),xa=kt({elementType:rr,externalSlotProps:Ir,additionalProps:{style:A({},Mt[at].offset(K),Mt[at].leap(Ve))},ownerState:A({},je,Ir==null?void 0:Ir.ownerState),className:te.track}),Er=kt({elementType:Or,getSlotProps:Ar,externalSlotProps:nr,ownerState:A({},je,nr==null?void 0:nr.ownerState),className:te.thumb}),wa=kt({elementType:St,externalSlotProps:ar,ownerState:A({},je,ar==null?void 0:ar.ownerState),className:te.valueLabel}),p=kt({elementType:Jt,externalSlotProps:va,ownerState:je,className:te.mark}),w=kt({elementType:Vt,externalSlotProps:ba,ownerState:je,className:te.markLabel}),E=kt({elementType:Tr,getSlotProps:Cr,externalSlotProps:dn,ownerState:je});return o.jsxs($e,A({},mn,{children:[o.jsx(It,A({},Sa)),o.jsx(rr,A({},xa)),W.filter($=>$.value>=Ue&&$.value<=He).map(($,B)=>{const re=Wn($.value,Ue,He),V=Mt[at].offset(re);let U;return he===!1?U=Y.indexOf($.value)!==-1:U=he==="normal"&&(k?$.value>=Y[0]&&$.value<=Y[Y.length-1]:$.value<=Y[0])||he==="inverted"&&(k?$.value<=Y[0]||$.value>=Y[Y.length-1]:$.value>=Y[0]),o.jsxs(N.Fragment,{children:[o.jsx(Jt,A({"data-index":B},p,!Vr(Jt)&&{markActive:U},{style:A({},V,p.style),className:gt(p.className,U&&te.markActive)})),$.label!=null?o.jsx(Vt,A({"aria-hidden":!0,"data-index":B},w,!Vr(Vt)&&{markLabelActive:U},{style:A({},V,w.style),className:gt(te.markLabel,w.className,U&&te.markLabelActive),children:$.label})):null]},B)}),Y.map(($,B)=>{const re=Wn($,Ue,He),V=Mt[at].offset(re),U=ke==="off"?q1:St;return o.jsx(U,A({},!Vr(U)&&{valueLabelFormat:Le,valueLabelDisplay:ke,value:typeof Le=="function"?Le(Je($),B):Le,index:B,open:Pr===B||tr===B||ke==="on",disabled:Ke},wa,{children:o.jsx(Or,A({"data-index":B},Er,{className:gt(te.thumb,Er.className,tr===B&&te.active,T===B&&te.focusVisible),style:A({},V,qe(B),Er.style),children:o.jsx(Tr,A({"data-index":B,"aria-label":we?we(B):G,"aria-valuenow":Je($),"aria-labelledby":H,"aria-valuetext":Ot?Ot(Je($),B):X,value:Y[B]},E))}))}),B)})]}))});process.env.NODE_ENV!=="production"&&(ju.propTypes={"aria-label":ks(f.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":f.string,"aria-valuetext":ks(f.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:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["primary","secondary","error","info","success","warning"]),f.string]),components:f.shape({Input:f.elementType,Mark:f.elementType,MarkLabel:f.elementType,Rail:f.elementType,Root:f.elementType,Thumb:f.elementType,Track:f.elementType,ValueLabel:f.elementType}),componentsProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),defaultValue:f.oneOfType([f.arrayOf(f.number),f.number]),disabled:f.bool,disableSwap:f.bool,getAriaLabel:f.func,getAriaValueText:f.func,marks:f.oneOfType([f.arrayOf(f.shape({label:f.node,value:f.number.isRequired})),f.bool]),max:f.number,min:f.number,name:f.string,onChange:f.func,onChangeCommitted:f.func,orientation:f.oneOf(["horizontal","vertical"]),scale:f.func,shiftStep:f.number,size:f.oneOfType([f.oneOf(["small","medium"]),f.string]),slotProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),slots:f.shape({input:f.elementType,mark:f.elementType,markLabel:f.elementType,rail:f.elementType,root:f.elementType,thumb:f.elementType,track:f.elementType,valueLabel:f.elementType}),step:f.number,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),tabIndex:f.number,track:f.oneOf(["inverted","normal",!1]),value:f.oneOfType([f.arrayOf(f.number),f.number]),valueLabelDisplay:f.oneOf(["auto","off","on"]),valueLabelFormat:f.oneOfType([f.func,f.string])});var X1="[object Number]";function Y1(e){return typeof e=="number"||Xt(e)&&Zt(e)==X1}const Ru=Ie.observer(e=>{const t=M.useTheme(),n=e.valueLabelFormat||(a=>`${a}`);function r(a,s){s===e.velocity||!Y1(s)||e.onVelocityChange(s)}return o.jsxs(o.Fragment,{children:[o.jsx(M.Typography,{sx:{textAlign:"center",fontSize:"14px",opacity:.8,color:t.palette.text.primary},children:n(e.velocity)}),o.jsx(ju,{value:e.velocity,onChange:r,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}})]})}),Cu=Ie.observer(({store:e})=>{const{t}=Ft.useTranslation(),n=Ie.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?r=>`v=${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:r})}`:r=>`v=${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:r})}`}}));return o.jsx(M.Stack,{sx:{margin:"0px 20px",marginBottom:"12px"},children:o.jsx(M.Stack,{sx:{width:"380px",maxWidth:"90%",margin:"auto"},children:o.jsx(Ru,{velocity:e.velocityInCurrentUnits,min:e.minVelocityInCurrentUnits,max:e.maxVelocityInCurrentUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,valueLabelFormat:n.valueLabelFormat})})})}),Z1=Ie.observer(({store:e})=>{const{t}=Ft.useTranslation();function n(c,d){(d==="translate"||d==="rotate")&&e.setSelectedCartesianMotionType(d)}wo(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function r(c,d){const h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose,m=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;h&&await e.withMotionLock(async()=>{await e.jogger.runIncrementalCartesianMotion({currentTcpPose:h,currentJoints:m,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.velocityInCurrentUnits,axis:c.axis,direction:c.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:d.mm}:{type:"rotate",distanceRads:$t.degreesToRadians(d.degrees)}})})}async function a(c){if(!e.isLocked){if(e.activeDiscreteIncrement)return r(c,e.activeDiscreteIncrement);c.motionType==="translate"?await e.jogger.startTCPTranslation({axis:c.axis,direction:c.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:c.axis,direction:c.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function s(){e.isLocked||e.activeDiscreteIncrement||await e.jogger.stop()}const i=[{id:"x",color:"#F14D42",icon:o.jsx(Up,{})},{id:"y",color:"#42A705",icon:o.jsx(Vp,{})},{id:"z",color:"#0075FF",icon:o.jsx(zp,{})}];function l(c){return t("General.mm.variable",{amount:c.toFixed(1)})}function u(c){return t("General.degree.variable",{amount:$t.radiansToDegrees(c).toFixed(1)})}return o.jsxs(M.Stack,{children:[o.jsx(Hp,{store:e}),o.jsx(P1,{store:e}),o.jsxs(M.Stack,{width:"80%",maxWidth:"296px",margin:"auto",marginTop:"16px",gap:"12px",children:[o.jsxs(M.ToggleButtonGroup,{value:e.selectedCartesianMotionType,onChange:n,exclusive:!0,"aria-label":t("Jogging.Cartesian.MotionType.lb"),children:[o.jsx(M.ToggleButton,{value:"translate",children:t("Jogging.Cartesian.Translation.bt")}),o.jsx(M.ToggleButton,{value:"rotate",children:t("Jogging.Cartesian.Rotation.bt")})]}),o.jsx(uu,{store:e,children:o.jsxs(M.Stack,{gap:"12px",children:[e.selectedCartesianMotionType==="translate"&&i.map(c=>o.jsx(co,{color:c.color,disabled:e.isLocked,label:o.jsxs(o.Fragment,{children:[c.icon,o.jsx(M.Typography,{sx:{fontSize:"24px",color:"white"},children:c.id.toUpperCase()})]}),getDisplayedValue:()=>{var d;return l(((d=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:d.position[c.id])||0)},startJogging:d=>a({axis:c.id,motionType:"translate",direction:d}),stopJogging:s},c.id)),e.selectedCartesianMotionType==="rotate"&&i.map(c=>o.jsx(co,{color:c.color,disabled:e.isLocked,label:o.jsxs(o.Fragment,{children:[o.jsx(Kp,{}),o.jsx(M.Typography,{sx:{fontSize:"24px",color:"white"},children:c.id.toUpperCase()})]}),getDisplayedValue:()=>{var d,h;return u(((h=(d=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:d.orientation)==null?void 0:h[c.id])||0)},startJogging:d=>a({axis:c.id,motionType:"rotate",direction:d}),stopJogging:s},c.id))]})})]}),o.jsx(Su,{store:e}),o.jsx(Cu,{store:e})]})}),Q1=Ie.observer(({store:e})=>{const t=Z.useRef(null);Ft.useTranslation();function n(){const{joints:r}=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;return`[${r.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return xr(()=>{t.current&&(t.current.textContent=n())}),o.jsx(M.Stack,{alignItems:"left",spacing:2,sx:{padding:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:o.jsx(cu,{label:"Pose",value:n(),ref:t})})}),e_=Ie.observer(({store:e})=>{async function t(r){await e.jogger.startJointRotation({joint:r.joint,direction:r.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function n(){await e.jogger.stop()}return o.jsxs(M.Stack,{children:[o.jsx(Q1,{store:e}),o.jsx(M.Stack,{marginTop:"0.8rem"}),o.jsx(uu,{store:e,children:o.jsx(M.Stack,{gap:"0.8rem",children:e.jogger.motionStream.joints.map(r=>{var l;const a=(l=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:l[r.index],s=(a==null?void 0:a.lower_limit)!==void 0?$t.radiansToDegrees(a.lower_limit):void 0,i=(a==null?void 0:a.upper_limit)!==void 0?$t.radiansToDegrees(a.upper_limit):void 0;return o.jsxs(M.Stack,{direction:"row",alignItems:"center",gap:2,children:[o.jsx(M.Typography,{sx:{flexGrow:1,textAlign:"right"},children:`J${r.index+1}`}),o.jsx(lu,{disabled:e.isLocked,lowerLimitDegs:s,upperLimitDegs:i,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[r.index];return u!==void 0?$t.radiansToDegrees(u):void 0},startJogging:u=>t({joint:r.index,direction:u}),stopJogging:n},r.index),o.jsx(M.Typography,{sx:{flexGrow:1}})]},`joint-${r.index}`)})})}),o.jsx(Su,{store:e}),o.jsx(Cu,{store:e})]})});var wi=function(){try{var e=er(Object,"defineProperty");return e({},"",{}),e}catch{}}();function t_(e,t,n){t=="__proto__"&&wi?wi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function r_(e,t,n,r){for(var a=-1,s=e==null?0:e.length;++a<s;){var i=e[a];t(r,i,n(i),e)}return r}function n_(e){return function(t,n,r){for(var a=-1,s=Object(t),i=r(t),l=i.length;l--;){var u=i[++a];if(n(s[u],u,s)===!1)break}return t}}var a_=n_();function o_(e,t){return e&&a_(e,t,Jo)}function s_(e,t){return function(n,r){if(n==null)return n;if(!bu(n))return e(n,r);for(var a=n.length,s=-1,i=Object(n);++s<a&&r(i[s],s,i)!==!1;);return n}}var i_=s_(o_);function l_(e,t,n,r){return i_(e,function(a,s,i){t(r,a,n(a),i)}),r}var u_=1,c_=2;function d_(e,t,n,r){var a=n.length,s=a;if(e==null)return!s;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<s;){i=n[a];var l=i[0],u=e[l],c=i[1];if(i[2]){if(u===void 0&&!(l in e))return!1}else{var d=new jt,h;if(!(h===void 0?ya(c,u,u_|c_,r,d):h))return!1}}return!0}function Au(e){return e===e&&!qt(e)}function m_(e){for(var t=Jo(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Au(a)]}return t}function Pu(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function h_(e){var t=m_(e);return t.length==1&&t[0][2]?Pu(t[0][0],t[0][1]):function(n){return n===e||d_(n,e,t)}}var f_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p_=/^\w*$/;function Vo(e,t){if(yt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||fa(e)?!0:p_.test(e)||!f_.test(e)||t!=null&&e in Object(t)}var g_="Expected a function";function Go(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(g_);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var i=e.apply(this,r);return n.cache=s.set(a,i)||s,i};return n.cache=new(Go.Cache||Pt),n}Go.Cache=Pt;var y_=500;function __(e){var t=Go(e,function(r){return n.size===y_&&n.clear(),r}),n=t.cache;return t}var v_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b_=/\\(\\)?/g,S_=__(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(v_,function(n,r,a,s){t.push(a?s.replace(b_,"$1"):r||n)}),t});function x_(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var w_=1/0,ji=Nt?Nt.prototype:void 0,Ri=ji?ji.toString:void 0;function Ou(e){if(typeof e=="string")return e;if(yt(e))return x_(e,Ou)+"";if(fa(e))return Ri?Ri.call(e):"";var t=e+"";return t=="0"&&1/e==-w_?"-0":t}function Tu(e){return e==null?"":Ou(e)}function Mu(e,t){return yt(e)?e:Vo(e,t)?[e]:S_(Tu(e))}var j_=1/0;function _a(e){if(typeof e=="string"||fa(e))return e;var t=e+"";return t=="0"&&1/e==-j_?"-0":t}function Iu(e,t){t=Mu(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[_a(t[n++])];return n&&n==r?e:void 0}function R_(e,t,n){var r=e==null?void 0:Iu(e,t);return r===void 0?n:r}function C_(e,t){return e!=null&&t in Object(e)}function A_(e,t,n){t=Mu(t,e);for(var r=-1,a=t.length,s=!1;++r<a;){var i=_a(t[r]);if(!(s=e!=null&&n(e,i)))break;e=e[i]}return s||++r!=a?s:(a=e==null?0:e.length,!!a&&Uo(a)&&yu(i,a)&&(yt(e)||pu(e)))}function P_(e,t){return e!=null&&A_(e,t,C_)}var O_=1,T_=2;function M_(e,t){return Vo(e)&&Au(t)?Pu(_a(e),t):function(n){var r=R_(n,e);return r===void 0&&r===t?P_(n,e):ya(t,r,O_|T_)}}function I_(e){return e}function E_(e){return function(t){return t==null?void 0:t[e]}}function k_(e){return function(t){return Iu(t,e)}}function L_(e){return Vo(e)?E_(_a(e)):k_(e)}function $_(e){return typeof e=="function"?e:e==null?I_:typeof e=="object"?yt(e)?M_(e[0],e[1]):h_(e):L_(e)}function N_(e,t){return function(n,r){var a=yt(n)?r_:l_,s={};return a(n,e,$_(r),s)}}var xn=N_(function(e,t,n){t_(e,n,t)}),F_=0;function D_(e){var t=++F_;return Tu(e)+t}const yo=[{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}],B_=[{id:"continuous"},...yo];class zo{constructor(t,n,r,a){var s,i;this.jogger=t,this.motionGroupSpec=n,this.coordSystems=r,this.tcps=a,this.selectedTabId="cartesian",this.manualActivationRequired=!0,this.activationState="inactive",this.activationError=null,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJoggingInProgress=!1,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.disposers=[];for(const l of r)if(l.coordinate_system===""){l.coordinate_system="world";break}this.selectedCoordSystemId=((s=r[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((i=a[0])==null?void 0:i.id)||"",dt.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(dt.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:n}=t,[r,{coordinatesystems:a},{tcps:s}]=await Promise.all([n.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),n.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),n.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new zo(t,r,a||[],s||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}async deactivate(t={}){if(this.activationState==="inactive")return;const n=this.jogger.activeWebsocket;this.activationState="inactive",this.jogger.setJoggingMode("increment"),n&&await n.closed(),t.requireManualReactivation&&dt.runInAction(()=>{this.manualActivationRequired=!0})}async activate(t={}){const{currentTab:n,selectedTcpId:r,activeCoordSystemId:a,activeDiscreteIncrement:s,jogger:i}=this;if(this.activationState!=="loading"&&!(this.manualActivationRequired&&!t.manual)){dt.runInAction(()=>{this.activationState="loading",this.activationError=null});try{await this.jogger.nova.api.controller.setDefaultMode(this.jogger.motionStream.controllerId,"MODE_CONTROL")}catch(l){console.error(l)}if(n.id==="cartesian"){const l={tcpId:r,coordSystemId:a};s?i.setJoggingMode("increment",l):i.setJoggingMode("cartesian",l)}else i.setJoggingMode("joint");if(i.activeWebsocket)try{i.stop(),await i.activeWebsocket.nextMessage()}catch(l){dt.runInAction(()=>{this.activationState="inactive",this.activationError=l});return}dt.runInAction(()=>{this.activationState="active",t.manual&&(this.manualActivationRequired=!1)})}}loadFromLocalStorage(){const t=$t.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 B_}get discreteIncrementOptions(){return yo}get incrementOptionsById(){return xn(this.incrementOptions,t=>t.id)}get tabsById(){return xn(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 xn(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 xn(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:yo.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInCurrentUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInCurrentUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInCurrentUnits(){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}setIncrementJoggingInProgress(t){this.incrementJoggingInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}async withMotionLock(t){const n=D_();this.locks.add(n);try{return await t()}finally{this.locks.delete(n)}}}const U_=Qr(Ie.observer(e=>{const t=_o.isString(e.nova)?new $t.NovaClient({instanceUrl:e.nova}):e.nova,n=Ie.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){dt.runInAction(()=>{n.loadingError=null,n.joggingStore=null});try{const a=await t.connectJogger(e.motionGroupId),s=await zo.loadFor(a);dt.runInAction(()=>{n.joggingStore=s}),e.onSetup&&e.onSetup(s)}catch(a){n.loadingError=a}}return Z.useEffect(()=>(r(),()=>{var a;(a=n.joggingStore)==null||a.dispose()}),[e.nova]),Z.useEffect(()=>{const a=n.joggingStore;a&&(e.locked?a.locks.add("external"):a.locks.delete("external"))},[e.locked]),o.jsx(M.Stack,{sx:{maxWidth:"460px",minWidth:"350px",overflowY:"auto",position:"relative",height:"100%"},children:o.jsx(M.Paper,{sx:{height:"100%"},children:n.joggingStore?o.jsx(J_,{store:n.joggingStore,children:e.children}):o.jsx(Qn,{message:"Loading jogging",error:n.loadingError})})})})),J_=Ie.observer(({store:e,children:t})=>{Z.useEffect(()=>{function r(){e.deactivate()}function a(){e.activate()}return window.addEventListener("blur",r),window.addEventListener("focus",a),()=>{window.removeEventListener("blur",r),window.removeEventListener("focus",a)}}),wo(()=>[e.currentTab,e.selectedTcpId,e.activeCoordSystemId,e.activeDiscreteIncrement],()=>{e.activationState==="active"&&e.activate()});function n(){if(e.currentTab.id==="cartesian")return o.jsxs(o.Fragment,{children:[o.jsx(Z1,{store:e}),t]});if(e.currentTab.id==="joint")return o.jsxs(o.Fragment,{children:[o.jsx(e_,{store:e}),t]})}return o.jsxs(M.Stack,{flexGrow:1,height:"100%",children:[o.jsx(M.Tabs,{value:e.tabIndex,onChange:e.onTabChange,children:e.tabs.map(r=>o.jsx(M.Tab,{label:r.label,id:`jogging-tab-${r.id}`,"aria-controls":`jogging-tab-${r.id}`},r.id))}),o.jsx(M.Stack,{flexGrow:1,position:"relative",children:n()})]})});function V_(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function G_({baseUrl:e=V_(),...t}){return o.jsxs(M.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:[o.jsx(M.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),o.jsxs(M.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[o.jsx(M.Typography,{color:"#fff",children:"Found no devices to connect to."}),o.jsx(M.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),o.jsx(M.DialogActions,{children:o.jsxs(M.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[o.jsx(M.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),o.jsx(M.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const z_=Array(6).fill(2*Math.PI),ht={white:"#FFFFFF",midnightblue:"#001337",lightbuttonblue:"#47D3FF",midnightgray:"#DDE0E4",midnightgray500:"#828B9B",skyblue500:"#06B8F1",skyblue600:"#0094CE",darkishblue:"#262F42",darkestblue:"#101629",grayishblue:"#505968",darkgrayishblue:"#363c4b",scaryred:"#FF0E65",tealGreen:"#1AC0B2",magenta:"#EA3785"},W_={mode:"dark",colors:{primary:ht.skyblue500,textDefault:ht.white,textSubtle:ht.midnightgray,background:{default:ht.darkishblue,panel:ht.darkestblue}}},K_={mode:"light",colors:{primary:ht.skyblue500,textDefault:ht.darkishblue,textSubtle:ht.midnightgray,background:{default:ht.skyblue500,panel:ht.white}}};function H_(e){var a,s,i,l;let t=!0;((a=e.palette)==null?void 0:a.mode)==="light"?t=!1:((s=e.palette)==null?void 0:s.mode)!=="dark"&&(t=!(typeof window<"u"&&((l=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:l.matches)));const n=t?W_:K_,r=uo({palette:{mode:n.mode,primary:{main:n.colors.primary},background:{default:n.colors.background.default,paper:n.colors.background.panel}},typography:{allVariants:{color:n.colors.textDefault}},components:{MuiSelect:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor","& > div":{padding:"4px 16px"},"& fieldset":{border:t?"none":void 0}}}},MuiChip:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor"}}},MuiToggleButtonGroup:{styleOverrides:{root:{"& > button":{borderRadius:"8px",textTransform:"none",paddingTop:"4px",paddingBottom:"4px",width:"100%",borderWidth:0,backgroundColor:t?"#3d4455":void 0,color:t?"rgba(255, 255, 255, 0.8)":void 0,"&.Mui-selected":t?{color:"white",backgroundColor:"#505968"}:void 0}}}},MuiTabs:{styleOverrides:{root:{backgroundColor:t?"#101629":void 0,minHeight:"42px"}}},MuiTab:{styleOverrides:{root:{minHeight:"42px",textTransform:"none","&.Mui-selected":t?{color:"white",backgroundColor:"#404554"}:void 0}}}},nova:n});return e?uo(r,e):r}exports.JoggingCartesianAxisControl=co;exports.JoggingJointRotationControl=lu;exports.JoggingPanel=U_;exports.LoadingCover=Qn;exports.LoadingErrorMessage=tl;exports.NoMotionGroupModal=G_;exports.PresetEnvironment=cm;exports.Robot=um;exports.SafetyZonesRenderer=hm;exports.SupportedRobot=bl;exports.VelocitySlider=Ru;exports.WandelscriptEditor=Zd;exports.createNovaMuiTheme=H_;exports.defaultAxisConfig=z_;exports.defaultGetModel=jo;exports.useAnimationFrame=xr;exports.useAutorun=_l;exports.useMounted=ea;exports.useReaction=wo;
|
|
83
|
+
`)),Bl.configure(e)}},lp=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Ae,createChainedFunction:ff,createSvgIcon:sp,debounce:pf,deprecatedPropType:gf,isMuiElement:yf,ownerDocument:yr,ownerWindow:_f,requirePropFactory:vf,setRef:Wl,unstable_ClassNameGenerator:ip,unstable_useEnhancedEffect:Mo,unstable_useId:Sf,unsupportedProp:xf,useControlled:Kl,useEventCallback:On,useForkRef:Jn,useIsFocusVisible:Hl},Symbol.toStringTag,{value:"Module"})),up=Rt(lp);var Xs;function nu(){return Xs||(Xs=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=up}(Da)),Da}var cp=ha;Object.defineProperty(Do,"__esModule",{value:!0});var au=Do.default=void 0,dp=cp(nu()),mp=o;au=Do.default=(0,dp.default)((0,mp.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Bo={},hp=ha;Object.defineProperty(Bo,"__esModule",{value:!0});var ou=Bo.default=void 0,fp=hp(nu()),pp=o;ou=Bo.default=(0,fp.default)((0,pp.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function qt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var su=typeof global=="object"&&global&&global.Object===Object&&global,gp=typeof self=="object"&&self&&self.Object===Object&&self,_t=su||gp||Function("return this")(),Ba=function(){return _t.Date.now()},yp=/\s/;function _p(e){for(var t=e.length;t--&&yp.test(e.charAt(t)););return t}var vp=/^\s+/;function bp(e){return e&&e.slice(0,_p(e)+1).replace(vp,"")}var Nt=_t.Symbol,iu=Object.prototype,Sp=iu.hasOwnProperty,xp=iu.toString,Br=Nt?Nt.toStringTag:void 0;function wp(e){var t=Sp.call(e,Br),n=e[Br];try{e[Br]=void 0;var r=!0}catch{}var a=xp.call(e);return r&&(t?e[Br]=n:delete e[Br]),a}var jp=Object.prototype,Rp=jp.toString;function Cp(e){return Rp.call(e)}var Ap="[object Null]",Pp="[object Undefined]",Ys=Nt?Nt.toStringTag:void 0;function Zt(e){return e==null?e===void 0?Pp:Ap:Ys&&Ys in Object(e)?wp(e):Cp(e)}function Xt(e){return e!=null&&typeof e=="object"}var Op="[object Symbol]";function fa(e){return typeof e=="symbol"||Xt(e)&&Zt(e)==Op}var Zs=NaN,Tp=/^[-+]0x[0-9a-f]+$/i,Mp=/^0b[01]+$/i,Ip=/^0o[0-7]+$/i,Ep=parseInt;function Qs(e){if(typeof e=="number")return e;if(fa(e))return Zs;if(qt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=bp(e);var n=Mp.test(e);return n||Ip.test(e)?Ep(e.slice(2),n?2:8):Tp.test(e)?Zs:+e}var kp="Expected a function",Lp=Math.max,$p=Math.min;function Np(e,t,n){var r,a,s,i,l,u,c=0,d=!1,h=!1,m=!0;if(typeof e!="function")throw new TypeError(kp);t=Qs(t)||0,qt(n)&&(d=!!n.leading,h="maxWait"in n,s=h?Lp(Qs(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m);function v(P){var O=r,z=a;return r=a=void 0,c=P,i=e.apply(z,O),i}function _(P){return c=P,l=setTimeout(x,t),d?v(P):i}function y(P){var O=P-u,z=P-c,le=t-O;return h?$p(le,s-z):le}function g(P){var O=P-u,z=P-c;return u===void 0||O>=t||O<0||h&&z>=s}function x(){var P=Ba();if(g(P))return j(P);l=setTimeout(x,y(P))}function j(P){return l=void 0,m&&r?v(P):(r=a=void 0,i)}function C(){l!==void 0&&clearTimeout(l),c=0,r=u=a=l=void 0}function L(){return l===void 0?i:j(Ba())}function R(){var P=Ba(),O=g(P);if(r=arguments,a=this,u=P,O){if(l===void 0)return _(u);if(h)return clearTimeout(l),l=setTimeout(x,t),v(u)}return l===void 0&&(l=setTimeout(x,t)),i}return R.cancel=C,R.flush=L,R}var Fp="Expected a function";function Dp(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Fp);return qt(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Np(e,t,{leading:r,maxWait:t,trailing:a})}const lu=Qr(Ie.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:n,upperLimitDegs:r,getValueDegs:a,disabled:s,...i})=>{const{t:l}=Ft.useTranslation(),[u,c]=Z.useState(),d=Ie.useLocalObservable(()=>({activeJoggingDir:null,startJogging(x){this.activeJoggingDir=x,e(x)},stopJogging(){this.activeJoggingDir=null,t()}})),h=Dp(()=>{c(a())},50);xr(h);function m(x){x.button===0&&d.startJogging("-")}function v(x){x.button===0&&d.startJogging("+")}function _(x){d.stopJogging()}function y(x){x.target===x.currentTarget&&d.stopJogging()}function g(x,j=1){if(x===void 0||isNaN(x))return"";const C=l("General.degree.variable",{amount:x.toFixed(j)});return x>0&&j===0?`+${C}`:C}return o.jsxs(_r,{height:"64px",width:"100%",maxWidth:"300px",direction:"row",...i,sx:{"& .MuiIconButton-root":{width:"52px",color:"white",alignContent:"center",backgroundColor:"#38445A","&:disabled":{opacity:.5,backgroundColor:"#38445A"},"& svg":{width:"42px",height:"42px"}}},children:[o.jsx(M.IconButton,{onPointerDown:m,onPointerUp:_,onPointerOut:y,disabled:s,sx:{borderRadius:"16px 0px 0px 16px",backgroundColor:d.activeJoggingDir==="-"?"#495975":void 0},children:o.jsx(au,{})}),o.jsxs(_r,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:"4px",borderBottomWidth:"4px",backgroundColor:"#38445A",borderColor:"#38445A",paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[o.jsx(M.Typography,{sx:{fontSize:"15px",position:"relative",top:"5px",color:"white"},children:g(u)}),o.jsx(M.Slider,{disabled:!0,"aria-label":"Joint position",min:n,max:r,value:u||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"10px",borderRadius:"2px"},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:"white"},"& .MuiSlider-rail":{backgroundColor:"#1F283A",opacity:1}},marks:n!==void 0&&r!==void 0&&[{value:n,label:g(n,0)},{value:r,label:g(r,0)}]})]}),o.jsx(M.IconButton,{onPointerDown:v,onPointerUp:_,onPointerOut:y,disabled:s,sx:{borderRadius:"0px 16px 16px 0px",backgroundColor:d.activeJoggingDir==="+"?"#495975 !important":"#38445A"},children:o.jsx(ou,{})})]})})),Bp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.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"})),Up=Z.forwardRef(Bp),Jp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.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"})),Vp=Z.forwardRef(Jp),Gp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.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"})),zp=Z.forwardRef(Gp),Wp=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:1.5,d:"M18.5 12a6 6 0 1 0-6 6"}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m16.5 11 2 2.5 2-2.5"})),Kp=Z.forwardRef(Wp),ei=e=>o.jsx(M.Stack,{position:"absolute",left:0,top:0,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(1px)",zIndex:100,...e.sx||{}},..._o.omit(e,"sx")}),uu=Ie.observer(({store:e,children:t})=>{const{t:n}=Ft.useTranslation();function r(){if(e.activationState==="inactive"&&!e.activationError)return o.jsx(ei,{sx:{borderRadius:"6px"},children:o.jsx(M.Button,{color:"primary",variant:"contained",onClick:()=>e.activate({manual:!0}),disabled:e.isLocked,children:n("Jogging.Activate.bt")})});if(e.activationState==="loading"||e.activationError)return o.jsx(ei,{children:o.jsx(Qn,{message:n("Jogging.Activating.lb"),error:e.activationError})})}return o.jsxs(M.Stack,{sx:{position:"relative",padding:"6px"},children:[r(),t]})}),cu=Z.forwardRef(({label:e,value:t},n)=>o.jsxs(o.Fragment,{children:[e&&o.jsx(M.InputLabel,{children:e}),o.jsx(M.Chip,{ref:n,sx:{fontSize:"14px",opacity:.8,marginTop:"4px !important"},value:t})]})),Hp=Ie.observer(({store:e})=>{const t=Z.useRef(null);function n(){const r=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose;return r?$t.poseToWandelscriptString(r):""}return xr(()=>{t.current&&(t.current.textContent=n())}),o.jsx(M.Stack,{alignItems:"left",spacing:2,sx:{padding:"8px 16px",paddingTop:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:o.jsx(cu,{label:"Pose",value:n(),ref:t})})});function qp(){this.__data__=[],this.size=0}function du(e,t){return e===t||e!==e&&t!==t}function pa(e,t){for(var n=e.length;n--;)if(du(e[n][0],t))return n;return-1}var Xp=Array.prototype,Yp=Xp.splice;function Zp(e){var t=this.__data__,n=pa(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Yp.call(t,n,1),--this.size,!0}function Qp(e){var t=this.__data__,n=pa(t,e);return n<0?void 0:t[n][1]}function eg(e){return pa(this.__data__,e)>-1}function tg(e,t){var n=this.__data__,r=pa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function At(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])}}At.prototype.clear=qp;At.prototype.delete=Zp;At.prototype.get=Qp;At.prototype.has=eg;At.prototype.set=tg;function rg(){this.__data__=new At,this.size=0}function ng(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ag(e){return this.__data__.get(e)}function og(e){return this.__data__.has(e)}var sg="[object AsyncFunction]",ig="[object Function]",lg="[object GeneratorFunction]",ug="[object Proxy]";function mu(e){if(!qt(e))return!1;var t=Zt(e);return t==ig||t==lg||t==sg||t==ug}var Ua=_t["__core-js_shared__"],ti=function(){var e=/[^.]+$/.exec(Ua&&Ua.keys&&Ua.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function cg(e){return!!ti&&ti in e}var dg=Function.prototype,mg=dg.toString;function Qt(e){if(e!=null){try{return mg.call(e)}catch{}try{return e+""}catch{}}return""}var hg=/[\\^$.*+?()[\]{}|]/g,fg=/^\[object .+?Constructor\]$/,pg=Function.prototype,gg=Object.prototype,yg=pg.toString,_g=gg.hasOwnProperty,vg=RegExp("^"+yg.call(_g).replace(hg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bg(e){if(!qt(e)||cg(e))return!1;var t=mu(e)?vg:fg;return t.test(Qt(e))}function Sg(e,t){return e==null?void 0:e[t]}function er(e,t){var n=Sg(e,t);return bg(n)?n:void 0}var Yr=er(_t,"Map"),Zr=er(Object,"create");function xg(){this.__data__=Zr?Zr(null):{},this.size=0}function wg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jg="__lodash_hash_undefined__",Rg=Object.prototype,Cg=Rg.hasOwnProperty;function Ag(e){var t=this.__data__;if(Zr){var n=t[e];return n===jg?void 0:n}return Cg.call(t,e)?t[e]:void 0}var Pg=Object.prototype,Og=Pg.hasOwnProperty;function Tg(e){var t=this.__data__;return Zr?t[e]!==void 0:Og.call(t,e)}var Mg="__lodash_hash_undefined__";function Ig(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Zr&&t===void 0?Mg:t,this}function Yt(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])}}Yt.prototype.clear=xg;Yt.prototype.delete=wg;Yt.prototype.get=Ag;Yt.prototype.has=Tg;Yt.prototype.set=Ig;function Eg(){this.size=0,this.__data__={hash:new Yt,map:new(Yr||At),string:new Yt}}function kg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ga(e,t){var n=e.__data__;return kg(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Lg(e){var t=ga(this,e).delete(e);return this.size-=t?1:0,t}function $g(e){return ga(this,e).get(e)}function Ng(e){return ga(this,e).has(e)}function Fg(e,t){var n=ga(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,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=Eg;Pt.prototype.delete=Lg;Pt.prototype.get=$g;Pt.prototype.has=Ng;Pt.prototype.set=Fg;var Dg=200;function Bg(e,t){var n=this.__data__;if(n instanceof At){var r=n.__data__;if(!Yr||r.length<Dg-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pt(r)}return n.set(e,t),this.size=n.size,this}function jt(e){var t=this.__data__=new At(e);this.size=t.size}jt.prototype.clear=rg;jt.prototype.delete=ng;jt.prototype.get=ag;jt.prototype.has=og;jt.prototype.set=Bg;var Ug="__lodash_hash_undefined__";function Jg(e){return this.__data__.set(e,Ug),this}function Vg(e){return this.__data__.has(e)}function zn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Pt;++t<n;)this.add(e[t])}zn.prototype.add=zn.prototype.push=Jg;zn.prototype.has=Vg;function Gg(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 zg(e,t){return e.has(t)}var Wg=1,Kg=2;function hu(e,t,n,r,a,s){var i=n&Wg,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,m=!0,v=n&Kg?new zn:void 0;for(s.set(e,t),s.set(t,e);++h<l;){var _=e[h],y=t[h];if(r)var g=i?r(y,_,h,t,e,s):r(_,y,h,e,t,s);if(g!==void 0){if(g)continue;m=!1;break}if(v){if(!Gg(t,function(x,j){if(!zg(v,j)&&(_===x||a(_,x,n,r,s)))return v.push(j)})){m=!1;break}}else if(!(_===y||a(_,y,n,r,s))){m=!1;break}}return s.delete(e),s.delete(t),m}var ri=_t.Uint8Array;function Hg(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}function qg(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Xg=1,Yg=2,Zg="[object Boolean]",Qg="[object Date]",ey="[object Error]",ty="[object Map]",ry="[object Number]",ny="[object RegExp]",ay="[object Set]",oy="[object String]",sy="[object Symbol]",iy="[object ArrayBuffer]",ly="[object DataView]",ni=Nt?Nt.prototype:void 0,Ja=ni?ni.valueOf:void 0;function uy(e,t,n,r,a,s,i){switch(n){case ly:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case iy:return!(e.byteLength!=t.byteLength||!s(new ri(e),new ri(t)));case Zg:case Qg:case ry:return du(+e,+t);case ey:return e.name==t.name&&e.message==t.message;case ny:case oy:return e==t+"";case ty:var l=Hg;case ay:var u=r&Xg;if(l||(l=qg),e.size!=t.size&&!u)return!1;var c=i.get(e);if(c)return c==t;r|=Yg,i.set(e,t);var d=hu(l(e),l(t),r,a,s,i);return i.delete(e),d;case sy:if(Ja)return Ja.call(e)==Ja.call(t)}return!1}function cy(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var yt=Array.isArray;function dy(e,t,n){var r=t(e);return yt(e)?r:cy(r,n(e))}function my(e,t){for(var n=-1,r=e==null?0:e.length,a=0,s=[];++n<r;){var i=e[n];t(i,n,e)&&(s[a++]=i)}return s}function hy(){return[]}var fy=Object.prototype,py=fy.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,gy=ai?function(e){return e==null?[]:(e=Object(e),my(ai(e),function(t){return py.call(e,t)}))}:hy;function yy(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var _y="[object Arguments]";function oi(e){return Xt(e)&&Zt(e)==_y}var fu=Object.prototype,vy=fu.hasOwnProperty,by=fu.propertyIsEnumerable,pu=oi(function(){return arguments}())?oi:function(e){return Xt(e)&&vy.call(e,"callee")&&!by.call(e,"callee")};function Sy(){return!1}var gu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,si=gu&&typeof module=="object"&&module&&!module.nodeType&&module,xy=si&&si.exports===gu,ii=xy?_t.Buffer:void 0,wy=ii?ii.isBuffer:void 0,mo=wy||Sy,jy=9007199254740991,Ry=/^(?:0|[1-9]\d*)$/;function yu(e,t){var n=typeof e;return t=t??jy,!!t&&(n=="number"||n!="symbol"&&Ry.test(e))&&e>-1&&e%1==0&&e<t}var Cy=9007199254740991;function Uo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cy}var Ay="[object Arguments]",Py="[object Array]",Oy="[object Boolean]",Ty="[object Date]",My="[object Error]",Iy="[object Function]",Ey="[object Map]",ky="[object Number]",Ly="[object Object]",$y="[object RegExp]",Ny="[object Set]",Fy="[object String]",Dy="[object WeakMap]",By="[object ArrayBuffer]",Uy="[object DataView]",Jy="[object Float32Array]",Vy="[object Float64Array]",Gy="[object Int8Array]",zy="[object Int16Array]",Wy="[object Int32Array]",Ky="[object Uint8Array]",Hy="[object Uint8ClampedArray]",qy="[object Uint16Array]",Xy="[object Uint32Array]",de={};de[Jy]=de[Vy]=de[Gy]=de[zy]=de[Wy]=de[Ky]=de[Hy]=de[qy]=de[Xy]=!0;de[Ay]=de[Py]=de[By]=de[Oy]=de[Uy]=de[Ty]=de[My]=de[Iy]=de[Ey]=de[ky]=de[Ly]=de[$y]=de[Ny]=de[Fy]=de[Dy]=!1;function Yy(e){return Xt(e)&&Uo(e.length)&&!!de[Zt(e)]}function Zy(e){return function(t){return e(t)}}var _u=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=_u&&typeof module=="object"&&module&&!module.nodeType&&module,Qy=Gr&&Gr.exports===_u,Va=Qy&&su.process,li=function(){try{var e=Gr&&Gr.require&&Gr.require("util").types;return e||Va&&Va.binding&&Va.binding("util")}catch{}}(),ui=li&&li.isTypedArray,vu=ui?Zy(ui):Yy,e1=Object.prototype,t1=e1.hasOwnProperty;function r1(e,t){var n=yt(e),r=!n&&pu(e),a=!n&&!r&&mo(e),s=!n&&!r&&!a&&vu(e),i=n||r||a||s,l=i?yy(e.length,String):[],u=l.length;for(var c in e)t1.call(e,c)&&!(i&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||yu(c,u)))&&l.push(c);return l}var n1=Object.prototype;function a1(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||n1;return e===n}function o1(e,t){return function(n){return e(t(n))}}var s1=o1(Object.keys,Object),i1=Object.prototype,l1=i1.hasOwnProperty;function u1(e){if(!a1(e))return s1(e);var t=[];for(var n in Object(e))l1.call(e,n)&&n!="constructor"&&t.push(n);return t}function bu(e){return e!=null&&Uo(e.length)&&!mu(e)}function Jo(e){return bu(e)?r1(e):u1(e)}function ci(e){return dy(e,Jo,gy)}var c1=1,d1=Object.prototype,m1=d1.hasOwnProperty;function h1(e,t,n,r,a,s){var i=n&c1,l=ci(e),u=l.length,c=ci(t),d=c.length;if(u!=d&&!i)return!1;for(var h=u;h--;){var m=l[h];if(!(i?m in t:m1.call(t,m)))return!1}var v=s.get(e),_=s.get(t);if(v&&_)return v==t&&_==e;var y=!0;s.set(e,t),s.set(t,e);for(var g=i;++h<u;){m=l[h];var x=e[m],j=t[m];if(r)var C=i?r(j,x,m,t,e,s):r(x,j,m,e,t,s);if(!(C===void 0?x===j||a(x,j,n,r,s):C)){y=!1;break}g||(g=m=="constructor")}if(y&&!g){var L=e.constructor,R=t.constructor;L!=R&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(y=!1)}return s.delete(e),s.delete(t),y}var ho=er(_t,"DataView"),fo=er(_t,"Promise"),po=er(_t,"Set"),go=er(_t,"WeakMap"),di="[object Map]",f1="[object Object]",mi="[object Promise]",hi="[object Set]",fi="[object WeakMap]",pi="[object DataView]",p1=Qt(ho),g1=Qt(Yr),y1=Qt(fo),_1=Qt(po),v1=Qt(go),Lt=Zt;(ho&&Lt(new ho(new ArrayBuffer(1)))!=pi||Yr&&Lt(new Yr)!=di||fo&&Lt(fo.resolve())!=mi||po&&Lt(new po)!=hi||go&&Lt(new go)!=fi)&&(Lt=function(e){var t=Zt(e),n=t==f1?e.constructor:void 0,r=n?Qt(n):"";if(r)switch(r){case p1:return pi;case g1:return di;case y1:return mi;case _1:return hi;case v1:return fi}return t});var b1=1,gi="[object Arguments]",yi="[object Array]",yn="[object Object]",S1=Object.prototype,_i=S1.hasOwnProperty;function x1(e,t,n,r,a,s){var i=yt(e),l=yt(t),u=i?yi:Lt(e),c=l?yi:Lt(t);u=u==gi?yn:u,c=c==gi?yn:c;var d=u==yn,h=c==yn,m=u==c;if(m&&mo(e)){if(!mo(t))return!1;i=!0,d=!1}if(m&&!d)return s||(s=new jt),i||vu(e)?hu(e,t,n,r,a,s):uy(e,t,u,n,r,a,s);if(!(n&b1)){var v=d&&_i.call(e,"__wrapped__"),_=h&&_i.call(t,"__wrapped__");if(v||_){var y=v?e.value():e,g=_?t.value():t;return s||(s=new jt),a(y,g,n,r,s)}}return m?(s||(s=new jt),h1(e,t,n,r,a,s)):!1}function ya(e,t,n,r,a){return e===t?!0:e==null||t==null||!Xt(e)&&!Xt(t)?e!==e&&t!==t:x1(e,t,n,r,ya,a)}function w1(e,t){return ya(e,t)}const Su=({store:e})=>{const{t}=Ft.useTranslation(),[n,r]=Z.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=Z.useRef(n);xr(()=>{const i=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;w1(a.current,i)||(a.current=i,r(i))});const s=[];for(const[i,l]of n.entries())l&&s.push(i);return o.jsx(M.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(i=>i+1).join(", ")})})},j1=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:21,height:21,fill:"none",viewBox:"0 0 23 22",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"m21.71 16.262-1.09.346.66 2.071-2.923-1.461V9.857l-6.285-3.143V2.893L13.38 4.21l.812-.806-2.674-2.69-2.706 2.687.805.812L10.93 2.91v3.803L4.643 9.857v7.36l-2.914 1.458.657-2.067-1.09-.346-1.225 3.88 3.826 1.144.346-1.09-1.836-.583 2.874-1.436 6.22 3.109 6.217-3.11 2.877 1.439-1.831.581.345 1.09 3.82-1.143zM11.5 12.646l-4.94-2.47 4.94-2.47 4.94 2.47zm.572.993 5.143-2.572v6.083l-5.143 2.572zm-6.286-2.572 5.143 2.572v6.083L5.786 17.15z"})),R1=Z.forwardRef(j1),C1=({title:e,titleId:t,...n},r)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:17,fill:"none",ref:r,"aria-labelledby":t,...n},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"M12.9 7.667c-.133-.534-.533-1-1-1.134L10.367 6l-.4 1.267L11.5 7.8c.067 0 .133.067.133.2l1.067 4.867a.32.32 0 0 1-.133.4l-2.267 1.8c-.267.2-.333.666-.133.933s.666.333.933.133l2.267-1.8c.533-.4.733-1.133.6-1.733zM12.5 0H1.833A1.65 1.65 0 0 0 .167 1.667v1.4c0 .866.733 1.6 1.666 1.6h10.734c.866 0 1.6-.734 1.6-1.667V1.667A1.65 1.65 0 0 0 12.5 0M1.633 12.8 2.7 8c0-.067.067-.133.133-.2l1.534-.533-.4-1.2-1.534.466c-.533.2-.933.6-1 1.134L.367 12.533c-.134.667.066 1.334.6 1.734l2.266 1.8c.267.266.734.2.934-.067s.2-.733-.134-.933l-2.266-1.8c-.134-.134-.2-.267-.134-.467"})),A1=Z.forwardRef(C1),P1=Ie.observer(({store:e})=>{var r;const{t}=Ft.useTranslation();function n(a,s){(s==="coordsys"||s==="tool")&&e.setSelectedOrientation(s)}return o.jsxs(o.Fragment,{children:[o.jsxs(M.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"6px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[o.jsxs(M.Stack,{width:"50%",children:[o.jsx(M.InputLabel,{id:"jogging-coord-select",children:"Coordinate Sys."}),o.jsx(M.Select,{labelId:"jogging-coord-select",value:e.selectedCoordSystemId,displayEmpty:!0,onChange:a=>{e.setSelectedCoordSystemId(a.target.value)},disabled:e.isLocked,children:e.coordSystems.map(a=>o.jsx(M.MenuItem,{value:a.coordinate_system,children:a.name||a.coordinate_system},a.coordinate_system))})]}),o.jsxs(M.Stack,{width:"50%",children:[o.jsx(M.InputLabel,{id:"jogging-tcp-select",children:"TCP"}),o.jsx(M.Select,{labelId:"jogging-tcp-select",value:e.selectedTcpId,onChange:a=>{e.setSelectedTcpId(a.target.value)},disabled:e.isLocked,children:e.tcps.map(a=>o.jsx(M.MenuItem,{value:a.id,children:a.id},a.id))})]})]}),o.jsxs(M.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"6px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[o.jsxs(M.Stack,{width:"35%",children:[o.jsx(M.InputLabel,{id:"orientation-select",children:t("Jogging.Cartesian.Orientation.lb")}),o.jsxs(M.ToggleButtonGroup,{value:e.selectedOrientation,onChange:n,exclusive:!0,"aria-labelledby":"orientation-select",disabled:e.isLocked,children:[o.jsx(M.ToggleButton,{value:"coordsys",children:o.jsx(R1,{})}),o.jsx(M.ToggleButton,{value:"tool",children:o.jsx(A1,{})})]})]}),o.jsxs(M.Stack,{width:"65%",children:[o.jsx(M.InputLabel,{id:"jogging-increment-select",children:"Increment"}),o.jsxs(M.Select,{labelId:"jogging-increment-select",value:((r=e.activeDiscreteIncrement)==null?void 0:r.id)||"continuous",onChange:a=>{e.setSelectedIncrementId(a.target.value)},disabled:e.isLocked,children:[o.jsx(M.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(a=>o.jsx(M.MenuItem,{value:a.id,children:e.currentMotionType==="translate"?`${a.mm}mm`:`${a.degrees}°`},a.id))]})]})]})]})});function O1(e,t,n=(r,a)=>r===a){return e.length===t.length&&e.every((r,a)=>n(r,t[a]))}const T1=2;function xu(e,t){return e-t}function vi(e,t){var n;const{index:r}=(n=e.reduce((a,s,i)=>{const l=Math.abs(t-s);return a===null||l<a.distance||l===a.distance?{distance:l,index:i}:a},null))!=null?n:{};return r}function _n(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const a=n.changedTouches[r];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Wn(e,t,n){return(e-t)*100/(n-t)}function M1(e,t,n){return(n-t)*e+t}function I1(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 E1(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(I1(t)))}function bi({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(xu)}function vn({sliderRef:e,activeIndex:t,setActive:n}){var r,a;const s=yr(e.current);if(!((r=e.current)!=null&&r.contains(s.activeElement))||Number(s==null||(a=s.activeElement)==null?void 0:a.getAttribute("data-index"))!==t){var i;(i=e.current)==null||i.querySelector(`[type="range"][data-index="${t}"]`).focus()}n&&n(t)}function bn(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?O1(e,t):!1}const k1={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}%`})}},L1=e=>e;let Sn;function Si(){return Sn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Sn=CSS.supports("touch-action","none"):Sn=!0),Sn}function $1(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:a=!1,isRtl:s=!1,marks:i=!1,max:l=100,min:u=0,name:c,onChange:d,onChangeCommitted:h,orientation:m="horizontal",rootRef:v,scale:_=L1,step:y=1,shiftStep:g=10,tabIndex:x,value:j}=e,C=N.useRef(),[L,R]=N.useState(-1),[P,O]=N.useState(-1),[z,le]=N.useState(!1),ce=N.useRef(0),[D,q]=Kl({controlled:j,default:n??u,name:"Slider"}),G=d&&((T,k,F)=>{const W=T.nativeEvent||T,Y=new W.constructor(W.type,W);Object.defineProperty(Y,"target",{writable:!0,value:{value:k,name:c}}),d(Y,k,F)}),X=Array.isArray(D);let H=X?D.slice().sort(xu):[D];H=H.map(T=>T==null?u:hr(T,u,l));const xe=i===!0&&y!==null?[...Array(Math.floor((l-u)/y)+1)].map((T,k)=>({value:u+y*k})):i||[],ue=xe.map(T=>T.value),{isFocusVisibleRef:Q,onBlur:Re,onFocus:Ee,ref:nt}=Hl(),[vt,Ke]=N.useState(-1),we=N.useRef(),Ot=Jn(nt,we),lt=Jn(v,Ot),He=T=>k=>{var F;const W=Number(k.currentTarget.getAttribute("data-index"));Ee(k),Q.current===!0&&Ke(W),O(W),T==null||(F=T.onFocus)==null||F.call(T,k)},Ue=T=>k=>{var F;Re(k),Q.current===!1&&Ke(-1),O(-1),T==null||(F=T.onBlur)==null||F.call(T,k)},ut=(T,k)=>{const F=Number(T.currentTarget.getAttribute("data-index")),W=H[F],Y=ue.indexOf(W);let K=k;if(xe&&y==null){const Ve=ue[ue.length-1];K>Ve?K=Ve:K<ue[0]?K=ue[0]:K=K<W?ue[Y-1]:ue[Y+1]}if(K=hr(K,u,l),X){a&&(K=hr(K,H[F-1]||-1/0,H[F+1]||1/0));const Ve=K;K=bi({values:H,newValue:K,index:F});let qe=F;a||(qe=K.indexOf(Ve)),vn({sliderRef:we,activeIndex:qe})}q(K),Ke(F),G&&!bn(K,D)&&G(T,K,F),h&&h(T,K)},ct=T=>k=>{var F;if(y!==null){const W=Number(k.currentTarget.getAttribute("data-index")),Y=H[W];let K=null;(k.key==="ArrowLeft"||k.key==="ArrowDown")&&k.shiftKey||k.key==="PageDown"?K=Math.max(Y-g,u):((k.key==="ArrowRight"||k.key==="ArrowUp")&&k.shiftKey||k.key==="PageUp")&&(K=Math.min(Y+g,l)),K!==null&&(ut(k,K),k.preventDefault())}T==null||(F=T.onKeyDown)==null||F.call(T,k)};Mo(()=>{if(r&&we.current.contains(document.activeElement)){var T;(T=document.activeElement)==null||T.blur()}},[r]),r&&L!==-1&&R(-1),r&&vt!==-1&&Ke(-1);const Bt=T=>k=>{var F;(F=T.onChange)==null||F.call(T,k),ut(k,k.target.valueAsNumber)},bt=N.useRef();let Je=m;s&&m==="horizontal"&&(Je+="-reverse");const I=({finger:T,move:k=!1})=>{const{current:F}=we,{width:W,height:Y,bottom:K,left:Ve}=F.getBoundingClientRect();let qe;Je.indexOf("vertical")===0?qe=(K-T.y)/Y:qe=(T.x-Ve)/W,Je.indexOf("-reverse")!==-1&&(qe=1-qe);let te;if(te=M1(qe,u,l),y)te=E1(te,y,u);else{const It=vi(ue,te);te=ue[It]}te=hr(te,u,l);let $e=0;if(X){k?$e=bt.current:$e=vi(H,te),a&&(te=hr(te,H[$e-1]||-1/0,H[$e+1]||1/0));const It=te;te=bi({values:H,newValue:te,index:$e}),a&&k||($e=te.indexOf(It),bt.current=$e)}return{newValue:te,activeIndex:$e}},ee=On(T=>{const k=_n(T,C);if(!k)return;if(ce.current+=1,T.type==="mousemove"&&T.buttons===0){he(T);return}const{newValue:F,activeIndex:W}=I({finger:k,move:!0});vn({sliderRef:we,activeIndex:W,setActive:R}),q(F),!z&&ce.current>T1&&le(!0),G&&!bn(F,D)&&G(T,F,W)}),he=On(T=>{const k=_n(T,C);if(le(!1),!k)return;const{newValue:F}=I({finger:k,move:!0});R(-1),T.type==="touchend"&&O(-1),h&&h(T,F),C.current=void 0,Le()}),ke=On(T=>{if(r)return;Si()||T.preventDefault();const k=T.changedTouches[0];k!=null&&(C.current=k.identifier);const F=_n(T,C);if(F!==!1){const{newValue:Y,activeIndex:K}=I({finger:F});vn({sliderRef:we,activeIndex:K,setActive:R}),q(Y),G&&!bn(Y,D)&&G(T,Y,K)}ce.current=0;const W=yr(we.current);W.addEventListener("touchmove",ee,{passive:!0}),W.addEventListener("touchend",he,{passive:!0})}),Le=N.useCallback(()=>{const T=yr(we.current);T.removeEventListener("mousemove",ee),T.removeEventListener("mouseup",he),T.removeEventListener("touchmove",ee),T.removeEventListener("touchend",he)},[he,ee]);N.useEffect(()=>{const{current:T}=we;return T.addEventListener("touchstart",ke,{passive:Si()}),()=>{T.removeEventListener("touchstart",ke),Le()}},[Le,ke]),N.useEffect(()=>{r&&Le()},[r,Le]);const Tt=T=>k=>{var F;if((F=T.onMouseDown)==null||F.call(T,k),r||k.defaultPrevented||k.button!==0)return;k.preventDefault();const W=_n(k,C);if(W!==!1){const{newValue:K,activeIndex:Ve}=I({finger:W});vn({sliderRef:we,activeIndex:Ve,setActive:R}),q(K),G&&!bn(K,D)&&G(k,K,Ve)}ce.current=0;const Y=yr(we.current);Y.addEventListener("mousemove",ee,{passive:!0}),Y.addEventListener("mouseup",he)},je=Wn(X?H[0]:u,u,l),Mt=Wn(H[H.length-1],u,l)-je,Ut=(T={})=>{const k=Tn(T),F={onMouseDown:Tt(k||{})},W=A({},k,F);return A({},T,{ref:lt},W)},Cr=T=>k=>{var F;(F=T.onMouseOver)==null||F.call(T,k);const W=Number(k.currentTarget.getAttribute("data-index"));O(W)},Ar=T=>k=>{var F;(F=T.onMouseLeave)==null||F.call(T,k),O(-1)};return{active:L,axis:Je,axisProps:k1,dragging:z,focusedThumbIndex:vt,getHiddenInputProps:(T={})=>{var k;const F=Tn(T),W={onChange:Bt(F||{}),onFocus:He(F||{}),onBlur:Ue(F||{}),onKeyDown:ct(F||{})},Y=A({},F,W);return A({tabIndex:x,"aria-labelledby":t,"aria-orientation":m,"aria-valuemax":_(l),"aria-valuemin":_(u),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(k=e.step)!=null?k:void 0,disabled:r},T,Y,{style:A({},Tf,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Ut,getThumbProps:(T={})=>{const k=Tn(T),F={onMouseOver:Cr(k||{}),onMouseLeave:Ar(k||{})};return A({},T,k,F)},marks:xe,open:P,range:X,rootRef:lt,trackLeap:Mt,trackOffset:je,values:H,getThumbStyle:T=>({pointerEvents:L!==-1&&L!==T?"none":void 0})}}const N1=e=>!e||!Vr(e);function F1(e){return ln("MuiSlider",e)}const Qe=Jl("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"]),D1=e=>{const{open:t}=e;return{offset:gt(t&&Qe.valueLabelOpen),circle:Qe.valueLabelCircle,label:Qe.valueLabelLabel}};function wu(e){const{children:t,className:n,value:r}=e,a=D1(e);return t?N.cloneElement(t,{className:gt(t.props.className)},o.jsxs(N.Fragment,{children:[t.props.children,o.jsx("span",{className:gt(a.offset,n),"aria-hidden":!0,children:o.jsx("span",{className:a.circle,children:o.jsx("span",{className:a.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(wu.propTypes={children:f.element.isRequired,className:f.string,value:f.node});const B1=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function xi(e){return e}const U1=Ct("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ae(n.color)}`],n.size!=="medium"&&t[`size${Ae(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Qe.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Qe.dragging}`]:{[`& .${Qe.thumb}, & .${Qe.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{color:(e.vars||e).palette[n].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}}]}}),J1=Ct("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.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}}]}),V1=Ct("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{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.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:A({},e.vars?{backgroundColor:e.vars.palette.Slider[`${n}Track`],borderColor:e.vars.palette.Slider[`${n}Track`]}:A({backgroundColor:lo(e.palette[n].main,.62),borderColor:lo(e.palette[n].main,.62)},e.applyStyles("dark",{backgroundColor:io(e.palette[n].main,.5)}),e.applyStyles("dark",{borderColor:io(e.palette[n].main,.5)})))}))]}}),G1=Ct("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Ae(n.color)}`],n.size!=="medium"&&t[`thumbSize${Ae(n.size)}`]]}})(({theme:e})=>{var t;return{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%)"},[`&.${Qe.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.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${Qe.focusVisible}`]:A({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Js(e.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${Qe.active}`]:A({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Js(e.palette[n].main,.16)}`})}}))]}}),z1=Ct(wu,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>A({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%"},[`&.${Qe.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%"},[`&.${Qe.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"}}]})),W1=Ct("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>No(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({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}}]})),K1=Ct("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>No(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>A({},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}}]})),H1=e=>{const{disabled:t,dragging:n,marked:r,orientation:a,track:s,classes:i,color:l,size:u}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked",a==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",l&&`color${Ae(l)}`,u&&`size${Ae(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${Ae(u)}`,l&&`thumbColor${Ae(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Eo(c,F1,i)},q1=({children:e})=>e,ju=N.forwardRef(function(t,n){var r,a,s,i,l,u,c,d,h,m,v,_,y,g,x,j,C,L,R,P,O,z,le,ce;const D=Fo({props:t,name:"MuiSlider"}),q=$f(),{"aria-label":G,"aria-valuetext":X,"aria-labelledby":H,component:xe="span",components:ue={},componentsProps:Q={},color:Re="primary",classes:Ee,className:nt,disableSwap:vt=!1,disabled:Ke=!1,getAriaLabel:we,getAriaValueText:Ot,marks:lt=!1,max:He=100,min:Ue=0,orientation:ut="horizontal",shiftStep:ct=10,size:Bt="medium",step:bt=1,scale:Je=xi,slotProps:I,slots:ee,track:he="normal",valueLabelDisplay:ke="off",valueLabelFormat:Le=xi}=D,Tt=Be(D,B1),je=A({},D,{isRtl:q,max:He,min:Ue,classes:Ee,disabled:Ke,disableSwap:vt,orientation:ut,marks:lt,color:Re,size:Bt,step:bt,shiftStep:ct,scale:Je,track:he,valueLabelDisplay:ke,valueLabelFormat:Le}),{axisProps:Mt,getRootProps:Ut,getHiddenInputProps:Cr,getThumbProps:Ar,open:Pr,active:tr,axis:at,focusedThumbIndex:T,range:k,dragging:F,marks:W,values:Y,trackOffset:K,trackLeap:Ve,getThumbStyle:qe}=$1(A({},je,{rootRef:n}));je.marked=W.length>0&&W.some($=>$.label),je.dragging=F,je.focusedThumbIndex=T;const te=H1(je),$e=(r=(a=ee==null?void 0:ee.root)!=null?a:ue.Root)!=null?r:U1,It=(s=(i=ee==null?void 0:ee.rail)!=null?i:ue.Rail)!=null?s:J1,rr=(l=(u=ee==null?void 0:ee.track)!=null?u:ue.Track)!=null?l:V1,Or=(c=(d=ee==null?void 0:ee.thumb)!=null?d:ue.Thumb)!=null?c:G1,St=(h=(m=ee==null?void 0:ee.valueLabel)!=null?m:ue.ValueLabel)!=null?h:z1,Jt=(v=(_=ee==null?void 0:ee.mark)!=null?_:ue.Mark)!=null?v:W1,Vt=(y=(g=ee==null?void 0:ee.markLabel)!=null?g:ue.MarkLabel)!=null?y:K1,Tr=(x=(j=ee==null?void 0:ee.input)!=null?j:ue.Input)!=null?x:"input",Mr=(C=I==null?void 0:I.root)!=null?C:Q.root,cn=(L=I==null?void 0:I.rail)!=null?L:Q.rail,Ir=(R=I==null?void 0:I.track)!=null?R:Q.track,nr=(P=I==null?void 0:I.thumb)!=null?P:Q.thumb,ar=(O=I==null?void 0:I.valueLabel)!=null?O:Q.valueLabel,va=(z=I==null?void 0:I.mark)!=null?z:Q.mark,ba=(le=I==null?void 0:I.markLabel)!=null?le:Q.markLabel,dn=(ce=I==null?void 0:I.input)!=null?ce:Q.input,mn=kt({elementType:$e,getSlotProps:Ut,externalSlotProps:Mr,externalForwardedProps:Tt,additionalProps:A({},N1($e)&&{as:xe}),ownerState:A({},je,Mr==null?void 0:Mr.ownerState),className:[te.root,nt]}),Sa=kt({elementType:It,externalSlotProps:cn,ownerState:je,className:te.rail}),xa=kt({elementType:rr,externalSlotProps:Ir,additionalProps:{style:A({},Mt[at].offset(K),Mt[at].leap(Ve))},ownerState:A({},je,Ir==null?void 0:Ir.ownerState),className:te.track}),Er=kt({elementType:Or,getSlotProps:Ar,externalSlotProps:nr,ownerState:A({},je,nr==null?void 0:nr.ownerState),className:te.thumb}),wa=kt({elementType:St,externalSlotProps:ar,ownerState:A({},je,ar==null?void 0:ar.ownerState),className:te.valueLabel}),p=kt({elementType:Jt,externalSlotProps:va,ownerState:je,className:te.mark}),w=kt({elementType:Vt,externalSlotProps:ba,ownerState:je,className:te.markLabel}),E=kt({elementType:Tr,getSlotProps:Cr,externalSlotProps:dn,ownerState:je});return o.jsxs($e,A({},mn,{children:[o.jsx(It,A({},Sa)),o.jsx(rr,A({},xa)),W.filter($=>$.value>=Ue&&$.value<=He).map(($,B)=>{const re=Wn($.value,Ue,He),V=Mt[at].offset(re);let U;return he===!1?U=Y.indexOf($.value)!==-1:U=he==="normal"&&(k?$.value>=Y[0]&&$.value<=Y[Y.length-1]:$.value<=Y[0])||he==="inverted"&&(k?$.value<=Y[0]||$.value>=Y[Y.length-1]:$.value>=Y[0]),o.jsxs(N.Fragment,{children:[o.jsx(Jt,A({"data-index":B},p,!Vr(Jt)&&{markActive:U},{style:A({},V,p.style),className:gt(p.className,U&&te.markActive)})),$.label!=null?o.jsx(Vt,A({"aria-hidden":!0,"data-index":B},w,!Vr(Vt)&&{markLabelActive:U},{style:A({},V,w.style),className:gt(te.markLabel,w.className,U&&te.markLabelActive),children:$.label})):null]},B)}),Y.map(($,B)=>{const re=Wn($,Ue,He),V=Mt[at].offset(re),U=ke==="off"?q1:St;return o.jsx(U,A({},!Vr(U)&&{valueLabelFormat:Le,valueLabelDisplay:ke,value:typeof Le=="function"?Le(Je($),B):Le,index:B,open:Pr===B||tr===B||ke==="on",disabled:Ke},wa,{children:o.jsx(Or,A({"data-index":B},Er,{className:gt(te.thumb,Er.className,tr===B&&te.active,T===B&&te.focusVisible),style:A({},V,qe(B),Er.style),children:o.jsx(Tr,A({"data-index":B,"aria-label":we?we(B):G,"aria-valuenow":Je($),"aria-labelledby":H,"aria-valuetext":Ot?Ot(Je($),B):X,value:Y[B]},E))}))}),B)})]}))});process.env.NODE_ENV!=="production"&&(ju.propTypes={"aria-label":ks(f.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":f.string,"aria-valuetext":ks(f.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:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["primary","secondary","error","info","success","warning"]),f.string]),components:f.shape({Input:f.elementType,Mark:f.elementType,MarkLabel:f.elementType,Rail:f.elementType,Root:f.elementType,Thumb:f.elementType,Track:f.elementType,ValueLabel:f.elementType}),componentsProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),defaultValue:f.oneOfType([f.arrayOf(f.number),f.number]),disabled:f.bool,disableSwap:f.bool,getAriaLabel:f.func,getAriaValueText:f.func,marks:f.oneOfType([f.arrayOf(f.shape({label:f.node,value:f.number.isRequired})),f.bool]),max:f.number,min:f.number,name:f.string,onChange:f.func,onChangeCommitted:f.func,orientation:f.oneOf(["horizontal","vertical"]),scale:f.func,shiftStep:f.number,size:f.oneOfType([f.oneOf(["small","medium"]),f.string]),slotProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),slots:f.shape({input:f.elementType,mark:f.elementType,markLabel:f.elementType,rail:f.elementType,root:f.elementType,thumb:f.elementType,track:f.elementType,valueLabel:f.elementType}),step:f.number,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),tabIndex:f.number,track:f.oneOf(["inverted","normal",!1]),value:f.oneOfType([f.arrayOf(f.number),f.number]),valueLabelDisplay:f.oneOf(["auto","off","on"]),valueLabelFormat:f.oneOfType([f.func,f.string])});var X1="[object Number]";function Y1(e){return typeof e=="number"||Xt(e)&&Zt(e)==X1}const Ru=Ie.observer(e=>{const t=M.useTheme(),n=e.valueLabelFormat||(a=>`${a}`);function r(a,s){s===e.velocity||!Y1(s)||e.onVelocityChange(s)}return o.jsxs(o.Fragment,{children:[o.jsx(M.Typography,{sx:{textAlign:"center",fontSize:"14px",opacity:.8,color:t.palette.text.primary},children:n(e.velocity)}),o.jsx(ju,{value:e.velocity,onChange:r,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}})]})}),Cu=Ie.observer(({store:e})=>{const{t}=Ft.useTranslation(),n=Ie.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?r=>`v=${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:r})}`:r=>`v=${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:r})}`}}));return o.jsx(M.Stack,{sx:{margin:"0px 20px",marginBottom:"12px"},children:o.jsx(M.Stack,{sx:{width:"380px",maxWidth:"90%",margin:"auto"},children:o.jsx(Ru,{velocity:e.velocityInCurrentUnits,min:e.minVelocityInCurrentUnits,max:e.maxVelocityInCurrentUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,valueLabelFormat:n.valueLabelFormat})})})}),Z1=Ie.observer(({store:e,children:t})=>{const{t:n}=Ft.useTranslation();function r(d,h){(h==="translate"||h==="rotate")&&e.setSelectedCartesianMotionType(h)}wo(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function a(d,h){const m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose,v=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;m&&await e.withMotionLock(async()=>{await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:v,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.velocityInCurrentUnits,axis:d.axis,direction:d.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:h.mm}:{type:"rotate",distanceRads:$t.degreesToRadians(h.degrees)}})})}async function s(d){if(!e.isLocked){if(e.activeDiscreteIncrement)return a(d,e.activeDiscreteIncrement);d.motionType==="translate"?await e.jogger.startTCPTranslation({axis:d.axis,direction:d.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:d.axis,direction:d.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.jogger.stop()}const l=[{id:"x",color:"#F14D42",icon:o.jsx(Up,{})},{id:"y",color:"#42A705",icon:o.jsx(Vp,{})},{id:"z",color:"#0075FF",icon:o.jsx(zp,{})}];function u(d){return n("General.mm.variable",{amount:d.toFixed(1)})}function c(d){return n("General.degree.variable",{amount:$t.radiansToDegrees(d).toFixed(1)})}return o.jsxs(M.Stack,{flexGrow:1,justifyContent:"space-between",children:[o.jsxs(M.Stack,{children:[o.jsx(Hp,{store:e}),o.jsx(P1,{store:e})]}),o.jsxs(M.Stack,{width:"80%",maxWidth:"296px",marginLeft:"auto",marginRight:"auto",marginTop:"16px",gap:"12px",children:[o.jsxs(M.ToggleButtonGroup,{value:e.selectedCartesianMotionType,onChange:r,exclusive:!0,"aria-label":n("Jogging.Cartesian.MotionType.lb"),children:[o.jsx(M.ToggleButton,{value:"translate",children:n("Jogging.Cartesian.Translation.bt")}),o.jsx(M.ToggleButton,{value:"rotate",children:n("Jogging.Cartesian.Rotation.bt")})]}),o.jsx(uu,{store:e,children:o.jsxs(M.Stack,{gap:"12px",children:[e.selectedCartesianMotionType==="translate"&&l.map(d=>o.jsx(co,{color:d.color,disabled:e.isLocked,label:o.jsxs(o.Fragment,{children:[d.icon,o.jsx(M.Typography,{sx:{fontSize:"24px",color:"white"},children:d.id.toUpperCase()})]}),getDisplayedValue:()=>{var h;return u(((h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:h.position[d.id])||0)},startJogging:h=>s({axis:d.id,motionType:"translate",direction:h}),stopJogging:i},d.id)),e.selectedCartesianMotionType==="rotate"&&l.map(d=>o.jsx(co,{color:d.color,disabled:e.isLocked,label:o.jsxs(o.Fragment,{children:[o.jsx(Kp,{}),o.jsx(M.Typography,{sx:{fontSize:"24px",color:"white"},children:d.id.toUpperCase()})]}),getDisplayedValue:()=>{var h,m;return c(((m=(h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:h.orientation)==null?void 0:m[d.id])||0)},startJogging:h=>s({axis:d.id,motionType:"rotate",direction:h}),stopJogging:i},d.id))]})})]}),o.jsxs(M.Stack,{children:[o.jsx(Su,{store:e}),o.jsx(Cu,{store:e}),t]})]})}),Q1=Ie.observer(({store:e})=>{const t=Z.useRef(null);Ft.useTranslation();function n(){const{joints:r}=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;return`[${r.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return xr(()=>{t.current&&(t.current.textContent=n())}),o.jsx(M.Stack,{alignItems:"left",spacing:2,sx:{padding:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:o.jsx(cu,{label:"Pose",value:n(),ref:t})})}),e_=Ie.observer(({store:e,children:t})=>{async function n(a){await e.jogger.startJointRotation({joint:a.joint,direction:a.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function r(){await e.jogger.stop()}return o.jsxs(M.Stack,{flexGrow:1,justifyContent:"space-between",children:[o.jsx(Q1,{store:e}),o.jsx(M.Stack,{marginTop:"0.8rem"}),o.jsx(uu,{store:e,children:o.jsx(M.Stack,{gap:"0.8rem",children:e.jogger.motionStream.joints.map(a=>{var u;const s=(u=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:u[a.index],i=(s==null?void 0:s.lower_limit)!==void 0?$t.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?$t.radiansToDegrees(s.upper_limit):void 0;return o.jsxs(M.Stack,{direction:"row",alignItems:"center",gap:2,children:[o.jsx(M.Typography,{sx:{flexGrow:1,textAlign:"right"},children:`J${a.index+1}`}),o.jsx(lu,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const c=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[a.index];return c!==void 0?$t.radiansToDegrees(c):void 0},startJogging:c=>n({joint:a.index,direction:c}),stopJogging:r},a.index),o.jsx(M.Typography,{sx:{flexGrow:1}})]},`joint-${a.index}`)})})}),o.jsx(Su,{store:e}),o.jsx(Cu,{store:e})]})});var wi=function(){try{var e=er(Object,"defineProperty");return e({},"",{}),e}catch{}}();function t_(e,t,n){t=="__proto__"&&wi?wi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function r_(e,t,n,r){for(var a=-1,s=e==null?0:e.length;++a<s;){var i=e[a];t(r,i,n(i),e)}return r}function n_(e){return function(t,n,r){for(var a=-1,s=Object(t),i=r(t),l=i.length;l--;){var u=i[++a];if(n(s[u],u,s)===!1)break}return t}}var a_=n_();function o_(e,t){return e&&a_(e,t,Jo)}function s_(e,t){return function(n,r){if(n==null)return n;if(!bu(n))return e(n,r);for(var a=n.length,s=-1,i=Object(n);++s<a&&r(i[s],s,i)!==!1;);return n}}var i_=s_(o_);function l_(e,t,n,r){return i_(e,function(a,s,i){t(r,a,n(a),i)}),r}var u_=1,c_=2;function d_(e,t,n,r){var a=n.length,s=a;if(e==null)return!s;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<s;){i=n[a];var l=i[0],u=e[l],c=i[1];if(i[2]){if(u===void 0&&!(l in e))return!1}else{var d=new jt,h;if(!(h===void 0?ya(c,u,u_|c_,r,d):h))return!1}}return!0}function Au(e){return e===e&&!qt(e)}function m_(e){for(var t=Jo(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Au(a)]}return t}function Pu(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function h_(e){var t=m_(e);return t.length==1&&t[0][2]?Pu(t[0][0],t[0][1]):function(n){return n===e||d_(n,e,t)}}var f_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p_=/^\w*$/;function Vo(e,t){if(yt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||fa(e)?!0:p_.test(e)||!f_.test(e)||t!=null&&e in Object(t)}var g_="Expected a function";function Go(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(g_);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var i=e.apply(this,r);return n.cache=s.set(a,i)||s,i};return n.cache=new(Go.Cache||Pt),n}Go.Cache=Pt;var y_=500;function __(e){var t=Go(e,function(r){return n.size===y_&&n.clear(),r}),n=t.cache;return t}var v_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b_=/\\(\\)?/g,S_=__(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(v_,function(n,r,a,s){t.push(a?s.replace(b_,"$1"):r||n)}),t});function x_(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var w_=1/0,ji=Nt?Nt.prototype:void 0,Ri=ji?ji.toString:void 0;function Ou(e){if(typeof e=="string")return e;if(yt(e))return x_(e,Ou)+"";if(fa(e))return Ri?Ri.call(e):"";var t=e+"";return t=="0"&&1/e==-w_?"-0":t}function Tu(e){return e==null?"":Ou(e)}function Mu(e,t){return yt(e)?e:Vo(e,t)?[e]:S_(Tu(e))}var j_=1/0;function _a(e){if(typeof e=="string"||fa(e))return e;var t=e+"";return t=="0"&&1/e==-j_?"-0":t}function Iu(e,t){t=Mu(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[_a(t[n++])];return n&&n==r?e:void 0}function R_(e,t,n){var r=e==null?void 0:Iu(e,t);return r===void 0?n:r}function C_(e,t){return e!=null&&t in Object(e)}function A_(e,t,n){t=Mu(t,e);for(var r=-1,a=t.length,s=!1;++r<a;){var i=_a(t[r]);if(!(s=e!=null&&n(e,i)))break;e=e[i]}return s||++r!=a?s:(a=e==null?0:e.length,!!a&&Uo(a)&&yu(i,a)&&(yt(e)||pu(e)))}function P_(e,t){return e!=null&&A_(e,t,C_)}var O_=1,T_=2;function M_(e,t){return Vo(e)&&Au(t)?Pu(_a(e),t):function(n){var r=R_(n,e);return r===void 0&&r===t?P_(n,e):ya(t,r,O_|T_)}}function I_(e){return e}function E_(e){return function(t){return t==null?void 0:t[e]}}function k_(e){return function(t){return Iu(t,e)}}function L_(e){return Vo(e)?E_(_a(e)):k_(e)}function $_(e){return typeof e=="function"?e:e==null?I_:typeof e=="object"?yt(e)?M_(e[0],e[1]):h_(e):L_(e)}function N_(e,t){return function(n,r){var a=yt(n)?r_:l_,s={};return a(n,e,$_(r),s)}}var xn=N_(function(e,t,n){t_(e,n,t)}),F_=0;function D_(e){var t=++F_;return Tu(e)+t}const yo=[{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}],B_=[{id:"continuous"},...yo];class zo{constructor(t,n,r,a){var s,i;this.jogger=t,this.motionGroupSpec=n,this.coordSystems=r,this.tcps=a,this.selectedTabId="cartesian",this.manualActivationRequired=!0,this.activationState="inactive",this.activationError=null,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJoggingInProgress=!1,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.disposers=[];for(const l of r)if(l.coordinate_system===""){l.coordinate_system="world";break}this.selectedCoordSystemId=((s=r[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((i=a[0])==null?void 0:i.id)||"",dt.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(dt.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:n}=t,[r,{coordinatesystems:a},{tcps:s}]=await Promise.all([n.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),n.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),n.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new zo(t,r,a||[],s||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}async deactivate(t={}){if(this.activationState==="inactive")return;const n=this.jogger.activeWebsocket;this.activationState="inactive",this.jogger.setJoggingMode("increment"),n&&await n.closed(),t.requireManualReactivation&&dt.runInAction(()=>{this.manualActivationRequired=!0})}async activate(t={}){const{currentTab:n,selectedTcpId:r,activeCoordSystemId:a,activeDiscreteIncrement:s,jogger:i}=this;if(this.activationState!=="loading"&&!(this.manualActivationRequired&&!t.manual)){dt.runInAction(()=>{this.activationState="loading",this.activationError=null});try{await this.jogger.nova.api.controller.setDefaultMode(this.jogger.motionStream.controllerId,"MODE_CONTROL")}catch(l){console.error(l)}if(n.id==="cartesian"){const l={tcpId:r,coordSystemId:a};s?i.setJoggingMode("increment",l):i.setJoggingMode("cartesian",l)}else i.setJoggingMode("joint");if(i.activeWebsocket)try{i.stop(),await i.activeWebsocket.nextMessage()}catch(l){dt.runInAction(()=>{this.activationState="inactive",this.activationError=l});return}dt.runInAction(()=>{this.activationState="active",t.manual&&(this.manualActivationRequired=!1)})}}loadFromLocalStorage(){const t=$t.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 B_}get discreteIncrementOptions(){return yo}get incrementOptionsById(){return xn(this.incrementOptions,t=>t.id)}get tabsById(){return xn(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 xn(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 xn(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:yo.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInCurrentUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInCurrentUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInCurrentUnits(){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}setIncrementJoggingInProgress(t){this.incrementJoggingInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}async withMotionLock(t){const n=D_();this.locks.add(n);try{return await t()}finally{this.locks.delete(n)}}}const U_=Qr(Ie.observer(e=>{const t=_o.isString(e.nova)?new $t.NovaClient({instanceUrl:e.nova}):e.nova,n=Ie.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){dt.runInAction(()=>{n.loadingError=null,n.joggingStore=null});try{const a=await t.connectJogger(e.motionGroupId),s=await zo.loadFor(a);dt.runInAction(()=>{n.joggingStore=s}),e.onSetup&&e.onSetup(s)}catch(a){n.loadingError=a}}return Z.useEffect(()=>(r(),()=>{var a;(a=n.joggingStore)==null||a.dispose()}),[e.nova]),Z.useEffect(()=>{const a=n.joggingStore;a&&(e.locked?a.locks.add("external"):a.locks.delete("external"))},[e.locked]),o.jsx(M.Stack,{sx:{maxWidth:"460px",minWidth:"350px",overflowY:"auto",position:"relative",height:"100%"},children:o.jsx(M.Paper,{sx:{height:"100%"},children:n.joggingStore?o.jsx(J_,{store:n.joggingStore,children:e.children}):o.jsx(Qn,{message:"Loading jogging",error:n.loadingError})})})})),J_=Ie.observer(({store:e,children:t})=>{Z.useEffect(()=>{function r(){e.deactivate()}function a(){e.activate()}return window.addEventListener("blur",r),window.addEventListener("focus",a),()=>{window.removeEventListener("blur",r),window.removeEventListener("focus",a)}}),wo(()=>[e.currentTab,e.selectedTcpId,e.activeCoordSystemId,e.activeDiscreteIncrement],()=>{e.activationState==="active"&&e.activate()});function n(){if(e.currentTab.id==="cartesian")return o.jsx(o.Fragment,{children:o.jsx(Z1,{store:e,children:t})});if(e.currentTab.id==="joint")return o.jsx(o.Fragment,{children:o.jsx(e_,{store:e,children:t})})}return o.jsxs(M.Stack,{flexGrow:1,height:"100%",children:[o.jsx(M.Tabs,{value:e.tabIndex,onChange:e.onTabChange,children:e.tabs.map(r=>o.jsx(M.Tab,{label:r.label,id:`jogging-tab-${r.id}`,"aria-controls":`jogging-tab-${r.id}`},r.id))}),o.jsx(M.Stack,{flexGrow:1,position:"relative",children:n()})]})});function V_(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function G_({baseUrl:e=V_(),...t}){return o.jsxs(M.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:[o.jsx(M.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),o.jsxs(M.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[o.jsx(M.Typography,{color:"#fff",children:"Found no devices to connect to."}),o.jsx(M.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),o.jsx(M.DialogActions,{children:o.jsxs(M.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[o.jsx(M.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),o.jsx(M.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const z_=Array(6).fill(2*Math.PI),ht={white:"#FFFFFF",midnightblue:"#001337",lightbuttonblue:"#47D3FF",midnightgray:"#DDE0E4",midnightgray500:"#828B9B",skyblue500:"#06B8F1",skyblue600:"#0094CE",darkishblue:"#262F42",darkestblue:"#101629",grayishblue:"#505968",darkgrayishblue:"#363c4b",scaryred:"#FF0E65",tealGreen:"#1AC0B2",magenta:"#EA3785"},W_={mode:"dark",colors:{primary:ht.skyblue500,textDefault:ht.white,textSubtle:ht.midnightgray,background:{default:ht.darkishblue,panel:ht.darkestblue}}},K_={mode:"light",colors:{primary:ht.skyblue500,textDefault:ht.darkishblue,textSubtle:ht.midnightgray,background:{default:ht.skyblue500,panel:ht.white}}};function H_(e){var a,s,i,l;let t=!0;((a=e.palette)==null?void 0:a.mode)==="light"?t=!1:((s=e.palette)==null?void 0:s.mode)!=="dark"&&(t=!(typeof window<"u"&&((l=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:l.matches)));const n=t?W_:K_,r=uo({palette:{mode:n.mode,primary:{main:n.colors.primary},background:{default:n.colors.background.default,paper:n.colors.background.panel}},typography:{allVariants:{color:n.colors.textDefault}},components:{MuiSelect:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor","& > div":{padding:"4px 16px"},"& fieldset":{border:t?"none":void 0}}}},MuiChip:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor"}}},MuiToggleButtonGroup:{styleOverrides:{root:{"& > button":{borderRadius:"8px",textTransform:"none",paddingTop:"4px",paddingBottom:"4px",width:"100%",borderWidth:0,backgroundColor:t?"#3d4455":void 0,color:t?"rgba(255, 255, 255, 0.8)":void 0,"&.Mui-selected":t?{color:"white",backgroundColor:"#505968"}:void 0}}}},MuiTabs:{styleOverrides:{root:{backgroundColor:t?"#101629":void 0,minHeight:"42px"}}},MuiTab:{styleOverrides:{root:{minHeight:"42px",textTransform:"none","&.Mui-selected":t?{color:"white",backgroundColor:"#404554"}:void 0}}}},nova:n});return e?uo(r,e):r}exports.JoggingCartesianAxisControl=co;exports.JoggingJointRotationControl=lu;exports.JoggingPanel=U_;exports.LoadingCover=Qn;exports.LoadingErrorMessage=tl;exports.NoMotionGroupModal=G_;exports.PresetEnvironment=cm;exports.Robot=um;exports.SafetyZonesRenderer=hm;exports.SupportedRobot=bl;exports.VelocitySlider=Ru;exports.WandelscriptEditor=Zd;exports.createNovaMuiTheme=H_;exports.defaultAxisConfig=z_;exports.defaultGetModel=jo;exports.useAnimationFrame=xr;exports.useAutorun=_l;exports.useMounted=ea;exports.useReaction=wo;
|
|
84
84
|
//# sourceMappingURL=index.cjs.map
|