@wandelbots/wandelbots-js-react-components 2.54.5-pr.feat-upgrade-jogging-to-v2.404.50fa670 → 2.54.5-pr.feat-upgrade-robot-motions-to-v2.407.56c347d

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.
Files changed (42) hide show
  1. package/dist/components/ProgramStateIndicator.d.ts +3 -3
  2. package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
  3. package/dist/components/RobotCard.d.ts +4 -3
  4. package/dist/components/RobotCard.d.ts.map +1 -1
  5. package/dist/components/robots/DHRobot.d.ts.map +1 -1
  6. package/dist/components/robots/Robot.d.ts +1 -1
  7. package/dist/components/robots/Robot.d.ts.map +1 -1
  8. package/dist/components/robots/RobotAnimator.d.ts +2 -2
  9. package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
  10. package/dist/components/robots/SupportedRobot.d.ts +3 -3
  11. package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
  12. package/dist/components/robots/manufacturerHomePositions.d.ts +1 -1
  13. package/dist/components/safetyBar/OperationModeIndicator.d.ts +2 -2
  14. package/dist/components/safetyBar/OperationModeIndicator.d.ts.map +1 -1
  15. package/dist/components/safetyBar/SafetyBar.d.ts +3 -3
  16. package/dist/components/safetyBar/SafetyBar.d.ts.map +1 -1
  17. package/dist/components/safetyBar/SafetyStateIndicator.d.ts +2 -2
  18. package/dist/components/safetyBar/SafetyStateIndicator.d.ts.map +1 -1
  19. package/dist/index.cjs +2 -2
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.js +12 -12
  22. package/dist/index.js.map +1 -1
  23. package/dist/lib/ConnectedMotionGroup.d.ts +7 -1
  24. package/dist/lib/ConnectedMotionGroup.d.ts.map +1 -1
  25. package/dist/lib/MotionStreamConnection.d.ts.map +1 -1
  26. package/dist/lib/motionStateUpdate.d.ts +2 -0
  27. package/dist/lib/motionStateUpdate.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/src/components/ProgramStateIndicator.tsx +3 -6
  30. package/src/components/RobotCard.tsx +4 -7
  31. package/src/components/robots/DHRobot.tsx +2 -3
  32. package/src/components/robots/Robot.tsx +1 -1
  33. package/src/components/robots/RobotAnimator.test.tsx +7 -22
  34. package/src/components/robots/RobotAnimator.tsx +8 -13
  35. package/src/components/robots/SupportedRobot.tsx +3 -6
  36. package/src/components/robots/manufacturerHomePositions.ts +1 -1
  37. package/src/components/safetyBar/OperationModeIndicator.tsx +2 -2
  38. package/src/components/safetyBar/SafetyBar.tsx +3 -6
  39. package/src/components/safetyBar/SafetyStateIndicator.tsx +2 -2
  40. package/src/lib/ConnectedMotionGroup.ts +22 -4
  41. package/src/lib/MotionStreamConnection.ts +7 -42
  42. package/src/lib/motionStateUpdate.ts +41 -0
