@wandelbots/wandelbots-js-react-components 2.34.1-pr.feature-robot-precondition-list.372.2f4c672 → 2.34.1-pr.feature-robot-precondition-list.372.de237f9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CycleTimer.d.ts.map +1 -1
- package/dist/index.cjs +47 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1055 -1008
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CycleTimer.tsx +62 -21
- package/src/i18n/locales/de/translations.json +1 -0
- package/src/i18n/locales/en/translations.json +1 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var cg=Object.create;var Qs=Object.defineProperty;var ug=Object.getOwnPropertyDescriptor;var dg=Object.getOwnPropertyNames;var hg=Object.getPrototypeOf,pg=Object.prototype.hasOwnProperty;var mg=(e,t,r)=>t in e?Qs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let
|
|
1
|
+
"use strict";var cg=Object.create;var Qs=Object.defineProperty;var ug=Object.getOwnPropertyDescriptor;var dg=Object.getOwnPropertyNames;var hg=Object.getPrototypeOf,pg=Object.prototype.hasOwnProperty;var mg=(e,t,r)=>t in e?Qs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of dg(t))!pg.call(e,o)&&o!==r&&Qs(e,o,{get:()=>t[o],enumerable:!(n=ug(t,o))||n.enumerable});return e};var Xs=(e,t,r)=>(r=e!=null?cg(hg(e)):{},fg(t||!e||!e.__esModule?Qs(r,"default",{value:e,enumerable:!0}):r,e));var $n=(e,t,r)=>mg(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react"),st=require("@react-three/drei"),Ra=require("@react-three/fiber"),Ot=require("three"),gg=require("three-stdlib"),P=require("@mui/material"),Oe=require("mobx-react-lite"),_e=require("react-i18next"),yg=require("i18next"),bg=require("i18next-browser-languagedetector"),x=require("prop-types"),xg=require("@emotion/react"),vg=require("@emotion/styled"),vt=require("@mui/x-data-grid"),$e=require("mobx"),Al=require("lodash-es"),Cr=require("@wandelbots/nova-js"),Ft=require("@mui/icons-material"),Sg=require("react-error-boundary");function Dh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const F=Dh(J),Be=Dh(Ot);function Og(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Go={exports:{}},Un={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var jc;function wg(){if(jc)return Un;jc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a
|
|
9
|
+
*/var jc;function wg(){if(jc)return Un;jc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,a){var s=null;if(a!==void 0&&(s=""+a),o.key!==void 0&&(s=""+o.key),"key"in o){a={};for(var i in o)i!=="key"&&(a[i]=o[i])}else a=o;return o=a.ref,{$$typeof:e,type:n,key:s,ref:o!==void 0?o:null,props:a}}return Un.Fragment=t,Un.jsx=r,Un.jsxs=r,Un}var Dn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var kc;function Cg(){return kc||(kc=1,process.env.NODE_ENV!=="production"&&function(){function e(H){if(H==null)return null;if(typeof H=="function")return H.$$typeof===y?null:H.displayName||H.name||null;if(typeof H=="string")return H;switch(H){case m:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case A:return"Suspense";case C:return"SuspenseList";case j:return"Activity"}if(typeof H=="object")switch(typeof H.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),H.$$typeof){case f:return"Portal";case O:return(H.displayName||"Context")+".Provider";case E:return(H._context.displayName||"Context")+".Consumer";case w:var X=H.render;return H=H.displayName,H||(H=X.displayName||X.name||"",H=H!==""?"ForwardRef("+H+")":"ForwardRef"),H;case T:return X=H.displayName||null,X!==null?X:e(H.type)||"Memo";case V:X=H._payload,H=H._init;try{return e(H(X))}catch{}}return null}function t(H){return""+H}function r(H){try{t(H);var X=!1}catch{X=!0}if(X){X=console;var le=X.error,xe=typeof Symbol=="function"&&Symbol.toStringTag&&H[Symbol.toStringTag]||H.constructor.name||"Object";return le.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",xe),t(H)}}function n(H){if(H===m)return"<>";if(typeof H=="object"&&H!==null&&H.$$typeof===V)return"<...>";try{var X=e(H);return X?"<"+X+">":"<...>"}catch{return"<...>"}}function
|
|
17
|
+
*/var kc;function Cg(){return kc||(kc=1,process.env.NODE_ENV!=="production"&&function(){function e(H){if(H==null)return null;if(typeof H=="function")return H.$$typeof===y?null:H.displayName||H.name||null;if(typeof H=="string")return H;switch(H){case m:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case A:return"Suspense";case C:return"SuspenseList";case j:return"Activity"}if(typeof H=="object")switch(typeof H.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),H.$$typeof){case f:return"Portal";case O:return(H.displayName||"Context")+".Provider";case E:return(H._context.displayName||"Context")+".Consumer";case w:var X=H.render;return H=H.displayName,H||(H=X.displayName||X.name||"",H=H!==""?"ForwardRef("+H+")":"ForwardRef"),H;case T:return X=H.displayName||null,X!==null?X:e(H.type)||"Memo";case V:X=H._payload,H=H._init;try{return e(H(X))}catch{}}return null}function t(H){return""+H}function r(H){try{t(H);var X=!1}catch{X=!0}if(X){X=console;var le=X.error,xe=typeof Symbol=="function"&&Symbol.toStringTag&&H[Symbol.toStringTag]||H.constructor.name||"Object";return le.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",xe),t(H)}}function n(H){if(H===m)return"<>";if(typeof H=="object"&&H!==null&&H.$$typeof===V)return"<...>";try{var X=e(H);return X?"<"+X+">":"<...>"}catch{return"<...>"}}function o(){var H=R.A;return H===null?null:H.getOwner()}function a(){return Error("react-stack-top-frame")}function s(H){if(z.call(H,"key")){var X=Object.getOwnPropertyDescriptor(H,"key").get;if(X&&X.isReactWarning)return!1}return H.key!==void 0}function i(H,X){function le(){oe||(oe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",X))}le.isReactWarning=!0,Object.defineProperty(H,"key",{get:le,configurable:!0})}function l(){var H=e(this.type);return re[H]||(re[H]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),H=this.props.ref,H!==void 0?H:null}function c(H,X,le,xe,Le,ae,be,Se){return le=ae.ref,H={$$typeof:p,type:H,key:X,props:ae,_owner:Le},(le!==void 0?le:null)!==null?Object.defineProperty(H,"ref",{enumerable:!1,get:l}):Object.defineProperty(H,"ref",{enumerable:!1,value:null}),H._store={},Object.defineProperty(H._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(H,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(H,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:be}),Object.defineProperty(H,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Se}),Object.freeze&&(Object.freeze(H.props),Object.freeze(H)),H}function u(H,X,le,xe,Le,ae,be,Se){var me=X.children;if(me!==void 0)if(xe)if(I(me)){for(xe=0;xe<me.length;xe++)d(me[xe]);Object.freeze&&Object.freeze(me)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(me);if(z.call(X,"key")){me=e(H);var Z=Object.keys(X).filter(function(de){return de!=="key"});xe=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",se[me+xe]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,xe,me,Z,me),se[me+xe]=!0)}if(me=null,le!==void 0&&(r(le),me=""+le),s(X)&&(r(X.key),me=""+X.key),"key"in X){le={};for(var ie in X)ie!=="key"&&(le[ie]=X[ie])}else le=X;return me&&i(le,typeof H=="function"?H.displayName||H.name||"Unknown":H),c(H,me,
|
|
23
|
-
Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","CycleTimer.RemainingTime.lb":"Verbleibende Zeit","CycleTimer.OfTime.lb":"von {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Error.lb":"Fehler","ProgramStateIndicator.EStop.lb":"Not-Aus","ProgramStateIndicator.Idle.lb":"Leerlauf","ProgramStateIndicator.Paused.lb":"Pausiert","ProgramStateIndicator.Ready.lb":"Bereit","ProgramStateIndicator.Stopped.lb":"Gestoppt","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manuell","ProgramStateIndicator.ManualT1.lb":"Manuell T1","ProgramStateIndicator.ManualT2.lb":"Manuell T2","RobotSetupReadinessIndicator.Ready.lb":"Bereit","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Roboter getrennt","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},Ig={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"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.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","CycleTimer.RemainingTime.lb":"Time remaining","CycleTimer.OfTime.lb":"of {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Error.lb":"Error","ProgramStateIndicator.EStop.lb":"E-Stop","ProgramStateIndicator.Idle.lb":"Idle","ProgramStateIndicator.Paused.lb":"Paused","ProgramStateIndicator.Ready.lb":"Ready","ProgramStateIndicator.Stopped.lb":"Stopped","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manual","ProgramStateIndicator.ManualT1.lb":"Manual T1","ProgramStateIndicator.ManualT2.lb":"Manual T2","RobotSetupReadinessIndicator.Ready.lb":"Ready","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Robot disconnected","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},_l=yg.createInstance();_l.use(bg).init({supportedLngs:["en","de"],resources:{en:{translations:Ig},de:{translations:Eg}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Xe(e){return r=>g.jsx(Vg,{children:g.jsx(e,{...r})})}const Vg=({children:e})=>g.jsx(_e.I18nextProvider,{i18n:_l,children:e}),Mg=e=>g.jsx(P.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),jg=Xe(Oe.observer(e=>{const{appIcon:t,appName:r,apps:n=[],onAppSelect:a,sx:o}=e,[s,i]=J.useState(null),l=!!s,c=h=>{i(h.currentTarget)},u=()=>{i(null)},d=h=>{u(),h.onClick?h.onClick():h.href&&(window.location.href=h.href),a==null||a(h)};return g.jsxs(g.Fragment,{children:[g.jsx(P.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...o},children:g.jsxs(P.Toolbar,{sx:{minHeight:"64px !important"},children:[g.jsx(P.Box,{sx:{mr:2,display:"flex",alignItems:"center"},children:t}),g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(P.Typography,{variant:"h6",component:"div",sx:{fontWeight:700,fontSize:"20px",lineHeight:"24px",letterSpacing:0},children:r}),n.length>0&&g.jsx(P.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:c,sx:{ml:2,width:30,height:30,borderRadius:"8px",padding:"5px",backgroundColor:h=>P.alpha(h.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:h=>P.alpha(h.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"10px",width:"10px",height:"8px"}},children:g.jsx(Mg,{})})]})]})}),g.jsx(P.Backdrop,{open:l,onClick:u,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:h=>h.zIndex.modal-1}}),g.jsx(P.Menu,{id:"app-menu",anchorEl:s,open:l,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:h=>h.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(h=>g.jsxs(P.MenuItem,{onClick:()=>d(h),sx:{display:"flex",alignItems:"center",gap:2,py:1.5,px:2},children:[g.jsx(P.Box,{sx:{display:"flex",alignItems:"center"},children:h.icon}),g.jsx(P.Typography,{variant:"body1",children:h.name})]},h.id))})]})}));function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K.apply(null,arguments)}function cr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function es(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let s="",i=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(s+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(s+=" "+r[c]))}n[a]=s}return n}function Lh(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Lh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Pt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Lh(e))&&(n&&(n+=" "),n+=t);return n}function ur(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}const Bh="$$material";function kg(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var $g={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ug(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Dg=/[A-Z]|^ms/g,Lg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Nh=function(t){return t.charCodeAt(1)===45},Uc=function(t){return t!=null&&typeof t!="boolean"},Zs=Ug(function(e){return Nh(e)?e:e.replace(Dg,"-$&").toLowerCase()}),Dc=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Lg,function(n,a,o){return ir={name:a,styles:o,next:ir},a})}return $g[t]!==1&&!Nh(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ao(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return ir={name:a.name,styles:a.styles,next:ir},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)ir={name:s.name,styles:s.styles,next:ir},s=s.next;var i=o.styles+";";return i}return Bg(e,t,r)}}var l=r;return l}function Bg(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=Ao(e,t,r[a])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var i=s;Uc(i)&&(n+=Zs(o)+":"+Dc(o,i)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Uc(s[l])&&(n+=Zs(o)+":"+Dc(o,s[l])+";");else{var c=Ao(e,t,s);switch(o){case"animation":case"animationName":{n+=Zs(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var Lc=/label:\s*([^\s;{]+)\s*(;|$)/g,ir;function Ng(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";ir=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=Ao(r,t,o);else{var s=o;a+=s[0]}for(var i=1;i<e.length;i++)if(a+=Ao(r,t,e[i]),n){var l=o;a+=l[i]}Lc.lastIndex=0;for(var c="",u;(u=Lc.exec(a))!==null;)c+="-"+u[1];var d=kg(a)+c;return{name:d,styles:a,next:ir}}/**
|
|
22
|
+
<%s key={someKey} {...props} />`,xe,me,Z,me),se[me+xe]=!0)}if(me=null,le!==void 0&&(r(le),me=""+le),s(X)&&(r(X.key),me=""+X.key),"key"in X){le={};for(var ie in X)ie!=="key"&&(le[ie]=X[ie])}else le=X;return me&&i(le,typeof H=="function"?H.displayName||H.name||"Unknown":H),c(H,me,ae,Le,o(),le,be,Se)}function d(H){typeof H=="object"&&H!==null&&H.$$typeof===p&&H._store&&(H._store.validated=1)}var h=J,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),y=Symbol.for("react.client.reference"),R=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,I=Array.isArray,G=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(H){return H()}};var oe,re={},te=h["react-stack-bottom-frame"].bind(h,a)(),ee=G(n(a)),se={};Dn.Fragment=m,Dn.jsx=function(H,X,le,xe,Le){var ae=1e4>R.recentlyCreatedOwnerStacks++;return u(H,X,le,!1,xe,Le,ae?Error("react-stack-top-frame"):te,ae?G(n(H)):ee)},Dn.jsxs=function(H,X,le,xe,Le){var ae=1e4>R.recentlyCreatedOwnerStacks++;return u(H,X,le,!0,xe,Le,ae?Error("react-stack-top-frame"):te,ae?G(n(H)):ee)}}()),Dn}var $c;function Pg(){return $c||($c=1,process.env.NODE_ENV==="production"?Go.exports=wg():Go.exports=Cg()),Go.exports}var g=Pg();function Ni(){return g.jsx(st.Environment,{children:g.jsx(Tg,{})})}function Tg({positions:e=[2,0,2,0,2,0,2,0]}){return g.jsxs(g.Fragment,{children:[g.jsx(st.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),g.jsx("group",{rotation:[0,.5,0],children:g.jsx("group",{children:e.map((t,r)=>g.jsx(st.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),g.jsx(st.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),g.jsx(st.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),g.jsx(st.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),g.jsx(st.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),g.jsx(st.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function Rg(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new Be.Vector3(e[0].x,e[0].y,e[0].z),r=new Be.Vector3(e[1].x,e[1].y,e[1].z),n=new Be.Vector3(e[2].x,e[2].y,e[2].z),o=new Be.Vector3().subVectors(r,t),a=new Be.Vector3().subVectors(n,t),s=new Be.Vector3().crossVectors(o,a).normalize();for(let i=3;i<e.length;i++){const l=new Be.Vector3(e[i].x,e[i].y,e[i].z),c=new Be.Vector3().subVectors(l,t),u=s.dot(c);if(Math.abs(u)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:s}}function Ag({safetyZones:e,...t}){return g.jsx("group",{...t,children:e.map((r,n)=>{let o=[];return r.geometry&&(r.geometry.compound?o=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(o=[r.geometry])),o.map((a,s)=>{if(!a.convex_hull)return null;const i=a.convex_hull.vertices.map(u=>new Be.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=Rg(i);if(l.isCoplanar&&l.normal){const d=new Be.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new gg.ConvexGeometry(i)}catch(u){return console.log("Error creating ConvexGeometry:",u),null}return g.jsx("mesh",{geometry:c,children:g.jsx("meshStandardMaterial",{attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-s},n)},`${n}-${s}`)})})})}function _g({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(o=>o.tcp_pose?new Be.Vector3(o.tcp_pose.position.x/1e3,o.tcp_pose.position.z/1e3,-o.tcp_pose.position.y/1e3):null).filter(o=>o!==null))||[];return g.jsx("group",{...t,children:r.length>0&&g.jsx(st.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const Eg={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Geschwindigkeit","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Cartesian.MotionType.lb":"Bewegungstyp","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Gelenkwerte","Jogging.Increment.Continuous.dd":"Fortlaufend","Jogging.Cartesian.Orientation.lb":"Orientierung","Jogging.JointLimitsReached.lb":"Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht","Jogging.Orientation.coordsys":"Roboterbasis","Jogging.Orientation.tool":"Werkzeug","SafetyBar.ActivationToggle.Activate.bt":"Aktivieren","SafetyBar.ActivationToggle.Activated.bt":"Aktiviert","SafetyBar.ActivationToggle.Activating.bt":"Wird aktiviert…","SafetyBar.ActivationToggle.Deactivating.bt":"Wird deaktiviert…","SafetyBar.ControllerType.Physical.lb":"Physisch","SafetyBar.ControllerType.Virtual.lb":"Virtuell","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.","SafetyBar.OperationMode.Automatic.ti":"Automatisch","SafetyBar.OperationMode.Error.Explanation.lb":"Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.","SafetyBar.OperationMode.Error.lb":"Fehler","SafetyBar.OperationMode.Manual.Explanation.lb":`Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
|
|
23
|
+
Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","CycleTimer.RemainingTime.lb":"Verbleibende Zeit","CycleTimer.OfTime.lb":"von {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","CycleTimer.Error.lb":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Error.lb":"Fehler","ProgramStateIndicator.EStop.lb":"Not-Aus","ProgramStateIndicator.Idle.lb":"Leerlauf","ProgramStateIndicator.Paused.lb":"Pausiert","ProgramStateIndicator.Ready.lb":"Bereit","ProgramStateIndicator.Stopped.lb":"Gestoppt","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manuell","ProgramStateIndicator.ManualT1.lb":"Manuell T1","ProgramStateIndicator.ManualT2.lb":"Manuell T2","RobotSetupReadinessIndicator.Ready.lb":"Bereit","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Roboter getrennt","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},Ig={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"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.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","CycleTimer.RemainingTime.lb":"Time remaining","CycleTimer.OfTime.lb":"of {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","CycleTimer.Error.lb":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Error.lb":"Error","ProgramStateIndicator.EStop.lb":"E-Stop","ProgramStateIndicator.Idle.lb":"Idle","ProgramStateIndicator.Paused.lb":"Paused","ProgramStateIndicator.Ready.lb":"Ready","ProgramStateIndicator.Stopped.lb":"Stopped","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manual","ProgramStateIndicator.ManualT1.lb":"Manual T1","ProgramStateIndicator.ManualT2.lb":"Manual T2","RobotSetupReadinessIndicator.Ready.lb":"Ready","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Robot disconnected","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},_l=yg.createInstance();_l.use(bg).init({supportedLngs:["en","de"],resources:{en:{translations:Ig},de:{translations:Eg}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Xe(e){return r=>g.jsx(Vg,{children:g.jsx(e,{...r})})}const Vg=({children:e})=>g.jsx(_e.I18nextProvider,{i18n:_l,children:e}),Mg=e=>g.jsx(P.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),jg=Xe(Oe.observer(e=>{const{appIcon:t,appName:r,apps:n=[],onAppSelect:o,sx:a}=e,[s,i]=J.useState(null),l=!!s,c=h=>{i(h.currentTarget)},u=()=>{i(null)},d=h=>{u(),h.onClick?h.onClick():h.href&&(window.location.href=h.href),o==null||o(h)};return g.jsxs(g.Fragment,{children:[g.jsx(P.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...a},children:g.jsxs(P.Toolbar,{sx:{minHeight:"64px !important"},children:[g.jsx(P.Box,{sx:{mr:2,display:"flex",alignItems:"center"},children:t}),g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(P.Typography,{variant:"h6",component:"div",sx:{fontWeight:700,fontSize:"20px",lineHeight:"24px",letterSpacing:0},children:r}),n.length>0&&g.jsx(P.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:c,sx:{ml:2,width:30,height:30,borderRadius:"8px",padding:"5px",backgroundColor:h=>P.alpha(h.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:h=>P.alpha(h.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"10px",width:"10px",height:"8px"}},children:g.jsx(Mg,{})})]})]})}),g.jsx(P.Backdrop,{open:l,onClick:u,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:h=>h.zIndex.modal-1}}),g.jsx(P.Menu,{id:"app-menu",anchorEl:s,open:l,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:h=>h.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(h=>g.jsxs(P.MenuItem,{onClick:()=>d(h),sx:{display:"flex",alignItems:"center",gap:2,py:1.5,px:2},children:[g.jsx(P.Box,{sx:{display:"flex",alignItems:"center"},children:h.icon}),g.jsx(P.Typography,{variant:"body1",children:h.name})]},h.id))})]})}));function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K.apply(null,arguments)}function cr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function es(e,t,r=void 0){const n={};for(const o in e){const a=e[o];let s="",i=!0;for(let l=0;l<a.length;l+=1){const c=a[l];c&&(s+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(s+=" "+r[c]))}n[o]=s}return n}function Lh(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Lh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Pt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Lh(e))&&(n&&(n+=" "),n+=t);return n}function ur(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}const Bh="$$material";function kg(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var $g={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ug(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Dg=/[A-Z]|^ms/g,Lg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Nh=function(t){return t.charCodeAt(1)===45},Uc=function(t){return t!=null&&typeof t!="boolean"},Zs=Ug(function(e){return Nh(e)?e:e.replace(Dg,"-$&").toLowerCase()}),Dc=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Lg,function(n,o,a){return ir={name:o,styles:a,next:ir},o})}return $g[t]!==1&&!Nh(t)&&typeof r=="number"&&r!==0?r+"px":r};function Aa(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return ir={name:o.name,styles:o.styles,next:ir},o.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)ir={name:s.name,styles:s.styles,next:ir},s=s.next;var i=a.styles+";";return i}return Bg(e,t,r)}}var l=r;return l}function Bg(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Aa(e,t,r[o])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var i=s;Uc(i)&&(n+=Zs(a)+":"+Dc(a,i)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Uc(s[l])&&(n+=Zs(a)+":"+Dc(a,s[l])+";");else{var c=Aa(e,t,s);switch(a){case"animation":case"animationName":{n+=Zs(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var Lc=/label:\s*([^\s;{]+)\s*(;|$)/g,ir;function Ng(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";ir=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,o+=Aa(r,t,a);else{var s=a;o+=s[0]}for(var i=1;i<e.length;i++)if(o+=Aa(r,t,e[i]),n){var l=a;o+=l[i]}Lc.lastIndex=0;for(var c="",u;(u=Lc.exec(o))!==null;)c+="-"+u[1];var d=kg(o)+c;return{name:d,styles:o,next:ir}}/**
|
|
24
24
|
* @mui/styled-engine v7.1.1
|
|
25
25
|
*
|
|
26
26
|
* @license MIT
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/function Fg(e,t){const r=vg(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const
|
|
30
|
-
`)):n.some(
|
|
29
|
+
*/function Fg(e,t){const r=vg(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
30
|
+
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function zg(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Bc=[];function Nc(e){return Bc[0]=e,Ng(Bc)}var Ho={exports:{}},Ce={};/**
|
|
31
31
|
* @license React
|
|
32
32
|
* react-is.production.js
|
|
33
33
|
*
|
|
@@ -35,7 +35,7 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var Fc;function Gg(){if(Fc)return Ce;Fc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),
|
|
38
|
+
*/var Fc;function Gg(){if(Fc)return Ce;Fc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function f(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case r:case o:case n:case l:case c:case h:return m;default:switch(m=m&&m.$$typeof,m){case s:case i:case d:case u:return m;case a:return m;default:return b}}case t:return b}}}return Ce.ContextConsumer=a,Ce.ContextProvider=s,Ce.Element=e,Ce.ForwardRef=i,Ce.Fragment=r,Ce.Lazy=d,Ce.Memo=u,Ce.Portal=t,Ce.Profiler=o,Ce.StrictMode=n,Ce.Suspense=l,Ce.SuspenseList=c,Ce.isContextConsumer=function(m){return f(m)===a},Ce.isContextProvider=function(m){return f(m)===s},Ce.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Ce.isForwardRef=function(m){return f(m)===i},Ce.isFragment=function(m){return f(m)===r},Ce.isLazy=function(m){return f(m)===d},Ce.isMemo=function(m){return f(m)===u},Ce.isPortal=function(m){return f(m)===t},Ce.isProfiler=function(m){return f(m)===o},Ce.isStrictMode=function(m){return f(m)===n},Ce.isSuspense=function(m){return f(m)===l},Ce.isSuspenseList=function(m){return f(m)===c},Ce.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===n||m===l||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===s||m.$$typeof===a||m.$$typeof===i||m.$$typeof===p||m.getModuleId!==void 0)},Ce.typeOf=f,Ce}var Pe={};/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-is.development.js
|
|
41
41
|
*
|
|
@@ -43,13 +43,13 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var zc;function Hg(){return zc||(zc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case
|
|
47
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ur(18,`(${t})`));return null}const[,n,
|
|
46
|
+
*/var zc;function Hg(){return zc||(zc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case a:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case i:case l:case h:case d:return m;case s:return m;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");Pe.ContextConsumer=s,Pe.ContextProvider=i,Pe.Element=t,Pe.ForwardRef=l,Pe.Fragment=n,Pe.Lazy=h,Pe.Memo=d,Pe.Portal=r,Pe.Profiler=a,Pe.StrictMode=o,Pe.Suspense=c,Pe.SuspenseList=u,Pe.isContextConsumer=function(m){return e(m)===s},Pe.isContextProvider=function(m){return e(m)===i},Pe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Pe.isForwardRef=function(m){return e(m)===l},Pe.isFragment=function(m){return e(m)===n},Pe.isLazy=function(m){return e(m)===h},Pe.isMemo=function(m){return e(m)===d},Pe.isPortal=function(m){return e(m)===r},Pe.isProfiler=function(m){return e(m)===a},Pe.isStrictMode=function(m){return e(m)===o},Pe.isSuspense=function(m){return e(m)===c},Pe.isSuspenseList=function(m){return e(m)===u},Pe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===a||m===o||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===i||m.$$typeof===s||m.$$typeof===l||m.$$typeof===f||m.getModuleId!==void 0)},Pe.typeOf=e}()),Pe}var Gc;function qg(){return Gc||(Gc=1,process.env.NODE_ENV==="production"?Ho.exports=Gg():Ho.exports=Hg()),Ho.exports}var _a=qg();function Vt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Fh(e){if(F.isValidElement(e)||_a.isValidElementType(e)||!Vt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Fh(e[r])}),t}function nt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Vt(e)&&Vt(t)&&Object.keys(t).forEach(o=>{F.isValidElement(t[o])||_a.isValidElementType(t[o])?n[o]=t[o]:Vt(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Vt(e[o])?n[o]=nt(e[o],t[o],r):r.clone?n[o]=Vt(t[o])?Fh(t[o]):t[o]:n[o]=t[o]}),n}const Wg=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Jg(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,a=Wg(t),s=Object.keys(a);function i(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function c(h,p){const f=s.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(f!==-1&&typeof t[s[f]]=="number"?t[s[f]]:p)-n/100}${r})`}function u(h){return s.indexOf(h)+1<s.length?c(h,s[s.indexOf(h)+1]):i(h)}function d(h){const p=s.indexOf(h);return p===0?i(s[1]):p===s.length-1?l(s[p]):c(h,s[s.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:i,down:l,between:c,only:u,not:d,unit:r,...o}}function Yg(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{var s,i;const a=/min-width:\s*([0-9.]+)/;return+(((s=n.match(a))==null?void 0:s[1])||0)-+(((i=o.match(a))==null?void 0:i[1])||0)});return r.length?r.reduce((n,o)=>{const a=t[o];return delete n[o],n[o]=a,n},{...t}):t}function Kg(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Qg(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
47
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ur(18,`(${t})`));return null}const[,n,o]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(a)}function Xg(e){const t=(a,s)=>a.replace("@media",s?`@container ${s}`:"@container");function r(a,s){a.up=(...i)=>t(e.breakpoints.up(...i),s),a.down=(...i)=>t(e.breakpoints.down(...i),s),a.between=(...i)=>t(e.breakpoints.between(...i),s),a.only=(...i)=>t(e.breakpoints.only(...i),s),a.not=(...i)=>{const l=t(e.breakpoints.not(...i),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},o=a=>(r(n,a),n);return r(o),{...e,containerQueries:o}}const Zg={borderRadius:4},pr=process.env.NODE_ENV!=="production"?x.oneOfType([x.number,x.string,x.object,x.array]):{};function oo(e,t){return t?nt(e,t,{clone:!1}):e}const ts={xs:0,sm:600,md:900,lg:1200,xl:1536},Hc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ts[e]}px)`},e0={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:ts[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Tt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||Hc;return t.reduce((s,i,l)=>(s[a.up(a.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const a=n.breakpoints||Hc;return Object.keys(t).reduce((s,i)=>{if(Kg(a.keys,i)){const l=Qg(n.containerQueries?n:e0,i);l&&(s[l]=r(t[i],i))}else if(Object.keys(a.values||ts).includes(i)){const l=a.up(i);s[l]=r(t[i],i)}else{const l=i;s[l]=t[l]}return s},{})}return r(t)}function zh(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const a=e.up(o);return n[a]={},n},{}))||{}}function Gh(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function t0(e,...t){const r=zh(e),n=[r,...t].reduce((o,a)=>nt(o,a),{});return Gh(Object.keys(r),n)}function r0(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,a)=>{a<e.length&&(r[o]=!0)}):n.forEach(o=>{e[o]!=null&&(r[o]=!0)}),r}function ei({values:e,breakpoints:t,base:r}){const n=r||r0(e,t),o=Object.keys(n);if(o.length===0)return e;let a;return o.reduce((s,i,l)=>(Array.isArray(e)?(s[i]=e[l]!=null?e[l]:e[a],a=l):typeof e=="object"?(s[i]=e[i]!=null?e[i]:e[a],a=i):s[i]=e,s),{})}function rt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ur(7));return e.charAt(0).toUpperCase()+e.slice(1)}function rs(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Ea(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=rs(e,r)||n,t&&(o=t(o,n,e)),o}function Ne(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,a=s=>{if(s[t]==null)return null;const i=s[t],l=s.theme,c=rs(l,n)||{};return Tt(s,i,d=>{let h=Ea(c,o,d);return d===h&&typeof d=="string"&&(h=Ea(c,o,`${t}${d==="default"?"":rt(d)}`,d)),r===!1?h:{[r]:h}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:pr}:{},a.filterProps=[t],a}function n0(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const o0={m:"margin",p:"padding"},a0={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},qc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},s0=n0(e=>{if(e.length>2)if(qc[e])e=qc[e];else return[e];const[t,r]=e.split(""),n=o0[t],o=a0[r]||"";return Array.isArray(o)?o.map(a=>n+a):[n+o]}),ns=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],os=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],i0=[...ns,...os];function To(e,t,r,n){const o=rs(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${a}.`),typeof o=="string"?o.startsWith("var(")&&a===0?0:o.startsWith("var(")&&a===1?o:`calc(${a} * ${o})`:o*a):Array.isArray(o)?a=>{if(typeof a=="string")return a;const s=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
48
48
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
49
|
-
`)));const i=
|
|
50
|
-
`)),()=>{})}function os(e){return Pa(e,"spacing",8,"spacing")}function Rr(e,t){return typeof t=="string"||t==null?t:e(t)}function l0(e,t){return r=>e.reduce((n,a)=>(n[a]=Rr(t,r),n),{})}function c0(e,t,r,n){if(!t.includes(r))return null;const a=s0(r),o=l0(a,n),s=e[r];return Tt(e,s,o)}function Hh(e,t){const r=os(e.theme);return Object.keys(e).map(n=>c0(e,t,n,r)).reduce(aa,{})}function Ue(e){return Hh(e,ns)}Ue.propTypes=process.env.NODE_ENV!=="production"?ns.reduce((e,t)=>(e[t]=pr,e),{}):{};Ue.filterProps=ns;function De(e){return Hh(e,as)}De.propTypes=process.env.NODE_ENV!=="production"?as.reduce((e,t)=>(e[t]=pr,e),{}):{};De.filterProps=as;process.env.NODE_ENV!=="production"&&i0.reduce((e,t)=>(e[t]=pr,e),{});function qh(e=8,t=os({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function ss(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?aa(a,t[o](n)):a,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,a)=>Object.assign(n,a.propTypes),{}):{},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function ft(e){return typeof e!="number"?e:`${e}px solid`}function xt(e,t){return Ne({prop:e,themeKey:"borders",transform:t})}const u0=xt("border",ft),d0=xt("borderTop",ft),h0=xt("borderRight",ft),p0=xt("borderBottom",ft),m0=xt("borderLeft",ft),f0=xt("borderColor"),g0=xt("borderTopColor"),y0=xt("borderRightColor"),b0=xt("borderBottomColor"),x0=xt("borderLeftColor"),v0=xt("outline",ft),S0=xt("outlineColor"),is=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Pa(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Rr(t,n)});return Tt(e,e.borderRadius,r)}return null};is.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:pr}:{};is.filterProps=["borderRadius"];ss(u0,d0,h0,p0,m0,f0,g0,y0,b0,x0,is,v0,S0);const ls=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Pa(e.theme,"spacing",8,"gap"),r=n=>({gap:Rr(t,n)});return Tt(e,e.gap,r)}return null};ls.propTypes=process.env.NODE_ENV!=="production"?{gap:pr}:{};ls.filterProps=["gap"];const cs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Pa(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Rr(t,n)});return Tt(e,e.columnGap,r)}return null};cs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:pr}:{};cs.filterProps=["columnGap"];const us=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Pa(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Rr(t,n)});return Tt(e,e.rowGap,r)}return null};us.propTypes=process.env.NODE_ENV!=="production"?{rowGap:pr}:{};us.filterProps=["rowGap"];const O0=Ne({prop:"gridColumn"}),w0=Ne({prop:"gridRow"}),C0=Ne({prop:"gridAutoFlow"}),P0=Ne({prop:"gridAutoColumns"}),T0=Ne({prop:"gridAutoRows"}),R0=Ne({prop:"gridTemplateColumns"}),A0=Ne({prop:"gridTemplateRows"}),_0=Ne({prop:"gridTemplateAreas"}),E0=Ne({prop:"gridArea"});ss(ls,cs,us,O0,w0,C0,P0,T0,R0,A0,_0,E0);function cn(e,t){return t==="grey"?t:e}const I0=Ne({prop:"color",themeKey:"palette",transform:cn}),V0=Ne({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:cn}),M0=Ne({prop:"backgroundColor",themeKey:"palette",transform:cn});ss(I0,V0,M0);function dt(e){return e<=1&&e!==0?`${e*100}%`:e}const j0=Ne({prop:"width",transform:dt}),El=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,o,s,i,l;const n=((s=(o=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:o.values)==null?void 0:s[r])||ts[r];return n?((l=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:dt(r)}};return Tt(e,e.maxWidth,t)}return null};El.filterProps=["maxWidth"];const k0=Ne({prop:"minWidth",transform:dt}),$0=Ne({prop:"height",transform:dt}),U0=Ne({prop:"maxHeight",transform:dt}),D0=Ne({prop:"minHeight",transform:dt});Ne({prop:"size",cssProperty:"width",transform:dt});Ne({prop:"size",cssProperty:"height",transform:dt});const L0=Ne({prop:"boxSizing"});ss(j0,El,k0,$0,U0,D0,L0);const Ta={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:is},color:{themeKey:"palette",transform:cn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:cn},backgroundColor:{themeKey:"palette",transform:cn},p:{style:De},pt:{style:De},pr:{style:De},pb:{style:De},pl:{style:De},px:{style:De},py:{style:De},padding:{style:De},paddingTop:{style:De},paddingRight:{style:De},paddingBottom:{style:De},paddingLeft:{style:De},paddingX:{style:De},paddingY:{style:De},paddingInline:{style:De},paddingInlineStart:{style:De},paddingInlineEnd:{style:De},paddingBlock:{style:De},paddingBlockStart:{style:De},paddingBlockEnd:{style:De},m:{style:Ue},mt:{style:Ue},mr:{style:Ue},mb:{style:Ue},ml:{style:Ue},mx:{style:Ue},my:{style:Ue},margin:{style:Ue},marginTop:{style:Ue},marginRight:{style:Ue},marginBottom:{style:Ue},marginLeft:{style:Ue},marginX:{style:Ue},marginY:{style:Ue},marginInline:{style:Ue},marginInlineStart:{style:Ue},marginInlineEnd:{style:Ue},marginBlock:{style:Ue},marginBlockStart:{style:Ue},marginBlockEnd:{style:Ue},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ls},rowGap:{style:us},columnGap:{style:cs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:dt},maxWidth:{style:El},minWidth:{transform:dt},height:{transform:dt},maxHeight:{transform:dt},minHeight:{transform:dt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function B0(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function N0(e,t){return typeof e=="function"?e(t):e}function F0(){function e(r,n,a,o){const s={[r]:n,theme:a},i=o[r];if(!i)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=i;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const h=rs(a,c)||{};return d?d(s):Tt(s,n,f=>{let m=Eo(h,u,f);return f===m&&typeof f=="string"&&(m=Eo(h,u,`${r}${f==="default"?"":rt(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:a={}}=r||{};if(!n)return null;const o=a.unstable_sxConfig??Ta;function s(i){let l=i;if(typeof i=="function")l=i(a);else if(typeof i!="object")return i;if(!l)return null;const c=zh(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=N0(l[h],a);if(p!=null)if(typeof p=="object")if(o[h])d=aa(d,e(h,p,a,o));else{const f=Tt({theme:a},p,m=>({[h]:m}));B0(f,p)?d[h]=t({sx:p,theme:a}):d=aa(d,f)}else d=aa(d,e(h,p,a,o))}),Yg(a,Gh(u,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const mn=F0();mn.filterProps=["sx"];function z0(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function ds(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,i=Jg(r),l=qh(a);let c=nt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Zg,...o}},s);return c=Xg(c),c.applyStyles=z0,c=t.reduce((u,d)=>nt(u,d),c),c.unstable_sxConfig={...Ta,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return mn({sx:d,theme:this})},c}function G0(e){return Object.keys(e).length===0}function H0(e=null){const t=F.useContext(xg.ThemeContext);return!t||G0(t)?e:t}const q0=ds();function W0(e=q0){return H0(e)}const J0=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Ta;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function Y0(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=J0(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...s)=>{const i=t(...s);return Vt(i)?{...n,...i}:n}:o={...n,...t},{...a,sx:o}}const Wc=e=>e,K0=()=>{let e=Wc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Wc}}},Q0=K0(),X0={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function wn(e,t,r="Mui"){const n=X0[t];return n?`${r}-${n}`:`${Q0.generate(e)}-${t}`}function Il(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=wn(e,a,r)}),n}function Wh(e,t=""){return e.displayName||e.name||t}function Jc(e,t,r){const n=Wh(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Z0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Wh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case _o.ForwardRef:return Jc(e,e.render,"ForwardRef");case _o.Memo:return Jc(e,e.type,"memo");default:return}}}function Jh(e){const{variants:t,...r}=e,n={variants:t,style:Nc(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Nc(a.style))}),n}const ey=ds();function ti(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function ty(e){return e?(t,r)=>r[e]:null}function ry(e,t,r){e.theme=oy(e.theme)?r:e.theme[t]||e.theme}function bo(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>bo(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:a,...o}=r;n=o}return Yh(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Yh(e,t,r=[]){var a;let n;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const i in s.props)if(e[i]!==s.props[i]&&((a=e.ownerState)==null?void 0:a[i])!==s.props[i])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function Kh(e={}){const{themeId:t,defaultTheme:r=ey,rootShouldForwardProp:n=ti,slotShouldForwardProp:a=ti}=e;function o(i){ry(i,t,r)}return(i,l={})=>{zg(i,A=>A.filter(C=>C!==mn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=ty(Qh(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,b=h||!1;let S=ti;u==="Root"||u==="root"?S=n:u?S=a:sy(i)&&(S=void 0);const E=Fg(i,{shouldForwardProp:S,label:ay(c,u),...f}),O=A=>{if(A.__emotion_real===A)return A;if(typeof A=="function")return function(T){return bo(T,A)};if(Vt(A)){const C=Jh(A);return C.variants?function(V){return bo(V,C)}:C.style}return A},w=(...A)=>{const C=[],T=A.map(O),V=[];if(C.push(o),c&&p&&V.push(function(z){var re,te;const G=(te=(re=z.theme.components)==null?void 0:re[c])==null?void 0:te.styleOverrides;if(!G)return null;const ae={};for(const ee in G)ae[ee]=bo(z,G[ee]);return p(z,ae)}),c&&!m&&V.push(function(z){var ae,re;const I=z.theme,G=(re=(ae=I==null?void 0:I.components)==null?void 0:ae[c])==null?void 0:re.variants;return G?Yh(z,G):null}),b||V.push(mn),Array.isArray(T[0])){const R=T.shift(),z=new Array(C.length).fill(""),I=new Array(V.length).fill("");let G;G=[...z,...R,...I],G.raw=[...z,...R.raw,...I],C.unshift(G)}const j=[...C,...T,...V],y=E(...j);return i.muiName&&(y.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(y.displayName=ny(c,u,i)),y};return E.withConfig&&(w.withConfig=E.withConfig),w}}function ny(e,t,r){return e?`${e}${rt(t||"")}`:`Styled(${Z0(r)})`}function ay(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Qh(t||"Root")}`),r}function oy(e){for(const t in e)return!1;return!0}function sy(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Qh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const iy=Kh();function Io(e,t,r=!1){const n={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const o=a;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],i=t[o];if(!i)n[o]=s||{};else if(!s)n[o]=i;else{n[o]={...i};for(const l in s)if(Object.prototype.hasOwnProperty.call(s,l)){const c=l;n[o][c]=Io(s[c],i[c],r)}}}else o==="className"&&r&&t.className?n.className=Pt(e==null?void 0:e.className,t==null?void 0:t.className):o==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[o]===void 0&&(n[o]=e[o])}return n}function ly(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Io(t.components[r].defaultProps,n)}function Xh({props:e,name:t,defaultTheme:r,themeId:n}){let a=W0(r);return n&&(a=a[n]||a),ly({theme:a,name:t,props:e})}const $t=typeof window<"u"?F.useLayoutEffect:F.useEffect;function on(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Vl(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),on(e,t,r)}function cy(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function dr(e){if(e.type)return e;if(e.charAt(0)==="#")return dr(cy(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
51
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ur(9,e));let n=e.substring(t+1,e.length-1),
|
|
52
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ur(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const uy=e=>{const t=dr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},ea=(e,t)=>{try{return uy(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function hs(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Zh(e){e=dr(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(c,u=(c+r/30)%12)=>a-o*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),hs({type:i,values:l})}function Fi(e){e=dr(e);let t=e.type==="hsl"||e.type==="hsla"?dr(Zh(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Yc(e,t){const r=Fi(e),n=Fi(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function zi(e,t){return e=dr(e),t=Vl(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,hs(e)}function Ha(e,t,r){try{return zi(e,t)}catch{return e}}function ca(e,t){if(e=dr(e),t=Vl(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return hs(e)}function Re(e,t,r){try{return ca(e,t)}catch{return e}}function ua(e,t){if(e=dr(e),t=Vl(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return hs(e)}function Ae(e,t,r){try{return ua(e,t)}catch{return e}}function dy(e,t=.15){return Fi(e)>.5?ca(e,t):ua(e,t)}function qa(e,t,r){try{return dy(e,t)}catch{return e}}const hy=F.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const py=()=>F.useContext(hy)??!1,my=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function fy(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?Io(a.defaultProps,n):!a.styleOverrides&&!a.variants?Io(a,n):n}function gy({props:e,name:t}){const r=F.useContext(my);return fy({props:e,name:t,theme:{components:r}})}const Kc={theme:void 0};function yy(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(Kc.theme=a.theme,o=Jh(e(Kc)),t=o,r=a.theme),o}}function by(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const Qc=(e,t,r,n=[])=>{let a=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},xy=(e,t,r)=>{function n(a,o=[],s=[]){Object.entries(a).forEach(([i,l])=>{(!r||r&&!r([...o,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...o,i],Array.isArray(l)?[...s,i]:s):t([...o,i],l,s))})}n(e)},vy=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function ri(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return xy(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=vy(i,l);Object.assign(a,{[u]:d}),Qc(o,i,`var(${u})`,c),Qc(s,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function Sy(e,t={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ri(l,t);let h=d;const p={},{[i]:f,...m}=o;if(Object.entries(m||{}).forEach(([O,w])=>{const{vars:A,css:C,varsWithDefaults:T}=ri(w,t);h=nt(h,T),p[O]={css:C,vars:A}}),f){const{css:O,vars:w,varsWithDefaults:A}=ri(f,t);h=nt(h,A),p[i]={css:O,vars:w}}function b(O,w){var C,T;let A=a;if(a==="class"&&(A=".%s"),a==="data"&&(A="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(A=`[${a}="%s"]`),O){if(A==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((T=(C=o[O])==null?void 0:C.palette)==null?void 0:T.mode)||O})`]:{":root":w}};if(A)return e.defaultColorScheme===O?`:root, ${A.replace("%s",String(O))}`:A.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:w}])=>{O=nt(O,w)}),O},generateStyleSheets:()=>{var V,j;const O=[],w=e.defaultColorScheme||"light";function A(y,R){Object.keys(R).length&&O.push(typeof y=="string"?{[y]:{...R}}:y)}A(r(void 0,{...u}),u);const{[w]:C,...T}=p;if(C){const{css:y}=C,R=(j=(V=o[w])==null?void 0:V.palette)==null?void 0:j.mode,z=!n&&R?{colorScheme:R,...y}:{...y};A(r(w,{...z}),z)}return Object.entries(T).forEach(([y,{css:R}])=>{var G,ae;const z=(ae=(G=o[y])==null?void 0:G.palette)==null?void 0:ae.mode,I=!n&&z?{colorScheme:z,...R}:{...R};A(r(y,{...I}),I)}),O}}}function Oy(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const wy=ds(),Cy=iy("div",{name:"MuiStack",slot:"Root"});function Py(e){return Xh({props:e,name:"MuiStack",defaultTheme:wy})}function Ty(e,t){const r=F.Children.toArray(e).filter(Boolean);return r.reduce((n,a,o)=>(n.push(a),o<r.length-1&&n.push(F.cloneElement(t,{key:`separator-${o}`})),n),[])}const Ry=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Ay=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Tt({theme:t},ei({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=os(t),a=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),o=ei({values:e.direction,base:a}),s=ei({values:e.spacing,base:a});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const h=c>0?o[u[c-1]]:"column";o[l]=h}}),r=nt(r,Tt({theme:t},s,(l,c)=>e.useFlexGap?{gap:Rr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ry(c?o[c]:e.direction)}`]:Rr(n,l)}}))}return r=t0(t.breakpoints,r),r};function _y(e={}){const{createStyledComponent:t=Cy,useThemeProps:r=Py,componentName:n="MuiStack"}=e,a=()=>es({root:["root"]},l=>wn(n,l),{}),o=t(Ay),s=F.forwardRef(function(l,c){const u=r(l),d=Y0(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:b,className:S,useFlexGap:E=!1,...O}=d,w={direction:p,spacing:f,useFlexGap:E},A=a();return g.jsx(o,{as:h,ownerState:w,ref:c,className:Pt(A.root,S),...O,children:m?Ty(b,m):b})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:x.node,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object])}),s}const da={black:"#000",white:"#fff"},Ey={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Gr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Hr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ln={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},qr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Wr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Jr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function ep(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:da.white,default:da.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Iy=ep();function tp(){return{text:{primary:da.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:da.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Xc=tp();function Zc(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=ua(e.main,a):t==="dark"&&(e.dark=ca(e.main,o)))}function Vy(e="light"){return e==="dark"?{main:qr[200],light:qr[50],dark:qr[400]}:{main:qr[700],light:qr[400],dark:qr[800]}}function My(e="light"){return e==="dark"?{main:Gr[200],light:Gr[50],dark:Gr[400]}:{main:Gr[500],light:Gr[300],dark:Gr[700]}}function jy(e="light"){return e==="dark"?{main:Hr[500],light:Hr[300],dark:Hr[700]}:{main:Hr[700],light:Hr[400],dark:Hr[800]}}function ky(e="light"){return e==="dark"?{main:Wr[400],light:Wr[300],dark:Wr[700]}:{main:Wr[700],light:Wr[500],dark:Wr[900]}}function $y(e="light"){return e==="dark"?{main:Jr[400],light:Jr[300],dark:Jr[700]}:{main:Jr[800],light:Jr[500],dark:Jr[900]}}function Uy(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:"#ed6c02",light:Ln[500],dark:Ln[900]}}function Ml(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||Vy(t),s=e.secondary||My(t),i=e.error||jy(t),l=e.info||ky(t),c=e.success||$y(t),u=e.warning||Uy(t);function d(m){const b=Yc(m,Xc.text.primary)>=r?Xc.text.primary:Iy.text.primary;if(process.env.NODE_ENV!=="production"){const S=Yc(m,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
49
|
+
`)));const i=o[s];return a>=0?i:typeof i=="number"?-i:typeof i=="string"&&i.startsWith("var(")?`calc(-1 * ${i})`:`-${i}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
50
|
+
`)),()=>{})}function as(e){return To(e,"spacing",8,"spacing")}function Rr(e,t){return typeof t=="string"||t==null?t:e(t)}function l0(e,t){return r=>e.reduce((n,o)=>(n[o]=Rr(t,r),n),{})}function c0(e,t,r,n){if(!t.includes(r))return null;const o=s0(r),a=l0(o,n),s=e[r];return Tt(e,s,a)}function Hh(e,t){const r=as(e.theme);return Object.keys(e).map(n=>c0(e,t,n,r)).reduce(oo,{})}function Ue(e){return Hh(e,ns)}Ue.propTypes=process.env.NODE_ENV!=="production"?ns.reduce((e,t)=>(e[t]=pr,e),{}):{};Ue.filterProps=ns;function De(e){return Hh(e,os)}De.propTypes=process.env.NODE_ENV!=="production"?os.reduce((e,t)=>(e[t]=pr,e),{}):{};De.filterProps=os;process.env.NODE_ENV!=="production"&&i0.reduce((e,t)=>(e[t]=pr,e),{});function qh(e=8,t=as({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function ss(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(a=>{n[a]=o}),n),{}),r=n=>Object.keys(n).reduce((o,a)=>t[a]?oo(o,t[a](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function ft(e){return typeof e!="number"?e:`${e}px solid`}function xt(e,t){return Ne({prop:e,themeKey:"borders",transform:t})}const u0=xt("border",ft),d0=xt("borderTop",ft),h0=xt("borderRight",ft),p0=xt("borderBottom",ft),m0=xt("borderLeft",ft),f0=xt("borderColor"),g0=xt("borderTopColor"),y0=xt("borderRightColor"),b0=xt("borderBottomColor"),x0=xt("borderLeftColor"),v0=xt("outline",ft),S0=xt("outlineColor"),is=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=To(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Rr(t,n)});return Tt(e,e.borderRadius,r)}return null};is.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:pr}:{};is.filterProps=["borderRadius"];ss(u0,d0,h0,p0,m0,f0,g0,y0,b0,x0,is,v0,S0);const ls=e=>{if(e.gap!==void 0&&e.gap!==null){const t=To(e.theme,"spacing",8,"gap"),r=n=>({gap:Rr(t,n)});return Tt(e,e.gap,r)}return null};ls.propTypes=process.env.NODE_ENV!=="production"?{gap:pr}:{};ls.filterProps=["gap"];const cs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=To(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Rr(t,n)});return Tt(e,e.columnGap,r)}return null};cs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:pr}:{};cs.filterProps=["columnGap"];const us=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=To(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Rr(t,n)});return Tt(e,e.rowGap,r)}return null};us.propTypes=process.env.NODE_ENV!=="production"?{rowGap:pr}:{};us.filterProps=["rowGap"];const O0=Ne({prop:"gridColumn"}),w0=Ne({prop:"gridRow"}),C0=Ne({prop:"gridAutoFlow"}),P0=Ne({prop:"gridAutoColumns"}),T0=Ne({prop:"gridAutoRows"}),R0=Ne({prop:"gridTemplateColumns"}),A0=Ne({prop:"gridTemplateRows"}),_0=Ne({prop:"gridTemplateAreas"}),E0=Ne({prop:"gridArea"});ss(ls,cs,us,O0,w0,C0,P0,T0,R0,A0,_0,E0);function cn(e,t){return t==="grey"?t:e}const I0=Ne({prop:"color",themeKey:"palette",transform:cn}),V0=Ne({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:cn}),M0=Ne({prop:"backgroundColor",themeKey:"palette",transform:cn});ss(I0,V0,M0);function dt(e){return e<=1&&e!==0?`${e*100}%`:e}const j0=Ne({prop:"width",transform:dt}),El=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,a,s,i,l;const n=((s=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||ts[r];return n?((l=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:dt(r)}};return Tt(e,e.maxWidth,t)}return null};El.filterProps=["maxWidth"];const k0=Ne({prop:"minWidth",transform:dt}),$0=Ne({prop:"height",transform:dt}),U0=Ne({prop:"maxHeight",transform:dt}),D0=Ne({prop:"minHeight",transform:dt});Ne({prop:"size",cssProperty:"width",transform:dt});Ne({prop:"size",cssProperty:"height",transform:dt});const L0=Ne({prop:"boxSizing"});ss(j0,El,k0,$0,U0,D0,L0);const Ro={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:is},color:{themeKey:"palette",transform:cn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:cn},backgroundColor:{themeKey:"palette",transform:cn},p:{style:De},pt:{style:De},pr:{style:De},pb:{style:De},pl:{style:De},px:{style:De},py:{style:De},padding:{style:De},paddingTop:{style:De},paddingRight:{style:De},paddingBottom:{style:De},paddingLeft:{style:De},paddingX:{style:De},paddingY:{style:De},paddingInline:{style:De},paddingInlineStart:{style:De},paddingInlineEnd:{style:De},paddingBlock:{style:De},paddingBlockStart:{style:De},paddingBlockEnd:{style:De},m:{style:Ue},mt:{style:Ue},mr:{style:Ue},mb:{style:Ue},ml:{style:Ue},mx:{style:Ue},my:{style:Ue},margin:{style:Ue},marginTop:{style:Ue},marginRight:{style:Ue},marginBottom:{style:Ue},marginLeft:{style:Ue},marginX:{style:Ue},marginY:{style:Ue},marginInline:{style:Ue},marginInlineStart:{style:Ue},marginInlineEnd:{style:Ue},marginBlock:{style:Ue},marginBlockStart:{style:Ue},marginBlockEnd:{style:Ue},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ls},rowGap:{style:us},columnGap:{style:cs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:dt},maxWidth:{style:El},minWidth:{transform:dt},height:{transform:dt},maxHeight:{transform:dt},minHeight:{transform:dt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function B0(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function N0(e,t){return typeof e=="function"?e(t):e}function F0(){function e(r,n,o,a){const s={[r]:n,theme:o},i=a[r];if(!i)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=i;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const h=rs(o,c)||{};return d?d(s):Tt(s,n,f=>{let m=Ea(h,u,f);return f===m&&typeof f=="string"&&(m=Ea(h,u,`${r}${f==="default"?"":rt(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const a=o.unstable_sxConfig??Ro;function s(i){let l=i;if(typeof i=="function")l=i(o);else if(typeof i!="object")return i;if(!l)return null;const c=zh(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=N0(l[h],o);if(p!=null)if(typeof p=="object")if(a[h])d=oo(d,e(h,p,o,a));else{const f=Tt({theme:o},p,m=>({[h]:m}));B0(f,p)?d[h]=t({sx:p,theme:o}):d=oo(d,f)}else d=oo(d,e(h,p,o,a))}),Yg(o,Gh(u,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const mn=F0();mn.filterProps=["sx"];function z0(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function ds(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:a={},...s}=e,i=Jg(r),l=qh(o);let c=nt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Zg,...a}},s);return c=Xg(c),c.applyStyles=z0,c=t.reduce((u,d)=>nt(u,d),c),c.unstable_sxConfig={...Ro,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return mn({sx:d,theme:this})},c}function G0(e){return Object.keys(e).length===0}function H0(e=null){const t=F.useContext(xg.ThemeContext);return!t||G0(t)?e:t}const q0=ds();function W0(e=q0){return H0(e)}const J0=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Ro;return Object.keys(e).forEach(o=>{r[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Y0(e){const{sx:t,...r}=e,{systemProps:n,otherProps:o}=J0(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const i=t(...s);return Vt(i)?{...n,...i}:n}:a={...n,...t},{...o,sx:a}}const Wc=e=>e,K0=()=>{let e=Wc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Wc}}},Q0=K0(),X0={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function wn(e,t,r="Mui"){const n=X0[t];return n?`${r}-${n}`:`${Q0.generate(e)}-${t}`}function Il(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=wn(e,o,r)}),n}function Wh(e,t=""){return e.displayName||e.name||t}function Jc(e,t,r){const n=Wh(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Z0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Wh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case _a.ForwardRef:return Jc(e,e.render,"ForwardRef");case _a.Memo:return Jc(e,e.type,"memo");default:return}}}function Jh(e){const{variants:t,...r}=e,n={variants:t,style:Nc(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Nc(o.style))}),n}const ey=ds();function ti(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function ty(e){return e?(t,r)=>r[e]:null}function ry(e,t,r){e.theme=ay(e.theme)?r:e.theme[t]||e.theme}function ba(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>ba(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...a}=r;n=a}return Yh(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Yh(e,t,r=[]){var o;let n;e:for(let a=0;a<t.length;a+=1){const s=t[a];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const i in s.props)if(e[i]!==s.props[i]&&((o=e.ownerState)==null?void 0:o[i])!==s.props[i])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function Kh(e={}){const{themeId:t,defaultTheme:r=ey,rootShouldForwardProp:n=ti,slotShouldForwardProp:o=ti}=e;function a(i){ry(i,t,r)}return(i,l={})=>{zg(i,A=>A.filter(C=>C!==mn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=ty(Qh(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,b=h||!1;let S=ti;u==="Root"||u==="root"?S=n:u?S=o:sy(i)&&(S=void 0);const E=Fg(i,{shouldForwardProp:S,label:oy(c,u),...f}),O=A=>{if(A.__emotion_real===A)return A;if(typeof A=="function")return function(T){return ba(T,A)};if(Vt(A)){const C=Jh(A);return C.variants?function(V){return ba(V,C)}:C.style}return A},w=(...A)=>{const C=[],T=A.map(O),V=[];if(C.push(a),c&&p&&V.push(function(z){var re,te;const G=(te=(re=z.theme.components)==null?void 0:re[c])==null?void 0:te.styleOverrides;if(!G)return null;const oe={};for(const ee in G)oe[ee]=ba(z,G[ee]);return p(z,oe)}),c&&!m&&V.push(function(z){var oe,re;const I=z.theme,G=(re=(oe=I==null?void 0:I.components)==null?void 0:oe[c])==null?void 0:re.variants;return G?Yh(z,G):null}),b||V.push(mn),Array.isArray(T[0])){const R=T.shift(),z=new Array(C.length).fill(""),I=new Array(V.length).fill("");let G;G=[...z,...R,...I],G.raw=[...z,...R.raw,...I],C.unshift(G)}const j=[...C,...T,...V],y=E(...j);return i.muiName&&(y.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(y.displayName=ny(c,u,i)),y};return E.withConfig&&(w.withConfig=E.withConfig),w}}function ny(e,t,r){return e?`${e}${rt(t||"")}`:`Styled(${Z0(r)})`}function oy(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Qh(t||"Root")}`),r}function ay(e){for(const t in e)return!1;return!0}function sy(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Qh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const iy=Kh();function Ia(e,t,r=!1){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const a=o;if(a==="components"||a==="slots")n[a]={...e[a],...n[a]};else if(a==="componentsProps"||a==="slotProps"){const s=e[a],i=t[a];if(!i)n[a]=s||{};else if(!s)n[a]=i;else{n[a]={...i};for(const l in s)if(Object.prototype.hasOwnProperty.call(s,l)){const c=l;n[a][c]=Ia(s[c],i[c],r)}}}else a==="className"&&r&&t.className?n.className=Pt(e==null?void 0:e.className,t==null?void 0:t.className):a==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[a]===void 0&&(n[a]=e[a])}return n}function ly(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Ia(t.components[r].defaultProps,n)}function Xh({props:e,name:t,defaultTheme:r,themeId:n}){let o=W0(r);return n&&(o=o[n]||o),ly({theme:o,name:t,props:e})}const $t=typeof window<"u"?F.useLayoutEffect:F.useEffect;function an(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Vl(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),an(e,t,r)}function cy(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function dr(e){if(e.type)return e;if(e.charAt(0)==="#")return dr(cy(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
51
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ur(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
52
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ur(10,o))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:o}}const uy=e=>{const t=dr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},eo=(e,t)=>{try{return uy(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function hs(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,a)=>a<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Zh(e){e=dr(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,a=n*Math.min(o,1-o),s=(c,u=(c+r/30)%12)=>o-a*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),hs({type:i,values:l})}function Fi(e){e=dr(e);let t=e.type==="hsl"||e.type==="hsla"?dr(Zh(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Yc(e,t){const r=Fi(e),n=Fi(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function zi(e,t){return e=dr(e),t=Vl(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,hs(e)}function qo(e,t,r){try{return zi(e,t)}catch{return e}}function co(e,t){if(e=dr(e),t=Vl(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return hs(e)}function Re(e,t,r){try{return co(e,t)}catch{return e}}function uo(e,t){if(e=dr(e),t=Vl(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return hs(e)}function Ae(e,t,r){try{return uo(e,t)}catch{return e}}function dy(e,t=.15){return Fi(e)>.5?co(e,t):uo(e,t)}function Wo(e,t,r){try{return dy(e,t)}catch{return e}}const hy=F.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const py=()=>F.useContext(hy)??!1,my=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function fy(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?Ia(o.defaultProps,n):!o.styleOverrides&&!o.variants?Ia(o,n):n}function gy({props:e,name:t}){const r=F.useContext(my);return fy({props:e,name:t,theme:{components:r}})}const Kc={theme:void 0};function yy(e){let t,r;return function(o){let a=t;return(a===void 0||o.theme!==r)&&(Kc.theme=o.theme,a=Jh(e(Kc)),t=a,r=o.theme),a}}function by(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const Qc=(e,t,r,n=[])=>{let o=e;t.forEach((a,s)=>{s===t.length-1?Array.isArray(o)?o[Number(a)]=r:o&&typeof o=="object"&&(o[a]=r):o&&typeof o=="object"&&(o[a]||(o[a]=n.includes(a)?[]:{}),o=o[a])})},xy=(e,t,r)=>{function n(o,a=[],s=[]){Object.entries(o).forEach(([i,l])=>{(!r||r&&!r([...a,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,i],Array.isArray(l)?[...s,i]:s):t([...a,i],l,s))})}n(e)},vy=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function ri(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},a={},s={};return xy(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=vy(i,l);Object.assign(o,{[u]:d}),Qc(a,i,`var(${u})`,c),Qc(s,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:o,vars:a,varsWithDefaults:s}}function Sy(e,t={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:a={},components:s,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ri(l,t);let h=d;const p={},{[i]:f,...m}=a;if(Object.entries(m||{}).forEach(([O,w])=>{const{vars:A,css:C,varsWithDefaults:T}=ri(w,t);h=nt(h,T),p[O]={css:C,vars:A}}),f){const{css:O,vars:w,varsWithDefaults:A}=ri(f,t);h=nt(h,A),p[i]={css:O,vars:w}}function b(O,w){var C,T;let A=o;if(o==="class"&&(A=".%s"),o==="data"&&(A="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(A=`[${o}="%s"]`),O){if(A==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((T=(C=a[O])==null?void 0:C.palette)==null?void 0:T.mode)||O})`]:{":root":w}};if(A)return e.defaultColorScheme===O?`:root, ${A.replace("%s",String(O))}`:A.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:w}])=>{O=nt(O,w)}),O},generateStyleSheets:()=>{var V,j;const O=[],w=e.defaultColorScheme||"light";function A(y,R){Object.keys(R).length&&O.push(typeof y=="string"?{[y]:{...R}}:y)}A(r(void 0,{...u}),u);const{[w]:C,...T}=p;if(C){const{css:y}=C,R=(j=(V=a[w])==null?void 0:V.palette)==null?void 0:j.mode,z=!n&&R?{colorScheme:R,...y}:{...y};A(r(w,{...z}),z)}return Object.entries(T).forEach(([y,{css:R}])=>{var G,oe;const z=(oe=(G=a[y])==null?void 0:G.palette)==null?void 0:oe.mode,I=!n&&z?{colorScheme:z,...R}:{...R};A(r(y,{...I}),I)}),O}}}function Oy(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const wy=ds(),Cy=iy("div",{name:"MuiStack",slot:"Root"});function Py(e){return Xh({props:e,name:"MuiStack",defaultTheme:wy})}function Ty(e,t){const r=F.Children.toArray(e).filter(Boolean);return r.reduce((n,o,a)=>(n.push(o),a<r.length-1&&n.push(F.cloneElement(t,{key:`separator-${a}`})),n),[])}const Ry=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Ay=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Tt({theme:t},ei({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=as(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),a=ei({values:e.direction,base:o}),s=ei({values:e.spacing,base:o});typeof a=="object"&&Object.keys(a).forEach((l,c,u)=>{if(!a[l]){const h=c>0?a[u[c-1]]:"column";a[l]=h}}),r=nt(r,Tt({theme:t},s,(l,c)=>e.useFlexGap?{gap:Rr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ry(c?a[c]:e.direction)}`]:Rr(n,l)}}))}return r=t0(t.breakpoints,r),r};function _y(e={}){const{createStyledComponent:t=Cy,useThemeProps:r=Py,componentName:n="MuiStack"}=e,o=()=>es({root:["root"]},l=>wn(n,l),{}),a=t(Ay),s=F.forwardRef(function(l,c){const u=r(l),d=Y0(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:b,className:S,useFlexGap:E=!1,...O}=d,w={direction:p,spacing:f,useFlexGap:E},A=o();return g.jsx(a,{as:h,ownerState:w,ref:c,className:Pt(A.root,S),...O,children:m?Ty(b,m):b})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:x.node,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object])}),s}const ho={black:"#000",white:"#fff"},Ey={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Gr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Hr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ln={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},qr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Wr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Jr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function ep(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ho.white,default:ho.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Iy=ep();function tp(){return{text:{primary:ho.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ho.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Xc=tp();function Zc(e,t,r,n){const o=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=uo(e.main,o):t==="dark"&&(e.dark=co(e.main,a)))}function Vy(e="light"){return e==="dark"?{main:qr[200],light:qr[50],dark:qr[400]}:{main:qr[700],light:qr[400],dark:qr[800]}}function My(e="light"){return e==="dark"?{main:Gr[200],light:Gr[50],dark:Gr[400]}:{main:Gr[500],light:Gr[300],dark:Gr[700]}}function jy(e="light"){return e==="dark"?{main:Hr[500],light:Hr[300],dark:Hr[700]}:{main:Hr[700],light:Hr[400],dark:Hr[800]}}function ky(e="light"){return e==="dark"?{main:Wr[400],light:Wr[300],dark:Wr[700]}:{main:Wr[700],light:Wr[500],dark:Wr[900]}}function $y(e="light"){return e==="dark"?{main:Jr[400],light:Jr[300],dark:Jr[700]}:{main:Jr[800],light:Jr[500],dark:Jr[900]}}function Uy(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:"#ed6c02",light:Ln[500],dark:Ln[900]}}function Ml(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,a=e.primary||Vy(t),s=e.secondary||My(t),i=e.error||jy(t),l=e.info||ky(t),c=e.success||$y(t),u=e.warning||Uy(t);function d(m){const b=Yc(m,Xc.text.primary)>=r?Xc.text.primary:Iy.text.primary;if(process.env.NODE_ENV!=="production"){const S=Yc(m,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
53
53
|
`))}return b}const h=({color:m,name:b,mainShade:S=500,lightShade:E=300,darkShade:O=700})=>{if(m={...m},!m.main&&m[S]&&(m.main=m[S]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
54
54
|
The color object needs to have a \`main\` property or a \`${S}\` property.`:ur(11,b?` (${b})`:"",S));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
55
55
|
\`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
|
|
@@ -64,23 +64,23 @@ const theme1 = createTheme({ palette: {
|
|
|
64
64
|
|
|
65
65
|
const theme2 = createTheme({ palette: {
|
|
66
66
|
primary: { main: green[500] },
|
|
67
|
-
} });`:ur(12,b?` (${b})`:"",JSON.stringify(m.main)));return Zc(m,"light",E,n),Zc(m,"dark",O,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=ep():t==="dark"&&(p=tp()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),nt({common:{...
|
|
68
|
-
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(
|
|
67
|
+
} });`:ur(12,b?` (${b})`:"",JSON.stringify(m.main)));return Zc(m,"light",E,n),Zc(m,"dark",O,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=ep():t==="dark"&&(p=tp()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),nt({common:{...ho},mode:t,primary:h({color:a,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:i,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:Ey,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},o)}function Dy(e){const t={};return Object.entries(e).forEach(n=>{const[o,a]=n;typeof a=="object"&&(t[o]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Ly(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function By(e){return Math.round(e*1e5)/1e5}const eu={textTransform:"uppercase"},tu='"Roboto", "Helvetica", "Arial", sans-serif';function Ny(e,t){const{fontFamily:r=tu,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:i=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=n/14,p=u||(b=>`${b/l*h}rem`),f=(b,S,E,O,w)=>({fontFamily:r,fontWeight:b,fontSize:p(S),lineHeight:E,...r===tu?{letterSpacing:`${By(O/S)}em`}:{},...w,...c}),m={h1:f(o,96,1.167,-1.5),h2:f(o,60,1.2,-.5),h3:f(a,48,1.167,0),h4:f(a,34,1.235,.25),h5:f(a,24,1.334,0),h6:f(s,20,1.6,.15),subtitle1:f(a,16,1.75,.15),subtitle2:f(s,14,1.57,.1),body1:f(a,16,1.5,.15),body2:f(a,14,1.43,.15),button:f(s,14,1.75,.4,eu),caption:f(a,12,1.66,.4),overline:f(a,12,2.66,1,eu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return nt({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:i,...m},d,{clone:!1})}const Fy=.2,zy=.14,Gy=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Fy})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${zy})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Gy})`].join(",")}const Hy=["none",je(0,2,1,-1,0,1,1,0,0,1,3,0),je(0,3,1,-2,0,2,2,0,0,1,5,0),je(0,3,3,-2,0,3,4,0,0,1,8,0),je(0,2,4,-1,0,4,5,0,0,1,10,0),je(0,3,5,-1,0,5,8,0,0,1,14,0),je(0,3,5,-1,0,6,10,0,0,1,18,0),je(0,4,5,-2,0,7,10,1,0,2,16,1),je(0,5,5,-3,0,8,10,1,0,3,14,2),je(0,5,6,-3,0,9,12,1,0,3,16,2),je(0,6,6,-3,0,10,14,1,0,4,18,3),je(0,6,7,-4,0,11,15,1,0,4,20,3),je(0,7,8,-4,0,12,17,2,0,5,22,4),je(0,7,8,-4,0,13,19,2,0,5,24,4),je(0,7,9,-4,0,14,21,2,0,5,26,4),je(0,8,9,-5,0,15,22,2,0,6,28,5),je(0,8,10,-5,0,16,24,2,0,6,30,5),je(0,8,11,-5,0,17,26,2,0,6,32,5),je(0,9,11,-5,0,18,28,2,0,7,34,6),je(0,9,12,-6,0,19,29,2,0,7,36,6),je(0,10,13,-6,0,20,31,3,0,8,38,7),je(0,10,13,-6,0,21,33,3,0,8,40,7),je(0,10,14,-6,0,22,35,3,0,8,42,7),je(0,11,14,-7,0,23,36,3,0,9,44,8),je(0,11,15,-7,0,24,38,3,0,9,46,8)],qy={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Wy={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ru(e){return`${Math.round(e)}ms`}function Jy(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Yy(e){const t={...qy,...e.easing},r={...Wy,...e.duration};return{getAutoHeightDuration:Jy,create:(o=["all"],a={})=>{const{duration:s=r.standard,easing:i=t.easeInOut,delay:l=0,...c}=a;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(s)&&!u(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),u(i)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
68
|
+
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:ru(s)} ${i} ${typeof l=="string"?l:ru(l)}`).join(",")},...e,easing:t,duration:r}}const Ky={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Qy(e){return Vt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function rp(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let a=0;a<o.length;a++){const[s,i]=o[a];!Qy(i)||s.startsWith("unstable_")?delete n[s]:Vt(i)&&(n[s]={...i},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
69
69
|
|
|
70
70
|
const theme = ${JSON.stringify(t,null,2)};
|
|
71
71
|
|
|
72
72
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
73
73
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
74
74
|
|
|
75
|
-
export default theme;`}function Gi(e={},...t){const{breakpoints:r,mixins:n={},spacing:
|
|
76
|
-
`))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const b=h.components[m].styleOverrides;b&&m.startsWith("Mui")&&f(b,m)})}return h.unstable_sxConfig={...
|
|
77
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function ob(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},sb=(e="mui")=>by(e);function ni(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=eb({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Gi({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...np(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ap(a)},s}function ib(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=tb,colorSchemeSelector:i=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(r)[0],d=n||(r.light&&u!=="light"?"light":u),h=sb(o),{[d]:p,light:f,dark:m,...b}=r,S={...b};let E=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:ur(21,d));const O=ni(S,E,c,d);f&&!S.light&&ni(S,f,void 0,"light"),m&&!S.dark&&ni(S,m,void 0,"dark");let w={defaultColorScheme:d,...O,cssVarPrefix:o,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...Dy(O.typography),...O.font},spacing:ob(c.spacing)};Object.keys(w.colorSchemes).forEach(j=>{const y=w.colorSchemes[j].palette,R=z=>{const I=z.split("-"),G=I[1],ae=I[2];return h(z,y[G][ae])};if(y.mode==="light"&&(W(y.common,"background","#fff"),W(y.common,"onBackground","#000")),y.mode==="dark"&&(W(y.common,"background","#000"),W(y.common,"onBackground","#fff")),ab(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){W(y.Alert,"errorColor",Re(y.error.light,.6)),W(y.Alert,"infoColor",Re(y.info.light,.6)),W(y.Alert,"successColor",Re(y.success.light,.6)),W(y.Alert,"warningColor",Re(y.warning.light,.6)),W(y.Alert,"errorFilledBg",R("palette-error-main")),W(y.Alert,"infoFilledBg",R("palette-info-main")),W(y.Alert,"successFilledBg",R("palette-success-main")),W(y.Alert,"warningFilledBg",R("palette-warning-main")),W(y.Alert,"errorFilledColor",At(()=>y.getContrastText(y.error.main))),W(y.Alert,"infoFilledColor",At(()=>y.getContrastText(y.info.main))),W(y.Alert,"successFilledColor",At(()=>y.getContrastText(y.success.main))),W(y.Alert,"warningFilledColor",At(()=>y.getContrastText(y.warning.main))),W(y.Alert,"errorStandardBg",Ae(y.error.light,.9)),W(y.Alert,"infoStandardBg",Ae(y.info.light,.9)),W(y.Alert,"successStandardBg",Ae(y.success.light,.9)),W(y.Alert,"warningStandardBg",Ae(y.warning.light,.9)),W(y.Alert,"errorIconColor",R("palette-error-main")),W(y.Alert,"infoIconColor",R("palette-info-main")),W(y.Alert,"successIconColor",R("palette-success-main")),W(y.Alert,"warningIconColor",R("palette-warning-main")),W(y.AppBar,"defaultBg",R("palette-grey-100")),W(y.Avatar,"defaultBg",R("palette-grey-400")),W(y.Button,"inheritContainedBg",R("palette-grey-300")),W(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),W(y.Chip,"defaultBorder",R("palette-grey-400")),W(y.Chip,"defaultAvatarColor",R("palette-grey-700")),W(y.Chip,"defaultIconColor",R("palette-grey-700")),W(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(y.LinearProgress,"primaryBg",Ae(y.primary.main,.62)),W(y.LinearProgress,"secondaryBg",Ae(y.secondary.main,.62)),W(y.LinearProgress,"errorBg",Ae(y.error.main,.62)),W(y.LinearProgress,"infoBg",Ae(y.info.main,.62)),W(y.LinearProgress,"successBg",Ae(y.success.main,.62)),W(y.LinearProgress,"warningBg",Ae(y.warning.main,.62)),W(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),W(y.Slider,"primaryTrack",Ae(y.primary.main,.62)),W(y.Slider,"secondaryTrack",Ae(y.secondary.main,.62)),W(y.Slider,"errorTrack",Ae(y.error.main,.62)),W(y.Slider,"infoTrack",Ae(y.info.main,.62)),W(y.Slider,"successTrack",Ae(y.success.main,.62)),W(y.Slider,"warningTrack",Ae(y.warning.main,.62));const z=qa(y.background.default,.8);W(y.SnackbarContent,"bg",z),W(y.SnackbarContent,"color",At(()=>y.getContrastText(z))),W(y.SpeedDialAction,"fabHoverBg",qa(y.background.paper,.15)),W(y.StepConnector,"border",R("palette-grey-400")),W(y.StepContent,"border",R("palette-grey-400")),W(y.Switch,"defaultColor",R("palette-common-white")),W(y.Switch,"defaultDisabledColor",R("palette-grey-100")),W(y.Switch,"primaryDisabledColor",Ae(y.primary.main,.62)),W(y.Switch,"secondaryDisabledColor",Ae(y.secondary.main,.62)),W(y.Switch,"errorDisabledColor",Ae(y.error.main,.62)),W(y.Switch,"infoDisabledColor",Ae(y.info.main,.62)),W(y.Switch,"successDisabledColor",Ae(y.success.main,.62)),W(y.Switch,"warningDisabledColor",Ae(y.warning.main,.62)),W(y.TableCell,"border",Ae(Ha(y.divider,1),.88)),W(y.Tooltip,"bg",Ha(y.grey[700],.92))}if(y.mode==="dark"){W(y.Alert,"errorColor",Ae(y.error.light,.6)),W(y.Alert,"infoColor",Ae(y.info.light,.6)),W(y.Alert,"successColor",Ae(y.success.light,.6)),W(y.Alert,"warningColor",Ae(y.warning.light,.6)),W(y.Alert,"errorFilledBg",R("palette-error-dark")),W(y.Alert,"infoFilledBg",R("palette-info-dark")),W(y.Alert,"successFilledBg",R("palette-success-dark")),W(y.Alert,"warningFilledBg",R("palette-warning-dark")),W(y.Alert,"errorFilledColor",At(()=>y.getContrastText(y.error.dark))),W(y.Alert,"infoFilledColor",At(()=>y.getContrastText(y.info.dark))),W(y.Alert,"successFilledColor",At(()=>y.getContrastText(y.success.dark))),W(y.Alert,"warningFilledColor",At(()=>y.getContrastText(y.warning.dark))),W(y.Alert,"errorStandardBg",Re(y.error.light,.9)),W(y.Alert,"infoStandardBg",Re(y.info.light,.9)),W(y.Alert,"successStandardBg",Re(y.success.light,.9)),W(y.Alert,"warningStandardBg",Re(y.warning.light,.9)),W(y.Alert,"errorIconColor",R("palette-error-main")),W(y.Alert,"infoIconColor",R("palette-info-main")),W(y.Alert,"successIconColor",R("palette-success-main")),W(y.Alert,"warningIconColor",R("palette-warning-main")),W(y.AppBar,"defaultBg",R("palette-grey-900")),W(y.AppBar,"darkBg",R("palette-background-paper")),W(y.AppBar,"darkColor",R("palette-text-primary")),W(y.Avatar,"defaultBg",R("palette-grey-600")),W(y.Button,"inheritContainedBg",R("palette-grey-800")),W(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),W(y.Chip,"defaultBorder",R("palette-grey-700")),W(y.Chip,"defaultAvatarColor",R("palette-grey-300")),W(y.Chip,"defaultIconColor",R("palette-grey-300")),W(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(y.LinearProgress,"primaryBg",Re(y.primary.main,.5)),W(y.LinearProgress,"secondaryBg",Re(y.secondary.main,.5)),W(y.LinearProgress,"errorBg",Re(y.error.main,.5)),W(y.LinearProgress,"infoBg",Re(y.info.main,.5)),W(y.LinearProgress,"successBg",Re(y.success.main,.5)),W(y.LinearProgress,"warningBg",Re(y.warning.main,.5)),W(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),W(y.Slider,"primaryTrack",Re(y.primary.main,.5)),W(y.Slider,"secondaryTrack",Re(y.secondary.main,.5)),W(y.Slider,"errorTrack",Re(y.error.main,.5)),W(y.Slider,"infoTrack",Re(y.info.main,.5)),W(y.Slider,"successTrack",Re(y.success.main,.5)),W(y.Slider,"warningTrack",Re(y.warning.main,.5));const z=qa(y.background.default,.98);W(y.SnackbarContent,"bg",z),W(y.SnackbarContent,"color",At(()=>y.getContrastText(z))),W(y.SpeedDialAction,"fabHoverBg",qa(y.background.paper,.15)),W(y.StepConnector,"border",R("palette-grey-600")),W(y.StepContent,"border",R("palette-grey-600")),W(y.Switch,"defaultColor",R("palette-grey-300")),W(y.Switch,"defaultDisabledColor",R("palette-grey-600")),W(y.Switch,"primaryDisabledColor",Re(y.primary.main,.55)),W(y.Switch,"secondaryDisabledColor",Re(y.secondary.main,.55)),W(y.Switch,"errorDisabledColor",Re(y.error.main,.55)),W(y.Switch,"infoDisabledColor",Re(y.info.main,.55)),W(y.Switch,"successDisabledColor",Re(y.success.main,.55)),W(y.Switch,"warningDisabledColor",Re(y.warning.main,.55)),W(y.TableCell,"border",Re(Ha(y.divider,1),.68)),W(y.Tooltip,"bg",Ha(y.grey[700],.92))}Bt(y.background,"default"),Bt(y.background,"paper"),Bt(y.common,"background"),Bt(y.common,"onBackground"),Bt(y,"divider"),Object.keys(y).forEach(z=>{const I=y[z];z!=="tonalOffset"&&I&&typeof I=="object"&&(I.main&&W(y[z],"mainChannel",ea(ta(I.main))),I.light&&W(y[z],"lightChannel",ea(ta(I.light))),I.dark&&W(y[z],"darkChannel",ea(ta(I.dark))),I.contrastText&&W(y[z],"contrastTextChannel",ea(ta(I.contrastText))),z==="text"&&(Bt(y[z],"primary"),Bt(y[z],"secondary")),z==="action"&&(I.active&&Bt(y[z],"active"),I.selected&&Bt(y[z],"selected")))})}),w=t.reduce((j,y)=>nt(j,y),w);const A={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:nb(w)},{vars:C,generateThemeVars:T,generateStyleSheets:V}=Sy(w,A);return w.vars=C,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([j,y])=>{w[j]=y}),w.generateThemeVars=T,w.generateStyleSheets=V,w.generateSpacing=function(){return qh(c.spacing,os(this))},w.getColorSchemeSelector=Oy(i),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Ta,...c==null?void 0:c.unstable_sxConfig},w.unstable_sx=function(y){return mn({sx:y,theme:this})},w.toRuntimeSource=rp,w}function nu(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ml({...r===!0?{}:r.palette,mode:t})})}function op(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r==null?void 0:r.mode,...s}=e,i=o||"light",l=a==null?void 0:a[i],c={...a,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Gi(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=Gi({...e,palette:u},...t);return d.defaultColorScheme=i,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},nu(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},nu(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),ib({...s,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const sp=op();function lb({props:e,name:t}){return Xh({props:e,name:t,defaultTheme:sp,themeId:Bh})}function jl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cb=e=>jl(e)&&e!=="classes",pt=Kh({themeId:Bh,defaultTheme:sp,rootShouldForwardProp:cb});function ps(...e){const t=F.useRef(void 0),r=F.useCallback(n=>{const a=e.map(o=>{if(o==null)return null;if(typeof o=="function"){const s=o,i=s(n);return typeof i=="function"?i:()=>{s(null)}}return o.current=n,()=>{o.current=null}});return()=>{a.forEach(o=>o==null?void 0:o())}},e);return F.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let au=0;function ub(e){const[t,r]=F.useState(e),n=t;return F.useEffect(()=>{t==null&&(au+=1,r(`mui-${au}`))},[t]),n}const db={...F},ou=db.useId;function hb(e){return ou!==void 0?ou():ub(e)}class pb{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{const n=r(this.value);n!==this.value&&(this.value=n,this.listeners.forEach(a=>a(n)))},this.value=t,this.listeners=new Set}}const ms=({params:e,store:t})=>{F.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=F.useCallback(()=>{let n=!1;return t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests-1})})))}},[t]);return $t(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let a;const o=i=>{i.matches?a=r():a==null||a()},s=window.matchMedia("(prefers-reduced-motion)");return o(s),s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[r,t]),{instance:{disableAnimation:r}}};ms.params={skipAnimation:!0};ms.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});ms.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),r=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:r?1:0}}};var mb=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const a={};e(a)===a&&(n=!0)}catch{}if(n){let a;try{throw new Error}catch(o){({stack:a}=o)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
75
|
+
export default theme;`}function Gi(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:a={},transitions:s={},typography:i={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ur(20));const u=Ml(a),d=ds(e);let h=nt(d,{mixins:Ly(d.breakpoints,n),palette:u,shadows:Hy.slice(),typography:Ny(u,i),transitions:Yy(s),zIndex:{...Ky}});if(h=nt(h,c),h=t.reduce((p,f)=>nt(p,f),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(m,b)=>{let S;for(S in m){const E=m[S];if(p.includes(S)&&Object.keys(E).length>0){if(process.env.NODE_ENV!=="production"){const O=wn("",S);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${O}' syntax:`,JSON.stringify({root:{[`&.${O}`]:E}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
76
|
+
`))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const b=h.components[m].styleOverrides;b&&m.startsWith("Mui")&&f(b,m)})}return h.unstable_sxConfig={...Ro,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return mn({sx:f,theme:this})},h.toRuntimeSource=rp,h}function Xy(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Zy=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Xy(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function np(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function op(e){return e==="dark"?Zy:[]}function eb(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,a=Ml(t);return{palette:a,opacity:{...np(a.mode),...r},overlays:n||op(a.mode),...o}}function tb(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const rb=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],nb=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let a=o;if(o==="class"&&(a=".%s"),o==="data"&&(a="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(a=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return rb(e.cssVarPrefix).forEach(i=>{s[i]=r[i],delete r[i]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:a?{[a.replace("%s",t)]:s,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function ob(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function W(e,t,r){!e[t]&&r&&(e[t]=r)}function to(e){return typeof e!="string"||!e.startsWith("hsl")?e:Zh(e)}function Bt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=eo(to(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
77
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function ab(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},sb=(e="mui")=>by(e);function ni(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=eb({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:a,...s}=Gi({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...np(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||op(o)},s}function ib(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=tb,colorSchemeSelector:i=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(r)[0],d=n||(r.light&&u!=="light"?"light":u),h=sb(a),{[d]:p,light:f,dark:m,...b}=r,S={...b};let E=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:ur(21,d));const O=ni(S,E,c,d);f&&!S.light&&ni(S,f,void 0,"light"),m&&!S.dark&&ni(S,m,void 0,"dark");let w={defaultColorScheme:d,...O,cssVarPrefix:a,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...Dy(O.typography),...O.font},spacing:ab(c.spacing)};Object.keys(w.colorSchemes).forEach(j=>{const y=w.colorSchemes[j].palette,R=z=>{const I=z.split("-"),G=I[1],oe=I[2];return h(z,y[G][oe])};if(y.mode==="light"&&(W(y.common,"background","#fff"),W(y.common,"onBackground","#000")),y.mode==="dark"&&(W(y.common,"background","#000"),W(y.common,"onBackground","#fff")),ob(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){W(y.Alert,"errorColor",Re(y.error.light,.6)),W(y.Alert,"infoColor",Re(y.info.light,.6)),W(y.Alert,"successColor",Re(y.success.light,.6)),W(y.Alert,"warningColor",Re(y.warning.light,.6)),W(y.Alert,"errorFilledBg",R("palette-error-main")),W(y.Alert,"infoFilledBg",R("palette-info-main")),W(y.Alert,"successFilledBg",R("palette-success-main")),W(y.Alert,"warningFilledBg",R("palette-warning-main")),W(y.Alert,"errorFilledColor",At(()=>y.getContrastText(y.error.main))),W(y.Alert,"infoFilledColor",At(()=>y.getContrastText(y.info.main))),W(y.Alert,"successFilledColor",At(()=>y.getContrastText(y.success.main))),W(y.Alert,"warningFilledColor",At(()=>y.getContrastText(y.warning.main))),W(y.Alert,"errorStandardBg",Ae(y.error.light,.9)),W(y.Alert,"infoStandardBg",Ae(y.info.light,.9)),W(y.Alert,"successStandardBg",Ae(y.success.light,.9)),W(y.Alert,"warningStandardBg",Ae(y.warning.light,.9)),W(y.Alert,"errorIconColor",R("palette-error-main")),W(y.Alert,"infoIconColor",R("palette-info-main")),W(y.Alert,"successIconColor",R("palette-success-main")),W(y.Alert,"warningIconColor",R("palette-warning-main")),W(y.AppBar,"defaultBg",R("palette-grey-100")),W(y.Avatar,"defaultBg",R("palette-grey-400")),W(y.Button,"inheritContainedBg",R("palette-grey-300")),W(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),W(y.Chip,"defaultBorder",R("palette-grey-400")),W(y.Chip,"defaultAvatarColor",R("palette-grey-700")),W(y.Chip,"defaultIconColor",R("palette-grey-700")),W(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(y.LinearProgress,"primaryBg",Ae(y.primary.main,.62)),W(y.LinearProgress,"secondaryBg",Ae(y.secondary.main,.62)),W(y.LinearProgress,"errorBg",Ae(y.error.main,.62)),W(y.LinearProgress,"infoBg",Ae(y.info.main,.62)),W(y.LinearProgress,"successBg",Ae(y.success.main,.62)),W(y.LinearProgress,"warningBg",Ae(y.warning.main,.62)),W(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),W(y.Slider,"primaryTrack",Ae(y.primary.main,.62)),W(y.Slider,"secondaryTrack",Ae(y.secondary.main,.62)),W(y.Slider,"errorTrack",Ae(y.error.main,.62)),W(y.Slider,"infoTrack",Ae(y.info.main,.62)),W(y.Slider,"successTrack",Ae(y.success.main,.62)),W(y.Slider,"warningTrack",Ae(y.warning.main,.62));const z=Wo(y.background.default,.8);W(y.SnackbarContent,"bg",z),W(y.SnackbarContent,"color",At(()=>y.getContrastText(z))),W(y.SpeedDialAction,"fabHoverBg",Wo(y.background.paper,.15)),W(y.StepConnector,"border",R("palette-grey-400")),W(y.StepContent,"border",R("palette-grey-400")),W(y.Switch,"defaultColor",R("palette-common-white")),W(y.Switch,"defaultDisabledColor",R("palette-grey-100")),W(y.Switch,"primaryDisabledColor",Ae(y.primary.main,.62)),W(y.Switch,"secondaryDisabledColor",Ae(y.secondary.main,.62)),W(y.Switch,"errorDisabledColor",Ae(y.error.main,.62)),W(y.Switch,"infoDisabledColor",Ae(y.info.main,.62)),W(y.Switch,"successDisabledColor",Ae(y.success.main,.62)),W(y.Switch,"warningDisabledColor",Ae(y.warning.main,.62)),W(y.TableCell,"border",Ae(qo(y.divider,1),.88)),W(y.Tooltip,"bg",qo(y.grey[700],.92))}if(y.mode==="dark"){W(y.Alert,"errorColor",Ae(y.error.light,.6)),W(y.Alert,"infoColor",Ae(y.info.light,.6)),W(y.Alert,"successColor",Ae(y.success.light,.6)),W(y.Alert,"warningColor",Ae(y.warning.light,.6)),W(y.Alert,"errorFilledBg",R("palette-error-dark")),W(y.Alert,"infoFilledBg",R("palette-info-dark")),W(y.Alert,"successFilledBg",R("palette-success-dark")),W(y.Alert,"warningFilledBg",R("palette-warning-dark")),W(y.Alert,"errorFilledColor",At(()=>y.getContrastText(y.error.dark))),W(y.Alert,"infoFilledColor",At(()=>y.getContrastText(y.info.dark))),W(y.Alert,"successFilledColor",At(()=>y.getContrastText(y.success.dark))),W(y.Alert,"warningFilledColor",At(()=>y.getContrastText(y.warning.dark))),W(y.Alert,"errorStandardBg",Re(y.error.light,.9)),W(y.Alert,"infoStandardBg",Re(y.info.light,.9)),W(y.Alert,"successStandardBg",Re(y.success.light,.9)),W(y.Alert,"warningStandardBg",Re(y.warning.light,.9)),W(y.Alert,"errorIconColor",R("palette-error-main")),W(y.Alert,"infoIconColor",R("palette-info-main")),W(y.Alert,"successIconColor",R("palette-success-main")),W(y.Alert,"warningIconColor",R("palette-warning-main")),W(y.AppBar,"defaultBg",R("palette-grey-900")),W(y.AppBar,"darkBg",R("palette-background-paper")),W(y.AppBar,"darkColor",R("palette-text-primary")),W(y.Avatar,"defaultBg",R("palette-grey-600")),W(y.Button,"inheritContainedBg",R("palette-grey-800")),W(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),W(y.Chip,"defaultBorder",R("palette-grey-700")),W(y.Chip,"defaultAvatarColor",R("palette-grey-300")),W(y.Chip,"defaultIconColor",R("palette-grey-300")),W(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(y.LinearProgress,"primaryBg",Re(y.primary.main,.5)),W(y.LinearProgress,"secondaryBg",Re(y.secondary.main,.5)),W(y.LinearProgress,"errorBg",Re(y.error.main,.5)),W(y.LinearProgress,"infoBg",Re(y.info.main,.5)),W(y.LinearProgress,"successBg",Re(y.success.main,.5)),W(y.LinearProgress,"warningBg",Re(y.warning.main,.5)),W(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),W(y.Slider,"primaryTrack",Re(y.primary.main,.5)),W(y.Slider,"secondaryTrack",Re(y.secondary.main,.5)),W(y.Slider,"errorTrack",Re(y.error.main,.5)),W(y.Slider,"infoTrack",Re(y.info.main,.5)),W(y.Slider,"successTrack",Re(y.success.main,.5)),W(y.Slider,"warningTrack",Re(y.warning.main,.5));const z=Wo(y.background.default,.98);W(y.SnackbarContent,"bg",z),W(y.SnackbarContent,"color",At(()=>y.getContrastText(z))),W(y.SpeedDialAction,"fabHoverBg",Wo(y.background.paper,.15)),W(y.StepConnector,"border",R("palette-grey-600")),W(y.StepContent,"border",R("palette-grey-600")),W(y.Switch,"defaultColor",R("palette-grey-300")),W(y.Switch,"defaultDisabledColor",R("palette-grey-600")),W(y.Switch,"primaryDisabledColor",Re(y.primary.main,.55)),W(y.Switch,"secondaryDisabledColor",Re(y.secondary.main,.55)),W(y.Switch,"errorDisabledColor",Re(y.error.main,.55)),W(y.Switch,"infoDisabledColor",Re(y.info.main,.55)),W(y.Switch,"successDisabledColor",Re(y.success.main,.55)),W(y.Switch,"warningDisabledColor",Re(y.warning.main,.55)),W(y.TableCell,"border",Re(qo(y.divider,1),.68)),W(y.Tooltip,"bg",qo(y.grey[700],.92))}Bt(y.background,"default"),Bt(y.background,"paper"),Bt(y.common,"background"),Bt(y.common,"onBackground"),Bt(y,"divider"),Object.keys(y).forEach(z=>{const I=y[z];z!=="tonalOffset"&&I&&typeof I=="object"&&(I.main&&W(y[z],"mainChannel",eo(to(I.main))),I.light&&W(y[z],"lightChannel",eo(to(I.light))),I.dark&&W(y[z],"darkChannel",eo(to(I.dark))),I.contrastText&&W(y[z],"contrastTextChannel",eo(to(I.contrastText))),z==="text"&&(Bt(y[z],"primary"),Bt(y[z],"secondary")),z==="action"&&(I.active&&Bt(y[z],"active"),I.selected&&Bt(y[z],"selected")))})}),w=t.reduce((j,y)=>nt(j,y),w);const A={prefix:a,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:nb(w)},{vars:C,generateThemeVars:T,generateStyleSheets:V}=Sy(w,A);return w.vars=C,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([j,y])=>{w[j]=y}),w.generateThemeVars=T,w.generateStyleSheets=V,w.generateSpacing=function(){return qh(c.spacing,as(this))},w.getColorSchemeSelector=Oy(i),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Ro,...c==null?void 0:c.unstable_sxConfig},w.unstable_sx=function(y){return mn({sx:y,theme:this})},w.toRuntimeSource=rp,w}function nu(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ml({...r===!0?{}:r.palette,mode:t})})}function ap(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,i=a||"light",l=o==null?void 0:o[i],c={...o,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Gi(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=Gi({...e,palette:u},...t);return d.defaultColorScheme=i,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},nu(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},nu(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),ib({...s,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const sp=ap();function lb({props:e,name:t}){return Xh({props:e,name:t,defaultTheme:sp,themeId:Bh})}function jl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cb=e=>jl(e)&&e!=="classes",pt=Kh({themeId:Bh,defaultTheme:sp,rootShouldForwardProp:cb});function ps(...e){const t=F.useRef(void 0),r=F.useCallback(n=>{const o=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,i=s(n);return typeof i=="function"?i:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{o.forEach(a=>a==null?void 0:a())}},e);return F.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let ou=0;function ub(e){const[t,r]=F.useState(e),n=t;return F.useEffect(()=>{t==null&&(ou+=1,r(`mui-${ou}`))},[t]),n}const db={...F},au=db.useId;function hb(e){return au!==void 0?au():ub(e)}class pb{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{const n=r(this.value);n!==this.value&&(this.value=n,this.listeners.forEach(o=>o(n)))},this.value=t,this.listeners=new Set}}const ms=({params:e,store:t})=>{F.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=F.useCallback(()=>{let n=!1;return t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests-1})})))}},[t]);return $t(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let o;const a=i=>{i.matches?o=r():o==null||o()},s=window.matchMedia("(prefers-reduced-motion)");return a(s),s.addEventListener("change",a),()=>{s.removeEventListener("change",a)}},[r,t]),{instance:{disableAnimation:r}}};ms.params={skipAnimation:!0};ms.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});ms.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),r=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:r?1:0}}};var mb=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const o={};e(o)===o&&(n=!0)}catch{}if(n){let o;try{throw new Error}catch(a){({stack:o}=a)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
78
78
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
79
79
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
80
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:
|
|
80
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},fb=(e,t,r)=>{const{memoize:n,memoizeOptions:o}=t,{inputSelectorResults:a,inputSelectorResultsCopy:s}=e,i=n(()=>({}),...o);if(!(i.apply(null,a)===i.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
81
81
|
This means your output selector will likely run more frequently than intended.
|
|
82
82
|
Avoid returning a new reference inside your input selector, e.g.
|
|
83
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:
|
|
83
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:a,secondInputs:s,stack:c})}},gb={inputStabilityCheck:"once",identityFunctionCheck:"once"},Va=Symbol("NOT_FOUND");function yb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function bb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function xb(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var su=e=>Array.isArray(e)?e:[e];function vb(e){const t=Array.isArray(e[0])?e[0]:e;return xb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function iu(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Sb=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...gb,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:mb},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:fb}}};function Ob(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Va},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function wb(e,t){let r=[];function n(i){const l=r.findIndex(c=>t(i,c.key));if(l>-1){const c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return Va}function o(i,l){n(i)===Va&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function a(){return r}function s(){r=[]}return{get:n,put:o,getEntries:a,clear:s}}var Cb=(e,t)=>e===t;function Pb(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:o}=r;for(let a=0;a<o;a++)if(!e(r[a],n[a]))return!1;return!0}}function Tb(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=Cb,maxSize:o=1,resultEqualityCheck:a}=r,s=Pb(n);let i=0;const l=o<=1?Ob(s):wb(o,s);function c(){let u=l.get(arguments);if(u===Va){if(u=e.apply(null,arguments),i++,a){const h=l.getEntries().find(p=>a(p.value,u));h&&(u=h.value,i!==0&&i--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>i,c.resetResultsCount=()=>{i=0},c}var Rb=class{constructor(e){this.value=e}deref(){return this.value}},Ab=typeof WeakRef<"u"?WeakRef:Rb,_b=0,lu=1;function Jo(){return{s:_b,v:void 0,o:null,p:null}}function ip(e,t={}){let r=Jo();const{resultEqualityCheck:n}=t;let o,a=0;function s(){var d;let i=r;const{length:l}=arguments;for(let h=0,p=l;h<p;h++){const f=arguments[h];if(typeof f=="function"||typeof f=="object"&&f!==null){let m=i.o;m===null&&(i.o=m=new WeakMap);const b=m.get(f);b===void 0?(i=Jo(),m.set(f,i)):i=b}else{let m=i.p;m===null&&(i.p=m=new Map);const b=m.get(f);b===void 0?(i=Jo(),m.set(f,i)):i=b}}const c=i;let u;if(i.s===lu)u=i.v;else if(u=e.apply(null,arguments),a++,n){const h=((d=o==null?void 0:o.deref)==null?void 0:d.call(o))??o;h!=null&&n(h,u)&&(u=h,a!==0&&a--),o=typeof u=="object"&&u!==null||typeof u=="function"?new Ab(u):u}return c.s=lu,c.v=u,u}return s.clearCache=()=>{r=Jo(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function lp(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let a=0,s=0,i,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),yb(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=ip,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,b=su(h),S=su(f),E=vb(o),O=d(function(){return a++,c.apply(null,arguments)},...b);let w=!0;const A=p(function(){s++;const T=iu(E,arguments);if(i=O.apply(null,T),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:V,inputStabilityCheck:j}=Sb(w,m);if(V.shouldRun&&V.run(c,T,i),j.shouldRun){const y=iu(E,arguments);j.run({inputSelectorResults:T,inputSelectorResultsCopy:y},{memoize:d,memoizeOptions:b},arguments)}w&&(w=!1)}return i},...S);return Object.assign(A,{resultFunc:c,memoizedResultFunc:O,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>i,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var Eb=lp(ip),Ib=Object.assign((e,t=Eb)=>{bb(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((s,i,l)=>(s[r[l]]=i,s),{}))},{withTypes:()=>Ib});const Vb=lp({memoize:Tb,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),cu=new WeakMap,fe=(...e)=>(r,...n)=>{const o=r.cacheKey;let a=cu.get(o);a||(a=new Map,cu.set(o,a));const s=a.get(e);if(s)return s(r,...n);const i=Vb(...e);return a.set(e,i),i(r,...n)},Mb=e=>e.animation,jb=fe([Mb],e=>e.skip||e.skipAnimationRequests>0);function ao(e){return e&&e.ownerDocument||document}function kb(e){return ao(e).defaultView||window}var Yo={exports:{}},oi={},Ko={exports:{}},ai={};/**
|
|
84
84
|
* @license React
|
|
85
85
|
* use-sync-external-store-shim.production.js
|
|
86
86
|
*
|
|
@@ -88,7 +88,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the MIT license found in the
|
|
90
90
|
* LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var uu;function $b(){if(uu)return
|
|
91
|
+
*/var uu;function $b(){if(uu)return ai;uu=1;var e=J;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(d,h){var p=h(),f=n({inst:{value:p,getSnapshot:h}}),m=f[0].inst,b=f[1];return a(function(){m.value=p,m.getSnapshot=h,l(m)&&b({inst:m})},[d,p,h]),o(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),s(p),p}function l(d){var h=d.getSnapshot;d=d.value;try{var p=h();return!r(d,p)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:i;return ai.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,ai}var si={};/**
|
|
92
92
|
* @license React
|
|
93
93
|
* use-sync-external-store-shim.development.js
|
|
94
94
|
*
|
|
@@ -96,7 +96,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/var du;function Ub(){return du||(du=1,process.env.NODE_ENV!=="production"&&function(){function e(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}function t(p,f){u||
|
|
99
|
+
*/var du;function Ub(){return du||(du=1,process.env.NODE_ENV!=="production"&&function(){function e(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}function t(p,f){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=f();if(!d){var b=f();a(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=s({inst:{value:m,getSnapshot:f}});var S=b[0].inst,E=b[1];return l(function(){S.value=m,S.getSnapshot=f,r(S)&&E({inst:S})},[p,m,f]),i(function(){return r(S)&&E({inst:S}),p(function(){r(S)&&E({inst:S})})},[p]),c(m),m}function r(p){var f=p.getSnapshot;p=p.value;try{var m=f();return!a(p,m)}catch{return!0}}function n(p,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=J,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;si.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),si}var hu;function cp(){return hu||(hu=1,process.env.NODE_ENV==="production"?Ko.exports=$b():Ko.exports=Ub()),Ko.exports}/**
|
|
100
100
|
* @license React
|
|
101
101
|
* use-sync-external-store-shim/with-selector.production.js
|
|
102
102
|
*
|
|
@@ -104,7 +104,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the MIT license found in the
|
|
106
106
|
* LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/var pu;function Db(){if(pu)return
|
|
107
|
+
*/var pu;function Db(){if(pu)return oi;pu=1;var e=J,t=cp();function r(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,i=e.useMemo,l=e.useDebugValue;return oi.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=a(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(C){if(!E){if(E=!0,O=C,C=h(C),p!==void 0&&m.hasValue){var T=m.value;if(p(T,C))return w=T}return w=C}if(T=w,n(O,C))return T;var V=h(C);return p!==void 0&&p(T,V)?(O=C,T):(O=C,w=V)}var E=!1,O,w,A=d===void 0?null:d;return[function(){return S(u())},A===null?void 0:function(){return S(A())}]},[u,d,h,p]);var b=o(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},oi}var ii={};/**
|
|
108
108
|
* @license React
|
|
109
109
|
* use-sync-external-store-shim/with-selector.development.js
|
|
110
110
|
*
|
|
@@ -112,19 +112,19 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the MIT license found in the
|
|
114
114
|
* LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/var mu;function Lb(){return mu||(mu=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=J,r=cp(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,o=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;ii.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(C){if(!E){if(E=!0,O=C,C=h(C),p!==void 0&&m.hasValue){var T=m.value;if(p(T,C))return w=T}return w=C}if(T=w,n(O,C))return T;var V=h(C);return p!==void 0&&p(T,V)?(O=C,T):(O=C,w=V)}var E=!1,O,w,A=d===void 0?null:d;return[function(){return S(u())},A===null?void 0:function(){return S(A())}]},[u,d,h,p]);var b=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ii}var fu;function Bb(){return fu||(fu=1,process.env.NODE_ENV==="production"?Ja.exports=Db():Ja.exports=Lb()),Ja.exports}var Nb=Bb();const Fb=Object.is,it=(e,t,r=[],n=Fb)=>{const a=o=>t(o,...r);return Nb.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},zb="DEFAULT_X_AXIS_KEY",Gb="DEFAULT_Y_AXIS_KEY",Hb={top:20,bottom:20,left:20,right:20},qb=45,Wb=25,up=20,Cn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Pn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Jb=fe([Pn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="left"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Yb=fe([Pn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="right"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Kb=fe([Cn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="top"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Qb=fe([Cn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="bottom"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Xb=e=>e.dimensions,dp=e=>e.dimensions.width,hp=e=>e.dimensions.height,Zb=e=>e.dimensions.margin.top,ex=e=>e.dimensions.margin.right,tx=e=>e.dimensions.margin.bottom,rx=e=>e.dimensions.margin.left,Ra=fe([dp,hp,Zb,ex,tx,rx,Kb,Yb,Qb,Jb],(e,t,r,n,a,o,s,i,l,c)=>({width:e-o-n-c-i,left:o+c,right:n+i,height:t-r-a-s-l,top:r+s,bottom:a+l})),nx=fe([Xb],e=>({width:e.propsWidth,height:e.propsHeight})),ax=fe([dp,hp],(e,t)=>({width:e,height:t}));function pp(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const ox=10,fs=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=F.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=F.useState(0),[i,l]=F.useState(0),c=F.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const b=kb(f).getComputedStyle(f),S=Math.floor(parseFloat(b.height))||0,E=Math.floor(parseFloat(b.width))||0;return t.update(O=>O.dimensions.width===E&&O.dimensions.height===S?O:K({},O,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??E,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:E}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);F.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,b=e.height??f.dimensions.height;return K({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:b,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),F.useEffect(()=>{a.current.displayError=!0},[]),$t(()=>{if(n||!a.current.initialCompute||a.current.computeRun>ox)return;const f=c();f.width!==o||f.height!==i?(a.current.computeRun+=1,f.width!==void 0&&s(f.width),f.height!==void 0&&l(f.height)):a.current.initialCompute&&(a.current.initialCompute=!1)},[i,o,c,n]),$t(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const b=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&b.observe(f),()=>{m&&cancelAnimationFrame(m),f&&b.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(a.current.displayError&&e.width===void 0&&o===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),a.current.displayError=!1),a.current.displayError&&e.height===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),a.current.displayError=!1));const u=it(t,Ra),d=F.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=F.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:F.useCallback((f,m,b)=>b&&"closest"in b&&b.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};fs.params={width:!0,height:!0,margin:!0};fs.getDefaultizedParams=({params:e})=>K({},e,{margin:pp(e.margin,Hb)});fs.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const kl=({params:e,store:t})=>($t(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});kl.params={experimentalFeatures:!0};kl.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const sx=e=>e.experimentalFeatures,mp=fe([sx],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let gu=0;const ix=()=>(gu+=1,`mui-chart-${gu}`),$l=({params:e,store:t})=>(F.useEffect(()=>{t.update(r=>e.id===void 0||e.id===r.id.providedChartId&&r.id.chartId!==void 0?r:K({},r,{id:K({},r.id,{chartId:e.id??ix()})}))},[t,e.id]),{});$l.params={id:!0};$l.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const lx=e=>e.id,cx=fe([lx],e=>e.chartId),ux=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],dx=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],fp=e=>e==="dark"?dx:ux,gp=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const a={};e.forEach((s,i)=>{var u;const l=r[s.type].getSeriesWithDefaultValues(s,i,t),c=l.id;if(a[s.type]===void 0&&(a[s.type]={series:{},seriesOrder:[]}),((u=a[s.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);a[s.type].series[c]=l,a[s.type].seriesOrder.push(c)});const o={};return Object.keys(r).forEach(s=>{var l,c;const i=a[s];i!==void 0&&(o[s]=((c=(l=r[s])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??a[s])}),o},gs=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:o,colors:s}=e,i=F.useRef(!0);return F.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:gp({series:n,colors:typeof s=="function"?s(o):s,seriesConfig:r,dataset:a})})}))},[s,a,n,o,r,t]),{}};gs.params={dataset:!0,series:!0,colors:!0,theme:!0};const hx=[];gs.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:hx,colors:e.colors??fp,theme:e.theme??"light"})};gs.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,o)=>({series:{seriesConfig:o,processedSeries:gp({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:o,dataset:n})}});const yp=e=>e.series,Aa=fe([yp],e=>e.processedSeries),ys=fe([yp],e=>e.seriesConfig),px={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0};class bp{constructor(t){if(this.name=void 0,this.preventDefault=void 0,this.stopPropagation=void 0,this.preventIf=void 0,this.requiredKeys=void 0,this.keyboardManager=void 0,this.pointerMode=void 0,this.customData={},this.pointerManager=void 0,this.gesturesRegistry=void 0,this.element=void 0,this.state=void 0,this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in px)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,r,n,a){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=a;const o=`${this.name}ChangeOptions`;this.element.addEventListener(o,this.handleOptionsChange.bind(this));const s=`${this.name}ChangeState`;this.element.addEventListener(s,this.handleStateChange.bind(this))}handleOptionsChange(t){t&&t.detail&&this.updateOptions(t.detail)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode}handleStateChange(t){t&&t.detail&&this.updateState(t.detail)}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||this.element.contains(t.target)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t){if(!this.keyboardManager.areKeysPressed(this.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const r=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(n=>r[n])}isPointerTypeAllowed(t){return!this.pointerMode||this.pointerMode.length===0?!0:this.pointerMode.includes(t)}destroy(){const t=`${this.name}ChangeOptions`;this.element.removeEventListener(t,this.handleOptionsChange.bind(this));const r=`${this.name}ChangeState`;this.element.removeEventListener(r,this.handleStateChange.bind(this))}}class mx{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),a={gesture:r,element:t};n.add(a)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(a=>{a.gesture===r&&n.delete(a)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,a)=>(n[a.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(a=>a.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class fx{constructor(){this.pressedKeys=new Set,this.handleKeyDown=t=>{this.pressedKeys.add(t.key)},this.handleKeyUp=t=>{this.pressedKeys.delete(t.key)},this.clearKeys=()=>{this.pressedKeys.clear()},this.initialize()}initialize(){typeof window>"u"||(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}areKeysPressed(t){return!t||t.length===0?!0:t.every(r=>r==="ControlOrMeta"?this.pressedKeys.has("Control")||this.pressedKeys.has("Meta"):this.pressedKeys.has(r))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class gx{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=r=>{if(this.preventEventInterruption&&"pointerType"in r&&r.pointerType==="touch"){r.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),a=this.pointers.values().next().value;if(this.pointers.size>0&&a){Object.defineProperties(n,{clientX:{value:a.clientX},clientY:{value:a.clientY},pointerId:{value:a.pointerId},pointerType:{value:a.pointerType}});for(const[o,s]of this.pointers.entries()){const i=K({},s,{type:"forceCancel"});this.pointers.set(o,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:a}=r;if(n==="pointerdown"){if(this.pointers.set(a,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(a)}catch{}}else if(n==="pointermove")this.pointers.set(a,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(a)}catch{}this.pointers.set(a,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(a);return}this.notifyHandlers(r)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(r=>r(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class yx{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new mx,this.pointerManager=void 0,this.keyboardManager=new fx,this.pointerManager=new gx({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(r=>{this.addGestureTemplate(r)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,r,n){const a=this.elementGestureMap.get(r);if(!a||!a.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(o)}setGestureState(t,r,n){const a=this.elementGestureMap.get(r);if(!a||!a.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(o)}registerElement(t,r,n){if(Array.isArray(t))return t.forEach(o=>{const s=n==null?void 0:n[o];this.registerSingleGesture(o,r,s)}),r;const a=n==null?void 0:n[t];return this.registerSingleGesture(t,r,a),r}registerSingleGesture(t,r,n){const a=this.gestureTemplates.get(t);if(!a)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const o=this.elementGestureMap.get(r);o.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const s=a.clone(n);return s.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),o.set(t,s),!0}unregisterElement(t,r){const n=this.elementGestureMap.get(r);return!n||!n.has(t)?!1:(n.get(t).destroy(),n.delete(t),this.activeGesturesRegistry.unregisterElement(r),n.size===0&&this.elementGestureMap.delete(r),!0)}unregisterAllGestures(t){const r=this.elementGestureMap.get(t);if(r){for(const[,n]of r)n.destroy(),this.activeGesturesRegistry.unregisterElement(t);this.elementGestureMap.delete(t)}}destroy(){for(const[t]of this.elementGestureMap)this.unregisterAllGestures(t);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy()}}class _a extends bp{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,r,n,a){super.init(t,r,n,a),this.unregisterHandler=this.pointerManager.registerGestureHandler((o,s)=>this.handlePointerEvent(o,s))}updateOptions(t){super.updateOptions(t),this.minPointers=t.minPointers??this.minPointers,this.maxPointers=t.maxPointers??this.maxPointers}getRelevantPointers(t,r){return t.filter(n=>this.isPointerTypeAllowed(n.pointerType)&&(r===n.target||n.target===this.originalTarget||r===this.originalTarget||r.contains(n.target)))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function bx(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function li(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let a=n+1;a<e.length;a+=1)t+=bx({x:e[n].clientX,y:e[n].clientY},{x:e[a].clientX,y:e[a].clientY}),r+=1;return r>0?t/r:0}function Wt(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((r,n)=>(r.x+=n.clientX,r.y+=n.clientY,r),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function Tn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Ka=1e-5,rr=1e-5,yu=.15;function xx(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},o=vx(t,e),s=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=o||s==="horizontal"?Ka:yu,l=o?Ka:s==="horizontal"?yu:Ka;return Math.abs(r)>i&&(a.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(a.vertical=n>0?"down":"up"),a.mainAxis=o?"diagonal":s,a}function vx(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+rr&&a<=-22.5+rr||a>=22.5+rr&&a<=45+rr||a>=135+rr&&a<=157.5+rr||a>=-157.5+rr&&a<=-135+rr}function Sx(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const r=e.vertical===null||t.includes(e.vertical),n=e.horizontal===null||t.includes(e.horizontal);return r&&n}const Ox=0,wx=e=>e>Ox?1:e<-0?-1:0;class Ul extends _a{constructor(t){super(t),this.state={lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.handleElementEnterBound=void 0,this.handleElementLeaveBound=void 0,this.handleElementEnterBound=this.handleElementEnter.bind(this),this.handleElementLeaveBound=this.handleElementLeave.bind(this),this.threshold=t.threshold||0}clone(t){return new Ul(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,a){super.init(t,r,n,a),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());if(n.length>=this.minPointers&&n.length<=this.maxPointers){this.isActive=!0;const a={x:t.clientX,y:t.clientY};this.state.lastPosition=a,this.emitMoveEvent(this.element,"start",n,t),this.emitMoveEvent(this.element,"ongoing",n,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.emitMoveEvent(this.element,"end",n,t),this.resetState()}handlePointerEvent(t,r){if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(a)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(a,"end",n,r);return}const o={x:r.clientX,y:r.clientY};this.state.lastPosition=o,this.isActive||(this.isActive=!0,this.emitMoveEvent(a,"start",n,r)),this.emitMoveEvent(a,"ongoing",n,r)}emitMoveEvent(t,r,n,a){const o=this.state.lastPosition||Wt(n),s=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,activeGestures:s,customData:this.customData},l=Tn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class Dl extends _a{constructor(t){super(t),this.state={startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.direction=void 0,this.direction=t.direction||["up","down","left","right"],this.threshold=t.threshold||0}clone(t){return new Dl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=K({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancel(r.target,n,r);return}const a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.cancel(a,n,r);return}const o=this.getRelevantPointers(n,a);if(o.length<this.minPointers||o.length>this.maxPointers){this.cancel(a,o,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(o.forEach(s=>{this.state.startPointers.set(s.pointerId,s)}),this.originalTarget=a,this.state.startCentroid=Wt(o),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&o.length>=this.minPointers){const s=Wt(o),i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=xx(this.state.lastCentroid??this.state.startCentroid,s),d=this.state.lastCentroid?s.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?s.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&Sx(u,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(a,"start",o,r,s),this.emitPanEvent(a,"ongoing",o,r,s)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(a,"ongoing",o,r,s)),this.state.lastCentroid=s,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(o.filter(s=>s.type!=="pointerup"&&s.type!=="pointercancel").length<this.minPointers){const s=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(a,"cancel",o,r,s),this.emitPanEvent(a,"end",o,r,s),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,a,o){var S,E;if(!this.state.startCentroid)return;const s=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((E=this.state.lastDeltas)==null?void 0:E.y)??0,l=this.state.startPointers.values().next().value,c=l?(a.timeStamp-l.timeStamp)/1e3:0,u=c>0?s/c:0,d=c>0?i/c:0,h=Math.sqrt(u*u+d*d),p=this.gesturesRegistry.getActiveGestures(t),f={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,deltaX:s,deltaY:i,direction:this.state.lastDirection,velocityX:u,velocityY:d,velocity:h,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:p,customData:this.customData},m=Tn(this.name,r),b=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(b),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancel(t,r,n){if(this.isActive){const a=t??this.element;this.emitPanEvent(a,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(a,"end",r,n,this.state.lastCentroid)}this.resetState()}}class Ll extends _a{constructor(t){super(K({},t,{minPointers:t.minPointers??2})),this.state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.threshold=t.threshold??0}clone(t){return new Ll(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=K({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,r){const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&(this.emitPinchEvent(a,"cancel",n,r),this.resetState());return}const o=this.getRelevantPointers(n,a);switch(r.type){case"pointerdown":if(o.length>=2&&!this.isActive){const s=li(o);this.state.startDistance=s,this.state.lastDistance=s,this.state.lastTime=r.timeStamp,this.originalTarget=a}break;case"pointermove":if(this.state.startDistance&&o.length>=this.minPointers){const s=li(o),i=Math.abs(s-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?s/this.state.startDistance:1,c=l/this.state.lastScale;this.state.totalScale*=c;const u=(r.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const h=(s-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=s,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(a,"ongoing",o,r):(this.isActive=!0,this.emitPinchEvent(a,"start",o,r),this.emitPinchEvent(a,"ongoing",o,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const s=o.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(s.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(a,"cancel",o,r),this.emitPinchEvent(a,"end",o,r),this.resetState();else if(s.length>=2){const i=li(s);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const o=Wt(n),s=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:s,velocity:this.state.velocity,activeGestures:l,direction:wx(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Tn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class Bl extends _a{constructor(t){super(t),this.state={startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.duration=void 0,this.maxDistance=void 0,this.duration=t.duration??500,this.maxDistance=t.maxDistance??10}clone(t){return new Bl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=K({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancelPress(r.target,n,r);return}const a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&this.cancelPress(a,n,r);return}const o=this.getRelevantPointers(n,a);if(o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelPress(a,o,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Wt(o),this.state.lastPosition=K({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=a,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const s=this.state.lastPosition;this.emitPressEvent(a,"start",o,r,s),this.emitPressEvent(a,"ongoing",o,r,s)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=Wt(o);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(a,o,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const s=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(a,"end",o,r,s)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(a,o,r);break}}emitPressEvent(t,r,n,a,o){const s=this.gesturesRegistry.getActiveGestures(t),i=a.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,x:o.x,y:o.y,duration:i,activeGestures:s,customData:this.customData},c=Tn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,a),this.emitPressEvent(t??this.element,"end",r,n,a)}this.resetState()}}class Nl extends _a{constructor(t){super(t),this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.maxDistance=void 0,this.taps=void 0,this.maxDistance=t.maxDistance??10,this.taps=t.taps??1}clone(t){return new Nl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,r){const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a)return;const o=this.getRelevantPointers(n,a);if(this.shouldPreventGesture(a)||o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelTap(a,o,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=Wt(o),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=a);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=Wt(o);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(a,o,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const s=this.state.lastPosition||this.state.startCentroid;if(!s){this.cancelTap(a,o,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(a,o,r,s),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(a,o,r);break}}fireTapEvent(t,r,n,a){const o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const a=this.state.lastPosition||this.state.startCentroid,o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},i=Tn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(l)}this.resetState()}}class Fl extends bp{constructor(t){super(t),this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.sensitivity=void 0,this.max=void 0,this.min=void 0,this.initialDelta=void 0,this.invert=void 0,this.handleWheelEventBound=void 0,this.sensitivity=t.sensitivity??1,this.max=t.max??Number.MAX_SAFE_INTEGER,this.min=t.min??Number.MIN_SAFE_INTEGER,this.initialDelta=t.initialDelta??0,this.invert=t.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta,this.handleWheelEventBound=this.handleWheelEvent.bind(this)}clone(t){return new Fl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,a){super.init(t,r,n,a),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(a=>{this.state[a]<this.min&&(this.state[a]=this.min),this.state[a]>this.max&&(this.state[a]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?Wt(t):{x:r.clientX,y:r.clientY},a=this.gesturesRegistry.getActiveGestures(this.element),o={gestureName:this.name,centroid:n,target:r.target,srcEvent:r,phase:"ongoing",pointers:t,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:a,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const s=Tn(this.name,"ongoing"),i=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:o});this.element.dispatchEvent(i)}}const Yr=e=>e.preventDefault(),zl=({svgRef:e})=>{F.useEffect(()=>{const r=e.current;if(!r)return;const n=new yx({gestures:[new Dl({name:"pan",threshold:0,maxPointers:1}),new Ul({name:"move",preventIf:["pan","pinch"]}),new Ll({name:"pinch",threshold:5,preventIf:["pan"]}),new Fl({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Nl({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Bl({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=F.useCallback((r,n,a)=>{const o=e.current;return o==null||o.addEventListener(r,n,a),{cleanup:()=>o==null?void 0:o.removeEventListener(r,n)}},[e]);return F.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Yr),r==null||r.addEventListener("gesturechange",Yr),r==null||r.addEventListener("gestureend",Yr),()=>{r==null||r.removeEventListener("gesturestart",Yr),r==null||r.removeEventListener("gesturechange",Yr),r==null||r.removeEventListener("gestureend",Yr)}},[e]),{instance:{addInteractionListener:t}}};zl.params={};zl.getInitialState=()=>({});const Cx=[$l,kl,fs,gs,zl,ms],Px=["apiRef"],Tx=e=>{let{plugins:t}=e,r=cr(e.props,Px);const n={};t.forEach(s=>{Object.assign(n,s.params)});const a={};return Object.keys(r).forEach(s=>{const i=r[s];n[s]&&(a[s]=i)}),t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:s}):s,a)};let bu=0;function Rx(e,t,r){const n=hb(),a=F.useMemo(()=>[...Cx,...e],[e]),o=Tx({plugins:a,props:t});o.id=o.id??n;const i=F.useRef({}).current,l=_x(t.apiRef),c=F.useRef(null),u=F.useRef(null),d=F.useRef(null);if(d.current==null){bu+=1;const f={cacheKey:{id:bu}};a.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(o,f,r))}),d.current=new pb(f)}const h=f=>{const m=f({instance:i,params:o,plugins:a,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});m.publicAPI&&Object.assign(l.current,m.publicAPI),m.instance&&Object.assign(i,m.instance)};return a.forEach(h),{contextValue:F.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function Ax(e){return e.current==null&&(e.current={}),e}function _x(e){const t=F.useRef({});return e?Ax(e):t}const Gl=F.createContext(null);process.env.NODE_ENV!=="production"&&(Gl.displayName="ChartContext");const xu=new Set;function ha(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
116
|
-
`):e;xu.has(r)||(xu.add(r),t==="error"?console.error(r):console.warn(r))}function Ex(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:o="MUI X"}=e,[{initialDefaultValue:s,isControlled:i}]=F.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&ha([`${o}: A component is changing the ${i?"":"un"}controlled ${r} state of ${t} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"],"error"),JSON.stringify(s)!==JSON.stringify(a)&&ha([`${o}: A component is changing the default ${r} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const xp=process.env.NODE_ENV==="production"?()=>{}:Ex,vp=4,Sp=20+2*vp,Ix=40+2*vp,Vx="hover",Qa={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:Sp,showTooltip:Vx}},Hl=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Qa):K({axisId:t,axisDirection:r},Qa,e,{slider:K({},Qa.slider,{size:((n=e.slider)==null?void 0:n.preview)??Qa.slider.preview?Ix:Sp},e.slider)})};function Op(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:zb,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"bottom":"none",c=o.position??l,u=Wb+(o.label?up:0),d=o.id??`defaultized-x-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,height:o.height??u,zoom:Hl(o.zoom,d,"x")});if(c!=="none"&&(r[c]+=h.height,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return K({},h,{data:t.map(f=>f[i])})})}function wp(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Gb,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"left":"none",c=o.position??l,u=qb+(o.label?up:0),d=o.id??`defaultized-y-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,width:o.width??u,zoom:Hl(o.zoom,d,"y")});if(c!=="none"&&(r[c]+=h.width,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return K({},h,{data:t.map(f=>f[i])})})}function xo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Mx(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ql(e){let t,r,n;e.length!==2?(t=xo,r=(i,l)=>xo(e(i),l),n=(i,l)=>e(i)-l):(t=e===xo||e===Mx?e:jx,r=e,n=e);function a(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function s(i,l,c=0,u=i.length){const d=a(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:a,center:s,right:o}}function jx(){return 0}function kx(e){return e===null?NaN:+e}const $x=ql(xo),Cp=$x.right;ql(kx).center;class vu extends Map{constructor(t,r=Lx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(Su(this,t))}has(t){return super.has(Su(this,t))}set(t,r){return super.set(Ux(this,t),r)}delete(t){return super.delete(Dx(this,t))}}function Su({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Ux({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Dx({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Lx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Bx=Math.sqrt(50),Nx=Math.sqrt(10),Fx=Math.sqrt(2);function Mo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),s=o>=Bx?10:o>=Nx?5:o>=Fx?2:1;let i,l,c;return a<0?(c=Math.pow(10,-a)/s,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*s,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?Mo(e,t,r*2):[i,l,c]}function Hi(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,s]=n?Mo(t,e,r):Mo(e,t,r);if(!(o>=a))return[];const i=o-a+1,l=new Array(i);if(n)if(s<0)for(let c=0;c<i;++c)l[c]=(o-c)/-s;else for(let c=0;c<i;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<i;++c)l[c]=(a+c)/-s;else for(let c=0;c<i;++c)l[c]=(a+c)*s;return l}function qi(e,t,r){return t=+t,e=+e,r=+r,Mo(e,t,r)[2]}function Wi(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?qi(t,e,r):qi(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function zx(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function mr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Gx(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ou=Symbol("implicit");function jo(){var e=new vu,t=[],r=[],n=Ou;function a(o){let s=e.get(o);if(s===void 0){if(n!==Ou)return n;e.set(o,s=t.push(o)-1)}return r[s%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new vu;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return jo(t,r).unknown(n)},mr.apply(a,arguments),a}function Wl(){var e=jo().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,s,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=a<n,f=p?a:n,m=p?n:a;o=(m-f)/Math.max(1,h-l+c*2),i&&(o=Math.floor(o)),f+=(m-f-o*(h-l))*u,s=o*(1-l),i&&(f=Math.round(f),s=Math.round(s));var b=zx(h).map(function(S){return f+o*S});return r(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,i=!0,d()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(h){return arguments.length?(i=!!h,d()):i},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Wl(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},mr.apply(d(),arguments)}function Pp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Pp(t())},e}function Hx(){return Pp(Wl.apply(null,arguments).paddingInner(1))}function Jl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ea(){}var pa=.7,ko=1/pa,un="\\s*([+-]?\\d+)\\s*",ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qx=/^#([0-9a-f]{3,8})$/,Wx=new RegExp(`^rgb\\(${un},${un},${un}\\)$`),Jx=new RegExp(`^rgb\\(${kt},${kt},${kt}\\)$`),Yx=new RegExp(`^rgba\\(${un},${un},${un},${ma}\\)$`),Kx=new RegExp(`^rgba\\(${kt},${kt},${kt},${ma}\\)$`),Qx=new RegExp(`^hsl\\(${ma},${kt},${kt}\\)$`),Xx=new RegExp(`^hsla\\(${ma},${kt},${kt},${ma}\\)$`),wu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Jl(Ea,fa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cu,formatHex:Cu,formatHex8:Zx,formatHsl:ev,formatRgb:Pu,toString:Pu});function Cu(){return this.rgb().formatHex()}function Zx(){return this.rgb().formatHex8()}function ev(){return Rp(this).formatHsl()}function Pu(){return this.rgb().formatRgb()}function fa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Tu(t):r===3?new lt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Xa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Xa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wx.exec(e))?new lt(t[1],t[2],t[3],1):(t=Jx.exec(e))?new lt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Yx.exec(e))?Xa(t[1],t[2],t[3],t[4]):(t=Kx.exec(e))?Xa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Qx.exec(e))?_u(t[1],t[2]/100,t[3]/100,1):(t=Xx.exec(e))?_u(t[1],t[2]/100,t[3]/100,t[4]):wu.hasOwnProperty(e)?Tu(wu[e]):e==="transparent"?new lt(NaN,NaN,NaN,0):null}function Tu(e){return new lt(e>>16&255,e>>8&255,e&255,1)}function Xa(e,t,r,n){return n<=0&&(e=t=r=NaN),new lt(e,t,r,n)}function tv(e){return e instanceof Ea||(e=fa(e)),e?(e=e.rgb(),new lt(e.r,e.g,e.b,e.opacity)):new lt}function Ji(e,t,r,n){return arguments.length===1?tv(e):new lt(e,t,r,n??1)}function lt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Jl(lt,Ji,Tp(Ea,{brighter(e){return e=e==null?ko:Math.pow(ko,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pa:Math.pow(pa,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lt(Pr(this.r),Pr(this.g),Pr(this.b),$o(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ru,formatHex:Ru,formatHex8:rv,formatRgb:Au,toString:Au}));function Ru(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function rv(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Au(){const e=$o(this.opacity);return`${e===1?"rgb(":"rgba("}${Pr(this.r)}, ${Pr(this.g)}, ${Pr(this.b)}${e===1?")":`, ${e})`}`}function $o(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sr(e){return e=Pr(e),(e<16?"0":"")+e.toString(16)}function _u(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new wt(e,t,r,n)}function Rp(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);if(e instanceof Ea||(e=fa(e)),!e)return new wt;if(e instanceof wt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,i=o-a,l=(o+a)/2;return i?(t===o?s=(r-n)/i+(r<n)*6:r===o?s=(n-t)/i+2:s=(t-r)/i+4,i/=l<.5?o+a:2-o-a,s*=60):i=l>0&&l<1?0:s,new wt(s,i,l,e.opacity)}function nv(e,t,r,n){return arguments.length===1?Rp(e):new wt(e,t,r,n??1)}function wt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Jl(wt,nv,Tp(Ea,{brighter(e){return e=e==null?ko:Math.pow(ko,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pa:Math.pow(pa,e),new wt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new lt(ci(e>=240?e-240:e+120,a,n),ci(e,a,n),ci(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new wt(Eu(this.h),Za(this.s),Za(this.l),$o(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$o(this.opacity);return`${e===1?"hsl(":"hsla("}${Eu(this.h)}, ${Za(this.s)*100}%, ${Za(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Eu(e){return e=(e||0)%360,e<0?e+360:e}function Za(e){return Math.max(0,Math.min(1,e||0))}function ci(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Yl=e=>()=>e;function av(e,t){return function(r){return e+r*t}}function ov(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function sv(e){return(e=+e)==1?Ap:function(t,r){return r-t?ov(t,r,e):Yl(isNaN(t)?r:t)}}function Ap(e,t){var r=t-e;return r?av(e,r):Yl(isNaN(e)?t:e)}const Iu=function e(t){var r=sv(t);function n(a,o){var s=r((a=Ji(a)).r,(o=Ji(o)).r),i=r(a.g,o.g),l=r(a.b,o.b),c=Ap(a.opacity,o.opacity);return function(u){return a.r=s(u),a.g=i(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n}(1);function iv(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function lv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cv(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),s;for(s=0;s<n;++s)a[s]=bs(e[s],t[s]);for(;s<r;++s)o[s]=t[s];return function(i){for(s=0;s<n;++s)o[s]=a[s](i);return o}}function Kl(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Ct(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function uv(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=bs(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Yi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ui=new RegExp(Yi.source,"g");function dv(e){return function(){return e}}function hv(e){return function(t){return e(t)+""}}function pv(e,t){var r=Yi.lastIndex=ui.lastIndex=0,n,a,o,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Yi.exec(e))&&(a=ui.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),i[s]?i[s]+=o:i[++s]=o),(n=n[0])===(a=a[0])?i[s]?i[s]+=a:i[++s]=a:(i[++s]=null,l.push({i:s,x:Ct(n,a)})),r=ui.lastIndex;return r<t.length&&(o=t.slice(r),i[s]?i[s]+=o:i[++s]=o),i.length<2?l[0]?hv(l[0].x):dv(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)i[(d=l[u]).i]=d.x(c);return i.join("")})}function bs(e,t){var r=typeof t,n;return t==null||r==="boolean"?Yl(t):(r==="number"?Ct:r==="string"?(n=fa(t))?(t=n,Iu):pv:t instanceof fa?Iu:t instanceof Date?Kl:lv(t)?iv:Array.isArray(t)?cv:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?uv:Ct)(e,t)}function _p(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function mv(e){return function(){return e}}function fv(e){return+e}var Vu=[0,1];function gt(e){return e}function Ki(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:mv(isNaN(t)?NaN:.5)}function gv(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function yv(e,t,r){var n=e[0],a=e[1],o=t[0],s=t[1];return a<n?(n=Ki(a,n),o=r(s,o)):(n=Ki(n,a),o=r(o,s)),function(i){return o(n(i))}}function bv(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=Ki(e[s],e[s+1]),o[s]=r(t[s],t[s+1]);return function(i){var l=Cp(e,i,1,n)-1;return o[l](a[l](i))}}function xs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ql(){var e=Vu,t=Vu,r=bs,n,a,o,s=gt,i,l,c;function u(){var h=Math.min(e.length,t.length);return s!==gt&&(s=gv(e[0],e[h-1])),i=h>2?bv:yv,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?o:(l||(l=i(e.map(n),t,r)))(n(s(h)))}return d.invert=function(h){return s(a((c||(c=i(t,e.map(n),Ct)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,fv),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=_p,u()},d.clamp=function(h){return arguments.length?(s=h?!0:gt,u()):s!==gt},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,p){return n=h,a=p,u()}}function Ep(){return Ql()(gt,gt)}function xv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Uo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function fn(e){return e=Uo(Math.abs(e)),e?e[1]:NaN}function vv(e,t){return function(r,n){for(var a=r.length,o=[],s=0,i=e[0],l=0;a>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),o.push(r.substring(a-=i,a+i)),!((l+=i+1)>n));)i=e[s=(s+1)%e.length];return o.reverse().join(t)}}function Sv(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Ov=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ga(e){if(!(t=Ov.exec(e)))throw new Error("invalid format: "+e);var t;return new Xl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ga.prototype=Xl.prototype;function Xl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Xl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function wv(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Ip;function Cv(e,t){var r=Uo(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(Ip=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return o===s?n:o>s?n+new Array(o-s+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Uo(e,Math.max(0,t+o-1))[0]}function Mu(e,t){var r=Uo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const ju={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:xv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Mu(e*100,t),r:Mu,s:Cv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ku(e){return e}var $u=Array.prototype.map,Uu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Pv(e){var t=e.grouping===void 0||e.thousands===void 0?ku:vv($u.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?ku:Sv($u.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",i=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=ga(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,b=d.zero,S=d.width,E=d.comma,O=d.precision,w=d.trim,A=d.type;A==="n"?(E=!0,A="g"):ju[A]||(O===void 0&&(O=12),w=!0,A="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=m==="$"?r:m==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",T=m==="$"?n:/[%p]/.test(A)?s:"",V=ju[A],j=/[defgprs%]/.test(A);O=O===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function y(R){var z=C,I=T,G,ae,re;if(A==="c")I=V(R)+I,R="";else{R=+R;var te=R<0||1/R<0;if(R=isNaN(R)?l:V(Math.abs(R),O),w&&(R=wv(R)),te&&+R==0&&f!=="+"&&(te=!1),z=(te?f==="("?f:i:f==="-"||f==="("?"":f)+z,I=(A==="s"?Uu[8+Ip/3]:"")+I+(te&&f==="("?")":""),j){for(G=-1,ae=R.length;++G<ae;)if(re=R.charCodeAt(G),48>re||re>57){I=(re===46?a+R.slice(G+1):R.slice(G))+I,R=R.slice(0,G);break}}}E&&!b&&(R=t(R,1/0));var ee=z.length+R.length+I.length,se=ee<S?new Array(S-ee+1).join(h):"";switch(E&&b&&(R=t(se+R,se.length?S-I.length:1/0),se=""),p){case"<":R=z+R+I+se;break;case"=":R=z+se+R+I;break;case"^":R=se.slice(0,ee=se.length>>1)+z+R+I+se.slice(ee);break;default:R=se+z+R+I;break}return o(R)}return y.toString=function(){return d+""},y}function u(d,h){var p=c((d=ga(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(fn(h)/3)))*3,m=Math.pow(10,-f),b=Uu[8+f/3];return function(S){return p(m*S)+b}}return{format:c,formatPrefix:u}}var eo,Zl,Vp;Tv({thousands:",",grouping:[3],currency:["$",""]});function Tv(e){return eo=Pv(e),Zl=eo.format,Vp=eo.formatPrefix,eo}function Rv(e){return Math.max(0,-fn(Math.abs(e)))}function Av(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fn(t)/3)))*3-fn(Math.abs(e)))}function _v(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,fn(t)-fn(e))+1}function Ev(e,t,r,n){var a=Wi(e,t,r),o;switch(n=ga(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=Av(a,s))&&(n.precision=o),Vp(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=_v(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=Rv(a))&&(n.precision=o-(n.type==="%")*2);break}}return Zl(n)}function ec(e){var t=e.domain;return e.ticks=function(r){var n=t();return Hi(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Ev(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,s=n[a],i=n[o],l,c,u=10;for(i<s&&(c=s,s=i,i=c,c=a,a=o,o=c);u-- >0;){if(c=qi(s,i,r),c===l)return n[a]=s,n[o]=i,t(n);if(c>0)s=Math.floor(s/c)*c,i=Math.ceil(i/c)*c;else if(c<0)s=Math.ceil(s*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Mp(){var e=Ep();return e.copy=function(){return xs(e,Mp())},mr.apply(e,arguments),ec(e)}function jp(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],s;return o<a&&(s=r,r=n,n=s,s=a,a=o,o=s),e[r]=t.floor(a),e[n]=t.ceil(o),e}function Du(e){return Math.log(e)}function Lu(e){return Math.exp(e)}function Iv(e){return-Math.log(-e)}function Vv(e){return-Math.exp(-e)}function Mv(e){return isFinite(e)?+("1e"+e):e<0?0:e}function jv(e){return e===10?Mv:e===Math.E?Math.exp:t=>Math.pow(e,t)}function kv(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Bu(e){return(t,r)=>-e(-t,r)}function $v(e){const t=e(Du,Lu),r=t.domain;let n=10,a,o;function s(){return a=kv(n),o=jv(n),r()[0]<0?(a=Bu(a),o=Bu(o),e(Iv,Vv)):e(Du,Lu),t}return t.base=function(i){return arguments.length?(n=+i,s()):n},t.domain=function(i){return arguments.length?(r(i),s()):r()},t.ticks=i=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=a(c),p=a(u),f,m;const b=i==null?10:+i;let S=[];if(!(n%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<n;++f)if(m=h<0?f/o(-h):f*o(h),!(m<c)){if(m>u)break;S.push(m)}}else for(;h<=p;++h)for(f=n-1;f>=1;--f)if(m=h>0?f/o(-h):f*o(h),!(m<c)){if(m>u)break;S.push(m)}S.length*2<b&&(S=Hi(c,u,b))}else S=Hi(h,p,Math.min(p-h,b)).map(o);return d?S.reverse():S},t.tickFormat=(i,l)=>{if(i==null&&(i=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ga(l)).precision==null&&(l.trim=!0),l=Zl(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/o(Math.round(a(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(jp(r(),{floor:i=>o(Math.floor(a(i))),ceil:i=>o(Math.ceil(a(i)))})),t}function kp(){const e=$v(Ql()).domain([1,10]);return e.copy=()=>xs(e,kp()).base(e.base()),mr.apply(e,arguments),e}function Nu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Uv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Dv(e){return e<0?-e*e:e*e}function Lv(e){var t=e(gt,gt),r=1;function n(){return r===1?e(gt,gt):r===.5?e(Uv,Dv):e(Nu(r),Nu(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ec(t)}function tc(){var e=Lv(Ql());return e.copy=function(){return xs(e,tc()).exponent(e.exponent())},mr.apply(e,arguments),e}function Bv(){return tc.apply(null,arguments).exponent(.5)}function $p(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Cp(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return $p().domain(e).range(t).unknown(r)},mr.apply(a,arguments)}const di=new Date,hi=new Date;function He(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const s=a(o),i=a.ceil(o);return o-s<i-o?s:i},a.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),a.range=(o,s,i)=>{const l=[];if(o=a.ceil(o),i=i==null?1:Math.floor(i),!(o<s)||!(i>0))return l;let c;do l.push(c=new Date(+o)),t(o,i),e(o);while(c<o&&o<s);return l},a.filter=o=>He(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,i)=>{if(s>=s)if(i<0)for(;++i<=0;)for(;t(s,-1),!o(s););else for(;--i>=0;)for(;t(s,1),!o(s););}),r&&(a.count=(o,s)=>(di.setTime(+o),hi.setTime(+s),e(di),e(hi),Math.floor(r(di,hi))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?s=>n(s)%o===0:s=>a.count(0,s)%o===0):a)),a}const Do=He(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Do.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?He(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Do);Do.range;const zt=1e3,yt=zt*60,Gt=yt*60,Jt=Gt*24,rc=Jt*7,Fu=Jt*30,pi=Jt*365,Or=He(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getUTCSeconds());Or.range;const nc=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getMinutes());nc.range;const ac=He(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getUTCMinutes());ac.range;const oc=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt-e.getMinutes()*yt)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getHours());oc.range;const sc=He(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getUTCHours());sc.range;const Ia=He(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yt)/Jt,e=>e.getDate()-1);Ia.range;const vs=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jt,e=>e.getUTCDate()-1);vs.range;const Up=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jt,e=>Math.floor(e/Jt));Up.range;function Mr(e){return He(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*yt)/rc)}const Ss=Mr(0),Lo=Mr(1),Nv=Mr(2),Fv=Mr(3),gn=Mr(4),zv=Mr(5),Gv=Mr(6);Ss.range;Lo.range;Nv.range;Fv.range;gn.range;zv.range;Gv.range;function jr(e){return He(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/rc)}const Os=jr(0),Bo=jr(1),Hv=jr(2),qv=jr(3),yn=jr(4),Wv=jr(5),Jv=jr(6);Os.range;Bo.range;Hv.range;qv.range;yn.range;Wv.range;Jv.range;const ic=He(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ic.range;const lc=He(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());lc.range;const Yt=He(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Yt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Yt.range;const Kt=He(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Kt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Kt.range;function Dp(e,t,r,n,a,o){const s=[[Or,1,zt],[Or,5,5*zt],[Or,15,15*zt],[Or,30,30*zt],[o,1,yt],[o,5,5*yt],[o,15,15*yt],[o,30,30*yt],[a,1,Gt],[a,3,3*Gt],[a,6,6*Gt],[a,12,12*Gt],[n,1,Jt],[n,2,2*Jt],[r,1,rc],[t,1,Fu],[t,3,3*Fu],[e,1,pi]];function i(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),f=p?p.range(c,+u+1):[];return h?f.reverse():f}function l(c,u,d){const h=Math.abs(u-c)/d,p=ql(([,,b])=>b).right(s,h);if(p===s.length)return e.every(Wi(c/pi,u/pi,d));if(p===0)return Do.every(Math.max(Wi(c,u,d),1));const[f,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[Yv,Kv]=Dp(Kt,lc,Os,Up,sc,ac),[Qv,Xv]=Dp(Yt,ic,Ss,Ia,oc,nc);function mi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function fi(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Bn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Zv(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,s=e.shortDays,i=e.months,l=e.shortMonths,c=Nn(a),u=Fn(a),d=Nn(o),h=Fn(o),p=Nn(s),f=Fn(s),m=Nn(i),b=Fn(i),S=Nn(l),E=Fn(l),O={a:te,A:ee,b:se,B:H,c:null,d:Ju,e:Ju,f:O1,g:V1,G:j1,H:x1,I:v1,j:S1,L:Lp,m:w1,M:C1,p:X,q:le,Q:Qu,s:Xu,S:P1,u:T1,U:R1,V:A1,w:_1,W:E1,x:null,X:null,y:I1,Y:M1,Z:k1,"%":Ku},w={a:xe,A:Le,b:oe,B:be,c:null,d:Yu,e:Yu,f:L1,g:Y1,G:Q1,H:$1,I:U1,j:D1,L:Np,m:B1,M:N1,p:Se,q:me,Q:Qu,s:Xu,S:F1,u:z1,U:G1,V:H1,w:q1,W:W1,x:null,X:null,y:J1,Y:K1,Z:X1,"%":Ku},A={a:y,A:R,b:z,B:I,c:G,d:qu,e:qu,f:f1,g:Hu,G:Gu,H:Wu,I:Wu,j:d1,L:m1,m:u1,M:h1,p:j,q:c1,Q:y1,s:b1,S:p1,u:a1,U:o1,V:s1,w:n1,W:i1,x:ae,X:re,y:Hu,Y:Gu,Z:l1,"%":g1};O.x=C(r,O),O.X=C(n,O),O.c=C(t,O),w.x=C(r,w),w.X=C(n,w),w.c=C(t,w);function C(Z,ie){return function(de){var Y=[],we=-1,ge=0,Ye=Z.length,qe,ke,tr;for(de instanceof Date||(de=new Date(+de));++we<Ye;)Z.charCodeAt(we)===37&&(Y.push(Z.slice(ge,we)),(ke=zu[qe=Z.charAt(++we)])!=null?qe=Z.charAt(++we):ke=qe==="e"?" ":"0",(tr=ie[qe])&&(qe=tr(de,ke)),Y.push(qe),ge=we+1);return Y.push(Z.slice(ge,we)),Y.join("")}}function T(Z,ie){return function(de){var Y=Bn(1900,void 0,1),we=V(Y,Z,de+="",0),ge,Ye;if(we!=de.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(ie&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(ge=fi(Bn(Y.y,0,1)),Ye=ge.getUTCDay(),ge=Ye>4||Ye===0?Bo.ceil(ge):Bo(ge),ge=vs.offset(ge,(Y.V-1)*7),Y.y=ge.getUTCFullYear(),Y.m=ge.getUTCMonth(),Y.d=ge.getUTCDate()+(Y.w+6)%7):(ge=mi(Bn(Y.y,0,1)),Ye=ge.getDay(),ge=Ye>4||Ye===0?Lo.ceil(ge):Lo(ge),ge=Ia.offset(ge,(Y.V-1)*7),Y.y=ge.getFullYear(),Y.m=ge.getMonth(),Y.d=ge.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Ye="Z"in Y?fi(Bn(Y.y,0,1)).getUTCDay():mi(Bn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Ye+5)%7:Y.w+Y.U*7-(Ye+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,fi(Y)):mi(Y)}}function V(Z,ie,de,Y){for(var we=0,ge=ie.length,Ye=de.length,qe,ke;we<ge;){if(Y>=Ye)return-1;if(qe=ie.charCodeAt(we++),qe===37){if(qe=ie.charAt(we++),ke=A[qe in zu?ie.charAt(we++):qe],!ke||(Y=ke(Z,de,Y))<0)return-1}else if(qe!=de.charCodeAt(Y++))return-1}return Y}function j(Z,ie,de){var Y=c.exec(ie.slice(de));return Y?(Z.p=u.get(Y[0].toLowerCase()),de+Y[0].length):-1}function y(Z,ie,de){var Y=p.exec(ie.slice(de));return Y?(Z.w=f.get(Y[0].toLowerCase()),de+Y[0].length):-1}function R(Z,ie,de){var Y=d.exec(ie.slice(de));return Y?(Z.w=h.get(Y[0].toLowerCase()),de+Y[0].length):-1}function z(Z,ie,de){var Y=S.exec(ie.slice(de));return Y?(Z.m=E.get(Y[0].toLowerCase()),de+Y[0].length):-1}function I(Z,ie,de){var Y=m.exec(ie.slice(de));return Y?(Z.m=b.get(Y[0].toLowerCase()),de+Y[0].length):-1}function G(Z,ie,de){return V(Z,t,ie,de)}function ae(Z,ie,de){return V(Z,r,ie,de)}function re(Z,ie,de){return V(Z,n,ie,de)}function te(Z){return s[Z.getDay()]}function ee(Z){return o[Z.getDay()]}function se(Z){return l[Z.getMonth()]}function H(Z){return i[Z.getMonth()]}function X(Z){return a[+(Z.getHours()>=12)]}function le(Z){return 1+~~(Z.getMonth()/3)}function xe(Z){return s[Z.getUTCDay()]}function Le(Z){return o[Z.getUTCDay()]}function oe(Z){return l[Z.getUTCMonth()]}function be(Z){return i[Z.getUTCMonth()]}function Se(Z){return a[+(Z.getUTCHours()>=12)]}function me(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var ie=C(Z+="",O);return ie.toString=function(){return Z},ie},parse:function(Z){var ie=T(Z+="",!1);return ie.toString=function(){return Z},ie},utcFormat:function(Z){var ie=C(Z+="",w);return ie.toString=function(){return Z},ie},utcParse:function(Z){var ie=T(Z+="",!0);return ie.toString=function(){return Z},ie}}}var zu={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,e1=/^%/,t1=/[\\^$*+?|[\]().{}]/g;function ve(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function r1(e){return e.replace(t1,"\\$&")}function Nn(e){return new RegExp("^(?:"+e.map(r1).join("|")+")","i")}function Fn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function n1(e,t,r){var n=Je.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function a1(e,t,r){var n=Je.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function o1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function s1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function i1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Gu(e,t,r){var n=Je.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Hu(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function l1(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function c1(e,t,r){var n=Je.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function u1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function qu(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function d1(e,t,r){var n=Je.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Wu(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function h1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function p1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function m1(e,t,r){var n=Je.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function f1(e,t,r){var n=Je.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function g1(e,t,r){var n=e1.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function y1(e,t,r){var n=Je.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function b1(e,t,r){var n=Je.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Ju(e,t){return ve(e.getDate(),t,2)}function x1(e,t){return ve(e.getHours(),t,2)}function v1(e,t){return ve(e.getHours()%12||12,t,2)}function S1(e,t){return ve(1+Ia.count(Yt(e),e),t,3)}function Lp(e,t){return ve(e.getMilliseconds(),t,3)}function O1(e,t){return Lp(e,t)+"000"}function w1(e,t){return ve(e.getMonth()+1,t,2)}function C1(e,t){return ve(e.getMinutes(),t,2)}function P1(e,t){return ve(e.getSeconds(),t,2)}function T1(e){var t=e.getDay();return t===0?7:t}function R1(e,t){return ve(Ss.count(Yt(e)-1,e),t,2)}function Bp(e){var t=e.getDay();return t>=4||t===0?gn(e):gn.ceil(e)}function A1(e,t){return e=Bp(e),ve(gn.count(Yt(e),e)+(Yt(e).getDay()===4),t,2)}function _1(e){return e.getDay()}function E1(e,t){return ve(Lo.count(Yt(e)-1,e),t,2)}function I1(e,t){return ve(e.getFullYear()%100,t,2)}function V1(e,t){return e=Bp(e),ve(e.getFullYear()%100,t,2)}function M1(e,t){return ve(e.getFullYear()%1e4,t,4)}function j1(e,t){var r=e.getDay();return e=r>=4||r===0?gn(e):gn.ceil(e),ve(e.getFullYear()%1e4,t,4)}function k1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ve(t/60|0,"0",2)+ve(t%60,"0",2)}function Yu(e,t){return ve(e.getUTCDate(),t,2)}function $1(e,t){return ve(e.getUTCHours(),t,2)}function U1(e,t){return ve(e.getUTCHours()%12||12,t,2)}function D1(e,t){return ve(1+vs.count(Kt(e),e),t,3)}function Np(e,t){return ve(e.getUTCMilliseconds(),t,3)}function L1(e,t){return Np(e,t)+"000"}function B1(e,t){return ve(e.getUTCMonth()+1,t,2)}function N1(e,t){return ve(e.getUTCMinutes(),t,2)}function F1(e,t){return ve(e.getUTCSeconds(),t,2)}function z1(e){var t=e.getUTCDay();return t===0?7:t}function G1(e,t){return ve(Os.count(Kt(e)-1,e),t,2)}function Fp(e){var t=e.getUTCDay();return t>=4||t===0?yn(e):yn.ceil(e)}function H1(e,t){return e=Fp(e),ve(yn.count(Kt(e),e)+(Kt(e).getUTCDay()===4),t,2)}function q1(e){return e.getUTCDay()}function W1(e,t){return ve(Bo.count(Kt(e)-1,e),t,2)}function J1(e,t){return ve(e.getUTCFullYear()%100,t,2)}function Y1(e,t){return e=Fp(e),ve(e.getUTCFullYear()%100,t,2)}function K1(e,t){return ve(e.getUTCFullYear()%1e4,t,4)}function Q1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?yn(e):yn.ceil(e),ve(e.getUTCFullYear()%1e4,t,4)}function X1(){return"+0000"}function Ku(){return"%"}function Qu(e){return+e}function Xu(e){return Math.floor(+e/1e3)}var Kr,zp,Gp;Z1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Z1(e){return Kr=Zv(e),zp=Kr.format,Kr.parse,Gp=Kr.utcFormat,Kr.utcParse,Kr}function eS(e){return new Date(e)}function tS(e){return e instanceof Date?+e:+new Date(+e)}function cc(e,t,r,n,a,o,s,i,l,c){var u=Ep(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),b=c("%I %p"),S=c("%a %d"),E=c("%b %d"),O=c("%B"),w=c("%Y");function A(C){return(l(C)<C?p:i(C)<C?f:s(C)<C?m:o(C)<C?b:n(C)<C?a(C)<C?S:E:r(C)<C?O:w)(C)}return u.invert=function(C){return new Date(d(C))},u.domain=function(C){return arguments.length?h(Array.from(C,tS)):h().map(eS)},u.ticks=function(C){var T=h();return e(T[0],T[T.length-1],C??10)},u.tickFormat=function(C,T){return T==null?A:c(T)},u.nice=function(C){var T=h();return(!C||typeof C.range!="function")&&(C=t(T[0],T[T.length-1],C??10)),C?h(jp(T,C)):u},u.copy=function(){return xs(u,cc(e,t,r,n,a,o,s,i,l,c))},u}function Hp(){return mr.apply(cc(Qv,Xv,Yt,ic,Ss,Ia,oc,nc,Or,zp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function rS(){return mr.apply(cc(Yv,Kv,Kt,lc,Os,vs,sc,ac,Or,Gp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nS(){var e=0,t=1,r,n,a,o,s=gt,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:s(a===0?.5:(d=(o(d)-r)*a,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(i=!!d,c):i},c.interpolator=function(d){return arguments.length?(s=d,c):s};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,s=d(p,f),c):[s(0),s(1)]}}return c.range=u(bs),c.rangeRound=u(_p),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),c}}function aS(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function qp(){var e=ec(nS()(gt));return e.copy=function(){return aS(e,qp())},Gx.apply(e,arguments)}function oS(e,t){return function(n,a){return a.location==="tick"?a.scale.tickFormat(e)(n):a.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function sS(e){return e.scaleType==="band"}function iS(e){return e.scaleType==="point"}function lS(e){return e.type==="piecewise"?$p(e.thresholds,e.colors):qp([e.min??0,e.max??100],e.color)}function No(e){return e.values?jo(e.values,e.colors).unknown(e.unknownColor??null):jo(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function vo(e){return e.type==="ordinal"?No(e):lS(e)}function cS(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:a,domain:o}=e,s=r===void 0?999:Math.floor(Math.abs(o[1]-o[0])/r),i=t===void 0?2:Math.ceil(Math.abs(o[1]-o[0])/t),l=n??Math.floor(Math.abs(a[1]-a[0])/50);return Math.min(s,Math.max(i,l))}function uS(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Qi(e,t,r){switch(e){case"log":return kp(t,r);case"pow":return tc(t,r);case"sqrt":return Bv(t,r);case"time":return Hp(t,r);case"utc":return rS(t,r);default:return Mp(t,r)}}const Zu=e=>(e==null?void 0:e[0])instanceof Date;function ed(e,t){const r=Hp(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const gi=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],a=e[0]-t[0]*r/n,o=e[1]+(100-t[1])*r/n;return[a,o]};let td,rd;class dS{constructor(){if(this.types=new Set,td)throw new Error("You can only create one instance!");td=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class hS{constructor(){if(this.types=new Set,rd)throw new Error("You can only create one instance!");rd=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const ws=new dS;ws.addType("bar");ws.addType("line");ws.addType("scatter");const pS=new hS;pS.addType("radar");function Wp(e){return ws.getTypes().has(e)}const mS=(e,t,r,n,a,o,s,i)=>{var f;const l=n==="x"?a[t].xExtremumGetter:a[t].yExtremumGetter,c=((f=s[t])==null?void 0:f.series)??{},[u,d]=(l==null?void 0:l({series:c,axis:r,axisIndex:o,isDefaultAxis:o===0,getFilters:i}))??[1/0,-1/0],[h,p]=e;return[Math.min(u,h),Math.max(d,p)]},Jp=(e,t,r,n,a,o)=>{const i=Object.keys(r).filter(Wp).reduce((l,c)=>mS(l,c,e,t,r,n,a,o),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},fS=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Wp).forEach(s=>{var c,u,d;const i=((c=r[s])==null?void 0:c.series)??{},l=(d=(u=t[s]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&a.add(h??n)})}),a},gS=(e,t,r,n)=>{var a;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const o of((a=n.line)==null?void 0:a.seriesOrder)??[]){const s=n.line.series[o];if(s.xAxisId===e.id||s.xAxisId===void 0&&r===0)return"strict"}return"nice"};function yS(e,t,r){const n=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return r.reverse?[n[1],n[0]]:n}const bS=.2,xS=.1;function Yp({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:a,zoomMap:o,zoomOptions:s,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=fS(a,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,f=s==null?void 0:s[p.id],m=o==null?void 0:o.get(p.id),b=m?[m.start,m.end]:[0,100],S=yS(e,a,p),[E,O]=Jp(p,a,n,h,t,m===void 0&&!f?i:void 0),w=!p.ignoreTooltip&&c.has(p.id),A=p.data??[];if(sS(p)){const te=p.categoryGapRatio??bS,ee=p.barGapRatio??xS,se=a==="y"?[S[1],S[0]]:S,H=gi(se,b);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:te,barGapRatio:ee,triggerTooltip:w},p,{data:A,scale:Wl(p.data,H).paddingInner(te).paddingOuter(te/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?No(K({values:p.data},p.colorMap)):vo(p.colorMap))}),Zu(p.data)){const X=ed(p,se);u[p.id].valueFormatter=p.valueFormatter??X}}if(iS(p)){const te=a==="y"?[...S].reverse():S,ee=gi(te,b);if(u[p.id]=K({offset:0,height:0,triggerTooltip:w},p,{data:A,scale:Hx(p.data,ee),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?No(K({values:p.data},p.colorMap)):vo(p.colorMap))}),Zu(p.data)){const se=ed(p,te);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const C=p.scaleType??"linear",T=l?gS(p,a,h,t):p.domainLimit??"nice",V=[p.min??E,p.max??O];if(typeof T=="function"){const{min:te,max:ee}=T(E,O);V[0]=te,V[1]=ee}const j=cS(K({},p,{range:S,domain:V})),y=uS(j,b),R=gi(S,b),z=Qi(C,V,R),I=T==="nice"?z.nice(j):z,[G,ae]=I.domain(),re=[p.min??G,p.max??ae];u[p.id]=K({offset:0,height:0,triggerTooltip:w},p,{data:A,scaleType:C,scale:I.domain(re),tickNumber:y,colorScale:p.colorMap&&vo(p.colorMap),valueFormatter:p.valueFormatter??oS(y,Qi(C,S.map(te=>z.invert(te)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function vS(e){return e!=null}function Kp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(o,s)=>{var b;const i=t[o.id];if(!i||i.filterMode!=="discard")return null;const l=e==null?void 0:e.get(o.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let c=[];const u=o.scaleType;u==="point"||u==="band"?c=[0,(((b=o.data)==null?void 0:b.length)??1)-1]:c=Jp(o,a,r,s,n);let d,h;[d,h]=Qi(!u||u==="band"||u==="point"?"linear":u,c,[0,100]).nice().domain(),d=d instanceof Date?d.getTime():d,h=h instanceof Date?h.getTime():h;const f=d+l.start*(h-d)/100,m=d+l.end*(h-d)/100;return(S,E)=>{var w;const O=S[a]??((w=o.data)==null?void 0:w[E]);return O==null?!0:o.scaleType==="point"||o.scaleType==="band"||typeof O=="string"?E>=f&&E<=m:O>=f&&O<=m}}}const SS=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:a})=>(o,s)=>{var c,u;return!(t===r?n:r)||a?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,o,s))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(vS).every(d=>d(o,s))},nd=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:o}=n,s=Hl(a,o,e);return s&&(r[o]=s),r},{}),OS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},Qp=e=>e.zoom;fe([Qp],e=>e==null?void 0:e.isInteracting);const Cs=fe([Qp],e=>(e==null?void 0:e.zoomData)&&OS(e==null?void 0:e.zoomData)),Va=fe([Cn,Pn],(e,t)=>K({},nd("x")(e),nd("y")(t)));fe([Va,(e,t)=>t],(e,t)=>e[t]);const wS=fe([Cs,Va,ys,Aa],(e,t,r,n)=>e&&t&&Kp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),CS=fe([Cs,Va,ys,Aa],(e,t,r,n)=>e&&t&&Kp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Xp=fe([wS,CS,Cn,Pn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const a=r==null?void 0:r.reduce((s,i,l)=>{const c=e(i,l);return c!==null&&(s[i.id]=c),s},{}),o=n==null?void 0:n.reduce((s,i,l)=>{const c=t(i,l);return c!==null&&(s[i.id]=c),s},{});if(!(Object.keys(a??{}).length===0&&Object.keys(o??{}).length===0))return SS(K({},a,o))}),kr=fe([Cn,Ra,Aa,ys,Cs,Va,Xp,mp],(e,t,r,n,a,o,s,i)=>Yp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i})),$r=fe([Pn,Ra,Aa,ys,Cs,Va,Xp,mp],(e,t,r,n,a,o,s,i)=>Yp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i}));fe([kr,$r,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));fe([Cn,Pn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(a=>a.id===r))??(t==null?void 0:t.find(a=>a.id===r))??null;if(n)return n});function Zp(e){return e.bandwidth!==void 0}function Qr(e){return e instanceof Date?e.getTime():e}function bn(e,t){const{scale:r,data:n,reverse:a}=e;if(!Zp(r)){const s=r.invert(t);if(n===void 0)return-1;const i=Qr(s);return n==null?void 0:n.findIndex((c,u)=>{const d=Qr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-Qr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(Qr(s)-d)<Math.abs(Qr(s)-Qr(n[u+1])))})}const o=r.bandwidth()===0?Math.floor((t-Math.min(...r.range())+r.step()/2)/r.step()):Math.floor((t-Math.min(...r.range()))/r.step());return o<0||o>=n.length?-1:a?n.length-1-o:o}function ad(e,t,r){const{scale:n,data:a}=e;if(!Zp(n)){const o=n.invert(t);return r<0?o:a[r]}return r<0||r>=a.length?null:a[r]}function od(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Ht(e){const t=F.useRef(e);return $t(()=>{t.current=e}),F.useRef((...r)=>(0,t.current)(...r)).current}const PS=Object.is;function em(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const a in e)if(r+=1,!PS(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const uc=({store:e})=>{const t=Ht(function(){e.update(s=>K({},s,{interaction:{pointer:null,item:null}}))}),r=Ht(function(s){e.update(i=>{const l=i.interaction.item;return s?l===null||Object.keys(s).some(c=>s[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=Ht(function(s){e.update(i=>em(i.interaction.item,s)?i:K({},i,{interaction:K({},i.interaction,{item:s})}))}),a=Ht(function(s){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};uc.getInitialState=()=>({interaction:{item:null,pointer:null}});uc.params={};const dc=e=>e.interaction,TS=fe([dc],e=>e!==void 0),RS=fe([dc],e=>(e==null?void 0:e.item)??null),tm=fe([dc],e=>(e==null?void 0:e.pointer)??null),Ps=fe([tm],e=>e&&e.x),Ts=fe([tm],e=>e&&e.y);fe([RS],e=>e!==null);function sa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const a=e.length;if(a!==t.length)return!1;for(let o=0;o<a;o+=1)if(!sa(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let o=0;o<a.length;o+=1)if(!t.has(a[o][0]))return!1;for(let o=0;o<a.length;o+=1){const s=a[o];if(!sa(s[1],t.get(s[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let o=0;o<a.length;o+=1)if(!t.has(a[o][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const a=e.length;if(a!==t.length)return!1;for(let o=0;o<a;o+=1)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let a=0;a<n;a+=1)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(let a=0;a<n;a+=1){const o=r[a];if(!sa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}const Rs=(e,t)=>t;function Xi(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>bn(t.axis[n],e)):bn(t.axis[r],e)}const rm=(e,t,r)=>{if(e===null)return null;const n=Xi(e,t,r);return n===-1?null:n},AS=fe([Ps,kr,Rs],rm),_S=fe([Ts,$r,Rs],rm),ES=fe([Ps,Ts,kr,$r],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Xi(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Xi(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function nm(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,o)=>ad(t.axis[a],e,r[o])):ad(t.axis[n],e,r)}fe([Ps,kr,AS,Rs],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:nm(e,t,r,n));fe([Ts,$r,_S,Rs],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:nm(e,t,r,n));const IS=fe([Ps,kr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:sa}}),VS=fe([Ts,$r],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:sa}});fe([IS,VS],(e,t)=>e.length>0||t.length>0);const sd={};function MS(e,t){const r=F.useRef(sd);return r.current===sd&&(r.current=e(t)),r}const jS=()=>{};function kS(e,t,r,n){const a=MS($S,{store:e,selector:t,skip:n}).current;a.effect=r,F.useEffect(a.onMount(n),[n])}function $S(e){const{store:t,selector:r,skip:n}=e;let a=!1,o;const s=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(o,c),o=c}))},i={effect:jS,dispose:null,onMount:l=>()=>{if(!l)return a||(a=!0,o=r(t.value)),s(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(a=!0,o=r(t.value),s()),i}const As=({params:e,store:t,seriesConfig:r,svgRef:n,instance:a})=>{const{xAxis:o,yAxis:s,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const O=[...o??[],...s??[]].filter(A=>A.id).map(A=>A.id),w=new Set(O.filter((A,C)=>O.indexOf(A)!==C));w.size>0&&ha([`MUI X Charts: The following axis ids are duplicated: ${Array.from(w).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
117
|
-
`),"error")}const c=it(t,Ra),u=it(t,Aa),d=it(t,TS),{axis:h,axisIds:p}=it(t,kr),{axis:f,axisIds:m}=it(t,$r);xp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),$t(()=>{e.highlightedAxis!==void 0&&t.update(O=>O.controlledCartesianAxisHighlight===e.highlightedAxis?O:K({},O,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const b=F.useRef(!0);F.useEffect(()=>{if(b.current){b.current=!1;return}t.update(O=>K({},O,{cartesianAxis:K({},O.cartesianAxis,{x:Op(o,i),y:wp(s,i)})}))},[r,c,o,s,i,t]);const S=p[0],E=m[0];return kS(t,ES,(O,w)=>{if(!Object.is(O,w)){if(O.length!==w.length){l(w);return}O!=null&&O.some(({axisId:A,dataIndex:C},T)=>w[T].axisId!==A||w[T].dataIndex!==C)&&l(w)}},!l),F.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const w=a.addInteractionListener("moveEnd",R=>{var z;R.detail.activeGestures.pan||(z=a.cleanInteraction)==null||z.call(a)}),A=a.addInteractionListener("panEnd",R=>{var z;R.detail.activeGestures.move||(z=a.cleanInteraction)==null||z.call(a)}),C=a.addInteractionListener("quickPressEnd",R=>{var z;!R.detail.activeGestures.move&&!R.detail.activeGestures.pan&&((z=a.cleanInteraction)==null||z.call(a))}),T=R=>{var ae,re;const z=R.detail.srcEvent,I=R.detail.target,G=od(O,z);if(R.detail.srcEvent.buttons>=1&&(I!=null&&I.hasPointerCapture(R.detail.srcEvent.pointerId))&&!(I!=null&&I.closest("[data-charts-zoom-slider]"))&&(I==null||I.releasePointerCapture(R.detail.srcEvent.pointerId)),!a.isPointInside(G.x,G.y,I)){(ae=a.cleanInteraction)==null||ae.call(a);return}(re=a.setPointerCoordinate)==null||re.call(a,G)},V=a.addInteractionListener("move",T),j=a.addInteractionListener("pan",T),y=a.addInteractionListener("quickPress",T);return()=>{V.cleanup(),w.cleanup(),j.cleanup(),A.cleanup(),y.cleanup(),C.cleanup()}},[n,t,h,S,f,E,a,e.disableAxisListener,d]),F.useEffect(()=>{const O=n.current,w=e.onAxisClick;if(O===null||!w)return()=>{};const A=a.addInteractionListener("tap",C=>{let T=null,V=!1;const j=od(O,C.detail.srcEvent),y=bn(h[S],j.x);V=y!==-1,T=V?y:bn(f[E],j.y);const R=V?p[0]:m[0];if(T==null||T===-1)return;const z=(V?h:f)[R].data[T],I={};Object.keys(u).filter(G=>["bar","line"].includes(G)).forEach(G=>{var ae;(ae=u[G])==null||ae.seriesOrder.forEach(re=>{const te=u[G].series[re],ee=te.xAxisId,se=te.yAxisId,H=V?ee:se;(H===void 0||H===R)&&(I[re]=te.data[T])})}),w(C.detail.srcEvent,{dataIndex:T,axisValue:z,seriesValues:I})});return()=>{A.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,E,a]),{}};As.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};As.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??fp,theme:e.theme??"light",defaultizedXAxis:Op(e.xAxis,e.dataset),defaultizedYAxis:wp(e.yAxis,e.dataset)});As.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function id(e,t){return e.id!==void 0?e:K({id:t},e)}function ld(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?No(K({values:e.data},e.colorMap)):vo(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function am(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((a,o)=>{const s=a.dataKey,i=a.id??`defaultized-z-axis-${o}`;if(s===void 0||a.data!==void 0){r[i]=ld(id(a,i)),n.push(i);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");r[i]=ld(id(K({},a,{data:t.map(l=>l[s])}),i)),n.push(i)}),{axis:r,axisIds:n}}const hc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=F.useRef(!0);return F.useEffect(()=>{if(a.current){a.current=!1;return}t.update(o=>K({},o,{zAxis:am(r,n)}))},[r,n,t]),{}};hc.params={zAxis:!0,dataset:!0};hc.getInitialState=e=>({zAxis:am(e.zAxis,e.dataset)});const US=e=>e,DS=fe([US],e=>e.zAxis),_s=({store:e,params:t})=>{xp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),$t(()=>{e.update(a=>a.highlight.item===t.highlightedItem?a:K({},a,{highlight:K({},a.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=Ht(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(o=>K({},o,{highlight:{item:null}}))}),n=Ht(a=>{var s;const o=e.getSnapshot().highlight.item;em(o,a)||((s=t.onHighlightChange)==null||s.call(t,a),e.update(i=>K({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};_s.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});_s.getInitialState=e=>({highlight:{item:e.highlightedItem}});_s.params={highlightedItem:!0,onHighlightChange:!0};const cd=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},om=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,a=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),o=a?(l=t.data)==null?void 0:l.filter((c,u)=>a({x:null,y:null},u)):t.data,s=Math.min(...o??[]),i=Math.max(...o??[]);return[s,i]},sm=e=>t=>{const{series:r,axis:n,getFilters:a,isDefaultAxis:o}=t;return Object.keys(r).filter(s=>{const i=e==="x"?r[s].xAxisId:r[s].yAxisId;return i===n.id||o&&i===void 0}).reduce((s,i)=>{const{stackedData:l}=r[i],c=a==null?void 0:a({currentAxisId:n.id,isDefaultAxis:o,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(cd(p[0],e),f)||!c(cd(p[1],e),f))?h:[Math.min(...p,h[0]),Math.max(...p,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,s[0]),Math.max(d,s[1])]},[1/0,-1/0])},LS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?sm("x")(e):om(e),BS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?om(e):sm("y")(e);function Ge(e){return function(){return e}}const ud=Math.abs,Ze=Math.atan2,gr=Math.cos,NS=Math.max,yi=Math.min,_t=Math.sin,sn=Math.sqrt,ot=1e-12,ya=Math.PI,Fo=ya/2,So=2*ya;function FS(e){return e>1?0:e<-1?ya:Math.acos(e)}function dd(e){return e>=1?Fo:e<=-1?-Fo:Math.asin(e)}const Zi=Math.PI,el=2*Zi,br=1e-6,zS=el-br;function im(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function GS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return im;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class HS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?im:GS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+s}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,i=this._y1,l=n-t,c=a-r,u=s-t,d=i-r,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>br)if(!(Math.abs(d*l-c*u)>br)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,f=a-i,m=l*l+c*c,b=p*p+f*f,S=Math.sqrt(m),E=Math.sqrt(h),O=o*Math.tan((Zi-Math.acos((m+h-b)/(2*S*E)))/2),w=O/E,A=O/S;Math.abs(w-1)>br&&this._append`L${t+w*u},${r+w*d}`,this._append`A${o},${o},0,0,${+(d*p>u*f)},${this._x1=t+A*l},${this._y1=r+A*c}`}}arc(t,r,n,a,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(a),l=n*Math.sin(a),c=t+i,u=r+l,d=1^s,h=s?a-o:o-a;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>br||Math.abs(this._y1-u)>br)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%el+el),h>zS?this._append`A${n},${n},0,1,${d},${t-i},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:h>br&&this._append`A${n},${n},0,${+(h>=Zi)},${d},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function qS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new HS(t)}function WS(e){return e.innerRadius}function JS(e){return e.outerRadius}function YS(e){return e.startAngle}function KS(e){return e.endAngle}function QS(e){return e&&e.padAngle}function XS(e,t,r,n,a,o,s,i){var l=r-e,c=n-t,u=s-a,d=i-o,h=d*l-u*c;if(!(h*h<ot))return h=(u*(t-o)-d*(e-a))/h,[e+h*l,t+h*c]}function to(e,t,r,n,a,o,s){var i=e-r,l=t-n,c=(s?o:-o)/sn(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,b=(h+f)/2,S=(p+m)/2,E=f-h,O=m-p,w=E*E+O*O,A=a-o,C=h*m-f*p,T=(O<0?-1:1)*sn(NS(0,A*A*w-C*C)),V=(C*O-E*T)/w,j=(-C*E-O*T)/w,y=(C*O+E*T)/w,R=(-C*E+O*T)/w,z=V-b,I=j-S,G=y-b,ae=R-S;return z*z+I*I>G*G+ae*ae&&(V=y,j=R),{cx:V,cy:j,x01:-u,y01:-d,x11:V*(a/A-1),y11:j*(a/A-1)}}function lm(){var e=WS,t=JS,r=Ge(0),n=null,a=YS,o=KS,s=QS,i=null,l=qS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=a.apply(this,arguments)-Fo,m=o.apply(this,arguments)-Fo,b=ud(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>ot))i.moveTo(0,0);else if(b>So-ot)i.moveTo(p*gr(f),p*_t(f)),i.arc(0,0,p,f,m,!S),h>ot&&(i.moveTo(h*gr(m),h*_t(m)),i.arc(0,0,h,m,f,S));else{var E=f,O=m,w=f,A=m,C=b,T=b,V=s.apply(this,arguments)/2,j=V>ot&&(n?+n.apply(this,arguments):sn(h*h+p*p)),y=yi(ud(p-h)/2,+r.apply(this,arguments)),R=y,z=y,I,G;if(j>ot){var ae=dd(j/h*_t(V)),re=dd(j/p*_t(V));(C-=ae*2)>ot?(ae*=S?1:-1,w+=ae,A-=ae):(C=0,w=A=(f+m)/2),(T-=re*2)>ot?(re*=S?1:-1,E+=re,O-=re):(T=0,E=O=(f+m)/2)}var te=p*gr(E),ee=p*_t(E),se=h*gr(A),H=h*_t(A);if(y>ot){var X=p*gr(O),le=p*_t(O),xe=h*gr(w),Le=h*_t(w),oe;if(b<ya)if(oe=XS(te,ee,xe,Le,X,le,se,H)){var be=te-oe[0],Se=ee-oe[1],me=X-oe[0],Z=le-oe[1],ie=1/_t(FS((be*me+Se*Z)/(sn(be*be+Se*Se)*sn(me*me+Z*Z)))/2),de=sn(oe[0]*oe[0]+oe[1]*oe[1]);R=yi(y,(h-de)/(ie-1)),z=yi(y,(p-de)/(ie+1))}else R=z=0}T>ot?z>ot?(I=to(xe,Le,te,ee,p,z,S),G=to(X,le,se,H,p,z,S),i.moveTo(I.cx+I.x01,I.cy+I.y01),z<y?i.arc(I.cx,I.cy,z,Ze(I.y01,I.x01),Ze(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,z,Ze(I.y01,I.x01),Ze(I.y11,I.x11),!S),i.arc(0,0,p,Ze(I.cy+I.y11,I.cx+I.x11),Ze(G.cy+G.y11,G.cx+G.x11),!S),i.arc(G.cx,G.cy,z,Ze(G.y11,G.x11),Ze(G.y01,G.x01),!S))):(i.moveTo(te,ee),i.arc(0,0,p,E,O,!S)):i.moveTo(te,ee),!(h>ot)||!(C>ot)?i.lineTo(se,H):R>ot?(I=to(se,H,X,le,h,-R,S),G=to(te,ee,xe,Le,h,-R,S),i.lineTo(I.cx+I.x01,I.cy+I.y01),R<y?i.arc(I.cx,I.cy,R,Ze(I.y01,I.x01),Ze(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,R,Ze(I.y01,I.x01),Ze(I.y11,I.x11),!S),i.arc(0,0,h,Ze(I.cy+I.y11,I.cx+I.x11),Ze(G.cy+G.y11,G.cx+G.x11),S),i.arc(G.cx,G.cy,R,Ze(G.y11,G.x11),Ze(G.y01,G.x01),!S))):i.arc(0,0,h,A,w,S)}if(i.closePath(),u)return i=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-ya/2;return[gr(d)*u,_t(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Ge(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Ge(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Ge(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Ge(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Ge(+u),c):a},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Ge(+u),c):o},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Ge(+u),c):s},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function cm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ZS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function eO(e){return e}function tO(){var e=eO,t=ZS,r=null,n=Ge(0),a=Ge(So),o=Ge(0);function s(i){var l,c=(i=cm(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),b=Math.min(So,Math.max(-So,a.apply(this,arguments)-m)),S,E=Math.min(Math.abs(b)/c,o.apply(this,arguments)),O=E*(b<0?-1:1),w;for(l=0;l<c;++l)(w=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=w);for(t!=null?p.sort(function(A,C){return t(f[A],f[C])}):r!=null&&p.sort(function(A,C){return r(i[A],i[C])}),l=0,d=h?(b-c*O)/h:0;l<c;++l,m=S)u=p[l],w=f[u],S=m+(w>0?w*d:0)+O,f[u]={data:i[u],index:l,value:w,startAngle:m,endAngle:S,padAngle:E};return f}return s.value=function(i){return arguments.length?(e=typeof i=="function"?i:Ge(+i),s):e},s.sortValues=function(i){return arguments.length?(t=i,r=null,s):t},s.sort=function(i){return arguments.length?(r=i,t=null,s):r},s.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Ge(+i),s):n},s.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Ge(+i),s):a},s.padAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Ge(+i),s):o},s}function xn(e,t){if((s=e.length)>1)for(var r=1,n,a,o=e[t[0]],s,i=o.length;r<s;++r)for(a=o,o=e[t[r]],n=0;n<i;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function vn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function rO(e,t){return e[t]}function nO(e){const t=[];return t.key=e,t}function um(){var e=Ge([]),t=vn,r=xn,n=rO;function a(o){var s=Array.from(e.apply(this,arguments),nO),i,l=s.length,c=-1,u;for(const d of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+n(d,s[i].key,c,o)]).data=d;for(i=0,u=cm(t(s));i<l;++i)s[u[i]].index=i;return r(s,u),s}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Ge(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:Ge(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?vn:typeof o=="function"?o:Ge(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??xn,a):r},a}function aO(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,s;a<o;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}xn(e,t)}}function oO(e,t){if((l=e.length)>0)for(var r,n=0,a,o,s,i,l,c=e[t[0]].length;n<c;++n)for(s=i=0,r=0;r<l;++r)(o=(a=e[t[r]][n])[1]-a[0])>0?(a[0]=s,a[1]=s+=o):o<0?(a[1]=i,a[0]=i+=o):(a[0]=0,a[1]=o)}function sO(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var s=0,i=0;s<a;++s)i+=e[s][r][1]||0;n[r][1]+=n[r][0]=-i/2}xn(e,t)}}function iO(e,t){if(!(!((s=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,s;n<o;++n){for(var i=0,l=0,c=0;i<s;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,f=0;f<i;++f){var m=e[t[f]],b=m[n][1]||0,S=m[n-1][1]||0;p+=b-S}l+=d,c+=p*d}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,xn(e,t)}}function dm(e){var t=e.map(lO);return vn(e).sort(function(r,n){return t[r]-t[n]})}function lO(e){for(var t=-1,r=0,n=e.length,a,o=-1/0;++t<n;)(a=+e[t][1])>o&&(o=a,r=t);return r}function hm(e){var t=e.map(pm);return vn(e).sort(function(r,n){return t[r]-t[n]})}function pm(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function cO(e){return hm(e).reverse()}function uO(e){var t=e.length,r,n,a=e.map(pm),o=dm(e),s=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=o[r],s<i?(s+=a[n],l.push(n)):(i+=a[n],c.push(n));return c.reverse().concat(l)}function dO(e){return vn(e).reverse()}const bi={appearance:dm,ascending:hm,descending:cO,insideOut:uO,none:vn,reverse:dO},xi={expand:aO,diverging:oO,none:xn,silhouette:sO,wiggle:iO},mm=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,a=[],o={};return r.forEach(s=>{const{stack:i,stackOrder:l,stackOffset:c}=t[s];i===void 0?a.push({ids:[s],stackingOrder:bi.none,stackingOffset:xi.none}):o[i]===void 0?(o[i]=a.length,a.push({ids:[s],stackingOrder:bi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:xi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[o[i]].ids.push(s),l!==void 0&&(a[o[i]].stackingOrder=bi[l]),c!==void 0&&(a[o[i]].stackingOffset=xi[c]))}),a},hO=e=>e==null?"":e.toLocaleString(),pO=(e,t)=>{const{seriesOrder:r,series:n}=e,a=mm(e),o=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{o.length<=u?o.push({[i]:c}):o[u][i]=c});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
118
|
-
`))});const s={};return
|
|
119
|
-
`));const l=s?(r==null?void 0:r.map(c=>({x:c[s.x]??null,y:c[s.y]??null,z:s.z&&c[s.z],id:s.id&&c[s.id]})))??[]:
|
|
120
|
-
`))});const s={};return
|
|
115
|
+
*/var mu;function Lb(){return mu||(mu=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=J,r=cp(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,a=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;ii.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=a(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(C){if(!E){if(E=!0,O=C,C=h(C),p!==void 0&&m.hasValue){var T=m.value;if(p(T,C))return w=T}return w=C}if(T=w,n(O,C))return T;var V=h(C);return p!==void 0&&p(T,V)?(O=C,T):(O=C,w=V)}var E=!1,O,w,A=d===void 0?null:d;return[function(){return S(u())},A===null?void 0:function(){return S(A())}]},[u,d,h,p]);var b=o(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ii}var fu;function Bb(){return fu||(fu=1,process.env.NODE_ENV==="production"?Yo.exports=Db():Yo.exports=Lb()),Yo.exports}var Nb=Bb();const Fb=Object.is,it=(e,t,r=[],n=Fb)=>{const o=a=>t(a,...r);return Nb.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o,n)},zb="DEFAULT_X_AXIS_KEY",Gb="DEFAULT_Y_AXIS_KEY",Hb={top:20,bottom:20,left:20,right:20},qb=45,Wb=25,up=20,Cn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Pn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Jb=fe([Pn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="left"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Yb=fe([Pn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="right"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Kb=fe([Cn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="top"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Qb=fe([Cn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="bottom"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Xb=e=>e.dimensions,dp=e=>e.dimensions.width,hp=e=>e.dimensions.height,Zb=e=>e.dimensions.margin.top,ex=e=>e.dimensions.margin.right,tx=e=>e.dimensions.margin.bottom,rx=e=>e.dimensions.margin.left,Ao=fe([dp,hp,Zb,ex,tx,rx,Kb,Yb,Qb,Jb],(e,t,r,n,o,a,s,i,l,c)=>({width:e-a-n-c-i,left:a+c,right:n+i,height:t-r-o-s-l,top:r+s,bottom:o+l})),nx=fe([Xb],e=>({width:e.propsWidth,height:e.propsHeight})),ox=fe([dp,hp],(e,t)=>({width:e,height:t}));function pp(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const ax=10,fs=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,o=F.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[a,s]=F.useState(0),[i,l]=F.useState(0),c=F.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const b=kb(f).getComputedStyle(f),S=Math.floor(parseFloat(b.height))||0,E=Math.floor(parseFloat(b.width))||0;return t.update(O=>O.dimensions.width===E&&O.dimensions.height===S?O:K({},O,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??E,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:E}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);F.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,b=e.height??f.dimensions.height;return K({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:b,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),F.useEffect(()=>{o.current.displayError=!0},[]),$t(()=>{if(n||!o.current.initialCompute||o.current.computeRun>ax)return;const f=c();f.width!==a||f.height!==i?(o.current.computeRun+=1,f.width!==void 0&&s(f.width),f.height!==void 0&&l(f.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[i,a,c,n]),$t(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const b=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&b.observe(f),()=>{m&&cancelAnimationFrame(m),f&&b.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(o.current.displayError&&e.width===void 0&&a===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),o.current.displayError=!1),o.current.displayError&&e.height===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),o.current.displayError=!1));const u=it(t,Ao),d=F.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=F.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:F.useCallback((f,m,b)=>b&&"closest"in b&&b.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};fs.params={width:!0,height:!0,margin:!0};fs.getDefaultizedParams=({params:e})=>K({},e,{margin:pp(e.margin,Hb)});fs.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const kl=({params:e,store:t})=>($t(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});kl.params={experimentalFeatures:!0};kl.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const sx=e=>e.experimentalFeatures,mp=fe([sx],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let gu=0;const ix=()=>(gu+=1,`mui-chart-${gu}`),$l=({params:e,store:t})=>(F.useEffect(()=>{t.update(r=>e.id===void 0||e.id===r.id.providedChartId&&r.id.chartId!==void 0?r:K({},r,{id:K({},r.id,{chartId:e.id??ix()})}))},[t,e.id]),{});$l.params={id:!0};$l.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const lx=e=>e.id,cx=fe([lx],e=>e.chartId),ux=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],dx=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],fp=e=>e==="dark"?dx:ux,gp=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const o={};e.forEach((s,i)=>{var u;const l=r[s.type].getSeriesWithDefaultValues(s,i,t),c=l.id;if(o[s.type]===void 0&&(o[s.type]={series:{},seriesOrder:[]}),((u=o[s.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);o[s.type].series[c]=l,o[s.type].seriesOrder.push(c)});const a={};return Object.keys(r).forEach(s=>{var l,c;const i=o[s];i!==void 0&&(a[s]=((c=(l=r[s])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??o[s])}),a},gs=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:o,theme:a,colors:s}=e,i=F.useRef(!0);return F.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:gp({series:n,colors:typeof s=="function"?s(a):s,seriesConfig:r,dataset:o})})}))},[s,o,n,a,r,t]),{}};gs.params={dataset:!0,series:!0,colors:!0,theme:!0};const hx=[];gs.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:hx,colors:e.colors??fp,theme:e.theme??"light"})};gs.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},o,a)=>({series:{seriesConfig:a,processedSeries:gp({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:a,dataset:n})}});const yp=e=>e.series,_o=fe([yp],e=>e.processedSeries),ys=fe([yp],e=>e.seriesConfig),px={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0};class bp{constructor(t){if(this.name=void 0,this.preventDefault=void 0,this.stopPropagation=void 0,this.preventIf=void 0,this.requiredKeys=void 0,this.keyboardManager=void 0,this.pointerMode=void 0,this.customData={},this.pointerManager=void 0,this.gesturesRegistry=void 0,this.element=void 0,this.state=void 0,this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in px)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,r,n,o){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=o;const a=`${this.name}ChangeOptions`;this.element.addEventListener(a,this.handleOptionsChange.bind(this));const s=`${this.name}ChangeState`;this.element.addEventListener(s,this.handleStateChange.bind(this))}handleOptionsChange(t){t&&t.detail&&this.updateOptions(t.detail)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode}handleStateChange(t){t&&t.detail&&this.updateState(t.detail)}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||this.element.contains(t.target)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t){if(!this.keyboardManager.areKeysPressed(this.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const r=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(n=>r[n])}isPointerTypeAllowed(t){return!this.pointerMode||this.pointerMode.length===0?!0:this.pointerMode.includes(t)}destroy(){const t=`${this.name}ChangeOptions`;this.element.removeEventListener(t,this.handleOptionsChange.bind(this));const r=`${this.name}ChangeState`;this.element.removeEventListener(r,this.handleStateChange.bind(this))}}class mx{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),o={gesture:r,element:t};n.add(o)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(o=>{o.gesture===r&&n.delete(o)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,o)=>(n[o.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(o=>o.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class fx{constructor(){this.pressedKeys=new Set,this.handleKeyDown=t=>{this.pressedKeys.add(t.key)},this.handleKeyUp=t=>{this.pressedKeys.delete(t.key)},this.clearKeys=()=>{this.pressedKeys.clear()},this.initialize()}initialize(){typeof window>"u"||(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}areKeysPressed(t){return!t||t.length===0?!0:t.every(r=>r==="ControlOrMeta"?this.pressedKeys.has("Control")||this.pressedKeys.has("Meta"):this.pressedKeys.has(r))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class gx{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=r=>{if(this.preventEventInterruption&&"pointerType"in r&&r.pointerType==="touch"){r.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),o=this.pointers.values().next().value;if(this.pointers.size>0&&o){Object.defineProperties(n,{clientX:{value:o.clientX},clientY:{value:o.clientY},pointerId:{value:o.pointerId},pointerType:{value:o.pointerType}});for(const[a,s]of this.pointers.entries()){const i=K({},s,{type:"forceCancel"});this.pointers.set(a,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:o}=r;if(n==="pointerdown"){if(this.pointers.set(o,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(o)}catch{}}else if(n==="pointermove")this.pointers.set(o,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(o)}catch{}this.pointers.set(o,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(o);return}this.notifyHandlers(r)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(r=>r(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class yx{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new mx,this.pointerManager=void 0,this.keyboardManager=new fx,this.pointerManager=new gx({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(r=>{this.addGestureTemplate(r)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const a=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(a)}setGestureState(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const a=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(a)}registerElement(t,r,n){if(Array.isArray(t))return t.forEach(a=>{const s=n==null?void 0:n[a];this.registerSingleGesture(a,r,s)}),r;const o=n==null?void 0:n[t];return this.registerSingleGesture(t,r,o),r}registerSingleGesture(t,r,n){const o=this.gestureTemplates.get(t);if(!o)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const a=this.elementGestureMap.get(r);a.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const s=o.clone(n);return s.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),a.set(t,s),!0}unregisterElement(t,r){const n=this.elementGestureMap.get(r);return!n||!n.has(t)?!1:(n.get(t).destroy(),n.delete(t),this.activeGesturesRegistry.unregisterElement(r),n.size===0&&this.elementGestureMap.delete(r),!0)}unregisterAllGestures(t){const r=this.elementGestureMap.get(t);if(r){for(const[,n]of r)n.destroy(),this.activeGesturesRegistry.unregisterElement(t);this.elementGestureMap.delete(t)}}destroy(){for(const[t]of this.elementGestureMap)this.unregisterAllGestures(t);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy()}}class Eo extends bp{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,r,n,o){super.init(t,r,n,o),this.unregisterHandler=this.pointerManager.registerGestureHandler((a,s)=>this.handlePointerEvent(a,s))}updateOptions(t){super.updateOptions(t),this.minPointers=t.minPointers??this.minPointers,this.maxPointers=t.maxPointers??this.maxPointers}getRelevantPointers(t,r){return t.filter(n=>this.isPointerTypeAllowed(n.pointerType)&&(r===n.target||n.target===this.originalTarget||r===this.originalTarget||r.contains(n.target)))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function bx(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function li(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let o=n+1;o<e.length;o+=1)t+=bx({x:e[n].clientX,y:e[n].clientY},{x:e[o].clientX,y:e[o].clientY}),r+=1;return r>0?t/r:0}function Wt(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((r,n)=>(r.x+=n.clientX,r.y+=n.clientY,r),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function Tn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Qo=1e-5,rr=1e-5,yu=.15;function xx(e,t){const r=t.x-e.x,n=t.y-e.y,o={vertical:null,horizontal:null,mainAxis:null},a=vx(t,e),s=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=a||s==="horizontal"?Qo:yu,l=a?Qo:s==="horizontal"?yu:Qo;return Math.abs(r)>i&&(o.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(o.vertical=n>0?"down":"up"),o.mainAxis=a?"diagonal":s,o}function vx(e,t){const r=t.x-e.x,n=t.y-e.y,o=Math.atan2(n,r)*180/Math.PI;return o>=-45+rr&&o<=-22.5+rr||o>=22.5+rr&&o<=45+rr||o>=135+rr&&o<=157.5+rr||o>=-157.5+rr&&o<=-135+rr}function Sx(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const r=e.vertical===null||t.includes(e.vertical),n=e.horizontal===null||t.includes(e.horizontal);return r&&n}const Ox=0,wx=e=>e>Ox?1:e<-0?-1:0;class Ul extends Eo{constructor(t){super(t),this.state={lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.handleElementEnterBound=void 0,this.handleElementLeaveBound=void 0,this.handleElementEnterBound=this.handleElementEnter.bind(this),this.handleElementLeaveBound=this.handleElementLeave.bind(this),this.threshold=t.threshold||0}clone(t){return new Ul(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());if(n.length>=this.minPointers&&n.length<=this.maxPointers){this.isActive=!0;const o={x:t.clientX,y:t.clientY};this.state.lastPosition=o,this.emitMoveEvent(this.element,"start",n,t),this.emitMoveEvent(this.element,"ongoing",n,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.emitMoveEvent(this.element,"end",n,t),this.resetState()}handlePointerEvent(t,r){if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(o)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(o,"end",n,r);return}const a={x:r.clientX,y:r.clientY};this.state.lastPosition=a,this.isActive||(this.isActive=!0,this.emitMoveEvent(o,"start",n,r)),this.emitMoveEvent(o,"ongoing",n,r)}emitMoveEvent(t,r,n,o){const a=this.state.lastPosition||Wt(n),s=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:a,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,activeGestures:s,customData:this.customData},l=Tn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class Dl extends Eo{constructor(t){super(t),this.state={startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.direction=void 0,this.direction=t.direction||["up","down","left","right"],this.threshold=t.threshold||0}clone(t){return new Dl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=K({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancel(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.cancel(o,n,r);return}const a=this.getRelevantPointers(n,o);if(a.length<this.minPointers||a.length>this.maxPointers){this.cancel(o,a,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(a.forEach(s=>{this.state.startPointers.set(s.pointerId,s)}),this.originalTarget=o,this.state.startCentroid=Wt(a),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&a.length>=this.minPointers){const s=Wt(a),i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=xx(this.state.lastCentroid??this.state.startCentroid,s),d=this.state.lastCentroid?s.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?s.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&Sx(u,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"start",a,r,s),this.emitPanEvent(o,"ongoing",a,r,s)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"ongoing",a,r,s)),this.state.lastCentroid=s,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(a.filter(s=>s.type!=="pointerup"&&s.type!=="pointercancel").length<this.minPointers){const s=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(o,"cancel",a,r,s),this.emitPanEvent(o,"end",a,r,s),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,o,a){var S,E;if(!this.state.startCentroid)return;const s=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((E=this.state.lastDeltas)==null?void 0:E.y)??0,l=this.state.startPointers.values().next().value,c=l?(o.timeStamp-l.timeStamp)/1e3:0,u=c>0?s/c:0,d=c>0?i/c:0,h=Math.sqrt(u*u+d*d),p=this.gesturesRegistry.getActiveGestures(t),f={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:a,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,deltaX:s,deltaY:i,direction:this.state.lastDirection,velocityX:u,velocityY:d,velocity:h,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:p,customData:this.customData},m=Tn(this.name,r),b=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(b),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancel(t,r,n){if(this.isActive){const o=t??this.element;this.emitPanEvent(o,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(o,"end",r,n,this.state.lastCentroid)}this.resetState()}}class Ll extends Eo{constructor(t){super(K({},t,{minPointers:t.minPointers??2})),this.state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.threshold=t.threshold??0}clone(t){return new Ll(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=K({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&(this.emitPinchEvent(o,"cancel",n,r),this.resetState());return}const a=this.getRelevantPointers(n,o);switch(r.type){case"pointerdown":if(a.length>=2&&!this.isActive){const s=li(a);this.state.startDistance=s,this.state.lastDistance=s,this.state.lastTime=r.timeStamp,this.originalTarget=o}break;case"pointermove":if(this.state.startDistance&&a.length>=this.minPointers){const s=li(a),i=Math.abs(s-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?s/this.state.startDistance:1,c=l/this.state.lastScale;this.state.totalScale*=c;const u=(r.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const h=(s-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=s,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(o,"ongoing",a,r):(this.isActive=!0,this.emitPinchEvent(o,"start",a,r),this.emitPinchEvent(o,"ongoing",a,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const s=a.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(s.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(o,"cancel",a,r),this.emitPinchEvent(o,"end",a,r),this.resetState();else if(s.length>=2){const i=li(s);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,o){const a=Wt(n),s=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:a,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:s,velocity:this.state.velocity,activeGestures:l,direction:wx(this.state.velocity),customData:this.customData};this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation();const u=Tn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class Bl extends Eo{constructor(t){super(t),this.state={startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.duration=void 0,this.maxDistance=void 0,this.duration=t.duration??500,this.maxDistance=t.maxDistance??10}clone(t){return new Bl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=K({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancelPress(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&this.cancelPress(o,n,r);return}const a=this.getRelevantPointers(n,o);if(a.length<this.minPointers||a.length>this.maxPointers){this.isActive&&this.cancelPress(o,a,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Wt(a),this.state.lastPosition=K({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=o,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const s=this.state.lastPosition;this.emitPressEvent(o,"start",a,r,s),this.emitPressEvent(o,"ongoing",a,r,s)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=Wt(a);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(o,a,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const s=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(o,"end",a,r,s)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(o,a,r);break}}emitPressEvent(t,r,n,o,a){const s=this.gesturesRegistry.getActiveGestures(t),i=o.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:a,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,x:a.x,y:a.y,duration:i,activeGestures:s,customData:this.customData},c=Tn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const o=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,o),this.emitPressEvent(t??this.element,"end",r,n,o)}this.resetState()}}class Nl extends Eo{constructor(t){super(t),this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.maxDistance=void 0,this.taps=void 0,this.maxDistance=t.maxDistance??10,this.taps=t.taps??1}clone(t){return new Nl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;const a=this.getRelevantPointers(n,o);if(this.shouldPreventGesture(o)||a.length<this.minPointers||a.length>this.maxPointers){this.isActive&&this.cancelTap(o,a,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=Wt(a),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=o);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=Wt(a);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(o,a,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const s=this.state.lastPosition||this.state.startCentroid;if(!s){this.cancelTap(o,a,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(o,a,r,s),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(o,a,r);break}}fireTapEvent(t,r,n,o){const a=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:a,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const o=this.state.lastPosition||this.state.startCentroid,a=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:a,customData:this.customData},i=Tn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(l)}this.resetState()}}class Fl extends bp{constructor(t){super(t),this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.sensitivity=void 0,this.max=void 0,this.min=void 0,this.initialDelta=void 0,this.invert=void 0,this.handleWheelEventBound=void 0,this.sensitivity=t.sensitivity??1,this.max=t.max??Number.MAX_SAFE_INTEGER,this.min=t.min??Number.MIN_SAFE_INTEGER,this.initialDelta=t.initialDelta??0,this.invert=t.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta,this.handleWheelEventBound=this.handleWheelEvent.bind(this)}clone(t){return new Fl(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(o=>{this.state[o]<this.min&&(this.state[o]=this.min),this.state[o]>this.max&&(this.state[o]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?Wt(t):{x:r.clientX,y:r.clientY},o=this.gesturesRegistry.getActiveGestures(this.element),a={gestureName:this.name,centroid:n,target:r.target,srcEvent:r,phase:"ongoing",pointers:t,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:o,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const s=Tn(this.name,"ongoing"),i=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:a});this.element.dispatchEvent(i)}}const Yr=e=>e.preventDefault(),zl=({svgRef:e})=>{F.useEffect(()=>{const r=e.current;if(!r)return;const n=new yx({gestures:[new Dl({name:"pan",threshold:0,maxPointers:1}),new Ul({name:"move",preventIf:["pan","pinch"]}),new Ll({name:"pinch",threshold:5,preventIf:["pan"]}),new Fl({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Nl({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Bl({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=F.useCallback((r,n,o)=>{const a=e.current;return a==null||a.addEventListener(r,n,o),{cleanup:()=>a==null?void 0:a.removeEventListener(r,n)}},[e]);return F.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Yr),r==null||r.addEventListener("gesturechange",Yr),r==null||r.addEventListener("gestureend",Yr),()=>{r==null||r.removeEventListener("gesturestart",Yr),r==null||r.removeEventListener("gesturechange",Yr),r==null||r.removeEventListener("gestureend",Yr)}},[e]),{instance:{addInteractionListener:t}}};zl.params={};zl.getInitialState=()=>({});const Cx=[$l,kl,fs,gs,zl,ms],Px=["apiRef"],Tx=e=>{let{plugins:t}=e,r=cr(e.props,Px);const n={};t.forEach(s=>{Object.assign(n,s.params)});const o={};return Object.keys(r).forEach(s=>{const i=r[s];n[s]&&(o[s]=i)}),t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:s}):s,o)};let bu=0;function Rx(e,t,r){const n=hb(),o=F.useMemo(()=>[...Cx,...e],[e]),a=Tx({plugins:o,props:t});a.id=a.id??n;const i=F.useRef({}).current,l=_x(t.apiRef),c=F.useRef(null),u=F.useRef(null),d=F.useRef(null);if(d.current==null){bu+=1;const f={cacheKey:{id:bu}};o.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(a,f,r))}),d.current=new pb(f)}const h=f=>{const m=f({instance:i,params:a,plugins:o,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});m.publicAPI&&Object.assign(l.current,m.publicAPI),m.instance&&Object.assign(i,m.instance)};return o.forEach(h),{contextValue:F.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function Ax(e){return e.current==null&&(e.current={}),e}function _x(e){const t=F.useRef({});return e?Ax(e):t}const Gl=F.createContext(null);process.env.NODE_ENV!=="production"&&(Gl.displayName="ChartContext");const xu=new Set;function po(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
116
|
+
`):e;xu.has(r)||(xu.add(r),t==="error"?console.error(r):console.warn(r))}function Ex(e){const{componentName:t,propName:r,controlled:n,defaultValue:o,warningPrefix:a="MUI X"}=e,[{initialDefaultValue:s,isControlled:i}]=F.useState({initialDefaultValue:o,isControlled:n!==void 0});i!==(n!==void 0)&&po([`${a}: A component is changing the ${i?"":"un"}controlled ${r} state of ${t} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"],"error"),JSON.stringify(s)!==JSON.stringify(o)&&po([`${a}: A component is changing the default ${r} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const xp=process.env.NODE_ENV==="production"?()=>{}:Ex,vp=4,Sp=20+2*vp,Ix=40+2*vp,Vx="hover",Xo={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:Sp,showTooltip:Vx}},Hl=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Xo):K({axisId:t,axisDirection:r},Xo,e,{slider:K({},Xo.slider,{size:((n=e.slider)==null?void 0:n.preview)??Xo.slider.preview?Ix:Sp},e.slider)})};function Op(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:zb,scaleType:"linear"}]).map((a,s)=>{var p;const i=a.dataKey,l=s===0?"bottom":"none",c=a.position??l,u=Wb+(a.label?up:0),d=a.id??`defaultized-x-axis-${s}`,h=K({offset:r[c]},a,{id:d,position:c,height:a.height??u,zoom:Hl(a.zoom,d,"x")});if(c!=="none"&&(r[c]+=h.height,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||a.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return K({},h,{data:t.map(f=>f[i])})})}function wp(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Gb,scaleType:"linear"}]).map((a,s)=>{var p;const i=a.dataKey,l=s===0?"left":"none",c=a.position??l,u=qb+(a.label?up:0),d=a.id??`defaultized-y-axis-${s}`,h=K({offset:r[c]},a,{id:d,position:c,width:a.width??u,zoom:Hl(a.zoom,d,"y")});if(c!=="none"&&(r[c]+=h.width,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||a.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return K({},h,{data:t.map(f=>f[i])})})}function xa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Mx(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ql(e){let t,r,n;e.length!==2?(t=xa,r=(i,l)=>xa(e(i),l),n=(i,l)=>e(i)-l):(t=e===xa||e===Mx?e:jx,r=e,n=e);function o(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<0?c=d+1:u=d}while(c<u)}return c}function a(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function s(i,l,c=0,u=i.length){const d=o(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:o,center:s,right:a}}function jx(){return 0}function kx(e){return e===null?NaN:+e}const $x=ql(xa),Cp=$x.right;ql(kx).center;class vu extends Map{constructor(t,r=Lx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(Su(this,t))}has(t){return super.has(Su(this,t))}set(t,r){return super.set(Ux(this,t),r)}delete(t){return super.delete(Dx(this,t))}}function Su({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Ux({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Dx({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Lx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Bx=Math.sqrt(50),Nx=Math.sqrt(10),Fx=Math.sqrt(2);function Ma(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),a=n/Math.pow(10,o),s=a>=Bx?10:a>=Nx?5:a>=Fx?2:1;let i,l,c;return o<0?(c=Math.pow(10,-o)/s,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*s,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?Ma(e,t,r*2):[i,l,c]}function Hi(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,a,s]=n?Ma(t,e,r):Ma(e,t,r);if(!(a>=o))return[];const i=a-o+1,l=new Array(i);if(n)if(s<0)for(let c=0;c<i;++c)l[c]=(a-c)/-s;else for(let c=0;c<i;++c)l[c]=(a-c)*s;else if(s<0)for(let c=0;c<i;++c)l[c]=(o+c)/-s;else for(let c=0;c<i;++c)l[c]=(o+c)*s;return l}function qi(e,t,r){return t=+t,e=+e,r=+r,Ma(e,t,r)[2]}function Wi(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?qi(t,e,r):qi(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function zx(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(o);++n<o;)a[n]=e+n*r;return a}function mr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Gx(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ou=Symbol("implicit");function ja(){var e=new vu,t=[],r=[],n=Ou;function o(a){let s=e.get(a);if(s===void 0){if(n!==Ou)return n;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return o.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new vu;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return o},o.range=function(a){return arguments.length?(r=Array.from(a),o):r.slice()},o.unknown=function(a){return arguments.length?(n=a,o):n},o.copy=function(){return ja(t,r).unknown(n)},mr.apply(o,arguments),o}function Wl(){var e=ja().unknown(void 0),t=e.domain,r=e.range,n=0,o=1,a,s,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=o<n,f=p?o:n,m=p?n:o;a=(m-f)/Math.max(1,h-l+c*2),i&&(a=Math.floor(a)),f+=(m-f-a*(h-l))*u,s=a*(1-l),i&&(f=Math.round(f),s=Math.round(s));var b=zx(h).map(function(S){return f+a*S});return r(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,o]=h,n=+n,o=+o,d()):[n,o]},e.rangeRound=function(h){return[n,o]=h,n=+n,o=+o,i=!0,d()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(h){return arguments.length?(i=!!h,d()):i},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Wl(t(),[n,o]).round(i).paddingInner(l).paddingOuter(c).align(u)},mr.apply(d(),arguments)}function Pp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Pp(t())},e}function Hx(){return Pp(Wl.apply(null,arguments).paddingInner(1))}function Jl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Io(){}var mo=.7,ka=1/mo,un="\\s*([+-]?\\d+)\\s*",fo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qx=/^#([0-9a-f]{3,8})$/,Wx=new RegExp(`^rgb\\(${un},${un},${un}\\)$`),Jx=new RegExp(`^rgb\\(${kt},${kt},${kt}\\)$`),Yx=new RegExp(`^rgba\\(${un},${un},${un},${fo}\\)$`),Kx=new RegExp(`^rgba\\(${kt},${kt},${kt},${fo}\\)$`),Qx=new RegExp(`^hsl\\(${fo},${kt},${kt}\\)$`),Xx=new RegExp(`^hsla\\(${fo},${kt},${kt},${fo}\\)$`),wu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Jl(Io,go,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cu,formatHex:Cu,formatHex8:Zx,formatHsl:ev,formatRgb:Pu,toString:Pu});function Cu(){return this.rgb().formatHex()}function Zx(){return this.rgb().formatHex8()}function ev(){return Rp(this).formatHsl()}function Pu(){return this.rgb().formatRgb()}function go(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Tu(t):r===3?new lt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Zo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Zo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wx.exec(e))?new lt(t[1],t[2],t[3],1):(t=Jx.exec(e))?new lt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Yx.exec(e))?Zo(t[1],t[2],t[3],t[4]):(t=Kx.exec(e))?Zo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Qx.exec(e))?_u(t[1],t[2]/100,t[3]/100,1):(t=Xx.exec(e))?_u(t[1],t[2]/100,t[3]/100,t[4]):wu.hasOwnProperty(e)?Tu(wu[e]):e==="transparent"?new lt(NaN,NaN,NaN,0):null}function Tu(e){return new lt(e>>16&255,e>>8&255,e&255,1)}function Zo(e,t,r,n){return n<=0&&(e=t=r=NaN),new lt(e,t,r,n)}function tv(e){return e instanceof Io||(e=go(e)),e?(e=e.rgb(),new lt(e.r,e.g,e.b,e.opacity)):new lt}function Ji(e,t,r,n){return arguments.length===1?tv(e):new lt(e,t,r,n??1)}function lt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Jl(lt,Ji,Tp(Io,{brighter(e){return e=e==null?ka:Math.pow(ka,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mo:Math.pow(mo,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lt(Pr(this.r),Pr(this.g),Pr(this.b),$a(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ru,formatHex:Ru,formatHex8:rv,formatRgb:Au,toString:Au}));function Ru(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function rv(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Au(){const e=$a(this.opacity);return`${e===1?"rgb(":"rgba("}${Pr(this.r)}, ${Pr(this.g)}, ${Pr(this.b)}${e===1?")":`, ${e})`}`}function $a(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sr(e){return e=Pr(e),(e<16?"0":"")+e.toString(16)}function _u(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new wt(e,t,r,n)}function Rp(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);if(e instanceof Io||(e=go(e)),!e)return new wt;if(e instanceof wt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,i=a-o,l=(a+o)/2;return i?(t===a?s=(r-n)/i+(r<n)*6:r===a?s=(n-t)/i+2:s=(t-r)/i+4,i/=l<.5?a+o:2-a-o,s*=60):i=l>0&&l<1?0:s,new wt(s,i,l,e.opacity)}function nv(e,t,r,n){return arguments.length===1?Rp(e):new wt(e,t,r,n??1)}function wt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Jl(wt,nv,Tp(Io,{brighter(e){return e=e==null?ka:Math.pow(ka,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mo:Math.pow(mo,e),new wt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new lt(ci(e>=240?e-240:e+120,o,n),ci(e,o,n),ci(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new wt(Eu(this.h),ea(this.s),ea(this.l),$a(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$a(this.opacity);return`${e===1?"hsl(":"hsla("}${Eu(this.h)}, ${ea(this.s)*100}%, ${ea(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Eu(e){return e=(e||0)%360,e<0?e+360:e}function ea(e){return Math.max(0,Math.min(1,e||0))}function ci(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Yl=e=>()=>e;function ov(e,t){return function(r){return e+r*t}}function av(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function sv(e){return(e=+e)==1?Ap:function(t,r){return r-t?av(t,r,e):Yl(isNaN(t)?r:t)}}function Ap(e,t){var r=t-e;return r?ov(e,r):Yl(isNaN(e)?t:e)}const Iu=function e(t){var r=sv(t);function n(o,a){var s=r((o=Ji(o)).r,(a=Ji(a)).r),i=r(o.g,a.g),l=r(o.b,a.b),c=Ap(o.opacity,a.opacity);return function(u){return o.r=s(u),o.g=i(u),o.b=l(u),o.opacity=c(u),o+""}}return n.gamma=e,n}(1);function iv(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(a){for(o=0;o<r;++o)n[o]=e[o]*(1-a)+t[o]*a;return n}}function lv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cv(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)o[s]=bs(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(i){for(s=0;s<n;++s)a[s]=o[s](i);return a}}function Kl(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Ct(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function uv(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=bs(e[o],t[o]):n[o]=t[o];return function(a){for(o in r)n[o]=r[o](a);return n}}var Yi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ui=new RegExp(Yi.source,"g");function dv(e){return function(){return e}}function hv(e){return function(t){return e(t)+""}}function pv(e,t){var r=Yi.lastIndex=ui.lastIndex=0,n,o,a,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Yi.exec(e))&&(o=ui.exec(t));)(a=o.index)>r&&(a=t.slice(r,a),i[s]?i[s]+=a:i[++s]=a),(n=n[0])===(o=o[0])?i[s]?i[s]+=o:i[++s]=o:(i[++s]=null,l.push({i:s,x:Ct(n,o)})),r=ui.lastIndex;return r<t.length&&(a=t.slice(r),i[s]?i[s]+=a:i[++s]=a),i.length<2?l[0]?hv(l[0].x):dv(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)i[(d=l[u]).i]=d.x(c);return i.join("")})}function bs(e,t){var r=typeof t,n;return t==null||r==="boolean"?Yl(t):(r==="number"?Ct:r==="string"?(n=go(t))?(t=n,Iu):pv:t instanceof go?Iu:t instanceof Date?Kl:lv(t)?iv:Array.isArray(t)?cv:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?uv:Ct)(e,t)}function _p(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function mv(e){return function(){return e}}function fv(e){return+e}var Vu=[0,1];function gt(e){return e}function Ki(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:mv(isNaN(t)?NaN:.5)}function gv(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function yv(e,t,r){var n=e[0],o=e[1],a=t[0],s=t[1];return o<n?(n=Ki(o,n),a=r(s,a)):(n=Ki(n,o),a=r(a,s)),function(i){return a(n(i))}}function bv(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),a=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)o[s]=Ki(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(i){var l=Cp(e,i,1,n)-1;return a[l](o[l](i))}}function xs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ql(){var e=Vu,t=Vu,r=bs,n,o,a,s=gt,i,l,c;function u(){var h=Math.min(e.length,t.length);return s!==gt&&(s=gv(e[0],e[h-1])),i=h>2?bv:yv,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?a:(l||(l=i(e.map(n),t,r)))(n(s(h)))}return d.invert=function(h){return s(o((c||(c=i(t,e.map(n),Ct)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,fv),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=_p,u()},d.clamp=function(h){return arguments.length?(s=h?!0:gt,u()):s!==gt},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,p){return n=h,o=p,u()}}function Ep(){return Ql()(gt,gt)}function xv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ua(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function fn(e){return e=Ua(Math.abs(e)),e?e[1]:NaN}function vv(e,t){return function(r,n){for(var o=r.length,a=[],s=0,i=e[0],l=0;o>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),a.push(r.substring(o-=i,o+i)),!((l+=i+1)>n));)i=e[s=(s+1)%e.length];return a.reverse().join(t)}}function Sv(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Ov=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yo(e){if(!(t=Ov.exec(e)))throw new Error("invalid format: "+e);var t;return new Xl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}yo.prototype=Xl.prototype;function Xl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Xl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function wv(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var Ip;function Cv(e,t){var r=Ua(e,t);if(!r)return e+"";var n=r[0],o=r[1],a=o-(Ip=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Ua(e,Math.max(0,t+a-1))[0]}function Mu(e,t){var r=Ua(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const ju={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:xv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Mu(e*100,t),r:Mu,s:Cv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ku(e){return e}var $u=Array.prototype.map,Uu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Pv(e){var t=e.grouping===void 0||e.thousands===void 0?ku:vv($u.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?ku:Sv($u.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",i=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=yo(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,b=d.zero,S=d.width,E=d.comma,O=d.precision,w=d.trim,A=d.type;A==="n"?(E=!0,A="g"):ju[A]||(O===void 0&&(O=12),w=!0,A="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=m==="$"?r:m==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",T=m==="$"?n:/[%p]/.test(A)?s:"",V=ju[A],j=/[defgprs%]/.test(A);O=O===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function y(R){var z=C,I=T,G,oe,re;if(A==="c")I=V(R)+I,R="";else{R=+R;var te=R<0||1/R<0;if(R=isNaN(R)?l:V(Math.abs(R),O),w&&(R=wv(R)),te&&+R==0&&f!=="+"&&(te=!1),z=(te?f==="("?f:i:f==="-"||f==="("?"":f)+z,I=(A==="s"?Uu[8+Ip/3]:"")+I+(te&&f==="("?")":""),j){for(G=-1,oe=R.length;++G<oe;)if(re=R.charCodeAt(G),48>re||re>57){I=(re===46?o+R.slice(G+1):R.slice(G))+I,R=R.slice(0,G);break}}}E&&!b&&(R=t(R,1/0));var ee=z.length+R.length+I.length,se=ee<S?new Array(S-ee+1).join(h):"";switch(E&&b&&(R=t(se+R,se.length?S-I.length:1/0),se=""),p){case"<":R=z+R+I+se;break;case"=":R=z+se+R+I;break;case"^":R=se.slice(0,ee=se.length>>1)+z+R+I+se.slice(ee);break;default:R=se+z+R+I;break}return a(R)}return y.toString=function(){return d+""},y}function u(d,h){var p=c((d=yo(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(fn(h)/3)))*3,m=Math.pow(10,-f),b=Uu[8+f/3];return function(S){return p(m*S)+b}}return{format:c,formatPrefix:u}}var ta,Zl,Vp;Tv({thousands:",",grouping:[3],currency:["$",""]});function Tv(e){return ta=Pv(e),Zl=ta.format,Vp=ta.formatPrefix,ta}function Rv(e){return Math.max(0,-fn(Math.abs(e)))}function Av(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fn(t)/3)))*3-fn(Math.abs(e)))}function _v(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,fn(t)-fn(e))+1}function Ev(e,t,r,n){var o=Wi(e,t,r),a;switch(n=yo(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=Av(o,s))&&(n.precision=a),Vp(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=_v(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=Rv(o))&&(n.precision=a-(n.type==="%")*2);break}}return Zl(n)}function ec(e){var t=e.domain;return e.ticks=function(r){var n=t();return Hi(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return Ev(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,a=n.length-1,s=n[o],i=n[a],l,c,u=10;for(i<s&&(c=s,s=i,i=c,c=o,o=a,a=c);u-- >0;){if(c=qi(s,i,r),c===l)return n[o]=s,n[a]=i,t(n);if(c>0)s=Math.floor(s/c)*c,i=Math.ceil(i/c)*c;else if(c<0)s=Math.ceil(s*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Mp(){var e=Ep();return e.copy=function(){return xs(e,Mp())},mr.apply(e,arguments),ec(e)}function jp(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],a=e[n],s;return a<o&&(s=r,r=n,n=s,s=o,o=a,a=s),e[r]=t.floor(o),e[n]=t.ceil(a),e}function Du(e){return Math.log(e)}function Lu(e){return Math.exp(e)}function Iv(e){return-Math.log(-e)}function Vv(e){return-Math.exp(-e)}function Mv(e){return isFinite(e)?+("1e"+e):e<0?0:e}function jv(e){return e===10?Mv:e===Math.E?Math.exp:t=>Math.pow(e,t)}function kv(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Bu(e){return(t,r)=>-e(-t,r)}function $v(e){const t=e(Du,Lu),r=t.domain;let n=10,o,a;function s(){return o=kv(n),a=jv(n),r()[0]<0?(o=Bu(o),a=Bu(a),e(Iv,Vv)):e(Du,Lu),t}return t.base=function(i){return arguments.length?(n=+i,s()):n},t.domain=function(i){return arguments.length?(r(i),s()):r()},t.ticks=i=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=o(c),p=o(u),f,m;const b=i==null?10:+i;let S=[];if(!(n%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<n;++f)if(m=h<0?f/a(-h):f*a(h),!(m<c)){if(m>u)break;S.push(m)}}else for(;h<=p;++h)for(f=n-1;f>=1;--f)if(m=h>0?f/a(-h):f*a(h),!(m<c)){if(m>u)break;S.push(m)}S.length*2<b&&(S=Hi(c,u,b))}else S=Hi(h,p,Math.min(p-h,b)).map(a);return d?S.reverse():S},t.tickFormat=(i,l)=>{if(i==null&&(i=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=yo(l)).precision==null&&(l.trim=!0),l=Zl(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/a(Math.round(o(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(jp(r(),{floor:i=>a(Math.floor(o(i))),ceil:i=>a(Math.ceil(o(i)))})),t}function kp(){const e=$v(Ql()).domain([1,10]);return e.copy=()=>xs(e,kp()).base(e.base()),mr.apply(e,arguments),e}function Nu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Uv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Dv(e){return e<0?-e*e:e*e}function Lv(e){var t=e(gt,gt),r=1;function n(){return r===1?e(gt,gt):r===.5?e(Uv,Dv):e(Nu(r),Nu(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},ec(t)}function tc(){var e=Lv(Ql());return e.copy=function(){return xs(e,tc()).exponent(e.exponent())},mr.apply(e,arguments),e}function Bv(){return tc.apply(null,arguments).exponent(.5)}function $p(){var e=[.5],t=[0,1],r,n=1;function o(a){return a!=null&&a<=a?t[Cp(e,a,0,n)]:r}return o.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},o.unknown=function(a){return arguments.length?(r=a,o):r},o.copy=function(){return $p().domain(e).range(t).unknown(r)},mr.apply(o,arguments)}const di=new Date,hi=new Date;function He(e,t,r,n){function o(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return o.floor=a=>(e(a=new Date(+a)),a),o.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),o.round=a=>{const s=o(a),i=o.ceil(a);return a-s<i-a?s:i},o.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),o.range=(a,s,i)=>{const l=[];if(a=o.ceil(a),i=i==null?1:Math.floor(i),!(a<s)||!(i>0))return l;let c;do l.push(c=new Date(+a)),t(a,i),e(a);while(c<a&&a<s);return l},o.filter=a=>He(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,i)=>{if(s>=s)if(i<0)for(;++i<=0;)for(;t(s,-1),!a(s););else for(;--i>=0;)for(;t(s,1),!a(s););}),r&&(o.count=(a,s)=>(di.setTime(+a),hi.setTime(+s),e(di),e(hi),Math.floor(r(di,hi))),o.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?o.filter(n?s=>n(s)%a===0:s=>o.count(0,s)%a===0):o)),o}const Da=He(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Da.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?He(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Da);Da.range;const zt=1e3,yt=zt*60,Gt=yt*60,Jt=Gt*24,rc=Jt*7,Fu=Jt*30,pi=Jt*365,Or=He(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getUTCSeconds());Or.range;const nc=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getMinutes());nc.range;const oc=He(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getUTCMinutes());oc.range;const ac=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zt-e.getMinutes()*yt)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getHours());ac.range;const sc=He(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gt)},(e,t)=>(t-e)/Gt,e=>e.getUTCHours());sc.range;const Vo=He(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yt)/Jt,e=>e.getDate()-1);Vo.range;const vs=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jt,e=>e.getUTCDate()-1);vs.range;const Up=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jt,e=>Math.floor(e/Jt));Up.range;function Mr(e){return He(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*yt)/rc)}const Ss=Mr(0),La=Mr(1),Nv=Mr(2),Fv=Mr(3),gn=Mr(4),zv=Mr(5),Gv=Mr(6);Ss.range;La.range;Nv.range;Fv.range;gn.range;zv.range;Gv.range;function jr(e){return He(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/rc)}const Os=jr(0),Ba=jr(1),Hv=jr(2),qv=jr(3),yn=jr(4),Wv=jr(5),Jv=jr(6);Os.range;Ba.range;Hv.range;qv.range;yn.range;Wv.range;Jv.range;const ic=He(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ic.range;const lc=He(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());lc.range;const Yt=He(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Yt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Yt.range;const Kt=He(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Kt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Kt.range;function Dp(e,t,r,n,o,a){const s=[[Or,1,zt],[Or,5,5*zt],[Or,15,15*zt],[Or,30,30*zt],[a,1,yt],[a,5,5*yt],[a,15,15*yt],[a,30,30*yt],[o,1,Gt],[o,3,3*Gt],[o,6,6*Gt],[o,12,12*Gt],[n,1,Jt],[n,2,2*Jt],[r,1,rc],[t,1,Fu],[t,3,3*Fu],[e,1,pi]];function i(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),f=p?p.range(c,+u+1):[];return h?f.reverse():f}function l(c,u,d){const h=Math.abs(u-c)/d,p=ql(([,,b])=>b).right(s,h);if(p===s.length)return e.every(Wi(c/pi,u/pi,d));if(p===0)return Da.every(Math.max(Wi(c,u,d),1));const[f,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[Yv,Kv]=Dp(Kt,lc,Os,Up,sc,oc),[Qv,Xv]=Dp(Yt,ic,Ss,Vo,ac,nc);function mi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function fi(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Bn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Zv(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,a=e.days,s=e.shortDays,i=e.months,l=e.shortMonths,c=Nn(o),u=Fn(o),d=Nn(a),h=Fn(a),p=Nn(s),f=Fn(s),m=Nn(i),b=Fn(i),S=Nn(l),E=Fn(l),O={a:te,A:ee,b:se,B:H,c:null,d:Ju,e:Ju,f:O1,g:V1,G:j1,H:x1,I:v1,j:S1,L:Lp,m:w1,M:C1,p:X,q:le,Q:Qu,s:Xu,S:P1,u:T1,U:R1,V:A1,w:_1,W:E1,x:null,X:null,y:I1,Y:M1,Z:k1,"%":Ku},w={a:xe,A:Le,b:ae,B:be,c:null,d:Yu,e:Yu,f:L1,g:Y1,G:Q1,H:$1,I:U1,j:D1,L:Np,m:B1,M:N1,p:Se,q:me,Q:Qu,s:Xu,S:F1,u:z1,U:G1,V:H1,w:q1,W:W1,x:null,X:null,y:J1,Y:K1,Z:X1,"%":Ku},A={a:y,A:R,b:z,B:I,c:G,d:qu,e:qu,f:f1,g:Hu,G:Gu,H:Wu,I:Wu,j:d1,L:m1,m:u1,M:h1,p:j,q:c1,Q:y1,s:b1,S:p1,u:o1,U:a1,V:s1,w:n1,W:i1,x:oe,X:re,y:Hu,Y:Gu,Z:l1,"%":g1};O.x=C(r,O),O.X=C(n,O),O.c=C(t,O),w.x=C(r,w),w.X=C(n,w),w.c=C(t,w);function C(Z,ie){return function(de){var Y=[],we=-1,ge=0,Ye=Z.length,qe,ke,tr;for(de instanceof Date||(de=new Date(+de));++we<Ye;)Z.charCodeAt(we)===37&&(Y.push(Z.slice(ge,we)),(ke=zu[qe=Z.charAt(++we)])!=null?qe=Z.charAt(++we):ke=qe==="e"?" ":"0",(tr=ie[qe])&&(qe=tr(de,ke)),Y.push(qe),ge=we+1);return Y.push(Z.slice(ge,we)),Y.join("")}}function T(Z,ie){return function(de){var Y=Bn(1900,void 0,1),we=V(Y,Z,de+="",0),ge,Ye;if(we!=de.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(ie&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(ge=fi(Bn(Y.y,0,1)),Ye=ge.getUTCDay(),ge=Ye>4||Ye===0?Ba.ceil(ge):Ba(ge),ge=vs.offset(ge,(Y.V-1)*7),Y.y=ge.getUTCFullYear(),Y.m=ge.getUTCMonth(),Y.d=ge.getUTCDate()+(Y.w+6)%7):(ge=mi(Bn(Y.y,0,1)),Ye=ge.getDay(),ge=Ye>4||Ye===0?La.ceil(ge):La(ge),ge=Vo.offset(ge,(Y.V-1)*7),Y.y=ge.getFullYear(),Y.m=ge.getMonth(),Y.d=ge.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Ye="Z"in Y?fi(Bn(Y.y,0,1)).getUTCDay():mi(Bn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Ye+5)%7:Y.w+Y.U*7-(Ye+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,fi(Y)):mi(Y)}}function V(Z,ie,de,Y){for(var we=0,ge=ie.length,Ye=de.length,qe,ke;we<ge;){if(Y>=Ye)return-1;if(qe=ie.charCodeAt(we++),qe===37){if(qe=ie.charAt(we++),ke=A[qe in zu?ie.charAt(we++):qe],!ke||(Y=ke(Z,de,Y))<0)return-1}else if(qe!=de.charCodeAt(Y++))return-1}return Y}function j(Z,ie,de){var Y=c.exec(ie.slice(de));return Y?(Z.p=u.get(Y[0].toLowerCase()),de+Y[0].length):-1}function y(Z,ie,de){var Y=p.exec(ie.slice(de));return Y?(Z.w=f.get(Y[0].toLowerCase()),de+Y[0].length):-1}function R(Z,ie,de){var Y=d.exec(ie.slice(de));return Y?(Z.w=h.get(Y[0].toLowerCase()),de+Y[0].length):-1}function z(Z,ie,de){var Y=S.exec(ie.slice(de));return Y?(Z.m=E.get(Y[0].toLowerCase()),de+Y[0].length):-1}function I(Z,ie,de){var Y=m.exec(ie.slice(de));return Y?(Z.m=b.get(Y[0].toLowerCase()),de+Y[0].length):-1}function G(Z,ie,de){return V(Z,t,ie,de)}function oe(Z,ie,de){return V(Z,r,ie,de)}function re(Z,ie,de){return V(Z,n,ie,de)}function te(Z){return s[Z.getDay()]}function ee(Z){return a[Z.getDay()]}function se(Z){return l[Z.getMonth()]}function H(Z){return i[Z.getMonth()]}function X(Z){return o[+(Z.getHours()>=12)]}function le(Z){return 1+~~(Z.getMonth()/3)}function xe(Z){return s[Z.getUTCDay()]}function Le(Z){return a[Z.getUTCDay()]}function ae(Z){return l[Z.getUTCMonth()]}function be(Z){return i[Z.getUTCMonth()]}function Se(Z){return o[+(Z.getUTCHours()>=12)]}function me(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var ie=C(Z+="",O);return ie.toString=function(){return Z},ie},parse:function(Z){var ie=T(Z+="",!1);return ie.toString=function(){return Z},ie},utcFormat:function(Z){var ie=C(Z+="",w);return ie.toString=function(){return Z},ie},utcParse:function(Z){var ie=T(Z+="",!0);return ie.toString=function(){return Z},ie}}}var zu={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,e1=/^%/,t1=/[\\^$*+?|[\]().{}]/g;function ve(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",a=o.length;return n+(a<r?new Array(r-a+1).join(t)+o:o)}function r1(e){return e.replace(t1,"\\$&")}function Nn(e){return new RegExp("^(?:"+e.map(r1).join("|")+")","i")}function Fn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function n1(e,t,r){var n=Je.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function o1(e,t,r){var n=Je.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function a1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function s1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function i1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Gu(e,t,r){var n=Je.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Hu(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function l1(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function c1(e,t,r){var n=Je.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function u1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function qu(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function d1(e,t,r){var n=Je.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Wu(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function h1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function p1(e,t,r){var n=Je.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function m1(e,t,r){var n=Je.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function f1(e,t,r){var n=Je.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function g1(e,t,r){var n=e1.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function y1(e,t,r){var n=Je.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function b1(e,t,r){var n=Je.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Ju(e,t){return ve(e.getDate(),t,2)}function x1(e,t){return ve(e.getHours(),t,2)}function v1(e,t){return ve(e.getHours()%12||12,t,2)}function S1(e,t){return ve(1+Vo.count(Yt(e),e),t,3)}function Lp(e,t){return ve(e.getMilliseconds(),t,3)}function O1(e,t){return Lp(e,t)+"000"}function w1(e,t){return ve(e.getMonth()+1,t,2)}function C1(e,t){return ve(e.getMinutes(),t,2)}function P1(e,t){return ve(e.getSeconds(),t,2)}function T1(e){var t=e.getDay();return t===0?7:t}function R1(e,t){return ve(Ss.count(Yt(e)-1,e),t,2)}function Bp(e){var t=e.getDay();return t>=4||t===0?gn(e):gn.ceil(e)}function A1(e,t){return e=Bp(e),ve(gn.count(Yt(e),e)+(Yt(e).getDay()===4),t,2)}function _1(e){return e.getDay()}function E1(e,t){return ve(La.count(Yt(e)-1,e),t,2)}function I1(e,t){return ve(e.getFullYear()%100,t,2)}function V1(e,t){return e=Bp(e),ve(e.getFullYear()%100,t,2)}function M1(e,t){return ve(e.getFullYear()%1e4,t,4)}function j1(e,t){var r=e.getDay();return e=r>=4||r===0?gn(e):gn.ceil(e),ve(e.getFullYear()%1e4,t,4)}function k1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ve(t/60|0,"0",2)+ve(t%60,"0",2)}function Yu(e,t){return ve(e.getUTCDate(),t,2)}function $1(e,t){return ve(e.getUTCHours(),t,2)}function U1(e,t){return ve(e.getUTCHours()%12||12,t,2)}function D1(e,t){return ve(1+vs.count(Kt(e),e),t,3)}function Np(e,t){return ve(e.getUTCMilliseconds(),t,3)}function L1(e,t){return Np(e,t)+"000"}function B1(e,t){return ve(e.getUTCMonth()+1,t,2)}function N1(e,t){return ve(e.getUTCMinutes(),t,2)}function F1(e,t){return ve(e.getUTCSeconds(),t,2)}function z1(e){var t=e.getUTCDay();return t===0?7:t}function G1(e,t){return ve(Os.count(Kt(e)-1,e),t,2)}function Fp(e){var t=e.getUTCDay();return t>=4||t===0?yn(e):yn.ceil(e)}function H1(e,t){return e=Fp(e),ve(yn.count(Kt(e),e)+(Kt(e).getUTCDay()===4),t,2)}function q1(e){return e.getUTCDay()}function W1(e,t){return ve(Ba.count(Kt(e)-1,e),t,2)}function J1(e,t){return ve(e.getUTCFullYear()%100,t,2)}function Y1(e,t){return e=Fp(e),ve(e.getUTCFullYear()%100,t,2)}function K1(e,t){return ve(e.getUTCFullYear()%1e4,t,4)}function Q1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?yn(e):yn.ceil(e),ve(e.getUTCFullYear()%1e4,t,4)}function X1(){return"+0000"}function Ku(){return"%"}function Qu(e){return+e}function Xu(e){return Math.floor(+e/1e3)}var Kr,zp,Gp;Z1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Z1(e){return Kr=Zv(e),zp=Kr.format,Kr.parse,Gp=Kr.utcFormat,Kr.utcParse,Kr}function eS(e){return new Date(e)}function tS(e){return e instanceof Date?+e:+new Date(+e)}function cc(e,t,r,n,o,a,s,i,l,c){var u=Ep(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),b=c("%I %p"),S=c("%a %d"),E=c("%b %d"),O=c("%B"),w=c("%Y");function A(C){return(l(C)<C?p:i(C)<C?f:s(C)<C?m:a(C)<C?b:n(C)<C?o(C)<C?S:E:r(C)<C?O:w)(C)}return u.invert=function(C){return new Date(d(C))},u.domain=function(C){return arguments.length?h(Array.from(C,tS)):h().map(eS)},u.ticks=function(C){var T=h();return e(T[0],T[T.length-1],C??10)},u.tickFormat=function(C,T){return T==null?A:c(T)},u.nice=function(C){var T=h();return(!C||typeof C.range!="function")&&(C=t(T[0],T[T.length-1],C??10)),C?h(jp(T,C)):u},u.copy=function(){return xs(u,cc(e,t,r,n,o,a,s,i,l,c))},u}function Hp(){return mr.apply(cc(Qv,Xv,Yt,ic,Ss,Vo,ac,nc,Or,zp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function rS(){return mr.apply(cc(Yv,Kv,Kt,lc,Os,vs,sc,oc,Or,Gp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nS(){var e=0,t=1,r,n,o,a,s=gt,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:s(o===0?.5:(d=(a(d)-r)*o,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=a(e=+e),n=a(t=+t),o=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(i=!!d,c):i},c.interpolator=function(d){return arguments.length?(s=d,c):s};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,s=d(p,f),c):[s(0),s(1)]}}return c.range=u(bs),c.rangeRound=u(_p),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return a=d,r=d(e),n=d(t),o=r===n?0:1/(n-r),c}}function oS(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function qp(){var e=ec(nS()(gt));return e.copy=function(){return oS(e,qp())},Gx.apply(e,arguments)}function aS(e,t){return function(n,o){return o.location==="tick"?o.scale.tickFormat(e)(n):o.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function sS(e){return e.scaleType==="band"}function iS(e){return e.scaleType==="point"}function lS(e){return e.type==="piecewise"?$p(e.thresholds,e.colors):qp([e.min??0,e.max??100],e.color)}function Na(e){return e.values?ja(e.values,e.colors).unknown(e.unknownColor??null):ja(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function va(e){return e.type==="ordinal"?Na(e):lS(e)}function cS(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:o,domain:a}=e,s=r===void 0?999:Math.floor(Math.abs(a[1]-a[0])/r),i=t===void 0?2:Math.ceil(Math.abs(a[1]-a[0])/t),l=n??Math.floor(Math.abs(o[1]-o[0])/50);return Math.min(s,Math.max(i,l))}function uS(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Qi(e,t,r){switch(e){case"log":return kp(t,r);case"pow":return tc(t,r);case"sqrt":return Bv(t,r);case"time":return Hp(t,r);case"utc":return rS(t,r);default:return Mp(t,r)}}const Zu=e=>(e==null?void 0:e[0])instanceof Date;function ed(e,t){const r=Hp(e.data,t);return(n,{location:o})=>o==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const gi=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],o=e[0]-t[0]*r/n,a=e[1]+(100-t[1])*r/n;return[o,a]};let td,rd;class dS{constructor(){if(this.types=new Set,td)throw new Error("You can only create one instance!");td=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class hS{constructor(){if(this.types=new Set,rd)throw new Error("You can only create one instance!");rd=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const ws=new dS;ws.addType("bar");ws.addType("line");ws.addType("scatter");const pS=new hS;pS.addType("radar");function Wp(e){return ws.getTypes().has(e)}const mS=(e,t,r,n,o,a,s,i)=>{var f;const l=n==="x"?o[t].xExtremumGetter:o[t].yExtremumGetter,c=((f=s[t])==null?void 0:f.series)??{},[u,d]=(l==null?void 0:l({series:c,axis:r,axisIndex:a,isDefaultAxis:a===0,getFilters:i}))??[1/0,-1/0],[h,p]=e;return[Math.min(u,h),Math.max(d,p)]},Jp=(e,t,r,n,o,a)=>{const i=Object.keys(r).filter(Wp).reduce((l,c)=>mS(l,c,e,t,r,n,o,a),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},fS=(e,t,r,n)=>{const o=new Set;return Object.keys(t).filter(Wp).forEach(s=>{var c,u,d;const i=((c=r[s])==null?void 0:c.series)??{},l=(d=(u=t[s]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&o.add(h??n)})}),o},gS=(e,t,r,n)=>{var o;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const a of((o=n.line)==null?void 0:o.seriesOrder)??[]){const s=n.line.series[a];if(s.xAxisId===e.id||s.xAxisId===void 0&&r===0)return"strict"}return"nice"};function yS(e,t,r){const n=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return r.reverse?[n[1],n[0]]:n}const bS=.2,xS=.1;function Yp({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:o,zoomMap:a,zoomOptions:s,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=fS(o,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,f=s==null?void 0:s[p.id],m=a==null?void 0:a.get(p.id),b=m?[m.start,m.end]:[0,100],S=yS(e,o,p),[E,O]=Jp(p,o,n,h,t,m===void 0&&!f?i:void 0),w=!p.ignoreTooltip&&c.has(p.id),A=p.data??[];if(sS(p)){const te=p.categoryGapRatio??bS,ee=p.barGapRatio??xS,se=o==="y"?[S[1],S[0]]:S,H=gi(se,b);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:te,barGapRatio:ee,triggerTooltip:w},p,{data:A,scale:Wl(p.data,H).paddingInner(te).paddingOuter(te/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Na(K({values:p.data},p.colorMap)):va(p.colorMap))}),Zu(p.data)){const X=ed(p,se);u[p.id].valueFormatter=p.valueFormatter??X}}if(iS(p)){const te=o==="y"?[...S].reverse():S,ee=gi(te,b);if(u[p.id]=K({offset:0,height:0,triggerTooltip:w},p,{data:A,scale:Hx(p.data,ee),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Na(K({values:p.data},p.colorMap)):va(p.colorMap))}),Zu(p.data)){const se=ed(p,te);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const C=p.scaleType??"linear",T=l?gS(p,o,h,t):p.domainLimit??"nice",V=[p.min??E,p.max??O];if(typeof T=="function"){const{min:te,max:ee}=T(E,O);V[0]=te,V[1]=ee}const j=cS(K({},p,{range:S,domain:V})),y=uS(j,b),R=gi(S,b),z=Qi(C,V,R),I=T==="nice"?z.nice(j):z,[G,oe]=I.domain(),re=[p.min??G,p.max??oe];u[p.id]=K({offset:0,height:0,triggerTooltip:w},p,{data:A,scaleType:C,scale:I.domain(re),tickNumber:y,colorScale:p.colorMap&&va(p.colorMap),valueFormatter:p.valueFormatter??aS(y,Qi(C,S.map(te=>z.invert(te)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function vS(e){return e!=null}function Kp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:o}){return(a,s)=>{var b;const i=t[a.id];if(!i||i.filterMode!=="discard")return null;const l=e==null?void 0:e.get(a.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let c=[];const u=a.scaleType;u==="point"||u==="band"?c=[0,(((b=a.data)==null?void 0:b.length)??1)-1]:c=Jp(a,o,r,s,n);let d,h;[d,h]=Qi(!u||u==="band"||u==="point"?"linear":u,c,[0,100]).nice().domain(),d=d instanceof Date?d.getTime():d,h=h instanceof Date?h.getTime():h;const f=d+l.start*(h-d)/100,m=d+l.end*(h-d)/100;return(S,E)=>{var w;const O=S[o]??((w=a.data)==null?void 0:w[E]);return O==null?!0:a.scaleType==="point"||a.scaleType==="band"||typeof O=="string"?E>=f&&E<=m:O>=f&&O<=m}}}const SS=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:o})=>(a,s)=>{var c,u;return!(t===r?n:r)||o?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,a,s))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(vS).every(d=>d(a,s))},nd=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:o,id:a}=n,s=Hl(o,a,e);return s&&(r[a]=s),r},{}),OS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},Qp=e=>e.zoom;fe([Qp],e=>e==null?void 0:e.isInteracting);const Cs=fe([Qp],e=>(e==null?void 0:e.zoomData)&&OS(e==null?void 0:e.zoomData)),Mo=fe([Cn,Pn],(e,t)=>K({},nd("x")(e),nd("y")(t)));fe([Mo,(e,t)=>t],(e,t)=>e[t]);const wS=fe([Cs,Mo,ys,_o],(e,t,r,n)=>e&&t&&Kp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),CS=fe([Cs,Mo,ys,_o],(e,t,r,n)=>e&&t&&Kp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Xp=fe([wS,CS,Cn,Pn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const o=r==null?void 0:r.reduce((s,i,l)=>{const c=e(i,l);return c!==null&&(s[i.id]=c),s},{}),a=n==null?void 0:n.reduce((s,i,l)=>{const c=t(i,l);return c!==null&&(s[i.id]=c),s},{});if(!(Object.keys(o??{}).length===0&&Object.keys(a??{}).length===0))return SS(K({},o,a))}),kr=fe([Cn,Ao,_o,ys,Cs,Mo,Xp,mp],(e,t,r,n,o,a,s,i)=>Yp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:o,zoomOptions:a,getFilters:s,preferStrictDomainInLineCharts:i})),$r=fe([Pn,Ao,_o,ys,Cs,Mo,Xp,mp],(e,t,r,n,o,a,s,i)=>Yp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:o,zoomOptions:a,getFilters:s,preferStrictDomainInLineCharts:i}));fe([kr,$r,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));fe([Cn,Pn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(o=>o.id===r))??(t==null?void 0:t.find(o=>o.id===r))??null;if(n)return n});function Zp(e){return e.bandwidth!==void 0}function Qr(e){return e instanceof Date?e.getTime():e}function bn(e,t){const{scale:r,data:n,reverse:o}=e;if(!Zp(r)){const s=r.invert(t);if(n===void 0)return-1;const i=Qr(s);return n==null?void 0:n.findIndex((c,u)=>{const d=Qr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-Qr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(Qr(s)-d)<Math.abs(Qr(s)-Qr(n[u+1])))})}const a=r.bandwidth()===0?Math.floor((t-Math.min(...r.range())+r.step()/2)/r.step()):Math.floor((t-Math.min(...r.range()))/r.step());return a<0||a>=n.length?-1:o?n.length-1-a:a}function od(e,t,r){const{scale:n,data:o}=e;if(!Zp(n)){const a=n.invert(t);return r<0?a:o[r]}return r<0||r>=o.length?null:o[r]}function ad(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Ht(e){const t=F.useRef(e);return $t(()=>{t.current=e}),F.useRef((...r)=>(0,t.current)(...r)).current}const PS=Object.is;function em(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const o in e)if(r+=1,!PS(e[o],t[o])||!(o in t))return!1;for(const o in t)n+=1;return r===n}const uc=({store:e})=>{const t=Ht(function(){e.update(s=>K({},s,{interaction:{pointer:null,item:null}}))}),r=Ht(function(s){e.update(i=>{const l=i.interaction.item;return s?l===null||Object.keys(s).some(c=>s[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=Ht(function(s){e.update(i=>em(i.interaction.item,s)?i:K({},i,{interaction:K({},i.interaction,{item:s})}))}),o=Ht(function(s){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:o}}};uc.getInitialState=()=>({interaction:{item:null,pointer:null}});uc.params={};const dc=e=>e.interaction,TS=fe([dc],e=>e!==void 0),RS=fe([dc],e=>(e==null?void 0:e.item)??null),tm=fe([dc],e=>(e==null?void 0:e.pointer)??null),Ps=fe([tm],e=>e&&e.x),Ts=fe([tm],e=>e&&e.y);fe([RS],e=>e!==null);function so(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let a=0;a<o;a+=1)if(!so(e[a],t[a]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let a=0;a<o.length;a+=1)if(!t.has(o[a][0]))return!1;for(let a=0;a<o.length;a+=1){const s=o[a];if(!so(s[1],t.get(s[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let a=0;a<o.length;a+=1)if(!t.has(o[a][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let a=0;a<o;a+=1)if(e[a]!==t[a])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(let o=0;o<n;o+=1){const a=r[o];if(!so(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}const Rs=(e,t)=>t;function Xi(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>bn(t.axis[n],e)):bn(t.axis[r],e)}const rm=(e,t,r)=>{if(e===null)return null;const n=Xi(e,t,r);return n===-1?null:n},AS=fe([Ps,kr,Rs],rm),_S=fe([Ts,$r,Rs],rm),ES=fe([Ps,Ts,kr,$r],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(o=>({axisId:o,dataIndex:Xi(e,r,o)})),...t===null?[]:n.axisIds.map(o=>({axisId:o,dataIndex:Xi(t,n,o)}))].filter(o=>o.dataIndex!==null&&o.dataIndex>=0));function nm(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((o,a)=>od(t.axis[o],e,r[a])):od(t.axis[n],e,r)}fe([Ps,kr,AS,Rs],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:nm(e,t,r,n));fe([Ts,$r,_S,Rs],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:nm(e,t,r,n));const IS=fe([Ps,kr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:so}}),VS=fe([Ts,$r],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:bn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:so}});fe([IS,VS],(e,t)=>e.length>0||t.length>0);const sd={};function MS(e,t){const r=F.useRef(sd);return r.current===sd&&(r.current=e(t)),r}const jS=()=>{};function kS(e,t,r,n){const o=MS($S,{store:e,selector:t,skip:n}).current;o.effect=r,F.useEffect(o.onMount(n),[n])}function $S(e){const{store:t,selector:r,skip:n}=e;let o=!1,a;const s=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(a,c),a=c}))},i={effect:jS,dispose:null,onMount:l=>()=>{if(!l)return o||(o=!0,a=r(t.value)),s(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(o=!0,a=r(t.value),s()),i}const As=({params:e,store:t,seriesConfig:r,svgRef:n,instance:o})=>{const{xAxis:a,yAxis:s,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const O=[...a??[],...s??[]].filter(A=>A.id).map(A=>A.id),w=new Set(O.filter((A,C)=>O.indexOf(A)!==C));w.size>0&&po([`MUI X Charts: The following axis ids are duplicated: ${Array.from(w).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
117
|
+
`),"error")}const c=it(t,Ao),u=it(t,_o),d=it(t,TS),{axis:h,axisIds:p}=it(t,kr),{axis:f,axisIds:m}=it(t,$r);xp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),$t(()=>{e.highlightedAxis!==void 0&&t.update(O=>O.controlledCartesianAxisHighlight===e.highlightedAxis?O:K({},O,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const b=F.useRef(!0);F.useEffect(()=>{if(b.current){b.current=!1;return}t.update(O=>K({},O,{cartesianAxis:K({},O.cartesianAxis,{x:Op(a,i),y:wp(s,i)})}))},[r,c,a,s,i,t]);const S=p[0],E=m[0];return kS(t,ES,(O,w)=>{if(!Object.is(O,w)){if(O.length!==w.length){l(w);return}O!=null&&O.some(({axisId:A,dataIndex:C},T)=>w[T].axisId!==A||w[T].dataIndex!==C)&&l(w)}},!l),F.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const w=o.addInteractionListener("moveEnd",R=>{var z;R.detail.activeGestures.pan||(z=o.cleanInteraction)==null||z.call(o)}),A=o.addInteractionListener("panEnd",R=>{var z;R.detail.activeGestures.move||(z=o.cleanInteraction)==null||z.call(o)}),C=o.addInteractionListener("quickPressEnd",R=>{var z;!R.detail.activeGestures.move&&!R.detail.activeGestures.pan&&((z=o.cleanInteraction)==null||z.call(o))}),T=R=>{var oe,re;const z=R.detail.srcEvent,I=R.detail.target,G=ad(O,z);if(R.detail.srcEvent.buttons>=1&&(I!=null&&I.hasPointerCapture(R.detail.srcEvent.pointerId))&&!(I!=null&&I.closest("[data-charts-zoom-slider]"))&&(I==null||I.releasePointerCapture(R.detail.srcEvent.pointerId)),!o.isPointInside(G.x,G.y,I)){(oe=o.cleanInteraction)==null||oe.call(o);return}(re=o.setPointerCoordinate)==null||re.call(o,G)},V=o.addInteractionListener("move",T),j=o.addInteractionListener("pan",T),y=o.addInteractionListener("quickPress",T);return()=>{V.cleanup(),w.cleanup(),j.cleanup(),A.cleanup(),y.cleanup(),C.cleanup()}},[n,t,h,S,f,E,o,e.disableAxisListener,d]),F.useEffect(()=>{const O=n.current,w=e.onAxisClick;if(O===null||!w)return()=>{};const A=o.addInteractionListener("tap",C=>{let T=null,V=!1;const j=ad(O,C.detail.srcEvent),y=bn(h[S],j.x);V=y!==-1,T=V?y:bn(f[E],j.y);const R=V?p[0]:m[0];if(T==null||T===-1)return;const z=(V?h:f)[R].data[T],I={};Object.keys(u).filter(G=>["bar","line"].includes(G)).forEach(G=>{var oe;(oe=u[G])==null||oe.seriesOrder.forEach(re=>{const te=u[G].series[re],ee=te.xAxisId,se=te.yAxisId,H=V?ee:se;(H===void 0||H===R)&&(I[re]=te.data[T])})}),w(C.detail.srcEvent,{dataIndex:T,axisValue:z,seriesValues:I})});return()=>{A.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,E,o]),{}};As.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};As.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??fp,theme:e.theme??"light",defaultizedXAxis:Op(e.xAxis,e.dataset),defaultizedYAxis:wp(e.yAxis,e.dataset)});As.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function id(e,t){return e.id!==void 0?e:K({id:t},e)}function ld(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?Na(K({values:e.data},e.colorMap)):va(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function om(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((o,a)=>{const s=o.dataKey,i=o.id??`defaultized-z-axis-${a}`;if(s===void 0||o.data!==void 0){r[i]=ld(id(o,i)),n.push(i);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");r[i]=ld(id(K({},o,{data:t.map(l=>l[s])}),i)),n.push(i)}),{axis:r,axisIds:n}}const hc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,o=F.useRef(!0);return F.useEffect(()=>{if(o.current){o.current=!1;return}t.update(a=>K({},a,{zAxis:om(r,n)}))},[r,n,t]),{}};hc.params={zAxis:!0,dataset:!0};hc.getInitialState=e=>({zAxis:om(e.zAxis,e.dataset)});const US=e=>e,DS=fe([US],e=>e.zAxis),_s=({store:e,params:t})=>{xp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),$t(()=>{e.update(o=>o.highlight.item===t.highlightedItem?o:K({},o,{highlight:K({},o.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=Ht(()=>{var o;(o=t.onHighlightChange)==null||o.call(t,null),e.update(a=>K({},a,{highlight:{item:null}}))}),n=Ht(o=>{var s;const a=e.getSnapshot().highlight.item;em(a,o)||((s=t.onHighlightChange)==null||s.call(t,o),e.update(i=>K({},i,{highlight:{item:o}})))});return{instance:{clearHighlight:r,setHighlight:n}}};_s.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});_s.getInitialState=e=>({highlight:{item:e.highlightedItem}});_s.params={highlightedItem:!0,onHighlightChange:!0};const cd=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},am=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,o=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),a=o?(l=t.data)==null?void 0:l.filter((c,u)=>o({x:null,y:null},u)):t.data,s=Math.min(...a??[]),i=Math.max(...a??[]);return[s,i]},sm=e=>t=>{const{series:r,axis:n,getFilters:o,isDefaultAxis:a}=t;return Object.keys(r).filter(s=>{const i=e==="x"?r[s].xAxisId:r[s].yAxisId;return i===n.id||a&&i===void 0}).reduce((s,i)=>{const{stackedData:l}=r[i],c=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:a,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(cd(p[0],e),f)||!c(cd(p[1],e),f))?h:[Math.min(...p,h[0]),Math.max(...p,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,s[0]),Math.max(d,s[1])]},[1/0,-1/0])},LS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?sm("x")(e):am(e),BS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?am(e):sm("y")(e);function Ge(e){return function(){return e}}const ud=Math.abs,Ze=Math.atan2,gr=Math.cos,NS=Math.max,yi=Math.min,_t=Math.sin,sn=Math.sqrt,at=1e-12,bo=Math.PI,Fa=bo/2,Sa=2*bo;function FS(e){return e>1?0:e<-1?bo:Math.acos(e)}function dd(e){return e>=1?Fa:e<=-1?-Fa:Math.asin(e)}const Zi=Math.PI,el=2*Zi,br=1e-6,zS=el-br;function im(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function GS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return im;const r=10**t;return function(n){this._+=n[0];for(let o=1,a=n.length;o<a;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}class HS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?im:GS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,o){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(t,r,n,o,a,s){this._append`C${+t},${+r},${+n},${+o},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,n,o,a){if(t=+t,r=+r,n=+n,o=+o,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,i=this._y1,l=n-t,c=o-r,u=s-t,d=i-r,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>br)if(!(Math.abs(d*l-c*u)>br)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,f=o-i,m=l*l+c*c,b=p*p+f*f,S=Math.sqrt(m),E=Math.sqrt(h),O=a*Math.tan((Zi-Math.acos((m+h-b)/(2*S*E)))/2),w=O/E,A=O/S;Math.abs(w-1)>br&&this._append`L${t+w*u},${r+w*d}`,this._append`A${a},${a},0,0,${+(d*p>u*f)},${this._x1=t+A*l},${this._y1=r+A*c}`}}arc(t,r,n,o,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(o),l=n*Math.sin(o),c=t+i,u=r+l,d=1^s,h=s?o-a:a-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>br||Math.abs(this._y1-u)>br)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%el+el),h>zS?this._append`A${n},${n},0,1,${d},${t-i},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:h>br&&this._append`A${n},${n},0,${+(h>=Zi)},${d},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function qS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new HS(t)}function WS(e){return e.innerRadius}function JS(e){return e.outerRadius}function YS(e){return e.startAngle}function KS(e){return e.endAngle}function QS(e){return e&&e.padAngle}function XS(e,t,r,n,o,a,s,i){var l=r-e,c=n-t,u=s-o,d=i-a,h=d*l-u*c;if(!(h*h<at))return h=(u*(t-a)-d*(e-o))/h,[e+h*l,t+h*c]}function ra(e,t,r,n,o,a,s){var i=e-r,l=t-n,c=(s?a:-a)/sn(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,b=(h+f)/2,S=(p+m)/2,E=f-h,O=m-p,w=E*E+O*O,A=o-a,C=h*m-f*p,T=(O<0?-1:1)*sn(NS(0,A*A*w-C*C)),V=(C*O-E*T)/w,j=(-C*E-O*T)/w,y=(C*O+E*T)/w,R=(-C*E+O*T)/w,z=V-b,I=j-S,G=y-b,oe=R-S;return z*z+I*I>G*G+oe*oe&&(V=y,j=R),{cx:V,cy:j,x01:-u,y01:-d,x11:V*(o/A-1),y11:j*(o/A-1)}}function lm(){var e=WS,t=JS,r=Ge(0),n=null,o=YS,a=KS,s=QS,i=null,l=qS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=o.apply(this,arguments)-Fa,m=a.apply(this,arguments)-Fa,b=ud(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>at))i.moveTo(0,0);else if(b>Sa-at)i.moveTo(p*gr(f),p*_t(f)),i.arc(0,0,p,f,m,!S),h>at&&(i.moveTo(h*gr(m),h*_t(m)),i.arc(0,0,h,m,f,S));else{var E=f,O=m,w=f,A=m,C=b,T=b,V=s.apply(this,arguments)/2,j=V>at&&(n?+n.apply(this,arguments):sn(h*h+p*p)),y=yi(ud(p-h)/2,+r.apply(this,arguments)),R=y,z=y,I,G;if(j>at){var oe=dd(j/h*_t(V)),re=dd(j/p*_t(V));(C-=oe*2)>at?(oe*=S?1:-1,w+=oe,A-=oe):(C=0,w=A=(f+m)/2),(T-=re*2)>at?(re*=S?1:-1,E+=re,O-=re):(T=0,E=O=(f+m)/2)}var te=p*gr(E),ee=p*_t(E),se=h*gr(A),H=h*_t(A);if(y>at){var X=p*gr(O),le=p*_t(O),xe=h*gr(w),Le=h*_t(w),ae;if(b<bo)if(ae=XS(te,ee,xe,Le,X,le,se,H)){var be=te-ae[0],Se=ee-ae[1],me=X-ae[0],Z=le-ae[1],ie=1/_t(FS((be*me+Se*Z)/(sn(be*be+Se*Se)*sn(me*me+Z*Z)))/2),de=sn(ae[0]*ae[0]+ae[1]*ae[1]);R=yi(y,(h-de)/(ie-1)),z=yi(y,(p-de)/(ie+1))}else R=z=0}T>at?z>at?(I=ra(xe,Le,te,ee,p,z,S),G=ra(X,le,se,H,p,z,S),i.moveTo(I.cx+I.x01,I.cy+I.y01),z<y?i.arc(I.cx,I.cy,z,Ze(I.y01,I.x01),Ze(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,z,Ze(I.y01,I.x01),Ze(I.y11,I.x11),!S),i.arc(0,0,p,Ze(I.cy+I.y11,I.cx+I.x11),Ze(G.cy+G.y11,G.cx+G.x11),!S),i.arc(G.cx,G.cy,z,Ze(G.y11,G.x11),Ze(G.y01,G.x01),!S))):(i.moveTo(te,ee),i.arc(0,0,p,E,O,!S)):i.moveTo(te,ee),!(h>at)||!(C>at)?i.lineTo(se,H):R>at?(I=ra(se,H,X,le,h,-R,S),G=ra(te,ee,xe,Le,h,-R,S),i.lineTo(I.cx+I.x01,I.cy+I.y01),R<y?i.arc(I.cx,I.cy,R,Ze(I.y01,I.x01),Ze(G.y01,G.x01),!S):(i.arc(I.cx,I.cy,R,Ze(I.y01,I.x01),Ze(I.y11,I.x11),!S),i.arc(0,0,h,Ze(I.cy+I.y11,I.cx+I.x11),Ze(G.cy+G.y11,G.cx+G.x11),S),i.arc(G.cx,G.cy,R,Ze(G.y11,G.x11),Ze(G.y01,G.x01),!S))):i.arc(0,0,h,A,w,S)}if(i.closePath(),u)return i=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-bo/2;return[gr(d)*u,_t(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Ge(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Ge(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Ge(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Ge(+u),c):n},c.startAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Ge(+u),c):o},c.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Ge(+u),c):a},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Ge(+u),c):s},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function cm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ZS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function eO(e){return e}function tO(){var e=eO,t=ZS,r=null,n=Ge(0),o=Ge(Sa),a=Ge(0);function s(i){var l,c=(i=cm(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),b=Math.min(Sa,Math.max(-Sa,o.apply(this,arguments)-m)),S,E=Math.min(Math.abs(b)/c,a.apply(this,arguments)),O=E*(b<0?-1:1),w;for(l=0;l<c;++l)(w=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=w);for(t!=null?p.sort(function(A,C){return t(f[A],f[C])}):r!=null&&p.sort(function(A,C){return r(i[A],i[C])}),l=0,d=h?(b-c*O)/h:0;l<c;++l,m=S)u=p[l],w=f[u],S=m+(w>0?w*d:0)+O,f[u]={data:i[u],index:l,value:w,startAngle:m,endAngle:S,padAngle:E};return f}return s.value=function(i){return arguments.length?(e=typeof i=="function"?i:Ge(+i),s):e},s.sortValues=function(i){return arguments.length?(t=i,r=null,s):t},s.sort=function(i){return arguments.length?(r=i,t=null,s):r},s.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Ge(+i),s):n},s.endAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Ge(+i),s):o},s.padAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Ge(+i),s):a},s}function xn(e,t){if((s=e.length)>1)for(var r=1,n,o,a=e[t[0]],s,i=a.length;r<s;++r)for(o=a,a=e[t[r]],n=0;n<i;++n)a[n][1]+=a[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function vn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function rO(e,t){return e[t]}function nO(e){const t=[];return t.key=e,t}function um(){var e=Ge([]),t=vn,r=xn,n=rO;function o(a){var s=Array.from(e.apply(this,arguments),nO),i,l=s.length,c=-1,u;for(const d of a)for(i=0,++c;i<l;++i)(s[i][c]=[0,+n(d,s[i].key,c,a)]).data=d;for(i=0,u=cm(t(s));i<l;++i)s[u[i]].index=i;return r(s,u),s}return o.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ge(Array.from(a)),o):e},o.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ge(+a),o):n},o.order=function(a){return arguments.length?(t=a==null?vn:typeof a=="function"?a:Ge(Array.from(a)),o):t},o.offset=function(a){return arguments.length?(r=a??xn,o):r},o}function oO(e,t){if((n=e.length)>0){for(var r,n,o=0,a=e[0].length,s;o<a;++o){for(s=r=0;r<n;++r)s+=e[r][o][1]||0;if(s)for(r=0;r<n;++r)e[r][o][1]/=s}xn(e,t)}}function aO(e,t){if((l=e.length)>0)for(var r,n=0,o,a,s,i,l,c=e[t[0]].length;n<c;++n)for(s=i=0,r=0;r<l;++r)(a=(o=e[t[r]][n])[1]-o[0])>0?(o[0]=s,o[1]=s+=a):a<0?(o[1]=i,o[0]=i+=a):(o[0]=0,o[1]=a)}function sO(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,a=n.length;r<a;++r){for(var s=0,i=0;s<o;++s)i+=e[s][r][1]||0;n[r][1]+=n[r][0]=-i/2}xn(e,t)}}function iO(e,t){if(!(!((s=e.length)>0)||!((a=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,a,s;n<a;++n){for(var i=0,l=0,c=0;i<s;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,f=0;f<i;++f){var m=e[t[f]],b=m[n][1]||0,S=m[n-1][1]||0;p+=b-S}l+=d,c+=p*d}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,xn(e,t)}}function dm(e){var t=e.map(lO);return vn(e).sort(function(r,n){return t[r]-t[n]})}function lO(e){for(var t=-1,r=0,n=e.length,o,a=-1/0;++t<n;)(o=+e[t][1])>a&&(a=o,r=t);return r}function hm(e){var t=e.map(pm);return vn(e).sort(function(r,n){return t[r]-t[n]})}function pm(e){for(var t=0,r=-1,n=e.length,o;++r<n;)(o=+e[r][1])&&(t+=o);return t}function cO(e){return hm(e).reverse()}function uO(e){var t=e.length,r,n,o=e.map(pm),a=dm(e),s=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=a[r],s<i?(s+=o[n],l.push(n)):(i+=o[n],c.push(n));return c.reverse().concat(l)}function dO(e){return vn(e).reverse()}const bi={appearance:dm,ascending:hm,descending:cO,insideOut:uO,none:vn,reverse:dO},xi={expand:oO,diverging:aO,none:xn,silhouette:sO,wiggle:iO},mm=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,o=[],a={};return r.forEach(s=>{const{stack:i,stackOrder:l,stackOffset:c}=t[s];i===void 0?o.push({ids:[s],stackingOrder:bi.none,stackingOffset:xi.none}):a[i]===void 0?(a[i]=o.length,o.push({ids:[s],stackingOrder:bi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:xi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(o[a[i]].ids.push(s),l!==void 0&&(o[a[i]].stackingOrder=bi[l]),c!==void 0&&(o[a[i]].stackingOffset=xi[c]))}),o},hO=e=>e==null?"":e.toLocaleString(),pO=(e,t)=>{const{seriesOrder:r,series:n}=e,o=mm(e),a=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{a.length<=u?a.push({[i]:c}):a[u][i]=c});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
118
|
+
`))});const s={};return o.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=um().keys(l.map(h=>{const p=n[h].dataKey;return n[h].data===void 0&&p!==void 0?p:h})).value((h,p)=>h[p]??0).order(u).offset(c)(a);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??hO},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&po([`MUI X Charts: your dataset key "${f}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:o,series:s}};function Qt(e,t){return typeof e=="function"?e(t):e}const mO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const a=Qt(r[o].label,"legend");return a===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:a}),n},[])},fO=(e,t,r)=>{const n=e.layout==="vertical",o=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,a=n?r==null?void 0:r.colorScale:t==null?void 0:t.colorScale,s=n?t==null?void 0:t.data:r==null?void 0:r.data;return a?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:a(l);return c===null?e.color:c}:o&&s?i=>{if(i===void 0)return e.color;const l=s[i],c=l===null?e.color:o(l);return c===null?e.color:c}:()=>e.color},gO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Qt(t.label,"tooltip"),a=t.data[n.dataIndex];if(a==null)return null;const s=t.valueFormatter(a,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:a,formattedValue:s,markType:t.labelMarkType}},yO=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),bO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),xO={seriesProcessor:pO,colorProcessor:fO,legendGetter:mO,tooltipGetter:gO,axisTooltipGetter:yO,xExtremumGetter:LS,yExtremumGetter:BS,getSeriesWithDefaultValues:bO},za=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],vO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(a=>{const s=t[a].xAxisId;return s===r.id||s===void 0&&n}).reduce((a,s)=>{var c;const i=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),l=(c=t[s].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:za(u,[d.x,d.x]),[1/0,-1/0]);return za(a,l??[1/0,-1/0])},[1/0,-1/0])},SO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(a=>{const s=t[a].yAxisId;return s===r.id||s===void 0&&n}).reduce((a,s)=>{var c;const i=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),l=(c=t[s].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:za(u,[d.y,d.y]),[1/0,-1/0]);return za(a,l??[1/0,-1/0])},[1/0,-1/0])},OO=({series:e,seriesOrder:t},r)=>({series:Object.fromEntries(Object.entries(e).map(([o,a])=>{const s=a==null?void 0:a.datasetKeys,i=["x","y","id"].filter(c=>typeof(s==null?void 0:s[c])!="string");if(a!=null&&a.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${o}' has incomplete datasetKeys.`,`Properties ${i.map(c=>`"${c}"`).join(", ")} are missing.`].join(`
|
|
119
|
+
`));const l=s?(r==null?void 0:r.map(c=>({x:c[s.x]??null,y:c[s.y]??null,z:s.z&&c[s.z],id:s.id&&c[s.id]})))??[]:a.data??[];return[o,K({labelMarkType:"circle",markerSize:4},a,{preview:K({markerSize:1},a==null?void 0:a.preview),data:l,valueFormatter:a.valueFormatter??(c=>c&&`(${c.x}, ${c.y})`)})]})),seriesOrder:t}),wO=(e,t,r,n)=>{const o=n==null?void 0:n.colorScale,a=r==null?void 0:r.colorScale,s=t==null?void 0:t.colorScale;return o?i=>{var u,d;if(i===void 0)return e.color;if(((u=n==null?void 0:n.data)==null?void 0:u[i])!==void 0){const h=o((d=n==null?void 0:n.data)==null?void 0:d[i]);if(h!==null)return h}const l=e.data[i],c=l===null?e.color:o(l.z);return c===null?e.color:c}:a?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:a(l.y);return c===null?e.color:c}:s?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:s(l.x);return c===null?e.color:c}:()=>e.color},CO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const a=Qt(r[o].label,"legend");return a===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:a}),n},[])},PO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Qt(t.label,"tooltip"),a=t.data[n.dataIndex],s=t.valueFormatter(a,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:a,formattedValue:s,markType:t.labelMarkType}},TO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),RO={seriesProcessor:OO,colorProcessor:wO,legendGetter:CO,tooltipGetter:PO,xExtremumGetter:vO,yExtremumGetter:SO,getSeriesWithDefaultValues:TO},AO=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]};function _O(e,t,r,n){return r.reduce((o,a,s)=>{if(t[s]===null)return o;const[i,l]=e(a);return n&&(!n({y:i,x:null},s)||!n({y:l,x:null},s))?o:[Math.min(i,l,o[0]),Math.max(i,l,o[1])]},[1/0,-1/0])}const EO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(a=>{const s=t[a].yAxisId;return s===r.id||n&&s===void 0}).reduce((a,s)=>{const{area:i,stackedData:l,data:c}=t[s],u=i!==void 0,d=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),h=u&&r.scaleType!=="log"&&typeof t[s].baseline!="string"?b=>b:b=>[b[1],b[1]],p=_O(h,c,l,d),[f,m]=p;return[Math.min(f,a[0]),Math.max(m,a[1])]},[1/0,-1/0])};function IO(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=K({},e[n],{valueFormatter:e[n].valueFormatter??t})}),r}const VO=(e,t)=>{const{seriesOrder:r,series:n}=e,o=mm(K({},e,{defaultStrategy:{stackOffset:"none"}})),a=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{a.length<=u?a.push({[i]:c}):a[u][i]=c});else if(t===void 0&&process.env.NODE_ENV!=="production")throw new Error([`MUI X Charts: line series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
120
|
+
`))});const s={};return o.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=um().keys(l.map(h=>{const p=n[h].dataKey;return n[h].data===void 0&&p!==void 0?p:h})).value((h,p)=>h[p]??0).order(c).offset(u)(a);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=K({labelMarkType:"line"},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&po([`MUI X Charts: Your dataset key "${f}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:o,series:IO(s,i=>i==null?"":i.toLocaleString())}},MO=(e,t,r)=>{const n=r==null?void 0:r.colorScale,o=t==null?void 0:t.colorScale;return n?a=>{if(a===void 0)return e.color;const s=e.data[a],i=s===null?e.color:n(s);return i===null?e.color:i}:o?a=>{var l;if(a===void 0)return e.color;const s=(l=t.data)==null?void 0:l[a],i=s===null?e.color:o(s);return i===null?e.color:i}:()=>e.color},jO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const a=Qt(r[o].label,"legend");return a===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:a}),n},[])},kO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Qt(t.label,"tooltip"),a=t.data[n.dataIndex],s=t.valueFormatter(a,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:a,formattedValue:s,markType:t.labelMarkType}},$O=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),UO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),DO={colorProcessor:MO,seriesProcessor:VO,legendGetter:jO,tooltipGetter:kO,axisTooltipGetter:$O,xExtremumGetter:AO,yExtremumGetter:EO,getSeriesWithDefaultValues:UO},LO=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,r)=>r-t;case"asc":return(t,r)=>t-r;default:return null}},BO=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(o=>{const a=tO().startAngle(2*Math.PI*(r[o].startAngle??0)/360).endAngle(2*Math.PI*(r[o].endAngle??360)/360).padAngle(2*Math.PI*(r[o].paddingAngle??0)/360).sortValues(LO(r[o].sortingValues??"none"))(r[o].data.map(s=>s.value));n[o]=K({labelMarkType:"circle",valueFormatter:s=>s.value.toLocaleString()},r[o],{data:r[o].data.map((s,i)=>K({},s,{id:s.id??`auto-generated-pie-id-${o}-${i}`},a[i])).map((s,i)=>{var l,c;return K({labelMarkType:"circle"},s,{formattedValue:((c=(l=r[o]).valueFormatter)==null?void 0:c.call(l,K({},s,{label:Qt(s.label,"arc")}),{dataIndex:i}))??s.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},NO=e=>t=>e.data[t].color,FO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>(r[o].data.forEach((a,s)=>{const i=Qt(a.label,"legend");i!==void 0&&n.push({markType:a.labelMarkType??r[o].labelMarkType,id:a.id??s,seriesId:o,color:a.color,label:i,itemId:a.id??s})}),n),[])},zO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=t.data[n.dataIndex];if(o==null)return null;const a=Qt(o.label,"tooltip"),s=K({},o,{label:a}),i=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:s,formattedValue:i,markType:o.labelMarkType??t.labelMarkType}},GO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,o)=>K({color:r[o%r.length]},n))}),HO={colorProcessor:NO,seriesProcessor:BO,legendGetter:FO,tooltipGetter:zO,getSeriesWithDefaultValues:GO},qO={bar:xO,scatter:RO,line:DO,pie:HO},WO=[hc,As,uc,_s];function JO(e){const{children:t,plugins:r=WO,pluginParams:n={},seriesConfig:o=qO}=e,{contextValue:a}=Rx(r,n,o);return g.jsx(Gl.Provider,{value:a,children:t})}const fm=()=>{const e=F.useContext(Gl);if(e==null)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join(`
|
|
121
121
|
`));return e};function Ur(){const e=fm();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
122
|
-
`));return e.store}function gm(){const e=Ur();return it(e,
|
|
123
|
-
`));return e.svgRef}function ZO(){const e=ym();return F.useCallback(t=>`${e}-gradient-${t}`,[e])}function ew(){const e=ym();return F.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var vi,hd;function tw(){if(hd)return vi;hd=1;var e=4,t=.001,r=1e-7,n=10,a=11,o=1/(a-1),s=typeof Float32Array=="function";function i(m,b){return 1-3*b+3*m}function l(m,b){return 3*b-6*m}function c(m){return 3*m}function u(m,b,S){return((i(b,S)*m+l(b,S))*m+c(b))*m}function d(m,b,S){return 3*i(b,S)*m*m+2*l(b,S)*m+c(b)}function h(m,b,S,E,O){var w,A,C=0;do A=b+(S-b)/2,w=u(A,E,O)-m,w>0?S=A:b=A;while(Math.abs(w)>r&&++C<n);return A}function p(m,b,S,E){for(var O=0;O<e;++O){var w=d(b,S,E);if(w===0)return b;var A=u(b,S,E)-m;b-=A/w}return b}function f(m){return m}return vi=function(b,S,E,O){if(!(0<=b&&b<=1&&0<=E&&E<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===S&&E===O)return f;for(var w=s?new Float32Array(a):new Array(a),A=0;A<a;++A)w[A]=u(A*o,b,E);function C(T){for(var V=0,j=1,y=a-1;j!==y&&w[j]<=T;++j)V+=o;--j;var R=(T-w[j])/(w[j+1]-w[j]),z=V+R*o,I=d(z,b,E);return I>=t?p(T,z,b,E):I===0?z:h(T,V,V+o,b,E)}return function(V){return V===0?0:V===1?1:u(C(V),S,O)}},vi}var rw=tw();const nw=Og(rw),aw=300,ow=nw(.66,0,.34,1);var Sn=0,ra=0,zn=0,bm=1e3,Go,na,Ho=0,Ar=0,Es=0,ba=typeof performance=="object"&&performance.now?performance:Date,xm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function pc(){return Ar||(xm(sw),Ar=ba.now()+Es)}function sw(){Ar=0}function qo(){this._call=this._time=this._next=null}qo.prototype=vm.prototype={constructor:qo,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?pc():+r)+(t==null?0:+t),!this._next&&na!==this&&(na?na._next=this:Go=this,na=this),this._call=e,this._time=r,nl()},stop:function(){this._call&&(this._call=null,this._time=1/0,nl())}};function vm(e,t,r){var n=new qo;return n.restart(e,t,r),n}function rl(){pc(),++Sn;for(var e=Go,t;e;)(t=Ar-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Sn}function pd(){Ar=(Ho=ba.now())+Es,Sn=ra=0;try{rl()}finally{Sn=0,lw(),Ar=0}}function iw(){var e=ba.now(),t=e-Ho;t>bm&&(Es-=t,Ho=e)}function lw(){for(var e,t=Go,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Go=r);na=e,nl(n)}function nl(e){if(!Sn){ra&&(ra=clearTimeout(ra));var t=e-Ar;t>24?(e<1/0&&(ra=setTimeout(pd,e-ba.now()-Es)),zn&&(zn=clearInterval(zn))):(zn||(Ho=ba.now(),zn=setInterval(iw,bm)),Sn=1,xm(pd))}}function cw(e,t,r){var n=new qo;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class uw{constructor(t,r,n){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=r,this.onTickCallback=n,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const r=this.duration===0?1:this.elapsed/this.duration,n=this.easingFn(r);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=pc()-this.elapsed;return this.timer=vm(r=>this.timerCallback(r),0,t),rl(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),cw(()=>this.timerCallback(this.duration)),rl(),this}}function dw(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a+=1){const o=r[a];if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1}return!0}function hw(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const o=F.useRef(a),s=F.useRef(null),i=F.useRef(null),l=F.useRef(e);$t(()=>{l.current=e},[e]),$t(()=>{var d;n&&((d=s.current)==null||d.finish(),s.current=null,i.current=null,o.current=e)},[e,n]);const c=F.useCallback(d=>{const h=o.current,p=t(h,e);s.current=new uw(aw,ow,f=>{const m=p(f);o.current=m,r(d,m)})},[r,t,e]);return F.useCallback(d=>{var p,f,m,b;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(dw(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((b=s.current)==null||b.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function pw(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:o=e,ref:s}){const i=r??(u=>u),l=hw(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return K({},r(a?e:o),{ref:ps(l,s)})}function md(e){const{isReversed:t,gradientId:r,size:n,direction:a,scale:o,colorMap:s}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((i,l)=>{const c=o(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(F.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:s.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:s.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const mw=10;function fd(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:a,direction:o,scale:s,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(s).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Ct(c[0],c[1]):Kl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/mw),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${r?1:2}`]:t==="objectBoundingBox"?1:`${a}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const b=d(m/h);if(b===void 0)return null;const S=s(b);if(S===void 0)return null;const E=r?1-S/a:S/a,O=i(b);return O===null?null:g.jsx("stop",{offset:E,stopColor:O,stopOpacity:1},p+m)})})}const fw=10,gw=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Si(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,o=[a.min??0,a.max??100],s=typeof o[0]=="number"?Ct(o[0],o[1]):Kl(o[0],o[1]),i=fw,l=`${o[0]}-${o[1]}-`;return g.jsx("linearGradient",K({id:r},gw(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=s(d);if(h===void 0)return null;const p=n(h);return p===null?null:g.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function yw(){const{top:e,height:t,bottom:r,left:n,width:a,right:o}=gm(),s=e+t+r,i=n+a+o,l=ZO(),c=ew(),{xAxis:u,xAxisIds:d}=YO(),{yAxis:h,yAxisIds:p}=KO(),{zAxis:f,zAxisIds:m}=QO(),b=p.filter(O=>h[O].colorMap!==void 0),S=d.filter(O=>u[O].colorMap!==void 0),E=m.filter(O=>f[O].colorMap!==void 0);return b.length===0&&S.length===0&&E.length===0?null:g.jsxs("defs",{children:[b.map(O=>{const w=l(O),A=c(O),{colorMap:C,scale:T,colorScale:V,reverse:j}=h[O];return(C==null?void 0:C.type)==="piecewise"?g.jsx(md,{isReversed:!j,scale:T,colorMap:C,size:s,gradientId:w,direction:"y"},w):(C==null?void 0:C.type)==="continuous"?g.jsxs(F.Fragment,{children:[g.jsx(fd,{isReversed:!j,scale:T,colorScale:V,colorMap:C,size:s,gradientId:w,direction:"y"}),g.jsx(Si,{isReversed:j,colorScale:V,colorMap:C,gradientId:A})]},w):null}),S.map(O=>{const w=l(O),A=c(O),{colorMap:C,scale:T,reverse:V,colorScale:j}=u[O];return(C==null?void 0:C.type)==="piecewise"?g.jsx(md,{isReversed:V,scale:T,colorMap:C,size:i,gradientId:w,direction:"x"},w):(C==null?void 0:C.type)==="continuous"?g.jsxs(F.Fragment,{children:[g.jsx(fd,{isReversed:V,scale:T,colorScale:j,colorMap:C,size:i,gradientId:w,direction:"x"}),g.jsx(Si,{isReversed:V,colorScale:j,colorMap:C,gradientId:A})]},w):null}),E.map(O=>{const w=c(O),{colorMap:A,colorScale:C}=f[O];return(A==null?void 0:A.type)==="continuous"?g.jsx(Si,{colorScale:C,colorMap:A,gradientId:w},w):null})]})}const bw=["children","className","title","desc"],xw=pt("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none"})),mc=F.forwardRef(function(t,r){const n=Ur(),{width:a,height:o}=it(n,ax),{width:s,height:i}=it(n,nx),l=XO(),c=ps(l,r),u=lb({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=cr(u,bw),b=o>0&&a>0;return g.jsxs(xw,K({ownerState:{width:s,height:i},viewBox:`0 0 ${a} ${o}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(yw,{}),b&&d]}))});process.env.NODE_ENV!=="production"&&(mc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(mc.propTypes={children:x.node,className:x.string,desc:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string});function Gn(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(r))return r*t/100}if(e.endsWith("px")){const r=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(r))return r}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function Oi(e){const t=tl(e);return[Math.sin(t),-Math.cos(t)]}function vw(e,t){const r=[[0,0],Oi(e),Oi(t)],n=Math.min(e,t),a=Math.max(e,t),o=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=o+u*90;d<a&&r.push(Oi(d))}const s=Math.min(...r.map(([u])=>u)),i=Math.max(...r.map(([u])=>u)),l=Math.min(...r.map(([,u])=>u)),c=Math.max(...r.map(([,u])=>u));return{cx:-s/(i-s),cy:-l/(c-l),minX:s,maxX:i,minY:l,maxY:c}}function Sw(e,t,r,n,{minX:a,maxX:o,minY:s,maxY:i}){return Math.min(...[{ratio:Math.abs(a),space:e},{ratio:Math.abs(o),space:r-e},{ratio:Math.abs(s),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const fc=F.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(fc.displayName="GaugeContext");function Ow(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:a=0,endAngle:o=360,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=gm(),b=vw(a,o),S=c?Gn(c,f):b.cx*f,E=u?Gn(u,m):b.cy*m;let O=h+S,w=p+E;const A=Sw(S,E,f,m,b);if(c===void 0){const y=A*(b.maxX-b.minX);O=h+(f-y)/2+b.cx*y}if(u===void 0){const y=A*(b.maxY-b.minY);w=p+(m-y)/2+b.cy*y}const C=Gn(s??A,A),T=Gn(i??"80%",A),V=Gn(l??0,C-T),j=F.useMemo(()=>{const y=tl(a),R=tl(o);return{value:t,valueMin:r,valueMax:n,startAngle:y,endAngle:R,outerRadius:C,innerRadius:T,cornerRadius:V,cx:O,cy:w,maxRadius:A,valueAngle:t===null?null:y+(R-y)*(t-r)/(n-r)}},[t,r,n,a,o,C,T,V,O,w,A]);return g.jsx(fc.Provider,{value:j,children:d})}function gc(){return F.useContext(fc)}const ww=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],Cw=pt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),yc=F.forwardRef(function(t,r){const{width:n,height:a,margin:o,title:s,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:E}=t,O=cr(t,ww);return g.jsx(JO,{pluginParams:{width:n,height:a,margin:pp(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(Ow,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:g.jsx(mc,K({title:s,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},O,{ref:r,children:g.jsx(Cw,{"aria-hidden":"true",children:E})}))})})});process.env.NODE_ENV!=="production"&&(yc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(yc.propTypes={children:x.node,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});function Pw(e){const t=Ur(),r=it(t,jb);return e||r}function Tw(e,t){const r=Ct(e.startAngle,t.startAngle),n=Ct(e.endAngle,t.endAngle),a=Ct(e.innerRadius,t.innerRadius),o=Ct(e.outerRadius,t.outerRadius),s=Ct(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:o(i),cornerRadius:s(i)})}function Rw(e){return pw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:Tw,transformProps:t=>({d:lm().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,r){t.setAttribute("d",r.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const Aw=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],_w=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function Sm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:o,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=gc();if(t===null)return null;const d=a+(t-r)/(n-r)*(o-a);return g.jsx(Om,K({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(Sm.propTypes={skipAnimation:x.bool});function Om(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=cr(e,Aw);const u=Pw(l),d=Rw({startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(_w,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(Om.propTypes={cornerRadius:x.number.isRequired,cx:x.number.isRequired,cy:x.number.isRequired,endAngle:x.number.isRequired,innerRadius:x.number.isRequired,outerRadius:x.number.isRequired,skipAnimation:x.bool,startAngle:x.number.isRequired});const Ew=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function Iw(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:o,cx:s,cy:i}=gc();return g.jsx(Ew,K({transform:`translate(${s}, ${i})`,d:lm().cornerRadius(o)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}function Vw(e){return wn("MuiGauge",e)}Il("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Mw(){return typeof window>"u"}const ro=new Map,jw=2e3,kw={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},$w=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],gd="mui_measurement_span";function wm(e,t){return $w.indexOf(e)>=0&&t===+t?`${t}px`:t}function Cm(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const Uw=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${Cm(r)}:${wm(r,e[r])};`,"");let wi;const Dw=(e,t={})=>{if(e==null||Mw())return{width:0,height:0};const r=`${e}`,n=Uw(t),a=`${r}-${n}`,o=ro.get(a);if(o)return o;try{let s=document.getElementById(gd);s===null&&(s=document.createElement("span"),s.setAttribute("id",gd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=K({},kw,t);Object.keys(i).map(u=>(s.style[Cm(u)]=wm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return ro.set(a,c),ro.size+1>jw&&ro.clear(),process.env.NODE_ENV==="test"?s.textContent="":(wi&&clearTimeout(wi),wi=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function Lw({style:e,needsComputation:t,text:r}){return r.split(`
|
|
124
|
-
`).map(n=>K({text:n},t?Dw(n,e):{width:0,height:0}))}function Bw(){const[e,t]=F.useState(typeof window<"u"||process.env.NODE_ENV==="test");return F.useEffect(()=>{t(!0)},[]),e}const Nw=["x","y","style","text","ownerState"],Fw=["angle","textAnchor","dominantBaseline"];function Pm(e){const{x:t,y:r,style:n,text:
|
|
125
|
-
`),text:a}),[u,a,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",K({},o,{transform:i?`rotate(${i}, ${t}, ${r})`:void 0,x:t,y:r,textAnchor:l,dominantBaseline:c,style:u,children:h.map((f,m)=>g.jsx("tspan",{x:t,dy:`${m===0?p:h[0].height}px`,dominantBaseline:c,children:f.text},m))}))}process.env.NODE_ENV!=="production"&&(Pm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const zw=["text","className"];function Gw({value:e}){return e===null?null:e.toLocaleString()}function Tm(e){const{text:t=Gw,className:r}=e,n=cr(e,zw),{value:a,valueMin:o,valueMax:s,cx:i,cy:l}=gc(),c=typeof t=="function"?t({value:a,valueMin:o,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(Pm,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Tm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const Hw=["text","children","classes","className","skipAnimation"],qw=e=>{const{classes:t}=e;return es({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},Vw,t)},bc=F.forwardRef(function(t,r){const{text:n,children:a,className:o,skipAnimation:s}=t,i=cr(t,Hw),l=qw(t);return g.jsxs(yc,K({},i,{className:Pt(l.root,o),ref:r,children:[g.jsx(Iw,{className:l.referenceArc}),g.jsx(Sm,{className:l.valueArc,skipAnimation:s}),g.jsx(Tm,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(bc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(bc.propTypes={children:x.node,classes:x.object,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),text:x.oneOfType([x.func,x.string]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});class xc{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const a=Math.min(t,1/15),o=this.updateCount===1?.7:1;for(let s=0;s<this.currentValues.length;s++){const i=this.currentValues[s],l=this.targetValues[s],c=this.velocities[s],u=l-i,d=u*this.options.tension*o,h=c*this.options.friction,p=d-h,f=c+p*a,m=i+f*a;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[s]!==l&&(this.currentValues[s]=l,this.velocities[s]=0,r=!0):(n=!1,this.currentValues[s]=m,this.velocities[s]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const a=this.previousTargetValues.every((o,s)=>o===this.currentValues[s]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!a){const o=Math.min(n/8,1);for(let s=0;s<this.targetValues.length;s++){const i=this.previousTargetValues[s]||0,l=t[s]||0;Math.abs(l-i)>.1&&(this.targetValues[s]=i+(l-i)*o)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function Rm(e=[],t={}){const r=J.useRef(null);return r.current||(r.current=new xc(e,t)),J.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),J.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const Am=Xe(Oe.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,variant:n="default",compact:a=!1,className:o,hasError:s=!1})=>{var Le;const i=P.useTheme(),{t:l}=_e.useTranslation(),[c,u]=J.useState(0),[d,h]=J.useState(null),[p,f]=J.useState(!1),[m,b]=J.useState(!1),[S,E]=J.useState(0),O=J.useRef(null),w=J.useRef(null),A=J.useRef(0),[C,T]=J.useState(!1),[V,j]=J.useState(!1),[y,R]=J.useState(!1),z=J.useRef(null),I=J.useRef(null),[G,ae]=J.useState(!0),re=J.useRef(void 0),[te]=Rm([0],{tension:80,friction:18,onChange:([oe])=>{E(oe)}});J.useEffect(()=>{const oe=d===null,Se=re.current===null;re.current,ae(!0),re.current=d},[d]);const ee=J.useCallback((oe,be=0)=>{if(h(oe??null),b(!1),A.current=0,oe!==void 0){const Se=Math.max(0,oe-be);u(Se);const me=be>0?be/oe*100:0;be===0?te.setTarget([0]):te.setTarget([me]),Se===0?(f(!1),w.current=null,t&&setTimeout(()=>t(),0)):r?(w.current=Date.now()-be*1e3,f(!0)):w.current=null}else{u(be);const Se=be/60%1*100;te.setTarget([Se]),r?(w.current=Date.now()-be*1e3,f(!0)):w.current=null}},[r,t,te]),se=J.useCallback(()=>{if(w.current&&p){const be=Date.now()-w.current;A.current+=be;const Se=A.current/1e3;if(d!==null){const me=Math.min(100,Se/d*100);te.setTarget([me])}else{const me=Se/60%1*100;te.setTarget([me])}}f(!1),b(!0),j(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{j(!1)},800)},[p,d,te]),H=J.useCallback(()=>{m&&c>0&&(w.current=Date.now(),f(!0),b(!1))},[m,c]),X=J.useCallback(()=>m,[m]);J.useEffect(()=>{s?(p&&!m&&(T(!0),se()),R(!0),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{R(!1)},600)):(C&&m&&(T(!1),H()),R(!1),I.current&&clearTimeout(I.current))},[s,p,m,C,se,H]),J.useEffect(()=>{let oe=!0;const be=setTimeout(()=>{oe&&e({startNewCycle:ee,pause:se,resume:H,isPaused:X})},0);return()=>{oe=!1,clearTimeout(be)}},[e,ee,se,H,X]),J.useEffect(()=>{if(p){const oe=()=>{if(w.current){const Se=(Date.now()-w.current+A.current)/1e3;if(d!==null){const me=Math.max(0,d-Se);u(Math.ceil(me));const Z=Math.min(100,Se/d*100);if(te.setTarget([Z]),me<=0){f(!1),w.current=null,u(0),te.setTarget([100]),t&&setTimeout(()=>t(),0);return}}else{u(Math.floor(Se));const me=Se/60%1*100;te.setTarget([me])}p&&(O.current=requestAnimationFrame(oe))}};O.current=requestAnimationFrame(oe)}else O.current&&(cancelAnimationFrame(O.current),O.current=null);return()=>{O.current&&cancelAnimationFrame(O.current)}},[p,t,d,te]),J.useEffect(()=>{let oe=null;const be=()=>{te.update(1/60),oe=requestAnimationFrame(be)};return oe=requestAnimationFrame(be),()=>{oe&&cancelAnimationFrame(oe)}},[te]),J.useEffect(()=>()=>{z.current&&clearTimeout(z.current),I.current&&clearTimeout(I.current)},[]),J.useEffect(()=>{if(!p&&!m){if(d!==null&&d>0){const oe=(d-c)/d*100;te.setTarget([oe])}else if(d===null){const oe=c/60%1*100;te.setTarget([oe])}}},[p,m,d,c,te]);const le=oe=>{const be=Math.floor(oe/60),Se=oe%60;return`${be}:${Se.toString().padStart(2,"0")}`},xe=S;return n==="small"?g.jsxs(P.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:V||y?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s?i.palette.error.light:i.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.5s ease-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s?i.palette.error.light:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-xe/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.5s ease-out"}})]})}),g.jsx(P.Typography,{variant:"body2",sx:{color:i.palette.text.primary,fontSize:"14px"},children:d!==null?a?`${le(c)} ${l("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${le(c)} / ${l("CycleTimer.Time.lb",{time:le(d)})}`:le(c)})]}):g.jsxs(P.Box,{className:o,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(bc,{width:264,height:264,value:xe,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",skipAnimation:!0,sx:{opacity:V||y?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:s?i.palette.error.light:i.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),g.jsxs(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(Le=i.palette.backgroundPaperElevation)==null?void 0:Le[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[g.jsx(P.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:g.jsx(P.Fade,{in:G&&d!==null,timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:i.palette.text.secondary},children:l("CycleTimer.RemainingTime.lb")})})}),g.jsx(P.Typography,{variant:"h1",sx:{fontSize:"48px",fontWeight:500,color:i.palette.text.primary,lineHeight:1,marginBottom:.5},children:le(c)}),g.jsx(P.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(P.Fade,{in:G&&d!==null,timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:i.palette.text.secondary},children:d!==null?l("CycleTimer.OfTime.lb",{time:le(d)}):""})})})]})]})})),Dr=yy;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function vc(e){return gy(e)}function Ww(e){return wn("MuiSvgIcon",e)}Il("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Jw=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${rt(t)}`,`fontSize${rt(r)}`]};return es(a,Ww,n)},Yw=pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${rt(r.color)}`],t[`fontSize${rt(r.fontSize)}`]]}})(Dr(({theme:e})=>{var t,r,n,a,o,s,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,S;return{props:{color:m},style:{color:(S=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Wo=F.forwardRef(function(t,r){const n=vc({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=F.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},b={};u||(b.viewBox=h);const S=Jw(m);return g.jsxs(Yw,{as:i,className:Pt(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...b,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Wo.propTypes={children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),x.string]),component:x.elementType,fontSize:x.oneOfType([x.oneOf(["inherit","large","medium","small"]),x.string]),htmlColor:x.string,inheritViewBox:x.bool,shapeRendering:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),titleAccess:x.string,viewBox:x.string});Wo.muiName="SvgIcon";function fr(e,t){function r(n,a){return g.jsx(Wo,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Wo.muiName,F.memo(F.forwardRef(r))}function Kw(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=F.useRef(t!==void 0),[s,i]=F.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){F.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${a} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
126
|
-
`))},[
|
|
127
|
-
`))},[JSON.stringify(r)])}const c=F.useCallback(u=>{o||i(u)},[]);return[l,c]}const Qw=fr(g.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Xw=fr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),yd=fr(g.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),_m=Xe(Oe.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:a,getItemId:o,title:s,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var V;const p=P.useTheme(),f=vt.useGridApiRef(),m=J.useRef(null),[b,S]=J.useState(null),E=J.useMemo(()=>e.map(r),[e,r]);J.useEffect(()=>{f.current&&E.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(j=>j.field)})},[E,t,f]),J.useEffect(()=>{if(!m.current||!f.current)return;const j=new ResizeObserver(()=>{setTimeout(()=>{f.current&&E.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(y=>y.field)})},100)});return j.observe(m.current),()=>{j.disconnect()}},[f,E.length,t]);const O=J.useMemo(()=>{if(a!==void 0)return a;if(b!==null)return b;if(d&&e.length>0){const j=e[0];return S(j),j}return null},[d,e,a,b]),w=j=>{const y=e.find(R=>r(R).id===j.id);y&&(a===void 0&&S(y),n&&n(y,j))},A=J.useMemo(()=>!O||!o?null:o(O),[O,o]);function C(){return g.jsx(vt.Toolbar,{children:g.jsxs(P.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[s&&g.jsxs(P.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,i&&` (${e.length})`]}),g.jsxs(P.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(vt.FilterPanelTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(Xw,{fontSize:"small"})})}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(vt.QuickFilter,{render:(j,y)=>g.jsxs(P.Box,{...j,sx:{display:"flex",overflow:"hidden"},children:[!y.expanded&&g.jsx(vt.QuickFilterTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Search",children:g.jsx(yd,{fontSize:"small"})})}),g.jsxs(P.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:y.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(P.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:y.expanded&&y.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[y.expanded&&g.jsx(yd,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(vt.QuickFilterControl,{placeholder:l})]}),y.expanded&&y.value!==""&&g.jsx(vt.QuickFilterClear,{render:g.jsx(P.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(P.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(vt.ToolbarButton,{"aria-label":"Clear",children:g.jsx(Qw,{fontSize:"small"})})})})})]})]})})]})]})})}const T=u||C;return g.jsx(P.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(vt.DataGrid,{apiRef:f,rows:E,columns:t,onRowClick:w,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:T},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((V=c==null?void 0:c.autosizeOptions)==null?void 0:V.columns)||t.map(j=>j.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...A!==null&&{[`&[data-id="${A}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));_m.displayName="WandelbotsDataGrid";const dn=_y({createStyledComponent:pt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>vc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(dn.propTypes={children:x.node,component:x.elementType,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),useFlexGap:x.bool});const Zw=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogMinus"},F.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),eC=J.forwardRef(Zw),tC=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogPlus"},F.createElement("g",{id:"Plus"},F.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),F.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),F.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),rC=J.forwardRef(tC);function Is(e){J.useEffect(e,[])}function Sc(e){Is(()=>$e.autorun(e))}function Em(e,t,r){Is(()=>$e.reaction(e,t,r))}function Rn(e){return Is(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const al=Xe(Oe.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,activeJoggingDirection:s,...i})=>{var O,w,A,C,T,V,j;Rn(()=>{const y=r(),R=h.current;R&&(R.textContent=y)});const l=P.useTheme(),[c,u]=J.useState(null);J.useEffect(()=>{o&&E()},[o]);const d=s||c,h=J.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(O=e.buttonBackgroundColor)==null?void 0:O.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.default,":hover":{backgroundColor:(A=e.buttonBackgroundColor)==null?void 0:A.hovered},":active":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.disabled,"svg path":{fill:l.palette.action.disabled}}},b={...f,backgroundColor:(V=e.buttonBackgroundColor)==null?void 0:V.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(j=e.buttonBackgroundColor)==null?void 0:j.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(y,R){o||y.button===0&&(u(R),n(R))}function E(){u(null),a()}return g.jsxs(dn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(P.IconButton,{disabled:o,disableRipple:!0,onPointerDown:y=>S(y,"-"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="-"?b:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(eC,{})}),g.jsxs(dn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:[g.jsx(dn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...o?{color:l.palette.action.disabled}:{}},...o?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(P.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(P.IconButton,{disableRipple:!0,disabled:o,onPointerDown:y=>S(y,"+"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="+"?b:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(rC,{})})]})})),nC=fr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),aC=fr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function _r(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Im=typeof global=="object"&&global&&global.Object===Object&&global,oC=typeof self=="object"&&self&&self.Object===Object&&self,Dt=Im||oC||Function("return this")(),Ci=function(){return Dt.Date.now()},sC=/\s/;function iC(e){for(var t=e.length;t--&&sC.test(e.charAt(t)););return t}var lC=/^\s+/;function cC(e){return e&&e.slice(0,iC(e)+1).replace(lC,"")}var hr=Dt.Symbol,Vm=Object.prototype,uC=Vm.hasOwnProperty,dC=Vm.toString,Hn=hr?hr.toStringTag:void 0;function hC(e){var t=uC.call(e,Hn),r=e[Hn];try{e[Hn]=void 0;var n=!0}catch{}var a=dC.call(e);return n&&(t?e[Hn]=r:delete e[Hn]),a}var pC=Object.prototype,mC=pC.toString;function fC(e){return mC.call(e)}var gC="[object Null]",yC="[object Undefined]",bd=hr?hr.toStringTag:void 0;function Lr(e){return e==null?e===void 0?yC:gC:bd&&bd in Object(e)?hC(e):fC(e)}function Er(e){return e!=null&&typeof e=="object"}var bC="[object Symbol]";function Vs(e){return typeof e=="symbol"||Er(e)&&Lr(e)==bC}var xd=NaN,xC=/^[-+]0x[0-9a-f]+$/i,vC=/^0b[01]+$/i,SC=/^0o[0-7]+$/i,OC=parseInt;function vd(e){if(typeof e=="number")return e;if(Vs(e))return xd;if(_r(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_r(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cC(e);var r=vC.test(e);return r||SC.test(e)?OC(e.slice(2),r?2:8):xC.test(e)?xd:+e}var wC="Expected a function",CC=Math.max,PC=Math.min;function TC(e,t,r){var n,a,o,s,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(wC);t=vd(t)||0,_r(r)&&(u=!!r.leading,d="maxWait"in r,o=d?CC(vd(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(C){var T=n,V=a;return n=a=void 0,c=C,s=e.apply(V,T),s}function f(C){return c=C,i=setTimeout(S,t),u?p(C):s}function m(C){var T=C-l,V=C-c,j=t-T;return d?PC(j,o-V):j}function b(C){var T=C-l,V=C-c;return l===void 0||T>=t||T<0||d&&V>=o}function S(){var C=Ci();if(b(C))return E(C);i=setTimeout(S,m(C))}function E(C){return i=void 0,h&&n?p(C):(n=a=void 0,s)}function O(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function w(){return i===void 0?s:E(Ci())}function A(){var C=Ci(),T=b(C);if(n=arguments,a=this,l=C,T){if(i===void 0)return f(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),s}return A.cancel=O,A.flush=w,A}var RC="Expected a function";function AC(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(RC);return _r(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),TC(e,t,{leading:n,maxWait:t,trailing:a})}const Mm=Xe(Oe.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...s})=>{var O,w,A,C,T,V,j,y,R,z,I,G,ae,re,te;const{t:i}=_e.useTranslation(),[l,c]=J.useState(),u=P.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(w=u.palette.backgroundPaperElevation)==null?void 0:w[11]},h=Oe.useLocalObservable(()=>({activeJoggingDir:null,startJogging(ee){this.activeJoggingDir=ee,e(ee)},stopJogging(){this.activeJoggingDir=null,t()}})),p=AC(()=>{c(a())},50);Rn(p);function f(ee){ee.button===0&&h.startJogging("-")}function m(ee){ee.button===0&&h.startJogging("+")}function b(ee){h.stopJogging()}function S(ee){h.stopJogging()}function E(ee,se=1){if(ee===void 0||isNaN(ee))return"";const H=i("General.degree.variable",{amount:ee.toFixed(se)});return ee>0&&se===0?`+${H}`:H}return g.jsxs(dn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(A=u.palette.backgroundPaperElevation)==null?void 0:A[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[9]},"&:active":{...d}}},children:[g.jsx(P.IconButton,{onPointerDown:f,onPointerUp:b,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(nC,{sx:{pointerEvents:"none",color:(R=(y=(j=(V=u.componentsExt)==null?void 0:V.JoggingPanel)==null?void 0:j.JoggingJoint)==null?void 0:y.Joint)==null?void 0:R.arrowColor}})}),g.jsxs(dn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(z=u.palette.backgroundPaperElevation)==null?void 0:z[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(P.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:E(l)}),g.jsx(P.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:o?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:o?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:E(r,0)},{value:n,label:E(n,0)}]})]}),g.jsx(P.IconButton,{onPointerDown:m,onPointerUp:b,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(aC,{sx:{pointerEvents:"none",color:(te=(re=(ae=(G=u.componentsExt)==null?void 0:G.JoggingPanel)==null?void 0:ae.JoggingJoint)==null?void 0:re.Joint)==null?void 0:te.arrowColor}})})]})})),_C=fr(g.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),EC=fr(g.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function IC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var jm=IC;function VC(){this.__data__=[],this.size=0}var MC=VC;function jC(e,t){return e===t||e!==e&&t!==t}var km=jC;function kC(e,t){for(var r=e.length;r--;)if(km(e[r][0],t))return r;return-1}var Ms=kC,$C=Array.prototype,UC=$C.splice;function DC(e){var t=this.__data__,r=Ms(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():UC.call(t,r,1),--this.size,!0}var LC=DC;function BC(e){var t=this.__data__,r=Ms(t,e);return r<0?void 0:t[r][1]}var NC=BC;function FC(e){return Ms(this.__data__,e)>-1}var zC=FC;function GC(e,t){var r=this.__data__,n=Ms(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var HC=GC;function An(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])}}An.prototype.clear=MC;An.prototype.delete=LC;An.prototype.get=NC;An.prototype.has=zC;An.prototype.set=HC;var js=An;function qC(){this.__data__=new js,this.size=0}var WC=qC;function JC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var YC=JC;function KC(e){return this.__data__.get(e)}var QC=KC;function XC(e){return this.__data__.has(e)}var ZC=XC,eP=typeof global=="object"&&global&&global.Object===Object&&global,$m=eP,tP=typeof self=="object"&&self&&self.Object===Object&&self,rP=$m||tP||Function("return this")(),Xt=rP,nP=Xt.Symbol,On=nP,Um=Object.prototype,aP=Um.hasOwnProperty,oP=Um.toString,qn=On?On.toStringTag:void 0;function sP(e){var t=aP.call(e,qn),r=e[qn];try{e[qn]=void 0;var n=!0}catch{}var a=oP.call(e);return n&&(t?e[qn]=r:delete e[qn]),a}var iP=sP,lP=Object.prototype,cP=lP.toString;function uP(e){return cP.call(e)}var dP=uP,hP="[object Null]",pP="[object Undefined]",Sd=On?On.toStringTag:void 0;function mP(e){return e==null?e===void 0?pP:hP:Sd&&Sd in Object(e)?iP(e):dP(e)}var Ma=mP,fP="[object AsyncFunction]",gP="[object Function]",yP="[object GeneratorFunction]",bP="[object Proxy]";function xP(e){if(!jm(e))return!1;var t=Ma(e);return t==gP||t==yP||t==fP||t==bP}var Dm=xP,vP=Xt["__core-js_shared__"],Pi=vP,Od=function(){var e=/[^.]+$/.exec(Pi&&Pi.keys&&Pi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function SP(e){return!!Od&&Od in e}var OP=SP,wP=Function.prototype,CP=wP.toString;function PP(e){if(e!=null){try{return CP.call(e)}catch{}try{return e+""}catch{}}return""}var Br=PP,TP=/[\\^$.*+?()[\]{}|]/g,RP=/^\[object .+?Constructor\]$/,AP=Function.prototype,_P=Object.prototype,EP=AP.toString,IP=_P.hasOwnProperty,VP=RegExp("^"+EP.call(IP).replace(TP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MP(e){if(!jm(e)||OP(e))return!1;var t=Dm(e)?VP:RP;return t.test(Br(e))}var jP=MP;function kP(e,t){return e==null?void 0:e[t]}var $P=kP;function UP(e,t){var r=$P(e,t);return jP(r)?r:void 0}var _n=UP,DP=_n(Xt,"Map"),xa=DP,LP=_n(Object,"create"),va=LP;function BP(){this.__data__=va?va(null):{},this.size=0}var NP=BP;function FP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zP=FP,GP="__lodash_hash_undefined__",HP=Object.prototype,qP=HP.hasOwnProperty;function WP(e){var t=this.__data__;if(va){var r=t[e];return r===GP?void 0:r}return qP.call(t,e)?t[e]:void 0}var JP=WP,YP=Object.prototype,KP=YP.hasOwnProperty;function QP(e){var t=this.__data__;return va?t[e]!==void 0:KP.call(t,e)}var XP=QP,ZP="__lodash_hash_undefined__";function eT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=va&&t===void 0?ZP:t,this}var tT=eT;function En(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])}}En.prototype.clear=NP;En.prototype.delete=zP;En.prototype.get=JP;En.prototype.has=XP;En.prototype.set=tT;var wd=En;function rT(){this.size=0,this.__data__={hash:new wd,map:new(xa||js),string:new wd}}var nT=rT;function aT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var oT=aT;function sT(e,t){var r=e.__data__;return oT(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ks=sT;function iT(e){var t=ks(this,e).delete(e);return this.size-=t?1:0,t}var lT=iT;function cT(e){return ks(this,e).get(e)}var uT=cT;function dT(e){return ks(this,e).has(e)}var hT=dT;function pT(e,t){var r=ks(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var mT=pT;function In(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])}}In.prototype.clear=nT;In.prototype.delete=lT;In.prototype.get=uT;In.prototype.has=hT;In.prototype.set=mT;var Lm=In,fT=200;function gT(e,t){var r=this.__data__;if(r instanceof js){var n=r.__data__;if(!xa||n.length<fT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Lm(n)}return r.set(e,t),this.size=r.size,this}var yT=gT;function Vn(e){var t=this.__data__=new js(e);this.size=t.size}Vn.prototype.clear=WC;Vn.prototype.delete=YC;Vn.prototype.get=QC;Vn.prototype.has=ZC;Vn.prototype.set=yT;var Ti=Vn,bT="__lodash_hash_undefined__";function xT(e){return this.__data__.set(e,bT),this}var vT=xT;function ST(e){return this.__data__.has(e)}var OT=ST;function Jo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Lm;++t<r;)this.add(e[t])}Jo.prototype.add=Jo.prototype.push=vT;Jo.prototype.has=OT;var wT=Jo;function CT(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var PT=CT;function TT(e,t){return e.has(t)}var RT=TT,AT=1,_T=2;function ET(e,t,r,n,a,o){var s=r&AT,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&_T?new wT:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!PT(t,function(S,E){if(!RT(p,E)&&(f===S||a(f,S,r,n,o)))return p.push(E)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var Bm=ET,IT=Xt.Uint8Array,Cd=IT;function VT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var MT=VT;function jT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var kT=jT,$T=1,UT=2,DT="[object Boolean]",LT="[object Date]",BT="[object Error]",NT="[object Map]",FT="[object Number]",zT="[object RegExp]",GT="[object Set]",HT="[object String]",qT="[object Symbol]",WT="[object ArrayBuffer]",JT="[object DataView]",Pd=On?On.prototype:void 0,Ri=Pd?Pd.valueOf:void 0;function YT(e,t,r,n,a,o,s){switch(r){case JT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case WT:return!(e.byteLength!=t.byteLength||!o(new Cd(e),new Cd(t)));case DT:case LT:case FT:return km(+e,+t);case BT:return e.name==t.name&&e.message==t.message;case zT:case HT:return e==t+"";case NT:var i=MT;case GT:var l=n&$T;if(i||(i=kT),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=UT,s.set(e,t);var u=Bm(i(e),i(t),n,a,o,s);return s.delete(e),u;case qT:if(Ri)return Ri.call(e)==Ri.call(t)}return!1}var KT=YT;function QT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var XT=QT,ZT=Array.isArray,Yo=ZT;function eR(e,t,r){var n=t(e);return Yo(e)?n:XT(n,r(e))}var tR=eR;function rR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}var nR=rR;function aR(){return[]}var oR=aR,sR=Object.prototype,iR=sR.propertyIsEnumerable,Td=Object.getOwnPropertySymbols,lR=Td?function(e){return e==null?[]:(e=Object(e),nR(Td(e),function(t){return iR.call(e,t)}))}:oR,cR=lR;function uR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var dR=uR;function hR(e){return e!=null&&typeof e=="object"}var Sa=hR,pR="[object Arguments]";function mR(e){return Sa(e)&&Ma(e)==pR}var Rd=mR,Nm=Object.prototype,fR=Nm.hasOwnProperty,gR=Nm.propertyIsEnumerable,yR=Rd(function(){return arguments}())?Rd:function(e){return Sa(e)&&fR.call(e,"callee")&&!gR.call(e,"callee")},bR=yR;function xR(){return!1}var vR=xR,Fm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ad=Fm&&typeof module=="object"&&module&&!module.nodeType&&module,SR=Ad&&Ad.exports===Fm,_d=SR?Xt.Buffer:void 0,OR=_d?_d.isBuffer:void 0,wR=OR||vR,ol=wR,CR=9007199254740991,PR=/^(?:0|[1-9]\d*)$/;function TR(e,t){var r=typeof e;return t=t??CR,!!t&&(r=="number"||r!="symbol"&&PR.test(e))&&e>-1&&e%1==0&&e<t}var RR=TR,AR=9007199254740991;function _R(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=AR}var zm=_R,ER="[object Arguments]",IR="[object Array]",VR="[object Boolean]",MR="[object Date]",jR="[object Error]",kR="[object Function]",$R="[object Map]",UR="[object Number]",DR="[object Object]",LR="[object RegExp]",BR="[object Set]",NR="[object String]",FR="[object WeakMap]",zR="[object ArrayBuffer]",GR="[object DataView]",HR="[object Float32Array]",qR="[object Float64Array]",WR="[object Int8Array]",JR="[object Int16Array]",YR="[object Int32Array]",KR="[object Uint8Array]",QR="[object Uint8ClampedArray]",XR="[object Uint16Array]",ZR="[object Uint32Array]",Ee={};Ee[HR]=Ee[qR]=Ee[WR]=Ee[JR]=Ee[YR]=Ee[KR]=Ee[QR]=Ee[XR]=Ee[ZR]=!0;Ee[ER]=Ee[IR]=Ee[zR]=Ee[VR]=Ee[GR]=Ee[MR]=Ee[jR]=Ee[kR]=Ee[$R]=Ee[UR]=Ee[DR]=Ee[LR]=Ee[BR]=Ee[NR]=Ee[FR]=!1;function eA(e){return Sa(e)&&zm(e.length)&&!!Ee[Ma(e)]}var tA=eA;function rA(e){return function(t){return e(t)}}var nA=rA,Gm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ia=Gm&&typeof module=="object"&&module&&!module.nodeType&&module,aA=ia&&ia.exports===Gm,Ai=aA&&$m.process,oA=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Ai&&Ai.binding&&Ai.binding("util")}catch{}}(),Ed=oA,Id=Ed&&Ed.isTypedArray,sA=Id?nA(Id):tA,Hm=sA,iA=Object.prototype,lA=iA.hasOwnProperty;function cA(e,t){var r=Yo(e),n=!r&&bR(e),a=!r&&!n&&ol(e),o=!r&&!n&&!a&&Hm(e),s=r||n||a||o,i=s?dR(e.length,String):[],l=i.length;for(var c in e)(t||lA.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||RR(c,l)))&&i.push(c);return i}var uA=cA,dA=Object.prototype;function hA(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||dA;return e===r}var pA=hA;function mA(e,t){return function(r){return e(t(r))}}var fA=mA,gA=fA(Object.keys,Object),yA=gA,bA=Object.prototype,xA=bA.hasOwnProperty;function vA(e){if(!pA(e))return yA(e);var t=[];for(var r in Object(e))xA.call(e,r)&&r!="constructor"&&t.push(r);return t}var SA=vA;function OA(e){return e!=null&&zm(e.length)&&!Dm(e)}var wA=OA;function CA(e){return wA(e)?uA(e):SA(e)}var PA=CA;function TA(e){return tR(e,PA,cR)}var Vd=TA,RA=1,AA=Object.prototype,_A=AA.hasOwnProperty;function EA(e,t,r,n,a,o){var s=r&RA,i=Vd(e),l=i.length,c=Vd(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:_A.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,o):n(S,E,h,e,t,o);if(!(O===void 0?S===E||a(S,E,r,n,o):O)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var w=e.constructor,A=t.constructor;w!=A&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof A=="function"&&A instanceof A)&&(m=!1)}return o.delete(e),o.delete(t),m}var IA=EA,VA=_n(Xt,"DataView"),sl=VA,MA=_n(Xt,"Promise"),il=MA,jA=_n(Xt,"Set"),ll=jA,kA=_n(Xt,"WeakMap"),cl=kA,Md="[object Map]",$A="[object Object]",jd="[object Promise]",kd="[object Set]",$d="[object WeakMap]",Ud="[object DataView]",UA=Br(sl),DA=Br(xa),LA=Br(il),BA=Br(ll),NA=Br(cl),xr=Ma;(sl&&xr(new sl(new ArrayBuffer(1)))!=Ud||xa&&xr(new xa)!=Md||il&&xr(il.resolve())!=jd||ll&&xr(new ll)!=kd||cl&&xr(new cl)!=$d)&&(xr=function(e){var t=Ma(e),r=t==$A?e.constructor:void 0,n=r?Br(r):"";if(n)switch(n){case UA:return Ud;case DA:return Md;case LA:return jd;case BA:return kd;case NA:return $d}return t});var Dd=xr,FA=1,Ld="[object Arguments]",Bd="[object Array]",no="[object Object]",zA=Object.prototype,Nd=zA.hasOwnProperty;function GA(e,t,r,n,a,o){var s=Yo(e),i=Yo(t),l=s?Bd:Dd(e),c=i?Bd:Dd(t);l=l==Ld?no:l,c=c==Ld?no:c;var u=l==no,d=c==no,h=l==c;if(h&&ol(e)){if(!ol(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ti),s||Hm(e)?Bm(e,t,r,n,a,o):KT(e,t,l,r,n,a,o);if(!(r&FA)){var p=u&&Nd.call(e,"__wrapped__"),f=d&&Nd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return o||(o=new Ti),a(m,b,r,n,o)}}return h?(o||(o=new Ti),IA(e,t,r,n,a,o)):!1}var HA=GA;function qm(e,t,r,n,a){return e===t?!0:e==null||t==null||!Sa(e)&&!Sa(t)?e!==e&&t!==t:HA(e,t,r,n,qm,a)}var qA=qm;function WA(e,t){return qA(e,t)}var JA=WA;/*! *****************************************************************************
|
|
122
|
+
`));return e.store}function gm(){const e=Ur();return it(e,Ao)}function ym(){const e=Ur();return it(e,cx)}const tl=(e,t)=>e===void 0?t:Math.PI*e/180;function YO(){const e=Ur(),{axis:t,axisIds:r}=it(e,kr);return{xAxis:t,xAxisIds:r}}function KO(){const e=Ur(),{axis:t,axisIds:r}=it(e,$r);return{yAxis:t,yAxisIds:r}}function QO(){const e=Ur(),{axis:t,axisIds:r}=it(e,DS)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function XO(){const e=fm();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
123
|
+
`));return e.svgRef}function ZO(){const e=ym();return F.useCallback(t=>`${e}-gradient-${t}`,[e])}function ew(){const e=ym();return F.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var vi,hd;function tw(){if(hd)return vi;hd=1;var e=4,t=.001,r=1e-7,n=10,o=11,a=1/(o-1),s=typeof Float32Array=="function";function i(m,b){return 1-3*b+3*m}function l(m,b){return 3*b-6*m}function c(m){return 3*m}function u(m,b,S){return((i(b,S)*m+l(b,S))*m+c(b))*m}function d(m,b,S){return 3*i(b,S)*m*m+2*l(b,S)*m+c(b)}function h(m,b,S,E,O){var w,A,C=0;do A=b+(S-b)/2,w=u(A,E,O)-m,w>0?S=A:b=A;while(Math.abs(w)>r&&++C<n);return A}function p(m,b,S,E){for(var O=0;O<e;++O){var w=d(b,S,E);if(w===0)return b;var A=u(b,S,E)-m;b-=A/w}return b}function f(m){return m}return vi=function(b,S,E,O){if(!(0<=b&&b<=1&&0<=E&&E<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===S&&E===O)return f;for(var w=s?new Float32Array(o):new Array(o),A=0;A<o;++A)w[A]=u(A*a,b,E);function C(T){for(var V=0,j=1,y=o-1;j!==y&&w[j]<=T;++j)V+=a;--j;var R=(T-w[j])/(w[j+1]-w[j]),z=V+R*a,I=d(z,b,E);return I>=t?p(T,z,b,E):I===0?z:h(T,V,V+a,b,E)}return function(V){return V===0?0:V===1?1:u(C(V),S,O)}},vi}var rw=tw();const nw=Og(rw),ow=300,aw=nw(.66,0,.34,1);var Sn=0,ro=0,zn=0,bm=1e3,Ga,no,Ha=0,Ar=0,Es=0,xo=typeof performance=="object"&&performance.now?performance:Date,xm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function pc(){return Ar||(xm(sw),Ar=xo.now()+Es)}function sw(){Ar=0}function qa(){this._call=this._time=this._next=null}qa.prototype=vm.prototype={constructor:qa,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?pc():+r)+(t==null?0:+t),!this._next&&no!==this&&(no?no._next=this:Ga=this,no=this),this._call=e,this._time=r,nl()},stop:function(){this._call&&(this._call=null,this._time=1/0,nl())}};function vm(e,t,r){var n=new qa;return n.restart(e,t,r),n}function rl(){pc(),++Sn;for(var e=Ga,t;e;)(t=Ar-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Sn}function pd(){Ar=(Ha=xo.now())+Es,Sn=ro=0;try{rl()}finally{Sn=0,lw(),Ar=0}}function iw(){var e=xo.now(),t=e-Ha;t>bm&&(Es-=t,Ha=e)}function lw(){for(var e,t=Ga,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ga=r);no=e,nl(n)}function nl(e){if(!Sn){ro&&(ro=clearTimeout(ro));var t=e-Ar;t>24?(e<1/0&&(ro=setTimeout(pd,e-xo.now()-Es)),zn&&(zn=clearInterval(zn))):(zn||(Ha=xo.now(),zn=setInterval(iw,bm)),Sn=1,xm(pd))}}function cw(e,t,r){var n=new qa;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}class uw{constructor(t,r,n){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=r,this.onTickCallback=n,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const r=this.duration===0?1:this.elapsed/this.duration,n=this.easingFn(r);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=pc()-this.elapsed;return this.timer=vm(r=>this.timerCallback(r),0,t),rl(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),cw(()=>this.timerCallback(this.duration)),rl(),this}}function dw(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o+=1){const a=r[o];if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1}return!0}function hw(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:o=e}){const a=F.useRef(o),s=F.useRef(null),i=F.useRef(null),l=F.useRef(e);$t(()=>{l.current=e},[e]),$t(()=>{var d;n&&((d=s.current)==null||d.finish(),s.current=null,i.current=null,a.current=e)},[e,n]);const c=F.useCallback(d=>{const h=a.current,p=t(h,e);s.current=new uw(ow,aw,f=>{const m=p(f);a.current=m,r(d,m)})},[r,t,e]);return F.useCallback(d=>{var p,f,m,b;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(dw(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((b=s.current)==null||b.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function pw(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:o,initialProps:a=e,ref:s}){const i=r??(u=>u),l=hw(e,{initialProps:a,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:o});return K({},r(o?e:a),{ref:ps(l,s)})}function md(e){const{isReversed:t,gradientId:r,size:n,direction:o,scale:a,colorMap:s}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((i,l)=>{const c=a(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(F.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:s.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:s.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const mw=10;function fd(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:o,direction:a,scale:s,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(s).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Ct(c[0],c[1]):Kl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/mw),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${r?1:2}`]:t==="objectBoundingBox"?1:`${o}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const b=d(m/h);if(b===void 0)return null;const S=s(b);if(S===void 0)return null;const E=r?1-S/o:S/o,O=i(b);return O===null?null:g.jsx("stop",{offset:E,stopColor:O,stopOpacity:1},p+m)})})}const fw=10,gw=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Si(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:o}=e,a=[o.min??0,o.max??100],s=typeof a[0]=="number"?Ct(a[0],a[1]):Kl(a[0],a[1]),i=fw,l=`${a[0]}-${a[1]}-`;return g.jsx("linearGradient",K({id:r},gw(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=s(d);if(h===void 0)return null;const p=n(h);return p===null?null:g.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function yw(){const{top:e,height:t,bottom:r,left:n,width:o,right:a}=gm(),s=e+t+r,i=n+o+a,l=ZO(),c=ew(),{xAxis:u,xAxisIds:d}=YO(),{yAxis:h,yAxisIds:p}=KO(),{zAxis:f,zAxisIds:m}=QO(),b=p.filter(O=>h[O].colorMap!==void 0),S=d.filter(O=>u[O].colorMap!==void 0),E=m.filter(O=>f[O].colorMap!==void 0);return b.length===0&&S.length===0&&E.length===0?null:g.jsxs("defs",{children:[b.map(O=>{const w=l(O),A=c(O),{colorMap:C,scale:T,colorScale:V,reverse:j}=h[O];return(C==null?void 0:C.type)==="piecewise"?g.jsx(md,{isReversed:!j,scale:T,colorMap:C,size:s,gradientId:w,direction:"y"},w):(C==null?void 0:C.type)==="continuous"?g.jsxs(F.Fragment,{children:[g.jsx(fd,{isReversed:!j,scale:T,colorScale:V,colorMap:C,size:s,gradientId:w,direction:"y"}),g.jsx(Si,{isReversed:j,colorScale:V,colorMap:C,gradientId:A})]},w):null}),S.map(O=>{const w=l(O),A=c(O),{colorMap:C,scale:T,reverse:V,colorScale:j}=u[O];return(C==null?void 0:C.type)==="piecewise"?g.jsx(md,{isReversed:V,scale:T,colorMap:C,size:i,gradientId:w,direction:"x"},w):(C==null?void 0:C.type)==="continuous"?g.jsxs(F.Fragment,{children:[g.jsx(fd,{isReversed:V,scale:T,colorScale:j,colorMap:C,size:i,gradientId:w,direction:"x"}),g.jsx(Si,{isReversed:V,colorScale:j,colorMap:C,gradientId:A})]},w):null}),E.map(O=>{const w=c(O),{colorMap:A,colorScale:C}=f[O];return(A==null?void 0:A.type)==="continuous"?g.jsx(Si,{colorScale:C,colorMap:A,gradientId:w},w):null})]})}const bw=["children","className","title","desc"],xw=pt("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none"})),mc=F.forwardRef(function(t,r){const n=Ur(),{width:o,height:a}=it(n,ox),{width:s,height:i}=it(n,nx),l=XO(),c=ps(l,r),u=lb({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=cr(u,bw),b=a>0&&o>0;return g.jsxs(xw,K({ownerState:{width:s,height:i},viewBox:`0 0 ${o} ${a}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(yw,{}),b&&d]}))});process.env.NODE_ENV!=="production"&&(mc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(mc.propTypes={children:x.node,className:x.string,desc:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string});function Gn(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(r))return r*t/100}if(e.endsWith("px")){const r=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(r))return r}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function Oi(e){const t=tl(e);return[Math.sin(t),-Math.cos(t)]}function vw(e,t){const r=[[0,0],Oi(e),Oi(t)],n=Math.min(e,t),o=Math.max(e,t),a=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=a+u*90;d<o&&r.push(Oi(d))}const s=Math.min(...r.map(([u])=>u)),i=Math.max(...r.map(([u])=>u)),l=Math.min(...r.map(([,u])=>u)),c=Math.max(...r.map(([,u])=>u));return{cx:-s/(i-s),cy:-l/(c-l),minX:s,maxX:i,minY:l,maxY:c}}function Sw(e,t,r,n,{minX:o,maxX:a,minY:s,maxY:i}){return Math.min(...[{ratio:Math.abs(o),space:e},{ratio:Math.abs(a),space:r-e},{ratio:Math.abs(s),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const fc=F.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(fc.displayName="GaugeContext");function Ow(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:o=0,endAngle:a=360,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=gm(),b=vw(o,a),S=c?Gn(c,f):b.cx*f,E=u?Gn(u,m):b.cy*m;let O=h+S,w=p+E;const A=Sw(S,E,f,m,b);if(c===void 0){const y=A*(b.maxX-b.minX);O=h+(f-y)/2+b.cx*y}if(u===void 0){const y=A*(b.maxY-b.minY);w=p+(m-y)/2+b.cy*y}const C=Gn(s??A,A),T=Gn(i??"80%",A),V=Gn(l??0,C-T),j=F.useMemo(()=>{const y=tl(o),R=tl(a);return{value:t,valueMin:r,valueMax:n,startAngle:y,endAngle:R,outerRadius:C,innerRadius:T,cornerRadius:V,cx:O,cy:w,maxRadius:A,valueAngle:t===null?null:y+(R-y)*(t-r)/(n-r)}},[t,r,n,o,a,C,T,V,O,w,A]);return g.jsx(fc.Provider,{value:j,children:d})}function gc(){return F.useContext(fc)}const ww=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],Cw=pt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),yc=F.forwardRef(function(t,r){const{width:n,height:o,margin:a,title:s,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:E}=t,O=cr(t,ww);return g.jsx(JO,{pluginParams:{width:n,height:o,margin:pp(a,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(Ow,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:g.jsx(mc,K({title:s,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},O,{ref:r,children:g.jsx(Cw,{"aria-hidden":"true",children:E})}))})})});process.env.NODE_ENV!=="production"&&(yc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(yc.propTypes={children:x.node,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});function Pw(e){const t=Ur(),r=it(t,jb);return e||r}function Tw(e,t){const r=Ct(e.startAngle,t.startAngle),n=Ct(e.endAngle,t.endAngle),o=Ct(e.innerRadius,t.innerRadius),a=Ct(e.outerRadius,t.outerRadius),s=Ct(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:o(i),outerRadius:a(i),cornerRadius:s(i)})}function Rw(e){return pw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:Tw,transformProps:t=>({d:lm().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,r){t.setAttribute("d",r.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const Aw=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],_w=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function Sm(e){const{value:t,valueMin:r,valueMax:n,startAngle:o,endAngle:a,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=gc();if(t===null)return null;const d=o+(t-r)/(n-r)*(a-o);return g.jsx(Om,K({},e,{cx:c,cy:u,startAngle:o,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(Sm.propTypes={skipAnimation:x.bool});function Om(e){let{cx:t,cy:r,startAngle:n,endAngle:o,cornerRadius:a,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=cr(e,Aw);const u=Pw(l),d=Rw({startAngle:n,endAngle:o,cornerRadius:a,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(_w,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(Om.propTypes={cornerRadius:x.number.isRequired,cx:x.number.isRequired,cy:x.number.isRequired,endAngle:x.number.isRequired,innerRadius:x.number.isRequired,outerRadius:x.number.isRequired,skipAnimation:x.bool,startAngle:x.number.isRequired});const Ew=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function Iw(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:o,cornerRadius:a,cx:s,cy:i}=gc();return g.jsx(Ew,K({transform:`translate(${s}, ${i})`,d:lm().cornerRadius(a)({startAngle:t,endAngle:r,innerRadius:o,outerRadius:n})},e))}function Vw(e){return wn("MuiGauge",e)}Il("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Mw(){return typeof window>"u"}const na=new Map,jw=2e3,kw={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},$w=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],gd="mui_measurement_span";function wm(e,t){return $w.indexOf(e)>=0&&t===+t?`${t}px`:t}function Cm(e){return e.split("").reduce((n,o)=>o===o.toUpperCase()?[...n,"-",o.toLowerCase()]:[...n,o],[]).join("")}const Uw=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${Cm(r)}:${wm(r,e[r])};`,"");let wi;const Dw=(e,t={})=>{if(e==null||Mw())return{width:0,height:0};const r=`${e}`,n=Uw(t),o=`${r}-${n}`,a=na.get(o);if(a)return a;try{let s=document.getElementById(gd);s===null&&(s=document.createElement("span"),s.setAttribute("id",gd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=K({},kw,t);Object.keys(i).map(u=>(s.style[Cm(u)]=wm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return na.set(o,c),na.size+1>jw&&na.clear(),process.env.NODE_ENV==="test"?s.textContent="":(wi&&clearTimeout(wi),wi=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function Lw({style:e,needsComputation:t,text:r}){return r.split(`
|
|
124
|
+
`).map(n=>K({text:n},t?Dw(n,e):{width:0,height:0}))}function Bw(){const[e,t]=F.useState(typeof window<"u"||process.env.NODE_ENV==="test");return F.useEffect(()=>{t(!0)},[]),e}const Nw=["x","y","style","text","ownerState"],Fw=["angle","textAnchor","dominantBaseline"];function Pm(e){const{x:t,y:r,style:n,text:o}=e,a=cr(e,Nw),s=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=s,u=cr(s,Fw),d=Bw(),h=F.useMemo(()=>Lw({style:u,needsComputation:d&&o.includes(`
|
|
125
|
+
`),text:o}),[u,o,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",K({},a,{transform:i?`rotate(${i}, ${t}, ${r})`:void 0,x:t,y:r,textAnchor:l,dominantBaseline:c,style:u,children:h.map((f,m)=>g.jsx("tspan",{x:t,dy:`${m===0?p:h[0].height}px`,dominantBaseline:c,children:f.text},m))}))}process.env.NODE_ENV!=="production"&&(Pm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const zw=["text","className"];function Gw({value:e}){return e===null?null:e.toLocaleString()}function Tm(e){const{text:t=Gw,className:r}=e,n=cr(e,zw),{value:o,valueMin:a,valueMax:s,cx:i,cy:l}=gc(),c=typeof t=="function"?t({value:o,valueMin:a,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(Pm,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Tm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const Hw=["text","children","classes","className","skipAnimation"],qw=e=>{const{classes:t}=e;return es({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},Vw,t)},bc=F.forwardRef(function(t,r){const{text:n,children:o,className:a,skipAnimation:s}=t,i=cr(t,Hw),l=qw(t);return g.jsxs(yc,K({},i,{className:Pt(l.root,a),ref:r,children:[g.jsx(Iw,{className:l.referenceArc}),g.jsx(Sm,{className:l.valueArc,skipAnimation:s}),g.jsx(Tm,{className:l.valueText,text:n}),o]}))});process.env.NODE_ENV!=="production"&&(bc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(bc.propTypes={children:x.node,classes:x.object,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),text:x.oneOfType([x.func,x.string]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});class xc{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const o=Math.min(t,1/15),a=this.updateCount===1?.7:1;for(let s=0;s<this.currentValues.length;s++){const i=this.currentValues[s],l=this.targetValues[s],c=this.velocities[s],u=l-i,d=u*this.options.tension*a,h=c*this.options.friction,p=d-h,f=c+p*o,m=i+f*o;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[s]!==l&&(this.currentValues[s]=l,this.velocities[s]=0,r=!0):(n=!1,this.currentValues[s]=m,this.velocities[s]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const o=this.previousTargetValues.every((a,s)=>a===this.currentValues[s]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!o){const a=Math.min(n/8,1);for(let s=0;s<this.targetValues.length;s++){const i=this.previousTargetValues[s]||0,l=t[s]||0;Math.abs(l-i)>.1&&(this.targetValues[s]=i+(l-i)*a)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function Rm(e=[],t={}){const r=J.useRef(null);return r.current||(r.current=new xc(e,t)),J.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),J.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const Am=Xe(Oe.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,variant:n="default",compact:o=!1,className:a,hasError:s=!1})=>{var Le;const i=P.useTheme(),{t:l}=_e.useTranslation(),[c,u]=J.useState(0),[d,h]=J.useState(null),[p,f]=J.useState(!1),[m,b]=J.useState(!1),[S,E]=J.useState(0),O=J.useRef(null),w=J.useRef(null),A=J.useRef(0),[C,T]=J.useState(!1),[V,j]=J.useState(!1),[y,R]=J.useState(!1),z=J.useRef(null),I=J.useRef(null),[G,oe]=J.useState(!0),re=J.useRef(void 0),[te]=Rm([0],{tension:80,friction:18,onChange:([ae])=>{E(ae)}});J.useEffect(()=>{const ae=d===null,Se=re.current===null;re.current,oe(!0),re.current=d},[d]);const ee=J.useCallback((ae,be=0)=>{if(h(ae??null),b(!1),A.current=0,ae!==void 0){const Se=Math.max(0,ae-be);u(Se);const me=be>0?be/ae*100:0;be===0?te.setTarget([0]):te.setTarget([me]),Se===0?(f(!1),w.current=null,t&&setTimeout(()=>t(),0)):r?(w.current=Date.now()-be*1e3,f(!0)):w.current=null}else{u(be);const Se=be/60%1*100;te.setTarget([Se]),r?(w.current=Date.now()-be*1e3,f(!0)):w.current=null}},[r,t,te]),se=J.useCallback(()=>{if(w.current&&p){const be=Date.now()-w.current;A.current+=be;const Se=A.current/1e3;if(d!==null){const me=Math.min(100,Se/d*100);te.setTarget([me])}else{const me=Se/60%1*100;te.setTarget([me])}}f(!1),b(!0),j(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{j(!1)},800)},[p,d,te]),H=J.useCallback(()=>{m&&c>0&&(w.current=Date.now(),f(!0),b(!1))},[m,c]),X=J.useCallback(()=>m,[m]);J.useEffect(()=>{s?(p&&!m&&(T(!0),se()),R(!0),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{R(!1)},600)):(C&&m&&(T(!1),H()),R(!1),I.current&&clearTimeout(I.current))},[s,p,m,C,se,H]),J.useEffect(()=>{let ae=!0;const be=setTimeout(()=>{ae&&e({startNewCycle:ee,pause:se,resume:H,isPaused:X})},0);return()=>{ae=!1,clearTimeout(be)}},[e,ee,se,H,X]),J.useEffect(()=>{if(p){const ae=()=>{if(w.current){const Se=(Date.now()-w.current+A.current)/1e3;if(d!==null){const me=Math.max(0,d-Se);u(Math.ceil(me));const Z=Math.min(100,Se/d*100);if(te.setTarget([Z]),me<=0){f(!1),w.current=null,u(0),te.setTarget([100]),t&&setTimeout(()=>t(),0);return}}else{u(Math.floor(Se));const me=Se/60%1*100;te.setTarget([me])}p&&(O.current=requestAnimationFrame(ae))}};O.current=requestAnimationFrame(ae)}else O.current&&(cancelAnimationFrame(O.current),O.current=null);return()=>{O.current&&cancelAnimationFrame(O.current)}},[p,t,d,te]),J.useEffect(()=>{let ae=null;const be=()=>{te.update(1/60),ae=requestAnimationFrame(be)};return ae=requestAnimationFrame(be),()=>{ae&&cancelAnimationFrame(ae)}},[te]),J.useEffect(()=>()=>{z.current&&clearTimeout(z.current),I.current&&clearTimeout(I.current)},[]),J.useEffect(()=>{if(!p&&!m){if(d!==null&&d>0){const ae=(d-c)/d*100;te.setTarget([ae])}else if(d===null){const ae=c/60%1*100;te.setTarget([ae])}}},[p,m,d,c,te]);const le=ae=>{const be=Math.floor(ae/60),Se=ae%60;return`${be}:${Se.toString().padStart(2,"0")}`},xe=S;return n==="small"?g.jsxs(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:V||y?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s?i.palette.error.light:i.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.5s ease-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s?i.palette.error.light:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-xe/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.5s ease-out"}})]})}),g.jsx(P.Typography,{variant:"body2",sx:{color:s?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:s?l("CycleTimer.Error.lb","Error"):d!==null?o?`${le(c)} ${l("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${le(c)} / ${l("CycleTimer.Time.lb",{time:le(d)})}`:le(c)})]}):g.jsxs(P.Box,{className:a,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(bc,{width:264,height:264,value:xe,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",skipAnimation:!0,sx:{opacity:V||y?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:s?i.palette.error.light:i.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),g.jsxs(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(Le=i.palette.backgroundPaperElevation)==null?void 0:Le[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[g.jsx(P.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:g.jsx(P.Fade,{in:G&&d!==null&&!s,timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:i.palette.text.secondary},children:l("CycleTimer.RemainingTime.lb")})})}),g.jsxs(P.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(P.Fade,{in:s,timeout:500,children:g.jsx(P.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:l("CycleTimer.Error.lb","Error")})}),g.jsx(P.Fade,{in:!s,timeout:500,children:g.jsx(P.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:i.palette.text.primary,lineHeight:1},children:le(c)})})]}),g.jsx(P.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(P.Fade,{in:G&&d!==null&&!s,timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:i.palette.text.secondary},children:d!==null?l("CycleTimer.OfTime.lb",{time:le(d)}):""})})})]})]})})),Dr=yy;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function vc(e){return gy(e)}function Ww(e){return wn("MuiSvgIcon",e)}Il("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Jw=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${rt(t)}`,`fontSize${rt(r)}`]};return es(o,Ww,n)},Yw=pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${rt(r.color)}`],t[`fontSize${rt(r.fontSize)}`]]}})(Dr(({theme:e})=>{var t,r,n,o,a,s,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,S;return{props:{color:m},style:{color:(S=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Wa=F.forwardRef(function(t,r){const n=vc({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:s="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=F.isValidElement(o)&&o.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},b={};u||(b.viewBox=h);const S=Jw(m);return g.jsxs(Yw,{as:i,className:Pt(S.root,a),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...b,...p,...f&&o.props,ownerState:m,children:[f?o.props.children:o,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Wa.propTypes={children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),x.string]),component:x.elementType,fontSize:x.oneOfType([x.oneOf(["inherit","large","medium","small"]),x.string]),htmlColor:x.string,inheritViewBox:x.bool,shapeRendering:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),titleAccess:x.string,viewBox:x.string});Wa.muiName="SvgIcon";function fr(e,t){function r(n,o){return g.jsx(Wa,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Wa.muiName,F.memo(F.forwardRef(r))}function Kw(e){const{controlled:t,default:r,name:n,state:o="value"}=e,{current:a}=F.useRef(t!==void 0),[s,i]=F.useState(r),l=a?t:s;if(process.env.NODE_ENV!=="production"){F.useEffect(()=>{a!==(t!==void 0)&&console.error([`MUI: A component is changing the ${a?"":"un"}controlled ${o} state of ${n} to be ${a?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
126
|
+
`))},[o,n,t]);const{current:u}=F.useRef(r);F.useEffect(()=>{!a&&!Object.is(u,r)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
127
|
+
`))},[JSON.stringify(r)])}const c=F.useCallback(u=>{a||i(u)},[]);return[l,c]}const Qw=fr(g.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Xw=fr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),yd=fr(g.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),_m=Xe(Oe.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:o,getItemId:a,title:s,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var V;const p=P.useTheme(),f=vt.useGridApiRef(),m=J.useRef(null),[b,S]=J.useState(null),E=J.useMemo(()=>e.map(r),[e,r]);J.useEffect(()=>{f.current&&E.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(j=>j.field)})},[E,t,f]),J.useEffect(()=>{if(!m.current||!f.current)return;const j=new ResizeObserver(()=>{setTimeout(()=>{f.current&&E.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(y=>y.field)})},100)});return j.observe(m.current),()=>{j.disconnect()}},[f,E.length,t]);const O=J.useMemo(()=>{if(o!==void 0)return o;if(b!==null)return b;if(d&&e.length>0){const j=e[0];return S(j),j}return null},[d,e,o,b]),w=j=>{const y=e.find(R=>r(R).id===j.id);y&&(o===void 0&&S(y),n&&n(y,j))},A=J.useMemo(()=>!O||!a?null:a(O),[O,a]);function C(){return g.jsx(vt.Toolbar,{children:g.jsxs(P.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[s&&g.jsxs(P.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,i&&` (${e.length})`]}),g.jsxs(P.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(vt.FilterPanelTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(Xw,{fontSize:"small"})})}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(vt.QuickFilter,{render:(j,y)=>g.jsxs(P.Box,{...j,sx:{display:"flex",overflow:"hidden"},children:[!y.expanded&&g.jsx(vt.QuickFilterTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Search",children:g.jsx(yd,{fontSize:"small"})})}),g.jsxs(P.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:y.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(P.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:y.expanded&&y.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[y.expanded&&g.jsx(yd,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(vt.QuickFilterControl,{placeholder:l})]}),y.expanded&&y.value!==""&&g.jsx(vt.QuickFilterClear,{render:g.jsx(P.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(P.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(vt.ToolbarButton,{"aria-label":"Clear",children:g.jsx(Qw,{fontSize:"small"})})})})})]})]})})]})]})})}const T=u||C;return g.jsx(P.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(vt.DataGrid,{apiRef:f,rows:E,columns:t,onRowClick:w,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:T},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((V=c==null?void 0:c.autosizeOptions)==null?void 0:V.columns)||t.map(j=>j.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...A!==null&&{[`&[data-id="${A}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));_m.displayName="WandelbotsDataGrid";const dn=_y({createStyledComponent:pt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>vc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(dn.propTypes={children:x.node,component:x.elementType,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),useFlexGap:x.bool});const Zw=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogMinus"},F.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),eC=J.forwardRef(Zw),tC=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogPlus"},F.createElement("g",{id:"Plus"},F.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),F.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),F.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),rC=J.forwardRef(tC);function Is(e){J.useEffect(e,[])}function Sc(e){Is(()=>$e.autorun(e))}function Em(e,t,r){Is(()=>$e.reaction(e,t,r))}function Rn(e){return Is(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const ol=Xe(Oe.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:o,disabled:a,activeJoggingDirection:s,...i})=>{var O,w,A,C,T,V,j;Rn(()=>{const y=r(),R=h.current;R&&(R.textContent=y)});const l=P.useTheme(),[c,u]=J.useState(null);J.useEffect(()=>{a&&E()},[a]);const d=s||c,h=J.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(O=e.buttonBackgroundColor)==null?void 0:O.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.default,":hover":{backgroundColor:(A=e.buttonBackgroundColor)==null?void 0:A.hovered},":active":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.disabled,"svg path":{fill:l.palette.action.disabled}}},b={...f,backgroundColor:(V=e.buttonBackgroundColor)==null?void 0:V.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(j=e.buttonBackgroundColor)==null?void 0:j.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(y,R){a||y.button===0&&(u(R),n(R))}function E(){u(null),o()}return g.jsxs(dn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(P.IconButton,{disabled:a,disableRipple:!0,onPointerDown:y=>S(y,"-"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="-"?b:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(eC,{})}),g.jsxs(dn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:[g.jsx(dn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...a?{color:l.palette.action.disabled}:{}},...a?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(P.Typography,{height:"22px",sx:{fontSize:"15px",color:a?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(P.IconButton,{disableRipple:!0,disabled:a,onPointerDown:y=>S(y,"+"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="+"?b:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(rC,{})})]})})),nC=fr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),oC=fr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function _r(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Im=typeof global=="object"&&global&&global.Object===Object&&global,aC=typeof self=="object"&&self&&self.Object===Object&&self,Dt=Im||aC||Function("return this")(),Ci=function(){return Dt.Date.now()},sC=/\s/;function iC(e){for(var t=e.length;t--&&sC.test(e.charAt(t)););return t}var lC=/^\s+/;function cC(e){return e&&e.slice(0,iC(e)+1).replace(lC,"")}var hr=Dt.Symbol,Vm=Object.prototype,uC=Vm.hasOwnProperty,dC=Vm.toString,Hn=hr?hr.toStringTag:void 0;function hC(e){var t=uC.call(e,Hn),r=e[Hn];try{e[Hn]=void 0;var n=!0}catch{}var o=dC.call(e);return n&&(t?e[Hn]=r:delete e[Hn]),o}var pC=Object.prototype,mC=pC.toString;function fC(e){return mC.call(e)}var gC="[object Null]",yC="[object Undefined]",bd=hr?hr.toStringTag:void 0;function Lr(e){return e==null?e===void 0?yC:gC:bd&&bd in Object(e)?hC(e):fC(e)}function Er(e){return e!=null&&typeof e=="object"}var bC="[object Symbol]";function Vs(e){return typeof e=="symbol"||Er(e)&&Lr(e)==bC}var xd=NaN,xC=/^[-+]0x[0-9a-f]+$/i,vC=/^0b[01]+$/i,SC=/^0o[0-7]+$/i,OC=parseInt;function vd(e){if(typeof e=="number")return e;if(Vs(e))return xd;if(_r(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_r(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cC(e);var r=vC.test(e);return r||SC.test(e)?OC(e.slice(2),r?2:8):xC.test(e)?xd:+e}var wC="Expected a function",CC=Math.max,PC=Math.min;function TC(e,t,r){var n,o,a,s,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(wC);t=vd(t)||0,_r(r)&&(u=!!r.leading,d="maxWait"in r,a=d?CC(vd(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(C){var T=n,V=o;return n=o=void 0,c=C,s=e.apply(V,T),s}function f(C){return c=C,i=setTimeout(S,t),u?p(C):s}function m(C){var T=C-l,V=C-c,j=t-T;return d?PC(j,a-V):j}function b(C){var T=C-l,V=C-c;return l===void 0||T>=t||T<0||d&&V>=a}function S(){var C=Ci();if(b(C))return E(C);i=setTimeout(S,m(C))}function E(C){return i=void 0,h&&n?p(C):(n=o=void 0,s)}function O(){i!==void 0&&clearTimeout(i),c=0,n=l=o=i=void 0}function w(){return i===void 0?s:E(Ci())}function A(){var C=Ci(),T=b(C);if(n=arguments,o=this,l=C,T){if(i===void 0)return f(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),s}return A.cancel=O,A.flush=w,A}var RC="Expected a function";function AC(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(RC);return _r(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),TC(e,t,{leading:n,maxWait:t,trailing:o})}const Mm=Xe(Oe.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:o,disabled:a,...s})=>{var O,w,A,C,T,V,j,y,R,z,I,G,oe,re,te;const{t:i}=_e.useTranslation(),[l,c]=J.useState(),u=P.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(w=u.palette.backgroundPaperElevation)==null?void 0:w[11]},h=Oe.useLocalObservable(()=>({activeJoggingDir:null,startJogging(ee){this.activeJoggingDir=ee,e(ee)},stopJogging(){this.activeJoggingDir=null,t()}})),p=AC(()=>{c(o())},50);Rn(p);function f(ee){ee.button===0&&h.startJogging("-")}function m(ee){ee.button===0&&h.startJogging("+")}function b(ee){h.stopJogging()}function S(ee){h.stopJogging()}function E(ee,se=1){if(ee===void 0||isNaN(ee))return"";const H=i("General.degree.variable",{amount:ee.toFixed(se)});return ee>0&&se===0?`+${H}`:H}return g.jsxs(dn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(A=u.palette.backgroundPaperElevation)==null?void 0:A[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[9]},"&:active":{...d}}},children:[g.jsx(P.IconButton,{onPointerDown:f,onPointerUp:b,onPointerOut:S,disabled:a,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(nC,{sx:{pointerEvents:"none",color:(R=(y=(j=(V=u.componentsExt)==null?void 0:V.JoggingPanel)==null?void 0:j.JoggingJoint)==null?void 0:y.Joint)==null?void 0:R.arrowColor}})}),g.jsxs(dn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(z=u.palette.backgroundPaperElevation)==null?void 0:z[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(P.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:a?u.palette.action.disabled:u.palette.text.primary},children:E(l)}),g.jsx(P.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:a?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:a?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:E(r,0)},{value:n,label:E(n,0)}]})]}),g.jsx(P.IconButton,{onPointerDown:m,onPointerUp:b,onPointerOut:S,disabled:a,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(oC,{sx:{pointerEvents:"none",color:(te=(re=(oe=(G=u.componentsExt)==null?void 0:G.JoggingPanel)==null?void 0:oe.JoggingJoint)==null?void 0:re.Joint)==null?void 0:te.arrowColor}})})]})})),_C=fr(g.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),EC=fr(g.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function IC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var jm=IC;function VC(){this.__data__=[],this.size=0}var MC=VC;function jC(e,t){return e===t||e!==e&&t!==t}var km=jC;function kC(e,t){for(var r=e.length;r--;)if(km(e[r][0],t))return r;return-1}var Ms=kC,$C=Array.prototype,UC=$C.splice;function DC(e){var t=this.__data__,r=Ms(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():UC.call(t,r,1),--this.size,!0}var LC=DC;function BC(e){var t=this.__data__,r=Ms(t,e);return r<0?void 0:t[r][1]}var NC=BC;function FC(e){return Ms(this.__data__,e)>-1}var zC=FC;function GC(e,t){var r=this.__data__,n=Ms(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var HC=GC;function An(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])}}An.prototype.clear=MC;An.prototype.delete=LC;An.prototype.get=NC;An.prototype.has=zC;An.prototype.set=HC;var js=An;function qC(){this.__data__=new js,this.size=0}var WC=qC;function JC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var YC=JC;function KC(e){return this.__data__.get(e)}var QC=KC;function XC(e){return this.__data__.has(e)}var ZC=XC,eP=typeof global=="object"&&global&&global.Object===Object&&global,$m=eP,tP=typeof self=="object"&&self&&self.Object===Object&&self,rP=$m||tP||Function("return this")(),Xt=rP,nP=Xt.Symbol,On=nP,Um=Object.prototype,oP=Um.hasOwnProperty,aP=Um.toString,qn=On?On.toStringTag:void 0;function sP(e){var t=oP.call(e,qn),r=e[qn];try{e[qn]=void 0;var n=!0}catch{}var o=aP.call(e);return n&&(t?e[qn]=r:delete e[qn]),o}var iP=sP,lP=Object.prototype,cP=lP.toString;function uP(e){return cP.call(e)}var dP=uP,hP="[object Null]",pP="[object Undefined]",Sd=On?On.toStringTag:void 0;function mP(e){return e==null?e===void 0?pP:hP:Sd&&Sd in Object(e)?iP(e):dP(e)}var jo=mP,fP="[object AsyncFunction]",gP="[object Function]",yP="[object GeneratorFunction]",bP="[object Proxy]";function xP(e){if(!jm(e))return!1;var t=jo(e);return t==gP||t==yP||t==fP||t==bP}var Dm=xP,vP=Xt["__core-js_shared__"],Pi=vP,Od=function(){var e=/[^.]+$/.exec(Pi&&Pi.keys&&Pi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function SP(e){return!!Od&&Od in e}var OP=SP,wP=Function.prototype,CP=wP.toString;function PP(e){if(e!=null){try{return CP.call(e)}catch{}try{return e+""}catch{}}return""}var Br=PP,TP=/[\\^$.*+?()[\]{}|]/g,RP=/^\[object .+?Constructor\]$/,AP=Function.prototype,_P=Object.prototype,EP=AP.toString,IP=_P.hasOwnProperty,VP=RegExp("^"+EP.call(IP).replace(TP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MP(e){if(!jm(e)||OP(e))return!1;var t=Dm(e)?VP:RP;return t.test(Br(e))}var jP=MP;function kP(e,t){return e==null?void 0:e[t]}var $P=kP;function UP(e,t){var r=$P(e,t);return jP(r)?r:void 0}var _n=UP,DP=_n(Xt,"Map"),vo=DP,LP=_n(Object,"create"),So=LP;function BP(){this.__data__=So?So(null):{},this.size=0}var NP=BP;function FP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zP=FP,GP="__lodash_hash_undefined__",HP=Object.prototype,qP=HP.hasOwnProperty;function WP(e){var t=this.__data__;if(So){var r=t[e];return r===GP?void 0:r}return qP.call(t,e)?t[e]:void 0}var JP=WP,YP=Object.prototype,KP=YP.hasOwnProperty;function QP(e){var t=this.__data__;return So?t[e]!==void 0:KP.call(t,e)}var XP=QP,ZP="__lodash_hash_undefined__";function eT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=So&&t===void 0?ZP:t,this}var tT=eT;function En(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])}}En.prototype.clear=NP;En.prototype.delete=zP;En.prototype.get=JP;En.prototype.has=XP;En.prototype.set=tT;var wd=En;function rT(){this.size=0,this.__data__={hash:new wd,map:new(vo||js),string:new wd}}var nT=rT;function oT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var aT=oT;function sT(e,t){var r=e.__data__;return aT(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ks=sT;function iT(e){var t=ks(this,e).delete(e);return this.size-=t?1:0,t}var lT=iT;function cT(e){return ks(this,e).get(e)}var uT=cT;function dT(e){return ks(this,e).has(e)}var hT=dT;function pT(e,t){var r=ks(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var mT=pT;function In(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])}}In.prototype.clear=nT;In.prototype.delete=lT;In.prototype.get=uT;In.prototype.has=hT;In.prototype.set=mT;var Lm=In,fT=200;function gT(e,t){var r=this.__data__;if(r instanceof js){var n=r.__data__;if(!vo||n.length<fT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Lm(n)}return r.set(e,t),this.size=r.size,this}var yT=gT;function Vn(e){var t=this.__data__=new js(e);this.size=t.size}Vn.prototype.clear=WC;Vn.prototype.delete=YC;Vn.prototype.get=QC;Vn.prototype.has=ZC;Vn.prototype.set=yT;var Ti=Vn,bT="__lodash_hash_undefined__";function xT(e){return this.__data__.set(e,bT),this}var vT=xT;function ST(e){return this.__data__.has(e)}var OT=ST;function Ja(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Lm;++t<r;)this.add(e[t])}Ja.prototype.add=Ja.prototype.push=vT;Ja.prototype.has=OT;var wT=Ja;function CT(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var PT=CT;function TT(e,t){return e.has(t)}var RT=TT,AT=1,_T=2;function ET(e,t,r,n,o,a){var s=r&AT,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&_T?new wT:void 0;for(a.set(e,t),a.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=s?n(m,f,d,t,e,a):n(f,m,d,e,t,a);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!PT(t,function(S,E){if(!RT(p,E)&&(f===S||o(f,S,r,n,a)))return p.push(E)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var Bm=ET,IT=Xt.Uint8Array,Cd=IT;function VT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}var MT=VT;function jT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var kT=jT,$T=1,UT=2,DT="[object Boolean]",LT="[object Date]",BT="[object Error]",NT="[object Map]",FT="[object Number]",zT="[object RegExp]",GT="[object Set]",HT="[object String]",qT="[object Symbol]",WT="[object ArrayBuffer]",JT="[object DataView]",Pd=On?On.prototype:void 0,Ri=Pd?Pd.valueOf:void 0;function YT(e,t,r,n,o,a,s){switch(r){case JT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case WT:return!(e.byteLength!=t.byteLength||!a(new Cd(e),new Cd(t)));case DT:case LT:case FT:return km(+e,+t);case BT:return e.name==t.name&&e.message==t.message;case zT:case HT:return e==t+"";case NT:var i=MT;case GT:var l=n&$T;if(i||(i=kT),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=UT,s.set(e,t);var u=Bm(i(e),i(t),n,o,a,s);return s.delete(e),u;case qT:if(Ri)return Ri.call(e)==Ri.call(t)}return!1}var KT=YT;function QT(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var XT=QT,ZT=Array.isArray,Ya=ZT;function eR(e,t,r){var n=t(e);return Ya(e)?n:XT(n,r(e))}var tR=eR;function rR(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[o++]=s)}return a}var nR=rR;function oR(){return[]}var aR=oR,sR=Object.prototype,iR=sR.propertyIsEnumerable,Td=Object.getOwnPropertySymbols,lR=Td?function(e){return e==null?[]:(e=Object(e),nR(Td(e),function(t){return iR.call(e,t)}))}:aR,cR=lR;function uR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var dR=uR;function hR(e){return e!=null&&typeof e=="object"}var Oo=hR,pR="[object Arguments]";function mR(e){return Oo(e)&&jo(e)==pR}var Rd=mR,Nm=Object.prototype,fR=Nm.hasOwnProperty,gR=Nm.propertyIsEnumerable,yR=Rd(function(){return arguments}())?Rd:function(e){return Oo(e)&&fR.call(e,"callee")&&!gR.call(e,"callee")},bR=yR;function xR(){return!1}var vR=xR,Fm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ad=Fm&&typeof module=="object"&&module&&!module.nodeType&&module,SR=Ad&&Ad.exports===Fm,_d=SR?Xt.Buffer:void 0,OR=_d?_d.isBuffer:void 0,wR=OR||vR,al=wR,CR=9007199254740991,PR=/^(?:0|[1-9]\d*)$/;function TR(e,t){var r=typeof e;return t=t??CR,!!t&&(r=="number"||r!="symbol"&&PR.test(e))&&e>-1&&e%1==0&&e<t}var RR=TR,AR=9007199254740991;function _R(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=AR}var zm=_R,ER="[object Arguments]",IR="[object Array]",VR="[object Boolean]",MR="[object Date]",jR="[object Error]",kR="[object Function]",$R="[object Map]",UR="[object Number]",DR="[object Object]",LR="[object RegExp]",BR="[object Set]",NR="[object String]",FR="[object WeakMap]",zR="[object ArrayBuffer]",GR="[object DataView]",HR="[object Float32Array]",qR="[object Float64Array]",WR="[object Int8Array]",JR="[object Int16Array]",YR="[object Int32Array]",KR="[object Uint8Array]",QR="[object Uint8ClampedArray]",XR="[object Uint16Array]",ZR="[object Uint32Array]",Ee={};Ee[HR]=Ee[qR]=Ee[WR]=Ee[JR]=Ee[YR]=Ee[KR]=Ee[QR]=Ee[XR]=Ee[ZR]=!0;Ee[ER]=Ee[IR]=Ee[zR]=Ee[VR]=Ee[GR]=Ee[MR]=Ee[jR]=Ee[kR]=Ee[$R]=Ee[UR]=Ee[DR]=Ee[LR]=Ee[BR]=Ee[NR]=Ee[FR]=!1;function eA(e){return Oo(e)&&zm(e.length)&&!!Ee[jo(e)]}var tA=eA;function rA(e){return function(t){return e(t)}}var nA=rA,Gm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,io=Gm&&typeof module=="object"&&module&&!module.nodeType&&module,oA=io&&io.exports===Gm,Ai=oA&&$m.process,aA=function(){try{var e=io&&io.require&&io.require("util").types;return e||Ai&&Ai.binding&&Ai.binding("util")}catch{}}(),Ed=aA,Id=Ed&&Ed.isTypedArray,sA=Id?nA(Id):tA,Hm=sA,iA=Object.prototype,lA=iA.hasOwnProperty;function cA(e,t){var r=Ya(e),n=!r&&bR(e),o=!r&&!n&&al(e),a=!r&&!n&&!o&&Hm(e),s=r||n||o||a,i=s?dR(e.length,String):[],l=i.length;for(var c in e)(t||lA.call(e,c))&&!(s&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||RR(c,l)))&&i.push(c);return i}var uA=cA,dA=Object.prototype;function hA(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||dA;return e===r}var pA=hA;function mA(e,t){return function(r){return e(t(r))}}var fA=mA,gA=fA(Object.keys,Object),yA=gA,bA=Object.prototype,xA=bA.hasOwnProperty;function vA(e){if(!pA(e))return yA(e);var t=[];for(var r in Object(e))xA.call(e,r)&&r!="constructor"&&t.push(r);return t}var SA=vA;function OA(e){return e!=null&&zm(e.length)&&!Dm(e)}var wA=OA;function CA(e){return wA(e)?uA(e):SA(e)}var PA=CA;function TA(e){return tR(e,PA,cR)}var Vd=TA,RA=1,AA=Object.prototype,_A=AA.hasOwnProperty;function EA(e,t,r,n,o,a){var s=r&RA,i=Vd(e),l=i.length,c=Vd(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:_A.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var b=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,a):n(S,E,h,e,t,a);if(!(O===void 0?S===E||o(S,E,r,n,a):O)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var w=e.constructor,A=t.constructor;w!=A&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof A=="function"&&A instanceof A)&&(m=!1)}return a.delete(e),a.delete(t),m}var IA=EA,VA=_n(Xt,"DataView"),sl=VA,MA=_n(Xt,"Promise"),il=MA,jA=_n(Xt,"Set"),ll=jA,kA=_n(Xt,"WeakMap"),cl=kA,Md="[object Map]",$A="[object Object]",jd="[object Promise]",kd="[object Set]",$d="[object WeakMap]",Ud="[object DataView]",UA=Br(sl),DA=Br(vo),LA=Br(il),BA=Br(ll),NA=Br(cl),xr=jo;(sl&&xr(new sl(new ArrayBuffer(1)))!=Ud||vo&&xr(new vo)!=Md||il&&xr(il.resolve())!=jd||ll&&xr(new ll)!=kd||cl&&xr(new cl)!=$d)&&(xr=function(e){var t=jo(e),r=t==$A?e.constructor:void 0,n=r?Br(r):"";if(n)switch(n){case UA:return Ud;case DA:return Md;case LA:return jd;case BA:return kd;case NA:return $d}return t});var Dd=xr,FA=1,Ld="[object Arguments]",Bd="[object Array]",oa="[object Object]",zA=Object.prototype,Nd=zA.hasOwnProperty;function GA(e,t,r,n,o,a){var s=Ya(e),i=Ya(t),l=s?Bd:Dd(e),c=i?Bd:Dd(t);l=l==Ld?oa:l,c=c==Ld?oa:c;var u=l==oa,d=c==oa,h=l==c;if(h&&al(e)){if(!al(t))return!1;s=!0,u=!1}if(h&&!u)return a||(a=new Ti),s||Hm(e)?Bm(e,t,r,n,o,a):KT(e,t,l,r,n,o,a);if(!(r&FA)){var p=u&&Nd.call(e,"__wrapped__"),f=d&&Nd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return a||(a=new Ti),o(m,b,r,n,a)}}return h?(a||(a=new Ti),IA(e,t,r,n,o,a)):!1}var HA=GA;function qm(e,t,r,n,o){return e===t?!0:e==null||t==null||!Oo(e)&&!Oo(t)?e!==e&&t!==t:HA(e,t,r,n,qm,o)}var qA=qm;function WA(e,t){return qA(e,t)}var JA=WA;/*! *****************************************************************************
|
|
128
128
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
129
129
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
130
130
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -137,19 +137,19 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
137
137
|
|
|
138
138
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
139
139
|
and limitations under the License.
|
|
140
|
-
***************************************************************************** */var ul=function(e,t){return ul=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var
|
|
140
|
+
***************************************************************************** */var ul=function(e,t){return ul=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},ul(e,t)};function Wm(e,t){ul(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function YA(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function KA(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(i){s={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function QA(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(KA(arguments[t]));return e}var Jm=function(){function e(t,r){this.target=r,this.type=t}return e}(),XA=function(e){Wm(t,e);function t(r,n){var o=e.call(this,"error",n)||this;return o.message=r.message,o.error=r,o}return t}(Jm),ZA=function(e){Wm(t,e);function t(r,n,o){r===void 0&&(r=1e3),n===void 0&&(n="");var a=e.call(this,"close",o)||this;return a.wasClean=!0,a.code=r,a.reason=n,a}return t}(Jm);/*!
|
|
141
141
|
* Reconnecting WebSocket
|
|
142
142
|
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
|
143
143
|
* https://github.com/pladaria/reconnecting-websocket
|
|
144
144
|
* License MIT
|
|
145
|
-
*/var e_=function(){if(typeof WebSocket<"u")return WebSocket},t_=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},yr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},r_=function(){function e(t,r,n){var a=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){a._debug("open event");var s=a._options.minUptime,i=s===void 0?yr.minUptime:s;clearTimeout(a._connectTimeout),a._uptimeTimeout=setTimeout(function(){return a._acceptOpen()},i),a._ws.binaryType=a._binaryType,a._messageQueue.forEach(function(l){return a._ws.send(l)}),a._messageQueue=[],a.onopen&&a.onopen(o),a._listeners.open.forEach(function(l){return a._callEventListener(o,l)})},this._handleMessage=function(o){a._debug("message event"),a.onmessage&&a.onmessage(o),a._listeners.message.forEach(function(s){return a._callEventListener(o,s)})},this._handleError=function(o){a._debug("error event",o.message),a._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),a.onerror&&a.onerror(o),a._debug("exec error listeners"),a._listeners.error.forEach(function(s){return a._callEventListener(o,s)}),a._connect()},this._handleClose=function(o){a._debug("close event"),a._clearTimeouts(),a._shouldReconnect&&a._connect(),a.onclose&&a.onclose(o),a._listeners.close.forEach(function(s){return a._callEventListener(o,s)})},this._url=t,this._protocols=r,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){var t=this._messageQueue.reduce(function(r,n){return typeof n=="string"?r+=n.length:n instanceof Blob?r+=n.size:r+=n.byteLength,r},0);return t+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(t,r){if(t===void 0&&(t=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(t,r)},e.prototype.reconnect=function(t,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,r),this._connect())},e.prototype.send=function(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{var r=this._options.maxEnqueuedMessages,n=r===void 0?yr.maxEnqueuedMessages:r;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,r){this._listeners[t]&&this._listeners[t].push(r)},e.prototype.dispatchEvent=function(t){var r,n,a=this._listeners[t.type];if(a)try{for(var o=YA(a),s=o.next();!s.done;s=o.next()){var i=s.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0},e.prototype.removeEventListener=function(t,r){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(n){return n!==r}))},e.prototype._debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._options.debug&&console.log.apply(console,QA(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?yr.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,o=a===void 0?yr.minReconnectionDelay:a,s=t.maxReconnectionDelay,i=s===void 0?yr.maxReconnectionDelay:s,l=0;return this._retryCount>0&&(l=o*Math.pow(n,this._retryCount-1),l>i&&(l=i)),this._debug("next delay",l),l},e.prototype._wait=function(){var t=this;return new Promise(function(r){setTimeout(r,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var r=t();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var r=this._options,n=r.maxRetries,a=n===void 0?yr.maxRetries:n,o=r.connectionTimeout,s=o===void 0?yr.connectionTimeout:o,i=r.WebSocket,l=i===void 0?e_():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!t_(l))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(c){t._closeCalled||(t._debug("connect",{url:c,protocols:t._protocols}),t._ws=t._protocols?new l(c,t._protocols):new l(c),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},s))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new XA(Error("TIMEOUT"),this))},e.prototype._disconnect=function(t,r){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,r),this._handleClose(new ZA(t,r,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(t,r){"handleEvent"in r?r.handleEvent(t):r(t)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}(),n_=Object.defineProperty,a_=Object.defineProperties,o_=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,s_=Object.prototype.hasOwnProperty,i_=Object.prototype.propertyIsEnumerable,zd=(e,t,r)=>t in e?n_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ln=(e,t)=>{for(var r in t||(t={}))s_.call(t,r)&&zd(e,r,t[r]);if(Fd)for(var r of Fd(t))i_.call(t,r)&&zd(e,r,t[r]);return e},dl=(e,t)=>a_(e,o_(t)),Ve=(e,t,r)=>new Promise((n,a)=>{var o=l=>{try{i(r.next(l))}catch(c){a(c)}},s=l=>{try{i(r.throw(l))}catch(c){a(c)}},i=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);i((r=r.apply(e,t)).next())}),l_=class extends r_{constructor(e,t={}){console.log("Opening websocket to",e),super(()=>this.targetUrl||e,void 0,{startClosed:!0}),this.opts=t,this.disposed=!1,Object.defineProperty(this,"url",{get(){return this.targetUrl}}),this.targetUrl=e,this.addEventListener("open",()=>{console.log(`Websocket to ${this.url} opened`)}),this.addEventListener("message",n=>{this.receivedFirstMessage||(this.receivedFirstMessage=n)}),this.addEventListener("close",()=>{console.log(`Websocket to ${this.url} closed`)});const r=this.reconnect;this.reconnect=()=>{this.opts.mock?this.opts.mock.handleWebsocketConnection(this):r.apply(this)},this.reconnect()}changeUrl(e){this.receivedFirstMessage=void 0,this.targetUrl=e,this.reconnect()}sendJson(e){this.opts.mock?this.opts.mock.handleWebsocketMessage(this,JSON.stringify(e)):this.send(JSON.stringify(e))}dispose(){this.close(),this.disposed=!0,this.opts.onDispose&&this.opts.onDispose()}opened(){return Ve(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return Ve(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return Ve(this,null,function*(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=a=>{this.receivedFirstMessage=a,this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}nextMessage(){return Ve(this,null,function*(){return new Promise((e,t)=>{const r=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}},c_=class{constructor(){this.available=typeof window<"u"&&!!window.localStorage}getJSON(e){if(!this.available)return null;const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}setJSON(e,t){if(!this.available)return null;window.localStorage.setItem(e,JSON.stringify(t))}delete(e){if(!this.available)return null;window.localStorage.removeItem(e)}setString(e,t){if(!this.available)return null;window.localStorage.setItem(e,t)}getString(e){return this.available?window.localStorage.getItem(e):null}},_i=new c_;function lr(e){try{return JSON.parse(e)}catch{return}}function u_(e,t){return e||(e="world"),t||(t="world"),e===t}var hn="wandelbots.io",Ei={dev:{domain:`https://auth.portal.dev.${hn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${hn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${hn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},d_=e=>{if(e.includes(`dev.${hn}`))return Ei.dev;if(e.includes(`stg.${hn}`))return Ei.stg;if(e.includes(hn))return Ei.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},h_=e=>Ve(void 0,null,function*(){var t;if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const r=d_(e);if(new URL(e).origin===window.location.origin)throw window.location.reload(),new Error("Failed to reload page to get auth details, please refresh manually");const{Auth0Client:n}=yield Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-BLRAk7Yh.cjs")),a=new n({domain:r.domain,clientId:(t=r.clientId)!=null?t:"",useRefreshTokens:!1,authorizationParams:{audience:"nova-api",redirect_uri:window.location.origin}});if(window.location.search.includes("code=")&&window.location.search.includes("state=")){const{appState:s}=yield a.handleRedirectCallback();window.history.replaceState({},document.title,(s==null?void 0:s.returnTo)||window.location.pathname)}else yield a.loginWithRedirect();return yield a.getTokenSilently()});function Ym(e,t){return function(){return e.apply(t,arguments)}}const{toString:p_}=Object.prototype,{getPrototypeOf:Oc}=Object,$s=(e=>t=>{const r=p_.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>$s(t)===e),Us=e=>t=>typeof t===e,{isArray:Mn}=Array,Oa=Us("undefined");function m_(e){return e!==null&&!Oa(e)&&e.constructor!==null&&!Oa(e.constructor)&&ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Km=Rt("ArrayBuffer");function f_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Km(e.buffer),t}const g_=Us("string"),ht=Us("function"),Qm=Us("number"),Ds=e=>e!==null&&typeof e=="object",y_=e=>e===!0||e===!1,Oo=e=>{if($s(e)!=="object")return!1;const t=Oc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},b_=Rt("Date"),x_=Rt("File"),v_=Rt("Blob"),S_=Rt("FileList"),O_=e=>Ds(e)&&ht(e.pipe),w_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ht(e.append)&&((t=$s(e))==="formdata"||t==="object"&&ht(e.toString)&&e.toString()==="[object FormData]"))},C_=Rt("URLSearchParams"),[P_,T_,R_,A_]=["ReadableStream","Request","Response","Headers"].map(Rt),__=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ja(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Mn(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function Xm(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const wr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zm=e=>!Oa(e)&&e!==wr;function hl(){const{caseless:e}=Zm(this)&&this||{},t={},r=(n,a)=>{const o=e&&Xm(t,a)||a;Oo(t[o])&&Oo(n)?t[o]=hl(t[o],n):Oo(n)?t[o]=hl({},n):Mn(n)?t[o]=n.slice():t[o]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&ja(arguments[n],r);return t}const E_=(e,t,r,{allOwnKeys:n}={})=>(ja(t,(a,o)=>{r&&ht(a)?e[o]=Ym(a,r):e[o]=a},{allOwnKeys:n}),e),I_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),V_=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},M_=(e,t,r,n)=>{let a,o,s;const i={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],(!n||n(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=r!==!1&&Oc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},j_=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},k_=e=>{if(!e)return null;if(Mn(e))return e;let t=e.length;if(!Qm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},$_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Oc(Uint8Array)),U_=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const o=a.value;t.call(e,o[0],o[1])}},D_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},L_=Rt("HTMLFormElement"),B_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Gd=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),N_=Rt("RegExp"),ef=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ja(r,(a,o)=>{let s;(s=t(a,o,e))!==!1&&(n[o]=s||a)}),Object.defineProperties(e,n)},F_=e=>{ef(e,(t,r)=>{if(ht(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ht(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},z_=(e,t)=>{const r={},n=a=>{a.forEach(o=>{r[o]=!0})};return Mn(e)?n(e):n(String(e).split(t)),r},G_=()=>{},H_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function q_(e){return!!(e&&ht(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const W_=e=>{const t=new Array(10),r=(n,a)=>{if(Ds(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const o=Mn(n)?[]:{};return ja(n,(s,i)=>{const l=r(s,a+1);!Oa(l)&&(o[i]=l)}),t[a]=void 0,o}}return n};return r(e,0)},J_=Rt("AsyncFunction"),Y_=e=>e&&(Ds(e)||ht(e))&&ht(e.then)&&ht(e.catch),tf=((e,t)=>e?setImmediate:t?((r,n)=>(wr.addEventListener("message",({source:a,data:o})=>{a===wr&&o===r&&n.length&&n.shift()()},!1),a=>{n.push(a),wr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ht(wr.postMessage)),K_=typeof queueMicrotask<"u"?queueMicrotask.bind(wr):typeof process<"u"&&process.nextTick||tf,q={isArray:Mn,isArrayBuffer:Km,isBuffer:m_,isFormData:w_,isArrayBufferView:f_,isString:g_,isNumber:Qm,isBoolean:y_,isObject:Ds,isPlainObject:Oo,isReadableStream:P_,isRequest:T_,isResponse:R_,isHeaders:A_,isUndefined:Oa,isDate:b_,isFile:x_,isBlob:v_,isRegExp:N_,isFunction:ht,isStream:O_,isURLSearchParams:C_,isTypedArray:$_,isFileList:S_,forEach:ja,merge:hl,extend:E_,trim:__,stripBOM:I_,inherits:V_,toFlatObject:M_,kindOf:$s,kindOfTest:Rt,endsWith:j_,toArray:k_,forEachEntry:U_,matchAll:D_,isHTMLForm:L_,hasOwnProperty:Gd,hasOwnProp:Gd,reduceDescriptors:ef,freezeMethods:F_,toObjectSet:z_,toCamelCase:B_,noop:G_,toFiniteNumber:H_,findKey:Xm,global:wr,isContextDefined:Zm,isSpecCompliantForm:q_,toJSONObject:W_,isAsyncFn:J_,isThenable:Y_,setImmediate:tf,asap:K_};function pe(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}q.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const rf=pe.prototype,nf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{nf[e]={value:e}});Object.defineProperties(pe,nf);Object.defineProperty(rf,"isAxiosError",{value:!0});pe.from=(e,t,r,n,a,o)=>{const s=Object.create(rf);return q.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),pe.call(s,e.message,t,r,n,a),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const Q_=null;function pl(e){return q.isPlainObject(e)||q.isArray(e)}function af(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Hd(e,t,r){return e?e.concat(t).map(function(a,o){return a=af(a),!r&&o?"["+a+"]":a}).join(r?".":""):t}function X_(e){return q.isArray(e)&&!e.some(pl)}const Z_=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Ls(e,t,r){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!q.isUndefined(b[m])});const n=r.metaTokens,a=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(a))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(q.isDate(f))return f.toISOString();if(!l&&q.isBlob(f))throw new pe("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(f)||q.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,b){let S=f;if(f&&!b&&typeof f=="object"){if(q.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(q.isArray(f)&&X_(f)||(q.isFileList(f)||q.endsWith(m,"[]"))&&(S=q.toArray(f)))return m=af(m),S.forEach(function(O,w){!(q.isUndefined(O)||O===null)&&t.append(s===!0?Hd([m],w,o):s===null?m:m+"[]",c(O))}),!1}return pl(f)?!0:(t.append(Hd(b,m,o),c(f)),!1)}const d=[],h=Object.assign(Z_,{defaultVisitor:u,convertValue:c,isVisitable:pl});function p(f,m){if(!q.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),q.forEach(f,function(S,E){(!(q.isUndefined(S)||S===null)&&a.call(t,S,q.isString(E)?E.trim():E,m,h))===!0&&p(S,m?m.concat(E):[E])}),d.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return p(e),t}function qd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function wc(e,t){this._pairs=[],e&&Ls(e,this,t)}const of=wc.prototype;of.append=function(t,r){this._pairs.push([t,r])};of.toString=function(t){const r=t?function(n){return t.call(this,n,qd)}:qd;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function eE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function sf(e,t,r){if(!t)return e;const n=r&&r.encode||eE;q.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let o;if(a?o=a(t,r):o=q.isURLSearchParams(t)?t.toString():new wc(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Wd{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(n){n!==null&&t(n)})}}const lf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tE=typeof URLSearchParams<"u"?URLSearchParams:wc,rE=typeof FormData<"u"?FormData:null,nE=typeof Blob<"u"?Blob:null,aE={isBrowser:!0,classes:{URLSearchParams:tE,FormData:rE,Blob:nE},protocols:["http","https","file","blob","url","data"]},Cc=typeof window<"u"&&typeof document<"u",ml=typeof navigator=="object"&&navigator||void 0,oE=Cc&&(!ml||["ReactNative","NativeScript","NS"].indexOf(ml.product)<0),sE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iE=Cc&&window.location.href||"http://localhost",lE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cc,hasStandardBrowserEnv:oE,hasStandardBrowserWebWorkerEnv:sE,navigator:ml,origin:iE},Symbol.toStringTag,{value:"Module"})),et={...lE,...aE};function cE(e,t){return Ls(e,new et.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,o){return et.isNode&&q.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function uE(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dE(e){const t={},r=Object.keys(e);let n;const a=r.length;let o;for(n=0;n<a;n++)o=r[n],t[o]=e[o];return t}function cf(e){function t(r,n,a,o){let s=r[o++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=o>=r.length;return s=!s&&q.isArray(a)?a.length:s,l?(q.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!i):((!a[s]||!q.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],o)&&q.isArray(a[s])&&(a[s]=dE(a[s])),!i)}if(q.isFormData(e)&&q.isFunction(e.entries)){const r={};return q.forEachEntry(e,(n,a)=>{t(uE(n),a,r,0)}),r}return null}function hE(e,t,r){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ka={transitional:lf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return a?JSON.stringify(cf(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return cE(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ls(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||a?(r.setContentType("application/json",!1),hE(t)):t}],transformResponse:[function(t){const r=this.transitional||ka.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?pe.from(i,pe.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ka.headers[e]={}});const pE=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mE=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
146
|
-
`).forEach(function(s){
|
|
147
|
-
`)}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(a=>n.set(a)),n}static accessor(t){const n=(this[Jd]=this[Jd]={accessors:{}}).accessors,a=this.prototype;function o(s){const i=Wn(s);n[i]||(bE(a,s),n[i]=!0)}return q.isArray(t)?t.forEach(o):o(t),this}};ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(ct.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});q.freezeMethods(ct);function Vi(e,t){const r=this||ka,n=t||r,a=ct.from(n.headers);let o=n.data;return q.forEach(e,function(i){o=i.call(r,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function uf(e){return!!(e&&e.__CANCEL__)}function jn(e,t,r){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,r),this.name="CanceledError"}q.inherits(jn,pe,{__CANCEL__:!0});function df(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new pe("Request failed with status code "+r.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function xE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vE(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[o];s||(s=c),r[a]=l,n[a]=c;let d=o,h=0;for(;d!==a;)h+=r[d++],d=d%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-s<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function SE(e,t){let r=0,n=1e3/t,a,o;const s=(c,u=Date.now())=>{r=u,a=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(a=c,o||(o=setTimeout(()=>{o=null,s(a)},n-d)))},()=>a&&s(a)]}const Ko=(e,t,r=3)=>{let n=0;const a=vE(50,250);return SE(o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,l=s-n,c=a(l),u=s<=i;n=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:o,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Yd=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Kd=e=>(...t)=>q.asap(()=>e(...t)),OE=et.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,et.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,wE=et.hasStandardBrowserEnv?{write(e,t,r,n,a,o){const s=[e+"="+encodeURIComponent(t)];q.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),q.isString(n)&&s.push("path="+n),q.isString(a)&&s.push("domain="+a),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function CE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function PE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hf(e,t,r){let n=!CE(t);return e&&n||r==!1?PE(e,t):t}const Qd=e=>e instanceof ct?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(c,u,d,h){return q.isPlainObject(c)&&q.isPlainObject(u)?q.merge.call({caseless:h},c,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function a(c,u,d,h){if(q.isUndefined(u)){if(!q.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!q.isUndefined(u))return n(void 0,u)}function s(c,u){if(q.isUndefined(u)){if(!q.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:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(c,u,d)=>a(Qd(c),Qd(u),d,!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);q.isUndefined(h)&&d!==i||(r[u]=h)}),r}const pf=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;t.headers=s=ct.from(s),t.url=sf(hf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(q.isFormData(r)){if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(et.hasStandardBrowserEnv&&(n&&q.isFunction(n)&&(n=n(t)),n||n!==!1&&OE(t.url))){const c=a&&o&&wE.read(o);c&&s.set(a,c)}return t},TE=typeof XMLHttpRequest<"u",RE=TE&&function(e){return new Promise(function(r,n){const a=pf(e);let o=a.data;const s=ct.from(a.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=a,u,d,h,p,f;function m(){p&&p(),f&&f(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function S(){if(!b)return;const O=ct.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),A={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:O,config:e,request:b};df(function(T){r(T),m()},function(T){n(T),m()},A),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new pe("Request aborted",pe.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new pe("Network Error",pe.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const A=a.transitional||lf;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),n(new pe(w,A.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,b)),b=null},o===void 0&&s.setContentType(null),"setRequestHeader"in b&&q.forEach(s.toJSON(),function(w,A){b.setRequestHeader(A,w)}),q.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),i&&i!=="json"&&(b.responseType=a.responseType),c&&([h,f]=Ko(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=Ko(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=O=>{b&&(n(!O||O.type?new jn(null,e,b):O),b.abort(),b=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const E=xE(a.url);if(E&&et.protocols.indexOf(E)===-1){n(new pe("Unsupported protocol "+E+":",pe.ERR_BAD_REQUEST,e));return}b.send(o||null)})},AE=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const o=function(c){if(!a){a=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof pe?u:new jn(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new pe(`timeout ${t} of ms exceeded`,pe.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>q.asap(i),l}},_E=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},EE=async function*(e,t){for await(const r of IE(e))yield*_E(r,t)},IE=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()}},Xd=(e,t,r,n)=>{const a=EE(e,t);let o=0,s,i=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=o+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),a.return()}},{highWaterMark:2})},Bs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mf=Bs&&typeof ReadableStream=="function",VE=Bs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ff=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ME=mf&&ff(()=>{let e=!1;const t=new Request(et.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Zd=64*1024,fl=mf&&ff(()=>q.isReadableStream(new Response("").body)),Qo={stream:fl&&(e=>e.body)};Bs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Qo[t]&&(Qo[t]=q.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new pe(`Response type '${t}' is not supported`,pe.ERR_NOT_SUPPORT,n)})})})(new Response);const jE=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(et.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await VE(e)).byteLength},kE=async(e,t)=>{const r=q.toFiniteNumber(e.getContentLength());return r??jE(t)},$E=Bs&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:o,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=pf(e);c=c?(c+"").toLowerCase():"text";let p=AE([a,o&&o.toAbortSignal()],s),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(l&&ME&&r!=="get"&&r!=="head"&&(b=await kE(u,n))!==0){let A=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(q.isFormData(n)&&(C=A.headers.get("content-type"))&&u.setContentType(C),A.body){const[T,V]=Yd(b,Ko(Kd(l)));n=Xd(A.body,Zd,T,V)}}q.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;f=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:S?d:void 0});let E=await fetch(f);const O=fl&&(c==="stream"||c==="response");if(fl&&(i||O&&m)){const A={};["status","statusText","headers"].forEach(j=>{A[j]=E[j]});const C=q.toFiniteNumber(E.headers.get("content-length")),[T,V]=i&&Yd(C,Ko(Kd(i),!0))||[];E=new Response(Xd(E.body,Zd,T,()=>{V&&V(),m&&m()}),A)}c=c||"text";let w=await Qo[q.findKey(Qo,c)||"text"](E,e);return!O&&m&&m(),await new Promise((A,C)=>{df(A,C,{data:w,headers:ct.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:f})})}catch(S){throw m&&m(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,e,f),{cause:S.cause||S}):pe.from(S,S&&S.code,e,f)}}),gl={http:Q_,xhr:RE,fetch:$E};q.forEach(gl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const eh=e=>`- ${e}`,UE=e=>q.isFunction(e)||e===null||e===!1,gf={getAdapter:e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let o=0;o<t;o++){r=e[o];let s;if(n=r,!UE(r)&&(n=gl[(s=String(r)).toLowerCase()],n===void 0))throw new pe(`Unknown adapter '${s}'`);if(n)break;a[s||"#"+o]=n}if(!n){const o=Object.entries(a).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since :
|
|
148
|
-
`+
|
|
149
|
-
`):" "+eh(
|
|
150
|
-
`+o):n.stack=o}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:a,headers:o}=r;n!==void 0&&Co.assertOptions(n,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean)},!1),a!=null&&(q.isFunction(a)?r.paramsSerializer={serialize:a}:Co.assertOptions(a,{encode:Et.function,serialize:Et.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Co.assertOptions(r,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&q.merge(o.common,o[r.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=ct.concat(s,o);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=[th.bind(this),void 0];for(f.unshift.apply(f,i),f.push.apply(f,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=0;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(b){m.call(this,b);break}}try{u=th.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=hf(t.baseURL,t.url,t.allowAbsoluteUrls);return sf(r,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Tr.prototype[t]=function(r,n){return this.request(Ir(n||{},{method:t,url:r,data:(n||{}).data}))}});q.forEach(["post","put","patch"],function(t){function r(n){return function(o,s,i){return this.request(Ir(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Tr.prototype[t]=r(),Tr.prototype[t+"Form"]=r(!0)});let LE=class bf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(a=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](a);n._listeners=null}),this.promise.then=a=>{let o;const s=new Promise(i=>{n.subscribe(i),o=i}).then(a);return s.cancel=function(){n.unsubscribe(o)},s},t(function(o,s,i){n.reason||(n.reason=new jn(o,s,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 bf(function(a){t=a}),cancel:t}}};function BE(e){return function(r){return e.apply(null,r)}}function NE(e){return q.isObject(e)&&e.isAxiosError===!0}const yl={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};Object.entries(yl).forEach(([e,t])=>{yl[t]=e});function xf(e){const t=new Tr(e),r=Ym(Tr.prototype.request,t);return q.extend(r,Tr.prototype,t,{allOwnKeys:!0}),q.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return xf(Ir(e,a))},r}const _=xf(ka);_.Axios=Tr;_.CanceledError=jn;_.CancelToken=LE;_.isCancel=uf;_.VERSION=yf;_.toFormData=Ls;_.AxiosError=pe;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=BE;_.isAxiosError=NE;_.mergeConfig=Ir;_.AxiosHeaders=ct;_.formToJSON=e=>cf(q.isHTMLForm(e)?new FormData(e):e);_.getAdapter=gf.getAdapter;_.HttpStatusCode=yl;_.default=_;const{Axios:mj,AxiosError:bl,CanceledError:fj,isCancel:gj,CancelToken:yj,VERSION:bj,all:xj,Cancel:vj,isAxiosError:FE,spread:Sj,toFormData:Oj,AxiosHeaders:wj,HttpStatusCode:Cj,formToJSON:Pj,getAdapter:Tj,mergeConfig:Rj}=_,M="/api/v1".replace(/\/+$/,"");class Me{constructor(t,r=M,n=_){$n(this,"basePath");$n(this,"axios");$n(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class zE extends Error{constructor(r,n){super(n);$n(this,"field");this.field=r,this.name="RequiredError"}}const k={},$="https://example.com",v=function(e,t,r){if(r==null)throw new zE(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},U=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},D=async function(e,t){if(t&&t.accessToken){const r=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+r}};function xl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>xl(e,n,r)):Object.keys(t).forEach(n=>xl(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const L=function(e,...t){const r=new URLSearchParams(e.search);xl(r,t),e.search=r.toString()},he=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||""},B=function(e){return e.pathname+e.search+e.hash},N=function(e,t,r,n){return(a=t,o=r)=>{const s={...e.options,url:(a.defaults.baseURL?"":(n==null?void 0:n.basePath)??o)+e.url};return a.request(s)}},Mt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},GE=function(e){return{addApp:async(t,r,n,a={})=>{v("addApp","cell",t),v("addApp","app",r);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(r,l,e),{url:B(s),options:l}},clearApps:async(t,r,n={})=>{v("clearApps","cell",t);const a="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteApp:async(t,r,n,a={})=>{v("deleteApp","cell",t),v("deleteApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},getApp:async(t,r,n={})=>{v("getApp","cell",t),v("getApp","app",r);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listApps:async(t,r={})=>{v("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},updateApp:async(t,r,n,a,o={})=>{v("updateApp","cell",t),v("updateApp","app",r),v("updateApp","app2",n);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};U(c,e),await D(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=he(n,c,e),{url:B(i),options:c}}}},Xr=function(e){const t=GE(e);return{async addApp(r,n,a,o){var c,u;const s=await t.addApp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async clearApps(r,n,a){var l,c;const o=await t.clearApps(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ApplicationApi.clearApps"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteApp(r,n,a,o){var c,u;const s=await t.deleteApp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getApp(r,n,a){var l,c;const o=await t.getApp(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ApplicationApi.getApp"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listApps(r,n){var i,l;const a=await t.listApps(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ApplicationApi.listApps"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async updateApp(r,n,a,o,s){var u,d;const i=await t.updateApp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class nh extends Me{addApp(t,r,n,a){return Xr(this.configuration).addApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearApps(t,r,n){return Xr(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return Xr(this.configuration).deleteApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getApp(t,r,n){return Xr(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return Xr(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,o){return Xr(this.configuration).updateApp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const HE=function(e){return{deleteCell:async(t,r,n={})=>{v("deleteCell","cell",t);const a="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deployCell:async(t,r,n={})=>{v("deployCell","cell",t);const a="/cells",o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(t,i,e),{url:B(o),options:i}},getCell:async(t,r={})=>{v("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},getCellStatus:async(t,r={})=>{v("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},listCells:async(t={})=>{const r="/cells",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(n),options:o}},updateCell:async(t,r,n,a={})=>{v("updateCell","cell",t),v("updateCell","cell2",r);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(r,l,e),{url:B(s),options:l}}}},Zr=function(e){const t=HE(e);return{async deleteCell(r,n,a){var l,c;const o=await t.deleteCell(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CellApi.deleteCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deployCell(r,n,a){var l,c;const o=await t.deployCell(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CellApi.deployCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getCell(r,n){var i,l;const a=await t.getCell(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["CellApi.getCell"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async getCellStatus(r,n){var i,l;const a=await t.getCellStatus(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["CellApi.getCellStatus"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async listCells(r){var s,i;const n=await t.listCells(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=k["CellApi.listCells"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,o||c)},async updateCell(r,n,a,o){var c,u;const s=await t.updateCell(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class qE extends Me{deleteCell(t,r,n){return Zr(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return Zr(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return Zr(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return Zr(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return Zr(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return Zr(this.configuration).updateCell(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const WE=function(e){return{addRobotController:async(t,r,n,a={})=>{v("addRobotController","cell",t),v("addRobotController","robotController",r);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(r,l,e),{url:B(s),options:l}},clearRobotControllers:async(t,r,n={})=>{v("clearRobotControllers","cell",t);const a="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteRobotController:async(t,r,n,a={})=>{v("deleteRobotController","cell",t),v("deleteRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{v("getCurrentRobotControllerState","cell",t),v("getCurrentRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getMode:async(t,r,n={})=>{v("getMode","cell",t),v("getMode","controller",r);const a="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getRobotController:async(t,r,n={})=>{v("getRobotController","cell",t),v("getRobotController","controller",r);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getSupportedModes:async(t,r,n={})=>{v("getSupportedModes","cell",t),v("getSupportedModes","controller",r);const a="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{v("getVirtualRobotConfiguration","cell",t),v("getVirtualRobotConfiguration","controller",r);const a="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listControllers:async(t,r={})=>{v("listControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},setDefaultMode:async(t,r,n,a={})=>{v("setDefaultMode","cell",t),v("setDefaultMode","controller",r),v("setDefaultMode","mode",n);const o="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.mode=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},streamFreeDrive:async(t,r,n,a={})=>{v("streamFreeDrive","cell",t),v("streamFreeDrive","controller",r);const o="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.response_rate=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},streamModeChange:async(t,r,n={})=>{v("streamModeChange","cell",t),v("streamModeChange","controller",r);const a="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},streamRobotControllerState:async(t,r,n,a={})=>{v("streamRobotControllerState","cell",t),v("streamRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.response_rate=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},updateRobotController:async(t,r,n,a,o={})=>{v("updateRobotController","cell",t),v("updateRobotController","controller",r),v("updateRobotController","robotController",n);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};U(c,e),await D(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=he(n,c,e),{url:B(i),options:c}}}},at=function(e){const t=WE(e);return{async addRobotController(r,n,a,o){var c,u;const s=await t.addRobotController(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async clearRobotControllers(r,n,a){var l,c;const o=await t.clearRobotControllers(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.clearRobotControllers"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteRobotController(r,n,a,o){var c,u;const s=await t.deleteRobotController(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getCurrentRobotControllerState(r,n,a){var l,c;const o=await t.getCurrentRobotControllerState(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getMode(r,n,a){var l,c;const o=await t.getMode(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getRobotController(r,n,a){var l,c;const o=await t.getRobotController(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getRobotController"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getSupportedModes(r,n,a){var l,c;const o=await t.getSupportedModes(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getSupportedModes"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getVirtualRobotConfiguration(r,n,a){var l,c;const o=await t.getVirtualRobotConfiguration(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listControllers(r,n){var i,l;const a=await t.listControllers(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ControllerApi.listControllers"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async setDefaultMode(r,n,a,o){var c,u;const s=await t.setDefaultMode(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamFreeDrive(r,n,a,o){var c,u;const s=await t.streamFreeDrive(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamModeChange(r,n,a){var l,c;const o=await t.streamModeChange(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.streamModeChange"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async streamRobotControllerState(r,n,a,o){var c,u;const s=await t.streamRobotControllerState(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async updateRobotController(r,n,a,o,s){var u,d;const i=await t.updateRobotController(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class JE extends Me{addRobotController(t,r,n,a){return at(this.configuration).addRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearRobotControllers(t,r,n){return at(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return at(this.configuration).deleteRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return at(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return at(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return at(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return at(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return at(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return at(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return at(this.configuration).setDefaultMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return at(this.configuration).streamFreeDrive(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamModeChange(t,r,n){return at(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return at(this.configuration).streamRobotControllerState(t,r,n,a).then(o=>o(this.axios,this.basePath))}updateRobotController(t,r,n,a,o){return at(this.configuration).updateRobotController(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const YE=function(e){return{listIODescriptions:async(t,r,n,a={})=>{v("listIODescriptions","cell",t),v("listIODescriptions","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},listIOValues:async(t,r,n,a={})=>{v("listIOValues","cell",t),v("listIOValues","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},setOutputValues:async(t,r,n,a={})=>{v("setOutputValues","cell",t),v("setOutputValues","controller",r),v("setOutputValues","iOValue",n);const o="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},streamIOValues:async(t,r,n,a={})=>{v("streamIOValues","cell",t),v("streamIOValues","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},waitForIOEvent:async(t,r,n,a,o,s,i,l={})=>{v("waitForIOEvent","cell",t),v("waitForIOEvent","controller",r),v("waitForIOEvent","io",n),v("waitForIOEvent","comparisonType",a);const c="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),u=new URL(c,$);let d;e&&(d=e.baseOptions);const h={method:"GET",...d,...l},p={},f={};U(h,e),await D(p,e),n!==void 0&&(f.io=n),a!==void 0&&(f.comparison_type=a),o!==void 0&&(f.boolean_value=o),s!==void 0&&(f.integer_value=s),i!==void 0&&(f.floating_value=i),L(u,f);let m=d&&d.headers?d.headers:{};return h.headers={...p,...m,...l.headers},{url:B(u),options:h}}}},Jn=function(e){const t=YE(e);return{async listIODescriptions(r,n,a,o){var c,u;const s=await t.listIODescriptions(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listIOValues(r,n,a,o){var c,u;const s=await t.listIOValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async setOutputValues(r,n,a,o){var c,u;const s=await t.setOutputValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamIOValues(r,n,a,o){var c,u;const s=await t.streamIOValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async waitForIOEvent(r,n,a,o,s,i,l,c){var p,f;const u=await t.waitForIOEvent(r,n,a,o,s,i,l,c),d=(e==null?void 0:e.serverIndex)??0,h=(f=(p=k["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,b)=>N(u,_,M,e)(m,h||b)}}};class KE extends Me{listIODescriptions(t,r,n,a){return Jn(this.configuration).listIODescriptions(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOValues(t,r,n,a){return Jn(this.configuration).listIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}setOutputValues(t,r,n,a){return Jn(this.configuration).setOutputValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamIOValues(t,r,n,a){return Jn(this.configuration).streamIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}waitForIOEvent(t,r,n,a,o,s,i,l){return Jn(this.configuration).waitForIOEvent(t,r,n,a,o,s,i,l).then(c=>c(this.axios,this.basePath))}}const QE=function(e){return{addCoordinateSystem:async(t,r,n={})=>{v("addCoordinateSystem","cell",t),v("addCoordinateSystem","addRequest",r);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{v("deleteCoordinateSystem","cell",t),v("deleteCoordinateSystem","coordinateSystem",r);const a="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getCoordinateSystem:async(t,r,n,a={})=>{v("getCoordinateSystem","cell",t),v("getCoordinateSystem","coordinateSystem",r);const o="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},listCoordinateSystems:async(t,r,n={})=>{v("listCoordinateSystems","cell",t);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.rotation_type=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},transformInCoordinateSystem:async(t,r,n,a={})=>{v("transformInCoordinateSystem","cell",t),v("transformInCoordinateSystem","coordinateSystem",r),v("transformInCoordinateSystem","pose",n);const o="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},Yn=function(e){const t=QE(e);return{async addCoordinateSystem(r,n,a){var l,c;const o=await t.addCoordinateSystem(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteCoordinateSystem(r,n,a){var l,c;const o=await t.deleteCoordinateSystem(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getCoordinateSystem(r,n,a,o){var c,u;const s=await t.getCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listCoordinateSystems(r,n,a){var l,c;const o=await t.listCoordinateSystems(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async transformInCoordinateSystem(r,n,a,o){var c,u;const s=await t.transformInCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class XE extends Me{addCoordinateSystem(t,r,n){return Yn(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Yn(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Yn(this.configuration).getCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Yn(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Yn(this.configuration).transformInCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const ZE=function(e){return{clearDevices:async(t,r={})=>{v("clearDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},createDevice:async(t,r,n={})=>{v("createDevice","cell",t),v("createDevice","createDeviceRequestInner",r);const a="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},deleteDevice:async(t,r,n={})=>{v("deleteDevice","cell",t),v("deleteDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getDevice:async(t,r,n={})=>{v("getDevice","cell",t),v("getDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listDevices:async(t,r={})=>{v("listDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}}}},Kn=function(e){const t=ZE(e);return{async clearDevices(r,n){var i,l;const a=await t.clearDevices(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["DeviceConfigurationApi.clearDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async createDevice(r,n,a){var l,c;const o=await t.createDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.createDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteDevice(r,n,a){var l,c;const o=await t.deleteDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getDevice(r,n,a){var l,c;const o=await t.getDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.getDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listDevices(r,n){var i,l;const a=await t.listDevices(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["DeviceConfigurationApi.listDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)}}};class e2 extends Me{clearDevices(t,r){return Kn(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return Kn(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return Kn(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return Kn(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return Kn(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const t2=function(e){return{createProgram:async(t,r,n,a={})=>{v("createProgram","cell",t),v("createProgram","body",r);const o="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(r,l,e),{url:B(s),options:l}},deleteProgram:async(t,r,n={})=>{v("deleteProgram","cell",t),v("deleteProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteProgramList:async(t,r,n={})=>{v("deleteProgramList","cell",t),v("deleteProgramList","programIds",r);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r&&(c.program_ids=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getProgram:async(t,r,n={})=>{v("getProgram","cell",t),v("getProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},updateProgram:async(t,r,n,a={})=>{v("updateProgram","cell",t),v("updateProgram","program",r),v("updateProgram","body",n);const o="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},Qn=function(e){const t=t2(e);return{async createProgram(r,n,a,o){var c,u;const s=await t.createProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async deleteProgram(r,n,a){var l,c;const o=await t.deleteProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.deleteProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteProgramList(r,n,a){var l,c;const o=await t.deleteProgramList(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.deleteProgramList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getProgram(r,n,a){var l,c;const o=await t.getProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.getProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async updateProgram(r,n,a,o){var c,u;const s=await t.updateProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class r2 extends Me{createProgram(t,r,n,a){return Qn(this.configuration).createProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}deleteProgram(t,r,n){return Qn(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Qn(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Qn(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Qn(this.configuration).updateProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const n2=function(e){return{getProgramMetadata:async(t,r,n={})=>{v("getProgramMetadata","cell",t),v("getProgramMetadata","program",r);const a="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listProgramMetadata:async(t,r,n={})=>{v("listProgramMetadata","cell",t);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.show_hidden=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},updateProgramMetadata:async(t,r,n,a={})=>{v("updateProgramMetadata","cell",t),v("updateProgramMetadata","program",r),v("updateProgramMetadata","updateProgramMetadataRequest",n);const o="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},uploadProgramMetadataImage:async(t,r,n,a={})=>{v("uploadProgramMetadataImage","cell",t),v("uploadProgramMetadataImage","program",r),v("uploadProgramMetadataImage","file",n);const o="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);U(l,e),await D(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",L(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:B(s),options:l}}}},ao=function(e){const t=n2(e);return{async getProgramMetadata(r,n,a){var l,c;const o=await t.getProgramMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listProgramMetadata(r,n,a){var l,c;const o=await t.listProgramMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async updateProgramMetadata(r,n,a,o){var c,u;const s=await t.updateProgramMetadata(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async uploadProgramMetadataImage(r,n,a,o){var c,u;const s=await t.uploadProgramMetadataImage(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class a2 extends Me{getProgramMetadata(t,r,n){return ao(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return ao(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return ao(this.configuration).updateProgramMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return ao(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const o2=function(e){return{createRecipe:async(t,r,n,a,o={})=>{v("createRecipe","cell",t),v("createRecipe","programId",r),v("createRecipe","body",n);const s="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...o},u={},d={};U(c,e),await D(u,e),r!==void 0&&(d.program_id=r),a!==void 0&&(d.name=a),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=he(n,c,e),{url:B(i),options:c}},deleteRecipe:async(t,r,n={})=>{v("deleteRecipe","cell",t),v("deleteRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteRecipeList:async(t,r,n={})=>{v("deleteRecipeList","cell",t),v("deleteRecipeList","recipeIds",r);const a="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r&&(c.recipe_ids=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getRecipe:async(t,r,n={})=>{v("getRecipe","cell",t),v("getRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},updateRecipe:async(t,r,n,a={})=>{v("updateRecipe","cell",t),v("updateRecipe","recipe",r),v("updateRecipe","body",n);const o="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},Xn=function(e){const t=o2(e);return{async createRecipe(r,n,a,o,s){var u,d;const i=await t.createRecipe(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async deleteRecipe(r,n,a){var l,c;const o=await t.deleteRecipe(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteRecipeList(r,n,a){var l,c;const o=await t.deleteRecipeList(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getRecipe(r,n,a){var l,c;const o=await t.getRecipe(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.getRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async updateRecipe(r,n,a,o){var c,u;const s=await t.updateRecipe(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class s2 extends Me{createRecipe(t,r,n,a,o){return Xn(this.configuration).createRecipe(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteRecipe(t,r,n){return Xn(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Xn(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Xn(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Xn(this.configuration).updateRecipe(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const i2=function(e){return{getRecipeMetadata:async(t,r,n={})=>{v("getRecipeMetadata","cell",t),v("getRecipeMetadata","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listRecipeMetadata:async(t,r={})=>{v("listRecipeMetadata","cell",t);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},updateRecipeMetadata:async(t,r,n,a={})=>{v("updateRecipeMetadata","cell",t),v("updateRecipeMetadata","recipe",r),v("updateRecipeMetadata","updateRecipeMetadataRequest",n);const o="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},uploadRecipeMetadataImage:async(t,r,n,a={})=>{v("uploadRecipeMetadataImage","cell",t),v("uploadRecipeMetadataImage","recipe",r),v("uploadRecipeMetadataImage","file",n);const o="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);U(l,e),await D(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",L(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:B(s),options:l}}}},oo=function(e){const t=i2(e);return{async getRecipeMetadata(r,n,a){var l,c;const o=await t.getRecipeMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listRecipeMetadata(r,n){var i,l;const a=await t.listRecipeMetadata(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async updateRecipeMetadata(r,n,a,o){var c,u;const s=await t.updateRecipeMetadata(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async uploadRecipeMetadataImage(r,n,a,o){var c,u;const s=await t.uploadRecipeMetadataImage(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class l2 extends Me{getRecipeMetadata(t,r,n){return oo(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return oo(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return oo(this.configuration).updateRecipeMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return oo(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const c2=function(e){return{deleteAllMotions:async(t,r={})=>{v("deleteAllMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},deleteMotion:async(t,r,n={})=>{v("deleteMotion","cell",t),v("deleteMotion","motion",r);const a="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},executeTrajectory:async(t,r,n={})=>{v("executeTrajectory","cell",t),v("executeTrajectory","executeTrajectoryRequest",r);const a="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},getMotionTrajectory:async(t,r,n,a,o={})=>{v("getMotionTrajectory","cell",t),v("getMotionTrajectory","motion",r),v("getMotionTrajectory","sampleTime",n);const s="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};U(c,e),await D(u,e),n!==void 0&&(d.sample_time=n),a!==void 0&&(d.responses_coordinate_system=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:B(i),options:c}},getMotionTrajectorySample:async(t,r,n,a,o={})=>{v("getMotionTrajectorySample","cell",t),v("getMotionTrajectorySample","motion",r);const s="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};U(c,e),await D(u,e),n!==void 0&&(d.location_on_trajectory=n),a!==void 0&&(d.response_coordinate_system=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:B(i),options:c}},getPlannedMotion:async(t,r,n,a={})=>{v("getPlannedMotion","cell",t),v("getPlannedMotion","motion",r);const o="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.sample_time=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{v("getPlanningMotionGroupModels","cell",t);const n="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},listMotions:async(t,r={})=>{v("listMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},loadPlannedMotion:async(t,r,n={})=>{v("loadPlannedMotion","cell",t),v("loadPlannedMotion","plannedMotion",r);const a="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},planCollisionFreePTP:async(t,r,n={})=>{v("planCollisionFreePTP","cell",t);const a="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},planMotion:async(t,r,n={})=>{v("planMotion","cell",t),v("planMotion","planRequest",r);const a="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},planTrajectory:async(t,r,n={})=>{v("planTrajectory","cell",t);const a="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},stopExecution:async(t,r,n={})=>{v("stopExecution","cell",t),v("stopExecution","motion",r);const a="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},streamMove:async(t,r,n={})=>{v("streamMove","cell",t),v("streamMove","streamMoveRequest",r);const a="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},streamMoveBackward:async(t,r,n,a,o,s,i={})=>{v("streamMoveBackward","cell",t),v("streamMoveBackward","motion",r),v("streamMoveBackward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executebackward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};U(d,e),await D(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),o!==void 0&&(p.response_coordinate_system=o),s!==void 0&&(p.start_location_on_trajectory=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:B(c),options:d}},streamMoveForward:async(t,r,n,a,o,s,i={})=>{v("streamMoveForward","cell",t),v("streamMoveForward","motion",r),v("streamMoveForward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executeforward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};U(d,e),await D(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),o!==void 0&&(p.response_coordinate_system=o),s!==void 0&&(p.start_location_on_trajectory=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:B(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,a,o,s,i,l,c,u,d={})=>{v("streamMoveToTrajectoryViaJointPTP","cell",t),v("streamMoveToTrajectoryViaJointPTP","motion",r),v("streamMoveToTrajectoryViaJointPTP","locationOnTrajectory",n);const h="/cells/{cell}/motions/{motion}/executetotrajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),p=new URL(h,$);let f;e&&(f=e.baseOptions);const m={method:"GET",...f,...d},b={},S={};U(m,e),await D(b,e),n!==void 0&&(S.location_on_trajectory=n),a&&(S["limit_override.joint_velocity_limits.joints"]=a),o&&(S["limit_override.joint_acceleration_limits.joints"]=o),s!==void 0&&(S["limit_override.tcp_velocity_limit"]=s),i!==void 0&&(S["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(S["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(S["limit_override.tcp_orientation_acceleration_limit"]=c),u!==void 0&&(S.responses_coordinate_system=u),L(p,S);let E=f&&f.headers?f.headers:{};return m.headers={...b,...E,...d.headers},{url:B(p),options:m}}}},Qe=function(e){const t=c2(e);return{async deleteAllMotions(r,n){var i,l;const a=await t.deleteAllMotions(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionApi.deleteAllMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async deleteMotion(r,n,a){var l,c;const o=await t.deleteMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.deleteMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async executeTrajectory(r,n,a){var l,c;const o=await t.executeTrajectory(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.executeTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getMotionTrajectory(r,n,a,o,s){var u,d;const i=await t.getMotionTrajectory(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getMotionTrajectorySample(r,n,a,o,s){var u,d;const i=await t.getMotionTrajectorySample(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getPlannedMotion(r,n,a,o){var c,u;const s=await t.getPlannedMotion(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getPlanningMotionGroupModels(r,n){var i,l;const a=await t.getPlanningMotionGroupModels(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async listMotions(r,n){var i,l;const a=await t.listMotions(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionApi.listMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async loadPlannedMotion(r,n,a){var l,c;const o=await t.loadPlannedMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.loadPlannedMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async planCollisionFreePTP(r,n,a){var l,c;const o=await t.planCollisionFreePTP(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planCollisionFreePTP"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async planMotion(r,n,a){var l,c;const o=await t.planMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async planTrajectory(r,n,a){var l,c;const o=await t.planTrajectory(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async stopExecution(r,n,a){var l,c;const o=await t.stopExecution(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.stopExecution"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async streamMove(r,n,a){var l,c;const o=await t.streamMove(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.streamMove"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async streamMoveBackward(r,n,a,o,s,i,l){var h,p;const c=await t.streamMoveBackward(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>N(c,_,M,e)(f,d||m)},async streamMoveForward(r,n,a,o,s,i,l){var h,p;const c=await t.streamMoveForward(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>N(c,_,M,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h){var b,S;const p=await t.streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h),f=(e==null?void 0:e.serverIndex)??0,m=(S=(b=k["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:b[f])==null?void 0:S.url;return(E,O)=>N(p,_,M,e)(E,m||O)}}};class u2 extends Me{deleteAllMotions(t,r){return Qe(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Qe(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return Qe(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,o){return Qe(this.configuration).getMotionTrajectory(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,o){return Qe(this.configuration).getMotionTrajectorySample(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return Qe(this.configuration).getPlannedMotion(t,r,n,a).then(o=>o(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Qe(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Qe(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Qe(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Qe(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return Qe(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return Qe(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return Qe(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return Qe(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,o,s,i){return Qe(this.configuration).streamMoveBackward(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,n,a,o,s,i){return Qe(this.configuration).streamMoveForward(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d){return Qe(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const d2=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{v("activateAllMotionGroups","cell",t),v("activateAllMotionGroups","controller",r);const a="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.controller=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},activateMotionGroup:async(t,r,n={})=>{v("activateMotionGroup","cell",t),v("activateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.motion_group=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deactivateMotionGroup:async(t,r,n={})=>{v("deactivateMotionGroup","cell",t),v("deactivateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listMotionGroups:async(t,r={})=>{v("listMotionGroups","cell",t);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}}}},so=function(e){const t=d2(e);return{async activateAllMotionGroups(r,n,a){var l,c;const o=await t.activateAllMotionGroups(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async activateMotionGroup(r,n,a){var l,c;const o=await t.activateMotionGroup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.activateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deactivateMotionGroup(r,n,a){var l,c;const o=await t.deactivateMotionGroup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listMotionGroups(r,n){var i,l;const a=await t.listMotionGroups(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionGroupApi.listMotionGroups"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)}}};class h2 extends Me{activateAllMotionGroups(t,r,n){return so(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return so(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return so(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return so(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const p2=function(e){return{getActivePayload:async(t,r,n={})=>{v("getActivePayload","cell",t),v("getActivePayload","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getActiveTcp:async(t,r,n,a={})=>{v("getActiveTcp","cell",t),v("getActiveTcp","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},getCurrentMotionGroupState:async(t,r,n,a,o={})=>{v("getCurrentMotionGroupState","cell",t),v("getCurrentMotionGroupState","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};U(c,e),await D(u,e),n!==void 0&&(d.tcp=n),a!==void 0&&(d.response_coordinate_system=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:B(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{v("getInfoCapabilities","cell",t),v("getInfoCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{v("getMotionGroupSpecification","cell",t),v("getMotionGroupSpecification","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getMounting:async(t,r,n={})=>{v("getMounting","cell",t),v("getMounting","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getOptimizerConfiguration:async(t,r,n,a={})=>{v("getOptimizerConfiguration","cell",t),v("getOptimizerConfiguration","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.tcp=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},getSafetySetup:async(t,r,n={})=>{v("getSafetySetup","cell",t),v("getSafetySetup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listPayloads:async(t,r,n={})=>{v("listPayloads","cell",t),v("listPayloads","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listTcps:async(t,r,n,a={})=>{v("listTcps","cell",t),v("listTcps","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},streamMotionGroupState:async(t,r,n,a,o,s={})=>{v("streamMotionGroupState","cell",t),v("streamMotionGroupState","motionGroup",r);const i="/cells/{cell}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),l=new URL(i,$);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},d={},h={};U(u,e),await D(d,e),n!==void 0&&(h.response_rate=n),a!==void 0&&(h.response_coordinate_system=a),o!==void 0&&(h.tcp=o),L(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...s.headers},{url:B(l),options:u}}}},St=function(e){const t=p2(e);return{async getActivePayload(r,n,a){var l,c;const o=await t.getActivePayload(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getActiveTcp(r,n,a,o){var c,u;const s=await t.getActiveTcp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getCurrentMotionGroupState(r,n,a,o,s){var u,d;const i=await t.getCurrentMotionGroupState(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getInfoCapabilities(r,n,a){var l,c;const o=await t.getInfoCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getMotionGroupSpecification(r,n,a){var l,c;const o=await t.getMotionGroupSpecification(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getMounting(r,n,a){var l,c;const o=await t.getMounting(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getMounting"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getOptimizerConfiguration(r,n,a,o){var c,u;const s=await t.getOptimizerConfiguration(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getSafetySetup(r,n,a){var l,c;const o=await t.getSafetySetup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listPayloads(r,n,a){var l,c;const o=await t.listPayloads(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.listPayloads"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listTcps(r,n,a,o){var c,u;const s=await t.listTcps(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamMotionGroupState(r,n,a,o,s,i){var d,h;const l=await t.streamMotionGroupState(r,n,a,o,s,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=k["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>N(l,_,M,e)(p,u||f)}}};class m2 extends Me{getActivePayload(t,r,n){return St(this.configuration).getActivePayload(t,r,n).then(a=>a(this.axios,this.basePath))}getActiveTcp(t,r,n,a){return St(this.configuration).getActiveTcp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,a,o){return St(this.configuration).getCurrentMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return St(this.configuration).getInfoCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return St(this.configuration).getMotionGroupSpecification(t,r,n).then(a=>a(this.axios,this.basePath))}getMounting(t,r,n){return St(this.configuration).getMounting(t,r,n).then(a=>a(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,a){return St(this.configuration).getOptimizerConfiguration(t,r,n,a).then(o=>o(this.axios,this.basePath))}getSafetySetup(t,r,n){return St(this.configuration).getSafetySetup(t,r,n).then(a=>a(this.axios,this.basePath))}listPayloads(t,r,n){return St(this.configuration).listPayloads(t,r,n).then(a=>a(this.axios,this.basePath))}listTcps(t,r,n,a){return St(this.configuration).listTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(t,r,n,a,o,s){return St(this.configuration).streamMotionGroupState(t,r,n,a,o,s).then(i=>i(this.axios,this.basePath))}}const f2=function(e){return{directionJogging:async(t,r,n={})=>{v("directionJogging","cell",t),v("directionJogging","directionJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},getJoggingCapabilities:async(t,r,n={})=>{v("getJoggingCapabilities","cell",t),v("getJoggingCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},jointJogging:async(t,r,n={})=>{v("jointJogging","cell",t),v("jointJogging","jointJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},stopJogging:async(t,r,n={})=>{v("stopJogging","cell",t),v("stopJogging","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}}}},io=function(e){const t=f2(e);return{async directionJogging(r,n,a){var l,c;const o=await t.directionJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getJoggingCapabilities(r,n,a){var l,c;const o=await t.getJoggingCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async jointJogging(r,n,a){var l,c;const o=await t.jointJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async stopJogging(r,n,a){var l,c;const o=await t.stopJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)}}};class g2 extends Me{directionJogging(t,r,n){return io(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return io(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return io(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return io(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const y2=function(e){return{calculateAllInverseKinematic:async(t,r,n,a={})=>{v("calculateAllInverseKinematic","cell",t),v("calculateAllInverseKinematic","motionGroup",r),v("calculateAllInverseKinematic","allJointPositionsRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},calculateForwardKinematic:async(t,r,n,a={})=>{v("calculateForwardKinematic","cell",t),v("calculateForwardKinematic","motionGroup",r),v("calculateForwardKinematic","tcpPoseRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},calculateInverseKinematic:async(t,r,n,a={})=>{v("calculateInverseKinematic","cell",t),v("calculateInverseKinematic","motionGroup",r),v("calculateInverseKinematic","jointPositionRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},getKinematicCapabilities:async(t,r,n={})=>{v("getKinematicCapabilities","cell",t),v("getKinematicCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}}}},lo=function(e){const t=y2(e);return{async calculateAllInverseKinematic(r,n,a,o){var c,u;const s=await t.calculateAllInverseKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async calculateForwardKinematic(r,n,a,o){var c,u;const s=await t.calculateForwardKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async calculateInverseKinematic(r,n,a,o){var c,u;const s=await t.calculateInverseKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getKinematicCapabilities(r,n,a){var l,c;const o=await t.getKinematicCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)}}};class b2 extends Me{calculateAllInverseKinematic(t,r,n,a){return lo(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return lo(this.configuration).calculateForwardKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return lo(this.configuration).calculateInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return lo(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const x2=function(e){return{createProgramRunner:async(t,r,n={})=>{v("createProgramRunner","cell",t),v("createProgramRunner","request",r);const a="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="text/plain",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},executeProgram:async(t,r,n={})=>{v("executeProgram","cell",t),v("executeProgram","codeWithArguments",r);const a="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},getProgramRunner:async(t,r,n={})=>{v("getProgramRunner","cell",t),v("getProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listProgramRunners:async(t,r={})=>{v("listProgramRunners","cell",t);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},migrateProgram:async(t,r,n={})=>{v("migrateProgram","cell",t),v("migrateProgram","request1",r);const a="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="text/plain",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},planProgram:async(t,r,n,a={})=>{v("planProgram","cell",t),v("planProgram","request",r);const o="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(r,l,e),{url:B(s),options:l}},stopAllProgramRunner:async(t,r={})=>{v("stopAllProgramRunner","cell",t);const n="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"POST",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},stopProgramRunner:async(t,r,n={})=>{v("stopProgramRunner","cell",t),v("stopProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}}}},nr=function(e){const t=x2(e);return{async createProgramRunner(r,n,a){var l,c;const o=await t.createProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.createProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async executeProgram(r,n,a){var l,c;const o=await t.executeProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.executeProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getProgramRunner(r,n,a){var l,c;const o=await t.getProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.getProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listProgramRunners(r,n){var i,l;const a=await t.listProgramRunners(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramApi.listProgramRunners"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async migrateProgram(r,n,a){var l,c;const o=await t.migrateProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.migrateProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async planProgram(r,n,a,o){var c,u;const s=await t.planProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async stopAllProgramRunner(r,n){var i,l;const a=await t.stopAllProgramRunner(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramApi.stopAllProgramRunner"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async stopProgramRunner(r,n,a){var l,c;const o=await t.stopProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.stopProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)}}};class v2 extends Me{createProgramRunner(t,r,n){return nr(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return nr(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return nr(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return nr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return nr(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return nr(this.configuration).planProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}stopAllProgramRunner(t,r){return nr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return nr(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const S2=function(e){return{clearProgramsValues:async(t,r={})=>{v("clearProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},createProgramsValue:async(t,r,n={})=>{v("createProgramsValue","cell",t),v("createProgramsValue","requestBody",r);const a="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(o),options:i}},deleteProgramValue:async(t,r,n={})=>{v("deleteProgramValue","cell",t),v("deleteProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getProgramValue:async(t,r,n={})=>{v("getProgramValue","cell",t),v("getProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listProgramsValues:async(t,r={})=>{v("listProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},updateProgramValue:async(t,r,n,a={})=>{v("updateProgramValue","cell",t),v("updateProgramValue","key",r),v("updateProgramValue","value",n);const o="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},en=function(e){const t=S2(e);return{async clearProgramsValues(r,n){var i,l;const a=await t.clearProgramsValues(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async createProgramsValue(r,n,a){var l,c;const o=await t.createProgramsValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.createProgramsValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteProgramValue(r,n,a){var l,c;const o=await t.deleteProgramValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getProgramValue(r,n,a){var l,c;const o=await t.getProgramValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.getProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listProgramsValues(r,n){var i,l;const a=await t.listProgramsValues(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramValuesApi.listProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async updateProgramValue(r,n,a,o){var c,u;const s=await t.updateProgramValue(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class O2 extends Me{clearProgramsValues(t,r){return en(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return en(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return en(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return en(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return en(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return en(this.configuration).updateProgramValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const w2=function(e){return{deleteStoredCollider:async(t,r,n={})=>{v("deleteStoredCollider","cell",t),v("deleteStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{v("deleteStoredCollisionLinkChain","cell",t),v("deleteStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{v("deleteStoredCollisionTool","cell",t),v("deleteStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getDefaultLinkChain:async(t,r,n={})=>{v("getDefaultLinkChain","cell",t),v("getDefaultLinkChain","motionGroupModel",r);const a="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollider:async(t,r,n={})=>{v("getStoredCollider","cell",t),v("getStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{v("getStoredCollisionLinkChain","cell",t),v("getStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollisionTool:async(t,r,n={})=>{v("getStoredCollisionTool","cell",t),v("getStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listCollisionLinkChains:async(t,r={})=>{v("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},listStoredColliders:async(t,r={})=>{v("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},listStoredCollisionTools:async(t,r={})=>{v("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},storeCollider:async(t,r,n,a={})=>{v("storeCollider","cell",t),v("storeCollider","collider",r),v("storeCollider","collider2",n);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},storeCollisionLinkChain:async(t,r,n,a={})=>{v("storeCollisionLinkChain","cell",t),v("storeCollisionLinkChain","linkChain",r),v("storeCollisionLinkChain","collider",n);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,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},storeCollisionTool:async(t,r,n,a={})=>{v("storeCollisionTool","cell",t),v("storeCollisionTool","tool",r),v("storeCollisionTool","requestBody",n);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},ut=function(e){const t=w2(e);return{async deleteStoredCollider(r,n,a){var l,c;const o=await t.deleteStoredCollider(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,a){var l,c;const o=await t.deleteStoredCollisionLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async deleteStoredCollisionTool(r,n,a){var l,c;const o=await t.deleteStoredCollisionTool(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getDefaultLinkChain(r,n,a){var l,c;const o=await t.getDefaultLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getStoredCollider(r,n,a){var l,c;const o=await t.getStoredCollider(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,a){var l,c;const o=await t.getStoredCollisionLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getStoredCollisionTool(r,n,a){var l,c;const o=await t.getStoredCollisionTool(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const a=await t.listCollisionLinkChains(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async listStoredColliders(r,n){var i,l;const a=await t.listStoredColliders(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async listStoredCollisionTools(r,n){var i,l;const a=await t.listStoredCollisionTools(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async storeCollider(r,n,a,o){var c,u;const s=await t.storeCollider(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async storeCollisionLinkChain(r,n,a,o){var c,u;const s=await t.storeCollisionLinkChain(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async storeCollisionTool(r,n,a,o){var c,u;const s=await t.storeCollisionTool(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class C2 extends Me{deleteStoredCollider(t,r,n){return ut(this.configuration).deleteStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,n){return ut(this.configuration).deleteStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,n){return ut(this.configuration).deleteStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}getDefaultLinkChain(t,r,n){return ut(this.configuration).getDefaultLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollider(t,r,n){return ut(this.configuration).getStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,n){return ut(this.configuration).getStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionTool(t,r,n){return ut(this.configuration).getStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}listCollisionLinkChains(t,r){return ut(this.configuration).listCollisionLinkChains(t,r).then(n=>n(this.axios,this.basePath))}listStoredColliders(t,r){return ut(this.configuration).listStoredColliders(t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionTools(t,r){return ut(this.configuration).listStoredCollisionTools(t,r).then(n=>n(this.axios,this.basePath))}storeCollider(t,r,n,a){return ut(this.configuration).storeCollider(t,r,n,a).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(t,r,n,a){return ut(this.configuration).storeCollisionLinkChain(t,r,n,a).then(o=>o(this.axios,this.basePath))}storeCollisionTool(t,r,n,a){return ut(this.configuration).storeCollisionTool(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const P2=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{v("deleteStoredCollisionScene","cell",t),v("deleteStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollisionScene:async(t,r,n={})=>{v("getStoredCollisionScene","cell",t),v("getStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listStoredCollisionScenes:async(t,r={})=>{v("listStoredCollisionScenes","cell",t);const n="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},storeCollisionScene:async(t,r,n,a={})=>{v("storeCollisionScene","cell",t),v("storeCollisionScene","scene",r),v("storeCollisionScene","collisionSceneAssembly",n);const o="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},co=function(e){const t=P2(e);return{async deleteStoredCollisionScene(r,n,a){var l,c;const o=await t.deleteStoredCollisionScene(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getStoredCollisionScene(r,n,a){var l,c;const o=await t.getStoredCollisionScene(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listStoredCollisionScenes(r,n){var i,l;const a=await t.listStoredCollisionScenes(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async storeCollisionScene(r,n,a,o){var c,u;const s=await t.storeCollisionScene(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class T2 extends Me{deleteStoredCollisionScene(t,r,n){return co(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return co(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return co(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return co(this.configuration).storeCollisionScene(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const R2=function(e){return{clearAllObjects:async(t,r={})=>{v("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},deleteObject:async(t,r,n={})=>{v("deleteObject","cell",t),v("deleteObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getObject:async(t,r,n={})=>{v("getObject","cell",t),v("getObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getObjectMetadata:async(t,r,n={})=>{v("getObjectMetadata","cell",t),v("getObjectMetadata","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"HEAD",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listAllObjectKeys:async(t,r={})=>{v("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},storeObject:async(t,r,n,a,o={})=>{v("storeObject","cell",t),v("storeObject","key",r);const s="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={},h=new(e&&e.formDataCtor||FormData);U(c,e),await D(u,e),a!==void 0&&h.append("AnyValue",new Blob([JSON.stringify(a)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),L(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=h,{url:B(i),options:c}}}},tn=function(e){const t=R2(e);return{async clearAllObjects(r,n){var i,l;const a=await t.clearAllObjects(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreObjectApi.clearAllObjects"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async deleteObject(r,n,a){var l,c;const o=await t.deleteObject(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.deleteObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getObject(r,n,a){var l,c;const o=await t.getObject(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.getObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getObjectMetadata(r,n,a){var l,c;const o=await t.getObjectMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.getObjectMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const a=await t.listAllObjectKeys(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async storeObject(r,n,a,o,s){var u,d;const i=await t.storeObject(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class A2 extends Me{clearAllObjects(t,r){return tn(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return tn(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return tn(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return tn(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return tn(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,o){return tn(this.configuration).storeObject(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const _2=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{v("checkNovaVersionUpdate","channel",t);const n="/system/update",a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};U(s,e),await D(i,e),t!==void 0&&(l.channel=t),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(n),options:o}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(n),options:o}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(n),options:o}},updateNovaVersion:async(t,r={})=>{v("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},i={},l={};U(s,e),await D(i,e),i["Content-Type"]="application/json",L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},s.data=he(t,s,e),{url:B(a),options:s}}}},Zn=function(e){const t=_2(e);return{async checkNovaVersionUpdate(r,n){var i,l;const a=await t.checkNovaVersionUpdate(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)},async getDiagnosePackage(r){var s,i;const n=await t.getDiagnosePackage(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=k["SystemApi.getDiagnosePackage"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,o||c)},async getSystemStatus(r){var s,i;const n=await t.getSystemStatus(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=k["SystemApi.getSystemStatus"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,o||c)},async getSystemVersion(r){var s,i;const n=await t.getSystemVersion(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=k["SystemApi.getSystemVersion"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,o||c)},async updateNovaVersion(r,n){var i,l;const a=await t.updateNovaVersion(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["SystemApi.updateNovaVersion"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>N(a,_,M,e)(c,s||u)}}};class E2 extends Me{checkNovaVersionUpdate(t,r){return Zn(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Zn(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Zn(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Zn(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Zn(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const I2=function(e){return{getMotionGroupState:async(t,r,n,a={})=>{v("getMotionGroupState","cell",t),v("getMotionGroupState","controller",r),v("getMotionGroupState","id",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},getMotionGroups:async(t,r,n={})=>{v("getMotionGroups","cell",t),v("getMotionGroups","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getVirtualRobotIOValue:async(t,r,n,a={})=>{v("getVirtualRobotIOValue","cell",t),v("getVirtualRobotIOValue","controller",r),v("getVirtualRobotIOValue","io",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},listIOs:async(t,r,n={})=>{v("listIOs","cell",t),v("listIOs","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},setMotionGroupState:async(t,r,n,a,o={})=>{v("setMotionGroupState","cell",t),v("setMotionGroupState","controller",r),v("setMotionGroupState","id",n),v("setMotionGroupState","motionGroupJoints",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};U(c,e),await D(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=he(a,c,e),{url:B(i),options:c}},setVirtualRobotIOValue:async(t,r,n,a,o,s,i={})=>{v("setVirtualRobotIOValue","cell",t),v("setVirtualRobotIOValue","controller",r),v("setVirtualRobotIOValue","io",n);const l="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"PUT",...u,...i},h={},p={};U(d,e),await D(h,e),a!==void 0&&(p.bool=a),o!==void 0&&(p.integer=o),s!==void 0&&(p.double=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:B(c),options:d}}}},rn=function(e){const t=I2(e);return{async getMotionGroupState(r,n,a,o){var c,u;const s=await t.getMotionGroupState(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getMotionGroups(r,n,a){var l,c;const o=await t.getMotionGroups(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotApi.getMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getVirtualRobotIOValue(r,n,a,o){var c,u;const s=await t.getVirtualRobotIOValue(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listIOs(r,n,a){var l,c;const o=await t.listIOs(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotApi.listIOs"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async setMotionGroupState(r,n,a,o,s){var u,d;const i=await t.setMotionGroupState(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async setVirtualRobotIOValue(r,n,a,o,s,i,l){var h,p;const c=await t.setVirtualRobotIOValue(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>N(c,_,M,e)(f,d||m)}}};class V2 extends Me{getMotionGroupState(t,r,n,a){return rn(this.configuration).getMotionGroupState(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroups(t,r,n){return rn(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return rn(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOs(t,r,n){return rn(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,o){return rn(this.configuration).setMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,o,s,i){return rn(this.configuration).setVirtualRobotIOValue(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}}const M2=function(e){return{externalJointsStream:async(t,r,n,a={})=>{v("externalJointsStream","cell",t),v("externalJointsStream","controller",r),v("externalJointsStream","externalJointStreamDatapoint",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},getMotionGroupBehavior:async(t,r,n,a={})=>{v("getMotionGroupBehavior","cell",t),v("getMotionGroupBehavior","controller",r),v("getMotionGroupBehavior","id",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},setMotionGroupBehavior:async(t,r,n,a,o={})=>{v("setMotionGroupBehavior","cell",t),v("setMotionGroupBehavior","controller",r),v("setMotionGroupBehavior","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};U(c,e),await D(u,e),a!==void 0&&(d.behavior=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:B(i),options:c}}}},ji=function(e){const t=M2(e);return{async externalJointsStream(r,n,a,o){var c,u;const s=await t.externalJointsStream(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getMotionGroupBehavior(r,n,a,o){var c,u;const s=await t.getMotionGroupBehavior(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async setMotionGroupBehavior(r,n,a,o,s){var u,d;const i=await t.setMotionGroupBehavior(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class j2 extends Me{externalJointsStream(t,r,n,a){return ji(this.configuration).externalJointsStream(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return ji(this.configuration).getMotionGroupBehavior(t,r,n,a).then(o=>o(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,o){return ji(this.configuration).setMotionGroupBehavior(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const k2=function(e){return{getCycleTime:async(t,r,n={})=>{v("getCycleTime","cell",t),v("getCycleTime","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getEStop:async(t,r,n={})=>{v("getEStop","cell",t),v("getEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getOperationMode:async(t,r,n={})=>{v("getOperationMode","cell",t),v("getOperationMode","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},pushEStop:async(t,r,n={})=>{v("pushEStop","cell",t),v("pushEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},releaseEStop:async(t,r,n={})=>{v("releaseEStop","cell",t),v("releaseEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},setOperationMode:async(t,r,n,a={})=>{v("setOperationMode","cell",t),v("setOperationMode","controller",r),v("setOperationMode","mode",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.mode=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}}}},nn=function(e){const t=k2(e);return{async getCycleTime(r,n,a){var l,c;const o=await t.getCycleTime(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getEStop(r,n,a){var l,c;const o=await t.getEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async getOperationMode(r,n,a){var l,c;const o=await t.getOperationMode(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async pushEStop(r,n,a){var l,c;const o=await t.pushEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.pushEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async releaseEStop(r,n,a){var l,c;const o=await t.releaseEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async setOperationMode(r,n,a,o){var c,u;const s=await t.setOperationMode(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class $2 extends Me{getCycleTime(t,r,n){return nn(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return nn(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return nn(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return nn(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return nn(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return nn(this.configuration).setOperationMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const U2=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,a={})=>{v("addVirtualRobotCoordinateSystem","cell",t),v("addVirtualRobotCoordinateSystem","controller",r),v("addVirtualRobotCoordinateSystem","coordinateSystem",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=he(n,l,e),{url:B(s),options:l}},addVirtualRobotTcp:async(t,r,n,a,o={})=>{v("addVirtualRobotTcp","cell",t),v("addVirtualRobotTcp","controller",r),v("addVirtualRobotTcp","id",n),v("addVirtualRobotTcp","robotTcp",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};U(c,e),await D(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=he(a,c,e),{url:B(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,a,o={})=>{v("deleteVirtualRobotCoordinateSystem","cell",t),v("deleteVirtualRobotCoordinateSystem","controller",r),v("deleteVirtualRobotCoordinateSystem","coordinateSystem",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};U(c,e),await D(u,e),a!==void 0&&(d.delete_dependent=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:B(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,a,o={})=>{v("deleteVirtualRobotTcp","cell",t),v("deleteVirtualRobotTcp","controller",r),v("deleteVirtualRobotTcp","id",n),v("deleteVirtualRobotTcp","tcp",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(a))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};U(c,e),await D(u,e),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:B(i),options:c}},getVirtualRobotMounting:async(t,r,n,a={})=>{v("getVirtualRobotMounting","cell",t),v("getVirtualRobotMounting","controller",r),v("getVirtualRobotMounting","id",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{v("listVirtualRobotCoordinateSystems","cell",t),v("listVirtualRobotCoordinateSystems","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listVirtualRobotTcps:async(t,r,n,a={})=>{v("listVirtualRobotTcps","cell",t),v("listVirtualRobotTcps","controller",r),v("listVirtualRobotTcps","id",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},setVirtualRobotMounting:async(t,r,n,a,o={})=>{v("setVirtualRobotMounting","cell",t),v("setVirtualRobotMounting","controller",r),v("setVirtualRobotMounting","id",n),v("setVirtualRobotMounting","coordinateSystem",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};U(c,e),await D(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=he(a,c,e),{url:B(i),options:c}}}},ar=function(e){const t=U2(e);return{async addVirtualRobotCoordinateSystem(r,n,a,o){var c,u;const s=await t.addVirtualRobotCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async addVirtualRobotTcp(r,n,a,o,s){var u,d;const i=await t.addVirtualRobotTcp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async deleteVirtualRobotCoordinateSystem(r,n,a,o,s){var u,d;const i=await t.deleteVirtualRobotCoordinateSystem(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async deleteVirtualRobotTcp(r,n,a,o,s){var u,d;const i=await t.deleteVirtualRobotTcp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getVirtualRobotMounting(r,n,a,o){var c,u;const s=await t.getVirtualRobotMounting(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listVirtualRobotCoordinateSystems(r,n,a){var l,c;const o=await t.listVirtualRobotCoordinateSystems(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(o,_,M,e)(u,i||d)},async listVirtualRobotTcps(r,n,a,o){var c,u;const s=await t.listVirtualRobotTcps(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async setVirtualRobotMounting(r,n,a,o,s){var u,d;const i=await t.setVirtualRobotMounting(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class D2 extends Me{addVirtualRobotCoordinateSystem(t,r,n,a){return ar(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,o){return ar(this.configuration).addVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,o){return ar(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,o){return ar(this.configuration).deleteVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return ar(this.configuration).getVirtualRobotMounting(t,r,n,a).then(o=>o(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return ar(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return ar(this.configuration).listVirtualRobotTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,o){return ar(this.configuration).setVirtualRobotMounting(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}function Nt(e,t,r){return Math.max(t,Math.min(r,e))}class L2{constructor(t=0,r=0,n=0,a=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=a}static slerpFlat(t,r,n,a,o,s,i){let l=n[a+0],c=n[a+1],u=n[a+2],d=n[a+3];const h=o[s+0],p=o[s+1],f=o[s+2],m=o[s+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 b=1-i;const S=l*h+c*p+u*f+d*m,E=S>=0?1:-1,O=1-S*S;if(O>Number.EPSILON){const A=Math.sqrt(O),C=Math.atan2(A,S*E);b=Math.sin(b*C)/A,i=Math.sin(i*C)/A}const w=i*E;if(l=l*b+h*w,c=c*b+p*w,u=u*b+f*w,d=d*b+m*w,b===1-i){const A=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=A,c*=A,u*=A,d*=A}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,a,o,s){const i=n[a],l=n[a+1],c=n[a+2],u=n[a+3],d=o[s],h=o[s+1],p=o[s+2],f=o[s+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,a){return this._x=t,this._y=r,this._z=n,this._w=a,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,a=t._y,o=t._z,s=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(a/2),d=i(o/2),h=l(n/2),p=l(a/2),f=l(o/2);switch(s){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: "+s)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,a=Math.sin(n);return this._x=t.x*a,this._y=t.y*a,this._z=t.z*a,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],a=r[4],o=r[8],s=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=(o-c)*p,this._z=(s-a)*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=(a+s)/p,this._z=(o+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(o-c)/p,this._x=(a+s)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(s-a)/p,this._x=(o+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(Nt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const a=Math.min(1,r/n);return this.slerp(t,a),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,a=t._y,o=t._z,s=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+s*i+a*c-o*l,this._y=a*u+s*l+o*i-n*c,this._z=o*u+s*c+n*l-a*i,this._w=s*u-n*i-a*l-o*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,a=this._y,o=this._z,s=this._w;let i=s*t._w+n*t._x+a*t._y+o*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=s,this._x=n,this._y=a,this._z=o,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*s+r*this._w,this._x=p*n+r*this._x,this._y=p*a+r*this._y,this._z=p*o+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=s*d+this._w*h,this._x=n*d+this._x*h,this._y=a*d+this._y*h,this._z=o*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(),a=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(a*Math.sin(t),a*Math.cos(t),o*Math.sin(r),o*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 pn{constructor(t=0,r=0,n=0){pn.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(ah.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(ah.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,a=this.z,o=t.elements;return this.x=o[0]*r+o[3]*n+o[6]*a,this.y=o[1]*r+o[4]*n+o[7]*a,this.z=o[2]*r+o[5]*n+o[8]*a,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,a=this.z,o=t.elements,s=1/(o[3]*r+o[7]*n+o[11]*a+o[15]);return this.x=(o[0]*r+o[4]*n+o[8]*a+o[12])*s,this.y=(o[1]*r+o[5]*n+o[9]*a+o[13])*s,this.z=(o[2]*r+o[6]*n+o[10]*a+o[14])*s,this}applyQuaternion(t){const r=this.x,n=this.y,a=this.z,o=t.x,s=t.y,i=t.z,l=t.w,c=2*(s*a-i*n),u=2*(i*r-o*a),d=2*(o*n-s*r);return this.x=r+l*c+s*d-i*u,this.y=n+l*u+i*c-o*d,this.z=a+l*d+o*u-s*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,n=this.y,a=this.z,o=t.elements;return this.x=o[0]*r+o[4]*n+o[8]*a,this.y=o[1]*r+o[5]*n+o[9]*a,this.z=o[2]*r+o[6]*n+o[10]*a,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=Nt(this.x,t.x,r.x),this.y=Nt(this.y,t.y,r.y),this.z=Nt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Nt(this.x,t,r),this.y=Nt(this.y,t,r),this.z=Nt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Nt(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,a=t.y,o=t.z,s=r.x,i=r.y,l=r.z;return this.x=a*l-o*i,this.y=o*s-n*l,this.z=n*i-a*s,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 ki.copy(this).projectOnVector(t),this.sub(ki)}reflect(t){return this.sub(ki.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(Nt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,a=this.z-t.z;return r*r+n*n+a*a}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 a=Math.sin(r)*t;return this.x=a*Math.sin(n),this.y=Math.cos(r)*t,this.z=a*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(),a=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=a,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 ki=new pn,ah=new L2;function B2(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 a=e[n];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(n>0&&(a=a.replace(/^[\/]+/,"")),n<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}var o=t.join("/");o=o.replace(/\/(\?|&|#[^!])/g,"$1");var s=o.split("?");return o=s.shift()+(s.length>0?"?":"")+s.join("&"),o}function $i(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),B2(e)}var It={},oh;function N2(){if(oh)return It;oh=1,Object.defineProperty(It,"__esModule",{value:!0}),It.TokenData=void 0,It.parse=d,It.compile=h,It.match=m,It.pathToRegexp=b,It.stringify=w;const e="/",t=T=>T,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(T){return T.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(T){return T.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(T){const V=[...T];let j=0;function y(){let R="";if(r.test(V[++j]))for(R+=V[j];n.test(V[++j]);)R+=V[j];else if(V[j]==='"'){let z=j;for(;j<V.length;){if(V[++j]==='"'){j++,z=0;break}V[j]==="\\"?R+=V[++j]:R+=V[j]}if(z)throw new TypeError(`Unterminated quote at ${z}: ${a}`)}if(!R)throw new TypeError(`Missing parameter name at ${j}: ${a}`);return R}for(;j<V.length;){const R=V[j],z=o[R];if(z)yield{type:z,index:j++,value:R};else if(R==="\\")yield{type:"ESCAPED",index:j++,value:V[j++]};else if(R===":"){const I=y();yield{type:"PARAM",index:j,value:I}}else if(R==="*"){const I=y();yield{type:"WILDCARD",index:j,value:I}}else yield{type:"CHAR",index:j,value:V[j++]}}return{type:"END",index:j,value:""}}class c{constructor(V){this.tokens=V}peek(){if(!this._peek){const V=this.tokens.next();this._peek=V.value}return this._peek}tryConsume(V){const j=this.peek();if(j.type===V)return this._peek=void 0,j.value}consume(V){const j=this.tryConsume(V);if(j!==void 0)return j;const{type:y,index:R}=this.peek();throw new TypeError(`Unexpected ${y} at ${R}, expected ${V}: ${a}`)}text(){let V="",j;for(;j=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)V+=j;return V}}class u{constructor(V){this.tokens=V}}It.TokenData=u;function d(T,V={}){const{encodePath:j=t}=V,y=new c(l(T));function R(I){const G=[];for(;;){const ae=y.text();ae&&G.push({type:"text",value:j(ae)});const re=y.tryConsume("PARAM");if(re){G.push({type:"param",name:re});continue}const te=y.tryConsume("WILDCARD");if(te){G.push({type:"wildcard",name:te});continue}if(y.tryConsume("{")){G.push({type:"group",tokens:R("}")});continue}return y.consume(I),G}}const z=R("END");return new u(z)}function h(T,V={}){const{encode:j=encodeURIComponent,delimiter:y=e}=V,R=T instanceof u?T:d(T,V),z=p(R.tokens,y,j);return function(G={}){const[ae,...re]=z(G);if(re.length)throw new TypeError(`Missing parameters: ${re.join(", ")}`);return ae}}function p(T,V,j){const y=T.map(R=>f(R,V,j));return R=>{const z=[""];for(const I of y){const[G,...ae]=I(R);z[0]+=G,z.push(...ae)}return z}}function f(T,V,j){if(T.type==="text")return()=>[T.value];if(T.type==="group"){const R=p(T.tokens,V,j);return z=>{const[I,...G]=R(z);return G.length?[""]:[I]}}const y=j||t;return T.type==="wildcard"&&j!==!1?R=>{const z=R[T.name];if(z==null)return["",T.name];if(!Array.isArray(z)||z.length===0)throw new TypeError(`Expected "${T.name}" to be a non-empty array`);return[z.map((I,G)=>{if(typeof I!="string")throw new TypeError(`Expected "${T.name}/${G}" to be a string`);return y(I)}).join(V)]}:R=>{const z=R[T.name];if(z==null)return["",T.name];if(typeof z!="string")throw new TypeError(`Expected "${T.name}" to be a string`);return[y(z)]}}function m(T,V={}){const{decode:j=decodeURIComponent,delimiter:y=e}=V,{regexp:R,keys:z}=b(T,V),I=z.map(G=>j===!1?t:G.type==="param"?j:ae=>ae.split(y).map(j));return function(ae){const re=R.exec(ae);if(!re)return!1;const te=re[0],ee=Object.create(null);for(let se=1;se<re.length;se++){if(re[se]===void 0)continue;const H=z[se-1],X=I[se-1];ee[H.name]=X(re[se])}return{path:te,params:ee}}}function b(T,V={}){const{delimiter:j=e,end:y=!0,sensitive:R=!1,trailing:z=!0}=V,I=[],G=[],ae=R?"":"i",te=(Array.isArray(T)?T:[T]).map(H=>H instanceof u?H:d(H,V));for(const{tokens:H}of te)for(const X of S(H,0,[])){const le=E(X,j,I);G.push(le)}let ee=`^(?:${G.join("|")})`;return z&&(ee+=`(?:${i(j)}$)?`),ee+=y?"$":`(?=${i(j)}|$)`,{regexp:new RegExp(ee,ae),keys:I}}function*S(T,V,j){if(V===T.length)return yield j;const y=T[V];if(y.type==="group"){const R=j.slice();for(const z of S(y.tokens,0,R))yield*S(T,V+1,z)}else j.push(y);yield*S(T,V+1,j)}function E(T,V,j){let y="",R="",z=!0;for(let I=0;I<T.length;I++){const G=T[I];if(G.type==="text"){y+=i(G.value),R+=G.value,z||(z=G.value.includes(V));continue}if(G.type==="param"||G.type==="wildcard"){if(!z&&!R)throw new TypeError(`Missing text after "${G.name}": ${a}`);G.type==="param"?y+=`(${O(V,z?"":R)}+)`:y+="([\\s\\S]+)",j.push(G),R="",z=!1;continue}}return y}function O(T,V){return V.length<2?T.length<2?`[^${i(T+V)}]`:`(?:(?!${i(T)})[^${i(V)}])`:T.length<2?`(?:(?!${i(V)})[^${i(T)}])`:`(?:(?!${i(V)}|${i(T)})[\\s\\S])`}function w(T){return T.tokens.map(function V(j,y,R){if(j.type==="text")return s(j.value);if(j.type==="group")return`{${j.tokens.map(V).join("")}}`;const I=A(j.name)&&C(R[y+1])?j.name:JSON.stringify(j.name);if(j.type==="param")return`:${I}`;if(j.type==="wildcard")return`*${I}`;throw new TypeError(`Unexpected token: ${j}`)}).join("")}function A(T){const[V,...j]=T;return r.test(V)?j.every(y=>n.test(y)):!1}function C(T){return(T==null?void 0:T.type)!=="text"?!0:!n.test(T.value[0])}return It}var F2=N2();function vf(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 Sf(e,t,r){if(e===void 0&&t||e&&t===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation.x-t.orientation.x),n+=Math.abs(e.orientation.y-t.orientation.y),n+=Math.abs(e.orientation.z-t.orientation.z),n+=Math.abs(e.position.x-t.position.x),n+=Math.abs(e.position.y-t.position.y),n+=Math.abs(e.position.z-t.position.z),n>r?!1:e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp}var sh=1e-4,z2=class Of{constructor(t,r,n,a,o,s,i,l,c,u,d,h){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=o,this.isVirtual=s,this.tcps=i,this.motionGroupSpecification=l,this.safetySetup=c,this.mounting=u,this.initialControllerState=d,this.controllerStateSocket=h,this.connectedJoggingCartesianSocket=null,this.connectedJoggingJointsSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=a,this.controllerState=d,h.addEventListener("message",p=>{var f;const m=(f=lr(p.data))==null?void 0:f.result;m&&$e.runInAction(()=>{this.controllerState=m})}),o.addEventListener("message",p=>{var f;const m=(f=lr(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);vf(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,sh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),Sf(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,sh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),$e.makeAutoObservable(this)}static connect(t,r,n){return Ve(this,null,function*(){var a,o;const[s,i]=r.split("@"),l=n.find(C=>C.controller===i),c=l==null?void 0:l.physical_motion_groups.find(C=>C.motion_group===r);if(!l||!c)throw new Error(`Controller ${i} or motion group ${r} not found`);const u=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),d=yield u.firstMessage(),h=(a=lr(d.data))==null?void 0:a.result;if(!h)throw new Error(`Unable to parse initial motion state message ${d.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
151
|
-
`,h);const f=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",m=yield Ve(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(C){return console.error(`Error fetching mounting for ${c.motion_group}`,C),null}}),b=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),S=yield b.firstMessage(),E=(
|
|
152
|
-
`,E);const{tcps:O}=yield t.api.motionGroupInfos.listTcps(r),w=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),A=yield t.api.motionGroupInfos.getSafetySetup(r);return new Of(t,l,c,h,u,f,O,w,A,m,E,b)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}get dhParameters(){return this.motionGroupSpecification.dh_parameters}get safetyZones(){return this.safetySetup.safety_zones}get mountingPosition(){return this.mounting?[this.mounting.pose.position.x/1e3,this.mounting.pose.position.y/1e3,this.mounting.pose.position.z/1e3]:[0,0,0]}get mountingQuaternion(){var t,r,n,a,o,s;const i=new Be.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((a=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:a.y)||0,((s=(o=this.mounting)==null?void 0:o.pose.orientation)==null?void 0:s.z)||0),l=i.length(),c=i.normalize();return new Be.Quaternion().setFromAxisAngle(c,l)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}deactivate(){return Ve(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}$e.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),$e.runInAction(()=>{this.activationState="inactive"})}catch(t){throw $e.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Ve(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}$e.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),$e.runInAction(()=>{this.activationState="active"})}catch(t){throw $e.runInAction(()=>{this.activationState="inactive"}),t}})}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingCartesianSocket&&this.connectedJoggingCartesianSocket.close(),this.connectedJoggingJointsSocket&&this.connectedJoggingJointsSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}},G2=class wf{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ve(this,arguments,function*(n,a,o={}){const s=yield n.connectMotionStream(a);return new wf(s,o)})}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}get activeJoggingMode(){return this.cartesianWebsocket?"cartesian":this.jointWebsocket?"joint":"increment"}get activeWebsocket(){return this.cartesianWebsocket||this.jointWebsocket}stop(){return Ve(this,null,function*(){this.cartesianWebsocket&&this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:{x:0,y:0,z:0},rotation_direction:{x:0,y:0,z:0},position_velocity:0,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId}),this.jointWebsocket&&this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:new Array(this.numJoints).fill(0)})})}dispose(){this.cartesianWebsocket&&this.cartesianWebsocket.dispose(),this.jointWebsocket&&this.jointWebsocket.dispose()}setJoggingMode(t,r){console.log("Setting jogging mode to",t),r&&(JA(this.cartesianJoggingOpts,r)||this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),this.cartesianJoggingOpts=r),t!=="cartesian"&&this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),t!=="joint"&&this.jointWebsocket&&(this.jointWebsocket.dispose(),this.jointWebsocket=null),t==="cartesian"&&!this.cartesianWebsocket&&(this.cartesianWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-tcp"),this.cartesianWebsocket.addEventListener("message",n=>{const a=lr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",n=>{const a=lr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return Ve(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:a}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const o=new Array(this.numJoints).fill(0);o[r]=n==="-"?-a:a,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:o})})}startTCPTranslation(t){return Ve(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:o,position_velocity:a,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return Ve(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:o,rotation_direction:s,position_velocity:0,rotation_velocity:a,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return Ve(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:o,axis:s,direction:i,motion:l}){var c;const u=[];if(!u_(r.coordinate_system,a))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${a}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[s]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:o}},line:{position:p,orientation:r.orientation,coordinate_system:a}})}else if(l.type==="rotate"){const p=new pn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),b=l.distanceRads*(i==="-"?-1:1),S=new pn(0,0,0);S[s]=1;const E=Math.cos(.5*b)*Math.cos(.5*f),O=Math.sin(.5*b)*Math.sin(.5*f),w=Math.sin(.5*b)*Math.cos(.5*f),A=Math.cos(.5*b)*Math.sin(.5*f),C=S.dot(m),T=S.clone().cross(m),V=2*Math.acos(E-O*C),j=V/Math.sin(.5*V),y=new pn().addScaledVector(T,O).addScaledVector(S,w).addScaledVector(m,A).multiplyScalar(j);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:o}},line:{position:r.position,orientation:y,coordinate_system:a}})}const d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,tcp:this.cartesianJoggingOpts.tcpId,commands:u}),h=(c=d.plan_successful_response)==null?void 0:c.motion;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);yield this.nova.api.motion.streamMoveForward(h,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return Ve(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:a,direction:o,distanceRads:s}){var i;const l=[...n.joints];l[r]+=s*(o==="-"?-1:1);const c=new Array(n.joints.length).fill(a),u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),d=(i=u.plan_successful_response)==null?void 0:i.motion;if(!d){console.error("Failed to plan jogging increment motion",u);return}yield this.nova.api.motion.streamMoveForward(d,100,void 0,void 0,void 0,{timeout:1e3*60})})}},ih=1e-4;function H2(e,t){const r=new Ot.Vector3(t.x,t.y,t.z),n=new Ot.Vector3(e.x,e.y,e.z),a=r.length(),o=r.normalize();let s=n.length(),i=n.normalize();i.dot(o)<0&&(s=-s,i=i.multiplyScalar(-1));let l=s-a;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),s=a+l,i.multiplyScalar(s)}var q2=class Cf{constructor(t,r,n,a,o){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=o,this.rapidlyChangingMotionState=a,o.addEventListener("message",s=>{var i;const l=(i=lr(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);vf(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,ih)||$e.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),Sf(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,ih)||$e.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:H2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),$e.makeAutoObservable(this)}static open(t,r){return Ve(this,null,function*(){var n;const{instances:a}=yield t.api.controller.listControllers(),[o,s]=r.split("@"),i=a.find(h=>h.controller===s),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${s} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield c.firstMessage();console.log("got first message",u);const d=(n=lr(u.data))==null?void 0:n.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
153
|
-
`,d),new Cf(t,i,l,d,c)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}},W2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(E2),this.cell=this.withUnwrappedResponsesOnly(qE),this.deviceConfig=this.withCellId(e2),this.motionGroup=this.withCellId(h2),this.motionGroupInfos=this.withCellId(m2),this.controller=this.withCellId(JE),this.program=this.withCellId(v2),this.programValues=this.withCellId(O2),this.controllerIOs=this.withCellId(KE),this.motionGroupKinematic=this.withCellId(b2),this.motion=this.withCellId(u2),this.coordinateSystems=this.withCellId(XE),this.application=this.withCellId(nh),this.applicationGlobal=this.withUnwrappedResponsesOnly(nh),this.motionGroupJogging=this.withCellId(g2),this.virtualRobot=this.withCellId(V2),this.virtualRobotSetup=this.withCellId(D2),this.virtualRobotMode=this.withCellId($2),this.virtualRobotBehavior=this.withCellId(j2),this.libraryProgramMetadata=this.withCellId(a2),this.libraryProgram=this.withCellId(r2),this.libraryRecipeMetadata=this.withCellId(l2),this.libraryRecipe=this.withCellId(s2),this.storeObject=this.withCellId(A2),this.storeCollisionComponents=this.withCellId(C2),this.storeCollisionScenes=this.withCellId(T2)}withCellId(e){var t,r;const n=new e(dl(ln({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,[this.cellId,...s]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(dl(ln({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,s).then(i=>i.data)}return n}},J2=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ve(this,null,function*(){var t,r,n;const a=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],o=((t=e.method)==null?void 0:t.toUpperCase())||"GET",s="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of a){const l=F2.match(i.path)(s||"");if(o===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 bl(`No mock handler matched this request: ${o} ${s}`,"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(Y2)})),e.url.includes("/move-joint")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:48:26.096266444Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"671259"}],sequence_number:"671259"},movement_state:"MOVEMENT_STATE_MOVING"}})})),e.url.includes("/move-tcp")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:43:12.188335774Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3352527618408203,-1.5659207105636597,1.6653711795806885,-1.110615611076355,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"627897"}],sequence_number:"627897"},movement_state:"MOVEMENT_STATE_MOVING"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}},Y2={result:{state:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",joint_position:{joints:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:""},tcp_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"1"},tcp_pose:{position:{x:302.90748476115556,y:-152.87065869452337,z:424.0454619321661},orientation:{x:2.3403056115045353,y:-1.1706836379431356,z:.9772511964246311},coordinate_system:"",tcp:"Flange"}}},K2=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=ln({cellId:r},e),this.accessToken=e.accessToken||_i.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new J2);const n=_.create({baseURL:$i(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(a=>Ve(this,null,function*(){return a.headers.Authorization||(this.accessToken?a.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(a.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),a})),typeof window<"u"&&n.interceptors.response.use(a=>a,a=>Ve(this,null,function*(){var o,s;if(FE(a))if(((o=a.response)==null?void 0:o.status)===401)try{if(yield this.renewAuthentication(),a.config)return this.accessToken?a.config.headers.Authorization=`Bearer ${this.accessToken}`:delete a.config.headers.Authorization,n.request(a.config)}catch(i){return Promise.reject(i)}else((s=a.response)==null?void 0:s.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(a)})),this.api=new W2(r,dl(ln({},e),{basePath:$i(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:ln(ln({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Ve(this,null,function*(){if(!this.authPromise){this.authPromise=h_(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?_i.setString("wbjs.access_token",this.accessToken):_i.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL($i(this.config.instanceUrl,`/api/v1/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 l_(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ve(this,null,function*(){return yield q2.open(this,e)})}connectJogger(e){return Ve(this,null,function*(){return yield G2.open(this,e)})}connectMotionGroups(e){return Ve(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>z2.connect(this,r,t)))})}connectMotionGroup(e){return Ve(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function Q2(e){try{return JSON.stringify(e)}catch{return}}function X2(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function Z2(e){var t,r,n,a;return e instanceof bl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof bl&&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((a=e.response)==null?void 0:a.data)}`:e instanceof Error?e.message:`Unexpected error: ${Q2(e)||e}`}const Pc=e=>{const t=e.softTimeout||3e3,[r,n]=J.useState(!1),a=P.useTheme();return J.useEffect(()=>{const o=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(o)}),g.jsx(P.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?g.jsx(Pf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(P.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(P.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Pf=e=>{const t=Z2(e.error),r=e.error instanceof Error?e.error.stack:null,n=P.useTheme();return g.jsxs(P.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 ${Al.lowerFirst(P.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},eI=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),tI=J.forwardRef(eI),rI=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),nI=J.forwardRef(rI),aI=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),oI=J.forwardRef(aI),sI=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.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"})),iI=J.forwardRef(sI);function lI(){this.__data__=[],this.size=0}function Tf(e,t){return e===t||e!==e&&t!==t}function Fs(e,t){for(var r=e.length;r--;)if(Tf(e[r][0],t))return r;return-1}var cI=Array.prototype,uI=cI.splice;function dI(e){var t=this.__data__,r=Fs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():uI.call(t,r,1),--this.size,!0}function hI(e){var t=this.__data__,r=Fs(t,e);return r<0?void 0:t[r][1]}function pI(e){return Fs(this.__data__,e)>-1}function mI(e,t){var r=this.__data__,n=Fs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Zt(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])}}Zt.prototype.clear=lI;Zt.prototype.delete=dI;Zt.prototype.get=hI;Zt.prototype.has=pI;Zt.prototype.set=mI;function fI(){this.__data__=new Zt,this.size=0}function gI(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function yI(e){return this.__data__.get(e)}function bI(e){return this.__data__.has(e)}var xI="[object AsyncFunction]",vI="[object Function]",SI="[object GeneratorFunction]",OI="[object Proxy]";function Rf(e){if(!_r(e))return!1;var t=Lr(e);return t==vI||t==SI||t==xI||t==OI}var Ui=Dt["__core-js_shared__"],lh=function(){var e=/[^.]+$/.exec(Ui&&Ui.keys&&Ui.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function wI(e){return!!lh&&lh in e}var CI=Function.prototype,PI=CI.toString;function Nr(e){if(e!=null){try{return PI.call(e)}catch{}try{return e+""}catch{}}return""}var TI=/[\\^$.*+?()[\]{}|]/g,RI=/^\[object .+?Constructor\]$/,AI=Function.prototype,_I=Object.prototype,EI=AI.toString,II=_I.hasOwnProperty,VI=RegExp("^"+EI.call(II).replace(TI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MI(e){if(!_r(e)||wI(e))return!1;var t=Rf(e)?VI:RI;return t.test(Nr(e))}function jI(e,t){return e==null?void 0:e[t]}function Fr(e,t){var r=jI(e,t);return MI(r)?r:void 0}var wa=Fr(Dt,"Map"),Ca=Fr(Object,"create");function kI(){this.__data__=Ca?Ca(null):{},this.size=0}function $I(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var UI="__lodash_hash_undefined__",DI=Object.prototype,LI=DI.hasOwnProperty;function BI(e){var t=this.__data__;if(Ca){var r=t[e];return r===UI?void 0:r}return LI.call(t,e)?t[e]:void 0}var NI=Object.prototype,FI=NI.hasOwnProperty;function zI(e){var t=this.__data__;return Ca?t[e]!==void 0:FI.call(t,e)}var GI="__lodash_hash_undefined__";function HI(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ca&&t===void 0?GI:t,this}function Vr(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])}}Vr.prototype.clear=kI;Vr.prototype.delete=$I;Vr.prototype.get=BI;Vr.prototype.has=zI;Vr.prototype.set=HI;function qI(){this.size=0,this.__data__={hash:new Vr,map:new(wa||Zt),string:new Vr}}function WI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function zs(e,t){var r=e.__data__;return WI(t)?r[typeof t=="string"?"string":"hash"]:r.map}function JI(e){var t=zs(this,e).delete(e);return this.size-=t?1:0,t}function YI(e){return zs(this,e).get(e)}function KI(e){return zs(this,e).has(e)}function QI(e,t){var r=zs(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,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=qI;er.prototype.delete=JI;er.prototype.get=YI;er.prototype.has=KI;er.prototype.set=QI;var XI=200;function ZI(e,t){var r=this.__data__;if(r instanceof Zt){var n=r.__data__;if(!wa||n.length<XI-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new er(n)}return r.set(e,t),this.size=r.size,this}function qt(e){var t=this.__data__=new Zt(e);this.size=t.size}qt.prototype.clear=fI;qt.prototype.delete=gI;qt.prototype.get=yI;qt.prototype.has=bI;qt.prototype.set=ZI;var eV="__lodash_hash_undefined__";function tV(e){return this.__data__.set(e,eV),this}function rV(e){return this.__data__.has(e)}function Xo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new er;++t<r;)this.add(e[t])}Xo.prototype.add=Xo.prototype.push=tV;Xo.prototype.has=rV;function nV(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 aV(e,t){return e.has(t)}var oV=1,sV=2;function Af(e,t,r,n,a,o){var s=r&oV,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&sV?new Xo:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!nV(t,function(S,E){if(!aV(p,E)&&(f===S||a(f,S,r,n,o)))return p.push(E)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var ch=Dt.Uint8Array;function iV(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function lV(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var cV=1,uV=2,dV="[object Boolean]",hV="[object Date]",pV="[object Error]",mV="[object Map]",fV="[object Number]",gV="[object RegExp]",yV="[object Set]",bV="[object String]",xV="[object Symbol]",vV="[object ArrayBuffer]",SV="[object DataView]",uh=hr?hr.prototype:void 0,Di=uh?uh.valueOf:void 0;function OV(e,t,r,n,a,o,s){switch(r){case SV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vV:return!(e.byteLength!=t.byteLength||!o(new ch(e),new ch(t)));case dV:case hV:case fV:return Tf(+e,+t);case pV:return e.name==t.name&&e.message==t.message;case gV:case bV:return e==t+"";case mV:var i=iV;case yV:var l=n&cV;if(i||(i=lV),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=uV,s.set(e,t);var u=Af(i(e),i(t),n,a,o,s);return s.delete(e),u;case xV:if(Di)return Di.call(e)==Di.call(t)}return!1}function wV(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Ut=Array.isArray;function CV(e,t,r){var n=t(e);return Ut(e)?n:wV(n,r(e))}function PV(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}function TV(){return[]}var RV=Object.prototype,AV=RV.propertyIsEnumerable,dh=Object.getOwnPropertySymbols,_V=dh?function(e){return e==null?[]:(e=Object(e),PV(dh(e),function(t){return AV.call(e,t)}))}:TV;function EV(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var IV="[object Arguments]";function hh(e){return Er(e)&&Lr(e)==IV}var _f=Object.prototype,VV=_f.hasOwnProperty,MV=_f.propertyIsEnumerable,Ef=hh(function(){return arguments}())?hh:function(e){return Er(e)&&VV.call(e,"callee")&&!MV.call(e,"callee")};function jV(){return!1}var If=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ph=If&&typeof module=="object"&&module&&!module.nodeType&&module,kV=ph&&ph.exports===If,mh=kV?Dt.Buffer:void 0,$V=mh?mh.isBuffer:void 0,vl=$V||jV,UV=9007199254740991,DV=/^(?:0|[1-9]\d*)$/;function Vf(e,t){var r=typeof e;return t=t??UV,!!t&&(r=="number"||r!="symbol"&&DV.test(e))&&e>-1&&e%1==0&&e<t}var LV=9007199254740991;function Tc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LV}var BV="[object Arguments]",NV="[object Array]",FV="[object Boolean]",zV="[object Date]",GV="[object Error]",HV="[object Function]",qV="[object Map]",WV="[object Number]",JV="[object Object]",YV="[object RegExp]",KV="[object Set]",QV="[object String]",XV="[object WeakMap]",ZV="[object ArrayBuffer]",eM="[object DataView]",tM="[object Float32Array]",rM="[object Float64Array]",nM="[object Int8Array]",aM="[object Int16Array]",oM="[object Int32Array]",sM="[object Uint8Array]",iM="[object Uint8ClampedArray]",lM="[object Uint16Array]",cM="[object Uint32Array]",Ie={};Ie[tM]=Ie[rM]=Ie[nM]=Ie[aM]=Ie[oM]=Ie[sM]=Ie[iM]=Ie[lM]=Ie[cM]=!0;Ie[BV]=Ie[NV]=Ie[ZV]=Ie[FV]=Ie[eM]=Ie[zV]=Ie[GV]=Ie[HV]=Ie[qV]=Ie[WV]=Ie[JV]=Ie[YV]=Ie[KV]=Ie[QV]=Ie[XV]=!1;function uM(e){return Er(e)&&Tc(e.length)&&!!Ie[Lr(e)]}function dM(e){return function(t){return e(t)}}var Mf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,la=Mf&&typeof module=="object"&&module&&!module.nodeType&&module,hM=la&&la.exports===Mf,Li=hM&&Im.process,fh=function(){try{var e=la&&la.require&&la.require("util").types;return e||Li&&Li.binding&&Li.binding("util")}catch{}}(),gh=fh&&fh.isTypedArray,jf=gh?dM(gh):uM,pM=Object.prototype,mM=pM.hasOwnProperty;function fM(e,t){var r=Ut(e),n=!r&&Ef(e),a=!r&&!n&&vl(e),o=!r&&!n&&!a&&jf(e),s=r||n||a||o,i=s?EV(e.length,String):[],l=i.length;for(var c in e)mM.call(e,c)&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vf(c,l)))&&i.push(c);return i}var gM=Object.prototype;function yM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gM;return e===r}function bM(e,t){return function(r){return e(t(r))}}var xM=bM(Object.keys,Object),vM=Object.prototype,SM=vM.hasOwnProperty;function OM(e){if(!yM(e))return xM(e);var t=[];for(var r in Object(e))SM.call(e,r)&&r!="constructor"&&t.push(r);return t}function kf(e){return e!=null&&Tc(e.length)&&!Rf(e)}function Rc(e){return kf(e)?fM(e):OM(e)}function yh(e){return CV(e,Rc,_V)}var wM=1,CM=Object.prototype,PM=CM.hasOwnProperty;function TM(e,t,r,n,a,o){var s=r&wM,i=yh(e),l=i.length,c=yh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:PM.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,o):n(S,E,h,e,t,o);if(!(O===void 0?S===E||a(S,E,r,n,o):O)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var w=e.constructor,A=t.constructor;w!=A&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof A=="function"&&A instanceof A)&&(m=!1)}return o.delete(e),o.delete(t),m}var Sl=Fr(Dt,"DataView"),Ol=Fr(Dt,"Promise"),wl=Fr(Dt,"Set"),Cl=Fr(Dt,"WeakMap"),bh="[object Map]",RM="[object Object]",xh="[object Promise]",vh="[object Set]",Sh="[object WeakMap]",Oh="[object DataView]",AM=Nr(Sl),_M=Nr(wa),EM=Nr(Ol),IM=Nr(wl),VM=Nr(Cl),sr=Lr;(Sl&&sr(new Sl(new ArrayBuffer(1)))!=Oh||wa&&sr(new wa)!=bh||Ol&&sr(Ol.resolve())!=xh||wl&&sr(new wl)!=vh||Cl&&sr(new Cl)!=Sh)&&(sr=function(e){var t=Lr(e),r=t==RM?e.constructor:void 0,n=r?Nr(r):"";if(n)switch(n){case AM:return Oh;case _M:return bh;case EM:return xh;case IM:return vh;case VM:return Sh}return t});var MM=1,wh="[object Arguments]",Ch="[object Array]",uo="[object Object]",jM=Object.prototype,Ph=jM.hasOwnProperty;function kM(e,t,r,n,a,o){var s=Ut(e),i=Ut(t),l=s?Ch:sr(e),c=i?Ch:sr(t);l=l==wh?uo:l,c=c==wh?uo:c;var u=l==uo,d=c==uo,h=l==c;if(h&&vl(e)){if(!vl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new qt),s||jf(e)?Af(e,t,r,n,a,o):OV(e,t,l,r,n,a,o);if(!(r&MM)){var p=u&&Ph.call(e,"__wrapped__"),f=d&&Ph.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return o||(o=new qt),a(m,b,r,n,o)}}return h?(o||(o=new qt),TM(e,t,r,n,a,o)):!1}function Gs(e,t,r,n,a){return e===t?!0:e==null||t==null||!Er(e)&&!Er(t)?e!==e&&t!==t:kM(e,t,r,n,Gs,a)}function $M(e,t){return Gs(e,t)}const $f=({store:e})=>{const{t}=_e.useTranslation(),[r,n]=J.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=J.useRef(r);Rn(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;$M(a.current,s)||(a.current=s,n(s))});const o=[];for(const[s,i]of r.entries())i&&o.push(s);return g.jsx(P.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},UM=P.styled(P.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 ho({labelValue:e,...t}){return g.jsxs(UM,{fullWidth:!0,variant:"filled",children:[g.jsx(P.InputLabel,{id:t.labelId,children:e}),g.jsx(P.Select,{...t})]})}var Th=function(){try{var e=Fr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function DM(e,t,r){t=="__proto__"&&Th?Th(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function LM(e,t,r,n){for(var a=-1,o=e==null?0:e.length;++a<o;){var s=e[a];t(n,s,r(s),e)}return n}function BM(e){return function(t,r,n){for(var a=-1,o=Object(t),s=n(t),i=s.length;i--;){var l=s[++a];if(r(o[l],l,o)===!1)break}return t}}var NM=BM();function FM(e,t){return e&&NM(e,t,Rc)}function zM(e,t){return function(r,n){if(r==null)return r;if(!kf(r))return e(r,n);for(var a=r.length,o=-1,s=Object(r);++o<a&&n(s[o],o,s)!==!1;);return r}}var GM=zM(FM);function HM(e,t,r,n){return GM(e,function(a,o,s){t(n,a,r(a),s)}),n}var qM=1,WM=2;function JM(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var s=r[a];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){s=r[a];var i=s[0],l=e[i],c=s[1];if(s[2]){if(l===void 0&&!(i in e))return!1}else{var u=new qt,d;if(!(d===void 0?Gs(c,l,qM|WM,n,u):d))return!1}}return!0}function Uf(e){return e===e&&!_r(e)}function YM(e){for(var t=Rc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Uf(a)]}return t}function Df(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function KM(e){var t=YM(e);return t.length==1&&t[0][2]?Df(t[0][0],t[0][1]):function(r){return r===e||JM(r,e,t)}}var QM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XM=/^\w*$/;function Ac(e,t){if(Ut(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Vs(e)?!0:XM.test(e)||!QM.test(e)||t!=null&&e in Object(t)}var ZM="Expected a function";function _c(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ZM);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var s=e.apply(this,n);return r.cache=o.set(a,s)||o,s};return r.cache=new(_c.Cache||er),r}_c.Cache=er;var e5=500;function t5(e){var t=_c(e,function(n){return r.size===e5&&r.clear(),n}),r=t.cache;return t}var r5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n5=/\\(\\)?/g,a5=t5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(r5,function(r,n,a,o){t.push(a?o.replace(n5,"$1"):n||r)}),t});function o5(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Rh=hr?hr.prototype:void 0,Ah=Rh?Rh.toString:void 0;function Lf(e){if(typeof e=="string")return e;if(Ut(e))return o5(e,Lf)+"";if(Vs(e))return Ah?Ah.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Bf(e){return e==null?"":Lf(e)}function Nf(e,t){return Ut(e)?e:Ac(e,t)?[e]:a5(Bf(e))}function Hs(e){if(typeof e=="string"||Vs(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ff(e,t){t=Nf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Hs(t[r++])];return r&&r==n?e:void 0}function s5(e,t,r){var n=e==null?void 0:Ff(e,t);return n===void 0?r:n}function i5(e,t){return e!=null&&t in Object(e)}function l5(e,t,r){t=Nf(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var s=Hs(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&Tc(a)&&Vf(s,a)&&(Ut(e)||Ef(e)))}function c5(e,t){return e!=null&&l5(e,t,i5)}var u5=1,d5=2;function h5(e,t){return Ac(e)&&Uf(t)?Df(Hs(e),t):function(r){var n=s5(r,e);return n===void 0&&n===t?c5(r,e):Gs(t,n,u5|d5)}}function p5(e){return e}function m5(e){return function(t){return t==null?void 0:t[e]}}function f5(e){return function(t){return Ff(t,e)}}function g5(e){return Ac(e)?m5(Hs(e)):f5(e)}function y5(e){return typeof e=="function"?e:e==null?p5:typeof e=="object"?Ut(e)?h5(e[0],e[1]):KM(e):g5(e)}function b5(e,t){return function(r,n){var a=Ut(r)?LM:HM,o={};return a(r,e,y5(n),o)}}var po=b5(function(e,t,r){DM(e,r,t)}),x5=0;function v5(e){var t=++x5;return Bf(e)+t}const Pl=[{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}],S5=[{id:"continuous"},...Pl],O5=["coordsys","tool"];class qs{constructor(t,r,n,a){var o,s;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,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=!0,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 n)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((s=a[0])==null?void 0:s.id)||"",$e.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push($e.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:a},{tcps:o}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new qs(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Al.countBy(this.coordSystems,t=>t.name)}async deactivate(){const t=this.jogger.activeWebsocket;this.jogger.setJoggingMode("increment"),t&&await t.closed()}async activate(){if(this.currentTab.id==="cartesian"){const t={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",t):this.jogger.setJoggingMode("cartesian",t)}else this.jogger.setJoggingMode("joint");return this.jogger}loadFromLocalStorage(){const t=Cr.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 S5}get discreteIncrementOptions(){return Pl}get incrementOptionsById(){return po(this.incrementOptions,t=>t.id)}get tabsById(){return po(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 po(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 po(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Pl.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)}async withMotionLock(t){const r=v5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const w5=Oe.observer(({store:e})=>{var a;const{t}=_e.useTranslation(),r=[];function n(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return e.showCoordSystemSelect&&r.push(g.jsx(ho,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:o=>e.setSelectedCoordSystemId(o.target.value),disabled:e.isLocked,children:e.coordSystems.map(o=>g.jsx(P.MenuItem,{value:o.coordinate_system,children:o.name&&e.coordSystemCountByName[o.name]>1?`${o.name} / ${o.coordinate_system}`:o.name||o.coordinate_system},o.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(ho,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:o=>e.setSelectedTcpId(o.target.value),disabled:e.isLocked,children:e.tcps.map(o=>g.jsx(P.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(ho,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:o=>e.setSelectedOrientation(o.target.value),disabled:e.isLocked,children:O5.map(o=>g.jsx(P.MenuItem,{value:o,children:n(o)},o))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(ho,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:o=>e.setSelectedIncrementId(o.target.value),disabled:e.isLocked,children:[g.jsx(P.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsx(P.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsx(P.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((o,s)=>g.jsx(P.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:o},s))})}),C5=P.styled(P.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 _h(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function P5(e){return typeof e=="string"}function T5(e,t,r){return e===void 0||P5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Po(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 Eh(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 R5(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const p=Pt(r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},m={...r,...a,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const s=Po({...a,...n}),i=Eh(n),l=Eh(a),c=t(s),u=Pt(c==null?void 0:c.className,r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...a==null?void 0:a.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 A5(e,t,r){return typeof e=="function"?e(t,r):e}function or(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,s=a?{}:A5(r,n),{props:i,internalRef:l}=R5({...o,externalSlotProps:s}),c=ps(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return T5(t,{...i,ref:c},n)}function Ih(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(`
|
|
154
|
-
`))}return!1}const _5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function E5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const I5=2;function an(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function zf(e,t){return e-t}function Vh(e,t){const{index:r}=e.reduce((n,a,o)=>{const s=Math.abs(t-a);return n===null||s<n.distance||s===n.distance?{distance:s,index:o}:n},null)??{};return r}function mo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Zo(e,t,r){return(e-t)*100/(r-t)}function V5(e,t,r){return(r-t)*e+t}function M5(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 j5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(M5(t)))}function Mh({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(zf)}function fo({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=oa(e.current);(!((a=e.current)!=null&&a.contains(n.activeElement))||Number((o=n==null?void 0:n.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function go(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?E5(e,t):!1}const k5={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}%`})}},$5=e=>e;let yo;function jh(){return yo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?yo=CSS.supports("touch-action","none"):yo=!0),yo}function U5(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:o=!1,marks:s=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=$5,step:m=1,shiftStep:b=10,tabIndex:S,value:E}=e,O=F.useRef(void 0),[w,A]=F.useState(-1),[C,T]=F.useState(-1),[V,j]=F.useState(!1),y=F.useRef(0),R=F.useRef(null),[z,I]=Kw({controlled:E,default:r??l,name:"Slider"}),G=u&&((Q,ne,ce)=>{const ye=Q.nativeEvent||Q,Te=new ye.constructor(ye.type,ye);Object.defineProperty(Te,"target",{writable:!0,value:{value:ne,name:c}}),R.current=ne,u(Te,ne,ce)}),ae=Array.isArray(z);let re=ae?z.slice().sort(zf):[z];re=re.map(Q=>Q==null?l:on(Q,l,i));const te=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,ne)=>({value:l+m*ne})):s||[],ee=te.map(Q=>Q.value),[se,H]=F.useState(-1),X=F.useRef(null),le=ps(p,X),xe=Q=>ne=>{var ye;const ce=Number(ne.currentTarget.getAttribute("data-index"));Ih(ne.target)&&H(ce),T(ce),(ye=Q==null?void 0:Q.onFocus)==null||ye.call(Q,ne)},Le=Q=>ne=>{var ce;Ih(ne.target)||H(-1),T(-1),(ce=Q==null?void 0:Q.onBlur)==null||ce.call(Q,ne)},oe=(Q,ne)=>{const ce=Number(Q.currentTarget.getAttribute("data-index")),ye=re[ce],Te=ee.indexOf(ye);let ue=ne;if(te&&m==null){const We=ee[ee.length-1];ue>=We?ue=We:ue<=ee[0]?ue=ee[0]:ue=ue<ye?ee[Te-1]:ee[Te+1]}if(ue=on(ue,l,i),ae){a&&(ue=on(ue,re[ce-1]||-1/0,re[ce+1]||1/0));const We=ue;ue=Mh({values:re,newValue:ue,index:ce});let tt=ce;a||(tt=ue.indexOf(We)),fo({sliderRef:X,activeIndex:tt})}I(ue),H(ce),G&&!go(ue,z)&&G(Q,ue,ce),d&&d(Q,R.current??ue)},be=Q=>ne=>{var ce;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ne.key)){ne.preventDefault();const ye=Number(ne.currentTarget.getAttribute("data-index")),Te=re[ye];let ue=null;if(m!=null){const We=ne.shiftKey?b:m;switch(ne.key){case"ArrowUp":ue=an(Te,We,1,l,i);break;case"ArrowRight":ue=an(Te,We,o?-1:1,l,i);break;case"ArrowDown":ue=an(Te,We,-1,l,i);break;case"ArrowLeft":ue=an(Te,We,o?1:-1,l,i);break;case"PageUp":ue=an(Te,b,1,l,i);break;case"PageDown":ue=an(Te,b,-1,l,i);break;case"Home":ue=l;break;case"End":ue=i;break}}else if(te){const We=ee[ee.length-1],tt=ee.indexOf(Te),ze=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];ze.includes(ne.key)?tt===0?ue=ee[0]:ue=ee[tt-1]:mt.includes(ne.key)&&(tt===ee.length-1?ue=We:ue=ee[tt+1])}ue!=null&&oe(ne,ue)}(ce=Q==null?void 0:Q.onKeyDown)==null||ce.call(Q,ne)};$t(()=>{var Q;n&&X.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&w!==-1&&A(-1),n&&se!==-1&&H(-1);const Se=Q=>ne=>{var ce;(ce=Q.onChange)==null||ce.call(Q,ne),oe(ne,ne.target.valueAsNumber)},me=F.useRef(void 0);let Z=h;o&&h==="horizontal"&&(Z+="-reverse");const ie=({finger:Q,move:ne=!1})=>{const{current:ce}=X,{width:ye,height:Te,bottom:ue,left:We}=ce.getBoundingClientRect();let tt;Z.startsWith("vertical")?tt=(ue-Q.y)/Te:tt=(Q.x-We)/ye,Z.includes("-reverse")&&(tt=1-tt);let ze;if(ze=V5(tt,l,i),m)ze=j5(ze,m,l);else{const kn=Vh(ee,ze);ze=ee[kn]}ze=on(ze,l,i);let mt=0;if(ae){ne?mt=me.current:mt=Vh(re,ze),a&&(ze=on(ze,re[mt-1]||-1/0,re[mt+1]||1/0));const kn=ze;ze=Mh({values:re,newValue:ze,index:mt}),a&&ne||(mt=ze.indexOf(kn),me.current=mt)}return{newValue:ze,activeIndex:mt}},de=Ht(Q=>{const ne=mo(Q,O);if(!ne)return;if(y.current+=1,Q.type==="mousemove"&&Q.buttons===0){Y(Q);return}const{newValue:ce,activeIndex:ye}=ie({finger:ne,move:!0});fo({sliderRef:X,activeIndex:ye,setActive:A}),I(ce),!V&&y.current>I5&&j(!0),G&&!go(ce,z)&&G(Q,ce,ye)}),Y=Ht(Q=>{const ne=mo(Q,O);if(j(!1),!ne)return;const{newValue:ce}=ie({finger:ne,move:!0});A(-1),Q.type==="touchend"&&T(-1),d&&d(Q,R.current??ce),O.current=void 0,ge()}),we=Ht(Q=>{if(n)return;jh()||Q.preventDefault();const ne=Q.changedTouches[0];ne!=null&&(O.current=ne.identifier);const ce=mo(Q,O);if(ce!==!1){const{newValue:Te,activeIndex:ue}=ie({finger:ce});fo({sliderRef:X,activeIndex:ue,setActive:A}),I(Te),G&&!go(Te,z)&&G(Q,Te,ue)}y.current=0;const ye=oa(X.current);ye.addEventListener("touchmove",de,{passive:!0}),ye.addEventListener("touchend",Y,{passive:!0})}),ge=F.useCallback(()=>{const Q=oa(X.current);Q.removeEventListener("mousemove",de),Q.removeEventListener("mouseup",Y),Q.removeEventListener("touchmove",de),Q.removeEventListener("touchend",Y)},[Y,de]);F.useEffect(()=>{const{current:Q}=X;return Q.addEventListener("touchstart",we,{passive:jh()}),()=>{Q.removeEventListener("touchstart",we),ge()}},[ge,we]),F.useEffect(()=>{n&&ge()},[n,ge]);const Ye=Q=>ne=>{var Te;if((Te=Q.onMouseDown)==null||Te.call(Q,ne),n||ne.defaultPrevented||ne.button!==0)return;ne.preventDefault();const ce=mo(ne,O);if(ce!==!1){const{newValue:ue,activeIndex:We}=ie({finger:ce});fo({sliderRef:X,activeIndex:We,setActive:A}),I(ue),G&&!go(ue,z)&&G(ne,ue,We)}y.current=0;const ye=oa(X.current);ye.addEventListener("mousemove",de,{passive:!0}),ye.addEventListener("mouseup",Y)},qe=Zo(ae?re[0]:l,l,i),ke=Zo(re[re.length-1],l,i)-qe,tr=(Q={})=>{const ne=Po(Q),ce={onMouseDown:Ye(ne||{})},ye={...ne,...ce};return{...Q,ref:le,...ye}},Ua=Q=>ne=>{var ye;(ye=Q.onMouseOver)==null||ye.call(Q,ne);const ce=Number(ne.currentTarget.getAttribute("data-index"));T(ce)},Da=Q=>ne=>{var ce;(ce=Q.onMouseLeave)==null||ce.call(Q,ne),T(-1)},La=(Q={})=>{const ne=Po(Q),ce={onMouseOver:Ua(ne||{}),onMouseLeave:Da(ne||{})};return{...Q,...ne,...ce}},Ba=Q=>({pointerEvents:w!==-1&&w!==Q?"none":void 0});let zr;return h==="vertical"&&(zr=o?"vertical-rl":"vertical-lr"),{active:w,axis:Z,axisProps:k5,dragging:V,focusedThumbIndex:se,getHiddenInputProps:(Q={})=>{const ne=Po(Q),ce={onChange:Se(ne||{}),onFocus:xe(ne||{}),onBlur:Le(ne||{}),onKeyDown:be(ne||{})},ye={...ne,...ce};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,...Q,...ye,style:{..._5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:zr}}},getRootProps:tr,getThumbProps:La,marks:te,open:C,range:ae,rootRef:le,trackLeap:ke,trackOffset:qe,values:re,getThumbStyle:Ba}}function To(e){return typeof e=="string"}const D5=e=>!e||!To(e);function L5(e){return typeof e.main=="string"}function B5(e,t=[]){if(!L5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Ec(e=[]){return([,t])=>t&&B5(t,e)}function N5(e){return wn("MuiSlider",e)}const bt=Il("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"]),F5=e=>{const{open:t}=e;return{offset:Pt(t&&bt.valueLabelOpen),circle:bt.valueLabelCircle,label:bt.valueLabelLabel}};function Gf(e){const{children:t,className:r,value:n}=e,a=F5(e);return t?F.cloneElement(t,{className:t.props.className},g.jsxs(F.Fragment,{children:[t.props.children,g.jsx("span",{className:Pt(a.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:a.circle,children:g.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Gf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function kh(e){return e}const z5=pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${rt(r.color)}`],r.size!=="medium"&&t[`size${rt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Dr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${bt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${bt.dragging}`]:{[`& .${bt.thumb}, & .${bt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Ec()).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}}]}))),G5=pt("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}}]}),H5=pt("span",{name:"MuiSlider",slot:"Track"})(Dr(({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(Ec()).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:ua(e.palette[t].main,.62),borderColor:ua(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:ca(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:ca(e.palette[t].main,.5)})}}}))]}))),q5=pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${rt(r.color)}`],r.size!=="medium"&&t[`thumbSize${rt(r.size)}`]]}})(Dr(({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%)"},[`&.${bt.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(Ec()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${bt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${zi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${bt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${zi(e.palette[t].main,.16)}`}}}}))]}))),Hf=pt(Gf,{name:"MuiSlider",slot:"ValueLabel"})(Dr(({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%"},[`&.${bt.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%"},[`&.${bt.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"&&(Hf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const W5=pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>jl(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Dr(({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}}]}))),J5=pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>jl(e)&&e!=="markLabelActive"})(Dr(({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}}]}))),Y5=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:o,classes:s,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",i&&`color${rt(i)}`,l&&`size${rt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${rt(l)}`,i&&`thumbColor${rt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return es(c,N5,s)},K5=({children:e})=>e,qf=F.forwardRef(function(t,r){const n=vc({props:t,name:"MuiSlider"}),a=py(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:b,getAriaValueText:S,marks:E=!1,max:O=100,min:w=0,name:A,onChange:C,onChangeCommitted:T,orientation:V="horizontal",shiftStep:j=10,size:y="medium",step:R=1,scale:z=kh,slotProps:I,slots:G,tabIndex:ae,track:re="normal",value:te,valueLabelDisplay:ee="off",valueLabelFormat:se=kh,...H}=n,X={...n,isRtl:a,max:O,min:w,classes:h,disabled:m,disableSwap:f,orientation:V,marks:E,color:d,size:y,step:R,shiftStep:j,scale:z,track:re,valueLabelDisplay:ee,valueLabelFormat:se},{axisProps:le,getRootProps:xe,getHiddenInputProps:Le,getThumbProps:oe,open:be,active:Se,axis:me,focusedThumbIndex:Z,range:ie,dragging:de,marks:Y,values:we,trackOffset:ge,trackLeap:Ye,getThumbStyle:qe}=U5({...X,rootRef:r});X.marked=Y.length>0&&Y.some(Fe=>Fe.label),X.dragging=de,X.focusedThumbIndex=Z;const ke=Y5(X),tr=(G==null?void 0:G.root)??c.Root??z5,Ua=(G==null?void 0:G.rail)??c.Rail??G5,Da=(G==null?void 0:G.track)??c.Track??H5,La=(G==null?void 0:G.thumb)??c.Thumb??q5,Ba=(G==null?void 0:G.valueLabel)??c.ValueLabel??Hf,zr=(G==null?void 0:G.mark)??c.Mark??W5,Na=(G==null?void 0:G.markLabel)??c.MarkLabel??J5,Q=(G==null?void 0:G.input)??c.Input??"input",ne=(I==null?void 0:I.root)??u.root,ce=(I==null?void 0:I.rail)??u.rail,ye=(I==null?void 0:I.track)??u.track,Te=(I==null?void 0:I.thumb)??u.thumb,ue=(I==null?void 0:I.valueLabel)??u.valueLabel,We=(I==null?void 0:I.mark)??u.mark,tt=(I==null?void 0:I.markLabel)??u.markLabel,ze=(I==null?void 0:I.input)??u.input,mt=or({elementType:tr,getSlotProps:xe,externalSlotProps:ne,externalForwardedProps:H,additionalProps:{...D5(tr)&&{as:l}},ownerState:{...X,...ne==null?void 0:ne.ownerState},className:[ke.root,p]}),kn=or({elementType:Ua,externalSlotProps:ce,ownerState:X,className:ke.rail}),sg=or({elementType:Da,externalSlotProps:ye,additionalProps:{style:{...le[me].offset(ge),...le[me].leap(Ye)}},ownerState:{...X,...ye==null?void 0:ye.ownerState},className:ke.track}),Ws=or({elementType:La,getSlotProps:oe,externalSlotProps:Te,ownerState:{...X,...Te==null?void 0:Te.ownerState},className:ke.thumb}),ig=or({elementType:Ba,externalSlotProps:ue,ownerState:{...X,...ue==null?void 0:ue.ownerState},className:ke.valueLabel}),Js=or({elementType:zr,externalSlotProps:We,ownerState:X,className:ke.mark}),Ys=or({elementType:Na,externalSlotProps:tt,ownerState:X,className:ke.markLabel}),lg=or({elementType:Q,getSlotProps:Le,externalSlotProps:ze,ownerState:X});return g.jsxs(tr,{...mt,children:[g.jsx(Ua,{...kn}),g.jsx(Da,{...sg}),Y.filter(Fe=>Fe.value>=w&&Fe.value<=O).map((Fe,Ke)=>{const Ks=Zo(Fe.value,w,O),Fa=le[me].offset(Ks);let Lt;return re===!1?Lt=we.includes(Fe.value):Lt=re==="normal"&&(ie?Fe.value>=we[0]&&Fe.value<=we[we.length-1]:Fe.value<=we[0])||re==="inverted"&&(ie?Fe.value<=we[0]||Fe.value>=we[we.length-1]:Fe.value>=we[0]),g.jsxs(F.Fragment,{children:[g.jsx(zr,{"data-index":Ke,...Js,...!To(zr)&&{markActive:Lt},style:{...Fa,...Js.style},className:Pt(Js.className,Lt&&ke.markActive)}),Fe.label!=null?g.jsx(Na,{"aria-hidden":!0,"data-index":Ke,...Ys,...!To(Na)&&{markLabelActive:Lt},style:{...Fa,...Ys.style},className:Pt(ke.markLabel,Ys.className,Lt&&ke.markLabelActive),children:Fe.label}):null]},Ke)}),we.map((Fe,Ke)=>{const Ks=Zo(Fe,w,O),Fa=le[me].offset(Ks),Lt=ee==="off"?K5:Ba;return g.jsx(Lt,{...!To(Lt)&&{valueLabelFormat:se,valueLabelDisplay:ee,value:typeof se=="function"?se(z(Fe),Ke):se,index:Ke,open:be===Ke||Se===Ke||ee==="on",disabled:m},...ig,children:g.jsx(La,{"data-index":Ke,...Ws,className:Pt(ke.thumb,Ws.className,Se===Ke&&ke.active,Z===Ke&&ke.focusVisible),style:{...Fa,...qe(Ke),...Ws.style},children:g.jsx(Q,{"data-index":Ke,"aria-label":b?b(Ke):o,"aria-valuenow":z(Fe),"aria-labelledby":i,"aria-valuetext":S?S(z(Fe),Ke):s,value:we[Ke],...lg})})},Ke)})]})});process.env.NODE_ENV!=="production"&&(qf.propTypes={"aria-label":_h(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":_h(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 Q5="[object Number]";function X5(e){return typeof e=="number"||Er(e)&&Lr(e)==Q5}const Wf=Oe.observer(e=>{var o,s,i;const t=P.useTheme(),{store:r}=e,{t:n}=_e.useTranslation();function a(l,c){c===e.velocity||!X5(c)||e.onVelocityChange(c)}return g.jsxs(P.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(P.Typography,{sx:{color:(i=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(qf,{value:e.velocity,color:"secondary",onChange:a,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(Ic,{value:e.velocity.toString()}))]})});function Ic({value:e,sx:t}){var n;const r=P.useTheme();return g.jsx(P.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(P.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Jf=Oe.observer(({store:e})=>{const{t}=_e.useTranslation(),r=Oe.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(Wf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Ic,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Z5=Oe.observer(({store:e,children:t})=>{const{t:r}=_e.useTranslation(),n=P.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Em(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function o(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,b=f.motionStream.rapidlyChangingMotionState.state.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:b,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:Cr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({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 b,S,E;const m=(E=(S=(b=f.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:E.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(tI,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(nI,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(oI,{}),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:Cr.radiansToDegrees(h).toFixed(1)})}return g.jsxs(P.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(P.Stack,{gap:2,children:[g.jsx(w5,{store:e}),g.jsx(Jf,{store:e}),g.jsx(P.Divider,{})]}),g.jsx(P.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(P.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(C5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(P.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(P.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(al,{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(P.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m;return u(((m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(al,{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(iI,{}),g.jsx(P.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return d(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:b[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx($f,{store:e}),t&&g.jsx(P.Divider,{}),t]})}),e3=Oe.observer(({store:e,children:t})=>{const r=P.useTheme();async function n(o){await e.activate(),await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function a(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(P.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Jf,{store:e}),g.jsx(P.Divider,{}),g.jsx(P.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(P.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c;const s=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[o.index],i=(s==null?void 0:s.lower_limit)!==void 0?Cr.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Cr.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(P.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(P.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx(Mm,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?Cr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx($f,{store:e}),t&&g.jsx(P.Divider,{}),t]})}),t3=Xe(Oe.observer(e=>{const t=Al.isString(e.nova)?new K2({instanceUrl:e.nova}):e.nova,r=Oe.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){$e.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await qs.loadFor(o)}$e.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return J.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),J.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(P.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(r3,{store:r.joggingStore,children:e.children}):g.jsx(Pc,{message:"Loading jogging",error:r.loadingError})})})),r3=Oe.observer(({store:e,children:t})=>{const{t:r}=_e.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(Z5,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(e3,{store:e,children:t})})}return g.jsxs(P.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(P.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(a=>{const o=a.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),s=a.label==="cartesian"?g.jsx(_C,{fontSize:"small",sx:{mr:1}}):g.jsx(EC,{fontSize:"small",sx:{mr:1}});return g.jsx(P.Tab,{label:e.showTabIcons?g.jsxs(P.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(P.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Yf=J.forwardRef(({label:e,value:t},r)=>{var i;const n=P.useTheme(),[a,o]=J.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return J.useEffect(()=>{if(!a)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),g.jsx(P.Tooltip,{open:a,title:"Copied!",children:g.jsx(P.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:()=>s(),children:g.jsx(P.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})})})}),n3=Oe.observer(({motionStream:e})=>{const t=J.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Cr.poseToWandelscriptString(n):""}return Rn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(P.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Yf,{value:r(),ref:t})})}),a3=Oe.observer(({motionStream:e})=>{const t=J.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return Rn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(P.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Yf,{value:r(),ref:t})})});class Kf{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")},$e.makeObservable(this,{messages:$e.observable,addMessage:$e.action,clearMessages:$e.action})}}const $a=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,timestamp:new Date,message:e,level:t}),o3=(e,t)=>$a(e,"debug",t),s3=(e,t)=>$a(e,"info",t),i3=(e,t)=>$a(e,"warning",t),l3=(e,t)=>$a(e,"error",t),Qf=Xe(Oe.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:a}=e,o=P.useTheme(),s=J.useRef(null);J.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},c=({message:d})=>{const[h,p]=J.useState(!1),[f,m]=J.useState(!1),[b,S]=J.useState(!1),E=d.message.length>150,O=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(A){console.error("Failed to copy message:",A)}},w=E&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(P.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(P.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(P.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(P.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:w}),g.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:b?1:0,transition:"opacity 0.2s ease-in-out",visibility:b?"visible":"hidden"},children:[g.jsx(P.IconButton,{size:"small",onClick:O,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Ft.ContentCopy,{sx:{fontSize:12}})}),E&&g.jsx(P.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Ft.ExpandLess,{sx:{fontSize:12}}):g.jsx(Ft.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(P.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...a},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Ft.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsx(P.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsx(P.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(P.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?g.jsx(P.Typography,{sx:{color:o.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))})]})})),c3=Xe(Oe.observer(e=>{const{store:t,onStoreReady:r,...n}=e,a=J.useRef(r);J.useEffect(()=>{a.current=r},[r]);const o=J.useMemo(()=>{var l;const i=t||new Kf;return(l=a.current)==null||l.call(a,i),i},[t]),s=()=>{o.clearMessages()};return g.jsx(Qf,{...n,messages:o.messages,onClear:s})}));function u3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function d3({baseUrl:e=u3(),...t}){return g.jsxs(P.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(P.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(P.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(P.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(P.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(P.DialogActions,{children:g.jsxs(P.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(P.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(P.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var vr=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e.ERROR="error",e))(vr||{});const h3=Xe(Oe.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=P.useTheme(),{t:c}=_e.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"?"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==="running"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return s==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(s==="without_pause")return p===0?g.jsx(Ft.PlayArrow,{...f}):g.jsx(Ft.Stop,{...f});switch(p){case 0:return g.jsx(Ft.PlayArrow,{...f});case 1:return g.jsx(Ft.Pause,{...f});case 2:return g.jsx(Ft.Stop,{...f});default:return null}},h=u();return g.jsx(P.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(P.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(P.Button,{variant:"contained",disabled:!p.enabled||e==="stopping"&&!o,onClick:p.onClick,sx:{width:"110px",height:"110px",borderRadius:"110px",backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"110px",flexShrink:0},children:d(f)}),g.jsx(P.Typography,{variant:"body1",sx:{color:p.enabled&&!(e==="stopping"&&!o)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3},children:p.label})]},p.label))})})})),Tl=Xe(Oe.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=P.useTheme(),{t:o}=_e.useTranslation(),s=()=>{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:o("ProgramStateIndicator.EStop.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case vr.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case vr.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case vr.STOPPING:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.error.main};case vr.ERROR:return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};case vr.IDLE:default:return{label:o("ProgramStateIndicator.Ready.lb"),color:a.palette.success.main}}return{label:o("ProgramStateIndicator.Idle.lb"),color:a.palette.grey[600]}},{label:i,color:l}=s(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return o("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return o("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return o("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return o("ProgramStateIndicator.ManualT2.lb");default:return o("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(P.Chip,{className:n,label:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:a.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),$h="0.0.0-semantically-released";function Vc(e){let t=$h;return $h.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function p3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Zf(r))}function Xf(e){return e.name.endsWith("_FLG")}function Zf(e){return/_J[0-9]+$/.test(e.name)}function m3(e,t){let r;function n(a){if(Xf(a)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${a.name}. Only one _FLG group is allowed.`);r=a}Zf(a),a.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 eg({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=J.useRef([]),o=J.useRef([]),s=J.useRef(null),{invalidate:i}=Ro.useThree();J.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new xc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Ro.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=p3(d),u(),i())}function c(d){var h;a.current=d,(h=s.current)==null||h.setTarget(d)}function u(){var h;const d=((h=s.current)==null?void 0:h.getCurrentValues())||[];if(r)r(o.current,d);else for(const[p,f]of o.current.entries()){const m=t[p],b=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+b}}return Sc(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const f3="line",g3="mesh";function y3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new Ot.Matrix4,a=J.useRef([]),o=J.useRef([]);J.useEffect(()=>{a.current=new Array(t.length).fill(null),o.current=new Array(t.length).fill(null)},[t.length]);function s(c,u){const d=new Ot.Vector3,h=new Ot.Quaternion,p=new Ot.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new Ot.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new Ot.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new Ot.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new Ot.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}=s(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=a.current[d],p=o.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(eg,{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}=s(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(st.Line,{ref:f=>{a.current[u]=f},name:f3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:g3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const b3=console.warn;function x3(){return J.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&b3(e)}},[]),g.jsx(g.Fragment,{})}function v3(e){return e.type==="Mesh"}function S3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=m3(st.useGLTF(e),e.split("/").pop()||e),o=J.useCallback(i=>{i&&r&&r()},[e]);function s(i){return v3(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:Xf(i)?t:void 0,children:i.children.map(s)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:o,children:s(a.scene)})}const O3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Be.Mesh){r.material instanceof Be.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new Be.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Be.DoubleSide}),n.userData.isGhost=!0,a.material=new Be.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Be.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},w3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Be.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Be.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},tg=Xe(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Vc,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=J.useState(null),u=J.useCallback(h=>{c(h)},[]);J.useEffect(()=>{l&&(s?O3(l,s):w3(l))},[l,s]);const d=g.jsx(y3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(Sg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(J.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(eg,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(S3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(x3,{})]})});function rg({connectedMotionGroup:e,getModel:t=Vc,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(tg,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}function Uh({connectedMotionGroup:e}){const t=st.useBounds();return Sc(()=>{var r;(r=e.rapidlyChangingMotionState)!=null&&r.state&&(e.rapidlyChangingMotionState.state.joint_position,e.rapidlyChangingMotionState.tcp_pose,t.refresh().clip().fit())}),null}const C3=Xe(Oe.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=rg,cycleTimerComponent:c=Am,onCycleTimerReady:u,onCycleEnd:d,cycleTimerAutoStart:h=!0,cycleTimerHasError:p=!1,className:f})=>{var se;const m=P.useTheme(),{t:b}=_e.useTranslation(),[S,E]=J.useState(!1),O=J.useRef(null),w=J.useRef(null),[A,C]=J.useState(!1),[T,V]=J.useState({width:400,height:600}),[j,y]=J.useState(0),R=J.useRef(null);J.useEffect(()=>{const H=()=>{if(w.current){const{offsetWidth:le,offsetHeight:xe}=w.current;C(le>xe),V({width:le,height:xe})}};H();const X=new ResizeObserver(H);return w.current&&X.observe(w.current),()=>{X.disconnect()}},[]);const z=J.useCallback(()=>{y(H=>H+1)},[]),I=J.useCallback(()=>{!a||!o||(E(!0),o())},[a,o]),G=J.useCallback(()=>{!a||!s||(E(!1),s())},[a,s]),ae=J.useCallback(()=>{S&&s&&(E(!1),s())},[S,s]),re=J.useCallback(H=>{R.current=H,u&&u(H)},[u]),te=A?T.width<350:T.height<200,ee=A?T.height<310:T.height<450;return g.jsx(P.Card,{ref:w,className:f,sx:{width:"100%",height:"100%",display:"flex",flexDirection:A?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:A?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${m.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((se=m.palette.backgroundPaperElevation)==null?void 0:se[8])||"#2A2A3F",backgroundImage:"none"},children:A?g.jsxs(g.Fragment,{children:[g.jsx(P.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:te?"none":"block"},children:!te&&g.jsxs(Ro.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:m.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(Ni,{}),g.jsxs(st.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:[g.jsx(Uh,{connectedMotionGroup:i}),g.jsx(l,{connectedMotionGroup:i,postModelRender:z})]})]})}),g.jsxs(P.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:te?"100%":"50%"},children:[g.jsxs(P.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(P.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Tl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(P.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!ee&&g.jsxs(P.Box,{children:[g.jsx(P.Typography,{variant:"body1",sx:{mb:0,color:m.palette.text.secondary,textAlign:"left"},children:b("RobotCard.Runtime.lb")}),g.jsx(P.Box,{sx:{textAlign:"left"},children:g.jsx(c,{variant:"small",compact:!0,onCycleComplete:re,onCycleEnd:d,autoStart:h,hasError:p})}),g.jsx(P.Divider,{sx:{mt:1,mb:0,borderColor:m.palette.divider,opacity:.5}})]}),g.jsx(P.Box,{sx:{mt:ee?0:"auto"},children:g.jsx(P.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(P.Button,{ref:O,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:I,onMouseUp:G,onMouseLeave:ae,onTouchStart:I,onTouchEnd:G,sx:{textTransform:"none",px:1.5,py:.5},children:b("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(P.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(P.Box,{children:[g.jsx(P.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Tl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(P.Box,{sx:{flex:te?0:1,position:"relative",minHeight:te?0:{xs:120,sm:150,md:200},height:te?0:"auto",borderRadius:1,overflow:"hidden",display:te?"none":"block"},children:!te&&g.jsxs(Ro.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:m.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ni,{}),g.jsxs(st.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:[g.jsx(Uh,{connectedMotionGroup:i}),g.jsx(l,{connectedMotionGroup:i,postModelRender:z})]})]})}),g.jsxs(P.Box,{children:[!ee&&g.jsxs(g.Fragment,{children:[g.jsx(P.Typography,{variant:"body1",sx:{mb:0,color:m.palette.text.secondary},children:b("RobotCard.Runtime.lb")}),g.jsx(c,{variant:"small",compact:!0,onCycleComplete:re,onCycleEnd:d,autoStart:h,hasError:p}),g.jsx(P.Divider,{sx:{mt:1,mb:0,borderColor:m.palette.divider,opacity:.5}})]}),g.jsx(P.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:ee?{xs:.5,sm:1,md:2}:{xs:1,sm:2,md:5},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(P.Button,{ref:O,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:I,onMouseUp:G,onMouseLeave:ae,onTouchStart:I,onTouchEnd:G,sx:{textTransform:"none",px:1.5,py:.5},children:b("RobotCard.DriveToHome.bt")})})]})]})})})})),P3=fr(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"),T3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),R3=J.forwardRef(T3);var Mc=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(Mc||{});const ng=Xe(Oe.observer(({setupState:e,className:t})=>{const r=P.useTheme(),{t:n}=_e.useTranslation(),a=()=>{var c,u,d,h;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"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.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}}},{label:o,indicatorColor:s,backgroundColor:i,textColor:l}=a();return g.jsx(P.Chip,{className:t,label:g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(P.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(P.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),A3=Xe(Oe.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=ng,className:a})=>{var l;const o=P.useTheme(),s=t||"Robot",i=r===Mc.READY;return g.jsxs(P.Box,{className:a,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(P.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsx(R3,{})}):g.jsx(P3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(P.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(P.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),_3=Array(6).fill(2*Math.PI),Rl={[Mt.Abb]:[0,0,0,0,Math.PI/2,0,0],[Mt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[Mt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[Mt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[Mt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function ag(e){const[t]=e.split("_");switch(t){case"ABB":return Mt.Abb;case"FANUC":return Mt.Fanuc;case"YASKAWA":return Mt.Yaskawa;case"KUKA":return Mt.Kuka;case"UniversalRobots":return Mt.Universalrobots;default:return null}}function E3(e,t){const r=ag(e);return r&&r in Rl?Rl[r]:t||null}const I3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),V3=J.forwardRef(I3),M3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),j3=J.forwardRef(M3),jt=Oe.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=Oe.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(P.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(P.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(P.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(P.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(P.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(P.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(P.Typography,{fontSize:"14px",children:s}),i&&g.jsx(P.Typography,{fontSize:"12px",children:i})]})})]})}),k3=Oe.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=P.useTheme(),{t:s}=_e.useTranslation();return e?g.jsx(jt,{id:"motion-group-virtual",icon:j3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(_e.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:V3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(_e.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),$3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),U3=J.forwardRef($3),D3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),L3=J.forwardRef(D3),B3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),N3=J.forwardRef(B3),F3=Oe.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=_e.useTranslation(),o=P.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(jt,{id:"operation-mode-auto",icon:U3,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:n?null:a("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:g.jsx(_e.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:N3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:n?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(_e.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:L3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:n?null:a("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(_e.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})}}),z3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),G3=J.forwardRef(z3),H3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),F.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"}),F.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"})),q3=J.forwardRef(H3),W3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),J3=J.forwardRef(W3),Y3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),K3=J.forwardRef(Y3),Q3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),X3=J.forwardRef(Q3),Z3=Oe.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=_e.useTranslation(),o=P.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(jt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:K3,color:o.palette.text.secondary,explanation:g.jsx(_e.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:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:q3,color:o.palette.error.main,explanation:g.jsx(_e.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:X3,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:n?null:a("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:g.jsx(_e.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:J3,color:o.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(_e.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:G3,color:o.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:n?null:a("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(_e.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:X2(e,`Unknown safety state ${e}`)}}),ej=Xe(Oe.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(P.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(Z3,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(F3,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(k3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),tj=P.styled(P.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:a})=>!a,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),rj=J.forwardRef((e,t)=>g.jsx(tj,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"}));function nj(e){const{children:t,value:r,index:n,...a}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...a,children:r===n&&g.jsx(P.Box,{children:t})})}const aj=Xe(Oe.observer(e=>{const{items:t,defaultActiveTab:r=0,onTabChange:n,sx:a}=e,[o,s]=J.useState(r),i=(l,c)=>{s(c),n==null||n(c)};return g.jsxs(P.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",...a},children:[g.jsx(P.Box,{sx:{px:3,pt:3,pb:3},children:g.jsx(P.Tabs,{value:o,onChange:i,sx:{minHeight:"auto",backgroundColor:"transparent",mt:3,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2}},children:t.map((l,c)=>g.jsx(P.Tab,{label:l.label,icon:l.icon,iconPosition:"start",disableRipple:!0,sx:{minHeight:"auto",minWidth:"auto",padding:"4px 8px",borderRadius:"10px",backgroundColor:u=>{var d;return((d=u.palette.backgroundPaperElevation)==null?void 0:d[11])||"#32344B"},color:"text.primary",opacity:o===c?1:.38,textTransform:"none",fontWeight:500,transition:"all 0.2s ease-in-out","&:hover":{opacity:o===c?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:u=>{var d;return((d=u.palette.backgroundPaperElevation)==null?void 0:d[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},l.id))})}),g.jsx(P.Box,{sx:{mx:3,borderBottom:1,borderColor:"divider"}}),g.jsx(P.Box,{sx:{flex:1,overflow:"auto"},children:t.map((l,c)=>g.jsx(nj,{value:o,index:c,children:l.content},l.id))})]})})),oj={$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"},sj=J.lazy(()=>import("@monaco-editor/react"));let Bi=null;async function ij(){if(!Bi){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Bi={shiki:await e({langs:[oj],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Bi}const lj=Xe(e=>{const t=P.useTheme(),[r,n]=J.useState("dark-plus"),a=t.palette.mode==="dark"?"dark-plus":"light-plus";async function o(s){var c,u;s.languages.register({id:"wandelscript"}),s.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await ij();l(i,s),s.editor.defineTheme(a,((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(s),n(a)}return g.jsx(J.Suspense,{fallback:g.jsx(Pc,{}),children:g.jsx(sj,{value:e.code,onMount:(s,i)=>{o(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function og(){var t,r,n,a,o,s,i;const e=P.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:(a=e.palette.backgroundPaperElevation)==null?void 0:a[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":P.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function cj(){const e=og();return e.palette.mode="light",e}function uj(e){var n,a,o,s;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((a=e.palette)==null?void 0:a.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?og():cj();return op(r,e)}exports.AppHeader=jg;exports.CycleTimer=Am;exports.JoggingCartesianAxisControl=al;exports.JoggingJointRotationControl=Mm;exports.JoggingPanel=t3;exports.JoggingStore=qs;exports.LoadingCover=Pc;exports.LoadingErrorMessage=Pf;exports.LogPanel=c3;exports.LogStore=Kf;exports.LogViewer=Qf;exports.MANUFACTURER_HOME_CONFIGS=Rl;exports.NoMotionGroupModal=d3;exports.PoseCartesianValues=n3;exports.PoseJointValues=a3;exports.PresetEnvironment=Ni;exports.ProgramControl=h3;exports.ProgramState=vr;exports.ProgramStateIndicator=Tl;exports.Robot=rg;exports.RobotCard=C3;exports.RobotListItem=A3;exports.RobotSetupReadinessIndicator=ng;exports.RobotSetupReadinessState=Mc;exports.SafetyBar=ej;exports.SafetyZonesRenderer=Ag;exports.SelectableFab=rj;exports.SupportedRobot=tg;exports.TabBar=aj;exports.TrajectoryRenderer=_g;exports.ValueInterpolator=xc;exports.VelocitySlider=Wf;exports.VelocitySliderLabel=Ic;exports.WandelbotsDataGrid=_m;exports.WandelscriptEditor=lj;exports.createDebugMessage=o3;exports.createErrorMessage=l3;exports.createInfoMessage=s3;exports.createLogMessage=$a;exports.createNovaMuiTheme=uj;exports.createWarningMessage=i3;exports.defaultAxisConfig=_3;exports.defaultGetModel=Vc;exports.extractManufacturer=ag;exports.getDefaultHomeConfig=E3;exports.i18n=_l;exports.useAnimationFrame=Rn;exports.useAutorun=Sc;exports.useInterpolation=Rm;exports.useMounted=Is;exports.useReaction=Em;
|
|
145
|
+
*/var e_=function(){if(typeof WebSocket<"u")return WebSocket},t_=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},yr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},r_=function(){function e(t,r,n){var o=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(a){o._debug("open event");var s=o._options.minUptime,i=s===void 0?yr.minUptime:s;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},i),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(l){return o._ws.send(l)}),o._messageQueue=[],o.onopen&&o.onopen(a),o._listeners.open.forEach(function(l){return o._callEventListener(a,l)})},this._handleMessage=function(a){o._debug("message event"),o.onmessage&&o.onmessage(a),o._listeners.message.forEach(function(s){return o._callEventListener(a,s)})},this._handleError=function(a){o._debug("error event",a.message),o._disconnect(void 0,a.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(a),o._debug("exec error listeners"),o._listeners.error.forEach(function(s){return o._callEventListener(a,s)}),o._connect()},this._handleClose=function(a){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(a),o._listeners.close.forEach(function(s){return o._callEventListener(a,s)})},this._url=t,this._protocols=r,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){var t=this._messageQueue.reduce(function(r,n){return typeof n=="string"?r+=n.length:n instanceof Blob?r+=n.size:r+=n.byteLength,r},0);return t+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(t,r){if(t===void 0&&(t=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(t,r)},e.prototype.reconnect=function(t,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,r),this._connect())},e.prototype.send=function(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{var r=this._options.maxEnqueuedMessages,n=r===void 0?yr.maxEnqueuedMessages:r;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,r){this._listeners[t]&&this._listeners[t].push(r)},e.prototype.dispatchEvent=function(t){var r,n,o=this._listeners[t.type];if(o)try{for(var a=YA(o),s=a.next();!s.done;s=a.next()){var i=s.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0},e.prototype.removeEventListener=function(t,r){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(n){return n!==r}))},e.prototype._debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._options.debug&&console.log.apply(console,QA(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?yr.reconnectionDelayGrowFactor:r,o=t.minReconnectionDelay,a=o===void 0?yr.minReconnectionDelay:o,s=t.maxReconnectionDelay,i=s===void 0?yr.maxReconnectionDelay:s,l=0;return this._retryCount>0&&(l=a*Math.pow(n,this._retryCount-1),l>i&&(l=i)),this._debug("next delay",l),l},e.prototype._wait=function(){var t=this;return new Promise(function(r){setTimeout(r,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var r=t();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var r=this._options,n=r.maxRetries,o=n===void 0?yr.maxRetries:n,a=r.connectionTimeout,s=a===void 0?yr.connectionTimeout:a,i=r.WebSocket,l=i===void 0?e_():i;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!t_(l))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(c){t._closeCalled||(t._debug("connect",{url:c,protocols:t._protocols}),t._ws=t._protocols?new l(c,t._protocols):new l(c),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},s))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new XA(Error("TIMEOUT"),this))},e.prototype._disconnect=function(t,r){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,r),this._handleClose(new ZA(t,r,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(t,r){"handleEvent"in r?r.handleEvent(t):r(t)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}(),n_=Object.defineProperty,o_=Object.defineProperties,a_=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,s_=Object.prototype.hasOwnProperty,i_=Object.prototype.propertyIsEnumerable,zd=(e,t,r)=>t in e?n_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ln=(e,t)=>{for(var r in t||(t={}))s_.call(t,r)&&zd(e,r,t[r]);if(Fd)for(var r of Fd(t))i_.call(t,r)&&zd(e,r,t[r]);return e},dl=(e,t)=>o_(e,a_(t)),Ve=(e,t,r)=>new Promise((n,o)=>{var a=l=>{try{i(r.next(l))}catch(c){o(c)}},s=l=>{try{i(r.throw(l))}catch(c){o(c)}},i=l=>l.done?n(l.value):Promise.resolve(l.value).then(a,s);i((r=r.apply(e,t)).next())}),l_=class extends r_{constructor(e,t={}){console.log("Opening websocket to",e),super(()=>this.targetUrl||e,void 0,{startClosed:!0}),this.opts=t,this.disposed=!1,Object.defineProperty(this,"url",{get(){return this.targetUrl}}),this.targetUrl=e,this.addEventListener("open",()=>{console.log(`Websocket to ${this.url} opened`)}),this.addEventListener("message",n=>{this.receivedFirstMessage||(this.receivedFirstMessage=n)}),this.addEventListener("close",()=>{console.log(`Websocket to ${this.url} closed`)});const r=this.reconnect;this.reconnect=()=>{this.opts.mock?this.opts.mock.handleWebsocketConnection(this):r.apply(this)},this.reconnect()}changeUrl(e){this.receivedFirstMessage=void 0,this.targetUrl=e,this.reconnect()}sendJson(e){this.opts.mock?this.opts.mock.handleWebsocketMessage(this,JSON.stringify(e)):this.send(JSON.stringify(e))}dispose(){this.close(),this.disposed=!0,this.opts.onDispose&&this.opts.onDispose()}opened(){return Ve(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return Ve(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return Ve(this,null,function*(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=o=>{this.receivedFirstMessage=o,this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})})}nextMessage(){return Ve(this,null,function*(){return new Promise((e,t)=>{const r=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})})}},c_=class{constructor(){this.available=typeof window<"u"&&!!window.localStorage}getJSON(e){if(!this.available)return null;const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}setJSON(e,t){if(!this.available)return null;window.localStorage.setItem(e,JSON.stringify(t))}delete(e){if(!this.available)return null;window.localStorage.removeItem(e)}setString(e,t){if(!this.available)return null;window.localStorage.setItem(e,t)}getString(e){return this.available?window.localStorage.getItem(e):null}},_i=new c_;function lr(e){try{return JSON.parse(e)}catch{return}}function u_(e,t){return e||(e="world"),t||(t="world"),e===t}var hn="wandelbots.io",Ei={dev:{domain:`https://auth.portal.dev.${hn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${hn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${hn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},d_=e=>{if(e.includes(`dev.${hn}`))return Ei.dev;if(e.includes(`stg.${hn}`))return Ei.stg;if(e.includes(hn))return Ei.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},h_=e=>Ve(void 0,null,function*(){var t;if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const r=d_(e);if(new URL(e).origin===window.location.origin)throw window.location.reload(),new Error("Failed to reload page to get auth details, please refresh manually");const{Auth0Client:n}=yield Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-BLRAk7Yh.cjs")),o=new n({domain:r.domain,clientId:(t=r.clientId)!=null?t:"",useRefreshTokens:!1,authorizationParams:{audience:"nova-api",redirect_uri:window.location.origin}});if(window.location.search.includes("code=")&&window.location.search.includes("state=")){const{appState:s}=yield o.handleRedirectCallback();window.history.replaceState({},document.title,(s==null?void 0:s.returnTo)||window.location.pathname)}else yield o.loginWithRedirect();return yield o.getTokenSilently()});function Ym(e,t){return function(){return e.apply(t,arguments)}}const{toString:p_}=Object.prototype,{getPrototypeOf:Oc}=Object,$s=(e=>t=>{const r=p_.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>$s(t)===e),Us=e=>t=>typeof t===e,{isArray:Mn}=Array,wo=Us("undefined");function m_(e){return e!==null&&!wo(e)&&e.constructor!==null&&!wo(e.constructor)&&ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Km=Rt("ArrayBuffer");function f_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Km(e.buffer),t}const g_=Us("string"),ht=Us("function"),Qm=Us("number"),Ds=e=>e!==null&&typeof e=="object",y_=e=>e===!0||e===!1,Oa=e=>{if($s(e)!=="object")return!1;const t=Oc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},b_=Rt("Date"),x_=Rt("File"),v_=Rt("Blob"),S_=Rt("FileList"),O_=e=>Ds(e)&&ht(e.pipe),w_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ht(e.append)&&((t=$s(e))==="formdata"||t==="object"&&ht(e.toString)&&e.toString()==="[object FormData]"))},C_=Rt("URLSearchParams"),[P_,T_,R_,A_]=["ReadableStream","Request","Response","Headers"].map(Rt),__=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ko(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Mn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let i;for(n=0;n<s;n++)i=a[n],t.call(null,e[i],i,e)}}function Xm(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const wr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zm=e=>!wo(e)&&e!==wr;function hl(){const{caseless:e}=Zm(this)&&this||{},t={},r=(n,o)=>{const a=e&&Xm(t,o)||o;Oa(t[a])&&Oa(n)?t[a]=hl(t[a],n):Oa(n)?t[a]=hl({},n):Mn(n)?t[a]=n.slice():t[a]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&ko(arguments[n],r);return t}const E_=(e,t,r,{allOwnKeys:n}={})=>(ko(t,(o,a)=>{r&&ht(o)?e[a]=Ym(o,r):e[a]=o},{allOwnKeys:n}),e),I_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),V_=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},M_=(e,t,r,n)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!n||n(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=r!==!1&&Oc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},j_=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},k_=e=>{if(!e)return null;if(Mn(e))return e;let t=e.length;if(!Qm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},$_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Oc(Uint8Array)),U_=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},D_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},L_=Rt("HTMLFormElement"),B_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Gd=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),N_=Rt("RegExp"),ef=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ko(r,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(n[a]=s||o)}),Object.defineProperties(e,n)},F_=e=>{ef(e,(t,r)=>{if(ht(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ht(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},z_=(e,t)=>{const r={},n=o=>{o.forEach(a=>{r[a]=!0})};return Mn(e)?n(e):n(String(e).split(t)),r},G_=()=>{},H_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function q_(e){return!!(e&&ht(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const W_=e=>{const t=new Array(10),r=(n,o)=>{if(Ds(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const a=Mn(n)?[]:{};return ko(n,(s,i)=>{const l=r(s,o+1);!wo(l)&&(a[i]=l)}),t[o]=void 0,a}}return n};return r(e,0)},J_=Rt("AsyncFunction"),Y_=e=>e&&(Ds(e)||ht(e))&&ht(e.then)&&ht(e.catch),tf=((e,t)=>e?setImmediate:t?((r,n)=>(wr.addEventListener("message",({source:o,data:a})=>{o===wr&&a===r&&n.length&&n.shift()()},!1),o=>{n.push(o),wr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ht(wr.postMessage)),K_=typeof queueMicrotask<"u"?queueMicrotask.bind(wr):typeof process<"u"&&process.nextTick||tf,q={isArray:Mn,isArrayBuffer:Km,isBuffer:m_,isFormData:w_,isArrayBufferView:f_,isString:g_,isNumber:Qm,isBoolean:y_,isObject:Ds,isPlainObject:Oa,isReadableStream:P_,isRequest:T_,isResponse:R_,isHeaders:A_,isUndefined:wo,isDate:b_,isFile:x_,isBlob:v_,isRegExp:N_,isFunction:ht,isStream:O_,isURLSearchParams:C_,isTypedArray:$_,isFileList:S_,forEach:ko,merge:hl,extend:E_,trim:__,stripBOM:I_,inherits:V_,toFlatObject:M_,kindOf:$s,kindOfTest:Rt,endsWith:j_,toArray:k_,forEachEntry:U_,matchAll:D_,isHTMLForm:L_,hasOwnProperty:Gd,hasOwnProp:Gd,reduceDescriptors:ef,freezeMethods:F_,toObjectSet:z_,toCamelCase:B_,noop:G_,toFiniteNumber:H_,findKey:Xm,global:wr,isContextDefined:Zm,isSpecCompliantForm:q_,toJSONObject:W_,isAsyncFn:J_,isThenable:Y_,setImmediate:tf,asap:K_};function pe(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}q.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const rf=pe.prototype,nf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{nf[e]={value:e}});Object.defineProperties(pe,nf);Object.defineProperty(rf,"isAxiosError",{value:!0});pe.from=(e,t,r,n,o,a)=>{const s=Object.create(rf);return q.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),pe.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const Q_=null;function pl(e){return q.isPlainObject(e)||q.isArray(e)}function of(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Hd(e,t,r){return e?e.concat(t).map(function(o,a){return o=of(o),!r&&a?"["+o+"]":o}).join(r?".":""):t}function X_(e){return q.isArray(e)&&!e.some(pl)}const Z_=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Ls(e,t,r){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!q.isUndefined(b[m])});const n=r.metaTokens,o=r.visitor||u,a=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(q.isDate(f))return f.toISOString();if(!l&&q.isBlob(f))throw new pe("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(f)||q.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,b){let S=f;if(f&&!b&&typeof f=="object"){if(q.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(q.isArray(f)&&X_(f)||(q.isFileList(f)||q.endsWith(m,"[]"))&&(S=q.toArray(f)))return m=of(m),S.forEach(function(O,w){!(q.isUndefined(O)||O===null)&&t.append(s===!0?Hd([m],w,a):s===null?m:m+"[]",c(O))}),!1}return pl(f)?!0:(t.append(Hd(b,m,a),c(f)),!1)}const d=[],h=Object.assign(Z_,{defaultVisitor:u,convertValue:c,isVisitable:pl});function p(f,m){if(!q.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),q.forEach(f,function(S,E){(!(q.isUndefined(S)||S===null)&&o.call(t,S,q.isString(E)?E.trim():E,m,h))===!0&&p(S,m?m.concat(E):[E])}),d.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return p(e),t}function qd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function wc(e,t){this._pairs=[],e&&Ls(e,this,t)}const af=wc.prototype;af.append=function(t,r){this._pairs.push([t,r])};af.toString=function(t){const r=t?function(n){return t.call(this,n,qd)}:qd;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function eE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function sf(e,t,r){if(!t)return e;const n=r&&r.encode||eE;q.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let a;if(o?a=o(t,r):a=q.isURLSearchParams(t)?t.toString():new wc(t,r).toString(n),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Wd{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(n){n!==null&&t(n)})}}const lf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tE=typeof URLSearchParams<"u"?URLSearchParams:wc,rE=typeof FormData<"u"?FormData:null,nE=typeof Blob<"u"?Blob:null,oE={isBrowser:!0,classes:{URLSearchParams:tE,FormData:rE,Blob:nE},protocols:["http","https","file","blob","url","data"]},Cc=typeof window<"u"&&typeof document<"u",ml=typeof navigator=="object"&&navigator||void 0,aE=Cc&&(!ml||["ReactNative","NativeScript","NS"].indexOf(ml.product)<0),sE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iE=Cc&&window.location.href||"http://localhost",lE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cc,hasStandardBrowserEnv:aE,hasStandardBrowserWebWorkerEnv:sE,navigator:ml,origin:iE},Symbol.toStringTag,{value:"Module"})),et={...lE,...oE};function cE(e,t){return Ls(e,new et.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,a){return et.isNode&&q.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function uE(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dE(e){const t={},r=Object.keys(e);let n;const o=r.length;let a;for(n=0;n<o;n++)a=r[n],t[a]=e[a];return t}function cf(e){function t(r,n,o,a){let s=r[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=a>=r.length;return s=!s&&q.isArray(o)?o.length:s,l?(q.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!i):((!o[s]||!q.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],a)&&q.isArray(o[s])&&(o[s]=dE(o[s])),!i)}if(q.isFormData(e)&&q.isFunction(e.entries)){const r={};return q.forEachEntry(e,(n,o)=>{t(uE(n),o,r,0)}),r}return null}function hE(e,t,r){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const $o={transitional:lf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,a=q.isObject(t);if(a&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return o?JSON.stringify(cf(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return cE(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ls(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||o?(r.setContentType("application/json",!1),hE(t)):t}],transformResponse:[function(t){const r=this.transitional||$o.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?pe.from(i,pe.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{$o.headers[e]={}});const pE=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mE=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
146
|
+
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&pE[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Jd=Symbol("internals");function Wn(e){return e&&String(e).trim().toLowerCase()}function wa(e){return e===!1||e==null?e:q.isArray(e)?e.map(wa):String(e)}function fE(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const gE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ii(e,t,r,n,o){if(q.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!q.isString(t)){if(q.isString(n))return t.indexOf(n)!==-1;if(q.isRegExp(n))return n.test(t)}}function yE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function bE(e,t){const r=q.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,a,s){return this[n].call(this,t,o,a,s)},configurable:!0})})}let ct=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function a(i,l,c){const u=Wn(l);if(!u)throw new Error("header name must be a non-empty string");const d=q.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=wa(i))}const s=(i,l)=>q.forEach(i,(c,u)=>a(c,u,l));if(q.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(q.isString(t)&&(t=t.trim())&&!gE(t))s(mE(t),r);else if(q.isHeaders(t))for(const[i,l]of t.entries())a(l,i,n);else t!=null&&a(r,t,n);return this}get(t,r){if(t=Wn(t),t){const n=q.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return fE(o);if(q.isFunction(r))return r.call(this,o,n);if(q.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Wn(t),t){const n=q.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ii(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function a(s){if(s=Wn(s),s){const i=q.findKey(n,s);i&&(!r||Ii(n,n[i],i,r))&&(delete n[i],o=!0)}}return q.isArray(t)?t.forEach(a):a(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const a=r[n];(!t||Ii(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const r=this,n={};return q.forEach(this,(o,a)=>{const s=q.findKey(n,a);if(s){r[s]=wa(o),delete r[a];return}const i=t?yE(a):String(a).trim();i!==a&&delete r[a],r[i]=wa(o),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return q.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&q.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
147
|
+
`)}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[Jd]=this[Jd]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=Wn(s);n[i]||(bE(o,s),n[i]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(ct.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});q.freezeMethods(ct);function Vi(e,t){const r=this||$o,n=t||r,o=ct.from(n.headers);let a=n.data;return q.forEach(e,function(i){a=i.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function uf(e){return!!(e&&e.__CANCEL__)}function jn(e,t,r){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,r),this.name="CanceledError"}q.inherits(jn,pe,{__CANCEL__:!0});function df(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new pe("Request failed with status code "+r.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function xE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vE(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[a];s||(s=c),r[o]=l,n[o]=c;let d=a,h=0;for(;d!==o;)h+=r[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-s<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function SE(e,t){let r=0,n=1e3/t,o,a;const s=(c,u=Date.now())=>{r=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(o=c,a||(a=setTimeout(()=>{a=null,s(o)},n-d)))},()=>o&&s(o)]}const Ka=(e,t,r=3)=>{let n=0;const o=vE(50,250);return SE(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,l=s-n,c=o(l),u=s<=i;n=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Yd=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Kd=e=>(...t)=>q.asap(()=>e(...t)),OE=et.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,et.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,wE=et.hasStandardBrowserEnv?{write(e,t,r,n,o,a){const s=[e+"="+encodeURIComponent(t)];q.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),q.isString(n)&&s.push("path="+n),q.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function CE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function PE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hf(e,t,r){let n=!CE(t);return e&&n||r==!1?PE(e,t):t}const Qd=e=>e instanceof ct?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(c,u,d,h){return q.isPlainObject(c)&&q.isPlainObject(u)?q.merge.call({caseless:h},c,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function o(c,u,d,h){if(q.isUndefined(u)){if(!q.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function a(c,u){if(!q.isUndefined(u))return n(void 0,u)}function s(c,u){if(q.isUndefined(u)){if(!q.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:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(c,u,d)=>o(Qd(c),Qd(u),d,!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,h=d(e[u],t[u],u);q.isUndefined(h)&&d!==i||(r[u]=h)}),r}const pf=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=ct.from(s),t.url=sf(hf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(q.isFormData(r)){if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(et.hasStandardBrowserEnv&&(n&&q.isFunction(n)&&(n=n(t)),n||n!==!1&&OE(t.url))){const c=o&&a&&wE.read(a);c&&s.set(o,c)}return t},TE=typeof XMLHttpRequest<"u",RE=TE&&function(e){return new Promise(function(r,n){const o=pf(e);let a=o.data;const s=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 b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const O=ct.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),A={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:O,config:e,request:b};df(function(T){r(T),m()},function(T){n(T),m()},A),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new pe("Request aborted",pe.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new pe("Network Error",pe.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||lf;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),n(new pe(w,A.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,b)),b=null},a===void 0&&s.setContentType(null),"setRequestHeader"in b&&q.forEach(s.toJSON(),function(w,A){b.setRequestHeader(A,w)}),q.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),i&&i!=="json"&&(b.responseType=o.responseType),c&&([h,f]=Ka(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=Ka(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=O=>{b&&(n(!O||O.type?new jn(null,e,b):O),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const E=xE(o.url);if(E&&et.protocols.indexOf(E)===-1){n(new pe("Unsupported protocol "+E+":",pe.ERR_BAD_REQUEST,e));return}b.send(a||null)})},AE=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const a=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof pe?u:new jn(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,a(new pe(`timeout ${t} of ms exceeded`,pe.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>q.asap(i),l}},_E=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},EE=async function*(e,t){for await(const r of IE(e))yield*_E(r,t)},IE=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()}},Xd=(e,t,r,n)=>{const o=EE(e,t);let a=0,s,i=l=>{s||(s=!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=a+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Bs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mf=Bs&&typeof ReadableStream=="function",VE=Bs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ff=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ME=mf&&ff(()=>{let e=!1;const t=new Request(et.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Zd=64*1024,fl=mf&&ff(()=>q.isReadableStream(new Response("").body)),Qa={stream:fl&&(e=>e.body)};Bs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Qa[t]&&(Qa[t]=q.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new pe(`Response type '${t}' is not supported`,pe.ERR_NOT_SUPPORT,n)})})})(new Response);const jE=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(et.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await VE(e)).byteLength},kE=async(e,t)=>{const r=q.toFiniteNumber(e.getContentLength());return r??jE(t)},$E=Bs&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=pf(e);c=c?(c+"").toLowerCase():"text";let p=AE([o,a&&a.toAbortSignal()],s),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(l&&ME&&r!=="get"&&r!=="head"&&(b=await kE(u,n))!==0){let A=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(q.isFormData(n)&&(C=A.headers.get("content-type"))&&u.setContentType(C),A.body){const[T,V]=Yd(b,Ka(Kd(l)));n=Xd(A.body,Zd,T,V)}}q.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;f=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:S?d:void 0});let E=await fetch(f);const O=fl&&(c==="stream"||c==="response");if(fl&&(i||O&&m)){const A={};["status","statusText","headers"].forEach(j=>{A[j]=E[j]});const C=q.toFiniteNumber(E.headers.get("content-length")),[T,V]=i&&Yd(C,Ka(Kd(i),!0))||[];E=new Response(Xd(E.body,Zd,T,()=>{V&&V(),m&&m()}),A)}c=c||"text";let w=await Qa[q.findKey(Qa,c)||"text"](E,e);return!O&&m&&m(),await new Promise((A,C)=>{df(A,C,{data:w,headers:ct.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:f})})}catch(S){throw m&&m(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,e,f),{cause:S.cause||S}):pe.from(S,S&&S.code,e,f)}}),gl={http:Q_,xhr:RE,fetch:$E};q.forEach(gl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const eh=e=>`- ${e}`,UE=e=>q.isFunction(e)||e===null||e===!1,gf={getAdapter:e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let a=0;a<t;a++){r=e[a];let s;if(n=r,!UE(r)&&(n=gl[(s=String(r)).toLowerCase()],n===void 0))throw new pe(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+a]=n}if(!n){const a=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
|
|
148
|
+
`+a.map(eh).join(`
|
|
149
|
+
`):" "+eh(a[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:gl};function Mi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jn(null,e)}function th(e){return Mi(e),e.headers=ct.from(e.headers),e.data=Vi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gf.getAdapter(e.adapter||$o.adapter)(e).then(function(n){return Mi(e),n.data=Vi.call(e,e.transformResponse,n),n.headers=ct.from(n.headers),n},function(n){return uf(n)||(Mi(e),n&&n.response&&(n.response.data=Vi.call(e,e.transformResponse,n.response),n.response.headers=ct.from(n.response.headers))),Promise.reject(n)})}const yf="1.8.3",Ns={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ns[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const rh={};Ns.transitional=function(t,r,n){function o(a,s){return"[Axios v"+yf+"] Transitional option '"+a+"'"+s+(n?". "+n:"")}return(a,s,i)=>{if(t===!1)throw new pe(o(s," has been removed"+(r?" in "+r:"")),pe.ERR_DEPRECATED);return r&&!rh[s]&&(rh[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,i):!0}};Ns.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function DE(e,t,r){if(typeof e!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],s=t[a];if(s){const i=e[a],l=i===void 0||s(i,a,e);if(l!==!0)throw new pe("option "+a+" must be "+l,pe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new pe("Unknown option "+a,pe.ERR_BAD_OPTION)}}const Ca={assertOptions:DE,validators:Ns},Et=Ca.validators;let Tr=class{constructor(t){this.defaults=t,this.interceptors={request:new Wd,response:new Wd}}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 a=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
150
|
+
`+a):n.stack=a}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:a}=r;n!==void 0&&Ca.assertOptions(n,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean)},!1),o!=null&&(q.isFunction(o)?r.paramsSerializer={serialize:o}:Ca.assertOptions(o,{encode:Et.function,serialize:Et.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ca.assertOptions(r,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=a&&q.merge(a.common,a[r.method]);a&&q.forEach(["delete","get","head","post","put","patch","common"],f=>{delete a[f]}),r.headers=ct.concat(s,a);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=[th.bind(this),void 0];for(f.unshift.apply(f,i),f.push.apply(f,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=0;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(b){m.call(this,b);break}}try{u=th.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=hf(t.baseURL,t.url,t.allowAbsoluteUrls);return sf(r,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Tr.prototype[t]=function(r,n){return this.request(Ir(n||{},{method:t,url:r,data:(n||{}).data}))}});q.forEach(["post","put","patch"],function(t){function r(n){return function(a,s,i){return this.request(Ir(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}Tr.prototype[t]=r(),Tr.prototype[t+"Form"]=r(!0)});let LE=class bf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(o=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](o);n._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(i=>{n.subscribe(i),a=i}).then(o);return s.cancel=function(){n.unsubscribe(a)},s},t(function(a,s,i){n.reason||(n.reason=new jn(a,s,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 bf(function(o){t=o}),cancel:t}}};function BE(e){return function(r){return e.apply(null,r)}}function NE(e){return q.isObject(e)&&e.isAxiosError===!0}const yl={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};Object.entries(yl).forEach(([e,t])=>{yl[t]=e});function xf(e){const t=new Tr(e),r=Ym(Tr.prototype.request,t);return q.extend(r,Tr.prototype,t,{allOwnKeys:!0}),q.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return xf(Ir(e,o))},r}const _=xf($o);_.Axios=Tr;_.CanceledError=jn;_.CancelToken=LE;_.isCancel=uf;_.VERSION=yf;_.toFormData=Ls;_.AxiosError=pe;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=BE;_.isAxiosError=NE;_.mergeConfig=Ir;_.AxiosHeaders=ct;_.formToJSON=e=>cf(q.isHTMLForm(e)?new FormData(e):e);_.getAdapter=gf.getAdapter;_.HttpStatusCode=yl;_.default=_;const{Axios:mj,AxiosError:bl,CanceledError:fj,isCancel:gj,CancelToken:yj,VERSION:bj,all:xj,Cancel:vj,isAxiosError:FE,spread:Sj,toFormData:Oj,AxiosHeaders:wj,HttpStatusCode:Cj,formToJSON:Pj,getAdapter:Tj,mergeConfig:Rj}=_,M="/api/v1".replace(/\/+$/,"");class Me{constructor(t,r=M,n=_){$n(this,"basePath");$n(this,"axios");$n(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class zE extends Error{constructor(r,n){super(n);$n(this,"field");this.field=r,this.name="RequiredError"}}const k={},$="https://example.com",v=function(e,t,r){if(r==null)throw new zE(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},U=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},D=async function(e,t){if(t&&t.accessToken){const r=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+r}};function xl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>xl(e,n,r)):Object.keys(t).forEach(n=>xl(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const L=function(e,...t){const r=new URLSearchParams(e.search);xl(r,t),e.search=r.toString()},he=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||""},B=function(e){return e.pathname+e.search+e.hash},N=function(e,t,r,n){return(o=t,a=r)=>{const s={...e.options,url:(o.defaults.baseURL?"":(n==null?void 0:n.basePath)??a)+e.url};return o.request(s)}},Mt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},GE=function(e){return{addApp:async(t,r,n,o={})=>{v("addApp","cell",t),v("addApp","app",r);const a="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(r,l,e),{url:B(s),options:l}},clearApps:async(t,r,n={})=>{v("clearApps","cell",t);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deleteApp:async(t,r,n,o={})=>{v("deleteApp","cell",t),v("deleteApp","app",r);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},getApp:async(t,r,n={})=>{v("getApp","cell",t),v("getApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listApps:async(t,r={})=>{v("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},updateApp:async(t,r,n,o,a={})=>{v("updateApp","cell",t),v("updateApp","app",r),v("updateApp","app2",n);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...a},u={},d={};U(c,e),await D(u,e),o!==void 0&&(d.completionTimeout=o),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},c.data=he(n,c,e),{url:B(i),options:c}}}},Xr=function(e){const t=GE(e);return{async addApp(r,n,o,a){var c,u;const s=await t.addApp(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async clearApps(r,n,o){var l,c;const a=await t.clearApps(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ApplicationApi.clearApps"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteApp(r,n,o,a){var c,u;const s=await t.deleteApp(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getApp(r,n,o){var l,c;const a=await t.getApp(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ApplicationApi.getApp"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listApps(r,n){var i,l;const o=await t.listApps(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ApplicationApi.listApps"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async updateApp(r,n,o,a,s){var u,d;const i=await t.updateApp(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class nh extends Me{addApp(t,r,n,o){return Xr(this.configuration).addApp(t,r,n,o).then(a=>a(this.axios,this.basePath))}clearApps(t,r,n){return Xr(this.configuration).clearApps(t,r,n).then(o=>o(this.axios,this.basePath))}deleteApp(t,r,n,o){return Xr(this.configuration).deleteApp(t,r,n,o).then(a=>a(this.axios,this.basePath))}getApp(t,r,n){return Xr(this.configuration).getApp(t,r,n).then(o=>o(this.axios,this.basePath))}listApps(t,r){return Xr(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,o,a){return Xr(this.configuration).updateApp(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}}const HE=function(e){return{deleteCell:async(t,r,n={})=>{v("deleteCell","cell",t);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deployCell:async(t,r,n={})=>{v("deployCell","cell",t);const o="/cells",a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(t,i,e),{url:B(a),options:i}},getCell:async(t,r={})=>{v("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},getCellStatus:async(t,r={})=>{v("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},listCells:async(t={})=>{const r="/cells",n=new URL(r,$);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...t},s={},i={};U(a,e),await D(s,e),L(n,i);let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...t.headers},{url:B(n),options:a}},updateCell:async(t,r,n,o={})=>{v("updateCell","cell",t),v("updateCell","cell2",r);const a="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(r,l,e),{url:B(s),options:l}}}},Zr=function(e){const t=HE(e);return{async deleteCell(r,n,o){var l,c;const a=await t.deleteCell(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CellApi.deleteCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deployCell(r,n,o){var l,c;const a=await t.deployCell(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CellApi.deployCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getCell(r,n){var i,l;const o=await t.getCell(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["CellApi.getCell"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async getCellStatus(r,n){var i,l;const o=await t.getCellStatus(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["CellApi.getCellStatus"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async listCells(r){var s,i;const n=await t.listCells(r),o=(e==null?void 0:e.serverIndex)??0,a=(i=(s=k["CellApi.listCells"])==null?void 0:s[o])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,a||c)},async updateCell(r,n,o,a){var c,u;const s=await t.updateCell(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class qE extends Me{deleteCell(t,r,n){return Zr(this.configuration).deleteCell(t,r,n).then(o=>o(this.axios,this.basePath))}deployCell(t,r,n){return Zr(this.configuration).deployCell(t,r,n).then(o=>o(this.axios,this.basePath))}getCell(t,r){return Zr(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return Zr(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return Zr(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,o){return Zr(this.configuration).updateCell(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const WE=function(e){return{addRobotController:async(t,r,n,o={})=>{v("addRobotController","cell",t),v("addRobotController","robotController",r);const a="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(r,l,e),{url:B(s),options:l}},clearRobotControllers:async(t,r,n={})=>{v("clearRobotControllers","cell",t);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deleteRobotController:async(t,r,n,o={})=>{v("deleteRobotController","cell",t),v("deleteRobotController","controller",r);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{v("getCurrentRobotControllerState","cell",t),v("getCurrentRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getMode:async(t,r,n={})=>{v("getMode","cell",t),v("getMode","controller",r);const o="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getRobotController:async(t,r,n={})=>{v("getRobotController","cell",t),v("getRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getSupportedModes:async(t,r,n={})=>{v("getSupportedModes","cell",t),v("getSupportedModes","controller",r);const o="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{v("getVirtualRobotConfiguration","cell",t),v("getVirtualRobotConfiguration","controller",r);const o="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listControllers:async(t,r={})=>{v("listControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},setDefaultMode:async(t,r,n,o={})=>{v("setDefaultMode","cell",t),v("setDefaultMode","controller",r),v("setDefaultMode","mode",n);const a="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.mode=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},streamFreeDrive:async(t,r,n,o={})=>{v("streamFreeDrive","cell",t),v("streamFreeDrive","controller",r);const a="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.response_rate=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},streamModeChange:async(t,r,n={})=>{v("streamModeChange","cell",t),v("streamModeChange","controller",r);const o="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},streamRobotControllerState:async(t,r,n,o={})=>{v("streamRobotControllerState","cell",t),v("streamRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.response_rate=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},updateRobotController:async(t,r,n,o,a={})=>{v("updateRobotController","cell",t),v("updateRobotController","controller",r),v("updateRobotController","robotController",n);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...a},u={},d={};U(c,e),await D(u,e),o!==void 0&&(d.completionTimeout=o),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},c.data=he(n,c,e),{url:B(i),options:c}}}},ot=function(e){const t=WE(e);return{async addRobotController(r,n,o,a){var c,u;const s=await t.addRobotController(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async clearRobotControllers(r,n,o){var l,c;const a=await t.clearRobotControllers(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.clearRobotControllers"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteRobotController(r,n,o,a){var c,u;const s=await t.deleteRobotController(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getCurrentRobotControllerState(r,n,o){var l,c;const a=await t.getCurrentRobotControllerState(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getMode(r,n,o){var l,c;const a=await t.getMode(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getRobotController(r,n,o){var l,c;const a=await t.getRobotController(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getRobotController"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getSupportedModes(r,n,o){var l,c;const a=await t.getSupportedModes(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getSupportedModes"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getVirtualRobotConfiguration(r,n,o){var l,c;const a=await t.getVirtualRobotConfiguration(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listControllers(r,n){var i,l;const o=await t.listControllers(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ControllerApi.listControllers"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async setDefaultMode(r,n,o,a){var c,u;const s=await t.setDefaultMode(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamFreeDrive(r,n,o,a){var c,u;const s=await t.streamFreeDrive(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamModeChange(r,n,o){var l,c;const a=await t.streamModeChange(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.streamModeChange"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async streamRobotControllerState(r,n,o,a){var c,u;const s=await t.streamRobotControllerState(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async updateRobotController(r,n,o,a,s){var u,d;const i=await t.updateRobotController(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class JE extends Me{addRobotController(t,r,n,o){return ot(this.configuration).addRobotController(t,r,n,o).then(a=>a(this.axios,this.basePath))}clearRobotControllers(t,r,n){return ot(this.configuration).clearRobotControllers(t,r,n).then(o=>o(this.axios,this.basePath))}deleteRobotController(t,r,n,o){return ot(this.configuration).deleteRobotController(t,r,n,o).then(a=>a(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return ot(this.configuration).getCurrentRobotControllerState(t,r,n).then(o=>o(this.axios,this.basePath))}getMode(t,r,n){return ot(this.configuration).getMode(t,r,n).then(o=>o(this.axios,this.basePath))}getRobotController(t,r,n){return ot(this.configuration).getRobotController(t,r,n).then(o=>o(this.axios,this.basePath))}getSupportedModes(t,r,n){return ot(this.configuration).getSupportedModes(t,r,n).then(o=>o(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return ot(this.configuration).getVirtualRobotConfiguration(t,r,n).then(o=>o(this.axios,this.basePath))}listControllers(t,r){return ot(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,o){return ot(this.configuration).setDefaultMode(t,r,n,o).then(a=>a(this.axios,this.basePath))}streamFreeDrive(t,r,n,o){return ot(this.configuration).streamFreeDrive(t,r,n,o).then(a=>a(this.axios,this.basePath))}streamModeChange(t,r,n){return ot(this.configuration).streamModeChange(t,r,n).then(o=>o(this.axios,this.basePath))}streamRobotControllerState(t,r,n,o){return ot(this.configuration).streamRobotControllerState(t,r,n,o).then(a=>a(this.axios,this.basePath))}updateRobotController(t,r,n,o,a){return ot(this.configuration).updateRobotController(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}}const YE=function(e){return{listIODescriptions:async(t,r,n,o={})=>{v("listIODescriptions","cell",t),v("listIODescriptions","controller",r);const a="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},listIOValues:async(t,r,n,o={})=>{v("listIOValues","cell",t),v("listIOValues","controller",r);const a="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},setOutputValues:async(t,r,n,o={})=>{v("setOutputValues","cell",t),v("setOutputValues","controller",r),v("setOutputValues","iOValue",n);const a="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},streamIOValues:async(t,r,n,o={})=>{v("streamIOValues","cell",t),v("streamIOValues","controller",r);const a="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},waitForIOEvent:async(t,r,n,o,a,s,i,l={})=>{v("waitForIOEvent","cell",t),v("waitForIOEvent","controller",r),v("waitForIOEvent","io",n),v("waitForIOEvent","comparisonType",o);const c="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),u=new URL(c,$);let d;e&&(d=e.baseOptions);const h={method:"GET",...d,...l},p={},f={};U(h,e),await D(p,e),n!==void 0&&(f.io=n),o!==void 0&&(f.comparison_type=o),a!==void 0&&(f.boolean_value=a),s!==void 0&&(f.integer_value=s),i!==void 0&&(f.floating_value=i),L(u,f);let m=d&&d.headers?d.headers:{};return h.headers={...p,...m,...l.headers},{url:B(u),options:h}}}},Jn=function(e){const t=YE(e);return{async listIODescriptions(r,n,o,a){var c,u;const s=await t.listIODescriptions(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listIOValues(r,n,o,a){var c,u;const s=await t.listIOValues(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async setOutputValues(r,n,o,a){var c,u;const s=await t.setOutputValues(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamIOValues(r,n,o,a){var c,u;const s=await t.streamIOValues(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async waitForIOEvent(r,n,o,a,s,i,l,c){var p,f;const u=await t.waitForIOEvent(r,n,o,a,s,i,l,c),d=(e==null?void 0:e.serverIndex)??0,h=(f=(p=k["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,b)=>N(u,_,M,e)(m,h||b)}}};class KE extends Me{listIODescriptions(t,r,n,o){return Jn(this.configuration).listIODescriptions(t,r,n,o).then(a=>a(this.axios,this.basePath))}listIOValues(t,r,n,o){return Jn(this.configuration).listIOValues(t,r,n,o).then(a=>a(this.axios,this.basePath))}setOutputValues(t,r,n,o){return Jn(this.configuration).setOutputValues(t,r,n,o).then(a=>a(this.axios,this.basePath))}streamIOValues(t,r,n,o){return Jn(this.configuration).streamIOValues(t,r,n,o).then(a=>a(this.axios,this.basePath))}waitForIOEvent(t,r,n,o,a,s,i,l){return Jn(this.configuration).waitForIOEvent(t,r,n,o,a,s,i,l).then(c=>c(this.axios,this.basePath))}}const QE=function(e){return{addCoordinateSystem:async(t,r,n={})=>{v("addCoordinateSystem","cell",t),v("addCoordinateSystem","addRequest",r);const o="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{v("deleteCoordinateSystem","cell",t),v("deleteCoordinateSystem","coordinateSystem",r);const o="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getCoordinateSystem:async(t,r,n,o={})=>{v("getCoordinateSystem","cell",t),v("getCoordinateSystem","coordinateSystem",r);const a="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},listCoordinateSystems:async(t,r,n={})=>{v("listCoordinateSystems","cell",t);const o="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.rotation_type=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},transformInCoordinateSystem:async(t,r,n,o={})=>{v("transformInCoordinateSystem","cell",t),v("transformInCoordinateSystem","coordinateSystem",r),v("transformInCoordinateSystem","pose",n);const a="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},Yn=function(e){const t=QE(e);return{async addCoordinateSystem(r,n,o){var l,c;const a=await t.addCoordinateSystem(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteCoordinateSystem(r,n,o){var l,c;const a=await t.deleteCoordinateSystem(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getCoordinateSystem(r,n,o,a){var c,u;const s=await t.getCoordinateSystem(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listCoordinateSystems(r,n,o){var l,c;const a=await t.listCoordinateSystems(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async transformInCoordinateSystem(r,n,o,a){var c,u;const s=await t.transformInCoordinateSystem(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class XE extends Me{addCoordinateSystem(t,r,n){return Yn(this.configuration).addCoordinateSystem(t,r,n).then(o=>o(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Yn(this.configuration).deleteCoordinateSystem(t,r,n).then(o=>o(this.axios,this.basePath))}getCoordinateSystem(t,r,n,o){return Yn(this.configuration).getCoordinateSystem(t,r,n,o).then(a=>a(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Yn(this.configuration).listCoordinateSystems(t,r,n).then(o=>o(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,o){return Yn(this.configuration).transformInCoordinateSystem(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const ZE=function(e){return{clearDevices:async(t,r={})=>{v("clearDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"DELETE",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},createDevice:async(t,r,n={})=>{v("createDevice","cell",t),v("createDevice","createDeviceRequestInner",r);const o="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},deleteDevice:async(t,r,n={})=>{v("deleteDevice","cell",t),v("deleteDevice","identifier",r);const o="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getDevice:async(t,r,n={})=>{v("getDevice","cell",t),v("getDevice","identifier",r);const o="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listDevices:async(t,r={})=>{v("listDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}}}},Kn=function(e){const t=ZE(e);return{async clearDevices(r,n){var i,l;const o=await t.clearDevices(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["DeviceConfigurationApi.clearDevices"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async createDevice(r,n,o){var l,c;const a=await t.createDevice(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.createDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteDevice(r,n,o){var l,c;const a=await t.deleteDevice(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getDevice(r,n,o){var l,c;const a=await t.getDevice(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.getDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listDevices(r,n){var i,l;const o=await t.listDevices(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["DeviceConfigurationApi.listDevices"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)}}};class e2 extends Me{clearDevices(t,r){return Kn(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return Kn(this.configuration).createDevice(t,r,n).then(o=>o(this.axios,this.basePath))}deleteDevice(t,r,n){return Kn(this.configuration).deleteDevice(t,r,n).then(o=>o(this.axios,this.basePath))}getDevice(t,r,n){return Kn(this.configuration).getDevice(t,r,n).then(o=>o(this.axios,this.basePath))}listDevices(t,r){return Kn(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const t2=function(e){return{createProgram:async(t,r,n,o={})=>{v("createProgram","cell",t),v("createProgram","body",r);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(r,l,e),{url:B(s),options:l}},deleteProgram:async(t,r,n={})=>{v("deleteProgram","cell",t),v("deleteProgram","program",r);const o="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deleteProgramList:async(t,r,n={})=>{v("deleteProgramList","cell",t),v("deleteProgramList","programIds",r);const o="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r&&(c.program_ids=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getProgram:async(t,r,n={})=>{v("getProgram","cell",t),v("getProgram","program",r);const o="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},updateProgram:async(t,r,n,o={})=>{v("updateProgram","cell",t),v("updateProgram","program",r),v("updateProgram","body",n);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},Qn=function(e){const t=t2(e);return{async createProgram(r,n,o,a){var c,u;const s=await t.createProgram(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async deleteProgram(r,n,o){var l,c;const a=await t.deleteProgram(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.deleteProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteProgramList(r,n,o){var l,c;const a=await t.deleteProgramList(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.deleteProgramList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getProgram(r,n,o){var l,c;const a=await t.getProgram(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.getProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async updateProgram(r,n,o,a){var c,u;const s=await t.updateProgram(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class r2 extends Me{createProgram(t,r,n,o){return Qn(this.configuration).createProgram(t,r,n,o).then(a=>a(this.axios,this.basePath))}deleteProgram(t,r,n){return Qn(this.configuration).deleteProgram(t,r,n).then(o=>o(this.axios,this.basePath))}deleteProgramList(t,r,n){return Qn(this.configuration).deleteProgramList(t,r,n).then(o=>o(this.axios,this.basePath))}getProgram(t,r,n){return Qn(this.configuration).getProgram(t,r,n).then(o=>o(this.axios,this.basePath))}updateProgram(t,r,n,o){return Qn(this.configuration).updateProgram(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const n2=function(e){return{getProgramMetadata:async(t,r,n={})=>{v("getProgramMetadata","cell",t),v("getProgramMetadata","program",r);const o="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listProgramMetadata:async(t,r,n={})=>{v("listProgramMetadata","cell",t);const o="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.show_hidden=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},updateProgramMetadata:async(t,r,n,o={})=>{v("updateProgramMetadata","cell",t),v("updateProgramMetadata","program",r),v("updateProgramMetadata","updateProgramMetadataRequest",n);const a="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},uploadProgramMetadataImage:async(t,r,n,o={})=>{v("uploadProgramMetadataImage","cell",t),v("uploadProgramMetadataImage","program",r),v("uploadProgramMetadataImage","file",n);const a="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={},d=new(e&&e.formDataCtor||FormData);U(l,e),await D(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",L(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...o.headers},l.data=d,{url:B(s),options:l}}}},aa=function(e){const t=n2(e);return{async getProgramMetadata(r,n,o){var l,c;const a=await t.getProgramMetadata(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listProgramMetadata(r,n,o){var l,c;const a=await t.listProgramMetadata(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async updateProgramMetadata(r,n,o,a){var c,u;const s=await t.updateProgramMetadata(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async uploadProgramMetadataImage(r,n,o,a){var c,u;const s=await t.uploadProgramMetadataImage(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class o2 extends Me{getProgramMetadata(t,r,n){return aa(this.configuration).getProgramMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}listProgramMetadata(t,r,n){return aa(this.configuration).listProgramMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}updateProgramMetadata(t,r,n,o){return aa(this.configuration).updateProgramMetadata(t,r,n,o).then(a=>a(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,o){return aa(this.configuration).uploadProgramMetadataImage(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const a2=function(e){return{createRecipe:async(t,r,n,o,a={})=>{v("createRecipe","cell",t),v("createRecipe","programId",r),v("createRecipe","body",n);const s="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...a},u={},d={};U(c,e),await D(u,e),r!==void 0&&(d.program_id=r),o!==void 0&&(d.name=o),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},c.data=he(n,c,e),{url:B(i),options:c}},deleteRecipe:async(t,r,n={})=>{v("deleteRecipe","cell",t),v("deleteRecipe","recipe",r);const o="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deleteRecipeList:async(t,r,n={})=>{v("deleteRecipeList","cell",t),v("deleteRecipeList","recipeIds",r);const o="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),r&&(c.recipe_ids=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getRecipe:async(t,r,n={})=>{v("getRecipe","cell",t),v("getRecipe","recipe",r);const o="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},updateRecipe:async(t,r,n,o={})=>{v("updateRecipe","cell",t),v("updateRecipe","recipe",r),v("updateRecipe","body",n);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},Xn=function(e){const t=a2(e);return{async createRecipe(r,n,o,a,s){var u,d;const i=await t.createRecipe(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async deleteRecipe(r,n,o){var l,c;const a=await t.deleteRecipe(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteRecipeList(r,n,o){var l,c;const a=await t.deleteRecipeList(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getRecipe(r,n,o){var l,c;const a=await t.getRecipe(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.getRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async updateRecipe(r,n,o,a){var c,u;const s=await t.updateRecipe(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class s2 extends Me{createRecipe(t,r,n,o,a){return Xn(this.configuration).createRecipe(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}deleteRecipe(t,r,n){return Xn(this.configuration).deleteRecipe(t,r,n).then(o=>o(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Xn(this.configuration).deleteRecipeList(t,r,n).then(o=>o(this.axios,this.basePath))}getRecipe(t,r,n){return Xn(this.configuration).getRecipe(t,r,n).then(o=>o(this.axios,this.basePath))}updateRecipe(t,r,n,o){return Xn(this.configuration).updateRecipe(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const i2=function(e){return{getRecipeMetadata:async(t,r,n={})=>{v("getRecipeMetadata","cell",t),v("getRecipeMetadata","recipe",r);const o="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listRecipeMetadata:async(t,r={})=>{v("listRecipeMetadata","cell",t);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},updateRecipeMetadata:async(t,r,n,o={})=>{v("updateRecipeMetadata","cell",t),v("updateRecipeMetadata","recipe",r),v("updateRecipeMetadata","updateRecipeMetadataRequest",n);const a="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},uploadRecipeMetadataImage:async(t,r,n,o={})=>{v("uploadRecipeMetadataImage","cell",t),v("uploadRecipeMetadataImage","recipe",r),v("uploadRecipeMetadataImage","file",n);const a="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={},d=new(e&&e.formDataCtor||FormData);U(l,e),await D(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",L(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...o.headers},l.data=d,{url:B(s),options:l}}}},sa=function(e){const t=i2(e);return{async getRecipeMetadata(r,n,o){var l,c;const a=await t.getRecipeMetadata(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listRecipeMetadata(r,n){var i,l;const o=await t.listRecipeMetadata(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async updateRecipeMetadata(r,n,o,a){var c,u;const s=await t.updateRecipeMetadata(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async uploadRecipeMetadataImage(r,n,o,a){var c,u;const s=await t.uploadRecipeMetadataImage(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class l2 extends Me{getRecipeMetadata(t,r,n){return sa(this.configuration).getRecipeMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}listRecipeMetadata(t,r){return sa(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,o){return sa(this.configuration).updateRecipeMetadata(t,r,n,o).then(a=>a(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,o){return sa(this.configuration).uploadRecipeMetadataImage(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const c2=function(e){return{deleteAllMotions:async(t,r={})=>{v("deleteAllMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"DELETE",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},deleteMotion:async(t,r,n={})=>{v("deleteMotion","cell",t),v("deleteMotion","motion",r);const o="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},executeTrajectory:async(t,r,n={})=>{v("executeTrajectory","cell",t),v("executeTrajectory","executeTrajectoryRequest",r);const o="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},getMotionTrajectory:async(t,r,n,o,a={})=>{v("getMotionTrajectory","cell",t),v("getMotionTrajectory","motion",r),v("getMotionTrajectory","sampleTime",n);const s="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},u={},d={};U(c,e),await D(u,e),n!==void 0&&(d.sample_time=n),o!==void 0&&(d.responses_coordinate_system=o),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},{url:B(i),options:c}},getMotionTrajectorySample:async(t,r,n,o,a={})=>{v("getMotionTrajectorySample","cell",t),v("getMotionTrajectorySample","motion",r);const s="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},u={},d={};U(c,e),await D(u,e),n!==void 0&&(d.location_on_trajectory=n),o!==void 0&&(d.response_coordinate_system=o),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},{url:B(i),options:c}},getPlannedMotion:async(t,r,n,o={})=>{v("getPlannedMotion","cell",t),v("getPlannedMotion","motion",r);const a="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.sample_time=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{v("getPlanningMotionGroupModels","cell",t);const n="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},listMotions:async(t,r={})=>{v("listMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},loadPlannedMotion:async(t,r,n={})=>{v("loadPlannedMotion","cell",t),v("loadPlannedMotion","plannedMotion",r);const o="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},planCollisionFreePTP:async(t,r,n={})=>{v("planCollisionFreePTP","cell",t);const o="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},planMotion:async(t,r,n={})=>{v("planMotion","cell",t),v("planMotion","planRequest",r);const o="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},planTrajectory:async(t,r,n={})=>{v("planTrajectory","cell",t);const o="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},stopExecution:async(t,r,n={})=>{v("stopExecution","cell",t),v("stopExecution","motion",r);const o="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},streamMove:async(t,r,n={})=>{v("streamMove","cell",t),v("streamMove","streamMoveRequest",r);const o="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},streamMoveBackward:async(t,r,n,o,a,s,i={})=>{v("streamMoveBackward","cell",t),v("streamMoveBackward","motion",r),v("streamMoveBackward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executebackward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};U(d,e),await D(h,e),n!==void 0&&(p.playback_speed_in_percent=n),o!==void 0&&(p.response_rate=o),a!==void 0&&(p.response_coordinate_system=a),s!==void 0&&(p.start_location_on_trajectory=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:B(c),options:d}},streamMoveForward:async(t,r,n,o,a,s,i={})=>{v("streamMoveForward","cell",t),v("streamMoveForward","motion",r),v("streamMoveForward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executeforward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};U(d,e),await D(h,e),n!==void 0&&(p.playback_speed_in_percent=n),o!==void 0&&(p.response_rate=o),a!==void 0&&(p.response_coordinate_system=a),s!==void 0&&(p.start_location_on_trajectory=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:B(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,o,a,s,i,l,c,u,d={})=>{v("streamMoveToTrajectoryViaJointPTP","cell",t),v("streamMoveToTrajectoryViaJointPTP","motion",r),v("streamMoveToTrajectoryViaJointPTP","locationOnTrajectory",n);const h="/cells/{cell}/motions/{motion}/executetotrajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),p=new URL(h,$);let f;e&&(f=e.baseOptions);const m={method:"GET",...f,...d},b={},S={};U(m,e),await D(b,e),n!==void 0&&(S.location_on_trajectory=n),o&&(S["limit_override.joint_velocity_limits.joints"]=o),a&&(S["limit_override.joint_acceleration_limits.joints"]=a),s!==void 0&&(S["limit_override.tcp_velocity_limit"]=s),i!==void 0&&(S["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(S["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(S["limit_override.tcp_orientation_acceleration_limit"]=c),u!==void 0&&(S.responses_coordinate_system=u),L(p,S);let E=f&&f.headers?f.headers:{};return m.headers={...b,...E,...d.headers},{url:B(p),options:m}}}},Qe=function(e){const t=c2(e);return{async deleteAllMotions(r,n){var i,l;const o=await t.deleteAllMotions(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionApi.deleteAllMotions"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async deleteMotion(r,n,o){var l,c;const a=await t.deleteMotion(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.deleteMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async executeTrajectory(r,n,o){var l,c;const a=await t.executeTrajectory(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.executeTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getMotionTrajectory(r,n,o,a,s){var u,d;const i=await t.getMotionTrajectory(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getMotionTrajectorySample(r,n,o,a,s){var u,d;const i=await t.getMotionTrajectorySample(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getPlannedMotion(r,n,o,a){var c,u;const s=await t.getPlannedMotion(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getPlanningMotionGroupModels(r,n){var i,l;const o=await t.getPlanningMotionGroupModels(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async listMotions(r,n){var i,l;const o=await t.listMotions(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionApi.listMotions"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async loadPlannedMotion(r,n,o){var l,c;const a=await t.loadPlannedMotion(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.loadPlannedMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async planCollisionFreePTP(r,n,o){var l,c;const a=await t.planCollisionFreePTP(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planCollisionFreePTP"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async planMotion(r,n,o){var l,c;const a=await t.planMotion(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async planTrajectory(r,n,o){var l,c;const a=await t.planTrajectory(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async stopExecution(r,n,o){var l,c;const a=await t.stopExecution(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.stopExecution"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async streamMove(r,n,o){var l,c;const a=await t.streamMove(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.streamMove"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async streamMoveBackward(r,n,o,a,s,i,l){var h,p;const c=await t.streamMoveBackward(r,n,o,a,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>N(c,_,M,e)(f,d||m)},async streamMoveForward(r,n,o,a,s,i,l){var h,p;const c=await t.streamMoveForward(r,n,o,a,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>N(c,_,M,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,o,a,s,i,l,c,u,d,h){var b,S;const p=await t.streamMoveToTrajectoryViaJointPTP(r,n,o,a,s,i,l,c,u,d,h),f=(e==null?void 0:e.serverIndex)??0,m=(S=(b=k["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:b[f])==null?void 0:S.url;return(E,O)=>N(p,_,M,e)(E,m||O)}}};class u2 extends Me{deleteAllMotions(t,r){return Qe(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Qe(this.configuration).deleteMotion(t,r,n).then(o=>o(this.axios,this.basePath))}executeTrajectory(t,r,n){return Qe(this.configuration).executeTrajectory(t,r,n).then(o=>o(this.axios,this.basePath))}getMotionTrajectory(t,r,n,o,a){return Qe(this.configuration).getMotionTrajectory(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,o,a){return Qe(this.configuration).getMotionTrajectorySample(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}getPlannedMotion(t,r,n,o){return Qe(this.configuration).getPlannedMotion(t,r,n,o).then(a=>a(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Qe(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Qe(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Qe(this.configuration).loadPlannedMotion(t,r,n).then(o=>o(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Qe(this.configuration).planCollisionFreePTP(t,r,n).then(o=>o(this.axios,this.basePath))}planMotion(t,r,n){return Qe(this.configuration).planMotion(t,r,n).then(o=>o(this.axios,this.basePath))}planTrajectory(t,r,n){return Qe(this.configuration).planTrajectory(t,r,n).then(o=>o(this.axios,this.basePath))}stopExecution(t,r,n){return Qe(this.configuration).stopExecution(t,r,n).then(o=>o(this.axios,this.basePath))}streamMove(t,r,n){return Qe(this.configuration).streamMove(t,r,n).then(o=>o(this.axios,this.basePath))}streamMoveBackward(t,r,n,o,a,s,i){return Qe(this.configuration).streamMoveBackward(t,r,n,o,a,s,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,n,o,a,s,i){return Qe(this.configuration).streamMoveForward(t,r,n,o,a,s,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,n,o,a,s,i,l,c,u,d){return Qe(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,o,a,s,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const d2=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{v("activateAllMotionGroups","cell",t),v("activateAllMotionGroups","controller",r);const o="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.controller=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},activateMotionGroup:async(t,r,n={})=>{v("activateMotionGroup","cell",t),v("activateMotionGroup","motionGroup",r);const o="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),r!==void 0&&(c.motion_group=r),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deactivateMotionGroup:async(t,r,n={})=>{v("deactivateMotionGroup","cell",t),v("deactivateMotionGroup","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listMotionGroups:async(t,r={})=>{v("listMotionGroups","cell",t);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}}}},ia=function(e){const t=d2(e);return{async activateAllMotionGroups(r,n,o){var l,c;const a=await t.activateAllMotionGroups(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async activateMotionGroup(r,n,o){var l,c;const a=await t.activateMotionGroup(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.activateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deactivateMotionGroup(r,n,o){var l,c;const a=await t.deactivateMotionGroup(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listMotionGroups(r,n){var i,l;const o=await t.listMotionGroups(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["MotionGroupApi.listMotionGroups"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)}}};class h2 extends Me{activateAllMotionGroups(t,r,n){return ia(this.configuration).activateAllMotionGroups(t,r,n).then(o=>o(this.axios,this.basePath))}activateMotionGroup(t,r,n){return ia(this.configuration).activateMotionGroup(t,r,n).then(o=>o(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return ia(this.configuration).deactivateMotionGroup(t,r,n).then(o=>o(this.axios,this.basePath))}listMotionGroups(t,r){return ia(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const p2=function(e){return{getActivePayload:async(t,r,n={})=>{v("getActivePayload","cell",t),v("getActivePayload","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getActiveTcp:async(t,r,n,o={})=>{v("getActiveTcp","cell",t),v("getActiveTcp","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},getCurrentMotionGroupState:async(t,r,n,o,a={})=>{v("getCurrentMotionGroupState","cell",t),v("getCurrentMotionGroupState","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},u={},d={};U(c,e),await D(u,e),n!==void 0&&(d.tcp=n),o!==void 0&&(d.response_coordinate_system=o),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},{url:B(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{v("getInfoCapabilities","cell",t),v("getInfoCapabilities","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{v("getMotionGroupSpecification","cell",t),v("getMotionGroupSpecification","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getMounting:async(t,r,n={})=>{v("getMounting","cell",t),v("getMounting","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getOptimizerConfiguration:async(t,r,n,o={})=>{v("getOptimizerConfiguration","cell",t),v("getOptimizerConfiguration","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.tcp=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},getSafetySetup:async(t,r,n={})=>{v("getSafetySetup","cell",t),v("getSafetySetup","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listPayloads:async(t,r,n={})=>{v("listPayloads","cell",t),v("listPayloads","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listTcps:async(t,r,n,o={})=>{v("listTcps","cell",t),v("listTcps","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},streamMotionGroupState:async(t,r,n,o,a,s={})=>{v("streamMotionGroupState","cell",t),v("streamMotionGroupState","motionGroup",r);const i="/cells/{cell}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),l=new URL(i,$);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},d={},h={};U(u,e),await D(d,e),n!==void 0&&(h.response_rate=n),o!==void 0&&(h.response_coordinate_system=o),a!==void 0&&(h.tcp=a),L(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...s.headers},{url:B(l),options:u}}}},St=function(e){const t=p2(e);return{async getActivePayload(r,n,o){var l,c;const a=await t.getActivePayload(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getActiveTcp(r,n,o,a){var c,u;const s=await t.getActiveTcp(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getCurrentMotionGroupState(r,n,o,a,s){var u,d;const i=await t.getCurrentMotionGroupState(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getInfoCapabilities(r,n,o){var l,c;const a=await t.getInfoCapabilities(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getMotionGroupSpecification(r,n,o){var l,c;const a=await t.getMotionGroupSpecification(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getMounting(r,n,o){var l,c;const a=await t.getMounting(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getMounting"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getOptimizerConfiguration(r,n,o,a){var c,u;const s=await t.getOptimizerConfiguration(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getSafetySetup(r,n,o){var l,c;const a=await t.getSafetySetup(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listPayloads(r,n,o){var l,c;const a=await t.listPayloads(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.listPayloads"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listTcps(r,n,o,a){var c,u;const s=await t.listTcps(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async streamMotionGroupState(r,n,o,a,s,i){var d,h;const l=await t.streamMotionGroupState(r,n,o,a,s,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=k["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>N(l,_,M,e)(p,u||f)}}};class m2 extends Me{getActivePayload(t,r,n){return St(this.configuration).getActivePayload(t,r,n).then(o=>o(this.axios,this.basePath))}getActiveTcp(t,r,n,o){return St(this.configuration).getActiveTcp(t,r,n,o).then(a=>a(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,o,a){return St(this.configuration).getCurrentMotionGroupState(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return St(this.configuration).getInfoCapabilities(t,r,n).then(o=>o(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return St(this.configuration).getMotionGroupSpecification(t,r,n).then(o=>o(this.axios,this.basePath))}getMounting(t,r,n){return St(this.configuration).getMounting(t,r,n).then(o=>o(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,o){return St(this.configuration).getOptimizerConfiguration(t,r,n,o).then(a=>a(this.axios,this.basePath))}getSafetySetup(t,r,n){return St(this.configuration).getSafetySetup(t,r,n).then(o=>o(this.axios,this.basePath))}listPayloads(t,r,n){return St(this.configuration).listPayloads(t,r,n).then(o=>o(this.axios,this.basePath))}listTcps(t,r,n,o){return St(this.configuration).listTcps(t,r,n,o).then(a=>a(this.axios,this.basePath))}streamMotionGroupState(t,r,n,o,a,s){return St(this.configuration).streamMotionGroupState(t,r,n,o,a,s).then(i=>i(this.axios,this.basePath))}}const f2=function(e){return{directionJogging:async(t,r,n={})=>{v("directionJogging","cell",t),v("directionJogging","directionJoggingRequest",r);const o="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},getJoggingCapabilities:async(t,r,n={})=>{v("getJoggingCapabilities","cell",t),v("getJoggingCapabilities","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},jointJogging:async(t,r,n={})=>{v("jointJogging","cell",t),v("jointJogging","jointJoggingRequest",r);const o="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},stopJogging:async(t,r,n={})=>{v("stopJogging","cell",t),v("stopJogging","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}}}},la=function(e){const t=f2(e);return{async directionJogging(r,n,o){var l,c;const a=await t.directionJogging(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getJoggingCapabilities(r,n,o){var l,c;const a=await t.getJoggingCapabilities(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async jointJogging(r,n,o){var l,c;const a=await t.jointJogging(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async stopJogging(r,n,o){var l,c;const a=await t.stopJogging(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)}}};class g2 extends Me{directionJogging(t,r,n){return la(this.configuration).directionJogging(t,r,n).then(o=>o(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return la(this.configuration).getJoggingCapabilities(t,r,n).then(o=>o(this.axios,this.basePath))}jointJogging(t,r,n){return la(this.configuration).jointJogging(t,r,n).then(o=>o(this.axios,this.basePath))}stopJogging(t,r,n){return la(this.configuration).stopJogging(t,r,n).then(o=>o(this.axios,this.basePath))}}const y2=function(e){return{calculateAllInverseKinematic:async(t,r,n,o={})=>{v("calculateAllInverseKinematic","cell",t),v("calculateAllInverseKinematic","motionGroup",r),v("calculateAllInverseKinematic","allJointPositionsRequest",n);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},calculateForwardKinematic:async(t,r,n,o={})=>{v("calculateForwardKinematic","cell",t),v("calculateForwardKinematic","motionGroup",r),v("calculateForwardKinematic","tcpPoseRequest",n);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},calculateInverseKinematic:async(t,r,n,o={})=>{v("calculateInverseKinematic","cell",t),v("calculateInverseKinematic","motionGroup",r),v("calculateInverseKinematic","jointPositionRequest",n);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},getKinematicCapabilities:async(t,r,n={})=>{v("getKinematicCapabilities","cell",t),v("getKinematicCapabilities","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}}}},ca=function(e){const t=y2(e);return{async calculateAllInverseKinematic(r,n,o,a){var c,u;const s=await t.calculateAllInverseKinematic(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async calculateForwardKinematic(r,n,o,a){var c,u;const s=await t.calculateForwardKinematic(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async calculateInverseKinematic(r,n,o,a){var c,u;const s=await t.calculateInverseKinematic(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getKinematicCapabilities(r,n,o){var l,c;const a=await t.getKinematicCapabilities(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)}}};class b2 extends Me{calculateAllInverseKinematic(t,r,n,o){return ca(this.configuration).calculateAllInverseKinematic(t,r,n,o).then(a=>a(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,o){return ca(this.configuration).calculateForwardKinematic(t,r,n,o).then(a=>a(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,o){return ca(this.configuration).calculateInverseKinematic(t,r,n,o).then(a=>a(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return ca(this.configuration).getKinematicCapabilities(t,r,n).then(o=>o(this.axios,this.basePath))}}const x2=function(e){return{createProgramRunner:async(t,r,n={})=>{v("createProgramRunner","cell",t),v("createProgramRunner","request",r);const o="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="text/plain",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},executeProgram:async(t,r,n={})=>{v("executeProgram","cell",t),v("executeProgram","codeWithArguments",r);const o="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},getProgramRunner:async(t,r,n={})=>{v("getProgramRunner","cell",t),v("getProgramRunner","runner",r);const o="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listProgramRunners:async(t,r={})=>{v("listProgramRunners","cell",t);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},migrateProgram:async(t,r,n={})=>{v("migrateProgram","cell",t),v("migrateProgram","request1",r);const o="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="text/plain",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},planProgram:async(t,r,n,o={})=>{v("planProgram","cell",t),v("planProgram","request",r);const a="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(r,l,e),{url:B(s),options:l}},stopAllProgramRunner:async(t,r={})=>{v("stopAllProgramRunner","cell",t);const n="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"POST",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},stopProgramRunner:async(t,r,n={})=>{v("stopProgramRunner","cell",t),v("stopProgramRunner","runner",r);const o="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}}}},nr=function(e){const t=x2(e);return{async createProgramRunner(r,n,o){var l,c;const a=await t.createProgramRunner(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.createProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async executeProgram(r,n,o){var l,c;const a=await t.executeProgram(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.executeProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getProgramRunner(r,n,o){var l,c;const a=await t.getProgramRunner(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.getProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listProgramRunners(r,n){var i,l;const o=await t.listProgramRunners(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramApi.listProgramRunners"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async migrateProgram(r,n,o){var l,c;const a=await t.migrateProgram(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.migrateProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async planProgram(r,n,o,a){var c,u;const s=await t.planProgram(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async stopAllProgramRunner(r,n){var i,l;const o=await t.stopAllProgramRunner(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramApi.stopAllProgramRunner"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async stopProgramRunner(r,n,o){var l,c;const a=await t.stopProgramRunner(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.stopProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)}}};class v2 extends Me{createProgramRunner(t,r,n){return nr(this.configuration).createProgramRunner(t,r,n).then(o=>o(this.axios,this.basePath))}executeProgram(t,r,n){return nr(this.configuration).executeProgram(t,r,n).then(o=>o(this.axios,this.basePath))}getProgramRunner(t,r,n){return nr(this.configuration).getProgramRunner(t,r,n).then(o=>o(this.axios,this.basePath))}listProgramRunners(t,r){return nr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return nr(this.configuration).migrateProgram(t,r,n).then(o=>o(this.axios,this.basePath))}planProgram(t,r,n,o){return nr(this.configuration).planProgram(t,r,n,o).then(a=>a(this.axios,this.basePath))}stopAllProgramRunner(t,r){return nr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return nr(this.configuration).stopProgramRunner(t,r,n).then(o=>o(this.axios,this.basePath))}}const S2=function(e){return{clearProgramsValues:async(t,r={})=>{v("clearProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"DELETE",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},createProgramsValue:async(t,r,n={})=>{v("createProgramsValue","cell",t),v("createProgramsValue","requestBody",r);const o="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(l,e),l["Content-Type"]="application/json",L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=he(r,i,e),{url:B(a),options:i}},deleteProgramValue:async(t,r,n={})=>{v("deleteProgramValue","cell",t),v("deleteProgramValue","key",r);const o="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getProgramValue:async(t,r,n={})=>{v("getProgramValue","cell",t),v("getProgramValue","key",r);const o="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listProgramsValues:async(t,r={})=>{v("listProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},updateProgramValue:async(t,r,n,o={})=>{v("updateProgramValue","cell",t),v("updateProgramValue","key",r),v("updateProgramValue","value",n);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},en=function(e){const t=S2(e);return{async clearProgramsValues(r,n){var i,l;const o=await t.clearProgramsValues(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async createProgramsValue(r,n,o){var l,c;const a=await t.createProgramsValue(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.createProgramsValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteProgramValue(r,n,o){var l,c;const a=await t.deleteProgramValue(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getProgramValue(r,n,o){var l,c;const a=await t.getProgramValue(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.getProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listProgramsValues(r,n){var i,l;const o=await t.listProgramsValues(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["ProgramValuesApi.listProgramsValues"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async updateProgramValue(r,n,o,a){var c,u;const s=await t.updateProgramValue(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class O2 extends Me{clearProgramsValues(t,r){return en(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return en(this.configuration).createProgramsValue(t,r,n).then(o=>o(this.axios,this.basePath))}deleteProgramValue(t,r,n){return en(this.configuration).deleteProgramValue(t,r,n).then(o=>o(this.axios,this.basePath))}getProgramValue(t,r,n){return en(this.configuration).getProgramValue(t,r,n).then(o=>o(this.axios,this.basePath))}listProgramsValues(t,r){return en(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,o){return en(this.configuration).updateProgramValue(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const w2=function(e){return{deleteStoredCollider:async(t,r,n={})=>{v("deleteStoredCollider","cell",t),v("deleteStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{v("deleteStoredCollisionLinkChain","cell",t),v("deleteStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{v("deleteStoredCollisionTool","cell",t),v("deleteStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getDefaultLinkChain:async(t,r,n={})=>{v("getDefaultLinkChain","cell",t),v("getDefaultLinkChain","motionGroupModel",r);const o="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getStoredCollider:async(t,r,n={})=>{v("getStoredCollider","cell",t),v("getStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{v("getStoredCollisionLinkChain","cell",t),v("getStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getStoredCollisionTool:async(t,r,n={})=>{v("getStoredCollisionTool","cell",t),v("getStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listCollisionLinkChains:async(t,r={})=>{v("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},listStoredColliders:async(t,r={})=>{v("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},listStoredCollisionTools:async(t,r={})=>{v("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},storeCollider:async(t,r,n,o={})=>{v("storeCollider","cell",t),v("storeCollider","collider",r),v("storeCollider","collider2",n);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},storeCollisionLinkChain:async(t,r,n,o={})=>{v("storeCollisionLinkChain","cell",t),v("storeCollisionLinkChain","linkChain",r),v("storeCollisionLinkChain","collider",n);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},storeCollisionTool:async(t,r,n,o={})=>{v("storeCollisionTool","cell",t),v("storeCollisionTool","tool",r),v("storeCollisionTool","requestBody",n);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},ut=function(e){const t=w2(e);return{async deleteStoredCollider(r,n,o){var l,c;const a=await t.deleteStoredCollider(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,o){var l,c;const a=await t.deleteStoredCollisionLinkChain(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async deleteStoredCollisionTool(r,n,o){var l,c;const a=await t.deleteStoredCollisionTool(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getDefaultLinkChain(r,n,o){var l,c;const a=await t.getDefaultLinkChain(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getStoredCollider(r,n,o){var l,c;const a=await t.getStoredCollider(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,o){var l,c;const a=await t.getStoredCollisionLinkChain(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getStoredCollisionTool(r,n,o){var l,c;const a=await t.getStoredCollisionTool(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const o=await t.listCollisionLinkChains(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async listStoredColliders(r,n){var i,l;const o=await t.listStoredColliders(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async listStoredCollisionTools(r,n){var i,l;const o=await t.listStoredCollisionTools(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async storeCollider(r,n,o,a){var c,u;const s=await t.storeCollider(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async storeCollisionLinkChain(r,n,o,a){var c,u;const s=await t.storeCollisionLinkChain(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async storeCollisionTool(r,n,o,a){var c,u;const s=await t.storeCollisionTool(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class C2 extends Me{deleteStoredCollider(t,r,n){return ut(this.configuration).deleteStoredCollider(t,r,n).then(o=>o(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,n){return ut(this.configuration).deleteStoredCollisionLinkChain(t,r,n).then(o=>o(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,n){return ut(this.configuration).deleteStoredCollisionTool(t,r,n).then(o=>o(this.axios,this.basePath))}getDefaultLinkChain(t,r,n){return ut(this.configuration).getDefaultLinkChain(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollider(t,r,n){return ut(this.configuration).getStoredCollider(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,n){return ut(this.configuration).getStoredCollisionLinkChain(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollisionTool(t,r,n){return ut(this.configuration).getStoredCollisionTool(t,r,n).then(o=>o(this.axios,this.basePath))}listCollisionLinkChains(t,r){return ut(this.configuration).listCollisionLinkChains(t,r).then(n=>n(this.axios,this.basePath))}listStoredColliders(t,r){return ut(this.configuration).listStoredColliders(t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionTools(t,r){return ut(this.configuration).listStoredCollisionTools(t,r).then(n=>n(this.axios,this.basePath))}storeCollider(t,r,n,o){return ut(this.configuration).storeCollider(t,r,n,o).then(a=>a(this.axios,this.basePath))}storeCollisionLinkChain(t,r,n,o){return ut(this.configuration).storeCollisionLinkChain(t,r,n,o).then(a=>a(this.axios,this.basePath))}storeCollisionTool(t,r,n,o){return ut(this.configuration).storeCollisionTool(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const P2=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{v("deleteStoredCollisionScene","cell",t),v("deleteStoredCollisionScene","scene",r);const o="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getStoredCollisionScene:async(t,r,n={})=>{v("getStoredCollisionScene","cell",t),v("getStoredCollisionScene","scene",r);const o="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listStoredCollisionScenes:async(t,r={})=>{v("listStoredCollisionScenes","cell",t);const n="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},storeCollisionScene:async(t,r,n,o={})=>{v("storeCollisionScene","cell",t),v("storeCollisionScene","scene",r),v("storeCollisionScene","collisionSceneAssembly",n);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}}}},ua=function(e){const t=P2(e);return{async deleteStoredCollisionScene(r,n,o){var l,c;const a=await t.deleteStoredCollisionScene(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getStoredCollisionScene(r,n,o){var l,c;const a=await t.getStoredCollisionScene(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listStoredCollisionScenes(r,n){var i,l;const o=await t.listStoredCollisionScenes(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async storeCollisionScene(r,n,o,a){var c,u;const s=await t.storeCollisionScene(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class T2 extends Me{deleteStoredCollisionScene(t,r,n){return ua(this.configuration).deleteStoredCollisionScene(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return ua(this.configuration).getStoredCollisionScene(t,r,n).then(o=>o(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return ua(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,o){return ua(this.configuration).storeCollisionScene(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const R2=function(e){return{clearAllObjects:async(t,r={})=>{v("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"DELETE",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},deleteObject:async(t,r,n={})=>{v("deleteObject","cell",t),v("deleteObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getObject:async(t,r,n={})=>{v("getObject","cell",t),v("getObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getObjectMetadata:async(t,r,n={})=>{v("getObjectMetadata","cell",t),v("getObjectMetadata","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"HEAD",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listAllObjectKeys:async(t,r={})=>{v("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},storeObject:async(t,r,n,o,a={})=>{v("storeObject","cell",t),v("storeObject","key",r);const s="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...a},u={},d={},h=new(e&&e.formDataCtor||FormData);U(c,e),await D(u,e),o!==void 0&&h.append("AnyValue",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)),L(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...a.headers},c.data=h,{url:B(i),options:c}}}},tn=function(e){const t=R2(e);return{async clearAllObjects(r,n){var i,l;const o=await t.clearAllObjects(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreObjectApi.clearAllObjects"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async deleteObject(r,n,o){var l,c;const a=await t.deleteObject(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.deleteObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getObject(r,n,o){var l,c;const a=await t.getObject(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.getObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getObjectMetadata(r,n,o){var l,c;const a=await t.getObjectMetadata(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.getObjectMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const o=await t.listAllObjectKeys(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async storeObject(r,n,o,a,s){var u,d;const i=await t.storeObject(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class A2 extends Me{clearAllObjects(t,r){return tn(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return tn(this.configuration).deleteObject(t,r,n).then(o=>o(this.axios,this.basePath))}getObject(t,r,n){return tn(this.configuration).getObject(t,r,n).then(o=>o(this.axios,this.basePath))}getObjectMetadata(t,r,n){return tn(this.configuration).getObjectMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}listAllObjectKeys(t,r){return tn(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,o,a){return tn(this.configuration).storeObject(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}}const _2=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{v("checkNovaVersionUpdate","channel",t);const n="/system/update",o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},i={},l={};U(s,e),await D(i,e),t!==void 0&&(l.channel=t),L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},{url:B(o),options:s}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,$);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...t},s={},i={};U(a,e),await D(s,e),L(n,i);let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...t.headers},{url:B(n),options:a}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,$);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...t},s={},i={};U(a,e),await D(s,e),L(n,i);let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...t.headers},{url:B(n),options:a}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,$);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...t},s={},i={};U(a,e),await D(s,e),L(n,i);let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...t.headers},{url:B(n),options:a}},updateNovaVersion:async(t,r={})=>{v("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",o=new URL(n,$);let a;e&&(a=e.baseOptions);const s={method:"PUT",...a,...r},i={},l={};U(s,e),await D(i,e),i["Content-Type"]="application/json",L(o,l);let c=a&&a.headers?a.headers:{};return s.headers={...i,...c,...r.headers},s.data=he(t,s,e),{url:B(o),options:s}}}},Zn=function(e){const t=_2(e);return{async checkNovaVersionUpdate(r,n){var i,l;const o=await t.checkNovaVersionUpdate(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)},async getDiagnosePackage(r){var s,i;const n=await t.getDiagnosePackage(r),o=(e==null?void 0:e.serverIndex)??0,a=(i=(s=k["SystemApi.getDiagnosePackage"])==null?void 0:s[o])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,a||c)},async getSystemStatus(r){var s,i;const n=await t.getSystemStatus(r),o=(e==null?void 0:e.serverIndex)??0,a=(i=(s=k["SystemApi.getSystemStatus"])==null?void 0:s[o])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,a||c)},async getSystemVersion(r){var s,i;const n=await t.getSystemVersion(r),o=(e==null?void 0:e.serverIndex)??0,a=(i=(s=k["SystemApi.getSystemVersion"])==null?void 0:s[o])==null?void 0:i.url;return(l,c)=>N(n,_,M,e)(l,a||c)},async updateNovaVersion(r,n){var i,l;const o=await t.updateNovaVersion(r,n),a=(e==null?void 0:e.serverIndex)??0,s=(l=(i=k["SystemApi.updateNovaVersion"])==null?void 0:i[a])==null?void 0:l.url;return(c,u)=>N(o,_,M,e)(c,s||u)}}};class E2 extends Me{checkNovaVersionUpdate(t,r){return Zn(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Zn(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Zn(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Zn(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Zn(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const I2=function(e){return{getMotionGroupState:async(t,r,n,o={})=>{v("getMotionGroupState","cell",t),v("getMotionGroupState","controller",r),v("getMotionGroupState","id",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},getMotionGroups:async(t,r,n={})=>{v("getMotionGroups","cell",t),v("getMotionGroups","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getVirtualRobotIOValue:async(t,r,n,o={})=>{v("getVirtualRobotIOValue","cell",t),v("getVirtualRobotIOValue","controller",r),v("getVirtualRobotIOValue","io",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},listIOs:async(t,r,n={})=>{v("listIOs","cell",t),v("listIOs","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},setMotionGroupState:async(t,r,n,o,a={})=>{v("setMotionGroupState","cell",t),v("setMotionGroupState","controller",r),v("setMotionGroupState","id",n),v("setMotionGroupState","motionGroupJoints",o);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...a},u={},d={};U(c,e),await D(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},c.data=he(o,c,e),{url:B(i),options:c}},setVirtualRobotIOValue:async(t,r,n,o,a,s,i={})=>{v("setVirtualRobotIOValue","cell",t),v("setVirtualRobotIOValue","controller",r),v("setVirtualRobotIOValue","io",n);const l="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"PUT",...u,...i},h={},p={};U(d,e),await D(h,e),o!==void 0&&(p.bool=o),a!==void 0&&(p.integer=a),s!==void 0&&(p.double=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:B(c),options:d}}}},rn=function(e){const t=I2(e);return{async getMotionGroupState(r,n,o,a){var c,u;const s=await t.getMotionGroupState(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getMotionGroups(r,n,o){var l,c;const a=await t.getMotionGroups(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotApi.getMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getVirtualRobotIOValue(r,n,o,a){var c,u;const s=await t.getVirtualRobotIOValue(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listIOs(r,n,o){var l,c;const a=await t.listIOs(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotApi.listIOs"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async setMotionGroupState(r,n,o,a,s){var u,d;const i=await t.setMotionGroupState(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async setVirtualRobotIOValue(r,n,o,a,s,i,l){var h,p;const c=await t.setVirtualRobotIOValue(r,n,o,a,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>N(c,_,M,e)(f,d||m)}}};class V2 extends Me{getMotionGroupState(t,r,n,o){return rn(this.configuration).getMotionGroupState(t,r,n,o).then(a=>a(this.axios,this.basePath))}getMotionGroups(t,r,n){return rn(this.configuration).getMotionGroups(t,r,n).then(o=>o(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,o){return rn(this.configuration).getVirtualRobotIOValue(t,r,n,o).then(a=>a(this.axios,this.basePath))}listIOs(t,r,n){return rn(this.configuration).listIOs(t,r,n).then(o=>o(this.axios,this.basePath))}setMotionGroupState(t,r,n,o,a){return rn(this.configuration).setMotionGroupState(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,o,a,s,i){return rn(this.configuration).setVirtualRobotIOValue(t,r,n,o,a,s,i).then(l=>l(this.axios,this.basePath))}}const M2=function(e){return{externalJointsStream:async(t,r,n,o={})=>{v("externalJointsStream","cell",t),v("externalJointsStream","controller",r),v("externalJointsStream","externalJointStreamDatapoint",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},getMotionGroupBehavior:async(t,r,n,o={})=>{v("getMotionGroupBehavior","cell",t),v("getMotionGroupBehavior","controller",r),v("getMotionGroupBehavior","id",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},setMotionGroupBehavior:async(t,r,n,o,a={})=>{v("setMotionGroupBehavior","cell",t),v("setMotionGroupBehavior","controller",r),v("setMotionGroupBehavior","id",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...a},u={},d={};U(c,e),await D(u,e),o!==void 0&&(d.behavior=o),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},{url:B(i),options:c}}}},ji=function(e){const t=M2(e);return{async externalJointsStream(r,n,o,a){var c,u;const s=await t.externalJointsStream(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async getMotionGroupBehavior(r,n,o,a){var c,u;const s=await t.getMotionGroupBehavior(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async setMotionGroupBehavior(r,n,o,a,s){var u,d;const i=await t.setMotionGroupBehavior(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class j2 extends Me{externalJointsStream(t,r,n,o){return ji(this.configuration).externalJointsStream(t,r,n,o).then(a=>a(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,o){return ji(this.configuration).getMotionGroupBehavior(t,r,n,o).then(a=>a(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,o,a){return ji(this.configuration).setMotionGroupBehavior(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}}const k2=function(e){return{getCycleTime:async(t,r,n={})=>{v("getCycleTime","cell",t),v("getCycleTime","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getEStop:async(t,r,n={})=>{v("getEStop","cell",t),v("getEStop","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},getOperationMode:async(t,r,n={})=>{v("getOperationMode","cell",t),v("getOperationMode","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},pushEStop:async(t,r,n={})=>{v("pushEStop","cell",t),v("pushEStop","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},releaseEStop:async(t,r,n={})=>{v("releaseEStop","cell",t),v("releaseEStop","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},setOperationMode:async(t,r,n,o={})=>{v("setOperationMode","cell",t),v("setOperationMode","controller",r),v("setOperationMode","mode",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),n!==void 0&&(u.mode=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}}}},nn=function(e){const t=k2(e);return{async getCycleTime(r,n,o){var l,c;const a=await t.getCycleTime(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getEStop(r,n,o){var l,c;const a=await t.getEStop(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async getOperationMode(r,n,o){var l,c;const a=await t.getOperationMode(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async pushEStop(r,n,o){var l,c;const a=await t.pushEStop(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.pushEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async releaseEStop(r,n,o){var l,c;const a=await t.releaseEStop(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async setOperationMode(r,n,o,a){var c,u;const s=await t.setOperationMode(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)}}};class $2 extends Me{getCycleTime(t,r,n){return nn(this.configuration).getCycleTime(t,r,n).then(o=>o(this.axios,this.basePath))}getEStop(t,r,n){return nn(this.configuration).getEStop(t,r,n).then(o=>o(this.axios,this.basePath))}getOperationMode(t,r,n){return nn(this.configuration).getOperationMode(t,r,n).then(o=>o(this.axios,this.basePath))}pushEStop(t,r,n){return nn(this.configuration).pushEStop(t,r,n).then(o=>o(this.axios,this.basePath))}releaseEStop(t,r,n){return nn(this.configuration).releaseEStop(t,r,n).then(o=>o(this.axios,this.basePath))}setOperationMode(t,r,n,o){return nn(this.configuration).setOperationMode(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const U2=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,o={})=>{v("addVirtualRobotCoordinateSystem","cell",t),v("addVirtualRobotCoordinateSystem","controller",r),v("addVirtualRobotCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};U(l,e),await D(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=he(n,l,e),{url:B(s),options:l}},addVirtualRobotTcp:async(t,r,n,o,a={})=>{v("addVirtualRobotTcp","cell",t),v("addVirtualRobotTcp","controller",r),v("addVirtualRobotTcp","id",n),v("addVirtualRobotTcp","robotTcp",o);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...a},u={},d={};U(c,e),await D(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},c.data=he(o,c,e),{url:B(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,o,a={})=>{v("deleteVirtualRobotCoordinateSystem","cell",t),v("deleteVirtualRobotCoordinateSystem","controller",r),v("deleteVirtualRobotCoordinateSystem","coordinateSystem",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...a},u={},d={};U(c,e),await D(u,e),o!==void 0&&(d.delete_dependent=o),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},{url:B(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,o,a={})=>{v("deleteVirtualRobotTcp","cell",t),v("deleteVirtualRobotTcp","controller",r),v("deleteVirtualRobotTcp","id",n),v("deleteVirtualRobotTcp","tcp",o);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...a},u={},d={};U(c,e),await D(u,e),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},{url:B(i),options:c}},getVirtualRobotMounting:async(t,r,n,o={})=>{v("getVirtualRobotMounting","cell",t),v("getVirtualRobotMounting","controller",r),v("getVirtualRobotMounting","id",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{v("listVirtualRobotCoordinateSystems","cell",t),v("listVirtualRobotCoordinateSystems","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(o,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};U(i,e),await D(l,e),L(a,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(a),options:i}},listVirtualRobotTcps:async(t,r,n,o={})=>{v("listVirtualRobotTcps","cell",t),v("listVirtualRobotTcps","controller",r),v("listVirtualRobotTcps","id",n);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),s=new URL(a,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:B(s),options:l}},setVirtualRobotMounting:async(t,r,n,o,a={})=>{v("setVirtualRobotMounting","cell",t),v("setVirtualRobotMounting","controller",r),v("setVirtualRobotMounting","id",n),v("setVirtualRobotMounting","coordinateSystem",o);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...a},u={},d={};U(c,e),await D(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...a.headers},c.data=he(o,c,e),{url:B(i),options:c}}}},or=function(e){const t=U2(e);return{async addVirtualRobotCoordinateSystem(r,n,o,a){var c,u;const s=await t.addVirtualRobotCoordinateSystem(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async addVirtualRobotTcp(r,n,o,a,s){var u,d;const i=await t.addVirtualRobotTcp(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async deleteVirtualRobotCoordinateSystem(r,n,o,a,s){var u,d;const i=await t.deleteVirtualRobotCoordinateSystem(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async deleteVirtualRobotTcp(r,n,o,a,s){var u,d;const i=await t.deleteVirtualRobotTcp(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)},async getVirtualRobotMounting(r,n,o,a){var c,u;const s=await t.getVirtualRobotMounting(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async listVirtualRobotCoordinateSystems(r,n,o){var l,c;const a=await t.listVirtualRobotCoordinateSystems(r,n,o),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>N(a,_,M,e)(u,i||d)},async listVirtualRobotTcps(r,n,o,a){var c,u;const s=await t.listVirtualRobotTcps(r,n,o,a),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>N(s,_,M,e)(d,l||h)},async setVirtualRobotMounting(r,n,o,a,s){var u,d;const i=await t.setVirtualRobotMounting(r,n,o,a,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>N(i,_,M,e)(h,c||p)}}};class D2 extends Me{addVirtualRobotCoordinateSystem(t,r,n,o){return or(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,o).then(a=>a(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,o,a){return or(this.configuration).addVirtualRobotTcp(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,o,a){return or(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,o,a){return or(this.configuration).deleteVirtualRobotTcp(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,o){return or(this.configuration).getVirtualRobotMounting(t,r,n,o).then(a=>a(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return or(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,o){return or(this.configuration).listVirtualRobotTcps(t,r,n,o).then(a=>a(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,o,a){return or(this.configuration).setVirtualRobotMounting(t,r,n,o,a).then(s=>s(this.axios,this.basePath))}}function Nt(e,t,r){return Math.max(t,Math.min(r,e))}class L2{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,a,s,i){let l=n[o+0],c=n[o+1],u=n[o+2],d=n[o+3];const h=a[s+0],p=a[s+1],f=a[s+2],m=a[s+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 b=1-i;const S=l*h+c*p+u*f+d*m,E=S>=0?1:-1,O=1-S*S;if(O>Number.EPSILON){const A=Math.sqrt(O),C=Math.atan2(A,S*E);b=Math.sin(b*C)/A,i=Math.sin(i*C)/A}const w=i*E;if(l=l*b+h*w,c=c*b+p*w,u=u*b+f*w,d=d*b+m*w,b===1-i){const A=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=A,c*=A,u*=A,d*=A}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,o,a,s){const i=n[o],l=n[o+1],c=n[o+2],u=n[o+3],d=a[s],h=a[s+1],p=a[s+2],f=a[s+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,a=t._z,s=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(o/2),d=i(a/2),h=l(n/2),p=l(o/2),f=l(a/2);switch(s){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: "+s)}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],a=r[8],s=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=(a-c)*p,this._z=(s-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+s)/p,this._z=(a+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(a-c)/p,this._x=(o+s)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(s-o)/p,this._x=(a+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(Nt(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,a=t._z,s=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+s*i+o*c-a*l,this._y=o*u+s*l+a*i-n*c,this._z=a*u+s*c+n*l-o*i,this._w=s*u-n*i-o*l-a*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,a=this._z,s=this._w;let i=s*t._w+n*t._x+o*t._y+a*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=s,this._x=n,this._y=o,this._z=a,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*s+r*this._w,this._x=p*n+r*this._x,this._y=p*o+r*this._y,this._z=p*a+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=s*d+this._w*h,this._x=n*d+this._x*h,this._y=o*d+this._y*h,this._z=a*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),a=Math.sqrt(n);return this.set(o*Math.sin(t),o*Math.cos(t),a*Math.sin(r),a*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 pn{constructor(t=0,r=0,n=0){pn.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(oh.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(oh.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,o=this.z,a=t.elements;return this.x=a[0]*r+a[3]*n+a[6]*o,this.y=a[1]*r+a[4]*n+a[7]*o,this.z=a[2]*r+a[5]*n+a[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,o=this.z,a=t.elements,s=1/(a[3]*r+a[7]*n+a[11]*o+a[15]);return this.x=(a[0]*r+a[4]*n+a[8]*o+a[12])*s,this.y=(a[1]*r+a[5]*n+a[9]*o+a[13])*s,this.z=(a[2]*r+a[6]*n+a[10]*o+a[14])*s,this}applyQuaternion(t){const r=this.x,n=this.y,o=this.z,a=t.x,s=t.y,i=t.z,l=t.w,c=2*(s*o-i*n),u=2*(i*r-a*o),d=2*(a*n-s*r);return this.x=r+l*c+s*d-i*u,this.y=n+l*u+i*c-a*d,this.z=o+l*d+a*u-s*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,n=this.y,o=this.z,a=t.elements;return this.x=a[0]*r+a[4]*n+a[8]*o,this.y=a[1]*r+a[5]*n+a[9]*o,this.z=a[2]*r+a[6]*n+a[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=Nt(this.x,t.x,r.x),this.y=Nt(this.y,t.y,r.y),this.z=Nt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Nt(this.x,t,r),this.y=Nt(this.y,t,r),this.z=Nt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Nt(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,a=t.z,s=r.x,i=r.y,l=r.z;return this.x=o*l-a*i,this.y=a*s-n*l,this.z=n*i-o*s,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 ki.copy(this).projectOnVector(t),this.sub(ki)}reflect(t){return this.sub(ki.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(Nt(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 ki=new pn,oh=new L2;function B2(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 a=t.join("/");a=a.replace(/\/(\?|&|#[^!])/g,"$1");var s=a.split("?");return a=s.shift()+(s.length>0?"?":"")+s.join("&"),a}function $i(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),B2(e)}var It={},ah;function N2(){if(ah)return It;ah=1,Object.defineProperty(It,"__esModule",{value:!0}),It.TokenData=void 0,It.parse=d,It.compile=h,It.match=m,It.pathToRegexp=b,It.stringify=w;const e="/",t=T=>T,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,o="https://git.new/pathToRegexpError",a={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(T){return T.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(T){return T.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(T){const V=[...T];let j=0;function y(){let R="";if(r.test(V[++j]))for(R+=V[j];n.test(V[++j]);)R+=V[j];else if(V[j]==='"'){let z=j;for(;j<V.length;){if(V[++j]==='"'){j++,z=0;break}V[j]==="\\"?R+=V[++j]:R+=V[j]}if(z)throw new TypeError(`Unterminated quote at ${z}: ${o}`)}if(!R)throw new TypeError(`Missing parameter name at ${j}: ${o}`);return R}for(;j<V.length;){const R=V[j],z=a[R];if(z)yield{type:z,index:j++,value:R};else if(R==="\\")yield{type:"ESCAPED",index:j++,value:V[j++]};else if(R===":"){const I=y();yield{type:"PARAM",index:j,value:I}}else if(R==="*"){const I=y();yield{type:"WILDCARD",index:j,value:I}}else yield{type:"CHAR",index:j,value:V[j++]}}return{type:"END",index:j,value:""}}class c{constructor(V){this.tokens=V}peek(){if(!this._peek){const V=this.tokens.next();this._peek=V.value}return this._peek}tryConsume(V){const j=this.peek();if(j.type===V)return this._peek=void 0,j.value}consume(V){const j=this.tryConsume(V);if(j!==void 0)return j;const{type:y,index:R}=this.peek();throw new TypeError(`Unexpected ${y} at ${R}, expected ${V}: ${o}`)}text(){let V="",j;for(;j=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)V+=j;return V}}class u{constructor(V){this.tokens=V}}It.TokenData=u;function d(T,V={}){const{encodePath:j=t}=V,y=new c(l(T));function R(I){const G=[];for(;;){const oe=y.text();oe&&G.push({type:"text",value:j(oe)});const re=y.tryConsume("PARAM");if(re){G.push({type:"param",name:re});continue}const te=y.tryConsume("WILDCARD");if(te){G.push({type:"wildcard",name:te});continue}if(y.tryConsume("{")){G.push({type:"group",tokens:R("}")});continue}return y.consume(I),G}}const z=R("END");return new u(z)}function h(T,V={}){const{encode:j=encodeURIComponent,delimiter:y=e}=V,R=T instanceof u?T:d(T,V),z=p(R.tokens,y,j);return function(G={}){const[oe,...re]=z(G);if(re.length)throw new TypeError(`Missing parameters: ${re.join(", ")}`);return oe}}function p(T,V,j){const y=T.map(R=>f(R,V,j));return R=>{const z=[""];for(const I of y){const[G,...oe]=I(R);z[0]+=G,z.push(...oe)}return z}}function f(T,V,j){if(T.type==="text")return()=>[T.value];if(T.type==="group"){const R=p(T.tokens,V,j);return z=>{const[I,...G]=R(z);return G.length?[""]:[I]}}const y=j||t;return T.type==="wildcard"&&j!==!1?R=>{const z=R[T.name];if(z==null)return["",T.name];if(!Array.isArray(z)||z.length===0)throw new TypeError(`Expected "${T.name}" to be a non-empty array`);return[z.map((I,G)=>{if(typeof I!="string")throw new TypeError(`Expected "${T.name}/${G}" to be a string`);return y(I)}).join(V)]}:R=>{const z=R[T.name];if(z==null)return["",T.name];if(typeof z!="string")throw new TypeError(`Expected "${T.name}" to be a string`);return[y(z)]}}function m(T,V={}){const{decode:j=decodeURIComponent,delimiter:y=e}=V,{regexp:R,keys:z}=b(T,V),I=z.map(G=>j===!1?t:G.type==="param"?j:oe=>oe.split(y).map(j));return function(oe){const re=R.exec(oe);if(!re)return!1;const te=re[0],ee=Object.create(null);for(let se=1;se<re.length;se++){if(re[se]===void 0)continue;const H=z[se-1],X=I[se-1];ee[H.name]=X(re[se])}return{path:te,params:ee}}}function b(T,V={}){const{delimiter:j=e,end:y=!0,sensitive:R=!1,trailing:z=!0}=V,I=[],G=[],oe=R?"":"i",te=(Array.isArray(T)?T:[T]).map(H=>H instanceof u?H:d(H,V));for(const{tokens:H}of te)for(const X of S(H,0,[])){const le=E(X,j,I);G.push(le)}let ee=`^(?:${G.join("|")})`;return z&&(ee+=`(?:${i(j)}$)?`),ee+=y?"$":`(?=${i(j)}|$)`,{regexp:new RegExp(ee,oe),keys:I}}function*S(T,V,j){if(V===T.length)return yield j;const y=T[V];if(y.type==="group"){const R=j.slice();for(const z of S(y.tokens,0,R))yield*S(T,V+1,z)}else j.push(y);yield*S(T,V+1,j)}function E(T,V,j){let y="",R="",z=!0;for(let I=0;I<T.length;I++){const G=T[I];if(G.type==="text"){y+=i(G.value),R+=G.value,z||(z=G.value.includes(V));continue}if(G.type==="param"||G.type==="wildcard"){if(!z&&!R)throw new TypeError(`Missing text after "${G.name}": ${o}`);G.type==="param"?y+=`(${O(V,z?"":R)}+)`:y+="([\\s\\S]+)",j.push(G),R="",z=!1;continue}}return y}function O(T,V){return V.length<2?T.length<2?`[^${i(T+V)}]`:`(?:(?!${i(T)})[^${i(V)}])`:T.length<2?`(?:(?!${i(V)})[^${i(T)}])`:`(?:(?!${i(V)}|${i(T)})[\\s\\S])`}function w(T){return T.tokens.map(function V(j,y,R){if(j.type==="text")return s(j.value);if(j.type==="group")return`{${j.tokens.map(V).join("")}}`;const I=A(j.name)&&C(R[y+1])?j.name:JSON.stringify(j.name);if(j.type==="param")return`:${I}`;if(j.type==="wildcard")return`*${I}`;throw new TypeError(`Unexpected token: ${j}`)}).join("")}function A(T){const[V,...j]=T;return r.test(V)?j.every(y=>n.test(y)):!1}function C(T){return(T==null?void 0:T.type)!=="text"?!0:!n.test(T.value[0])}return It}var F2=N2();function vf(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 Sf(e,t,r){if(e===void 0&&t||e&&t===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation.x-t.orientation.x),n+=Math.abs(e.orientation.y-t.orientation.y),n+=Math.abs(e.orientation.z-t.orientation.z),n+=Math.abs(e.position.x-t.position.x),n+=Math.abs(e.position.y-t.position.y),n+=Math.abs(e.position.z-t.position.z),n>r?!1:e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp}var sh=1e-4,z2=class Of{constructor(t,r,n,o,a,s,i,l,c,u,d,h){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=o,this.motionStateSocket=a,this.isVirtual=s,this.tcps=i,this.motionGroupSpecification=l,this.safetySetup=c,this.mounting=u,this.initialControllerState=d,this.controllerStateSocket=h,this.connectedJoggingCartesianSocket=null,this.connectedJoggingJointsSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=o,this.controllerState=d,h.addEventListener("message",p=>{var f;const m=(f=lr(p.data))==null?void 0:f.result;m&&$e.runInAction(()=>{this.controllerState=m})}),a.addEventListener("message",p=>{var f;const m=(f=lr(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);vf(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,sh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),Sf(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,sh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),$e.makeAutoObservable(this)}static connect(t,r,n){return Ve(this,null,function*(){var o,a;const[s,i]=r.split("@"),l=n.find(C=>C.controller===i),c=l==null?void 0:l.physical_motion_groups.find(C=>C.motion_group===r);if(!l||!c)throw new Error(`Controller ${i} or motion group ${r} not found`);const u=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),d=yield u.firstMessage(),h=(o=lr(d.data))==null?void 0:o.result;if(!h)throw new Error(`Unable to parse initial motion state message ${d.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
151
|
+
`,h);const f=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",m=yield Ve(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(C){return console.error(`Error fetching mounting for ${c.motion_group}`,C),null}}),b=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),S=yield b.firstMessage(),E=(a=lr(S.data))==null?void 0:a.result;if(!E)throw new Error(`Unable to parse initial controller state message ${S.data}`);console.log(`Connected controller state websocket to controller ${l.controller}. Initial state:
|
|
152
|
+
`,E);const{tcps:O}=yield t.api.motionGroupInfos.listTcps(r),w=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),A=yield t.api.motionGroupInfos.getSafetySetup(r);return new Of(t,l,c,h,u,f,O,w,A,m,E,b)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}get dhParameters(){return this.motionGroupSpecification.dh_parameters}get safetyZones(){return this.safetySetup.safety_zones}get mountingPosition(){return this.mounting?[this.mounting.pose.position.x/1e3,this.mounting.pose.position.y/1e3,this.mounting.pose.position.z/1e3]:[0,0,0]}get mountingQuaternion(){var t,r,n,o,a,s;const i=new Be.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((o=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:o.y)||0,((s=(a=this.mounting)==null?void 0:a.pose.orientation)==null?void 0:s.z)||0),l=i.length(),c=i.normalize();return new Be.Quaternion().setFromAxisAngle(c,l)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}deactivate(){return Ve(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}$e.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),$e.runInAction(()=>{this.activationState="inactive"})}catch(t){throw $e.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Ve(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}$e.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),$e.runInAction(()=>{this.activationState="active"})}catch(t){throw $e.runInAction(()=>{this.activationState="inactive"}),t}})}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingCartesianSocket&&this.connectedJoggingCartesianSocket.close(),this.connectedJoggingJointsSocket&&this.connectedJoggingJointsSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}},G2=class wf{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ve(this,arguments,function*(n,o,a={}){const s=yield n.connectMotionStream(o);return new wf(s,a)})}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}get activeJoggingMode(){return this.cartesianWebsocket?"cartesian":this.jointWebsocket?"joint":"increment"}get activeWebsocket(){return this.cartesianWebsocket||this.jointWebsocket}stop(){return Ve(this,null,function*(){this.cartesianWebsocket&&this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:{x:0,y:0,z:0},rotation_direction:{x:0,y:0,z:0},position_velocity:0,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId}),this.jointWebsocket&&this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:new Array(this.numJoints).fill(0)})})}dispose(){this.cartesianWebsocket&&this.cartesianWebsocket.dispose(),this.jointWebsocket&&this.jointWebsocket.dispose()}setJoggingMode(t,r){console.log("Setting jogging mode to",t),r&&(JA(this.cartesianJoggingOpts,r)||this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),this.cartesianJoggingOpts=r),t!=="cartesian"&&this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),t!=="joint"&&this.jointWebsocket&&(this.jointWebsocket.dispose(),this.jointWebsocket=null),t==="cartesian"&&!this.cartesianWebsocket&&(this.cartesianWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-tcp"),this.cartesianWebsocket.addEventListener("message",n=>{const o=lr(n.data);if(o&&"error"in o)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",n=>{const o=lr(n.data);if(o&&"error"in o)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return Ve(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:o}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const a=new Array(this.numJoints).fill(0);a[r]=n==="-"?-o:o,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:a})})}startTCPTranslation(t){return Ve(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:o}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const a={x:0,y:0,z:0},s=Object.assign({},a);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:a,position_velocity:o,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return Ve(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:o}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const a={x:0,y:0,z:0},s=Object.assign({},a);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:a,rotation_direction:s,position_velocity:0,rotation_velocity:o,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return Ve(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:o,velocityInRelevantUnits:a,axis:s,direction:i,motion:l}){var c;const u=[];if(!u_(r.coordinate_system,o))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${o}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[s]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:a}},line:{position:p,orientation:r.orientation,coordinate_system:o}})}else if(l.type==="rotate"){const p=new pn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),b=l.distanceRads*(i==="-"?-1:1),S=new pn(0,0,0);S[s]=1;const E=Math.cos(.5*b)*Math.cos(.5*f),O=Math.sin(.5*b)*Math.sin(.5*f),w=Math.sin(.5*b)*Math.cos(.5*f),A=Math.cos(.5*b)*Math.sin(.5*f),C=S.dot(m),T=S.clone().cross(m),V=2*Math.acos(E-O*C),j=V/Math.sin(.5*V),y=new pn().addScaledVector(T,O).addScaledVector(S,w).addScaledVector(m,A).multiplyScalar(j);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:a}},line:{position:r.position,orientation:y,coordinate_system:o}})}const d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,tcp:this.cartesianJoggingOpts.tcpId,commands:u}),h=(c=d.plan_successful_response)==null?void 0:c.motion;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);yield this.nova.api.motion.streamMoveForward(h,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return Ve(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:o,direction:a,distanceRads:s}){var i;const l=[...n.joints];l[r]+=s*(a==="-"?-1:1);const c=new Array(n.joints.length).fill(o),u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),d=(i=u.plan_successful_response)==null?void 0:i.motion;if(!d){console.error("Failed to plan jogging increment motion",u);return}yield this.nova.api.motion.streamMoveForward(d,100,void 0,void 0,void 0,{timeout:1e3*60})})}},ih=1e-4;function H2(e,t){const r=new Ot.Vector3(t.x,t.y,t.z),n=new Ot.Vector3(e.x,e.y,e.z),o=r.length(),a=r.normalize();let s=n.length(),i=n.normalize();i.dot(a)<0&&(s=-s,i=i.multiplyScalar(-1));let l=s-o;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),s=o+l,i.multiplyScalar(s)}var q2=class Cf{constructor(t,r,n,o,a){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=o,this.motionStateSocket=a,this.rapidlyChangingMotionState=o,a.addEventListener("message",s=>{var i;const l=(i=lr(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);vf(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,ih)||$e.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),Sf(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,ih)||$e.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:H2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),$e.makeAutoObservable(this)}static open(t,r){return Ve(this,null,function*(){var n;const{instances:o}=yield t.api.controller.listControllers(),[a,s]=r.split("@"),i=o.find(h=>h.controller===s),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${s} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield c.firstMessage();console.log("got first message",u);const d=(n=lr(u.data))==null?void 0:n.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
153
|
+
`,d),new Cf(t,i,l,d,c)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}},W2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(E2),this.cell=this.withUnwrappedResponsesOnly(qE),this.deviceConfig=this.withCellId(e2),this.motionGroup=this.withCellId(h2),this.motionGroupInfos=this.withCellId(m2),this.controller=this.withCellId(JE),this.program=this.withCellId(v2),this.programValues=this.withCellId(O2),this.controllerIOs=this.withCellId(KE),this.motionGroupKinematic=this.withCellId(b2),this.motion=this.withCellId(u2),this.coordinateSystems=this.withCellId(XE),this.application=this.withCellId(nh),this.applicationGlobal=this.withUnwrappedResponsesOnly(nh),this.motionGroupJogging=this.withCellId(g2),this.virtualRobot=this.withCellId(V2),this.virtualRobotSetup=this.withCellId(D2),this.virtualRobotMode=this.withCellId($2),this.virtualRobotBehavior=this.withCellId(j2),this.libraryProgramMetadata=this.withCellId(o2),this.libraryProgram=this.withCellId(r2),this.libraryRecipeMetadata=this.withCellId(l2),this.libraryRecipe=this.withCellId(s2),this.storeObject=this.withCellId(A2),this.storeCollisionComponents=this.withCellId(C2),this.storeCollisionScenes=this.withCellId(T2)}withCellId(e){var t,r;const n=new e(dl(ln({},this.opts),{isJsonMime:o=>o==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const o of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(o!=="constructor"&&typeof n[o]=="function"){const a=n[o];n[o]=(...s)=>a.apply(n,[this.cellId,...s]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(dl(ln({},this.opts),{isJsonMime:o=>o==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const o of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(o!=="constructor"&&typeof n[o]=="function"){const a=n[o];n[o]=(...s)=>a.apply(n,s).then(i=>i.data)}return n}},J2=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ve(this,null,function*(){var t,r,n;const o=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],a=((t=e.method)==null?void 0:t.toUpperCase())||"GET",s="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of o){const l=F2.match(i.path)(s||"");if(a===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 bl(`No mock handler matched this request: ${a} ${s}`,"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(Y2)})),e.url.includes("/move-joint")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:48:26.096266444Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"671259"}],sequence_number:"671259"},movement_state:"MOVEMENT_STATE_MOVING"}})})),e.url.includes("/move-tcp")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:43:12.188335774Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3352527618408203,-1.5659207105636597,1.6653711795806885,-1.110615611076355,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"627897"}],sequence_number:"627897"},movement_state:"MOVEMENT_STATE_MOVING"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}},Y2={result:{state:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",joint_position:{joints:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:""},tcp_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"1"},tcp_pose:{position:{x:302.90748476115556,y:-152.87065869452337,z:424.0454619321661},orientation:{x:2.3403056115045353,y:-1.1706836379431356,z:.9772511964246311},coordinate_system:"",tcp:"Flange"}}},K2=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=ln({cellId:r},e),this.accessToken=e.accessToken||_i.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new J2);const n=_.create({baseURL:$i(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(o=>Ve(this,null,function*(){return o.headers.Authorization||(this.accessToken?o.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(o.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),o})),typeof window<"u"&&n.interceptors.response.use(o=>o,o=>Ve(this,null,function*(){var a,s;if(FE(o))if(((a=o.response)==null?void 0:a.status)===401)try{if(yield this.renewAuthentication(),o.config)return this.accessToken?o.config.headers.Authorization=`Bearer ${this.accessToken}`:delete o.config.headers.Authorization,n.request(o.config)}catch(i){return Promise.reject(i)}else((s=o.response)==null?void 0:s.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(o)})),this.api=new W2(r,dl(ln({},e),{basePath:$i(this.config.instanceUrl,"/api/v1"),isJsonMime:o=>o==="application/json",baseOptions:ln(ln({},this.mock?{adapter:o=>this.mock.handleAPIRequest(o)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Ve(this,null,function*(){if(!this.authPromise){this.authPromise=h_(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?_i.setString("wbjs.access_token",this.accessToken):_i.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL($i(this.config.instanceUrl,`/api/v1/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 l_(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ve(this,null,function*(){return yield q2.open(this,e)})}connectJogger(e){return Ve(this,null,function*(){return yield G2.open(this,e)})}connectMotionGroups(e){return Ve(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>z2.connect(this,r,t)))})}connectMotionGroup(e){return Ve(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function Q2(e){try{return JSON.stringify(e)}catch{return}}function X2(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function Z2(e){var t,r,n,o;return e instanceof bl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof bl&&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: ${Q2(e)||e}`}const Pc=e=>{const t=e.softTimeout||3e3,[r,n]=J.useState(!1),o=P.useTheme();return J.useEffect(()=>{const a=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(a)}),g.jsx(P.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?g.jsx(Pf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(P.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(P.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Pf=e=>{const t=Z2(e.error),r=e.error instanceof Error?e.error.stack:null,n=P.useTheme();return g.jsxs(P.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 ${Al.lowerFirst(P.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},eI=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),tI=J.forwardRef(eI),rI=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),nI=J.forwardRef(rI),oI=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),aI=J.forwardRef(oI),sI=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.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"})),iI=J.forwardRef(sI);function lI(){this.__data__=[],this.size=0}function Tf(e,t){return e===t||e!==e&&t!==t}function Fs(e,t){for(var r=e.length;r--;)if(Tf(e[r][0],t))return r;return-1}var cI=Array.prototype,uI=cI.splice;function dI(e){var t=this.__data__,r=Fs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():uI.call(t,r,1),--this.size,!0}function hI(e){var t=this.__data__,r=Fs(t,e);return r<0?void 0:t[r][1]}function pI(e){return Fs(this.__data__,e)>-1}function mI(e,t){var r=this.__data__,n=Fs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Zt(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])}}Zt.prototype.clear=lI;Zt.prototype.delete=dI;Zt.prototype.get=hI;Zt.prototype.has=pI;Zt.prototype.set=mI;function fI(){this.__data__=new Zt,this.size=0}function gI(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function yI(e){return this.__data__.get(e)}function bI(e){return this.__data__.has(e)}var xI="[object AsyncFunction]",vI="[object Function]",SI="[object GeneratorFunction]",OI="[object Proxy]";function Rf(e){if(!_r(e))return!1;var t=Lr(e);return t==vI||t==SI||t==xI||t==OI}var Ui=Dt["__core-js_shared__"],lh=function(){var e=/[^.]+$/.exec(Ui&&Ui.keys&&Ui.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function wI(e){return!!lh&&lh in e}var CI=Function.prototype,PI=CI.toString;function Nr(e){if(e!=null){try{return PI.call(e)}catch{}try{return e+""}catch{}}return""}var TI=/[\\^$.*+?()[\]{}|]/g,RI=/^\[object .+?Constructor\]$/,AI=Function.prototype,_I=Object.prototype,EI=AI.toString,II=_I.hasOwnProperty,VI=RegExp("^"+EI.call(II).replace(TI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MI(e){if(!_r(e)||wI(e))return!1;var t=Rf(e)?VI:RI;return t.test(Nr(e))}function jI(e,t){return e==null?void 0:e[t]}function Fr(e,t){var r=jI(e,t);return MI(r)?r:void 0}var Co=Fr(Dt,"Map"),Po=Fr(Object,"create");function kI(){this.__data__=Po?Po(null):{},this.size=0}function $I(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var UI="__lodash_hash_undefined__",DI=Object.prototype,LI=DI.hasOwnProperty;function BI(e){var t=this.__data__;if(Po){var r=t[e];return r===UI?void 0:r}return LI.call(t,e)?t[e]:void 0}var NI=Object.prototype,FI=NI.hasOwnProperty;function zI(e){var t=this.__data__;return Po?t[e]!==void 0:FI.call(t,e)}var GI="__lodash_hash_undefined__";function HI(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Po&&t===void 0?GI:t,this}function Vr(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])}}Vr.prototype.clear=kI;Vr.prototype.delete=$I;Vr.prototype.get=BI;Vr.prototype.has=zI;Vr.prototype.set=HI;function qI(){this.size=0,this.__data__={hash:new Vr,map:new(Co||Zt),string:new Vr}}function WI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function zs(e,t){var r=e.__data__;return WI(t)?r[typeof t=="string"?"string":"hash"]:r.map}function JI(e){var t=zs(this,e).delete(e);return this.size-=t?1:0,t}function YI(e){return zs(this,e).get(e)}function KI(e){return zs(this,e).has(e)}function QI(e,t){var r=zs(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,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=qI;er.prototype.delete=JI;er.prototype.get=YI;er.prototype.has=KI;er.prototype.set=QI;var XI=200;function ZI(e,t){var r=this.__data__;if(r instanceof Zt){var n=r.__data__;if(!Co||n.length<XI-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new er(n)}return r.set(e,t),this.size=r.size,this}function qt(e){var t=this.__data__=new Zt(e);this.size=t.size}qt.prototype.clear=fI;qt.prototype.delete=gI;qt.prototype.get=yI;qt.prototype.has=bI;qt.prototype.set=ZI;var eV="__lodash_hash_undefined__";function tV(e){return this.__data__.set(e,eV),this}function rV(e){return this.__data__.has(e)}function Xa(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new er;++t<r;)this.add(e[t])}Xa.prototype.add=Xa.prototype.push=tV;Xa.prototype.has=rV;function nV(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 oV(e,t){return e.has(t)}var aV=1,sV=2;function Af(e,t,r,n,o,a){var s=r&aV,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&sV?new Xa:void 0;for(a.set(e,t),a.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=s?n(m,f,d,t,e,a):n(f,m,d,e,t,a);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!nV(t,function(S,E){if(!oV(p,E)&&(f===S||o(f,S,r,n,a)))return p.push(E)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var ch=Dt.Uint8Array;function iV(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function lV(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var cV=1,uV=2,dV="[object Boolean]",hV="[object Date]",pV="[object Error]",mV="[object Map]",fV="[object Number]",gV="[object RegExp]",yV="[object Set]",bV="[object String]",xV="[object Symbol]",vV="[object ArrayBuffer]",SV="[object DataView]",uh=hr?hr.prototype:void 0,Di=uh?uh.valueOf:void 0;function OV(e,t,r,n,o,a,s){switch(r){case SV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vV:return!(e.byteLength!=t.byteLength||!a(new ch(e),new ch(t)));case dV:case hV:case fV:return Tf(+e,+t);case pV:return e.name==t.name&&e.message==t.message;case gV:case bV:return e==t+"";case mV:var i=iV;case yV:var l=n&cV;if(i||(i=lV),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=uV,s.set(e,t);var u=Af(i(e),i(t),n,o,a,s);return s.delete(e),u;case xV:if(Di)return Di.call(e)==Di.call(t)}return!1}function wV(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Ut=Array.isArray;function CV(e,t,r){var n=t(e);return Ut(e)?n:wV(n,r(e))}function PV(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[o++]=s)}return a}function TV(){return[]}var RV=Object.prototype,AV=RV.propertyIsEnumerable,dh=Object.getOwnPropertySymbols,_V=dh?function(e){return e==null?[]:(e=Object(e),PV(dh(e),function(t){return AV.call(e,t)}))}:TV;function EV(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var IV="[object Arguments]";function hh(e){return Er(e)&&Lr(e)==IV}var _f=Object.prototype,VV=_f.hasOwnProperty,MV=_f.propertyIsEnumerable,Ef=hh(function(){return arguments}())?hh:function(e){return Er(e)&&VV.call(e,"callee")&&!MV.call(e,"callee")};function jV(){return!1}var If=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ph=If&&typeof module=="object"&&module&&!module.nodeType&&module,kV=ph&&ph.exports===If,mh=kV?Dt.Buffer:void 0,$V=mh?mh.isBuffer:void 0,vl=$V||jV,UV=9007199254740991,DV=/^(?:0|[1-9]\d*)$/;function Vf(e,t){var r=typeof e;return t=t??UV,!!t&&(r=="number"||r!="symbol"&&DV.test(e))&&e>-1&&e%1==0&&e<t}var LV=9007199254740991;function Tc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LV}var BV="[object Arguments]",NV="[object Array]",FV="[object Boolean]",zV="[object Date]",GV="[object Error]",HV="[object Function]",qV="[object Map]",WV="[object Number]",JV="[object Object]",YV="[object RegExp]",KV="[object Set]",QV="[object String]",XV="[object WeakMap]",ZV="[object ArrayBuffer]",eM="[object DataView]",tM="[object Float32Array]",rM="[object Float64Array]",nM="[object Int8Array]",oM="[object Int16Array]",aM="[object Int32Array]",sM="[object Uint8Array]",iM="[object Uint8ClampedArray]",lM="[object Uint16Array]",cM="[object Uint32Array]",Ie={};Ie[tM]=Ie[rM]=Ie[nM]=Ie[oM]=Ie[aM]=Ie[sM]=Ie[iM]=Ie[lM]=Ie[cM]=!0;Ie[BV]=Ie[NV]=Ie[ZV]=Ie[FV]=Ie[eM]=Ie[zV]=Ie[GV]=Ie[HV]=Ie[qV]=Ie[WV]=Ie[JV]=Ie[YV]=Ie[KV]=Ie[QV]=Ie[XV]=!1;function uM(e){return Er(e)&&Tc(e.length)&&!!Ie[Lr(e)]}function dM(e){return function(t){return e(t)}}var Mf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lo=Mf&&typeof module=="object"&&module&&!module.nodeType&&module,hM=lo&&lo.exports===Mf,Li=hM&&Im.process,fh=function(){try{var e=lo&&lo.require&&lo.require("util").types;return e||Li&&Li.binding&&Li.binding("util")}catch{}}(),gh=fh&&fh.isTypedArray,jf=gh?dM(gh):uM,pM=Object.prototype,mM=pM.hasOwnProperty;function fM(e,t){var r=Ut(e),n=!r&&Ef(e),o=!r&&!n&&vl(e),a=!r&&!n&&!o&&jf(e),s=r||n||o||a,i=s?EV(e.length,String):[],l=i.length;for(var c in e)mM.call(e,c)&&!(s&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vf(c,l)))&&i.push(c);return i}var gM=Object.prototype;function yM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gM;return e===r}function bM(e,t){return function(r){return e(t(r))}}var xM=bM(Object.keys,Object),vM=Object.prototype,SM=vM.hasOwnProperty;function OM(e){if(!yM(e))return xM(e);var t=[];for(var r in Object(e))SM.call(e,r)&&r!="constructor"&&t.push(r);return t}function kf(e){return e!=null&&Tc(e.length)&&!Rf(e)}function Rc(e){return kf(e)?fM(e):OM(e)}function yh(e){return CV(e,Rc,_V)}var wM=1,CM=Object.prototype,PM=CM.hasOwnProperty;function TM(e,t,r,n,o,a){var s=r&wM,i=yh(e),l=i.length,c=yh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:PM.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var b=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,a):n(S,E,h,e,t,a);if(!(O===void 0?S===E||o(S,E,r,n,a):O)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var w=e.constructor,A=t.constructor;w!=A&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof A=="function"&&A instanceof A)&&(m=!1)}return a.delete(e),a.delete(t),m}var Sl=Fr(Dt,"DataView"),Ol=Fr(Dt,"Promise"),wl=Fr(Dt,"Set"),Cl=Fr(Dt,"WeakMap"),bh="[object Map]",RM="[object Object]",xh="[object Promise]",vh="[object Set]",Sh="[object WeakMap]",Oh="[object DataView]",AM=Nr(Sl),_M=Nr(Co),EM=Nr(Ol),IM=Nr(wl),VM=Nr(Cl),sr=Lr;(Sl&&sr(new Sl(new ArrayBuffer(1)))!=Oh||Co&&sr(new Co)!=bh||Ol&&sr(Ol.resolve())!=xh||wl&&sr(new wl)!=vh||Cl&&sr(new Cl)!=Sh)&&(sr=function(e){var t=Lr(e),r=t==RM?e.constructor:void 0,n=r?Nr(r):"";if(n)switch(n){case AM:return Oh;case _M:return bh;case EM:return xh;case IM:return vh;case VM:return Sh}return t});var MM=1,wh="[object Arguments]",Ch="[object Array]",da="[object Object]",jM=Object.prototype,Ph=jM.hasOwnProperty;function kM(e,t,r,n,o,a){var s=Ut(e),i=Ut(t),l=s?Ch:sr(e),c=i?Ch:sr(t);l=l==wh?da:l,c=c==wh?da:c;var u=l==da,d=c==da,h=l==c;if(h&&vl(e)){if(!vl(t))return!1;s=!0,u=!1}if(h&&!u)return a||(a=new qt),s||jf(e)?Af(e,t,r,n,o,a):OV(e,t,l,r,n,o,a);if(!(r&MM)){var p=u&&Ph.call(e,"__wrapped__"),f=d&&Ph.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return a||(a=new qt),o(m,b,r,n,a)}}return h?(a||(a=new qt),TM(e,t,r,n,o,a)):!1}function Gs(e,t,r,n,o){return e===t?!0:e==null||t==null||!Er(e)&&!Er(t)?e!==e&&t!==t:kM(e,t,r,n,Gs,o)}function $M(e,t){return Gs(e,t)}const $f=({store:e})=>{const{t}=_e.useTranslation(),[r,n]=J.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),o=J.useRef(r);Rn(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;$M(o.current,s)||(o.current=s,n(s))});const a=[];for(const[s,i]of r.entries())i&&a.push(s);return g.jsx(P.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:a.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:a.map(s=>s+1).join(", ")})})},UM=P.styled(P.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 ha({labelValue:e,...t}){return g.jsxs(UM,{fullWidth:!0,variant:"filled",children:[g.jsx(P.InputLabel,{id:t.labelId,children:e}),g.jsx(P.Select,{...t})]})}var Th=function(){try{var e=Fr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function DM(e,t,r){t=="__proto__"&&Th?Th(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function LM(e,t,r,n){for(var o=-1,a=e==null?0:e.length;++o<a;){var s=e[o];t(n,s,r(s),e)}return n}function BM(e){return function(t,r,n){for(var o=-1,a=Object(t),s=n(t),i=s.length;i--;){var l=s[++o];if(r(a[l],l,a)===!1)break}return t}}var NM=BM();function FM(e,t){return e&&NM(e,t,Rc)}function zM(e,t){return function(r,n){if(r==null)return r;if(!kf(r))return e(r,n);for(var o=r.length,a=-1,s=Object(r);++a<o&&n(s[a],a,s)!==!1;);return r}}var GM=zM(FM);function HM(e,t,r,n){return GM(e,function(o,a,s){t(n,o,r(o),s)}),n}var qM=1,WM=2;function JM(e,t,r,n){var o=r.length,a=o;if(e==null)return!a;for(e=Object(e);o--;){var s=r[o];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=r[o];var i=s[0],l=e[i],c=s[1];if(s[2]){if(l===void 0&&!(i in e))return!1}else{var u=new qt,d;if(!(d===void 0?Gs(c,l,qM|WM,n,u):d))return!1}}return!0}function Uf(e){return e===e&&!_r(e)}function YM(e){for(var t=Rc(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Uf(o)]}return t}function Df(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function KM(e){var t=YM(e);return t.length==1&&t[0][2]?Df(t[0][0],t[0][1]):function(r){return r===e||JM(r,e,t)}}var QM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XM=/^\w*$/;function Ac(e,t){if(Ut(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Vs(e)?!0:XM.test(e)||!QM.test(e)||t!=null&&e in Object(t)}var ZM="Expected a function";function _c(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ZM);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var s=e.apply(this,n);return r.cache=a.set(o,s)||a,s};return r.cache=new(_c.Cache||er),r}_c.Cache=er;var e5=500;function t5(e){var t=_c(e,function(n){return r.size===e5&&r.clear(),n}),r=t.cache;return t}var r5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n5=/\\(\\)?/g,o5=t5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(r5,function(r,n,o,a){t.push(o?a.replace(n5,"$1"):n||r)}),t});function a5(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 Rh=hr?hr.prototype:void 0,Ah=Rh?Rh.toString:void 0;function Lf(e){if(typeof e=="string")return e;if(Ut(e))return a5(e,Lf)+"";if(Vs(e))return Ah?Ah.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Bf(e){return e==null?"":Lf(e)}function Nf(e,t){return Ut(e)?e:Ac(e,t)?[e]:o5(Bf(e))}function Hs(e){if(typeof e=="string"||Vs(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ff(e,t){t=Nf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Hs(t[r++])];return r&&r==n?e:void 0}function s5(e,t,r){var n=e==null?void 0:Ff(e,t);return n===void 0?r:n}function i5(e,t){return e!=null&&t in Object(e)}function l5(e,t,r){t=Nf(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var s=Hs(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&Tc(o)&&Vf(s,o)&&(Ut(e)||Ef(e)))}function c5(e,t){return e!=null&&l5(e,t,i5)}var u5=1,d5=2;function h5(e,t){return Ac(e)&&Uf(t)?Df(Hs(e),t):function(r){var n=s5(r,e);return n===void 0&&n===t?c5(r,e):Gs(t,n,u5|d5)}}function p5(e){return e}function m5(e){return function(t){return t==null?void 0:t[e]}}function f5(e){return function(t){return Ff(t,e)}}function g5(e){return Ac(e)?m5(Hs(e)):f5(e)}function y5(e){return typeof e=="function"?e:e==null?p5:typeof e=="object"?Ut(e)?h5(e[0],e[1]):KM(e):g5(e)}function b5(e,t){return function(r,n){var o=Ut(r)?LM:HM,a={};return o(r,e,y5(n),a)}}var pa=b5(function(e,t,r){DM(e,r,t)}),x5=0;function v5(e){var t=++x5;return Bf(e)+t}const Pl=[{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}],S5=[{id:"continuous"},...Pl],O5=["coordsys","tool"];class qs{constructor(t,r,n,o){var a,s;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=o,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,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=!0,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 n)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((a=n[0])==null?void 0:a.coordinate_system)||"world",this.selectedTcpId=((s=o[0])==null?void 0:s.id)||"",$e.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push($e.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:o},{tcps:a}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new qs(t,n,o||[],a||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Al.countBy(this.coordSystems,t=>t.name)}async deactivate(){const t=this.jogger.activeWebsocket;this.jogger.setJoggingMode("increment"),t&&await t.closed()}async activate(){if(this.currentTab.id==="cartesian"){const t={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",t):this.jogger.setJoggingMode("cartesian",t)}else this.jogger.setJoggingMode("joint");return this.jogger}loadFromLocalStorage(){const t=Cr.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 S5}get discreteIncrementOptions(){return Pl}get incrementOptionsById(){return pa(this.incrementOptions,t=>t.id)}get tabsById(){return pa(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 pa(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 pa(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Pl.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)}async withMotionLock(t){const r=v5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const w5=Oe.observer(({store:e})=>{var o;const{t}=_e.useTranslation(),r=[];function n(a){switch(a){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return a}}return e.showCoordSystemSelect&&r.push(g.jsx(ha,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:a=>e.setSelectedCoordSystemId(a.target.value),disabled:e.isLocked,children:e.coordSystems.map(a=>g.jsx(P.MenuItem,{value:a.coordinate_system,children:a.name&&e.coordSystemCountByName[a.name]>1?`${a.name} / ${a.coordinate_system}`:a.name||a.coordinate_system},a.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(ha,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:a=>e.setSelectedTcpId(a.target.value),disabled:e.isLocked,children:e.tcps.map(a=>g.jsx(P.MenuItem,{value:a.id,children:a.id},a.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(ha,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:a=>e.setSelectedOrientation(a.target.value),disabled:e.isLocked,children:O5.map(a=>g.jsx(P.MenuItem,{value:a,children:n(a)},a))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(ha,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:a=>e.setSelectedIncrementId(a.target.value),disabled:e.isLocked,children:[g.jsx(P.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(a=>g.jsx(P.MenuItem,{value:a.id,children:e.currentMotionType==="translate"?`${a.mm}mm`:`${a.degrees}°`},a.id))]},"increment")),g.jsx(P.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((a,s)=>g.jsx(P.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:a},s))})}),C5=P.styled(P.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 _h(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function P5(e){return typeof e=="string"}function T5(e,t,r){return e===void 0||P5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Pa(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 Eh(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 R5(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:a}=e;if(!t){const p=Pt(r==null?void 0:r.className,a,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 s=Pa({...o,...n}),i=Eh(n),l=Eh(o),c=t(s),u=Pt(c==null?void 0:c.className,r==null?void 0:r.className,a,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 A5(e,t,r){return typeof e=="function"?e(t,r):e}function ar(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...a}=e,s=o?{}:A5(r,n),{props:i,internalRef:l}=R5({...a,externalSlotProps:s}),c=ps(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return T5(t,{...i,ref:c},n)}function Ih(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(`
|
|
154
|
+
`))}return!1}const _5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function E5(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const I5=2;function on(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function zf(e,t){return e-t}function Vh(e,t){const{index:r}=e.reduce((n,o,a)=>{const s=Math.abs(t-o);return n===null||s<n.distance||s===n.distance?{distance:s,index:a}:n},null)??{};return r}function ma(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 Za(e,t,r){return(e-t)*100/(r-t)}function V5(e,t,r){return(r-t)*e+t}function M5(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 j5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(M5(t)))}function Mh({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(zf)}function fa({sliderRef:e,activeIndex:t,setActive:r}){var o,a,s;const n=ao(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((a=n==null?void 0:n.activeElement)==null?void 0:a.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function ga(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?E5(e,t):!1}const k5={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}%`})}},$5=e=>e;let ya;function jh(){return ya===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?ya=CSS.supports("touch-action","none"):ya=!0),ya}function U5(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:a=!1,marks:s=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=$5,step:m=1,shiftStep:b=10,tabIndex:S,value:E}=e,O=F.useRef(void 0),[w,A]=F.useState(-1),[C,T]=F.useState(-1),[V,j]=F.useState(!1),y=F.useRef(0),R=F.useRef(null),[z,I]=Kw({controlled:E,default:r??l,name:"Slider"}),G=u&&((Q,ne,ce)=>{const ye=Q.nativeEvent||Q,Te=new ye.constructor(ye.type,ye);Object.defineProperty(Te,"target",{writable:!0,value:{value:ne,name:c}}),R.current=ne,u(Te,ne,ce)}),oe=Array.isArray(z);let re=oe?z.slice().sort(zf):[z];re=re.map(Q=>Q==null?l:an(Q,l,i));const te=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,ne)=>({value:l+m*ne})):s||[],ee=te.map(Q=>Q.value),[se,H]=F.useState(-1),X=F.useRef(null),le=ps(p,X),xe=Q=>ne=>{var ye;const ce=Number(ne.currentTarget.getAttribute("data-index"));Ih(ne.target)&&H(ce),T(ce),(ye=Q==null?void 0:Q.onFocus)==null||ye.call(Q,ne)},Le=Q=>ne=>{var ce;Ih(ne.target)||H(-1),T(-1),(ce=Q==null?void 0:Q.onBlur)==null||ce.call(Q,ne)},ae=(Q,ne)=>{const ce=Number(Q.currentTarget.getAttribute("data-index")),ye=re[ce],Te=ee.indexOf(ye);let ue=ne;if(te&&m==null){const We=ee[ee.length-1];ue>=We?ue=We:ue<=ee[0]?ue=ee[0]:ue=ue<ye?ee[Te-1]:ee[Te+1]}if(ue=an(ue,l,i),oe){o&&(ue=an(ue,re[ce-1]||-1/0,re[ce+1]||1/0));const We=ue;ue=Mh({values:re,newValue:ue,index:ce});let tt=ce;o||(tt=ue.indexOf(We)),fa({sliderRef:X,activeIndex:tt})}I(ue),H(ce),G&&!ga(ue,z)&&G(Q,ue,ce),d&&d(Q,R.current??ue)},be=Q=>ne=>{var ce;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ne.key)){ne.preventDefault();const ye=Number(ne.currentTarget.getAttribute("data-index")),Te=re[ye];let ue=null;if(m!=null){const We=ne.shiftKey?b:m;switch(ne.key){case"ArrowUp":ue=on(Te,We,1,l,i);break;case"ArrowRight":ue=on(Te,We,a?-1:1,l,i);break;case"ArrowDown":ue=on(Te,We,-1,l,i);break;case"ArrowLeft":ue=on(Te,We,a?1:-1,l,i);break;case"PageUp":ue=on(Te,b,1,l,i);break;case"PageDown":ue=on(Te,b,-1,l,i);break;case"Home":ue=l;break;case"End":ue=i;break}}else if(te){const We=ee[ee.length-1],tt=ee.indexOf(Te),ze=[a?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[a?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];ze.includes(ne.key)?tt===0?ue=ee[0]:ue=ee[tt-1]:mt.includes(ne.key)&&(tt===ee.length-1?ue=We:ue=ee[tt+1])}ue!=null&&ae(ne,ue)}(ce=Q==null?void 0:Q.onKeyDown)==null||ce.call(Q,ne)};$t(()=>{var Q;n&&X.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&w!==-1&&A(-1),n&&se!==-1&&H(-1);const Se=Q=>ne=>{var ce;(ce=Q.onChange)==null||ce.call(Q,ne),ae(ne,ne.target.valueAsNumber)},me=F.useRef(void 0);let Z=h;a&&h==="horizontal"&&(Z+="-reverse");const ie=({finger:Q,move:ne=!1})=>{const{current:ce}=X,{width:ye,height:Te,bottom:ue,left:We}=ce.getBoundingClientRect();let tt;Z.startsWith("vertical")?tt=(ue-Q.y)/Te:tt=(Q.x-We)/ye,Z.includes("-reverse")&&(tt=1-tt);let ze;if(ze=V5(tt,l,i),m)ze=j5(ze,m,l);else{const kn=Vh(ee,ze);ze=ee[kn]}ze=an(ze,l,i);let mt=0;if(oe){ne?mt=me.current:mt=Vh(re,ze),o&&(ze=an(ze,re[mt-1]||-1/0,re[mt+1]||1/0));const kn=ze;ze=Mh({values:re,newValue:ze,index:mt}),o&&ne||(mt=ze.indexOf(kn),me.current=mt)}return{newValue:ze,activeIndex:mt}},de=Ht(Q=>{const ne=ma(Q,O);if(!ne)return;if(y.current+=1,Q.type==="mousemove"&&Q.buttons===0){Y(Q);return}const{newValue:ce,activeIndex:ye}=ie({finger:ne,move:!0});fa({sliderRef:X,activeIndex:ye,setActive:A}),I(ce),!V&&y.current>I5&&j(!0),G&&!ga(ce,z)&&G(Q,ce,ye)}),Y=Ht(Q=>{const ne=ma(Q,O);if(j(!1),!ne)return;const{newValue:ce}=ie({finger:ne,move:!0});A(-1),Q.type==="touchend"&&T(-1),d&&d(Q,R.current??ce),O.current=void 0,ge()}),we=Ht(Q=>{if(n)return;jh()||Q.preventDefault();const ne=Q.changedTouches[0];ne!=null&&(O.current=ne.identifier);const ce=ma(Q,O);if(ce!==!1){const{newValue:Te,activeIndex:ue}=ie({finger:ce});fa({sliderRef:X,activeIndex:ue,setActive:A}),I(Te),G&&!ga(Te,z)&&G(Q,Te,ue)}y.current=0;const ye=ao(X.current);ye.addEventListener("touchmove",de,{passive:!0}),ye.addEventListener("touchend",Y,{passive:!0})}),ge=F.useCallback(()=>{const Q=ao(X.current);Q.removeEventListener("mousemove",de),Q.removeEventListener("mouseup",Y),Q.removeEventListener("touchmove",de),Q.removeEventListener("touchend",Y)},[Y,de]);F.useEffect(()=>{const{current:Q}=X;return Q.addEventListener("touchstart",we,{passive:jh()}),()=>{Q.removeEventListener("touchstart",we),ge()}},[ge,we]),F.useEffect(()=>{n&&ge()},[n,ge]);const Ye=Q=>ne=>{var Te;if((Te=Q.onMouseDown)==null||Te.call(Q,ne),n||ne.defaultPrevented||ne.button!==0)return;ne.preventDefault();const ce=ma(ne,O);if(ce!==!1){const{newValue:ue,activeIndex:We}=ie({finger:ce});fa({sliderRef:X,activeIndex:We,setActive:A}),I(ue),G&&!ga(ue,z)&&G(ne,ue,We)}y.current=0;const ye=ao(X.current);ye.addEventListener("mousemove",de,{passive:!0}),ye.addEventListener("mouseup",Y)},qe=Za(oe?re[0]:l,l,i),ke=Za(re[re.length-1],l,i)-qe,tr=(Q={})=>{const ne=Pa(Q),ce={onMouseDown:Ye(ne||{})},ye={...ne,...ce};return{...Q,ref:le,...ye}},Do=Q=>ne=>{var ye;(ye=Q.onMouseOver)==null||ye.call(Q,ne);const ce=Number(ne.currentTarget.getAttribute("data-index"));T(ce)},Lo=Q=>ne=>{var ce;(ce=Q.onMouseLeave)==null||ce.call(Q,ne),T(-1)},Bo=(Q={})=>{const ne=Pa(Q),ce={onMouseOver:Do(ne||{}),onMouseLeave:Lo(ne||{})};return{...Q,...ne,...ce}},No=Q=>({pointerEvents:w!==-1&&w!==Q?"none":void 0});let zr;return h==="vertical"&&(zr=a?"vertical-rl":"vertical-lr"),{active:w,axis:Z,axisProps:k5,dragging:V,focusedThumbIndex:se,getHiddenInputProps:(Q={})=>{const ne=Pa(Q),ce={onChange:Se(ne||{}),onFocus:xe(ne||{}),onBlur:Le(ne||{}),onKeyDown:be(ne||{})},ye={...ne,...ce};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,...Q,...ye,style:{..._5,direction:a?"rtl":"ltr",width:"100%",height:"100%",writingMode:zr}}},getRootProps:tr,getThumbProps:Bo,marks:te,open:C,range:oe,rootRef:le,trackLeap:ke,trackOffset:qe,values:re,getThumbStyle:No}}function Ta(e){return typeof e=="string"}const D5=e=>!e||!Ta(e);function L5(e){return typeof e.main=="string"}function B5(e,t=[]){if(!L5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Ec(e=[]){return([,t])=>t&&B5(t,e)}function N5(e){return wn("MuiSlider",e)}const bt=Il("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"]),F5=e=>{const{open:t}=e;return{offset:Pt(t&&bt.valueLabelOpen),circle:bt.valueLabelCircle,label:bt.valueLabelLabel}};function Gf(e){const{children:t,className:r,value:n}=e,o=F5(e);return t?F.cloneElement(t,{className:t.props.className},g.jsxs(F.Fragment,{children:[t.props.children,g.jsx("span",{className:Pt(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"&&(Gf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function kh(e){return e}const z5=pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${rt(r.color)}`],r.size!=="medium"&&t[`size${rt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Dr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${bt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${bt.dragging}`]:{[`& .${bt.thumb}, & .${bt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Ec()).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}}]}))),G5=pt("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}}]}),H5=pt("span",{name:"MuiSlider",slot:"Track"})(Dr(({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(Ec()).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:uo(e.palette[t].main,.62),borderColor:uo(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:co(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:co(e.palette[t].main,.5)})}}}))]}))),q5=pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${rt(r.color)}`],r.size!=="medium"&&t[`thumbSize${rt(r.size)}`]]}})(Dr(({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%)"},[`&.${bt.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(Ec()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${bt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${zi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${bt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${zi(e.palette[t].main,.16)}`}}}}))]}))),Hf=pt(Gf,{name:"MuiSlider",slot:"ValueLabel"})(Dr(({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%"},[`&.${bt.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%"},[`&.${bt.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"&&(Hf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const W5=pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>jl(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Dr(({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}}]}))),J5=pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>jl(e)&&e!=="markLabelActive"})(Dr(({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}}]}))),Y5=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:a,classes:s,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",i&&`color${rt(i)}`,l&&`size${rt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${rt(l)}`,i&&`thumbColor${rt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return es(c,N5,s)},K5=({children:e})=>e,qf=F.forwardRef(function(t,r){const n=vc({props:t,name:"MuiSlider"}),o=py(),{"aria-label":a,"aria-valuetext":s,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:b,getAriaValueText:S,marks:E=!1,max:O=100,min:w=0,name:A,onChange:C,onChangeCommitted:T,orientation:V="horizontal",shiftStep:j=10,size:y="medium",step:R=1,scale:z=kh,slotProps:I,slots:G,tabIndex:oe,track:re="normal",value:te,valueLabelDisplay:ee="off",valueLabelFormat:se=kh,...H}=n,X={...n,isRtl:o,max:O,min:w,classes:h,disabled:m,disableSwap:f,orientation:V,marks:E,color:d,size:y,step:R,shiftStep:j,scale:z,track:re,valueLabelDisplay:ee,valueLabelFormat:se},{axisProps:le,getRootProps:xe,getHiddenInputProps:Le,getThumbProps:ae,open:be,active:Se,axis:me,focusedThumbIndex:Z,range:ie,dragging:de,marks:Y,values:we,trackOffset:ge,trackLeap:Ye,getThumbStyle:qe}=U5({...X,rootRef:r});X.marked=Y.length>0&&Y.some(Fe=>Fe.label),X.dragging=de,X.focusedThumbIndex=Z;const ke=Y5(X),tr=(G==null?void 0:G.root)??c.Root??z5,Do=(G==null?void 0:G.rail)??c.Rail??G5,Lo=(G==null?void 0:G.track)??c.Track??H5,Bo=(G==null?void 0:G.thumb)??c.Thumb??q5,No=(G==null?void 0:G.valueLabel)??c.ValueLabel??Hf,zr=(G==null?void 0:G.mark)??c.Mark??W5,Fo=(G==null?void 0:G.markLabel)??c.MarkLabel??J5,Q=(G==null?void 0:G.input)??c.Input??"input",ne=(I==null?void 0:I.root)??u.root,ce=(I==null?void 0:I.rail)??u.rail,ye=(I==null?void 0:I.track)??u.track,Te=(I==null?void 0:I.thumb)??u.thumb,ue=(I==null?void 0:I.valueLabel)??u.valueLabel,We=(I==null?void 0:I.mark)??u.mark,tt=(I==null?void 0:I.markLabel)??u.markLabel,ze=(I==null?void 0:I.input)??u.input,mt=ar({elementType:tr,getSlotProps:xe,externalSlotProps:ne,externalForwardedProps:H,additionalProps:{...D5(tr)&&{as:l}},ownerState:{...X,...ne==null?void 0:ne.ownerState},className:[ke.root,p]}),kn=ar({elementType:Do,externalSlotProps:ce,ownerState:X,className:ke.rail}),sg=ar({elementType:Lo,externalSlotProps:ye,additionalProps:{style:{...le[me].offset(ge),...le[me].leap(Ye)}},ownerState:{...X,...ye==null?void 0:ye.ownerState},className:ke.track}),Ws=ar({elementType:Bo,getSlotProps:ae,externalSlotProps:Te,ownerState:{...X,...Te==null?void 0:Te.ownerState},className:ke.thumb}),ig=ar({elementType:No,externalSlotProps:ue,ownerState:{...X,...ue==null?void 0:ue.ownerState},className:ke.valueLabel}),Js=ar({elementType:zr,externalSlotProps:We,ownerState:X,className:ke.mark}),Ys=ar({elementType:Fo,externalSlotProps:tt,ownerState:X,className:ke.markLabel}),lg=ar({elementType:Q,getSlotProps:Le,externalSlotProps:ze,ownerState:X});return g.jsxs(tr,{...mt,children:[g.jsx(Do,{...kn}),g.jsx(Lo,{...sg}),Y.filter(Fe=>Fe.value>=w&&Fe.value<=O).map((Fe,Ke)=>{const Ks=Za(Fe.value,w,O),zo=le[me].offset(Ks);let Lt;return re===!1?Lt=we.includes(Fe.value):Lt=re==="normal"&&(ie?Fe.value>=we[0]&&Fe.value<=we[we.length-1]:Fe.value<=we[0])||re==="inverted"&&(ie?Fe.value<=we[0]||Fe.value>=we[we.length-1]:Fe.value>=we[0]),g.jsxs(F.Fragment,{children:[g.jsx(zr,{"data-index":Ke,...Js,...!Ta(zr)&&{markActive:Lt},style:{...zo,...Js.style},className:Pt(Js.className,Lt&&ke.markActive)}),Fe.label!=null?g.jsx(Fo,{"aria-hidden":!0,"data-index":Ke,...Ys,...!Ta(Fo)&&{markLabelActive:Lt},style:{...zo,...Ys.style},className:Pt(ke.markLabel,Ys.className,Lt&&ke.markLabelActive),children:Fe.label}):null]},Ke)}),we.map((Fe,Ke)=>{const Ks=Za(Fe,w,O),zo=le[me].offset(Ks),Lt=ee==="off"?K5:No;return g.jsx(Lt,{...!Ta(Lt)&&{valueLabelFormat:se,valueLabelDisplay:ee,value:typeof se=="function"?se(z(Fe),Ke):se,index:Ke,open:be===Ke||Se===Ke||ee==="on",disabled:m},...ig,children:g.jsx(Bo,{"data-index":Ke,...Ws,className:Pt(ke.thumb,Ws.className,Se===Ke&&ke.active,Z===Ke&&ke.focusVisible),style:{...zo,...qe(Ke),...Ws.style},children:g.jsx(Q,{"data-index":Ke,"aria-label":b?b(Ke):a,"aria-valuenow":z(Fe),"aria-labelledby":i,"aria-valuetext":S?S(z(Fe),Ke):s,value:we[Ke],...lg})})},Ke)})]})});process.env.NODE_ENV!=="production"&&(qf.propTypes={"aria-label":_h(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":_h(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 Q5="[object Number]";function X5(e){return typeof e=="number"||Er(e)&&Lr(e)==Q5}const Wf=Oe.observer(e=>{var a,s,i;const t=P.useTheme(),{store:r}=e,{t:n}=_e.useTranslation();function o(l,c){c===e.velocity||!X5(c)||e.onVelocityChange(c)}return g.jsxs(P.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(P.Typography,{sx:{color:(i=(s=(a=t.componentsExt)==null?void 0:a.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(qf,{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(Ic,{value:e.velocity.toString()}))]})});function Ic({value:e,sx:t}){var n;const r=P.useTheme();return g.jsx(P.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(P.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Jf=Oe.observer(({store:e})=>{const{t}=_e.useTranslation(),r=Oe.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(Wf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Ic,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Z5=Oe.observer(({store:e,children:t})=>{const{t:r}=_e.useTranslation(),n=P.useTheme();function o(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Em(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function a(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,b=f.motionStream.rapidlyChangingMotionState.state.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:b,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:Cr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return a(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({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 b,S,E;const m=(E=(S=(b=f.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:E.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(tI,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(nI,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(aI,{}),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:Cr.radiansToDegrees(h).toFixed(1)})}return g.jsxs(P.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(P.Stack,{gap:2,children:[g.jsx(w5,{store:e}),g.jsx(Jf,{store:e}),g.jsx(P.Divider,{})]}),g.jsx(P.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(P.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(C5,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(P.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(P.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(ol,{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(P.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m;return u(((m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(ol,{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(iI,{}),g.jsx(P.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return d(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:b[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx($f,{store:e}),t&&g.jsx(P.Divider,{}),t]})}),e3=Oe.observer(({store:e,children:t})=>{const r=P.useTheme();async function n(a){await e.activate(),await e.jogger.startJointRotation({joint:a.joint,direction:a.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(P.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Jf,{store:e}),g.jsx(P.Divider,{}),g.jsx(P.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(P.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(a=>{var c;const s=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[a.index],i=(s==null?void 0:s.lower_limit)!==void 0?Cr.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Cr.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(P.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(P.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${a.index+1}`}),g.jsx(Mm,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[a.index];return u!==void 0?Cr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:a.index,direction:u}),stopJogging:o})]},`joint-${a.index}`)})})}),g.jsx($f,{store:e}),t&&g.jsx(P.Divider,{}),t]})}),t3=Xe(Oe.observer(e=>{const t=Al.isString(e.nova)?new K2({instanceUrl:e.nova}):e.nova,r=Oe.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){$e.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const a=await t.connectJogger(e.motionGroupId);o=await qs.loadFor(a)}$e.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(P.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(r3,{store:r.joggingStore,children:e.children}):g.jsx(Pc,{message:"Loading jogging",error:r.loadingError})})})),r3=Oe.observer(({store:e,children:t})=>{const{t:r}=_e.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(Z5,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(e3,{store:e,children:t})})}return g.jsxs(P.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(P.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const a=o.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),s=o.label==="cartesian"?g.jsx(_C,{fontSize:"small",sx:{mr:1}}):g.jsx(EC,{fontSize:"small",sx:{mr:1}});return g.jsx(P.Tab,{label:e.showTabIcons?g.jsxs(P.Stack,{direction:"row",alignItems:"center",children:[s,a]}):a,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),g.jsx(P.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Yf=J.forwardRef(({label:e,value:t},r)=>{var i;const n=P.useTheme(),[o,a]=J.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),a(!0),!0}catch(l){console.error(l);const c=window.getSelection(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return J.useEffect(()=>{if(!o)return;const l=setTimeout(()=>a(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),g.jsx(P.Tooltip,{open:o,title:"Copied!",children:g.jsx(P.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:()=>s(),children:g.jsx(P.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})})})}),n3=Oe.observer(({motionStream:e})=>{const t=J.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Cr.poseToWandelscriptString(n):""}return Rn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(P.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Yf,{value:r(),ref:t})})}),o3=Oe.observer(({motionStream:e})=>{const t=J.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(o=>parseFloat(o.toFixed(4))).join(", ")}]`}return Rn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(P.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Yf,{value:r(),ref:t})})});class Kf{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")},$e.makeObservable(this,{messages:$e.observable,addMessage:$e.action,clearMessages:$e.action})}}const Uo=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,timestamp:new Date,message:e,level:t}),a3=(e,t)=>Uo(e,"debug",t),s3=(e,t)=>Uo(e,"info",t),i3=(e,t)=>Uo(e,"warning",t),l3=(e,t)=>Uo(e,"error",t),Qf=Xe(Oe.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:o}=e,a=P.useTheme(),s=J.useRef(null);J.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return a.palette.error.main;case"warning":return a.palette.warning.main;case"info":return a.palette.info.main;case"debug":return a.palette.text.disabled;default:return a.palette.text.secondary}},c=({message:d})=>{const[h,p]=J.useState(!1),[f,m]=J.useState(!1),[b,S]=J.useState(!1),E=d.message.length>150,O=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(A){console.error("Failed to copy message:",A)}},w=E&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(P.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:a.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(P.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(P.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:a.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(P.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:w}),g.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:b?1:0,transition:"opacity 0.2s ease-in-out",visibility:b?"visible":"hidden"},children:[g.jsx(P.IconButton,{size:"small",onClick:O,sx:{padding:"2px",color:a.palette.text.secondary,"&:hover":{backgroundColor:a.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Ft.ContentCopy,{sx:{fontSize:12}})}),E&&g.jsx(P.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:a.palette.text.secondary,"&:hover":{backgroundColor:a.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Ft.ExpandLess,{sx:{fontSize:12}}):g.jsx(Ft.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(P.Paper,{sx:{backgroundColor:((u=a.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Ft.DescriptionOutlined,{sx:{fontSize:16,color:a.palette.action.active,opacity:.56}}),g.jsx(P.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:a.palette.text.primary},children:"Log"})]}),g.jsx(P.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:a.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:a.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(P.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${a.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:a.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:a.palette.divider}}},children:t.length===0?g.jsx(P.Typography,{sx:{color:a.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))})]})})),c3=Xe(Oe.observer(e=>{const{store:t,onStoreReady:r,...n}=e,o=J.useRef(r);J.useEffect(()=>{o.current=r},[r]);const a=J.useMemo(()=>{var l;const i=t||new Kf;return(l=o.current)==null||l.call(o,i),i},[t]),s=()=>{a.clearMessages()};return g.jsx(Qf,{...n,messages:a.messages,onClear:s})}));function u3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function d3({baseUrl:e=u3(),...t}){return g.jsxs(P.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(P.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(P.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(P.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(P.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(P.DialogActions,{children:g.jsxs(P.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(P.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(P.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var vr=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e.ERROR="error",e))(vr||{});const h3=Xe(Oe.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:o,requiresManualReset:a=!1,variant:s="with_pause",className:i})=>{const l=P.useTheme(),{t:c}=_e.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"?"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==="running"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return s==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(s==="without_pause")return p===0?g.jsx(Ft.PlayArrow,{...f}):g.jsx(Ft.Stop,{...f});switch(p){case 0:return g.jsx(Ft.PlayArrow,{...f});case 1:return g.jsx(Ft.Pause,{...f});case 2:return g.jsx(Ft.Stop,{...f});default:return null}},h=u();return g.jsx(P.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(P.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(P.Button,{variant:"contained",disabled:!p.enabled||e==="stopping"&&!a,onClick:p.onClick,sx:{width:"110px",height:"110px",borderRadius:"110px",backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!a)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!a)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"110px",flexShrink:0},children:d(f)}),g.jsx(P.Typography,{variant:"body1",sx:{color:p.enabled&&!(e==="stopping"&&!a)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&!(e==="stopping"&&!a)?1:.3},children:p.label})]},p.label))})})})),Tl=Xe(Oe.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const o=P.useTheme(),{t:a}=_e.useTranslation(),s=()=>{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:a("ProgramStateIndicator.EStop.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:a("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case vr.RUNNING:return{label:a("ProgramStateIndicator.Running.lb"),color:o.palette.success.main};case vr.PAUSED:return{label:a("ProgramStateIndicator.Paused.lb"),color:o.palette.grey[600]};case vr.STOPPING:return{label:a("ProgramStateIndicator.Stopped.lb"),color:o.palette.error.main};case vr.ERROR:return{label:a("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};case vr.IDLE:default:return{label:a("ProgramStateIndicator.Ready.lb"),color:o.palette.success.main}}return{label:a("ProgramStateIndicator.Idle.lb"),color:o.palette.grey[600]}},{label:i,color:l}=s(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return a("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return a("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return a("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return a("ProgramStateIndicator.ManualT2.lb");default:return a("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(P.Chip,{className:n,label:g.jsx(P.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}}})})),$h="0.0.0-semantically-released";function Vc(e){let t=$h;return $h.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function p3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Zf(r))}function Xf(e){return e.name.endsWith("_FLG")}function Zf(e){return/_J[0-9]+$/.test(e.name)}function m3(e,t){let r;function n(o){if(Xf(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}Zf(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 eg({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const o=J.useRef([]),a=J.useRef([]),s=J.useRef(null),{invalidate:i}=Ra.useThree();J.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new xc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Ra.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(a.current=p3(d),u(),i())}function c(d){var h;o.current=d,(h=s.current)==null||h.setTarget(d)}function u(){var h;const d=((h=s.current)==null?void 0:h.getCurrentValues())||[];if(r)r(a.current,d);else for(const[p,f]of a.current.entries()){const m=t[p],b=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+b}}return Sc(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const f3="line",g3="mesh";function y3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new Ot.Matrix4,o=J.useRef([]),a=J.useRef([]);J.useEffect(()=>{o.current=new Array(t.length).fill(null),a.current=new Array(t.length).fill(null)},[t.length]);function s(c,u){const d=new Ot.Vector3,h=new Ot.Quaternion,p=new Ot.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new Ot.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new Ot.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new Ot.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new Ot.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}=s(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=a.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(eg,{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}=s(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(st.Line,{ref:f=>{o.current[u]=f},name:f3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{a.current[u]=f},name:g3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const b3=console.warn;function x3(){return J.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&b3(e)}},[]),g.jsx(g.Fragment,{})}function v3(e){return e.type==="Mesh"}function S3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=m3(st.useGLTF(e),e.split("/").pop()||e),a=J.useCallback(i=>{i&&r&&r()},[e]);function s(i){return v3(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:Xf(i)?t:void 0,children:i.children.map(s)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:a,children:s(o.scene)})}const O3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Be.Mesh){r.material instanceof Be.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new Be.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Be.DoubleSide}),n.userData.isGhost=!0,o.material=new Be.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Be.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},w3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Be.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Be.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},tg=Xe(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Vc,flangeRef:o,postModelRender:a,transparentColor:s,...i})=>{const[l,c]=J.useState(null),u=J.useCallback(h=>{c(h)},[]);J.useEffect(()=>{l&&(s?O3(l,s):w3(l))},[l,s]);const d=g.jsx(y3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(Sg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(J.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(eg,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(S3,{modelURL:n(t),postModelRender:a,flangeRef:o,...i})})})}),g.jsx(x3,{})]})});function rg({connectedMotionGroup:e,getModel:t=Vc,flangeRef:r,transparentColor:n,postModelRender:o,...a}){return e.dhParameters?g.jsx(tg,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:o,...a}):null}function Uh({connectedMotionGroup:e}){const t=st.useBounds();return Sc(()=>{var r;(r=e.rapidlyChangingMotionState)!=null&&r.state&&(e.rapidlyChangingMotionState.state.joint_position,e.rapidlyChangingMotionState.tcp_pose,t.refresh().clip().fit())}),null}const C3=Xe(Oe.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:o=!1,onDriveToHomePress:a,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=rg,cycleTimerComponent:c=Am,onCycleTimerReady:u,onCycleEnd:d,cycleTimerAutoStart:h=!0,cycleTimerHasError:p=!1,className:f})=>{var se;const m=P.useTheme(),{t:b}=_e.useTranslation(),[S,E]=J.useState(!1),O=J.useRef(null),w=J.useRef(null),[A,C]=J.useState(!1),[T,V]=J.useState({width:400,height:600}),[j,y]=J.useState(0),R=J.useRef(null);J.useEffect(()=>{const H=()=>{if(w.current){const{offsetWidth:le,offsetHeight:xe}=w.current;C(le>xe),V({width:le,height:xe})}};H();const X=new ResizeObserver(H);return w.current&&X.observe(w.current),()=>{X.disconnect()}},[]);const z=J.useCallback(()=>{y(H=>H+1)},[]),I=J.useCallback(()=>{!o||!a||(E(!0),a())},[o,a]),G=J.useCallback(()=>{!o||!s||(E(!1),s())},[o,s]),oe=J.useCallback(()=>{S&&s&&(E(!1),s())},[S,s]),re=J.useCallback(H=>{R.current=H,u&&u(H)},[u]),te=A?T.width<350:T.height<200,ee=A?T.height<310:T.height<450;return g.jsx(P.Card,{ref:w,className:f,sx:{width:"100%",height:"100%",display:"flex",flexDirection:A?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:A?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${m.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((se=m.palette.backgroundPaperElevation)==null?void 0:se[8])||"#2A2A3F",backgroundImage:"none"},children:A?g.jsxs(g.Fragment,{children:[g.jsx(P.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:te?"none":"block"},children:!te&&g.jsxs(Ra.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:m.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(Ni,{}),g.jsxs(st.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:[g.jsx(Uh,{connectedMotionGroup:i}),g.jsx(l,{connectedMotionGroup:i,postModelRender:z})]})]})}),g.jsxs(P.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:te?"100%":"50%"},children:[g.jsxs(P.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(P.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Tl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(P.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!ee&&g.jsxs(P.Box,{children:[g.jsx(P.Typography,{variant:"body1",sx:{mb:0,color:m.palette.text.secondary,textAlign:"left"},children:b("RobotCard.Runtime.lb")}),g.jsx(P.Box,{sx:{textAlign:"left"},children:g.jsx(c,{variant:"small",compact:!0,onCycleComplete:re,onCycleEnd:d,autoStart:h,hasError:p})}),g.jsx(P.Divider,{sx:{mt:1,mb:0,borderColor:m.palette.divider,opacity:.5}})]}),g.jsx(P.Box,{sx:{mt:ee?0:"auto"},children:g.jsx(P.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(P.Button,{ref:O,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:I,onMouseUp:G,onMouseLeave:oe,onTouchStart:I,onTouchEnd:G,sx:{textTransform:"none",px:1.5,py:.5},children:b("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(P.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(P.Box,{children:[g.jsx(P.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Tl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(P.Box,{sx:{flex:te?0:1,position:"relative",minHeight:te?0:{xs:120,sm:150,md:200},height:te?0:"auto",borderRadius:1,overflow:"hidden",display:te?"none":"block"},children:!te&&g.jsxs(Ra.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:m.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ni,{}),g.jsxs(st.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:[g.jsx(Uh,{connectedMotionGroup:i}),g.jsx(l,{connectedMotionGroup:i,postModelRender:z})]})]})}),g.jsxs(P.Box,{children:[!ee&&g.jsxs(g.Fragment,{children:[g.jsx(P.Typography,{variant:"body1",sx:{mb:0,color:m.palette.text.secondary},children:b("RobotCard.Runtime.lb")}),g.jsx(c,{variant:"small",compact:!0,onCycleComplete:re,onCycleEnd:d,autoStart:h,hasError:p}),g.jsx(P.Divider,{sx:{mt:1,mb:0,borderColor:m.palette.divider,opacity:.5}})]}),g.jsx(P.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:ee?{xs:.5,sm:1,md:2}:{xs:1,sm:2,md:5},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(P.Button,{ref:O,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:I,onMouseUp:G,onMouseLeave:oe,onTouchStart:I,onTouchEnd:G,sx:{textTransform:"none",px:1.5,py:.5},children:b("RobotCard.DriveToHome.bt")})})]})]})})})})),P3=fr(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"),T3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),R3=J.forwardRef(T3);var Mc=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(Mc||{});const ng=Xe(Oe.observer(({setupState:e,className:t})=>{const r=P.useTheme(),{t:n}=_e.useTranslation(),o=()=>{var c,u,d,h;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"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.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}}},{label:a,indicatorColor:s,backgroundColor:i,textColor:l}=o();return g.jsx(P.Chip,{className:t,label:g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(P.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(P.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:a})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),A3=Xe(Oe.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=ng,className:o})=>{var l;const a=P.useTheme(),s=t||"Robot",i=r===Mc.READY;return g.jsxs(P.Box,{className:o,sx:{border:`1px solid ${a.palette.divider}`,background:((l=a.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(P.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${a.palette.primary.main} !important`},"& svg path":{fill:`${a.palette.primary.main} !important`}},children:g.jsx(R3,{})}):g.jsx(P3,{sx:{color:a.palette.error.main,fontSize:24}}),g.jsx(P.Typography,{variant:"body1",sx:{fontWeight:500,color:a.palette.text.primary},children:e}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:a.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(P.Typography,{variant:"body2",sx:{color:a.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),_3=Array(6).fill(2*Math.PI),Rl={[Mt.Abb]:[0,0,0,0,Math.PI/2,0,0],[Mt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[Mt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[Mt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[Mt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function og(e){const[t]=e.split("_");switch(t){case"ABB":return Mt.Abb;case"FANUC":return Mt.Fanuc;case"YASKAWA":return Mt.Yaskawa;case"KUKA":return Mt.Kuka;case"UniversalRobots":return Mt.Universalrobots;default:return null}}function E3(e,t){const r=og(e);return r&&r in Rl?Rl[r]:t||null}const I3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),V3=J.forwardRef(I3),M3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),j3=J.forwardRef(M3),jt=Oe.observer(({id:e,icon:t,color:r,title:n,name:o,label:a,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=Oe.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(P.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(P.SvgIcon,{component:t,sx:{color:r}}),a&&g.jsx("div",{style:{color:r},children:a})]}),g.jsx(P.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(P.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(P.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(P.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),g.jsx(P.Typography,{fontSize:"14px",children:s}),i&&g.jsx(P.Typography,{fontSize:"12px",children:i})]})})]})}),k3=Oe.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:o})=>{const a=P.useTheme(),{t:s}=_e.useTranslation();return e?g.jsx(jt,{id:"motion-group-virtual",icon:j3,color:a.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:o?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(_e.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:V3,color:a.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:o?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(_e.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),$3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),U3=J.forwardRef($3),D3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),L3=J.forwardRef(D3),B3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),N3=J.forwardRef(B3),F3=Oe.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=_e.useTranslation(),a=P.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(jt,{id:"operation-mode-auto",icon:U3,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:a.palette.text.secondary,explanation:g.jsx(_e.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:N3,color:a.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(_e.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:L3,color:a.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(_e.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})}}),z3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),G3=J.forwardRef(z3),H3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),F.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"}),F.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"})),q3=J.forwardRef(H3),W3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),J3=J.forwardRef(W3),Y3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),K3=J.forwardRef(Y3),Q3=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),X3=J.forwardRef(Q3),Z3=Oe.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=_e.useTranslation(),a=P.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:K3,color:a.palette.text.secondary,explanation:g.jsx(_e.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:q3,color:a.palette.error.main,explanation:g.jsx(_e.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:X3,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:a.palette.warning.main,explanation:g.jsx(_e.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:J3,color:a.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(_e.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:G3,color:a.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(_e.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:X2(e,`Unknown safety state ${e}`)}}),ej=Xe(Oe.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:o,transformOrigin:a,compact:s=!0})=>{const i=s?1:2;return g.jsxs(P.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(Z3,{safetyState:n,anchorOrigin:o,transformOrigin:a,compact:s}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(F3,{operationMode:r,anchorOrigin:o,transformOrigin:a,compact:s}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(k3,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:a,compact:s})]})})),tj=P.styled(P.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}}]}}),rj=J.forwardRef((e,t)=>g.jsx(tj,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"}));function nj(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(P.Box,{children:t})})}const oj=Xe(Oe.observer(e=>{const{items:t,defaultActiveTab:r=0,onTabChange:n,sx:o}=e,[a,s]=J.useState(r),i=(l,c)=>{s(c),n==null||n(c)};return g.jsxs(P.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",...o},children:[g.jsx(P.Box,{sx:{px:3,pt:3,pb:3},children:g.jsx(P.Tabs,{value:a,onChange:i,sx:{minHeight:"auto",backgroundColor:"transparent",mt:3,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2}},children:t.map((l,c)=>g.jsx(P.Tab,{label:l.label,icon:l.icon,iconPosition:"start",disableRipple:!0,sx:{minHeight:"auto",minWidth:"auto",padding:"4px 8px",borderRadius:"10px",backgroundColor:u=>{var d;return((d=u.palette.backgroundPaperElevation)==null?void 0:d[11])||"#32344B"},color:"text.primary",opacity:a===c?1:.38,textTransform:"none",fontWeight:500,transition:"all 0.2s ease-in-out","&:hover":{opacity:a===c?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:u=>{var d;return((d=u.palette.backgroundPaperElevation)==null?void 0:d[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},l.id))})}),g.jsx(P.Box,{sx:{mx:3,borderBottom:1,borderColor:"divider"}}),g.jsx(P.Box,{sx:{flex:1,overflow:"auto"},children:t.map((l,c)=>g.jsx(nj,{value:a,index:c,children:l.content},l.id))})]})})),aj={$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"},sj=J.lazy(()=>import("@monaco-editor/react"));let Bi=null;async function ij(){if(!Bi){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Bi={shiki:await e({langs:[aj],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Bi}const lj=Xe(e=>{const t=P.useTheme(),[r,n]=J.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function a(s){var c,u;s.languages.register({id:"wandelscript"}),s.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await ij();l(i,s),s.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(s),n(o)}return g.jsx(J.Suspense,{fallback:g.jsx(Pc,{}),children:g.jsx(sj,{value:e.code,onMount:(s,i)=>{a(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function ag(){var t,r,n,o,a,s,i;const e=P.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:(s=(a=e.paletteExt)==null?void 0:a.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":P.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function cj(){const e=ag();return e.palette.mode="light",e}function uj(e){var n,o,a,s;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"&&((s=(a=window.matchMedia)==null?void 0:a.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?ag():cj();return ap(r,e)}exports.AppHeader=jg;exports.CycleTimer=Am;exports.JoggingCartesianAxisControl=ol;exports.JoggingJointRotationControl=Mm;exports.JoggingPanel=t3;exports.JoggingStore=qs;exports.LoadingCover=Pc;exports.LoadingErrorMessage=Pf;exports.LogPanel=c3;exports.LogStore=Kf;exports.LogViewer=Qf;exports.MANUFACTURER_HOME_CONFIGS=Rl;exports.NoMotionGroupModal=d3;exports.PoseCartesianValues=n3;exports.PoseJointValues=o3;exports.PresetEnvironment=Ni;exports.ProgramControl=h3;exports.ProgramState=vr;exports.ProgramStateIndicator=Tl;exports.Robot=rg;exports.RobotCard=C3;exports.RobotListItem=A3;exports.RobotSetupReadinessIndicator=ng;exports.RobotSetupReadinessState=Mc;exports.SafetyBar=ej;exports.SafetyZonesRenderer=Ag;exports.SelectableFab=rj;exports.SupportedRobot=tg;exports.TabBar=oj;exports.TrajectoryRenderer=_g;exports.ValueInterpolator=xc;exports.VelocitySlider=Wf;exports.VelocitySliderLabel=Ic;exports.WandelbotsDataGrid=_m;exports.WandelscriptEditor=lj;exports.createDebugMessage=a3;exports.createErrorMessage=l3;exports.createInfoMessage=s3;exports.createLogMessage=Uo;exports.createNovaMuiTheme=uj;exports.createWarningMessage=i3;exports.defaultAxisConfig=_3;exports.defaultGetModel=Vc;exports.extractManufacturer=og;exports.getDefaultHomeConfig=E3;exports.i18n=_l;exports.useAnimationFrame=Rn;exports.useAutorun=Sc;exports.useInterpolation=Rm;exports.useMounted=Is;exports.useReaction=Em;
|
|
155
155
|
//# sourceMappingURL=index.cjs.map
|