package/dist/index.cjs CHANGED
@@ -147,7 +147,7 @@ and limitations under the License.
147
147
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Lu]=this[Lu]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Rn(a);n[i]||(zO(o,a),n[i]=!0)}return U.isArray(t)?t.forEach(s):s(t),this}};ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(ct.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});U.freezeMethods(ct);function qa(e,t){const r=this||ho,n=t||r,o=ct.from(n.headers);let s=n.data;return U.forEach(e,function(i){s=i.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Jp(e){return!!(e&&e.__CANCEL__)}function bn(e,t,r){de.call(this,e??"canceled",de.ERR_CANCELED,t,r),this.name="CanceledError"}U.inherits(bn,de,{__CANCEL__:!0});function Yp(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function GO(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function HO(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[o]=l,n[o]=c;let d=s,h=0;for(;d!==o;)h+=r[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function qO(e,t){let r=0,n=1e3/t,o,s;const a=(c,u=Date.now())=>{r=u,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?a(c,u):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},n-d)))},()=>o&&a(o)]}const xs=(e,t,r=3)=>{let n=0;const o=HO(50,250);return qO(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-n,c=o(l),u=a<=i;n=a;const d={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-a)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Fu=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},$u=e=>(...t)=>U.asap(()=>e(...t)),WO=Ke.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ke.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,JO=Ke.hasStandardBrowserEnv?{write(e,t,r,n,o,s,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];U.isNumber(r)&&i.push(`expires=${new Date(r).toUTCString()}`),U.isString(n)&&i.push(`path=${n}`),U.isString(o)&&i.push(`domain=${o}`),s===!0&&i.push("secure"),U.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function YO(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function KO(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Kp(e,t,r){let n=!YO(t);return e&&(n||r==!1)?KO(e,t):t}const Nu=e=>e instanceof ct?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(c,u,d,h){return U.isPlainObject(c)&&U.isPlainObject(u)?U.merge.call({caseless:h},c,u):U.isPlainObject(u)?U.merge({},u):U.isArray(u)?u.slice():u}function o(c,u,d,h){if(U.isUndefined(u)){if(!U.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function s(c,u){if(!U.isUndefined(u))return n(void 0,u)}function a(c,u){if(U.isUndefined(u)){if(!U.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function i(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(c,u,d)=>o(Nu(c),Nu(u),d,!0)};return U.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,h=d(e[u],t[u],u);U.isUndefined(h)&&d!==i||(r[u]=h)}),r}const Qp=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=ct.from(a),t.url=Hp(Kp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),U.isFormData(r)){if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(U.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&a.set(u,d)})}}if(Ke.hasStandardBrowserEnv&&(n&&U.isFunction(n)&&(n=n(t)),n||n!==!1&&WO(t.url))){const l=o&&s&&JO.read(s);l&&a.set(o,l)}return t},QO=typeof XMLHttpRequest<"u",XO=QO&&function(e){return new Promise(function(r,n){const o=Qp(e);let s=o.data;const a=ct.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,p,f;function m(){p&&p(),f&&f(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function S(){if(!y)return;const v=ct.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),I={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:v,config:e,request:y};Yp(function(w){r(w),m()},function(w){n(w),m()},I),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(n(new de("Request aborted",de.ECONNABORTED,e,y)),y=null)},y.onerror=function(T){const I=T&&T.message?T.message:"Network Error",E=new de(I,de.ERR_NETWORK,e,y);E.event=T||null,n(E),y=null},y.ontimeout=function(){let T=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||qp;o.timeoutErrorMessage&&(T=o.timeoutErrorMessage),n(new de(T,I.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&U.forEach(a.toJSON(),function(T,I){y.setRequestHeader(I,T)}),U.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),i&&i!=="json"&&(y.responseType=o.responseType),c&&([h,f]=xs(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,p]=xs(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=v=>{y&&(n(!v||v.type?new bn(null,e,y):v),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const R=GO(o.url);if(R&&Ke.protocols.indexOf(R)===-1){n(new de("Unsupported protocol "+R+":",de.ERR_BAD_REQUEST,e));return}y.send(s||null)})},ZO=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof de?u:new bn(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>U.asap(i),l}},eT=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},tT=async function*(e,t){for await(const r of rT(e))yield*eT(r,t)},rT=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},zu=(e,t,r,n)=>{const o=tT(e,t);let s=0,a,i=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=s+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Gu=64*1024,{isFunction:ko}=U,nT=(({Request:e,Response:t})=>({Request:e,Response:t}))(U.global),{ReadableStream:Hu,TextEncoder:qu}=U.global,Wu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oT=e=>{e=U.merge.call({skipUndefined:!0},nT,e);const{fetch:t,Request:r,Response:n}=e,o=t?ko(t):typeof fetch=="function",s=ko(r),a=ko(n);if(!o)return!1;const i=o&&ko(Hu),l=o&&(typeof qu=="function"?(f=>m=>f.encode(m))(new qu):async f=>new Uint8Array(await new r(f).arrayBuffer())),c=s&&i&&Wu(()=>{let f=!1;const m=new r(Ke.origin,{body:new Hu,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),u=a&&i&&Wu(()=>U.isReadableStream(new n("").body)),d={stream:u&&(f=>f.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(m,y)=>{let S=m&&m[f];if(S)return S.call(m);throw new de(`Response type '${f}' is not supported`,de.ERR_NOT_SUPPORT,y)})});const h=async f=>{if(f==null)return 0;if(U.isBlob(f))return f.size;if(U.isSpecCompliantForm(f))return(await new r(Ke.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(U.isArrayBufferView(f)||U.isArrayBuffer(f))return f.byteLength;if(U.isURLSearchParams(f)&&(f=f+""),U.isString(f))return(await l(f)).byteLength},p=async(f,m)=>{const y=U.toFiniteNumber(f.getContentLength());return y??h(m)};return async f=>{let{url:m,method:y,data:S,signal:R,cancelToken:v,timeout:T,onDownloadProgress:I,onUploadProgress:E,responseType:w,headers:P,withCredentials:k="same-origin",fetchOptions:b}=Qp(f),A=t||fetch;w=w?(w+"").toLowerCase():"text";let V=ZO([R,v&&v.toAbortSignal()],T),M=null;const D=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let ne;try{if(E&&c&&y!=="get"&&y!=="head"&&(ne=await p(P,S))!==0){let ee=new r(m,{method:"POST",body:S,duplex:"half"}),ce;if(U.isFormData(S)&&(ce=ee.headers.get("content-type"))&&P.setContentType(ce),ee.body){const[be,Me]=Fu(ne,xs($u(E)));S=zu(ee.body,Gu,be,Me)}}U.isString(k)||(k=k?"include":"omit");const Q=s&&"credentials"in r.prototype,oe={...b,signal:V,method:y.toUpperCase(),headers:P.normalize().toJSON(),body:S,duplex:"half",credentials:Q?k:void 0};M=s&&new r(m,oe);let X=await(s?A(M,b):A(m,oe));const se=u&&(w==="stream"||w==="response");if(u&&(I||se&&D)){const ee={};["status","statusText","headers"].forEach(xe=>{ee[xe]=X[xe]});const ce=U.toFiniteNumber(X.headers.get("content-length")),[be,Me]=I&&Fu(ce,xs($u(I),!0))||[];X=new n(zu(X.body,Gu,be,()=>{Me&&Me(),D&&D()}),ee)}w=w||"text";let F=await d[U.findKey(d,w)||"text"](X,f);return!se&&D&&D(),await new Promise((ee,ce)=>{Yp(ee,ce,{data:F,headers:ct.from(X.headers),status:X.status,statusText:X.statusText,config:f,request:M})})}catch(Q){throw D&&D(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,f,M),{cause:Q.cause||Q}):de.from(Q,Q&&Q.code,f,M)}}},sT=new Map,Xp=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let a=s.length,i=a,l,c,u=sT;for(;i--;)l=s[i],c=u.get(l),c===void 0&&u.set(l,c=i?new Map:oT(t)),u=c;return c};Xp();const kl={http:CO,xhr:XO,fetch:{get:Xp}};U.forEach(kl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ju=e=>`- ${e}`,aT=e=>U.isFunction(e)||e===null||e===!1;function iT(e,t){e=U.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let a=0;a<r;a++){n=e[a];let i;if(o=n,!aT(n)&&(o=kl[(i=String(n)).toLowerCase()],o===void 0))throw new de(`Unknown adapter '${i}'`);if(o&&(U.isFunction(o)||(o=o.get(t))))break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=r?a.length>1?`since :
148
148
  `+a.map(Ju).join(`
149
149
  `):" "+Ju(a[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o}const Zp={getAdapter:iT,adapters:kl};function Wa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bn(null,e)}function Yu(e){return Wa(e),e.headers=ct.from(e.headers),e.data=qa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zp.getAdapter(e.adapter||ho.adapter,e)(e).then(function(n){return Wa(e),n.data=qa.call(e,e.transformResponse,n),n.headers=ct.from(n.headers),n},function(n){return Jp(n)||(Wa(e),n&&n.response&&(n.response.data=qa.call(e,e.transformResponse,n.response),n.response.headers=ct.from(n.response.headers))),Promise.reject(n)})}const ef="1.13.2",aa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{aa[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ku={};aa.transitional=function(t,r,n){function o(s,a){return"[Axios v"+ef+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,i)=>{if(t===!1)throw new de(o(a," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED);return r&&!Ku[a]&&(Ku[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,i):!0}};aa.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function lT(e,t,r){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=t[s];if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new de("option "+s+" must be "+l,de.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new de("Unknown option "+s,de.ERR_BAD_OPTION)}}const Yo={assertOptions:lT,validators:aa},Mt=Yo.validators;let Cr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Uu,response:new Uu}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
150
- `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ir(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Yo.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),o!=null&&(U.isFunction(o)?r.paramsSerializer={serialize:o}:Yo.assertOptions(o,{encode:Mt.function,serialize:Mt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Yo.assertOptions(r,{baseUrl:Mt.spelling("baseURL"),withXsrfToken:Mt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&U.merge(s.common,s[r.method]);s&&U.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=ct.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const f=[Yu.bind(this),void 0];for(f.unshift(...i),f.push(...c),h=f.length,u=Promise.resolve(r);d<h;)u=u.then(f[d++],f[d++]);return u}h=i.length;let p=r;for(;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(y){m.call(this,y);break}}try{u=Yu.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Ir(this.defaults,t);const r=Kp(t.baseURL,t.url,t.allowAbsoluteUrls);return Hp(r,t.params,t.paramsSerializer)}};U.forEach(["delete","get","head","options"],function(t){Cr.prototype[t]=function(r,n){return this.request(Ir(n||{},{method:t,url:r,data:(n||{}).data}))}});U.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,i){return this.request(Ir(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Cr.prototype[t]=r(),Cr.prototype[t+"Form"]=r(!0)});let cT=class tf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{n.subscribe(i),s=i}).then(o);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,i){n.reason||(n.reason=new bn(s,a,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new tf(function(o){t=o}),cancel:t}}};function uT(e){return function(r){return e.apply(null,r)}}function dT(e){return U.isObject(e)&&e.isAxiosError===!0}const Oi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oi).forEach(([e,t])=>{Oi[t]=e});function rf(e){const t=new Cr(e),r=_p(Cr.prototype.request,t);return U.extend(r,Cr.prototype,t,{allOwnKeys:!0}),U.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return rf(Ir(e,o))},r}const B=rf(ho);B.Axios=Cr;B.CanceledError=bn;B.CancelToken=cT;B.isCancel=Jp;B.VERSION=ef;B.toFormData=sa;B.AxiosError=de;B.Cancel=B.CanceledError;B.all=function(t){return Promise.all(t)};B.spread=uT;B.isAxiosError=dT;B.mergeConfig=Ir;B.AxiosHeaders=ct;B.formToJSON=e=>Wp(U.isHTMLForm(e)?new FormData(e):e);B.getAdapter=Zp.getAdapter;B.HttpStatusCode=Oi;B.default=B;const{Axios:jP,AxiosError:Ti,CanceledError:DP,isCancel:BP,CancelToken:UP,VERSION:LP,all:FP,Cancel:$P,isAxiosError:hT,spread:NP,toFormData:zP,AxiosHeaders:GP,HttpStatusCode:HP,formToJSON:qP,getAdapter:WP,mergeConfig:JP}=B;function pT(e){var t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<e.length;n++){var o=e[n];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(n>0&&(o=o.replace(/^[\/]+/,"")),n<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function Ja(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),pT(e)}var gt={},Qu;function fT(){if(Qu)return gt;Qu=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.PathError=gt.TokenData=void 0,gt.parse=c,gt.compile=u,gt.match=p,gt.pathToRegexp=f,gt.stringify=T;const e="/",t=w=>w,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(w){return w.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}function a(w){return w.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class i{constructor(P,k){this.tokens=P,this.originalPath=k}}gt.TokenData=i;class l extends TypeError{constructor(P,k){let b=P;k&&(b+=`: ${k}`),b+="; visit https://git.new/pathToRegexpError for info",super(b),this.originalPath=k}}gt.PathError=l;function c(w,P={}){const{encodePath:k=t}=P,b=[...w],A=[];let V=0,M=0;function D(){let Q="";if(r.test(b[V]))do Q+=b[V++];while(n.test(b[V]));else if(b[V]==='"'){let oe=V;for(;V++<b.length;){if(b[V]==='"'){V++,oe=0;break}b[V]==="\\"&&V++,Q+=b[V]}if(oe)throw new l(`Unterminated quote at index ${oe}`,w)}if(!Q)throw new l(`Missing parameter name at index ${V}`,w);return Q}for(;V<b.length;){const Q=b[V],oe=o[Q];oe?A.push({type:oe,index:V++,value:Q}):Q==="\\"?A.push({type:"escape",index:V++,value:b[V++]}):Q===":"?A.push({type:"param",index:V++,value:D()}):Q==="*"?A.push({type:"wildcard",index:V++,value:D()}):A.push({type:"char",index:V++,value:Q})}A.push({type:"end",index:V,value:""});function ne(Q){const oe=[];for(;;){const X=A[M++];if(X.type===Q)break;if(X.type==="char"||X.type==="escape"){let se=X.value,F=A[M];for(;F.type==="char"||F.type==="escape";)se+=F.value,F=A[++M];oe.push({type:"text",value:k(se)});continue}if(X.type==="param"||X.type==="wildcard"){oe.push({type:X.type,name:X.value});continue}if(X.type==="{"){oe.push({type:"group",tokens:ne("}")});continue}throw new l(`Unexpected ${X.type} at index ${X.index}, expected ${Q}`,w)}return oe}return new i(ne("end"),w)}function u(w,P={}){const{encode:k=encodeURIComponent,delimiter:b=e}=P,A=typeof w=="object"?w:c(w,P),V=d(A.tokens,b,k);return function(D={}){const[ne,...Q]=V(D);if(Q.length)throw new TypeError(`Missing parameters: ${Q.join(", ")}`);return ne}}function d(w,P,k){const b=w.map(A=>h(A,P,k));return A=>{const V=[""];for(const M of b){const[D,...ne]=M(A);V[0]+=D,V.push(...ne)}return V}}function h(w,P,k){if(w.type==="text")return()=>[w.value];if(w.type==="group"){const A=d(w.tokens,P,k);return V=>{const[M,...D]=A(V);return D.length?[""]:[M]}}const b=k||t;return w.type==="wildcard"&&k!==!1?A=>{const V=A[w.name];if(V==null)return["",w.name];if(!Array.isArray(V)||V.length===0)throw new TypeError(`Expected "${w.name}" to be a non-empty array`);return[V.map((M,D)=>{if(typeof M!="string")throw new TypeError(`Expected "${w.name}/${D}" to be a string`);return b(M)}).join(P)]}:A=>{const V=A[w.name];if(V==null)return["",w.name];if(typeof V!="string")throw new TypeError(`Expected "${w.name}" to be a string`);return[b(V)]}}function p(w,P={}){const{decode:k=decodeURIComponent,delimiter:b=e}=P,{regexp:A,keys:V}=f(w,P),M=V.map(D=>k===!1?t:D.type==="param"?k:ne=>ne.split(b).map(k));return function(ne){const Q=A.exec(ne);if(!Q)return!1;const oe=Q[0],X=Object.create(null);for(let se=1;se<Q.length;se++){if(Q[se]===void 0)continue;const F=V[se-1],ee=M[se-1];X[F.name]=ee(Q[se])}return{path:oe,params:X}}}function f(w,P={}){const{delimiter:k=e,end:b=!0,sensitive:A=!1,trailing:V=!0}=P,M=[],D=A?"":"i",ne=[];for(const X of m(w,[])){const se=typeof X=="object"?X:c(X,P);for(const F of y(se.tokens,0,[]))ne.push(S(F,k,M,se.originalPath))}let Q=`^(?:${ne.join("|")})`;return V&&(Q+=`(?:${a(k)}$)?`),Q+=b?"$":`(?=${a(k)}|$)`,{regexp:new RegExp(Q,D),keys:M}}function m(w,P){if(Array.isArray(w))for(const k of w)m(k,P);else P.push(w);return P}function*y(w,P,k){if(P===w.length)return yield k;const b=w[P];if(b.type==="group")for(const A of y(b.tokens,0,k.slice()))yield*y(w,P+1,A);else k.push(b);yield*y(w,P+1,k)}function S(w,P,k,b){let A="",V="",M=!0;for(const D of w){if(D.type==="text"){A+=a(D.value),V+=D.value,M||(M=D.value.includes(P));continue}if(D.type==="param"||D.type==="wildcard"){if(!M&&!V)throw new l(`Missing text before "${D.name}" ${D.type}`,b);D.type==="param"?A+=`(${R(P,M?"":V)}+)`:A+="([\\s\\S]+)",k.push(D),V="",M=!1;continue}}return A}function R(w,P){return P.length<2?w.length<2?`[^${a(w+P)}]`:`(?:(?!${a(w)})[^${a(P)}])`:w.length<2?`(?:(?!${a(P)})[^${a(w)}])`:`(?:(?!${a(P)}|${a(w)})[\\s\\S])`}function v(w){let P="",k=0;function b(A){return I(A)&&E(w[k])?A:JSON.stringify(A)}for(;k<w.length;){const A=w[k++];if(A.type==="text"){P+=s(A.value);continue}if(A.type==="group"){P+=`{${v(A.tokens)}}`;continue}if(A.type==="param"){P+=`:${b(A.name)}`;continue}if(A.type==="wildcard"){P+=`*${b(A.name)}`;continue}throw new TypeError(`Unknown token type: ${A.type}`)}return P}function T(w){return v(w.tokens)}function I(w){const[P,...k]=w;return r.test(P)&&k.every(b=>n.test(b))}function E(w){return w&&w.type==="text"?!n.test(w.value[0]):!0}return gt}var mT=fT();function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function gT(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yT(e){var t=gT(e,"string");return Qn(t)=="symbol"?t:t+""}function bT(e,t,r){return(t=yT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $="/api/v2".replace(/\/+$/,""),Xu={csv:","};var $e=class{constructor(e,t=$,r=B){this.basePath=t,this.axios=r,bT(this,"configuration",void 0),e&&(this.configuration=e,this.basePath=e.basePath??t)}},xT=class extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}};const N={},z="https://example.com",C=function(e,t,r){if(r==null)throw new xT(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},G=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},H=async function(e,t){t&&t.accessToken&&(e.Authorization="Bearer "+(typeof t.accessToken=="function"?await t.accessToken():await t.accessToken))};function Ei(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Ei(e,n,r)):Object.keys(t).forEach(n=>Ei(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const q=function(e,...t){const r=new URLSearchParams(e.search);Ei(r,t),e.search=r.toString()},ge=function(e,t,r){const n=typeof e!="string";return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},W=function(e){return e.pathname+e.search+e.hash},J=function(e,t,r,n){return(o=t,s=r)=>{const a={...e.options,url:(o.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return o.request(a)}},ST=function(e){return{addApp:async(t,r,n,o={})=>{C("addApp","cell",t),C("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},clearApps:async(t,r,n={})=>{C("clearApps","cell",t);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteApp:async(t,r,n,o={})=>{C("deleteApp","cell",t),C("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getApp:async(t,r,n={})=>{C("getApp","cell",t),C("getApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listApps:async(t,r={})=>{C("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},updateApp:async(t,r,n,o,s={})=>{C("updateApp","cell",t),C("updateApp","app",r),C("updateApp","app2",n);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(n,c,e),{url:W(i),options:c}}}},Wr=function(e){const t=ST(e);return{async addApp(r,n,o,s){var c,u;const a=await t.addApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearApps(r,n,o){var l,c;const s=await t.clearApps(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.clearApps"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteApp(r,n,o,s){var c,u;const a=await t.deleteApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getApp(r,n,o){var l,c;const s=await t.getApp(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.getApp"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listApps(r,n){var i,l;const o=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async updateApp(r,n,o,s,a){var u,d;const i=await t.updateApp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var Zu=class extends $e{addApp(e,t,r,n){return Wr(this.configuration).addApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearApps(e,t,r){return Wr(this.configuration).clearApps(e,t,r).then(n=>n(this.axios,this.basePath))}deleteApp(e,t,r,n){return Wr(this.configuration).deleteApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}getApp(e,t,r){return Wr(this.configuration).getApp(e,t,r).then(n=>n(this.axios,this.basePath))}listApps(e,t){return Wr(this.configuration).listApps(e,t).then(r=>r(this.axios,this.basePath))}updateApp(e,t,r,n,o){return Wr(this.configuration).updateApp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const vT=function(e){return{addBusIOService:async(t,r,n,o={})=>{C("addBusIOService","cell",t),C("addBusIOService","busIOType",r);const s="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},addModbusIO:async(t,r,n,o={})=>{C("addModbusIO","cell",t),C("addModbusIO","io",r),C("addModbusIO","modbusIOData",n);const s="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},addProfinetIO:async(t,r,n,o={})=>{C("addProfinetIO","cell",t),C("addProfinetIO","io",r),C("addProfinetIO","profinetIOData",n);const s="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},clearBusIOService:async(t,r,n={})=>{C("clearBusIOService","cell",t);const o="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteModbusIO:async(t,r,n={})=>{C("deleteModbusIO","cell",t),C("deleteModbusIO","io",r);const o="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteProfinetIO:async(t,r,n={})=>{C("deleteProfinetIO","cell",t),C("deleteProfinetIO","io",r);const o="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getBusIOService:async(t,r={})=>{C("getBusIOService","cell",t);const n="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOState:async(t,r={})=>{C("getBusIOState","cell",t);const n="/cells/{cell}/bus-ios/state".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOValues:async(t,r,n={})=>{C("getBusIOValues","cell",t);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),r&&(c.ios=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getProfinetDescription:async(t,r={})=>{C("getProfinetDescription","cell",t);const n="/cells/{cell}/bus-ios/profinet/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getProfinetIOsFromFile:async(t,r,n,o={})=>{C("getProfinetIOsFromFile","cell",t);const s="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),r!==void 0&&(u.input_offset=r),n!==void 0&&(u.output_offset=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listBusIODescriptions:async(t,r={})=>{C("listBusIODescriptions","cell",t);const n="/cells/{cell}/bus-ios/ios/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listModbusIOs:async(t,r={})=>{C("listModbusIOs","cell",t);const n="/cells/{cell}/bus-ios/modbus/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listProfinetIOs:async(t,r={})=>{C("listProfinetIOs","cell",t);const n="/cells/{cell}/bus-ios/profinet/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setBusIOValues:async(t,r,n={})=>{C("setBusIOValues","cell",t),C("setBusIOValues","iOValue",r);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},setProfinetIOsFromFile:async(t,r,n={})=>{C("setProfinetIOsFromFile","cell",t),C("setProfinetIOsFromFile","profinetInputOutputConfig",r);const o="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},Ye=function(e){const t=vT(e);return{async addBusIOService(r,n,o,s){var c,u;const a=await t.addBusIOService(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addBusIOService"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async addModbusIO(r,n,o,s){var c,u;const a=await t.addModbusIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addModbusIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async addProfinetIO(r,n,o,s){var c,u;const a=await t.addProfinetIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addProfinetIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearBusIOService(r,n,o){var l,c;const s=await t.clearBusIOService(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.clearBusIOService"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteModbusIO(r,n,o){var l,c;const s=await t.deleteModbusIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteModbusIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteProfinetIO(r,n,o){var l,c;const s=await t.deleteProfinetIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteProfinetIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getBusIOService(r,n){var i,l;const o=await t.getBusIOService(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOService"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getBusIOState(r,n){var i,l;const o=await t.getBusIOState(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOState"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getBusIOValues(r,n,o){var l,c;const s=await t.getBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.getBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getProfinetDescription(r,n){var i,l;const o=await t.getProfinetDescription(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getProfinetDescription"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getProfinetIOsFromFile(r,n,o,s){var c,u;const a=await t.getProfinetIOsFromFile(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.getProfinetIOsFromFile"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listBusIODescriptions(r,n){var i,l;const o=await t.listBusIODescriptions(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listBusIODescriptions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listModbusIOs(r,n){var i,l;const o=await t.listModbusIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listModbusIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listProfinetIOs(r,n){var i,l;const o=await t.listProfinetIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listProfinetIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async setBusIOValues(r,n,o){var l,c;const s=await t.setBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async setProfinetIOsFromFile(r,n,o){var l,c;const s=await t.setProfinetIOsFromFile(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setProfinetIOsFromFile"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var CT=class extends $e{addBusIOService(e,t,r,n){return Ye(this.configuration).addBusIOService(e,t,r,n).then(o=>o(this.axios,this.basePath))}addModbusIO(e,t,r,n){return Ye(this.configuration).addModbusIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}addProfinetIO(e,t,r,n){return Ye(this.configuration).addProfinetIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearBusIOService(e,t,r){return Ye(this.configuration).clearBusIOService(e,t,r).then(n=>n(this.axios,this.basePath))}deleteModbusIO(e,t,r){return Ye(this.configuration).deleteModbusIO(e,t,r).then(n=>n(this.axios,this.basePath))}deleteProfinetIO(e,t,r){return Ye(this.configuration).deleteProfinetIO(e,t,r).then(n=>n(this.axios,this.basePath))}getBusIOService(e,t){return Ye(this.configuration).getBusIOService(e,t).then(r=>r(this.axios,this.basePath))}getBusIOState(e,t){return Ye(this.configuration).getBusIOState(e,t).then(r=>r(this.axios,this.basePath))}getBusIOValues(e,t,r){return Ye(this.configuration).getBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}getProfinetDescription(e,t){return Ye(this.configuration).getProfinetDescription(e,t).then(r=>r(this.axios,this.basePath))}getProfinetIOsFromFile(e,t,r,n){return Ye(this.configuration).getProfinetIOsFromFile(e,t,r,n).then(o=>o(this.axios,this.basePath))}listBusIODescriptions(e,t){return Ye(this.configuration).listBusIODescriptions(e,t).then(r=>r(this.axios,this.basePath))}listModbusIOs(e,t){return Ye(this.configuration).listModbusIOs(e,t).then(r=>r(this.axios,this.basePath))}listProfinetIOs(e,t){return Ye(this.configuration).listProfinetIOs(e,t).then(r=>r(this.axios,this.basePath))}setBusIOValues(e,t,r){return Ye(this.configuration).setBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}setProfinetIOsFromFile(e,t,r){return Ye(this.configuration).setProfinetIOsFromFile(e,t,r).then(n=>n(this.axios,this.basePath))}};const wT=function(e){return{deleteCell:async(t,r,n={})=>{C("deleteCell","cell",t);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deployCell:async(t,r,n={})=>{C("deployCell","cell",t);const o=new URL("/cells",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),r!==void 0&&(l.completion_timeout=r),i["Content-Type"]="application/json",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=ge(t,a,e),{url:W(o),options:a}},getCell:async(t,r={})=>{C("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getCellStatus:async(t,r={})=>{C("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCells:async(t={})=>{const r=new URL("/cells",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},setCellStatus:async(t,r,n={})=>{C("setCellStatus","cell",t),C("setCellStatus","operatingState",r);const o="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.operating_state=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},updateCell:async(t,r,n,o={})=>{C("updateCell","cell",t),C("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}}}},gr=function(e){const t=wT(e);return{async deleteCell(r,n,o){var l,c;const s=await t.deleteCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deleteCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deployCell(r,n,o){var l,c;const s=await t.deployCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deployCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getCell(r,n){var i,l;const o=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getCellStatus(r,n){var i,l;const o=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listCells(r){var a,i;const n=await t.listCells(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["CellApi.listCells"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async setCellStatus(r,n,o){var l,c;const s=await t.setCellStatus(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.setCellStatus"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async updateCell(r,n,o,s){var c,u;const a=await t.updateCell(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var OT=class extends $e{deleteCell(e,t,r){return gr(this.configuration).deleteCell(e,t,r).then(n=>n(this.axios,this.basePath))}deployCell(e,t,r){return gr(this.configuration).deployCell(e,t,r).then(n=>n(this.axios,this.basePath))}getCell(e,t){return gr(this.configuration).getCell(e,t).then(r=>r(this.axios,this.basePath))}getCellStatus(e,t){return gr(this.configuration).getCellStatus(e,t).then(r=>r(this.axios,this.basePath))}listCells(e){return gr(this.configuration).listCells(e).then(t=>t(this.axios,this.basePath))}setCellStatus(e,t,r){return gr(this.configuration).setCellStatus(e,t,r).then(n=>n(this.axios,this.basePath))}updateCell(e,t,r,n){return gr(this.configuration).updateCell(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const TT=function(e){return{addRobotController:async(t,r,n,o={})=>{C("addRobotController","cell",t),C("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},clearRobotControllers:async(t,r,n={})=>{C("clearRobotControllers","cell",t);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteRobotController:async(t,r,n,o={})=>{C("deleteRobotController","cell",t),C("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getControllerDescription:async(t,r,n={})=>{C("getControllerDescription","cell",t),C("getControllerDescription","controller",r);const o="/cells/{cell}/controllers/{controller}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getCoordinateSystem:async(t,r,n,o,s={})=>{C("getCoordinateSystem","cell",t),C("getCoordinateSystem","controller",r),C("getCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.orientation_type=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getCurrentRobotControllerState:async(t,r,n={})=>{C("getCurrentRobotControllerState","cell",t),C("getCurrentRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getRobotController:async(t,r,n={})=>{C("getRobotController","cell",t),C("getRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerConfiguration:async(t,r,n={})=>{C("getVirtualControllerConfiguration","cell",t),C("getVirtualControllerConfiguration","controller",r);const o="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCoordinateSystems:async(t,r,n,o={})=>{C("listCoordinateSystems","cell",t),C("listCoordinateSystems","controller",r);const s="/cells/{cell}/controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.orientation_type=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listRobotControllers:async(t,r={})=>{C("listRobotControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setDefaultMode:async(t,r,n,o={})=>{C("setDefaultMode","cell",t),C("setDefaultMode","controller",r),C("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamFreeDrive:async(t,r,n,o={})=>{C("streamFreeDrive","cell",t),C("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.response_rate=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamRobotControllerState:async(t,r,n,o,s={})=>{C("streamRobotControllerState","cell",t),C("streamRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),n!==void 0&&(d.response_rate=n),o!==void 0&&(d.add_controller_timeout=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},updateRobotController:async(t,r,n,o,s={})=>{C("updateRobotController","cell",t),C("updateRobotController","controller",r),C("updateRobotController","robotController",n);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(n,c,e),{url:W(i),options:c}}}},ot=function(e){const t=TT(e);return{async addRobotController(r,n,o,s){var c,u;const a=await t.addRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearRobotControllers(r,n,o){var l,c;const s=await t.clearRobotControllers(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.clearRobotControllers"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteRobotController(r,n,o,s){var c,u;const a=await t.deleteRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getControllerDescription(r,n,o){var l,c;const s=await t.getControllerDescription(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getControllerDescription"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.getCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.getCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getCurrentRobotControllerState(r,n,o){var l,c;const s=await t.getCurrentRobotControllerState(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getRobotController(r,n,o){var l,c;const s=await t.getRobotController(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getRobotController"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerConfiguration(r,n,o){var l,c;const s=await t.getVirtualControllerConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getVirtualControllerConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listCoordinateSystems(r,n,o,s){var c,u;const a=await t.listCoordinateSystems(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.listCoordinateSystems"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listRobotControllers(r,n){var i,l;const o=await t.listRobotControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ControllerApi.listRobotControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async setDefaultMode(r,n,o,s){var c,u;const a=await t.setDefaultMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamFreeDrive(r,n,o,s){var c,u;const a=await t.streamFreeDrive(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamRobotControllerState(r,n,o,s,a){var u,d;const i=await t.streamRobotControllerState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.streamRobotControllerState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async updateRobotController(r,n,o,s,a){var u,d;const i=await t.updateRobotController(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var ET=class extends $e{addRobotController(e,t,r,n){return ot(this.configuration).addRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearRobotControllers(e,t,r){return ot(this.configuration).clearRobotControllers(e,t,r).then(n=>n(this.axios,this.basePath))}deleteRobotController(e,t,r,n){return ot(this.configuration).deleteRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}getControllerDescription(e,t,r){return ot(this.configuration).getControllerDescription(e,t,r).then(n=>n(this.axios,this.basePath))}getCoordinateSystem(e,t,r,n,o){return ot(this.configuration).getCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(e,t,r){return ot(this.configuration).getCurrentRobotControllerState(e,t,r).then(n=>n(this.axios,this.basePath))}getRobotController(e,t,r){return ot(this.configuration).getRobotController(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerConfiguration(e,t,r){return ot(this.configuration).getVirtualControllerConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}listCoordinateSystems(e,t,r,n){return ot(this.configuration).listCoordinateSystems(e,t,r,n).then(o=>o(this.axios,this.basePath))}listRobotControllers(e,t){return ot(this.configuration).listRobotControllers(e,t).then(r=>r(this.axios,this.basePath))}setDefaultMode(e,t,r,n){return ot(this.configuration).setDefaultMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamFreeDrive(e,t,r,n){return ot(this.configuration).streamFreeDrive(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamRobotControllerState(e,t,r,n,o){return ot(this.configuration).streamRobotControllerState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}updateRobotController(e,t,r,n,o){return ot(this.configuration).updateRobotController(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const IT=function(e){return{listIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listIODescriptions","cell",t),C("listIODescriptions","controller",r);const l="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},listIOValues:async(t,r,n,o={})=>{C("listIOValues","cell",t),C("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setOutputValues:async(t,r,n,o={})=>{C("setOutputValues","cell",t),C("setOutputValues","controller",r),C("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},streamIOValues:async(t,r,n,o={})=>{C("streamIOValues","cell",t),C("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},waitForIOEvent:async(t,r,n,o={})=>{C("waitForIOEvent","cell",t),C("waitForIOEvent","controller",r),C("waitForIOEvent","waitForIOEventRequest",n);const s="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Pn=function(e){const t=IT(e);return{async listIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["ControllerInputsOutputsApi.listIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,B,$,e)(f,d||m)},async listIOValues(r,n,o,s){var c,u;const a=await t.listIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setOutputValues(r,n,o,s){var c,u;const a=await t.setOutputValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamIOValues(r,n,o,s){var c,u;const a=await t.streamIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async waitForIOEvent(r,n,o,s){var c,u;const a=await t.waitForIOEvent(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.waitForIOEvent"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var AT=class extends $e{listIODescriptions(e,t,r,n,o,s,a){return Pn(this.configuration).listIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}listIOValues(e,t,r,n){return Pn(this.configuration).listIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}setOutputValues(e,t,r,n){return Pn(this.configuration).setOutputValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamIOValues(e,t,r,n){return Pn(this.configuration).streamIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}waitForIOEvent(e,t,r,n){return Pn(this.configuration).waitForIOEvent(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const RT=function(e){return{executeJogging:async(t,r,n,o={})=>{C("executeJogging","cell",t),C("executeJogging","controller",r),C("executeJogging","executeJoggingRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/jogging".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},PT=function(e){const t=RT(e);return{async executeJogging(r,n,o,s){var c,u;const a=await t.executeJogging(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["JoggingApi.executeJogging"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var MT=class extends $e{executeJogging(e,t,r,n){return PT(this.configuration).executeJogging(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const VT=function(e){return{forwardKinematics:async(t,r,n={})=>{C("forwardKinematics","cell",t),C("forwardKinematics","forwardKinematicsRequest",r);const o="/cells/{cell}/kinematic/forward".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},inverseKinematics:async(t,r,n={})=>{C("inverseKinematics","cell",t),C("inverseKinematics","inverseKinematicsRequest",r);const o="/cells/{cell}/kinematic/inverse".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},ed=function(e){const t=VT(e);return{async forwardKinematics(r,n,o){var l,c;const s=await t.forwardKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.forwardKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async inverseKinematics(r,n,o){var l,c;const s=await t.inverseKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.inverseKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var _T=class extends $e{forwardKinematics(e,t,r){return ed(this.configuration).forwardKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}inverseKinematics(e,t,r){return ed(this.configuration).inverseKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}};const kT=function(e){return{getCurrentMotionGroupState:async(t,r,n,o,s={})=>{C("getCurrentMotionGroupState","cell",t),C("getCurrentMotionGroupState","controller",r),C("getCurrentMotionGroupState","motionGroup",n);const a="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.response_coordinate_system=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getMotionGroupDescription:async(t,r,n,o={})=>{C("getMotionGroupDescription","cell",t),C("getMotionGroupDescription","controller",r),C("getMotionGroupDescription","motionGroup",n);const s="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamMotionGroupState:async(t,r,n,o,s,a={})=>{C("streamMotionGroupState","cell",t),C("streamMotionGroupState","controller",r),C("streamMotionGroupState","motionGroup",n);const i="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...a},d={},h={};G(u,e),await H(d,e),o!==void 0&&(h.response_rate=o),s!==void 0&&(h.response_coordinate_system=s),q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},{url:W(l),options:u}}}},Ya=function(e){const t=kT(e);return{async getCurrentMotionGroupState(r,n,o,s,a){var u,d;const i=await t.getCurrentMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["MotionGroupApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getMotionGroupDescription(r,n,o,s){var c,u;const a=await t.getMotionGroupDescription(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["MotionGroupApi.getMotionGroupDescription"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamMotionGroupState(r,n,o,s,a,i){var d,h;const l=await t.streamMotionGroupState(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["MotionGroupApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,B,$,e)(p,u||f)}}};var jT=class extends $e{getCurrentMotionGroupState(e,t,r,n,o){return Ya(this.configuration).getCurrentMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getMotionGroupDescription(e,t,r,n){return Ya(this.configuration).getMotionGroupDescription(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(e,t,r,n,o,s){return Ya(this.configuration).streamMotionGroupState(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}};const DT=function(e){return{getMotionGroupCollisionModel:async(t,r={})=>{C("getMotionGroupCollisionModel","motionGroupModel",t);const n="/motion-group-models/{motion-group-model}/collision".replace("{motion-group-model}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getMotionGroupModels:async(t={})=>{const r=new URL("/motion-group-models",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}}}},td=function(e){const t=DT(e);return{async getMotionGroupCollisionModel(r,n){var i,l;const o=await t.getMotionGroupCollisionModel(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["MotionGroupModelsApi.getMotionGroupCollisionModel"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getMotionGroupModels(r){var a,i;const n=await t.getMotionGroupModels(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["MotionGroupModelsApi.getMotionGroupModels"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)}}};var BT=class extends $e{getMotionGroupCollisionModel(e,t){return td(this.configuration).getMotionGroupCollisionModel(e,t).then(r=>r(this.axios,this.basePath))}getMotionGroupModels(e){return td(this.configuration).getMotionGroupModels(e).then(t=>t(this.axios,this.basePath))}};const UT=function(e){return{deleteStoredCollider:async(t,r,n={})=>{C("deleteStoredCollider","cell",t),C("deleteStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{C("deleteStoredCollisionLinkChain","cell",t),C("deleteStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{C("deleteStoredCollisionTool","cell",t),C("deleteStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollider:async(t,r,n={})=>{C("getStoredCollider","cell",t),C("getStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{C("getStoredCollisionLinkChain","cell",t),C("getStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{C("getStoredCollisionTool","cell",t),C("getStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCollisionLinkChains:async(t,r={})=>{C("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCollisionLinkChainsKeys:async(t,r={})=>{C("listCollisionLinkChainsKeys","cell",t);const n="/cells/{cell}/store/collision/link-chains-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredColliders:async(t,r={})=>{C("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollidersKeys:async(t,r={})=>{C("listStoredCollidersKeys","cell",t);const n="/cells/{cell}/store/collision/colliders-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionTools:async(t,r={})=>{C("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionToolsKeys:async(t,r={})=>{C("listStoredCollisionToolsKeys","cell",t);const n="/cells/{cell}/store/collision/tools-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollider:async(t,r,n,o={})=>{C("storeCollider","cell",t),C("storeCollider","collider",r),C("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},storeCollisionLinkChain:async(t,r,n,o={})=>{C("storeCollisionLinkChain","cell",t),C("storeCollisionLinkChain","linkChain",r),C("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},storeCollisionTool:async(t,r,n,o={})=>{C("storeCollisionTool","cell",t),C("storeCollisionTool","tool",r),C("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Xe=function(e){const t=UT(e);return{async deleteStoredCollider(r,n,o){var l,c;const s=await t.deleteStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteStoredCollisionTool(r,n,o){var l,c;const s=await t.deleteStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollider(r,n,o){var l,c;const s=await t.getStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionTool(r,n,o){var l,c;const s=await t.getStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const o=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listCollisionLinkChainsKeys(r,n){var i,l;const o=await t.listCollisionLinkChainsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChainsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredColliders(r,n){var i,l;const o=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollidersKeys(r,n){var i,l;const o=await t.listStoredCollidersKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollidersKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionTools(r,n){var i,l;const o=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionToolsKeys(r,n){var i,l;const o=await t.listStoredCollisionToolsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionToolsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeCollider(r,n,o,s){var c,u;const a=await t.storeCollider(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async storeCollisionLinkChain(r,n,o,s){var c,u;const a=await t.storeCollisionLinkChain(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async storeCollisionTool(r,n,o,s){var c,u;const a=await t.storeCollisionTool(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var LT=class extends $e{deleteStoredCollider(e,t,r){return Xe(this.configuration).deleteStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionLinkChain(e,t,r){return Xe(this.configuration).deleteStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionTool(e,t,r){return Xe(this.configuration).deleteStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollider(e,t,r){return Xe(this.configuration).getStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionLinkChain(e,t,r){return Xe(this.configuration).getStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionTool(e,t,r){return Xe(this.configuration).getStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}listCollisionLinkChains(e,t){return Xe(this.configuration).listCollisionLinkChains(e,t).then(r=>r(this.axios,this.basePath))}listCollisionLinkChainsKeys(e,t){return Xe(this.configuration).listCollisionLinkChainsKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredColliders(e,t){return Xe(this.configuration).listStoredColliders(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollidersKeys(e,t){return Xe(this.configuration).listStoredCollidersKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionTools(e,t){return Xe(this.configuration).listStoredCollisionTools(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionToolsKeys(e,t){return Xe(this.configuration).listStoredCollisionToolsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollider(e,t,r,n){return Xe(this.configuration).storeCollider(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(e,t,r,n){return Xe(this.configuration).storeCollisionLinkChain(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionTool(e,t,r,n){return Xe(this.configuration).storeCollisionTool(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const FT=function(e){return{deleteStoredCollisionSetup:async(t,r,n={})=>{C("deleteStoredCollisionSetup","cell",t),C("deleteStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionSetup:async(t,r,n={})=>{C("getStoredCollisionSetup","cell",t),C("getStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listStoredCollisionSetups:async(t,r={})=>{C("listStoredCollisionSetups","cell",t);const n="/cells/{cell}/store/collision/setups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionSetupsKeys:async(t,r={})=>{C("listStoredCollisionSetupsKeys","cell",t);const n="/cells/{cell}/store/collision/setups-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollisionSetup:async(t,r,n,o={})=>{C("storeCollisionSetup","cell",t),C("storeCollisionSetup","setup",r),C("storeCollisionSetup","collisionSetup",n);const s="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Mn=function(e){const t=FT(e);return{async deleteStoredCollisionSetup(r,n,o){var l,c;const s=await t.deleteStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.deleteStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionSetup(r,n,o){var l,c;const s=await t.getStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.getStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listStoredCollisionSetups(r,n){var i,l;const o=await t.listStoredCollisionSetups(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionSetupsKeys(r,n){var i,l;const o=await t.listStoredCollisionSetupsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetupsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeCollisionSetup(r,n,o,s){var c,u;const a=await t.storeCollisionSetup(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionSetupsApi.storeCollisionSetup"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var $T=class extends $e{deleteStoredCollisionSetup(e,t,r){return Mn(this.configuration).deleteStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionSetup(e,t,r){return Mn(this.configuration).getStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionSetups(e,t){return Mn(this.configuration).listStoredCollisionSetups(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionSetupsKeys(e,t){return Mn(this.configuration).listStoredCollisionSetupsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollisionSetup(e,t,r,n){return Mn(this.configuration).storeCollisionSetup(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const NT=function(e){return{clearAllObjects:async(t,r={})=>{C("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},deleteObject:async(t,r,n={})=>{C("deleteObject","cell",t),C("deleteObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObject:async(t,r,n={})=>{C("getObject","cell",t),C("getObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObjectMetadata:async(t,r,n={})=>{C("getObjectMetadata","cell",t),C("getObjectMetadata","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"HEAD",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listAllObjectKeys:async(t,r={})=>{C("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeObject:async(t,r,n,o,s={})=>{C("storeObject","cell",t),C("storeObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);G(c,e),await H(u,e),o!==void 0&&h.append("any_value",new Blob([JSON.stringify(o)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),q(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...s.headers},c.data=h,{url:W(i),options:c}}}},Jr=function(e){const t=NT(e);return{async clearAllObjects(r,n){var i,l;const o=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async deleteObject(r,n,o){var l,c;const s=await t.deleteObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.deleteObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getObject(r,n,o){var l,c;const s=await t.getObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getObjectMetadata(r,n,o){var l,c;const s=await t.getObjectMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObjectMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const o=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeObject(r,n,o,s,a){var u,d;const i=await t.storeObject(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var zT=class extends $e{clearAllObjects(e,t){return Jr(this.configuration).clearAllObjects(e,t).then(r=>r(this.axios,this.basePath))}deleteObject(e,t,r){return Jr(this.configuration).deleteObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObject(e,t,r){return Jr(this.configuration).getObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObjectMetadata(e,t,r){return Jr(this.configuration).getObjectMetadata(e,t,r).then(n=>n(this.axios,this.basePath))}listAllObjectKeys(e,t){return Jr(this.configuration).listAllObjectKeys(e,t).then(r=>r(this.axios,this.basePath))}storeObject(e,t,r,n,o){return Jr(this.configuration).storeObject(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const GT=function(e){return{backupConfiguration:async(t,r,n={})=>{const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Xu.csv)),r!==void 0&&(l.metadata=r),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},{url:W(o),options:a}},checkNovaVersionUpdate:async(t,r={})=>{C("checkNovaVersionUpdate","channel",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.channel=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getConfigurationBackupStatus:async(t,r={})=>{C("getConfigurationBackupStatus","operationId",t);const n=new URL("/system/configuration/status",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.operation_id=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getDiagnosePackage:async(t={})=>{const r=new URL("/system/diagnosis-package/zip",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemStatus:async(t={})=>{const r=new URL("/system/status",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemVersion:async(t={})=>{const r=new URL("/system/version",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},listConfigurationResources:async(t={})=>{const r=new URL("/system/configuration/resources",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},restoreConfiguration:async(t,r,n={})=>{C("restoreConfiguration","resources",t),C("restoreConfiguration","body",r);const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Xu.csv)),i["Content-Type"]="application/gzip",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=ge(r,a,e),{url:W(o),options:a}},updateNovaVersion:async(t,r={})=>{C("updateNovaVersion","updateNovaVersionRequest",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},a={},i={};G(s,e),await H(a,e),a["Content-Type"]="application/json",q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},s.data=ge(t,s,e),{url:W(n),options:s}}}},Nt=function(e){const t=GT(e);return{async backupConfiguration(r,n,o){var l,c;const s=await t.backupConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.backupConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async checkNovaVersionUpdate(r,n){var i,l;const o=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getConfigurationBackupStatus(r,n){var i,l;const o=await t.getConfigurationBackupStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.getConfigurationBackupStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getDiagnosePackage(r){var a,i;const n=await t.getDiagnosePackage(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getDiagnosePackage"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async getSystemStatus(r){var a,i;const n=await t.getSystemStatus(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemStatus"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async getSystemVersion(r){var a,i;const n=await t.getSystemVersion(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemVersion"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async listConfigurationResources(r){var a,i;const n=await t.listConfigurationResources(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.listConfigurationResources"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async restoreConfiguration(r,n,o){var l,c;const s=await t.restoreConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.restoreConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async updateNovaVersion(r,n){var i,l;const o=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)}}};var HT=class extends $e{backupConfiguration(e,t,r){return Nt(this.configuration).backupConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}checkNovaVersionUpdate(e,t){return Nt(this.configuration).checkNovaVersionUpdate(e,t).then(r=>r(this.axios,this.basePath))}getConfigurationBackupStatus(e,t){return Nt(this.configuration).getConfigurationBackupStatus(e,t).then(r=>r(this.axios,this.basePath))}getDiagnosePackage(e){return Nt(this.configuration).getDiagnosePackage(e).then(t=>t(this.axios,this.basePath))}getSystemStatus(e){return Nt(this.configuration).getSystemStatus(e).then(t=>t(this.axios,this.basePath))}getSystemVersion(e){return Nt(this.configuration).getSystemVersion(e).then(t=>t(this.axios,this.basePath))}listConfigurationResources(e){return Nt(this.configuration).listConfigurationResources(e).then(t=>t(this.axios,this.basePath))}restoreConfiguration(e,t,r){return Nt(this.configuration).restoreConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}updateNovaVersion(e,t){return Nt(this.configuration).updateNovaVersion(e,t).then(r=>r(this.axios,this.basePath))}};const qT=function(e){return{addTrajectory:async(t,r,n,o={})=>{C("addTrajectory","cell",t),C("addTrajectory","controller",r),C("addTrajectory","addTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},clearTrajectories:async(t,r,n={})=>{C("clearTrajectories","cell",t),C("clearTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteTrajectory:async(t,r,n,o={})=>{C("deleteTrajectory","cell",t),C("deleteTrajectory","controller",r),C("deleteTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getTrajectory:async(t,r,n,o={})=>{C("getTrajectory","cell",t),C("getTrajectory","controller",r),C("getTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listTrajectories:async(t,r,n={})=>{C("listTrajectories","cell",t),C("listTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}}}},Vn=function(e){const t=qT(e);return{async addTrajectory(r,n,o,s){var c,u;const a=await t.addTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.addTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearTrajectories(r,n,o){var l,c;const s=await t.clearTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.clearTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteTrajectory(r,n,o,s){var c,u;const a=await t.deleteTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.deleteTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getTrajectory(r,n,o,s){var c,u;const a=await t.getTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.getTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listTrajectories(r,n,o){var l,c;const s=await t.listTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.listTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var WT=class extends $e{addTrajectory(e,t,r,n){return Vn(this.configuration).addTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearTrajectories(e,t,r){return Vn(this.configuration).clearTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}deleteTrajectory(e,t,r,n){return Vn(this.configuration).deleteTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}getTrajectory(e,t,r,n){return Vn(this.configuration).getTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}listTrajectories(e,t,r){return Vn(this.configuration).listTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}};const JT=function(e){return{executeTrajectory:async(t,r,n,o={})=>{C("executeTrajectory","cell",t),C("executeTrajectory","controller",r),C("executeTrajectory","executeTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},YT=function(e){const t=JT(e);return{async executeTrajectory(r,n,o,s){var c,u;const a=await t.executeTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryExecutionApi.executeTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var KT=class extends $e{executeTrajectory(e,t,r,n){return YT(this.configuration).executeTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const QT=function(e){return{planCollisionFree:async(t,r,n={})=>{C("planCollisionFree","cell",t),C("planCollisionFree","planCollisionFreeRequest",r);const o="/cells/{cell}/trajectory-planning/plan-collision-free".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},planTrajectory:async(t,r,n={})=>{C("planTrajectory","cell",t),C("planTrajectory","planTrajectoryRequest",r);const o="/cells/{cell}/trajectory-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},rd=function(e){const t=QT(e);return{async planCollisionFree(r,n,o){var l,c;const s=await t.planCollisionFree(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planCollisionFree"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async planTrajectory(r,n,o){var l,c;const s=await t.planTrajectory(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planTrajectory"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var XT=class extends $e{planCollisionFree(e,t,r){return rd(this.configuration).planCollisionFree(e,t,r).then(n=>n(this.axios,this.basePath))}planTrajectory(e,t,r){return rd(this.configuration).planTrajectory(e,t,r).then(n=>n(this.axios,this.basePath))}};const ZT=function(e){return{addVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("addVirtualControllerCoordinateSystem","cell",t),C("addVirtualControllerCoordinateSystem","controller",r),C("addVirtualControllerCoordinateSystem","coordinateSystem",n),C("addVirtualControllerCoordinateSystem","coordinateSystemData",o);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}},addVirtualControllerTcp:async(t,r,n,o,s,a={})=>{C("addVirtualControllerTcp","cell",t),C("addVirtualControllerTcp","controller",r),C("addVirtualControllerTcp","motionGroup",n),C("addVirtualControllerTcp","tcp",o),C("addVirtualControllerTcp","robotTcpData",s);const i="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"PUT",...c,...a},d={},h={};G(u,e),await H(d,e),d["Content-Type"]="application/json",q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},u.data=ge(s,u,e),{url:W(l),options:u}},deleteVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("deleteVirtualControllerCoordinateSystem","cell",t),C("deleteVirtualControllerCoordinateSystem","controller",r),C("deleteVirtualControllerCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.delete_dependent=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},deleteVirtualControllerTcp:async(t,r,n,o,s={})=>{C("deleteVirtualControllerTcp","cell",t),C("deleteVirtualControllerTcp","controller",r),C("deleteVirtualControllerTcp","motionGroup",n),C("deleteVirtualControllerTcp","tcp",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getEmergencyStop:async(t,r,n={})=>{C("getEmergencyStop","cell",t),C("getEmergencyStop","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getMotionGroupState:async(t,r,n,o={})=>{C("getMotionGroupState","cell",t),C("getMotionGroupState","controller",r),C("getMotionGroupState","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getMotionGroups:async(t,r,n={})=>{C("getMotionGroups","cell",t),C("getMotionGroups","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/motion-groups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getOperationMode:async(t,r,n={})=>{C("getOperationMode","cell",t),C("getOperationMode","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerMounting:async(t,r,n,o={})=>{C("getVirtualControllerMounting","cell",t),C("getVirtualControllerMounting","controller",r),C("getVirtualControllerMounting","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerCoordinateSystems:async(t,r,n={})=>{C("listVirtualControllerCoordinateSystems","cell",t),C("listVirtualControllerCoordinateSystems","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listVirtualControllerTcps:async(t,r,n,o={})=>{C("listVirtualControllerTcps","cell",t),C("listVirtualControllerTcps","controller",r),C("listVirtualControllerTcps","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setEmergencyStop:async(t,r,n,o={})=>{C("setEmergencyStop","cell",t),C("setEmergencyStop","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.active=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setMotionGroupState:async(t,r,n,o,s={})=>{C("setMotionGroupState","cell",t),C("setMotionGroupState","controller",r),C("setMotionGroupState","motionGroup",n),C("setMotionGroupState","motionGroupJoints",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}},setOperationMode:async(t,r,n,o={})=>{C("setOperationMode","cell",t),C("setOperationMode","controller",r),C("setOperationMode","mode",n);const s="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setVirtualControllerMounting:async(t,r,n,o,s={})=>{C("setVirtualControllerMounting","cell",t),C("setVirtualControllerMounting","controller",r),C("setVirtualControllerMounting","motionGroup",n),C("setVirtualControllerMounting","coordinateSystem",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}}}},Ze=function(e){const t=ZT(e);return{async addVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.addVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.addVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async addVirtualControllerTcp(r,n,o,s,a,i){var d,h;const l=await t.addVirtualControllerTcp(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["VirtualControllerApi.addVirtualControllerTcp"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,B,$,e)(p,u||f)},async deleteVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async deleteVirtualControllerTcp(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerTcp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getEmergencyStop(r,n,o){var l,c;const s=await t.getEmergencyStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getEmergencyStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getMotionGroupState(r,n,o,s){var c,u;const a=await t.getMotionGroupState(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getMotionGroups(r,n,o){var l,c;const s=await t.getMotionGroups(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getMotionGroups"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getOperationMode(r,n,o){var l,c;const s=await t.getOperationMode(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getOperationMode"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerMounting(r,n,o,s){var c,u;const a=await t.getVirtualControllerMounting(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getVirtualControllerMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listVirtualControllerCoordinateSystems(r,n,o){var l,c;const s=await t.listVirtualControllerCoordinateSystems(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.listVirtualControllerCoordinateSystems"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listVirtualControllerTcps(r,n,o,s){var c,u;const a=await t.listVirtualControllerTcps(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.listVirtualControllerTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setEmergencyStop(r,n,o,s){var c,u;const a=await t.setEmergencyStop(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setEmergencyStop"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setMotionGroupState(r,n,o,s,a){var u,d;const i=await t.setMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async setOperationMode(r,n,o,s){var c,u;const a=await t.setOperationMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setVirtualControllerMounting(r,n,o,s,a){var u,d;const i=await t.setVirtualControllerMounting(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setVirtualControllerMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var e2=class extends $e{addVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).addVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}addVirtualControllerTcp(e,t,r,n,o,s){return Ze(this.configuration).addVirtualControllerTcp(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}deleteVirtualControllerTcp(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerTcp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getEmergencyStop(e,t,r){return Ze(this.configuration).getEmergencyStop(e,t,r).then(n=>n(this.axios,this.basePath))}getMotionGroupState(e,t,r,n){return Ze(this.configuration).getMotionGroupState(e,t,r,n).then(o=>o(this.axios,this.basePath))}getMotionGroups(e,t,r){return Ze(this.configuration).getMotionGroups(e,t,r).then(n=>n(this.axios,this.basePath))}getOperationMode(e,t,r){return Ze(this.configuration).getOperationMode(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerMounting(e,t,r,n){return Ze(this.configuration).getVirtualControllerMounting(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerCoordinateSystems(e,t,r){return Ze(this.configuration).listVirtualControllerCoordinateSystems(e,t,r).then(n=>n(this.axios,this.basePath))}listVirtualControllerTcps(e,t,r,n){return Ze(this.configuration).listVirtualControllerTcps(e,t,r,n).then(o=>o(this.axios,this.basePath))}setEmergencyStop(e,t,r,n){return Ze(this.configuration).setEmergencyStop(e,t,r,n).then(o=>o(this.axios,this.basePath))}setMotionGroupState(e,t,r,n,o){return Ze(this.configuration).setMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}setOperationMode(e,t,r,n){return Ze(this.configuration).setOperationMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}setVirtualControllerMounting(e,t,r,n,o){return Ze(this.configuration).setVirtualControllerMounting(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const t2=function(e){return{externalJointsStream:async(t,r,n,o={})=>{C("externalJointsStream","cell",t),C("externalJointsStream","controller",r),C("externalJointsStream","externalJointStreamRequest",n);const s="/cells/{cell}/virtual-controllers/{controller}/external-joints-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},getCycleTime:async(t,r,n={})=>{C("getCycleTime","cell",t),C("getCycleTime","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerBehavior:async(t,r,n={})=>{C("getVirtualControllerBehavior","cell",t),C("getVirtualControllerBehavior","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},setVirtualControllerBehavior:async(t,r,n,o={})=>{C("setVirtualControllerBehavior","cell",t),C("setVirtualControllerBehavior","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.behavior=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}}}},jo=function(e){const t=t2(e);return{async externalJointsStream(r,n,o,s){var c,u;const a=await t.externalJointsStream(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getCycleTime(r,n,o){var l,c;const s=await t.getCycleTime(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getCycleTime"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerBehavior(r,n,o){var l,c;const s=await t.getVirtualControllerBehavior(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getVirtualControllerBehavior"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async setVirtualControllerBehavior(r,n,o,s){var c,u;const a=await t.setVirtualControllerBehavior(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.setVirtualControllerBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var r2=class extends $e{externalJointsStream(e,t,r,n){return jo(this.configuration).externalJointsStream(e,t,r,n).then(o=>o(this.axios,this.basePath))}getCycleTime(e,t,r){return jo(this.configuration).getCycleTime(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerBehavior(e,t,r){return jo(this.configuration).getVirtualControllerBehavior(e,t,r).then(n=>n(this.axios,this.basePath))}setVirtualControllerBehavior(e,t,r,n){return jo(this.configuration).setVirtualControllerBehavior(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const n2=function(e){return{listIOs:async(t,r,n,o={})=>{C("listIOs","cell",t),C("listIOs","controller",r),C("listIOs","ios",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listVirtualControllerIODescriptions","cell",t),C("listVirtualControllerIODescriptions","controller",r);const l="/cells/{cell}/virtual-controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},setIOValues:async(t,r,n,o={})=>{C("setIOValues","cell",t),C("setIOValues","controller",r),C("setIOValues","iOValue",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Ka=function(e){const t=n2(e);return{async listIOs(r,n,o,s){var c,u;const a=await t.listIOs(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.listIOs"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listVirtualControllerIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listVirtualControllerIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["VirtualControllerInputsOutputsApi.listVirtualControllerIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,B,$,e)(f,d||m)},async setIOValues(r,n,o,s){var c,u;const a=await t.setIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.setIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var o2=class extends $e{listIOs(e,t,r,n){return Ka(this.configuration).listIOs(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerIODescriptions(e,t,r,n,o,s,a){return Ka(this.configuration).listVirtualControllerIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}setIOValues(e,t,r,n){return Ka(this.configuration).setIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}},s2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(HT),this.cell=this.withUnwrappedResponsesOnly(OT),this.motionGroup=this.withCellId(jT),this.motionGroupModels=this.withCellId(BT),this.controller=this.withCellId(ET),this.controllerIOs=this.withCellId(AT),this.trajectoryPlanning=this.withCellId(XT),this.trajectoryExecution=this.withCellId(KT),this.trajectoryCaching=this.withCellId(WT),this.application=this.withCellId(Zu),this.applicationGlobal=this.withUnwrappedResponsesOnly(Zu),this.jogging=this.withCellId(MT),this.kinematics=this.withCellId(_T),this.busInputsOutputs=this.withCellId(CT),this.virtualController=this.withCellId(e2),this.virtualControllerBehavior=this.withCellId(r2),this.virtualControllerIOs=this.withCellId(o2),this.storeObject=this.withCellId(zT),this.storeCollisionComponents=this.withCellId(LT),this.storeCollisionSetups=this.withCellId($T)}withCellId(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??B.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,[this.cellId,...o]).then(s=>s.data)}return t}withUnwrappedResponsesOnly(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??B.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,o).then(s=>s.data)}return t}},a2=class{constructor(){this.connections=[]}async handleAPIRequest(e){var o,s,a;const t=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return["mock-ur5e"]}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{initial_joint_position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",kind:"VirtualController",manufacturer:"universalrobots",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/state",handle(){return{mode:"MODE_CONTROL",last_error:[],timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,controller:"mock-ur5e",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",velocity_override:100,motion_groups:[{timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,motion_group:"0@mock-ur5e",controller:"mock-ur5e",joint_position:[1.487959623336792,-1.8501918315887451,1.8003005981445312,6.034560203552246,1.4921919107437134,1.593459963798523],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_torque:[],joint_current:[0,0,0,0,0,0],flange_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},tcp:"Flange",tcp_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},payload:"",coordinate_system:"",standstill:!0}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",handle(){return{motion_group_model:"UniversalRobots_UR5e",mounting:{position:[0,0,0],orientation:[0,0,0]},tcps:{Flange:{name:"Default-Flange",pose:{position:[0,0,0],orientation:[0,0,0]}}},payloads:{"FPay-0":{name:"FPay-0",payload:0,center_of_mass:[0,0,0],moment_of_inertia:[0,0,0]}},cycle_time:8,dh_parameters:[{alpha:1.5707963267948966,d:162.25},{a:-425},{a:-392.2},{alpha:1.5707963267948966,d:133.3},{alpha:-1.5707963267948966,d:99.7},{d:99.6}],operation_limits:{auto_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3},elbow:{velocity:5e3},flange:{velocity:5e3}},manual_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t1_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t2_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}}},serial_number:"WBVirtualRobot"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/coordinate-systems",handle(){return[{coordinate_system:"",name:"world",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"},{coordinate_system:"CS-0",name:"Default-CS",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"}]}}],r=((o=e.method)==null?void 0:o.toUpperCase())||"GET",n=`/cells${(a=(s=e.url)==null?void 0:s.split("/cells")[1])==null?void 0:a.split("?")[0]}`;for(const i of t){const l=mT.match(i.path)(n||"");if(r===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new Ti(`No mock handler matched this request: ${r} ${n}`,"404",e)}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(i2)})),e.url.includes("/execution/jogging")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{message:"string",kind:"INITIALIZE_RECEIVED"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}};const i2={result:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",timestamp:new Date().toISOString(),sequence_number:1,joint_position:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},standstill:!1,flange_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]},tcp_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]}}};function l2(e){return e.startsWith("http")||(e=`http://${e}`),new URL(e).toString()}var c2=class{constructor(e){this.authPromise=null,this.accessToken=null;const t=e.cellId??"cell";this.config={cellId:t,...e},this.accessToken=e.accessToken||za.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"?this.mock=new a2:this.config.instanceUrl=l2(this.config.instanceUrl);const r=B.create({baseURL:Ja(this.config.instanceUrl,"/api/v2"),headers:typeof window<"u"&&window.location.origin.includes("localhost")?{}:{"X-Wandelbots-Client":"Wandelbots-Nova-JS-SDK"}});r.interceptors.request.use(async n=>(n.headers.Authorization||(this.accessToken?n.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(n.headers.Authorization=`Basic ${btoa(`${e.username}:${e.password}`)}`)),n)),typeof window<"u"&&r.interceptors.response.use(n=>n,async n=>{var o,s;if(hT(n))if(((o=n.response)==null?void 0:o.status)===401)try{if(await this.renewAuthentication(),n.config)return this.accessToken?n.config.headers.Authorization=`Bearer ${this.accessToken}`:delete n.config.headers.Authorization,r.request(n.config)}catch(a){return Promise.reject(a)}else((s=n.response)==null?void 0:s.status)===503&&(await fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(n)}),this.api=new s2(t,{...e,basePath:Ja(this.config.instanceUrl,"/api/v2"),isJsonMime:n=>n==="application/json",baseOptions:{...this.mock?{adapter:n=>this.mock.handleAPIRequest(n)}:{},...e.baseOptions},axiosInstance:r})}async renewAuthentication(){if(!this.authPromise){this.authPromise=Dw(this.config.instanceUrl);try{this.accessToken=await this.authPromise,this.accessToken?za.setString("wbjs.access_token",this.accessToken):za.delete("wbjs.access_token")}finally{this.authPromise=null}}}makeWebsocketURL(e){const t=new URL(Ja(this.config.instanceUrl,`/api/v2/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new _w(this.makeWebsocketURL(e),{mock:this.mock})}};function u2(e){var s,a,i,l,c,u;const t=[((s=e.position)==null?void 0:s[0])??0,((a=e.position)==null?void 0:a[1])??0,((i=e.position)==null?void 0:i[2])??0],r=[((l=e.orientation)==null?void 0:l[0])??0,((c=e.orientation)==null?void 0:c[1])??0,((u=e.orientation)==null?void 0:u[2])??0],n=t.map(d=>d.toFixed(1)),o=r.map(d=>d.toFixed(4));return`(${n.concat(o).join(", ")})`}function zt(e,t,r){return Math.max(t,Math.min(r,e))}class d2{constructor(t=0,r=0,n=0,o=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=o}static slerpFlat(t,r,n,o,s,a,i){let l=n[o+0],c=n[o+1],u=n[o+2],d=n[o+3];const h=s[a+0],p=s[a+1],f=s[a+2],m=s[a+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d;return}if(i===1){t[r+0]=h,t[r+1]=p,t[r+2]=f,t[r+3]=m;return}if(d!==m||l!==h||c!==p||u!==f){let y=1-i;const S=l*h+c*p+u*f+d*m,R=S>=0?1:-1,v=1-S*S;if(v>Number.EPSILON){const I=Math.sqrt(v),E=Math.atan2(I,S*R);y=Math.sin(y*E)/I,i=Math.sin(i*E)/I}const T=i*R;if(l=l*y+h*T,c=c*y+p*T,u=u*y+f*T,d=d*y+m*T,y===1-i){const I=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=I,c*=I,u*=I,d*=I}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,o,s,a){const i=n[o],l=n[o+1],c=n[o+2],u=n[o+3],d=s[a],h=s[a+1],p=s[a+2],f=s[a+3];return t[r]=i*f+u*d+l*p-c*h,t[r+1]=l*f+u*h+c*d-i*p,t[r+2]=c*f+u*p+i*h-l*d,t[r+3]=u*f-i*d-l*h-c*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,n,o){return this._x=t,this._y=r,this._z=n,this._w=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r=!0){const n=t._x,o=t._y,s=t._z,a=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(o/2),d=i(s/2),h=l(n/2),p=l(o/2),f=l(s/2);switch(a){case"XYZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"YXZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"ZXY":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"ZYX":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"YZX":this._x=h*u*d+c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d-h*p*f;break;case"XZY":this._x=h*u*d-c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,o=Math.sin(n);return this._x=t.x*o,this._y=t.y*o,this._z=t.z*o,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],o=r[4],s=r[8],a=r[1],i=r[5],l=r[9],c=r[2],u=r[6],d=r[10],h=n+i+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(s-c)*p,this._z=(a-o)*p}else if(n>i&&n>d){const p=2*Math.sqrt(1+n-i-d);this._w=(u-l)/p,this._x=.25*p,this._y=(o+a)/p,this._z=(s+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(s-c)/p,this._x=(o+a)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(a-o)/p,this._x=(s+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(zt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const o=Math.min(1,r/n);return this.slerp(t,o),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){const n=t._x,o=t._y,s=t._z,a=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*i+o*c-s*l,this._y=o*u+a*l+s*i-n*c,this._z=s*u+a*c+n*l-o*i,this._w=a*u-n*i-o*l-s*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,o=this._y,s=this._z,a=this._w;let i=a*t._w+n*t._x+o*t._y+s*t._z;if(i<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,i=-i):this.copy(t),i>=1)return this._w=a,this._x=n,this._y=o,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*o+r*this._y,this._z=p*s+r*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,i),d=Math.sin((1-r)*u)/c,h=Math.sin(r*u)/c;return this._w=a*d+this._w*h,this._x=n*d+this._x*h,this._y=o*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),o=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(o*Math.sin(t),o*Math.cos(t),s*Math.sin(r),s*Math.cos(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class rn{constructor(t=0,r=0,n=0){rn.prototype.isVector3=!0,this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return this.applyQuaternion(nd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(nd.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*o,this.y=s[1]*r+s[4]*n+s[7]*o,this.z=s[2]*r+s[5]*n+s[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,o=this.z,s=t.elements,a=1/(s[3]*r+s[7]*n+s[11]*o+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*o+s[12])*a,this.y=(s[1]*r+s[5]*n+s[9]*o+s[13])*a,this.z=(s[2]*r+s[6]*n+s[10]*o+s[14])*a,this}applyQuaternion(t){const r=this.x,n=this.y,o=this.z,s=t.x,a=t.y,i=t.z,l=t.w,c=2*(a*o-i*n),u=2*(i*r-s*o),d=2*(s*n-a*r);return this.x=r+l*c+a*d-i*u,this.y=n+l*u+i*c-s*d,this.z=o+l*d+s*u-a*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*o,this.y=s[1]*r+s[5]*n+s[9]*o,this.z=s[2]*r+s[6]*n+s[10]*o,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,r){return this.x=zt(this.x,t.x,r.x),this.y=zt(this.y,t.y,r.y),this.z=zt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=zt(this.x,t,r),this.y=zt(this.y,t,r),this.z=zt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(zt(n,t,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const n=t.x,o=t.y,s=t.z,a=r.x,i=r.y,l=r.z;return this.x=o*l-s*i,this.y=s*a-n*l,this.z=n*i-o*a,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Qa.copy(this).projectOnVector(t),this.sub(Qa)}reflect(t){return this.sub(Qa.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(t)/r;return Math.acos(zt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,o=this.z-t.z;return r*r+n*n+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,n){const o=Math.sin(r)*t;return this.x=o*Math.sin(n),this.y=Math.cos(r)*t,this.z=o*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){const r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){const r=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),o=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=o,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r){return this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,r=Math.random()*2-1,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(t),this.y=r,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Qa=new rn,nd=new d2;function h2(e,t,r){if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(Math.abs(t[n]-e[n])>r)return!1;return!0}function p2(e,t,r){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation[0]-t.orientation[0]),n+=Math.abs(e.orientation[1]-t.orientation[1]),n+=Math.abs(e.orientation[2]-t.orientation[2]),n+=Math.abs(e.position[0]-t.position[0]),n+=Math.abs(e.position[1]-t.position[1]),n+=Math.abs(e.position[2]-t.position[2]),n<=r}function f2(e,t,r){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&p2(e.tcp_pose,t.tcp_pose,r)}const od=1e-4;function m2(e,t){const r=new wt.Vector3(t[0],t[1],t[2]),n=new wt.Vector3(e[0],e[1],e[2]),o=r.length(),s=r.normalize();let a=n.length(),i=n.normalize();i.dot(s)<0&&(a=-a,i=i.multiplyScalar(-1));let l=a-o;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),a=o+l,[...i.multiplyScalar(a)]}class jl{constructor(t,r,n,o,s,a){this.nova=t,this.controller=r,this.motionGroup=n,this.description=o,this.initialMotionState=s,this.motionStateSocket=a,this.rapidlyChangingMotionState=s,a.addEventListener("message",i=>{var c;const l=(c=et.tryParseJson(i.data))==null?void 0:c.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${i.data}`);h2(this.rapidlyChangingMotionState.joint_position,l.joint_position,od)||We.runInAction(()=>{this.rapidlyChangingMotionState=l}),f2(this.rapidlyChangingMotionState,l,od)||We.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(u=l.tcp_pose)!=null&&u.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:m2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&We.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),We.makeAutoObservable(this)}static async open(t,r){var d;const[n,o]=r.split("@"),s=await t.api.controller.getCurrentRobotControllerState(o),a=s==null?void 0:s.motion_groups.find(h=>h.motion_group===r);if(!s||!a)throw new Error(`Controller ${o} or motion group ${r} not found`);const i=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${r}/state-stream`),l=await i.firstMessage(),c=(d=et.tryParseJson(l.data))==null?void 0:d.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
150
+ `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ir(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Yo.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),o!=null&&(U.isFunction(o)?r.paramsSerializer={serialize:o}:Yo.assertOptions(o,{encode:Mt.function,serialize:Mt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Yo.assertOptions(r,{baseUrl:Mt.spelling("baseURL"),withXsrfToken:Mt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&U.merge(s.common,s[r.method]);s&&U.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=ct.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const f=[Yu.bind(this),void 0];for(f.unshift(...i),f.push(...c),h=f.length,u=Promise.resolve(r);d<h;)u=u.then(f[d++],f[d++]);return u}h=i.length;let p=r;for(;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(y){m.call(this,y);break}}try{u=Yu.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Ir(this.defaults,t);const r=Kp(t.baseURL,t.url,t.allowAbsoluteUrls);return Hp(r,t.params,t.paramsSerializer)}};U.forEach(["delete","get","head","options"],function(t){Cr.prototype[t]=function(r,n){return this.request(Ir(n||{},{method:t,url:r,data:(n||{}).data}))}});U.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,i){return this.request(Ir(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Cr.prototype[t]=r(),Cr.prototype[t+"Form"]=r(!0)});let cT=class tf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{n.subscribe(i),s=i}).then(o);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,i){n.reason||(n.reason=new bn(s,a,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new tf(function(o){t=o}),cancel:t}}};function uT(e){return function(r){return e.apply(null,r)}}function dT(e){return U.isObject(e)&&e.isAxiosError===!0}const Oi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oi).forEach(([e,t])=>{Oi[t]=e});function rf(e){const t=new Cr(e),r=_p(Cr.prototype.request,t);return U.extend(r,Cr.prototype,t,{allOwnKeys:!0}),U.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return rf(Ir(e,o))},r}const B=rf(ho);B.Axios=Cr;B.CanceledError=bn;B.CancelToken=cT;B.isCancel=Jp;B.VERSION=ef;B.toFormData=sa;B.AxiosError=de;B.Cancel=B.CanceledError;B.all=function(t){return Promise.all(t)};B.spread=uT;B.isAxiosError=dT;B.mergeConfig=Ir;B.AxiosHeaders=ct;B.formToJSON=e=>Wp(U.isHTMLForm(e)?new FormData(e):e);B.getAdapter=Zp.getAdapter;B.HttpStatusCode=Oi;B.default=B;const{Axios:jP,AxiosError:Ti,CanceledError:DP,isCancel:BP,CancelToken:UP,VERSION:LP,all:FP,Cancel:$P,isAxiosError:hT,spread:NP,toFormData:zP,AxiosHeaders:GP,HttpStatusCode:HP,formToJSON:qP,getAdapter:WP,mergeConfig:JP}=B;function pT(e){var t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<e.length;n++){var o=e[n];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(n>0&&(o=o.replace(/^[\/]+/,"")),n<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function Ja(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),pT(e)}var gt={},Qu;function fT(){if(Qu)return gt;Qu=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.PathError=gt.TokenData=void 0,gt.parse=c,gt.compile=u,gt.match=p,gt.pathToRegexp=f,gt.stringify=T;const e="/",t=w=>w,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(w){return w.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}function a(w){return w.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class i{constructor(P,k){this.tokens=P,this.originalPath=k}}gt.TokenData=i;class l extends TypeError{constructor(P,k){let b=P;k&&(b+=`: ${k}`),b+="; visit https://git.new/pathToRegexpError for info",super(b),this.originalPath=k}}gt.PathError=l;function c(w,P={}){const{encodePath:k=t}=P,b=[...w],A=[];let V=0,M=0;function D(){let Q="";if(r.test(b[V]))do Q+=b[V++];while(n.test(b[V]));else if(b[V]==='"'){let oe=V;for(;V++<b.length;){if(b[V]==='"'){V++,oe=0;break}b[V]==="\\"&&V++,Q+=b[V]}if(oe)throw new l(`Unterminated quote at index ${oe}`,w)}if(!Q)throw new l(`Missing parameter name at index ${V}`,w);return Q}for(;V<b.length;){const Q=b[V],oe=o[Q];oe?A.push({type:oe,index:V++,value:Q}):Q==="\\"?A.push({type:"escape",index:V++,value:b[V++]}):Q===":"?A.push({type:"param",index:V++,value:D()}):Q==="*"?A.push({type:"wildcard",index:V++,value:D()}):A.push({type:"char",index:V++,value:Q})}A.push({type:"end",index:V,value:""});function ne(Q){const oe=[];for(;;){const X=A[M++];if(X.type===Q)break;if(X.type==="char"||X.type==="escape"){let se=X.value,F=A[M];for(;F.type==="char"||F.type==="escape";)se+=F.value,F=A[++M];oe.push({type:"text",value:k(se)});continue}if(X.type==="param"||X.type==="wildcard"){oe.push({type:X.type,name:X.value});continue}if(X.type==="{"){oe.push({type:"group",tokens:ne("}")});continue}throw new l(`Unexpected ${X.type} at index ${X.index}, expected ${Q}`,w)}return oe}return new i(ne("end"),w)}function u(w,P={}){const{encode:k=encodeURIComponent,delimiter:b=e}=P,A=typeof w=="object"?w:c(w,P),V=d(A.tokens,b,k);return function(D={}){const[ne,...Q]=V(D);if(Q.length)throw new TypeError(`Missing parameters: ${Q.join(", ")}`);return ne}}function d(w,P,k){const b=w.map(A=>h(A,P,k));return A=>{const V=[""];for(const M of b){const[D,...ne]=M(A);V[0]+=D,V.push(...ne)}return V}}function h(w,P,k){if(w.type==="text")return()=>[w.value];if(w.type==="group"){const A=d(w.tokens,P,k);return V=>{const[M,...D]=A(V);return D.length?[""]:[M]}}const b=k||t;return w.type==="wildcard"&&k!==!1?A=>{const V=A[w.name];if(V==null)return["",w.name];if(!Array.isArray(V)||V.length===0)throw new TypeError(`Expected "${w.name}" to be a non-empty array`);return[V.map((M,D)=>{if(typeof M!="string")throw new TypeError(`Expected "${w.name}/${D}" to be a string`);return b(M)}).join(P)]}:A=>{const V=A[w.name];if(V==null)return["",w.name];if(typeof V!="string")throw new TypeError(`Expected "${w.name}" to be a string`);return[b(V)]}}function p(w,P={}){const{decode:k=decodeURIComponent,delimiter:b=e}=P,{regexp:A,keys:V}=f(w,P),M=V.map(D=>k===!1?t:D.type==="param"?k:ne=>ne.split(b).map(k));return function(ne){const Q=A.exec(ne);if(!Q)return!1;const oe=Q[0],X=Object.create(null);for(let se=1;se<Q.length;se++){if(Q[se]===void 0)continue;const F=V[se-1],ee=M[se-1];X[F.name]=ee(Q[se])}return{path:oe,params:X}}}function f(w,P={}){const{delimiter:k=e,end:b=!0,sensitive:A=!1,trailing:V=!0}=P,M=[],D=A?"":"i",ne=[];for(const X of m(w,[])){const se=typeof X=="object"?X:c(X,P);for(const F of y(se.tokens,0,[]))ne.push(S(F,k,M,se.originalPath))}let Q=`^(?:${ne.join("|")})`;return V&&(Q+=`(?:${a(k)}$)?`),Q+=b?"$":`(?=${a(k)}|$)`,{regexp:new RegExp(Q,D),keys:M}}function m(w,P){if(Array.isArray(w))for(const k of w)m(k,P);else P.push(w);return P}function*y(w,P,k){if(P===w.length)return yield k;const b=w[P];if(b.type==="group")for(const A of y(b.tokens,0,k.slice()))yield*y(w,P+1,A);else k.push(b);yield*y(w,P+1,k)}function S(w,P,k,b){let A="",V="",M=!0;for(const D of w){if(D.type==="text"){A+=a(D.value),V+=D.value,M||(M=D.value.includes(P));continue}if(D.type==="param"||D.type==="wildcard"){if(!M&&!V)throw new l(`Missing text before "${D.name}" ${D.type}`,b);D.type==="param"?A+=`(${R(P,M?"":V)}+)`:A+="([\\s\\S]+)",k.push(D),V="",M=!1;continue}}return A}function R(w,P){return P.length<2?w.length<2?`[^${a(w+P)}]`:`(?:(?!${a(w)})[^${a(P)}])`:w.length<2?`(?:(?!${a(P)})[^${a(w)}])`:`(?:(?!${a(P)}|${a(w)})[\\s\\S])`}function v(w){let P="",k=0;function b(A){return I(A)&&E(w[k])?A:JSON.stringify(A)}for(;k<w.length;){const A=w[k++];if(A.type==="text"){P+=s(A.value);continue}if(A.type==="group"){P+=`{${v(A.tokens)}}`;continue}if(A.type==="param"){P+=`:${b(A.name)}`;continue}if(A.type==="wildcard"){P+=`*${b(A.name)}`;continue}throw new TypeError(`Unknown token type: ${A.type}`)}return P}function T(w){return v(w.tokens)}function I(w){const[P,...k]=w;return r.test(P)&&k.every(b=>n.test(b))}function E(w){return w&&w.type==="text"?!n.test(w.value[0]):!0}return gt}var mT=fT();function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function gT(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yT(e){var t=gT(e,"string");return Qn(t)=="symbol"?t:t+""}function bT(e,t,r){return(t=yT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $="/api/v2".replace(/\/+$/,""),Xu={csv:","};var $e=class{constructor(e,t=$,r=B){this.basePath=t,this.axios=r,bT(this,"configuration",void 0),e&&(this.configuration=e,this.basePath=e.basePath??t)}},xT=class extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}};const N={},z="https://example.com",C=function(e,t,r){if(r==null)throw new xT(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},G=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},H=async function(e,t){t&&t.accessToken&&(e.Authorization="Bearer "+(typeof t.accessToken=="function"?await t.accessToken():await t.accessToken))};function Ei(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Ei(e,n,r)):Object.keys(t).forEach(n=>Ei(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const q=function(e,...t){const r=new URLSearchParams(e.search);Ei(r,t),e.search=r.toString()},ge=function(e,t,r){const n=typeof e!="string";return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},W=function(e){return e.pathname+e.search+e.hash},J=function(e,t,r,n){return(o=t,s=r)=>{const a={...e.options,url:(o.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return o.request(a)}},kt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},ST=function(e){return{addApp:async(t,r,n,o={})=>{C("addApp","cell",t),C("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},clearApps:async(t,r,n={})=>{C("clearApps","cell",t);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteApp:async(t,r,n,o={})=>{C("deleteApp","cell",t),C("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getApp:async(t,r,n={})=>{C("getApp","cell",t),C("getApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listApps:async(t,r={})=>{C("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},updateApp:async(t,r,n,o,s={})=>{C("updateApp","cell",t),C("updateApp","app",r),C("updateApp","app2",n);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(n,c,e),{url:W(i),options:c}}}},Wr=function(e){const t=ST(e);return{async addApp(r,n,o,s){var c,u;const a=await t.addApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearApps(r,n,o){var l,c;const s=await t.clearApps(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.clearApps"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteApp(r,n,o,s){var c,u;const a=await t.deleteApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getApp(r,n,o){var l,c;const s=await t.getApp(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.getApp"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listApps(r,n){var i,l;const o=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async updateApp(r,n,o,s,a){var u,d;const i=await t.updateApp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var Zu=class extends $e{addApp(e,t,r,n){return Wr(this.configuration).addApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearApps(e,t,r){return Wr(this.configuration).clearApps(e,t,r).then(n=>n(this.axios,this.basePath))}deleteApp(e,t,r,n){return Wr(this.configuration).deleteApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}getApp(e,t,r){return Wr(this.configuration).getApp(e,t,r).then(n=>n(this.axios,this.basePath))}listApps(e,t){return Wr(this.configuration).listApps(e,t).then(r=>r(this.axios,this.basePath))}updateApp(e,t,r,n,o){return Wr(this.configuration).updateApp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const vT=function(e){return{addBusIOService:async(t,r,n,o={})=>{C("addBusIOService","cell",t),C("addBusIOService","busIOType",r);const s="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},addModbusIO:async(t,r,n,o={})=>{C("addModbusIO","cell",t),C("addModbusIO","io",r),C("addModbusIO","modbusIOData",n);const s="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},addProfinetIO:async(t,r,n,o={})=>{C("addProfinetIO","cell",t),C("addProfinetIO","io",r),C("addProfinetIO","profinetIOData",n);const s="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},clearBusIOService:async(t,r,n={})=>{C("clearBusIOService","cell",t);const o="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteModbusIO:async(t,r,n={})=>{C("deleteModbusIO","cell",t),C("deleteModbusIO","io",r);const o="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteProfinetIO:async(t,r,n={})=>{C("deleteProfinetIO","cell",t),C("deleteProfinetIO","io",r);const o="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getBusIOService:async(t,r={})=>{C("getBusIOService","cell",t);const n="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOState:async(t,r={})=>{C("getBusIOState","cell",t);const n="/cells/{cell}/bus-ios/state".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOValues:async(t,r,n={})=>{C("getBusIOValues","cell",t);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),r&&(c.ios=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getProfinetDescription:async(t,r={})=>{C("getProfinetDescription","cell",t);const n="/cells/{cell}/bus-ios/profinet/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getProfinetIOsFromFile:async(t,r,n,o={})=>{C("getProfinetIOsFromFile","cell",t);const s="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),r!==void 0&&(u.input_offset=r),n!==void 0&&(u.output_offset=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listBusIODescriptions:async(t,r={})=>{C("listBusIODescriptions","cell",t);const n="/cells/{cell}/bus-ios/ios/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listModbusIOs:async(t,r={})=>{C("listModbusIOs","cell",t);const n="/cells/{cell}/bus-ios/modbus/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listProfinetIOs:async(t,r={})=>{C("listProfinetIOs","cell",t);const n="/cells/{cell}/bus-ios/profinet/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setBusIOValues:async(t,r,n={})=>{C("setBusIOValues","cell",t),C("setBusIOValues","iOValue",r);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},setProfinetIOsFromFile:async(t,r,n={})=>{C("setProfinetIOsFromFile","cell",t),C("setProfinetIOsFromFile","profinetInputOutputConfig",r);const o="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},Ye=function(e){const t=vT(e);return{async addBusIOService(r,n,o,s){var c,u;const a=await t.addBusIOService(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addBusIOService"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async addModbusIO(r,n,o,s){var c,u;const a=await t.addModbusIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addModbusIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async addProfinetIO(r,n,o,s){var c,u;const a=await t.addProfinetIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addProfinetIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearBusIOService(r,n,o){var l,c;const s=await t.clearBusIOService(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.clearBusIOService"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteModbusIO(r,n,o){var l,c;const s=await t.deleteModbusIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteModbusIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteProfinetIO(r,n,o){var l,c;const s=await t.deleteProfinetIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteProfinetIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getBusIOService(r,n){var i,l;const o=await t.getBusIOService(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOService"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getBusIOState(r,n){var i,l;const o=await t.getBusIOState(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOState"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getBusIOValues(r,n,o){var l,c;const s=await t.getBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.getBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getProfinetDescription(r,n){var i,l;const o=await t.getProfinetDescription(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getProfinetDescription"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getProfinetIOsFromFile(r,n,o,s){var c,u;const a=await t.getProfinetIOsFromFile(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.getProfinetIOsFromFile"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listBusIODescriptions(r,n){var i,l;const o=await t.listBusIODescriptions(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listBusIODescriptions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listModbusIOs(r,n){var i,l;const o=await t.listModbusIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listModbusIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listProfinetIOs(r,n){var i,l;const o=await t.listProfinetIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listProfinetIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async setBusIOValues(r,n,o){var l,c;const s=await t.setBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async setProfinetIOsFromFile(r,n,o){var l,c;const s=await t.setProfinetIOsFromFile(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setProfinetIOsFromFile"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var CT=class extends $e{addBusIOService(e,t,r,n){return Ye(this.configuration).addBusIOService(e,t,r,n).then(o=>o(this.axios,this.basePath))}addModbusIO(e,t,r,n){return Ye(this.configuration).addModbusIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}addProfinetIO(e,t,r,n){return Ye(this.configuration).addProfinetIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearBusIOService(e,t,r){return Ye(this.configuration).clearBusIOService(e,t,r).then(n=>n(this.axios,this.basePath))}deleteModbusIO(e,t,r){return Ye(this.configuration).deleteModbusIO(e,t,r).then(n=>n(this.axios,this.basePath))}deleteProfinetIO(e,t,r){return Ye(this.configuration).deleteProfinetIO(e,t,r).then(n=>n(this.axios,this.basePath))}getBusIOService(e,t){return Ye(this.configuration).getBusIOService(e,t).then(r=>r(this.axios,this.basePath))}getBusIOState(e,t){return Ye(this.configuration).getBusIOState(e,t).then(r=>r(this.axios,this.basePath))}getBusIOValues(e,t,r){return Ye(this.configuration).getBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}getProfinetDescription(e,t){return Ye(this.configuration).getProfinetDescription(e,t).then(r=>r(this.axios,this.basePath))}getProfinetIOsFromFile(e,t,r,n){return Ye(this.configuration).getProfinetIOsFromFile(e,t,r,n).then(o=>o(this.axios,this.basePath))}listBusIODescriptions(e,t){return Ye(this.configuration).listBusIODescriptions(e,t).then(r=>r(this.axios,this.basePath))}listModbusIOs(e,t){return Ye(this.configuration).listModbusIOs(e,t).then(r=>r(this.axios,this.basePath))}listProfinetIOs(e,t){return Ye(this.configuration).listProfinetIOs(e,t).then(r=>r(this.axios,this.basePath))}setBusIOValues(e,t,r){return Ye(this.configuration).setBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}setProfinetIOsFromFile(e,t,r){return Ye(this.configuration).setProfinetIOsFromFile(e,t,r).then(n=>n(this.axios,this.basePath))}};const wT=function(e){return{deleteCell:async(t,r,n={})=>{C("deleteCell","cell",t);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deployCell:async(t,r,n={})=>{C("deployCell","cell",t);const o=new URL("/cells",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),r!==void 0&&(l.completion_timeout=r),i["Content-Type"]="application/json",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=ge(t,a,e),{url:W(o),options:a}},getCell:async(t,r={})=>{C("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getCellStatus:async(t,r={})=>{C("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCells:async(t={})=>{const r=new URL("/cells",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},setCellStatus:async(t,r,n={})=>{C("setCellStatus","cell",t),C("setCellStatus","operatingState",r);const o="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.operating_state=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},updateCell:async(t,r,n,o={})=>{C("updateCell","cell",t),C("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}}}},gr=function(e){const t=wT(e);return{async deleteCell(r,n,o){var l,c;const s=await t.deleteCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deleteCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deployCell(r,n,o){var l,c;const s=await t.deployCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deployCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getCell(r,n){var i,l;const o=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getCellStatus(r,n){var i,l;const o=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listCells(r){var a,i;const n=await t.listCells(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["CellApi.listCells"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async setCellStatus(r,n,o){var l,c;const s=await t.setCellStatus(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.setCellStatus"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async updateCell(r,n,o,s){var c,u;const a=await t.updateCell(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var OT=class extends $e{deleteCell(e,t,r){return gr(this.configuration).deleteCell(e,t,r).then(n=>n(this.axios,this.basePath))}deployCell(e,t,r){return gr(this.configuration).deployCell(e,t,r).then(n=>n(this.axios,this.basePath))}getCell(e,t){return gr(this.configuration).getCell(e,t).then(r=>r(this.axios,this.basePath))}getCellStatus(e,t){return gr(this.configuration).getCellStatus(e,t).then(r=>r(this.axios,this.basePath))}listCells(e){return gr(this.configuration).listCells(e).then(t=>t(this.axios,this.basePath))}setCellStatus(e,t,r){return gr(this.configuration).setCellStatus(e,t,r).then(n=>n(this.axios,this.basePath))}updateCell(e,t,r,n){return gr(this.configuration).updateCell(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const TT=function(e){return{addRobotController:async(t,r,n,o={})=>{C("addRobotController","cell",t),C("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(r,l,e),{url:W(a),options:l}},clearRobotControllers:async(t,r,n={})=>{C("clearRobotControllers","cell",t);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteRobotController:async(t,r,n,o={})=>{C("deleteRobotController","cell",t),C("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getControllerDescription:async(t,r,n={})=>{C("getControllerDescription","cell",t),C("getControllerDescription","controller",r);const o="/cells/{cell}/controllers/{controller}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getCoordinateSystem:async(t,r,n,o,s={})=>{C("getCoordinateSystem","cell",t),C("getCoordinateSystem","controller",r),C("getCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.orientation_type=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getCurrentRobotControllerState:async(t,r,n={})=>{C("getCurrentRobotControllerState","cell",t),C("getCurrentRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getRobotController:async(t,r,n={})=>{C("getRobotController","cell",t),C("getRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerConfiguration:async(t,r,n={})=>{C("getVirtualControllerConfiguration","cell",t),C("getVirtualControllerConfiguration","controller",r);const o="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCoordinateSystems:async(t,r,n,o={})=>{C("listCoordinateSystems","cell",t),C("listCoordinateSystems","controller",r);const s="/cells/{cell}/controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.orientation_type=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listRobotControllers:async(t,r={})=>{C("listRobotControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setDefaultMode:async(t,r,n,o={})=>{C("setDefaultMode","cell",t),C("setDefaultMode","controller",r),C("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamFreeDrive:async(t,r,n,o={})=>{C("streamFreeDrive","cell",t),C("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.response_rate=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamRobotControllerState:async(t,r,n,o,s={})=>{C("streamRobotControllerState","cell",t),C("streamRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),n!==void 0&&(d.response_rate=n),o!==void 0&&(d.add_controller_timeout=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},updateRobotController:async(t,r,n,o,s={})=>{C("updateRobotController","cell",t),C("updateRobotController","controller",r),C("updateRobotController","robotController",n);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(n,c,e),{url:W(i),options:c}}}},ot=function(e){const t=TT(e);return{async addRobotController(r,n,o,s){var c,u;const a=await t.addRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearRobotControllers(r,n,o){var l,c;const s=await t.clearRobotControllers(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.clearRobotControllers"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteRobotController(r,n,o,s){var c,u;const a=await t.deleteRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getControllerDescription(r,n,o){var l,c;const s=await t.getControllerDescription(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getControllerDescription"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.getCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.getCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getCurrentRobotControllerState(r,n,o){var l,c;const s=await t.getCurrentRobotControllerState(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getRobotController(r,n,o){var l,c;const s=await t.getRobotController(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getRobotController"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerConfiguration(r,n,o){var l,c;const s=await t.getVirtualControllerConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getVirtualControllerConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listCoordinateSystems(r,n,o,s){var c,u;const a=await t.listCoordinateSystems(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.listCoordinateSystems"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listRobotControllers(r,n){var i,l;const o=await t.listRobotControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ControllerApi.listRobotControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async setDefaultMode(r,n,o,s){var c,u;const a=await t.setDefaultMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamFreeDrive(r,n,o,s){var c,u;const a=await t.streamFreeDrive(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamRobotControllerState(r,n,o,s,a){var u,d;const i=await t.streamRobotControllerState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.streamRobotControllerState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async updateRobotController(r,n,o,s,a){var u,d;const i=await t.updateRobotController(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var ET=class extends $e{addRobotController(e,t,r,n){return ot(this.configuration).addRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearRobotControllers(e,t,r){return ot(this.configuration).clearRobotControllers(e,t,r).then(n=>n(this.axios,this.basePath))}deleteRobotController(e,t,r,n){return ot(this.configuration).deleteRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}getControllerDescription(e,t,r){return ot(this.configuration).getControllerDescription(e,t,r).then(n=>n(this.axios,this.basePath))}getCoordinateSystem(e,t,r,n,o){return ot(this.configuration).getCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(e,t,r){return ot(this.configuration).getCurrentRobotControllerState(e,t,r).then(n=>n(this.axios,this.basePath))}getRobotController(e,t,r){return ot(this.configuration).getRobotController(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerConfiguration(e,t,r){return ot(this.configuration).getVirtualControllerConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}listCoordinateSystems(e,t,r,n){return ot(this.configuration).listCoordinateSystems(e,t,r,n).then(o=>o(this.axios,this.basePath))}listRobotControllers(e,t){return ot(this.configuration).listRobotControllers(e,t).then(r=>r(this.axios,this.basePath))}setDefaultMode(e,t,r,n){return ot(this.configuration).setDefaultMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamFreeDrive(e,t,r,n){return ot(this.configuration).streamFreeDrive(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamRobotControllerState(e,t,r,n,o){return ot(this.configuration).streamRobotControllerState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}updateRobotController(e,t,r,n,o){return ot(this.configuration).updateRobotController(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const IT=function(e){return{listIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listIODescriptions","cell",t),C("listIODescriptions","controller",r);const l="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},listIOValues:async(t,r,n,o={})=>{C("listIOValues","cell",t),C("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setOutputValues:async(t,r,n,o={})=>{C("setOutputValues","cell",t),C("setOutputValues","controller",r),C("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},streamIOValues:async(t,r,n,o={})=>{C("streamIOValues","cell",t),C("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},waitForIOEvent:async(t,r,n,o={})=>{C("waitForIOEvent","cell",t),C("waitForIOEvent","controller",r),C("waitForIOEvent","waitForIOEventRequest",n);const s="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Pn=function(e){const t=IT(e);return{async listIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["ControllerInputsOutputsApi.listIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,B,$,e)(f,d||m)},async listIOValues(r,n,o,s){var c,u;const a=await t.listIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setOutputValues(r,n,o,s){var c,u;const a=await t.setOutputValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamIOValues(r,n,o,s){var c,u;const a=await t.streamIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async waitForIOEvent(r,n,o,s){var c,u;const a=await t.waitForIOEvent(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.waitForIOEvent"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var AT=class extends $e{listIODescriptions(e,t,r,n,o,s,a){return Pn(this.configuration).listIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}listIOValues(e,t,r,n){return Pn(this.configuration).listIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}setOutputValues(e,t,r,n){return Pn(this.configuration).setOutputValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamIOValues(e,t,r,n){return Pn(this.configuration).streamIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}waitForIOEvent(e,t,r,n){return Pn(this.configuration).waitForIOEvent(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const RT=function(e){return{executeJogging:async(t,r,n,o={})=>{C("executeJogging","cell",t),C("executeJogging","controller",r),C("executeJogging","executeJoggingRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/jogging".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},PT=function(e){const t=RT(e);return{async executeJogging(r,n,o,s){var c,u;const a=await t.executeJogging(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["JoggingApi.executeJogging"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var MT=class extends $e{executeJogging(e,t,r,n){return PT(this.configuration).executeJogging(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const VT=function(e){return{forwardKinematics:async(t,r,n={})=>{C("forwardKinematics","cell",t),C("forwardKinematics","forwardKinematicsRequest",r);const o="/cells/{cell}/kinematic/forward".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},inverseKinematics:async(t,r,n={})=>{C("inverseKinematics","cell",t),C("inverseKinematics","inverseKinematicsRequest",r);const o="/cells/{cell}/kinematic/inverse".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},ed=function(e){const t=VT(e);return{async forwardKinematics(r,n,o){var l,c;const s=await t.forwardKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.forwardKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async inverseKinematics(r,n,o){var l,c;const s=await t.inverseKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.inverseKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var _T=class extends $e{forwardKinematics(e,t,r){return ed(this.configuration).forwardKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}inverseKinematics(e,t,r){return ed(this.configuration).inverseKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}};const kT=function(e){return{getCurrentMotionGroupState:async(t,r,n,o,s={})=>{C("getCurrentMotionGroupState","cell",t),C("getCurrentMotionGroupState","controller",r),C("getCurrentMotionGroupState","motionGroup",n);const a="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.response_coordinate_system=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getMotionGroupDescription:async(t,r,n,o={})=>{C("getMotionGroupDescription","cell",t),C("getMotionGroupDescription","controller",r),C("getMotionGroupDescription","motionGroup",n);const s="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamMotionGroupState:async(t,r,n,o,s,a={})=>{C("streamMotionGroupState","cell",t),C("streamMotionGroupState","controller",r),C("streamMotionGroupState","motionGroup",n);const i="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...a},d={},h={};G(u,e),await H(d,e),o!==void 0&&(h.response_rate=o),s!==void 0&&(h.response_coordinate_system=s),q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},{url:W(l),options:u}}}},Ya=function(e){const t=kT(e);return{async getCurrentMotionGroupState(r,n,o,s,a){var u,d;const i=await t.getCurrentMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["MotionGroupApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getMotionGroupDescription(r,n,o,s){var c,u;const a=await t.getMotionGroupDescription(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["MotionGroupApi.getMotionGroupDescription"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async streamMotionGroupState(r,n,o,s,a,i){var d,h;const l=await t.streamMotionGroupState(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["MotionGroupApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,B,$,e)(p,u||f)}}};var jT=class extends $e{getCurrentMotionGroupState(e,t,r,n,o){return Ya(this.configuration).getCurrentMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getMotionGroupDescription(e,t,r,n){return Ya(this.configuration).getMotionGroupDescription(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(e,t,r,n,o,s){return Ya(this.configuration).streamMotionGroupState(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}};const DT=function(e){return{getMotionGroupCollisionModel:async(t,r={})=>{C("getMotionGroupCollisionModel","motionGroupModel",t);const n="/motion-group-models/{motion-group-model}/collision".replace("{motion-group-model}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getMotionGroupModels:async(t={})=>{const r=new URL("/motion-group-models",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}}}},td=function(e){const t=DT(e);return{async getMotionGroupCollisionModel(r,n){var i,l;const o=await t.getMotionGroupCollisionModel(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["MotionGroupModelsApi.getMotionGroupCollisionModel"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getMotionGroupModels(r){var a,i;const n=await t.getMotionGroupModels(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["MotionGroupModelsApi.getMotionGroupModels"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)}}};var BT=class extends $e{getMotionGroupCollisionModel(e,t){return td(this.configuration).getMotionGroupCollisionModel(e,t).then(r=>r(this.axios,this.basePath))}getMotionGroupModels(e){return td(this.configuration).getMotionGroupModels(e).then(t=>t(this.axios,this.basePath))}};const UT=function(e){return{deleteStoredCollider:async(t,r,n={})=>{C("deleteStoredCollider","cell",t),C("deleteStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{C("deleteStoredCollisionLinkChain","cell",t),C("deleteStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{C("deleteStoredCollisionTool","cell",t),C("deleteStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollider:async(t,r,n={})=>{C("getStoredCollider","cell",t),C("getStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{C("getStoredCollisionLinkChain","cell",t),C("getStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{C("getStoredCollisionTool","cell",t),C("getStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCollisionLinkChains:async(t,r={})=>{C("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCollisionLinkChainsKeys:async(t,r={})=>{C("listCollisionLinkChainsKeys","cell",t);const n="/cells/{cell}/store/collision/link-chains-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredColliders:async(t,r={})=>{C("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollidersKeys:async(t,r={})=>{C("listStoredCollidersKeys","cell",t);const n="/cells/{cell}/store/collision/colliders-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionTools:async(t,r={})=>{C("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionToolsKeys:async(t,r={})=>{C("listStoredCollisionToolsKeys","cell",t);const n="/cells/{cell}/store/collision/tools-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollider:async(t,r,n,o={})=>{C("storeCollider","cell",t),C("storeCollider","collider",r),C("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},storeCollisionLinkChain:async(t,r,n,o={})=>{C("storeCollisionLinkChain","cell",t),C("storeCollisionLinkChain","linkChain",r),C("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},storeCollisionTool:async(t,r,n,o={})=>{C("storeCollisionTool","cell",t),C("storeCollisionTool","tool",r),C("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Xe=function(e){const t=UT(e);return{async deleteStoredCollider(r,n,o){var l,c;const s=await t.deleteStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteStoredCollisionTool(r,n,o){var l,c;const s=await t.deleteStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollider(r,n,o){var l,c;const s=await t.getStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionTool(r,n,o){var l,c;const s=await t.getStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const o=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listCollisionLinkChainsKeys(r,n){var i,l;const o=await t.listCollisionLinkChainsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChainsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredColliders(r,n){var i,l;const o=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollidersKeys(r,n){var i,l;const o=await t.listStoredCollidersKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollidersKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionTools(r,n){var i,l;const o=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionToolsKeys(r,n){var i,l;const o=await t.listStoredCollisionToolsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionToolsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeCollider(r,n,o,s){var c,u;const a=await t.storeCollider(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async storeCollisionLinkChain(r,n,o,s){var c,u;const a=await t.storeCollisionLinkChain(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async storeCollisionTool(r,n,o,s){var c,u;const a=await t.storeCollisionTool(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var LT=class extends $e{deleteStoredCollider(e,t,r){return Xe(this.configuration).deleteStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionLinkChain(e,t,r){return Xe(this.configuration).deleteStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionTool(e,t,r){return Xe(this.configuration).deleteStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollider(e,t,r){return Xe(this.configuration).getStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionLinkChain(e,t,r){return Xe(this.configuration).getStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionTool(e,t,r){return Xe(this.configuration).getStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}listCollisionLinkChains(e,t){return Xe(this.configuration).listCollisionLinkChains(e,t).then(r=>r(this.axios,this.basePath))}listCollisionLinkChainsKeys(e,t){return Xe(this.configuration).listCollisionLinkChainsKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredColliders(e,t){return Xe(this.configuration).listStoredColliders(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollidersKeys(e,t){return Xe(this.configuration).listStoredCollidersKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionTools(e,t){return Xe(this.configuration).listStoredCollisionTools(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionToolsKeys(e,t){return Xe(this.configuration).listStoredCollisionToolsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollider(e,t,r,n){return Xe(this.configuration).storeCollider(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(e,t,r,n){return Xe(this.configuration).storeCollisionLinkChain(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionTool(e,t,r,n){return Xe(this.configuration).storeCollisionTool(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const FT=function(e){return{deleteStoredCollisionSetup:async(t,r,n={})=>{C("deleteStoredCollisionSetup","cell",t),C("deleteStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionSetup:async(t,r,n={})=>{C("getStoredCollisionSetup","cell",t),C("getStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listStoredCollisionSetups:async(t,r={})=>{C("listStoredCollisionSetups","cell",t);const n="/cells/{cell}/store/collision/setups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionSetupsKeys:async(t,r={})=>{C("listStoredCollisionSetupsKeys","cell",t);const n="/cells/{cell}/store/collision/setups-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollisionSetup:async(t,r,n,o={})=>{C("storeCollisionSetup","cell",t),C("storeCollisionSetup","setup",r),C("storeCollisionSetup","collisionSetup",n);const s="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Mn=function(e){const t=FT(e);return{async deleteStoredCollisionSetup(r,n,o){var l,c;const s=await t.deleteStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.deleteStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getStoredCollisionSetup(r,n,o){var l,c;const s=await t.getStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.getStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listStoredCollisionSetups(r,n){var i,l;const o=await t.listStoredCollisionSetups(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async listStoredCollisionSetupsKeys(r,n){var i,l;const o=await t.listStoredCollisionSetupsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetupsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeCollisionSetup(r,n,o,s){var c,u;const a=await t.storeCollisionSetup(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionSetupsApi.storeCollisionSetup"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var $T=class extends $e{deleteStoredCollisionSetup(e,t,r){return Mn(this.configuration).deleteStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionSetup(e,t,r){return Mn(this.configuration).getStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionSetups(e,t){return Mn(this.configuration).listStoredCollisionSetups(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionSetupsKeys(e,t){return Mn(this.configuration).listStoredCollisionSetupsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollisionSetup(e,t,r,n){return Mn(this.configuration).storeCollisionSetup(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const NT=function(e){return{clearAllObjects:async(t,r={})=>{C("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},deleteObject:async(t,r,n={})=>{C("deleteObject","cell",t),C("deleteObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObject:async(t,r,n={})=>{C("getObject","cell",t),C("getObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObjectMetadata:async(t,r,n={})=>{C("getObjectMetadata","cell",t),C("getObjectMetadata","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"HEAD",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listAllObjectKeys:async(t,r={})=>{C("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeObject:async(t,r,n,o,s={})=>{C("storeObject","cell",t),C("storeObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);G(c,e),await H(u,e),o!==void 0&&h.append("any_value",new Blob([JSON.stringify(o)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),q(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...s.headers},c.data=h,{url:W(i),options:c}}}},Jr=function(e){const t=NT(e);return{async clearAllObjects(r,n){var i,l;const o=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async deleteObject(r,n,o){var l,c;const s=await t.deleteObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.deleteObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getObject(r,n,o){var l,c;const s=await t.getObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getObjectMetadata(r,n,o){var l,c;const s=await t.getObjectMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObjectMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const o=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async storeObject(r,n,o,s,a){var u,d;const i=await t.storeObject(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var zT=class extends $e{clearAllObjects(e,t){return Jr(this.configuration).clearAllObjects(e,t).then(r=>r(this.axios,this.basePath))}deleteObject(e,t,r){return Jr(this.configuration).deleteObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObject(e,t,r){return Jr(this.configuration).getObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObjectMetadata(e,t,r){return Jr(this.configuration).getObjectMetadata(e,t,r).then(n=>n(this.axios,this.basePath))}listAllObjectKeys(e,t){return Jr(this.configuration).listAllObjectKeys(e,t).then(r=>r(this.axios,this.basePath))}storeObject(e,t,r,n,o){return Jr(this.configuration).storeObject(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const GT=function(e){return{backupConfiguration:async(t,r,n={})=>{const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Xu.csv)),r!==void 0&&(l.metadata=r),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},{url:W(o),options:a}},checkNovaVersionUpdate:async(t,r={})=>{C("checkNovaVersionUpdate","channel",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.channel=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getConfigurationBackupStatus:async(t,r={})=>{C("getConfigurationBackupStatus","operationId",t);const n=new URL("/system/configuration/status",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.operation_id=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getDiagnosePackage:async(t={})=>{const r=new URL("/system/diagnosis-package/zip",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemStatus:async(t={})=>{const r=new URL("/system/status",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemVersion:async(t={})=>{const r=new URL("/system/version",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},listConfigurationResources:async(t={})=>{const r=new URL("/system/configuration/resources",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},restoreConfiguration:async(t,r,n={})=>{C("restoreConfiguration","resources",t),C("restoreConfiguration","body",r);const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Xu.csv)),i["Content-Type"]="application/gzip",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=ge(r,a,e),{url:W(o),options:a}},updateNovaVersion:async(t,r={})=>{C("updateNovaVersion","updateNovaVersionRequest",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},a={},i={};G(s,e),await H(a,e),a["Content-Type"]="application/json",q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},s.data=ge(t,s,e),{url:W(n),options:s}}}},Nt=function(e){const t=GT(e);return{async backupConfiguration(r,n,o){var l,c;const s=await t.backupConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.backupConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async checkNovaVersionUpdate(r,n){var i,l;const o=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getConfigurationBackupStatus(r,n){var i,l;const o=await t.getConfigurationBackupStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.getConfigurationBackupStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)},async getDiagnosePackage(r){var a,i;const n=await t.getDiagnosePackage(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getDiagnosePackage"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async getSystemStatus(r){var a,i;const n=await t.getSystemStatus(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemStatus"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async getSystemVersion(r){var a,i;const n=await t.getSystemVersion(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemVersion"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async listConfigurationResources(r){var a,i;const n=await t.listConfigurationResources(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.listConfigurationResources"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,B,$,e)(l,s||c)},async restoreConfiguration(r,n,o){var l,c;const s=await t.restoreConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.restoreConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async updateNovaVersion(r,n){var i,l;const o=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,B,$,e)(c,a||u)}}};var HT=class extends $e{backupConfiguration(e,t,r){return Nt(this.configuration).backupConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}checkNovaVersionUpdate(e,t){return Nt(this.configuration).checkNovaVersionUpdate(e,t).then(r=>r(this.axios,this.basePath))}getConfigurationBackupStatus(e,t){return Nt(this.configuration).getConfigurationBackupStatus(e,t).then(r=>r(this.axios,this.basePath))}getDiagnosePackage(e){return Nt(this.configuration).getDiagnosePackage(e).then(t=>t(this.axios,this.basePath))}getSystemStatus(e){return Nt(this.configuration).getSystemStatus(e).then(t=>t(this.axios,this.basePath))}getSystemVersion(e){return Nt(this.configuration).getSystemVersion(e).then(t=>t(this.axios,this.basePath))}listConfigurationResources(e){return Nt(this.configuration).listConfigurationResources(e).then(t=>t(this.axios,this.basePath))}restoreConfiguration(e,t,r){return Nt(this.configuration).restoreConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}updateNovaVersion(e,t){return Nt(this.configuration).updateNovaVersion(e,t).then(r=>r(this.axios,this.basePath))}};const qT=function(e){return{addTrajectory:async(t,r,n,o={})=>{C("addTrajectory","cell",t),C("addTrajectory","controller",r),C("addTrajectory","addTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},clearTrajectories:async(t,r,n={})=>{C("clearTrajectories","cell",t),C("clearTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteTrajectory:async(t,r,n,o={})=>{C("deleteTrajectory","cell",t),C("deleteTrajectory","controller",r),C("deleteTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getTrajectory:async(t,r,n,o={})=>{C("getTrajectory","cell",t),C("getTrajectory","controller",r),C("getTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listTrajectories:async(t,r,n={})=>{C("listTrajectories","cell",t),C("listTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}}}},Vn=function(e){const t=qT(e);return{async addTrajectory(r,n,o,s){var c,u;const a=await t.addTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.addTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async clearTrajectories(r,n,o){var l,c;const s=await t.clearTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.clearTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async deleteTrajectory(r,n,o,s){var c,u;const a=await t.deleteTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.deleteTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getTrajectory(r,n,o,s){var c,u;const a=await t.getTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.getTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listTrajectories(r,n,o){var l,c;const s=await t.listTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.listTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var WT=class extends $e{addTrajectory(e,t,r,n){return Vn(this.configuration).addTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearTrajectories(e,t,r){return Vn(this.configuration).clearTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}deleteTrajectory(e,t,r,n){return Vn(this.configuration).deleteTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}getTrajectory(e,t,r,n){return Vn(this.configuration).getTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}listTrajectories(e,t,r){return Vn(this.configuration).listTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}};const JT=function(e){return{executeTrajectory:async(t,r,n,o={})=>{C("executeTrajectory","cell",t),C("executeTrajectory","controller",r),C("executeTrajectory","executeTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},YT=function(e){const t=JT(e);return{async executeTrajectory(r,n,o,s){var c,u;const a=await t.executeTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryExecutionApi.executeTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var KT=class extends $e{executeTrajectory(e,t,r,n){return YT(this.configuration).executeTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const QT=function(e){return{planCollisionFree:async(t,r,n={})=>{C("planCollisionFree","cell",t),C("planCollisionFree","planCollisionFreeRequest",r);const o="/cells/{cell}/trajectory-planning/plan-collision-free".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}},planTrajectory:async(t,r,n={})=>{C("planTrajectory","cell",t),C("planTrajectory","planTrajectoryRequest",r);const o="/cells/{cell}/trajectory-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ge(r,i,e),{url:W(s),options:i}}}},rd=function(e){const t=QT(e);return{async planCollisionFree(r,n,o){var l,c;const s=await t.planCollisionFree(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planCollisionFree"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async planTrajectory(r,n,o){var l,c;const s=await t.planTrajectory(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planTrajectory"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)}}};var XT=class extends $e{planCollisionFree(e,t,r){return rd(this.configuration).planCollisionFree(e,t,r).then(n=>n(this.axios,this.basePath))}planTrajectory(e,t,r){return rd(this.configuration).planTrajectory(e,t,r).then(n=>n(this.axios,this.basePath))}};const ZT=function(e){return{addVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("addVirtualControllerCoordinateSystem","cell",t),C("addVirtualControllerCoordinateSystem","controller",r),C("addVirtualControllerCoordinateSystem","coordinateSystem",n),C("addVirtualControllerCoordinateSystem","coordinateSystemData",o);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}},addVirtualControllerTcp:async(t,r,n,o,s,a={})=>{C("addVirtualControllerTcp","cell",t),C("addVirtualControllerTcp","controller",r),C("addVirtualControllerTcp","motionGroup",n),C("addVirtualControllerTcp","tcp",o),C("addVirtualControllerTcp","robotTcpData",s);const i="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"PUT",...c,...a},d={},h={};G(u,e),await H(d,e),d["Content-Type"]="application/json",q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},u.data=ge(s,u,e),{url:W(l),options:u}},deleteVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("deleteVirtualControllerCoordinateSystem","cell",t),C("deleteVirtualControllerCoordinateSystem","controller",r),C("deleteVirtualControllerCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.delete_dependent=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},deleteVirtualControllerTcp:async(t,r,n,o,s={})=>{C("deleteVirtualControllerTcp","cell",t),C("deleteVirtualControllerTcp","controller",r),C("deleteVirtualControllerTcp","motionGroup",n),C("deleteVirtualControllerTcp","tcp",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getEmergencyStop:async(t,r,n={})=>{C("getEmergencyStop","cell",t),C("getEmergencyStop","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getMotionGroupState:async(t,r,n,o={})=>{C("getMotionGroupState","cell",t),C("getMotionGroupState","controller",r),C("getMotionGroupState","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getMotionGroups:async(t,r,n={})=>{C("getMotionGroups","cell",t),C("getMotionGroups","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/motion-groups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getOperationMode:async(t,r,n={})=>{C("getOperationMode","cell",t),C("getOperationMode","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerMounting:async(t,r,n,o={})=>{C("getVirtualControllerMounting","cell",t),C("getVirtualControllerMounting","controller",r),C("getVirtualControllerMounting","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerCoordinateSystems:async(t,r,n={})=>{C("listVirtualControllerCoordinateSystems","cell",t),C("listVirtualControllerCoordinateSystems","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listVirtualControllerTcps:async(t,r,n,o={})=>{C("listVirtualControllerTcps","cell",t),C("listVirtualControllerTcps","controller",r),C("listVirtualControllerTcps","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setEmergencyStop:async(t,r,n,o={})=>{C("setEmergencyStop","cell",t),C("setEmergencyStop","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.active=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setMotionGroupState:async(t,r,n,o,s={})=>{C("setMotionGroupState","cell",t),C("setMotionGroupState","controller",r),C("setMotionGroupState","motionGroup",n),C("setMotionGroupState","motionGroupJoints",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}},setOperationMode:async(t,r,n,o={})=>{C("setOperationMode","cell",t),C("setOperationMode","controller",r),C("setOperationMode","mode",n);const s="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setVirtualControllerMounting:async(t,r,n,o,s={})=>{C("setVirtualControllerMounting","cell",t),C("setVirtualControllerMounting","controller",r),C("setVirtualControllerMounting","motionGroup",n),C("setVirtualControllerMounting","coordinateSystem",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ge(o,c,e),{url:W(i),options:c}}}},Ze=function(e){const t=ZT(e);return{async addVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.addVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.addVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async addVirtualControllerTcp(r,n,o,s,a,i){var d,h;const l=await t.addVirtualControllerTcp(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["VirtualControllerApi.addVirtualControllerTcp"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,B,$,e)(p,u||f)},async deleteVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async deleteVirtualControllerTcp(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerTcp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async getEmergencyStop(r,n,o){var l,c;const s=await t.getEmergencyStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getEmergencyStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getMotionGroupState(r,n,o,s){var c,u;const a=await t.getMotionGroupState(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getMotionGroups(r,n,o){var l,c;const s=await t.getMotionGroups(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getMotionGroups"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getOperationMode(r,n,o){var l,c;const s=await t.getOperationMode(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getOperationMode"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerMounting(r,n,o,s){var c,u;const a=await t.getVirtualControllerMounting(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getVirtualControllerMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listVirtualControllerCoordinateSystems(r,n,o){var l,c;const s=await t.listVirtualControllerCoordinateSystems(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.listVirtualControllerCoordinateSystems"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async listVirtualControllerTcps(r,n,o,s){var c,u;const a=await t.listVirtualControllerTcps(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.listVirtualControllerTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setEmergencyStop(r,n,o,s){var c,u;const a=await t.setEmergencyStop(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setEmergencyStop"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setMotionGroupState(r,n,o,s,a){var u,d;const i=await t.setMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)},async setOperationMode(r,n,o,s){var c,u;const a=await t.setOperationMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async setVirtualControllerMounting(r,n,o,s,a){var u,d;const i=await t.setVirtualControllerMounting(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setVirtualControllerMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,B,$,e)(h,c||p)}}};var e2=class extends $e{addVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).addVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}addVirtualControllerTcp(e,t,r,n,o,s){return Ze(this.configuration).addVirtualControllerTcp(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}deleteVirtualControllerTcp(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerTcp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getEmergencyStop(e,t,r){return Ze(this.configuration).getEmergencyStop(e,t,r).then(n=>n(this.axios,this.basePath))}getMotionGroupState(e,t,r,n){return Ze(this.configuration).getMotionGroupState(e,t,r,n).then(o=>o(this.axios,this.basePath))}getMotionGroups(e,t,r){return Ze(this.configuration).getMotionGroups(e,t,r).then(n=>n(this.axios,this.basePath))}getOperationMode(e,t,r){return Ze(this.configuration).getOperationMode(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerMounting(e,t,r,n){return Ze(this.configuration).getVirtualControllerMounting(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerCoordinateSystems(e,t,r){return Ze(this.configuration).listVirtualControllerCoordinateSystems(e,t,r).then(n=>n(this.axios,this.basePath))}listVirtualControllerTcps(e,t,r,n){return Ze(this.configuration).listVirtualControllerTcps(e,t,r,n).then(o=>o(this.axios,this.basePath))}setEmergencyStop(e,t,r,n){return Ze(this.configuration).setEmergencyStop(e,t,r,n).then(o=>o(this.axios,this.basePath))}setMotionGroupState(e,t,r,n,o){return Ze(this.configuration).setMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}setOperationMode(e,t,r,n){return Ze(this.configuration).setOperationMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}setVirtualControllerMounting(e,t,r,n,o){return Ze(this.configuration).setVirtualControllerMounting(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const t2=function(e){return{externalJointsStream:async(t,r,n,o={})=>{C("externalJointsStream","cell",t),C("externalJointsStream","controller",r),C("externalJointsStream","externalJointStreamRequest",n);const s="/cells/{cell}/virtual-controllers/{controller}/external-joints-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}},getCycleTime:async(t,r,n={})=>{C("getCycleTime","cell",t),C("getCycleTime","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerBehavior:async(t,r,n={})=>{C("getVirtualControllerBehavior","cell",t),C("getVirtualControllerBehavior","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},setVirtualControllerBehavior:async(t,r,n,o={})=>{C("setVirtualControllerBehavior","cell",t),C("setVirtualControllerBehavior","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.behavior=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}}}},jo=function(e){const t=t2(e);return{async externalJointsStream(r,n,o,s){var c,u;const a=await t.externalJointsStream(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async getCycleTime(r,n,o){var l,c;const s=await t.getCycleTime(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getCycleTime"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async getVirtualControllerBehavior(r,n,o){var l,c;const s=await t.getVirtualControllerBehavior(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getVirtualControllerBehavior"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,B,$,e)(u,i||d)},async setVirtualControllerBehavior(r,n,o,s){var c,u;const a=await t.setVirtualControllerBehavior(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.setVirtualControllerBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var r2=class extends $e{externalJointsStream(e,t,r,n){return jo(this.configuration).externalJointsStream(e,t,r,n).then(o=>o(this.axios,this.basePath))}getCycleTime(e,t,r){return jo(this.configuration).getCycleTime(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerBehavior(e,t,r){return jo(this.configuration).getVirtualControllerBehavior(e,t,r).then(n=>n(this.axios,this.basePath))}setVirtualControllerBehavior(e,t,r,n){return jo(this.configuration).setVirtualControllerBehavior(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const n2=function(e){return{listIOs:async(t,r,n,o={})=>{C("listIOs","cell",t),C("listIOs","controller",r),C("listIOs","ios",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listVirtualControllerIODescriptions","cell",t),C("listVirtualControllerIODescriptions","controller",r);const l="/cells/{cell}/virtual-controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},setIOValues:async(t,r,n,o={})=>{C("setIOValues","cell",t),C("setIOValues","controller",r),C("setIOValues","iOValue",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ge(n,l,e),{url:W(a),options:l}}}},Ka=function(e){const t=n2(e);return{async listIOs(r,n,o,s){var c,u;const a=await t.listIOs(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.listIOs"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)},async listVirtualControllerIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listVirtualControllerIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["VirtualControllerInputsOutputsApi.listVirtualControllerIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,B,$,e)(f,d||m)},async setIOValues(r,n,o,s){var c,u;const a=await t.setIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.setIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,B,$,e)(d,l||h)}}};var o2=class extends $e{listIOs(e,t,r,n){return Ka(this.configuration).listIOs(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerIODescriptions(e,t,r,n,o,s,a){return Ka(this.configuration).listVirtualControllerIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}setIOValues(e,t,r,n){return Ka(this.configuration).setIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}},s2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(HT),this.cell=this.withUnwrappedResponsesOnly(OT),this.motionGroup=this.withCellId(jT),this.motionGroupModels=this.withCellId(BT),this.controller=this.withCellId(ET),this.controllerIOs=this.withCellId(AT),this.trajectoryPlanning=this.withCellId(XT),this.trajectoryExecution=this.withCellId(KT),this.trajectoryCaching=this.withCellId(WT),this.application=this.withCellId(Zu),this.applicationGlobal=this.withUnwrappedResponsesOnly(Zu),this.jogging=this.withCellId(MT),this.kinematics=this.withCellId(_T),this.busInputsOutputs=this.withCellId(CT),this.virtualController=this.withCellId(e2),this.virtualControllerBehavior=this.withCellId(r2),this.virtualControllerIOs=this.withCellId(o2),this.storeObject=this.withCellId(zT),this.storeCollisionComponents=this.withCellId(LT),this.storeCollisionSetups=this.withCellId($T)}withCellId(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??B.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,[this.cellId,...o]).then(s=>s.data)}return t}withUnwrappedResponsesOnly(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??B.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,o).then(s=>s.data)}return t}},a2=class{constructor(){this.connections=[]}async handleAPIRequest(e){var o,s,a;const t=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return["mock-ur5e"]}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{initial_joint_position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",kind:"VirtualController",manufacturer:"universalrobots",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/state",handle(){return{mode:"MODE_CONTROL",last_error:[],timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,controller:"mock-ur5e",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",velocity_override:100,motion_groups:[{timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,motion_group:"0@mock-ur5e",controller:"mock-ur5e",joint_position:[1.487959623336792,-1.8501918315887451,1.8003005981445312,6.034560203552246,1.4921919107437134,1.593459963798523],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_torque:[],joint_current:[0,0,0,0,0,0],flange_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},tcp:"Flange",tcp_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},payload:"",coordinate_system:"",standstill:!0}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",handle(){return{motion_group_model:"UniversalRobots_UR5e",mounting:{position:[0,0,0],orientation:[0,0,0]},tcps:{Flange:{name:"Default-Flange",pose:{position:[0,0,0],orientation:[0,0,0]}}},payloads:{"FPay-0":{name:"FPay-0",payload:0,center_of_mass:[0,0,0],moment_of_inertia:[0,0,0]}},cycle_time:8,dh_parameters:[{alpha:1.5707963267948966,d:162.25},{a:-425},{a:-392.2},{alpha:1.5707963267948966,d:133.3},{alpha:-1.5707963267948966,d:99.7},{d:99.6}],operation_limits:{auto_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3},elbow:{velocity:5e3},flange:{velocity:5e3}},manual_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t1_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t2_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}}},serial_number:"WBVirtualRobot"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/coordinate-systems",handle(){return[{coordinate_system:"",name:"world",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"},{coordinate_system:"CS-0",name:"Default-CS",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"}]}}],r=((o=e.method)==null?void 0:o.toUpperCase())||"GET",n=`/cells${(a=(s=e.url)==null?void 0:s.split("/cells")[1])==null?void 0:a.split("?")[0]}`;for(const i of t){const l=mT.match(i.path)(n||"");if(r===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new Ti(`No mock handler matched this request: ${r} ${n}`,"404",e)}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(i2)})),e.url.includes("/execution/jogging")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{message:"string",kind:"INITIALIZE_RECEIVED"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}};const i2={result:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",timestamp:new Date().toISOString(),sequence_number:1,joint_position:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},standstill:!1,flange_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]},tcp_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]}}};function l2(e){return e.startsWith("http")||(e=`http://${e}`),new URL(e).toString()}var c2=class{constructor(e){this.authPromise=null,this.accessToken=null;const t=e.cellId??"cell";this.config={cellId:t,...e},this.accessToken=e.accessToken||za.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"?this.mock=new a2:this.config.instanceUrl=l2(this.config.instanceUrl);const r=B.create({baseURL:Ja(this.config.instanceUrl,"/api/v2"),headers:typeof window<"u"&&window.location.origin.includes("localhost")?{}:{"X-Wandelbots-Client":"Wandelbots-Nova-JS-SDK"}});r.interceptors.request.use(async n=>(n.headers.Authorization||(this.accessToken?n.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(n.headers.Authorization=`Basic ${btoa(`${e.username}:${e.password}`)}`)),n)),typeof window<"u"&&r.interceptors.response.use(n=>n,async n=>{var o,s;if(hT(n))if(((o=n.response)==null?void 0:o.status)===401)try{if(await this.renewAuthentication(),n.config)return this.accessToken?n.config.headers.Authorization=`Bearer ${this.accessToken}`:delete n.config.headers.Authorization,r.request(n.config)}catch(a){return Promise.reject(a)}else((s=n.response)==null?void 0:s.status)===503&&(await fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(n)}),this.api=new s2(t,{...e,basePath:Ja(this.config.instanceUrl,"/api/v2"),isJsonMime:n=>n==="application/json",baseOptions:{...this.mock?{adapter:n=>this.mock.handleAPIRequest(n)}:{},...e.baseOptions},axiosInstance:r})}async renewAuthentication(){if(!this.authPromise){this.authPromise=Dw(this.config.instanceUrl);try{this.accessToken=await this.authPromise,this.accessToken?za.setString("wbjs.access_token",this.accessToken):za.delete("wbjs.access_token")}finally{this.authPromise=null}}}makeWebsocketURL(e){const t=new URL(Ja(this.config.instanceUrl,`/api/v2/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new _w(this.makeWebsocketURL(e),{mock:this.mock})}};function u2(e){var s,a,i,l,c,u;const t=[((s=e.position)==null?void 0:s[0])??0,((a=e.position)==null?void 0:a[1])??0,((i=e.position)==null?void 0:i[2])??0],r=[((l=e.orientation)==null?void 0:l[0])??0,((c=e.orientation)==null?void 0:c[1])??0,((u=e.orientation)==null?void 0:u[2])??0],n=t.map(d=>d.toFixed(1)),o=r.map(d=>d.toFixed(4));return`(${n.concat(o).join(", ")})`}function zt(e,t,r){return Math.max(t,Math.min(r,e))}class d2{constructor(t=0,r=0,n=0,o=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=o}static slerpFlat(t,r,n,o,s,a,i){let l=n[o+0],c=n[o+1],u=n[o+2],d=n[o+3];const h=s[a+0],p=s[a+1],f=s[a+2],m=s[a+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d;return}if(i===1){t[r+0]=h,t[r+1]=p,t[r+2]=f,t[r+3]=m;return}if(d!==m||l!==h||c!==p||u!==f){let y=1-i;const S=l*h+c*p+u*f+d*m,R=S>=0?1:-1,v=1-S*S;if(v>Number.EPSILON){const I=Math.sqrt(v),E=Math.atan2(I,S*R);y=Math.sin(y*E)/I,i=Math.sin(i*E)/I}const T=i*R;if(l=l*y+h*T,c=c*y+p*T,u=u*y+f*T,d=d*y+m*T,y===1-i){const I=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=I,c*=I,u*=I,d*=I}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,o,s,a){const i=n[o],l=n[o+1],c=n[o+2],u=n[o+3],d=s[a],h=s[a+1],p=s[a+2],f=s[a+3];return t[r]=i*f+u*d+l*p-c*h,t[r+1]=l*f+u*h+c*d-i*p,t[r+2]=c*f+u*p+i*h-l*d,t[r+3]=u*f-i*d-l*h-c*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,n,o){return this._x=t,this._y=r,this._z=n,this._w=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r=!0){const n=t._x,o=t._y,s=t._z,a=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(o/2),d=i(s/2),h=l(n/2),p=l(o/2),f=l(s/2);switch(a){case"XYZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"YXZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"ZXY":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"ZYX":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"YZX":this._x=h*u*d+c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d-h*p*f;break;case"XZY":this._x=h*u*d-c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,o=Math.sin(n);return this._x=t.x*o,this._y=t.y*o,this._z=t.z*o,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],o=r[4],s=r[8],a=r[1],i=r[5],l=r[9],c=r[2],u=r[6],d=r[10],h=n+i+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(s-c)*p,this._z=(a-o)*p}else if(n>i&&n>d){const p=2*Math.sqrt(1+n-i-d);this._w=(u-l)/p,this._x=.25*p,this._y=(o+a)/p,this._z=(s+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(s-c)/p,this._x=(o+a)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(a-o)/p,this._x=(s+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(zt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const o=Math.min(1,r/n);return this.slerp(t,o),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){const n=t._x,o=t._y,s=t._z,a=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*i+o*c-s*l,this._y=o*u+a*l+s*i-n*c,this._z=s*u+a*c+n*l-o*i,this._w=a*u-n*i-o*l-s*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,o=this._y,s=this._z,a=this._w;let i=a*t._w+n*t._x+o*t._y+s*t._z;if(i<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,i=-i):this.copy(t),i>=1)return this._w=a,this._x=n,this._y=o,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*o+r*this._y,this._z=p*s+r*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,i),d=Math.sin((1-r)*u)/c,h=Math.sin(r*u)/c;return this._w=a*d+this._w*h,this._x=n*d+this._x*h,this._y=o*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),o=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(o*Math.sin(t),o*Math.cos(t),s*Math.sin(r),s*Math.cos(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class rn{constructor(t=0,r=0,n=0){rn.prototype.isVector3=!0,this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return this.applyQuaternion(nd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(nd.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*o,this.y=s[1]*r+s[4]*n+s[7]*o,this.z=s[2]*r+s[5]*n+s[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,o=this.z,s=t.elements,a=1/(s[3]*r+s[7]*n+s[11]*o+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*o+s[12])*a,this.y=(s[1]*r+s[5]*n+s[9]*o+s[13])*a,this.z=(s[2]*r+s[6]*n+s[10]*o+s[14])*a,this}applyQuaternion(t){const r=this.x,n=this.y,o=this.z,s=t.x,a=t.y,i=t.z,l=t.w,c=2*(a*o-i*n),u=2*(i*r-s*o),d=2*(s*n-a*r);return this.x=r+l*c+a*d-i*u,this.y=n+l*u+i*c-s*d,this.z=o+l*d+s*u-a*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*o,this.y=s[1]*r+s[5]*n+s[9]*o,this.z=s[2]*r+s[6]*n+s[10]*o,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,r){return this.x=zt(this.x,t.x,r.x),this.y=zt(this.y,t.y,r.y),this.z=zt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=zt(this.x,t,r),this.y=zt(this.y,t,r),this.z=zt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(zt(n,t,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const n=t.x,o=t.y,s=t.z,a=r.x,i=r.y,l=r.z;return this.x=o*l-s*i,this.y=s*a-n*l,this.z=n*i-o*a,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Qa.copy(this).projectOnVector(t),this.sub(Qa)}reflect(t){return this.sub(Qa.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(t)/r;return Math.acos(zt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,o=this.z-t.z;return r*r+n*n+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,n){const o=Math.sin(r)*t;return this.x=o*Math.sin(n),this.y=Math.cos(r)*t,this.z=o*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){const r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){const r=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),o=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=o,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r){return this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,r=Math.random()*2-1,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(t),this.y=r,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Qa=new rn,nd=new d2;function h2(e,t,r){if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(Math.abs(t[n]-e[n])>r)return!1;return!0}function p2(e,t,r){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation[0]-t.orientation[0]),n+=Math.abs(e.orientation[1]-t.orientation[1]),n+=Math.abs(e.orientation[2]-t.orientation[2]),n+=Math.abs(e.position[0]-t.position[0]),n+=Math.abs(e.position[1]-t.position[1]),n+=Math.abs(e.position[2]-t.position[2]),n<=r}function f2(e,t,r){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&p2(e.tcp_pose,t.tcp_pose,r)}function m2(e,t){const r=new wt.Vector3(t[0],t[1],t[2]),n=new wt.Vector3(e[0],e[1],e[2]),o=r.length(),s=r.normalize();let a=n.length(),i=n.normalize();i.dot(s)<0&&(a=-a,i=i.multiplyScalar(-1));let l=a-o;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),a=o+l,[...i.multiplyScalar(a)]}const od=1e-4;class jl{constructor(t,r,n,o,s,a){this.nova=t,this.controller=r,this.motionGroup=n,this.description=o,this.initialMotionState=s,this.motionStateSocket=a,this.rapidlyChangingMotionState=s,a.addEventListener("message",i=>{var c;const l=(c=et.tryParseJson(i.data))==null?void 0:c.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${i.data}`);h2(this.rapidlyChangingMotionState.joint_position,l.joint_position,od)||We.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=l.joint_position}),f2(this.rapidlyChangingMotionState,l,od)||We.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(u=l.tcp_pose)!=null&&u.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:m2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&We.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),We.makeAutoObservable(this)}static async open(t,r){var d;const[n,o]=r.split("@"),s=await t.api.controller.getCurrentRobotControllerState(o),a=s==null?void 0:s.motion_groups.find(h=>h.motion_group===r);if(!s||!a)throw new Error(`Controller ${o} or motion group ${r} not found`);const i=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${r}/state-stream`),l=await i.firstMessage(),c=(d=et.tryParseJson(l.data))==null?void 0:d.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
151
151
  `,c);const u=await t.api.motionGroup.getMotionGroupDescription(o,a.motion_group);return new jl(t,s,a,u,c,i)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joints(){return this.initialMotionState.joint_position.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}}const sd="Movement request rejected. Another client is currently executing a 'Jogging' motion!";class Dl{constructor(t,r={}){this.motionStream=t,this.options=r,this.ENDPOINT_JOGGING="/execution/jogging",this.ENDPOINT_TRAJECTORY="/execution/trajectory",this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.tcp=(r==null?void 0:r.tcp)||t.motionGroup.tcp||this.DEFAULT_TCP,this.orientation=(r==null?void 0:r.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(r==null?void 0:r.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(r==null?void 0:r.mode)||this.DEFAULT_MODE,this.onError=r==null?void 0:r.onError}static async open(t,r,n={}){const o=await jl.open(t,r),s=new Dl(o,n);return await s.setJoggingMode(s.mode),s}async setOptions(t){t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=[this.joggingSocket,this.trajectorySocket].filter(r=>r!==null);return t.forEach(r=>{r.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(r=>r.closed()))}async setJoggingMode(t,r=!0){if(!(this.mode===t&&r)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,r)=>{const n=setTimeout(()=>{r(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",o=>{var a,i,l,c;const s=et.tryParseJson(o.data);if(((a=s==null?void 0:s.result)==null?void 0:a.kind)==="INITIALIZE_RECEIVED"){clearTimeout(n),t();return}if(((i=s==null?void 0:s.result)==null?void 0:i.kind)==="MOTION_ERROR")if(clearTimeout(n),this.onBlocked&&((l=s==null?void 0:s.result)!=null&&l.message.includes(sd))){(c=this.joggingSocket)==null||c.dispose(),this.onBlocked();return}else this.onError?this.onError(o.data):r(new Error(o.data))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,tcp:this.tcp})})}async rotateJoints({joint:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=new Array(this.numJoints).fill(0);o[t]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:o})}async translateTCP({axis:t,direction:r,velocityMmPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];s[et.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];o[et.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:r,velocityInRelevantUnits:n,axis:o,direction:s,motion:a}){const i=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(a.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const y=[...t.position];y[et.XYZ_TO_VECTOR[o]]+=a.distanceMm*(s==="-"?-1:1),i.push({limits_override:{tcp_velocity_limit:n},path:{path_definition_name:"PathLine",target_pose:{position:y,orientation:t.orientation}}})}else if(a.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const y=new rn(t.orientation[0],t.orientation[1],t.orientation[2]),S=y.length(),R=y.clone().normalize(),v=a.distanceRads*(s==="-"?-1:1),T=new rn(0,0,0);T[o]=1;const I=Math.cos(.5*v)*Math.cos(.5*S),E=Math.sin(.5*v)*Math.sin(.5*S),w=Math.sin(.5*v)*Math.cos(.5*S),P=Math.cos(.5*v)*Math.sin(.5*S),k=T.dot(R),b=T.clone().cross(R),A=2*Math.acos(I-E*k),V=A/Math.sin(.5*A),M=new rn().addScaledVector(b,E).addScaledVector(T,w).addScaledVector(R,P).multiplyScalar(V);i.push({limits_override:{tcp_orientation_velocity_limit:n},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...M]}}})}const l=this.motionStream.description;if(l.cycle_time===void 0){console.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const c={motion_group_model:l.motion_group_model,cycle_time:l.cycle_time,mounting:l.mounting,global:l.operation_limits.auto_limits},u=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:c,start_joint_position:r,motion_commands:i}),d=u.response;if(!d)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(u)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const h=y=>{var S;if(!y||y.add_trajectory_error||y.message)if(this.onError)this.onError(y);else throw new Error(((S=y==null?void 0:y.add_trajectory_error)==null?void 0:S.message)||(y==null?void 0:y.message)||"Failed to execute trajectory, unknown error");if(!this.trajectorySocket)throw new Error("Failed to execute trajectory, websocket not available anymore");this.trajectorySocket.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})},p=async()=>{var y;await We.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await We.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(y=this.trajectorySocket)==null||y.dispose(),this.trajectorySocket=null},f=async()=>{var y;await We.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(y=this.trajectorySocket)==null||y.dispose(),this.trajectorySocket=null},m=async y=>{if(y!=null&&y.message)if(this.onError){this.onError(y);return}else throw new Error(y.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await p():await f()};this.trajectorySocket.addEventListener("message",y=>{var R,v;const S=et.tryParseJson(y.data);if(!((R=S==null?void 0:S.result)!=null&&R.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${y.data}`);if(this.onBlocked&&((v=S.result.message)!=null&&v.includes(sd))){this.onBlocked();return}if(S.result.kind==="INITIALIZE_RECEIVED")h(S.result);else if(S.result.kind==="START_RECEIVED")m(S);else if(S.result.kind!=="PAUSE_RECEIVED")if(S.result.kind==="MOTION_ERROR"&&S.result.message)if(this.onError){this.onError(S);return}else throw new Error(S.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${S.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:d,tcp:this.tcp}})}}function g2(e){try{return JSON.stringify(e)}catch{return}}function y2(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function b2(e){var t,r,n,o;return e instanceof Ti&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Ti&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${g2(e)||e}`}const Bl=e=>{const t=e.softTimeout||3e3,[r,n]=j.useState(!1),o=O.useTheme();return j.useEffect(()=>{const s=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(s)}),g.jsx(O.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?g.jsx(nf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(O.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(O.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},nf=e=>{const t=b2(e.error),r=e.error instanceof Error?e.error.stack:null,n=O.useTheme();return g.jsxs(O.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${ji.lowerFirst(O.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})};var x2="[object AsyncFunction]",S2="[object Function]",v2="[object GeneratorFunction]",C2="[object Proxy]";function of(e){if(!Tr(e))return!1;var t=jr(e);return t==S2||t==v2||t==x2||t==C2}var Xa=Lt["__core-js_shared__"],ad=function(){var e=/[^.]+$/.exec(Xa&&Xa.keys&&Xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function w2(e){return!!ad&&ad in e}var O2=Function.prototype,T2=O2.toString;function Dr(e){if(e!=null){try{return T2.call(e)}catch{}try{return e+""}catch{}}return""}var E2=/[\\^$.*+?()[\]{}|]/g,I2=/^\[object .+?Constructor\]$/,A2=Function.prototype,R2=Object.prototype,P2=A2.toString,M2=R2.hasOwnProperty,V2=RegExp("^"+P2.call(M2).replace(E2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _2(e){if(!Tr(e)||w2(e))return!1;var t=of(e)?V2:I2;return t.test(Dr(e))}function k2(e,t){return e==null?void 0:e[t]}function Br(e,t){var r=k2(e,t);return _2(r)?r:void 0}var id=function(){try{var e=Br(Object,"defineProperty");return e({},"",{}),e}catch{}}();function j2(e,t,r){t=="__proto__"&&id?id(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function D2(e,t,r,n){for(var o=-1,s=e==null?0:e.length;++o<s;){var a=e[o];t(n,a,r(a),e)}return n}function B2(e){return function(t,r,n){for(var o=-1,s=Object(t),a=n(t),i=a.length;i--;){var l=a[++o];if(r(s[l],l,s)===!1)break}return t}}var U2=B2();function L2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var F2="[object Arguments]";function ld(e){return Er(e)&&jr(e)==F2}var sf=Object.prototype,$2=sf.hasOwnProperty,N2=sf.propertyIsEnumerable,af=ld(function(){return arguments}())?ld:function(e){return Er(e)&&$2.call(e,"callee")&&!N2.call(e,"callee")},Ut=Array.isArray;function z2(){return!1}var lf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cd=lf&&typeof module=="object"&&module&&!module.nodeType&&module,G2=cd&&cd.exports===lf,ud=G2?Lt.Buffer:void 0,H2=ud?ud.isBuffer:void 0,Ii=H2||z2,q2=9007199254740991,W2=/^(?:0|[1-9]\d*)$/;function cf(e,t){var r=typeof e;return t=t??q2,!!t&&(r=="number"||r!="symbol"&&W2.test(e))&&e>-1&&e%1==0&&e<t}var J2=9007199254740991;function Ul(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=J2}var Y2="[object Arguments]",K2="[object Array]",Q2="[object Boolean]",X2="[object Date]",Z2="[object Error]",eE="[object Function]",tE="[object Map]",rE="[object Number]",nE="[object Object]",oE="[object RegExp]",sE="[object Set]",aE="[object String]",iE="[object WeakMap]",lE="[object ArrayBuffer]",cE="[object DataView]",uE="[object Float32Array]",dE="[object Float64Array]",hE="[object Int8Array]",pE="[object Int16Array]",fE="[object Int32Array]",mE="[object Uint8Array]",gE="[object Uint8ClampedArray]",yE="[object Uint16Array]",bE="[object Uint32Array]",Re={};Re[uE]=Re[dE]=Re[hE]=Re[pE]=Re[fE]=Re[mE]=Re[gE]=Re[yE]=Re[bE]=!0;Re[Y2]=Re[K2]=Re[lE]=Re[Q2]=Re[cE]=Re[X2]=Re[Z2]=Re[eE]=Re[tE]=Re[rE]=Re[nE]=Re[oE]=Re[sE]=Re[aE]=Re[iE]=!1;function xE(e){return Er(e)&&Ul(e.length)&&!!Re[jr(e)]}function SE(e){return function(t){return e(t)}}var uf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fn=uf&&typeof module=="object"&&module&&!module.nodeType&&module,vE=Fn&&Fn.exports===uf,Za=vE&&Ap.process,dd=function(){try{var e=Fn&&Fn.require&&Fn.require("util").types;return e||Za&&Za.binding&&Za.binding("util")}catch{}}(),hd=dd&&dd.isTypedArray,df=hd?SE(hd):xE,CE=Object.prototype,wE=CE.hasOwnProperty;function OE(e,t){var r=Ut(e),n=!r&&af(e),o=!r&&!n&&Ii(e),s=!r&&!n&&!o&&df(e),a=r||n||o||s,i=a?L2(e.length,String):[],l=i.length;for(var c in e)wE.call(e,c)&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||cf(c,l)))&&i.push(c);return i}var TE=Object.prototype;function EE(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||TE;return e===r}function IE(e,t){return function(r){return e(t(r))}}var AE=IE(Object.keys,Object),RE=Object.prototype,PE=RE.hasOwnProperty;function ME(e){if(!EE(e))return AE(e);var t=[];for(var r in Object(e))PE.call(e,r)&&r!="constructor"&&t.push(r);return t}function hf(e){return e!=null&&Ul(e.length)&&!of(e)}function Ll(e){return hf(e)?OE(e):ME(e)}function VE(e,t){return e&&U2(e,t,Ll)}function _E(e,t){return function(r,n){if(r==null)return r;if(!hf(r))return e(r,n);for(var o=r.length,s=-1,a=Object(r);++s<o&&n(a[s],s,a)!==!1;);return r}}var kE=_E(VE);function jE(e,t,r,n){return kE(e,function(o,s,a){t(n,o,r(o),a)}),n}function DE(){this.__data__=[],this.size=0}function pf(e,t){return e===t||e!==e&&t!==t}function ia(e,t){for(var r=e.length;r--;)if(pf(e[r][0],t))return r;return-1}var BE=Array.prototype,UE=BE.splice;function LE(e){var t=this.__data__,r=ia(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():UE.call(t,r,1),--this.size,!0}function FE(e){var t=this.__data__,r=ia(t,e);return r<0?void 0:t[r][1]}function $E(e){return ia(this.__data__,e)>-1}function NE(e,t){var r=this.__data__,n=ia(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}er.prototype.clear=DE;er.prototype.delete=LE;er.prototype.get=FE;er.prototype.has=$E;er.prototype.set=NE;function zE(){this.__data__=new er,this.size=0}function GE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function HE(e){return this.__data__.get(e)}function qE(e){return this.__data__.has(e)}var Xn=Br(Lt,"Map"),Zn=Br(Object,"create");function WE(){this.__data__=Zn?Zn(null):{},this.size=0}function JE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var YE="__lodash_hash_undefined__",KE=Object.prototype,QE=KE.hasOwnProperty;function XE(e){var t=this.__data__;if(Zn){var r=t[e];return r===YE?void 0:r}return QE.call(t,e)?t[e]:void 0}var ZE=Object.prototype,eI=ZE.hasOwnProperty;function tI(e){var t=this.__data__;return Zn?t[e]!==void 0:eI.call(t,e)}var rI="__lodash_hash_undefined__";function nI(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Zn&&t===void 0?rI:t,this}function Ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ar.prototype.clear=WE;Ar.prototype.delete=JE;Ar.prototype.get=XE;Ar.prototype.has=tI;Ar.prototype.set=nI;function oI(){this.size=0,this.__data__={hash:new Ar,map:new(Xn||er),string:new Ar}}function sI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function la(e,t){var r=e.__data__;return sI(t)?r[typeof t=="string"?"string":"hash"]:r.map}function aI(e){var t=la(this,e).delete(e);return this.size-=t?1:0,t}function iI(e){return la(this,e).get(e)}function lI(e){return la(this,e).has(e)}function cI(e,t){var r=la(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tr.prototype.clear=oI;tr.prototype.delete=aI;tr.prototype.get=iI;tr.prototype.has=lI;tr.prototype.set=cI;var uI=200;function dI(e,t){var r=this.__data__;if(r instanceof er){var n=r.__data__;if(!Xn||n.length<uI-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new tr(n)}return r.set(e,t),this.size=r.size,this}function Jt(e){var t=this.__data__=new er(e);this.size=t.size}Jt.prototype.clear=zE;Jt.prototype.delete=GE;Jt.prototype.get=HE;Jt.prototype.has=qE;Jt.prototype.set=dI;var hI="__lodash_hash_undefined__";function pI(e){return this.__data__.set(e,hI),this}function fI(e){return this.__data__.has(e)}function Ss(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new tr;++t<r;)this.add(e[t])}Ss.prototype.add=Ss.prototype.push=pI;Ss.prototype.has=fI;function mI(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function gI(e,t){return e.has(t)}var yI=1,bI=2;function ff(e,t,r,n,o,s){var a=r&yI,i=e.length,l=t.length;if(i!=l&&!(a&&l>i))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&bI?new Ss:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=a?n(m,f,d,t,e,s):n(f,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!mI(t,function(S,R){if(!gI(p,R)&&(f===S||o(f,S,r,n,s)))return p.push(R)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var pd=Lt.Uint8Array;function xI(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function SI(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var vI=1,CI=2,wI="[object Boolean]",OI="[object Date]",TI="[object Error]",EI="[object Map]",II="[object Number]",AI="[object RegExp]",RI="[object Set]",PI="[object String]",MI="[object Symbol]",VI="[object ArrayBuffer]",_I="[object DataView]",fd=ur?ur.prototype:void 0,ei=fd?fd.valueOf:void 0;function kI(e,t,r,n,o,s,a){switch(r){case _I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case VI:return!(e.byteLength!=t.byteLength||!s(new pd(e),new pd(t)));case wI:case OI:case II:return pf(+e,+t);case TI:return e.name==t.name&&e.message==t.message;case AI:case PI:return e==t+"";case EI:var i=xI;case RI:var l=n&vI;if(i||(i=SI),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=CI,a.set(e,t);var u=ff(i(e),i(t),n,o,s,a);return a.delete(e),u;case MI:if(ei)return ei.call(e)==ei.call(t)}return!1}function jI(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function DI(e,t,r){var n=t(e);return Ut(e)?n:jI(n,r(e))}function BI(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function UI(){return[]}var LI=Object.prototype,FI=LI.propertyIsEnumerable,md=Object.getOwnPropertySymbols,$I=md?function(e){return e==null?[]:(e=Object(e),BI(md(e),function(t){return FI.call(e,t)}))}:UI;function gd(e){return DI(e,Ll,$I)}var NI=1,zI=Object.prototype,GI=zI.hasOwnProperty;function HI(e,t,r,n,o,s){var a=r&NI,i=gd(e),l=i.length,c=gd(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=i[d];if(!(a?h in t:GI.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=a;++d<l;){h=i[d];var S=e[h],R=t[h];if(n)var v=a?n(R,S,h,t,e,s):n(S,R,h,e,t,s);if(!(v===void 0?S===R||o(S,R,r,n,s):v)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var T=e.constructor,I=t.constructor;T!=I&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof I=="function"&&I instanceof I)&&(m=!1)}return s.delete(e),s.delete(t),m}var Ai=Br(Lt,"DataView"),Ri=Br(Lt,"Promise"),Pi=Br(Lt,"Set"),Mi=Br(Lt,"WeakMap"),yd="[object Map]",qI="[object Object]",bd="[object Promise]",xd="[object Set]",Sd="[object WeakMap]",vd="[object DataView]",WI=Dr(Ai),JI=Dr(Xn),YI=Dr(Ri),KI=Dr(Pi),QI=Dr(Mi),sr=jr;(Ai&&sr(new Ai(new ArrayBuffer(1)))!=vd||Xn&&sr(new Xn)!=yd||Ri&&sr(Ri.resolve())!=bd||Pi&&sr(new Pi)!=xd||Mi&&sr(new Mi)!=Sd)&&(sr=function(e){var t=jr(e),r=t==qI?e.constructor:void 0,n=r?Dr(r):"";if(n)switch(n){case WI:return vd;case JI:return yd;case YI:return bd;case KI:return xd;case QI:return Sd}return t});var XI=1,Cd="[object Arguments]",wd="[object Array]",Do="[object Object]",ZI=Object.prototype,Od=ZI.hasOwnProperty;function eA(e,t,r,n,o,s){var a=Ut(e),i=Ut(t),l=a?wd:sr(e),c=i?wd:sr(t);l=l==Cd?Do:l,c=c==Cd?Do:c;var u=l==Do,d=c==Do,h=l==c;if(h&&Ii(e)){if(!Ii(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Jt),a||df(e)?ff(e,t,r,n,o,s):kI(e,t,l,r,n,o,s);if(!(r&XI)){var p=u&&Od.call(e,"__wrapped__"),f=d&&Od.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return s||(s=new Jt),o(m,y,r,n,s)}}return h?(s||(s=new Jt),HI(e,t,r,n,o,s)):!1}function ca(e,t,r,n,o){return e===t?!0:e==null||t==null||!Er(e)&&!Er(t)?e!==e&&t!==t:eA(e,t,r,n,ca,o)}var tA=1,rA=2;function nA(e,t,r,n){var o=r.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){a=r[o];var i=a[0],l=e[i],c=a[1];if(a[2]){if(l===void 0&&!(i in e))return!1}else{var u=new Jt,d;if(!(d===void 0?ca(c,l,tA|rA,n,u):d))return!1}}return!0}function mf(e){return e===e&&!Tr(e)}function oA(e){for(var t=Ll(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,mf(o)]}return t}function gf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function sA(e){var t=oA(e);return t.length==1&&t[0][2]?gf(t[0][0],t[0][1]):function(r){return r===e||nA(r,e,t)}}var aA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iA=/^\w*$/;function Fl(e,t){if(Ut(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ta(e)?!0:iA.test(e)||!aA.test(e)||t!=null&&e in Object(t)}var lA="Expected a function";function $l(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lA);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new($l.Cache||tr),r}$l.Cache=tr;var cA=500;function uA(e){var t=$l(e,function(n){return r.size===cA&&r.clear(),n}),r=t.cache;return t}var dA=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hA=/\\(\\)?/g,pA=uA(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dA,function(r,n,o,s){t.push(o?s.replace(hA,"$1"):n||r)}),t});function fA(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Td=ur?ur.prototype:void 0,Ed=Td?Td.toString:void 0;function yf(e){if(typeof e=="string")return e;if(Ut(e))return fA(e,yf)+"";if(ta(e))return Ed?Ed.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bf(e){return e==null?"":yf(e)}function xf(e,t){return Ut(e)?e:Fl(e,t)?[e]:pA(bf(e))}function ua(e){if(typeof e=="string"||ta(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Sf(e,t){t=xf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ua(t[r++])];return r&&r==n?e:void 0}function mA(e,t,r){var n=e==null?void 0:Sf(e,t);return n===void 0?r:n}function gA(e,t){return e!=null&&t in Object(e)}function yA(e,t,r){t=xf(t,e);for(var n=-1,o=t.length,s=!1;++n<o;){var a=ua(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=o?s:(o=e==null?0:e.length,!!o&&Ul(o)&&cf(a,o)&&(Ut(e)||af(e)))}function bA(e,t){return e!=null&&yA(e,t,gA)}var xA=1,SA=2;function vA(e,t){return Fl(e)&&mf(t)?gf(ua(e),t):function(r){var n=mA(r,e);return n===void 0&&n===t?bA(r,e):ca(t,n,xA|SA)}}function CA(e){return e}function wA(e){return function(t){return t==null?void 0:t[e]}}function OA(e){return function(t){return Sf(t,e)}}function TA(e){return Fl(e)?wA(ua(e)):OA(e)}function EA(e){return typeof e=="function"?e:e==null?CA:typeof e=="object"?Ut(e)?vA(e[0],e[1]):sA(e):TA(e)}function IA(e,t){return function(r,n){var o=Ut(r)?D2:jE,s={};return o(r,e,EA(n),s)}}var Bo=IA(function(e,t,r){j2(e,r,t)}),AA=0;function RA(e){var t=++AA;return bf(e)+t}const Vi=[{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}],PA=[{id:"continuous"},...Vi],MA=["coordsys","tool"];class da{constructor(t,r,n,o){var s,a;this.jogger=t,this.coordSystems=r,this.motionGroupDescription=n,this.tcps=o,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.blocked=!1,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const i of r)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=r[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((a=o[0])==null?void 0:a.id)||"",We.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()},this.loadFromLocalStorage(),this.disposers.push(We.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,o]=await Promise.all([r.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),r.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),s=Object.entries(o.tcps||{}).map(([a,i])=>({id:a,readable_name:i.name,position:i.pose.position,orientation:i.pose.orientation}));return new da(t,n||[],o,s)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return ji.countBy(this.coordSystems,t=>t.name)}async deactivate(){if(this.jogger.mode==="jogging")return this.jogger.stop()}async activate(){return this.currentTab.id==="cartesian"?((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&this.jogger.setOptions({tcp:this.selectedTcpId,orientation:this.selectedOrientation}),this.activeDiscreteIncrement?this.jogger.setJoggingMode("trajectory"):this.jogger.setJoggingMode("jogging")):this.jogger.setJoggingMode("jogging"),this.jogger}loadFromLocalStorage(){const t=et.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 PA}get discreteIncrementOptions(){return Vi}get incrementOptionsById(){return Bo(this.incrementOptions,t=>t.id)}get tabsById(){return Bo(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 Bo(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 Bo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Vi.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket()}async withMotionLock(t){const r=RA();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const VA=me.observer(({store:e})=>{const{t}=Ce.useTranslation();return g.jsx(O.Backdrop,{open:!0,sx:{position:"absolute",zIndex:r=>r.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:g.jsxs(O.Stack,{sx:{m:2,width:"100%"},children:[g.jsxs(O.Alert,{severity:"error",sx:{mb:2},children:[g.jsx(O.AlertTitle,{children:t("Jogging.Blocked.ti")}),t("Jogging.Blocked.lb")]}),g.jsx(O.Button,{variant:"contained",color:"secondary",onClick:()=>e.unblock(),children:t("Jogging.Blocked.Reenable.bt")})]})})}),_A=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.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"})),kA=j.forwardRef(_A),jA=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.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"})),DA=j.forwardRef(jA),BA=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.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"})),UA=j.forwardRef(BA),LA=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),FA=j.forwardRef(LA);function $A(e,t){return ca(e,t)}const vf=({store:e})=>{const{t}=Ce.useTranslation(),[r,n]=j.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),o=j.useRef(r);ea(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;$A(o.current,a)||(o.current=a,n(a))});const s=[];for(const[a,i]of r.entries())i&&s.push(a);return g.jsx(O.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(a=>a+1).join(", ")})})},NA=O.styled(O.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function Uo({labelValue:e,...t}){return g.jsxs(NA,{fullWidth:!0,variant:"filled",children:[g.jsx(O.InputLabel,{id:t.labelId,children:e}),g.jsx(O.Select,{...t})]})}const zA=me.observer(({store:e})=>{var o;const{t}=Ce.useTranslation(),r=[];function n(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(g.jsx(Uo,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>g.jsx(O.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(Uo,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>g.jsx(O.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(Uo,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:MA.map(s=>g.jsx(O.MenuItem,{value:s,children:n(s)},s))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(Uo,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[g.jsx(O.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>g.jsx(O.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),g.jsx(O.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,a)=>g.jsx(O.Box,{sx:{gridColumn:r.length%2===1&&a===r.length-1?"span 2":"auto"},children:s},a))})}),GA=O.styled(O.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}});function Id(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function HA(e){return typeof e=="string"}function qA(e,t,r){return e===void 0||HA(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Ko(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Ad(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function WA(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:s}=e;if(!t){const p=Et(r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},m={...r,...o,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const a=Ko({...o,...n}),i=Ad(n),l=Ad(o),c=t(a),u=Et(c==null?void 0:c.className,r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},h={...c,...r,...l,...i};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function JA(e,t,r){return typeof e=="function"?e(t,r):e}function or(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...s}=e,a=o?{}:JA(r,n),{props:i,internalRef:l}=WA({...s,externalSlotProps:a}),c=js(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return qA(t,{...i,ref:c},n)}function Rd(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
152
- `))}return!1}const YA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function KA(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const QA=2;function Yr(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function Cf(e,t){return e-t}function Pd(e,t){const{index:r}=e.reduce((n,o,s)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:s}:n},null)??{};return r}function Lo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function vs(e,t,r){return(e-t)*100/(r-t)}function XA(e,t,r){return(r-t)*e+t}function ZA(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function eR(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(ZA(t)))}function Md({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Cf)}function Fo({sliderRef:e,activeIndex:t,setActive:r}){var o,s,a;const n=Un(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function $o(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?KA(e,t):!1}const tR={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}%`})}},rR=e=>e;let No;function Vd(){return No===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?No=CSS.supports("touch-action","none"):No=!0),No}function nR(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:s=!1,marks:a=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=rR,step:m=1,shiftStep:y=10,tabIndex:S,value:R}=e,v=_.useRef(void 0),[T,I]=_.useState(-1),[E,w]=_.useState(-1),[P,k]=_.useState(!1),b=_.useRef(0),A=_.useRef(null),[V,M]=GC({controlled:R,default:r??l,name:"Slider"}),D=u&&((Z,re,ie)=>{const fe=Z.nativeEvent||Z,Ee=new fe.constructor(fe.type,fe);Object.defineProperty(Ee,"target",{writable:!0,value:{value:re,name:c}}),A.current=re,u(Ee,re,ie)}),ne=Array.isArray(V);let Q=ne?V.slice().sort(Cf):[V];Q=Q.map(Z=>Z==null?l:Kr(Z,l,i));const oe=a===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Z,re)=>({value:l+m*re})):a||[],X=oe.map(Z=>Z.value),[se,F]=_.useState(-1),ee=_.useRef(null),ce=js(p,ee),be=Z=>re=>{var fe;const ie=Number(re.currentTarget.getAttribute("data-index"));Rd(re.target)&&F(ie),w(ie),(fe=Z==null?void 0:Z.onFocus)==null||fe.call(Z,re)},Me=Z=>re=>{var ie;Rd(re.target)||F(-1),w(-1),(ie=Z==null?void 0:Z.onBlur)==null||ie.call(Z,re)},xe=(Z,re)=>{const ie=Number(Z.currentTarget.getAttribute("data-index")),fe=Q[ie],Ee=X.indexOf(fe);let le=re;if(oe&&m==null){const ze=X[X.length-1];le>=ze?le=ze:le<=X[0]?le=X[0]:le=le<fe?X[Ee-1]:X[Ee+1]}if(le=Kr(le,l,i),ne){o&&(le=Kr(le,Q[ie-1]||-1/0,Q[ie+1]||1/0));const ze=le;le=Md({values:Q,newValue:le,index:ie});let Qe=ie;o||(Qe=le.indexOf(ze)),Fo({sliderRef:ee,activeIndex:Qe})}M(le),F(ie),D&&!$o(le,V)&&D(Z,le,ie),d&&d(Z,A.current??le)},ut=Z=>re=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(re.key)){re.preventDefault();const fe=Number(re.currentTarget.getAttribute("data-index")),Ee=Q[fe];let le=null;if(m!=null){const ze=re.shiftKey?y:m;switch(re.key){case"ArrowUp":le=Yr(Ee,ze,1,l,i);break;case"ArrowRight":le=Yr(Ee,ze,s?-1:1,l,i);break;case"ArrowDown":le=Yr(Ee,ze,-1,l,i);break;case"ArrowLeft":le=Yr(Ee,ze,s?1:-1,l,i);break;case"PageUp":le=Yr(Ee,y,1,l,i);break;case"PageDown":le=Yr(Ee,y,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(oe){const ze=X[X.length-1],Qe=X.indexOf(Ee),Ue=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ue.includes(re.key)?Qe===0?le=X[0]:le=X[Qe-1]:mt.includes(re.key)&&(Qe===X.length-1?le=ze:le=X[Qe+1])}le!=null&&xe(re,le)}(ie=Z==null?void 0:Z.onKeyDown)==null||ie.call(Z,re)};Bt(()=>{var Z;n&&ee.current.contains(document.activeElement)&&((Z=document.activeElement)==null||Z.blur())},[n]),n&&T!==-1&&I(-1),n&&se!==-1&&F(-1);const nt=Z=>re=>{var ie;(ie=Z.onChange)==null||ie.call(Z,re),xe(re,re.target.valueAsNumber)},Se=_.useRef(void 0);let te=h;s&&h==="horizontal"&&(te+="-reverse");const ae=({finger:Z,move:re=!1})=>{const{current:ie}=ee,{width:fe,height:Ee,bottom:le,left:ze}=ie.getBoundingClientRect();let Qe;te.startsWith("vertical")?Qe=(le-Z.y)/Ee:Qe=(Z.x-ze)/fe,te.includes("-reverse")&&(Qe=1-Qe);let Ue;if(Ue=XA(Qe,l,i),m)Ue=eR(Ue,m,l);else{const xn=Pd(X,Ue);Ue=X[xn]}Ue=Kr(Ue,l,i);let mt=0;if(ne){re?mt=Se.current:mt=Pd(Q,Ue),o&&(Ue=Kr(Ue,Q[mt-1]||-1/0,Q[mt+1]||1/0));const xn=Ue;Ue=Md({values:Q,newValue:Ue,index:mt}),o&&re||(mt=Ue.indexOf(xn),Se.current=mt)}return{newValue:Ue,activeIndex:mt}},ue=Wt(Z=>{const re=Lo(Z,v);if(!re)return;if(b.current+=1,Z.type==="mousemove"&&Z.buttons===0){Y(Z);return}const{newValue:ie,activeIndex:fe}=ae({finger:re,move:!0});Fo({sliderRef:ee,activeIndex:fe,setActive:I}),M(ie),!P&&b.current>QA&&k(!0),D&&!$o(ie,V)&&D(Z,ie,fe)}),Y=Wt(Z=>{const re=Lo(Z,v);if(k(!1),!re)return;const{newValue:ie}=ae({finger:re,move:!0});I(-1),Z.type==="touchend"&&w(-1),d&&d(Z,A.current??ie),v.current=void 0,pe()}),ve=Wt(Z=>{if(n)return;Vd()||Z.preventDefault();const re=Z.changedTouches[0];re!=null&&(v.current=re.identifier);const ie=Lo(Z,v);if(ie!==!1){const{newValue:Ee,activeIndex:le}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:le,setActive:I}),M(Ee),D&&!$o(Ee,V)&&D(Z,Ee,le)}b.current=0;const fe=Un(ee.current);fe.addEventListener("touchmove",ue,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),pe=_.useCallback(()=>{const Z=Un(ee.current);Z.removeEventListener("mousemove",ue),Z.removeEventListener("mouseup",Y),Z.removeEventListener("touchmove",ue),Z.removeEventListener("touchend",Y)},[Y,ue]);_.useEffect(()=>{const{current:Z}=ee;return Z.addEventListener("touchstart",ve,{passive:Vd()}),()=>{Z.removeEventListener("touchstart",ve),pe()}},[pe,ve]),_.useEffect(()=>{n&&pe()},[n,pe]);const He=Z=>re=>{var Ee;if((Ee=Z.onMouseDown)==null||Ee.call(Z,re),n||re.defaultPrevented||re.button!==0)return;re.preventDefault();const ie=Lo(re,v);if(ie!==!1){const{newValue:le,activeIndex:ze}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:ze,setActive:I}),M(le),D&&!$o(le,V)&&D(re,le,ze)}b.current=0;const fe=Un(ee.current);fe.addEventListener("mousemove",ue,{passive:!0}),fe.addEventListener("mouseup",Y)},Ne=vs(ne?Q[0]:l,l,i),Ve=vs(Q[Q.length-1],l,i)-Ne,rr=(Z={})=>{const re=Ko(Z),ie={onMouseDown:He(re||{})},fe={...re,...ie};return{...Z,ref:ce,...fe}},fo=Z=>re=>{var fe;(fe=Z.onMouseOver)==null||fe.call(Z,re);const ie=Number(re.currentTarget.getAttribute("data-index"));w(ie)},mo=Z=>re=>{var ie;(ie=Z.onMouseLeave)==null||ie.call(Z,re),w(-1)},go=(Z={})=>{const re=Ko(Z),ie={onMouseOver:fo(re||{}),onMouseLeave:mo(re||{})};return{...Z,...re,...ie}},yo=Z=>({pointerEvents:T!==-1&&T!==Z?"none":void 0});let Ur;return h==="vertical"&&(Ur=s?"vertical-rl":"vertical-lr"),{active:T,axis:te,axisProps:tR,dragging:P,focusedThumbIndex:se,getHiddenInputProps:(Z={})=>{const re=Ko(Z),ie={onChange:nt(re||{}),onFocus:be(re||{}),onBlur:Me(re||{}),onKeyDown:ut(re||{})},fe={...re,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Z,...fe,style:{...YA,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Ur}}},getRootProps:rr,getThumbProps:go,marks:oe,open:E,range:ne,rootRef:ce,trackLeap:Ve,trackOffset:Ne,values:Q,getThumbStyle:yo}}function Qo(e){return typeof e=="string"}const oR=e=>!e||!Qo(e);function sR(e){return typeof e.main=="string"}function aR(e,t=[]){if(!sR(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Nl(e=[]){return([,t])=>t&&aR(t,e)}function iR(e){return pn("MuiSlider",e)}const St=Li("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"]),lR=e=>{const{open:t}=e;return{offset:Et(t&&St.valueLabelOpen),circle:St.valueLabelCircle,label:St.valueLabelLabel}};function wf(e){const{children:t,className:r,value:n}=e,o=lR(e);return t?_.cloneElement(t,{className:t.props.className},g.jsxs(_.Fragment,{children:[t.props.children,g.jsx("span",{className:Et(o.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:o.circle,children:g.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(wf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function _d(e){return e}const cR=ft("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${tt(r.color)}`],r.size!=="medium"&&t[`size${tt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(kr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${St.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${St.dragging}`]:{[`& .${St.thumb}, & .${St.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),uR=ft("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),dR=ft("span",{name:"MuiSlider",slot:"Track"})(kr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:Nn(e.palette[t].main,.62),borderColor:Nn(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:$n(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:$n(e.palette[t].main,.5)})}}}))]}))),hR=ft("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${tt(r.color)}`],r.size!=="medium"&&t[`thumbSize${tt(r.size)}`]]}})(kr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${St.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${St.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${oi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${St.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${oi(e.palette[t].main,.16)}`}}}}))]}))),Of=ft(wf,{name:"MuiSlider",slot:"ValueLabel"})(kr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${St.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%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Of.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const pR=ft("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>zi(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(kr(({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}}]}))),fR=ft("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>zi(e)&&e!=="markLabelActive"})(kr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),mR=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:s,classes:a,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${tt(i)}`,l&&`size${tt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${tt(l)}`,i&&`thumbColor${tt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Cs(c,iR,a)},gR=({children:e})=>e,Tf=_.forwardRef(function(t,r){const n=Pl({props:t,name:"MuiSlider"}),o=Jg(),{"aria-label":s,"aria-valuetext":a,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:y,getAriaValueText:S,marks:R=!1,max:v=100,min:T=0,name:I,onChange:E,onChangeCommitted:w,orientation:P="horizontal",shiftStep:k=10,size:b="medium",step:A=1,scale:V=_d,slotProps:M,slots:D,tabIndex:ne,track:Q="normal",value:oe,valueLabelDisplay:X="off",valueLabelFormat:se=_d,...F}=n,ee={...n,isRtl:o,max:v,min:T,classes:h,disabled:m,disableSwap:f,orientation:P,marks:R,color:d,size:b,step:A,shiftStep:k,scale:V,track:Q,valueLabelDisplay:X,valueLabelFormat:se},{axisProps:ce,getRootProps:be,getHiddenInputProps:Me,getThumbProps:xe,open:ut,active:nt,axis:Se,focusedThumbIndex:te,range:ae,dragging:ue,marks:Y,values:ve,trackOffset:pe,trackLeap:He,getThumbStyle:Ne}=nR({...ee,rootRef:r});ee.marked=Y.length>0&&Y.some(De=>De.label),ee.dragging=ue,ee.focusedThumbIndex=te;const Ve=mR(ee),rr=(D==null?void 0:D.root)??c.Root??cR,fo=(D==null?void 0:D.rail)??c.Rail??uR,mo=(D==null?void 0:D.track)??c.Track??dR,go=(D==null?void 0:D.thumb)??c.Thumb??hR,yo=(D==null?void 0:D.valueLabel)??c.ValueLabel??Of,Ur=(D==null?void 0:D.mark)??c.Mark??pR,bo=(D==null?void 0:D.markLabel)??c.MarkLabel??fR,Z=(D==null?void 0:D.input)??c.Input??"input",re=(M==null?void 0:M.root)??u.root,ie=(M==null?void 0:M.rail)??u.rail,fe=(M==null?void 0:M.track)??u.track,Ee=(M==null?void 0:M.thumb)??u.thumb,le=(M==null?void 0:M.valueLabel)??u.valueLabel,ze=(M==null?void 0:M.mark)??u.mark,Qe=(M==null?void 0:M.markLabel)??u.markLabel,Ue=(M==null?void 0:M.input)??u.input,mt=or({elementType:rr,getSlotProps:be,externalSlotProps:re,externalForwardedProps:F,additionalProps:{...oR(rr)&&{as:l}},ownerState:{...ee,...re==null?void 0:re.ownerState},className:[Ve.root,p]}),xn=or({elementType:fo,externalSlotProps:ie,ownerState:ee,className:Ve.rail}),Lf=or({elementType:mo,externalSlotProps:fe,additionalProps:{style:{...ce[Se].offset(pe),...ce[Se].leap(He)}},ownerState:{...ee,...fe==null?void 0:fe.ownerState},className:Ve.track}),ha=or({elementType:go,getSlotProps:xe,externalSlotProps:Ee,ownerState:{...ee,...Ee==null?void 0:Ee.ownerState},className:Ve.thumb}),Ff=or({elementType:yo,externalSlotProps:le,ownerState:{...ee,...le==null?void 0:le.ownerState},className:Ve.valueLabel}),pa=or({elementType:Ur,externalSlotProps:ze,ownerState:ee,className:Ve.mark}),fa=or({elementType:bo,externalSlotProps:Qe,ownerState:ee,className:Ve.markLabel}),$f=or({elementType:Z,getSlotProps:Me,externalSlotProps:Ue,ownerState:ee});return g.jsxs(rr,{...mt,children:[g.jsx(fo,{...xn}),g.jsx(mo,{...Lf}),Y.filter(De=>De.value>=T&&De.value<=v).map((De,qe)=>{const ma=vs(De.value,T,v),xo=ce[Se].offset(ma);let Ft;return Q===!1?Ft=ve.includes(De.value):Ft=Q==="normal"&&(ae?De.value>=ve[0]&&De.value<=ve[ve.length-1]:De.value<=ve[0])||Q==="inverted"&&(ae?De.value<=ve[0]||De.value>=ve[ve.length-1]:De.value>=ve[0]),g.jsxs(_.Fragment,{children:[g.jsx(Ur,{"data-index":qe,...pa,...!Qo(Ur)&&{markActive:Ft},style:{...xo,...pa.style},className:Et(pa.className,Ft&&Ve.markActive)}),De.label!=null?g.jsx(bo,{"aria-hidden":!0,"data-index":qe,...fa,...!Qo(bo)&&{markLabelActive:Ft},style:{...xo,...fa.style},className:Et(Ve.markLabel,fa.className,Ft&&Ve.markLabelActive),children:De.label}):null]},qe)}),ve.map((De,qe)=>{const ma=vs(De,T,v),xo=ce[Se].offset(ma),Ft=X==="off"?gR:yo;return g.jsx(Ft,{...!Qo(Ft)&&{valueLabelFormat:se,valueLabelDisplay:X,value:typeof se=="function"?se(V(De),qe):se,index:qe,open:ut===qe||nt===qe||X==="on",disabled:m},...Ff,children:g.jsx(go,{"data-index":qe,...ha,className:Et(Ve.thumb,ha.className,nt===qe&&Ve.active,te===qe&&Ve.focusVisible),style:{...xo,...Ne(qe),...ha.style},children:g.jsx(Z,{"data-index":qe,"aria-label":y?y(qe):s,"aria-valuenow":V(De),"aria-labelledby":i,"aria-valuetext":S?S(V(De),qe):a,value:ve[qe],...$f})})},qe)})]})});process.env.NODE_ENV!=="production"&&(Tf.propTypes={"aria-label":Id(x.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":x.string,"aria-valuetext":Id(x.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:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["primary","secondary","error","info","success","warning"]),x.string]),components:x.shape({Input:x.elementType,Mark:x.elementType,MarkLabel:x.elementType,Rail:x.elementType,Root:x.elementType,Thumb:x.elementType,Track:x.elementType,ValueLabel:x.elementType}),componentsProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),defaultValue:x.oneOfType([x.arrayOf(x.number),x.number]),disabled:x.bool,disableSwap:x.bool,getAriaLabel:x.func,getAriaValueText:x.func,marks:x.oneOfType([x.arrayOf(x.shape({label:x.node,value:x.number.isRequired})),x.bool]),max:x.number,min:x.number,name:x.string,onChange:x.func,onChangeCommitted:x.func,orientation:x.oneOf(["horizontal","vertical"]),scale:x.func,shiftStep:x.number,size:x.oneOfType([x.oneOf(["small","medium"]),x.string]),slotProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),slots:x.shape({input:x.elementType,mark:x.elementType,markLabel:x.elementType,rail:x.elementType,root:x.elementType,thumb:x.elementType,track:x.elementType,valueLabel:x.elementType}),step:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),tabIndex:x.number,track:x.oneOf(["inverted","normal",!1]),value:x.oneOfType([x.arrayOf(x.number),x.number]),valueLabelDisplay:x.oneOf(["auto","off","on"]),valueLabelFormat:x.oneOfType([x.func,x.string])});var yR="[object Number]";function bR(e){return typeof e=="number"||Er(e)&&jr(e)==yR}const Ef=me.observer(e=>{var s,a,i;const t=O.useTheme(),{store:r}=e,{t:n}=Ce.useTranslation();function o(l,c){c===e.velocity||!bR(c)||e.onVelocityChange(c)}return g.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(O.Typography,{sx:{color:(i=(a=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:a.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Tf,{value:e.velocity,color:"secondary",onChange:o,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsx(zl,{value:e.velocity.toString()}))]})});function zl({value:e,sx:t}){var n;const r=O.useTheme();return g.jsx(O.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsx(O.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const If=me.observer(({store:e})=>{const{t}=Ce.useTranslation(),r=me.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return g.jsx(Ef,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(zl,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),xR=me.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation(),n=O.useTheme();function o(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Ip(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function s(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,y=f.motionStream.rapidlyChangingMotionState.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:y,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:et.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var y,S,R;const m=(R=(S=(y=f.componentsExt)==null?void 0:y.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:R.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(kA,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(DA,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(UA,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:et.radiansToDegrees(h).toFixed(1)})}return g.jsxs(O.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(O.Stack,{gap:2,children:[g.jsx(zA,{store:e}),g.jsx(If,{store:e}),g.jsx(O.Divider,{})]}),g.jsx(O.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(O.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(GA,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(O.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(O.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(O.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return u(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position)==null?void 0:y[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(FA,{}),g.jsx(O.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return d(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:y[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(vf,{store:e}),t&&g.jsx(O.Divider,{}),t]})}),SR=me.observer(({store:e,children:t})=>{const r=O.useTheme();async function n(s){await e.activate(),await e.jogger.rotateJoints({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(O.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(If,{store:e}),g.jsx(O.Divider,{}),g.jsx(O.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(O.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c,u,d;const a=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[s.index])==null?void 0:d.position,i=(a==null?void 0:a.lower_limit)!==void 0?et.radiansToDegrees(a.lower_limit):void 0,l=(a==null?void 0:a.upper_limit)!==void 0?et.radiansToDegrees(a.upper_limit):void 0;return g.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(O.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),g.jsx(Pp,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[s.index];return h!==void 0?et.radiansToDegrees(h):void 0},startJogging:h=>n({joint:s.index,direction:h}),stopJogging:o})]},`joint-${s.index}`)})})}),g.jsx(vf,{store:e}),t&&g.jsx(O.Divider,{}),t]})}),vR=Be(me.observer(e=>{const t=ji.isString(e.nova)?new c2({instanceUrl:e.nova}):e.nova,r=me.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){We.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const s=await Dl.open(t,e.motionGroupId);o=await da.loadFor(s)}We.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return j.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),j.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(O.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(CR,{store:r.joggingStore,children:e.children}):g.jsx(Bl,{message:"Loading jogging",error:r.loadingError})})})),CR=me.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(xR,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(SR,{store:e,children:t})})}return g.jsxs(O.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(O.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const s=o.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),a=o.label==="cartesian"?g.jsx(ww,{fontSize:"small",sx:{mr:1}}):g.jsx(Ow,{fontSize:"small",sx:{mr:1}});return g.jsx(O.Tab,{label:e.showTabIcons?g.jsxs(O.Stack,{direction:"row",alignItems:"center",children:[a,s]}):s,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),g.jsx(O.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()}),e.blocked&&g.jsx(VA,{store:e})]})}),Af=e=>{var i;const{value:t,ref:r}=e,n=O.useTheme(),[o,s]=j.useState(!1);async function a(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return j.useEffect(()=>{if(!o)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),g.jsx(O.Tooltip,{open:o,title:"Copied!",children:g.jsx(O.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:g.jsx(O.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},wR=Be(me.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[r,n]=j.useState(null),o=u2(e),s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsx(Af,{value:o}),t&&g.jsx(O.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})})),OR=Be(me.observer(({joints:e,showCopyButton:t=!1})=>{const[r,n]=j.useState(null),o=`[${e.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`,s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsx(Af,{value:o}),t&&g.jsx(O.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})}));class Rf{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},We.makeObservable(this,{messages:We.observable,addMessage:We.action,clearMessages:We.action})}}const po=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),TR=(e,t)=>po(e,"debug",t),ER=(e,t)=>po(e,"info",t),IR=(e,t)=>po(e,"warning",t),AR=(e,t)=>po(e,"error",t),Pf=Be(me.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:o}=e,s=O.useTheme(),a=j.useRef(null);j.useEffect(()=>{if(t.length===0)return;const d=a.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return s.palette.error.main;case"warning":return s.palette.warning.main;case"info":return s.palette.info.main;case"debug":return s.palette.text.disabled;default:return s.palette.text.secondary}},c=({message:d})=>{const[h,p]=j.useState(!1),[f,m]=j.useState(!1),[y,S]=j.useState(!1),R=d.message.length>150,v=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(I){console.error("Failed to copy message:",I)}},T=R&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(O.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:s.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(O.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(O.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:s.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(O.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:T}),g.jsxs(O.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsx(O.IconButton,{size:"small",onClick:v,sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Gt.ContentCopy,{sx:{fontSize:12}})}),R&&g.jsx(O.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Gt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Gt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(O.Paper,{sx:{backgroundColor:((u=s.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Gt.DescriptionOutlined,{sx:{fontSize:16,color:s.palette.action.active,opacity:.56}}),g.jsx(O.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:s.palette.text.primary},children:"Log"})]}),g.jsx(O.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:s.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:s.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(O.Box,{ref:a,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${s.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:s.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:s.palette.divider}}},children:t.length===0?g.jsx(O.Typography,{sx:{color:s.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),RR=Be(me.observer(e=>{const{store:t,onStoreReady:r,...n}=e,o=j.useRef(r);j.useEffect(()=>{o.current=r},[r]);const s=j.useMemo(()=>{var l;const i=t||new Rf;return(l=o.current)==null||l.call(o,i),i},[t]),a=()=>{s.clearMessages()};return g.jsx(Pf,{...n,messages:s.messages,onClear:a})}));function PR(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function MR({baseUrl:e=PR(),...t}){return g.jsxs(O.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:[g.jsx(O.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(O.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(O.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(O.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(O.DialogActions,{children:g.jsxs(O.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(O.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(O.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var dt=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(dt||{});const VR=Be(me.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:o,requiresManualReset:s=!1,variant:a="with_pause",className:i})=>{const l=O.useTheme(),{t:c}=Ce.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return a==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(a==="without_pause")return p===0?g.jsx(Gt.PlayArrow,{...f}):g.jsx(Gt.Stop,{...f});switch(p){case 0:return g.jsx(Gt.PlayArrow,{...f});case 1:return g.jsx(Gt.Pause,{...f});case 2:return g.jsx(Gt.Stop,{...f});default:return null}},h=u();return g.jsx(O.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(O.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(O.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(O.Button,{variant:"contained",disabled:!p.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!s,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(O.Typography,{variant:"body1",sx:{color:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3},children:p.label})]},p.label))})})})),_i=Be(me.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const o=O.useTheme(),{t:s}=Ce.useTranslation(),a=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:s("ProgramStateIndicator.EStop.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case dt.PREPARING:return{label:s("ProgramStateIndicator.Preparing.lb"),color:o.palette.warning.main};case dt.STARTING:return{label:s("ProgramStateIndicator.Starting.lb"),color:o.palette.warning.main};case dt.RUNNING:return{label:s("ProgramStateIndicator.Running.lb"),color:o.palette.success.main};case dt.PAUSING:return{label:s("ProgramStateIndicator.Pausing.lb"),color:o.palette.warning.main};case dt.PAUSED:return{label:s("ProgramStateIndicator.Paused.lb"),color:o.palette.grey[600]};case dt.STOPPING:return{label:s("ProgramStateIndicator.Stopping.lb"),color:o.palette.warning.main};case dt.COMPLETED:return{label:s("ProgramStateIndicator.Completed.lb"),color:o.palette.success.main};case dt.FAILED:return{label:s("ProgramStateIndicator.Failed.lb"),color:o.palette.error.main};case dt.STOPPED:return{label:s("ProgramStateIndicator.Stopped.lb"),color:o.palette.warning.main};case dt.ERROR:return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};case dt.IDLE:default:return{label:s("ProgramStateIndicator.Ready.lb"),color:o.palette.success.main}}return{label:s("ProgramStateIndicator.Idle.lb"),color:o.palette.grey[600]}},{label:i,color:l}=a(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return s("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return s("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return s("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return s("ProgramStateIndicator.ManualT2.lb");default:return s("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(O.Chip,{className:n,label:g.jsx(O.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:o.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),kd="0.0.0-semantically-released";function Gl(e){let t=kd;return kd.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function _R(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Vf(r))}function Mf(e){return e.name.endsWith("_FLG")}function Vf(e){return/_J[0-9]+$/.test(e.name)}function kR(e,t){let r;function n(o){if(Mf(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}Vf(o),o.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function _f({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const o=j.useRef([]),s=j.useRef([]),a=j.useRef(null),{invalidate:i}=Xo.useThree();j.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return a.current=new Al(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=a.current)==null||h.destroy()}},[]),Xo.useFrame((d,h)=>{if(a.current){const p=a.current.update(h);u(),p||i()}});function l(d){d&&(s.current=_R(d),u(),i())}function c(d){var h;o.current=d,(h=a.current)==null||h.setTarget(d)}function u(){var h;const d=((h=a.current)==null?void 0:h.getCurrentValues())||[];if(r)r(s.current,d);else for(const[p,f]of s.current.entries()){const m=t[p],y=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+y}}return Ep(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const jR="line",DR="mesh";function BR({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new wt.Matrix4,o=j.useRef([]),s=j.useRef([]);j.useEffect(()=>{o.current=new Array(t.length).fill(null),s.current=new Array(t.length).fill(null)},[t.length]);function a(c,u){const d=new wt.Vector3,h=new wt.Quaternion,p=new wt.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new wt.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new wt.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new wt.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new wt.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=a(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=o.current[d],p=s.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(_f,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=a(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ht.Line,{ref:f=>{o.current[u]=f},name:jR,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{s.current[u]=f},name:DR,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const UR=console.warn;function LR(){return j.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&UR(e)}},[]),g.jsx(g.Fragment,{})}function FR(e){return e.type==="Mesh"}function $R({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=kR(ht.useGLTF(e),e.split("/").pop()||e),s=j.useCallback(i=>{i&&r&&r()},[e]);function a(i){return FR(i)?g.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):g.jsx("group",{name:i.name,position:i.position,rotation:i.rotation,ref:Mf(i)?t:void 0,children:i.children.map(a)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:s,children:a(o.scene)})}const NR=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Te.Mesh){r.material instanceof Te.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new Te.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Te.DoubleSide}),n.userData.isGhost=!0,o.material=new Te.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Te.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},zR=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Te.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Te.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},kf=Be(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Gl,flangeRef:o,postModelRender:s,transparentColor:a,...i})=>{const[l,c]=j.useState(null),u=j.useCallback(h=>{c(h)},[]);j.useEffect(()=>{l&&(a?NR(l,a):zR(l))},[l,a]);const d=g.jsx(BR,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(Zf.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(j.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(_f,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx($R,{modelURL:n(t),postModelRender:s,flangeRef:o,...i})})})}),g.jsx(LR,{})]})});function jf({connectedMotionGroup:e,getModel:t=Gl,flangeRef:r,transparentColor:n,postModelRender:o,...s}){return e.dhParameters?g.jsx(kf,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:o,...s}):null}const GR=Be(me.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:o=!1,onDriveToHomePress:s,onDriveToHomeRelease:a,connectedMotionGroup:i,robotComponent:l=jf,customContentComponent:c,className:u})=>{var M;const d=O.useTheme(),{t:h}=Ce.useTranslation(),[p,f]=j.useState(!1),m=j.useRef(null),y=j.useRef(null),[S,R]=j.useState(!1),[v,T]=j.useState({width:400,height:600}),[I,E]=j.useState(0);j.useEffect(()=>{const D=()=>{if(y.current){const{offsetWidth:Q,offsetHeight:oe}=y.current;R(Q>oe),T({width:Q,height:oe})}};D();const ne=new ResizeObserver(D);return y.current&&ne.observe(y.current),()=>{ne.disconnect()}},[]);const w=j.useCallback(()=>{E(D=>D+1)},[]),P=j.useCallback(()=>{!o||!s||(f(!0),s())},[o,s]),k=j.useCallback(()=>{!o||!a||(f(!1),a())},[o,a]),b=j.useCallback(()=>{p&&a&&(f(!1),a())},[p,a]),A=S?v.width<350:v.height<200,V=S?v.height<310:v.height<450;return g.jsx(O.Card,{ref:y,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((M=d.palette.backgroundPaperElevation)==null?void 0:M[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(O.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(O.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:A?"100%":"50%"},children:[g.jsxs(O.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(O.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(_i,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(O.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!V&&c&&g.jsxs(O.Box,{children:[g.jsx(c,{}),g.jsx(O.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(O.Box,{sx:{mt:!V&&c?"auto":0},children:g.jsx(O.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(O.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:b,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(O.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(O.Box,{children:[g.jsx(O.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(_i,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(O.Box,{sx:{flex:A?0:1,position:"relative",minHeight:A?0:{xs:120,sm:150,md:200},height:A?0:"auto",borderRadius:1,overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(O.Box,{children:[!V&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(O.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(O.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!V&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(O.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:b,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),HR=pr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),qR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),WR=j.forwardRef(qR);var Hl=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Hl||{});const Df=Be(me.observer(({setupState:e,className:t})=>{const r=O.useTheme(),{t:n}=Ce.useTranslation(),o=()=>{var c,u,d,h,p,f,m;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"CELL_OPEN":return{label:n("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"E_STOP":return{label:n("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:r.palette.error.main,backgroundColor:((p=r.palette.backgroundPaperElevation)==null?void 0:p[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"MANUAL_MODE":return{label:n("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:r.palette.error.main,backgroundColor:((f=r.palette.backgroundPaperElevation)==null?void 0:f[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((m=r.palette.backgroundPaperElevation)==null?void 0:m[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:s,indicatorColor:a,backgroundColor:i,textColor:l}=o();return g.jsx(O.Chip,{className:t,label:g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(O.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:a,flexShrink:0}}),g.jsx(O.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:s})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),JR=Be(me.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=Df,className:o})=>{var l;const s=O.useTheme(),a=t||"Robot",i=r===Hl.READY;return g.jsxs(O.Box,{className:o,sx:{border:`1px solid ${s.palette.divider}`,background:((l=s.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(O.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${s.palette.primary.main} !important`},"& svg path":{fill:`${s.palette.primary.main} !important`}},children:g.jsx(WR,{})}):g.jsx(HR,{sx:{color:s.palette.error.main,fontSize:24}}),g.jsx(O.Typography,{variant:"body1",sx:{fontWeight:500,color:s.palette.text.primary},children:e}),g.jsx(O.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:s.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(O.Typography,{variant:"body2",sx:{color:s.palette.text.secondary},children:a})]}),n&&g.jsx(n,{setupState:r})]})})),YR=Array(6).fill(2*Math.PI),kt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},ki={[kt.Abb]:[0,0,0,0,Math.PI/2,0,0],[kt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[kt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[kt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[kt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function Bf(e){const[t]=e.split("_");switch(t){case"ABB":return kt.Abb;case"FANUC":return kt.Fanuc;case"YASKAWA":return kt.Yaskawa;case"KUKA":return kt.Kuka;case"UniversalRobots":return kt.Universalrobots;default:return null}}function KR(e,t){const r=Bf(e);return r&&r in ki?ki[r]:t||null}const QR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),XR=j.forwardRef(QR),ZR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),eP=j.forwardRef(ZR),jt=me.observer(({id:e,icon:t,color:r,title:n,name:o,label:s,explanation:a,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=me.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxs(g.Fragment,{children:[g.jsxs(O.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(O.SvgIcon,{component:t,sx:{color:r}}),s&&g.jsx("div",{style:{color:r},children:s})]}),g.jsx(O.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(O.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(O.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(O.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),g.jsx(O.Typography,{fontSize:"14px",children:a}),i&&g.jsx(O.Typography,{fontSize:"12px",children:i})]})})]})}),tP=me.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:o})=>{const s=O.useTheme(),{t:a}=Ce.useTranslation();return e?g.jsx(jt,{id:"motion-group-virtual",icon:eP,color:s.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:o?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(jt,{id:"motion-group-physical",icon:XR,color:s.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:o?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),rP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),nP=j.forwardRef(rP),oP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),sP=j.forwardRef(oP),aP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),iP=j.forwardRef(aP),lP=me.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=O.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(jt,{id:"operation-mode-auto",icon:nP,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(jt,{id:"operation-mode-manual",icon:iP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(jt,{id:"operation-mode-error",icon:sP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),cP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),uP=j.forwardRef(cP),dP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),hP=j.forwardRef(dP),pP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),fP=j.forwardRef(pP),mP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),gP=j.forwardRef(mP),yP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),bP=j.forwardRef(yP),xP=me.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=O.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(jt,{id:"safety-state-normal",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:gP,color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(jt,{id:"safety-state-estop",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:hP,color:s.palette.error.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(jt,{id:"safety-state-stop",icon:bP,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(jt,{id:"safety-state-manual-action-required",icon:fP,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(jt,{id:"safety-state-error",icon:uP,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:y2(e,`Unknown safety state ${e}`)}}),SP=Be(me.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a=!0})=>{const i=a?1:2;return g.jsxs(O.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(xP,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(O.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(lP,{operationMode:r,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(O.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(tP,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:a})]})})),vP=O.styled(O.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),CP=e=>{const{ref:t,...r}=e;return g.jsx(vP,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function wP(e){const{children:t,value:r,index:n,...o}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...o,children:r===n&&g.jsx(O.Box,{children:t})})}function OP({children:e,...t}){const{fullWidth:r,indicator:n,onChange:o,orientation:s,scrollButtons:a,selectionFollowsFocus:i,textColor:l,value:c,variant:u,...d}=t;return g.jsx(O.Box,{...d,children:e})}const TP=Be(me.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:o,sx:s,ref:a}=e,i=r!==void 0,[l,c]=j.useState(n),u=i?r:l;j.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const d=(h,p)=>{i||c(p),o==null||o(p)};return g.jsxs(O.Box,{ref:a,sx:{height:"100%",display:"flex",flexDirection:"column",...s},children:[g.jsx(O.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsx(O.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,p)=>{var T,I,E;const f=()=>{if(!h.badge)return;const w=h.badge.content,P=h.badge.max;return typeof w=="number"&&P&&w>P?`${P}+`:w},m=()=>{if(!h.badge)return!1;const w=h.badge.content,P=h.badge.showZero;return!(w===0&&!P)},y=f(),S=m(),R=()=>{i||c(p),o==null||o(p)},v=g.jsx(O.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:R,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return S?g.jsx(OP,{component:"span",sx:{display:"inline-flex"},children:g.jsx(O.Badge,{badgeContent:y,color:((T=h.badge)==null?void 0:T.color)||"error",max:(I=h.badge)==null?void 0:I.max,showZero:(E=h.badge)==null?void 0:E.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:v})},h.id):v})})}),g.jsx(O.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsx(O.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(wP,{value:u,index:p,children:h.content},h.id))})]})})),EP={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print|and|or|not)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},IP=j.lazy(()=>import("@monaco-editor/react"));let ti=null;async function AP(){if(!ti){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);ti={shiki:await e({langs:[EP],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return ti}const RP=Be(e=>{const t=O.useTheme(),[r,n]=j.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await AP();l(i,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return g.jsx(j.Suspense,{fallback:g.jsx(Bl,{}),children:g.jsx(IP,{value:e.code,onMount:(a,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Uf(){var t,r,n,o,s,a,i;const e=O.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:a.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":O.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function PP(){const e=Uf();return e.palette.mode="light",e}function MP(e){var n,o,s,a;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((a=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?Uf():PP();return nh(r,e)}exports.AppHeader=gm;exports.CollisionSceneRenderer=im;exports.CycleTimer=kC;exports.JoggingCartesianAxisControl=xi;exports.JoggingJointRotationControl=Pp;exports.JoggingPanel=vR;exports.JoggingStore=da;exports.LoadingCover=Bl;exports.LoadingErrorMessage=nf;exports.LogPanel=RR;exports.LogStore=Rf;exports.LogViewer=Pf;exports.MANUFACTURER_HOME_CONFIGS=ki;exports.NoMotionGroupModal=MR;exports.PoseCartesianValues=wR;exports.PoseJointValues=OR;exports.PresetEnvironment=ri;exports.ProgramControl=VR;exports.ProgramState=dt;exports.ProgramStateIndicator=_i;exports.Robot=jf;exports.RobotCard=GR;exports.RobotListItem=JR;exports.RobotSetupReadinessIndicator=Df;exports.RobotSetupReadinessState=Hl;exports.SafetyBar=SP;exports.SafetyZonesRenderer=um;exports.SelectableFab=CP;exports.SupportedRobot=kf;exports.TabBar=TP;exports.Timer=FC;exports.TrajectoryRenderer=dm;exports.ValueInterpolator=Al;exports.VelocitySlider=Ef;exports.VelocitySliderLabel=zl;exports.WandelbotsDataGrid=Tp;exports.WandelscriptEditor=RP;exports.createDebugMessage=TR;exports.createErrorMessage=AR;exports.createInfoMessage=ER;exports.createLogMessage=po;exports.createNovaMuiTheme=MP;exports.createWarningMessage=IR;exports.defaultAxisConfig=YR;exports.defaultGetModel=Gl;exports.extractManufacturer=Bf;exports.getDefaultHomeConfig=KR;exports.i18n=Di;exports.useAnimationFrame=ea;exports.useAutorun=Ep;exports.useInterpolation=Rl;exports.useMounted=Zs;exports.useReaction=Ip;
152
+ `))}return!1}const YA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function KA(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const QA=2;function Yr(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function Cf(e,t){return e-t}function Pd(e,t){const{index:r}=e.reduce((n,o,s)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:s}:n},null)??{};return r}function Lo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function vs(e,t,r){return(e-t)*100/(r-t)}function XA(e,t,r){return(r-t)*e+t}function ZA(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function eR(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(ZA(t)))}function Md({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Cf)}function Fo({sliderRef:e,activeIndex:t,setActive:r}){var o,s,a;const n=Un(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function $o(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?KA(e,t):!1}const tR={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}%`})}},rR=e=>e;let No;function Vd(){return No===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?No=CSS.supports("touch-action","none"):No=!0),No}function nR(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:s=!1,marks:a=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=rR,step:m=1,shiftStep:y=10,tabIndex:S,value:R}=e,v=_.useRef(void 0),[T,I]=_.useState(-1),[E,w]=_.useState(-1),[P,k]=_.useState(!1),b=_.useRef(0),A=_.useRef(null),[V,M]=GC({controlled:R,default:r??l,name:"Slider"}),D=u&&((Z,re,ie)=>{const fe=Z.nativeEvent||Z,Ee=new fe.constructor(fe.type,fe);Object.defineProperty(Ee,"target",{writable:!0,value:{value:re,name:c}}),A.current=re,u(Ee,re,ie)}),ne=Array.isArray(V);let Q=ne?V.slice().sort(Cf):[V];Q=Q.map(Z=>Z==null?l:Kr(Z,l,i));const oe=a===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Z,re)=>({value:l+m*re})):a||[],X=oe.map(Z=>Z.value),[se,F]=_.useState(-1),ee=_.useRef(null),ce=js(p,ee),be=Z=>re=>{var fe;const ie=Number(re.currentTarget.getAttribute("data-index"));Rd(re.target)&&F(ie),w(ie),(fe=Z==null?void 0:Z.onFocus)==null||fe.call(Z,re)},Me=Z=>re=>{var ie;Rd(re.target)||F(-1),w(-1),(ie=Z==null?void 0:Z.onBlur)==null||ie.call(Z,re)},xe=(Z,re)=>{const ie=Number(Z.currentTarget.getAttribute("data-index")),fe=Q[ie],Ee=X.indexOf(fe);let le=re;if(oe&&m==null){const ze=X[X.length-1];le>=ze?le=ze:le<=X[0]?le=X[0]:le=le<fe?X[Ee-1]:X[Ee+1]}if(le=Kr(le,l,i),ne){o&&(le=Kr(le,Q[ie-1]||-1/0,Q[ie+1]||1/0));const ze=le;le=Md({values:Q,newValue:le,index:ie});let Qe=ie;o||(Qe=le.indexOf(ze)),Fo({sliderRef:ee,activeIndex:Qe})}M(le),F(ie),D&&!$o(le,V)&&D(Z,le,ie),d&&d(Z,A.current??le)},ut=Z=>re=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(re.key)){re.preventDefault();const fe=Number(re.currentTarget.getAttribute("data-index")),Ee=Q[fe];let le=null;if(m!=null){const ze=re.shiftKey?y:m;switch(re.key){case"ArrowUp":le=Yr(Ee,ze,1,l,i);break;case"ArrowRight":le=Yr(Ee,ze,s?-1:1,l,i);break;case"ArrowDown":le=Yr(Ee,ze,-1,l,i);break;case"ArrowLeft":le=Yr(Ee,ze,s?1:-1,l,i);break;case"PageUp":le=Yr(Ee,y,1,l,i);break;case"PageDown":le=Yr(Ee,y,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(oe){const ze=X[X.length-1],Qe=X.indexOf(Ee),Ue=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ue.includes(re.key)?Qe===0?le=X[0]:le=X[Qe-1]:mt.includes(re.key)&&(Qe===X.length-1?le=ze:le=X[Qe+1])}le!=null&&xe(re,le)}(ie=Z==null?void 0:Z.onKeyDown)==null||ie.call(Z,re)};Bt(()=>{var Z;n&&ee.current.contains(document.activeElement)&&((Z=document.activeElement)==null||Z.blur())},[n]),n&&T!==-1&&I(-1),n&&se!==-1&&F(-1);const nt=Z=>re=>{var ie;(ie=Z.onChange)==null||ie.call(Z,re),xe(re,re.target.valueAsNumber)},Se=_.useRef(void 0);let te=h;s&&h==="horizontal"&&(te+="-reverse");const ae=({finger:Z,move:re=!1})=>{const{current:ie}=ee,{width:fe,height:Ee,bottom:le,left:ze}=ie.getBoundingClientRect();let Qe;te.startsWith("vertical")?Qe=(le-Z.y)/Ee:Qe=(Z.x-ze)/fe,te.includes("-reverse")&&(Qe=1-Qe);let Ue;if(Ue=XA(Qe,l,i),m)Ue=eR(Ue,m,l);else{const xn=Pd(X,Ue);Ue=X[xn]}Ue=Kr(Ue,l,i);let mt=0;if(ne){re?mt=Se.current:mt=Pd(Q,Ue),o&&(Ue=Kr(Ue,Q[mt-1]||-1/0,Q[mt+1]||1/0));const xn=Ue;Ue=Md({values:Q,newValue:Ue,index:mt}),o&&re||(mt=Ue.indexOf(xn),Se.current=mt)}return{newValue:Ue,activeIndex:mt}},ue=Wt(Z=>{const re=Lo(Z,v);if(!re)return;if(b.current+=1,Z.type==="mousemove"&&Z.buttons===0){Y(Z);return}const{newValue:ie,activeIndex:fe}=ae({finger:re,move:!0});Fo({sliderRef:ee,activeIndex:fe,setActive:I}),M(ie),!P&&b.current>QA&&k(!0),D&&!$o(ie,V)&&D(Z,ie,fe)}),Y=Wt(Z=>{const re=Lo(Z,v);if(k(!1),!re)return;const{newValue:ie}=ae({finger:re,move:!0});I(-1),Z.type==="touchend"&&w(-1),d&&d(Z,A.current??ie),v.current=void 0,pe()}),ve=Wt(Z=>{if(n)return;Vd()||Z.preventDefault();const re=Z.changedTouches[0];re!=null&&(v.current=re.identifier);const ie=Lo(Z,v);if(ie!==!1){const{newValue:Ee,activeIndex:le}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:le,setActive:I}),M(Ee),D&&!$o(Ee,V)&&D(Z,Ee,le)}b.current=0;const fe=Un(ee.current);fe.addEventListener("touchmove",ue,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),pe=_.useCallback(()=>{const Z=Un(ee.current);Z.removeEventListener("mousemove",ue),Z.removeEventListener("mouseup",Y),Z.removeEventListener("touchmove",ue),Z.removeEventListener("touchend",Y)},[Y,ue]);_.useEffect(()=>{const{current:Z}=ee;return Z.addEventListener("touchstart",ve,{passive:Vd()}),()=>{Z.removeEventListener("touchstart",ve),pe()}},[pe,ve]),_.useEffect(()=>{n&&pe()},[n,pe]);const He=Z=>re=>{var Ee;if((Ee=Z.onMouseDown)==null||Ee.call(Z,re),n||re.defaultPrevented||re.button!==0)return;re.preventDefault();const ie=Lo(re,v);if(ie!==!1){const{newValue:le,activeIndex:ze}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:ze,setActive:I}),M(le),D&&!$o(le,V)&&D(re,le,ze)}b.current=0;const fe=Un(ee.current);fe.addEventListener("mousemove",ue,{passive:!0}),fe.addEventListener("mouseup",Y)},Ne=vs(ne?Q[0]:l,l,i),Ve=vs(Q[Q.length-1],l,i)-Ne,rr=(Z={})=>{const re=Ko(Z),ie={onMouseDown:He(re||{})},fe={...re,...ie};return{...Z,ref:ce,...fe}},fo=Z=>re=>{var fe;(fe=Z.onMouseOver)==null||fe.call(Z,re);const ie=Number(re.currentTarget.getAttribute("data-index"));w(ie)},mo=Z=>re=>{var ie;(ie=Z.onMouseLeave)==null||ie.call(Z,re),w(-1)},go=(Z={})=>{const re=Ko(Z),ie={onMouseOver:fo(re||{}),onMouseLeave:mo(re||{})};return{...Z,...re,...ie}},yo=Z=>({pointerEvents:T!==-1&&T!==Z?"none":void 0});let Ur;return h==="vertical"&&(Ur=s?"vertical-rl":"vertical-lr"),{active:T,axis:te,axisProps:tR,dragging:P,focusedThumbIndex:se,getHiddenInputProps:(Z={})=>{const re=Ko(Z),ie={onChange:nt(re||{}),onFocus:be(re||{}),onBlur:Me(re||{}),onKeyDown:ut(re||{})},fe={...re,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Z,...fe,style:{...YA,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Ur}}},getRootProps:rr,getThumbProps:go,marks:oe,open:E,range:ne,rootRef:ce,trackLeap:Ve,trackOffset:Ne,values:Q,getThumbStyle:yo}}function Qo(e){return typeof e=="string"}const oR=e=>!e||!Qo(e);function sR(e){return typeof e.main=="string"}function aR(e,t=[]){if(!sR(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Nl(e=[]){return([,t])=>t&&aR(t,e)}function iR(e){return pn("MuiSlider",e)}const St=Li("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"]),lR=e=>{const{open:t}=e;return{offset:Et(t&&St.valueLabelOpen),circle:St.valueLabelCircle,label:St.valueLabelLabel}};function wf(e){const{children:t,className:r,value:n}=e,o=lR(e);return t?_.cloneElement(t,{className:t.props.className},g.jsxs(_.Fragment,{children:[t.props.children,g.jsx("span",{className:Et(o.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:o.circle,children:g.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(wf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function _d(e){return e}const cR=ft("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${tt(r.color)}`],r.size!=="medium"&&t[`size${tt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(kr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${St.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${St.dragging}`]:{[`& .${St.thumb}, & .${St.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),uR=ft("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),dR=ft("span",{name:"MuiSlider",slot:"Track"})(kr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:Nn(e.palette[t].main,.62),borderColor:Nn(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:$n(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:$n(e.palette[t].main,.5)})}}}))]}))),hR=ft("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${tt(r.color)}`],r.size!=="medium"&&t[`thumbSize${tt(r.size)}`]]}})(kr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${St.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${St.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${oi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${St.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${oi(e.palette[t].main,.16)}`}}}}))]}))),Of=ft(wf,{name:"MuiSlider",slot:"ValueLabel"})(kr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${St.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%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Of.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const pR=ft("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>zi(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(kr(({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}}]}))),fR=ft("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>zi(e)&&e!=="markLabelActive"})(kr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),mR=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:s,classes:a,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${tt(i)}`,l&&`size${tt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${tt(l)}`,i&&`thumbColor${tt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Cs(c,iR,a)},gR=({children:e})=>e,Tf=_.forwardRef(function(t,r){const n=Pl({props:t,name:"MuiSlider"}),o=Jg(),{"aria-label":s,"aria-valuetext":a,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:y,getAriaValueText:S,marks:R=!1,max:v=100,min:T=0,name:I,onChange:E,onChangeCommitted:w,orientation:P="horizontal",shiftStep:k=10,size:b="medium",step:A=1,scale:V=_d,slotProps:M,slots:D,tabIndex:ne,track:Q="normal",value:oe,valueLabelDisplay:X="off",valueLabelFormat:se=_d,...F}=n,ee={...n,isRtl:o,max:v,min:T,classes:h,disabled:m,disableSwap:f,orientation:P,marks:R,color:d,size:b,step:A,shiftStep:k,scale:V,track:Q,valueLabelDisplay:X,valueLabelFormat:se},{axisProps:ce,getRootProps:be,getHiddenInputProps:Me,getThumbProps:xe,open:ut,active:nt,axis:Se,focusedThumbIndex:te,range:ae,dragging:ue,marks:Y,values:ve,trackOffset:pe,trackLeap:He,getThumbStyle:Ne}=nR({...ee,rootRef:r});ee.marked=Y.length>0&&Y.some(De=>De.label),ee.dragging=ue,ee.focusedThumbIndex=te;const Ve=mR(ee),rr=(D==null?void 0:D.root)??c.Root??cR,fo=(D==null?void 0:D.rail)??c.Rail??uR,mo=(D==null?void 0:D.track)??c.Track??dR,go=(D==null?void 0:D.thumb)??c.Thumb??hR,yo=(D==null?void 0:D.valueLabel)??c.ValueLabel??Of,Ur=(D==null?void 0:D.mark)??c.Mark??pR,bo=(D==null?void 0:D.markLabel)??c.MarkLabel??fR,Z=(D==null?void 0:D.input)??c.Input??"input",re=(M==null?void 0:M.root)??u.root,ie=(M==null?void 0:M.rail)??u.rail,fe=(M==null?void 0:M.track)??u.track,Ee=(M==null?void 0:M.thumb)??u.thumb,le=(M==null?void 0:M.valueLabel)??u.valueLabel,ze=(M==null?void 0:M.mark)??u.mark,Qe=(M==null?void 0:M.markLabel)??u.markLabel,Ue=(M==null?void 0:M.input)??u.input,mt=or({elementType:rr,getSlotProps:be,externalSlotProps:re,externalForwardedProps:F,additionalProps:{...oR(rr)&&{as:l}},ownerState:{...ee,...re==null?void 0:re.ownerState},className:[Ve.root,p]}),xn=or({elementType:fo,externalSlotProps:ie,ownerState:ee,className:Ve.rail}),Lf=or({elementType:mo,externalSlotProps:fe,additionalProps:{style:{...ce[Se].offset(pe),...ce[Se].leap(He)}},ownerState:{...ee,...fe==null?void 0:fe.ownerState},className:Ve.track}),ha=or({elementType:go,getSlotProps:xe,externalSlotProps:Ee,ownerState:{...ee,...Ee==null?void 0:Ee.ownerState},className:Ve.thumb}),Ff=or({elementType:yo,externalSlotProps:le,ownerState:{...ee,...le==null?void 0:le.ownerState},className:Ve.valueLabel}),pa=or({elementType:Ur,externalSlotProps:ze,ownerState:ee,className:Ve.mark}),fa=or({elementType:bo,externalSlotProps:Qe,ownerState:ee,className:Ve.markLabel}),$f=or({elementType:Z,getSlotProps:Me,externalSlotProps:Ue,ownerState:ee});return g.jsxs(rr,{...mt,children:[g.jsx(fo,{...xn}),g.jsx(mo,{...Lf}),Y.filter(De=>De.value>=T&&De.value<=v).map((De,qe)=>{const ma=vs(De.value,T,v),xo=ce[Se].offset(ma);let Ft;return Q===!1?Ft=ve.includes(De.value):Ft=Q==="normal"&&(ae?De.value>=ve[0]&&De.value<=ve[ve.length-1]:De.value<=ve[0])||Q==="inverted"&&(ae?De.value<=ve[0]||De.value>=ve[ve.length-1]:De.value>=ve[0]),g.jsxs(_.Fragment,{children:[g.jsx(Ur,{"data-index":qe,...pa,...!Qo(Ur)&&{markActive:Ft},style:{...xo,...pa.style},className:Et(pa.className,Ft&&Ve.markActive)}),De.label!=null?g.jsx(bo,{"aria-hidden":!0,"data-index":qe,...fa,...!Qo(bo)&&{markLabelActive:Ft},style:{...xo,...fa.style},className:Et(Ve.markLabel,fa.className,Ft&&Ve.markLabelActive),children:De.label}):null]},qe)}),ve.map((De,qe)=>{const ma=vs(De,T,v),xo=ce[Se].offset(ma),Ft=X==="off"?gR:yo;return g.jsx(Ft,{...!Qo(Ft)&&{valueLabelFormat:se,valueLabelDisplay:X,value:typeof se=="function"?se(V(De),qe):se,index:qe,open:ut===qe||nt===qe||X==="on",disabled:m},...Ff,children:g.jsx(go,{"data-index":qe,...ha,className:Et(Ve.thumb,ha.className,nt===qe&&Ve.active,te===qe&&Ve.focusVisible),style:{...xo,...Ne(qe),...ha.style},children:g.jsx(Z,{"data-index":qe,"aria-label":y?y(qe):s,"aria-valuenow":V(De),"aria-labelledby":i,"aria-valuetext":S?S(V(De),qe):a,value:ve[qe],...$f})})},qe)})]})});process.env.NODE_ENV!=="production"&&(Tf.propTypes={"aria-label":Id(x.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":x.string,"aria-valuetext":Id(x.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:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["primary","secondary","error","info","success","warning"]),x.string]),components:x.shape({Input:x.elementType,Mark:x.elementType,MarkLabel:x.elementType,Rail:x.elementType,Root:x.elementType,Thumb:x.elementType,Track:x.elementType,ValueLabel:x.elementType}),componentsProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),defaultValue:x.oneOfType([x.arrayOf(x.number),x.number]),disabled:x.bool,disableSwap:x.bool,getAriaLabel:x.func,getAriaValueText:x.func,marks:x.oneOfType([x.arrayOf(x.shape({label:x.node,value:x.number.isRequired})),x.bool]),max:x.number,min:x.number,name:x.string,onChange:x.func,onChangeCommitted:x.func,orientation:x.oneOf(["horizontal","vertical"]),scale:x.func,shiftStep:x.number,size:x.oneOfType([x.oneOf(["small","medium"]),x.string]),slotProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),slots:x.shape({input:x.elementType,mark:x.elementType,markLabel:x.elementType,rail:x.elementType,root:x.elementType,thumb:x.elementType,track:x.elementType,valueLabel:x.elementType}),step:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),tabIndex:x.number,track:x.oneOf(["inverted","normal",!1]),value:x.oneOfType([x.arrayOf(x.number),x.number]),valueLabelDisplay:x.oneOf(["auto","off","on"]),valueLabelFormat:x.oneOfType([x.func,x.string])});var yR="[object Number]";function bR(e){return typeof e=="number"||Er(e)&&jr(e)==yR}const Ef=me.observer(e=>{var s,a,i;const t=O.useTheme(),{store:r}=e,{t:n}=Ce.useTranslation();function o(l,c){c===e.velocity||!bR(c)||e.onVelocityChange(c)}return g.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(O.Typography,{sx:{color:(i=(a=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:a.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Tf,{value:e.velocity,color:"secondary",onChange:o,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsx(zl,{value:e.velocity.toString()}))]})});function zl({value:e,sx:t}){var n;const r=O.useTheme();return g.jsx(O.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsx(O.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const If=me.observer(({store:e})=>{const{t}=Ce.useTranslation(),r=me.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return g.jsx(Ef,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(zl,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),xR=me.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation(),n=O.useTheme();function o(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Ip(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function s(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,y=f.motionStream.rapidlyChangingMotionState.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:y,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:et.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var y,S,R;const m=(R=(S=(y=f.componentsExt)==null?void 0:y.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:R.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(kA,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(DA,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(UA,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:et.radiansToDegrees(h).toFixed(1)})}return g.jsxs(O.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(O.Stack,{gap:2,children:[g.jsx(zA,{store:e}),g.jsx(If,{store:e}),g.jsx(O.Divider,{})]}),g.jsx(O.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(O.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(GA,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(O.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(O.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(O.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return u(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position)==null?void 0:y[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(FA,{}),g.jsx(O.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return d(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:y[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(vf,{store:e}),t&&g.jsx(O.Divider,{}),t]})}),SR=me.observer(({store:e,children:t})=>{const r=O.useTheme();async function n(s){await e.activate(),await e.jogger.rotateJoints({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(O.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(If,{store:e}),g.jsx(O.Divider,{}),g.jsx(O.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(O.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c,u,d;const a=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[s.index])==null?void 0:d.position,i=(a==null?void 0:a.lower_limit)!==void 0?et.radiansToDegrees(a.lower_limit):void 0,l=(a==null?void 0:a.upper_limit)!==void 0?et.radiansToDegrees(a.upper_limit):void 0;return g.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(O.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),g.jsx(Pp,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[s.index];return h!==void 0?et.radiansToDegrees(h):void 0},startJogging:h=>n({joint:s.index,direction:h}),stopJogging:o})]},`joint-${s.index}`)})})}),g.jsx(vf,{store:e}),t&&g.jsx(O.Divider,{}),t]})}),vR=Be(me.observer(e=>{const t=ji.isString(e.nova)?new c2({instanceUrl:e.nova}):e.nova,r=me.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){We.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const s=await Dl.open(t,e.motionGroupId);o=await da.loadFor(s)}We.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return j.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),j.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(O.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(CR,{store:r.joggingStore,children:e.children}):g.jsx(Bl,{message:"Loading jogging",error:r.loadingError})})})),CR=me.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(xR,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(SR,{store:e,children:t})})}return g.jsxs(O.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(O.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const s=o.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),a=o.label==="cartesian"?g.jsx(ww,{fontSize:"small",sx:{mr:1}}):g.jsx(Ow,{fontSize:"small",sx:{mr:1}});return g.jsx(O.Tab,{label:e.showTabIcons?g.jsxs(O.Stack,{direction:"row",alignItems:"center",children:[a,s]}):s,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),g.jsx(O.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()}),e.blocked&&g.jsx(VA,{store:e})]})}),Af=e=>{var i;const{value:t,ref:r}=e,n=O.useTheme(),[o,s]=j.useState(!1);async function a(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return j.useEffect(()=>{if(!o)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),g.jsx(O.Tooltip,{open:o,title:"Copied!",children:g.jsx(O.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:g.jsx(O.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},wR=Be(me.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[r,n]=j.useState(null),o=u2(e),s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsx(Af,{value:o}),t&&g.jsx(O.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})})),OR=Be(me.observer(({joints:e,showCopyButton:t=!1})=>{const[r,n]=j.useState(null),o=`[${e.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`,s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsx(Af,{value:o}),t&&g.jsx(O.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})}));class Rf{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},We.makeObservable(this,{messages:We.observable,addMessage:We.action,clearMessages:We.action})}}const po=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),TR=(e,t)=>po(e,"debug",t),ER=(e,t)=>po(e,"info",t),IR=(e,t)=>po(e,"warning",t),AR=(e,t)=>po(e,"error",t),Pf=Be(me.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:o}=e,s=O.useTheme(),a=j.useRef(null);j.useEffect(()=>{if(t.length===0)return;const d=a.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return s.palette.error.main;case"warning":return s.palette.warning.main;case"info":return s.palette.info.main;case"debug":return s.palette.text.disabled;default:return s.palette.text.secondary}},c=({message:d})=>{const[h,p]=j.useState(!1),[f,m]=j.useState(!1),[y,S]=j.useState(!1),R=d.message.length>150,v=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(I){console.error("Failed to copy message:",I)}},T=R&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(O.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:s.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(O.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(O.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:s.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(O.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:T}),g.jsxs(O.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsx(O.IconButton,{size:"small",onClick:v,sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Gt.ContentCopy,{sx:{fontSize:12}})}),R&&g.jsx(O.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Gt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Gt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(O.Paper,{sx:{backgroundColor:((u=s.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Gt.DescriptionOutlined,{sx:{fontSize:16,color:s.palette.action.active,opacity:.56}}),g.jsx(O.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:s.palette.text.primary},children:"Log"})]}),g.jsx(O.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:s.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:s.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(O.Box,{ref:a,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${s.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:s.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:s.palette.divider}}},children:t.length===0?g.jsx(O.Typography,{sx:{color:s.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),RR=Be(me.observer(e=>{const{store:t,onStoreReady:r,...n}=e,o=j.useRef(r);j.useEffect(()=>{o.current=r},[r]);const s=j.useMemo(()=>{var l;const i=t||new Rf;return(l=o.current)==null||l.call(o,i),i},[t]),a=()=>{s.clearMessages()};return g.jsx(Pf,{...n,messages:s.messages,onClear:a})}));function PR(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function MR({baseUrl:e=PR(),...t}){return g.jsxs(O.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:[g.jsx(O.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(O.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(O.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(O.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(O.DialogActions,{children:g.jsxs(O.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(O.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(O.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var dt=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(dt||{});const VR=Be(me.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:o,requiresManualReset:s=!1,variant:a="with_pause",className:i})=>{const l=O.useTheme(),{t:c}=Ce.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return a==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(a==="without_pause")return p===0?g.jsx(Gt.PlayArrow,{...f}):g.jsx(Gt.Stop,{...f});switch(p){case 0:return g.jsx(Gt.PlayArrow,{...f});case 1:return g.jsx(Gt.Pause,{...f});case 2:return g.jsx(Gt.Stop,{...f});default:return null}},h=u();return g.jsx(O.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(O.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(O.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(O.Button,{variant:"contained",disabled:!p.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!s,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(O.Typography,{variant:"body1",sx:{color:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3},children:p.label})]},p.label))})})})),_i=Be(me.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const o=O.useTheme(),{t:s}=Ce.useTranslation(),a=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:s("ProgramStateIndicator.EStop.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case dt.PREPARING:return{label:s("ProgramStateIndicator.Preparing.lb"),color:o.palette.warning.main};case dt.STARTING:return{label:s("ProgramStateIndicator.Starting.lb"),color:o.palette.warning.main};case dt.RUNNING:return{label:s("ProgramStateIndicator.Running.lb"),color:o.palette.success.main};case dt.PAUSING:return{label:s("ProgramStateIndicator.Pausing.lb"),color:o.palette.warning.main};case dt.PAUSED:return{label:s("ProgramStateIndicator.Paused.lb"),color:o.palette.grey[600]};case dt.STOPPING:return{label:s("ProgramStateIndicator.Stopping.lb"),color:o.palette.warning.main};case dt.COMPLETED:return{label:s("ProgramStateIndicator.Completed.lb"),color:o.palette.success.main};case dt.FAILED:return{label:s("ProgramStateIndicator.Failed.lb"),color:o.palette.error.main};case dt.STOPPED:return{label:s("ProgramStateIndicator.Stopped.lb"),color:o.palette.warning.main};case dt.ERROR:return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};case dt.IDLE:default:return{label:s("ProgramStateIndicator.Ready.lb"),color:o.palette.success.main}}return{label:s("ProgramStateIndicator.Idle.lb"),color:o.palette.grey[600]}},{label:i,color:l}=a(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return s("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return s("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return s("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return s("ProgramStateIndicator.ManualT2.lb");default:return s("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(O.Chip,{className:n,label:g.jsx(O.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:o.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),kd="0.0.0-semantically-released";function Gl(e){let t=kd;return kd.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function _R(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Vf(r))}function Mf(e){return e.name.endsWith("_FLG")}function Vf(e){return/_J[0-9]+$/.test(e.name)}function kR(e,t){let r;function n(o){if(Mf(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}Vf(o),o.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function _f({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const o=j.useRef([]),s=j.useRef([]),a=j.useRef(null),{invalidate:i}=Xo.useThree();j.useEffect(()=>{const d=e.joint_position.filter(h=>h!==void 0);return a.current=new Al(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=a.current)==null||h.destroy()}},[]),Xo.useFrame((d,h)=>{if(a.current){const p=a.current.update(h);u(),p||i()}});function l(d){d&&(s.current=_R(d),u(),i())}function c(d){var h;o.current=d,(h=a.current)==null||h.setTarget(d)}function u(){var h;const d=((h=a.current)==null?void 0:h.getCurrentValues())||[];if(r)r(s.current,d);else for(const[p,f]of s.current.entries()){const m=t[p],y=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+y}}return Ep(()=>{const d=e.joint_position.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const jR="line",DR="mesh";function BR({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new wt.Matrix4,o=j.useRef([]),s=j.useRef([]);j.useEffect(()=>{o.current=new Array(t.length).fill(null),s.current=new Array(t.length).fill(null)},[t.length]);function a(c,u){const d=new wt.Vector3,h=new wt.Quaternion,p=new wt.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new wt.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new wt.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new wt.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new wt.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=a(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=o.current[d],p=s.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(_f,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=a(c,e.joint_position[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ht.Line,{ref:f=>{o.current[u]=f},name:jR,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{s.current[u]=f},name:DR,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const UR=console.warn;function LR(){return j.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&UR(e)}},[]),g.jsx(g.Fragment,{})}function FR(e){return e.type==="Mesh"}function $R({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=kR(ht.useGLTF(e),e.split("/").pop()||e),s=j.useCallback(i=>{i&&r&&r()},[e]);function a(i){return FR(i)?g.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):g.jsx("group",{name:i.name,position:i.position,rotation:i.rotation,ref:Mf(i)?t:void 0,children:i.children.map(a)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:s,children:a(o.scene)})}const NR=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Te.Mesh){r.material instanceof Te.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new Te.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Te.DoubleSide}),n.userData.isGhost=!0,o.material=new Te.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Te.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},zR=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Te.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Te.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},kf=Be(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Gl,flangeRef:o,postModelRender:s,transparentColor:a,...i})=>{const[l,c]=j.useState(null),u=j.useCallback(h=>{c(h)},[]);j.useEffect(()=>{l&&(a?NR(l,a):zR(l))},[l,a]);const d=g.jsx(BR,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(Zf.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(j.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(_f,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx($R,{modelURL:n(t),postModelRender:s,flangeRef:o,...i})})})}),g.jsx(LR,{})]})});function jf({connectedMotionGroup:e,getModel:t=Gl,flangeRef:r,transparentColor:n,postModelRender:o,...s}){return e.dhParameters?g.jsx(kf,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:o,...s}):null}const GR=Be(me.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:o=!1,onDriveToHomePress:s,onDriveToHomeRelease:a,connectedMotionGroup:i,robotComponent:l=jf,customContentComponent:c,className:u})=>{var M;const d=O.useTheme(),{t:h}=Ce.useTranslation(),[p,f]=j.useState(!1),m=j.useRef(null),y=j.useRef(null),[S,R]=j.useState(!1),[v,T]=j.useState({width:400,height:600}),[I,E]=j.useState(0);j.useEffect(()=>{const D=()=>{if(y.current){const{offsetWidth:Q,offsetHeight:oe}=y.current;R(Q>oe),T({width:Q,height:oe})}};D();const ne=new ResizeObserver(D);return y.current&&ne.observe(y.current),()=>{ne.disconnect()}},[]);const w=j.useCallback(()=>{E(D=>D+1)},[]),P=j.useCallback(()=>{!o||!s||(f(!0),s())},[o,s]),k=j.useCallback(()=>{!o||!a||(f(!1),a())},[o,a]),b=j.useCallback(()=>{p&&a&&(f(!1),a())},[p,a]),A=S?v.width<350:v.height<200,V=S?v.height<310:v.height<450;return g.jsx(O.Card,{ref:y,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((M=d.palette.backgroundPaperElevation)==null?void 0:M[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(O.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(O.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:A?"100%":"50%"},children:[g.jsxs(O.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(O.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(_i,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(O.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!V&&c&&g.jsxs(O.Box,{children:[g.jsx(c,{}),g.jsx(O.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(O.Box,{sx:{mt:!V&&c?"auto":0},children:g.jsx(O.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(O.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:b,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(O.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(O.Box,{children:[g.jsx(O.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(_i,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(O.Box,{sx:{flex:A?0:1,position:"relative",minHeight:A?0:{xs:120,sm:150,md:200},height:A?0:"auto",borderRadius:1,overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(O.Box,{children:[!V&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(O.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(O.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!V&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(O.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:b,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),HR=pr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),qR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),WR=j.forwardRef(qR);var Hl=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Hl||{});const Df=Be(me.observer(({setupState:e,className:t})=>{const r=O.useTheme(),{t:n}=Ce.useTranslation(),o=()=>{var c,u,d,h,p,f,m;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"CELL_OPEN":return{label:n("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"E_STOP":return{label:n("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:r.palette.error.main,backgroundColor:((p=r.palette.backgroundPaperElevation)==null?void 0:p[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"MANUAL_MODE":return{label:n("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:r.palette.error.main,backgroundColor:((f=r.palette.backgroundPaperElevation)==null?void 0:f[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((m=r.palette.backgroundPaperElevation)==null?void 0:m[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:s,indicatorColor:a,backgroundColor:i,textColor:l}=o();return g.jsx(O.Chip,{className:t,label:g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(O.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:a,flexShrink:0}}),g.jsx(O.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:s})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),JR=Be(me.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=Df,className:o})=>{var l;const s=O.useTheme(),a=t||"Robot",i=r===Hl.READY;return g.jsxs(O.Box,{className:o,sx:{border:`1px solid ${s.palette.divider}`,background:((l=s.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(O.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(O.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${s.palette.primary.main} !important`},"& svg path":{fill:`${s.palette.primary.main} !important`}},children:g.jsx(WR,{})}):g.jsx(HR,{sx:{color:s.palette.error.main,fontSize:24}}),g.jsx(O.Typography,{variant:"body1",sx:{fontWeight:500,color:s.palette.text.primary},children:e}),g.jsx(O.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:s.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(O.Typography,{variant:"body2",sx:{color:s.palette.text.secondary},children:a})]}),n&&g.jsx(n,{setupState:r})]})})),YR=Array(6).fill(2*Math.PI),ki={[kt.Abb]:[0,0,0,0,Math.PI/2,0,0],[kt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[kt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[kt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[kt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function Bf(e){const[t]=e.split("_");switch(t){case"ABB":return kt.Abb;case"FANUC":return kt.Fanuc;case"YASKAWA":return kt.Yaskawa;case"KUKA":return kt.Kuka;case"UniversalRobots":return kt.Universalrobots;default:return null}}function KR(e,t){const r=Bf(e);return r&&r in ki?ki[r]:t||null}const QR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),XR=j.forwardRef(QR),ZR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),eP=j.forwardRef(ZR),jt=me.observer(({id:e,icon:t,color:r,title:n,name:o,label:s,explanation:a,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=me.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxs(g.Fragment,{children:[g.jsxs(O.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(O.SvgIcon,{component:t,sx:{color:r}}),s&&g.jsx("div",{style:{color:r},children:s})]}),g.jsx(O.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(O.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(O.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(O.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),g.jsx(O.Typography,{fontSize:"14px",children:a}),i&&g.jsx(O.Typography,{fontSize:"12px",children:i})]})})]})}),tP=me.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:o})=>{const s=O.useTheme(),{t:a}=Ce.useTranslation();return e?g.jsx(jt,{id:"motion-group-virtual",icon:eP,color:s.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:o?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(jt,{id:"motion-group-physical",icon:XR,color:s.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:o?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),rP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),nP=j.forwardRef(rP),oP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),sP=j.forwardRef(oP),aP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),iP=j.forwardRef(aP),lP=me.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=O.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(jt,{id:"operation-mode-auto",icon:nP,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(jt,{id:"operation-mode-manual",icon:iP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(jt,{id:"operation-mode-error",icon:sP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),cP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),uP=j.forwardRef(cP),dP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),hP=j.forwardRef(dP),pP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),fP=j.forwardRef(pP),mP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),gP=j.forwardRef(mP),yP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),bP=j.forwardRef(yP),xP=me.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=O.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(jt,{id:"safety-state-normal",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:gP,color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(jt,{id:"safety-state-estop",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:hP,color:s.palette.error.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(jt,{id:"safety-state-stop",icon:bP,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(jt,{id:"safety-state-manual-action-required",icon:fP,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(jt,{id:"safety-state-error",icon:uP,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:y2(e,`Unknown safety state ${e}`)}}),SP=Be(me.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a=!0})=>{const i=a?1:2;return g.jsxs(O.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(xP,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(O.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(lP,{operationMode:r,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(O.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(tP,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:a})]})})),vP=O.styled(O.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),CP=e=>{const{ref:t,...r}=e;return g.jsx(vP,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function wP(e){const{children:t,value:r,index:n,...o}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...o,children:r===n&&g.jsx(O.Box,{children:t})})}function OP({children:e,...t}){const{fullWidth:r,indicator:n,onChange:o,orientation:s,scrollButtons:a,selectionFollowsFocus:i,textColor:l,value:c,variant:u,...d}=t;return g.jsx(O.Box,{...d,children:e})}const TP=Be(me.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:o,sx:s,ref:a}=e,i=r!==void 0,[l,c]=j.useState(n),u=i?r:l;j.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const d=(h,p)=>{i||c(p),o==null||o(p)};return g.jsxs(O.Box,{ref:a,sx:{height:"100%",display:"flex",flexDirection:"column",...s},children:[g.jsx(O.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsx(O.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,p)=>{var T,I,E;const f=()=>{if(!h.badge)return;const w=h.badge.content,P=h.badge.max;return typeof w=="number"&&P&&w>P?`${P}+`:w},m=()=>{if(!h.badge)return!1;const w=h.badge.content,P=h.badge.showZero;return!(w===0&&!P)},y=f(),S=m(),R=()=>{i||c(p),o==null||o(p)},v=g.jsx(O.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:R,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return S?g.jsx(OP,{component:"span",sx:{display:"inline-flex"},children:g.jsx(O.Badge,{badgeContent:y,color:((T=h.badge)==null?void 0:T.color)||"error",max:(I=h.badge)==null?void 0:I.max,showZero:(E=h.badge)==null?void 0:E.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:v})},h.id):v})})}),g.jsx(O.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsx(O.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(wP,{value:u,index:p,children:h.content},h.id))})]})})),EP={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print|and|or|not)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},IP=j.lazy(()=>import("@monaco-editor/react"));let ti=null;async function AP(){if(!ti){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);ti={shiki:await e({langs:[EP],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return ti}const RP=Be(e=>{const t=O.useTheme(),[r,n]=j.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await AP();l(i,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return g.jsx(j.Suspense,{fallback:g.jsx(Bl,{}),children:g.jsx(IP,{value:e.code,onMount:(a,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Uf(){var t,r,n,o,s,a,i;const e=O.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:a.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":O.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function PP(){const e=Uf();return e.palette.mode="light",e}function MP(e){var n,o,s,a;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((a=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?Uf():PP();return nh(r,e)}exports.AppHeader=gm;exports.CollisionSceneRenderer=im;exports.CycleTimer=kC;exports.JoggingCartesianAxisControl=xi;exports.JoggingJointRotationControl=Pp;exports.JoggingPanel=vR;exports.JoggingStore=da;exports.LoadingCover=Bl;exports.LoadingErrorMessage=nf;exports.LogPanel=RR;exports.LogStore=Rf;exports.LogViewer=Pf;exports.MANUFACTURER_HOME_CONFIGS=ki;exports.NoMotionGroupModal=MR;exports.PoseCartesianValues=wR;exports.PoseJointValues=OR;exports.PresetEnvironment=ri;exports.ProgramControl=VR;exports.ProgramState=dt;exports.ProgramStateIndicator=_i;exports.Robot=jf;exports.RobotCard=GR;exports.RobotListItem=JR;exports.RobotSetupReadinessIndicator=Df;exports.RobotSetupReadinessState=Hl;exports.SafetyBar=SP;exports.SafetyZonesRenderer=um;exports.SelectableFab=CP;exports.SupportedRobot=kf;exports.TabBar=TP;exports.Timer=FC;exports.TrajectoryRenderer=dm;exports.ValueInterpolator=Al;exports.VelocitySlider=Ef;exports.VelocitySliderLabel=zl;exports.WandelbotsDataGrid=Tp;exports.WandelscriptEditor=RP;exports.createDebugMessage=TR;exports.createErrorMessage=AR;exports.createInfoMessage=ER;exports.createLogMessage=po;exports.createNovaMuiTheme=MP;exports.createWarningMessage=IR;exports.defaultAxisConfig=YR;exports.defaultGetModel=Gl;exports.extractManufacturer=Bf;exports.getDefaultHomeConfig=KR;exports.i18n=Di;exports.useAnimationFrame=ea;exports.useAutorun=Ep;exports.useInterpolation=Rl;exports.useMounted=Zs;exports.useReaction=Ip;
153
153
  //# sourceMappingURL=index.cjs.map